@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,68 @@
|
|
|
1
|
+
import { ark } from "@ark-ui/solid/factory";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { cn } from "../../internal/cn.jsx";
|
|
5
|
+
const stackVariants = cva('flex', {
|
|
6
|
+
variants: {
|
|
7
|
+
mobileDirection: {
|
|
8
|
+
row: 'flex-row',
|
|
9
|
+
'row-reverse': 'flex-row-reverse',
|
|
10
|
+
column: 'flex-col',
|
|
11
|
+
'column-reverse': 'flex-col-reverse'
|
|
12
|
+
},
|
|
13
|
+
desktopDirection: {
|
|
14
|
+
row: 'sm:flex-row',
|
|
15
|
+
'row-reverse': 'sm:flex-row-reverse',
|
|
16
|
+
column: 'sm:flex-col',
|
|
17
|
+
'column-reverse': 'sm:flex-col-reverse'
|
|
18
|
+
},
|
|
19
|
+
fill: {
|
|
20
|
+
true: 'flex-1',
|
|
21
|
+
false: ''
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
mobileDirection: 'column'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const toCssLength = (value)=>'number' == typeof value ? `${value}px` : value;
|
|
29
|
+
function StackRoot(props) {
|
|
30
|
+
const [local, others] = splitProps(props, [
|
|
31
|
+
'asChild',
|
|
32
|
+
'class',
|
|
33
|
+
'direction',
|
|
34
|
+
'gap',
|
|
35
|
+
'align',
|
|
36
|
+
'justify',
|
|
37
|
+
'wrap',
|
|
38
|
+
'fill',
|
|
39
|
+
'style'
|
|
40
|
+
]);
|
|
41
|
+
const mobileDirection = ()=>'string' == typeof local.direction ? local.direction : local.direction?.mobile ?? local.direction?.desktop;
|
|
42
|
+
const desktopDirection = ()=>'string' == typeof local.direction ? local.direction : local.direction?.desktop ?? local.direction?.mobile;
|
|
43
|
+
const stackStyle = ()=>{
|
|
44
|
+
const generatedStyle = {
|
|
45
|
+
gap: toCssLength(local.gap),
|
|
46
|
+
'align-items': local.align,
|
|
47
|
+
'justify-content': local.justify,
|
|
48
|
+
'flex-wrap': local.wrap
|
|
49
|
+
};
|
|
50
|
+
if ('string' == typeof local.style) {
|
|
51
|
+
const generatedStyleText = Object.entries(generatedStyle).filter(([, value])=>void 0 !== value).map(([property, value])=>`${property}:${value}`).join(';');
|
|
52
|
+
return `${generatedStyleText}${generatedStyleText && local.style ? ';' : ''}${local.style}`;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
...generatedStyle,
|
|
56
|
+
...local.style
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
return <ark.div asChild={local.asChild} {...others} data-scope="stack" data-part="root" data-slot="stack-root" class={cn(stackVariants({
|
|
60
|
+
mobileDirection: mobileDirection(),
|
|
61
|
+
desktopDirection: desktopDirection(),
|
|
62
|
+
fill: local.fill
|
|
63
|
+
}), local.class)} style={stackStyle()}/>;
|
|
64
|
+
}
|
|
65
|
+
const Stack = Object.assign(StackRoot, {
|
|
66
|
+
Root: StackRoot
|
|
67
|
+
});
|
|
68
|
+
export { Stack };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stack } from './Stack.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stack } from "./Stack.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stack } from "./Stack.jsx";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Steps as StepsPrimitive, useSteps, useStepsContext, useStepsItemContext } from '@ark-ui/solid/steps';
|
|
2
|
+
import type { ComponentProps } from 'solid-js';
|
|
3
|
+
declare function StepsRoot(props: ComponentProps<typeof StepsPrimitive.Root>): import("solid-js").JSX.Element;
|
|
4
|
+
declare function StepsRootProvider(props: ComponentProps<typeof StepsPrimitive.RootProvider>): import("solid-js").JSX.Element;
|
|
5
|
+
declare function StepsList(props: ComponentProps<typeof StepsPrimitive.List>): import("solid-js").JSX.Element;
|
|
6
|
+
declare function StepsItem(props: ComponentProps<typeof StepsPrimitive.Item>): import("solid-js").JSX.Element;
|
|
7
|
+
declare function StepsTrigger(props: ComponentProps<typeof StepsPrimitive.Trigger>): import("solid-js").JSX.Element;
|
|
8
|
+
declare function StepsIndicator(props: ComponentProps<typeof StepsPrimitive.Indicator>): import("solid-js").JSX.Element;
|
|
9
|
+
declare function StepsSeparator(props: ComponentProps<typeof StepsPrimitive.Separator>): import("solid-js").JSX.Element;
|
|
10
|
+
declare function StepsContent(props: ComponentProps<typeof StepsPrimitive.Content>): import("solid-js").JSX.Element;
|
|
11
|
+
declare function StepsCompletedContent(props: ComponentProps<typeof StepsPrimitive.CompletedContent>): import("solid-js").JSX.Element;
|
|
12
|
+
declare function StepsPrevTrigger(props: ComponentProps<typeof StepsPrimitive.PrevTrigger>): import("solid-js").JSX.Element;
|
|
13
|
+
declare function StepsNextTrigger(props: ComponentProps<typeof StepsPrimitive.NextTrigger>): import("solid-js").JSX.Element;
|
|
14
|
+
declare function StepsProgress(props: ComponentProps<typeof StepsPrimitive.Progress>): import("solid-js").JSX.Element;
|
|
15
|
+
declare const Steps: typeof StepsRoot & {
|
|
16
|
+
Root: typeof StepsRoot;
|
|
17
|
+
RootProvider: typeof StepsRootProvider;
|
|
18
|
+
Context: (props: StepsPrimitive.ContextProps) => import("solid-js").JSX.Element;
|
|
19
|
+
ItemContext: {
|
|
20
|
+
(props: StepsPrimitive.ItemContextProps): import("solid-js").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
List: typeof StepsList;
|
|
24
|
+
Item: typeof StepsItem;
|
|
25
|
+
Trigger: typeof StepsTrigger;
|
|
26
|
+
Indicator: typeof StepsIndicator;
|
|
27
|
+
Separator: typeof StepsSeparator;
|
|
28
|
+
Content: typeof StepsContent;
|
|
29
|
+
CompletedContent: typeof StepsCompletedContent;
|
|
30
|
+
PrevTrigger: typeof StepsPrevTrigger;
|
|
31
|
+
NextTrigger: typeof StepsNextTrigger;
|
|
32
|
+
Progress: typeof StepsProgress;
|
|
33
|
+
useSteps: typeof useSteps;
|
|
34
|
+
};
|
|
35
|
+
export { Steps, useSteps, useStepsContext, useStepsItemContext };
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { createComponent, mergeProps } from "solid-js/web";
|
|
2
|
+
import { Steps, useSteps, useStepsContext, useStepsItemContext } from "@ark-ui/solid/steps";
|
|
3
|
+
import { children, splitProps } from "solid-js";
|
|
4
|
+
import { cn } from "../../internal/cn.js";
|
|
5
|
+
import { CheckIcon } from "../../internal/icons/ui/index.js";
|
|
6
|
+
function StepsRoot(props) {
|
|
7
|
+
const [local, others] = splitProps(props, [
|
|
8
|
+
'class'
|
|
9
|
+
]);
|
|
10
|
+
return createComponent(Steps.Root, mergeProps({
|
|
11
|
+
"data-slot": "steps-root",
|
|
12
|
+
get ["class"] () {
|
|
13
|
+
return cn('box-border flex w-full max-w-[52rem] min-w-0 text-foreground data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:gap-4 data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-stretch data-[orientation=vertical]:gap-6 max-[40rem]:data-[orientation=vertical]:flex-col max-[40rem]:data-[orientation=vertical]:gap-4', local.class);
|
|
14
|
+
}
|
|
15
|
+
}, others));
|
|
16
|
+
}
|
|
17
|
+
function StepsRootProvider(props) {
|
|
18
|
+
const [local, others] = splitProps(props, [
|
|
19
|
+
'class'
|
|
20
|
+
]);
|
|
21
|
+
return createComponent(Steps.RootProvider, mergeProps({
|
|
22
|
+
"data-slot": "steps-root-provider",
|
|
23
|
+
get ["class"] () {
|
|
24
|
+
return cn('box-border flex w-full max-w-[52rem] min-w-0 text-foreground data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:gap-4 data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-stretch data-[orientation=vertical]:gap-6 max-[40rem]:data-[orientation=vertical]:flex-col max-[40rem]:data-[orientation=vertical]:gap-4', local.class);
|
|
25
|
+
}
|
|
26
|
+
}, others));
|
|
27
|
+
}
|
|
28
|
+
function StepsList(props) {
|
|
29
|
+
const [local, others] = splitProps(props, [
|
|
30
|
+
'class'
|
|
31
|
+
]);
|
|
32
|
+
return createComponent(Steps.List, mergeProps({
|
|
33
|
+
"data-slot": "steps-list",
|
|
34
|
+
get ["class"] () {
|
|
35
|
+
return cn('flex w-full min-w-0 data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:items-center data-[orientation=vertical]:w-fit data-[orientation=vertical]:flex-none data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-start data-[orientation=vertical]:gap-4 max-[40rem]:data-[orientation=horizontal]:[scrollbar-width:thin] max-[40rem]:data-[orientation=horizontal]:overflow-x-auto', local.class);
|
|
36
|
+
}
|
|
37
|
+
}, others));
|
|
38
|
+
}
|
|
39
|
+
function StepsItem(props) {
|
|
40
|
+
const [local, others] = splitProps(props, [
|
|
41
|
+
'class'
|
|
42
|
+
]);
|
|
43
|
+
return createComponent(Steps.Item, mergeProps({
|
|
44
|
+
"data-slot": "steps-item",
|
|
45
|
+
get ["class"] () {
|
|
46
|
+
return cn('group/steps-item relative flex min-w-0 flex-1 items-center gap-3 last:flex-none data-[orientation=vertical]:min-h-16 data-[orientation=vertical]:flex-none data-[orientation=vertical]:items-start max-[40rem]:data-[orientation=horizontal]:flex-none', local.class);
|
|
47
|
+
}
|
|
48
|
+
}, others));
|
|
49
|
+
}
|
|
50
|
+
function StepsTrigger(props) {
|
|
51
|
+
const [local, others] = splitProps(props, [
|
|
52
|
+
'class'
|
|
53
|
+
]);
|
|
54
|
+
return createComponent(Steps.Trigger, mergeProps({
|
|
55
|
+
"data-slot": "steps-trigger",
|
|
56
|
+
get ["class"] () {
|
|
57
|
+
return cn('group/steps-trigger relative z-1 inline-flex min-w-0 cursor-pointer items-center gap-3 rounded-md border-0 bg-transparent p-0 text-left text-inherit no-underline outline-none select-none [font:inherit] focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring data-[orientation=vertical]:items-start', local.class);
|
|
58
|
+
}
|
|
59
|
+
}, others));
|
|
60
|
+
}
|
|
61
|
+
function StepsIndicator(props) {
|
|
62
|
+
const [local, others] = splitProps(props, [
|
|
63
|
+
'class',
|
|
64
|
+
'children'
|
|
65
|
+
]);
|
|
66
|
+
const resolvedChildren = children(()=>local.children);
|
|
67
|
+
const item = useStepsItemContext();
|
|
68
|
+
return createComponent(Steps.Indicator, mergeProps({
|
|
69
|
+
"data-slot": "steps-indicator",
|
|
70
|
+
get ["class"] () {
|
|
71
|
+
return cn('box-border inline-flex size-8 flex-none items-center justify-center rounded-full border border-border bg-background text-sm leading-none font-semibold text-muted-foreground transition-[background-color,border-color,color,opacity] duration-200 ease-in-out data-complete:border-foreground data-complete:bg-foreground data-complete:text-background data-current:border-foreground data-current:bg-background data-current:text-foreground motion-reduce:transition-none [&_svg]:size-3.5 [@media(hover:hover)]:group-hover/steps-trigger:data-incomplete:border-foreground [@media(hover:hover)]:group-hover/steps-trigger:data-incomplete:text-foreground', local.class);
|
|
72
|
+
}
|
|
73
|
+
}, others, {
|
|
74
|
+
get children () {
|
|
75
|
+
return resolvedChildren() ?? (item().completed ? createComponent(CheckIcon, {}) : item().index + 1);
|
|
76
|
+
}
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
function StepsSeparator(props) {
|
|
80
|
+
const [local, others] = splitProps(props, [
|
|
81
|
+
'class'
|
|
82
|
+
]);
|
|
83
|
+
return createComponent(Steps.Separator, mergeProps({
|
|
84
|
+
"data-slot": "steps-separator",
|
|
85
|
+
get ["class"] () {
|
|
86
|
+
return cn('pointer-events-none mx-2 h-px min-w-8 flex-auto bg-border group-last/steps-item:hidden data-complete:bg-foreground data-[orientation=vertical]:absolute data-[orientation=vertical]:start-[15.5px] data-[orientation=vertical]:top-10 data-[orientation=vertical]:-bottom-4 data-[orientation=vertical]:m-0 data-[orientation=vertical]:h-auto data-[orientation=vertical]:w-px data-[orientation=vertical]:min-w-0', local.class);
|
|
87
|
+
}
|
|
88
|
+
}, others));
|
|
89
|
+
}
|
|
90
|
+
function StepsContent(props) {
|
|
91
|
+
const [local, others] = splitProps(props, [
|
|
92
|
+
'class'
|
|
93
|
+
]);
|
|
94
|
+
return createComponent(Steps.Content, mergeProps({
|
|
95
|
+
"data-slot": "steps-content",
|
|
96
|
+
get ["class"] () {
|
|
97
|
+
return cn("box-border grid min-h-40 min-w-0 place-items-center rounded-md bg-muted px-4 py-4 text-sm leading-5 text-foreground outline-none focus-visible:outline-1 focus-visible:-outline-offset-2 focus-visible:outline-ring data-[orientation=vertical]:flex-auto [&[hidden]:not([hidden='until-found'])]:hidden", local.class);
|
|
98
|
+
}
|
|
99
|
+
}, others));
|
|
100
|
+
}
|
|
101
|
+
function StepsCompletedContent(props) {
|
|
102
|
+
const [local, others] = splitProps(props, [
|
|
103
|
+
'class'
|
|
104
|
+
]);
|
|
105
|
+
return createComponent(Steps.CompletedContent, mergeProps({
|
|
106
|
+
"data-slot": "steps-completed-content",
|
|
107
|
+
get ["class"] () {
|
|
108
|
+
return cn("box-border grid min-h-40 min-w-0 place-items-center rounded-md bg-muted px-4 py-4 text-center text-sm leading-5 font-medium text-foreground outline-none focus-visible:outline-1 focus-visible:-outline-offset-2 focus-visible:outline-ring data-[orientation=vertical]:flex-auto [&[hidden]:not([hidden='until-found'])]:hidden", local.class);
|
|
109
|
+
}
|
|
110
|
+
}, others));
|
|
111
|
+
}
|
|
112
|
+
function StepsPrevTrigger(props) {
|
|
113
|
+
const [local, others] = splitProps(props, [
|
|
114
|
+
'class'
|
|
115
|
+
]);
|
|
116
|
+
return createComponent(Steps.PrevTrigger, mergeProps({
|
|
117
|
+
"data-slot": "steps-prev-trigger",
|
|
118
|
+
get ["class"] () {
|
|
119
|
+
return cn('box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-3 py-1.5 text-sm leading-5 text-foreground transition-[background-color,border-color,color,opacity] duration-200 ease-in-out outline-none focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50 data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none [@media(hover:hover)]:[&:not(:disabled):not([data-disabled])]:hover:bg-accent', local.class);
|
|
120
|
+
}
|
|
121
|
+
}, others));
|
|
122
|
+
}
|
|
123
|
+
function StepsNextTrigger(props) {
|
|
124
|
+
const [local, others] = splitProps(props, [
|
|
125
|
+
'class'
|
|
126
|
+
]);
|
|
127
|
+
return createComponent(Steps.NextTrigger, mergeProps({
|
|
128
|
+
"data-slot": "steps-next-trigger",
|
|
129
|
+
get ["class"] () {
|
|
130
|
+
return cn('box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-foreground bg-foreground px-3 py-1.5 text-sm leading-5 text-background transition-[background-color,border-color,color,opacity] duration-200 ease-in-out outline-none focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50 data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none', local.class);
|
|
131
|
+
}
|
|
132
|
+
}, others));
|
|
133
|
+
}
|
|
134
|
+
function StepsProgress(props) {
|
|
135
|
+
const [local, others] = splitProps(props, [
|
|
136
|
+
'class'
|
|
137
|
+
]);
|
|
138
|
+
return createComponent(Steps.Progress, mergeProps({
|
|
139
|
+
"data-slot": "steps-progress",
|
|
140
|
+
get ["class"] () {
|
|
141
|
+
return cn("relative block h-0.5 w-full overflow-hidden rounded-full bg-border before:absolute before:inset-y-0 before:start-0 before:w-[var(--percent,0%)] before:rounded-[inherit] before:bg-foreground before:transition-[width] before:duration-200 before:ease-in-out before:content-[''] motion-reduce:before:transition-none", local.class);
|
|
142
|
+
}
|
|
143
|
+
}, others));
|
|
144
|
+
}
|
|
145
|
+
const Steps_Steps = Object.assign(StepsRoot, {
|
|
146
|
+
Root: StepsRoot,
|
|
147
|
+
RootProvider: StepsRootProvider,
|
|
148
|
+
Context: Steps.Context,
|
|
149
|
+
ItemContext: Steps.ItemContext,
|
|
150
|
+
List: StepsList,
|
|
151
|
+
Item: StepsItem,
|
|
152
|
+
Trigger: StepsTrigger,
|
|
153
|
+
Indicator: StepsIndicator,
|
|
154
|
+
Separator: StepsSeparator,
|
|
155
|
+
Content: StepsContent,
|
|
156
|
+
CompletedContent: StepsCompletedContent,
|
|
157
|
+
PrevTrigger: StepsPrevTrigger,
|
|
158
|
+
NextTrigger: StepsNextTrigger,
|
|
159
|
+
Progress: StepsProgress,
|
|
160
|
+
useSteps: useSteps
|
|
161
|
+
});
|
|
162
|
+
export { Steps_Steps as Steps, useSteps, useStepsContext, useStepsItemContext };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Steps, useSteps, useStepsContext, useStepsItemContext } from "@ark-ui/solid/steps";
|
|
2
|
+
import { children, splitProps } from "solid-js";
|
|
3
|
+
import { cn } from "../../internal/cn.jsx";
|
|
4
|
+
import { CheckIcon } from "../../internal/icons/ui/index.jsx";
|
|
5
|
+
function StepsRoot(props) {
|
|
6
|
+
const [local, others] = splitProps(props, [
|
|
7
|
+
'class'
|
|
8
|
+
]);
|
|
9
|
+
return <Steps.Root data-slot="steps-root" class={cn('box-border flex w-full max-w-[52rem] min-w-0 text-foreground data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:gap-4 data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-stretch data-[orientation=vertical]:gap-6 max-[40rem]:data-[orientation=vertical]:flex-col max-[40rem]:data-[orientation=vertical]:gap-4', local.class)} {...others}/>;
|
|
10
|
+
}
|
|
11
|
+
function StepsRootProvider(props) {
|
|
12
|
+
const [local, others] = splitProps(props, [
|
|
13
|
+
'class'
|
|
14
|
+
]);
|
|
15
|
+
return <Steps.RootProvider data-slot="steps-root-provider" class={cn('box-border flex w-full max-w-[52rem] min-w-0 text-foreground data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:gap-4 data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-stretch data-[orientation=vertical]:gap-6 max-[40rem]:data-[orientation=vertical]:flex-col max-[40rem]:data-[orientation=vertical]:gap-4', local.class)} {...others}/>;
|
|
16
|
+
}
|
|
17
|
+
function StepsList(props) {
|
|
18
|
+
const [local, others] = splitProps(props, [
|
|
19
|
+
'class'
|
|
20
|
+
]);
|
|
21
|
+
return <Steps.List data-slot="steps-list" class={cn('flex w-full min-w-0 data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:items-center data-[orientation=vertical]:w-fit data-[orientation=vertical]:flex-none data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-start data-[orientation=vertical]:gap-4 max-[40rem]:data-[orientation=horizontal]:[scrollbar-width:thin] max-[40rem]:data-[orientation=horizontal]:overflow-x-auto', local.class)} {...others}/>;
|
|
22
|
+
}
|
|
23
|
+
function StepsItem(props) {
|
|
24
|
+
const [local, others] = splitProps(props, [
|
|
25
|
+
'class'
|
|
26
|
+
]);
|
|
27
|
+
return <Steps.Item data-slot="steps-item" class={cn('group/steps-item relative flex min-w-0 flex-1 items-center gap-3 last:flex-none data-[orientation=vertical]:min-h-16 data-[orientation=vertical]:flex-none data-[orientation=vertical]:items-start max-[40rem]:data-[orientation=horizontal]:flex-none', local.class)} {...others}/>;
|
|
28
|
+
}
|
|
29
|
+
function StepsTrigger(props) {
|
|
30
|
+
const [local, others] = splitProps(props, [
|
|
31
|
+
'class'
|
|
32
|
+
]);
|
|
33
|
+
return <Steps.Trigger data-slot="steps-trigger" class={cn('group/steps-trigger relative z-1 inline-flex min-w-0 cursor-pointer items-center gap-3 rounded-md border-0 bg-transparent p-0 text-left text-inherit no-underline outline-none select-none [font:inherit] focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring data-[orientation=vertical]:items-start', local.class)} {...others}/>;
|
|
34
|
+
}
|
|
35
|
+
function StepsIndicator(props) {
|
|
36
|
+
const [local, others] = splitProps(props, [
|
|
37
|
+
'class',
|
|
38
|
+
'children'
|
|
39
|
+
]);
|
|
40
|
+
const resolvedChildren = children(()=>local.children);
|
|
41
|
+
const item = useStepsItemContext();
|
|
42
|
+
return <Steps.Indicator data-slot="steps-indicator" class={cn('box-border inline-flex size-8 flex-none items-center justify-center rounded-full border border-border bg-background text-sm leading-none font-semibold text-muted-foreground transition-[background-color,border-color,color,opacity] duration-200 ease-in-out data-complete:border-foreground data-complete:bg-foreground data-complete:text-background data-current:border-foreground data-current:bg-background data-current:text-foreground motion-reduce:transition-none [&_svg]:size-3.5 [@media(hover:hover)]:group-hover/steps-trigger:data-incomplete:border-foreground [@media(hover:hover)]:group-hover/steps-trigger:data-incomplete:text-foreground', local.class)} {...others}>
|
|
43
|
+
{resolvedChildren() ?? (item().completed ? <CheckIcon/> : item().index + 1)}
|
|
44
|
+
</Steps.Indicator>;
|
|
45
|
+
}
|
|
46
|
+
function StepsSeparator(props) {
|
|
47
|
+
const [local, others] = splitProps(props, [
|
|
48
|
+
'class'
|
|
49
|
+
]);
|
|
50
|
+
return <Steps.Separator data-slot="steps-separator" class={cn('pointer-events-none mx-2 h-px min-w-8 flex-auto bg-border group-last/steps-item:hidden data-complete:bg-foreground data-[orientation=vertical]:absolute data-[orientation=vertical]:start-[15.5px] data-[orientation=vertical]:top-10 data-[orientation=vertical]:-bottom-4 data-[orientation=vertical]:m-0 data-[orientation=vertical]:h-auto data-[orientation=vertical]:w-px data-[orientation=vertical]:min-w-0', local.class)} {...others}/>;
|
|
51
|
+
}
|
|
52
|
+
function StepsContent(props) {
|
|
53
|
+
const [local, others] = splitProps(props, [
|
|
54
|
+
'class'
|
|
55
|
+
]);
|
|
56
|
+
return <Steps.Content data-slot="steps-content" class={cn("box-border grid min-h-40 min-w-0 place-items-center rounded-md bg-muted px-4 py-4 text-sm leading-5 text-foreground outline-none focus-visible:outline-1 focus-visible:-outline-offset-2 focus-visible:outline-ring data-[orientation=vertical]:flex-auto [&[hidden]:not([hidden='until-found'])]:hidden", local.class)} {...others}/>;
|
|
57
|
+
}
|
|
58
|
+
function StepsCompletedContent(props) {
|
|
59
|
+
const [local, others] = splitProps(props, [
|
|
60
|
+
'class'
|
|
61
|
+
]);
|
|
62
|
+
return <Steps.CompletedContent data-slot="steps-completed-content" class={cn("box-border grid min-h-40 min-w-0 place-items-center rounded-md bg-muted px-4 py-4 text-center text-sm leading-5 font-medium text-foreground outline-none focus-visible:outline-1 focus-visible:-outline-offset-2 focus-visible:outline-ring data-[orientation=vertical]:flex-auto [&[hidden]:not([hidden='until-found'])]:hidden", local.class)} {...others}/>;
|
|
63
|
+
}
|
|
64
|
+
function StepsPrevTrigger(props) {
|
|
65
|
+
const [local, others] = splitProps(props, [
|
|
66
|
+
'class'
|
|
67
|
+
]);
|
|
68
|
+
return <Steps.PrevTrigger data-slot="steps-prev-trigger" class={cn('box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-3 py-1.5 text-sm leading-5 text-foreground transition-[background-color,border-color,color,opacity] duration-200 ease-in-out outline-none focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50 data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none [@media(hover:hover)]:[&:not(:disabled):not([data-disabled])]:hover:bg-accent', local.class)} {...others}/>;
|
|
69
|
+
}
|
|
70
|
+
function StepsNextTrigger(props) {
|
|
71
|
+
const [local, others] = splitProps(props, [
|
|
72
|
+
'class'
|
|
73
|
+
]);
|
|
74
|
+
return <Steps.NextTrigger data-slot="steps-next-trigger" class={cn('box-border inline-flex min-h-control-sm cursor-pointer items-center justify-center gap-2 rounded-md border border-foreground bg-foreground px-3 py-1.5 text-sm leading-5 text-background transition-[background-color,border-color,color,opacity] duration-200 ease-in-out outline-none focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-default disabled:opacity-50 data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none', local.class)} {...others}/>;
|
|
75
|
+
}
|
|
76
|
+
function StepsProgress(props) {
|
|
77
|
+
const [local, others] = splitProps(props, [
|
|
78
|
+
'class'
|
|
79
|
+
]);
|
|
80
|
+
return <Steps.Progress data-slot="steps-progress" class={cn("relative block h-0.5 w-full overflow-hidden rounded-full bg-border before:absolute before:inset-y-0 before:start-0 before:w-[var(--percent,0%)] before:rounded-[inherit] before:bg-foreground before:transition-[width] before:duration-200 before:ease-in-out before:content-[''] motion-reduce:before:transition-none", local.class)} {...others}/>;
|
|
81
|
+
}
|
|
82
|
+
const Steps_Steps = Object.assign(StepsRoot, {
|
|
83
|
+
Root: StepsRoot,
|
|
84
|
+
RootProvider: StepsRootProvider,
|
|
85
|
+
Context: Steps.Context,
|
|
86
|
+
ItemContext: Steps.ItemContext,
|
|
87
|
+
List: StepsList,
|
|
88
|
+
Item: StepsItem,
|
|
89
|
+
Trigger: StepsTrigger,
|
|
90
|
+
Indicator: StepsIndicator,
|
|
91
|
+
Separator: StepsSeparator,
|
|
92
|
+
Content: StepsContent,
|
|
93
|
+
CompletedContent: StepsCompletedContent,
|
|
94
|
+
PrevTrigger: StepsPrevTrigger,
|
|
95
|
+
NextTrigger: StepsNextTrigger,
|
|
96
|
+
Progress: StepsProgress,
|
|
97
|
+
useSteps: useSteps
|
|
98
|
+
});
|
|
99
|
+
export { Steps_Steps as Steps, useSteps, useStepsContext, useStepsItemContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Steps, useSteps, useStepsContext, useStepsItemContext } from './Steps.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Steps, useSteps, useStepsContext, useStepsItemContext } from "./Steps.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Steps, useSteps, useStepsContext, useStepsItemContext } from "./Steps.jsx";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Swap as SwapPrimitive, useSwap, useSwapContext } from '@ark-ui/solid/swap';
|
|
2
|
+
import type { ComponentProps } from 'solid-js';
|
|
3
|
+
type SwapAnimation = 'fade' | 'scale' | 'rotate' | 'flip' | (string & {});
|
|
4
|
+
type SwapRootProps = ComponentProps<typeof SwapPrimitive.Root> & {
|
|
5
|
+
animation?: SwapAnimation;
|
|
6
|
+
};
|
|
7
|
+
type SwapRootProviderProps = ComponentProps<typeof SwapPrimitive.RootProvider> & {
|
|
8
|
+
animation?: SwapAnimation;
|
|
9
|
+
};
|
|
10
|
+
declare function SwapRoot(props: SwapRootProps): import("solid-js").JSX.Element;
|
|
11
|
+
declare function SwapRootProvider(props: SwapRootProviderProps): import("solid-js").JSX.Element;
|
|
12
|
+
declare function SwapIndicator(props: ComponentProps<typeof SwapPrimitive.Indicator>): import("solid-js").JSX.Element;
|
|
13
|
+
type SwapComponent = typeof SwapRoot & {
|
|
14
|
+
Root: typeof SwapRoot;
|
|
15
|
+
RootProvider: typeof SwapRootProvider;
|
|
16
|
+
Indicator: typeof SwapIndicator;
|
|
17
|
+
useSwap: typeof useSwap;
|
|
18
|
+
};
|
|
19
|
+
declare const Swap: SwapComponent;
|
|
20
|
+
export { Swap, useSwap, useSwapContext, type SwapAnimation };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createComponent, mergeProps } from "solid-js/web";
|
|
2
|
+
import { Swap, useSwap, useSwapContext } from "@ark-ui/solid/swap";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { cn } from "../../internal/cn.js";
|
|
5
|
+
function SwapRoot(props) {
|
|
6
|
+
const [local, others] = splitProps(props, [
|
|
7
|
+
'animation',
|
|
8
|
+
'class'
|
|
9
|
+
]);
|
|
10
|
+
return createComponent(Swap.Root, mergeProps({
|
|
11
|
+
"data-slot": "swap-root",
|
|
12
|
+
get ["data-animation"] () {
|
|
13
|
+
return local.animation ?? 'scale';
|
|
14
|
+
},
|
|
15
|
+
get ["class"] () {
|
|
16
|
+
return cn("group/swap inline-grid place-items-center align-middle [grid-template-areas:'swap'] data-[animation=flip]:[perspective:24rem]", local.class);
|
|
17
|
+
}
|
|
18
|
+
}, others));
|
|
19
|
+
}
|
|
20
|
+
function SwapRootProvider(props) {
|
|
21
|
+
const [local, others] = splitProps(props, [
|
|
22
|
+
'animation',
|
|
23
|
+
'class'
|
|
24
|
+
]);
|
|
25
|
+
return createComponent(Swap.RootProvider, mergeProps({
|
|
26
|
+
"data-slot": "swap-root-provider",
|
|
27
|
+
get ["data-animation"] () {
|
|
28
|
+
return local.animation ?? 'scale';
|
|
29
|
+
},
|
|
30
|
+
get ["class"] () {
|
|
31
|
+
return cn("group/swap inline-grid place-items-center align-middle [grid-template-areas:'swap'] data-[animation=flip]:[perspective:24rem]", local.class);
|
|
32
|
+
}
|
|
33
|
+
}, others));
|
|
34
|
+
}
|
|
35
|
+
function SwapIndicator(props) {
|
|
36
|
+
const [local, others] = splitProps(props, [
|
|
37
|
+
'class'
|
|
38
|
+
]);
|
|
39
|
+
return createComponent(Swap.Indicator, mergeProps({
|
|
40
|
+
"data-slot": "swap-indicator",
|
|
41
|
+
get ["class"] () {
|
|
42
|
+
return cn('inline-flex items-center justify-center text-inherit [grid-area:swap] group-data-[animation=flip]/swap:[backface-visibility:hidden] group-data-[animation=fade]/swap:data-[state=closed]:animate-moduix-swap-fade-exit group-data-[animation=flip]/swap:data-[state=closed]:animate-moduix-swap-flip-exit group-data-[animation=rotate]/swap:data-[state=closed]:animate-moduix-swap-rotate-exit group-data-[animation=scale]/swap:data-[state=closed]:animate-moduix-swap-scale-exit group-data-[animation=fade]/swap:data-[state=open]:animate-moduix-swap-fade-enter group-data-[animation=flip]/swap:data-[state=open]:animate-moduix-swap-flip-enter group-data-[animation=rotate]/swap:data-[state=open]:animate-moduix-swap-rotate-enter group-data-[animation=scale]/swap:data-[state=open]:animate-moduix-swap-scale-enter motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms]', local.class);
|
|
43
|
+
}
|
|
44
|
+
}, others));
|
|
45
|
+
}
|
|
46
|
+
const Swap_Swap = Object.assign(SwapRoot, {
|
|
47
|
+
Root: SwapRoot,
|
|
48
|
+
RootProvider: SwapRootProvider,
|
|
49
|
+
Indicator: SwapIndicator,
|
|
50
|
+
useSwap: useSwap
|
|
51
|
+
});
|
|
52
|
+
export { Swap_Swap as Swap, useSwap, useSwapContext };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Swap, useSwap, useSwapContext } from "@ark-ui/solid/swap";
|
|
2
|
+
import { splitProps } from "solid-js";
|
|
3
|
+
import { cn } from "../../internal/cn.jsx";
|
|
4
|
+
function SwapRoot(props) {
|
|
5
|
+
const [local, others] = splitProps(props, [
|
|
6
|
+
'animation',
|
|
7
|
+
'class'
|
|
8
|
+
]);
|
|
9
|
+
return <Swap.Root data-slot="swap-root" data-animation={local.animation ?? 'scale'} class={cn("group/swap inline-grid place-items-center align-middle [grid-template-areas:'swap'] data-[animation=flip]:[perspective:24rem]", local.class)} {...others}/>;
|
|
10
|
+
}
|
|
11
|
+
function SwapRootProvider(props) {
|
|
12
|
+
const [local, others] = splitProps(props, [
|
|
13
|
+
'animation',
|
|
14
|
+
'class'
|
|
15
|
+
]);
|
|
16
|
+
return <Swap.RootProvider data-slot="swap-root-provider" data-animation={local.animation ?? 'scale'} class={cn("group/swap inline-grid place-items-center align-middle [grid-template-areas:'swap'] data-[animation=flip]:[perspective:24rem]", local.class)} {...others}/>;
|
|
17
|
+
}
|
|
18
|
+
function SwapIndicator(props) {
|
|
19
|
+
const [local, others] = splitProps(props, [
|
|
20
|
+
'class'
|
|
21
|
+
]);
|
|
22
|
+
return <Swap.Indicator data-slot="swap-indicator" class={cn('inline-flex items-center justify-center text-inherit [grid-area:swap] group-data-[animation=flip]/swap:[backface-visibility:hidden] group-data-[animation=fade]/swap:data-[state=closed]:animate-moduix-swap-fade-exit group-data-[animation=flip]/swap:data-[state=closed]:animate-moduix-swap-flip-exit group-data-[animation=rotate]/swap:data-[state=closed]:animate-moduix-swap-rotate-exit group-data-[animation=scale]/swap:data-[state=closed]:animate-moduix-swap-scale-exit group-data-[animation=fade]/swap:data-[state=open]:animate-moduix-swap-fade-enter group-data-[animation=flip]/swap:data-[state=open]:animate-moduix-swap-flip-enter group-data-[animation=rotate]/swap:data-[state=open]:animate-moduix-swap-rotate-enter group-data-[animation=scale]/swap:data-[state=open]:animate-moduix-swap-scale-enter motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms]', local.class)} {...others}/>;
|
|
23
|
+
}
|
|
24
|
+
const Swap_Swap = Object.assign(SwapRoot, {
|
|
25
|
+
Root: SwapRoot,
|
|
26
|
+
RootProvider: SwapRootProvider,
|
|
27
|
+
Indicator: SwapIndicator,
|
|
28
|
+
useSwap: useSwap
|
|
29
|
+
});
|
|
30
|
+
export { Swap_Swap as Swap, useSwap, useSwapContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Swap, useSwap, useSwapContext, type SwapAnimation } from './Swap.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Swap, useSwap, useSwapContext } from "./Swap.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Swap, useSwap, useSwapContext } from "./Swap.jsx";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Switch as SwitchPrimitive, useSwitch, useSwitchContext } from '@ark-ui/solid/switch';
|
|
2
|
+
import type { ComponentProps } from 'solid-js';
|
|
3
|
+
type SwitchSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
type SwitchRootProps = ComponentProps<typeof SwitchPrimitive.Root> & {
|
|
5
|
+
size?: SwitchSize;
|
|
6
|
+
};
|
|
7
|
+
type SwitchRootProviderProps = ComponentProps<typeof SwitchPrimitive.RootProvider> & {
|
|
8
|
+
size?: SwitchSize;
|
|
9
|
+
};
|
|
10
|
+
declare function SwitchRoot(props: SwitchRootProps): import("solid-js").JSX.Element;
|
|
11
|
+
declare function SwitchRootProvider(props: SwitchRootProviderProps): import("solid-js").JSX.Element;
|
|
12
|
+
declare function SwitchControl(props: ComponentProps<typeof SwitchPrimitive.Control>): import("solid-js").JSX.Element;
|
|
13
|
+
declare function SwitchThumb(props: ComponentProps<typeof SwitchPrimitive.Thumb>): import("solid-js").JSX.Element;
|
|
14
|
+
declare function SwitchLabel(props: ComponentProps<typeof SwitchPrimitive.Label>): import("solid-js").JSX.Element;
|
|
15
|
+
declare const Switch: typeof SwitchRoot & {
|
|
16
|
+
Root: typeof SwitchRoot;
|
|
17
|
+
RootProvider: typeof SwitchRootProvider;
|
|
18
|
+
HiddenInput: (props: SwitchPrimitive.HiddenInputProps) => import("solid-js").JSX.Element;
|
|
19
|
+
Control: typeof SwitchControl;
|
|
20
|
+
Thumb: typeof SwitchThumb;
|
|
21
|
+
Label: typeof SwitchLabel;
|
|
22
|
+
Context: (props: SwitchPrimitive.ContextProps) => import("solid-js").JSX.Element;
|
|
23
|
+
};
|
|
24
|
+
export { Switch, useSwitch, useSwitchContext };
|
|
25
|
+
export type { SwitchRootProps, SwitchRootProviderProps, SwitchSize };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { createComponent, mergeProps } from "solid-js/web";
|
|
2
|
+
import { Switch, SwitchContext, useSwitch, useSwitchContext } from "@ark-ui/solid/switch";
|
|
3
|
+
import { children, splitProps } from "solid-js";
|
|
4
|
+
import { cn } from "../../internal/cn.js";
|
|
5
|
+
function SwitchRoot(props) {
|
|
6
|
+
const [local, others] = splitProps(props, [
|
|
7
|
+
'asChild',
|
|
8
|
+
'children',
|
|
9
|
+
'class',
|
|
10
|
+
'size'
|
|
11
|
+
]);
|
|
12
|
+
return createComponent(Switch.Root, mergeProps({
|
|
13
|
+
get asChild () {
|
|
14
|
+
return local.asChild;
|
|
15
|
+
},
|
|
16
|
+
"data-slot": "switch-root",
|
|
17
|
+
get ["data-size"] () {
|
|
18
|
+
return local.size ?? 'md';
|
|
19
|
+
},
|
|
20
|
+
get ["class"] () {
|
|
21
|
+
return cn('group/switch inline-flex w-fit cursor-pointer items-center gap-2 align-middle data-disabled:cursor-default data-disabled:opacity-50 data-readonly:cursor-default', local.class);
|
|
22
|
+
}
|
|
23
|
+
}, others, {
|
|
24
|
+
get children () {
|
|
25
|
+
return local.children;
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
function SwitchRootProvider(props) {
|
|
30
|
+
const [local, others] = splitProps(props, [
|
|
31
|
+
'asChild',
|
|
32
|
+
'children',
|
|
33
|
+
'class',
|
|
34
|
+
'size'
|
|
35
|
+
]);
|
|
36
|
+
return createComponent(Switch.RootProvider, mergeProps({
|
|
37
|
+
get asChild () {
|
|
38
|
+
return local.asChild;
|
|
39
|
+
},
|
|
40
|
+
"data-slot": "switch-root-provider",
|
|
41
|
+
get ["data-size"] () {
|
|
42
|
+
return local.size ?? 'md';
|
|
43
|
+
},
|
|
44
|
+
get ["class"] () {
|
|
45
|
+
return cn('group/switch inline-flex w-fit cursor-pointer items-center gap-2 align-middle data-disabled:cursor-default data-disabled:opacity-50 data-readonly:cursor-default', local.class);
|
|
46
|
+
}
|
|
47
|
+
}, others, {
|
|
48
|
+
get children () {
|
|
49
|
+
return local.children;
|
|
50
|
+
}
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
function SwitchControl(props) {
|
|
54
|
+
const [local, others] = splitProps(props, [
|
|
55
|
+
'children',
|
|
56
|
+
'class'
|
|
57
|
+
]);
|
|
58
|
+
const resolvedChildren = children(()=>local.children);
|
|
59
|
+
return createComponent(Switch.Control, mergeProps({
|
|
60
|
+
"data-slot": "switch-control",
|
|
61
|
+
get ["class"] () {
|
|
62
|
+
return cn("[@media(hover:hover)]:[&:not([data-disabled]):not([data-readonly])[data-state='unchecked'][data-hover]:bg-accent relative inline-flex h-control-xs w-11 shrink-0 items-center rounded-full border border-border bg-muted p-0.5 leading-none outline-0 transition-[background-color,border-color,opacity] duration-200 ease-in-out select-none group-data-[size=lg]/switch:h-7 group-data-[size=lg]/switch:w-13 group-data-[size=sm]/switch:h-5 group-data-[size=sm]/switch:w-9 group-data-[size=xl]/switch:h-control-sm group-data-[size=xl]/switch:w-15 group-data-[size=xs]/switch:h-4 group-data-[size=xs]/switch:w-7 data-focus-visible:outline-1 data-focus-visible:outline-offset-1 data-focus-visible:outline-ring data-invalid:border-destructive data-[state=checked]:border-primary data-[state=checked]:bg-primary motion-reduce:transition-none", local.class);
|
|
63
|
+
}
|
|
64
|
+
}, others, {
|
|
65
|
+
get children () {
|
|
66
|
+
return resolvedChildren() ?? createComponent(SwitchThumb, {});
|
|
67
|
+
}
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
function SwitchThumb(props) {
|
|
71
|
+
const [local, others] = splitProps(props, [
|
|
72
|
+
'class'
|
|
73
|
+
]);
|
|
74
|
+
return createComponent(Switch.Thumb, mergeProps({
|
|
75
|
+
"data-slot": "switch-thumb",
|
|
76
|
+
get ["class"] () {
|
|
77
|
+
return cn('inline-flex size-5 translate-x-0 items-center justify-center rounded-full border-transparent bg-background text-muted shadow-sm transition-[translate,background-color,color] duration-200 ease-in-out group-data-[size=lg]/switch:size-control-xs group-data-[size=sm]/switch:size-4 group-data-[size=xl]/switch:size-7 group-data-[size=xs]/switch:size-3 data-[state=checked]:translate-x-[18px] data-[state=checked]:bg-primary-foreground data-[state=checked]:text-primary group-data-[size=lg]/switch:data-[state=checked]:translate-x-[22px] group-data-[size=sm]/switch:data-[state=checked]:translate-x-[14px] group-data-[size=xl]/switch:data-[state=checked]:translate-x-[26px] group-data-[size=xs]/switch:data-[state=checked]:translate-x-[10px] motion-reduce:transition-none rtl:data-[state=checked]:-translate-x-[18px] group-data-[size=lg]/switch:rtl:data-[state=checked]:-translate-x-[22px] group-data-[size=sm]/switch:rtl:data-[state=checked]:-translate-x-[14px] group-data-[size=xl]/switch:rtl:data-[state=checked]:-translate-x-[26px] group-data-[size=xs]/switch:rtl:data-[state=checked]:-translate-x-[10px] [&>svg]:block [&>svg]:size-[65%] [&>svg]:shrink-0', local.class);
|
|
78
|
+
}
|
|
79
|
+
}, others));
|
|
80
|
+
}
|
|
81
|
+
function SwitchLabel(props) {
|
|
82
|
+
const [local, others] = splitProps(props, [
|
|
83
|
+
'class'
|
|
84
|
+
]);
|
|
85
|
+
return createComponent(Switch.Label, mergeProps({
|
|
86
|
+
"data-slot": "switch-label",
|
|
87
|
+
get ["class"] () {
|
|
88
|
+
return cn('text-sm leading-5 font-medium text-foreground select-none', local.class);
|
|
89
|
+
}
|
|
90
|
+
}, others));
|
|
91
|
+
}
|
|
92
|
+
const Switch_Switch = Object.assign(SwitchRoot, {
|
|
93
|
+
Root: SwitchRoot,
|
|
94
|
+
RootProvider: SwitchRootProvider,
|
|
95
|
+
HiddenInput: Switch.HiddenInput,
|
|
96
|
+
Control: SwitchControl,
|
|
97
|
+
Thumb: SwitchThumb,
|
|
98
|
+
Label: SwitchLabel,
|
|
99
|
+
Context: SwitchContext
|
|
100
|
+
});
|
|
101
|
+
export { Switch_Switch as Switch, useSwitch, useSwitchContext };
|