reshaped 2.11.12 → 3.0.1
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 +60 -0
- package/bin/cli.js +1 -1
- package/dist/bundle.css +1 -0
- package/dist/bundle.js +27 -0
- package/dist/cjs/cli/theming/index.js +38 -0
- package/dist/cjs/cli/theming/reshaped.config.d.ts +3 -0
- package/dist/cjs/cli/theming/reshaped.config.js +26 -0
- package/dist/cjs/config/tailwind.d.ts +2 -0
- package/dist/cjs/themes/_generator/constants.d.ts +2 -0
- package/dist/cjs/themes/_generator/definitions/figma.d.ts +3 -0
- package/dist/cjs/themes/_generator/definitions/figma.js +187 -0
- package/dist/cjs/themes/_generator/definitions/reshaped.d.ts +3 -0
- package/dist/cjs/themes/_generator/definitions/reshaped.js +197 -0
- package/dist/cjs/themes/_generator/definitions/slate.d.ts +3 -0
- package/dist/cjs/themes/_generator/definitions/slate.js +13 -0
- package/dist/cjs/themes/_generator/tokens/color/color.types.d.ts +7 -0
- package/dist/cjs/themes/_generator/tokens/font/font.transforms.js +37 -0
- package/dist/cjs/themes/_generator/tokens/fontWeight/fontWeight.types.d.ts +4 -0
- package/dist/cjs/themes/_generator/tokens/radius/radius.transforms.d.ts +4 -0
- package/dist/cjs/themes/_generator/tokens/radius/radius.transforms.js +11 -0
- package/dist/cjs/themes/_generator/tokens/radius/radius.types.d.ts +4 -0
- package/dist/cjs/themes/_generator/tokens/transforms.d.ts +12 -0
- package/dist/cjs/themes/_generator/tokens/transforms.js +28 -0
- package/dist/cjs/themes/_generator/tokens/types.d.ts +55 -0
- package/dist/cjs/themes/_generator/tokens/unit/unit.types.d.ts +5 -0
- package/dist/cjs/themes/_generator/transform.js +61 -0
- package/dist/cjs/themes/_generator/types.d.ts +19 -0
- package/dist/cjs/themes/_generator/utilities/color.d.ts +89 -0
- package/dist/cjs/themes/_generator/utilities/color.js +359 -0
- package/dist/cjs/themes/_generator/utilities/generateBackgroundColors.js +57 -0
- package/dist/cjs/themes/_generator/utilities/generateColors.d.ts +11 -0
- package/dist/cjs/themes/_generator/utilities/generateColors.js +177 -0
- package/dist/cjs/themes/_generator/utilities/generateUnits.js +16 -0
- package/dist/cjs/themes/_generator/utilities/mergeDefinitions.js +17 -0
- package/dist/cjs/themes/_generator/utilities/tests/color.test.js +49 -0
- package/dist/cjs/themes/figma/theme.css +1 -0
- package/dist/cjs/themes/index.d.ts +12 -0
- package/dist/cjs/themes/reshaped/theme.css +1 -0
- package/dist/cjs/themes/slate/theme.css +1 -0
- package/dist/cjs/types/config.d.ts +14 -0
- package/dist/cjs/types/config.js +2 -0
- package/dist/cli/theming/index.d.ts +4 -0
- package/dist/cli/theming/index.js +30 -0
- package/dist/cli/theming/reshaped.config.d.ts +3 -0
- package/dist/cli/theming/reshaped.config.js +21 -0
- package/dist/components/Accordion/Accordion.js +14 -0
- package/dist/components/Accordion/Accordion.types.d.ts +39 -0
- package/dist/components/Accordion/AccordionControlled.js +23 -0
- package/dist/components/Accordion/AccordionTrigger.js +24 -0
- package/dist/components/Accordion/AccordionUncontrolled.js +14 -0
- package/dist/components/ActionBar/ActionBar.types.d.ts +10 -0
- package/dist/components/Actionable/Actionable.js +54 -0
- package/dist/components/Actionable/Actionable.types.d.ts +18 -0
- package/dist/components/Alert/Alert.js +25 -0
- package/dist/components/Alert/Alert.module.css +1 -0
- package/dist/components/Alert/Alert.types.d.ts +14 -0
- package/dist/components/Alert/tests/Alert.stories.js +99 -0
- package/dist/components/Autocomplete/Autocomplete.js +72 -0
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +17 -0
- package/dist/components/Avatar/Avatar.js +29 -0
- package/dist/components/Avatar/Avatar.types.d.ts +30 -0
- package/dist/components/Badge/Badge.d.ts +3 -0
- package/dist/components/Badge/Badge.js +24 -0
- package/dist/components/Badge/Badge.module.css +1 -0
- package/dist/components/Badge/Badge.types.d.ts +42 -0
- package/dist/components/Badge/BadgeContainer.js +9 -0
- package/dist/components/Badge/tests/Badge.stories.d.ts +19 -0
- package/dist/components/Badge/tests/Badge.stories.js +247 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +42 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +14 -0
- package/dist/components/Button/Button.js +34 -0
- package/dist/components/Button/Button.module.css +1 -0
- package/dist/components/Button/Button.types.d.ts +33 -0
- package/dist/components/Button/ButtonAligner.js +7 -0
- package/dist/components/Button/ButtonGroup.js +9 -0
- package/dist/components/Button/tests/Button.stories.js +614 -0
- package/dist/components/Calendar/Calendar.js +9 -0
- package/dist/components/Calendar/Calendar.module.css +1 -0
- package/dist/components/Calendar/Calendar.utils.js +110 -0
- package/dist/components/Calendar/CalendarControlled.js +68 -0
- package/dist/components/Calendar/CalendarControls.js +46 -0
- package/dist/components/Calendar/CalendarDate.js +57 -0
- package/dist/components/Calendar/CalendarMonth.js +50 -0
- package/dist/components/Calendar/CalendarUncontrolled.js +19 -0
- package/dist/components/Calendar/CalendarYear.js +43 -0
- package/dist/components/Calendar/useCalendarKeyboardNavigation.js +66 -0
- package/dist/components/Card/Card.d.ts +16 -0
- package/dist/components/Card/Card.js +35 -0
- package/dist/components/Card/Card.module.css +1 -0
- package/dist/components/Card/Card.types.d.ts +16 -0
- package/dist/components/Card/tests/Card.stories.d.ts +31 -0
- package/dist/components/Carousel/Carousel.js +67 -0
- package/dist/components/Carousel/Carousel.types.d.ts +28 -0
- package/dist/components/Carousel/CarouselControl.js +42 -0
- package/dist/components/Carousel/tests/Carousel.stories.js +127 -0
- package/dist/components/Checkbox/Checkbox.js +41 -0
- package/dist/components/Checkbox/Checkbox.module.css +1 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +26 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.js +10 -0
- package/dist/components/CheckboxGroup/CheckboxGroupUncontrolled.js +17 -0
- package/dist/components/Container/Container.js +10 -0
- package/dist/components/Container/Container.types.d.ts +9 -0
- package/dist/components/Container/tests/Container.stories.d.ts +13 -0
- package/dist/components/Container/tests/Container.stories.js +42 -0
- package/dist/components/Dismissible/Dismissible.js +12 -0
- package/dist/components/Dismissible/Dismissible.types.d.ts +20 -0
- package/dist/components/Divider/Divider.js +14 -0
- package/dist/components/Divider/Divider.types.d.ts +7 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +12 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +75 -0
- package/dist/components/FileUpload/FileUpload.js +47 -0
- package/dist/components/FileUpload/FileUpload.types.d.ts +13 -0
- package/dist/components/FormControl/FormControl.context.d.ts +278 -0
- package/dist/components/FormControl/FormControl.d.ts +11 -0
- package/dist/components/FormControl/FormControlLabel.js +18 -0
- package/dist/components/FormControl/tests/FormControl.stories.d.ts +19 -0
- package/dist/components/Hidden/Hidden.js +9 -0
- package/dist/components/Hidden/Hidden.module.css +1 -0
- package/dist/components/Hidden/Hidden.types.d.ts +8 -0
- package/dist/components/Hidden/tests/Hidden.stories.d.ts +11 -0
- package/dist/components/Hidden/tests/Hidden.stories.js +36 -0
- package/dist/components/Hotkey/Hotkey.module.css +1 -0
- package/dist/components/Hotkey/Hotkey.types.d.ts +8 -0
- package/dist/components/Hotkey/tests/Hotkey.stories.js +38 -0
- package/dist/components/Icon/Icon.js +18 -0
- package/dist/components/Icon/Icon.types.d.ts +10 -0
- package/dist/components/Image/Image.js +41 -0
- package/dist/components/Image/Image.types.d.ts +17 -0
- package/dist/components/Link/Link.d.ts +6 -0
- package/dist/components/Link/Link.module.css +1 -0
- package/dist/components/Link/Link.types.d.ts +7 -0
- package/dist/components/Link/tests/Link.stories.d.ts +19 -0
- package/dist/components/Link/tests/Link.stories.js +72 -0
- package/dist/components/Loader/Loader.js +10 -0
- package/dist/components/Loader/Loader.module.css +1 -0
- package/dist/components/Loader/Loader.types.d.ts +7 -0
- package/dist/components/Loader/tests/Loader.stories.js +39 -0
- package/dist/components/MenuItem/MenuItem.js +17 -0
- package/dist/components/MenuItem/MenuItem.module.css +1 -0
- package/dist/components/MenuItem/MenuItem.types.d.ts +23 -0
- package/dist/components/MenuItem/MenuItemAligner.js +7 -0
- package/dist/components/MenuItem/tests/MenuItem.stories.js +130 -0
- package/dist/components/Modal/Modal.js +174 -0
- package/dist/components/Modal/Modal.module.css +1 -0
- package/dist/components/Modal/Modal.types.d.ts +30 -0
- package/dist/components/Modal/tests/Modal.stories.d.ts +23 -0
- package/dist/components/Modal/tests/Modal.stories.js +194 -0
- package/dist/components/Overlay/Overlay.js +106 -0
- package/dist/components/Overlay/Overlay.module.css +1 -0
- package/dist/components/Overlay/Overlay.types.d.ts +13 -0
- package/dist/components/Pagination/Pagination.js +10 -0
- package/dist/components/Pagination/Pagination.types.d.ts +52 -0
- package/dist/components/Pagination/PaginationControlled.js +48 -0
- package/dist/components/Pagination/PaginationUncontrolled.js +14 -0
- package/dist/components/PinField/PinField.js +10 -0
- package/dist/components/PinField/PinField.types.d.ts +23 -0
- package/dist/components/PinField/PinFieldControlled.js +160 -0
- package/dist/components/PinField/PinFieldUncontrolled.js +14 -0
- package/dist/components/Popover/Popover.js +18 -0
- package/dist/components/Popover/Popover.module.css +1 -0
- package/dist/components/Popover/tests/Popover.stories.js +118 -0
- package/dist/components/Progress/Progress.js +17 -0
- package/dist/components/Progress/Progress.module.css +1 -0
- package/dist/components/Progress/Progress.types.d.ts +11 -0
- package/dist/components/Progress/tests/Progress.stories.js +66 -0
- package/dist/components/Radio/Radio.js +30 -0
- package/dist/components/Radio/Radio.module.css +1 -0
- package/dist/components/Radio/Radio.types.d.ts +25 -0
- package/dist/components/RadioGroup/RadioGroup.js +10 -0
- package/dist/components/RadioGroup/RadioGroupUncontrolled.js +17 -0
- package/dist/components/Reshaped/Reshaped.css +1 -0
- package/dist/components/Reshaped/Reshaped.js +22 -0
- package/dist/components/Scrim/Scrim.js +10 -0
- package/dist/components/Scrim/Scrim.types.d.ts +11 -0
- package/dist/components/ScrollArea/ScrollArea.js +141 -0
- package/dist/components/ScrollArea/ScrollArea.module.css +1 -0
- package/dist/components/ScrollArea/ScrollArea.types.d.ts +23 -0
- package/dist/components/ScrollArea/tests/ScrollArea.stories.js +115 -0
- package/dist/components/Select/Select.js +52 -0
- package/dist/components/Select/Select.module.css +1 -0
- package/dist/components/Select/Select.types.d.ts +51 -0
- package/dist/components/Skeleton/Skeleton.types.d.ts +6 -0
- package/dist/components/Slider/Slider.js +15 -0
- package/dist/components/Slider/Slider.module.css +1 -0
- package/dist/components/Slider/Slider.types.d.ts +80 -0
- package/dist/components/Slider/Slider.utilities.js +14 -0
- package/dist/components/Slider/SliderControlled.js +203 -0
- package/dist/components/Slider/SliderUncontrolled.js +33 -0
- package/dist/components/Slider/tests/Slider.stories.js +51 -0
- package/dist/components/Stepper/Stepper.js +30 -0
- package/dist/components/Stepper/Stepper.types.d.ts +26 -0
- package/dist/components/Stepper/tests/Stepper.stories.js +86 -0
- package/dist/components/Switch/Switch.js +26 -0
- package/dist/components/Switch/Switch.module.css +1 -0
- package/dist/components/Switch/Switch.types.d.ts +26 -0
- package/dist/components/Switch/tests/Switch.stories.js +63 -0
- package/dist/components/Table/Table.js +50 -0
- package/dist/components/Table/Table.module.css +1 -0
- package/dist/components/Tabs/Tabs.js +16 -0
- package/dist/components/Tabs/Tabs.module.css +1 -0
- package/dist/components/Tabs/Tabs.types.d.ts +61 -0
- package/dist/components/Tabs/TabsContext.d.ts +23 -0
- package/dist/components/Tabs/TabsContext.js +12 -0
- package/dist/components/Tabs/TabsItem.js +63 -0
- package/dist/components/Tabs/TabsList.js +156 -0
- package/dist/components/Tabs/TabsUncontrolled.js +19 -0
- package/dist/components/Text/Text.js +27 -0
- package/dist/components/Text/Text.types.d.ts +16 -0
- package/dist/components/Text/tests/Text.stories.js +134 -0
- package/dist/components/TextArea/TextArea.js +34 -0
- package/dist/components/TextArea/TextArea.module.css +1 -0
- package/dist/components/TextArea/TextArea.types.d.ts +29 -0
- package/dist/components/TextField/TextField.js +44 -0
- package/dist/components/TextField/TextField.module.css +1 -0
- package/dist/components/TextField/TextField.types.d.ts +42 -0
- package/dist/components/Theme/Theme.context.js +16 -0
- package/dist/components/Theme/Theme.js +60 -0
- package/dist/components/Theme/Theme.types.d.ts +26 -0
- package/dist/components/Theme/useTheme.d.ts +10 -0
- package/dist/components/Theme/useTheme.js +20 -0
- package/dist/components/Timeline/Timeline.js +20 -0
- package/dist/components/Timeline/Timeline.types.d.ts +13 -0
- package/dist/components/Toast/Toast.constants.js +21 -0
- package/dist/components/Toast/Toast.js +44 -0
- package/dist/components/Toast/Toast.module.css +1 -0
- package/dist/components/Toast/Toast.types.d.ts +80 -0
- package/dist/components/Toast/ToastContainer.js +96 -0
- package/dist/components/Toast/ToastProvider.js +77 -0
- package/dist/components/Toast/ToastRegion.js +64 -0
- package/dist/components/Toast/tests/Toast.stories.js +327 -0
- package/dist/components/Tooltip/Tooltip.module.css +1 -0
- package/dist/components/Tooltip/tests/Tooltip.stories.js +85 -0
- package/dist/components/View/View.d.ts +6 -0
- package/dist/components/View/View.js +169 -0
- package/dist/components/View/tests/View.stories.d.ts +43 -0
- package/dist/components/View/tests/View.stories.js +1090 -0
- package/dist/components/_private/Aligner/Aligner.js +10 -0
- package/dist/components/_private/Aligner/Aligner.types.d.ts +9 -0
- package/dist/components/_private/Expandable/Expandable.js +44 -0
- package/dist/components/_private/Expandable/Expandable.module.css +1 -0
- package/dist/components/_private/Flyout/Flyout.context.d.ts +9 -0
- package/dist/components/_private/Flyout/Flyout.context.js +10 -0
- package/dist/components/_private/Flyout/Flyout.js +14 -0
- package/dist/components/_private/Flyout/Flyout.types.d.ts +112 -0
- package/dist/components/_private/Flyout/FlyoutContent.js +57 -0
- package/dist/components/_private/Flyout/FlyoutControlled.js +240 -0
- package/dist/components/_private/Flyout/FlyoutTrigger.js +38 -0
- package/dist/components/_private/Flyout/FlyoutUncontrolled.js +20 -0
- package/dist/components/_private/Flyout/tests/Flyout.stories.js +172 -0
- package/dist/components/_private/Flyout/useFlyout.js +198 -0
- package/dist/components/_private/HiddenInput/HiddenInput.js +9 -0
- package/dist/components/_private/Portal/Portal.js +34 -0
- package/dist/config/postcss.d.ts +28 -0
- package/dist/config/postcss.js +26 -0
- package/dist/config/tailwind.d.ts +2 -0
- package/dist/config/tailwind.js +83 -0
- package/dist/hooks/_private/useIsDismissible.js +44 -0
- package/dist/hooks/_private/useSingletonHotkeys.js +179 -0
- package/dist/hooks/tests/useHotkeys.stories.js +30 -0
- package/dist/hooks/useHotkeys.js +25 -0
- package/dist/icons/Mic.js +5 -0
- package/dist/styles/radius/radius.module.css +1 -0
- package/dist/tests/themingWithDefinition.js +5 -0
- package/dist/tests/themingWithoutDefinition.js +5 -0
- package/dist/themes/_generator/constants.d.ts +2 -0
- package/dist/themes/_generator/constants.js +8 -0
- package/dist/themes/_generator/definitions/figma.d.ts +3 -0
- package/dist/themes/_generator/definitions/figma.js +185 -0
- package/dist/themes/_generator/definitions/reshaped.d.ts +3 -0
- package/dist/themes/_generator/definitions/reshaped.js +195 -0
- package/dist/themes/_generator/definitions/slate.d.ts +3 -0
- package/dist/themes/_generator/definitions/slate.js +8 -0
- package/dist/themes/_generator/tests/themes.stories.js +248 -0
- package/dist/themes/_generator/tokens/color/color.transforms.d.ts +4 -0
- package/dist/themes/_generator/tokens/color/color.transforms.js +18 -0
- package/dist/themes/_generator/tokens/color/color.types.d.ts +7 -0
- package/dist/themes/_generator/tokens/duration/duration.transforms.d.ts +4 -0
- package/dist/themes/_generator/tokens/duration/duration.transforms.js +9 -0
- package/dist/themes/_generator/tokens/duration/duration.types.d.ts +4 -0
- package/dist/themes/_generator/tokens/duration/duration.types.js +1 -0
- package/dist/themes/_generator/tokens/easing/easing.transforms.d.ts +4 -0
- package/dist/themes/_generator/tokens/easing/easing.transforms.js +9 -0
- package/dist/themes/_generator/tokens/easing/easing.types.d.ts +7 -0
- package/dist/themes/_generator/tokens/easing/easing.types.js +1 -0
- package/dist/themes/_generator/tokens/font/font.transforms.d.ts +4 -0
- package/dist/themes/_generator/tokens/font/font.transforms.js +35 -0
- package/dist/themes/_generator/tokens/font/font.types.d.ts +10 -0
- package/dist/themes/_generator/tokens/font/font.types.js +1 -0
- package/dist/themes/_generator/tokens/fontFamily/fontFamily.transforms.d.ts +4 -0
- package/dist/themes/_generator/tokens/fontFamily/fontFamily.transforms.js +9 -0
- package/dist/themes/_generator/tokens/fontFamily/fontFamily.types.d.ts +4 -0
- package/dist/themes/_generator/tokens/fontFamily/fontFamily.types.js +1 -0
- package/dist/themes/_generator/tokens/fontWeight/fontWeight.transforms.d.ts +4 -0
- package/dist/themes/_generator/tokens/fontWeight/fontWeight.transforms.js +9 -0
- package/dist/themes/_generator/tokens/fontWeight/fontWeight.types.d.ts +4 -0
- package/dist/themes/_generator/tokens/fontWeight/fontWeight.types.js +1 -0
- package/dist/themes/_generator/tokens/radius/radius.transforms.d.ts +4 -0
- package/dist/themes/_generator/tokens/radius/radius.transforms.js +9 -0
- package/dist/themes/_generator/tokens/radius/radius.types.d.ts +4 -0
- package/dist/themes/_generator/tokens/radius/radius.types.js +1 -0
- package/dist/themes/_generator/tokens/shadow/shadow.transforms.d.ts +4 -0
- package/dist/themes/_generator/tokens/shadow/shadow.transforms.js +20 -0
- package/dist/themes/_generator/tokens/shadow/shadow.types.d.ts +13 -0
- package/dist/themes/_generator/tokens/shadow/shadow.types.js +1 -0
- package/dist/themes/_generator/tokens/transforms.d.ts +12 -0
- package/dist/themes/_generator/tokens/transforms.js +22 -0
- package/dist/themes/_generator/tokens/types.d.ts +55 -0
- package/dist/themes/_generator/tokens/types.js +1 -0
- package/dist/themes/_generator/tokens/unit/unit.transforms.d.ts +4 -0
- package/dist/themes/_generator/tokens/unit/unit.transforms.js +9 -0
- package/dist/themes/_generator/tokens/unit/unit.types.d.ts +5 -0
- package/dist/themes/_generator/tokens/unit/unit.types.js +1 -0
- package/dist/themes/_generator/tokens/viewport/viewport.transforms.d.ts +4 -0
- package/dist/themes/_generator/tokens/viewport/viewport.transforms.js +16 -0
- package/dist/themes/_generator/tokens/viewport/viewport.types.d.ts +9 -0
- package/dist/themes/_generator/tokens/viewport/viewport.types.js +1 -0
- package/dist/themes/_generator/transform.d.ts +7 -0
- package/dist/themes/_generator/transform.js +33 -0
- package/dist/themes/_generator/types.d.ts +19 -0
- package/dist/themes/_generator/types.js +1 -0
- package/dist/themes/_generator/utilities/color.d.ts +89 -0
- package/dist/themes/_generator/utilities/color.js +329 -0
- package/dist/themes/_generator/utilities/css.d.ts +6 -0
- package/dist/themes/_generator/utilities/css.js +44 -0
- package/dist/themes/_generator/utilities/generateBackgroundColors.d.ts +4 -0
- package/dist/themes/_generator/utilities/generateBackgroundColors.js +55 -0
- package/dist/themes/_generator/utilities/generateColors.d.ts +11 -0
- package/dist/themes/_generator/utilities/generateColors.js +175 -0
- package/dist/themes/_generator/utilities/generateUnits.d.ts +4 -0
- package/dist/themes/_generator/utilities/generateUnits.js +14 -0
- package/dist/themes/_generator/utilities/mergeDeep.d.ts +5 -0
- package/dist/themes/_generator/utilities/mergeDeep.js +22 -0
- package/dist/themes/_generator/utilities/mergeDefinitions.d.ts +5 -0
- package/dist/themes/_generator/utilities/mergeDefinitions.js +15 -0
- package/dist/themes/_generator/utilities/resolveTokenReference.d.ts +3 -0
- package/dist/themes/_generator/utilities/resolveTokenReference.js +14 -0
- package/dist/themes/figma/media.css +1 -0
- package/dist/themes/figma/theme.css +1 -0
- package/dist/themes/fragments/twitter/theme.css +1 -0
- package/dist/themes/index.d.ts +12 -0
- package/dist/themes/index.js +10 -0
- package/dist/themes/reshaped/media.css +1 -0
- package/dist/themes/reshaped/theme.css +1 -0
- package/dist/themes/slate/media.css +1 -0
- package/dist/themes/slate/theme.css +1 -0
- package/dist/types/config.d.ts +14 -0
- package/dist/types/config.js +1 -0
- package/dist/types/global.d.ts +29 -0
- package/dist/types/global.js +1 -0
- package/dist/utilities/Chain.js +60 -0
- package/dist/utilities/a11y/TrapFocus.js +130 -0
- package/dist/utilities/a11y/TrapScreenReader.js +40 -0
- package/dist/utilities/a11y/focus.js +89 -0
- package/dist/utilities/a11y/types.js +1 -0
- package/dist/utilities/dom.js +18 -0
- package/dist/utilities/helpers.js +138 -0
- package/dist/utilities/storybook/Example.js +14 -0
- package/dist/utilities/storybook/Placeholder.js +17 -0
- package/dist/utilities/string.d.ts +2 -0
- package/dist/utilities/string.js +6 -0
- package/package.json +41 -27
- package/bin/clean.sh +0 -3
- package/bin/release-copy.sh +0 -8
- package/bin/release-source.sh +0 -20
- package/bundle.css +0 -1
- package/bundle.js +0 -27
- package/cli/theming/index.js +0 -38
- package/cli/theming/reshaped.config.d.ts +0 -3
- package/cli/theming/reshaped.config.js +0 -25
- package/components/Accordion/Accordion.js +0 -14
- package/components/Accordion/Accordion.types.d.ts +0 -39
- package/components/Accordion/AccordionControlled.js +0 -23
- package/components/Accordion/AccordionTrigger.js +0 -24
- package/components/Accordion/AccordionUncontrolled.js +0 -25
- package/components/ActionBar/ActionBar.types.d.ts +0 -10
- package/components/Actionable/Actionable.js +0 -55
- package/components/Actionable/Actionable.types.d.ts +0 -18
- package/components/Alert/Alert.js +0 -21
- package/components/Alert/Alert.types.d.ts +0 -14
- package/components/Alert/tests/Alert.stories.js +0 -95
- package/components/Autocomplete/Autocomplete.js +0 -78
- package/components/Autocomplete/Autocomplete.types.d.ts +0 -16
- package/components/Avatar/Avatar.js +0 -29
- package/components/Avatar/Avatar.types.d.ts +0 -30
- package/components/Badge/Badge.d.ts +0 -6
- package/components/Badge/Badge.js +0 -19
- package/components/Badge/Badge.module.css +0 -1
- package/components/Badge/Badge.types.d.ts +0 -39
- package/components/Badge/BadgeContainer.js +0 -9
- package/components/Badge/tests/Badge.stories.d.ts +0 -22
- package/components/Badge/tests/Badge.stories.js +0 -242
- package/components/Breadcrumbs/Breadcrumbs.js +0 -42
- package/components/Breadcrumbs/Breadcrumbs.types.d.ts +0 -14
- package/components/Button/Button.js +0 -34
- package/components/Button/Button.module.css +0 -1
- package/components/Button/Button.types.d.ts +0 -33
- package/components/Button/ButtonAligner.js +0 -7
- package/components/Button/ButtonGroup.js +0 -9
- package/components/Button/tests/Button.stories.js +0 -646
- package/components/Calendar/Calendar.js +0 -9
- package/components/Calendar/Calendar.module.css +0 -1
- package/components/Calendar/Calendar.utils.js +0 -110
- package/components/Calendar/CalendarControlled.js +0 -69
- package/components/Calendar/CalendarControls.js +0 -46
- package/components/Calendar/CalendarDate.js +0 -57
- package/components/Calendar/CalendarMonth.js +0 -51
- package/components/Calendar/CalendarUncontrolled.js +0 -30
- package/components/Calendar/CalendarYear.js +0 -44
- package/components/Calendar/useCalendarKeyboardNavigation.js +0 -66
- package/components/Card/Card.d.ts +0 -17
- package/components/Card/Card.js +0 -30
- package/components/Card/Card.module.css +0 -1
- package/components/Card/Card.types.d.ts +0 -16
- package/components/Card/tests/Card.stories.d.ts +0 -31
- package/components/Carousel/Carousel.js +0 -64
- package/components/Carousel/Carousel.types.d.ts +0 -28
- package/components/Carousel/CarouselControl.js +0 -42
- package/components/Carousel/tests/Carousel.stories.js +0 -127
- package/components/Checkbox/Checkbox.js +0 -39
- package/components/Checkbox/Checkbox.module.css +0 -1
- package/components/Checkbox/Checkbox.types.d.ts +0 -26
- package/components/CheckboxGroup/CheckboxGroup.js +0 -10
- package/components/CheckboxGroup/CheckboxGroupUncontrolled.js +0 -17
- package/components/Container/Container.js +0 -10
- package/components/Container/Container.types.d.ts +0 -9
- package/components/Container/tests/Container.stories.d.ts +0 -12
- package/components/Container/tests/Container.stories.js +0 -35
- package/components/Dismissible/Dismissible.js +0 -12
- package/components/Dismissible/Dismissible.types.d.ts +0 -20
- package/components/Divider/Divider.js +0 -14
- package/components/Divider/Divider.types.d.ts +0 -7
- package/components/DropdownMenu/DropdownMenu.d.ts +0 -12
- package/components/DropdownMenu/DropdownMenu.js +0 -88
- package/components/FileUpload/FileUpload.js +0 -52
- package/components/FileUpload/FileUpload.types.d.ts +0 -13
- package/components/FormControl/FormControl.context.d.ts +0 -278
- package/components/FormControl/FormControl.d.ts +0 -11
- package/components/FormControl/FormControlLabel.js +0 -18
- package/components/FormControl/tests/FormControl.stories.d.ts +0 -19
- package/components/Hidden/Hidden.js +0 -11
- package/components/Hidden/Hidden.module.css +0 -1
- package/components/Hidden/Hidden.types.d.ts +0 -9
- package/components/Hidden/tests/Hidden.stories.d.ts +0 -12
- package/components/Hidden/tests/Hidden.stories.js +0 -46
- package/components/Hotkey/Hotkey.module.css +0 -1
- package/components/Hotkey/Hotkey.types.d.ts +0 -8
- package/components/Hotkey/tests/Hotkey.stories.js +0 -33
- package/components/Icon/Icon.js +0 -18
- package/components/Icon/Icon.types.d.ts +0 -10
- package/components/Image/Image.js +0 -38
- package/components/Image/Image.types.d.ts +0 -19
- package/components/Link/Link.d.ts +0 -6
- package/components/Link/Link.module.css +0 -1
- package/components/Link/Link.types.d.ts +0 -7
- package/components/Link/tests/Link.stories.d.ts +0 -19
- package/components/Link/tests/Link.stories.js +0 -69
- package/components/Loader/Loader.js +0 -10
- package/components/Loader/Loader.module.css +0 -1
- package/components/Loader/Loader.types.d.ts +0 -7
- package/components/Loader/tests/Loader.stories.js +0 -36
- package/components/MenuItem/MenuItem.js +0 -17
- package/components/MenuItem/MenuItem.module.css +0 -1
- package/components/MenuItem/MenuItem.types.d.ts +0 -23
- package/components/MenuItem/MenuItemAligner.js +0 -7
- package/components/MenuItem/tests/MenuItem.stories.js +0 -129
- package/components/Modal/Modal.js +0 -170
- package/components/Modal/Modal.module.css +0 -1
- package/components/Modal/Modal.types.d.ts +0 -29
- package/components/Modal/tests/Modal.stories.d.ts +0 -22
- package/components/Modal/tests/Modal.stories.js +0 -193
- package/components/Overlay/Overlay.js +0 -103
- package/components/Overlay/Overlay.module.css +0 -1
- package/components/Overlay/Overlay.types.d.ts +0 -12
- package/components/Pagination/Pagination.js +0 -10
- package/components/Pagination/Pagination.types.d.ts +0 -52
- package/components/Pagination/PaginationControlled.js +0 -48
- package/components/Pagination/PaginationUncontrolled.js +0 -25
- package/components/PinField/PinField.js +0 -10
- package/components/PinField/PinField.types.d.ts +0 -23
- package/components/PinField/PinFieldControlled.js +0 -161
- package/components/PinField/PinFieldUncontrolled.js +0 -25
- package/components/Popover/Popover.js +0 -19
- package/components/Popover/Popover.module.css +0 -1
- package/components/Popover/tests/Popover.stories.js +0 -126
- package/components/Progress/Progress.js +0 -17
- package/components/Progress/Progress.module.css +0 -1
- package/components/Progress/Progress.types.d.ts +0 -11
- package/components/Progress/tests/Progress.stories.js +0 -66
- package/components/Radio/Radio.js +0 -30
- package/components/Radio/Radio.module.css +0 -1
- package/components/Radio/Radio.types.d.ts +0 -25
- package/components/RadioGroup/RadioGroup.js +0 -10
- package/components/RadioGroup/RadioGroupUncontrolled.js +0 -17
- package/components/Reshaped/Reshaped.css +0 -1
- package/components/Reshaped/Reshaped.js +0 -22
- package/components/Scrim/Scrim.js +0 -10
- package/components/Scrim/Scrim.types.d.ts +0 -11
- package/components/ScrollArea/ScrollArea.js +0 -139
- package/components/ScrollArea/ScrollArea.module.css +0 -1
- package/components/ScrollArea/ScrollArea.types.d.ts +0 -23
- package/components/ScrollArea/tests/ScrollArea.stories.js +0 -115
- package/components/Select/Select.js +0 -49
- package/components/Select/Select.module.css +0 -1
- package/components/Select/Select.types.d.ts +0 -49
- package/components/Skeleton/Skeleton.types.d.ts +0 -6
- package/components/Slider/Slider.js +0 -26
- package/components/Slider/Slider.module.css +0 -1
- package/components/Slider/Slider.types.d.ts +0 -80
- package/components/Slider/Slider.utilities.js +0 -14
- package/components/Slider/SliderControlled.js +0 -209
- package/components/Slider/SliderUncontrolled.js +0 -33
- package/components/Slider/tests/Slider.stories.js +0 -52
- package/components/Stepper/Stepper.js +0 -30
- package/components/Stepper/Stepper.types.d.ts +0 -26
- package/components/Stepper/tests/Stepper.stories.js +0 -87
- package/components/Switch/Switch.js +0 -27
- package/components/Switch/Switch.module.css +0 -1
- package/components/Switch/Switch.types.d.ts +0 -26
- package/components/Switch/tests/Switch.stories.js +0 -60
- package/components/Table/Table.js +0 -45
- package/components/Table/Table.module.css +0 -1
- package/components/Tabs/Tabs.js +0 -16
- package/components/Tabs/Tabs.module.css +0 -1
- package/components/Tabs/Tabs.types.d.ts +0 -61
- package/components/Tabs/TabsContext.d.ts +0 -23
- package/components/Tabs/TabsContext.js +0 -19
- package/components/Tabs/TabsItem.js +0 -61
- package/components/Tabs/TabsList.js +0 -153
- package/components/Tabs/TabsUncontrolled.js +0 -19
- package/components/Text/Text.js +0 -24
- package/components/Text/Text.types.d.ts +0 -16
- package/components/Text/tests/Text.stories.js +0 -134
- package/components/TextArea/TextArea.js +0 -35
- package/components/TextArea/TextArea.module.css +0 -1
- package/components/TextArea/TextArea.types.d.ts +0 -29
- package/components/TextField/TextField.js +0 -45
- package/components/TextField/TextField.module.css +0 -1
- package/components/TextField/TextField.types.d.ts +0 -42
- package/components/Theme/Theme.context.js +0 -14
- package/components/Theme/Theme.js +0 -48
- package/components/Theme/Theme.types.d.ts +0 -24
- package/components/Theme/useTheme.d.ts +0 -8
- package/components/Theme/useTheme.js +0 -18
- package/components/Timeline/Timeline.js +0 -20
- package/components/Timeline/Timeline.types.d.ts +0 -13
- package/components/Toast/Toast.constants.js +0 -21
- package/components/Toast/Toast.js +0 -44
- package/components/Toast/Toast.module.css +0 -1
- package/components/Toast/Toast.types.d.ts +0 -80
- package/components/Toast/ToastContainer.js +0 -96
- package/components/Toast/ToastProvider.js +0 -85
- package/components/Toast/ToastRegion.js +0 -64
- package/components/Toast/tests/Toast.stories.js +0 -327
- package/components/Tooltip/Tooltip.module.css +0 -1
- package/components/Tooltip/tests/Tooltip.stories.js +0 -84
- package/components/View/View.d.ts +0 -6
- package/components/View/View.js +0 -152
- package/components/View/tests/View.stories.d.ts +0 -43
- package/components/View/tests/View.stories.js +0 -1090
- package/components/_private/Aligner/Aligner.js +0 -10
- package/components/_private/Aligner/Aligner.types.d.ts +0 -9
- package/components/_private/Expandable/Expandable.js +0 -27
- package/components/_private/Expandable/Expandable.module.css +0 -1
- package/components/_private/Flyout/Flyout.context.d.ts +0 -6
- package/components/_private/Flyout/Flyout.context.js +0 -6
- package/components/_private/Flyout/Flyout.js +0 -14
- package/components/_private/Flyout/Flyout.types.d.ts +0 -111
- package/components/_private/Flyout/FlyoutContent.js +0 -54
- package/components/_private/Flyout/FlyoutControlled.js +0 -238
- package/components/_private/Flyout/FlyoutTrigger.js +0 -38
- package/components/_private/Flyout/FlyoutUncontrolled.js +0 -20
- package/components/_private/Flyout/tests/Flyout.stories.js +0 -183
- package/components/_private/Flyout/useFlyout.js +0 -186
- package/components/_private/HiddenInput/HiddenInput.js +0 -9
- package/components/_private/Portal/Portal.js +0 -34
- package/config/tailwind.d.ts +0 -2
- package/hooks/_private/useIsDismissible.js +0 -45
- package/hooks/_private/useSingletonHotkeys.js +0 -183
- package/hooks/tests/useHotkeys.stories.js +0 -24
- package/hooks/useHotkeys.js +0 -25
- package/icons/Mic.js +0 -5
- package/styles/radius/radius.module.css +0 -1
- package/themes/_generator/constants.d.ts +0 -2
- package/themes/_generator/definitions/figma.d.ts +0 -3
- package/themes/_generator/definitions/figma.js +0 -186
- package/themes/_generator/definitions/reshaped.d.ts +0 -3
- package/themes/_generator/definitions/reshaped.js +0 -160
- package/themes/_generator/definitions/slate.d.ts +0 -3
- package/themes/_generator/definitions/slate.js +0 -80
- package/themes/_generator/tests/themes.stories.js +0 -180
- package/themes/_generator/tokens/color/color.types.d.ts +0 -7
- package/themes/_generator/tokens/font/font.transforms.js +0 -36
- package/themes/_generator/tokens/fontWeight/fontWeight.types.d.ts +0 -4
- package/themes/_generator/tokens/transforms.d.ts +0 -11
- package/themes/_generator/tokens/transforms.js +0 -26
- package/themes/_generator/tokens/types.d.ts +0 -52
- package/themes/_generator/tokens/unit/unit.types.d.ts +0 -7
- package/themes/_generator/transform.js +0 -62
- package/themes/_generator/types.d.ts +0 -15
- package/themes/_generator/utilities/color.d.ts +0 -90
- package/themes/_generator/utilities/color.js +0 -364
- package/themes/_generator/utilities/generateBackgroundColors.js +0 -53
- package/themes/_generator/utilities/generateColors.d.ts +0 -11
- package/themes/_generator/utilities/generateColors.js +0 -131
- package/themes/_generator/utilities/generateUnits.js +0 -17
- package/themes/_generator/utilities/mergeDefinitions.js +0 -17
- package/themes/_generator/utilities/tests/color.test.js +0 -63
- package/themes/_generator/utilities/tests/generateColors.test.js +0 -20
- package/themes/figma/theme.css +0 -1
- package/themes/index.d.ts +0 -12
- package/themes/reshaped/theme.css +0 -1
- package/themes/slate/theme.css +0 -1
- package/types/config.d.ts +0 -14
- package/types/global.d.ts +0 -29
- package/utilities/Chain.js +0 -63
- package/utilities/a11y/TrapFocus.js +0 -127
- package/utilities/a11y/TrapScreenReader.js +0 -39
- package/utilities/a11y/focus.js +0 -90
- package/utilities/dom.js +0 -18
- package/utilities/helpers.js +0 -135
- package/utilities/storybook/Example.js +0 -14
- package/utilities/storybook/Placeholder.js +0 -17
- /package/{bundle.d.ts → dist/bundle.d.ts} +0 -0
- /package/{cli → dist/cjs/cli}/theming/index.d.ts +0 -0
- /package/{config → dist/cjs/config}/postcss.d.ts +0 -0
- /package/{config → dist/cjs/config}/postcss.js +0 -0
- /package/{config → dist/cjs/config}/tailwind.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/constants.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/color/color.transforms.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/color/color.transforms.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/color/color.types.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/duration/duration.transforms.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/duration/duration.transforms.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/duration/duration.types.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/duration/duration.types.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/easing/easing.transforms.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/easing/easing.transforms.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/easing/easing.types.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/easing/easing.types.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/font/font.transforms.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/font/font.types.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/font/font.types.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/fontFamily/fontFamily.transforms.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/fontFamily/fontFamily.transforms.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/fontFamily/fontFamily.types.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/fontFamily/fontFamily.types.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/fontWeight/fontWeight.transforms.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/fontWeight/fontWeight.transforms.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/fontWeight/fontWeight.types.js +0 -0
- /package/{themes/_generator/tokens/shadow/shadow.types.js → dist/cjs/themes/_generator/tokens/radius/radius.types.js} +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/shadow/shadow.transforms.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/shadow/shadow.transforms.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/shadow/shadow.types.d.ts +0 -0
- /package/{themes/_generator/tokens/types.js → dist/cjs/themes/_generator/tokens/shadow/shadow.types.js} +0 -0
- /package/{themes/_generator → dist/cjs/themes/_generator/tokens}/types.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/unit/unit.transforms.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/unit/unit.transforms.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/unit/unit.types.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/viewport/viewport.transforms.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/viewport/viewport.transforms.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/viewport/viewport.types.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/tokens/viewport/viewport.types.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/transform.d.ts +0 -0
- /package/{types/config.js → dist/cjs/themes/_generator/types.js} +0 -0
- /package/{themes → dist/cjs/themes}/_generator/utilities/css.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/utilities/css.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/utilities/generateBackgroundColors.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/utilities/generateUnits.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/utilities/mergeDeep.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/utilities/mergeDeep.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/utilities/mergeDefinitions.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/utilities/resolveTokenReference.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/_generator/utilities/resolveTokenReference.js +0 -0
- /package/{themes → dist/cjs/themes}/_generator/utilities/tests/color.test.d.ts +0 -0
- /package/{themes → dist/cjs/themes}/figma/media.css +0 -0
- /package/{themes → dist/cjs/themes}/fragments/twitter/theme.css +0 -0
- /package/{themes → dist/cjs/themes}/index.js +0 -0
- /package/{themes → dist/cjs/themes}/reshaped/media.css +0 -0
- /package/{themes → dist/cjs/themes}/slate/media.css +0 -0
- /package/{utilities → dist/cjs/utilities}/string.d.ts +0 -0
- /package/{utilities → dist/cjs/utilities}/string.js +0 -0
- /package/{components → dist/components}/Accordion/Accordion.context.d.ts +0 -0
- /package/{components → dist/components}/Accordion/Accordion.context.js +0 -0
- /package/{components → dist/components}/Accordion/Accordion.d.ts +0 -0
- /package/{components → dist/components}/Accordion/Accordion.module.css +0 -0
- /package/{components → dist/components}/Accordion/Accordion.types.js +0 -0
- /package/{components → dist/components}/Accordion/AccordionContent.d.ts +0 -0
- /package/{components → dist/components}/Accordion/AccordionContent.js +0 -0
- /package/{components → dist/components}/Accordion/AccordionControlled.d.ts +0 -0
- /package/{components → dist/components}/Accordion/AccordionTrigger.d.ts +0 -0
- /package/{components → dist/components}/Accordion/AccordionUncontrolled.d.ts +0 -0
- /package/{components → dist/components}/Accordion/index.d.ts +0 -0
- /package/{components → dist/components}/Accordion/index.js +0 -0
- /package/{components → dist/components}/Accordion/tests/Accordion.stories.d.ts +0 -0
- /package/{components → dist/components}/Accordion/tests/Accordion.stories.js +0 -0
- /package/{components → dist/components}/ActionBar/ActionBar.d.ts +0 -0
- /package/{components → dist/components}/ActionBar/ActionBar.js +0 -0
- /package/{components → dist/components}/ActionBar/ActionBar.module.css +0 -0
- /package/{components → dist/components}/ActionBar/ActionBar.types.js +0 -0
- /package/{components → dist/components}/ActionBar/index.d.ts +0 -0
- /package/{components → dist/components}/ActionBar/index.js +0 -0
- /package/{components → dist/components}/ActionBar/tests/ActionBar.stories.d.ts +0 -0
- /package/{components → dist/components}/ActionBar/tests/ActionBar.stories.js +0 -0
- /package/{components → dist/components}/Actionable/Actionable.d.ts +0 -0
- /package/{components → dist/components}/Actionable/Actionable.module.css +0 -0
- /package/{components → dist/components}/Actionable/Actionable.types.js +0 -0
- /package/{components → dist/components}/Actionable/index.d.ts +0 -0
- /package/{components → dist/components}/Actionable/index.js +0 -0
- /package/{components → dist/components}/Actionable/tests/Actionable.stories.d.ts +0 -0
- /package/{components → dist/components}/Actionable/tests/Actionable.stories.js +0 -0
- /package/{components → dist/components}/Alert/Alert.d.ts +0 -0
- /package/{components → dist/components}/Alert/Alert.types.js +0 -0
- /package/{components → dist/components}/Alert/index.d.ts +0 -0
- /package/{components → dist/components}/Alert/index.js +0 -0
- /package/{components → dist/components}/Alert/tests/Alert.stories.d.ts +0 -0
- /package/{components → dist/components}/Autocomplete/Autocomplete.d.ts +0 -0
- /package/{components → dist/components}/Autocomplete/Autocomplete.types.js +0 -0
- /package/{components → dist/components}/Autocomplete/index.d.ts +0 -0
- /package/{components → dist/components}/Autocomplete/index.js +0 -0
- /package/{components → dist/components}/Autocomplete/tests/Autocomplete.stories.d.ts +0 -0
- /package/{components → dist/components}/Autocomplete/tests/Autocomplete.stories.js +0 -0
- /package/{components → dist/components}/Avatar/Avatar.d.ts +0 -0
- /package/{components → dist/components}/Avatar/Avatar.module.css +0 -0
- /package/{components → dist/components}/Avatar/Avatar.types.js +0 -0
- /package/{components → dist/components}/Avatar/index.d.ts +0 -0
- /package/{components → dist/components}/Avatar/index.js +0 -0
- /package/{components → dist/components}/Avatar/tests/Avatar.stories.d.ts +0 -0
- /package/{components → dist/components}/Avatar/tests/Avatar.stories.js +0 -0
- /package/{components → dist/components}/Badge/Badge.types.js +0 -0
- /package/{components → dist/components}/Badge/BadgeContainer.d.ts +0 -0
- /package/{components → dist/components}/Badge/index.d.ts +0 -0
- /package/{components → dist/components}/Badge/index.js +0 -0
- /package/{components → dist/components}/Breadcrumbs/Breadcrumbs.d.ts +0 -0
- /package/{components → dist/components}/Breadcrumbs/Breadcrumbs.types.js +0 -0
- /package/{components → dist/components}/Breadcrumbs/BreadcrumbsItem.d.ts +0 -0
- /package/{components → dist/components}/Breadcrumbs/BreadcrumbsItem.js +0 -0
- /package/{components → dist/components}/Breadcrumbs/index.d.ts +0 -0
- /package/{components → dist/components}/Breadcrumbs/index.js +0 -0
- /package/{components → dist/components}/Breadcrumbs/tests/Breadcrumbs.stories.d.ts +0 -0
- /package/{components → dist/components}/Breadcrumbs/tests/Breadcrumbs.stories.js +0 -0
- /package/{components → dist/components}/Button/Button.d.ts +0 -0
- /package/{components → dist/components}/Button/Button.types.js +0 -0
- /package/{components → dist/components}/Button/ButtonAligner.d.ts +0 -0
- /package/{components → dist/components}/Button/ButtonGroup.d.ts +0 -0
- /package/{components → dist/components}/Button/index.d.ts +0 -0
- /package/{components → dist/components}/Button/index.js +0 -0
- /package/{components → dist/components}/Button/tests/Button.stories.d.ts +0 -0
- /package/{components → dist/components}/Calendar/Calendar.d.ts +0 -0
- /package/{components → dist/components}/Calendar/Calendar.types.d.ts +0 -0
- /package/{components → dist/components}/Calendar/Calendar.types.js +0 -0
- /package/{components → dist/components}/Calendar/Calendar.utils.d.ts +0 -0
- /package/{components → dist/components}/Calendar/CalendarControlled.d.ts +0 -0
- /package/{components → dist/components}/Calendar/CalendarControls.d.ts +0 -0
- /package/{components → dist/components}/Calendar/CalendarDate.d.ts +0 -0
- /package/{components → dist/components}/Calendar/CalendarMonth.d.ts +0 -0
- /package/{components → dist/components}/Calendar/CalendarUncontrolled.d.ts +0 -0
- /package/{components → dist/components}/Calendar/CalendarYear.d.ts +0 -0
- /package/{components → dist/components}/Calendar/index.d.ts +0 -0
- /package/{components → dist/components}/Calendar/index.js +0 -0
- /package/{components → dist/components}/Calendar/tests/Calendar.stories.d.ts +0 -0
- /package/{components → dist/components}/Calendar/tests/Calendar.stories.js +0 -0
- /package/{components → dist/components}/Calendar/useCalendarKeyboardNavigation.d.ts +0 -0
- /package/{components → dist/components}/Card/Card.types.js +0 -0
- /package/{components → dist/components}/Card/index.d.ts +0 -0
- /package/{components → dist/components}/Card/index.js +0 -0
- /package/{components → dist/components}/Card/tests/Card.stories.js +0 -0
- /package/{components → dist/components}/Carousel/Carousel.d.ts +0 -0
- /package/{components → dist/components}/Carousel/Carousel.module.css +0 -0
- /package/{components → dist/components}/Carousel/Carousel.types.js +0 -0
- /package/{components → dist/components}/Carousel/CarouselControl.d.ts +0 -0
- /package/{components → dist/components}/Carousel/index.d.ts +0 -0
- /package/{components → dist/components}/Carousel/index.js +0 -0
- /package/{components → dist/components}/Carousel/tests/Carousel.stories.d.ts +0 -0
- /package/{components → dist/components}/Checkbox/Checkbox.d.ts +0 -0
- /package/{components → dist/components}/Checkbox/Checkbox.types.js +0 -0
- /package/{components → dist/components}/Checkbox/index.d.ts +0 -0
- /package/{components → dist/components}/Checkbox/index.js +0 -0
- /package/{components → dist/components}/Checkbox/tests/Checkbox.stories.d.ts +0 -0
- /package/{components → dist/components}/Checkbox/tests/Checkbox.stories.js +0 -0
- /package/{components → dist/components}/CheckboxGroup/CheckboxGroup.context.d.ts +0 -0
- /package/{components → dist/components}/CheckboxGroup/CheckboxGroup.context.js +0 -0
- /package/{components → dist/components}/CheckboxGroup/CheckboxGroup.d.ts +0 -0
- /package/{components → dist/components}/CheckboxGroup/CheckboxGroup.types.d.ts +0 -0
- /package/{components → dist/components}/CheckboxGroup/CheckboxGroup.types.js +0 -0
- /package/{components → dist/components}/CheckboxGroup/CheckboxGroupControlled.d.ts +0 -0
- /package/{components → dist/components}/CheckboxGroup/CheckboxGroupControlled.js +0 -0
- /package/{components → dist/components}/CheckboxGroup/CheckboxGroupUncontrolled.d.ts +0 -0
- /package/{components → dist/components}/CheckboxGroup/index.d.ts +0 -0
- /package/{components → dist/components}/CheckboxGroup/index.js +0 -0
- /package/{components → dist/components}/CheckboxGroup/tests/CheckboxGroup.stories.d.ts +0 -0
- /package/{components → dist/components}/CheckboxGroup/tests/CheckboxGroup.stories.js +0 -0
- /package/{components → dist/components}/Container/Container.d.ts +0 -0
- /package/{components → dist/components}/Container/Container.module.css +0 -0
- /package/{components → dist/components}/Container/Container.types.js +0 -0
- /package/{components → dist/components}/Container/index.d.ts +0 -0
- /package/{components → dist/components}/Container/index.js +0 -0
- /package/{components → dist/components}/Dismissible/Dismissible.d.ts +0 -0
- /package/{components → dist/components}/Dismissible/Dismissible.module.css +0 -0
- /package/{components → dist/components}/Dismissible/Dismissible.types.js +0 -0
- /package/{components → dist/components}/Dismissible/index.d.ts +0 -0
- /package/{components → dist/components}/Dismissible/index.js +0 -0
- /package/{components → dist/components}/Dismissible/tests/Dismissible.stories.d.ts +0 -0
- /package/{components → dist/components}/Dismissible/tests/Dismissible.stories.js +0 -0
- /package/{components → dist/components}/Divider/Divider.d.ts +0 -0
- /package/{components → dist/components}/Divider/Divider.module.css +0 -0
- /package/{components → dist/components}/Divider/Divider.types.js +0 -0
- /package/{components → dist/components}/Divider/index.d.ts +0 -0
- /package/{components → dist/components}/Divider/index.js +0 -0
- /package/{components → dist/components}/Divider/tests/Divider.stories.d.ts +0 -0
- /package/{components → dist/components}/Divider/tests/Divider.stories.js +0 -0
- /package/{components → dist/components}/DropdownMenu/DropdownMenu.module.css +0 -0
- /package/{components → dist/components}/DropdownMenu/DropdownMenu.types.d.ts +0 -0
- /package/{components → dist/components}/DropdownMenu/DropdownMenu.types.js +0 -0
- /package/{components → dist/components}/DropdownMenu/index.d.ts +0 -0
- /package/{components → dist/components}/DropdownMenu/index.js +0 -0
- /package/{components → dist/components}/DropdownMenu/tests/DropdownMenu.stories.d.ts +0 -0
- /package/{components → dist/components}/DropdownMenu/tests/DropdownMenu.stories.js +0 -0
- /package/{components → dist/components}/FileUpload/FileUpload.d.ts +0 -0
- /package/{components → dist/components}/FileUpload/FileUpload.module.css +0 -0
- /package/{components → dist/components}/FileUpload/FileUpload.types.js +0 -0
- /package/{components → dist/components}/FileUpload/index.d.ts +0 -0
- /package/{components → dist/components}/FileUpload/index.js +0 -0
- /package/{components → dist/components}/FileUpload/tests/FileUpload.stories.d.ts +0 -0
- /package/{components → dist/components}/FileUpload/tests/FileUpload.stories.js +0 -0
- /package/{components → dist/components}/FormControl/FormControl.context.js +0 -0
- /package/{components → dist/components}/FormControl/FormControl.js +0 -0
- /package/{components → dist/components}/FormControl/FormControl.module.css +0 -0
- /package/{components → dist/components}/FormControl/FormControl.types.d.ts +0 -0
- /package/{components → dist/components}/FormControl/FormControl.types.js +0 -0
- /package/{components → dist/components}/FormControl/FormControl.utilities.d.ts +0 -0
- /package/{components → dist/components}/FormControl/FormControl.utilities.js +0 -0
- /package/{components → dist/components}/FormControl/FormControlCaption.d.ts +0 -0
- /package/{components → dist/components}/FormControl/FormControlCaption.js +0 -0
- /package/{components → dist/components}/FormControl/FormControlClient.d.ts +0 -0
- /package/{components → dist/components}/FormControl/FormControlClient.js +0 -0
- /package/{components → dist/components}/FormControl/FormControlError.d.ts +0 -0
- /package/{components → dist/components}/FormControl/FormControlError.js +0 -0
- /package/{components → dist/components}/FormControl/FormControlHelper.d.ts +0 -0
- /package/{components → dist/components}/FormControl/FormControlHelper.js +0 -0
- /package/{components → dist/components}/FormControl/FormControlLabel.d.ts +0 -0
- /package/{components → dist/components}/FormControl/index.d.ts +0 -0
- /package/{components → dist/components}/FormControl/index.js +0 -0
- /package/{components → dist/components}/FormControl/tests/FormControl.stories.js +0 -0
- /package/{components → dist/components}/Hidden/Hidden.d.ts +0 -0
- /package/{components → dist/components}/Hidden/Hidden.types.js +0 -0
- /package/{components → dist/components}/Hidden/index.d.ts +0 -0
- /package/{components → dist/components}/Hidden/index.js +0 -0
- /package/{components → dist/components}/HiddenVisually/HiddenVisually.d.ts +0 -0
- /package/{components → dist/components}/HiddenVisually/HiddenVisually.js +0 -0
- /package/{components → dist/components}/HiddenVisually/HiddenVisually.module.css +0 -0
- /package/{components → dist/components}/HiddenVisually/HiddenVisually.types.d.ts +0 -0
- /package/{components → dist/components}/HiddenVisually/HiddenVisually.types.js +0 -0
- /package/{components → dist/components}/HiddenVisually/index.d.ts +0 -0
- /package/{components → dist/components}/HiddenVisually/index.js +0 -0
- /package/{components → dist/components}/HiddenVisually/tests/HiddenVisually.stories.d.ts +0 -0
- /package/{components → dist/components}/HiddenVisually/tests/HiddenVisually.stories.js +0 -0
- /package/{components → dist/components}/Hotkey/Hotkey.d.ts +0 -0
- /package/{components → dist/components}/Hotkey/Hotkey.js +0 -0
- /package/{components → dist/components}/Hotkey/Hotkey.types.js +0 -0
- /package/{components → dist/components}/Hotkey/index.d.ts +0 -0
- /package/{components → dist/components}/Hotkey/index.js +0 -0
- /package/{components → dist/components}/Hotkey/tests/Hotkey.stories.d.ts +0 -0
- /package/{components → dist/components}/Icon/Icon.d.ts +0 -0
- /package/{components → dist/components}/Icon/Icon.module.css +0 -0
- /package/{components → dist/components}/Icon/Icon.types.js +0 -0
- /package/{components → dist/components}/Icon/index.d.ts +0 -0
- /package/{components → dist/components}/Icon/index.js +0 -0
- /package/{components → dist/components}/Icon/tests/Icon.stories.d.ts +0 -0
- /package/{components → dist/components}/Icon/tests/Icon.stories.js +0 -0
- /package/{components → dist/components}/Image/Image.d.ts +0 -0
- /package/{components → dist/components}/Image/Image.module.css +0 -0
- /package/{components → dist/components}/Image/Image.types.js +0 -0
- /package/{components → dist/components}/Image/index.d.ts +0 -0
- /package/{components → dist/components}/Image/index.js +0 -0
- /package/{components → dist/components}/Image/tests/Image.stories.d.ts +0 -0
- /package/{components → dist/components}/Image/tests/Image.stories.js +0 -0
- /package/{components → dist/components}/Link/Link.js +0 -0
- /package/{components → dist/components}/Link/Link.types.js +0 -0
- /package/{components → dist/components}/Link/index.d.ts +0 -0
- /package/{components → dist/components}/Link/index.js +0 -0
- /package/{components → dist/components}/Loader/Loader.d.ts +0 -0
- /package/{components → dist/components}/Loader/Loader.types.js +0 -0
- /package/{components → dist/components}/Loader/index.d.ts +0 -0
- /package/{components → dist/components}/Loader/index.js +0 -0
- /package/{components → dist/components}/Loader/tests/Loader.stories.d.ts +0 -0
- /package/{components → dist/components}/MenuItem/MenuItem.d.ts +0 -0
- /package/{components → dist/components}/MenuItem/MenuItem.types.js +0 -0
- /package/{components → dist/components}/MenuItem/MenuItemAligner.d.ts +0 -0
- /package/{components → dist/components}/MenuItem/index.d.ts +0 -0
- /package/{components → dist/components}/MenuItem/index.js +0 -0
- /package/{components → dist/components}/MenuItem/tests/MenuItem.stories.d.ts +0 -0
- /package/{components → dist/components}/Modal/Modal.d.ts +0 -0
- /package/{components → dist/components}/Modal/Modal.types.js +0 -0
- /package/{components → dist/components}/Modal/index.d.ts +0 -0
- /package/{components → dist/components}/Modal/index.js +0 -0
- /package/{components → dist/components}/Overlay/Overlay.d.ts +0 -0
- /package/{components → dist/components}/Overlay/Overlay.types.js +0 -0
- /package/{components → dist/components}/Overlay/index.d.ts +0 -0
- /package/{components → dist/components}/Overlay/index.js +0 -0
- /package/{components → dist/components}/Overlay/tests/Overlay.stories.d.ts +0 -0
- /package/{components → dist/components}/Overlay/tests/Overlay.stories.js +0 -0
- /package/{components → dist/components}/Pagination/Pagination.d.ts +0 -0
- /package/{components → dist/components}/Pagination/Pagination.module.css +0 -0
- /package/{components → dist/components}/Pagination/Pagination.types.js +0 -0
- /package/{components → dist/components}/Pagination/PaginationControlled.d.ts +0 -0
- /package/{components → dist/components}/Pagination/PaginationUncontrolled.d.ts +0 -0
- /package/{components → dist/components}/Pagination/index.d.ts +0 -0
- /package/{components → dist/components}/Pagination/index.js +0 -0
- /package/{components → dist/components}/Pagination/tests/Pagination.stories.d.ts +0 -0
- /package/{components → dist/components}/Pagination/tests/Pagination.stories.js +0 -0
- /package/{components → dist/components}/PinField/PinField.constants.d.ts +0 -0
- /package/{components → dist/components}/PinField/PinField.constants.js +0 -0
- /package/{components → dist/components}/PinField/PinField.d.ts +0 -0
- /package/{components → dist/components}/PinField/PinField.module.css +0 -0
- /package/{components → dist/components}/PinField/PinField.types.js +0 -0
- /package/{components → dist/components}/PinField/PinFieldControlled.d.ts +0 -0
- /package/{components → dist/components}/PinField/PinFieldUncontrolled.d.ts +0 -0
- /package/{components → dist/components}/PinField/index.d.ts +0 -0
- /package/{components → dist/components}/PinField/index.js +0 -0
- /package/{components → dist/components}/PinField/tests/PinField.stories.d.ts +0 -0
- /package/{components → dist/components}/PinField/tests/PinField.stories.js +0 -0
- /package/{components → dist/components}/Popover/Popover.d.ts +0 -0
- /package/{components → dist/components}/Popover/Popover.types.d.ts +0 -0
- /package/{components → dist/components}/Popover/Popover.types.js +0 -0
- /package/{components → dist/components}/Popover/index.d.ts +0 -0
- /package/{components → dist/components}/Popover/index.js +0 -0
- /package/{components → dist/components}/Popover/tests/Popover.stories.d.ts +0 -0
- /package/{components → dist/components}/Progress/Progress.d.ts +0 -0
- /package/{components → dist/components}/Progress/Progress.types.js +0 -0
- /package/{components → dist/components}/Progress/index.d.ts +0 -0
- /package/{components → dist/components}/Progress/index.js +0 -0
- /package/{components → dist/components}/Progress/tests/Progress.stories.d.ts +0 -0
- /package/{components → dist/components}/Radio/Radio.d.ts +0 -0
- /package/{components → dist/components}/Radio/Radio.types.js +0 -0
- /package/{components → dist/components}/Radio/index.d.ts +0 -0
- /package/{components → dist/components}/Radio/index.js +0 -0
- /package/{components → dist/components}/Radio/tests/Radio.stories.d.ts +0 -0
- /package/{components → dist/components}/Radio/tests/Radio.stories.js +0 -0
- /package/{components → dist/components}/RadioGroup/RadioGroup.context.d.ts +0 -0
- /package/{components → dist/components}/RadioGroup/RadioGroup.context.js +0 -0
- /package/{components → dist/components}/RadioGroup/RadioGroup.d.ts +0 -0
- /package/{components → dist/components}/RadioGroup/RadioGroup.types.d.ts +0 -0
- /package/{components → dist/components}/RadioGroup/RadioGroup.types.js +0 -0
- /package/{components → dist/components}/RadioGroup/RadioGroupControlled.d.ts +0 -0
- /package/{components → dist/components}/RadioGroup/RadioGroupControlled.js +0 -0
- /package/{components → dist/components}/RadioGroup/RadioGroupUncontrolled.d.ts +0 -0
- /package/{components → dist/components}/RadioGroup/index.d.ts +0 -0
- /package/{components → dist/components}/RadioGroup/index.js +0 -0
- /package/{components → dist/components}/RadioGroup/tests/RadioGroup.stories.d.ts +0 -0
- /package/{components → dist/components}/RadioGroup/tests/RadioGroup.stories.js +0 -0
- /package/{components → dist/components}/Reshaped/Reshaped.d.ts +0 -0
- /package/{components → dist/components}/Reshaped/Reshaped.module.css +0 -0
- /package/{components → dist/components}/Reshaped/Reshaped.types.d.ts +0 -0
- /package/{components → dist/components}/Reshaped/Reshaped.types.js +0 -0
- /package/{components → dist/components}/Reshaped/index.d.ts +0 -0
- /package/{components → dist/components}/Reshaped/index.js +0 -0
- /package/{components → dist/components}/Scrim/Scrim.d.ts +0 -0
- /package/{components → dist/components}/Scrim/Scrim.module.css +0 -0
- /package/{components → dist/components}/Scrim/Scrim.types.js +0 -0
- /package/{components → dist/components}/Scrim/index.d.ts +0 -0
- /package/{components → dist/components}/Scrim/index.js +0 -0
- /package/{components → dist/components}/Scrim/tests/Scrim.stories.d.ts +0 -0
- /package/{components → dist/components}/Scrim/tests/Scrim.stories.js +0 -0
- /package/{components → dist/components}/ScrollArea/ScrollArea.d.ts +0 -0
- /package/{components → dist/components}/ScrollArea/ScrollArea.types.js +0 -0
- /package/{components → dist/components}/ScrollArea/index.d.ts +0 -0
- /package/{components → dist/components}/ScrollArea/index.js +0 -0
- /package/{components → dist/components}/ScrollArea/tests/ScrollArea.stories.d.ts +0 -0
- /package/{components → dist/components}/Select/Select.d.ts +0 -0
- /package/{components → dist/components}/Select/Select.types.js +0 -0
- /package/{components → dist/components}/Select/index.d.ts +0 -0
- /package/{components → dist/components}/Select/index.js +0 -0
- /package/{components → dist/components}/Select/tests/Select.stories.d.ts +0 -0
- /package/{components → dist/components}/Select/tests/Select.stories.js +0 -0
- /package/{components → dist/components}/Skeleton/Skeleton.d.ts +0 -0
- /package/{components → dist/components}/Skeleton/Skeleton.js +0 -0
- /package/{components → dist/components}/Skeleton/Skeleton.module.css +0 -0
- /package/{components → dist/components}/Skeleton/Skeleton.types.js +0 -0
- /package/{components → dist/components}/Skeleton/index.d.ts +0 -0
- /package/{components → dist/components}/Skeleton/index.js +0 -0
- /package/{components → dist/components}/Skeleton/tests/Skeleton.stories.d.ts +0 -0
- /package/{components → dist/components}/Skeleton/tests/Skeleton.stories.js +0 -0
- /package/{components → dist/components}/Slider/Slider.d.ts +0 -0
- /package/{components → dist/components}/Slider/Slider.types.js +0 -0
- /package/{components → dist/components}/Slider/Slider.utilities.d.ts +0 -0
- /package/{components → dist/components}/Slider/SliderControlled.d.ts +0 -0
- /package/{components → dist/components}/Slider/SliderThumb.d.ts +0 -0
- /package/{components → dist/components}/Slider/SliderThumb.js +0 -0
- /package/{components → dist/components}/Slider/SliderUncontrolled.d.ts +0 -0
- /package/{components → dist/components}/Slider/index.d.ts +0 -0
- /package/{components → dist/components}/Slider/index.js +0 -0
- /package/{components → dist/components}/Slider/tests/Slider.stories.d.ts +0 -0
- /package/{components → dist/components}/Stepper/Stepper.d.ts +0 -0
- /package/{components → dist/components}/Stepper/Stepper.module.css +0 -0
- /package/{components → dist/components}/Stepper/Stepper.types.js +0 -0
- /package/{components → dist/components}/Stepper/index.d.ts +0 -0
- /package/{components → dist/components}/Stepper/index.js +0 -0
- /package/{components → dist/components}/Stepper/tests/Stepper.stories.d.ts +0 -0
- /package/{components → dist/components}/Switch/Switch.d.ts +0 -0
- /package/{components → dist/components}/Switch/Switch.types.js +0 -0
- /package/{components → dist/components}/Switch/index.d.ts +0 -0
- /package/{components → dist/components}/Switch/index.js +0 -0
- /package/{components → dist/components}/Switch/tests/Switch.stories.d.ts +0 -0
- /package/{components → dist/components}/Table/Table.d.ts +0 -0
- /package/{components → dist/components}/Table/Table.types.d.ts +0 -0
- /package/{components → dist/components}/Table/Table.types.js +0 -0
- /package/{components → dist/components}/Table/index.d.ts +0 -0
- /package/{components → dist/components}/Table/index.js +0 -0
- /package/{components → dist/components}/Table/tests/Table.stories.d.ts +0 -0
- /package/{components → dist/components}/Table/tests/Table.stories.js +0 -0
- /package/{components → dist/components}/Tabs/Tabs.d.ts +0 -0
- /package/{components → dist/components}/Tabs/Tabs.types.js +0 -0
- /package/{components → dist/components}/Tabs/TabsControlled.d.ts +0 -0
- /package/{components → dist/components}/Tabs/TabsControlled.js +0 -0
- /package/{components → dist/components}/Tabs/TabsItem.d.ts +0 -0
- /package/{components → dist/components}/Tabs/TabsList.d.ts +0 -0
- /package/{components → dist/components}/Tabs/TabsPanel.d.ts +0 -0
- /package/{components → dist/components}/Tabs/TabsPanel.js +0 -0
- /package/{components → dist/components}/Tabs/TabsUncontrolled.d.ts +0 -0
- /package/{components → dist/components}/Tabs/index.d.ts +0 -0
- /package/{components → dist/components}/Tabs/index.js +0 -0
- /package/{components → dist/components}/Tabs/tests/Tabs.stories.d.ts +0 -0
- /package/{components → dist/components}/Tabs/tests/Tabs.stories.js +0 -0
- /package/{components → dist/components}/Text/Text.d.ts +0 -0
- /package/{components → dist/components}/Text/Text.module.css +0 -0
- /package/{components → dist/components}/Text/Text.types.js +0 -0
- /package/{components → dist/components}/Text/index.d.ts +0 -0
- /package/{components → dist/components}/Text/index.js +0 -0
- /package/{components → dist/components}/Text/tests/Text.stories.d.ts +0 -0
- /package/{components → dist/components}/TextArea/TextArea.d.ts +0 -0
- /package/{components → dist/components}/TextArea/TextArea.types.js +0 -0
- /package/{components → dist/components}/TextArea/index.d.ts +0 -0
- /package/{components → dist/components}/TextArea/index.js +0 -0
- /package/{components → dist/components}/TextArea/tests/TextArea.stories.d.ts +0 -0
- /package/{components → dist/components}/TextArea/tests/TextArea.stories.js +0 -0
- /package/{components → dist/components}/TextField/TextField.d.ts +0 -0
- /package/{components → dist/components}/TextField/TextField.types.js +0 -0
- /package/{components → dist/components}/TextField/index.d.ts +0 -0
- /package/{components → dist/components}/TextField/index.js +0 -0
- /package/{components → dist/components}/TextField/tests/TextField.stories.d.ts +0 -0
- /package/{components → dist/components}/TextField/tests/TextField.stories.js +0 -0
- /package/{components → dist/components}/Theme/GlobalColorMode.d.ts +0 -0
- /package/{components → dist/components}/Theme/GlobalColorMode.js +0 -0
- /package/{components → dist/components}/Theme/Theme.context.d.ts +0 -0
- /package/{components → dist/components}/Theme/Theme.d.ts +0 -0
- /package/{components → dist/components}/Theme/Theme.module.css +0 -0
- /package/{components → dist/components}/Theme/Theme.types.js +0 -0
- /package/{components → dist/components}/Theme/index.d.ts +0 -0
- /package/{components → dist/components}/Theme/index.js +0 -0
- /package/{components → dist/components}/Theme/tests/Theme.stories.d.ts +0 -0
- /package/{components → dist/components}/Theme/tests/Theme.stories.js +0 -0
- /package/{components → dist/components}/Timeline/Timeline.d.ts +0 -0
- /package/{components → dist/components}/Timeline/Timeline.module.css +0 -0
- /package/{components → dist/components}/Timeline/Timeline.types.js +0 -0
- /package/{components → dist/components}/Timeline/index.d.ts +0 -0
- /package/{components → dist/components}/Timeline/index.js +0 -0
- /package/{components → dist/components}/Timeline/tests/Timeline.stories.d.ts +0 -0
- /package/{components → dist/components}/Timeline/tests/Timeline.stories.js +0 -0
- /package/{components → dist/components}/Toast/Toast.constants.d.ts +0 -0
- /package/{components → dist/components}/Toast/Toast.context.d.ts +0 -0
- /package/{components → dist/components}/Toast/Toast.context.js +0 -0
- /package/{components → dist/components}/Toast/Toast.d.ts +0 -0
- /package/{components → dist/components}/Toast/Toast.types.js +0 -0
- /package/{components → dist/components}/Toast/ToastContainer.d.ts +0 -0
- /package/{components → dist/components}/Toast/ToastProvider.d.ts +0 -0
- /package/{components → dist/components}/Toast/ToastRegion.d.ts +0 -0
- /package/{components → dist/components}/Toast/index.d.ts +0 -0
- /package/{components → dist/components}/Toast/index.js +0 -0
- /package/{components → dist/components}/Toast/tests/Toast.stories.d.ts +0 -0
- /package/{components → dist/components}/Toast/useToast.d.ts +0 -0
- /package/{components → dist/components}/Toast/useToast.js +0 -0
- /package/{components → dist/components}/Tooltip/Tooltip.d.ts +0 -0
- /package/{components → dist/components}/Tooltip/Tooltip.js +0 -0
- /package/{components → dist/components}/Tooltip/Tooltip.types.d.ts +0 -0
- /package/{components → dist/components}/Tooltip/Tooltip.types.js +0 -0
- /package/{components → dist/components}/Tooltip/index.d.ts +0 -0
- /package/{components → dist/components}/Tooltip/index.js +0 -0
- /package/{components → dist/components}/Tooltip/tests/Tooltip.stories.d.ts +0 -0
- /package/{components → dist/components}/View/View.module.css +0 -0
- /package/{components → dist/components}/View/View.types.d.ts +0 -0
- /package/{components → dist/components}/View/View.types.js +0 -0
- /package/{components → dist/components}/View/index.d.ts +0 -0
- /package/{components → dist/components}/View/index.js +0 -0
- /package/{components → dist/components}/_private/Aligner/Aligner.d.ts +0 -0
- /package/{components → dist/components}/_private/Aligner/Aligner.module.css +0 -0
- /package/{components → dist/components}/_private/Aligner/Aligner.types.js +0 -0
- /package/{components → dist/components}/_private/Aligner/index.d.ts +0 -0
- /package/{components → dist/components}/_private/Aligner/index.js +0 -0
- /package/{components → dist/components}/_private/Expandable/Expandable.d.ts +0 -0
- /package/{components → dist/components}/_private/Expandable/Expandable.types.d.ts +0 -0
- /package/{components → dist/components}/_private/Expandable/Expandable.types.js +0 -0
- /package/{components → dist/components}/_private/Expandable/index.d.ts +0 -0
- /package/{components → dist/components}/_private/Expandable/index.js +0 -0
- /package/{components → dist/components}/_private/Flyout/Flyout.d.ts +0 -0
- /package/{components → dist/components}/_private/Flyout/Flyout.module.css +0 -0
- /package/{components → dist/components}/_private/Flyout/Flyout.types.js +0 -0
- /package/{components → dist/components}/_private/Flyout/FlyoutContent.d.ts +0 -0
- /package/{components → dist/components}/_private/Flyout/FlyoutControlled.d.ts +0 -0
- /package/{components → dist/components}/_private/Flyout/FlyoutTrigger.d.ts +0 -0
- /package/{components → dist/components}/_private/Flyout/FlyoutUncontrolled.d.ts +0 -0
- /package/{components → dist/components}/_private/Flyout/index.d.ts +0 -0
- /package/{components → dist/components}/_private/Flyout/index.js +0 -0
- /package/{components → dist/components}/_private/Flyout/tests/Flyout.stories.d.ts +0 -0
- /package/{components → dist/components}/_private/Flyout/useFlyout.d.ts +0 -0
- /package/{components → dist/components}/_private/Flyout/utilities/calculatePosition.d.ts +0 -0
- /package/{components → dist/components}/_private/Flyout/utilities/calculatePosition.js +0 -0
- /package/{components → dist/components}/_private/HiddenInput/HiddenInput.d.ts +0 -0
- /package/{components → dist/components}/_private/HiddenInput/HiddenInput.module.css +0 -0
- /package/{components → dist/components}/_private/HiddenInput/HiddenInput.types.d.ts +0 -0
- /package/{components → dist/components}/_private/HiddenInput/HiddenInput.types.js +0 -0
- /package/{components → dist/components}/_private/HiddenInput/index.d.ts +0 -0
- /package/{components → dist/components}/_private/HiddenInput/index.js +0 -0
- /package/{components → dist/components}/_private/Portal/Portal.d.ts +0 -0
- /package/{components → dist/components}/_private/Portal/Portal.types.d.ts +0 -0
- /package/{components → dist/components}/_private/Portal/Portal.types.js +0 -0
- /package/{components → dist/components}/_private/Portal/index.d.ts +0 -0
- /package/{components → dist/components}/_private/Portal/index.js +0 -0
- /package/{components → dist/components}/_private/Portal/tests/Portal.stories.d.ts +0 -0
- /package/{components → dist/components}/_private/Portal/tests/Portal.stories.js +0 -0
- /package/{constants → dist/constants}/keys.d.ts +0 -0
- /package/{constants → dist/constants}/keys.js +0 -0
- /package/{constants → dist/constants}/timeouts.d.ts +0 -0
- /package/{constants → dist/constants}/timeouts.js +0 -0
- /package/{hooks → dist/hooks}/_private/useIsDismissible.d.ts +0 -0
- /package/{hooks → dist/hooks}/_private/useOnClickOutside.d.ts +0 -0
- /package/{hooks → dist/hooks}/_private/useOnClickOutside.js +0 -0
- /package/{hooks → dist/hooks}/_private/useSingletonEnvironment.d.ts +0 -0
- /package/{hooks → dist/hooks}/_private/useSingletonEnvironment.js +0 -0
- /package/{hooks → dist/hooks}/_private/useSingletonHotkeys.d.ts +0 -0
- /package/{hooks → dist/hooks}/_private/useSingletonKeyboardMode.d.ts +0 -0
- /package/{hooks → dist/hooks}/_private/useSingletonKeyboardMode.js +0 -0
- /package/{hooks → dist/hooks}/tests/useHotkeys.stories.d.ts +0 -0
- /package/{hooks → dist/hooks}/tests/useResponsiveClientValue.stories.d.ts +0 -0
- /package/{hooks → dist/hooks}/tests/useResponsiveClientValue.stories.js +0 -0
- /package/{hooks → dist/hooks}/useElementId.d.ts +0 -0
- /package/{hooks → dist/hooks}/useElementId.js +0 -0
- /package/{hooks → dist/hooks}/useHotkeys.d.ts +0 -0
- /package/{hooks → dist/hooks}/useIsomorphicLayoutEffect.d.ts +0 -0
- /package/{hooks → dist/hooks}/useIsomorphicLayoutEffect.js +0 -0
- /package/{hooks → dist/hooks}/useRTL.d.ts +0 -0
- /package/{hooks → dist/hooks}/useRTL.js +0 -0
- /package/{hooks → dist/hooks}/useResponsiveClientValue.d.ts +0 -0
- /package/{hooks → dist/hooks}/useResponsiveClientValue.js +0 -0
- /package/{hooks → dist/hooks}/useScrollLock.d.ts +0 -0
- /package/{hooks → dist/hooks}/useScrollLock.js +0 -0
- /package/{hooks → dist/hooks}/useToggle.d.ts +0 -0
- /package/{hooks → dist/hooks}/useToggle.js +0 -0
- /package/{icons → dist/icons}/ArrowUpRight.d.ts +0 -0
- /package/{icons → dist/icons}/ArrowUpRight.js +0 -0
- /package/{icons → dist/icons}/Checkmark.d.ts +0 -0
- /package/{icons → dist/icons}/Checkmark.js +0 -0
- /package/{icons → dist/icons}/ChevronDown.d.ts +0 -0
- /package/{icons → dist/icons}/ChevronDown.js +0 -0
- /package/{icons → dist/icons}/ChevronLeft.d.ts +0 -0
- /package/{icons → dist/icons}/ChevronLeft.js +0 -0
- /package/{icons → dist/icons}/ChevronRight.d.ts +0 -0
- /package/{icons → dist/icons}/ChevronRight.js +0 -0
- /package/{icons → dist/icons}/ChevronVertical.d.ts +0 -0
- /package/{icons → dist/icons}/ChevronVertical.js +0 -0
- /package/{icons → dist/icons}/Close.d.ts +0 -0
- /package/{icons → dist/icons}/Close.js +0 -0
- /package/{icons → dist/icons}/DotsHorizontal.d.ts +0 -0
- /package/{icons → dist/icons}/DotsHorizontal.js +0 -0
- /package/{icons → dist/icons}/Mic.d.ts +0 -0
- /package/{icons → dist/icons}/Zap.d.ts +0 -0
- /package/{icons → dist/icons}/Zap.js +0 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{styles → dist/styles}/aspectRatio/aspectRatio.module.css +0 -0
- /package/{styles → dist/styles}/aspectRatio/index.d.ts +0 -0
- /package/{styles → dist/styles}/aspectRatio/index.js +0 -0
- /package/{styles → dist/styles}/bleed/bleed.module.css +0 -0
- /package/{styles → dist/styles}/bleed/index.d.ts +0 -0
- /package/{styles → dist/styles}/bleed/index.js +0 -0
- /package/{styles → dist/styles}/height/height.module.css +0 -0
- /package/{styles → dist/styles}/height/index.d.ts +0 -0
- /package/{styles → dist/styles}/height/index.js +0 -0
- /package/{styles → dist/styles}/inset/index.d.ts +0 -0
- /package/{styles → dist/styles}/inset/index.js +0 -0
- /package/{styles → dist/styles}/inset/inset.module.css +0 -0
- /package/{styles → dist/styles}/maxHeight/index.d.ts +0 -0
- /package/{styles → dist/styles}/maxHeight/index.js +0 -0
- /package/{styles → dist/styles}/maxHeight/maxHeight.module.css +0 -0
- /package/{styles → dist/styles}/maxWidth/index.d.ts +0 -0
- /package/{styles → dist/styles}/maxWidth/index.js +0 -0
- /package/{styles → dist/styles}/maxWidth/maxWidth.module.css +0 -0
- /package/{styles → dist/styles}/minHeight/index.d.ts +0 -0
- /package/{styles → dist/styles}/minHeight/index.js +0 -0
- /package/{styles → dist/styles}/minHeight/minHeight.module.css +0 -0
- /package/{styles → dist/styles}/minWidth/index.d.ts +0 -0
- /package/{styles → dist/styles}/minWidth/index.js +0 -0
- /package/{styles → dist/styles}/minWidth/minWidth.module.css +0 -0
- /package/{styles → dist/styles}/padding/index.d.ts +0 -0
- /package/{styles → dist/styles}/padding/index.js +0 -0
- /package/{styles → dist/styles}/padding/padding.module.css +0 -0
- /package/{styles → dist/styles}/position/index.d.ts +0 -0
- /package/{styles → dist/styles}/position/index.js +0 -0
- /package/{styles → dist/styles}/position/position.module.css +0 -0
- /package/{styles → dist/styles}/radius/index.d.ts +0 -0
- /package/{styles → dist/styles}/radius/index.js +0 -0
- /package/{styles → dist/styles}/types.d.ts +0 -0
- /package/{styles → dist/styles}/types.js +0 -0
- /package/{styles → dist/styles}/width/index.d.ts +0 -0
- /package/{styles → dist/styles}/width/index.js +0 -0
- /package/{styles → dist/styles}/width/width.module.css +0 -0
- /package/{themes/_generator/utilities/tests/generateColors.test.d.ts → dist/tests/themingWithDefinition.d.ts} +0 -0
- /package/{types/global.js → dist/tests/themingWithoutDefinition.d.ts} +0 -0
- /package/{themes → dist/themes}/_generator/tests/themes.stories.d.ts +0 -0
- /package/{utilities/a11y/types.js → dist/themes/_generator/tokens/color/color.types.js} +0 -0
- /package/{utilities → dist/utilities}/Chain.d.ts +0 -0
- /package/{utilities → dist/utilities}/a11y/TrapFocus.d.ts +0 -0
- /package/{utilities → dist/utilities}/a11y/TrapScreenReader.d.ts +0 -0
- /package/{utilities → dist/utilities}/a11y/focus.d.ts +0 -0
- /package/{utilities → dist/utilities}/a11y/keyboardMode.d.ts +0 -0
- /package/{utilities → dist/utilities}/a11y/keyboardMode.js +0 -0
- /package/{utilities → dist/utilities}/a11y/types.d.ts +0 -0
- /package/{utilities → dist/utilities}/animation.d.ts +0 -0
- /package/{utilities → dist/utilities}/animation.js +0 -0
- /package/{utilities → dist/utilities}/dom.d.ts +0 -0
- /package/{utilities → dist/utilities}/helpers.d.ts +0 -0
- /package/{utilities → dist/utilities}/storybook/Example.d.ts +0 -0
- /package/{utilities → dist/utilities}/storybook/Example.module.css +0 -0
- /package/{utilities → dist/utilities}/storybook/Placeholder.d.ts +0 -0
- /package/{utilities → dist/utilities}/storybook/index.d.ts +0 -0
- /package/{utilities → dist/utilities}/storybook/index.js +0 -0
@@ -1,115 +0,0 @@
|
|
1
|
-
import { useRef } from "react";
|
2
|
-
import { Example } from "../../../utilities/storybook/index.js";
|
3
|
-
import ScrollArea from "../index.js";
|
4
|
-
import View from "../../View/index.js";
|
5
|
-
import Button from "../../Button/index.js";
|
6
|
-
export default {
|
7
|
-
title: "Utilities/ScrollArea",
|
8
|
-
component: ScrollArea,
|
9
|
-
parameters: {
|
10
|
-
iframe: {
|
11
|
-
url: "https://reshaped.so/docs/utilities/scroll-area",
|
12
|
-
},
|
13
|
-
},
|
14
|
-
};
|
15
|
-
const Demo = () => {
|
16
|
-
const ref = useRef(null);
|
17
|
-
return (<View gap={4}>
|
18
|
-
<Button onClick={() => { var _a; return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.scrollTo({ top: 100, behavior: "smooth" }); }}>
|
19
|
-
Scroll
|
20
|
-
</Button>
|
21
|
-
<ScrollArea height="100px" scrollbarDisplay="visible" ref={ref}>
|
22
|
-
<View backgroundColor="neutral-faded" padding={4}>
|
23
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
24
|
-
been the industry's standard dummy text ever since the 1500s, when an unknown printer took
|
25
|
-
a galley of type and scrambled it to make a type specimen book. It has survived not only
|
26
|
-
five centuries, but also the leap into electronic typesetting, remaining essentially
|
27
|
-
unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
28
|
-
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
|
29
|
-
PageMaker including versions of Lorem Ipsum.
|
30
|
-
</View>
|
31
|
-
</ScrollArea>
|
32
|
-
</View>);
|
33
|
-
};
|
34
|
-
export const direction = () => (<Example>
|
35
|
-
<Example.Item title="vertical">
|
36
|
-
<ScrollArea height="100px" scrollbarDisplay="visible">
|
37
|
-
<View backgroundColor="neutral-faded" padding={4}>
|
38
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
39
|
-
been the industry's standard dummy text ever since the 1500s, when an unknown printer took
|
40
|
-
a galley of type and scrambled it to make a type specimen book. It has survived not only
|
41
|
-
five centuries, but also the leap into electronic typesetting, remaining essentially
|
42
|
-
unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
43
|
-
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
|
44
|
-
PageMaker including versions of Lorem Ipsum.
|
45
|
-
</View>
|
46
|
-
</ScrollArea>
|
47
|
-
</Example.Item>
|
48
|
-
<Example.Item title="horizontal">
|
49
|
-
<ScrollArea height="120px" scrollbarDisplay="visible">
|
50
|
-
<View backgroundColor="neutral-faded" padding={4} width="500px">
|
51
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
52
|
-
been the industry's standard dummy text ever since the 1500s
|
53
|
-
</View>
|
54
|
-
</ScrollArea>
|
55
|
-
</Example.Item>
|
56
|
-
<Example.Item title="both directions">
|
57
|
-
<ScrollArea height="100px" scrollbarDisplay="visible">
|
58
|
-
<View backgroundColor="neutral-faded" padding={4} width="500px">
|
59
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
60
|
-
been the industry's standard dummy text ever since the 1500s, when an unknown printer took
|
61
|
-
a galley of type and scrambled it to make a type specimen book. It has survived not only
|
62
|
-
five centuries, but also the leap into electronic typesetting, remaining essentially
|
63
|
-
unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
64
|
-
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
|
65
|
-
PageMaker including versions of Lorem Ipsum.
|
66
|
-
</View>
|
67
|
-
</ScrollArea>
|
68
|
-
</Example.Item>
|
69
|
-
</Example>);
|
70
|
-
export const visibility = () => (<Example>
|
71
|
-
<Example.Item title="visibility: hover">
|
72
|
-
<ScrollArea height="100px">
|
73
|
-
<View backgroundColor="neutral-faded" padding={4}>
|
74
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
75
|
-
been the industry's standard dummy text ever since the 1500s, when an unknown printer took
|
76
|
-
a galley of type and scrambled it to make a type specimen book. It has survived not only
|
77
|
-
five centuries, but also the leap into electronic typesetting, remaining essentially
|
78
|
-
unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
79
|
-
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
|
80
|
-
PageMaker including versions of Lorem Ipsum.
|
81
|
-
</View>
|
82
|
-
</ScrollArea>
|
83
|
-
</Example.Item>
|
84
|
-
<Example.Item title="visibility: hidden">
|
85
|
-
<ScrollArea height="100px" scrollbarDisplay="hidden">
|
86
|
-
<View backgroundColor="neutral-faded" padding={4}>
|
87
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
88
|
-
been the industry's standard dummy text ever since the 1500s, when an unknown printer took
|
89
|
-
a galley of type and scrambled it to make a type specimen book. It has survived not only
|
90
|
-
five centuries, but also the leap into electronic typesetting, remaining essentially
|
91
|
-
unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
92
|
-
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
|
93
|
-
PageMaker including versions of Lorem Ipsum.
|
94
|
-
</View>
|
95
|
-
</ScrollArea>
|
96
|
-
</Example.Item>
|
97
|
-
<Example.Item title="visibility: visible">
|
98
|
-
<ScrollArea height="100px" scrollbarDisplay="visible">
|
99
|
-
<View backgroundColor="neutral-faded" padding={4}>
|
100
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
101
|
-
been the industry's standard dummy text ever since the 1500s, when an unknown printer took
|
102
|
-
a galley of type and scrambled it to make a type specimen book. It has survived not only
|
103
|
-
five centuries, but also the leap into electronic typesetting, remaining essentially
|
104
|
-
unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
105
|
-
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
|
106
|
-
PageMaker including versions of Lorem Ipsum.
|
107
|
-
</View>
|
108
|
-
</ScrollArea>
|
109
|
-
</Example.Item>
|
110
|
-
</Example>);
|
111
|
-
export const ref = () => (<Example>
|
112
|
-
<Example.Item title="external ref">
|
113
|
-
<Demo />
|
114
|
-
</Example.Item>
|
115
|
-
</Example>);
|
@@ -1,49 +0,0 @@
|
|
1
|
-
"use client";
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
3
|
-
import React from "react";
|
4
|
-
import Icon from "../Icon/index.js";
|
5
|
-
import { useFormControl } from "../FormControl/index.js";
|
6
|
-
import Actionable from "../Actionable/index.js";
|
7
|
-
import Text from "../Text/index.js";
|
8
|
-
import IconArrow from "../../icons/ChevronVertical.js";
|
9
|
-
import { classNames, responsiveClassNames, responsivePropDependency } from "../../utilities/helpers.js";
|
10
|
-
import useElementId from "../../hooks/useElementId.js";
|
11
|
-
import s from "./Select.module.css";
|
12
|
-
const Select = (props) => {
|
13
|
-
var _a, _b;
|
14
|
-
const { onChange, onClick, onFocus, onBlur, name, value, defaultValue, placeholder, options, children, icon, startSlot, size = "medium", variant = "outline", className, attributes, } = props;
|
15
|
-
const [empty, setEmpty] = React.useState(value === undefined ? !defaultValue : !value);
|
16
|
-
const formControl = useFormControl();
|
17
|
-
const id = useElementId(props.id);
|
18
|
-
const inputId = ((_a = formControl === null || formControl === void 0 ? void 0 : formControl.attributes) === null || _a === void 0 ? void 0 : _a.id) || ((_b = props.inputAttributes) === null || _b === void 0 ? void 0 : _b.id) || id;
|
19
|
-
const disabled = (formControl === null || formControl === void 0 ? void 0 : formControl.disabled) || props.disabled;
|
20
|
-
const hasError = (formControl === null || formControl === void 0 ? void 0 : formControl.hasError) || props.hasError;
|
21
|
-
const inputAttributes = Object.assign(Object.assign({}, props.inputAttributes), formControl === null || formControl === void 0 ? void 0 : formControl.attributes);
|
22
|
-
const rootClassName = classNames(s.root, className, size && responsiveClassNames(s, "--size", size), hasError && s["--status-error"], disabled && s["--disabled"], empty && options && s["--placeholder"], variant && s[`--variant-${variant}`]);
|
23
|
-
const handleChange = (event) => {
|
24
|
-
const nextValue = event.target.value;
|
25
|
-
// Uncontrolled placeholder
|
26
|
-
if (value === undefined)
|
27
|
-
setEmpty(!nextValue);
|
28
|
-
if (!onChange)
|
29
|
-
return;
|
30
|
-
onChange({ name, value: nextValue, event });
|
31
|
-
};
|
32
|
-
// Controlled placeholder
|
33
|
-
React.useEffect(() => {
|
34
|
-
if (value === undefined)
|
35
|
-
return;
|
36
|
-
setEmpty(!value);
|
37
|
-
}, [value]);
|
38
|
-
const startContent = (startSlot || icon) && (_jsx("div", { className: s.slot, children: icon ? (_jsx(Icon, { size: responsivePropDependency(size, (size) => {
|
39
|
-
if (size === "large")
|
40
|
-
return 5;
|
41
|
-
if (size === "xlarge")
|
42
|
-
return 6;
|
43
|
-
return 4;
|
44
|
-
}), svg: icon })) : (startSlot) }));
|
45
|
-
return (_jsxs("div", Object.assign({}, attributes, { className: rootClassName, children: [options ? (_jsxs(_Fragment, { children: [startContent, _jsxs("select", Object.assign({}, inputAttributes, { className: s.input, disabled: disabled, name: name, value: value, defaultValue: defaultValue, onChange: handleChange, onFocus: onFocus || (inputAttributes === null || inputAttributes === void 0 ? void 0 : inputAttributes.onFocus), onBlur: onBlur || (inputAttributes === null || inputAttributes === void 0 ? void 0 : inputAttributes.onBlur), id: inputId, children: [placeholder && _jsx("option", { value: "", children: placeholder }), options.map((option) => (_jsx("option", { value: option.value, disabled: option.disabled, children: option.label }, option.value)))] }))] })) : (_jsxs(_Fragment, { children: [_jsxs(Actionable, { className: s.input, disabled: disabled, onClick: onClick, attributes: Object.assign(Object.assign({}, inputAttributes), { onFocus: onFocus || (inputAttributes === null || inputAttributes === void 0 ? void 0 : inputAttributes.onFocus), onBlur: onBlur || (inputAttributes === null || inputAttributes === void 0 ? void 0 : inputAttributes.onBlur) }), children: [startContent, children || (placeholder ? _jsx(Text, { color: "neutral-faded", children: placeholder }) : null)] }), _jsx("input", { type: "hidden", value: value, name: name })] })), _jsx("div", { className: s.arrow, children: _jsx(Icon, { svg: IconArrow, color: disabled ? "disabled" : "neutral-faded", size: responsivePropDependency(size, (size) => {
|
46
|
-
return size === "large" || size === "xlarge" ? 5 : 4;
|
47
|
-
}) }) })] })));
|
48
|
-
};
|
49
|
-
export default Select;
|
@@ -1 +0,0 @@
|
|
1
|
-
.root{background:var(--rs-color-background-elevation-base);border:1px solid var(--rs-color-border-neutral);display:flex;overflow:hidden;padding:calc(var(--rs-unit-x1) - 1px) 0;position:relative;z-index:0}.root:focus-within{border-color:var(--rs-color-border-primary);box-shadow:0 0 0 1px var(--rs-color-border-primary)}.input{align-items:center;-webkit-appearance:none;appearance:none;background:none;border:0;box-sizing:border-box;color:var(--rs-color-foreground-neutral);cursor:pointer;display:flex;flex-grow:1;font-family:var(--rs-font-family-body);font-weight:var(--rs-font-weight-regular);outline:none;padding-inline-end:calc(var(--rs-select-chevron-size) + var(--rs-select-gap) * 2 + var(--rs-unit-x1));padding-inline-start:var(--rs-select-gap);position:relative;width:100%;z-index:1}.input::-ms-expand{display:none}.slot{align-items:center;display:flex;flex-shrink:0;padding-inline-start:var(--rs-select-gap);position:relative;z-index:5}.input .slot{padding-inline-end:var(--rs-select-gap);padding-inline-start:0}.arrow{color:var(--rs-color-foreground-neutral-faded);display:flex;inset-block-start:50%;inset-inline-end:var(--rs-select-gap);pointer-events:none;position:absolute;transform:translateY(-50%);z-index:5}.--size-medium{--rs-select-gap:var(--rs-unit-x2);--rs-select-chevron-size:var(--rs-unit-x4);border-radius:var(--rs-unit-radius-small)}.--size-medium .input{font-size:var(--rs-font-size-body-3);line-height:var(--rs-line-height-body-3);padding-bottom:var(--rs-unit-x1);padding-top:var(--rs-unit-x1)}.--size-large{--rs-select-gap:var(--rs-unit-x3);--rs-select-chevron-size:var(--rs-unit-x5);border-radius:var(--rs-unit-radius-medium)}.--size-large .input{font-size:var(--rs-font-size-body-2);line-height:var(--rs-line-height-body-2);padding-bottom:var(--rs-unit-x2);padding-top:var(--rs-unit-x2)}.--size-xlarge{--rs-select-gap:var(--rs-unit-x4);--rs-select-chevron-size:var(--rs-unit-x5);border-radius:var(--rs-unit-radius-medium)}.--size-xlarge .input{font-size:var(--rs-font-size-body-2);line-height:var(--rs-line-height-body-2);padding-bottom:var(--rs-unit-x3);padding-top:var(--rs-unit-x3)}.root.--variant-faded{background:var(--rs-color-background-neutral-faded);border-color:transparent}.root.--variant-faded:focus-within{border-color:var(--rs-color-border-primary)}.root.--variant-headless{background:transparent;border-color:transparent}.root.--variant-headless.--status-error,.root.--variant-headless.--status-error:focus-within,.root.--variant-headless:focus-within{border-color:transparent;box-shadow:none}.root.--status-error{border-color:var(--rs-color-border-critical)}.root.--status-error:focus-within{border-color:var(--rs-color-border-primary)}.root.--placeholder .input{color:var(--rs-color-foreground-neutral-faded)}.root.--disabled{background:var(--rs-color-background-disabled-faded);border-color:var(--rs-color-border-disabled)}.root.--disabled .arrow,.root.--disabled .input{color:var(--rs-color-foreground-disabled);cursor:not-allowed}@media (--rs-viewport-s ) and (hover:none){.input{font-size:var(--rs-font-size-body-2)!important}}@media (--rs-viewport-m ){.--size-medium--m{--rs-select-gap:var(--rs-unit-x2);--rs-select-chevron-size:var(--rs-unit-x4);border-radius:var(--rs-unit-radius-small)}.--size-medium--m .input{font-size:var(--rs-font-size-body-3);line-height:var(--rs-line-height-body-3);padding-bottom:var(--rs-unit-x1);padding-top:var(--rs-unit-x1)}.--size-large--m{--rs-select-gap:var(--rs-unit-x3);--rs-select-chevron-size:var(--rs-unit-x5);border-radius:var(--rs-unit-radius-medium)}.--size-large--m .input{font-size:var(--rs-font-size-body-2);line-height:var(--rs-line-height-body-2);padding-bottom:var(--rs-unit-x2);padding-top:var(--rs-unit-x2)}.--size-xlarge--m{--rs-select-gap:var(--rs-unit-x4);--rs-select-chevron-size:var(--rs-unit-x5);border-radius:var(--rs-unit-radius-medium)}.--size-xlarge--m .input{font-size:var(--rs-font-size-body-2);line-height:var(--rs-line-height-body-2);padding-bottom:var(--rs-unit-x3);padding-top:var(--rs-unit-x3)}}@media (--rs-viewport-l ){.--size-medium--l{--rs-select-gap:var(--rs-unit-x2);--rs-select-chevron-size:var(--rs-unit-x4);border-radius:var(--rs-unit-radius-small)}.--size-medium--l .input{font-size:var(--rs-font-size-body-3);line-height:var(--rs-line-height-body-3);padding-bottom:var(--rs-unit-x1);padding-top:var(--rs-unit-x1)}.--size-large--l{--rs-select-gap:var(--rs-unit-x3);--rs-select-chevron-size:var(--rs-unit-x5);border-radius:var(--rs-unit-radius-medium)}.--size-large--l .input{font-size:var(--rs-font-size-body-2);line-height:var(--rs-line-height-body-2);padding-bottom:var(--rs-unit-x2);padding-top:var(--rs-unit-x2)}.--size-xlarge--l{--rs-select-gap:var(--rs-unit-x4);--rs-select-chevron-size:var(--rs-unit-x5);border-radius:var(--rs-unit-radius-medium)}.--size-xlarge--l .input{font-size:var(--rs-font-size-body-2);line-height:var(--rs-line-height-body-2);padding-bottom:var(--rs-unit-x3);padding-top:var(--rs-unit-x3)}}@media (--rs-viewport-xl ){.--size-medium--xl{--rs-select-gap:var(--rs-unit-x2);--rs-select-chevron-size:var(--rs-unit-x4);border-radius:var(--rs-unit-radius-small)}.--size-medium--xl .input{font-size:var(--rs-font-size-body-3);line-height:var(--rs-line-height-body-3);padding-bottom:var(--rs-unit-x1);padding-top:var(--rs-unit-x1)}.--size-large--xl{--rs-select-gap:var(--rs-unit-x3);--rs-select-chevron-size:var(--rs-unit-x5);border-radius:var(--rs-unit-radius-medium)}.--size-large--xl .input{font-size:var(--rs-font-size-body-2);line-height:var(--rs-line-height-body-2);padding-bottom:var(--rs-unit-x2);padding-top:var(--rs-unit-x2)}.--size-xlarge--xl{--rs-select-gap:var(--rs-unit-x4);--rs-select-chevron-size:var(--rs-unit-x5);border-radius:var(--rs-unit-radius-medium)}.--size-xlarge--xl .input{font-size:var(--rs-font-size-body-2);line-height:var(--rs-line-height-body-2);padding-bottom:var(--rs-unit-x3);padding-top:var(--rs-unit-x3)}}
|
@@ -1,49 +0,0 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import type * as G from "../../types/global";
|
3
|
-
import { FormControlProps } from "../FormControl";
|
4
|
-
import { ActionableProps } from "../Actionable";
|
5
|
-
import { IconProps } from "../Icon";
|
6
|
-
type Size = G.Responsive<"medium" | "large" | "xlarge">;
|
7
|
-
type Option = {
|
8
|
-
label: string;
|
9
|
-
value: string;
|
10
|
-
disabled?: boolean;
|
11
|
-
};
|
12
|
-
export type ButtonTriggerProps = {
|
13
|
-
onClick?: () => void;
|
14
|
-
children?: React.ReactNode;
|
15
|
-
inputAttributes?: ActionableProps["attributes"];
|
16
|
-
options?: never;
|
17
|
-
onChange?: never;
|
18
|
-
};
|
19
|
-
export type SelectTriggerProps = {
|
20
|
-
options: Option[];
|
21
|
-
onChange?: G.ChangeHandler<string, React.ChangeEvent<HTMLSelectElement>>;
|
22
|
-
inputAttributes?: G.Attributes<"select", Omit<Props, "id">>;
|
23
|
-
onClick?: never;
|
24
|
-
children?: never;
|
25
|
-
};
|
26
|
-
type BaseProps = ((ButtonTriggerProps | SelectTriggerProps) & Pick<FormControlProps, "hasError">) & {
|
27
|
-
id?: string;
|
28
|
-
name: string;
|
29
|
-
size?: Size;
|
30
|
-
variant?: "outline" | "faded" | "headless";
|
31
|
-
disabled?: boolean;
|
32
|
-
placeholder?: string;
|
33
|
-
icon?: IconProps["svg"];
|
34
|
-
startSlot?: React.ReactNode;
|
35
|
-
onFocus?: (e: React.FocusEvent) => void;
|
36
|
-
onBlur?: (e: React.FocusEvent) => void;
|
37
|
-
className?: G.ClassName;
|
38
|
-
attributes?: G.Attributes<"div", Props>;
|
39
|
-
};
|
40
|
-
export type ControlledProps = BaseProps & {
|
41
|
-
value: string;
|
42
|
-
defaultValue?: never;
|
43
|
-
};
|
44
|
-
export type UncontrolledProps = BaseProps & {
|
45
|
-
value?: never;
|
46
|
-
defaultValue?: string;
|
47
|
-
};
|
48
|
-
export type Props = ControlledProps | UncontrolledProps;
|
49
|
-
export {};
|
@@ -1,26 +0,0 @@
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
-
var t = {};
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
-
t[p] = s[p];
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
-
t[p[i]] = s[p[i]];
|
9
|
-
}
|
10
|
-
return t;
|
11
|
-
};
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
13
|
-
import SliderControlled from "./SliderControlled.js";
|
14
|
-
import SliderUncontrolled from "./SliderUncontrolled.js";
|
15
|
-
const Slider = (props) => {
|
16
|
-
const { min = 0, max = 100 } = props, rest = __rest(props, ["min", "max"]);
|
17
|
-
if (("value" in props && props.value !== undefined) ||
|
18
|
-
("minValue" in props &&
|
19
|
-
"maxValue" in props &&
|
20
|
-
props.minValue !== undefined &&
|
21
|
-
props.maxValue !== undefined)) {
|
22
|
-
return _jsx(SliderControlled, Object.assign({}, rest, { min: min, max: max }));
|
23
|
-
}
|
24
|
-
return _jsx(SliderUncontrolled, Object.assign({}, rest, { min: min, max: max }));
|
25
|
-
};
|
26
|
-
export default Slider;
|
@@ -1 +0,0 @@
|
|
1
|
-
.root{--rs-slider-overflow-gap:var(--rs-unit-x1);--rs-slider-thumb-size:var(--rs-unit-x4);align-items:center;cursor:pointer;display:flex;height:var(--rs-slider-thumb-size);position:relative;user-select:none;-webkit-tap-highlight-color:transparent;margin-inline:calc(var(--rs-slider-overflow-gap) * -1);overflow-x:clip;padding-inline:var(--rs-slider-overflow-gap)}.root:has(.thumb:hover,.thumb--active,.input:focus){overflow:visible}.bar{background:var(--rs-color-background-neutral);border-radius:var(--rs-unit-radius-small);height:var(--rs-unit-x1);position:relative;width:100%}.bar,.input{overflow:hidden}.input{height:1px;opacity:0;pointer-events:none;position:absolute;width:1px}.selection{background:var(--rs-color-background-primary);height:100%;position:absolute}.tooltip{--rs-slider-tooltip-translate-x:calc(-50% + var(--rs-slider-tooltip-offset, 0px));background:var(--rs-color-background-elevation-overlay);border-radius:var(--rs-unit-radius-small);bottom:100%;box-shadow:var(--rs-shadow-overlay);box-sizing:initial;color:var(--rs-color-foreground-neutral);font-variant-numeric:tabular-nums;left:50%;min-width:var(--rs-line-height-caption-1);opacity:0;padding:calc(var(--rs-unit-x1) / 2) var(--rs-unit-x1);pointer-events:none;position:absolute;text-align:center;transform:translate(var(--rs-slider-tooltip-translate-x));transition:var(--rs-duration-fast) var(--rs-easing-standard);transition-property:opacity,transform;user-select:none;white-space:nowrap;will-change:transform}.thumbs{inset-inline:calc(var(--rs-slider-thumb-size) / 2 + var(--rs-slider-overflow-gap))}.thumb,.thumbs{height:100%;position:absolute}.thumb{width:0}.thumb:before{background:var(--rs-color-background-primary);border-radius:999px;box-shadow:0 0 0 2px var(--rs-color-background-elevation-base);box-sizing:border-box;height:var(--rs-slider-thumb-size);transition:var(--rs-duration-fast) var(--rs-easing-standard);transition-property:box-shadow;width:var(--rs-slider-thumb-size)}.thumb:after,.thumb:before{content:"";left:0;position:absolute;top:50%;transform:translate(-50%,-50%)}.thumb:after{cursor:grab;height:var(--rs-unit-x7);width:var(--rs-unit-x7)}.thumb:hover .tooltip{opacity:1;transform:translate(var(--rs-slider-tooltip-translate-x),calc(var(--rs-unit-x1) * -1.5))}.input:focus+.thumb:after,.thumb--active:after{cursor:grabbing}.input:focus+.thumb:before,.thumb--active:before{box-shadow:0 0 0 1px var(--rs-color-background-elevation-base)}.input:focus+.thumb .tooltip,.thumb--active .tooltip{opacity:1;transform:translate(var(--rs-slider-tooltip-translate-x),calc(var(--rs-unit-x1) * -1.5))!important}.input:focus+.thumb:before{box-shadow:var(--rs-focus-shadow)}.--disabled{cursor:not-allowed}.--disabled .bar{background-color:var(--rs-color-background-disabled)}.--disabled .selection,.--disabled .thumb:before{background-color:var(--rs-color-foreground-disabled)}.--disabled .thumb:after{cursor:not-allowed}.--disabled .thumb:hover .tooltip{opacity:0}
|
@@ -1,80 +0,0 @@
|
|
1
|
-
import type * as G from "../../types/global";
|
2
|
-
export type SingleChangeArgs = {
|
3
|
-
value: number;
|
4
|
-
minValue?: never;
|
5
|
-
maxValue?: never;
|
6
|
-
name: string;
|
7
|
-
};
|
8
|
-
export type RangeChangeArgs = {
|
9
|
-
value?: never;
|
10
|
-
minValue: number;
|
11
|
-
maxValue: number;
|
12
|
-
name: string;
|
13
|
-
};
|
14
|
-
type RangeSelectionProps = {
|
15
|
-
range: true;
|
16
|
-
onChange?: (args: RangeChangeArgs) => void;
|
17
|
-
onChangeCommit?: (args: RangeChangeArgs) => void;
|
18
|
-
};
|
19
|
-
type SingleSelectionProps = {
|
20
|
-
range?: false;
|
21
|
-
onChange?: (args: SingleChangeArgs) => void;
|
22
|
-
onChangeCommit?: (args: SingleChangeArgs) => void;
|
23
|
-
};
|
24
|
-
type ControlledSingleProps = {
|
25
|
-
value: number;
|
26
|
-
defaultValue?: never;
|
27
|
-
};
|
28
|
-
type ControlledRangeProps = {
|
29
|
-
minValue: number;
|
30
|
-
maxValue: number;
|
31
|
-
defaultMinValue?: never;
|
32
|
-
defaultMaxValue?: never;
|
33
|
-
};
|
34
|
-
type UncontrolledSingleProps = {
|
35
|
-
value?: never;
|
36
|
-
defaultValue?: number;
|
37
|
-
};
|
38
|
-
type UncontrolledRangeProps = {
|
39
|
-
minValue?: never;
|
40
|
-
maxValue?: never;
|
41
|
-
defaultMinValue?: number;
|
42
|
-
defaultMaxValue?: number;
|
43
|
-
};
|
44
|
-
type BaseProps = {
|
45
|
-
name: string;
|
46
|
-
step?: number;
|
47
|
-
disabled?: boolean;
|
48
|
-
min?: number;
|
49
|
-
max?: number;
|
50
|
-
renderValue?: (args: {
|
51
|
-
value: number;
|
52
|
-
}) => string;
|
53
|
-
className?: G.ClassName;
|
54
|
-
attributes?: G.Attributes<"div", Props>;
|
55
|
-
};
|
56
|
-
export type ControlledProps = BaseProps & ((ControlledSingleProps & SingleSelectionProps) | (ControlledRangeProps & RangeSelectionProps));
|
57
|
-
export type UncontrolledProps = BaseProps & ((UncontrolledSingleProps & SingleSelectionProps) | (UncontrolledRangeProps & RangeSelectionProps));
|
58
|
-
export type Props = ControlledProps | UncontrolledProps;
|
59
|
-
export type DefaultProps = {
|
60
|
-
min: number;
|
61
|
-
max: number;
|
62
|
-
};
|
63
|
-
export type ThumbProps = {
|
64
|
-
id: string;
|
65
|
-
name: string;
|
66
|
-
disabled?: boolean;
|
67
|
-
value: number;
|
68
|
-
active?: boolean;
|
69
|
-
position: number;
|
70
|
-
onChange: (value: number, options?: {
|
71
|
-
commit?: boolean;
|
72
|
-
}) => void;
|
73
|
-
onDragStart: () => void;
|
74
|
-
max: number;
|
75
|
-
min: number;
|
76
|
-
step: NonNullable<BaseProps["step"]>;
|
77
|
-
renderValue?: BaseProps["renderValue"];
|
78
|
-
tooltipRef: React.RefObject<HTMLDivElement>;
|
79
|
-
};
|
80
|
-
export {};
|
@@ -1,14 +0,0 @@
|
|
1
|
-
export const getPrecision = (value) => {
|
2
|
-
const floatPart = value.toString().split(".")[1];
|
3
|
-
return (floatPart === null || floatPart === void 0 ? void 0 : floatPart.length) || 0;
|
4
|
-
};
|
5
|
-
export const applyStepToValue = (value, step) => {
|
6
|
-
const isStepFloat = step % 1 !== 0;
|
7
|
-
const result = Math.round(value / step) * step;
|
8
|
-
// Handle javascript floats manually with string conversion
|
9
|
-
if (isStepFloat) {
|
10
|
-
const precision = getPrecision(step);
|
11
|
-
return Number(result.toFixed(precision));
|
12
|
-
}
|
13
|
-
return result;
|
14
|
-
};
|
@@ -1,209 +0,0 @@
|
|
1
|
-
"use client";
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
3
|
-
import React from "react";
|
4
|
-
import { classNames } from "../../utilities/helpers.js";
|
5
|
-
import { enableUserSelect, disableUserSelect } from "../../utilities/dom.js";
|
6
|
-
import useRTL from "../../hooks/useRTL.js";
|
7
|
-
import useElementId from "../../hooks/useElementId.js";
|
8
|
-
import { useFormControl } from "../FormControl/index.js";
|
9
|
-
import SliderThumb from "./SliderThumb.js";
|
10
|
-
import { applyStepToValue } from "./Slider.utilities.js";
|
11
|
-
import s from "./Slider.module.css";
|
12
|
-
const THUMB_SIZE = 16;
|
13
|
-
const getDragX = (event) => {
|
14
|
-
if (event instanceof MouseEvent)
|
15
|
-
return event.pageX || event.screenX;
|
16
|
-
return event.changedTouches[0].pageX;
|
17
|
-
};
|
18
|
-
const SliderControlled = (props) => {
|
19
|
-
var _a;
|
20
|
-
const { name, range, max, min, step = 1, onChange, onChangeCommit, renderValue, className, attributes, } = props;
|
21
|
-
const minValue = range && props.minValue !== undefined ? applyStepToValue(props.minValue, step) : undefined;
|
22
|
-
const maxValue = applyStepToValue(range ? props.maxValue : props.value, step);
|
23
|
-
const barRef = React.useRef(null);
|
24
|
-
const minRef = React.useRef(null);
|
25
|
-
const maxRef = React.useRef(null);
|
26
|
-
const minTooltipRef = React.useRef(null);
|
27
|
-
const maxTooltipRef = React.useRef(null);
|
28
|
-
const [draggingId, setDraggingId] = React.useState(null);
|
29
|
-
const [rtl] = useRTL();
|
30
|
-
const formControl = useFormControl();
|
31
|
-
const id = useElementId();
|
32
|
-
const inputId = ((_a = formControl === null || formControl === void 0 ? void 0 : formControl.attributes) === null || _a === void 0 ? void 0 : _a.id) || id;
|
33
|
-
const minId = `${inputId}-min`;
|
34
|
-
const maxId = `${inputId}-max`;
|
35
|
-
const disabled = (formControl === null || formControl === void 0 ? void 0 : formControl.disabled) || props.disabled;
|
36
|
-
const rootClassNames = classNames(s.root, disabled && s["--disabled"], className);
|
37
|
-
const getPositionValue = React.useCallback((x) => {
|
38
|
-
if (!barRef.current)
|
39
|
-
return;
|
40
|
-
const barWidth = barRef.current.clientWidth;
|
41
|
-
// Move by half thumb size since it's a reserved space
|
42
|
-
const barX = barRef.current.getBoundingClientRect().left + THUMB_SIZE / 2;
|
43
|
-
const positionX = x - barX;
|
44
|
-
const thumbsAreaWidth = barWidth - THUMB_SIZE;
|
45
|
-
let percentage = positionX / thumbsAreaWidth;
|
46
|
-
if (rtl)
|
47
|
-
percentage = 1 - percentage;
|
48
|
-
let value = (max - min) * percentage + min;
|
49
|
-
value = Math.max(min, Math.min(max, value));
|
50
|
-
return applyStepToValue(value, step);
|
51
|
-
}, [max, min, rtl, step]);
|
52
|
-
const getPercentPosition = (value) => {
|
53
|
-
const ratio = (value - min) / (max - min);
|
54
|
-
return ratio * 100;
|
55
|
-
};
|
56
|
-
const positionTooltip = React.useCallback((draggingId) => {
|
57
|
-
var _a, _b, _c;
|
58
|
-
const draggingRef = draggingId === minId ? minTooltipRef : maxTooltipRef;
|
59
|
-
const thumbRef = draggingId === minId ? minRef : maxRef;
|
60
|
-
let nextTooltipOffset = 0;
|
61
|
-
const barRect = (_a = barRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
62
|
-
const draggingRect = (_b = draggingRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
63
|
-
const thumbRect = (_c = thumbRef.current) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect();
|
64
|
-
const barLeftSide = barRect === null || barRect === void 0 ? void 0 : barRect.left;
|
65
|
-
const barRightSide = barLeftSide && barLeftSide + (barRect === null || barRect === void 0 ? void 0 : barRect.width);
|
66
|
-
const tooltipLeftSide = thumbRect && draggingRect && thumbRect.left - draggingRect.width / 2;
|
67
|
-
const tooltipRightSide = thumbRect && draggingRect && thumbRect.left + draggingRect.width / 2;
|
68
|
-
// Crosses the left slider boundary
|
69
|
-
if (tooltipLeftSide && barLeftSide && tooltipLeftSide < barLeftSide - 8) {
|
70
|
-
nextTooltipOffset = draggingRect.width / 2 - 8;
|
71
|
-
}
|
72
|
-
// Crosses the right slider boundary
|
73
|
-
if (tooltipRightSide && barRightSide && tooltipRightSide > barRightSide) {
|
74
|
-
nextTooltipOffset = -(draggingRect.width / 2 - 8);
|
75
|
-
}
|
76
|
-
const tooltipEl = draggingRef.current;
|
77
|
-
if (tooltipEl) {
|
78
|
-
tooltipEl.style.setProperty("--rs-slider-tooltip-offset", `${nextTooltipOffset || 0}px`);
|
79
|
-
}
|
80
|
-
}, [minId]);
|
81
|
-
const handleMinChange = React.useCallback((value, options) => {
|
82
|
-
if (!range)
|
83
|
-
return;
|
84
|
-
const method = (options === null || options === void 0 ? void 0 : options.commit) ? onChangeCommit : onChange;
|
85
|
-
method === null || method === void 0 ? void 0 : method({ minValue: value, maxValue, name });
|
86
|
-
},
|
87
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
88
|
-
[maxValue, name, range]);
|
89
|
-
const handleMaxChange = React.useCallback((value, options) => {
|
90
|
-
if (range) {
|
91
|
-
const method = (options === null || options === void 0 ? void 0 : options.commit) ? onChangeCommit : onChange;
|
92
|
-
method === null || method === void 0 ? void 0 : method({ minValue: minValue, maxValue: value, name });
|
93
|
-
return;
|
94
|
-
}
|
95
|
-
const method = (options === null || options === void 0 ? void 0 : options.commit) ? onChangeCommit : onChange;
|
96
|
-
method === null || method === void 0 ? void 0 : method({ value, name });
|
97
|
-
},
|
98
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
99
|
-
[minValue, name, range]);
|
100
|
-
const handleMouseDown = ({ nativeEvent }) => {
|
101
|
-
if (disabled)
|
102
|
-
return;
|
103
|
-
let minDistance;
|
104
|
-
let closestId;
|
105
|
-
const x = getDragX(nativeEvent);
|
106
|
-
const nextValue = getPositionValue(x);
|
107
|
-
const thumbs = [
|
108
|
-
{ ref: minRef, id: minId },
|
109
|
-
{ ref: maxRef, id: maxId },
|
110
|
-
];
|
111
|
-
thumbs.forEach((item) => {
|
112
|
-
if (!item.ref.current)
|
113
|
-
return;
|
114
|
-
const el = item.ref.current;
|
115
|
-
const distance = Math.abs(el.getBoundingClientRect().left - x);
|
116
|
-
if (minDistance === undefined || distance <= minDistance) {
|
117
|
-
minDistance = distance;
|
118
|
-
closestId = item.id;
|
119
|
-
}
|
120
|
-
});
|
121
|
-
if (!closestId || nextValue === undefined)
|
122
|
-
return;
|
123
|
-
if (closestId === minId)
|
124
|
-
handleMinChange(nextValue);
|
125
|
-
if (closestId === maxId)
|
126
|
-
handleMaxChange(nextValue);
|
127
|
-
disableUserSelect();
|
128
|
-
setDraggingId(closestId);
|
129
|
-
};
|
130
|
-
const handleMinDragStart = () => {
|
131
|
-
if (disabled)
|
132
|
-
return;
|
133
|
-
setDraggingId(minId);
|
134
|
-
};
|
135
|
-
const handleMaxDragStart = () => {
|
136
|
-
if (disabled)
|
137
|
-
return;
|
138
|
-
setDraggingId(maxId);
|
139
|
-
};
|
140
|
-
const handleDragStop = React.useCallback(() => {
|
141
|
-
if (draggingId === minId && minValue !== undefined) {
|
142
|
-
handleMinChange(minValue, { commit: true });
|
143
|
-
}
|
144
|
-
if (draggingId === maxId) {
|
145
|
-
handleMaxChange(maxValue, { commit: true });
|
146
|
-
}
|
147
|
-
enableUserSelect();
|
148
|
-
setDraggingId(null);
|
149
|
-
}, [minValue, maxValue, handleMinChange, handleMaxChange, draggingId, minId, maxId]);
|
150
|
-
const handleDrag = React.useCallback((e) => {
|
151
|
-
if (!draggingId)
|
152
|
-
return;
|
153
|
-
const x = getDragX(e);
|
154
|
-
const nextValue = getPositionValue(x);
|
155
|
-
if (nextValue === undefined)
|
156
|
-
return;
|
157
|
-
// Switch to another id if thumbs overlap
|
158
|
-
let nextDraggingId = draggingId;
|
159
|
-
if (draggingId === minId && nextValue > maxValue)
|
160
|
-
nextDraggingId = maxId;
|
161
|
-
if (draggingId === maxId && minValue && nextValue < minValue)
|
162
|
-
nextDraggingId = minId;
|
163
|
-
if (nextDraggingId === minId)
|
164
|
-
handleMinChange(nextValue);
|
165
|
-
if (nextDraggingId === maxId)
|
166
|
-
handleMaxChange(nextValue);
|
167
|
-
if (draggingId !== nextDraggingId)
|
168
|
-
setDraggingId(nextDraggingId);
|
169
|
-
}, [
|
170
|
-
draggingId,
|
171
|
-
minValue,
|
172
|
-
maxValue,
|
173
|
-
getPositionValue,
|
174
|
-
handleMaxChange,
|
175
|
-
handleMinChange,
|
176
|
-
maxId,
|
177
|
-
minId,
|
178
|
-
]);
|
179
|
-
React.useEffect(() => {
|
180
|
-
positionTooltip(minId);
|
181
|
-
positionTooltip(maxId);
|
182
|
-
}, [positionTooltip, minId, maxId]);
|
183
|
-
React.useEffect(() => {
|
184
|
-
positionTooltip(minId);
|
185
|
-
positionTooltip(maxId);
|
186
|
-
}, [minId, maxId, minValue, maxValue, positionTooltip]);
|
187
|
-
React.useEffect(() => {
|
188
|
-
window.addEventListener("mouseup", handleDragStop);
|
189
|
-
window.addEventListener("touchend", handleDragStop);
|
190
|
-
window.addEventListener("mousemove", handleDrag);
|
191
|
-
window.addEventListener("touchmove", handleDrag);
|
192
|
-
return () => {
|
193
|
-
window.removeEventListener("mouseup", handleDragStop);
|
194
|
-
window.removeEventListener("touchend", handleDragStop);
|
195
|
-
window.removeEventListener("mousemove", handleDrag);
|
196
|
-
window.removeEventListener("touchmove", handleDrag);
|
197
|
-
};
|
198
|
-
}, [handleDragStop, handleDrag]);
|
199
|
-
const minPercentPosition = minValue && getPercentPosition(minValue);
|
200
|
-
const maxPercentPosition = getPercentPosition(maxValue);
|
201
|
-
return (
|
202
|
-
// mouse/touch events only needed for non-keyboard use
|
203
|
-
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
204
|
-
_jsxs("div", Object.assign({}, attributes, { className: rootClassNames, onMouseDown: handleMouseDown, onTouchStart: handleMouseDown, children: [_jsx("div", { className: s.bar, ref: barRef, children: _jsx("div", { className: s.selection, style: {
|
205
|
-
insetInlineStart: `${minPercentPosition || 0}%`,
|
206
|
-
width: `${maxPercentPosition - (minPercentPosition || 0)}%`,
|
207
|
-
} }) }), _jsxs("div", { className: s.thumbs, children: [minValue !== undefined && minPercentPosition !== undefined && (_jsx(SliderThumb, { id: minId, active: minId === draggingId, name: name, disabled: disabled, onChange: handleMinChange, value: minValue, onDragStart: handleMinDragStart, position: minPercentPosition, max: max, min: min, ref: minRef, tooltipRef: minTooltipRef, renderValue: renderValue, step: step })), _jsx(SliderThumb, { id: maxId, active: maxId === draggingId, name: name, disabled: disabled, onChange: handleMaxChange, value: maxValue, onDragStart: handleMaxDragStart, position: maxPercentPosition, max: max, min: min, ref: maxRef, tooltipRef: maxTooltipRef, renderValue: renderValue, step: step })] })] })));
|
208
|
-
};
|
209
|
-
export default SliderControlled;
|
@@ -1,33 +0,0 @@
|
|
1
|
-
"use client";
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
3
|
-
import React from "react";
|
4
|
-
import SliderControlled from "./SliderControlled.js";
|
5
|
-
const SliderUncontrolled = (props) => {
|
6
|
-
const { min, max, onChange, range } = props;
|
7
|
-
const defaultMinValue = ("defaultMinValue" in props && props.defaultMinValue !== undefined && props.defaultMinValue) ||
|
8
|
-
("defaultValue" in props && props.defaultValue !== undefined && props.defaultValue) ||
|
9
|
-
min;
|
10
|
-
const defaultMaxValue = ("defaultMaxValue" in props && props.defaultMaxValue !== undefined && props.defaultMaxValue) ||
|
11
|
-
("defaultValue" in props && props.defaultValue !== undefined && props.defaultValue) ||
|
12
|
-
(range ? max : min);
|
13
|
-
const [minValue, setMinValue] = React.useState(defaultMinValue);
|
14
|
-
const [maxValue, setMaxValue] = React.useState(defaultMaxValue);
|
15
|
-
const handleSingleChange = (args) => {
|
16
|
-
if (range)
|
17
|
-
return;
|
18
|
-
setMaxValue(args.value);
|
19
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(args);
|
20
|
-
};
|
21
|
-
const handleRangeChange = (args) => {
|
22
|
-
if (!range)
|
23
|
-
return;
|
24
|
-
setMinValue(args.minValue);
|
25
|
-
setMaxValue(args.maxValue);
|
26
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(args);
|
27
|
-
};
|
28
|
-
if (range) {
|
29
|
-
return (_jsx(SliderControlled, Object.assign({}, props, { min: min, max: max, minValue: minValue, maxValue: maxValue, defaultMinValue: undefined, defaultMaxValue: undefined, onChange: handleRangeChange })));
|
30
|
-
}
|
31
|
-
return (_jsx(SliderControlled, Object.assign({}, props, { min: min, max: max, value: maxValue, defaultValue: undefined, onChange: handleSingleChange })));
|
32
|
-
};
|
33
|
-
export default SliderUncontrolled;
|