reshaped 3.4.0 → 3.4.2
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/CHANGELOG.md +3 -32
 - package/dist/bundle.css +1 -1
 - package/dist/bundle.js +11 -11
 - package/dist/cjs/cli/theming/index.js +0 -1
 - package/dist/cjs/themes/_generator/definitions/figma.d.ts +1 -1
 - package/dist/cjs/themes/_generator/definitions/figma.js +6 -5
 - package/dist/cjs/themes/_generator/utilities/color.js +11 -11
 - package/dist/cjs/themes/_generator/utilities/generateBackgroundColors.js +0 -2
 - package/dist/cjs/themes/_generator/utilities/generateColors.js +1 -1
 - package/dist/cjs/themes/_generator/utilities/generateUnits.js +0 -1
 - package/dist/cjs/themes/_generator/utilities/mergeDeep.js +1 -1
 - package/dist/cjs/themes/_generator/utilities/resolveTokenReference.js +2 -0
 - package/dist/cjs/themes/figma/tailwind.css +1 -1
 - package/dist/cjs/themes/figma/theme.css +1 -1
 - package/dist/cli/theming/index.js +0 -1
 - package/dist/components/Actionable/Actionable.js +2 -0
 - package/dist/components/Autocomplete/Autocomplete.js +1 -0
 - package/dist/components/Calendar/Calendar.module.css +1 -1
 - package/dist/components/Calendar/Calendar.types.d.ts +4 -4
 - package/dist/components/Calendar/CalendarControlled.js +2 -2
 - package/dist/components/Calendar/CalendarDate.js +29 -11
 - package/dist/components/Calendar/CalendarMonth.js +2 -6
 - package/dist/components/Calendar/tests/Calendar.stories.d.ts +19 -4
 - package/dist/components/Calendar/tests/Calendar.stories.js +237 -26
 - package/dist/components/Card/Card.d.ts +1 -1
 - package/dist/components/Card/Card.js +2 -4
 - package/dist/components/Card/tests/Card.stories.d.ts +1 -1
 - package/dist/components/Card/tests/Card.test.stories.d.ts +1 -1
 - package/dist/components/Carousel/Carousel.js +1 -2
 - package/dist/components/Carousel/Carousel.types.d.ts +1 -5
 - package/dist/components/Carousel/Carousel.types.js +1 -5
 - package/dist/components/Carousel/CarouselControl.js +2 -3
 - package/dist/components/FormControl/FormControl.context.d.ts +4 -0
 - package/dist/components/Grid/Grid.js +8 -2
 - package/dist/components/Icon/Icon.js +1 -3
 - package/dist/components/PinField/PinFieldControlled.js +0 -1
 - package/dist/components/Resizable/Resizable.js +1 -0
 - package/dist/components/Slider/SliderControlled.js +9 -3
 - package/dist/components/Stepper/Stepper.js +7 -2
 - package/dist/components/Tabs/TabsList.js +7 -3
 - package/dist/components/Text/Text.js +2 -4
 - package/dist/components/Timeline/Timeline.js +1 -1
 - package/dist/components/Toast/ToastProvider.js +8 -4
 - package/dist/components/View/View.js +10 -5
 - package/dist/components/_private/Flyout/FlyoutContent.js +1 -1
 - package/dist/components/_private/Flyout/FlyoutTrigger.js +1 -1
 - package/dist/components/_private/Flyout/useFlyout.js +3 -1
 - package/dist/components/_private/Portal/Portal.d.ts +1 -1
 - package/dist/config/tailwind.d.ts +1 -1
 - package/dist/hooks/_private/useOnClickOutside.d.ts +1 -1
 - package/dist/hooks/_private/useOnClickOutside.js +26 -10
 - package/dist/hooks/_private/useSingletonHotkeys.js +2 -0
 - package/dist/hooks/useResponsiveClientValue.d.ts +1 -1
 - package/dist/themes/_generator/definitions/figma.d.ts +1 -1
 - package/dist/themes/_generator/definitions/figma.js +6 -5
 - package/dist/themes/_generator/utilities/color.js +11 -11
 - package/dist/themes/_generator/utilities/generateBackgroundColors.js +0 -2
 - package/dist/themes/_generator/utilities/generateColors.js +1 -1
 - package/dist/themes/_generator/utilities/generateUnits.js +0 -1
 - package/dist/themes/_generator/utilities/mergeDeep.js +1 -1
 - package/dist/themes/_generator/utilities/resolveTokenReference.js +2 -0
 - package/dist/themes/figma/tailwind.css +1 -1
 - package/dist/themes/figma/theme.css +1 -1
 - package/dist/types/global.d.ts +2 -2
 - package/dist/utilities/helpers.js +4 -1
 - package/dist/utilities/platform.js +1 -0
 - package/package.json +36 -40
 - package/dist/components/Calendar/tests/Calendar.test.stories.d.ts +0 -26
 - package/dist/components/Calendar/tests/Calendar.test.stories.js +0 -161
 
| 
         @@ -81,9 +81,12 @@ const TabsList = (props) => { 
     | 
|
| 
       81 
81 
     | 
    
         
             
                    if (value)
         
     | 
| 
       82 
82 
     | 
    
         
             
                        return;
         
     | 
| 
       83 
83 
     | 
    
         
             
                    const firstItem = React.Children.toArray(children)[0];
         
     | 
| 
      
 84 
     | 
    
         
            +
                    if (!React.isValidElement(firstItem))
         
     | 
| 
      
 85 
     | 
    
         
            +
                        return;
         
     | 
| 
       84 
86 
     | 
    
         
             
                    if (!firstItem || firstItem.type !== TabsItem)
         
     | 
| 
       85 
87 
     | 
    
         
             
                        return;
         
     | 
| 
       86 
     | 
    
         
            -
                     
     | 
| 
      
 88 
     | 
    
         
            +
                    const props = firstItem.props;
         
     | 
| 
      
 89 
     | 
    
         
            +
                    setDefaultValue(props.value);
         
     | 
| 
       87 
90 
     | 
    
         
             
                }, [value]);
         
     | 
| 
       88 
91 
     | 
    
         
             
                useIsomorphicLayoutEffect(() => {
         
     | 
| 
       89 
92 
     | 
    
         
             
                    // Do not update selection on mount, until we receive new activeId
         
     | 
| 
         @@ -135,9 +138,10 @@ const TabsList = (props) => { 
     | 
|
| 
       135 
138 
     | 
    
         
             
                    };
         
     | 
| 
       136 
139 
     | 
    
         
             
                }, [rtl]);
         
     | 
| 
       137 
