@moduix/react-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 +13 -0
- package/dist/components/accordion/Accordion.js +78 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/alert/Alert.d.ts +14 -0
- package/dist/components/alert/Alert.js +93 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/angle-slider/AngleSlider.d.ts +26 -0
- package/dist/components/angle-slider/AngleSlider.js +107 -0
- package/dist/components/angle-slider/index.d.ts +1 -0
- package/dist/components/angle-slider/index.js +1 -0
- package/dist/components/aspect-ratio/AspectRatio.d.ts +8 -0
- package/dist/components/aspect-ratio/AspectRatio.js +23 -0
- package/dist/components/aspect-ratio/index.d.ts +1 -0
- package/dist/components/aspect-ratio/index.js +1 -0
- package/dist/components/avatar/Avatar.d.ts +17 -0
- package/dist/components/avatar/Avatar.js +66 -0
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/avatar/index.js +1 -0
- package/dist/components/badge/Badge.d.ts +11 -0
- package/dist/components/badge/Badge.js +60 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/bleed/Bleed.d.ts +12 -0
- package/dist/components/bleed/Bleed.js +49 -0
- package/dist/components/bleed/index.d.ts +1 -0
- package/dist/components/bleed/index.js +1 -0
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +21 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js +105 -0
- package/dist/components/breadcrumbs/index.d.ts +1 -0
- package/dist/components/breadcrumbs/index.js +1 -0
- package/dist/components/button/Button.d.ts +18 -0
- package/dist/components/button/Button.js +84 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/card/Card.d.ts +19 -0
- package/dist/components/card/Card.js +135 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/carousel/Carousel.d.ts +20 -0
- package/dist/components/carousel/Carousel.js +145 -0
- package/dist/components/carousel/index.d.ts +1 -0
- package/dist/components/carousel/index.js +1 -0
- package/dist/components/chart/Chart.d.ts +18 -0
- package/dist/components/chart/Chart.js +183 -0
- package/dist/components/chart/index.d.ts +1 -0
- package/dist/components/chart/index.js +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +20 -0
- package/dist/components/checkbox/Checkbox.js +83 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/clipboard/Clipboard.d.ts +15 -0
- package/dist/components/clipboard/Clipboard.js +105 -0
- package/dist/components/clipboard/index.d.ts +1 -0
- package/dist/components/clipboard/index.js +1 -0
- package/dist/components/close-button/CloseButton.d.ts +14 -0
- package/dist/components/close-button/CloseButton.js +50 -0
- package/dist/components/close-button/index.d.ts +1 -0
- package/dist/components/close-button/index.js +1 -0
- package/dist/components/collapsible/Collapsible.d.ts +11 -0
- package/dist/components/collapsible/Collapsible.js +67 -0
- package/dist/components/collapsible/index.d.ts +1 -0
- package/dist/components/collapsible/index.js +1 -0
- package/dist/components/color-picker/ColorPicker.d.ts +38 -0
- package/dist/components/color-picker/ColorPicker.js +354 -0
- package/dist/components/color-picker/index.d.ts +1 -0
- package/dist/components/color-picker/index.js +1 -0
- package/dist/components/combobox/Combobox.d.ts +30 -0
- package/dist/components/combobox/Combobox.js +208 -0
- package/dist/components/combobox/index.d.ts +1 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/command-palette/CommandPalette.d.ts +45 -0
- package/dist/components/command-palette/CommandPalette.js +376 -0
- package/dist/components/command-palette/index.d.ts +1 -0
- package/dist/components/command-palette/index.js +1 -0
- package/dist/components/container/Container.d.ts +12 -0
- package/dist/components/container/Container.js +123 -0
- package/dist/components/container/index.d.ts +1 -0
- package/dist/components/container/index.js +1 -0
- package/dist/components/date-input/DateInput.d.ts +17 -0
- package/dist/components/date-input/DateInput.js +87 -0
- package/dist/components/date-input/index.d.ts +1 -0
- package/dist/components/date-input/index.js +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +66 -0
- package/dist/components/date-picker/DatePicker.js +430 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/dialog/Dialog.d.ts +25 -0
- package/dist/components/dialog/Dialog.js +147 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/drawer/Drawer.d.ts +40 -0
- package/dist/components/drawer/Drawer.js +202 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/editable/Editable.d.ts +16 -0
- package/dist/components/editable/Editable.js +120 -0
- package/dist/components/editable/index.d.ts +1 -0
- package/dist/components/editable/index.js +1 -0
- package/dist/components/empty/Empty.d.ts +9 -0
- package/dist/components/empty/Empty.js +73 -0
- package/dist/components/empty/index.d.ts +1 -0
- package/dist/components/empty/index.js +1 -0
- package/dist/components/field/Field.d.ts +17 -0
- package/dist/components/field/Field.js +103 -0
- package/dist/components/field/index.d.ts +1 -0
- package/dist/components/field/index.js +1 -0
- package/dist/components/fieldset/Fieldset.d.ts +10 -0
- package/dist/components/fieldset/Fieldset.js +54 -0
- package/dist/components/fieldset/index.d.ts +1 -0
- package/dist/components/fieldset/index.js +1 -0
- package/dist/components/file-upload/FileUpload.d.ts +31 -0
- package/dist/components/file-upload/FileUpload.js +199 -0
- package/dist/components/file-upload/index.d.ts +1 -0
- package/dist/components/file-upload/index.js +1 -0
- package/dist/components/floating-panel/FloatingPanel.d.ts +34 -0
- package/dist/components/floating-panel/FloatingPanel.js +209 -0
- package/dist/components/floating-panel/index.d.ts +1 -0
- package/dist/components/floating-panel/index.js +1 -0
- package/dist/components/heading/Heading.d.ts +15 -0
- package/dist/components/heading/Heading.js +60 -0
- package/dist/components/heading/index.d.ts +1 -0
- package/dist/components/heading/index.js +1 -0
- package/dist/components/highlight/Highlight.d.ts +7 -0
- package/dist/components/highlight/Highlight.js +16 -0
- package/dist/components/highlight/index.d.ts +1 -0
- package/dist/components/highlight/index.js +1 -0
- package/dist/components/hover-card/HoverCard.d.ts +19 -0
- package/dist/components/hover-card/HoverCard.js +93 -0
- package/dist/components/hover-card/index.d.ts +1 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/image/Image.d.ts +13 -0
- package/dist/components/image/Image.js +25 -0
- package/dist/components/image/index.d.ts +1 -0
- package/dist/components/image/index.js +1 -0
- package/dist/components/image-cropper/ImageCropper.d.ts +17 -0
- package/dist/components/image-cropper/ImageCropper.js +95 -0
- package/dist/components/image-cropper/index.d.ts +1 -0
- package/dist/components/image-cropper/index.js +1 -0
- package/dist/components/input/Input.d.ts +12 -0
- package/dist/components/input/Input.js +38 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/index.js +1 -0
- package/dist/components/input-group/InputGroup.d.ts +25 -0
- package/dist/components/input-group/InputGroup.js +131 -0
- package/dist/components/input-group/index.d.ts +1 -0
- package/dist/components/input-group/index.js +1 -0
- package/dist/components/json-tree-view/JsonTreeView.d.ts +8 -0
- package/dist/components/json-tree-view/JsonTreeView.js +39 -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/kbd/Kbd.d.ts +5 -0
- package/dist/components/kbd/Kbd.js +30 -0
- package/dist/components/kbd/index.d.ts +1 -0
- package/dist/components/kbd/index.js +1 -0
- package/dist/components/lightbox/Lightbox.d.ts +46 -0
- package/dist/components/lightbox/Lightbox.js +232 -0
- package/dist/components/lightbox/index.d.ts +2 -0
- package/dist/components/lightbox/index.js +1 -0
- package/dist/components/list/List.d.ts +21 -0
- package/dist/components/list/List.js +106 -0
- package/dist/components/list/index.d.ts +1 -0
- package/dist/components/list/index.js +1 -0
- package/dist/components/listbox/Listbox.d.ts +28 -0
- package/dist/components/listbox/Listbox.js +179 -0
- package/dist/components/listbox/index.d.ts +1 -0
- package/dist/components/listbox/index.js +1 -0
- package/dist/components/marquee/Marquee.d.ts +12 -0
- package/dist/components/marquee/Marquee.js +93 -0
- package/dist/components/marquee/index.d.ts +1 -0
- package/dist/components/marquee/index.js +1 -0
- package/dist/components/menu/Menu.d.ts +51 -0
- package/dist/components/menu/Menu.js +300 -0
- package/dist/components/menu/index.d.ts +1 -0
- package/dist/components/menu/index.js +1 -0
- package/dist/components/native-select/NativeSelect.d.ts +9 -0
- package/dist/components/native-select/NativeSelect.js +38 -0
- package/dist/components/native-select/index.d.ts +1 -0
- package/dist/components/native-select/index.js +1 -0
- package/dist/components/navigation-menu/NavigationMenu.d.ts +18 -0
- package/dist/components/navigation-menu/NavigationMenu.js +119 -0
- package/dist/components/navigation-menu/index.d.ts +1 -0
- package/dist/components/navigation-menu/index.js +1 -0
- package/dist/components/number-input/NumberInput.d.ts +18 -0
- package/dist/components/number-input/NumberInput.js +105 -0
- package/dist/components/number-input/index.d.ts +1 -0
- package/dist/components/number-input/index.js +1 -0
- package/dist/components/pagination/Pagination.d.ts +17 -0
- package/dist/components/pagination/Pagination.js +115 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/password-input/PasswordInput.d.ts +16 -0
- package/dist/components/password-input/PasswordInput.js +87 -0
- package/dist/components/password-input/index.d.ts +1 -0
- package/dist/components/password-input/index.js +1 -0
- package/dist/components/pin-input/PinInput.d.ts +19 -0
- package/dist/components/pin-input/PinInput.js +83 -0
- package/dist/components/pin-input/index.d.ts +1 -0
- package/dist/components/pin-input/index.js +1 -0
- package/dist/components/popover/Popover.d.ts +29 -0
- package/dist/components/popover/Popover.js +177 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/progress-circular/ProgressCircular.d.ts +18 -0
- package/dist/components/progress-circular/ProgressCircular.js +94 -0
- package/dist/components/progress-circular/index.d.ts +1 -0
- package/dist/components/progress-circular/index.js +1 -0
- package/dist/components/progress-linear/ProgressLinear.d.ts +14 -0
- package/dist/components/progress-linear/ProgressLinear.js +73 -0
- package/dist/components/progress-linear/index.d.ts +1 -0
- package/dist/components/progress-linear/index.js +1 -0
- package/dist/components/qr-code/QrCode.d.ts +11 -0
- package/dist/components/qr-code/QrCode.js +63 -0
- package/dist/components/qr-code/index.d.ts +1 -0
- package/dist/components/qr-code/index.js +1 -0
- package/dist/components/radio-group/RadioGroup.d.ts +25 -0
- package/dist/components/radio-group/RadioGroup.js +108 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/rating-group/RatingGroup.d.ts +27 -0
- package/dist/components/rating-group/RatingGroup.js +92 -0
- package/dist/components/rating-group/index.d.ts +2 -0
- package/dist/components/rating-group/index.js +1 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +23 -0
- package/dist/components/scroll-area/ScrollArea.js +77 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/segment-group/SegmentGroup.d.ts +25 -0
- package/dist/components/segment-group/SegmentGroup.js +119 -0
- package/dist/components/segment-group/index.d.ts +1 -0
- package/dist/components/segment-group/index.js +1 -0
- package/dist/components/select/Select.d.ts +39 -0
- package/dist/components/select/Select.js +239 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/separator/Separator.d.ts +12 -0
- package/dist/components/separator/Separator.js +96 -0
- package/dist/components/separator/index.d.ts +1 -0
- package/dist/components/separator/index.js +1 -0
- package/dist/components/sidebar/Sidebar.d.ts +61 -0
- package/dist/components/sidebar/Sidebar.js +400 -0
- package/dist/components/sidebar/index.d.ts +1 -0
- package/dist/components/sidebar/index.js +1 -0
- package/dist/components/signature-pad/SignaturePad.d.ts +15 -0
- package/dist/components/signature-pad/SignaturePad.js +133 -0
- package/dist/components/signature-pad/index.d.ts +1 -0
- package/dist/components/signature-pad/index.js +1 -0
- package/dist/components/simple-grid/SimpleGrid.d.ts +16 -0
- package/dist/components/simple-grid/SimpleGrid.js +43 -0
- package/dist/components/simple-grid/index.d.ts +1 -0
- package/dist/components/simple-grid/index.js +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +18 -0
- package/dist/components/skeleton/Skeleton.js +30 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/slider/Slider.d.ts +23 -0
- package/dist/components/slider/Slider.js +122 -0
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/slider/index.js +1 -0
- package/dist/components/spinner/Spinner.d.ts +11 -0
- package/dist/components/spinner/Spinner.js +57 -0
- package/dist/components/spinner/index.d.ts +1 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/split-button/SplitButton.d.ts +36 -0
- package/dist/components/split-button/SplitButton.js +125 -0
- package/dist/components/split-button/index.d.ts +1 -0
- package/dist/components/split-button/index.js +1 -0
- package/dist/components/splitter/Splitter.d.ts +11 -0
- package/dist/components/splitter/Splitter.js +66 -0
- package/dist/components/splitter/index.d.ts +1 -0
- package/dist/components/splitter/index.js +1 -0
- package/dist/components/stack/Stack.d.ts +26 -0
- package/dist/components/stack/Stack.js +57 -0
- package/dist/components/stack/index.d.ts +1 -0
- package/dist/components/stack/index.js +1 -0
- package/dist/components/steps/Steps.d.ts +25 -0
- package/dist/components/steps/Steps.js +122 -0
- package/dist/components/steps/index.d.ts +1 -0
- package/dist/components/steps/index.js +1 -0
- package/dist/components/swap/Swap.d.ts +16 -0
- package/dist/components/swap/Swap.js +38 -0
- package/dist/components/swap/index.d.ts +1 -0
- package/dist/components/swap/index.js +1 -0
- package/dist/components/switch/Switch.d.ts +20 -0
- package/dist/components/switch/Switch.js +58 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/index.js +1 -0
- package/dist/components/table/Table.d.ts +39 -0
- package/dist/components/table/Table.js +191 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/tabs/Tabs.d.ts +19 -0
- package/dist/components/tabs/Tabs.js +71 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/tabs/index.js +1 -0
- package/dist/components/tag/Tag.d.ts +16 -0
- package/dist/components/tag/Tag.js +92 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/tag/index.js +1 -0
- package/dist/components/tags-input/TagsInput.d.ts +20 -0
- package/dist/components/tags-input/TagsInput.js +145 -0
- package/dist/components/tags-input/index.d.ts +1 -0
- package/dist/components/tags-input/index.js +1 -0
- package/dist/components/text/Text.d.ts +25 -0
- package/dist/components/text/Text.js +79 -0
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/text/index.js +1 -0
- package/dist/components/textarea/Textarea.d.ts +3 -0
- package/dist/components/textarea/Textarea.js +17 -0
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/timer/Timer.d.ts +18 -0
- package/dist/components/timer/Timer.js +94 -0
- package/dist/components/timer/index.d.ts +1 -0
- package/dist/components/timer/index.js +1 -0
- package/dist/components/toast/Toast.d.ts +17 -0
- package/dist/components/toast/Toast.js +107 -0
- package/dist/components/toast/index.d.ts +1 -0
- package/dist/components/toast/index.js +1 -0
- package/dist/components/toc/Toc.d.ts +23 -0
- package/dist/components/toc/Toc.js +144 -0
- package/dist/components/toc/index.d.ts +1 -0
- package/dist/components/toc/index.js +1 -0
- package/dist/components/toggle/Toggle.d.ts +15 -0
- package/dist/components/toggle/Toggle.js +55 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/index.js +1 -0
- package/dist/components/toggle-group/ToggleGroup.d.ts +24 -0
- package/dist/components/toggle-group/ToggleGroup.js +102 -0
- package/dist/components/toggle-group/index.d.ts +2 -0
- package/dist/components/toggle-group/index.js +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +20 -0
- package/dist/components/tooltip/Tooltip.js +105 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tour/Tour.d.ts +29 -0
- package/dist/components/tour/Tour.js +176 -0
- package/dist/components/tour/index.d.ts +1 -0
- package/dist/components/tour/index.js +1 -0
- package/dist/components/tree-view/TreeView.d.ts +38 -0
- package/dist/components/tree-view/TreeView.js +189 -0
- package/dist/components/tree-view/index.d.ts +1 -0
- package/dist/components/tree-view/index.js +1 -0
- package/dist/components/typeset/Typeset.d.ts +5 -0
- package/dist/components/typeset/Typeset.js +34 -0
- package/dist/components/typeset/Typeset.module.js +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/internal/cn.d.ts +2 -0
- package/dist/internal/cn.js +40 -0
- package/dist/internal/icons/ui/Icons.d.ts +24 -0
- package/dist/internal/icons/ui/Icons.js +229 -0
- package/dist/internal/icons/ui/index.d.ts +1 -0
- package/dist/internal/icons/ui/index.js +1 -0
- package/dist/internal/overlayPortal.d.ts +13 -0
- package/dist/internal/overlayPortal.js +20 -0
- package/dist/locale.d.ts +1 -0
- package/dist/locale.js +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 +459 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ark } from "@ark-ui/react/factory";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { cn } from "../../internal/cn.js";
|
|
5
|
+
const toCssValue = (value)=>'number' == typeof value ? `${value}px` : value;
|
|
6
|
+
const Skeleton_SkeletonRoot = /*#__PURE__*/ forwardRef(function({ 'aria-hidden': ariaHidden, asChild, borderRadius, boxSize, className, height, loading = true, style, variant = 'pulse', width, ...props }, ref) {
|
|
7
|
+
return /*#__PURE__*/ jsx(ark.div, {
|
|
8
|
+
...props,
|
|
9
|
+
ref: ref,
|
|
10
|
+
asChild: asChild,
|
|
11
|
+
"data-scope": "skeleton",
|
|
12
|
+
"data-part": "root",
|
|
13
|
+
"data-slot": "skeleton-root",
|
|
14
|
+
"data-state": loading ? 'loading' : 'loaded',
|
|
15
|
+
"data-loading": loading ? '' : void 0,
|
|
16
|
+
"data-variant": variant,
|
|
17
|
+
"aria-hidden": ariaHidden ?? (loading ? true : void 0),
|
|
18
|
+
className: cn('block w-full overflow-hidden rounded-md', loading && cn('pointer-events-none h-4 bg-muted-foreground/18 text-transparent select-none before:invisible after:invisible [&_*]:invisible', 'none' === variant ? 'animate-none' : 'animate-[moduix-pulse_2.5s_ease-in-out_infinite]', 'motion-reduce:animate-none'), className),
|
|
19
|
+
style: {
|
|
20
|
+
width: toCssValue(width ?? boxSize),
|
|
21
|
+
height: toCssValue(height ?? boxSize),
|
|
22
|
+
borderRadius: toCssValue(borderRadius),
|
|
23
|
+
...style
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
const Skeleton = Object.assign(Skeleton_SkeletonRoot, {
|
|
28
|
+
Root: Skeleton_SkeletonRoot
|
|
29
|
+
});
|
|
30
|
+
export { Skeleton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Skeleton } from './Skeleton.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Skeleton } from "./Skeleton.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Slider as SliderPrimitive, useSlider, useSliderContext } from '@ark-ui/react/slider';
|
|
2
|
+
declare function SliderThumbs({ className }: {
|
|
3
|
+
className?: string;
|
|
4
|
+
}): import("react").JSX.Element[];
|
|
5
|
+
declare const Slider: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
6
|
+
Root: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
RootProvider: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
Context: (props: SliderPrimitive.ContextProps) => import("react").ReactNode;
|
|
9
|
+
useSlider: (props?: import("@ark-ui/react/slider").UseSliderProps) => import("@ark-ui/react/slider").UseSliderReturn;
|
|
10
|
+
useSliderContext: () => import("@ark-ui/react/slider").UseSliderContext;
|
|
11
|
+
Label: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
12
|
+
ValueText: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.ValueTextProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Control: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
HiddenInput: import("react").ForwardRefExoticComponent<SliderPrimitive.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
15
|
+
Track: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.TrackProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
Range: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.RangeProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
Thumb: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.ThumbProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
Thumbs: typeof SliderThumbs;
|
|
19
|
+
MarkerGroup: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.MarkerGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
|
+
Marker: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.MarkerProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
21
|
+
DraggingIndicator: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.DraggingIndicatorProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
22
|
+
};
|
|
23
|
+
export { Slider, useSlider, useSliderContext };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Slider, useSlider, useSliderContext } from "@ark-ui/react/slider";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { cn } from "../../internal/cn.js";
|
|
6
|
+
const Slider_SliderRoot = /*#__PURE__*/ forwardRef(function({ className, readOnly, ...props }, ref) {
|
|
7
|
+
return /*#__PURE__*/ jsx(Slider.Root, {
|
|
8
|
+
ref: ref,
|
|
9
|
+
"data-slot": "slider-root",
|
|
10
|
+
"data-readonly": readOnly ? '' : void 0,
|
|
11
|
+
className: cn("group flex w-48 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50 data-[orientation=vertical]:grid data-[orientation=vertical]:h-48 data-[orientation=vertical]:w-max data-[orientation=vertical]:grid-cols-[auto_max-content] data-[orientation=vertical]:grid-rows-[auto_minmax(0,1fr)] data-[orientation=vertical]:items-center data-[orientation=vertical]:gap-x-2 data-[orientation=vertical]:[grid-template-areas:'label_value'_'control_markers']", className),
|
|
12
|
+
readOnly: readOnly,
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
const Slider_SliderRootProvider = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
17
|
+
return /*#__PURE__*/ jsx(Slider.RootProvider, {
|
|
18
|
+
ref: ref,
|
|
19
|
+
"data-slot": "slider-root-provider",
|
|
20
|
+
className: cn("group flex w-48 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50 data-[orientation=vertical]:grid data-[orientation=vertical]:h-48 data-[orientation=vertical]:w-max data-[orientation=vertical]:grid-cols-[auto_max-content] data-[orientation=vertical]:grid-rows-[auto_minmax(0,1fr)] data-[orientation=vertical]:items-center data-[orientation=vertical]:gap-x-2 data-[orientation=vertical]:[grid-template-areas:'label_value'_'control_markers']", className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
const Slider_SliderLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
25
|
+
return /*#__PURE__*/ jsx(Slider.Label, {
|
|
26
|
+
ref: ref,
|
|
27
|
+
"data-slot": "slider-label",
|
|
28
|
+
className: cn('text-sm leading-5 font-normal text-foreground select-none group-data-[orientation=vertical]:[grid-area:label]', className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
const Slider_SliderValueText = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
33
|
+
return /*#__PURE__*/ jsx(Slider.ValueText, {
|
|
34
|
+
ref: ref,
|
|
35
|
+
"data-slot": "slider-value-text",
|
|
36
|
+
className: cn('text-right text-sm leading-5 font-normal text-foreground group-data-[orientation=vertical]:justify-self-end group-data-[orientation=vertical]:[grid-area:value]', className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
const Slider_SliderControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
41
|
+
return /*#__PURE__*/ jsx(Slider.Control, {
|
|
42
|
+
ref: ref,
|
|
43
|
+
"data-slot": "slider-control",
|
|
44
|
+
className: cn('relative flex min-h-5 w-full cursor-pointer touch-none items-center select-none group-data-readonly:cursor-default group-data-[orientation=vertical]:[grid-area:control] data-disabled:cursor-default data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-0 data-[orientation=vertical]:w-5 data-[orientation=vertical]:flex-col', className),
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
const Slider_SliderTrack = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
49
|
+
return /*#__PURE__*/ jsx(Slider.Track, {
|
|
50
|
+
ref: ref,
|
|
51
|
+
"data-slot": "slider-track",
|
|
52
|
+
className: cn('h-1.5 w-full flex-1 overflow-hidden rounded-full bg-muted ring-1 ring-border select-none ring-inset data-invalid:ring-destructive data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5', className),
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
const Slider_SliderRange = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
57
|
+
return /*#__PURE__*/ jsx(Slider.Range, {
|
|
58
|
+
ref: ref,
|
|
59
|
+
"data-slot": "slider-range",
|
|
60
|
+
className: cn('h-full rounded-[inherit] bg-primary data-invalid:bg-destructive data-[orientation=vertical]:w-full', className),
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
const Slider_SliderThumb = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
65
|
+
return /*#__PURE__*/ jsx(Slider.Thumb, {
|
|
66
|
+
ref: ref,
|
|
67
|
+
"data-slot": "slider-thumb",
|
|
68
|
+
className: cn('box-border flex size-4 shrink-0 items-center justify-center rounded-full border border-border bg-background shadow-sm outline-0 transition-[border-color,background-color,box-shadow] duration-200 ease-in-out select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring data-disabled:pointer-events-none data-dragging:border-ring data-dragging:shadow-md data-dragging:ring-1 data-dragging:ring-ring data-invalid:border-destructive data-invalid:focus-visible:ring-destructive motion-reduce:transition-none', className),
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
function SliderThumbs({ className }) {
|
|
73
|
+
const slider = useSliderContext();
|
|
74
|
+
return slider.value.map((_, index)=>/*#__PURE__*/ jsx(Slider_SliderThumb, {
|
|
75
|
+
index: index,
|
|
76
|
+
className: className,
|
|
77
|
+
children: /*#__PURE__*/ jsx(Slider.HiddenInput, {})
|
|
78
|
+
}, index));
|
|
79
|
+
}
|
|
80
|
+
const Slider_SliderMarkerGroup = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
81
|
+
return /*#__PURE__*/ jsx(Slider.MarkerGroup, {
|
|
82
|
+
ref: ref,
|
|
83
|
+
"data-slot": "slider-marker-group",
|
|
84
|
+
className: cn('mt-2 flex justify-between group-data-[orientation=vertical]:m-0 group-data-[orientation=vertical]:h-full group-data-[orientation=vertical]:flex-col group-data-[orientation=vertical]:[grid-area:markers]', className),
|
|
85
|
+
...props
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
const Slider_SliderMarker = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
89
|
+
return /*#__PURE__*/ jsx(Slider.Marker, {
|
|
90
|
+
ref: ref,
|
|
91
|
+
"data-slot": "slider-marker",
|
|
92
|
+
className: cn("relative text-xs leading-4 text-muted-foreground before:absolute before:start-1/2 before:-top-2 before:size-1 before:-translate-x-1/2 before:rounded-full before:bg-border before:content-[''] data-[orientation=vertical]:before:-start-2 data-[orientation=vertical]:before:top-1/2 data-[orientation=vertical]:before:-translate-y-1/2 data-[state=at-value]:before:bg-primary group-data-invalid:data-[state=at-value]:before:bg-destructive data-[state=under-value]:before:bg-primary group-data-invalid:data-[state=under-value]:before:bg-destructive", className),
|
|
93
|
+
...props
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
const Slider_SliderDraggingIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
97
|
+
return /*#__PURE__*/ jsx(Slider.DraggingIndicator, {
|
|
98
|
+
ref: ref,
|
|
99
|
+
"data-slot": "slider-dragging-indicator",
|
|
100
|
+
className: cn('pointer-events-none -top-8 rounded-sm bg-foreground px-2 py-1 text-xs leading-none font-medium whitespace-nowrap text-background', className),
|
|
101
|
+
...props
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
const Slider_Slider = Object.assign(Slider_SliderRoot, {
|
|
105
|
+
Root: Slider_SliderRoot,
|
|
106
|
+
RootProvider: Slider_SliderRootProvider,
|
|
107
|
+
Context: Slider.Context,
|
|
108
|
+
useSlider: useSlider,
|
|
109
|
+
useSliderContext: useSliderContext,
|
|
110
|
+
Label: Slider_SliderLabel,
|
|
111
|
+
ValueText: Slider_SliderValueText,
|
|
112
|
+
Control: Slider_SliderControl,
|
|
113
|
+
HiddenInput: Slider.HiddenInput,
|
|
114
|
+
Track: Slider_SliderTrack,
|
|
115
|
+
Range: Slider_SliderRange,
|
|
116
|
+
Thumb: Slider_SliderThumb,
|
|
117
|
+
Thumbs: SliderThumbs,
|
|
118
|
+
MarkerGroup: Slider_SliderMarkerGroup,
|
|
119
|
+
Marker: Slider_SliderMarker,
|
|
120
|
+
DraggingIndicator: Slider_SliderDraggingIndicator
|
|
121
|
+
});
|
|
122
|
+
export { Slider_Slider as Slider, useSlider, useSliderContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Slider.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Slider.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type SpinnerSize = 'inherit' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
|
+
declare const Spinner: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
3
|
+
size?: SpinnerSize;
|
|
4
|
+
decorative?: boolean;
|
|
5
|
+
} & import("react").RefAttributes<HTMLSpanElement>> & {
|
|
6
|
+
Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
7
|
+
size?: SpinnerSize;
|
|
8
|
+
decorative?: boolean;
|
|
9
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
};
|
|
11
|
+
export { Spinner };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ark } from "@ark-ui/react/factory";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { cn } from "../../internal/cn.js";
|
|
7
|
+
const spinnerVariants = cva('inline-flex shrink-0 items-center justify-center align-middle', {
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
inherit: 'size-[1em]',
|
|
11
|
+
xs: 'size-3',
|
|
12
|
+
sm: 'size-4',
|
|
13
|
+
md: 'size-5',
|
|
14
|
+
lg: 'size-7',
|
|
15
|
+
xl: 'size-control-md'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
size: 'md'
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const Spinner_SpinnerRoot = /*#__PURE__*/ forwardRef(function({ asChild, children, className, decorative = false, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, size = 'md', ...props }, ref) {
|
|
23
|
+
const accessibleLabel = decorative ? void 0 : ariaLabel ?? (ariaLabelledBy ? void 0 : 'Loading');
|
|
24
|
+
return /*#__PURE__*/ jsx(ark.span, {
|
|
25
|
+
ref: ref,
|
|
26
|
+
asChild: asChild,
|
|
27
|
+
...props,
|
|
28
|
+
"data-scope": "spinner",
|
|
29
|
+
"data-part": "root",
|
|
30
|
+
"data-slot": "spinner-root",
|
|
31
|
+
"data-size": size,
|
|
32
|
+
role: decorative && !asChild ? 'presentation' : decorative ? void 0 : 'status',
|
|
33
|
+
"aria-hidden": decorative && !asChild ? true : void 0,
|
|
34
|
+
"aria-label": accessibleLabel,
|
|
35
|
+
"aria-labelledby": decorative ? void 0 : ariaLabelledBy,
|
|
36
|
+
className: cn(spinnerVariants({
|
|
37
|
+
size
|
|
38
|
+
}), className),
|
|
39
|
+
children: asChild ? children : /*#__PURE__*/ jsx("span", {
|
|
40
|
+
"data-scope": "spinner",
|
|
41
|
+
"data-part": "indicator",
|
|
42
|
+
"data-slot": "spinner-indicator",
|
|
43
|
+
className: "inline-flex size-full animate-[var(--moduix-animation-spin)] items-center justify-center motion-reduce:animate-none [&_svg]:size-full",
|
|
44
|
+
"aria-hidden": "true",
|
|
45
|
+
children: children ?? /*#__PURE__*/ jsx("span", {
|
|
46
|
+
"data-scope": "spinner",
|
|
47
|
+
"data-part": "ring",
|
|
48
|
+
"data-slot": "spinner-ring",
|
|
49
|
+
className: "box-border block size-full rounded-full border-2 border-solid border-current/[22%] [border-block-start-color:currentColor]"
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
const Spinner = Object.assign(Spinner_SpinnerRoot, {
|
|
55
|
+
Root: Spinner_SpinnerRoot
|
|
56
|
+
});
|
|
57
|
+
export { Spinner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Spinner.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Spinner.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { Button } from '../button/index.js';
|
|
3
|
+
import { Menu } from '../menu/index.js';
|
|
4
|
+
type ButtonProps = ComponentProps<typeof Button>;
|
|
5
|
+
type SplitButtonVariant = Exclude<NonNullable<ButtonProps['variant']>, 'link'>;
|
|
6
|
+
type SplitButtonSize = Exclude<NonNullable<ButtonProps['size']>, 'icon-sm' | 'icon-md' | 'icon-lg'>;
|
|
7
|
+
type SplitButtonActionProps = Omit<ButtonProps, 'size' | 'variant'> & {
|
|
8
|
+
size?: SplitButtonSize;
|
|
9
|
+
variant?: SplitButtonVariant;
|
|
10
|
+
};
|
|
11
|
+
type SplitButtonTriggerProps = Omit<ComponentProps<typeof Menu.Trigger>, 'asChild'> & {
|
|
12
|
+
size?: SplitButtonSize;
|
|
13
|
+
variant?: SplitButtonVariant;
|
|
14
|
+
};
|
|
15
|
+
declare const SplitButton: import("react").ForwardRefExoticComponent<Omit<import("@ark-ui/react/menu").MenuRootProps & import("../../internal/overlayPortal.js").OverlayPortalProps, "children"> & {
|
|
16
|
+
'aria-label'?: string;
|
|
17
|
+
'aria-labelledby'?: string;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
size?: SplitButtonSize;
|
|
21
|
+
variant?: SplitButtonVariant;
|
|
22
|
+
} & import("react").RefAttributes<HTMLDivElement>> & {
|
|
23
|
+
Root: import("react").ForwardRefExoticComponent<Omit<import("@ark-ui/react/menu").MenuRootProps & import("../../internal/overlayPortal.js").OverlayPortalProps, "children"> & {
|
|
24
|
+
'aria-label'?: string;
|
|
25
|
+
'aria-labelledby'?: string;
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
size?: SplitButtonSize;
|
|
29
|
+
variant?: SplitButtonVariant;
|
|
30
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
|
+
Action: import("react").ForwardRefExoticComponent<Omit<SplitButtonActionProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<SplitButtonTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
33
|
+
Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@ark-ui/react/menu").MenuPositionerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
Content: import("react").ForwardRefExoticComponent<Omit<Omit<import("@ark-ui/react/menu").MenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
35
|
+
};
|
|
36
|
+
export { SplitButton };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { createContext, forwardRef, useContext } from "react";
|
|
5
|
+
import { cn } from "../../internal/cn.js";
|
|
6
|
+
import { ChevronDownIcon } from "../../internal/icons/ui/index.js";
|
|
7
|
+
import { Button } from "../button/index.js";
|
|
8
|
+
import { Menu } from "../menu/index.js";
|
|
9
|
+
const splitButtonTriggerVariants = cva("relative min-w-0 -ms-px rounded-s-none before:pointer-events-none before:absolute before:inset-y-1.5 before:start-0 before:w-px before:bg-current before:opacity-[0.16] before:content-['']", {
|
|
10
|
+
variants: {
|
|
11
|
+
size: {
|
|
12
|
+
xs: 'px-2',
|
|
13
|
+
sm: 'px-2.5',
|
|
14
|
+
md: 'px-4',
|
|
15
|
+
lg: 'px-3.5',
|
|
16
|
+
xl: 'px-4'
|
|
17
|
+
},
|
|
18
|
+
variant: {
|
|
19
|
+
default: '',
|
|
20
|
+
outline: 'before:opacity-0',
|
|
21
|
+
secondary: '',
|
|
22
|
+
destructive: '',
|
|
23
|
+
'destructive-outline': 'before:opacity-0',
|
|
24
|
+
ghost: ''
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
size: 'md',
|
|
29
|
+
variant: 'default'
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const SplitButtonContext = /*#__PURE__*/ createContext(null);
|
|
33
|
+
function useSplitButtonContext(componentName) {
|
|
34
|
+
const context = useContext(SplitButtonContext);
|
|
35
|
+
if (!context) throw new Error(`${componentName} must be used within SplitButton.Root.`);
|
|
36
|
+
return context;
|
|
37
|
+
}
|
|
38
|
+
const SplitButton_SplitButtonRoot = /*#__PURE__*/ forwardRef(function({ children, className, positioning, size = 'md', variant = 'default', 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...props }, ref) {
|
|
39
|
+
return /*#__PURE__*/ jsx(SplitButtonContext.Provider, {
|
|
40
|
+
value: {
|
|
41
|
+
size,
|
|
42
|
+
variant
|
|
43
|
+
},
|
|
44
|
+
children: /*#__PURE__*/ jsx(Menu.Root, {
|
|
45
|
+
positioning: {
|
|
46
|
+
placement: 'bottom-end',
|
|
47
|
+
gutter: 4,
|
|
48
|
+
...positioning
|
|
49
|
+
},
|
|
50
|
+
...props,
|
|
51
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
52
|
+
ref: ref,
|
|
53
|
+
role: "group",
|
|
54
|
+
"aria-label": ariaLabel,
|
|
55
|
+
"aria-labelledby": ariaLabelledby,
|
|
56
|
+
"data-scope": "split-button",
|
|
57
|
+
"data-part": "root",
|
|
58
|
+
"data-slot": "split-button-root",
|
|
59
|
+
className: cn('inline-flex items-stretch', className),
|
|
60
|
+
children: children
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
const SplitButton_SplitButtonAction = /*#__PURE__*/ forwardRef(function({ className, size, variant, ...props }, ref) {
|
|
66
|
+
const context = useSplitButtonContext('SplitButton.Action');
|
|
67
|
+
return /*#__PURE__*/ jsx(Button, {
|
|
68
|
+
ref: ref,
|
|
69
|
+
"data-slot": "split-button-action",
|
|
70
|
+
size: size ?? context.size,
|
|
71
|
+
variant: variant ?? context.variant,
|
|
72
|
+
className: cn('rounded-e-none', className),
|
|
73
|
+
...props
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
const SplitButton_SplitButtonTrigger = /*#__PURE__*/ forwardRef(function({ children, className, size, variant, 'aria-label': ariaLabel, ...props }, ref) {
|
|
77
|
+
const context = useSplitButtonContext('SplitButton.Trigger');
|
|
78
|
+
const resolvedSize = size ?? context.size;
|
|
79
|
+
const resolvedVariant = variant ?? context.variant;
|
|
80
|
+
const isIconOnly = null == children;
|
|
81
|
+
return /*#__PURE__*/ jsx(Menu.Trigger, {
|
|
82
|
+
ref: ref,
|
|
83
|
+
asChild: true,
|
|
84
|
+
"data-slot": "split-button-trigger",
|
|
85
|
+
"aria-label": isIconOnly ? ariaLabel ?? 'More actions' : ariaLabel,
|
|
86
|
+
className: cn(splitButtonTriggerVariants({
|
|
87
|
+
size: resolvedSize,
|
|
88
|
+
variant: resolvedVariant
|
|
89
|
+
}), className),
|
|
90
|
+
...props,
|
|
91
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
92
|
+
size: resolvedSize,
|
|
93
|
+
variant: resolvedVariant,
|
|
94
|
+
children: children ?? /*#__PURE__*/ jsx(ChevronDownIcon, {})
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
const SplitButton_SplitButtonPositioner = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
99
|
+
return /*#__PURE__*/ jsx(Menu.Positioner, {
|
|
100
|
+
ref: ref,
|
|
101
|
+
"data-slot": "split-button-positioner",
|
|
102
|
+
className: className,
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
const SplitButton_SplitButtonContent = /*#__PURE__*/ forwardRef(function({ asChild, children, className, ...props }, ref) {
|
|
107
|
+
return /*#__PURE__*/ jsx(Menu.Content, {
|
|
108
|
+
ref: ref,
|
|
109
|
+
asChild: asChild,
|
|
110
|
+
"data-slot": "split-button-content",
|
|
111
|
+
className: className,
|
|
112
|
+
...props,
|
|
113
|
+
children: asChild ? children : /*#__PURE__*/ jsx(Menu.Viewport, {
|
|
114
|
+
children: children
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
const SplitButton = Object.assign(SplitButton_SplitButtonRoot, {
|
|
119
|
+
Root: SplitButton_SplitButtonRoot,
|
|
120
|
+
Action: SplitButton_SplitButtonAction,
|
|
121
|
+
Trigger: SplitButton_SplitButtonTrigger,
|
|
122
|
+
Positioner: SplitButton_SplitButtonPositioner,
|
|
123
|
+
Content: SplitButton_SplitButtonContent
|
|
124
|
+
});
|
|
125
|
+
export { SplitButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SplitButton } from './SplitButton.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SplitButton } from "./SplitButton.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SplitterPanelData } from '@ark-ui/react/splitter';
|
|
2
|
+
import { createSplitterRegistry, Splitter as SplitterPrimitive, useSplitter, useSplitterContext } from '@ark-ui/react/splitter';
|
|
3
|
+
declare const Splitter: import("react").ForwardRefExoticComponent<Omit<SplitterPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
4
|
+
Root: import("react").ForwardRefExoticComponent<Omit<SplitterPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
RootProvider: import("react").ForwardRefExoticComponent<Omit<SplitterPrimitive.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
Context: (props: SplitterPrimitive.ContextProps) => import("react").ReactNode;
|
|
7
|
+
Panel: import("react").ForwardRefExoticComponent<Omit<SplitterPrimitive.PanelProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
ResizeTrigger: import("react").ForwardRefExoticComponent<Omit<SplitterPrimitive.ResizeTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
ResizeTriggerIndicator: import("react").ForwardRefExoticComponent<Omit<SplitterPrimitive.ResizeTriggerIndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
};
|
|
11
|
+
export { createSplitterRegistry, Splitter, type SplitterPanelData, useSplitter, useSplitterContext, };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Splitter, createSplitterRegistry, useSplitter, useSplitterContext } from "@ark-ui/react/splitter";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { cn } from "../../internal/cn.js";
|
|
6
|
+
const Splitter_SplitterRoot = /*#__PURE__*/ forwardRef(function({ className, style, ...props }, ref) {
|
|
7
|
+
return /*#__PURE__*/ jsx(Splitter.Root, {
|
|
8
|
+
ref: ref,
|
|
9
|
+
"data-slot": "splitter-root",
|
|
10
|
+
className: cn('group/splitter relative box-border h-112 min-h-0 w-full min-w-0 rounded-md border border-border bg-card text-foreground shadow-sm data-dragging:cursor-col-resize data-dragging:data-[orientation=vertical]:cursor-row-resize', className),
|
|
11
|
+
style: {
|
|
12
|
+
width: void 0,
|
|
13
|
+
height: void 0,
|
|
14
|
+
...style
|
|
15
|
+
},
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
const Splitter_SplitterRootProvider = /*#__PURE__*/ forwardRef(function({ className, style, ...props }, ref) {
|
|
20
|
+
return /*#__PURE__*/ jsx(Splitter.RootProvider, {
|
|
21
|
+
ref: ref,
|
|
22
|
+
"data-slot": "splitter-root-provider",
|
|
23
|
+
className: cn('group/splitter relative box-border h-112 min-h-0 w-full min-w-0 rounded-md border border-border bg-card text-foreground shadow-sm data-dragging:cursor-col-resize data-dragging:data-[orientation=vertical]:cursor-row-resize', className),
|
|
24
|
+
style: {
|
|
25
|
+
width: void 0,
|
|
26
|
+
height: void 0,
|
|
27
|
+
...style
|
|
28
|
+
},
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
const Splitter_SplitterPanel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
33
|
+
return /*#__PURE__*/ jsx(Splitter.Panel, {
|
|
34
|
+
ref: ref,
|
|
35
|
+
"data-slot": "splitter-panel",
|
|
36
|
+
className: cn('box-border min-h-50 min-w-0 overflow-auto rounded-none border-0 border-border bg-card p-4 text-card-foreground shadow-none group-data-[orientation=vertical]/splitter:min-h-0 data-dragging:select-none', className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
const Splitter_SplitterResizeTriggerIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
41
|
+
return /*#__PURE__*/ jsx(Splitter.ResizeTriggerIndicator, {
|
|
42
|
+
ref: ref,
|
|
43
|
+
"data-slot": "splitter-resize-trigger-indicator",
|
|
44
|
+
className: cn('pointer-events-none absolute start-1/2 top-1/2 z-2 box-border h-control-xs w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full border border-border bg-background shadow-sm transition-[background-color,border-color,box-shadow,transform] duration-200 ease-in-out group-hover/trigger:border-muted-foreground/40 group-hover/trigger:shadow-md group-focus-visible/trigger:outline-2 group-focus-visible/trigger:outline-offset-1 group-focus-visible/trigger:outline-ring data-disabled:invisible data-dragging:scale-[1.08] data-dragging:bg-background data-dragging:shadow-md data-[orientation=vertical]:h-1.5 data-[orientation=vertical]:w-control-xs', className),
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
const Splitter_SplitterResizeTrigger = /*#__PURE__*/ forwardRef(function({ asChild, children, className, ...props }, ref) {
|
|
49
|
+
return /*#__PURE__*/ jsx(Splitter.ResizeTrigger, {
|
|
50
|
+
ref: ref,
|
|
51
|
+
asChild: asChild,
|
|
52
|
+
"data-slot": "splitter-resize-trigger",
|
|
53
|
+
className: cn("group/trigger relative z-1 box-border flex w-px min-w-px cursor-col-resize appearance-none items-center justify-center border-0 bg-transparent p-0 outline-0 transition-opacity duration-200 ease-in-out before:absolute before:h-full before:w-[0.5px] before:rounded-full before:bg-border before:transition-[background-color] before:duration-200 before:ease-in-out before:content-[''] after:absolute after:z-1 after:h-full after:w-2.5 after:content-[''] data-disabled:cursor-default data-disabled:opacity-50 data-dragging:before:bg-muted-foreground/40 data-[orientation=vertical]:h-px data-[orientation=vertical]:min-h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:min-w-0 data-[orientation=vertical]:cursor-row-resize data-[orientation=vertical]:before:h-[0.5px] data-[orientation=vertical]:before:w-full data-[orientation=vertical]:after:h-2.5 data-[orientation=vertical]:after:w-full [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:before:bg-muted-foreground/40", className),
|
|
54
|
+
...props,
|
|
55
|
+
children: void 0 !== children || asChild ? children : /*#__PURE__*/ jsx(Splitter_SplitterResizeTriggerIndicator, {})
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
const Splitter_Splitter = Object.assign(Splitter_SplitterRoot, {
|
|
59
|
+
Root: Splitter_SplitterRoot,
|
|
60
|
+
RootProvider: Splitter_SplitterRootProvider,
|
|
61
|
+
Context: Splitter.Context,
|
|
62
|
+
Panel: Splitter_SplitterPanel,
|
|
63
|
+
ResizeTrigger: Splitter_SplitterResizeTrigger,
|
|
64
|
+
ResizeTriggerIndicator: Splitter_SplitterResizeTriggerIndicator
|
|
65
|
+
});
|
|
66
|
+
export { Splitter_Splitter as Splitter, createSplitterRegistry, useSplitter, useSplitterContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createSplitterRegistry, Splitter, type SplitterPanelData, useSplitter, useSplitterContext, } from './Splitter.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Splitter, createSplitterRegistry, useSplitter, useSplitterContext } from "./Splitter.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
type StackDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
3
|
+
declare const Stack: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
4
|
+
direction?: StackDirection | {
|
|
5
|
+
mobile?: StackDirection;
|
|
6
|
+
desktop?: StackDirection;
|
|
7
|
+
};
|
|
8
|
+
gap?: number | string;
|
|
9
|
+
align?: CSSProperties['alignItems'];
|
|
10
|
+
justify?: CSSProperties['justifyContent'];
|
|
11
|
+
wrap?: CSSProperties['flexWrap'];
|
|
12
|
+
fill?: boolean;
|
|
13
|
+
} & import("react").RefAttributes<HTMLElement>> & {
|
|
14
|
+
Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
15
|
+
direction?: StackDirection | {
|
|
16
|
+
mobile?: StackDirection;
|
|
17
|
+
desktop?: StackDirection;
|
|
18
|
+
};
|
|
19
|
+
gap?: number | string;
|
|
20
|
+
align?: CSSProperties['alignItems'];
|
|
21
|
+
justify?: CSSProperties['justifyContent'];
|
|
22
|
+
wrap?: CSSProperties['flexWrap'];
|
|
23
|
+
fill?: boolean;
|
|
24
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
25
|
+
};
|
|
26
|
+
export { Stack };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ark } from "@ark-ui/react/factory";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { cn } from "../../internal/cn.js";
|
|
6
|
+
const stackVariants = cva('flex', {
|
|
7
|
+
variants: {
|
|
8
|
+
mobileDirection: {
|
|
9
|
+
row: 'flex-row',
|
|
10
|
+
'row-reverse': 'flex-row-reverse',
|
|
11
|
+
column: 'flex-col',
|
|
12
|
+
'column-reverse': 'flex-col-reverse'
|
|
13
|
+
},
|
|
14
|
+
desktopDirection: {
|
|
15
|
+
row: 'sm:flex-row',
|
|
16
|
+
'row-reverse': 'sm:flex-row-reverse',
|
|
17
|
+
column: 'sm:flex-col',
|
|
18
|
+
'column-reverse': 'sm:flex-col-reverse'
|
|
19
|
+
},
|
|
20
|
+
fill: {
|
|
21
|
+
true: 'flex-1',
|
|
22
|
+
false: ''
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
mobileDirection: 'column'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const Stack_StackRoot = /*#__PURE__*/ forwardRef(function({ asChild, children, className, style, direction, gap, align, justify, wrap, fill, ...props }, ref) {
|
|
30
|
+
const mobileDirection = 'string' == typeof direction ? direction : direction?.mobile ?? direction?.desktop;
|
|
31
|
+
const desktopDirection = 'string' == typeof direction ? direction : direction?.desktop ?? direction?.mobile;
|
|
32
|
+
return /*#__PURE__*/ jsx(ark.div, {
|
|
33
|
+
...props,
|
|
34
|
+
ref: ref,
|
|
35
|
+
asChild: asChild,
|
|
36
|
+
"data-scope": "stack",
|
|
37
|
+
"data-part": "root",
|
|
38
|
+
"data-slot": "stack-root",
|
|
39
|
+
className: cn(stackVariants({
|
|
40
|
+
mobileDirection,
|
|
41
|
+
desktopDirection,
|
|
42
|
+
fill
|
|
43
|
+
}), className),
|
|
44
|
+
style: {
|
|
45
|
+
gap,
|
|
46
|
+
alignItems: align,
|
|
47
|
+
justifyContent: justify,
|
|
48
|
+
flexWrap: wrap,
|
|
49
|
+
...style
|
|
50
|
+
},
|
|
51
|
+
children: children
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
const Stack = Object.assign(Stack_StackRoot, {
|
|
55
|
+
Root: Stack_StackRoot
|
|
56
|
+
});
|
|
57
|
+
export { Stack };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stack } from './Stack.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stack } from "./Stack.js";
|