Skip to content

Commit 6c4710e

Browse files
authored
Merge pull request #904 from strapi/release/1.6.4
2 parents c87c1d4 + 653eaa4 commit 6c4710e

File tree

109 files changed

+2850
-2863
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+2850
-2863
lines changed

docs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@strapi/design-system-docs",
3-
"version": "1.6.3",
3+
"version": "1.6.4",
44
"license": "MIT",
55
"private": true,
66
"dependencies": {
@@ -10,8 +10,8 @@
1010
"@storybook/builder-webpack5": "^6.5.15",
1111
"@storybook/manager-webpack5": "^6.5.15",
1212
"@storybook/react": "^6.5.15",
13-
"@strapi/design-system": "^1.6.3",
14-
"@strapi/icons": "^1.6.3",
13+
"@strapi/design-system": "^1.6.4",
14+
"@strapi/icons": "^1.6.4",
1515
"qs": "^6.11.0",
1616
"react": "17",
1717
"react-copy-to-clipboard": "^5.1.0",

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"packages": ["packages/*", "docs"],
3-
"version": "1.6.3",
3+
"version": "1.6.4",
44
"npmClient": "yarn",
55
"useWorkspaces": true
66
}

packages/strapi-design-system/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@strapi/design-system",
3-
"version": "1.6.3",
3+
"version": "1.6.4",
44
"license": "MIT",
55
"type": "module",
66
"sideEffects": false,
@@ -22,21 +22,22 @@
2222
"@floating-ui/react-dom": "^1.0.0",
2323
"@internationalized/number": "^3.1.1",
2424
"@radix-ui/react-use-callback-ref": "^1.0.0",
25-
"@uiw/react-codemirror": "4.8.1",
25+
"@uiw/react-codemirror": "^4.19.7",
2626
"compute-scroll-into-view": "^1.0.17",
2727
"prop-types": "^15.7.2"
2828
},
2929
"devDependencies": {
3030
"@juggle/resize-observer": "^3.4.0",
3131
"@playwright/test": "1.27.1",
32-
"@strapi/icons": "^1.6.3",
32+
"@strapi/icons": "^1.6.4",
3333
"@swc/core": "^1.3.11",
3434
"@swc/jest": "^0.2.23",
3535
"@testing-library/jest-dom": "5.16.5",
3636
"@testing-library/react": "12.1.4",
3737
"@types/jest": "^29.2.6",
3838
"@types/react": "17.0.2",
3939
"@types/react-dom": "17.0.2",
40+
"@types/react-router-dom": "^5.3.3",
4041
"@types/styled-components": "^5.1.26",
4142
"axe-playwright": "^1.1.11",
4243
"cross-env": "^7.0.3",

packages/strapi-design-system/src/Accordion/Accordion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import * as React from 'react';
22

33
import styled, { DefaultTheme } from 'styled-components';
44

5+
import { AccordionContext } from './AccordionContext';
56
import { Box } from '../Box';
67
import { Flex } from '../Flex';
78
import { useId } from '../helpers/useId';
89
import { Typography } from '../Typography';
9-
import { AccordionContext } from './AccordionContext';
1010

1111
interface GetBorderParams extends AccordionWrapperProps {
1212
theme: DefaultTheme;

packages/strapi-design-system/src/Accordion/AccordionContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Box, BoxProps } from '../Box';
21
import { useAccordion } from './AccordionContext';
2+
import { Box, BoxProps } from '../Box';
33

44
export type AccordionContentProps = BoxProps;
55

packages/strapi-design-system/src/Accordion/AccordionToggle.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import * as React from 'react';
33
import { CarretDown } from '@strapi/icons';
44
import styled from 'styled-components';
55

6+
import { AccordionSize, AccordionTypography } from './Accordion';
7+
import { useAccordion } from './AccordionContext';
8+
import { getBackground } from './utils';
69
import { Flex } from '../Flex';
710
import { Icon } from '../Icon';
811
import { Stack } from '../Stack';
912
import { TextButton } from '../TextButton';
1013
import { Typography } from '../Typography';
11-
import { AccordionSize, AccordionTypography } from './Accordion';
12-
import { useAccordion } from './AccordionContext';
13-
import { getBackground } from './utils';
1414

1515
const ToggleButton = styled(TextButton)<{ expanded: boolean }>`
1616
text-align: left;

packages/strapi-design-system/src/Alert/Alert.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import * as React from 'react';
33
import { Information, CheckCircle, ExclamationMarkCircle, Cross } from '@strapi/icons';
44
import styled from 'styled-components';
55

6+
import { handleBackgroundColor, handleBorderColor, handleIconColor } from './utils';
67
import { Box, BoxProps } from '../Box';
78
import { Flex } from '../Flex';
89
import { buttonFocusStyle } from '../themes/utils';
910
import { Typography } from '../Typography';
10-
import { handleBackgroundColor, handleBorderColor, handleIconColor } from './utils';
1111

1212
const AlertBody = styled(Box)`
1313
flex: 1;

packages/strapi-design-system/src/Avatar/Avatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import * as React from 'react';
22

33
import styled from 'styled-components';
44

5+
import { avatarSize, previewSize } from './constants';
56
import { Box } from '../Box';
67
import { Flex, FlexProps } from '../Flex';
78
import { Typography, TypographyProps } from '../Typography';
8-
import { avatarSize, previewSize } from './constants';
99

1010
const AvatarImg = styled.img`
1111
border-radius: 50%;

packages/strapi-design-system/src/Avatar/AvatarGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import styled from 'styled-components';
22

3-
import { Flex } from '../Flex';
43
import { avatarSize } from './constants';
4+
import { Flex } from '../Flex';
55

66
export const AvatarGroup = styled(Flex)`
77
& > * + * {

packages/strapi-design-system/src/BaseButton/BaseButton.tsx

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,47 @@ import React from 'react';
22

33
import styled from 'styled-components';
44

5+
import { Flex, FlexProps } from '../Flex';
56
import { buttonFocusStyle } from '../themes/utils';
67

7-
export const BaseButtonWrapper = styled.button`
8-
display: flex;
9-
cursor: pointer;
10-
padding: ${({ theme }) => theme.spaces[2]};
11-
border-radius: ${({ theme }) => theme.borderRadius};
12-
background: ${({ theme }) => theme.colors.neutral0};
13-
border: 1px solid ${({ theme }) => theme.colors.neutral200};
8+
export const BaseButtonWrapper = styled(Flex)`
149
svg {
1510
height: ${({ theme }) => theme.spaces[3]};
1611
width: ${({ theme }) => theme.spaces[3]};
17-
}
18-
svg {
12+
1913
> g,
2014
path {
2115
fill: ${({ theme }) => theme.colors.neutral0};
2216
}
2317
}
18+
2419
&[aria-disabled='true'] {
2520
pointer-events: none;
2621
}
2722
2823
${buttonFocusStyle}
2924
`;
3025

31-
export interface BaseButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
32-
children: React.ReactNode;
26+
export interface BaseButtonProps<TElement extends HTMLElement = HTMLButtonElement> extends FlexProps<TElement> {
27+
disabled?: boolean;
3328
}
3429

3530
export const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(
3631
({ disabled, children, ...props }, ref) => {
3732
return (
38-
<BaseButtonWrapper ref={ref} aria-disabled={disabled} type="button" disabled={disabled} {...props}>
33+
<BaseButtonWrapper
34+
ref={ref}
35+
aria-disabled={disabled}
36+
as="button"
37+
type="button"
38+
disabled={disabled}
39+
padding={2}
40+
hasRadius
41+
background="neutral0"
42+
borderColor="neutral200"
43+
cursor="pointer"
44+
{...props}
45+
>
3946
{children}
4047
</BaseButtonWrapper>
4148
);

0 commit comments

Comments
 (0)