@strapi/design-system 2.0.0-rc.11 → 2.0.0-rc.12
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.
- package/dist/components/Accordion/Accordion.d.ts +2 -1
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/components/Select/SelectParts.d.ts.map +1 -1
- package/dist/components/Status/Status.d.ts +2 -7
- package/dist/components/Status/Status.d.ts.map +1 -1
- package/dist/index.js +34 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -23,7 +23,8 @@ interface TriggerProps extends Omit<RadixAccordion.AccordionTriggerProps, 'asChi
|
|
|
23
23
|
*/
|
|
24
24
|
caretPosition?: 'left' | 'right';
|
|
25
25
|
description?: string;
|
|
26
|
-
icon?: React.ElementType
|
|
26
|
+
icon?: React.ElementType<React.SVGProps<SVGSVGElement>>;
|
|
27
|
+
iconProps?: React.SVGProps<SVGSVGElement>;
|
|
27
28
|
}
|
|
28
29
|
declare const Trigger: React.ForwardRefExoticComponent<TriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
29
30
|
type ActionsElement = HTMLSpanElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAC;AAM5D,OAAO,EAAuB,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvE,KAAK,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AACtB,KAAK,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AAMvC,UAAU,YAAY;IACpB;;OAEG;IACH,IAA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EACJ,OAAO,GACR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,QAAQ,MAAM,0BAA0B,CAAC;AAmCrD,UAAU,eAAgB,SAAQ,QAAQ,CAAC,aAAa;CAAG;AAE3D,KAAK,eAAe,GAAG,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,QAAQ,MAAM,0BAA0B,CAAC;AAmCrD,UAAU,eAAgB,SAAQ,QAAQ,CAAC,aAAa;CAAG;AAE3D,KAAK,eAAe,GAAG,iBAAiB,CAAC;AAyEzC,UAAU,aAAc,SAAQ,eAAe;CAAG;AAElD,QAAA,MAAM,YAAY,yFAehB,CAAC;AAEH,OAAO,EAAE,YAAY,IAAI,QAAQ,EAAE,CAAC;AACpC,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../src/components/NumberInput/NumberInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,UAAU,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC;IAC7E,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAID,QAAA,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../src/components/NumberInput/NumberInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,UAAU,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC;IAC7E,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAID,QAAA,MAAM,WAAW,2FAgKhB,CAAC;AA6DF,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectParts.d.ts","sourceRoot":"","sources":["../../../src/components/Select/SelectParts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAI/C,OAAO,EAAqB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAmC,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG/F,OAAO,EAAE,KAAK,EAAY,MAAM,UAAU,CAAC;AAM3C,KAAK,WAAW,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7B,UAAU,YAAa,SAAQ,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnF;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ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AAI,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACjG,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,UAAU,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,aAAa,EACb,UAAU,GACX,CAAC"}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BoxProps } from '../../primitives/Box';
|
|
3
3
|
type StatusVariant = 'alternative' | 'danger' | 'neutral' | 'primary' | 'secondary' | 'success' | 'warning';
|
|
4
|
-
type StatusSize = 'S' | 'M';
|
|
4
|
+
type StatusSize = 'XS' | 'S' | 'M';
|
|
5
5
|
interface StatusProps extends BoxProps {
|
|
6
6
|
variant?: StatusVariant;
|
|
7
|
-
/**
|
|
8
|
-
* If `false`, the preceeding bullet of the status won't be displayed.
|
|
9
|
-
* This prop and the bullet will be removed in the next major version.
|
|
10
|
-
*/
|
|
11
|
-
showBullet?: boolean;
|
|
12
7
|
size?: StatusSize;
|
|
13
8
|
children: React.ReactNode;
|
|
14
9
|
}
|
|
15
|
-
declare const Status: ({ variant,
|
|
10
|
+
declare const Status: ({ variant, size, children, ...props }: StatusProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
11
|
export { Status };
|
|
17
12
|
export type { StatusProps, StatusSize, StatusVariant };
|
|
18
13
|
//# sourceMappingURL=Status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Status.d.ts","sourceRoot":"","sources":["../../../src/components/Status/Status.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAO,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"Status.d.ts","sourceRoot":"","sources":["../../../src/components/Status/Status.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAO,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,KAAK,aAAa,GAAG,aAAa,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAC5G,KAAK,UAAU,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AAEnC,UAAU,WAAY,SAAQ,QAAQ;IACpC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAeD,QAAA,MAAM,MAAM,0CAA6D,WAAW,4CAsBnF,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -610,12 +610,12 @@ const AccordionItem = styledComponents.styled(RadixAccordion__namespace.Item)`
|
|
|
610
610
|
}
|
|
611
611
|
`;
|
|
612
612
|
const Trigger$7 = React__namespace.forwardRef(
|
|
613
|
-
({ caretPosition = "left", description, icon: Icon, children, ...restProps }, forwardedRef) => {
|
|
613
|
+
({ caretPosition = "left", description, icon: Icon, iconProps, children, ...restProps }, forwardedRef) => {
|
|
614
614
|
const { size } = useAccordion("Trigger");
|
|
615
615
|
return /* @__PURE__ */ jsxRuntime.jsxs(AccordionTrigger, { $caretPosition: caretPosition, $size: size, ref: forwardedRef, ...restProps, children: [
|
|
616
616
|
caretPosition === "left" ? /* @__PURE__ */ jsxRuntime.jsx(TriggerIcon, { $size: size, children: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, { width: size === "S" ? "1.2rem" : "1.6rem", height: size === "S" ? "1.2rem" : "1.6rem" }) }) : null,
|
|
617
617
|
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { tag: "span", gap: 2, children: [
|
|
618
|
-
Icon && size === "S" ? /* @__PURE__ */ jsxRuntime.jsx(IconBox$4, { children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}) }) : null,
|
|
618
|
+
Icon && size === "S" ? /* @__PURE__ */ jsxRuntime.jsx(IconBox$4, { children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { ...iconProps }) }) : null,
|
|
619
619
|
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { alignItems: "flex-start", direction: "column", tag: "span", ref: forwardedRef, children: [
|
|
620
620
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
621
621
|
Typography,
|
|
@@ -2148,7 +2148,7 @@ const CheckboxEl = React__namespace.forwardRef(
|
|
|
2148
2148
|
onChange: onCheckedChange
|
|
2149
2149
|
});
|
|
2150
2150
|
const composedRefs = useComposedRefs(checkboxRef, forwardedRef);
|
|
2151
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CheckboxRoot, { ref: composedRefs, checked, onCheckedChange: setChecked, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2151
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CheckboxRoot, { ref: composedRefs, checked, onCheckedChange: setChecked, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(CheckboxIndicator, { style: { display: "inline-flex", pointerEvents: "auto" }, forceMount: true, children: [
|
|
2152
2152
|
checked === true ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { width: "1.6rem", fill: "neutral0" }) : null,
|
|
2153
2153
|
checked === "indeterminate" ? /* @__PURE__ */ jsxRuntime.jsx(icons.Minus, { fill: "neutral0" }) : null
|
|
2154
2154
|
] }) });
|
|
@@ -2187,10 +2187,16 @@ const CheckboxRoot = styledComponents.styled(Checkbox__namespace.Root)`
|
|
|
2187
2187
|
transform: translate(-50%, -50%);
|
|
2188
2188
|
width: 100%;
|
|
2189
2189
|
height: 100%;
|
|
2190
|
+
z-index: -1;
|
|
2190
2191
|
min-width: 44px;
|
|
2191
2192
|
min-height: 44px;
|
|
2192
2193
|
}
|
|
2193
2194
|
`;
|
|
2195
|
+
const CheckboxIndicator = styledComponents.styled(Checkbox__namespace.Indicator)`
|
|
2196
|
+
width: 100%;
|
|
2197
|
+
height: 100%;
|
|
2198
|
+
cursor: pointer;
|
|
2199
|
+
`;
|
|
2194
2200
|
const CheckboxImpl = React__namespace.forwardRef(({ children, ...restProps }, forwardedRef) => {
|
|
2195
2201
|
const labelId = useId(restProps.id);
|
|
2196
2202
|
if (!children) {
|
|
@@ -9128,6 +9134,7 @@ const StyledTrigger = styledComponents.styled(Flex)`
|
|
|
9128
9134
|
`;
|
|
9129
9135
|
}
|
|
9130
9136
|
}}
|
|
9137
|
+
cursor: pointer;
|
|
9131
9138
|
|
|
9132
9139
|
&[aria-disabled='true'] {
|
|
9133
9140
|
color: ${(props) => props.theme.colors.neutral500};
|
|
@@ -9206,6 +9213,7 @@ const itemStyles = styledComponents.css`
|
|
|
9206
9213
|
&:focus-visible {
|
|
9207
9214
|
outline: none;
|
|
9208
9215
|
background-color: ${({ theme }) => theme.colors.primary100};
|
|
9216
|
+
cursor: pointer;
|
|
9209
9217
|
}
|
|
9210
9218
|
`;
|
|
9211
9219
|
const StyledSelectItem = styledComponents.styled(uiPrimitives.Select.Item)`
|
|
@@ -10807,6 +10815,13 @@ const NumberInput = React__namespace.forwardRef(
|
|
|
10807
10815
|
formatNumberAndSetInput(value2);
|
|
10808
10816
|
}
|
|
10809
10817
|
};
|
|
10818
|
+
const getDecimalPlaces = (step2) => {
|
|
10819
|
+
const stepString = step2.toString();
|
|
10820
|
+
if (!stepString.includes("."))
|
|
10821
|
+
return 0;
|
|
10822
|
+
return stepString.split(".")[1].length;
|
|
10823
|
+
};
|
|
10824
|
+
const decimalPlaces = getDecimalPlaces(step);
|
|
10810
10825
|
const increment = () => {
|
|
10811
10826
|
if (!inputValue) {
|
|
10812
10827
|
formatNumberAndSetInput(step);
|
|
@@ -10814,7 +10829,8 @@ const NumberInput = React__namespace.forwardRef(
|
|
|
10814
10829
|
}
|
|
10815
10830
|
const parsedValue = numberParserRef.current.parse(inputValue);
|
|
10816
10831
|
const newValue = isNaN(parsedValue) ? step : parsedValue + step;
|
|
10817
|
-
|
|
10832
|
+
const roundedValue = parseFloat(newValue.toFixed(decimalPlaces));
|
|
10833
|
+
formatNumberAndSetInput(numberFormaterRef.current.format(roundedValue));
|
|
10818
10834
|
};
|
|
10819
10835
|
const decrement = () => {
|
|
10820
10836
|
if (!inputValue) {
|
|
@@ -10823,7 +10839,8 @@ const NumberInput = React__namespace.forwardRef(
|
|
|
10823
10839
|
}
|
|
10824
10840
|
const parsedValue = numberParserRef.current.parse(inputValue);
|
|
10825
10841
|
const newValue = isNaN(parsedValue) ? -step : parsedValue - step;
|
|
10826
|
-
|
|
10842
|
+
const roundedValue = parseFloat(newValue.toFixed(decimalPlaces));
|
|
10843
|
+
formatNumberAndSetInput(numberFormaterRef.current.format(roundedValue));
|
|
10827
10844
|
};
|
|
10828
10845
|
const handleKeyDown = (e) => {
|
|
10829
10846
|
if (disabled)
|
|
@@ -11711,13 +11728,20 @@ const MultiSelectNested = ({ options, ...props }) => {
|
|
|
11711
11728
|
const NestedOption = styledComponents.styled(MultiSelectOption)`
|
|
11712
11729
|
padding-left: ${({ theme }) => theme.spaces[7]};
|
|
11713
11730
|
`;
|
|
11714
|
-
const
|
|
11731
|
+
const getPadding = (size) => {
|
|
11732
|
+
if (size === "XS") {
|
|
11733
|
+
return { paddingX: "0.6rem", paddingY: "0.2rem" };
|
|
11734
|
+
}
|
|
11735
|
+
if (size === "S") {
|
|
11736
|
+
return { paddingX: 2, paddingY: 1 };
|
|
11737
|
+
}
|
|
11738
|
+
return { paddingX: 5, paddingY: 4 };
|
|
11739
|
+
};
|
|
11740
|
+
const Status = ({ variant: variant2 = "primary", size = "M", children, ...props }) => {
|
|
11715
11741
|
const backgroundColor = `${variant2}100`;
|
|
11716
11742
|
const borderColor = `${variant2}200`;
|
|
11717
|
-
const bulletColor = `${variant2}600`;
|
|
11718
11743
|
const textColor = `${variant2}600`;
|
|
11719
|
-
const paddingX = size
|
|
11720
|
-
const paddingY = size === "S" ? 1 : 4;
|
|
11744
|
+
const { paddingX, paddingY } = getPadding(size);
|
|
11721
11745
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11722
11746
|
Box,
|
|
11723
11747
|
{
|
|
@@ -11730,10 +11754,7 @@ const Status = ({ variant: variant2 = "primary", showBullet = true, size = "M",
|
|
|
11730
11754
|
paddingLeft: paddingX,
|
|
11731
11755
|
paddingRight: paddingX,
|
|
11732
11756
|
...props,
|
|
11733
|
-
children
|
|
11734
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { background: bulletColor, width: "0.6rem", height: "0.6rem", borderRadius: "50%" }),
|
|
11735
|
-
children
|
|
11736
|
-
] }) : children
|
|
11757
|
+
children
|
|
11737
11758
|
}
|
|
11738
11759
|
);
|
|
11739
11760
|
};
|