@strapi/design-system 2.0.0-rc.25 → 2.0.0-rc.27
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/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +2 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Select/SelectParts.d.ts.map +1 -1
- package/dist/components/SimpleMenu/Menu.d.ts +3 -1
- package/dist/components/SimpleMenu/Menu.d.ts.map +1 -1
- package/dist/components/SimpleMenu/SimpleMenu.d.ts +3 -2
- package/dist/components/SimpleMenu/SimpleMenu.d.ts.map +1 -1
- package/dist/components/SimpleMenu/utils.d.ts +6 -0
- package/dist/components/SimpleMenu/utils.d.ts.map +1 -0
- package/dist/index.js +70 -60
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +70 -60
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AActE,OAAO,EAAE,KAAK,EAAY,MAAM,UAAU,CAAC;AAQ3C,UAAU,aACR,SAAQ,IAAI,CACR,iBAAiB,CAAC,SAAS,EACzB,kBAAkB,GAClB,cAAc,GACd,UAAU,GACV,UAAU,GACV,kBAAkB,GAClB,aAAa,GACb,oBAAoB,GACpB,aAAa,GACb,sBAAsB,GACtB,MAAM,GACN,cAAc,GACd,qBAAqB,GACrB,mBAAmB,GACnB,UAAU,GACV,WAAW,GACX,OAAO,CACV,EACD,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC,EAClD,I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B,KAAK,IAAI,CAAC;IACxD,aAAa,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAC3D;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IACjB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,KAAK,oBAAoB,GAAG,gBAAgB,CAAC;AAE7C,QAAA,MAAM,QAAQ,wFAmPb,CAAC;AA+JF,UAAU,mBAAoB,SAAQ,iBAAiB,CAAC,SAAS;IAC/D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,MAAM,4FAYX,CAAC;AA8BF,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,cAAc,EAAE,CAAC;AAC9C,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,WAAW,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,WAAW,MAAM,8BAA8B,CAAC;AAI5D,OAAO,EAAuB,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAmC,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAO/F,UAAU,KAAM,SAAQ,WAAW,CAAC,gBAAgB;CAAG;AAEvD,QAAA,MAAM,IAAI,wCAAmB,CAAC;AAM9B,KAAK,cAAc,GAAG,iBAAiB,CAAC;AAExC,UAAU,YAAa,SAAQ,IAAI,CAAC,WAAW,CAAC,uBAAuB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AAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AACrF,YAAY,EACV,KAAK,EACL,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,aAAa,EACb,WAAW,EACX,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,GACZ,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { ScrollAreaProps } from '../../utilities/ScrollArea';
|
|
|
4
4
|
interface Props extends Popover.PopoverProps {
|
|
5
5
|
}
|
|
6
6
|
declare const Root: React.FC<Popover.PopoverProps>;
|
|
7
|
+
declare const Anchor: React.ForwardRefExoticComponent<Popover.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
8
|
type TriggerElement = HTMLButtonElement;
|
|
8
9
|
interface TriggerProps extends Omit<Popover.PopoverTriggerProps, 'asChild'> {
|
|
9
10
|
}
|
|
@@ -17,6 +18,6 @@ interface ScrollAreaImplProps extends ScrollAreaProps {
|
|
|
17
18
|
onReachEnd?: (entry: IntersectionObserverEntry) => void;
|
|
18
19
|
}
|
|
19
20
|
declare const ScrollAreaImpl: React.ForwardRefExoticComponent<ScrollAreaImplProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
-
export { Root, Trigger, Content, ScrollAreaImpl as ScrollArea };
|
|
21
|
+
export { Root, Anchor, Trigger, Content, ScrollAreaImpl as ScrollArea };
|
|
21
22
|
export type { Props, TriggerElement, TriggerProps, ContentProps, ContentElement, ScrollAreaImplProps as ScrollAreaProps, };
|
|
22
23
|
//# sourceMappingURL=Popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CA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A,MAAM,OAAO,wFAEX,CAAC;AAMH,KAAK,cAAc,GAAG,cAAc,CAAC;AAErC,UAAU,YAAa,SAAQ,OAAO,CAAC,mBAAmB;CAAG;AAE7D,QAAA,MAAM,OAAO,qFAMX,CAAC;AAsCH,UAAU,mBAAoB,SAAQ,eAAe;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CACzD;AAED,QAAA,MAAM,cAAc,4FAoBnB,CAAC;AAMF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,IAAI,UAAU,EAAE,CAAC;AACxE,YAAY,EACV,KAAK,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,mBAAmB,IAAI,eAAe,GACvC,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,
|
|
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,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAmC,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAI/F,OAAO,EAAE,KAAK,EAAY,MAAM,UAAU,CAAC;AAO3C,KAAK,WAAW,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7B,UAAU,YAAa,SAAQ,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,CA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,WAAW,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC5C,KAAK,YAAY,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC9C,KAAK,aAAa,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAChD,KAAK,kBAAkB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAC1D,KAAK,aAAa,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAChD,KAAK,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC1C,KAAK,aAAa,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,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"}
|
|
@@ -26,12 +26,14 @@ type ContentProps = FlexProps<'div'> & Pick<DropdownMenu.DropdownMenuContentProp
|
|
|
26
26
|
intersectionId?: string;
|
|
27
27
|
popoverPlacement?: `${NonNullable<DropdownMenu.DropdownMenuContentProps['side']>}-${NonNullable<DropdownMenu.DropdownMenuContentProps['align']>}`;
|
|
28
28
|
};
|
|
29
|
+
export type ItemVariant = 'danger' | 'default';
|
|
29
30
|
interface ItemSharedProps extends Pick<DropdownMenu.MenuItemProps, 'disabled' | 'onSelect'> {
|
|
30
31
|
children?: React.ReactNode;
|
|
31
32
|
isExternal?: boolean;
|
|
32
33
|
isFocused?: boolean;
|
|
33
34
|
startIcon?: React.ReactNode;
|
|
34
35
|
endIcon?: React.ReactNode;
|
|
36
|
+
variant?: ItemVariant;
|
|
35
37
|
}
|
|
36
38
|
interface ItemExternalLinkProps extends ItemSharedProps, Omit<LinkProps, 'onSelect'> {
|
|
37
39
|
as?: never;
|
|
@@ -62,7 +64,7 @@ interface SubContentProps extends FlexProps<'div'> {
|
|
|
62
64
|
declare const Root: React.FC<DropdownMenu.DropdownMenuProps>;
|
|
63
65
|
declare const Trigger: React.ForwardRefExoticComponent<(Omit<TriggerPropsWithButton, "ref"> | Omit<TriggerPropsWithIconButton, "ref">) & React.RefAttributes<HTMLButtonElement>>;
|
|
64
66
|
declare const Content: React.ForwardRefExoticComponent<Omit<ContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
65
|
-
declare const Item: ({ onSelect, disabled, isLink, startIcon, endIcon, isExternal, ...props }: ItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
declare const Item: ({ onSelect, disabled, isLink, startIcon, endIcon, isExternal, variant, ...props }: ItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
66
68
|
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
69
|
declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLSpanElement>>;
|
|
68
70
|
declare const SubRoot: React.FC<DropdownMenu.DropdownMenuSubProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/SimpleMenu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAK9D,OAAO,EAAO,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAuB,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAmC,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE/F,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE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menu from './Menu';
|
|
3
4
|
type SimpleMenuProps = Menu.TriggerProps & Pick<Menu.ContentProps, 'popoverPlacement' | 'intersectionId'> & {
|
|
4
5
|
children?: React.ReactNode;
|
|
@@ -38,8 +39,8 @@ declare const SimpleMenu: React.ForwardRefExoticComponent<(Omit<Omit<import(".."
|
|
|
38
39
|
*/
|
|
39
40
|
onReachEnd?: ((entry: IntersectionObserverEntry) => void) | undefined;
|
|
40
41
|
}, "ref">) & React.RefAttributes<HTMLButtonElement>>;
|
|
41
|
-
declare const MenuItem: ({ onSelect, disabled, isLink, startIcon, endIcon, isExternal, ...props }: Menu.ItemProps<(props: Omit<import("
|
|
42
|
-
type MenuItemProps = Menu.ItemProps
|
|
42
|
+
declare const MenuItem: ({ onSelect, disabled, isLink, startIcon, endIcon, isExternal, variant, ...props }: Menu.ItemProps<(props: Omit<import("../BaseLink").BaseLinkProps<"a">, "ref"> & React.RefAttributes<HTMLAnchorElement>) => React.ReactNode>) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
type MenuItemProps<T extends React.ComponentType = typeof BaseLink> = Menu.ItemProps<T>;
|
|
43
44
|
export { SimpleMenu, MenuItem, Menu };
|
|
44
45
|
export type { SimpleMenuProps, MenuItemProps };
|
|
45
46
|
//# sourceMappingURL=SimpleMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleMenu.d.ts","sourceRoot":"","sources":["../../../src/components/SimpleMenu/SimpleMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SimpleMenu.d.ts","sourceRoot":"","sources":["../../../src/components/SimpleMenu/SimpleMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAM/B,KAAK,eAAe,GAAG,IAAI,CAAC,YAAY,GACtC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,GAAG;IAC/D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CACzD,CAAC;AAEJ,QAAA,MAAM,UAAU;;;;;;;eATD,MAAM,SAAS;oBACX,IAAI;qBACH,IAAI;IACpB;;OAEG;0BACkB,yBAAyB,KAAK,IAAI;;;;;;;;eAN5C,MAAM,SAAS;oBACX,IAAI;qBACH,IAAI;IACpB;;OAEG;0BACkB,yBAAyB,KAAK,IAAI;oDAqD1D,CAAC;AAEF,QAAA,MAAM,QAAQ,4QAAY,CAAC;AAC3B,KAAK,aAAa,CAAC,CAAC,SAAS,KAAK,CAAC,aAAa,GAAG,OAAO,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAExF,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACtC,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
|
2
|
+
import type { ItemVariant } from './Menu';
|
|
3
|
+
export declare const getBackgroundColorHover: (variant: ItemVariant) => keyof DefaultTheme['colors'];
|
|
4
|
+
export declare const getTextColor: (variant: ItemVariant, disabled?: boolean) => keyof DefaultTheme['colors'];
|
|
5
|
+
export declare const getIconColor: (variant: ItemVariant, disabled?: boolean) => keyof DefaultTheme['colors'];
|
|
6
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/SimpleMenu/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,eAAO,MAAM,uBAAuB,YAAa,WAAW,KAAG,MAAM,YAAY,CAAC,QAAQ,CAOzF,CAAC;AAEF,eAAO,MAAM,YAAY,YAAa,WAAW,aAAa,OAAO,KAAG,MAAM,YAAY,CAAC,QAAQ,CAOlG,CAAC;AAEF,eAAO,MAAM,YAAY,YAAa,WAAW,aAAa,OAAO,KAAG,MAAM,YAAY,CAAC,QAAQ,CAOlG,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -620,7 +620,7 @@ const Trigger$7 = React__namespace.forwardRef(
|
|
|
620
620
|
return /* @__PURE__ */ jsxRuntime.jsxs(AccordionTrigger, { $caretPosition: caretPosition, $size: size, ref: forwardedRef, ...restProps, children: [
|
|
621
621
|
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,
|
|
622
622
|
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { tag: "span", gap: 2, overflow: "hidden", children: [
|
|
623
|
-
Icon && size === "S" ? /* @__PURE__ */ jsxRuntime.jsx(IconBox$
|
|
623
|
+
Icon && size === "S" ? /* @__PURE__ */ jsxRuntime.jsx(IconBox$1, { children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { ...iconProps }) }) : null,
|
|
624
624
|
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { alignItems: "flex-start", direction: "column", tag: "span", ref: forwardedRef, overflow: "hidden", children: [
|
|
625
625
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
626
626
|
Typography,
|
|
@@ -640,7 +640,7 @@ const Trigger$7 = React__namespace.forwardRef(
|
|
|
640
640
|
] });
|
|
641
641
|
}
|
|
642
642
|
);
|
|
643
|
-
const IconBox$
|
|
643
|
+
const IconBox$1 = styled.styled(Box)`
|
|
644
644
|
color: ${(props) => props.theme.colors.neutral500};
|
|
645
645
|
display: flex;
|
|
646
646
|
|
|
@@ -737,7 +737,7 @@ const AccordionHeader = styled.styled(RadixAccordion__namespace.Header)`
|
|
|
737
737
|
& > ${AccordionTrigger} {
|
|
738
738
|
color: ${(props) => props.theme.colors.primary600};
|
|
739
739
|
|
|
740
|
-
& ${IconBox$
|
|
740
|
+
& ${IconBox$1} {
|
|
741
741
|
color: ${(props) => props.theme.colors.primary600};
|
|
742
742
|
}
|
|
743
743
|
|
|
@@ -1718,8 +1718,8 @@ const IconButtonWrapper = styled.styled(Flex)`
|
|
|
1718
1718
|
switch (props.$size) {
|
|
1719
1719
|
case "XS": {
|
|
1720
1720
|
return styled.css`
|
|
1721
|
-
padding-block: 0.
|
|
1722
|
-
padding-inline: 0.
|
|
1721
|
+
padding-block: 0.2rem;
|
|
1722
|
+
padding-inline: 0.2rem;
|
|
1723
1723
|
`;
|
|
1724
1724
|
}
|
|
1725
1725
|
case "S": {
|
|
@@ -1827,6 +1827,30 @@ const LinkWrapper$1 = styled.styled(BaseLinkImpl)`
|
|
|
1827
1827
|
|
|
1828
1828
|
${focus};
|
|
1829
1829
|
`;
|
|
1830
|
+
const getBackgroundColorHover = (variant2) => {
|
|
1831
|
+
switch (variant2) {
|
|
1832
|
+
case "danger":
|
|
1833
|
+
return "danger100";
|
|
1834
|
+
default:
|
|
1835
|
+
return "primary100";
|
|
1836
|
+
}
|
|
1837
|
+
};
|
|
1838
|
+
const getTextColor = (variant2, disabled) => {
|
|
1839
|
+
switch (variant2) {
|
|
1840
|
+
case "danger":
|
|
1841
|
+
return disabled ? "danger500" : "danger700";
|
|
1842
|
+
default:
|
|
1843
|
+
return disabled ? "neutral500" : "neutral800";
|
|
1844
|
+
}
|
|
1845
|
+
};
|
|
1846
|
+
const getIconColor = (variant2, disabled) => {
|
|
1847
|
+
switch (variant2) {
|
|
1848
|
+
case "danger":
|
|
1849
|
+
return disabled ? "danger500" : "danger700";
|
|
1850
|
+
default:
|
|
1851
|
+
return disabled ? "neutral300" : "neutral500";
|
|
1852
|
+
}
|
|
1853
|
+
};
|
|
1830
1854
|
const MenuRoot = DropdownMenu__namespace.Root;
|
|
1831
1855
|
const MenuTrigger = React__namespace.forwardRef(
|
|
1832
1856
|
({ label, endIcon = /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, { width: "1.2rem", height: "1.2rem", "aria-hidden": true }), tag = Button, icon, ...rest }, ref) => {
|
|
@@ -1893,35 +1917,46 @@ const DropdownMenuContent = styled.styled(DropdownMenu__namespace.Content)`
|
|
|
1893
1917
|
}
|
|
1894
1918
|
}
|
|
1895
1919
|
`;
|
|
1896
|
-
const MenuItem$1 = ({
|
|
1920
|
+
const MenuItem$1 = ({
|
|
1921
|
+
onSelect,
|
|
1922
|
+
disabled = false,
|
|
1923
|
+
isLink,
|
|
1924
|
+
startIcon,
|
|
1925
|
+
endIcon,
|
|
1926
|
+
isExternal,
|
|
1927
|
+
variant: variant2 = "default",
|
|
1928
|
+
...props
|
|
1929
|
+
}) => {
|
|
1897
1930
|
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Item, { asChild: true, onSelect, disabled, children: isLink || isExternal ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1898
1931
|
OptionLink,
|
|
1899
1932
|
{
|
|
1900
|
-
color:
|
|
1933
|
+
color: getTextColor(variant2, disabled),
|
|
1901
1934
|
startIcon,
|
|
1902
1935
|
endIcon,
|
|
1903
1936
|
...props,
|
|
1904
1937
|
isExternal: isExternal ?? false,
|
|
1905
|
-
|
|
1938
|
+
$variant: variant2,
|
|
1939
|
+
children: props.children
|
|
1906
1940
|
}
|
|
1907
1941
|
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1908
1942
|
OptionButton,
|
|
1909
1943
|
{
|
|
1910
1944
|
cursor: "pointer",
|
|
1911
|
-
color:
|
|
1945
|
+
color: getTextColor(variant2, disabled),
|
|
1912
1946
|
background: "transparent",
|
|
1913
1947
|
borderStyle: "none",
|
|
1914
1948
|
gap: 2,
|
|
1949
|
+
$variant: variant2,
|
|
1915
1950
|
...props,
|
|
1916
1951
|
children: [
|
|
1917
|
-
startIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { tag: "span", "aria-hidden": true, children: startIcon }),
|
|
1952
|
+
startIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { tag: "span", color: getIconColor(variant2, disabled), "aria-hidden": true, children: startIcon }),
|
|
1918
1953
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { grow: 1, children: props.children }),
|
|
1919
|
-
endIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { tag: "span", "aria-hidden": true, children: endIcon })
|
|
1954
|
+
endIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { tag: "span", color: getIconColor(variant2, disabled), "aria-hidden": true, children: endIcon })
|
|
1920
1955
|
]
|
|
1921
1956
|
}
|
|
1922
1957
|
) });
|
|
1923
1958
|
};
|
|
1924
|
-
const getOptionStyle = ({ theme }) => styled.css`
|
|
1959
|
+
const getOptionStyle = ({ theme, $variant }) => styled.css`
|
|
1925
1960
|
text-align: left;
|
|
1926
1961
|
width: 100%;
|
|
1927
1962
|
border-radius: ${theme.borderRadius};
|
|
@@ -1929,11 +1964,10 @@ const getOptionStyle = ({ theme }) => styled.css`
|
|
|
1929
1964
|
|
|
1930
1965
|
&[aria-disabled='true'] {
|
|
1931
1966
|
cursor: not-allowed;
|
|
1932
|
-
color: ${theme.colors.neutral500};
|
|
1933
1967
|
}
|
|
1934
1968
|
|
|
1935
1969
|
&[data-highlighted] {
|
|
1936
|
-
background-color: ${theme.colors
|
|
1970
|
+
background-color: ${theme.colors[getBackgroundColorHover($variant)]};
|
|
1937
1971
|
}
|
|
1938
1972
|
|
|
1939
1973
|
&:focus-visible {
|
|
@@ -1945,7 +1979,7 @@ const getOptionStyle = ({ theme }) => styled.css`
|
|
|
1945
1979
|
}
|
|
1946
1980
|
`;
|
|
1947
1981
|
const OptionButton = styled.styled(Flex)`
|
|
1948
|
-
${getOptionStyle}
|
|
1982
|
+
${({ theme, $variant }) => getOptionStyle({ theme, $variant })}
|
|
1949
1983
|
`;
|
|
1950
1984
|
const OptionLink = styled.styled(Link)`
|
|
1951
1985
|
/* We include this here again because typically when people use OptionLink they provide an as prop which cancels the Box props */
|
|
@@ -1962,7 +1996,7 @@ const OptionLink = styled.styled(Link)`
|
|
|
1962
1996
|
fill: currentColor;
|
|
1963
1997
|
}
|
|
1964
1998
|
|
|
1965
|
-
${getOptionStyle}
|
|
1999
|
+
${({ theme, $variant }) => getOptionStyle({ theme, $variant })}
|
|
1966
2000
|
`;
|
|
1967
2001
|
const StyledSeparator = styled.styled(Box)`
|
|
1968
2002
|
/* Negative horizontal margin to compensate Menu.Content's padding */
|
|
@@ -2212,8 +2246,8 @@ const CheckboxRoot = styled.styled(Checkbox__namespace.Root)`
|
|
|
2212
2246
|
// this ensures the checkbox is always a square even in flex-containers.
|
|
2213
2247
|
flex: 0 0 2rem;
|
|
2214
2248
|
|
|
2215
|
-
&[data-state='checked'],
|
|
2216
|
-
&[data-state='indeterminate'] {
|
|
2249
|
+
&[data-state='checked']:not([data-disabled]),
|
|
2250
|
+
&[data-state='indeterminate']:not([data-disabled]) {
|
|
2217
2251
|
border: 1px solid ${(props) => props.theme.colors.primary600};
|
|
2218
2252
|
background-color: ${(props) => props.theme.colors.primary600};
|
|
2219
2253
|
}
|
|
@@ -3310,6 +3344,8 @@ const Content$5 = styled.styled(uiPrimitives.Combobox.Content)`
|
|
|
3310
3344
|
const ComboboxCreateItem = styled.styled(uiPrimitives.Combobox.CreateItem)`
|
|
3311
3345
|
&& {
|
|
3312
3346
|
border-top: 1px solid ${({ theme }) => theme.colors.neutral150};
|
|
3347
|
+
border-top-left-radius: 0;
|
|
3348
|
+
border-top-right-radius: 0;
|
|
3313
3349
|
background: ${({ theme }) => theme.colors.neutral0};
|
|
3314
3350
|
cursor: pointer;
|
|
3315
3351
|
padding: ${({ theme }) => theme.spaces[1]};
|
|
@@ -3323,14 +3359,10 @@ const ComboboxCreateItem = styled.styled(uiPrimitives.Combobox.CreateItem)`
|
|
|
3323
3359
|
}
|
|
3324
3360
|
&&[data-disabled] {
|
|
3325
3361
|
color: ${({ theme }) => theme.colors.neutral600};
|
|
3326
|
-
background: ${({ theme }) => theme.colors.neutral150};
|
|
3327
3362
|
cursor: not-allowed;
|
|
3328
|
-
border-bottom-left-radius: 0;
|
|
3329
|
-
border-bottom-right-radius: 0;
|
|
3330
3363
|
}
|
|
3331
|
-
&&[data-disabled]
|
|
3332
|
-
|
|
3333
|
-
color: ${({ theme }) => theme.colors.neutral600};
|
|
3364
|
+
&&[data-disabled] svg {
|
|
3365
|
+
fill: ${({ theme }) => theme.colors.neutral300};
|
|
3334
3366
|
}
|
|
3335
3367
|
&& > div {
|
|
3336
3368
|
padding: ${({ theme }) => theme.spaces[2]} ${({ theme }) => theme.spaces[4]};
|
|
@@ -3338,9 +3370,10 @@ const ComboboxCreateItem = styled.styled(uiPrimitives.Combobox.CreateItem)`
|
|
|
3338
3370
|
&& > div:hover,
|
|
3339
3371
|
&&[data-highlighted] > div {
|
|
3340
3372
|
background-color: ${({ theme }) => theme.colors.primary100};
|
|
3373
|
+
border-radius: ${({ theme }) => theme.borderRadius};
|
|
3341
3374
|
}
|
|
3342
|
-
&&[data-disabled] > div
|
|
3343
|
-
background:
|
|
3375
|
+
&&[data-disabled] > div {
|
|
3376
|
+
background-color: inherit;
|
|
3344
3377
|
}
|
|
3345
3378
|
`;
|
|
3346
3379
|
const ScrollAreaCombobox = styled.styled(ScrollAreaImpl$1)`
|
|
@@ -3378,22 +3411,20 @@ const OptionBox = styled.styled.div`
|
|
|
3378
3411
|
font-weight: bold;
|
|
3379
3412
|
}
|
|
3380
3413
|
`;
|
|
3414
|
+
const setOpacity = (hex, alpha) => `${hex}${Math.floor(alpha * 255).toString(16).padStart(2, "0")}`;
|
|
3381
3415
|
const Root$5 = AlertDialog__namespace.Root;
|
|
3382
3416
|
const Trigger$4 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
3383
3417
|
return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog__namespace.Trigger, { ...props, asChild: true, ref: forwardedRef });
|
|
3384
3418
|
});
|
|
3385
3419
|
const Content$4 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
3386
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
3387
|
-
/* @__PURE__ */ jsxRuntime.jsx(Overlay$1, {}),
|
|
3388
|
-
/* @__PURE__ */ jsxRuntime.jsx(ContentImpl$1, { ref: forwardedRef, ...props })
|
|
3389
|
-
] });
|
|
3420
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(Overlay$1, { children: /* @__PURE__ */ jsxRuntime.jsx(ContentImpl$1, { ref: forwardedRef, ...props }) }) });
|
|
3390
3421
|
});
|
|
3391
3422
|
const Overlay$1 = styled.styled(AlertDialog__namespace.Overlay)`
|
|
3392
|
-
background
|
|
3423
|
+
background: ${(props) => setOpacity(props.theme.colors.neutral800, 0.2)};
|
|
3393
3424
|
position: fixed;
|
|
3394
3425
|
inset: 0;
|
|
3395
3426
|
z-index: ${(props) => props.theme.zIndices.overlay};
|
|
3396
|
-
|
|
3427
|
+
will-change: opacity;
|
|
3397
3428
|
|
|
3398
3429
|
@media (prefers-reduced-motion: no-preference) {
|
|
3399
3430
|
animation: ${ANIMATIONS.overlayFadeIn} ${(props) => props.theme.motion.timings["200"]}
|
|
@@ -3742,18 +3773,14 @@ const SelectTrigger = React__namespace.forwardRef(
|
|
|
3742
3773
|
] }),
|
|
3743
3774
|
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { tag: "span", gap: 3, children: [
|
|
3744
3775
|
onClear ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3745
|
-
|
|
3776
|
+
IconButton,
|
|
3746
3777
|
{
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
background: "transparent",
|
|
3750
|
-
role: "button",
|
|
3751
|
-
tabIndex: 0,
|
|
3778
|
+
size: "XS",
|
|
3779
|
+
variant: "ghost",
|
|
3752
3780
|
onClick: handleClearClick,
|
|
3753
3781
|
"aria-disabled": disabled,
|
|
3754
3782
|
"aria-label": clearLabel,
|
|
3755
|
-
|
|
3756
|
-
cursor: "pointer",
|
|
3783
|
+
label: clearLabel,
|
|
3757
3784
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {})
|
|
3758
3785
|
}
|
|
3759
3786
|
) : null,
|
|
@@ -3764,19 +3791,6 @@ const SelectTrigger = React__namespace.forwardRef(
|
|
|
3764
3791
|
) });
|
|
3765
3792
|
}
|
|
3766
3793
|
);
|
|
3767
|
-
const IconBox$1 = styled.styled(Box)`
|
|
3768
|
-
border: none;
|
|
3769
|
-
display: flex;
|
|
3770
|
-
|
|
3771
|
-
svg {
|
|
3772
|
-
height: 1.1rem;
|
|
3773
|
-
width: 1.1rem;
|
|
3774
|
-
}
|
|
3775
|
-
|
|
3776
|
-
svg path {
|
|
3777
|
-
fill: ${({ theme }) => theme.colors.neutral500};
|
|
3778
|
-
}
|
|
3779
|
-
`;
|
|
3780
3794
|
const StyledTrigger = styled.styled(Flex)`
|
|
3781
3795
|
border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
|
|
3782
3796
|
${(props) => {
|
|
@@ -3819,6 +3833,7 @@ const ValueType = styled.styled(Typography)`
|
|
|
3819
3833
|
flex: 1;
|
|
3820
3834
|
font-size: 1.4rem;
|
|
3821
3835
|
line-height: 2.2rem;
|
|
3836
|
+
min-height: 2.2rem;
|
|
3822
3837
|
`;
|
|
3823
3838
|
const StyledValue = styled.styled(uiPrimitives.Select.Value)`
|
|
3824
3839
|
display: flex;
|
|
@@ -3887,12 +3902,6 @@ const StyledSelectItem = styled.styled(uiPrimitives.Select.Item)`
|
|
|
3887
3902
|
background-color: ${({ theme }) => theme.colors.primary100};
|
|
3888
3903
|
cursor: pointer;
|
|
3889
3904
|
}
|
|
3890
|
-
|
|
3891
|
-
&[data-state='checked'] {
|
|
3892
|
-
font-weight: bold;
|
|
3893
|
-
color: ${({ theme }) => theme.colors.primary600};
|
|
3894
|
-
font-weight: bold;
|
|
3895
|
-
}
|
|
3896
3905
|
`;
|
|
3897
3906
|
const Root$4 = uiPrimitives.Select.Root;
|
|
3898
3907
|
const Trigger$3 = SelectTrigger;
|
|
@@ -5273,7 +5282,6 @@ const SkipToContent = ({ children }) => {
|
|
|
5273
5282
|
}
|
|
5274
5283
|
);
|
|
5275
5284
|
};
|
|
5276
|
-
const setOpacity = (hex, alpha) => `${hex}${Math.floor(alpha * 255).toString(16).padStart(2, "0")}`;
|
|
5277
5285
|
const Root$3 = Dialog__namespace.Root;
|
|
5278
5286
|
const Trigger$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
5279
5287
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Trigger, { ...props, asChild: true, ref: forwardedRef });
|
|
@@ -5653,6 +5661,7 @@ const Dots = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(Box, {
|
|
|
5653
5661
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { "aria-hidden": true, lineHeight: "revert", textColor: "neutral800", variant: "pi", children: "…" })
|
|
5654
5662
|
] });
|
|
5655
5663
|
const Root$2 = Popover__namespace.Root;
|
|
5664
|
+
const Anchor = Popover__namespace.Anchor;
|
|
5656
5665
|
const Trigger$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
5657
5666
|
return /* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Trigger, { ...props, asChild: true, ref: forwardedRef });
|
|
5658
5667
|
});
|
|
@@ -5715,6 +5724,7 @@ const PopoverScrollArea = styled.styled(ScrollAreaImpl$1)`
|
|
|
5715
5724
|
`;
|
|
5716
5725
|
const Popover = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5717
5726
|
__proto__: null,
|
|
5727
|
+
Anchor,
|
|
5718
5728
|
Content: Content$1,
|
|
5719
5729
|
Root: Root$2,
|
|
5720
5730
|
ScrollArea: ScrollAreaImpl,
|