@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,32 @@
|
|
|
1
|
+
import { TagsInput as TagsInputPrimitive, useTagsInput, useTagsInputContext, useTagsInputItemContext } from '@ark-ui/solid/tags-input';
|
|
2
|
+
import type { ComponentProps } from 'solid-js';
|
|
3
|
+
declare function TagsInputRoot(props: ComponentProps<typeof TagsInputPrimitive.Root>): import("solid-js").JSX.Element;
|
|
4
|
+
declare function TagsInputRootProvider(props: ComponentProps<typeof TagsInputPrimitive.RootProvider>): import("solid-js").JSX.Element;
|
|
5
|
+
declare function TagsInputLabel(props: ComponentProps<typeof TagsInputPrimitive.Label>): import("solid-js").JSX.Element;
|
|
6
|
+
declare function TagsInputControl(props: ComponentProps<typeof TagsInputPrimitive.Control>): import("solid-js").JSX.Element;
|
|
7
|
+
declare function TagsInputItem(props: ComponentProps<typeof TagsInputPrimitive.Item>): import("solid-js").JSX.Element;
|
|
8
|
+
declare function TagsInputItemPreview(props: ComponentProps<typeof TagsInputPrimitive.ItemPreview>): import("solid-js").JSX.Element;
|
|
9
|
+
declare function TagsInputItemText(props: ComponentProps<typeof TagsInputPrimitive.ItemText>): import("solid-js").JSX.Element;
|
|
10
|
+
declare function TagsInputItemDeleteTrigger(props: ComponentProps<typeof TagsInputPrimitive.ItemDeleteTrigger>): import("solid-js").JSX.Element;
|
|
11
|
+
declare function TagsInputItemInput(props: ComponentProps<typeof TagsInputPrimitive.ItemInput>): import("solid-js").JSX.Element;
|
|
12
|
+
declare function TagsInputInput(props: ComponentProps<typeof TagsInputPrimitive.Input>): import("solid-js").JSX.Element;
|
|
13
|
+
declare function TagsInputClearTrigger(props: ComponentProps<typeof TagsInputPrimitive.ClearTrigger>): import("solid-js").JSX.Element;
|
|
14
|
+
declare function TagsInputItems(): import("solid-js").JSX.Element;
|
|
15
|
+
declare const TagsInput: typeof TagsInputRoot & {
|
|
16
|
+
Root: typeof TagsInputRoot;
|
|
17
|
+
RootProvider: typeof TagsInputRootProvider;
|
|
18
|
+
HiddenInput: (props: TagsInputPrimitive.HiddenInputProps) => import("solid-js").JSX.Element;
|
|
19
|
+
Label: typeof TagsInputLabel;
|
|
20
|
+
Control: typeof TagsInputControl;
|
|
21
|
+
Item: typeof TagsInputItem;
|
|
22
|
+
ItemContext: (props: TagsInputPrimitive.ItemContextProps) => import("solid-js").JSX.Element;
|
|
23
|
+
ItemPreview: typeof TagsInputItemPreview;
|
|
24
|
+
ItemText: typeof TagsInputItemText;
|
|
25
|
+
ItemDeleteTrigger: typeof TagsInputItemDeleteTrigger;
|
|
26
|
+
ItemInput: typeof TagsInputItemInput;
|
|
27
|
+
Input: typeof TagsInputInput;
|
|
28
|
+
ClearTrigger: typeof TagsInputClearTrigger;
|
|
29
|
+
Context: (props: TagsInputPrimitive.ContextProps) => import("solid-js").JSX.Element;
|
|
30
|
+
Items: typeof TagsInputItems;
|
|
31
|
+
};
|
|
32
|
+
export { TagsInput, useTagsInput, useTagsInputContext, useTagsInputItemContext };
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { createComponent, mergeProps } from "solid-js/web";
|
|
2
|
+
import { TagsInput, useTagsInput, useTagsInputContext, useTagsInputItemContext } from "@ark-ui/solid/tags-input";
|
|
3
|
+
import { For, children, splitProps } from "solid-js";
|
|
4
|
+
import { cn } from "../../internal/cn.js";
|
|
5
|
+
import { CloseIcon } from "../../internal/icons/ui/Icons.js";
|
|
6
|
+
import { CloseButton } from "../close-button/index.js";
|
|
7
|
+
function TagsInputRoot(props) {
|
|
8
|
+
const [local, others] = splitProps(props, [
|
|
9
|
+
'asChild',
|
|
10
|
+
'children',
|
|
11
|
+
'class'
|
|
12
|
+
]);
|
|
13
|
+
return createComponent(TagsInput.Root, mergeProps({
|
|
14
|
+
get asChild () {
|
|
15
|
+
return local.asChild;
|
|
16
|
+
},
|
|
17
|
+
"data-slot": "tags-input-root",
|
|
18
|
+
get ["class"] () {
|
|
19
|
+
return cn('flex w-full max-w-96 flex-col gap-1 text-foreground data-disabled:opacity-50', local.class);
|
|
20
|
+
}
|
|
21
|
+
}, others, {
|
|
22
|
+
get children () {
|
|
23
|
+
return local.children;
|
|
24
|
+
}
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
function TagsInputRootProvider(props) {
|
|
28
|
+
const [local, others] = splitProps(props, [
|
|
29
|
+
'asChild',
|
|
30
|
+
'children',
|
|
31
|
+
'class'
|
|
32
|
+
]);
|
|
33
|
+
return createComponent(TagsInput.RootProvider, mergeProps({
|
|
34
|
+
get asChild () {
|
|
35
|
+
return local.asChild;
|
|
36
|
+
},
|
|
37
|
+
"data-slot": "tags-input-root-provider",
|
|
38
|
+
get ["class"] () {
|
|
39
|
+
return cn('flex w-full max-w-96 flex-col gap-1 text-foreground data-disabled:opacity-50', local.class);
|
|
40
|
+
}
|
|
41
|
+
}, others, {
|
|
42
|
+
get children () {
|
|
43
|
+
return local.children;
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
function TagsInputLabel(props) {
|
|
48
|
+
const [local, others] = splitProps(props, [
|
|
49
|
+
'class'
|
|
50
|
+
]);
|
|
51
|
+
return createComponent(TagsInput.Label, mergeProps({
|
|
52
|
+
"data-slot": "tags-input-label",
|
|
53
|
+
get ["class"] () {
|
|
54
|
+
return cn('inline-flex items-center gap-1 text-sm leading-5 font-medium text-foreground data-disabled:opacity-50', local.class);
|
|
55
|
+
}
|
|
56
|
+
}, others));
|
|
57
|
+
}
|
|
58
|
+
function TagsInputControl(props) {
|
|
59
|
+
const [local, others] = splitProps(props, [
|
|
60
|
+
'class'
|
|
61
|
+
]);
|
|
62
|
+
return createComponent(TagsInput.Control, mergeProps({
|
|
63
|
+
"data-slot": "tags-input-control",
|
|
64
|
+
get ["class"] () {
|
|
65
|
+
return cn('flex min-h-control-md w-full flex-wrap items-center gap-1 rounded-md border border-border bg-background px-2 py-[0.3125rem] text-foreground outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color,background-color,opacity] duration-200 ease-in-out data-disabled:pointer-events-none data-focus:outline-ring data-invalid:border-destructive data-invalid:data-focus:outline-destructive data-readonly:bg-background data-readonly:text-foreground motion-reduce:transition-none', local.class);
|
|
66
|
+
}
|
|
67
|
+
}, others));
|
|
68
|
+
}
|
|
69
|
+
function TagsInputItem(props) {
|
|
70
|
+
const [local, others] = splitProps(props, [
|
|
71
|
+
'class'
|
|
72
|
+
]);
|
|
73
|
+
return createComponent(TagsInput.Item, mergeProps({
|
|
74
|
+
"data-slot": "tags-input-item",
|
|
75
|
+
get ["class"] () {
|
|
76
|
+
return cn('contents', local.class);
|
|
77
|
+
}
|
|
78
|
+
}, others));
|
|
79
|
+
}
|
|
80
|
+
function TagsInputItemPreview(props) {
|
|
81
|
+
const [local, others] = splitProps(props, [
|
|
82
|
+
'class'
|
|
83
|
+
]);
|
|
84
|
+
return createComponent(TagsInput.ItemPreview, mergeProps({
|
|
85
|
+
"data-slot": "tags-input-item-preview",
|
|
86
|
+
get ["class"] () {
|
|
87
|
+
return cn('inline-flex min-h-control-xs max-w-full min-w-0 items-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 text-xs leading-4 font-medium text-secondary-foreground transition-[border-color,background-color,color,box-shadow] duration-200 ease-in-out data-disabled:opacity-50 data-highlighted:ring-1 data-highlighted:ring-ring motion-reduce:transition-none', local.class);
|
|
88
|
+
}
|
|
89
|
+
}, others));
|
|
90
|
+
}
|
|
91
|
+
function TagsInputItemText(props) {
|
|
92
|
+
const [local, others] = splitProps(props, [
|
|
93
|
+
'class'
|
|
94
|
+
]);
|
|
95
|
+
return createComponent(TagsInput.ItemText, mergeProps({
|
|
96
|
+
"data-slot": "tags-input-item-text",
|
|
97
|
+
get ["class"] () {
|
|
98
|
+
return cn('min-w-0 truncate', local.class);
|
|
99
|
+
}
|
|
100
|
+
}, others));
|
|
101
|
+
}
|
|
102
|
+
function TagsInputItemDeleteTrigger(props) {
|
|
103
|
+
const [local, others] = splitProps(props, [
|
|
104
|
+
'children',
|
|
105
|
+
'class'
|
|
106
|
+
]);
|
|
107
|
+
const resolvedChildren = children(()=>local.children);
|
|
108
|
+
return createComponent(TagsInput.ItemDeleteTrigger, mergeProps({
|
|
109
|
+
"data-slot": "tags-input-item-delete-trigger",
|
|
110
|
+
get ["class"] () {
|
|
111
|
+
return cn('inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border-0 bg-transparent p-0 text-inherit outline-0 transition-[background-color,color,opacity,box-shadow] duration-200 ease-in-out focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none [&>svg]:pointer-events-none [&>svg]:size-2.5 [&>svg]:shrink-0 [@media(hover:hover)]:hover:bg-current/10', local.class);
|
|
112
|
+
}
|
|
113
|
+
}, others, {
|
|
114
|
+
get children () {
|
|
115
|
+
return resolvedChildren() ?? createComponent(CloseIcon, {});
|
|
116
|
+
}
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
function TagsInputItemInput(props) {
|
|
120
|
+
const [local, others] = splitProps(props, [
|
|
121
|
+
'class'
|
|
122
|
+
]);
|
|
123
|
+
return createComponent(TagsInput.ItemInput, mergeProps({
|
|
124
|
+
"data-slot": "tags-input-item-input",
|
|
125
|
+
get ["class"] () {
|
|
126
|
+
return cn('h-control-xs min-w-28 shrink grow-0 basis-28 border-0 bg-transparent px-1 text-sm leading-5 text-inherit outline-0 placeholder:text-muted-foreground read-only:cursor-default data-readonly:cursor-default', local.class);
|
|
127
|
+
}
|
|
128
|
+
}, others));
|
|
129
|
+
}
|
|
130
|
+
function TagsInputInput(props) {
|
|
131
|
+
const [local, others] = splitProps(props, [
|
|
132
|
+
'class'
|
|
133
|
+
]);
|
|
134
|
+
return createComponent(TagsInput.Input, mergeProps({
|
|
135
|
+
"data-slot": "tags-input-input",
|
|
136
|
+
get ["class"] () {
|
|
137
|
+
return cn('h-control-xs min-w-28 shrink grow basis-28 border-0 bg-transparent px-1 text-sm leading-5 text-inherit outline-0 placeholder:text-muted-foreground read-only:cursor-default data-readonly:hidden data-readonly:cursor-default', local.class);
|
|
138
|
+
}
|
|
139
|
+
}, others));
|
|
140
|
+
}
|
|
141
|
+
function TagsInputClearTrigger(props) {
|
|
142
|
+
const [local, others] = splitProps(props, [
|
|
143
|
+
'aria-label',
|
|
144
|
+
'aria-labelledby',
|
|
145
|
+
'asChild',
|
|
146
|
+
'children',
|
|
147
|
+
'class'
|
|
148
|
+
]);
|
|
149
|
+
const tagsInput = useTagsInputContext();
|
|
150
|
+
const resolvedChildren = children(()=>local.children);
|
|
151
|
+
const clearTriggerLabel = ()=>tagsInput().getClearTriggerProps()['aria-label'];
|
|
152
|
+
if (local.asChild) return createComponent(TagsInput.ClearTrigger, mergeProps({
|
|
153
|
+
get asChild () {
|
|
154
|
+
return local.asChild;
|
|
155
|
+
},
|
|
156
|
+
"data-slot": "tags-input-clear-trigger",
|
|
157
|
+
get ["class"] () {
|
|
158
|
+
return cn('ms-auto shrink-0 self-center data-readonly:hidden', local.class);
|
|
159
|
+
},
|
|
160
|
+
get ["aria-label"] () {
|
|
161
|
+
return local['aria-label'];
|
|
162
|
+
},
|
|
163
|
+
get ["aria-labelledby"] () {
|
|
164
|
+
return local['aria-labelledby'];
|
|
165
|
+
}
|
|
166
|
+
}, others, {
|
|
167
|
+
get children () {
|
|
168
|
+
return local.children;
|
|
169
|
+
}
|
|
170
|
+
}));
|
|
171
|
+
return createComponent(TagsInput.ClearTrigger, mergeProps({
|
|
172
|
+
asChild: (triggerProps)=>createComponent(CloseButton.Root, mergeProps(triggerProps, {
|
|
173
|
+
get ["aria-label"] () {
|
|
174
|
+
return local['aria-label'] ?? clearTriggerLabel();
|
|
175
|
+
},
|
|
176
|
+
get ["aria-labelledby"] () {
|
|
177
|
+
return local['aria-labelledby'];
|
|
178
|
+
},
|
|
179
|
+
"data-part": "clear-trigger",
|
|
180
|
+
"data-scope": "tags-input",
|
|
181
|
+
"data-slot": "tags-input-clear-trigger",
|
|
182
|
+
get children () {
|
|
183
|
+
return resolvedChildren();
|
|
184
|
+
}
|
|
185
|
+
})),
|
|
186
|
+
"data-slot": "tags-input-clear-trigger",
|
|
187
|
+
get ["class"] () {
|
|
188
|
+
return cn('ms-auto size-control-xs shrink-0 self-center rounded-sm bg-transparent text-muted-foreground transition-[background-color,color,opacity] duration-200 ease-in-out focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-ring data-readonly:hidden motion-reduce:transition-none [&>svg]:size-3 [@media(hover:hover)]:hover:bg-muted [@media(hover:hover)]:hover:text-foreground', local.class);
|
|
189
|
+
}
|
|
190
|
+
}, others));
|
|
191
|
+
}
|
|
192
|
+
const TagsInputContext = TagsInput.Context;
|
|
193
|
+
function TagsInputItems() {
|
|
194
|
+
return createComponent(TagsInputContext, {
|
|
195
|
+
children: (tagsInput)=>createComponent(For, {
|
|
196
|
+
get each () {
|
|
197
|
+
return tagsInput().value;
|
|
198
|
+
},
|
|
199
|
+
children: (value, index)=>createComponent(TagsInputItem, {
|
|
200
|
+
get index () {
|
|
201
|
+
return index();
|
|
202
|
+
},
|
|
203
|
+
value: value,
|
|
204
|
+
get children () {
|
|
205
|
+
return [
|
|
206
|
+
createComponent(TagsInputItemPreview, {
|
|
207
|
+
get children () {
|
|
208
|
+
return [
|
|
209
|
+
createComponent(TagsInputItemText, {
|
|
210
|
+
children: value
|
|
211
|
+
}),
|
|
212
|
+
createComponent(TagsInputItemDeleteTrigger, {})
|
|
213
|
+
];
|
|
214
|
+
}
|
|
215
|
+
}),
|
|
216
|
+
createComponent(TagsInputItemInput, {})
|
|
217
|
+
];
|
|
218
|
+
}
|
|
219
|
+
})
|
|
220
|
+
})
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
const TagsInput_TagsInput = Object.assign(TagsInputRoot, {
|
|
224
|
+
Root: TagsInputRoot,
|
|
225
|
+
RootProvider: TagsInputRootProvider,
|
|
226
|
+
HiddenInput: TagsInput.HiddenInput,
|
|
227
|
+
Label: TagsInputLabel,
|
|
228
|
+
Control: TagsInputControl,
|
|
229
|
+
Item: TagsInputItem,
|
|
230
|
+
ItemContext: TagsInput.ItemContext,
|
|
231
|
+
ItemPreview: TagsInputItemPreview,
|
|
232
|
+
ItemText: TagsInputItemText,
|
|
233
|
+
ItemDeleteTrigger: TagsInputItemDeleteTrigger,
|
|
234
|
+
ItemInput: TagsInputItemInput,
|
|
235
|
+
Input: TagsInputInput,
|
|
236
|
+
ClearTrigger: TagsInputClearTrigger,
|
|
237
|
+
Context: TagsInputContext,
|
|
238
|
+
Items: TagsInputItems
|
|
239
|
+
});
|
|
240
|
+
export { TagsInput_TagsInput as TagsInput, useTagsInput, useTagsInputContext, useTagsInputItemContext };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { TagsInput, useTagsInput, useTagsInputContext, useTagsInputItemContext } from "@ark-ui/solid/tags-input";
|
|
2
|
+
import { For, children, splitProps } from "solid-js";
|
|
3
|
+
import { cn } from "../../internal/cn.jsx";
|
|
4
|
+
import { CloseIcon } from "../../internal/icons/ui/Icons.jsx";
|
|
5
|
+
import { CloseButton } from "../close-button/index.jsx";
|
|
6
|
+
function TagsInputRoot(props) {
|
|
7
|
+
const [local, others] = splitProps(props, [
|
|
8
|
+
'asChild',
|
|
9
|
+
'children',
|
|
10
|
+
'class'
|
|
11
|
+
]);
|
|
12
|
+
return <TagsInput.Root asChild={local.asChild} data-slot="tags-input-root" class={cn('flex w-full max-w-96 flex-col gap-1 text-foreground data-disabled:opacity-50', local.class)} {...others}>
|
|
13
|
+
{local.children}
|
|
14
|
+
</TagsInput.Root>;
|
|
15
|
+
}
|
|
16
|
+
function TagsInputRootProvider(props) {
|
|
17
|
+
const [local, others] = splitProps(props, [
|
|
18
|
+
'asChild',
|
|
19
|
+
'children',
|
|
20
|
+
'class'
|
|
21
|
+
]);
|
|
22
|
+
return <TagsInput.RootProvider asChild={local.asChild} data-slot="tags-input-root-provider" class={cn('flex w-full max-w-96 flex-col gap-1 text-foreground data-disabled:opacity-50', local.class)} {...others}>
|
|
23
|
+
{local.children}
|
|
24
|
+
</TagsInput.RootProvider>;
|
|
25
|
+
}
|
|
26
|
+
function TagsInputLabel(props) {
|
|
27
|
+
const [local, others] = splitProps(props, [
|
|
28
|
+
'class'
|
|
29
|
+
]);
|
|
30
|
+
return <TagsInput.Label data-slot="tags-input-label" class={cn('inline-flex items-center gap-1 text-sm leading-5 font-medium text-foreground data-disabled:opacity-50', local.class)} {...others}/>;
|
|
31
|
+
}
|
|
32
|
+
function TagsInputControl(props) {
|
|
33
|
+
const [local, others] = splitProps(props, [
|
|
34
|
+
'class'
|
|
35
|
+
]);
|
|
36
|
+
return <TagsInput.Control data-slot="tags-input-control" class={cn('flex min-h-control-md w-full flex-wrap items-center gap-1 rounded-md border border-border bg-background px-2 py-[0.3125rem] text-foreground outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color,background-color,opacity] duration-200 ease-in-out data-disabled:pointer-events-none data-focus:outline-ring data-invalid:border-destructive data-invalid:data-focus:outline-destructive data-readonly:bg-background data-readonly:text-foreground motion-reduce:transition-none', local.class)} {...others}/>;
|
|
37
|
+
}
|
|
38
|
+
function TagsInputItem(props) {
|
|
39
|
+
const [local, others] = splitProps(props, [
|
|
40
|
+
'class'
|
|
41
|
+
]);
|
|
42
|
+
return <TagsInput.Item data-slot="tags-input-item" class={cn('contents', local.class)} {...others}/>;
|
|
43
|
+
}
|
|
44
|
+
function TagsInputItemPreview(props) {
|
|
45
|
+
const [local, others] = splitProps(props, [
|
|
46
|
+
'class'
|
|
47
|
+
]);
|
|
48
|
+
return <TagsInput.ItemPreview data-slot="tags-input-item-preview" class={cn('inline-flex min-h-control-xs max-w-full min-w-0 items-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 text-xs leading-4 font-medium text-secondary-foreground transition-[border-color,background-color,color,box-shadow] duration-200 ease-in-out data-disabled:opacity-50 data-highlighted:ring-1 data-highlighted:ring-ring motion-reduce:transition-none', local.class)} {...others}/>;
|
|
49
|
+
}
|
|
50
|
+
function TagsInputItemText(props) {
|
|
51
|
+
const [local, others] = splitProps(props, [
|
|
52
|
+
'class'
|
|
53
|
+
]);
|
|
54
|
+
return <TagsInput.ItemText data-slot="tags-input-item-text" class={cn('min-w-0 truncate', local.class)} {...others}/>;
|
|
55
|
+
}
|
|
56
|
+
function TagsInputItemDeleteTrigger(props) {
|
|
57
|
+
const [local, others] = splitProps(props, [
|
|
58
|
+
'children',
|
|
59
|
+
'class'
|
|
60
|
+
]);
|
|
61
|
+
const resolvedChildren = children(()=>local.children);
|
|
62
|
+
return <TagsInput.ItemDeleteTrigger data-slot="tags-input-item-delete-trigger" class={cn('inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border-0 bg-transparent p-0 text-inherit outline-0 transition-[background-color,color,opacity,box-shadow] duration-200 ease-in-out focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 motion-reduce:transition-none [&>svg]:pointer-events-none [&>svg]:size-2.5 [&>svg]:shrink-0 [@media(hover:hover)]:hover:bg-current/10', local.class)} {...others}>
|
|
63
|
+
{resolvedChildren() ?? <CloseIcon/>}
|
|
64
|
+
</TagsInput.ItemDeleteTrigger>;
|
|
65
|
+
}
|
|
66
|
+
function TagsInputItemInput(props) {
|
|
67
|
+
const [local, others] = splitProps(props, [
|
|
68
|
+
'class'
|
|
69
|
+
]);
|
|
70
|
+
return <TagsInput.ItemInput data-slot="tags-input-item-input" class={cn('h-control-xs min-w-28 shrink grow-0 basis-28 border-0 bg-transparent px-1 text-sm leading-5 text-inherit outline-0 placeholder:text-muted-foreground read-only:cursor-default data-readonly:cursor-default', local.class)} {...others}/>;
|
|
71
|
+
}
|
|
72
|
+
function TagsInputInput(props) {
|
|
73
|
+
const [local, others] = splitProps(props, [
|
|
74
|
+
'class'
|
|
75
|
+
]);
|
|
76
|
+
return <TagsInput.Input data-slot="tags-input-input" class={cn('h-control-xs min-w-28 shrink grow basis-28 border-0 bg-transparent px-1 text-sm leading-5 text-inherit outline-0 placeholder:text-muted-foreground read-only:cursor-default data-readonly:hidden data-readonly:cursor-default', local.class)} {...others}/>;
|
|
77
|
+
}
|
|
78
|
+
function TagsInputClearTrigger(props) {
|
|
79
|
+
const [local, others] = splitProps(props, [
|
|
80
|
+
'aria-label',
|
|
81
|
+
'aria-labelledby',
|
|
82
|
+
'asChild',
|
|
83
|
+
'children',
|
|
84
|
+
'class'
|
|
85
|
+
]);
|
|
86
|
+
const tagsInput = useTagsInputContext();
|
|
87
|
+
const resolvedChildren = children(()=>local.children);
|
|
88
|
+
const clearTriggerLabel = ()=>tagsInput().getClearTriggerProps()['aria-label'];
|
|
89
|
+
if (local.asChild) return <TagsInput.ClearTrigger asChild={local.asChild} data-slot="tags-input-clear-trigger" class={cn('ms-auto shrink-0 self-center data-readonly:hidden', local.class)} aria-label={local['aria-label']} aria-labelledby={local['aria-labelledby']} {...others}>
|
|
90
|
+
{local.children}
|
|
91
|
+
</TagsInput.ClearTrigger>;
|
|
92
|
+
return <TagsInput.ClearTrigger asChild={(triggerProps)=><CloseButton.Root {...triggerProps()} aria-label={local['aria-label'] ?? clearTriggerLabel()} aria-labelledby={local['aria-labelledby']} data-part="clear-trigger" data-scope="tags-input" data-slot="tags-input-clear-trigger">
|
|
93
|
+
{resolvedChildren()}
|
|
94
|
+
</CloseButton.Root>} data-slot="tags-input-clear-trigger" class={cn('ms-auto size-control-xs shrink-0 self-center rounded-sm bg-transparent text-muted-foreground transition-[background-color,color,opacity] duration-200 ease-in-out focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-ring data-readonly:hidden motion-reduce:transition-none [&>svg]:size-3 [@media(hover:hover)]:hover:bg-muted [@media(hover:hover)]:hover:text-foreground', local.class)} {...others}/>;
|
|
95
|
+
}
|
|
96
|
+
const TagsInputContext = TagsInput.Context;
|
|
97
|
+
function TagsInputItems() {
|
|
98
|
+
return <TagsInputContext>
|
|
99
|
+
{(tagsInput)=><For each={tagsInput().value}>
|
|
100
|
+
{(value, index)=><TagsInputItem index={index()} value={value}>
|
|
101
|
+
<TagsInputItemPreview>
|
|
102
|
+
<TagsInputItemText>{value}</TagsInputItemText>
|
|
103
|
+
<TagsInputItemDeleteTrigger/>
|
|
104
|
+
</TagsInputItemPreview>
|
|
105
|
+
<TagsInputItemInput/>
|
|
106
|
+
</TagsInputItem>}
|
|
107
|
+
</For>}
|
|
108
|
+
</TagsInputContext>;
|
|
109
|
+
}
|
|
110
|
+
const TagsInput_TagsInput = Object.assign(TagsInputRoot, {
|
|
111
|
+
Root: TagsInputRoot,
|
|
112
|
+
RootProvider: TagsInputRootProvider,
|
|
113
|
+
HiddenInput: TagsInput.HiddenInput,
|
|
114
|
+
Label: TagsInputLabel,
|
|
115
|
+
Control: TagsInputControl,
|
|
116
|
+
Item: TagsInputItem,
|
|
117
|
+
ItemContext: TagsInput.ItemContext,
|
|
118
|
+
ItemPreview: TagsInputItemPreview,
|
|
119
|
+
ItemText: TagsInputItemText,
|
|
120
|
+
ItemDeleteTrigger: TagsInputItemDeleteTrigger,
|
|
121
|
+
ItemInput: TagsInputItemInput,
|
|
122
|
+
Input: TagsInputInput,
|
|
123
|
+
ClearTrigger: TagsInputClearTrigger,
|
|
124
|
+
Context: TagsInputContext,
|
|
125
|
+
Items: TagsInputItems
|
|
126
|
+
});
|
|
127
|
+
export { TagsInput_TagsInput as TagsInput, useTagsInput, useTagsInputContext, useTagsInputItemContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TagsInput, useTagsInput, useTagsInputContext, useTagsInputItemContext, } from './TagsInput.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TagsInput, useTagsInput, useTagsInputContext, useTagsInputItemContext } from "./TagsInput.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TagsInput, useTagsInput, useTagsInputContext, useTagsInputItemContext } from "./TagsInput.jsx";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { HTMLArkProps } from '@ark-ui/solid/factory';
|
|
2
|
+
import type { JSX } from 'solid-js';
|
|
3
|
+
type TextElement = 'p' | 'span' | 'small' | 'strong' | 'em' | 'div';
|
|
4
|
+
type TextSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
type TextWeight = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
6
|
+
type TextTone = 'default' | 'muted' | 'subtle' | 'primary' | 'destructive';
|
|
7
|
+
type TextAlign = 'start' | 'center' | 'end' | 'left' | 'right' | 'justify';
|
|
8
|
+
type TextProps = HTMLArkProps<'p'> & {
|
|
9
|
+
as?: TextElement;
|
|
10
|
+
size?: TextSize;
|
|
11
|
+
weight?: TextWeight;
|
|
12
|
+
tone?: TextTone;
|
|
13
|
+
align?: TextAlign;
|
|
14
|
+
truncate?: boolean;
|
|
15
|
+
lineClamp?: number;
|
|
16
|
+
'data-scope'?: string;
|
|
17
|
+
'data-part'?: string;
|
|
18
|
+
'data-slot'?: string;
|
|
19
|
+
'data-size'?: string;
|
|
20
|
+
'data-weight'?: string;
|
|
21
|
+
'data-tone'?: string;
|
|
22
|
+
'data-align'?: string;
|
|
23
|
+
'data-truncate'?: string;
|
|
24
|
+
'data-line-clamp'?: string;
|
|
25
|
+
};
|
|
26
|
+
declare function TextRoot(props: TextProps): JSX.Element;
|
|
27
|
+
declare const Text: typeof TextRoot & {
|
|
28
|
+
Root: typeof TextRoot;
|
|
29
|
+
};
|
|
30
|
+
export { Text };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Dynamic, createComponent, mergeProps } from "solid-js/web";
|
|
2
|
+
import { ark } from "@ark-ui/solid/factory";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { splitProps } from "solid-js";
|
|
5
|
+
import { cn } from "../../internal/cn.js";
|
|
6
|
+
const Text_elements = {
|
|
7
|
+
div: ark.div,
|
|
8
|
+
em: ark.em,
|
|
9
|
+
p: ark.p,
|
|
10
|
+
small: ark.small,
|
|
11
|
+
span: ark.span,
|
|
12
|
+
strong: ark.strong
|
|
13
|
+
};
|
|
14
|
+
const textVariants = cva('tracking-normal wrap-anywhere', {
|
|
15
|
+
variants: {
|
|
16
|
+
size: {
|
|
17
|
+
xs: 'text-xs',
|
|
18
|
+
sm: 'text-sm',
|
|
19
|
+
md: 'text-md',
|
|
20
|
+
lg: 'text-lg',
|
|
21
|
+
xl: 'text-xl'
|
|
22
|
+
},
|
|
23
|
+
weight: {
|
|
24
|
+
regular: 'font-regular',
|
|
25
|
+
medium: 'font-medium',
|
|
26
|
+
semibold: 'font-semibold',
|
|
27
|
+
bold: 'font-bold'
|
|
28
|
+
},
|
|
29
|
+
tone: {
|
|
30
|
+
default: 'text-foreground',
|
|
31
|
+
muted: 'text-muted-foreground',
|
|
32
|
+
subtle: 'text-secondary-foreground',
|
|
33
|
+
primary: 'text-primary',
|
|
34
|
+
destructive: 'text-destructive'
|
|
35
|
+
},
|
|
36
|
+
align: {
|
|
37
|
+
start: 'text-start',
|
|
38
|
+
center: 'text-center',
|
|
39
|
+
end: 'text-end',
|
|
40
|
+
left: 'text-left',
|
|
41
|
+
right: 'text-right',
|
|
42
|
+
justify: 'text-justify'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
function TextRoot(props) {
|
|
47
|
+
const [local, others] = splitProps(props, [
|
|
48
|
+
'as',
|
|
49
|
+
'asChild',
|
|
50
|
+
'size',
|
|
51
|
+
'weight',
|
|
52
|
+
'tone',
|
|
53
|
+
'align',
|
|
54
|
+
'truncate',
|
|
55
|
+
'lineClamp',
|
|
56
|
+
'class',
|
|
57
|
+
'style',
|
|
58
|
+
'data-scope',
|
|
59
|
+
'data-part',
|
|
60
|
+
'data-slot',
|
|
61
|
+
'data-size',
|
|
62
|
+
'data-weight',
|
|
63
|
+
'data-tone',
|
|
64
|
+
'data-align',
|
|
65
|
+
'data-truncate',
|
|
66
|
+
'data-line-clamp'
|
|
67
|
+
]);
|
|
68
|
+
const Element = ()=>Text_elements[local.as ?? 'p'];
|
|
69
|
+
const defaultSize = ()=>'small' === local.as ? 'sm' : 'md';
|
|
70
|
+
const defaultWeight = ()=>'strong' === local.as ? 'semibold' : 'regular';
|
|
71
|
+
const resolvedLineClamp = ()=>Number.isInteger(local.lineClamp) && (local.lineClamp ?? 0) > 0 ? local.lineClamp : void 0;
|
|
72
|
+
const lineClampStyle = ()=>{
|
|
73
|
+
const value = resolvedLineClamp();
|
|
74
|
+
if (void 0 === value) return local.style;
|
|
75
|
+
if ('string' == typeof local.style) return `${local.style};-webkit-line-clamp:${value}`;
|
|
76
|
+
return {
|
|
77
|
+
...local.style,
|
|
78
|
+
'-webkit-line-clamp': value
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
return createComponent(Dynamic, mergeProps({
|
|
82
|
+
get component () {
|
|
83
|
+
return Element();
|
|
84
|
+
},
|
|
85
|
+
get asChild () {
|
|
86
|
+
return local.asChild;
|
|
87
|
+
}
|
|
88
|
+
}, others, {
|
|
89
|
+
"data-scope": "text",
|
|
90
|
+
"data-part": "root",
|
|
91
|
+
"data-slot": "text-root",
|
|
92
|
+
get ["data-size"] () {
|
|
93
|
+
return local.size ?? defaultSize();
|
|
94
|
+
},
|
|
95
|
+
get ["data-weight"] () {
|
|
96
|
+
return local.weight ?? defaultWeight();
|
|
97
|
+
},
|
|
98
|
+
get ["data-tone"] () {
|
|
99
|
+
return local.tone ?? 'default';
|
|
100
|
+
},
|
|
101
|
+
get ["data-align"] () {
|
|
102
|
+
return local.align;
|
|
103
|
+
},
|
|
104
|
+
get ["data-truncate"] () {
|
|
105
|
+
return local.truncate ? '' : void 0;
|
|
106
|
+
},
|
|
107
|
+
get ["data-line-clamp"] () {
|
|
108
|
+
return void 0 === resolvedLineClamp() ? void 0 : '';
|
|
109
|
+
},
|
|
110
|
+
get ["class"] () {
|
|
111
|
+
return cn(textVariants({
|
|
112
|
+
size: local.size ?? defaultSize(),
|
|
113
|
+
weight: local.weight ?? defaultWeight(),
|
|
114
|
+
tone: local.tone ?? 'default',
|
|
115
|
+
align: local.align ?? 'start'
|
|
116
|
+
}), local.truncate && 'overflow-hidden text-ellipsis whitespace-nowrap', void 0 !== resolvedLineClamp() && '[display:-webkit-box] overflow-hidden [white-space:normal] [-webkit-box-orient:vertical]', local.class);
|
|
117
|
+
},
|
|
118
|
+
get style () {
|
|
119
|
+
return lineClampStyle();
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
122
|
+
}
|
|
123
|
+
const Text = Object.assign(TextRoot, {
|
|
124
|
+
Root: TextRoot
|
|
125
|
+
});
|
|
126
|
+
export { Text };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ark } from "@ark-ui/solid/factory";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { Dynamic } from "solid-js/web";
|
|
5
|
+
import { cn } from "../../internal/cn.jsx";
|
|
6
|
+
const Text_elements = {
|
|
7
|
+
div: ark.div,
|
|
8
|
+
em: ark.em,
|
|
9
|
+
p: ark.p,
|
|
10
|
+
small: ark.small,
|
|
11
|
+
span: ark.span,
|
|
12
|
+
strong: ark.strong
|
|
13
|
+
};
|
|
14
|
+
const textVariants = cva('tracking-normal wrap-anywhere', {
|
|
15
|
+
variants: {
|
|
16
|
+
size: {
|
|
17
|
+
xs: 'text-xs',
|
|
18
|
+
sm: 'text-sm',
|
|
19
|
+
md: 'text-md',
|
|
20
|
+
lg: 'text-lg',
|
|
21
|
+
xl: 'text-xl'
|
|
22
|
+
},
|
|
23
|
+
weight: {
|
|
24
|
+
regular: 'font-regular',
|
|
25
|
+
medium: 'font-medium',
|
|
26
|
+
semibold: 'font-semibold',
|
|
27
|
+
bold: 'font-bold'
|
|
28
|
+
},
|
|
29
|
+
tone: {
|
|
30
|
+
default: 'text-foreground',
|
|
31
|
+
muted: 'text-muted-foreground',
|
|
32
|
+
subtle: 'text-secondary-foreground',
|
|
33
|
+
primary: 'text-primary',
|
|
34
|
+
destructive: 'text-destructive'
|
|
35
|
+
},
|
|
36
|
+
align: {
|
|
37
|
+
start: 'text-start',
|
|
38
|
+
center: 'text-center',
|
|
39
|
+
end: 'text-end',
|
|
40
|
+
left: 'text-left',
|
|
41
|
+
right: 'text-right',
|
|
42
|
+
justify: 'text-justify'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
function TextRoot(props) {
|
|
47
|
+
const [local, others] = splitProps(props, [
|
|
48
|
+
'as',
|
|
49
|
+
'asChild',
|
|
50
|
+
'size',
|
|
51
|
+
'weight',
|
|
52
|
+
'tone',
|
|
53
|
+
'align',
|
|
54
|
+
'truncate',
|
|
55
|
+
'lineClamp',
|
|
56
|
+
'class',
|
|
57
|
+
'style',
|
|
58
|
+
'data-scope',
|
|
59
|
+
'data-part',
|
|
60
|
+
'data-slot',
|
|
61
|
+
'data-size',
|
|
62
|
+
'data-weight',
|
|
63
|
+
'data-tone',
|
|
64
|
+
'data-align',
|
|
65
|
+
'data-truncate',
|
|
66
|
+
'data-line-clamp'
|
|
67
|
+
]);
|
|
68
|
+
const Element = ()=>Text_elements[local.as ?? 'p'];
|
|
69
|
+
const defaultSize = ()=>'small' === local.as ? 'sm' : 'md';
|
|
70
|
+
const defaultWeight = ()=>'strong' === local.as ? 'semibold' : 'regular';
|
|
71
|
+
const resolvedLineClamp = ()=>Number.isInteger(local.lineClamp) && (local.lineClamp ?? 0) > 0 ? local.lineClamp : void 0;
|
|
72
|
+
const lineClampStyle = ()=>{
|
|
73
|
+
const value = resolvedLineClamp();
|
|
74
|
+
if (void 0 === value) return local.style;
|
|
75
|
+
if ('string' == typeof local.style) return `${local.style};-webkit-line-clamp:${value}`;
|
|
76
|
+
return {
|
|
77
|
+
...local.style,
|
|
78
|
+
'-webkit-line-clamp': value
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
return <Dynamic component={Element()} asChild={local.asChild} {...others} data-scope="text" data-part="root" data-slot="text-root" data-size={local.size ?? defaultSize()} data-weight={local.weight ?? defaultWeight()} data-tone={local.tone ?? 'default'} data-align={local.align} data-truncate={local.truncate ? '' : void 0} data-line-clamp={void 0 === resolvedLineClamp() ? void 0 : ''} class={cn(textVariants({
|
|
82
|
+
size: local.size ?? defaultSize(),
|
|
83
|
+
weight: local.weight ?? defaultWeight(),
|
|
84
|
+
tone: local.tone ?? 'default',
|
|
85
|
+
align: local.align ?? 'start'
|
|
86
|
+
}), local.truncate && 'overflow-hidden text-ellipsis whitespace-nowrap', void 0 !== resolvedLineClamp() && '[display:-webkit-box] overflow-hidden [white-space:normal] [-webkit-box-orient:vertical]', local.class)} style={lineClampStyle()}/>;
|
|
87
|
+
}
|
|
88
|
+
const Text = Object.assign(TextRoot, {
|
|
89
|
+
Root: TextRoot
|
|
90
|
+
});
|
|
91
|
+
export { Text };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Text.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Text.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Text.jsx";
|