@strapi/design-system 1.13.0-typescript.1 → 1.14.0-typescript.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ export interface AlertProps extends BoxProps {
21
21
  /**
22
22
  * The title of the `Alert`.
23
23
  */
24
- title: string;
24
+ title?: string;
25
25
  /**
26
26
  * Changes the element, as which a component will render (similar to styled-components).
27
27
  */
@@ -56,7 +56,7 @@ const ActionBox = styled__default.default(Box.Box) `
56
56
  }
57
57
  `;
58
58
  const Alert = ({ title, children, variant = 'default', onClose, closeLabel, titleAs = 'p', action, ...props }) => {
59
- return (jsxRuntime.jsxs(Flex.Flex, { alignItems: "flex-start", background: utils$1.handleBackgroundColor(variant), borderColor: utils$1.handleBorderColor(variant), boxShadow: "filterShadow", gap: 3, hasRadius: true, padding: 5, paddingRight: 6, variant: variant, ...props, children: [jsxRuntime.jsx(AlertIconWrapper, { height: `${20 / 16}rem`, shrink: 0, variant: variant, width: `${20 / 16}rem`, children: jsxRuntime.jsx(AlertIcon, { "aria-hidden": true, variant: variant }) }), jsxRuntime.jsxs(Flex.Flex, { alignItems: "start", gap: action ? 2 : 1, wrap: "wrap", role: variant === 'danger' ? 'alert' : 'status', width: "100%", children: [jsxRuntime.jsx(Typography.Typography, { fontWeight: "bold", textColor: "neutral800", as: titleAs, children: title }), jsxRuntime.jsx(Typography.Typography, { as: "p", textColor: "neutral800", children: children }), action && jsxRuntime.jsx(ActionBox, { variant: variant, children: action })] }), jsxRuntime.jsx(CloseButton, { as: "button", background: "transparent", borderColor: undefined, height: `${12 / 16}rem`, marginTop: 1, onClick: onClose, width: `${12 / 16}rem`, "aria-label": closeLabel, children: jsxRuntime.jsx(icons.Cross, { "aria-hidden": true }) })] }));
59
+ return (jsxRuntime.jsxs(Flex.Flex, { alignItems: "flex-start", background: utils$1.handleBackgroundColor(variant), borderColor: utils$1.handleBorderColor(variant), boxShadow: "filterShadow", gap: 3, hasRadius: true, padding: 5, paddingRight: 6, variant: variant, ...props, children: [jsxRuntime.jsx(AlertIconWrapper, { height: `${20 / 16}rem`, shrink: 0, variant: variant, width: `${20 / 16}rem`, children: jsxRuntime.jsx(AlertIcon, { "aria-hidden": true, variant: variant }) }), jsxRuntime.jsxs(Flex.Flex, { alignItems: "start", gap: action ? 2 : 1, wrap: "wrap", role: variant === 'danger' ? 'alert' : 'status', width: "100%", children: [title && (jsxRuntime.jsx(Typography.Typography, { fontWeight: "bold", textColor: "neutral800", as: titleAs, children: title })), jsxRuntime.jsx(Typography.Typography, { as: "p", textColor: "neutral800", children: children }), action && jsxRuntime.jsx(ActionBox, { variant: variant, children: action })] }), jsxRuntime.jsx(CloseButton, { as: "button", background: "transparent", borderColor: undefined, height: `${12 / 16}rem`, marginTop: 1, onClick: onClose, width: `${12 / 16}rem`, "aria-label": closeLabel, children: jsxRuntime.jsx(icons.Cross, { "aria-hidden": true }) })] }));
60
60
  };
61
61
 
62
62
  exports.Alert = Alert;
@@ -48,7 +48,7 @@ const ActionBox = styled(Box) `
48
48
  }
49
49
  `;
50
50
  const Alert = ({ title, children, variant = 'default', onClose, closeLabel, titleAs = 'p', action, ...props }) => {
51
- return (jsxs(Flex, { alignItems: "flex-start", background: handleBackgroundColor(variant), borderColor: handleBorderColor(variant), boxShadow: "filterShadow", gap: 3, hasRadius: true, padding: 5, paddingRight: 6, variant: variant, ...props, children: [jsx(AlertIconWrapper, { height: `${20 / 16}rem`, shrink: 0, variant: variant, width: `${20 / 16}rem`, children: jsx(AlertIcon, { "aria-hidden": true, variant: variant }) }), jsxs(Flex, { alignItems: "start", gap: action ? 2 : 1, wrap: "wrap", role: variant === 'danger' ? 'alert' : 'status', width: "100%", children: [jsx(Typography, { fontWeight: "bold", textColor: "neutral800", as: titleAs, children: title }), jsx(Typography, { as: "p", textColor: "neutral800", children: children }), action && jsx(ActionBox, { variant: variant, children: action })] }), jsx(CloseButton, { as: "button", background: "transparent", borderColor: undefined, height: `${12 / 16}rem`, marginTop: 1, onClick: onClose, width: `${12 / 16}rem`, "aria-label": closeLabel, children: jsx(Cross, { "aria-hidden": true }) })] }));
51
+ return (jsxs(Flex, { alignItems: "flex-start", background: handleBackgroundColor(variant), borderColor: handleBorderColor(variant), boxShadow: "filterShadow", gap: 3, hasRadius: true, padding: 5, paddingRight: 6, variant: variant, ...props, children: [jsx(AlertIconWrapper, { height: `${20 / 16}rem`, shrink: 0, variant: variant, width: `${20 / 16}rem`, children: jsx(AlertIcon, { "aria-hidden": true, variant: variant }) }), jsxs(Flex, { alignItems: "start", gap: action ? 2 : 1, wrap: "wrap", role: variant === 'danger' ? 'alert' : 'status', width: "100%", children: [title && (jsx(Typography, { fontWeight: "bold", textColor: "neutral800", as: titleAs, children: title })), jsx(Typography, { as: "p", textColor: "neutral800", children: children }), action && jsx(ActionBox, { variant: variant, children: action })] }), jsx(CloseButton, { as: "button", background: "transparent", borderColor: undefined, height: `${12 / 16}rem`, marginTop: 1, onClick: onClose, width: `${12 / 16}rem`, "aria-label": closeLabel, children: jsx(Cross, { "aria-hidden": true }) })] }));
52
52
  };
53
53
 
54
54
  export { Alert };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/design-system",
3
- "version": "1.13.0-typescript.1",
3
+ "version": "1.14.0-typescript.0",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -33,16 +33,16 @@
33
33
  "@radix-ui/react-dismissable-layer": "^1.0.5",
34
34
  "@radix-ui/react-dropdown-menu": "^2.0.6",
35
35
  "@radix-ui/react-focus-scope": "1.0.4",
36
- "@strapi/ui-primitives": "^1.13.0-typescript.1",
37
- "@uiw/react-codemirror": "^4.21.19",
36
+ "@strapi/ui-primitives": "^1.14.0-typescript.0",
37
+ "@uiw/react-codemirror": "^4.21.20",
38
38
  "aria-hidden": "^1.2.3",
39
39
  "compute-scroll-into-view": "^3.1.0",
40
40
  "prop-types": "^15.8.1",
41
- "react-remove-scroll": "^2.5.6"
41
+ "react-remove-scroll": "^2.5.7"
42
42
  },
43
43
  "devDependencies": {
44
- "@playwright/test": "1.38.1",
45
- "@strapi/icons": "^1.13.0-typescript.1",
44
+ "@playwright/test": "1.39.0",
45
+ "@strapi/icons": "^1.14.0-typescript.0",
46
46
  "@types/react-router-dom": "^5.3.3",
47
47
  "@types/styled-components": "^5.1.26",
48
48
  "axe-playwright": "^1.2.3",
@@ -51,7 +51,7 @@
51
51
  "styled-components": "^5.3.11"
52
52
  },
53
53
  "peerDependencies": {
54
- "@strapi/icons": "1.13.0-typescript.1",
54
+ "@strapi/icons": "1.14.0-typescript.0",
55
55
  "react": "^17.0.0 || ^18.0.0",
56
56
  "react-dom": "^17.0.0 || ^18.0.0",
57
57
  "react-router-dom": "^5.2.0",