140 
     | 
    
         
             
                return (_jsxs("div", { ...attributes, className: rootClassNames, children: [_jsx("div", { className: s.inner, ref: elScrollableRef, children: _jsxs("div", { className: s.list, role: "tablist", ref: hotkeysRef, children: [React.Children.map(children, (child, index) => {
         
     | 
| 
       138 
     | 
    
         
            -
                                        if (!child)
         
     | 
| 
      
 141 
     | 
    
         
            +
                                        if (!React.isValidElement(child))
         
     | 
| 
       139 
142 
     | 
    
         
             
                                            return null;
         
     | 
| 
       140 
     | 
    
         
            -
                                         
     | 
| 
      
 143 
     | 
    
         
            +
                                        const props = child.props;
         
     | 
| 
      
 144 
     | 
    
         
            +
                                        return (_jsx("div", { className: s.listItem, "data-rs-tabs-item": true, children: child }, props.value || child.key || index));
         
     | 
| 
       141 
145 
     | 
    
         
             
                                    }), _jsx("div", { onTransitionEnd: handleTransitionEnd, className: selectorClassNames, style: {
         
     | 
| 
       142 
146 
     | 
    
         
             
                                            "--rs-tab-selection-x": selection.left,
         
     | 
| 
       143 
147 
     | 
    
         
             
                                            "--rs-tab-selection-y": selection.top,
         
     | 
| 
         @@ -14,10 +14,8 @@ const Text = (props) => { 
     | 
|
| 
       14 
14 
     | 
    
         
             
                const { variant, color, weight, align, decoration, maxLines, wrap, children, className, attributes, } = props;
         
     | 
| 
       15 
15 
     | 
    
         
             
                const largestVariant = typeof variant === "string" ? variant : variant?.xl || variant?.l || variant?.m || variant?.s;
         
     | 
| 
       16 
16 
     | 
    
         
             
                const alignStyles = getTextAlignStyles(align);
         
     | 
| 
       17 
     | 
    
         
            -
                 
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
                 * It still resolves the attributes correctly based on the tag
         
     | 
| 
       20 
     | 
    
         
            -
                 */
         
     | 
| 
      
 17 
     | 
    
         
            +
                // Using any here to let TS save on type resolving, otherwise TS throws an error due to the type complexity
         
     | 
| 
      
 18 
     | 
    
         
            +
                // eslint-disable-next-line @typescript-eslint/no-explicit-any
         
     | 
| 
       21 
19 
     | 
    
         
             
                const TagName = props.as || (largestVariant && tagMap[largestVariant]) || "div";
         
     | 
| 
       22 
20 
     | 
    
         
             
                const rootClassName = classNames(s.root, color && s[`--color-${color}`], ...responsiveClassNames(s, "--variant", variant), ...responsiveClassNames(s, "--weight", weight), decoration && s[`--decoration-${decoration}`], maxLines !== undefined && s[`--clamp`], maxLines === 1 && s["--break-all"], wrap && s[`--wrap-${wrap}`], className);
         
     | 
| 
       23 
21 
     | 
    
         
             
                const style = {
         
     | 
| 
         @@ -13,7 +13,7 @@ const Timeline = (props) => { 
     | 
|
| 
       13 
13 
     | 
    
         
             
                const { children, className, attributes } = props;
         
     | 
| 
       14 
14 
     | 
    
         
             
                const rootClassNames = classNames(className);
         
     | 
| 
       15 
15 
     | 
    
         
             
                return (_jsx("ul", { ...attributes, className: rootClassNames, children: React.Children.map(children, (child, index) => {
         
     | 
| 
       16 
     | 
    
         
            -
                        return child 
     | 
| 
      
 16 
     | 
    
         
            +
                        return React.isValidElement(child) && child.type === TimelineItem ? (child) : (_jsx(TimelineItem, { children: child }, index));
         
     | 
| 
       17 
17 
     | 
    
         
             
                    }) }));
         
     | 
| 
       18 
18 
     | 
    
         
             
            };
         
     | 
| 
       19 
19 
     | 
    
         
             
            Timeline.Item = TimelineItem;
         
     | 
| 
         @@ -10,13 +10,14 @@ const generateId = () => `__rs-toast-${counter++}`; 
     | 
|
| 
       10 
10 
     | 
    
         
             
            const toastReducer = (state, action) => {
         
     | 
| 
       11 
11 
     | 
    
         
             
                let nextState;
         
     | 
| 
       12 
12 
     | 
    
         
             
                switch (action.type) {
         
     | 
| 
       13 
     | 
    
         
            -
                    case "add":
         
     | 
| 
      
 13 
     | 
    
         
            +
                    case "add": {
         
     | 
| 
       14 
14 
     | 
    
         
             
                        const { position = "bottom-end", ...toastProps } = action.payload.toastProps || {};
         
     | 
| 
       15 
15 
     | 
    
         
             
                        return {
         
     | 
| 
       16 
16 
     | 
    
         
             
                            ...state,
         
     | 
| 
       17 
17 
     | 
    
         
             
                            [position]: [...state[position], { id: action.payload.id, toastProps, status: "entering" }],
         
     | 
| 
       18 
18 
     | 
    
         
             
                        };
         
     | 
| 
       19 
     | 
    
         
            -
                     
     | 
| 
      
 19 
     | 
    
         
            +
                    }
         
     | 
| 
      
 20 
     | 
    
         
            +
                    case "show": {
         
     | 
| 
       20 
21 
     | 
    
         
             
                        const { id: showId } = action.payload;
         
     | 
| 
       21 
22 
     | 
    
         
             
                        nextState = { ...state };
         
     | 
| 
       22 
23 
     | 
    
         
             
                        positions.forEach((position) => {
         
     | 
| 
         @@ -27,20 +28,23 @@ const toastReducer = (state, action) => { 
     | 
|
| 
       27 
28 
     | 
    
         
             
                            });
         
     | 
| 
       28 
29 
     | 
    
         
             
                        });
         
     | 
| 
       29 
30 
     | 
    
         
             
                        return nextState;
         
     | 
| 
       30 
     | 
    
         
            -
                     
     | 
| 
      
 31 
     | 
    
         
            +
                    }
         
     | 
| 
      
 32 
     | 
    
         
            +
                    case "hide": {
         
     | 
| 
       31 
33 
     | 
    
         
             
                        const { id: hideId } = action.payload;
         
     | 
| 
       32 
34 
     | 
    
         
             
                        nextState = { ...state };
         
     | 
| 
       33 
35 
     | 
    
         
             
                        positions.forEach((position) => {
         
     | 
| 
       34 
36 
     | 
    
         
             
                            nextState[position] = nextState[position].map((item) => item.id === hideId ? { ...item, status: "exiting" } : item);
         
     | 
| 
       35 
37 
     | 
    
         
             
                        });
         
     | 
| 
       36 
38 
     | 
    
         
             
                        return nextState;
         
     | 
| 
       37 
     | 
    
         
            -
                     
     | 
| 
      
 39 
     | 
    
         
            +
                    }
         
     | 
| 
      
 40 
     | 
    
         
            +
                    case "remove": {
         
     | 
| 
       38 
41 
     | 
    
         
             
                        const { id: removeId } = action.payload;
         
     | 
| 
       39 
42 
     | 
    
         
             
                        nextState = { ...state };
         
     | 
| 
       40 
43 
     | 
    
         
             
                        positions.forEach((position) => {
         
     | 
| 
       41 
44 
     | 
    
         
             
                            nextState[position] = nextState[position].filter((item) => item.id !== removeId);
         
     | 
| 
       42 
45 
     | 
    
         
             
                        });
         
     | 
| 
       43 
46 
     | 
    
         
             
                        return nextState;
         
     | 
| 
      
 47 
     | 
    
         
            +
                    }
         
     | 
| 
       44 
48 
     | 
    
         
             
                }
         
     | 
| 
       45 
49 
     | 
    
         
             
            };
         
     | 
| 
       46 
50 
     | 
    
         
             
            const ToastProvider = (props) => {
         
     | 
| 
         @@ -21,7 +21,10 @@ import getTextAlignStyles from "../../styles/textAlign/index.js"; 
     | 
|
| 
       21 
21 
     | 
    
         
             
            import getAlignStyles from "../../styles/align/index.js";
         
     | 
| 
       22 
22 
     | 
    
         
             
            import getJustifyStyles from "../../styles/justify/index.js";
         
     | 
| 
       23 
23 
     | 
    
         
             
            const ViewItem = (props) => {
         
     | 
| 
       24 
     | 
    
         
            -
                const { columns, grow, gapBefore,  
     | 
| 
      
 24 
     | 
    
         
            +
                const { columns, grow, gapBefore, 
         
     | 
| 
      
 25 
     | 
    
         
            +
                // Using any here to let TS save on type resolving, otherwise TS throws an error due to the type complexity
         
     | 
| 
      
 26 
     | 
    
         
            +
                // eslint-disable-next-line @typescript-eslint/no-explicit-any
         
     | 
| 
      
 27 
     | 
    
         
            +
                as: TagName = "div", order, children, className, attributes, } = props;
         
     | 
| 
       25 
28 
     | 
    
         
             
                const itemClassNames = classNames(s.item, className, gapBefore === "auto" && s["item--gap-auto"], gapBefore !== undefined && s["item--gap-before"], columns && s["item--columns"], ...responsiveClassNames(s, "item--grow", grow), ...responsiveClassNames(s, "item--columns", columns));
         
     | 
| 
       26 
29 
     | 
    
         
             
                const itemVariables = {
         
     | 
| 
       27 
30 
     | 
    
         
             
                    ...responsiveVariables("--rs-view-item-order", order),
         
     | 
| 
         @@ -43,10 +46,8 @@ const View = (props) => { 
     | 
|
| 
       43 
46 
     | 
    
         
             
                 * Item prop
         
     | 
| 
       44 
47 
     | 
    
         
             
                 */
         
     | 
| 
       45 
48 
     | 
    
         
             
                grow, 
         
     | 
| 
       46 
     | 
    
         
            -
                 
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
                 * It still resolves the attributes correctly based on the tag
         
     | 
| 
       49 
     | 
    
         
            -
                 */
         
     | 
| 
      
 49 
     | 
    
         
            +
                // Using any here to let TS save on type resolving, otherwise TS throws an error due to the type complexity
         
     | 
| 
      
 50 
     | 
    
         
            +
                // eslint-disable-next-line @typescript-eslint/no-explicit-any
         
     | 
| 
       50 
51 
     | 
    
         
             
                as: TagName = "div", children, divided, className, attributes, } = props;
         
     | 
| 
       51 
52 
     | 
    
         
             
                let isFlex = !!align || !!justify || !!gap || !!props.direction;
         
     | 
| 
       52 
53 
     | 
    
         
             
                const direction = props.direction || (isFlex ? "column" : undefined);
         
     | 
| 
         @@ -121,6 +122,8 @@ const View = (props) => { 
     | 
|
| 
       121 
122 
     | 
    
         
             
                        isFlex = true;
         
     | 
| 
       122 
123 
     | 
    
         
             
                    return (_jsxs(React.Fragment, { children: [dividerElement, itemElement] }, `${key}-fragment`));
         
     | 
| 
       123 
124 
     | 
    
         
             
                };
         
     | 
| 
      
 125 
     | 
    
         
            +
                // Using any in favor of resolving the props in runtime where we don't know their props definitions
         
     | 
| 
      
 126 
     | 
    
         
            +
                // eslint-disable-next-line @typescript-eslint/no-explicit-any
         
     | 
| 
       124 
127 
     | 
    
         
             
                const formattedChildren = React.Children.map(children, (child, index) => {
         
     | 
| 
       125 
128 
     | 
    
         
             
                    if (!child)
         
     | 
| 
       126 
129 
     | 
    
         
             
                        return null;
         
     | 
| 
         @@ -132,6 +135,8 @@ const View = (props) => { 
     | 
|
| 
       132 
135 
     | 
    
         
             
                        return (_createElement(Hidden, { ...hiddenProps, key: key }, renderItem({ child: hiddenChild, index: usedIndex })));
         
     | 
| 
       133 
136 
     | 
    
         
             
                    }
         
     | 
| 
       134 
137 
     | 
    
         
             
                    if (child.type === React.Fragment && React.Children.count(child.props.children) > 1) {
         
     | 
| 
      
 138 
     | 
    
         
            +
                        // Using any in favor of resolving the props in runtime where we don't know their props definitions
         
     | 
| 
      
 139 
     | 
    
         
            +
                        // eslint-disable-next-line @typescript-eslint/no-explicit-any
         
     | 
| 
       135 
140 
     | 
    
         
             
                        return child.props.children.map((child) => {
         
     | 
| 
       136 
141 
     | 
    
         
             
                            if (!child)
         
     | 
| 
       137 
142 
     | 
    
         
             
                                return null;
         
     | 
| 
         @@ -11,7 +11,7 @@ import s from "./Flyout.module.css"; 
     | 
|
| 
       11 
11 
     | 
    
         
             
            const FlyoutContent = (props) => {
         
     | 
| 
       12 
12 
     | 
    
         
             
                const { children, className, attributes } = props;
         
     | 
| 
       13 
13 
     | 
    
         
             
                const { flyout, id, flyoutElRef, triggerElRef, handleClose, handleTransitionEnd, handleTransitionStart, triggerType, handleMouseEnter, handleMouseLeave, handleContentMouseDown, handleContentMouseUp, contentGap, contentClassName, contentAttributes, trapFocusMode, disableContentHover, width, containerRef, isSubmenu, } = useFlyoutContext();
         
     | 
| 
       14 
     | 
    
         
            -
                const { styles, status, position 
     | 
| 
      
 14 
     | 
    
         
            +
                const { styles, status, position } = flyout;
         
     | 
| 
       15 
15 
     | 
    
         
             
                const [mounted, setMounted] = React.useState(false);
         
     | 
| 
       16 
16 
     | 
    
         
             
                const closestContainer = React.useMemo(() => {
         
     | 
| 
       17 
17 
     | 
    
         
             
                    if (!mounted)
         
     | 
| 
         @@ -4,7 +4,7 @@ import { useFlyoutContext, TriggerProvider } from "./Flyout.context.js"; 
     | 
|
| 
       4 
4 
     | 
    
         
             
            const FlyoutTrigger = (props) => {
         
     | 
| 
       5 
5 
     | 
    
         
             
                const { children } = props;
         
     | 
| 
       6 
6 
     | 
    
         
             
                const { id, triggerElRef, triggerType, flyout, handleFocus, handleBlur, handleMouseEnter, handleMouseLeave, handleMouseDown, handleTouchStart, handleClick, trapFocusMode, isSubmenu, } = useFlyoutContext();
         
     | 
| 
       7 
     | 
    
         
            -
                 
     | 
| 
      
 7 
     | 
    
         
            +
                const childrenAttributes = {
         
     | 
| 
       8 
8 
     | 
    
         
             
                    ref: triggerElRef,
         
     | 
| 
       9 
9 
     | 
    
         
             
                };
         
     | 
| 
       10 
10 
     | 
    
         
             
                if (triggerType === "click" || trapFocusMode === "action-menu") {
         
     | 
| 
         @@ -18,7 +18,7 @@ const defaultStyles = { 
     | 
|
| 
       18 
18 
     | 
    
         
             
            const resetStyles = {
         
     | 
| 
       19 
19 
     | 
    
         
             
                left: 0,
         
     | 
| 
       20 
20 
     | 
    
         
             
                top: 0,
         
     | 
| 
       21 
     | 
    
         
            -
                position: " 
     | 
| 
      
 21 
     | 
    
         
            +
                position: "absolute",
         
     | 
| 
       22 
22 
     | 
    
         
             
                visibility: "hidden",
         
     | 
| 
       23 
23 
     | 
    
         
             
                animation: "none",
         
     | 
| 
       24 
24 
     | 
    
         
             
                transition: "none",
         
     | 
| 
         @@ -42,6 +42,8 @@ const flyout = (args) => { 
     | 
|
| 
       42 
42 
     | 
    
         
             
                targetClone.style.cssText = "";
         
     | 
| 
       43 
43 
     | 
    
         
             
                Object.keys(resetStyles).forEach((key) => {
         
     | 
| 
       44 
44 
     | 
    
         
             
                    const value = resetStyles[key];
         
     | 
| 
      
 45 
     | 
    
         
            +
                    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
         
     | 
| 
      
 46 
     | 
    
         
            +
                    // @ts-ignore
         
     | 
| 
       45 
47 
     | 
    
         
             
                    if (value)
         
     | 
| 
       46 
48 
     | 
    
         
             
                        targetClone.style[key] = value.toString();
         
     | 
| 
       47 
49 
     | 
    
         
             
                });
         
     | 
| 
         @@ -5,7 +5,7 @@ export declare const usePortalScope: () => T.Context; 
     | 
|
| 
       5 
5 
     | 
    
         
             
             * That gives Portal time to receive scope on first render
         
     | 
| 
       6 
6 
     | 
    
         
             
             */
         
     | 
| 
       7 
7 
     | 
    
         
             
            declare const Portal: {
         
     | 
| 
       8 
     | 
    
         
            -
                (props: T.Props):  
     | 
| 
      
 8 
     | 
    
         
            +
                (props: T.Props): import("react/jsx-runtime").JSX.Element[];
         
     | 
| 
       9 
9 
     | 
    
         
             
                Scope: typeof PortalScope;
         
     | 
| 
       10 
10 
     | 
    
         
             
            };
         
     | 
| 
       11 
11 
     | 
    
         
             
            declare function PortalScope<T extends HTMLElement>(props: T.ScopeProps<T>): import("react/jsx-runtime").JSX.Element;
         
     | 
| 
         @@ -1,2 +1,2 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import type { ThemeDefinition } from "../themes/_generator/tokens/types";
         
     | 
| 
       2 
     | 
    
         
            -
            export declare const getTheme: (theme?: ThemeDefinition) => Record<"borderRadius" | "backgroundColor" | "borderColor" | "boxShadow" | " 
     | 
| 
      
 2 
     | 
    
         
            +
            export declare const getTheme: (theme?: ThemeDefinition) => Record<"borderRadius" | "backgroundColor" | "borderColor" | "boxShadow" | "spacing" | "textColor" | "colors" | "screens", Record<string, string>>;
         
     | 
| 
         @@ -1,3 +1,3 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import React from "react";
         
     | 
| 
       2 
     | 
    
         
            -
            declare const useOnClickOutside: (refs: React.RefObject<HTMLElement | null>[], handler: (event: Event) => void, deps:  
     | 
| 
      
 2 
     | 
    
         
            +
            declare const useOnClickOutside: (refs: React.RefObject<HTMLElement | null>[], handler: (event: Event) => void, deps: unknown[]) => void;
         
     | 
| 
       3 
3 
     | 
    
         
             
            export default useOnClickOutside;
         
     | 
| 
         @@ -1,24 +1,40 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import useHandlerRef from "../useHandlerRef.js";
         
     | 
| 
       2 
1 
     | 
    
         
             
            import React from "react";
         
     | 
| 
      
 2 
     | 
    
         
            +
            import useHandlerRef from "../useHandlerRef.js";
         
     | 
| 
       3 
3 
     | 
    
         
             
            const useOnClickOutside = (refs, handler, deps) => {
         
     | 
| 
       4 
4 
     | 
    
         
             
                const handlerRef = useHandlerRef(handler);
         
     | 
| 
      
 5 
     | 
    
         
            +
                /**
         
     | 
| 
      
 6 
     | 
    
         
            +
                 * We're checking the element position in the DOM on mousedown to make sure
         
     | 
| 
      
 7 
     | 
    
         
            +
                 * it happens before any other click events that could potentially remove the clicked el
         
     | 
| 
      
 8 
     | 
    
         
            +
                 * before we checked if it's inside the refs
         
     | 
| 
      
 9 
     | 
    
         
            +
                 */
         
     | 
| 
      
 10 
     | 
    
         
            +
                const isMouseDownInsideRef = React.useRef(false);
         
     | 
| 
       5 
11 
     | 
    
         
             
                React.useEffect(() => {
         
     | 
| 
       6 
     | 
    
         
            -
                     
     | 
| 
       7 
     | 
    
         
            -
                         
     | 
| 
       8 
     | 
    
         
            -
                    const handleClick = (event) => {
         
     | 
| 
       9 
     | 
    
         
            -
                        if (event instanceof MouseEvent && event.button === 2) {
         
     | 
| 
       10 
     | 
    
         
            -
                            return;
         
     | 
| 
       11 
     | 
    
         
            -
                        }
         
     | 
| 
       12 
     | 
    
         
            -
                        let isInside = false;
         
     | 
| 
      
 12 
     | 
    
         
            +
                    const handleMouseDown = (event) => {
         
     | 
| 
      
 13 
     | 
    
         
            +
                        isMouseDownInsideRef.current = false;
         
     | 
| 
       13 
14 
     | 
    
         
             
                        const clickedEl = event.composedPath()[0];
         
     | 
| 
       14 
15 
     | 
    
         
             
                        refs.forEach((elRef) => {
         
     | 
| 
       15 
16 
     | 
    
         
             
                            if (!elRef.current)
         
     | 
| 
       16 
17 
     | 
    
         
             
                                return;
         
     | 
| 
       17 
18 
     | 
    
         
             
                            if (elRef.current === clickedEl || elRef.current.contains(clickedEl)) {
         
     | 
| 
       18 
     | 
    
         
            -
                                 
     | 
| 
      
 19 
     | 
    
         
            +
                                isMouseDownInsideRef.current = true;
         
     | 
| 
       19 
20 
     | 
    
         
             
                            }
         
     | 
| 
       20 
21 
     | 
    
         
             
                        });
         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
      
 22 
     | 
    
         
            +
                    };
         
     | 
| 
      
 23 
     | 
    
         
            +
                    document.addEventListener("mousedown", handleMouseDown, { passive: true });
         
     | 
| 
      
 24 
     | 
    
         
            +
                    document.addEventListener("touchstart", handleMouseDown, { passive: true });
         
     | 
| 
      
 25 
     | 
    
         
            +
                    return () => {
         
     | 
| 
      
 26 
     | 
    
         
            +
                        document.removeEventListener("mousedown", handleMouseDown);
         
     | 
| 
      
 27 
     | 
    
         
            +
                        document.removeEventListener("touchstart", handleMouseDown);
         
     | 
| 
      
 28 
     | 
    
         
            +
                    };
         
     | 
| 
      
 29 
     | 
    
         
            +
                    // eslint-disable-next-line react-hooks/exhaustive-deps
         
     | 
| 
      
 30 
     | 
    
         
            +
                }, [...refs]);
         
     | 
| 
      
 31 
     | 
    
         
            +
                React.useEffect(() => {
         
     | 
| 
      
 32 
     | 
    
         
            +
                    if (!handlerRef.current)
         
     | 
| 
      
 33 
     | 
    
         
            +
                        return;
         
     | 
| 
      
 34 
     | 
    
         
            +
                    const handleClick = (event) => {
         
     | 
| 
      
 35 
     | 
    
         
            +
                        if (event.button === 2)
         
     | 
| 
      
 36 
     | 
    
         
            +
                            return;
         
     | 
| 
      
 37 
     | 
    
         
            +
                        if (isMouseDownInsideRef.current)
         
     | 
| 
       22 
38 
     | 
    
         
             
                            return;
         
     | 
| 
       23 
39 
     | 
    
         
             
                        handlerRef.current?.(event);
         
     | 
| 
       24 
40 
     | 
    
         
             
                    };
         
     | 
| 
         @@ -24,6 +24,8 @@ const getEventKey = (e) => { 
     | 
|
| 
       24 
24 
     | 
    
         
             
                }
         
     | 
| 
       25 
25 
     | 
    
         
             
                return e.key.toLowerCase();
         
     | 
| 
       26 
26 
     | 
    
         
             
            };
         
     | 
| 
      
 27 
     | 
    
         
            +
            // Removing the unknown gets highlighted an invalid syntax
         
     | 
| 
      
 28 
     | 
    
         
            +
            // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
         
     | 
| 
       27 
29 
     | 
    
         
             
            const walkHotkeys = (hotkeys, cb) => {
         
     | 
| 
       28 
30 
     | 
    
         
             
                Object.keys(hotkeys).forEach((key) => {
         
     | 
| 
       29 
31 
     | 
    
         
             
                    key.split(",").forEach((hotkey) => {
         
     | 
| 
         @@ -1,3 +1,3 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import type * as G from "../types/global";
         
     | 
| 
       2 
     | 
    
         
            -
            declare const useResponsiveClientValue: <T 
     | 
| 
      
 2 
     | 
    
         
            +
            declare const useResponsiveClientValue: <T>(value: G.Responsive<T>) => T | undefined;
         
     | 
| 
       3 
3 
     | 
    
         
             
            export default useResponsiveClientValue;
         
     | 
| 
         @@ -99,7 +99,6 @@ const theme = { 
     | 
|
| 
       99 
99 
     | 
    
         
             
                    radiusMedium: { px: 4 },
         
     | 
| 
       100 
100 
     | 
    
         
             
                    radiusLarge: { px: 4 },
         
     | 
| 
       101 
101 
     | 
    
         
             
                },
         
     | 
| 
       102 
     | 
    
         
            -
                // @ts-ignore
         
     | 
| 
       103 
102 
     | 
    
         
             
                color: {
         
     | 
| 
       104 
103 
     | 
    
         
             
                    foregroundNeutral: { hex: "#191919", hexDark: "#FFFFFF" },
         
     | 
| 
       105 
104 
     | 
    
         
             
                    foregroundNeutralFaded: { hex: "#474747", hexDark: "#B2B2B2" },
         
     | 
| 
         @@ -107,20 +106,19 @@ const theme = { 
     | 
|
| 
       107 
106 
     | 
    
         
             
                    foregroundPrimary: { hex: "#007BE5", hexDark: "#7CC4F8" },
         
     | 
| 
       108 
107 
     | 
    
         
             
                    foregroundPositive: { hex: "#009951", hexDark: "#79D297" },
         
     | 
| 
       109 
108 
     | 
    
         
             
                    foregroundCritical: { hex: "#DC3412", hexDark: "#FCA397" },
         
     | 
| 
      
 109 
     | 
    
         
            +
                    foregroundWarning: { hex: "#7b6305", hexDark: "#b4920c" },
         
     | 
| 
       110 
110 
     | 
    
         
             
                    backgroundNeutral: { hex: "#DFE2EA", hexDark: "#444444" },
         
     | 
| 
       111 
111 
     | 
    
         
             
                    backgroundNeutralFaded: { hex: "#F5F5F5", hexDark: "#383838" },
         
     | 
| 
       112 
     | 
    
         
            -
                    backgroundNeutralHighlighted: { hex: "#D4D8E3", hexDark: "#525252" },
         
     | 
| 
       113 
112 
     | 
    
         
             
                    backgroundDisabled: { hex: "#e4e4e4", hexDark: "#474747" },
         
     | 
| 
       114 
113 
     | 
    
         
             
                    backgroundDisabledFaded: { hex: "#F5F5F5", hexDark: "#3A3A3A" },
         
     | 
| 
       115 
114 
     | 
    
         
             
                    backgroundPrimary: { hex: "#0D99FF", hexDark: "#0C8CE9" },
         
     | 
| 
       116 
     | 
    
         
            -
                    backgroundPrimaryHighlighted: { hex: "#007BE5", hexDark: "#0A6DC2" },
         
     | 
| 
       117 
115 
     | 
    
         
             
                    backgroundPrimaryFaded: { hex: "#E5F4FF", hexDark: "#394360" },
         
     | 
| 
       118 
116 
     | 
    
         
             
                    backgroundPositive: { hex: "#14AE5C", hexDark: "#198F51" },
         
     | 
| 
       119 
117 
     | 
    
         
             
                    backgroundPositiveFaded: { hex: "#DAECDF", hexDark: "#3d5749" },
         
     | 
| 
       120 
     | 
    
         
            -
                    backgroundPositiveHighlighted: { hex: "#009951", hexDark: "#078348" },
         
     | 
| 
       121 
118 
     | 
    
         
             
                    backgroundCritical: { hex: "#F24822", hexDark: "#E03E1A" },
         
     | 
| 
       122 
119 
     | 
    
         
             
                    backgroundCriticalFaded: { hex: "#FFE2E0", hexDark: "#60332A" },
         
     | 
| 
       123 
     | 
    
         
            -
                     
     | 
| 
      
 120 
     | 
    
         
            +
                    backgroundWarning: { hex: "#facc15", hexDark: "#f1c512" },
         
     | 
| 
      
 121 
     | 
    
         
            +
                    backgroundWarningFaded: { hex: "#fffae9", hexDark: "#2c271f" },
         
     | 
| 
       124 
122 
     | 
    
         
             
                    borderNeutral: { hex: "#E6E6E6", hexDark: "#444444" },
         
     | 
| 
       125 
123 
     | 
    
         
             
                    borderNeutralFaded: { hex: "#E6E6E6", hexDark: "#444444" },
         
     | 
| 
       126 
124 
     | 
    
         
             
                    borderDisabled: { hex: "#E6E6E6", hexDark: "#3E3E3E" },
         
     | 
| 
         @@ -130,12 +128,15 @@ const theme = { 
     | 
|
| 
       130 
128 
     | 
    
         
             
                    borderPositiveFaded: { hex: "#BBDDC6", hexDark: "#086338" },
         
     | 
| 
       131 
129 
     | 
    
         
             
                    borderCritical: { hex: "#DC3412", hexDark: "#FCA397" },
         
     | 
| 
       132 
130 
     | 
    
         
             
                    borderCriticalFaded: { hex: "#FFC7C2", hexDark: "#803226" },
         
     | 
| 
      
 131 
     | 
    
         
            +
                    borderWarning: { hex: "#cfa90f", hexDark: "#b4920a" },
         
     | 
| 
      
 132 
     | 
    
         
            +
                    borderWarningFaded: { hex: "#ece2c4", hexDark: "#453c1e" },
         
     | 
| 
       133 
133 
     | 
    
         
             
                    backgroundPage: { hex: "#FFFFFF", hexDark: "#2C2C2C" },
         
     | 
| 
       134 
134 
     | 
    
         
             
                    backgroundPageFaded: { hex: "#FAFAFA", hexDark: "#1E1E1E" },
         
     | 
| 
       135 
135 
     | 
    
         
             
                    backgroundElevationBase: { hex: "#FFFFFF", hexDark: "#2C2C2C" },
         
     | 
| 
       136 
136 
     | 
    
         
             
                    backgroundElevationRaised: { hex: "#FFFFFF", hexDark: "#2C2C2C" },
         
     | 
| 
       137 
137 
     | 
    
         
             
                    backgroundElevationOverlay: { hex: "#FFFFFF", hexDark: "#2C2C2C" },
         
     | 
| 
       138 
138 
     | 
    
         
             
                    onBackgroundPrimary: { hex: "#FFFFFF" },
         
     | 
| 
      
 139 
     | 
    
         
            +
                    brand: { hex: "#0D99FF" },
         
     | 
| 
       139 
140 
     | 
    
         
             
                    black: { hex: "#000000" },
         
     | 
| 
       140 
141 
     | 
    
         
             
                    white: { hex: "#FFFFFF" },
         
     | 
| 
       141 
142 
     | 
    
         
             
                },
         
     | 
| 
         @@ -309,17 +309,17 @@ const GREEN = 0.7152; 
     | 
|
| 
       309 
309 
     | 
    
         
             
            const BLUE = 0.0722;
         
     | 
| 
       310 
310 
     | 
    
         
             
            const GAMMA = 2.4;
         
     | 
| 
       311 
311 
     | 
    
         
             
            function luminanceWCAG(r, g, b) {
         
     | 
| 
       312 
     | 
    
         
            -
                 
     | 
| 
      
 312 
     | 
    
         
            +
                const a = [r, g, b].map((v) => {
         
     | 
| 
       313 
313 
     | 
    
         
             
                    v /= 255;
         
     | 
| 
       314 
314 
     | 
    
         
             
                    return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, GAMMA);
         
     | 
| 
       315 
315 
     | 
    
         
             
                });
         
     | 
| 
       316 
316 
     | 
    
         
             
                return a[0] * RED + a[1] * GREEN + a[2] * BLUE;
         
     | 
| 
       317 
317 
     | 
    
         
             
            }
         
     | 
| 
       318 
318 
     | 
    
         
             
            function contrastWCAG(rgb1, rgb2) {
         
     | 
| 
       319 
     | 
    
         
            -
                 
     | 
| 
       320 
     | 
    
         
            -
                 
     | 
| 
       321 
     | 
    
         
            -
                 
     | 
| 
       322 
     | 
    
         
            -
                 
     | 
| 
      
 319 
     | 
    
         
            +
                const lum1 = luminanceWCAG(...rgb1);
         
     | 
| 
      
 320 
     | 
    
         
            +
                const lum2 = luminanceWCAG(...rgb2);
         
     | 
| 
      
 321 
     | 
    
         
            +
                const brightest = Math.max(lum1, lum2);
         
     | 
| 
      
 322 
     | 
    
         
            +
                const darkest = Math.min(lum1, lum2);
         
     | 
| 
       323 
323 
     | 
    
         
             
                return (brightest + 0.05) / (darkest + 0.05);
         
     | 
| 
       324 
324 
     | 
    
         
             
            }
         
     | 
| 
       325 
325 
     | 
    
         
             
            export const getOnColorWCAG = (args) => {
         
     | 
| 
         @@ -340,7 +340,7 @@ function luminanceAPCA({ r, g, b }) { 
     | 
|
| 
       340 
340 
     | 
    
         
             
            }
         
     | 
| 
       341 
341 
     | 
    
         
             
            function contrastAPCA(backgroundLuminance, textLuminance) {
         
     | 
| 
       342 
342 
     | 
    
         
             
                // Calculate the contrast based on APCA
         
     | 
| 
       343 
     | 
    
         
            -
                 
     | 
| 
      
 343 
     | 
    
         
            +
                const Lc = textLuminance - backgroundLuminance;
         
     | 
| 
       344 
344 
     | 
    
         
             
                return Math.abs(Lc); // Return the absolute value of contrast
         
     | 
| 
       345 
345 
     | 
    
         
             
            }
         
     | 
| 
       346 
346 
     | 
    
         
             
            export const getOnColorAPCA = (args) => {
         
     | 
| 
         @@ -355,12 +355,12 @@ export const getOnColorAPCA = (args) => { 
     | 
|
| 
       355 
355 
     | 
    
         
             
                    b: (1 - bgAlpha) * baseColor.b + bgAlpha * bgColor.b,
         
     | 
| 
       356 
356 
     | 
    
         
             
                };
         
     | 
| 
       357 
357 
     | 
    
         
             
                // Calculate luminance for background and for white & black
         
     | 
| 
       358 
     | 
    
         
            -
                 
     | 
| 
       359 
     | 
    
         
            -
                 
     | 
| 
       360 
     | 
    
         
            -
                 
     | 
| 
      
 358 
     | 
    
         
            +
                const backgroundLuminance = luminanceAPCA({ r, g, b });
         
     | 
| 
      
 359 
     | 
    
         
            +
                const whiteLuminance = luminanceAPCA({ r: 255, g: 255, b: 255 });
         
     | 
| 
      
 360 
     | 
    
         
            +
                const blackLuminance = luminanceAPCA({ r: 0, g: 0, b: 0 });
         
     | 
| 
       361 
361 
     | 
    
         
             
                // Calculate contrast
         
     | 
| 
       362 
     | 
    
         
            -
                 
     | 
| 
       363 
     | 
    
         
            -
                 
     | 
| 
      
 362 
     | 
    
         
            +
                const contrastWithWhite = contrastAPCA(backgroundLuminance, whiteLuminance);
         
     | 
| 
      
 363 
     | 
    
         
            +
                const contrastWithBlack = contrastAPCA(backgroundLuminance, blackLuminance);
         
     | 
| 
       364 
364 
     | 
    
         
             
                // Choose the color with higher contrast
         
     | 
| 
       365 
365 
     | 
    
         
             
                return contrastWithWhite > contrastWithBlack ? lightHexColor : darkHexColor;
         
     | 
| 
       366 
366 
     | 
    
         
             
            };
         
     | 
| 
         @@ -39,7 +39,6 @@ const generateBackgroundColors = (definition, themeOptions) => { 
     | 
|
| 
       39 
39 
     | 
    
         
             
                            algorithm: themeOptions?.colorContrastAlgorithm,
         
     | 
| 
       40 
40 
     | 
    
         
             
                            ...onColorHexMap,
         
     | 
| 
       41 
41 
     | 
    
         
             
                        });
         
     | 
| 
       42 
     | 
    
         
            -
                        // eslint-disable-next-line no-param-reassign
         
     | 
| 
       43 
42 
     | 
    
         
             
                        definition.color[generatedForegroundName] = {
         
     | 
| 
       44 
43 
     | 
    
         
             
                            hex,
         
     | 
| 
       45 
44 
     | 
    
         
             
                            hexDark: hex !== hexDark ? hexDark : undefined,
         
     | 
| 
         @@ -48,7 +47,6 @@ const generateBackgroundColors = (definition, themeOptions) => { 
     | 
|
| 
       48 
47 
     | 
    
         
             
                    if (needsRGB) {
         
     | 
| 
       49 
48 
     | 
    
         
             
                        const rgb = hexToRgb(bgToken.hex);
         
     | 
| 
       50 
49 
     | 
    
         
             
                        const rgbDark = bgToken.hexDark && hexToRgb(bgToken.hexDark);
         
     | 
| 
       51 
     | 
    
         
            -
                        // eslint-disable-next-line no-param-reassign
         
     | 
| 
       52 
50 
     | 
    
         
             
                        definition.color[generatedRGBName] = {
         
     | 
| 
       53 
51 
     | 
    
         
             
                            hex: `${rgb.r}, ${rgb.g}, ${rgb.b}`,
         
     | 
| 
       54 
52 
     | 
    
         
             
                            hexDark: rgbDark && `${rgbDark.r}, ${rgbDark.g}, ${rgbDark.b}`,
         
     | 
| 
         @@ -2,7 +2,7 @@ import { parseHex, convertOklabToOkhsl, convertLrgbToOklab, convertRgbToLrgb, co 
     | 
|
| 
       2 
2 
     | 
    
         
             
            const hexToOkHsl = (hex) => {
         
     | 
| 
       3 
3 
     | 
    
         
             
                const rgb = parseHex(hex);
         
     | 
| 
       4 
4 
     | 
    
         
             
                if (!rgb)
         
     | 
| 
       5 
     | 
    
         
            -
                    throw new Error(`[Reshaped] Can 
     | 
| 
      
 5 
     | 
    
         
            +
                    throw new Error(`[Reshaped] Can't generate rgb from ${hex} color`);
         
     | 
| 
       6 
6 
     | 
    
         
             
                const lrgb = convertRgbToLrgb(rgb);
         
     | 
| 
       7 
7 
     | 
    
         
             
                const oklab = convertLrgbToOklab(lrgb);
         
     | 
| 
       8 
8 
     | 
    
         
             
                const okhsl = convertOklabToOkhsl(oklab);
         
     | 
| 
         @@ -4,6 +4,8 @@ const resolveTokenReference = (theme, tokenType, ref) => { 
     | 
|
| 
       4 
4 
     | 
    
         
             
                Object.keys(tokenGroup).forEach((tokenName) => {
         
     | 
| 
       5 
5 
     | 
    
         
             
                    if (referencedToken)
         
     | 
| 
       6 
6 
     | 
    
         
             
                        return;
         
     | 
| 
      
 7 
     | 
    
         
            +
                    // Relaxed runtime group resolving
         
     | 
| 
      
 8 
     | 
    
         
            +
                    // eslint-disable-next-line @typescript-eslint/no-explicit-any
         
     | 
| 
       7 
9 
     | 
    
         
             
                    if (tokenName === ref)
         
     | 
| 
       8 
10 
     | 
    
         
             
                        referencedToken = tokenGroup[tokenName];
         
     | 
| 
       9 
11 
     | 
    
         
             
                });
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            @theme{--background-color-primary:var(--rs-color-background-primary);--background-color-primary-faded:var(--rs-color-background-primary-faded);--border-color-primary:var(--rs-color-border-primary);--border-color-primary-faded:var(--rs-color-border-primary-faded);--text-color-primary:var(--rs-color-foreground-primary);--background-color-critical:var(--rs-color-background-critical);--background-color-critical-faded:var(--rs-color-background-critical-faded);--border-color-critical:var(--rs-color-border-critical);--border-color-critical-faded:var(--rs-color-border-critical-faded);--text-color-critical:var(--rs-color-foreground-critical);--background-color-warning:var(--rs-color-background-warning);--background-color-warning-faded:var(--rs-color-background-warning-faded);--border-color-warning:var(--rs-color-border-warning);--border-color-warning-faded:var(--rs-color-border-warning-faded);--text-color-warning:var(--rs-color-foreground-warning);--background-color-positive:var(--rs-color-background-positive);--background-color-positive-faded:var(--rs-color-background-positive-faded);--border-color-positive:var(--rs-color-border-positive);--border-color-positive-faded:var(--rs-color-border-positive-faded);--text-color-positive:var(--rs-color-foreground-positive);--background-color-neutral:var(--rs-color-background-neutral);--background-color-neutral-faded:var(--rs-color-background-neutral-faded);--border-color-neutral:var(--rs-color-border-neutral);--border-color-neutral-faded:var(--rs-color-border-neutral-faded);--text-color-neutral:var(--rs-color-foreground-neutral);--text-color-neutral-faded:var(--rs-color-foreground-neutral-faded);--background-color-disabled:var(--rs-color-background-disabled);--background-color-disabled-faded:var(--rs-color-background-disabled-faded);--border-color-disabled:var(--rs-color-border-disabled);--text-color-disabled:var(--rs-color-foreground-disabled);--background-color-elevation-base:var(--rs-color-background-elevation-base);--background-color-elevation-raised:var(--rs-color-background-elevation-raised);--background-color-elevation-overlay:var(--rs-color-background-elevation-overlay);--background-color-page:var(--rs-color-background-page);--background-color-page-faded:var(--rs-color-background-page-faded);--color-brand:var(--rs-color-brand);--color-white:var(--rs-color-white);--color-black:var(--rs-color-black);-- 
     | 
| 
      
 1 
     | 
    
         
            +
            @theme{--background-color-primary:var(--rs-color-background-primary);--background-color-primary-faded:var(--rs-color-background-primary-faded);--border-color-primary:var(--rs-color-border-primary);--border-color-primary-faded:var(--rs-color-border-primary-faded);--text-color-primary:var(--rs-color-foreground-primary);--background-color-critical:var(--rs-color-background-critical);--background-color-critical-faded:var(--rs-color-background-critical-faded);--border-color-critical:var(--rs-color-border-critical);--border-color-critical-faded:var(--rs-color-border-critical-faded);--text-color-critical:var(--rs-color-foreground-critical);--background-color-warning:var(--rs-color-background-warning);--background-color-warning-faded:var(--rs-color-background-warning-faded);--border-color-warning:var(--rs-color-border-warning);--border-color-warning-faded:var(--rs-color-border-warning-faded);--text-color-warning:var(--rs-color-foreground-warning);--background-color-positive:var(--rs-color-background-positive);--background-color-positive-faded:var(--rs-color-background-positive-faded);--border-color-positive:var(--rs-color-border-positive);--border-color-positive-faded:var(--rs-color-border-positive-faded);--text-color-positive:var(--rs-color-foreground-positive);--background-color-neutral:var(--rs-color-background-neutral);--background-color-neutral-faded:var(--rs-color-background-neutral-faded);--border-color-neutral:var(--rs-color-border-neutral);--border-color-neutral-faded:var(--rs-color-border-neutral-faded);--text-color-neutral:var(--rs-color-foreground-neutral);--text-color-neutral-faded:var(--rs-color-foreground-neutral-faded);--background-color-disabled:var(--rs-color-background-disabled);--background-color-disabled-faded:var(--rs-color-background-disabled-faded);--border-color-disabled:var(--rs-color-border-disabled);--text-color-disabled:var(--rs-color-foreground-disabled);--background-color-elevation-base:var(--rs-color-background-elevation-base);--background-color-elevation-raised:var(--rs-color-background-elevation-raised);--background-color-elevation-overlay:var(--rs-color-background-elevation-overlay);--background-color-page:var(--rs-color-background-page);--background-color-page-faded:var(--rs-color-background-page-faded);--color-brand:var(--rs-color-brand);--color-white:var(--rs-color-white);--color-black:var(--rs-color-black);--text-color-on-primary:var(--rs-color-on-background-primary);--text-color-on-critical:var(--rs-color-on-background-critical);--text-color-on-warning:var(--rs-color-on-background-warning);--text-color-on-positive:var(--rs-color-on-background-positive);--text-color-on-neutral:var(--rs-color-on-background-neutral);--text-color-on-brand:var(--rs-color-on-brand);--radius-small:var(--rs-radius-small);--radius-medium:var(--rs-radius-medium);--radius-large:var(--rs-radius-large);--spacing-0:0px;--spacing-x1:var(--rs-unit-x1);--spacing-x2:var(--rs-unit-x2);--spacing-x3:var(--rs-unit-x3);--spacing-x4:var(--rs-unit-x4);--spacing-x5:var(--rs-unit-x5);--spacing-x6:var(--rs-unit-x6);--spacing-x7:var(--rs-unit-x7);--spacing-x8:var(--rs-unit-x8);--spacing-x9:var(--rs-unit-x9);--spacing-x10:var(--rs-unit-x10);--shadow-raised:var(--rs-shadow-raised);--shadow-overlay:var(--rs-shadow-overlay);--breakpoint-m:660px;--breakpoint-l:900px;--breakpoint-xl:1280px}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            [data-rs-theme=figma]{--rs-font-family-title:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-family-body:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-weight-regular:400;--rs-font-weight-medium:500;--rs-font-weight-semibold:600;--rs-font-weight-bold:700;--rs-font-weight-extrabold:800;--rs-font-weight-black:900;--rs-font-size-title-1:5rem;--rs-line-height-title-1:5.25rem;--rs-font-family-title-1:var(--rs-font-family-title);--rs-font-weight-title-1:var(--rs-font-weight-semibold);--rs-letter-spacing-title-1:normal;--rs-font-size-title-2:4rem;--rs-line-height-title-2:4.25rem;--rs-font-family-title-2:var(--rs-font-family-title);--rs-font-weight-title-2:var(--rs-font-weight-semibold);--rs-letter-spacing-title-2:normal;--rs-font-size-title-3:3.5rem;--rs-line-height-title-3:3.75rem;--rs-font-family-title-3:var(--rs-font-family-title);--rs-font-weight-title-3:var(--rs-font-weight-semibold);--rs-letter-spacing-title-3:normal;--rs-font-size-title-4:2.5rem;--rs-line-height-title-4:2.75rem;--rs-font-family-title-4:var(--rs-font-family-title);--rs-font-weight-title-4:var(--rs-font-weight-semibold);--rs-letter-spacing-title-4:normal;--rs-font-size-title-5:2.25rem;--rs-line-height-title-5:2.5rem;--rs-font-family-title-5:var(--rs-font-family-title);--rs-font-weight-title-5:var(--rs-font-weight-semibold);--rs-letter-spacing-title-5:normal;--rs-font-size-title-6:1.5rem;--rs-line-height-title-6:1.75rem;--rs-font-family-title-6:var(--rs-font-family-title);--rs-font-weight-title-6:var(--rs-font-weight-semibold);--rs-letter-spacing-title-6:normal;--rs-font-size-featured-1:1.375rem;--rs-line-height-featured-1:1.75rem;--rs-font-family-featured-1:var(--rs-font-family-body);--rs-letter-spacing-featured-1:normal;--rs-font-size-featured-2:1.25rem;--rs-line-height-featured-2:1.75rem;--rs-font-family-featured-2:var(--rs-font-family-body);--rs-letter-spacing-featured-2:normal;--rs-font-size-featured-3:1.125rem;--rs-line-height-featured-3:1.5rem;--rs-font-family-featured-3:var(--rs-font-family-body);--rs-letter-spacing-featured-3:normal;--rs-font-size-body-1:0.875rem;--rs-line-height-body-1:1.25rem;--rs-font-family-body-1:var(--rs-font-family-body);--rs-letter-spacing-body-1:normal;--rs-font-size-body-2:0.8125rem;--rs-line-height-body-2:1.25rem;--rs-font-family-body-2:var(--rs-font-family-body);--rs-letter-spacing-body-2:normal;--rs-font-size-body-3:0.6875rem;--rs-line-height-body-3:1rem;--rs-font-family-body-3:var(--rs-font-family-body);--rs-letter-spacing-body-3:normal;--rs-font-size-caption-1:0.6875rem;--rs-line-height-caption-1:1rem;--rs-font-family-caption-1:var(--rs-font-family-body);--rs-letter-spacing-caption-1:normal;--rs-font-size-caption-2:0.625rem;--rs-line-height-caption-2:0.75rem;--rs-font-family-caption-2:var(--rs-font-family-body);--rs-letter-spacing-caption-2:normal;--rs-unit-base:4px;--rs-unit-radius-small:4px;--rs-unit-radius-medium:4px;--rs-unit-radius-large:4px;--rs-unit-x1:4px;--rs-unit-x2:8px;--rs-unit-x3:12px;--rs-unit-x4:16px;--rs-unit-x5:20px;--rs-unit-x6:24px;--rs-unit-x7:28px;--rs-unit-x8:32px;--rs-unit-x9:36px;--rs-unit-x10:40px;--rs-radius-small:4px;--rs-radius-medium:8px;--rs-radius-large:12px;--rs-color-brand:# 
     | 
| 
      
 1 
     | 
    
         
            +
            [data-rs-theme=figma]{--rs-font-family-title:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-family-body:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-weight-regular:400;--rs-font-weight-medium:500;--rs-font-weight-semibold:600;--rs-font-weight-bold:700;--rs-font-weight-extrabold:800;--rs-font-weight-black:900;--rs-font-size-title-1:5rem;--rs-line-height-title-1:5.25rem;--rs-font-family-title-1:var(--rs-font-family-title);--rs-font-weight-title-1:var(--rs-font-weight-semibold);--rs-letter-spacing-title-1:normal;--rs-font-size-title-2:4rem;--rs-line-height-title-2:4.25rem;--rs-font-family-title-2:var(--rs-font-family-title);--rs-font-weight-title-2:var(--rs-font-weight-semibold);--rs-letter-spacing-title-2:normal;--rs-font-size-title-3:3.5rem;--rs-line-height-title-3:3.75rem;--rs-font-family-title-3:var(--rs-font-family-title);--rs-font-weight-title-3:var(--rs-font-weight-semibold);--rs-letter-spacing-title-3:normal;--rs-font-size-title-4:2.5rem;--rs-line-height-title-4:2.75rem;--rs-font-family-title-4:var(--rs-font-family-title);--rs-font-weight-title-4:var(--rs-font-weight-semibold);--rs-letter-spacing-title-4:normal;--rs-font-size-title-5:2.25rem;--rs-line-height-title-5:2.5rem;--rs-font-family-title-5:var(--rs-font-family-title);--rs-font-weight-title-5:var(--rs-font-weight-semibold);--rs-letter-spacing-title-5:normal;--rs-font-size-title-6:1.5rem;--rs-line-height-title-6:1.75rem;--rs-font-family-title-6:var(--rs-font-family-title);--rs-font-weight-title-6:var(--rs-font-weight-semibold);--rs-letter-spacing-title-6:normal;--rs-font-size-featured-1:1.375rem;--rs-line-height-featured-1:1.75rem;--rs-font-family-featured-1:var(--rs-font-family-body);--rs-letter-spacing-featured-1:normal;--rs-font-size-featured-2:1.25rem;--rs-line-height-featured-2:1.75rem;--rs-font-family-featured-2:var(--rs-font-family-body);--rs-letter-spacing-featured-2:normal;--rs-font-size-featured-3:1.125rem;--rs-line-height-featured-3:1.5rem;--rs-font-family-featured-3:var(--rs-font-family-body);--rs-letter-spacing-featured-3:normal;--rs-font-size-body-1:0.875rem;--rs-line-height-body-1:1.25rem;--rs-font-family-body-1:var(--rs-font-family-body);--rs-letter-spacing-body-1:normal;--rs-font-size-body-2:0.8125rem;--rs-line-height-body-2:1.25rem;--rs-font-family-body-2:var(--rs-font-family-body);--rs-letter-spacing-body-2:normal;--rs-font-size-body-3:0.6875rem;--rs-line-height-body-3:1rem;--rs-font-family-body-3:var(--rs-font-family-body);--rs-letter-spacing-body-3:normal;--rs-font-size-caption-1:0.6875rem;--rs-line-height-caption-1:1rem;--rs-font-family-caption-1:var(--rs-font-family-body);--rs-letter-spacing-caption-1:normal;--rs-font-size-caption-2:0.625rem;--rs-line-height-caption-2:0.75rem;--rs-font-family-caption-2:var(--rs-font-family-body);--rs-letter-spacing-caption-2:normal;--rs-unit-base:4px;--rs-unit-radius-small:4px;--rs-unit-radius-medium:4px;--rs-unit-radius-large:4px;--rs-unit-x1:4px;--rs-unit-x2:8px;--rs-unit-x3:12px;--rs-unit-x4:16px;--rs-unit-x5:20px;--rs-unit-x6:24px;--rs-unit-x7:28px;--rs-unit-x8:32px;--rs-unit-x9:36px;--rs-unit-x10:40px;--rs-radius-small:4px;--rs-radius-medium:8px;--rs-radius-large:12px;--rs-color-brand:#0d99ff;--rs-color-white:#fff;--rs-color-black:#000;--rs-color-on-background-primary:#fff;--rs-color-on-background-critical:#000;--rs-color-on-background-warning:#000;--rs-color-on-background-positive:#000;--rs-color-on-brand:#000;--rs-color-rgb-white:255,255,255;--rs-color-rgb-black:0,0,0;--rs-duration-rapid:100ms;--rs-duration-fast:200ms;--rs-duration-medium:300ms;--rs-duration-slow:400ms;--rs-easing-standard:cubic-bezier(0.4,0,0.2,1);--rs-easing-accelerate:cubic-bezier(0.4,0,1,1);--rs-easing-decelerate:cubic-bezier(0,0,0.2,1);--rs-shadow-raised:0px 1px 3px 0px rgba(0,0,0,.15);--rs-shadow-overlay:0px 10px 24px 0px rgba(0,0,0,.1),0px 2px 5px 0px rgba(0,0,0,.04);--rs-viewport-m-min:660;--rs-viewport-l-min:900;--rs-viewport-xl-min:1280}[data-rs-theme=figma][data-rs-color-mode=light]{--rs-color-background-primary:#0d99ff;--rs-color-background-primary-faded:#e5f4ff;--rs-color-border-primary:#007be5;--rs-color-border-primary-faded:#bde3ff;--rs-color-foreground-primary:#007be5;--rs-color-background-critical:#f24822;--rs-color-background-critical-faded:#ffe2e0;--rs-color-border-critical:#dc3412;--rs-color-border-critical-faded:#ffc7c2;--rs-color-foreground-critical:#dc3412;--rs-color-background-warning:#facc15;--rs-color-background-warning-faded:#fffae9;--rs-color-border-warning:#cfa90f;--rs-color-border-warning-faded:#ece2c4;--rs-color-foreground-warning:#7b6305;--rs-color-background-positive:#14ae5c;--rs-color-background-positive-faded:#daecdf;--rs-color-border-positive:#009951;--rs-color-border-positive-faded:#bbddc6;--rs-color-foreground-positive:#009951;--rs-color-background-neutral:#dfe2ea;--rs-color-background-neutral-faded:#f5f5f5;--rs-color-border-neutral:#e6e6e6;--rs-color-border-neutral-faded:#e6e6e6;--rs-color-foreground-neutral:#191919;--rs-color-foreground-neutral-faded:#474747;--rs-color-background-disabled:#e4e4e4;--rs-color-background-disabled-faded:#f5f5f5;--rs-color-border-disabled:#e6e6e6;--rs-color-foreground-disabled:#b2b2b2;--rs-color-background-elevation-base:#fff;--rs-color-background-elevation-raised:#fff;--rs-color-background-elevation-overlay:#fff;--rs-color-background-page:#fff;--rs-color-background-page-faded:#fafafa;--rs-color-rgb-background-primary:13,153,255;--rs-color-rgb-background-primary-faded:229,244,255;--rs-color-rgb-background-critical:242,72,34;--rs-color-rgb-background-critical-faded:255,226,224;--rs-color-rgb-background-warning:250,204,21;--rs-color-rgb-background-warning-faded:255,250,233;--rs-color-rgb-background-positive:20,174,92;--rs-color-rgb-background-positive-faded:218,236,223;--rs-color-on-background-neutral:#000;--rs-color-rgb-background-neutral:223,226,234;--rs-color-rgb-background-neutral-faded:245,245,245;--rs-color-rgb-background-disabled:228,228,228;--rs-color-rgb-background-disabled-faded:245,245,245;--rs-color-rgb-background-elevation-base:255,255,255;--rs-color-rgb-background-elevation-raised:255,255,255;--rs-color-rgb-background-elevation-overlay:255,255,255;--rs-color-rgb-background-page:255,255,255;--rs-color-rgb-background-page-faded:250,250,250}[data-rs-theme=figma][data-rs-color-mode=dark]{--rs-color-background-primary:#0c8ce9;--rs-color-background-primary-faded:#394360;--rs-color-border-primary:#7cc4f8;--rs-color-border-primary-faded:#2a4d72;--rs-color-foreground-primary:#7cc4f8;--rs-color-background-critical:#e03e1a;--rs-color-background-critical-faded:#60332a;--rs-color-border-critical:#fca397;--rs-color-border-critical-faded:#803226;--rs-color-foreground-critical:#fca397;--rs-color-background-warning:#f1c512;--rs-color-background-warning-faded:#2c271f;--rs-color-border-warning:#b4920a;--rs-color-border-warning-faded:#453c1e;--rs-color-foreground-warning:#b4920c;--rs-color-background-positive:#198f51;--rs-color-background-positive-faded:#3d5749;--rs-color-border-positive:#79d297;--rs-color-border-positive-faded:#086338;--rs-color-foreground-positive:#79d297;--rs-color-background-neutral:#444;--rs-color-background-neutral-faded:#383838;--rs-color-border-neutral:#444;--rs-color-border-neutral-faded:#444;--rs-color-foreground-neutral:#fff;--rs-color-foreground-neutral-faded:#b2b2b2;--rs-color-background-disabled:#474747;--rs-color-background-disabled-faded:#3a3a3a;--rs-color-border-disabled:#3e3e3e;--rs-color-foreground-disabled:#656565;--rs-color-background-elevation-base:#2c2c2c;--rs-color-background-elevation-raised:#2c2c2c;--rs-color-background-elevation-overlay:#2c2c2c;--rs-color-background-page:#2c2c2c;--rs-color-background-page-faded:#1e1e1e;--rs-color-rgb-background-primary:12,140,233;--rs-color-rgb-background-primary-faded:57,67,96;--rs-color-rgb-background-critical:224,62,26;--rs-color-rgb-background-critical-faded:96,51,42;--rs-color-rgb-background-warning:241,197,18;--rs-color-rgb-background-warning-faded:44,39,31;--rs-color-rgb-background-positive:25,143,81;--rs-color-rgb-background-positive-faded:61,87,73;--rs-color-on-background-neutral:#fff;--rs-color-rgb-background-neutral:68,68,68;--rs-color-rgb-background-neutral-faded:56,56,56;--rs-color-rgb-background-disabled:71,71,71;--rs-color-rgb-background-disabled-faded:58,58,58;--rs-color-rgb-background-elevation-base:44,44,44;--rs-color-rgb-background-elevation-raised:44,44,44;--rs-color-rgb-background-elevation-overlay:44,44,44;--rs-color-rgb-background-page:44,44,44;--rs-color-rgb-background-page-faded:30,30,30}
         
     | 
    
        package/dist/types/global.d.ts
    CHANGED
    
    | 
         @@ -3,7 +3,7 @@ type ClassNameValue = string | null | undefined | false; 
     | 
|
| 
       3 
3 
     | 
    
         
             
            export type ClassName = ClassNameValue | ClassNameValue[] | ClassName[];
         
     | 
| 
       4 
4 
     | 
    
         
             
            export type CSSVariable = `--${string}`;
         
     | 
| 
       5 
5 
     | 
    
         
             
            export type StyleAttribute = React.CSSProperties | (React.CSSProperties & Record<CSSVariable, string | number | undefined>);
         
     | 
| 
       6 
     | 
    
         
            -
            type DataAttributes =  
     | 
| 
      
 6 
     | 
    
         
            +
            type DataAttributes = object | Record<`data-${string}`, string | boolean>;
         
     | 
| 
       7 
7 
     | 
    
         
             
            export type Attributes<TagName extends keyof React.JSX.IntrinsicElements = "div"> = React.JSX.IntrinsicElements[TagName] & DataAttributes & {
         
     | 
| 
       8 
8 
     | 
    
         
             
                style?: StyleAttribute;
         
     | 
| 
       9 
9 
     | 
    
         
             
            };
         
     | 
| 
         @@ -19,7 +19,7 @@ export type Coordinates = { 
     | 
|
| 
       19 
19 
     | 
    
         
             
            /**
         
     | 
| 
       20 
20 
     | 
    
         
             
             * Form handlers
         
     | 
| 
       21 
21 
     | 
    
         
             
             */
         
     | 
| 
       22 
     | 
    
         
            -
            type ChangeHandlerArgs<Value, Event> = Value extends  
     | 
| 
      
 22 
     | 
    
         
            +
            type ChangeHandlerArgs<Value, Event> = Value extends boolean ? {
         
     | 
| 
       23 
23 
     | 
    
         
             
                name: string;
         
     | 
| 
       24 
24 
     | 
    
         
             
                value?: string;
         
     | 
| 
       25 
25 
     | 
    
         
             
                checked: Value;
         
     | 
| 
         @@ -7,12 +7,14 @@ export const range = (start, end) => { 
     | 
|
| 
       7 
7 
     | 
    
         
             
                return Array.from({ length: end - start + 1 }, (_, i) => start + i);
         
     | 
| 
       8 
8 
     | 
    
         
             
            };
         
     | 
| 
       9 
9 
     | 
    
         
             
            // from https://gist.github.com/ca0v/73a31f57b397606c9813472f7493a940
         
     | 
| 
      
 10 
     | 
    
         
            +
            // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
         
     | 
| 
       10 
11 
     | 
    
         
             
            export const debounce = (cb, wait = 20) => {
         
     | 
| 
       11 
12 
     | 
    
         
             
                let timer;
         
     | 
| 
       12 
13 
     | 
    
         
             
                const callable = (...args) => {
         
     | 
| 
       13 
14 
     | 
    
         
             
                    clearTimeout(timer);
         
     | 
| 
       14 
15 
     | 
    
         
             
                    timer = setTimeout(() => cb(...args), wait);
         
     | 
| 
       15 
16 
     | 
    
         
             
                };
         
     | 
| 
      
 17 
     | 
    
         
            +
                // eslint-disable-next-line @typescript-eslint/no-explicit-any
         
     | 
| 
       16 
18 
     | 
    
         
             
                return callable;
         
     | 
| 
       17 
19 
     | 
    
         
             
            };
         
     | 
| 
       18 
20 
     | 
    
         
             
            export function debounceHandler(handler, timeout) {
         
     | 
| 
         @@ -23,6 +25,7 @@ export function debounceHandler(handler, timeout) { 
     | 
|
| 
       23 
25 
     | 
    
         
             
                    return debounced(event);
         
     | 
| 
       24 
26 
     | 
    
         
             
                };
         
     | 
| 
       25 
27 
     | 
    
         
             
            }
         
     | 
| 
      
 28 
     | 
    
         
            +
            // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
         
     | 
| 
       26 
29 
     | 
    
         
             
            export const throttle = (cb, wait) => {
         
     | 
| 
       27 
30 
     | 
    
         
             
                let waiting = false;
         
     | 
| 
       28 
31 
     | 
    
         
             
                return (...args) => {
         
     | 
| 
         @@ -131,7 +134,7 @@ export const resolveViewportValue = (viewport, value) => { 
     | 
|
| 
       131 
134 
     | 
    
         
             
                let result;
         
     | 
| 
       132 
135 
     | 
    
         
             
                if (!isResponsive(value))
         
     | 
| 
       133 
136 
     | 
    
         
             
                    return value;
         
     | 
| 
       134 
     | 
    
         
            -
                for ( 
     | 
| 
      
 137 
     | 
    
         
            +
                for (const currentViewport of viewports) {
         
     | 
| 
       135 
138 
     | 
    
         
             
                    const viewportValue = value[currentViewport];
         
     | 
| 
       136 
139 
     | 
    
         
             
                    if (viewportValue !== undefined)
         
     | 
| 
       137 
140 
     | 
    
         
             
                        result = viewportValue;
         
     | 
| 
         @@ -1,6 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            const testPlatform = (re) => {
         
     | 
| 
       2 
2 
     | 
    
         
             
                // Using experimentral and deprecated features here since that's the only way to detect platform consistently
         
     | 
| 
       3 
3 
     | 
    
         
             
                const platform = 
         
     | 
| 
      
 4 
     | 
    
         
            +
                // eslint-disable-next-line @typescript-eslint/ban-ts-comment
         
     | 
| 
       4 
5 
     | 
    
         
             
                // @ts-ignore
         
     | 
| 
       5 
6 
     | 
    
         
             
                window.navigator.userAgentData?.platform || window.navigator.platform;
         
     | 
| 
       6 
7 
     | 
    
         
             
                return typeof window !== "undefined" ? re.test(platform) : false;
         
     |