@moduix/solid-tailwind 1.0.0
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/LICENSE.md +9 -0
- package/README.md +130 -0
- package/THIRD_PARTY_NOTICES.md +49 -0
- package/dist/components/accordion/Accordion.d.ts +22 -0
- package/dist/components/accordion/Accordion.js +103 -0
- package/dist/components/accordion/Accordion.jsx +63 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/accordion/index.jsx +1 -0
- package/dist/components/alert/Alert.d.ts +20 -0
- package/dist/components/alert/Alert.js +116 -0
- package/dist/components/alert/Alert.jsx +66 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/alert/index.jsx +1 -0
- package/dist/components/angle-slider/AngleSlider.d.ts +37 -0
- package/dist/components/angle-slider/AngleSlider.js +165 -0
- package/dist/components/angle-slider/AngleSlider.jsx +97 -0
- package/dist/components/angle-slider/index.d.ts +1 -0
- package/dist/components/angle-slider/index.js +1 -0
- package/dist/components/angle-slider/index.jsx +1 -0
- package/dist/components/aspect-ratio/AspectRatio.d.ts +13 -0
- package/dist/components/aspect-ratio/AspectRatio.js +43 -0
- package/dist/components/aspect-ratio/AspectRatio.jsx +28 -0
- package/dist/components/aspect-ratio/index.d.ts +1 -0
- package/dist/components/aspect-ratio/index.js +1 -0
- package/dist/components/aspect-ratio/index.jsx +1 -0
- package/dist/components/avatar/Avatar.d.ts +21 -0
- package/dist/components/avatar/Avatar.js +88 -0
- package/dist/components/avatar/Avatar.jsx +59 -0
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/avatar/index.js +1 -0
- package/dist/components/avatar/index.jsx +1 -0
- package/dist/components/badge/Badge.d.ts +14 -0
- package/dist/components/badge/Badge.js +72 -0
- package/dist/components/badge/Badge.jsx +46 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/badge/index.jsx +1 -0
- package/dist/components/bleed/Bleed.d.ts +17 -0
- package/dist/components/bleed/Bleed.js +68 -0
- package/dist/components/bleed/Bleed.jsx +50 -0
- package/dist/components/bleed/index.d.ts +1 -0
- package/dist/components/bleed/index.js +1 -0
- package/dist/components/bleed/index.jsx +1 -0
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +30 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js +158 -0
- package/dist/components/breadcrumbs/Breadcrumbs.jsx +88 -0
- package/dist/components/breadcrumbs/index.d.ts +1 -0
- package/dist/components/breadcrumbs/index.js +1 -0
- package/dist/components/breadcrumbs/index.jsx +1 -0
- package/dist/components/button/Button.d.ts +16 -0
- package/dist/components/button/Button.js +124 -0
- package/dist/components/button/Button.jsx +75 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/button/index.jsx +1 -0
- package/dist/components/card/Card.d.ts +28 -0
- package/dist/components/card/Card.js +210 -0
- package/dist/components/card/Card.jsx +103 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/card/index.jsx +1 -0
- package/dist/components/carousel/Carousel.d.ts +35 -0
- package/dist/components/carousel/Carousel.js +218 -0
- package/dist/components/carousel/Carousel.jsx +121 -0
- package/dist/components/carousel/index.d.ts +1 -0
- package/dist/components/carousel/index.js +1 -0
- package/dist/components/carousel/index.jsx +1 -0
- package/dist/components/chart/Chart.d.ts +34 -0
- package/dist/components/chart/Chart.js +450 -0
- package/dist/components/chart/Chart.jsx +265 -0
- package/dist/components/chart/index.d.ts +1 -0
- package/dist/components/chart/index.js +1 -0
- package/dist/components/chart/index.jsx +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +26 -0
- package/dist/components/checkbox/Checkbox.js +139 -0
- package/dist/components/checkbox/Checkbox.jsx +76 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/checkbox/index.jsx +1 -0
- package/dist/components/clipboard/Clipboard.d.ts +26 -0
- package/dist/components/clipboard/Clipboard.js +143 -0
- package/dist/components/clipboard/Clipboard.jsx +85 -0
- package/dist/components/clipboard/index.d.ts +1 -0
- package/dist/components/clipboard/index.js +1 -0
- package/dist/components/clipboard/index.jsx +1 -0
- package/dist/components/close-button/CloseButton.d.ts +14 -0
- package/dist/components/close-button/CloseButton.js +89 -0
- package/dist/components/close-button/CloseButton.jsx +48 -0
- package/dist/components/close-button/index.d.ts +1 -0
- package/dist/components/close-button/index.js +1 -0
- package/dist/components/close-button/index.jsx +1 -0
- package/dist/components/collapsible/Collapsible.d.ts +19 -0
- package/dist/components/collapsible/Collapsible.js +92 -0
- package/dist/components/collapsible/Collapsible.jsx +56 -0
- package/dist/components/collapsible/index.d.ts +1 -0
- package/dist/components/collapsible/index.js +1 -0
- package/dist/components/collapsible/index.jsx +1 -0
- package/dist/components/color-picker/ColorPicker.d.ts +66 -0
- package/dist/components/color-picker/ColorPicker.js +514 -0
- package/dist/components/color-picker/ColorPicker.jsx +276 -0
- package/dist/components/color-picker/index.d.ts +1 -0
- package/dist/components/color-picker/index.js +1 -0
- package/dist/components/color-picker/index.jsx +1 -0
- package/dist/components/combobox/Combobox.d.ts +50 -0
- package/dist/components/combobox/Combobox.js +353 -0
- package/dist/components/combobox/Combobox.jsx +187 -0
- package/dist/components/combobox/index.d.ts +1 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/combobox/index.jsx +1 -0
- package/dist/components/command-palette/CommandPalette.d.ts +72 -0
- package/dist/components/command-palette/CommandPalette.js +575 -0
- package/dist/components/command-palette/CommandPalette.jsx +324 -0
- package/dist/components/command-palette/index.d.ts +1 -0
- package/dist/components/command-palette/index.js +1 -0
- package/dist/components/command-palette/index.jsx +1 -0
- package/dist/components/container/Container.d.ts +17 -0
- package/dist/components/container/Container.js +140 -0
- package/dist/components/container/Container.jsx +126 -0
- package/dist/components/container/index.d.ts +1 -0
- package/dist/components/container/index.js +1 -0
- package/dist/components/container/index.jsx +1 -0
- package/dist/components/date-input/DateInput.d.ts +25 -0
- package/dist/components/date-input/DateInput.js +136 -0
- package/dist/components/date-input/DateInput.jsx +76 -0
- package/dist/components/date-input/index.d.ts +1 -0
- package/dist/components/date-input/index.js +1 -0
- package/dist/components/date-input/index.jsx +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +98 -0
- package/dist/components/date-picker/DatePicker.js +701 -0
- package/dist/components/date-picker/DatePicker.jsx +359 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/date-picker/index.jsx +1 -0
- package/dist/components/dialog/Dialog.d.ts +38 -0
- package/dist/components/dialog/Dialog.js +239 -0
- package/dist/components/dialog/Dialog.jsx +130 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/dialog/index.jsx +1 -0
- package/dist/components/drawer/Drawer.d.ts +54 -0
- package/dist/components/drawer/Drawer.js +333 -0
- package/dist/components/drawer/Drawer.jsx +179 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/drawer/index.jsx +1 -0
- package/dist/components/editable/Editable.d.ts +29 -0
- package/dist/components/editable/Editable.js +181 -0
- package/dist/components/editable/Editable.jsx +105 -0
- package/dist/components/editable/index.d.ts +1 -0
- package/dist/components/editable/index.js +1 -0
- package/dist/components/editable/index.jsx +1 -0
- package/dist/components/empty/Empty.d.ts +16 -0
- package/dist/components/empty/Empty.js +121 -0
- package/dist/components/empty/Empty.jsx +54 -0
- package/dist/components/empty/index.d.ts +1 -0
- package/dist/components/empty/index.js +1 -0
- package/dist/components/empty/index.jsx +1 -0
- package/dist/components/field/Field.d.ts +37 -0
- package/dist/components/field/Field.js +236 -0
- package/dist/components/field/Field.jsx +134 -0
- package/dist/components/field/index.d.ts +1 -0
- package/dist/components/field/index.js +1 -0
- package/dist/components/field/index.jsx +1 -0
- package/dist/components/fieldset/Fieldset.d.ts +16 -0
- package/dist/components/fieldset/Fieldset.js +93 -0
- package/dist/components/fieldset/Fieldset.jsx +47 -0
- package/dist/components/fieldset/index.d.ts +1 -0
- package/dist/components/fieldset/index.js +1 -0
- package/dist/components/fieldset/index.jsx +1 -0
- package/dist/components/file-upload/FileUpload.d.ts +44 -0
- package/dist/components/file-upload/FileUpload.js +325 -0
- package/dist/components/file-upload/FileUpload.jsx +178 -0
- package/dist/components/file-upload/index.d.ts +1 -0
- package/dist/components/file-upload/index.js +1 -0
- package/dist/components/file-upload/index.jsx +1 -0
- package/dist/components/floating-panel/FloatingPanel.d.ts +53 -0
- package/dist/components/floating-panel/FloatingPanel.js +338 -0
- package/dist/components/floating-panel/FloatingPanel.jsx +186 -0
- package/dist/components/floating-panel/index.d.ts +2 -0
- package/dist/components/floating-panel/index.js +1 -0
- package/dist/components/floating-panel/index.jsx +1 -0
- package/dist/components/heading/Heading.d.ts +20 -0
- package/dist/components/heading/Heading.js +82 -0
- package/dist/components/heading/Heading.jsx +62 -0
- package/dist/components/heading/index.d.ts +1 -0
- package/dist/components/heading/index.js +1 -0
- package/dist/components/heading/index.jsx +1 -0
- package/dist/components/highlight/Highlight.d.ts +12 -0
- package/dist/components/highlight/Highlight.js +24 -0
- package/dist/components/highlight/Highlight.jsx +16 -0
- package/dist/components/highlight/index.d.ts +1 -0
- package/dist/components/highlight/index.js +1 -0
- package/dist/components/highlight/index.jsx +1 -0
- package/dist/components/hover-card/HoverCard.d.ts +27 -0
- package/dist/components/hover-card/HoverCard.js +164 -0
- package/dist/components/hover-card/HoverCard.jsx +89 -0
- package/dist/components/hover-card/index.d.ts +1 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/hover-card/index.jsx +1 -0
- package/dist/components/image/Image.d.ts +14 -0
- package/dist/components/image/Image.js +53 -0
- package/dist/components/image/Image.jsx +33 -0
- package/dist/components/image/index.d.ts +1 -0
- package/dist/components/image/index.js +1 -0
- package/dist/components/image/index.jsx +1 -0
- package/dist/components/image-cropper/ImageCropper.d.ts +27 -0
- package/dist/components/image-cropper/ImageCropper.js +131 -0
- package/dist/components/image-cropper/ImageCropper.jsx +72 -0
- package/dist/components/image-cropper/index.d.ts +1 -0
- package/dist/components/image-cropper/index.js +1 -0
- package/dist/components/image-cropper/index.jsx +1 -0
- package/dist/components/input/Input.d.ts +13 -0
- package/dist/components/input/Input.js +57 -0
- package/dist/components/input/Input.jsx +36 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/index.js +1 -0
- package/dist/components/input/index.jsx +1 -0
- package/dist/components/input-group/InputGroup.d.ts +27 -0
- package/dist/components/input-group/InputGroup.js +191 -0
- package/dist/components/input-group/InputGroup.jsx +129 -0
- package/dist/components/input-group/index.d.ts +1 -0
- package/dist/components/input-group/index.js +1 -0
- package/dist/components/input-group/index.jsx +1 -0
- package/dist/components/json-tree-view/JsonTreeView.d.ts +11 -0
- package/dist/components/json-tree-view/JsonTreeView.js +69 -0
- package/dist/components/json-tree-view/JsonTreeView.jsx +37 -0
- package/dist/components/json-tree-view/index.d.ts +1 -0
- package/dist/components/json-tree-view/index.js +1 -0
- package/dist/components/json-tree-view/index.jsx +1 -0
- package/dist/components/kbd/Kbd.d.ts +8 -0
- package/dist/components/kbd/Kbd.js +36 -0
- package/dist/components/kbd/Kbd.jsx +20 -0
- package/dist/components/kbd/index.d.ts +1 -0
- package/dist/components/kbd/index.js +1 -0
- package/dist/components/kbd/index.jsx +1 -0
- package/dist/components/lightbox/Lightbox.d.ts +60 -0
- package/dist/components/lightbox/Lightbox.js +351 -0
- package/dist/components/lightbox/Lightbox.jsx +218 -0
- package/dist/components/lightbox/index.d.ts +2 -0
- package/dist/components/lightbox/index.js +1 -0
- package/dist/components/lightbox/index.jsx +1 -0
- package/dist/components/list/List.d.ts +36 -0
- package/dist/components/list/List.js +201 -0
- package/dist/components/list/List.jsx +133 -0
- package/dist/components/list/index.d.ts +1 -0
- package/dist/components/list/index.js +1 -0
- package/dist/components/list/index.jsx +1 -0
- package/dist/components/listbox/Listbox.d.ts +46 -0
- package/dist/components/listbox/Listbox.js +249 -0
- package/dist/components/listbox/Listbox.jsx +147 -0
- package/dist/components/listbox/index.d.ts +1 -0
- package/dist/components/listbox/index.js +1 -0
- package/dist/components/listbox/index.jsx +1 -0
- package/dist/components/marquee/Marquee.d.ts +18 -0
- package/dist/components/marquee/Marquee.js +120 -0
- package/dist/components/marquee/Marquee.jsx +80 -0
- package/dist/components/marquee/index.d.ts +1 -0
- package/dist/components/marquee/index.js +1 -0
- package/dist/components/marquee/index.jsx +1 -0
- package/dist/components/menu/Menu.d.ts +74 -0
- package/dist/components/menu/Menu.js +476 -0
- package/dist/components/menu/Menu.jsx +277 -0
- package/dist/components/menu/index.d.ts +1 -0
- package/dist/components/menu/index.js +1 -0
- package/dist/components/menu/index.jsx +1 -0
- package/dist/components/native-select/NativeSelect.d.ts +11 -0
- package/dist/components/native-select/NativeSelect.js +49 -0
- package/dist/components/native-select/NativeSelect.jsx +24 -0
- package/dist/components/native-select/index.d.ts +1 -0
- package/dist/components/native-select/index.js +1 -0
- package/dist/components/native-select/index.jsx +1 -0
- package/dist/components/navigation-menu/NavigationMenu.d.ts +31 -0
- package/dist/components/navigation-menu/NavigationMenu.js +156 -0
- package/dist/components/navigation-menu/NavigationMenu.jsx +92 -0
- package/dist/components/navigation-menu/index.d.ts +1 -0
- package/dist/components/navigation-menu/index.js +1 -0
- package/dist/components/navigation-menu/index.jsx +1 -0
- package/dist/components/number-input/NumberInput.d.ts +27 -0
- package/dist/components/number-input/NumberInput.js +167 -0
- package/dist/components/number-input/NumberInput.jsx +97 -0
- package/dist/components/number-input/index.d.ts +1 -0
- package/dist/components/number-input/index.js +1 -0
- package/dist/components/number-input/index.jsx +1 -0
- package/dist/components/pagination/Pagination.d.ts +28 -0
- package/dist/components/pagination/Pagination.js +218 -0
- package/dist/components/pagination/Pagination.jsx +115 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/pagination/index.jsx +1 -0
- package/dist/components/password-input/PasswordInput.d.ts +26 -0
- package/dist/components/password-input/PasswordInput.js +135 -0
- package/dist/components/password-input/PasswordInput.jsx +83 -0
- package/dist/components/password-input/index.d.ts +1 -0
- package/dist/components/password-input/index.js +1 -0
- package/dist/components/password-input/index.jsx +1 -0
- package/dist/components/pin-input/PinInput.d.ts +24 -0
- package/dist/components/pin-input/PinInput.js +144 -0
- package/dist/components/pin-input/PinInput.jsx +80 -0
- package/dist/components/pin-input/index.d.ts +1 -0
- package/dist/components/pin-input/index.js +1 -0
- package/dist/components/pin-input/index.jsx +1 -0
- package/dist/components/popover/Popover.d.ts +46 -0
- package/dist/components/popover/Popover.js +288 -0
- package/dist/components/popover/Popover.jsx +155 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover/index.jsx +1 -0
- package/dist/components/progress-circular/ProgressCircular.d.ts +28 -0
- package/dist/components/progress-circular/ProgressCircular.js +164 -0
- package/dist/components/progress-circular/ProgressCircular.jsx +89 -0
- package/dist/components/progress-circular/index.d.ts +1 -0
- package/dist/components/progress-circular/index.js +1 -0
- package/dist/components/progress-circular/index.jsx +1 -0
- package/dist/components/progress-linear/ProgressLinear.d.ts +23 -0
- package/dist/components/progress-linear/ProgressLinear.js +132 -0
- package/dist/components/progress-linear/ProgressLinear.jsx +71 -0
- package/dist/components/progress-linear/index.d.ts +1 -0
- package/dist/components/progress-linear/index.js +1 -0
- package/dist/components/progress-linear/index.jsx +1 -0
- package/dist/components/qr-code/QrCode.d.ts +19 -0
- package/dist/components/qr-code/QrCode.js +129 -0
- package/dist/components/qr-code/QrCode.jsx +70 -0
- package/dist/components/qr-code/index.d.ts +1 -0
- package/dist/components/qr-code/index.js +1 -0
- package/dist/components/qr-code/index.jsx +1 -0
- package/dist/components/radio-group/RadioGroup.d.ts +33 -0
- package/dist/components/radio-group/RadioGroup.js +158 -0
- package/dist/components/radio-group/RadioGroup.jsx +94 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/radio-group/index.jsx +1 -0
- package/dist/components/rating-group/RatingGroup.d.ts +33 -0
- package/dist/components/rating-group/RatingGroup.js +150 -0
- package/dist/components/rating-group/RatingGroup.jsx +80 -0
- package/dist/components/rating-group/index.d.ts +2 -0
- package/dist/components/rating-group/index.js +1 -0
- package/dist/components/rating-group/index.jsx +1 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +30 -0
- package/dist/components/scroll-area/ScrollArea.js +109 -0
- package/dist/components/scroll-area/ScrollArea.jsx +61 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/scroll-area/index.jsx +1 -0
- package/dist/components/segment-group/SegmentGroup.d.ts +33 -0
- package/dist/components/segment-group/SegmentGroup.js +205 -0
- package/dist/components/segment-group/SegmentGroup.jsx +126 -0
- package/dist/components/segment-group/index.d.ts +1 -0
- package/dist/components/segment-group/index.js +1 -0
- package/dist/components/segment-group/index.jsx +1 -0
- package/dist/components/select/Select.d.ts +57 -0
- package/dist/components/select/Select.js +395 -0
- package/dist/components/select/Select.jsx +210 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/select/index.jsx +1 -0
- package/dist/components/separator/Separator.d.ts +17 -0
- package/dist/components/separator/Separator.js +127 -0
- package/dist/components/separator/Separator.jsx +100 -0
- package/dist/components/separator/index.d.ts +1 -0
- package/dist/components/separator/index.js +1 -0
- package/dist/components/separator/index.jsx +1 -0
- package/dist/components/sidebar/Sidebar.d.ts +82 -0
- package/dist/components/sidebar/Sidebar.js +590 -0
- package/dist/components/sidebar/Sidebar.jsx +308 -0
- package/dist/components/sidebar/index.d.ts +1 -0
- package/dist/components/sidebar/index.js +1 -0
- package/dist/components/sidebar/index.jsx +1 -0
- package/dist/components/signature-pad/SignaturePad.d.ts +30 -0
- package/dist/components/signature-pad/SignaturePad.js +211 -0
- package/dist/components/signature-pad/SignaturePad.jsx +116 -0
- package/dist/components/signature-pad/index.d.ts +1 -0
- package/dist/components/signature-pad/index.js +1 -0
- package/dist/components/signature-pad/index.jsx +1 -0
- package/dist/components/simple-grid/SimpleGrid.d.ts +17 -0
- package/dist/components/simple-grid/SimpleGrid.js +74 -0
- package/dist/components/simple-grid/SimpleGrid.jsx +59 -0
- package/dist/components/simple-grid/index.d.ts +1 -0
- package/dist/components/simple-grid/index.js +1 -0
- package/dist/components/simple-grid/index.jsx +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +15 -0
- package/dist/components/skeleton/Skeleton.js +74 -0
- package/dist/components/skeleton/Skeleton.jsx +47 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/skeleton/index.jsx +1 -0
- package/dist/components/slider/Slider.d.ts +36 -0
- package/dist/components/slider/Slider.js +202 -0
- package/dist/components/slider/Slider.jsx +109 -0
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/slider/index.js +1 -0
- package/dist/components/slider/index.jsx +1 -0
- package/dist/components/spinner/Spinner.d.ts +11 -0
- package/dist/components/spinner/Spinner.js +73 -0
- package/dist/components/spinner/Spinner.jsx +44 -0
- package/dist/components/spinner/index.d.ts +1 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/spinner/index.jsx +1 -0
- package/dist/components/split-button/SplitButton.d.ts +41 -0
- package/dist/components/split-button/SplitButton.js +197 -0
- package/dist/components/split-button/SplitButton.jsx +117 -0
- package/dist/components/split-button/index.d.ts +1 -0
- package/dist/components/split-button/index.js +1 -0
- package/dist/components/split-button/index.jsx +1 -0
- package/dist/components/splitter/Splitter.d.ts +18 -0
- package/dist/components/splitter/Splitter.js +101 -0
- package/dist/components/splitter/Splitter.jsx +58 -0
- package/dist/components/splitter/index.d.ts +1 -0
- package/dist/components/splitter/index.js +1 -0
- package/dist/components/splitter/index.jsx +1 -0
- package/dist/components/stack/Stack.d.ts +19 -0
- package/dist/components/stack/Stack.js +83 -0
- package/dist/components/stack/Stack.jsx +68 -0
- package/dist/components/stack/index.d.ts +1 -0
- package/dist/components/stack/index.js +1 -0
- package/dist/components/stack/index.jsx +1 -0
- package/dist/components/steps/Steps.d.ts +35 -0
- package/dist/components/steps/Steps.js +162 -0
- package/dist/components/steps/Steps.jsx +99 -0
- package/dist/components/steps/index.d.ts +1 -0
- package/dist/components/steps/index.js +1 -0
- package/dist/components/steps/index.jsx +1 -0
- package/dist/components/swap/Swap.d.ts +20 -0
- package/dist/components/swap/Swap.js +52 -0
- package/dist/components/swap/Swap.jsx +30 -0
- package/dist/components/swap/index.d.ts +1 -0
- package/dist/components/swap/index.js +1 -0
- package/dist/components/swap/index.jsx +1 -0
- package/dist/components/switch/Switch.d.ts +25 -0
- package/dist/components/switch/Switch.js +101 -0
- package/dist/components/switch/Switch.jsx +57 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/index.js +1 -0
- package/dist/components/switch/index.jsx +1 -0
- package/dist/components/table/Table.d.ts +71 -0
- package/dist/components/table/Table.js +363 -0
- package/dist/components/table/Table.jsx +189 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/table/index.jsx +1 -0
- package/dist/components/tabs/Tabs.d.ts +25 -0
- package/dist/components/tabs/Tabs.js +98 -0
- package/dist/components/tabs/Tabs.jsx +55 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/tabs/index.js +1 -0
- package/dist/components/tabs/index.jsx +1 -0
- package/dist/components/tag/Tag.d.ts +24 -0
- package/dist/components/tag/Tag.js +147 -0
- package/dist/components/tag/Tag.jsx +78 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/tag/index.js +1 -0
- package/dist/components/tag/index.jsx +1 -0
- package/dist/components/tags-input/TagsInput.d.ts +32 -0
- package/dist/components/tags-input/TagsInput.js +240 -0
- package/dist/components/tags-input/TagsInput.jsx +127 -0
- package/dist/components/tags-input/index.d.ts +1 -0
- package/dist/components/tags-input/index.js +1 -0
- package/dist/components/tags-input/index.jsx +1 -0
- package/dist/components/text/Text.d.ts +30 -0
- package/dist/components/text/Text.js +126 -0
- package/dist/components/text/Text.jsx +91 -0
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/text/index.js +1 -0
- package/dist/components/text/index.jsx +1 -0
- package/dist/components/textarea/Textarea.d.ts +9 -0
- package/dist/components/textarea/Textarea.js +45 -0
- package/dist/components/textarea/Textarea.jsx +26 -0
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/textarea/index.jsx +1 -0
- package/dist/components/timer/Timer.d.ts +26 -0
- package/dist/components/timer/Timer.js +126 -0
- package/dist/components/timer/Timer.jsx +77 -0
- package/dist/components/timer/index.d.ts +1 -0
- package/dist/components/timer/index.js +1 -0
- package/dist/components/timer/index.jsx +1 -0
- package/dist/components/toast/Toast.d.ts +22 -0
- package/dist/components/toast/Toast.js +184 -0
- package/dist/components/toast/Toast.jsx +94 -0
- package/dist/components/toast/index.d.ts +1 -0
- package/dist/components/toast/index.js +1 -0
- package/dist/components/toast/index.jsx +1 -0
- package/dist/components/toc/Toc.d.ts +34 -0
- package/dist/components/toc/Toc.js +222 -0
- package/dist/components/toc/Toc.jsx +129 -0
- package/dist/components/toc/index.d.ts +1 -0
- package/dist/components/toc/index.js +1 -0
- package/dist/components/toc/index.jsx +1 -0
- package/dist/components/toggle/Toggle.d.ts +17 -0
- package/dist/components/toggle/Toggle.js +76 -0
- package/dist/components/toggle/Toggle.jsx +51 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/index.js +1 -0
- package/dist/components/toggle/index.jsx +1 -0
- package/dist/components/toggle-group/ToggleGroup.d.ts +27 -0
- package/dist/components/toggle-group/ToggleGroup.js +165 -0
- package/dist/components/toggle-group/ToggleGroup.jsx +110 -0
- package/dist/components/toggle-group/index.d.ts +2 -0
- package/dist/components/toggle-group/index.js +1 -0
- package/dist/components/toggle-group/index.jsx +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +29 -0
- package/dist/components/tooltip/Tooltip.js +192 -0
- package/dist/components/tooltip/Tooltip.jsx +108 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/index.jsx +1 -0
- package/dist/components/tour/Tour.d.ts +46 -0
- package/dist/components/tour/Tour.js +274 -0
- package/dist/components/tour/Tour.jsx +155 -0
- package/dist/components/tour/index.d.ts +2 -0
- package/dist/components/tour/index.js +1 -0
- package/dist/components/tour/index.jsx +1 -0
- package/dist/components/tree-view/TreeView.d.ts +58 -0
- package/dist/components/tree-view/TreeView.js +296 -0
- package/dist/components/tree-view/TreeView.jsx +173 -0
- package/dist/components/tree-view/index.d.ts +1 -0
- package/dist/components/tree-view/index.js +1 -0
- package/dist/components/tree-view/index.jsx +1 -0
- package/dist/components/typeset/Typeset.d.ts +15 -0
- package/dist/components/typeset/Typeset.js +68 -0
- package/dist/components/typeset/Typeset.jsx +33 -0
- package/dist/components/typeset/Typeset.module.js +6 -0
- package/dist/components/typeset/Typeset.module.jsx +6 -0
- package/dist/components/typeset/Typeset_module.css +466 -0
- package/dist/components/typeset/index.d.ts +1 -0
- package/dist/components/typeset/index.js +1 -0
- package/dist/components/typeset/index.jsx +1 -0
- package/dist/internal/cn.d.ts +2 -0
- package/dist/internal/cn.js +40 -0
- package/dist/internal/cn.jsx +40 -0
- package/dist/internal/icons/ui/Icons.d.ts +37 -0
- package/dist/internal/icons/ui/Icons.js +115 -0
- package/dist/internal/icons/ui/Icons.jsx +93 -0
- package/dist/internal/icons/ui/index.d.ts +1 -0
- package/dist/internal/icons/ui/index.js +1 -0
- package/dist/internal/icons/ui/index.jsx +1 -0
- package/dist/internal/overlayPortal.d.ts +13 -0
- package/dist/internal/overlayPortal.js +39 -0
- package/dist/internal/overlayPortal.jsx +19 -0
- package/dist/locale.d.ts +1 -0
- package/dist/locale.js +1 -0
- package/dist/locale.jsx +1 -0
- package/dist/presets/contrast.css +65 -0
- package/dist/presets/dense.css +78 -0
- package/dist/presets/soft.css +77 -0
- package/dist/styles/animations.css +371 -0
- package/dist/styles/borders.css +10 -0
- package/dist/styles/colors.css +122 -0
- package/dist/styles/opacity.css +5 -0
- package/dist/styles/radius.css +11 -0
- package/dist/styles/shadows.css +5 -0
- package/dist/styles/sizing.css +11 -0
- package/dist/styles/spacing.css +26 -0
- package/dist/styles/style.css +180 -0
- package/dist/styles/transforms.css +4 -0
- package/dist/styles/transitions.css +32 -0
- package/dist/styles/typography.css +37 -0
- package/dist/styles/z-index.css +13 -0
- package/package.json +633 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FieldTextareaProps } from '@ark-ui/solid/field';
|
|
2
|
+
type TextareaProps = FieldTextareaProps & {
|
|
3
|
+
defaultValue?: string | number | readonly string[];
|
|
4
|
+
'data-scope'?: string;
|
|
5
|
+
'data-part'?: string;
|
|
6
|
+
'data-slot'?: string;
|
|
7
|
+
};
|
|
8
|
+
declare function Textarea(props: TextareaProps): import("solid-js").JSX.Element;
|
|
9
|
+
export { Textarea };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createComponent, mergeProps } from "solid-js/web";
|
|
2
|
+
import { Field } from "@ark-ui/solid/field";
|
|
3
|
+
import { createEffect, splitProps } from "solid-js";
|
|
4
|
+
import { cn } from "../../internal/cn.js";
|
|
5
|
+
function Textarea(props) {
|
|
6
|
+
const [local, others] = splitProps(props, [
|
|
7
|
+
'asChild',
|
|
8
|
+
'autoresize',
|
|
9
|
+
'class',
|
|
10
|
+
'defaultValue',
|
|
11
|
+
'data-scope',
|
|
12
|
+
'data-part',
|
|
13
|
+
'data-slot',
|
|
14
|
+
'ref'
|
|
15
|
+
]);
|
|
16
|
+
let textareaRef;
|
|
17
|
+
createEffect(()=>{
|
|
18
|
+
if (textareaRef) textareaRef.defaultValue = String(local.defaultValue ?? '');
|
|
19
|
+
});
|
|
20
|
+
return createComponent(Field.Textarea, mergeProps({
|
|
21
|
+
get asChild () {
|
|
22
|
+
return local.asChild;
|
|
23
|
+
}
|
|
24
|
+
}, others, ()=>local.asChild ? {
|
|
25
|
+
'prop:defaultValue': local.defaultValue
|
|
26
|
+
} : {}, {
|
|
27
|
+
"data-scope": "field",
|
|
28
|
+
"data-part": "textarea",
|
|
29
|
+
"data-slot": "textarea-root",
|
|
30
|
+
get ["data-autoresize"] () {
|
|
31
|
+
return local.autoresize ? '' : void 0;
|
|
32
|
+
},
|
|
33
|
+
get ["class"] () {
|
|
34
|
+
return cn('min-h-24 w-full max-w-none resize-y rounded-md border border-border bg-background px-3.5 py-2 text-md leading-6 text-foreground outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color,opacity] duration-200 ease-in-out placeholder:text-muted-foreground focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:outline-destructive data-autoresize:overflow-y-hidden data-disabled:pointer-events-none data-disabled:opacity-50 data-invalid:border-destructive data-invalid:focus-visible:outline-destructive motion-reduce:transition-none', local.class);
|
|
35
|
+
},
|
|
36
|
+
get autoresize () {
|
|
37
|
+
return local.autoresize;
|
|
38
|
+
},
|
|
39
|
+
ref: (element)=>{
|
|
40
|
+
textareaRef = element;
|
|
41
|
+
if ('function' == typeof local.ref) local.ref(element);
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
export { Textarea };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Field } from "@ark-ui/solid/field";
|
|
2
|
+
import { createEffect, splitProps } from "solid-js";
|
|
3
|
+
import { cn } from "../../internal/cn.jsx";
|
|
4
|
+
function Textarea(props) {
|
|
5
|
+
const [local, others] = splitProps(props, [
|
|
6
|
+
'asChild',
|
|
7
|
+
'autoresize',
|
|
8
|
+
'class',
|
|
9
|
+
'defaultValue',
|
|
10
|
+
'data-scope',
|
|
11
|
+
'data-part',
|
|
12
|
+
'data-slot',
|
|
13
|
+
'ref'
|
|
14
|
+
]);
|
|
15
|
+
let textareaRef;
|
|
16
|
+
createEffect(()=>{
|
|
17
|
+
if (textareaRef) textareaRef.defaultValue = String(local.defaultValue ?? '');
|
|
18
|
+
});
|
|
19
|
+
return <Field.Textarea asChild={local.asChild} {...others} {...local.asChild ? {
|
|
20
|
+
'prop:defaultValue': local.defaultValue
|
|
21
|
+
} : {}} data-scope="field" data-part="textarea" data-slot="textarea-root" data-autoresize={local.autoresize ? '' : void 0} class={cn('min-h-24 w-full max-w-none resize-y rounded-md border border-border bg-background px-3.5 py-2 text-md leading-6 text-foreground outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color,opacity] duration-200 ease-in-out placeholder:text-muted-foreground focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:outline-destructive data-autoresize:overflow-y-hidden data-disabled:pointer-events-none data-disabled:opacity-50 data-invalid:border-destructive data-invalid:focus-visible:outline-destructive motion-reduce:transition-none', local.class)} autoresize={local.autoresize} ref={(element)=>{
|
|
22
|
+
textareaRef = element;
|
|
23
|
+
if ('function' == typeof local.ref) local.ref(element);
|
|
24
|
+
}}/>;
|
|
25
|
+
}
|
|
26
|
+
export { Textarea };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Textarea } from './Textarea.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Textarea } from "./Textarea.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Textarea } from "./Textarea.jsx";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Timer as TimerPrimitive, useTimer, useTimerContext } from '@ark-ui/solid/timer';
|
|
2
|
+
import type { ComponentProps, JSX } from 'solid-js';
|
|
3
|
+
declare function TimerRoot(props: ComponentProps<typeof TimerPrimitive.Root>): JSX.Element;
|
|
4
|
+
declare function TimerRootProvider(props: ComponentProps<typeof TimerPrimitive.RootProvider>): JSX.Element;
|
|
5
|
+
declare function TimerArea(props: ComponentProps<typeof TimerPrimitive.Area>): JSX.Element;
|
|
6
|
+
declare function TimerItem(props: ComponentProps<typeof TimerPrimitive.Item>): JSX.Element;
|
|
7
|
+
declare function TimerSeparator(props: ComponentProps<typeof TimerPrimitive.Separator>): JSX.Element;
|
|
8
|
+
declare function TimerControl(props: ComponentProps<typeof TimerPrimitive.Control>): JSX.Element;
|
|
9
|
+
declare function TimerActionTrigger(props: ComponentProps<typeof TimerPrimitive.ActionTrigger>): JSX.Element;
|
|
10
|
+
type TimerSegmentsProps = Omit<ComponentProps<typeof TimerPrimitive.Area>, 'asChild' | 'children'> & {
|
|
11
|
+
separator?: JSX.Element;
|
|
12
|
+
types?: ComponentProps<typeof TimerPrimitive.Item>['type'][];
|
|
13
|
+
};
|
|
14
|
+
declare function TimerSegments(props: TimerSegmentsProps): JSX.Element;
|
|
15
|
+
declare const Timer: typeof TimerRoot & {
|
|
16
|
+
Root: typeof TimerRoot;
|
|
17
|
+
RootProvider: typeof TimerRootProvider;
|
|
18
|
+
Area: typeof TimerArea;
|
|
19
|
+
Item: typeof TimerItem;
|
|
20
|
+
Separator: typeof TimerSeparator;
|
|
21
|
+
Control: typeof TimerControl;
|
|
22
|
+
ActionTrigger: typeof TimerActionTrigger;
|
|
23
|
+
Context: (props: TimerPrimitive.ContextProps) => JSX.Element;
|
|
24
|
+
Segments: typeof TimerSegments;
|
|
25
|
+
};
|
|
26
|
+
export { Timer, type TimerSegmentsProps, useTimer, useTimerContext };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { createComponent, memo, mergeProps } from "solid-js/web";
|
|
2
|
+
import { Timer, useTimer, useTimerContext } from "@ark-ui/solid/timer";
|
|
3
|
+
import { Index, splitProps } from "solid-js";
|
|
4
|
+
import { cn } from "../../internal/cn.js";
|
|
5
|
+
function TimerRoot(props) {
|
|
6
|
+
const [local, others] = splitProps(props, [
|
|
7
|
+
'class'
|
|
8
|
+
]);
|
|
9
|
+
return createComponent(Timer.Root, mergeProps({
|
|
10
|
+
"data-slot": "timer-root",
|
|
11
|
+
get ["class"] () {
|
|
12
|
+
return cn('inline-grid w-max max-w-full place-items-center gap-3 text-foreground', local.class);
|
|
13
|
+
}
|
|
14
|
+
}, others));
|
|
15
|
+
}
|
|
16
|
+
function TimerRootProvider(props) {
|
|
17
|
+
const [local, others] = splitProps(props, [
|
|
18
|
+
'class'
|
|
19
|
+
]);
|
|
20
|
+
return createComponent(Timer.RootProvider, mergeProps({
|
|
21
|
+
"data-slot": "timer-root-provider",
|
|
22
|
+
get ["class"] () {
|
|
23
|
+
return cn('inline-grid w-max max-w-full place-items-center gap-3 text-foreground', local.class);
|
|
24
|
+
}
|
|
25
|
+
}, others));
|
|
26
|
+
}
|
|
27
|
+
function TimerArea(props) {
|
|
28
|
+
const [local, others] = splitProps(props, [
|
|
29
|
+
'class'
|
|
30
|
+
]);
|
|
31
|
+
return createComponent(Timer.Area, mergeProps({
|
|
32
|
+
"data-slot": "timer-area",
|
|
33
|
+
get ["class"] () {
|
|
34
|
+
return cn('inline-flex max-w-full min-w-0 flex-wrap items-baseline justify-center gap-1 text-2xl leading-5 font-semibold tracking-normal tabular-nums', local.class);
|
|
35
|
+
}
|
|
36
|
+
}, others));
|
|
37
|
+
}
|
|
38
|
+
function TimerItem(props) {
|
|
39
|
+
const [local, others] = splitProps(props, [
|
|
40
|
+
'class'
|
|
41
|
+
]);
|
|
42
|
+
return createComponent(Timer.Item, mergeProps({
|
|
43
|
+
"data-slot": "timer-item",
|
|
44
|
+
get ["class"] () {
|
|
45
|
+
return cn('min-w-[2ch] text-center', local.class);
|
|
46
|
+
}
|
|
47
|
+
}, others));
|
|
48
|
+
}
|
|
49
|
+
function TimerSeparator(props) {
|
|
50
|
+
const [local, others] = splitProps(props, [
|
|
51
|
+
'class'
|
|
52
|
+
]);
|
|
53
|
+
return createComponent(Timer.Separator, mergeProps({
|
|
54
|
+
"data-slot": "timer-separator",
|
|
55
|
+
get ["class"] () {
|
|
56
|
+
return cn('text-muted-foreground', local.class);
|
|
57
|
+
}
|
|
58
|
+
}, others));
|
|
59
|
+
}
|
|
60
|
+
function TimerControl(props) {
|
|
61
|
+
const [local, others] = splitProps(props, [
|
|
62
|
+
'class'
|
|
63
|
+
]);
|
|
64
|
+
return createComponent(Timer.Control, mergeProps({
|
|
65
|
+
"data-slot": "timer-control",
|
|
66
|
+
get ["class"] () {
|
|
67
|
+
return cn('inline-flex flex-wrap items-center gap-2', local.class);
|
|
68
|
+
}
|
|
69
|
+
}, others));
|
|
70
|
+
}
|
|
71
|
+
function TimerActionTrigger(props) {
|
|
72
|
+
const [local, others] = splitProps(props, [
|
|
73
|
+
'class'
|
|
74
|
+
]);
|
|
75
|
+
return createComponent(Timer.ActionTrigger, mergeProps({
|
|
76
|
+
"data-slot": "timer-action-trigger",
|
|
77
|
+
get ["class"] () {
|
|
78
|
+
return cn('inline-flex min-h-control-md cursor-pointer appearance-none items-center justify-center gap-2 rounded-md border border-border bg-background px-3 py-1.5 text-sm leading-5 font-medium whitespace-nowrap text-foreground transition-[background-color,border-color,color,opacity,box-shadow] duration-200 ease-in-out focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-default aria-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [@media(hover:hover)]:hover:bg-accent', local.class);
|
|
79
|
+
}
|
|
80
|
+
}, others));
|
|
81
|
+
}
|
|
82
|
+
const defaultTimerSegmentTypes = [
|
|
83
|
+
'hours',
|
|
84
|
+
'minutes',
|
|
85
|
+
'seconds'
|
|
86
|
+
];
|
|
87
|
+
function TimerSegments(props) {
|
|
88
|
+
const [local, others] = splitProps(props, [
|
|
89
|
+
'separator',
|
|
90
|
+
'types'
|
|
91
|
+
]);
|
|
92
|
+
const segmentTypes = ()=>local.types ?? defaultTimerSegmentTypes;
|
|
93
|
+
return createComponent(TimerArea, mergeProps(others, {
|
|
94
|
+
get children () {
|
|
95
|
+
return createComponent(Index, {
|
|
96
|
+
get each () {
|
|
97
|
+
return segmentTypes();
|
|
98
|
+
},
|
|
99
|
+
children: (type, index)=>[
|
|
100
|
+
createComponent(TimerItem, {
|
|
101
|
+
get type () {
|
|
102
|
+
return type();
|
|
103
|
+
}
|
|
104
|
+
}),
|
|
105
|
+
memo(()=>memo(()=>index < segmentTypes().length - 1)() && createComponent(TimerSeparator, {
|
|
106
|
+
get children () {
|
|
107
|
+
return local.separator ?? ':';
|
|
108
|
+
}
|
|
109
|
+
}))
|
|
110
|
+
]
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
const Timer_Timer = Object.assign(TimerRoot, {
|
|
116
|
+
Root: TimerRoot,
|
|
117
|
+
RootProvider: TimerRootProvider,
|
|
118
|
+
Area: TimerArea,
|
|
119
|
+
Item: TimerItem,
|
|
120
|
+
Separator: TimerSeparator,
|
|
121
|
+
Control: TimerControl,
|
|
122
|
+
ActionTrigger: TimerActionTrigger,
|
|
123
|
+
Context: Timer.Context,
|
|
124
|
+
Segments: TimerSegments
|
|
125
|
+
});
|
|
126
|
+
export { Timer_Timer as Timer, useTimer, useTimerContext };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Timer, useTimer, useTimerContext } from "@ark-ui/solid/timer";
|
|
2
|
+
import { Index, splitProps } from "solid-js";
|
|
3
|
+
import { cn } from "../../internal/cn.jsx";
|
|
4
|
+
function TimerRoot(props) {
|
|
5
|
+
const [local, others] = splitProps(props, [
|
|
6
|
+
'class'
|
|
7
|
+
]);
|
|
8
|
+
return <Timer.Root data-slot="timer-root" class={cn('inline-grid w-max max-w-full place-items-center gap-3 text-foreground', local.class)} {...others}/>;
|
|
9
|
+
}
|
|
10
|
+
function TimerRootProvider(props) {
|
|
11
|
+
const [local, others] = splitProps(props, [
|
|
12
|
+
'class'
|
|
13
|
+
]);
|
|
14
|
+
return <Timer.RootProvider data-slot="timer-root-provider" class={cn('inline-grid w-max max-w-full place-items-center gap-3 text-foreground', local.class)} {...others}/>;
|
|
15
|
+
}
|
|
16
|
+
function TimerArea(props) {
|
|
17
|
+
const [local, others] = splitProps(props, [
|
|
18
|
+
'class'
|
|
19
|
+
]);
|
|
20
|
+
return <Timer.Area data-slot="timer-area" class={cn('inline-flex max-w-full min-w-0 flex-wrap items-baseline justify-center gap-1 text-2xl leading-5 font-semibold tracking-normal tabular-nums', local.class)} {...others}/>;
|
|
21
|
+
}
|
|
22
|
+
function TimerItem(props) {
|
|
23
|
+
const [local, others] = splitProps(props, [
|
|
24
|
+
'class'
|
|
25
|
+
]);
|
|
26
|
+
return <Timer.Item data-slot="timer-item" class={cn('min-w-[2ch] text-center', local.class)} {...others}/>;
|
|
27
|
+
}
|
|
28
|
+
function TimerSeparator(props) {
|
|
29
|
+
const [local, others] = splitProps(props, [
|
|
30
|
+
'class'
|
|
31
|
+
]);
|
|
32
|
+
return <Timer.Separator data-slot="timer-separator" class={cn('text-muted-foreground', local.class)} {...others}/>;
|
|
33
|
+
}
|
|
34
|
+
function TimerControl(props) {
|
|
35
|
+
const [local, others] = splitProps(props, [
|
|
36
|
+
'class'
|
|
37
|
+
]);
|
|
38
|
+
return <Timer.Control data-slot="timer-control" class={cn('inline-flex flex-wrap items-center gap-2', local.class)} {...others}/>;
|
|
39
|
+
}
|
|
40
|
+
function TimerActionTrigger(props) {
|
|
41
|
+
const [local, others] = splitProps(props, [
|
|
42
|
+
'class'
|
|
43
|
+
]);
|
|
44
|
+
return <Timer.ActionTrigger data-slot="timer-action-trigger" class={cn('inline-flex min-h-control-md cursor-pointer appearance-none items-center justify-center gap-2 rounded-md border border-border bg-background px-3 py-1.5 text-sm leading-5 font-medium whitespace-nowrap text-foreground transition-[background-color,border-color,color,opacity,box-shadow] duration-200 ease-in-out focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-default aria-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [@media(hover:hover)]:hover:bg-accent', local.class)} {...others}/>;
|
|
45
|
+
}
|
|
46
|
+
const defaultTimerSegmentTypes = [
|
|
47
|
+
'hours',
|
|
48
|
+
'minutes',
|
|
49
|
+
'seconds'
|
|
50
|
+
];
|
|
51
|
+
function TimerSegments(props) {
|
|
52
|
+
const [local, others] = splitProps(props, [
|
|
53
|
+
'separator',
|
|
54
|
+
'types'
|
|
55
|
+
]);
|
|
56
|
+
const segmentTypes = ()=>local.types ?? defaultTimerSegmentTypes;
|
|
57
|
+
return <TimerArea {...others}>
|
|
58
|
+
<Index each={segmentTypes()}>
|
|
59
|
+
{(type, index)=><>
|
|
60
|
+
<TimerItem type={type()}/>
|
|
61
|
+
{index < segmentTypes().length - 1 && <TimerSeparator>{local.separator ?? ':'}</TimerSeparator>}
|
|
62
|
+
</>}
|
|
63
|
+
</Index>
|
|
64
|
+
</TimerArea>;
|
|
65
|
+
}
|
|
66
|
+
const Timer_Timer = Object.assign(TimerRoot, {
|
|
67
|
+
Root: TimerRoot,
|
|
68
|
+
RootProvider: TimerRootProvider,
|
|
69
|
+
Area: TimerArea,
|
|
70
|
+
Item: TimerItem,
|
|
71
|
+
Separator: TimerSeparator,
|
|
72
|
+
Control: TimerControl,
|
|
73
|
+
ActionTrigger: TimerActionTrigger,
|
|
74
|
+
Context: Timer.Context,
|
|
75
|
+
Segments: TimerSegments
|
|
76
|
+
});
|
|
77
|
+
export { Timer_Timer as Timer, useTimer, useTimerContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Timer, useTimer, useTimerContext, type TimerSegmentsProps } from './Timer.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Timer, useTimer, useTimerContext } from "./Timer.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Timer, useTimer, useTimerContext } from "./Timer.jsx";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Toast as ToastPrimitive, Toaster as ToasterPrimitive, createToaster, useToastContext } from '@ark-ui/solid/toast';
|
|
2
|
+
import type { ComponentProps } from 'solid-js';
|
|
3
|
+
import { type OverlayPortalProps } from '../../internal/overlayPortal.js';
|
|
4
|
+
type ToasterProps = Omit<ComponentProps<typeof ToasterPrimitive>, 'children'> & OverlayPortalProps & {
|
|
5
|
+
children?: ComponentProps<typeof ToasterPrimitive>['children'];
|
|
6
|
+
};
|
|
7
|
+
declare function Toaster(props: ToasterProps): import("solid-js").JSX.Element;
|
|
8
|
+
declare function ToastRoot(props: ComponentProps<typeof ToastPrimitive.Root>): import("solid-js").JSX.Element;
|
|
9
|
+
declare function ToastTitle(props: ComponentProps<typeof ToastPrimitive.Title>): import("solid-js").JSX.Element;
|
|
10
|
+
declare function ToastDescription(props: ComponentProps<typeof ToastPrimitive.Description>): import("solid-js").JSX.Element;
|
|
11
|
+
declare function ToastActionTrigger(props: ComponentProps<typeof ToastPrimitive.ActionTrigger>): import("solid-js").JSX.Element;
|
|
12
|
+
declare function ToastCloseTrigger(props: ComponentProps<typeof ToastPrimitive.CloseTrigger>): import("solid-js").JSX.Element;
|
|
13
|
+
declare const Toast: typeof ToastRoot & {
|
|
14
|
+
Root: typeof ToastRoot;
|
|
15
|
+
Context: (props: ToastPrimitive.ContextProps) => import("solid-js").JSX.Element;
|
|
16
|
+
Title: typeof ToastTitle;
|
|
17
|
+
Description: typeof ToastDescription;
|
|
18
|
+
ActionTrigger: typeof ToastActionTrigger;
|
|
19
|
+
CloseTrigger: typeof ToastCloseTrigger;
|
|
20
|
+
Toaster: typeof Toaster;
|
|
21
|
+
};
|
|
22
|
+
export { Toast, Toaster, createToaster, useToastContext };
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { createComponent, memo, mergeProps } from "solid-js/web";
|
|
2
|
+
import { Toast, Toaster, createToaster, useToastContext } from "@ark-ui/solid/toast";
|
|
3
|
+
import { children, splitProps } from "solid-js";
|
|
4
|
+
import { cn } from "../../internal/cn.js";
|
|
5
|
+
import { OverlayPortal, OverlayPortalProvider } from "../../internal/overlayPortal.js";
|
|
6
|
+
import { CloseButton } from "../close-button/index.js";
|
|
7
|
+
const DEFAULT_CLOSE_TRIGGER_LABEL = 'Close toast';
|
|
8
|
+
function Toast_Toaster(props) {
|
|
9
|
+
const [local, others] = splitProps(props, [
|
|
10
|
+
'children',
|
|
11
|
+
'class',
|
|
12
|
+
'portalRef',
|
|
13
|
+
'portalled'
|
|
14
|
+
]);
|
|
15
|
+
return createComponent(OverlayPortalProvider, {
|
|
16
|
+
get portalled () {
|
|
17
|
+
return local.portalled;
|
|
18
|
+
},
|
|
19
|
+
get portalRef () {
|
|
20
|
+
return local.portalRef;
|
|
21
|
+
},
|
|
22
|
+
get children () {
|
|
23
|
+
return createComponent(OverlayPortal, {
|
|
24
|
+
get children () {
|
|
25
|
+
return createComponent(Toaster, mergeProps({
|
|
26
|
+
"data-slot": "toast-toaster",
|
|
27
|
+
get ["class"] () {
|
|
28
|
+
return cn('z-70 max-[40rem]:w-full', local.class);
|
|
29
|
+
}
|
|
30
|
+
}, others, {
|
|
31
|
+
get children () {
|
|
32
|
+
return local.children ?? ((toast)=>createComponent(DefaultToast, {
|
|
33
|
+
toast: toast
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function DefaultToast(props) {
|
|
43
|
+
const hasAction = ()=>null != props.toast().action;
|
|
44
|
+
const actionLabel = ()=>props.toast().action?.label;
|
|
45
|
+
return createComponent(ToastRoot, {
|
|
46
|
+
get children () {
|
|
47
|
+
return [
|
|
48
|
+
memo(()=>memo(()=>null != props.toast().title)() ? createComponent(ToastTitle, {}) : null),
|
|
49
|
+
memo(()=>memo(()=>null != props.toast().description)() ? createComponent(ToastDescription, {}) : null),
|
|
50
|
+
memo(()=>memo(()=>!!hasAction())() ? createComponent(ToastActionTrigger, {
|
|
51
|
+
get children () {
|
|
52
|
+
return actionLabel();
|
|
53
|
+
}
|
|
54
|
+
}) : null),
|
|
55
|
+
memo(()=>memo(()=>false !== props.toast().closable)() ? createComponent(ToastCloseTrigger, {}) : null)
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function ToastRoot(props) {
|
|
61
|
+
const [local, others] = splitProps(props, [
|
|
62
|
+
'class'
|
|
63
|
+
]);
|
|
64
|
+
return createComponent(Toast.Root, mergeProps({
|
|
65
|
+
"data-slot": "toast-root",
|
|
66
|
+
get ["class"] () {
|
|
67
|
+
return cn('group/toast pointer-events-auto [z-index:var(--z-index)] box-border grid [height:var(--height)] min-h-0 w-80 max-w-[calc(100vw-2rem)] min-w-0 [translate:var(--x)_var(--y)] [scale:var(--scale)] items-start gap-1 rounded-lg border border-border bg-card bg-clip-padding p-4 pe-11 text-card-foreground [opacity:var(--opacity)] shadow-lg transition-[translate,scale,opacity,height,box-shadow] duration-350 ease-[cubic-bezier(0.21,1.02,0.73,1)] [will-change:translate,opacity,scale] data-[state=closed]:ease-[cubic-bezier(0.06,0.71,0.55,1)] data-[state=closed]:[transition:translate_350ms,scale_350ms,opacity_200ms] data-[type=error]:border-destructive/35 data-[type=error]:bg-destructive/9 data-[type=error]:text-foreground data-[type=success]:border-success/34 data-[type=success]:bg-success/10 data-[type=success]:text-foreground data-[type=warning]:border-warning/38 data-[type=warning]:bg-warning/13 data-[type=warning]:text-foreground motion-reduce:transition-none max-[40rem]:inset-x-0 max-[40rem]:w-[calc(100%_-_(var(--gap)*2))] max-[40rem]:max-w-none', local.class);
|
|
68
|
+
}
|
|
69
|
+
}, others));
|
|
70
|
+
}
|
|
71
|
+
function ToastTitle(props) {
|
|
72
|
+
const [local, others] = splitProps(props, [
|
|
73
|
+
'children',
|
|
74
|
+
'class'
|
|
75
|
+
]);
|
|
76
|
+
const resolvedChildren = children(()=>local.children);
|
|
77
|
+
const toast = useToastContext();
|
|
78
|
+
return createComponent(Toast.Title, mergeProps({
|
|
79
|
+
"data-slot": "toast-title",
|
|
80
|
+
get ["class"] () {
|
|
81
|
+
return cn('m-0 flex min-w-0 items-center gap-2 text-sm leading-5 font-semibold wrap-anywhere text-inherit', local.class);
|
|
82
|
+
}
|
|
83
|
+
}, others, {
|
|
84
|
+
get children () {
|
|
85
|
+
return memo(()=>void 0 === resolvedChildren())() ? toast().title : resolvedChildren();
|
|
86
|
+
}
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
function ToastDescription(props) {
|
|
90
|
+
const [local, others] = splitProps(props, [
|
|
91
|
+
'children',
|
|
92
|
+
'class'
|
|
93
|
+
]);
|
|
94
|
+
const resolvedChildren = children(()=>local.children);
|
|
95
|
+
const toast = useToastContext();
|
|
96
|
+
return createComponent(Toast.Description, mergeProps({
|
|
97
|
+
"data-slot": "toast-description",
|
|
98
|
+
get ["class"] () {
|
|
99
|
+
return cn('m-0 min-w-0 text-sm leading-5 wrap-anywhere text-muted-foreground', local.class);
|
|
100
|
+
}
|
|
101
|
+
}, others, {
|
|
102
|
+
get children () {
|
|
103
|
+
return memo(()=>void 0 === resolvedChildren())() ? toast().description : resolvedChildren();
|
|
104
|
+
}
|
|
105
|
+
}));
|
|
106
|
+
}
|
|
107
|
+
function ToastActionTrigger(props) {
|
|
108
|
+
const [local, others] = splitProps(props, [
|
|
109
|
+
'asChild',
|
|
110
|
+
'children',
|
|
111
|
+
'class'
|
|
112
|
+
]);
|
|
113
|
+
return createComponent(Toast.ActionTrigger, mergeProps({
|
|
114
|
+
get asChild () {
|
|
115
|
+
return local.asChild;
|
|
116
|
+
},
|
|
117
|
+
"data-slot": "toast-action-trigger",
|
|
118
|
+
get ["class"] () {
|
|
119
|
+
return cn(!local.asChild && 'mt-2 inline-flex min-h-control-xs w-max max-w-full min-w-0 cursor-pointer items-center justify-center gap-2 rounded-sm border border-border bg-transparent px-2 py-1 text-start text-xs leading-4 font-medium wrap-anywhere text-foreground transition-[background-color,border-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:outline-ring motion-reduce:transition-none [@media(hover:hover)]:hover:bg-accent', local.class);
|
|
120
|
+
}
|
|
121
|
+
}, others, {
|
|
122
|
+
get children () {
|
|
123
|
+
return local.children;
|
|
124
|
+
}
|
|
125
|
+
}));
|
|
126
|
+
}
|
|
127
|
+
function ToastCloseTrigger(props) {
|
|
128
|
+
const [local, others] = splitProps(props, [
|
|
129
|
+
'aria-label',
|
|
130
|
+
'aria-labelledby',
|
|
131
|
+
'asChild',
|
|
132
|
+
'children',
|
|
133
|
+
'class'
|
|
134
|
+
]);
|
|
135
|
+
const resolvedChildren = children(()=>local.children);
|
|
136
|
+
const ariaLabel = void 0 === local['aria-label'] ? DEFAULT_CLOSE_TRIGGER_LABEL : local['aria-label'];
|
|
137
|
+
if (local.asChild) return createComponent(Toast.CloseTrigger, mergeProps({
|
|
138
|
+
get asChild () {
|
|
139
|
+
return local.asChild;
|
|
140
|
+
},
|
|
141
|
+
"data-slot": "toast-close-trigger",
|
|
142
|
+
"aria-label": ariaLabel,
|
|
143
|
+
get ["aria-labelledby"] () {
|
|
144
|
+
return local['aria-labelledby'];
|
|
145
|
+
},
|
|
146
|
+
get ["class"] () {
|
|
147
|
+
return local.class;
|
|
148
|
+
}
|
|
149
|
+
}, others, {
|
|
150
|
+
get children () {
|
|
151
|
+
return local.children;
|
|
152
|
+
}
|
|
153
|
+
}));
|
|
154
|
+
return createComponent(Toast.CloseTrigger, mergeProps({
|
|
155
|
+
asChild: (triggerProps)=>createComponent(CloseButton.Root, mergeProps(triggerProps, {
|
|
156
|
+
"data-slot": "toast-close-trigger",
|
|
157
|
+
"aria-label": ariaLabel,
|
|
158
|
+
get ["aria-labelledby"] () {
|
|
159
|
+
return local['aria-labelledby'];
|
|
160
|
+
},
|
|
161
|
+
get ["class"] () {
|
|
162
|
+
return cn('absolute end-2 top-2', local.class);
|
|
163
|
+
},
|
|
164
|
+
get children () {
|
|
165
|
+
return resolvedChildren();
|
|
166
|
+
}
|
|
167
|
+
})),
|
|
168
|
+
"data-slot": "toast-close-trigger",
|
|
169
|
+
"aria-label": ariaLabel,
|
|
170
|
+
get ["aria-labelledby"] () {
|
|
171
|
+
return local['aria-labelledby'];
|
|
172
|
+
}
|
|
173
|
+
}, others));
|
|
174
|
+
}
|
|
175
|
+
const Toast_Toast = Object.assign(ToastRoot, {
|
|
176
|
+
Root: ToastRoot,
|
|
177
|
+
Context: Toast.Context,
|
|
178
|
+
Title: ToastTitle,
|
|
179
|
+
Description: ToastDescription,
|
|
180
|
+
ActionTrigger: ToastActionTrigger,
|
|
181
|
+
CloseTrigger: ToastCloseTrigger,
|
|
182
|
+
Toaster: Toast_Toaster
|
|
183
|
+
});
|
|
184
|
+
export { Toast_Toast as Toast, Toast_Toaster as Toaster, createToaster, useToastContext };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Toast, Toaster, createToaster, useToastContext } from "@ark-ui/solid/toast";
|
|
2
|
+
import { children, splitProps } from "solid-js";
|
|
3
|
+
import { cn } from "../../internal/cn.jsx";
|
|
4
|
+
import { OverlayPortal, OverlayPortalProvider } from "../../internal/overlayPortal.jsx";
|
|
5
|
+
import { CloseButton } from "../close-button/index.jsx";
|
|
6
|
+
const DEFAULT_CLOSE_TRIGGER_LABEL = 'Close toast';
|
|
7
|
+
function Toast_Toaster(props) {
|
|
8
|
+
const [local, others] = splitProps(props, [
|
|
9
|
+
'children',
|
|
10
|
+
'class',
|
|
11
|
+
'portalRef',
|
|
12
|
+
'portalled'
|
|
13
|
+
]);
|
|
14
|
+
return <OverlayPortalProvider portalled={local.portalled} portalRef={local.portalRef}>
|
|
15
|
+
<OverlayPortal>
|
|
16
|
+
<Toaster data-slot="toast-toaster" class={cn('z-70 max-[40rem]:w-full', local.class)} {...others} children={local.children ?? ((toast)=><DefaultToast toast={toast}/>)}/>
|
|
17
|
+
</OverlayPortal>
|
|
18
|
+
</OverlayPortalProvider>;
|
|
19
|
+
}
|
|
20
|
+
function DefaultToast(props) {
|
|
21
|
+
const hasAction = ()=>null != props.toast().action;
|
|
22
|
+
const actionLabel = ()=>props.toast().action?.label;
|
|
23
|
+
return <ToastRoot>
|
|
24
|
+
{null != props.toast().title ? <ToastTitle/> : null}
|
|
25
|
+
{null != props.toast().description ? <ToastDescription/> : null}
|
|
26
|
+
{hasAction() ? <ToastActionTrigger>{actionLabel()}</ToastActionTrigger> : null}
|
|
27
|
+
{false !== props.toast().closable ? <ToastCloseTrigger/> : null}
|
|
28
|
+
</ToastRoot>;
|
|
29
|
+
}
|
|
30
|
+
function ToastRoot(props) {
|
|
31
|
+
const [local, others] = splitProps(props, [
|
|
32
|
+
'class'
|
|
33
|
+
]);
|
|
34
|
+
return <Toast.Root data-slot="toast-root" class={cn('group/toast pointer-events-auto [z-index:var(--z-index)] box-border grid [height:var(--height)] min-h-0 w-80 max-w-[calc(100vw-2rem)] min-w-0 [translate:var(--x)_var(--y)] [scale:var(--scale)] items-start gap-1 rounded-lg border border-border bg-card bg-clip-padding p-4 pe-11 text-card-foreground [opacity:var(--opacity)] shadow-lg transition-[translate,scale,opacity,height,box-shadow] duration-350 ease-[cubic-bezier(0.21,1.02,0.73,1)] [will-change:translate,opacity,scale] data-[state=closed]:ease-[cubic-bezier(0.06,0.71,0.55,1)] data-[state=closed]:[transition:translate_350ms,scale_350ms,opacity_200ms] data-[type=error]:border-destructive/35 data-[type=error]:bg-destructive/9 data-[type=error]:text-foreground data-[type=success]:border-success/34 data-[type=success]:bg-success/10 data-[type=success]:text-foreground data-[type=warning]:border-warning/38 data-[type=warning]:bg-warning/13 data-[type=warning]:text-foreground motion-reduce:transition-none max-[40rem]:inset-x-0 max-[40rem]:w-[calc(100%_-_(var(--gap)*2))] max-[40rem]:max-w-none', local.class)} {...others}/>;
|
|
35
|
+
}
|
|
36
|
+
function ToastTitle(props) {
|
|
37
|
+
const [local, others] = splitProps(props, [
|
|
38
|
+
'children',
|
|
39
|
+
'class'
|
|
40
|
+
]);
|
|
41
|
+
const resolvedChildren = children(()=>local.children);
|
|
42
|
+
const toast = useToastContext();
|
|
43
|
+
return <Toast.Title data-slot="toast-title" class={cn('m-0 flex min-w-0 items-center gap-2 text-sm leading-5 font-semibold wrap-anywhere text-inherit', local.class)} {...others}>
|
|
44
|
+
{void 0 === resolvedChildren() ? toast().title : resolvedChildren()}
|
|
45
|
+
</Toast.Title>;
|
|
46
|
+
}
|
|
47
|
+
function ToastDescription(props) {
|
|
48
|
+
const [local, others] = splitProps(props, [
|
|
49
|
+
'children',
|
|
50
|
+
'class'
|
|
51
|
+
]);
|
|
52
|
+
const resolvedChildren = children(()=>local.children);
|
|
53
|
+
const toast = useToastContext();
|
|
54
|
+
return <Toast.Description data-slot="toast-description" class={cn('m-0 min-w-0 text-sm leading-5 wrap-anywhere text-muted-foreground', local.class)} {...others}>
|
|
55
|
+
{void 0 === resolvedChildren() ? toast().description : resolvedChildren()}
|
|
56
|
+
</Toast.Description>;
|
|
57
|
+
}
|
|
58
|
+
function ToastActionTrigger(props) {
|
|
59
|
+
const [local, others] = splitProps(props, [
|
|
60
|
+
'asChild',
|
|
61
|
+
'children',
|
|
62
|
+
'class'
|
|
63
|
+
]);
|
|
64
|
+
return <Toast.ActionTrigger asChild={local.asChild} data-slot="toast-action-trigger" class={cn(!local.asChild && 'mt-2 inline-flex min-h-control-xs w-max max-w-full min-w-0 cursor-pointer items-center justify-center gap-2 rounded-sm border border-border bg-transparent px-2 py-1 text-start text-xs leading-4 font-medium wrap-anywhere text-foreground transition-[background-color,border-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:outline-ring motion-reduce:transition-none [@media(hover:hover)]:hover:bg-accent', local.class)} {...others}>
|
|
65
|
+
{local.children}
|
|
66
|
+
</Toast.ActionTrigger>;
|
|
67
|
+
}
|
|
68
|
+
function ToastCloseTrigger(props) {
|
|
69
|
+
const [local, others] = splitProps(props, [
|
|
70
|
+
'aria-label',
|
|
71
|
+
'aria-labelledby',
|
|
72
|
+
'asChild',
|
|
73
|
+
'children',
|
|
74
|
+
'class'
|
|
75
|
+
]);
|
|
76
|
+
const resolvedChildren = children(()=>local.children);
|
|
77
|
+
const ariaLabel = void 0 === local['aria-label'] ? DEFAULT_CLOSE_TRIGGER_LABEL : local['aria-label'];
|
|
78
|
+
if (local.asChild) return <Toast.CloseTrigger asChild={local.asChild} data-slot="toast-close-trigger" aria-label={ariaLabel} aria-labelledby={local['aria-labelledby']} class={local.class} {...others}>
|
|
79
|
+
{local.children}
|
|
80
|
+
</Toast.CloseTrigger>;
|
|
81
|
+
return <Toast.CloseTrigger asChild={(triggerProps)=><CloseButton.Root {...triggerProps()} data-slot="toast-close-trigger" aria-label={ariaLabel} aria-labelledby={local['aria-labelledby']} class={cn('absolute end-2 top-2', local.class)}>
|
|
82
|
+
{resolvedChildren()}
|
|
83
|
+
</CloseButton.Root>} data-slot="toast-close-trigger" aria-label={ariaLabel} aria-labelledby={local['aria-labelledby']} {...others}/>;
|
|
84
|
+
}
|
|
85
|
+
const Toast_Toast = Object.assign(ToastRoot, {
|
|
86
|
+
Root: ToastRoot,
|
|
87
|
+
Context: Toast.Context,
|
|
88
|
+
Title: ToastTitle,
|
|
89
|
+
Description: ToastDescription,
|
|
90
|
+
ActionTrigger: ToastActionTrigger,
|
|
91
|
+
CloseTrigger: ToastCloseTrigger,
|
|
92
|
+
Toaster: Toast_Toaster
|
|
93
|
+
});
|
|
94
|
+
export { Toast_Toast as Toast, Toast_Toaster as Toaster, createToaster, useToastContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toast, Toaster, createToaster, useToastContext } from './Toast.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toast, Toaster, createToaster, useToastContext } from "./Toast.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toast, Toaster, createToaster, useToastContext } from "./Toast.jsx";
|