moduix 0.10.0 → 0.11.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/README.md +9 -2
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/components/Accordion/Accordion.cjs +65 -0
- package/dist/components/Accordion/Accordion.css +99 -0
- package/dist/components/Accordion/Accordion.d.ts +17 -9
- package/dist/components/Accordion/Accordion.js +60 -0
- package/dist/components/Accordion/Accordion.module.cjs +12 -0
- package/dist/components/Accordion/Accordion.module.js +12 -0
- package/dist/components/Accordion/index.d.ts +1 -1
- package/dist/components/Alert/Alert.cjs +50 -0
- package/dist/components/Alert/Alert.css +114 -0
- package/dist/components/Alert/Alert.d.ts +33 -9
- package/dist/components/Alert/Alert.js +44 -0
- package/dist/components/Alert/Alert.module.cjs +11 -0
- package/dist/components/Alert/Alert.module.js +11 -0
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/AlertDialog/AlertDialog.cjs +122 -0
- package/dist/components/AlertDialog/AlertDialog.css +159 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +66 -15
- package/dist/components/AlertDialog/AlertDialog.js +107 -0
- package/dist/components/AlertDialog/AlertDialog.module.cjs +18 -0
- package/dist/components/AlertDialog/AlertDialog.module.js +18 -0
- package/dist/components/AlertDialog/index.d.ts +1 -1
- package/dist/components/AspectRatio/AspectRatio.cjs +24 -0
- package/dist/components/AspectRatio/AspectRatio.css +14 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +14 -0
- package/dist/components/AspectRatio/AspectRatio.js +24 -0
- package/dist/components/AspectRatio/AspectRatio.module.cjs +5 -0
- package/dist/components/AspectRatio/AspectRatio.module.js +5 -0
- package/dist/components/AspectRatio/index.d.ts +1 -0
- package/dist/components/Autocomplete/Autocomplete.cjs +303 -0
- package/dist/components/Autocomplete/Autocomplete.css +454 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +40 -37
- package/dist/components/Autocomplete/Autocomplete.js +271 -0
- package/dist/components/Autocomplete/Autocomplete.module.cjs +37 -0
- package/dist/components/Autocomplete/Autocomplete.module.js +37 -0
- package/dist/components/Autocomplete/index.d.ts +1 -1
- package/dist/components/Avatar/Avatar.cjs +31 -0
- package/dist/components/Avatar/Avatar.css +74 -0
- package/dist/components/Avatar/Avatar.d.ts +21 -5
- package/dist/components/Avatar/Avatar.js +29 -0
- package/dist/components/Avatar/Avatar.module.cjs +9 -0
- package/dist/components/Avatar/Avatar.module.js +9 -0
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Badge/Badge.cjs +25 -0
- package/dist/components/Badge/Badge.css +66 -0
- package/dist/components/Badge/Badge.d.ts +19 -6
- package/dist/components/Badge/Badge.js +22 -0
- package/dist/components/Badge/Badge.module.cjs +8 -0
- package/dist/components/Badge/Badge.module.js +8 -0
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Bleed/Bleed.cjs +17 -0
- package/dist/components/Bleed/Bleed.css +51 -0
- package/dist/components/Bleed/Bleed.d.ts +16 -7
- package/dist/components/Bleed/Bleed.js +15 -0
- package/dist/components/Bleed/Bleed.module.cjs +5 -0
- package/dist/components/Bleed/Bleed.module.js +5 -0
- package/dist/components/Bleed/index.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +72 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.css +88 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +38 -10
- package/dist/components/Breadcrumbs/Breadcrumbs.js +66 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.module.cjs +13 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.module.js +13 -0
- package/dist/components/Breadcrumbs/index.d.ts +1 -1
- package/dist/components/Button/Button.cjs +18 -0
- package/dist/components/Button/Button.css +194 -0
- package/dist/components/Button/Button.d.ts +12 -5
- package/dist/components/Button/Button.js +18 -0
- package/dist/components/Button/Button.module.cjs +5 -0
- package/dist/components/Button/Button.module.js +5 -0
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Card/Card.cjs +81 -0
- package/dist/components/Card/Card.css +136 -0
- package/dist/components/Card/Card.d.ts +48 -13
- package/dist/components/Card/Card.js +72 -0
- package/dist/components/Card/Card.module.cjs +14 -0
- package/dist/components/Card/Card.module.js +14 -0
- package/dist/components/Card/index.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +63 -0
- package/dist/components/Checkbox/Checkbox.css +131 -0
- package/dist/components/Checkbox/Checkbox.d.ts +27 -10
- package/dist/components/Checkbox/Checkbox.js +59 -0
- package/dist/components/Checkbox/Checkbox.module.cjs +13 -0
- package/dist/components/Checkbox/Checkbox.module.js +13 -0
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.cjs +55 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.css +33 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +28 -10
- package/dist/components/CheckboxGroup/CheckboxGroup.js +50 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.module.cjs +11 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.module.js +11 -0
- package/dist/components/CheckboxGroup/index.d.ts +1 -1
- package/dist/components/CloseButton/CloseButton.cjs +22 -0
- package/dist/components/CloseButton/CloseButton.css +49 -0
- package/dist/components/CloseButton/CloseButton.d.ts +4 -2
- package/dist/components/CloseButton/CloseButton.js +22 -0
- package/dist/components/CloseButton/CloseButton.module.cjs +5 -0
- package/dist/components/CloseButton/CloseButton.module.js +5 -0
- package/dist/components/Collapsible/Collapsible.cjs +47 -0
- package/dist/components/Collapsible/Collapsible.css +92 -0
- package/dist/components/Collapsible/Collapsible.d.ts +14 -6
- package/dist/components/Collapsible/Collapsible.js +44 -0
- package/dist/components/Collapsible/Collapsible.module.cjs +10 -0
- package/dist/components/Collapsible/Collapsible.module.js +10 -0
- package/dist/components/Collapsible/index.d.ts +1 -1
- package/dist/components/Combobox/Combobox.cjs +330 -0
- package/dist/components/Combobox/Combobox.css +497 -0
- package/dist/components/Combobox/Combobox.d.ts +59 -42
- package/dist/components/Combobox/Combobox.js +295 -0
- package/dist/components/Combobox/Combobox.module.cjs +42 -0
- package/dist/components/Combobox/Combobox.module.js +42 -0
- package/dist/components/Combobox/index.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPalette.cjs +304 -0
- package/dist/components/CommandPalette/CommandPalette.css +375 -0
- package/dist/components/CommandPalette/CommandPalette.d.ts +137 -48
- package/dist/components/CommandPalette/CommandPalette.js +278 -0
- package/dist/components/CommandPalette/CommandPalette.module.cjs +30 -0
- package/dist/components/CommandPalette/CommandPalette.module.js +30 -0
- package/dist/components/CommandPalette/index.d.ts +1 -1
- package/dist/components/Container/Container.cjs +17 -0
- package/dist/components/Container/Container.css +45 -0
- package/dist/components/Container/Container.d.ts +16 -8
- package/dist/components/Container/Container.js +15 -0
- package/dist/components/Container/Container.module.cjs +5 -0
- package/dist/components/Container/Container.module.js +5 -0
- package/dist/components/Container/index.d.ts +1 -1
- package/dist/components/ContextMenu/ContextMenu.cjs +241 -0
- package/dist/components/ContextMenu/ContextMenu.css +308 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +133 -38
- package/dist/components/ContextMenu/ContextMenu.js +215 -0
- package/dist/components/ContextMenu/ContextMenu.module.cjs +33 -0
- package/dist/components/ContextMenu/ContextMenu.module.js +33 -0
- package/dist/components/ContextMenu/index.d.ts +1 -1
- package/dist/components/CopyButton/CopyButton.cjs +66 -0
- package/dist/components/CopyButton/CopyButton.css +14 -0
- package/dist/components/CopyButton/CopyButton.d.ts +16 -0
- package/dist/components/CopyButton/CopyButton.js +66 -0
- package/dist/components/CopyButton/CopyButton.module.cjs +5 -0
- package/dist/components/CopyButton/CopyButton.module.js +5 -0
- package/dist/components/CopyButton/index.d.ts +1 -0
- package/dist/components/Dialog/Dialog.cjs +136 -0
- package/dist/components/Dialog/Dialog.css +186 -0
- package/dist/components/Dialog/Dialog.d.ts +68 -18
- package/dist/components/Dialog/Dialog.js +122 -0
- package/dist/components/Dialog/Dialog.module.cjs +18 -0
- package/dist/components/Dialog/Dialog.module.js +18 -0
- package/dist/components/Dialog/index.d.ts +1 -1
- package/dist/components/Drawer/Drawer.cjs +202 -0
- package/dist/components/Drawer/Drawer.css +483 -0
- package/dist/components/Drawer/Drawer.d.ts +96 -27
- package/dist/components/Drawer/Drawer.js +182 -0
- package/dist/components/Drawer/Drawer.module.cjs +24 -0
- package/dist/components/Drawer/Drawer.module.js +24 -0
- package/dist/components/Drawer/index.d.ts +1 -1
- package/dist/components/Empty/Empty.cjs +55 -0
- package/dist/components/Empty/Empty.css +78 -0
- package/dist/components/Empty/Empty.d.ts +33 -0
- package/dist/components/Empty/Empty.js +48 -0
- package/dist/components/Empty/Empty.module.cjs +12 -0
- package/dist/components/Empty/Empty.module.js +12 -0
- package/dist/components/Empty/index.d.ts +1 -0
- package/dist/components/Field/Field.cjs +56 -0
- package/dist/components/Field/Field.css +86 -0
- package/dist/components/Field/Field.d.ts +30 -9
- package/dist/components/Field/Field.js +50 -0
- package/dist/components/Field/Field.module.cjs +12 -0
- package/dist/components/Field/Field.module.js +12 -0
- package/dist/components/Field/index.d.ts +1 -1
- package/dist/components/Fieldset/Fieldset.cjs +22 -0
- package/dist/components/Fieldset/Fieldset.css +39 -0
- package/dist/components/Fieldset/Fieldset.d.ts +13 -4
- package/dist/components/Fieldset/Fieldset.js +21 -0
- package/dist/components/Fieldset/Fieldset.module.cjs +8 -0
- package/dist/components/Fieldset/Fieldset.module.js +8 -0
- package/dist/components/Fieldset/index.d.ts +1 -1
- package/dist/components/Form/Form.cjs +16 -0
- package/dist/components/Form/Form.css +9 -0
- package/dist/components/Form/Form.d.ts +6 -3
- package/dist/components/Form/Form.js +16 -0
- package/dist/components/Form/Form.module.cjs +5 -0
- package/dist/components/Form/Form.module.js +5 -0
- package/dist/components/Form/index.d.ts +1 -1
- package/dist/components/Heading/Heading.cjs +25 -0
- package/dist/components/Heading/Heading.css +50 -0
- package/dist/components/Heading/Heading.d.ts +24 -13
- package/dist/components/Heading/Heading.js +23 -0
- package/dist/components/Heading/Heading.module.cjs +5 -0
- package/dist/components/Heading/Heading.module.js +5 -0
- package/dist/components/Heading/index.d.ts +1 -1
- package/dist/components/Input/Input.cjs +18 -0
- package/dist/components/Input/Input.css +78 -0
- package/dist/components/Input/Input.d.ts +12 -7
- package/dist/components/Input/Input.js +18 -0
- package/dist/components/Input/Input.module.cjs +5 -0
- package/dist/components/Input/Input.module.js +5 -0
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/InputGroup/InputGroup.cjs +77 -0
- package/dist/components/InputGroup/InputGroup.css +160 -0
- package/dist/components/InputGroup/InputGroup.d.ts +14 -16
- package/dist/components/InputGroup/InputGroup.js +73 -0
- package/dist/components/InputGroup/InputGroup.module.cjs +11 -0
- package/dist/components/InputGroup/InputGroup.module.js +11 -0
- package/dist/components/InputGroup/index.d.ts +1 -1
- package/dist/components/Kbd/Kbd.cjs +23 -0
- package/dist/components/Kbd/Kbd.css +49 -0
- package/dist/components/Kbd/Kbd.d.ts +13 -4
- package/dist/components/Kbd/Kbd.js +20 -0
- package/dist/components/Kbd/Kbd.module.cjs +8 -0
- package/dist/components/Kbd/Kbd.module.js +8 -0
- package/dist/components/Kbd/index.d.ts +1 -1
- package/dist/components/Lightbox/Lightbox.cjs +220 -0
- package/dist/components/Lightbox/Lightbox.css +114 -0
- package/dist/components/Lightbox/Lightbox.d.ts +84 -31
- package/dist/components/Lightbox/Lightbox.js +208 -0
- package/dist/components/Lightbox/Lightbox.module.cjs +14 -0
- package/dist/components/Lightbox/Lightbox.module.js +14 -0
- package/dist/components/Lightbox/index.d.ts +1 -1
- package/dist/components/List/List.cjs +31 -0
- package/dist/components/List/List.css +114 -0
- package/dist/components/List/List.d.ts +33 -11
- package/dist/components/List/List.js +28 -0
- package/dist/components/List/List.module.cjs +5 -0
- package/dist/components/List/List.module.js +5 -0
- package/dist/components/List/index.d.ts +1 -1
- package/dist/components/Menu/Menu.cjs +260 -0
- package/dist/components/Menu/Menu.css +377 -0
- package/dist/components/Menu/Menu.d.ts +143 -41
- package/dist/components/Menu/Menu.js +231 -0
- package/dist/components/Menu/Menu.module.cjs +36 -0
- package/dist/components/Menu/Menu.module.js +36 -0
- package/dist/components/Menu/index.d.ts +1 -1
- package/dist/components/Menubar/Menubar.cjs +261 -0
- package/dist/components/Menubar/Menubar.css +387 -0
- package/dist/components/Menubar/Menubar.d.ts +146 -42
- package/dist/components/Menubar/Menubar.js +232 -0
- package/dist/components/Menubar/Menubar.module.cjs +36 -0
- package/dist/components/Menubar/Menubar.module.js +36 -0
- package/dist/components/Menubar/index.d.ts +1 -1
- package/dist/components/Meter/Meter.cjs +60 -0
- package/dist/components/Meter/Meter.css +46 -0
- package/dist/components/Meter/Meter.d.ts +9 -8
- package/dist/components/Meter/Meter.js +55 -0
- package/dist/components/Meter/Meter.module.cjs +11 -0
- package/dist/components/Meter/Meter.module.js +11 -0
- package/dist/components/NavigationMenu/NavigationMenu.cjs +146 -0
- package/dist/components/NavigationMenu/NavigationMenu.css +319 -0
- package/dist/components/NavigationMenu/NavigationMenu.d.ts +82 -22
- package/dist/components/NavigationMenu/NavigationMenu.js +134 -0
- package/dist/components/NavigationMenu/NavigationMenu.module.cjs +21 -0
- package/dist/components/NavigationMenu/NavigationMenu.module.js +21 -0
- package/dist/components/NavigationMenu/index.d.ts +1 -1
- package/dist/components/NumberField/NumberField.cjs +82 -0
- package/dist/components/NumberField/NumberField.css +158 -0
- package/dist/components/NumberField/NumberField.d.ts +49 -13
- package/dist/components/NumberField/NumberField.js +75 -0
- package/dist/components/NumberField/NumberField.module.cjs +13 -0
- package/dist/components/NumberField/NumberField.module.js +13 -0
- package/dist/components/NumberField/index.d.ts +1 -1
- package/dist/components/OTPField/OTPField.cjs +41 -0
- package/dist/components/OTPField/OTPField.css +78 -0
- package/dist/components/OTPField/OTPField.d.ts +19 -5
- package/dist/components/OTPField/OTPField.js +39 -0
- package/dist/components/OTPField/OTPField.module.cjs +9 -0
- package/dist/components/OTPField/OTPField.module.js +9 -0
- package/dist/components/OTPField/index.d.ts +1 -1
- package/dist/components/Pagination/Pagination.cjs +123 -0
- package/dist/components/Pagination/Pagination.css +103 -0
- package/dist/components/Pagination/Pagination.d.ts +61 -23
- package/dist/components/Pagination/Pagination.js +116 -0
- package/dist/components/Pagination/Pagination.module.cjs +16 -0
- package/dist/components/Pagination/Pagination.module.js +16 -0
- package/dist/components/Pagination/index.d.ts +1 -1
- package/dist/components/PasswordInput/PasswordInput.cjs +47 -0
- package/dist/components/PasswordInput/PasswordInput.css +19 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +16 -0
- package/dist/components/PasswordInput/PasswordInput.js +47 -0
- package/dist/components/PasswordInput/PasswordInput.module.cjs +9 -0
- package/dist/components/PasswordInput/PasswordInput.module.js +9 -0
- package/dist/components/PasswordInput/index.d.ts +1 -0
- package/dist/components/Popover/Popover.cjs +146 -0
- package/dist/components/Popover/Popover.css +200 -0
- package/dist/components/Popover/Popover.d.ts +79 -22
- package/dist/components/Popover/Popover.js +131 -0
- package/dist/components/Popover/Popover.module.cjs +22 -0
- package/dist/components/Popover/Popover.module.js +22 -0
- package/dist/components/Popover/index.d.ts +1 -1
- package/dist/components/PreviewCard/PreviewCard.cjs +96 -0
- package/dist/components/PreviewCard/PreviewCard.css +136 -0
- package/dist/components/PreviewCard/PreviewCard.d.ts +51 -15
- package/dist/components/PreviewCard/PreviewCard.js +87 -0
- package/dist/components/PreviewCard/PreviewCard.module.cjs +16 -0
- package/dist/components/PreviewCard/PreviewCard.module.js +16 -0
- package/dist/components/PreviewCard/index.d.ts +1 -1
- package/dist/components/Progress/Progress.cjs +60 -0
- package/dist/components/Progress/Progress.css +68 -0
- package/dist/components/Progress/Progress.d.ts +9 -7
- package/dist/components/Progress/Progress.js +55 -0
- package/dist/components/Progress/Progress.module.cjs +12 -0
- package/dist/components/Progress/Progress.module.js +12 -0
- package/dist/components/Radio/Radio.cjs +78 -0
- package/dist/components/Radio/Radio.css +141 -0
- package/dist/components/Radio/Radio.d.ts +39 -14
- package/dist/components/Radio/Radio.js +71 -0
- package/dist/components/Radio/Radio.module.cjs +14 -0
- package/dist/components/Radio/Radio.module.js +14 -0
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/Rating/Rating.cjs +61 -0
- package/dist/components/Rating/Rating.css +79 -0
- package/dist/components/Rating/Rating.d.ts +14 -0
- package/dist/components/Rating/Rating.js +61 -0
- package/dist/components/Rating/Rating.module.cjs +9 -0
- package/dist/components/Rating/Rating.module.js +9 -0
- package/dist/components/Rating/index.d.ts +1 -0
- package/dist/components/ScrollArea/ScrollArea.cjs +82 -0
- package/dist/components/ScrollArea/ScrollArea.css +205 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +16 -14
- package/dist/components/ScrollArea/ScrollArea.js +76 -0
- package/dist/components/ScrollArea/ScrollArea.module.cjs +12 -0
- package/dist/components/ScrollArea/ScrollArea.module.js +12 -0
- package/dist/components/ScrollArea/index.d.ts +1 -1
- package/dist/components/Select/Select.cjs +219 -0
- package/dist/components/Select/Select.css +357 -0
- package/dist/components/Select/Select.d.ts +117 -32
- package/dist/components/Select/Select.js +196 -0
- package/dist/components/Select/Select.module.cjs +33 -0
- package/dist/components/Select/Select.module.js +33 -0
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Separator/Separator.cjs +16 -0
- package/dist/components/Separator/Separator.css +17 -0
- package/dist/components/Separator/Separator.d.ts +4 -4
- package/dist/components/Separator/Separator.js +16 -0
- package/dist/components/Separator/Separator.module.cjs +5 -0
- package/dist/components/Separator/Separator.module.js +5 -0
- package/dist/components/Skeleton/Skeleton.cjs +25 -0
- package/dist/components/Skeleton/Skeleton.css +21 -0
- package/dist/components/Skeleton/Skeleton.d.ts +23 -10
- package/dist/components/Skeleton/Skeleton.js +25 -0
- package/dist/components/Skeleton/Skeleton.module.cjs +5 -0
- package/dist/components/Skeleton/Skeleton.module.js +5 -0
- package/dist/components/Skeleton/index.d.ts +1 -1
- package/dist/components/Slider/Slider.cjs +106 -0
- package/dist/components/Slider/Slider.css +115 -0
- package/dist/components/Slider/Slider.d.ts +16 -10
- package/dist/components/Slider/Slider.js +99 -0
- package/dist/components/Slider/Slider.module.cjs +13 -0
- package/dist/components/Slider/Slider.module.js +13 -0
- package/dist/components/Slider/index.d.ts +1 -1
- package/dist/components/SnapCarousel/SnapCarousel.cjs +130 -0
- package/dist/components/SnapCarousel/SnapCarousel.css +131 -0
- package/dist/components/SnapCarousel/SnapCarousel.d.ts +45 -0
- package/dist/components/SnapCarousel/SnapCarousel.js +125 -0
- package/dist/components/SnapCarousel/SnapCarousel.module.cjs +13 -0
- package/dist/components/SnapCarousel/SnapCarousel.module.js +13 -0
- package/dist/components/SnapCarousel/index.d.ts +1 -0
- package/dist/components/Spinner/Spinner.cjs +30 -0
- package/dist/components/Spinner/Spinner.css +60 -0
- package/dist/components/Spinner/Spinner.d.ts +18 -6
- package/dist/components/Spinner/Spinner.js +28 -0
- package/dist/components/Spinner/Spinner.module.cjs +9 -0
- package/dist/components/Spinner/Spinner.module.js +9 -0
- package/dist/components/Spinner/index.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.cjs +69 -0
- package/dist/components/SplitButton/SplitButton.css +59 -0
- package/dist/components/SplitButton/SplitButton.d.ts +46 -0
- package/dist/components/SplitButton/SplitButton.js +66 -0
- package/dist/components/SplitButton/SplitButton.module.cjs +9 -0
- package/dist/components/SplitButton/SplitButton.module.js +9 -0
- package/dist/components/SplitButton/index.d.ts +1 -0
- package/dist/components/Stack/Stack.cjs +27 -0
- package/dist/components/Stack/Stack.css +13 -0
- package/dist/components/Stack/Stack.d.ts +28 -14
- package/dist/components/Stack/Stack.js +27 -0
- package/dist/components/Stack/Stack.module.cjs +5 -0
- package/dist/components/Stack/Stack.module.js +5 -0
- package/dist/components/Stack/index.d.ts +1 -1
- package/dist/components/Stepper/Stepper.cjs +138 -0
- package/dist/components/Stepper/Stepper.css +174 -0
- package/dist/components/Stepper/Stepper.d.ts +59 -0
- package/dist/components/Stepper/Stepper.js +131 -0
- package/dist/components/Stepper/Stepper.module.cjs +14 -0
- package/dist/components/Stepper/Stepper.module.js +14 -0
- package/dist/components/Stepper/index.d.ts +1 -0
- package/dist/components/Switch/Switch.cjs +43 -0
- package/dist/components/Switch/Switch.css +138 -0
- package/dist/components/Switch/Switch.d.ts +21 -9
- package/dist/components/Switch/Switch.js +40 -0
- package/dist/components/Switch/Switch.module.cjs +10 -0
- package/dist/components/Switch/Switch.module.js +10 -0
- package/dist/components/Switch/index.d.ts +1 -1
- package/dist/components/Table/Table.cjs +96 -0
- package/dist/components/Table/Table.css +107 -0
- package/dist/components/Table/Table.d.ts +58 -0
- package/dist/components/Table/Table.js +85 -0
- package/dist/components/Table/Table.module.cjs +18 -0
- package/dist/components/Table/Table.module.js +18 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Tabs/Tabs.cjs +70 -0
- package/dist/components/Tabs/Tabs.css +181 -0
- package/dist/components/Tabs/Tabs.d.ts +10 -8
- package/dist/components/Tabs/Tabs.js +66 -0
- package/dist/components/Tabs/Tabs.module.cjs +11 -0
- package/dist/components/Tabs/Tabs.module.js +11 -0
- package/dist/components/Text/Text.cjs +42 -0
- package/dist/components/Text/Text.css +73 -0
- package/dist/components/Text/Text.d.ts +27 -9
- package/dist/components/Text/Text.js +42 -0
- package/dist/components/Text/Text.module.cjs +5 -0
- package/dist/components/Text/Text.module.js +5 -0
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/Textarea/Textarea.cjs +28 -0
- package/dist/components/Textarea/Textarea.css +59 -0
- package/dist/components/Textarea/Textarea.d.ts +9 -4
- package/dist/components/Textarea/Textarea.js +28 -0
- package/dist/components/Textarea/Textarea.module.cjs +5 -0
- package/dist/components/Textarea/Textarea.module.js +5 -0
- package/dist/components/Textarea/index.d.ts +1 -1
- package/dist/components/Toast/Toast.cjs +278 -0
- package/dist/components/Toast/Toast.css +351 -0
- package/dist/components/Toast/Toast.d.ts +82 -41
- package/dist/components/Toast/Toast.js +263 -0
- package/dist/components/Toast/Toast.module.cjs +26 -0
- package/dist/components/Toast/Toast.module.js +26 -0
- package/dist/components/Toast/index.d.ts +1 -1
- package/dist/components/Toggle/Toggle.cjs +18 -0
- package/dist/components/Toggle/Toggle.css +147 -0
- package/dist/components/Toggle/Toggle.d.ts +9 -6
- package/dist/components/Toggle/Toggle.js +18 -0
- package/dist/components/Toggle/Toggle.module.cjs +5 -0
- package/dist/components/Toggle/Toggle.module.js +5 -0
- package/dist/components/Toggle/index.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs +42 -0
- package/dist/components/ToggleGroup/ToggleGroup.css +42 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +15 -12
- package/dist/components/ToggleGroup/ToggleGroup.js +41 -0
- package/dist/components/ToggleGroup/ToggleGroup.module.cjs +8 -0
- package/dist/components/ToggleGroup/ToggleGroup.module.js +8 -0
- package/dist/components/ToggleGroup/index.d.ts +1 -1
- package/dist/components/Toolbar/Toolbar.cjs +61 -0
- package/dist/components/Toolbar/Toolbar.css +203 -0
- package/dist/components/Toolbar/Toolbar.d.ts +9 -7
- package/dist/components/Toolbar/Toolbar.js +56 -0
- package/dist/components/Toolbar/Toolbar.module.cjs +12 -0
- package/dist/components/Toolbar/Toolbar.module.js +12 -0
- package/dist/components/Tooltip/Tooltip.cjs +91 -0
- package/dist/components/Tooltip/Tooltip.css +155 -0
- package/dist/components/Tooltip/Tooltip.d.ts +51 -15
- package/dist/components/Tooltip/Tooltip.js +82 -0
- package/dist/components/Tooltip/Tooltip.module.cjs +15 -0
- package/dist/components/Tooltip/Tooltip.module.js +15 -0
- package/dist/components/Tooltip/index.d.ts +1 -1
- package/dist/icons/demo/Icons.cjs +234 -0
- package/dist/icons/demo/Icons.d.ts +15 -12
- package/dist/icons/demo/Icons.js +225 -0
- package/dist/icons/demo/index.d.ts +1 -1
- package/dist/icons/ui/Icons.cjs +324 -0
- package/dist/icons/ui/Icons.d.ts +30 -18
- package/dist/icons/ui/Icons.js +308 -0
- package/dist/icons/ui/index.d.ts +1 -1
- package/dist/index.cjs +619 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +68 -58
- package/dist/index.js +68 -5039
- package/dist/reset.cjs +1 -0
- package/dist/reset.d.cts +1 -0
- package/dist/reset.d.ts +1 -0
- package/dist/reset.js +1 -0
- package/dist/style.cjs +1 -0
- package/dist/style.d.cts +1 -0
- package/dist/style.d.ts +1 -0
- package/dist/style.js +1 -0
- package/dist/styles/reset.css +175 -0
- package/dist/styles/style.css +263 -0
- package/dist/utils/mergeClassName.cjs +8 -0
- package/dist/utils/mergeClassName.js +8 -0
- package/package.json +8 -7
- package/dist/components/CloseButton/index.d.ts +0 -1
- package/dist/components/Meter/index.d.ts +0 -1
- package/dist/components/Progress/index.d.ts +0 -1
- package/dist/components/Separator/index.d.ts +0 -1
- package/dist/components/Tabs/index.d.ts +0 -1
- package/dist/components/Toolbar/index.d.ts +0 -1
- package/dist/data/insideScrollSections.d.ts +0 -4
- package/dist/index.css +0 -1
- package/dist/reset.css +0 -334
- package/dist/utils/mergeClassName.d.ts +0 -4
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/Textarea/Textarea.d.ts
|
|
4
|
+
type TextareaProps = ComponentProps<'textarea'> & {
|
|
5
|
+
autoResize?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const Textarea: import("react").ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Textarea, type TextareaProps };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { mergeClassName } from "../../utils/mergeClassName.js";
|
|
2
|
+
import Textarea_module_default from "./Textarea.module.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { forwardRef, useCallback } from "react";
|
|
5
|
+
import { Field } from "@base-ui/react/field";
|
|
6
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
|
+
//#region src/components/Textarea/Textarea.tsx
|
|
8
|
+
const assignForwardedRef = (ref, value) => {
|
|
9
|
+
if (typeof ref === "function") {
|
|
10
|
+
ref(value);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (ref) ref.current = value;
|
|
14
|
+
};
|
|
15
|
+
const Textarea = forwardRef(function Textarea({ autoResize = false, className, ...props }, forwardedRef) {
|
|
16
|
+
const setTextareaRef = useCallback((node) => {
|
|
17
|
+
assignForwardedRef(forwardedRef, node instanceof HTMLTextAreaElement ? node : null);
|
|
18
|
+
}, [forwardedRef]);
|
|
19
|
+
return /* @__PURE__ */ jsx(Field.Control, {
|
|
20
|
+
ref: setTextareaRef,
|
|
21
|
+
"data-slot": "textarea-root",
|
|
22
|
+
"data-auto-resize": autoResize ? "" : void 0,
|
|
23
|
+
className: mergeClassName(className, Textarea_module_default.root),
|
|
24
|
+
render: (controlProps) => /* @__PURE__ */ jsx("textarea", { ...mergeProps(controlProps, props) })
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Textarea };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import { Textarea, TextareaProps } from "./Textarea.js";
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
const require_Icons = require("../../icons/ui/Icons.cjs");
|
|
2
|
+
const require_mergeClassName = require("../../utils/mergeClassName.cjs");
|
|
3
|
+
const require_Toast_module = require("./Toast.module.cjs");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let react = require("react");
|
|
6
|
+
let _base_ui_react_toast = require("@base-ui/react/toast");
|
|
7
|
+
//#region src/components/Toast/Toast.tsx
|
|
8
|
+
const DEFAULT_TOAST_PLACEMENT = "bottom-right";
|
|
9
|
+
const DEFAULT_STACK_BEHAVIOR = "stacked";
|
|
10
|
+
const DEFAULT_ANCHORED_SIDE_OFFSET = 8;
|
|
11
|
+
const TOP_TOAST_SWIPE_DIRECTIONS = [
|
|
12
|
+
"left",
|
|
13
|
+
"right",
|
|
14
|
+
"up"
|
|
15
|
+
];
|
|
16
|
+
const BOTTOM_TOAST_SWIPE_DIRECTIONS = [
|
|
17
|
+
"left",
|
|
18
|
+
"right",
|
|
19
|
+
"down"
|
|
20
|
+
];
|
|
21
|
+
const ToastPlacementContext = (0, react.createContext)(DEFAULT_TOAST_PLACEMENT);
|
|
22
|
+
const ToastStackBehaviorContext = (0, react.createContext)(DEFAULT_STACK_BEHAVIOR);
|
|
23
|
+
const ToastStyleContext = (0, react.createContext)("stacked");
|
|
24
|
+
const AnchoredToastManagerContext = (0, react.createContext)(null);
|
|
25
|
+
const createToastManager = _base_ui_react_toast.Toast.createToastManager;
|
|
26
|
+
const useToastManager = _base_ui_react_toast.Toast.useToastManager;
|
|
27
|
+
function isAnchoredToast(toast) {
|
|
28
|
+
return Boolean(toast.positionerProps?.anchor);
|
|
29
|
+
}
|
|
30
|
+
function getToastSwipeDirection(placement) {
|
|
31
|
+
return placement.startsWith("top") ? TOP_TOAST_SWIPE_DIRECTIONS : BOTTOM_TOAST_SWIPE_DIRECTIONS;
|
|
32
|
+
}
|
|
33
|
+
function ToastProvider({ children, toastManager, anchoredToastManager, ...props }) {
|
|
34
|
+
const defaultToastManager = (0, react.useMemo)(() => createToastManager(), []);
|
|
35
|
+
const defaultAnchoredToastManager = (0, react.useMemo)(() => createToastManager(), []);
|
|
36
|
+
const resolvedToastManager = toastManager ?? defaultToastManager;
|
|
37
|
+
const resolvedAnchoredToastManager = anchoredToastManager ?? defaultAnchoredToastManager;
|
|
38
|
+
const anchoredToast = (0, react.useMemo)(() => createAnchoredToastManager(resolvedAnchoredToastManager), [resolvedAnchoredToastManager]);
|
|
39
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AnchoredToastManagerContext.Provider, {
|
|
40
|
+
value: anchoredToast,
|
|
41
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Provider, {
|
|
42
|
+
toastManager: resolvedToastManager,
|
|
43
|
+
...props,
|
|
44
|
+
children
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function ToastPortal({ className, ...props }) {
|
|
49
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Portal, {
|
|
50
|
+
"data-slot": "toast-portal",
|
|
51
|
+
className: require_mergeClassName.mergeClassName(className, require_Toast_module.default.portal),
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function ToastViewport({ className, placement = DEFAULT_TOAST_PLACEMENT, stackBehavior = DEFAULT_STACK_BEHAVIOR, ...props }) {
|
|
56
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastPlacementContext.Provider, {
|
|
57
|
+
value: placement,
|
|
58
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastStackBehaviorContext.Provider, {
|
|
59
|
+
value: stackBehavior,
|
|
60
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Viewport, {
|
|
61
|
+
"data-slot": "toast-viewport",
|
|
62
|
+
"data-placement": placement,
|
|
63
|
+
"data-stack-behavior": stackBehavior,
|
|
64
|
+
className: require_mergeClassName.mergeClassName(className, require_Toast_module.default.viewport),
|
|
65
|
+
...props
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function ToastRoot(props) {
|
|
71
|
+
const { className, placement, swipeDirection, toast, ...rootProps } = props;
|
|
72
|
+
const contextPlacement = (0, react.useContext)(ToastPlacementContext);
|
|
73
|
+
const stackBehavior = (0, react.useContext)(ToastStackBehaviorContext);
|
|
74
|
+
const anchored = isAnchoredToast(toast);
|
|
75
|
+
const resolvedPlacement = placement ?? contextPlacement;
|
|
76
|
+
const dataSlot = props["data-slot"];
|
|
77
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastStyleContext.Provider, {
|
|
78
|
+
value: anchored ? "anchored" : "stacked",
|
|
79
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Root, {
|
|
80
|
+
...rootProps,
|
|
81
|
+
toast,
|
|
82
|
+
"data-slot": dataSlot ?? (anchored ? "toast-anchored-root" : "toast-root"),
|
|
83
|
+
"data-placement": resolvedPlacement,
|
|
84
|
+
"data-stack-behavior": stackBehavior,
|
|
85
|
+
swipeDirection: anchored ? swipeDirection : swipeDirection ?? getToastSwipeDirection(resolvedPlacement),
|
|
86
|
+
className: require_mergeClassName.mergeClassName(className, anchored ? require_Toast_module.default.anchoredRoot : require_Toast_module.default.root)
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function ToastContent(props) {
|
|
91
|
+
const { className, ...contentProps } = props;
|
|
92
|
+
const style = (0, react.useContext)(ToastStyleContext);
|
|
93
|
+
const stackBehavior = (0, react.useContext)(ToastStackBehaviorContext);
|
|
94
|
+
const dataSlot = props["data-slot"];
|
|
95
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Content, {
|
|
96
|
+
...contentProps,
|
|
97
|
+
"data-slot": dataSlot ?? (style === "anchored" ? "toast-anchored-content" : "toast-content"),
|
|
98
|
+
"data-stack-behavior": style === "stacked" ? stackBehavior : void 0,
|
|
99
|
+
className: require_mergeClassName.mergeClassName(className, style === "anchored" ? require_Toast_module.default.anchoredContent : require_Toast_module.default.content)
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function ToastTitle({ className, ...props }) {
|
|
103
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Title, {
|
|
104
|
+
"data-slot": "toast-title",
|
|
105
|
+
className: require_mergeClassName.mergeClassName(className, require_Toast_module.default.title),
|
|
106
|
+
...props
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function ToastDescription(props) {
|
|
110
|
+
const { className, ...descriptionProps } = props;
|
|
111
|
+
const style = (0, react.useContext)(ToastStyleContext);
|
|
112
|
+
const dataSlot = props["data-slot"];
|
|
113
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Description, {
|
|
114
|
+
...descriptionProps,
|
|
115
|
+
"data-slot": dataSlot ?? (style === "anchored" ? "toast-anchored-description" : "toast-description"),
|
|
116
|
+
className: require_mergeClassName.mergeClassName(className, style === "anchored" ? require_Toast_module.default.anchoredDescription : require_Toast_module.default.description)
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function ToastAction({ className, ...props }) {
|
|
120
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Action, {
|
|
121
|
+
"data-slot": "toast-action",
|
|
122
|
+
className: require_mergeClassName.mergeClassName(className, require_Toast_module.default.action),
|
|
123
|
+
...props
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function ToastClose({ className, children, ...props }) {
|
|
127
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Close, {
|
|
128
|
+
"data-slot": "toast-close",
|
|
129
|
+
className: require_mergeClassName.mergeClassName(className, require_Toast_module.default.close),
|
|
130
|
+
...props,
|
|
131
|
+
children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icons.CloseIcon, { className: require_Toast_module.default.closeIcon })
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function ToastPositioner({ className, ...props }) {
|
|
135
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Positioner, {
|
|
136
|
+
"data-slot": "toast-positioner",
|
|
137
|
+
className: require_mergeClassName.mergeClassName(className, require_Toast_module.default.positioner),
|
|
138
|
+
...props
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function ToastArrow(props) {
|
|
142
|
+
const { className, children, ...arrowProps } = props;
|
|
143
|
+
const dataSlot = props["data-slot"];
|
|
144
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Arrow, {
|
|
145
|
+
...arrowProps,
|
|
146
|
+
"data-slot": dataSlot ?? "toast-anchored-arrow",
|
|
147
|
+
className: require_mergeClassName.mergeClassName(className, require_Toast_module.default.anchoredArrow),
|
|
148
|
+
children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AnchoredArrowSvg, { className: require_Toast_module.default.anchoredArrowSvg })
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function ToastRegion({ className, container, renderToast, placement = DEFAULT_TOAST_PLACEMENT, stackBehavior = DEFAULT_STACK_BEHAVIOR, ...props }) {
|
|
152
|
+
const { toasts: allToasts } = useToastManager();
|
|
153
|
+
const toasts = allToasts.filter((toast) => !isAnchoredToast(toast));
|
|
154
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastPortal, {
|
|
155
|
+
container,
|
|
156
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastViewport, {
|
|
157
|
+
placement,
|
|
158
|
+
stackBehavior,
|
|
159
|
+
className,
|
|
160
|
+
...props,
|
|
161
|
+
children: toasts.map((toast, index) => renderToast ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: renderToast(toast, index) }, toast.id) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DefaultToast, { toast }, toast.id))
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function ToastAnchoredRegion({ className, container, renderToast, ...props }) {
|
|
166
|
+
const anchoredToast = (0, react.useContext)(AnchoredToastManagerContext);
|
|
167
|
+
if (!anchoredToast) throw new Error("ToastAnchoredRegion must be used within ToastProvider.");
|
|
168
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Provider, {
|
|
169
|
+
toastManager: anchoredToast.manager,
|
|
170
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastAnchoredRegionContent, {
|
|
171
|
+
className,
|
|
172
|
+
container,
|
|
173
|
+
renderToast,
|
|
174
|
+
...props
|
|
175
|
+
})
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
function ToastAnchoredRegionContent({ className, container, renderToast, ...props }) {
|
|
179
|
+
const { toasts } = useToastManager();
|
|
180
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastPortal, {
|
|
181
|
+
container,
|
|
182
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toast.Toast.Viewport, {
|
|
183
|
+
"data-slot": "toast-anchored-viewport",
|
|
184
|
+
className: require_mergeClassName.mergeClassName(className, require_Toast_module.default.anchoredViewport),
|
|
185
|
+
...props,
|
|
186
|
+
children: toasts.map((toast, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastPositioner, {
|
|
187
|
+
toast,
|
|
188
|
+
className: require_Toast_module.default.anchoredPositioner,
|
|
189
|
+
children: renderToast ? renderToast(toast, index) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DefaultAnchoredToast, { toast })
|
|
190
|
+
}, toast.id))
|
|
191
|
+
})
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
function DefaultToast({ toast }) {
|
|
195
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastRoot, {
|
|
196
|
+
toast,
|
|
197
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ToastContent, { children: [
|
|
198
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastTitle, {}),
|
|
199
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastDescription, {}),
|
|
200
|
+
toast.actionProps ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastAction, {}) : null,
|
|
201
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastClose, { "aria-label": "Close toast" })
|
|
202
|
+
] })
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
function DefaultAnchoredToast({ toast }) {
|
|
206
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ToastRoot, {
|
|
207
|
+
toast,
|
|
208
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastArrow, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastContent, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToastDescription, {}) })]
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
function AnchoredArrowSvg(props) {
|
|
212
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icons.PopupArrowIcon, {
|
|
213
|
+
fillClassName: require_Toast_module.default.anchoredArrowFill,
|
|
214
|
+
outerStrokeClassName: require_Toast_module.default.anchoredArrowOuterStroke,
|
|
215
|
+
innerStrokeClassName: require_Toast_module.default.anchoredArrowInnerStroke,
|
|
216
|
+
...props
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
function createAnchoredToastManager(manager = createToastManager()) {
|
|
220
|
+
const anchorIds = /* @__PURE__ */ new WeakMap();
|
|
221
|
+
let idCounter = 0;
|
|
222
|
+
const show = ({ anchor, id, positionerProps, onRemove, ...options }) => {
|
|
223
|
+
const resolvedId = anchorIds.get(anchor) ?? id ?? `anchored-${Date.now()}-${++idCounter}`;
|
|
224
|
+
manager.add({
|
|
225
|
+
...options,
|
|
226
|
+
id: resolvedId,
|
|
227
|
+
positionerProps: {
|
|
228
|
+
sideOffset: DEFAULT_ANCHORED_SIDE_OFFSET,
|
|
229
|
+
...positionerProps,
|
|
230
|
+
anchor
|
|
231
|
+
},
|
|
232
|
+
onRemove: () => {
|
|
233
|
+
if (anchorIds.get(anchor) === resolvedId) anchorIds.delete(anchor);
|
|
234
|
+
onRemove?.();
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
anchorIds.set(anchor, resolvedId);
|
|
238
|
+
return resolvedId;
|
|
239
|
+
};
|
|
240
|
+
const closeByAnchor = (anchor) => {
|
|
241
|
+
if (!anchor) return;
|
|
242
|
+
const toastId = anchorIds.get(anchor);
|
|
243
|
+
if (!toastId) return;
|
|
244
|
+
manager.close(toastId);
|
|
245
|
+
anchorIds.delete(anchor);
|
|
246
|
+
};
|
|
247
|
+
const closeAll = () => {
|
|
248
|
+
manager.close();
|
|
249
|
+
};
|
|
250
|
+
return {
|
|
251
|
+
manager,
|
|
252
|
+
show,
|
|
253
|
+
closeByAnchor,
|
|
254
|
+
closeAll
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
function useAnchoredToastManager() {
|
|
258
|
+
const anchoredToast = (0, react.useContext)(AnchoredToastManagerContext);
|
|
259
|
+
if (!anchoredToast) throw new Error("useAnchoredToastManager must be used within ToastProvider.");
|
|
260
|
+
return anchoredToast;
|
|
261
|
+
}
|
|
262
|
+
//#endregion
|
|
263
|
+
exports.ToastAction = ToastAction;
|
|
264
|
+
exports.ToastAnchoredRegion = ToastAnchoredRegion;
|
|
265
|
+
exports.ToastArrow = ToastArrow;
|
|
266
|
+
exports.ToastClose = ToastClose;
|
|
267
|
+
exports.ToastContent = ToastContent;
|
|
268
|
+
exports.ToastDescription = ToastDescription;
|
|
269
|
+
exports.ToastPortal = ToastPortal;
|
|
270
|
+
exports.ToastPositioner = ToastPositioner;
|
|
271
|
+
exports.ToastProvider = ToastProvider;
|
|
272
|
+
exports.ToastRegion = ToastRegion;
|
|
273
|
+
exports.ToastRoot = ToastRoot;
|
|
274
|
+
exports.ToastTitle = ToastTitle;
|
|
275
|
+
exports.ToastViewport = ToastViewport;
|
|
276
|
+
exports.createToastManager = createToastManager;
|
|
277
|
+
exports.useAnchoredToastManager = useAnchoredToastManager;
|
|
278
|
+
exports.useToastManager = useToastManager;
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
@layer ui.components {
|
|
2
|
+
.xGZ1aG_portal {
|
|
3
|
+
z-index: var(--toast-z-index, var(--z-toast));
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.xGZ1aG_viewport {
|
|
7
|
+
z-index: var(--toast-z-index, var(--z-toast));
|
|
8
|
+
width: var(--toast-viewport-width, 20rem);
|
|
9
|
+
max-width: calc(100vw - (var(--toast-viewport-inset, 1rem) * 2));
|
|
10
|
+
min-height: 1px;
|
|
11
|
+
margin: 0 auto;
|
|
12
|
+
position: fixed;
|
|
13
|
+
|
|
14
|
+
&[data-placement^="top"] {
|
|
15
|
+
top: var(--toast-viewport-inset, 1rem);
|
|
16
|
+
bottom: auto;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&[data-placement^="bottom"] {
|
|
20
|
+
top: auto;
|
|
21
|
+
bottom: var(--toast-viewport-inset, 1rem);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&[data-placement$="left"] {
|
|
25
|
+
left: var(--toast-viewport-inset, 1rem);
|
|
26
|
+
right: auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&[data-placement$="center"] {
|
|
30
|
+
left: 50%;
|
|
31
|
+
right: auto;
|
|
32
|
+
translate: -50%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&[data-placement$="right"] {
|
|
36
|
+
left: auto;
|
|
37
|
+
right: var(--toast-viewport-inset, 1rem);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.xGZ1aG_anchoredViewport {
|
|
42
|
+
outline: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.xGZ1aG_anchoredPositioner {
|
|
46
|
+
z-index: calc(var(--toast-z-index, var(--z-toast)) - var(--toast-index));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.xGZ1aG_anchoredRoot {
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
width: max-content;
|
|
52
|
+
max-width: min(var(--toast-anchored-max-width, 20rem),
|
|
53
|
+
calc(100vw - (var(--toast-viewport-inset, 1rem) * 2)));
|
|
54
|
+
border-radius: var(--toast-radius, var(--radius-md));
|
|
55
|
+
background-color: var(--toast-bg, var(--color-popover));
|
|
56
|
+
color: var(--toast-color, var(--color-popover-foreground));
|
|
57
|
+
padding: var(--toast-anchored-padding-y, .25rem) var(--toast-anchored-padding-x, .5rem);
|
|
58
|
+
font-size: var(--toast-anchored-font-size, var(--text-sm));
|
|
59
|
+
line-height: var(--toast-anchored-line-height, var(--line-height-text-sm));
|
|
60
|
+
box-shadow: var(--toast-shadow, var(--shadow-lg));
|
|
61
|
+
outline: var(--toast-border-width, var(--border-width-sm)) solid
|
|
62
|
+
var(--toast-border-color, var(--color-border));
|
|
63
|
+
pointer-events: auto;
|
|
64
|
+
transform-origin: var(--transform-origin);
|
|
65
|
+
transition: var(--toast-anchored-transition, transform .15s, opacity .15s);
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
display: flex;
|
|
68
|
+
position: relative;
|
|
69
|
+
|
|
70
|
+
&[data-starting-style], &[data-ending-style] {
|
|
71
|
+
opacity: 0;
|
|
72
|
+
transform: scale(var(--toast-anchored-scale, .9));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:focus-visible {
|
|
76
|
+
outline: var(--toast-focus-ring-width, var(--toast-border-width, var(--border-width-sm)))
|
|
77
|
+
solid var(--toast-focus-ring-color, var(--color-ring));
|
|
78
|
+
outline-offset: var(--toast-focus-ring-offset, 0);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.xGZ1aG_anchoredArrow {
|
|
83
|
+
color: var(--toast-bg, var(--color-popover));
|
|
84
|
+
display: flex;
|
|
85
|
+
|
|
86
|
+
&[data-side="top"] {
|
|
87
|
+
bottom: var(--toast-anchored-arrow-offset-y, -8px);
|
|
88
|
+
rotate: 180deg;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&[data-side="bottom"] {
|
|
92
|
+
top: var(--toast-anchored-arrow-offset-y, -8px);
|
|
93
|
+
rotate: 0deg;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&[data-side="left"] {
|
|
97
|
+
right: var(--toast-anchored-arrow-offset-x, -13px);
|
|
98
|
+
rotate: 90deg;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&[data-side="right"] {
|
|
102
|
+
left: var(--toast-anchored-arrow-offset-x, -13px);
|
|
103
|
+
rotate: -90deg;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.xGZ1aG_anchoredArrowSvg {
|
|
108
|
+
width: var(--toast-anchored-arrow-width, 1.25rem);
|
|
109
|
+
height: var(--toast-anchored-arrow-height, .625rem);
|
|
110
|
+
shape-rendering: geometricprecision;
|
|
111
|
+
display: block;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.xGZ1aG_anchoredArrowFill {
|
|
115
|
+
fill: currentColor;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.xGZ1aG_anchoredArrowOuterStroke {
|
|
119
|
+
fill: var(--toast-border-color, var(--color-border));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.xGZ1aG_anchoredArrowInnerStroke {
|
|
123
|
+
fill: var(--toast-bg, var(--color-popover));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.xGZ1aG_anchoredContent {
|
|
127
|
+
align-items: center;
|
|
128
|
+
gap: var(--toast-content-gap, .25rem);
|
|
129
|
+
display: grid;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.xGZ1aG_anchoredDescription {
|
|
133
|
+
color: inherit;
|
|
134
|
+
margin: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.xGZ1aG_root {
|
|
138
|
+
--gap: var(--toast-stack-gap, .75rem);
|
|
139
|
+
--peek: var(--toast-stack-peek, .75rem);
|
|
140
|
+
--scale: calc(max(0, 1 - (var(--toast-index) * .1)));
|
|
141
|
+
--shrink: calc(1 - var(--scale));
|
|
142
|
+
--height: var(--toast-frontmost-height, var(--toast-height));
|
|
143
|
+
--offset-y: calc(var(--toast-offset-y) * -1 + (var(--toast-index) * var(--gap) * -1) +
|
|
144
|
+
var(--toast-swipe-movement-y));
|
|
145
|
+
box-sizing: border-box;
|
|
146
|
+
border: var(--toast-border-width, var(--border-width-sm)) solid
|
|
147
|
+
var(--toast-border-color, var(--color-border));
|
|
148
|
+
border-radius: var(--toast-radius, var(--radius-lg));
|
|
149
|
+
background-color: var(--toast-bg, var(--color-popover));
|
|
150
|
+
width: 100%;
|
|
151
|
+
color: var(--toast-color, var(--color-popover-foreground));
|
|
152
|
+
box-shadow: var(--toast-shadow, var(--shadow-lg));
|
|
153
|
+
padding: var(--toast-padding, 1rem);
|
|
154
|
+
user-select: none;
|
|
155
|
+
pointer-events: auto;
|
|
156
|
+
transition: transform var(--toast-transition, .5s cubic-bezier(.22, 1, .36, 1)),
|
|
157
|
+
opacity .5s,
|
|
158
|
+
height .15s ease;
|
|
159
|
+
z-index: calc(var(--toast-z-index, var(--z-toast)) - var(--toast-index));
|
|
160
|
+
height: var(--height);
|
|
161
|
+
transform: translateX(var(--toast-swipe-movement-x))
|
|
162
|
+
translateY(calc(var(--toast-swipe-movement-y) - (var(--toast-index) * var(--peek)) -
|
|
163
|
+
(var(--shrink) * var(--height))))
|
|
164
|
+
scale(var(--scale));
|
|
165
|
+
transform-origin: bottom;
|
|
166
|
+
background-clip: padding-box;
|
|
167
|
+
margin-right: 0;
|
|
168
|
+
position: absolute;
|
|
169
|
+
bottom: 0;
|
|
170
|
+
left: auto;
|
|
171
|
+
right: 0;
|
|
172
|
+
|
|
173
|
+
&[data-placement^="top"] {
|
|
174
|
+
--offset-y: calc(var(--toast-offset-y) + (var(--toast-index) * var(--gap)) + var(--toast-swipe-movement-y));
|
|
175
|
+
transform: translateX(var(--toast-swipe-movement-x))
|
|
176
|
+
translateY(calc(var(--toast-swipe-movement-y) + (var(--toast-index) * var(--peek)) +
|
|
177
|
+
(var(--shrink) * var(--height))))
|
|
178
|
+
scale(var(--scale));
|
|
179
|
+
transform-origin: top;
|
|
180
|
+
margin-left: auto;
|
|
181
|
+
margin-right: auto;
|
|
182
|
+
inset: 0 0 auto;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&[data-expanded], &[data-stack-behavior="expanded"]:not([data-starting-style]):not([data-ending-style]) {
|
|
186
|
+
transform: translateX(var(--toast-swipe-movement-x)) translateY(var(--offset-y));
|
|
187
|
+
height: var(--toast-height);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&[data-starting-style] {
|
|
191
|
+
transform: translateY(150%);
|
|
192
|
+
|
|
193
|
+
&[data-placement^="top"] {
|
|
194
|
+
transform: translateY(-150%);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
&[data-limited] {
|
|
199
|
+
opacity: 0;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&[data-ending-style] {
|
|
203
|
+
opacity: 0;
|
|
204
|
+
|
|
205
|
+
&:not([data-limited]):not([data-swipe-direction]) {
|
|
206
|
+
transform: translateY(150%);
|
|
207
|
+
|
|
208
|
+
&[data-placement^="top"] {
|
|
209
|
+
transform: translateY(-150%);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&[data-swipe-direction="up"] {
|
|
214
|
+
transform: translateY(calc(var(--toast-swipe-movement-y) - 150%));
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
&[data-swipe-direction="left"] {
|
|
218
|
+
transform: translateX(calc(var(--toast-swipe-movement-x) - 150%))
|
|
219
|
+
translateY(var(--offset-y));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&[data-swipe-direction="right"] {
|
|
223
|
+
transform: translateX(calc(var(--toast-swipe-movement-x) + 150%))
|
|
224
|
+
translateY(var(--offset-y));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&[data-swipe-direction="down"] {
|
|
228
|
+
transform: translateY(calc(var(--toast-swipe-movement-y) + 150%));
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&:after {
|
|
233
|
+
content: "";
|
|
234
|
+
width: 100%;
|
|
235
|
+
height: calc(var(--gap) + var(--toast-border-width, var(--border-width-sm)));
|
|
236
|
+
position: absolute;
|
|
237
|
+
top: 100%;
|
|
238
|
+
left: 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
&[data-placement^="top"] {
|
|
242
|
+
&:after {
|
|
243
|
+
top: auto;
|
|
244
|
+
bottom: 100%;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.xGZ1aG_content {
|
|
250
|
+
gap: var(--toast-content-gap, .25rem);
|
|
251
|
+
padding-inline-end: calc(var(--toast-close-offset-right, .5rem) + var(--toast-close-size, 1.25rem) + var(--spacing-2));
|
|
252
|
+
transition: opacity .25s;
|
|
253
|
+
display: grid;
|
|
254
|
+
overflow: hidden;
|
|
255
|
+
|
|
256
|
+
&[data-behind] {
|
|
257
|
+
opacity: 0;
|
|
258
|
+
pointer-events: none;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
&[data-expanded], &[data-stack-behavior="expanded"] {
|
|
262
|
+
opacity: 1;
|
|
263
|
+
pointer-events: auto;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.xGZ1aG_title {
|
|
268
|
+
color: inherit;
|
|
269
|
+
font-size: var(--toast-title-font-size, var(--text-sm));
|
|
270
|
+
font-weight: var(--toast-title-font-weight, var(--weight-semibold));
|
|
271
|
+
line-height: var(--toast-title-line-height, var(--line-height-text-sm));
|
|
272
|
+
margin: 0;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.xGZ1aG_description {
|
|
276
|
+
color: var(--toast-description-color, var(--color-muted-foreground));
|
|
277
|
+
font-size: var(--toast-description-font-size, var(--text-sm));
|
|
278
|
+
line-height: var(--toast-description-line-height, var(--line-height-text-sm));
|
|
279
|
+
margin: 0;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.xGZ1aG_action {
|
|
283
|
+
margin-top: var(--toast-action-margin-top, .5rem);
|
|
284
|
+
border: var(--toast-action-border-width, var(--toast-border-width, var(--border-width-sm)))
|
|
285
|
+
solid var(--toast-action-border-color, var(--color-border));
|
|
286
|
+
border-radius: var(--toast-action-radius, var(--radius-sm));
|
|
287
|
+
background: var(--toast-action-bg, var(--color-background));
|
|
288
|
+
color: var(--toast-action-color, var(--color-foreground));
|
|
289
|
+
padding: var(--toast-action-padding-y, .25rem) var(--toast-action-padding-x, .5rem);
|
|
290
|
+
font-size: var(--toast-action-font-size, var(--text-xs));
|
|
291
|
+
line-height: var(--toast-action-line-height, var(--line-height-text-xs));
|
|
292
|
+
font-weight: var(--toast-action-font-weight, var(--weight-medium));
|
|
293
|
+
cursor: pointer;
|
|
294
|
+
|
|
295
|
+
&:focus-visible {
|
|
296
|
+
outline: var(--toast-focus-ring-width, var(--toast-border-width, var(--border-width-sm)))
|
|
297
|
+
solid var(--toast-focus-ring-color, var(--color-ring));
|
|
298
|
+
outline-offset: calc(var(--toast-focus-ring-width, var(--toast-border-width, var(--border-width-sm))) * -1);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&:disabled, &[data-disabled] {
|
|
302
|
+
cursor: default;
|
|
303
|
+
opacity: var(--opacity-disabled);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
@media (hover: hover) {
|
|
307
|
+
&:hover:not(:disabled):not([data-disabled]) {
|
|
308
|
+
background-color: var(--toast-action-bg-hover, var(--color-accent));
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.xGZ1aG_close {
|
|
314
|
+
top: var(--toast-close-offset-top, .5rem);
|
|
315
|
+
right: var(--toast-close-offset-right, .5rem);
|
|
316
|
+
width: var(--toast-close-size, 1.25rem);
|
|
317
|
+
height: var(--toast-close-size, 1.25rem);
|
|
318
|
+
border-radius: var(--toast-close-radius, var(--radius-sm));
|
|
319
|
+
background: var(--toast-close-bg, transparent);
|
|
320
|
+
color: var(--toast-close-color, var(--color-muted-foreground));
|
|
321
|
+
padding: var(--toast-close-padding, 0);
|
|
322
|
+
cursor: pointer;
|
|
323
|
+
border: none;
|
|
324
|
+
justify-content: center;
|
|
325
|
+
align-items: center;
|
|
326
|
+
display: inline-flex;
|
|
327
|
+
position: absolute;
|
|
328
|
+
|
|
329
|
+
@media (hover: hover) {
|
|
330
|
+
&:hover {
|
|
331
|
+
background-color: var(--toast-close-bg-hover, var(--color-accent));
|
|
332
|
+
color: var(--toast-close-color-hover, var(--color-foreground));
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
&:focus-visible {
|
|
337
|
+
outline: var(--toast-focus-ring-width, var(--toast-border-width, var(--border-width-sm)))
|
|
338
|
+
solid var(--toast-focus-ring-color, var(--color-ring));
|
|
339
|
+
outline-offset: var(--toast-close-focus-ring-offset, 0);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.xGZ1aG_closeIcon {
|
|
344
|
+
width: var(--toast-close-icon-size, 1rem);
|
|
345
|
+
height: var(--toast-close-icon-size, 1rem);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.xGZ1aG_positioner {
|
|
349
|
+
pointer-events: none;
|
|
350
|
+
}
|
|
351
|
+
}
|