reshaped 3.3.10 → 3.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/bundle.css +1 -1
- package/dist/bundle.js +10 -10
- package/dist/cjs/themes/_generator/utilities/generateColors.d.ts +1 -1
- package/dist/cjs/themes/_generator/utilities/generateColors.js +3 -2
- package/dist/cjs/themes/_generator/utilities/tests/color.test.js +32 -31
- package/dist/cjs/themes/slate/theme.css +1 -1
- package/dist/components/Accordion/tests/Accordion.stories.d.ts +30 -8
- package/dist/components/Accordion/tests/Accordion.stories.js +172 -119
- package/dist/components/ActionBar/tests/ActionBar.stories.d.ts +12 -3
- package/dist/components/ActionBar/tests/ActionBar.stories.js +51 -36
- package/dist/components/ActionBar/tests/ActionBar.test.stories.d.ts +15 -0
- package/dist/components/ActionBar/tests/ActionBar.test.stories.js +26 -0
- package/dist/components/Actionable/Actionable.js +1 -1
- package/dist/components/Actionable/Actionable.types.d.ts +3 -3
- package/dist/components/Actionable/tests/Actionable.stories.d.ts +19 -5
- package/dist/components/Actionable/tests/Actionable.stories.js +88 -63
- package/dist/components/Actionable/tests/Actionable.test.stories.d.ts +32 -0
- package/dist/components/Actionable/tests/Actionable.test.stories.js +130 -0
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Alert/tests/Alert.stories.d.ts +12 -3
- package/dist/components/Alert/tests/Alert.stories.js +51 -86
- package/dist/components/Alert/tests/Alert.test.stories.d.ts +15 -0
- package/dist/components/Alert/tests/Alert.test.stories.js +26 -0
- package/dist/components/Autocomplete/Autocomplete.js +9 -2
- package/dist/components/Autocomplete/tests/Autocomplete.stories.d.ts +6 -2
- package/dist/components/Autocomplete/tests/Autocomplete.stories.js +94 -111
- package/dist/components/Autocomplete/tests/Autocomplete.test.stories.d.ts +23 -0
- package/dist/components/Autocomplete/tests/Autocomplete.test.stories.js +86 -0
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/Avatar/tests/Avatar.stories.d.ts +14 -4
- package/dist/components/Avatar/tests/Avatar.stories.js +94 -80
- package/dist/components/Avatar/tests/Avatar.test.stories.d.ts +17 -0
- package/dist/components/Avatar/tests/Avatar.test.stories.js +39 -0
- package/dist/components/Badge/tests/Badge.stories.d.ts +33 -8
- package/dist/components/Badge/tests/Badge.stories.js +238 -212
- package/dist/components/Badge/tests/Badge.test.stories.d.ts +20 -0
- package/dist/components/Badge/tests/Badge.test.stories.js +44 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +1 -0
- package/dist/components/Breadcrumbs/tests/Breadcrumbs.stories.d.ts +24 -5
- package/dist/components/Breadcrumbs/tests/Breadcrumbs.stories.js +114 -95
- package/dist/components/Breadcrumbs/tests/Breadcrumbs.test.stories.d.ts +23 -0
- package/dist/components/Breadcrumbs/tests/Breadcrumbs.test.stories.js +76 -0
- package/dist/components/Button/Button.js +5 -2
- package/dist/components/Button/Button.module.css +1 -1
- package/dist/components/Button/Button.types.d.ts +1 -0
- package/dist/components/Button/tests/Button.stories.d.ts +2 -2
- package/dist/components/Button/tests/Button.stories.js +77 -74
- package/dist/components/Button/tests/Button.test.stories.d.ts +27 -0
- package/dist/components/Button/tests/Button.test.stories.js +112 -0
- package/dist/components/Calendar/tests/Calendar.test.stories.d.ts +26 -0
- package/dist/components/Calendar/tests/Calendar.test.stories.js +161 -0
- package/dist/components/Card/Card.d.ts +3 -3
- package/dist/components/Card/Card.types.d.ts +1 -1
- package/dist/components/Card/tests/Card.stories.d.ts +3 -4
- package/dist/components/Card/tests/Card.stories.js +0 -11
- package/dist/components/Card/tests/Card.test.stories.d.ts +35 -0
- package/dist/components/Card/tests/Card.test.stories.js +54 -0
- package/dist/components/Carousel/Carousel.types.d.ts +1 -1
- package/dist/components/Carousel/CarouselControl.js +1 -1
- package/dist/components/Carousel/tests/Carousel.stories.d.ts +3 -0
- package/dist/components/Carousel/tests/Carousel.stories.js +5 -1
- package/dist/components/Carousel/tests/Carousel.test.stories.d.ts +17 -0
- package/dist/components/Carousel/tests/Carousel.test.stories.js +52 -0
- package/dist/components/Checkbox/tests/Checkbox.test.stories.d.ts +25 -0
- package/dist/components/Checkbox/tests/Checkbox.test.stories.js +104 -0
- package/dist/components/CheckboxGroup/tests/CheckboxGroup.test.stories.d.ts +22 -0
- package/dist/components/CheckboxGroup/tests/CheckboxGroup.test.stories.js +78 -0
- package/dist/components/Container/Container.module.css +1 -1
- package/dist/components/Container/tests/Container.stories.d.ts +12 -3
- package/dist/components/Container/tests/Container.stories.js +50 -31
- package/dist/components/Container/tests/Container.test.stories.d.ts +15 -0
- package/dist/components/Container/tests/Container.test.stories.js +26 -0
- package/dist/components/ContextMenu/ContextMenu.js +13 -9
- package/dist/components/ContextMenu/tests/ContextMenu.stories.js +2 -3
- package/dist/components/ContextMenu/tests/ContextMenu.test.stories.d.ts +26 -0
- package/dist/components/ContextMenu/tests/ContextMenu.test.stories.js +53 -0
- package/dist/components/Dismissible/Dismissible.js +1 -1
- package/dist/components/Dismissible/tests/Dismissible.stories.d.ts +10 -3
- package/dist/components/Dismissible/tests/Dismissible.stories.js +51 -34
- package/dist/components/Dismissible/tests/Dismissible.test.stories.d.ts +19 -0
- package/dist/components/Dismissible/tests/Dismissible.test.stories.js +42 -0
- package/dist/components/Divider/tests/Divider.test.stories.d.ts +18 -0
- package/dist/components/Divider/tests/Divider.test.stories.js +47 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +1 -1
- package/dist/components/DropdownMenu/tests/DropdownMenu.test.stories.d.ts +37 -0
- package/dist/components/DropdownMenu/tests/DropdownMenu.test.stories.js +117 -0
- package/dist/components/FileUpload/tests/FileUpload.test.stories.d.ts +22 -0
- package/dist/components/FileUpload/tests/FileUpload.test.stories.js +52 -0
- package/dist/components/FormControl/FormControl.context.d.ts +12 -0
- package/dist/components/FormControl/FormControlCaption.js +1 -1
- package/dist/components/FormControl/FormControlLabel.js +1 -1
- package/dist/components/FormControl/tests/FormControl.stories.d.ts +11 -5
- package/dist/components/FormControl/tests/FormControl.stories.js +78 -73
- package/dist/components/FormControl/tests/FormControl.test.stories.d.ts +20 -0
- package/dist/components/FormControl/tests/FormControl.test.stories.js +49 -0
- package/dist/components/Grid/Grid.d.ts +2 -2
- package/dist/components/Grid/Grid.types.d.ts +3 -2
- package/dist/components/Grid/tests/Grid.stories.d.ts +22 -7
- package/dist/components/Grid/tests/Grid.stories.js +164 -149
- package/dist/components/Grid/tests/Grid.test.stories.d.ts +19 -0
- package/dist/components/Grid/tests/Grid.test.stories.js +42 -0
- package/dist/components/Hidden/Hidden.types.d.ts +1 -1
- package/dist/components/Hidden/tests/Hidden.stories.d.ts +4 -1
- package/dist/components/Hidden/tests/Hidden.stories.js +28 -25
- package/dist/components/Hidden/tests/Hidden.test.stories.d.ts +15 -0
- package/dist/components/Hidden/tests/Hidden.test.stories.js +20 -0
- package/dist/components/HiddenVisually/tests/HiddenVisually.stories.d.ts +4 -1
- package/dist/components/HiddenVisually/tests/HiddenVisually.stories.js +8 -5
- package/dist/components/HiddenVisually/tests/HiddenVisually.test.stories.d.ts +15 -0
- package/dist/components/HiddenVisually/tests/HiddenVisually.test.stories.js +20 -0
- package/dist/components/Hotkey/tests/Hotkey.test.stories.d.ts +15 -0
- package/dist/components/Hotkey/tests/Hotkey.test.stories.js +26 -0
- package/dist/components/Icon/tests/Icon.stories.d.ts +12 -3
- package/dist/components/Icon/tests/Icon.stories.js +69 -60
- package/dist/components/Icon/tests/Icon.test.stories.d.ts +16 -0
- package/dist/components/Icon/tests/Icon.test.stories.js +35 -0
- package/dist/components/Image/tests/Image.stories.d.ts +24 -5
- package/dist/components/Image/tests/Image.stories.js +95 -75
- package/dist/components/Image/tests/Image.test.stories.d.ts +25 -0
- package/dist/components/Image/tests/Image.test.stories.js +80 -0
- package/dist/components/Link/tests/Link.test.stories.d.ts +29 -0
- package/dist/components/Link/tests/Link.test.stories.js +87 -0
- package/dist/components/Loader/Loader.js +1 -1
- package/dist/components/Loader/Loader.types.d.ts +1 -0
- package/dist/components/Loader/tests/Loader.stories.js +8 -8
- package/dist/components/Loader/tests/Loader.test.stories.d.ts +16 -0
- package/dist/components/Loader/tests/Loader.test.stories.js +32 -0
- package/dist/components/MenuItem/tests/MenuItem.test.stories.d.ts +26 -0
- package/dist/components/MenuItem/tests/MenuItem.test.stories.js +100 -0
- package/dist/components/Modal/Modal.types.d.ts +1 -1
- package/dist/components/Modal/tests/Modal.test.stories.d.ts +32 -0
- package/dist/components/Modal/tests/Modal.test.stories.js +149 -0
- package/dist/components/Overlay/Overlay.types.d.ts +1 -1
- package/dist/components/Overlay/tests/Overlay.stories.d.ts +4 -2
- package/dist/components/Overlay/tests/Overlay.stories.js +53 -53
- package/dist/components/Overlay/tests/Overlay.test.stories.d.ts +28 -0
- package/dist/components/Overlay/tests/Overlay.test.stories.js +146 -0
- package/dist/components/Pagination/tests/Pagination.test.stories.d.ts +23 -0
- package/dist/components/Pagination/tests/Pagination.test.stories.js +86 -0
- package/dist/components/PinField/tests/PinField.stories.d.ts +0 -1
- package/dist/components/PinField/tests/PinField.stories.js +10 -19
- package/dist/components/PinField/tests/PinField.test.stories.d.ts +29 -0
- package/dist/components/PinField/tests/PinField.test.stories.js +177 -0
- package/dist/components/Popover/tests/Popover.test.stories.d.ts +40 -0
- package/dist/components/Popover/tests/Popover.test.stories.js +167 -0
- package/dist/components/Progress/Progress.js +2 -2
- package/dist/components/Progress/Progress.types.d.ts +1 -0
- package/dist/components/Progress/tests/Progress.stories.js +10 -10
- package/dist/components/Progress/tests/Progress.test.stories.d.ts +16 -0
- package/dist/components/Progress/tests/Progress.test.stories.js +35 -0
- package/dist/components/Radio/tests/Radio.test.stories.d.ts +30 -0
- package/dist/components/Radio/tests/Radio.test.stories.js +118 -0
- package/dist/components/RadioGroup/tests/RadioGroup.test.stories.d.ts +22 -0
- package/dist/components/RadioGroup/tests/RadioGroup.test.stories.js +78 -0
- package/dist/components/Reshaped/tests/Reshaped.stories.d.ts +33 -0
- package/dist/components/Reshaped/tests/Reshaped.stories.js +88 -0
- package/dist/components/Resizable/Resizable.js +4 -1
- package/dist/components/Resizable/Resizable.types.d.ts +2 -2
- package/dist/components/Resizable/tests/Resizable.stories.d.ts +3 -0
- package/dist/components/Resizable/tests/Resizable.stories.js +4 -0
- package/dist/components/Resizable/tests/Resizable.test.stories.d.ts +19 -0
- package/dist/components/Resizable/tests/Resizable.test.stories.js +25 -0
- package/dist/components/Scrim/tests/Scrim.test.stories.d.ts +15 -0
- package/dist/components/Scrim/tests/Scrim.test.stories.js +25 -0
- package/dist/components/ScrollArea/ScrollArea.js +1 -1
- package/dist/components/ScrollArea/ScrollArea.module.css +1 -1
- package/dist/components/ScrollArea/tests/ScrollArea.stories.d.ts +17 -4
- package/dist/components/ScrollArea/tests/ScrollArea.stories.js +114 -139
- package/dist/components/ScrollArea/tests/ScrollArea.test.stories.d.ts +23 -0
- package/dist/components/ScrollArea/tests/ScrollArea.test.stories.js +66 -0
- package/dist/components/Select/tests/Select.stories.d.ts +1 -1
- package/dist/components/Select/tests/Select.stories.js +5 -12
- package/dist/components/Select/tests/Select.test.stories.d.ts +27 -0
- package/dist/components/Select/tests/Select.test.stories.js +132 -0
- package/dist/components/Skeleton/tests/Skeleton.test.stories.d.ts +15 -0
- package/dist/components/Skeleton/tests/Skeleton.test.stories.js +23 -0
- package/dist/components/Slider/Slider.types.d.ts +1 -1
- package/dist/components/Slider/tests/Slider.stories.d.ts +0 -1
- package/dist/components/Slider/tests/Slider.stories.js +8 -9
- package/dist/components/Slider/tests/Slider.test.stories.d.ts +38 -0
- package/dist/components/Slider/tests/Slider.test.stories.js +150 -0
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/tests/Stepper.stories.js +0 -3
- package/dist/components/Stepper/tests/Stepper.test.stories.d.ts +18 -0
- package/dist/components/Stepper/tests/Stepper.test.stories.js +28 -0
- package/dist/components/Switch/tests/Switch.test.stories.d.ts +23 -0
- package/dist/components/Switch/tests/Switch.test.stories.js +79 -0
- package/dist/components/Table/tests/Table.test.stories.d.ts +25 -0
- package/dist/components/Table/tests/Table.test.stories.js +93 -0
- package/dist/components/Tabs/Tabs.types.d.ts +3 -3
- package/dist/components/Tabs/TabsContext.d.ts +3 -3
- package/dist/components/Tabs/TabsItem.js +1 -1
- package/dist/components/Tabs/tests/Tabs.stories.js +4 -4
- package/dist/components/Tabs/tests/Tabs.test.stories.d.ts +28 -0
- package/dist/components/Tabs/tests/Tabs.test.stories.js +128 -0
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.types.d.ts +1 -1
- package/dist/components/Text/tests/Text.stories.d.ts +29 -8
- package/dist/components/Text/tests/Text.stories.js +148 -125
- package/dist/components/Text/tests/Text.test.stories.d.ts +18 -0
- package/dist/components/Text/tests/Text.test.stories.js +49 -0
- package/dist/components/TextArea/TextArea.module.css +1 -1
- package/dist/components/TextArea/tests/TextArea.stories.js +1 -1
- package/dist/components/TextArea/tests/TextArea.test.stories.d.ts +29 -0
- package/dist/components/TextArea/tests/TextArea.test.stories.js +99 -0
- package/dist/components/TextField/TextField.js +3 -1
- package/dist/components/TextField/tests/TextField.stories.js +1 -1
- package/dist/components/TextField/tests/TextField.test.stories.d.ts +29 -0
- package/dist/components/TextField/tests/TextField.test.stories.js +99 -0
- package/dist/components/Theme/Theme.types.d.ts +2 -2
- package/dist/components/Theme/tests/Theme.test.stories.d.ts +24 -0
- package/dist/components/Theme/tests/Theme.test.stories.js +133 -0
- package/dist/components/Timeline/tests/Timeline.test.stories.d.ts +18 -0
- package/dist/components/Timeline/tests/Timeline.test.stories.js +32 -0
- package/dist/components/Toast/ToastContainer.js +1 -1
- package/dist/components/Toast/tests/Toast.test.stories.d.ts +16 -0
- package/dist/components/Toast/tests/Toast.test.stories.js +101 -0
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/tests/Tooltip.stories.d.ts +1 -1
- package/dist/components/Tooltip/tests/Tooltip.stories.js +0 -14
- package/dist/components/Tooltip/tests/Tooltip.test.stories.d.ts +19 -0
- package/dist/components/Tooltip/tests/Tooltip.test.stories.js +40 -0
- package/dist/components/View/View.d.ts +2 -2
- package/dist/components/View/View.js +4 -4
- package/dist/components/View/View.types.d.ts +2 -2
- package/dist/components/View/tests/View.stories.d.ts +114 -30
- package/dist/components/View/tests/View.stories.js +1092 -1012
- package/dist/components/View/tests/View.test.stories.d.ts +20 -0
- package/dist/components/View/tests/View.test.stories.js +50 -0
- package/dist/components/_private/Flyout/Flyout.types.d.ts +6 -6
- package/dist/components/_private/Flyout/FlyoutContent.js +1 -1
- package/dist/components/_private/Flyout/FlyoutControlled.js +5 -3
- package/dist/components/_private/Flyout/tests/Flyout.stories.js +5 -5
- package/dist/components/_private/Flyout/tests/Flyout.test.stories.d.ts +28 -0
- package/dist/components/_private/Flyout/tests/Flyout.test.stories.js +205 -0
- package/dist/components/_private/Flyout/useFlyout.d.ts +3 -3
- package/dist/components/_private/Portal/Portal.types.d.ts +3 -3
- package/dist/components/_private/Portal/tests/Portal.stories.js +1 -1
- package/dist/hooks/_private/useIsDismissible.d.ts +1 -1
- package/dist/hooks/_private/useOnClickOutside.d.ts +1 -1
- package/dist/hooks/_private/useSingletonHotkeys.d.ts +3 -3
- package/dist/hooks/_private/useSingletonHotkeys.js +1 -1
- package/dist/hooks/tests/useDrag.stories.js +1 -0
- package/dist/hooks/tests/useDrag.test.stories.d.ts +26 -0
- package/dist/hooks/tests/useDrag.test.stories.js +120 -0
- package/dist/hooks/tests/useElementId.stories.d.ts +6 -0
- package/dist/hooks/tests/useElementId.stories.js +19 -0
- package/dist/hooks/tests/useHotkeys.test.stories.d.ts +39 -0
- package/dist/hooks/tests/useHotkeys.test.stories.js +119 -0
- package/dist/hooks/tests/useRTL.stories.d.ts +6 -0
- package/dist/hooks/tests/useRTL.stories.js +25 -0
- package/dist/hooks/tests/useResponsiveClientValue.stories.d.ts +9 -1
- package/dist/hooks/tests/useResponsiveClientValue.stories.js +22 -9
- package/dist/hooks/tests/useScrollLock.stories.d.ts +6 -0
- package/dist/hooks/tests/useScrollLock.stories.js +22 -0
- package/dist/hooks/tests/useToggle.stories.d.ts +8 -0
- package/dist/hooks/tests/useToggle.stories.js +54 -0
- package/dist/hooks/useDrag.d.ts +3 -3
- package/dist/hooks/useHotkeys.d.ts +2 -2
- package/dist/hooks/useHotkeys.js +3 -1
- package/dist/hooks/useScrollLock.d.ts +2 -1
- package/dist/hooks/useScrollLock.js +7 -3
- package/dist/tests/ShadowDOM.stories.js +1 -1
- package/dist/themes/_generator/tests/themes.stories.d.ts +3 -0
- package/dist/themes/_generator/tests/themes.stories.js +7 -11
- package/dist/themes/_generator/utilities/generateColors.d.ts +1 -1
- package/dist/themes/_generator/utilities/generateColors.js +3 -2
- package/dist/themes/slate/theme.css +1 -1
- package/dist/types/global.d.ts +1 -1
- package/dist/utilities/helpers.d.ts +1 -0
- package/dist/utilities/helpers.js +3 -0
- package/dist/utilities/scroll/lock.d.ts +1 -0
- package/dist/utilities/scroll/lock.js +3 -3
- package/dist/utilities/scroll/lockSafari.d.ts +1 -1
- package/dist/utilities/scroll/lockSafari.js +4 -5
- package/dist/utilities/scroll/lockStandard.d.ts +4 -1
- package/dist/utilities/scroll/lockStandard.js +7 -2
- package/dist/utilities/storybook/Example.js +1 -2
- package/package.json +22 -21
- package/dist/components/Theme/tests/Theme.stories.d.ts +0 -13
- package/dist/components/Theme/tests/Theme.stories.js +0 -80
- package/dist/utilities/storybook/Example.module.css +0 -1
@@ -9,34 +9,53 @@ export default {
|
|
9
9
|
},
|
10
10
|
},
|
11
11
|
};
|
12
|
-
export const padding =
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
12
|
+
export const padding = {
|
13
|
+
name: "padding",
|
14
|
+
render: () => (<Example>
|
15
|
+
<Example.Item title="padding: default">
|
16
|
+
<Container>
|
17
|
+
<Placeholder />
|
18
|
+
</Container>
|
19
|
+
</Example.Item>
|
20
|
+
<Example.Item title="padding: 0">
|
21
|
+
<Container padding={0}>
|
22
|
+
<Placeholder />
|
23
|
+
</Container>
|
24
|
+
</Example.Item>
|
25
|
+
</Example>),
|
26
|
+
};
|
27
|
+
export const size = {
|
28
|
+
name: "width, height, maxHeight",
|
29
|
+
render: () => (<Example>
|
30
|
+
<Example.Item title="width: 200px, height: 200px">
|
31
|
+
<Container width="200px" height="200px">
|
32
|
+
<Placeholder h="100%"/>
|
33
|
+
</Container>
|
34
|
+
</Example.Item>
|
35
|
+
<Example.Item title="width: 200px, height: 200px, maxHeight: 100px">
|
36
|
+
<Container width="200px" height="200px" maxHeight="100px">
|
37
|
+
<Placeholder h="100%"/>
|
38
|
+
</Container>
|
39
|
+
</Example.Item>
|
40
|
+
<Example.Item title="width, height: [s] 100px, [m+] 200px">
|
41
|
+
<Container width={{ s: "100px", m: "200px" }} height={{ s: "100px", m: "200px" }}>
|
42
|
+
<Placeholder h="100%"/>
|
43
|
+
</Container>
|
44
|
+
</Example.Item>
|
45
|
+
<Example.Item title="width, height: [s] 100px, [m+] 200px, maxHeight: [s] 50px, [m+]: 100px">
|
46
|
+
<Container width={{ s: "100px", m: "200px" }} height={{ s: "100px", m: "200px" }} maxHeight={{ s: "50px", m: "100px" }}>
|
47
|
+
<Placeholder h="100%"/>
|
48
|
+
</Container>
|
49
|
+
</Example.Item>
|
50
|
+
</Example>),
|
51
|
+
};
|
52
|
+
export const flex = {
|
53
|
+
name: "align, justify",
|
54
|
+
render: () => (<Example>
|
55
|
+
<Example.Item title="align: center, justify: center">
|
56
|
+
<Container align="center" justify="center" height="200px">
|
57
|
+
<Placeholder />
|
58
|
+
</Container>
|
59
|
+
</Example.Item>
|
60
|
+
</Example>),
|
61
|
+
};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
2
|
+
declare const _default: {
|
3
|
+
title: string;
|
4
|
+
component: (props: import("./..").ContainerProps) => import("react").JSX.Element;
|
5
|
+
parameters: {
|
6
|
+
iframe: {
|
7
|
+
url: string;
|
8
|
+
};
|
9
|
+
chromatic: {
|
10
|
+
disableSnapshot: boolean;
|
11
|
+
};
|
12
|
+
};
|
13
|
+
};
|
14
|
+
export default _default;
|
15
|
+
export declare const className: StoryObj;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { expect } from "@storybook/test";
|
2
|
+
import Container from "../index.js";
|
3
|
+
import { Placeholder } from "../../../utilities/storybook/index.js";
|
4
|
+
export default {
|
5
|
+
title: "Utilities/Container/tests",
|
6
|
+
component: Container,
|
7
|
+
parameters: {
|
8
|
+
iframe: {
|
9
|
+
url: "https://reshaped.so/docs/components/action-bar",
|
10
|
+
},
|
11
|
+
chromatic: { disableSnapshot: true },
|
12
|
+
},
|
13
|
+
};
|
14
|
+
export const className = {
|
15
|
+
name: "className, attributes",
|
16
|
+
render: () => (<div data-testid="root">
|
17
|
+
<Container className="test-classname" attributes={{ id: "test-id" }}>
|
18
|
+
<Placeholder />
|
19
|
+
</Container>
|
20
|
+
</div>),
|
21
|
+
play: async ({ canvas }) => {
|
22
|
+
const root = canvas.getByTestId("root").firstChild;
|
23
|
+
expect(root).toHaveClass("test-classname");
|
24
|
+
expect(root).toHaveAttribute("id", "test-id");
|
25
|
+
},
|
26
|
+
};
|
@@ -4,29 +4,33 @@ import React from "react";
|
|
4
4
|
import DropdownMenu from "../DropdownMenu/index.js";
|
5
5
|
import useScrollLock from "../../hooks/useScrollLock.js";
|
6
6
|
import s from "./ContextMenu.module.css";
|
7
|
+
import useHandlerRef from "../../hooks/useHandlerRef.js";
|
7
8
|
const ContextMenu = (props) => {
|
8
|
-
const { position = "end-top", ...dropdownMenuProps } = props;
|
9
|
+
const { position = "end-top", onOpen, onClose, ...dropdownMenuProps } = props;
|
9
10
|
const [coordinates, setCoordinates] = React.useState();
|
10
|
-
const
|
11
|
-
const { lockScroll, unlockScroll } = useScrollLock({
|
11
|
+
const originRef = React.useRef(null);
|
12
|
+
const { lockScroll, unlockScroll } = useScrollLock({ originRef });
|
13
|
+
const onOpenRef = useHandlerRef(onOpen);
|
12
14
|
React.useEffect(() => {
|
13
|
-
const
|
14
|
-
if (!
|
15
|
+
const originEl = originRef.current;
|
16
|
+
if (!originEl)
|
15
17
|
return;
|
16
18
|
const handleContextMenu = (e) => {
|
17
19
|
e.preventDefault();
|
18
20
|
setCoordinates({ x: e.clientX, y: e.clientY });
|
19
21
|
lockScroll();
|
22
|
+
onOpenRef.current?.();
|
20
23
|
};
|
21
|
-
|
22
|
-
return () =>
|
23
|
-
}, [lockScroll]);
|
24
|
+
originEl.addEventListener("contextmenu", handleContextMenu);
|
25
|
+
return () => originEl.removeEventListener("contextmenu", handleContextMenu);
|
26
|
+
}, [lockScroll, onOpenRef]);
|
24
27
|
React.useEffect(() => {
|
25
28
|
return () => unlockScroll();
|
26
29
|
}, [unlockScroll]);
|
27
|
-
return (_jsx("div", { className: s.root, ref:
|
30
|
+
return (_jsx("div", { className: s.root, ref: originRef, children: _jsx(DropdownMenu, { ...dropdownMenuProps, position: position, originCoordinates: coordinates, active: !!coordinates, onClose: () => {
|
28
31
|
setCoordinates(undefined);
|
29
32
|
unlockScroll();
|
33
|
+
onClose?.();
|
30
34
|
} }) }));
|
31
35
|
};
|
32
36
|
ContextMenu.Content = DropdownMenu.Content;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { Example } from "../../../utilities/storybook/index.js";
|
2
2
|
import ContextMenu from "../index.js";
|
3
3
|
import View from "../../View/index.js";
|
4
|
-
import ScrollArea from "../../ScrollArea/index.js";
|
5
4
|
export default {
|
6
5
|
title: "Components/ContextMenu",
|
7
6
|
component: ContextMenu,
|
@@ -13,7 +12,7 @@ export default {
|
|
13
12
|
};
|
14
13
|
export const base = () => (<Example>
|
15
14
|
<Example.Item title="base">
|
16
|
-
<
|
15
|
+
<div style={{ height: 200, overflow: "auto" }}>
|
17
16
|
<ContextMenu>
|
18
17
|
<View height="400px" backgroundColor="neutral-faded" borderRadius="medium"/>
|
19
18
|
|
@@ -22,6 +21,6 @@ export const base = () => (<Example>
|
|
22
21
|
<ContextMenu.Item>Item 2</ContextMenu.Item>
|
23
22
|
</ContextMenu.Content>
|
24
23
|
</ContextMenu>
|
25
|
-
</
|
24
|
+
</div>
|
26
25
|
</Example.Item>
|
27
26
|
</Example>);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
2
|
+
import { fn } from "@storybook/test";
|
3
|
+
declare const _default: {
|
4
|
+
title: string;
|
5
|
+
component: {
|
6
|
+
(props: import("./..").ContextMenuProps): import("react").JSX.Element;
|
7
|
+
Content: (props: import("../../DropdownMenu/DropdownMenu.types").ContentProps) => import("react").JSX.Element;
|
8
|
+
Item: (props: import("../../DropdownMenu/DropdownMenu.types").ItemProps) => import("react").JSX.Element;
|
9
|
+
Section: (props: import("../../DropdownMenu/DropdownMenu.types").SectionProps) => import("react").JSX.Element;
|
10
|
+
SubMenu: (props: import("../../DropdownMenu/DropdownMenu.types").SubMenuProps) => import("react").JSX.Element;
|
11
|
+
SubTrigger: (props: import("../../DropdownMenu/DropdownMenu.types").SubTriggerProps) => import("react").JSX.Element;
|
12
|
+
};
|
13
|
+
parameters: {
|
14
|
+
iframe: {
|
15
|
+
url: string;
|
16
|
+
};
|
17
|
+
chromatic: {
|
18
|
+
disableSnapshot: boolean;
|
19
|
+
};
|
20
|
+
};
|
21
|
+
};
|
22
|
+
export default _default;
|
23
|
+
export declare const handlers: StoryObj<{
|
24
|
+
handleOpen: ReturnType<typeof fn>;
|
25
|
+
handleClose: ReturnType<typeof fn>;
|
26
|
+
}>;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { expect, fn, userEvent, waitFor, within } from "@storybook/test";
|
2
|
+
import ContextMenu from "../index.js";
|
3
|
+
import View from "../../View/index.js";
|
4
|
+
import { sleep } from "../../../utilities/helpers.js";
|
5
|
+
export default {
|
6
|
+
title: "Components/ContextMenu/tests",
|
7
|
+
component: ContextMenu,
|
8
|
+
parameters: {
|
9
|
+
iframe: {
|
10
|
+
url: "https://reshaped.so/docs/components/context-menu",
|
11
|
+
},
|
12
|
+
chromatic: { disableSnapshot: true },
|
13
|
+
},
|
14
|
+
};
|
15
|
+
export const handlers = {
|
16
|
+
name: "handleOpen, handleClose",
|
17
|
+
args: {
|
18
|
+
handleOpen: fn(),
|
19
|
+
handleClose: fn(),
|
20
|
+
},
|
21
|
+
render: (args) => (<div style={{ height: 200, overflow: "auto" }} data-testid="scroll">
|
22
|
+
<ContextMenu onOpen={args.handleOpen} onClose={args.handleClose}>
|
23
|
+
<View height="400px" backgroundColor="neutral-faded" borderRadius="medium" attributes={{ "data-testid": "root" }}/>
|
24
|
+
|
25
|
+
<ContextMenu.Content>
|
26
|
+
<ContextMenu.Item>Item</ContextMenu.Item>
|
27
|
+
</ContextMenu.Content>
|
28
|
+
</ContextMenu>
|
29
|
+
</div>),
|
30
|
+
play: async ({ canvasElement, args }) => {
|
31
|
+
const canvas = within(canvasElement.ownerDocument.body);
|
32
|
+
const root = canvas.getByTestId("root");
|
33
|
+
const scroll = canvas.getByTestId("scroll");
|
34
|
+
await userEvent.pointer({ keys: "[MouseRight>]", target: root });
|
35
|
+
expect(args.handleOpen).toHaveBeenCalledTimes(1);
|
36
|
+
expect(args.handleOpen).toHaveBeenCalledWith();
|
37
|
+
const item = canvas.getByText("Item");
|
38
|
+
expect(item).toBeInTheDocument();
|
39
|
+
// Context menu locks the scroll of the closest scrollable parent
|
40
|
+
expect(scroll).toHaveStyle("overflow: hidden");
|
41
|
+
// Wait for the open animation to finish
|
42
|
+
await sleep(500);
|
43
|
+
await userEvent.click(root);
|
44
|
+
expect(args.handleClose).toHaveBeenCalledTimes(1);
|
45
|
+
expect(args.handleClose).toHaveBeenCalledWith();
|
46
|
+
await waitFor(() => {
|
47
|
+
expect(item).not.toBeInTheDocument();
|
48
|
+
expect(scroll).not.toHaveStyle("overflow: hidden");
|
49
|
+
}, {
|
50
|
+
timeout: 1000,
|
51
|
+
});
|
52
|
+
},
|
53
|
+
};
|
@@ -7,6 +7,6 @@ const Dismissible = (props) => {
|
|
7
7
|
const { children, align, onClose, hideCloseButton, variant, closeAriaLabel, className, attributes, } = props;
|
8
8
|
const rootClassNames = classNames(s.root, className, variant && s[`--variant-${variant}`], align && s[`--align-${align}`], hideCloseButton && s["--hide-close"]);
|
9
9
|
const WrapperTag = variant === "media" ? "div" : Button.Aligner;
|
10
|
-
return (_jsxs("div", { ...attributes, className: rootClassNames, children: [children, !hideCloseButton && (_jsx(WrapperTag, { className: s.close, children: _jsx(Button, { size: "small", ...(variant === "media" ? { color: "media", variant: "faded" } : { variant: "ghost" }), onClick: onClose, attributes: { "aria-label": onClose ? closeAriaLabel : undefined }, icon: IconClose }) }))] }));
|
10
|
+
return (_jsxs("div", { ...attributes, className: rootClassNames, children: [children, !hideCloseButton && (_jsx(WrapperTag, { className: s.close, children: _jsx(Button, { size: "small", ...(variant === "media" ? { color: "media", variant: "faded" } : { variant: "ghost" }), onClick: () => onClose?.(), attributes: { "aria-label": onClose ? closeAriaLabel : undefined }, icon: IconClose }) }))] }));
|
11
11
|
};
|
12
12
|
export default Dismissible;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
1
2
|
declare const _default: {
|
2
3
|
title: string;
|
3
4
|
components: (props: import("./..").DismissibleProps) => import("react").JSX.Element;
|
@@ -8,6 +9,12 @@ declare const _default: {
|
|
8
9
|
};
|
9
10
|
};
|
10
11
|
export default _default;
|
11
|
-
export declare const variant:
|
12
|
-
|
13
|
-
|
12
|
+
export declare const variant: {
|
13
|
+
name: string;
|
14
|
+
render: () => import("react").JSX.Element;
|
15
|
+
};
|
16
|
+
export declare const align: {
|
17
|
+
name: string;
|
18
|
+
render: () => import("react").JSX.Element;
|
19
|
+
};
|
20
|
+
export declare const hideCloseButton: StoryObj;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { within, expect } from "@storybook/test";
|
1
2
|
import { Example, Placeholder } from "../../../utilities/storybook/index.js";
|
2
3
|
import Dismissible from "../index.js";
|
3
4
|
import Image from "../../Image/index.js";
|
@@ -11,41 +12,57 @@ export default {
|
|
11
12
|
},
|
12
13
|
},
|
13
14
|
};
|
14
|
-
export const variant =
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
15
|
+
export const variant = {
|
16
|
+
name: "variant",
|
17
|
+
render: () => (<Example>
|
18
|
+
<Example.Item title="variant: default">
|
19
|
+
<Dismissible closeAriaLabel="Close banner" onClose={() => { }}>
|
20
|
+
<Placeholder />
|
21
|
+
</Dismissible>
|
22
|
+
</Example.Item>
|
23
|
+
<Example.Item title="variant: media">
|
24
|
+
<View width="300px">
|
25
|
+
<Dismissible variant="media" closeAriaLabel="Close banner" onClose={() => { }}>
|
26
|
+
<View aspectRatio={16 / 9}>
|
27
|
+
<Image height="100%" src="https://images.unsplash.com/photo-1607030529528-ca6923e27f77?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1867&q=80)"/>
|
28
|
+
</View>
|
29
|
+
</Dismissible>
|
30
|
+
</View>
|
31
|
+
</Example.Item>
|
32
|
+
</Example>),
|
33
|
+
};
|
34
|
+
export const align = {
|
35
|
+
name: "align",
|
36
|
+
render: () => (<Example>
|
37
|
+
<Example.Item title="align: center">
|
38
|
+
<Dismissible align="center" closeAriaLabel="Close" onClose={() => { }}>
|
39
|
+
<Placeholder />
|
40
|
+
</Dismissible>
|
41
|
+
</Example.Item>
|
42
|
+
|
43
|
+
<Example.Item title="align: center, variant: media">
|
44
|
+
<Dismissible align="center" closeAriaLabel="Close" variant="media" onClose={() => { }}>
|
23
45
|
<View aspectRatio={16 / 9}>
|
24
46
|
<Image height="100%" src="https://images.unsplash.com/photo-1607030529528-ca6923e27f77?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1867&q=80)"/>
|
25
47
|
</View>
|
26
48
|
</Dismissible>
|
27
|
-
</
|
28
|
-
</Example
|
29
|
-
|
30
|
-
export const
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<Dismissible hideCloseButton>
|
48
|
-
<Placeholder />
|
49
|
-
</Dismissible>
|
50
|
-
</Example.Item>
|
51
|
-
</Example>);
|
49
|
+
</Example.Item>
|
50
|
+
</Example>),
|
51
|
+
};
|
52
|
+
export const hideCloseButton = {
|
53
|
+
name: "hideCloseButton",
|
54
|
+
render: () => (<Example>
|
55
|
+
<Example.Item title="hide close button">
|
56
|
+
<div id="root">
|
57
|
+
<Dismissible hideCloseButton>
|
58
|
+
<Placeholder />
|
59
|
+
</Dismissible>
|
60
|
+
</div>
|
61
|
+
</Example.Item>
|
62
|
+
</Example>),
|
63
|
+
play: ({ canvasElement }) => {
|
64
|
+
const root = within(canvasElement.querySelector("#root"));
|
65
|
+
const button = root.queryByRole("button");
|
66
|
+
expect(button).not.toBeInTheDocument();
|
67
|
+
},
|
68
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
2
|
+
import { fn } from "@storybook/test";
|
3
|
+
declare const _default: {
|
4
|
+
title: string;
|
5
|
+
component: (props: import("./..").DismissibleProps) => import("react").JSX.Element;
|
6
|
+
parameters: {
|
7
|
+
iframe: {
|
8
|
+
url: string;
|
9
|
+
};
|
10
|
+
chromatic: {
|
11
|
+
disableSnapshot: boolean;
|
12
|
+
};
|
13
|
+
};
|
14
|
+
};
|
15
|
+
export default _default;
|
16
|
+
export declare const closeAriaLabel: StoryObj<{
|
17
|
+
handleClose: ReturnType<typeof fn>;
|
18
|
+
}>;
|
19
|
+
export declare const className: StoryObj;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { expect, fn, userEvent } from "@storybook/test";
|
2
|
+
import Dismissible from "../index.js";
|
3
|
+
import { Placeholder } from "../../../utilities/storybook/index.js";
|
4
|
+
export default {
|
5
|
+
title: "Utilities/Dismissible/tests",
|
6
|
+
component: Dismissible,
|
7
|
+
parameters: {
|
8
|
+
iframe: {
|
9
|
+
url: "https://reshaped.so/docs/components/action-bar",
|
10
|
+
},
|
11
|
+
chromatic: { disableSnapshot: true },
|
12
|
+
},
|
13
|
+
};
|
14
|
+
export const closeAriaLabel = {
|
15
|
+
args: {
|
16
|
+
handleClose: fn(),
|
17
|
+
},
|
18
|
+
name: "onClose, closeAriaLabel",
|
19
|
+
render: (args) => (<Dismissible closeAriaLabel="Close" onClose={args.handleClose}>
|
20
|
+
<Placeholder />
|
21
|
+
</Dismissible>),
|
22
|
+
play: async ({ canvas, args }) => {
|
23
|
+
const button = canvas.getAllByRole("button")[0];
|
24
|
+
await userEvent.click(button);
|
25
|
+
expect(button).toHaveAttribute("aria-label", "Close");
|
26
|
+
expect(args.handleClose).toHaveBeenCalledTimes(1);
|
27
|
+
expect(args.handleClose).toHaveBeenCalledWith();
|
28
|
+
},
|
29
|
+
};
|
30
|
+
export const className = {
|
31
|
+
name: "className, attributes",
|
32
|
+
render: () => (<div data-testid="root">
|
33
|
+
<Dismissible closeAriaLabel="Close" onClose={() => { }} className="test-classname" attributes={{ id: "test-id" }}>
|
34
|
+
<Placeholder />
|
35
|
+
</Dismissible>
|
36
|
+
</div>),
|
37
|
+
play: async ({ canvas }) => {
|
38
|
+
const root = canvas.getByTestId("root").firstChild;
|
39
|
+
expect(root).toHaveClass("test-classname");
|
40
|
+
expect(root).toHaveAttribute("id", "test-id");
|
41
|
+
},
|
42
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
2
|
+
declare const _default: {
|
3
|
+
title: string;
|
4
|
+
component: (props: import("./..").DividerProps) => import("react").JSX.Element;
|
5
|
+
parameters: {
|
6
|
+
iframe: {
|
7
|
+
url: string;
|
8
|
+
};
|
9
|
+
chromatic: {
|
10
|
+
disableSnapshot: boolean;
|
11
|
+
};
|
12
|
+
};
|
13
|
+
};
|
14
|
+
export default _default;
|
15
|
+
export declare const horizontal: StoryObj;
|
16
|
+
export declare const vertical: StoryObj;
|
17
|
+
export declare const responsive: StoryObj;
|
18
|
+
export declare const className: StoryObj;
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { expect } from "@storybook/test";
|
2
|
+
import Divider from "../index.js";
|
3
|
+
export default {
|
4
|
+
title: "Components/Divider/tests",
|
5
|
+
component: Divider,
|
6
|
+
parameters: {
|
7
|
+
iframe: {
|
8
|
+
url: "https://reshaped.so/docs/components/divider",
|
9
|
+
},
|
10
|
+
chromatic: { disableSnapshot: true },
|
11
|
+
},
|
12
|
+
};
|
13
|
+
export const horizontal = {
|
14
|
+
name: "orientation, horizontal",
|
15
|
+
render: () => <Divider />,
|
16
|
+
play: async ({ canvas }) => {
|
17
|
+
const el = canvas.getByRole("separator");
|
18
|
+
expect(el).toHaveAttribute("aria-orientation", "horizontal");
|
19
|
+
},
|
20
|
+
};
|
21
|
+
export const vertical = {
|
22
|
+
name: "orientation, vertical",
|
23
|
+
render: () => <Divider vertical/>,
|
24
|
+
play: async ({ canvas }) => {
|
25
|
+
const el = canvas.getByRole("separator");
|
26
|
+
expect(el).toHaveAttribute("aria-orientation", "vertical");
|
27
|
+
},
|
28
|
+
};
|
29
|
+
export const responsive = {
|
30
|
+
name: "orientation, responsive",
|
31
|
+
render: () => <Divider vertical={{ s: true, l: false }}/>,
|
32
|
+
play: async ({ canvas }) => {
|
33
|
+
const el = canvas.getByRole("separator");
|
34
|
+
expect(el).not.toHaveAttribute("aria-orientation");
|
35
|
+
},
|
36
|
+
};
|
37
|
+
export const className = {
|
38
|
+
name: "className, attributes",
|
39
|
+
render: () => (<div data-testid="root">
|
40
|
+
<Divider className="test-classname" attributes={{ id: "test-id" }}/>
|
41
|
+
</div>),
|
42
|
+
play: async ({ canvas }) => {
|
43
|
+
const root = canvas.getByTestId("root").firstChild;
|
44
|
+
expect(root).toHaveClass("test-classname");
|
45
|
+
expect(root).toHaveAttribute("id", "test-id");
|
46
|
+
},
|
47
|
+
};
|
@@ -49,7 +49,7 @@ const DropdownMenuItem = (props) => {
|
|
49
49
|
};
|
50
50
|
const DropdownMenuSubMenu = (props) => {
|
51
51
|
const { children } = props;
|
52
|
-
const dropdownMenuRef = React.useRef();
|
52
|
+
const dropdownMenuRef = React.useRef(null);
|
53
53
|
return (_jsx(DropdownMenuSubContext.Provider, { value: dropdownMenuRef, children: _jsx(DropdownMenu, { triggerType: "hover", position: "end-top", contentGap: 0.5, instanceRef: dropdownMenuRef, children: children }) }));
|
54
54
|
};
|
55
55
|
const DropdownMenuSubTriggerItem = (props) => {
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
2
|
+
import { fn } from "@storybook/test";
|
3
|
+
declare const _default: {
|
4
|
+
title: string;
|
5
|
+
component: {
|
6
|
+
(props: import("./..").DropdownMenuProps): import("react").JSX.Element;
|
7
|
+
Dismissible: (props: import("../../Dismissible").DismissibleProps) => import("react").JSX.Element;
|
8
|
+
Trigger: (props: import("../../_private/Flyout").FlyoutTriggerProps) => import("react").JSX.Element;
|
9
|
+
Content: (props: import("../DropdownMenu.types").ContentProps) => import("react").JSX.Element;
|
10
|
+
Section: (props: import("../DropdownMenu.types").SectionProps) => import("react").JSX.Element;
|
11
|
+
Item: (props: import("../DropdownMenu.types").ItemProps) => import("react").JSX.Element;
|
12
|
+
SubMenu: (props: import("../DropdownMenu.types").SubMenuProps) => import("react").JSX.Element;
|
13
|
+
SubTrigger: (props: import("../DropdownMenu.types").SubTriggerProps) => import("react").JSX.Element;
|
14
|
+
};
|
15
|
+
parameters: {
|
16
|
+
iframe: {
|
17
|
+
url: string;
|
18
|
+
};
|
19
|
+
chromatic: {
|
20
|
+
disableSnapshot: boolean;
|
21
|
+
};
|
22
|
+
};
|
23
|
+
};
|
24
|
+
export default _default;
|
25
|
+
export declare const defaultActive: StoryObj<{
|
26
|
+
handleOpen: ReturnType<typeof fn>;
|
27
|
+
handleClose: ReturnType<typeof fn>;
|
28
|
+
}>;
|
29
|
+
export declare const active: StoryObj<{
|
30
|
+
handleOpen: ReturnType<typeof fn>;
|
31
|
+
handleClose: ReturnType<typeof fn>;
|
32
|
+
}>;
|
33
|
+
export declare const activeFalse: StoryObj<{
|
34
|
+
handleOpen: ReturnType<typeof fn>;
|
35
|
+
handleClose: ReturnType<typeof fn>;
|
36
|
+
}>;
|
37
|
+
export declare const className: StoryObj;
|