@moduix/react 1.1.1 → 2.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/README.md +16 -16
- package/dist/components/accordion/Accordion.css +8 -1
- package/dist/components/accordion/Accordion.d.ts +3 -2
- package/dist/components/accordion/Accordion.js +17 -5
- package/dist/components/accordion/Accordion.module.js +1 -0
- package/dist/components/accordion/index.d.ts +2 -2
- package/dist/components/alert/Alert.css +19 -5
- package/dist/components/alert/Alert.d.ts +5 -3
- package/dist/components/alert/Alert.js +17 -5
- package/dist/components/alert/Alert.module.js +1 -0
- package/dist/components/angle-slider/AngleSlider.d.ts +18 -2
- package/dist/components/angle-slider/AngleSlider.js +34 -18
- package/dist/components/angle-slider/index.d.ts +2 -2
- package/dist/components/aspect-ratio/AspectRatio.css +3 -1
- package/dist/components/aspect-ratio/AspectRatio.js +2 -2
- package/dist/components/avatar/Avatar.d.ts +6 -3
- package/dist/components/avatar/Avatar.js +12 -5
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/badge/Badge.css +44 -1
- package/dist/components/badge/Badge.d.ts +2 -2
- package/dist/components/badge/Badge.js +1 -1
- package/dist/components/bleed/Bleed.d.ts +6 -4
- package/dist/components/bleed/Bleed.js +3 -3
- package/dist/components/breadcrumbs/Breadcrumbs.css +7 -1
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +18 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js +18 -4
- package/dist/components/breadcrumbs/Breadcrumbs.module.js +2 -1
- package/dist/components/breadcrumbs/index.d.ts +2 -0
- package/dist/components/button/Button.css +21 -1
- package/dist/components/button/Button.d.ts +6 -0
- package/dist/components/button/Button.js +12 -7
- package/dist/components/card/Card.css +20 -4
- package/dist/components/card/Card.d.ts +1 -0
- package/dist/components/card/Card.js +12 -1
- package/dist/components/card/Card.module.js +1 -0
- package/dist/components/carousel/Carousel.css +2 -0
- package/dist/components/carousel/Carousel.d.ts +4 -0
- package/dist/components/carousel/Carousel.js +15 -2
- package/dist/components/checkbox/Checkbox.d.ts +2 -3
- package/dist/components/checkbox/Checkbox.js +25 -22
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/clipboard/Clipboard.css +1 -1
- package/dist/components/clipboard/Clipboard.d.ts +2 -0
- package/dist/components/clipboard/Clipboard.js +15 -4
- package/dist/components/close-button/CloseButton.d.ts +12 -2
- package/dist/components/close-button/CloseButton.js +9 -9
- package/dist/components/collapsible/Collapsible.css +9 -2
- package/dist/components/collapsible/Collapsible.d.ts +3 -2
- package/dist/components/collapsible/Collapsible.js +18 -6
- package/dist/components/collapsible/Collapsible.module.js +1 -0
- package/dist/components/collapsible/index.d.ts +2 -2
- package/dist/components/color-picker/ColorPicker.css +35 -6
- package/dist/components/color-picker/ColorPicker.d.ts +3 -3
- package/dist/components/color-picker/ColorPicker.js +78 -27
- package/dist/components/color-picker/ColorPicker.module.js +1 -0
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/combobox/Combobox.css +37 -8
- package/dist/components/combobox/Combobox.d.ts +9 -2
- package/dist/components/combobox/Combobox.js +34 -8
- package/dist/components/combobox/index.d.ts +2 -2
- package/dist/components/command-palette/CommandPalette.css +40 -74
- package/dist/components/command-palette/CommandPalette.d.ts +13 -3
- package/dist/components/command-palette/CommandPalette.js +54 -43
- package/dist/components/command-palette/CommandPalette.module.js +0 -2
- package/dist/components/container/Container.js +1 -1
- package/dist/components/date-input/DateInput.css +3 -1
- package/dist/components/date-input/DateInput.d.ts +12 -7
- package/dist/components/date-input/DateInput.js +35 -14
- package/dist/components/date-input/index.d.ts +2 -2
- package/dist/components/date-picker/DatePicker.css +41 -13
- package/dist/components/date-picker/DatePicker.d.ts +30 -2
- package/dist/components/date-picker/DatePicker.js +94 -9
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/dialog/Dialog.css +14 -10
- package/dist/components/dialog/Dialog.d.ts +2 -2
- package/dist/components/dialog/Dialog.js +3 -3
- package/dist/components/dialog/index.d.ts +2 -2
- package/dist/components/drawer/Drawer.d.ts +2 -2
- package/dist/components/drawer/Drawer.js +3 -3
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/editable/Editable.d.ts +9 -2
- package/dist/components/editable/Editable.js +14 -5
- package/dist/components/editable/index.d.ts +2 -2
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/field/Field.css +0 -4
- package/dist/components/field/Field.d.ts +3 -2
- package/dist/components/field/Field.js +6 -5
- package/dist/components/field/Field.module.js +0 -1
- package/dist/components/field/index.d.ts +2 -2
- package/dist/components/fieldset/Fieldset.d.ts +2 -2
- package/dist/components/fieldset/Fieldset.js +3 -3
- package/dist/components/fieldset/index.d.ts +2 -2
- package/dist/components/file-upload/FileUpload.css +81 -8
- package/dist/components/file-upload/FileUpload.d.ts +22 -5
- package/dist/components/file-upload/FileUpload.js +79 -21
- package/dist/components/file-upload/FileUpload.module.js +3 -0
- package/dist/components/file-upload/index.d.ts +2 -2
- package/dist/components/floating-panel/FloatingPanel.css +14 -10
- package/dist/components/floating-panel/FloatingPanel.d.ts +11 -3
- package/dist/components/floating-panel/FloatingPanel.js +15 -9
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/highlight/Highlight.js +1 -1
- package/dist/components/hover-card/HoverCard.css +14 -10
- package/dist/components/hover-card/HoverCard.d.ts +3 -2
- package/dist/components/hover-card/HoverCard.js +5 -4
- package/dist/components/hover-card/index.d.ts +2 -2
- package/dist/components/image/Image.css +7 -0
- package/dist/components/image/Image.d.ts +12 -0
- package/dist/components/image/Image.js +28 -0
- package/dist/components/image/Image.module.js +5 -0
- package/dist/components/image/index.d.ts +2 -0
- package/dist/components/image-cropper/ImageCropper.d.ts +7 -2
- package/dist/components/image-cropper/ImageCropper.js +25 -3
- package/dist/components/image-cropper/index.d.ts +2 -2
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input-group/InputGroup.d.ts +3 -0
- package/dist/components/input-group/InputGroup.js +1 -1
- package/dist/components/kbd/Kbd.js +1 -1
- package/dist/components/lightbox/Lightbox.css +12 -10
- package/dist/components/lightbox/Lightbox.d.ts +4 -2
- package/dist/components/lightbox/Lightbox.js +9 -7
- package/dist/components/lightbox/index.d.ts +2 -2
- package/dist/components/list/List.js +1 -1
- package/dist/components/listbox/Listbox.css +60 -1
- package/dist/components/listbox/Listbox.d.ts +14 -2
- package/dist/components/listbox/Listbox.js +41 -5
- package/dist/components/listbox/Listbox.module.js +3 -0
- package/dist/components/listbox/index.d.ts +2 -2
- package/dist/components/marquee/Marquee.d.ts +2 -1
- package/dist/components/marquee/Marquee.js +4 -3
- package/dist/components/marquee/index.d.ts +2 -2
- package/dist/components/menu/Menu.css +14 -8
- package/dist/components/menu/Menu.d.ts +3 -2
- package/dist/components/menu/Menu.js +6 -5
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/native-select/NativeSelect.d.ts +6 -2
- package/dist/components/native-select/NativeSelect.js +5 -4
- package/dist/components/number-input/NumberInput.css +0 -6
- package/dist/components/number-input/NumberInput.d.ts +7 -2
- package/dist/components/number-input/NumberInput.js +17 -4
- package/dist/components/number-input/index.d.ts +2 -2
- package/dist/components/pagination/Pagination.d.ts +4 -0
- package/dist/components/pagination/Pagination.js +13 -4
- package/dist/components/password-input/PasswordInput.d.ts +4 -0
- package/dist/components/password-input/PasswordInput.js +10 -2
- package/dist/components/pin-input/PinInput.d.ts +6 -1
- package/dist/components/pin-input/PinInput.js +25 -16
- package/dist/components/popover/Popover.css +20 -11
- package/dist/components/popover/Popover.js +1 -1
- package/dist/components/progress-circular/ProgressCircular.d.ts +6 -0
- package/dist/components/progress-circular/ProgressCircular.js +14 -3
- package/dist/components/progress-linear/ProgressLinear.d.ts +3 -0
- package/dist/components/progress-linear/ProgressLinear.js +6 -3
- package/dist/components/qr-code/QrCode.css +3 -2
- package/dist/components/qr-code/QrCode.d.ts +2 -2
- package/dist/components/qr-code/QrCode.js +3 -3
- package/dist/components/qr-code/index.d.ts +2 -2
- package/dist/components/radio-group/RadioGroup.d.ts +8 -4
- package/dist/components/radio-group/RadioGroup.js +22 -14
- package/dist/components/radio-group/index.d.ts +2 -2
- package/dist/components/rating-group/RatingGroup.css +3 -3
- package/dist/components/rating-group/RatingGroup.d.ts +11 -4
- package/dist/components/rating-group/RatingGroup.js +29 -18
- package/dist/components/rating-group/index.d.ts +2 -2
- package/dist/components/scroll-area/ScrollArea.css +7 -2
- package/dist/components/scroll-area/ScrollArea.d.ts +3 -0
- package/dist/components/scroll-area/ScrollArea.js +9 -6
- package/dist/components/segment-group/SegmentGroup.d.ts +13 -3
- package/dist/components/segment-group/SegmentGroup.js +23 -15
- package/dist/components/segment-group/index.d.ts +2 -2
- package/dist/components/select/Select.css +24 -15
- package/dist/components/select/Select.d.ts +18 -4
- package/dist/components/select/Select.js +65 -20
- package/dist/components/separator/Separator.js +1 -1
- package/dist/components/sidebar/Sidebar.css +144 -4
- package/dist/components/sidebar/Sidebar.d.ts +26 -0
- package/dist/components/sidebar/Sidebar.js +105 -13
- package/dist/components/sidebar/Sidebar.module.js +6 -0
- package/dist/components/signature-pad/SignaturePad.css +12 -41
- package/dist/components/signature-pad/SignaturePad.d.ts +14 -6
- package/dist/components/signature-pad/SignaturePad.js +56 -17
- package/dist/components/signature-pad/index.d.ts +2 -2
- package/dist/components/simple-grid/SimpleGrid.js +3 -3
- package/dist/components/skeleton/Skeleton.js +1 -1
- package/dist/components/slider/Slider.css +6 -4
- package/dist/components/slider/Slider.d.ts +12 -3
- package/dist/components/slider/Slider.js +24 -15
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/spinner/Spinner.js +2 -2
- package/dist/components/split-button/SplitButton.d.ts +1 -1
- package/dist/components/split-button/SplitButton.js +3 -4
- package/dist/components/splitter/Splitter.css +13 -12
- package/dist/components/splitter/Splitter.d.ts +2 -2
- package/dist/components/splitter/Splitter.js +12 -11
- package/dist/components/splitter/index.d.ts +2 -2
- package/dist/components/stack/Stack.d.ts +1 -3
- package/dist/components/stack/Stack.js +4 -6
- package/dist/components/steps/Steps.d.ts +2 -1
- package/dist/components/steps/Steps.js +5 -4
- package/dist/components/swap/Swap.css +45 -0
- package/dist/components/swap/Swap.d.ts +11 -0
- package/dist/components/swap/Swap.js +39 -0
- package/dist/components/swap/Swap.module.js +11 -0
- package/dist/components/swap/index.d.ts +2 -0
- package/dist/components/switch/Switch.css +2 -2
- package/dist/components/switch/Switch.d.ts +4 -4
- package/dist/components/switch/Switch.js +19 -16
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/table/Table.css +3 -3
- package/dist/components/table/Table.js +3 -2
- package/dist/components/table/Table.module.js +0 -1
- package/dist/components/tabs/Tabs.css +3 -1
- package/dist/components/tabs/Tabs.d.ts +3 -2
- package/dist/components/tabs/Tabs.js +5 -4
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tag/Tag.css +12 -42
- package/dist/components/tag/Tag.js +7 -20
- package/dist/components/tags-input/TagsInput.css +3 -40
- package/dist/components/tags-input/TagsInput.d.ts +7 -4
- package/dist/components/tags-input/TagsInput.js +33 -21
- package/dist/components/tags-input/index.d.ts +2 -2
- package/dist/components/text/Text.d.ts +2 -2
- package/dist/components/text/Text.js +1 -1
- package/dist/components/textarea/Textarea.js +1 -1
- package/dist/components/timer/Timer.d.ts +14 -2
- package/dist/components/timer/Timer.js +13 -5
- package/dist/components/timer/index.d.ts +2 -2
- package/dist/components/toast/Toast.d.ts +3 -1
- package/dist/components/toast/Toast.js +11 -2
- package/dist/components/toggle/Toggle.css +3 -3
- package/dist/components/toggle/Toggle.d.ts +3 -2
- package/dist/components/toggle/Toggle.js +5 -4
- package/dist/components/toggle/index.d.ts +2 -2
- package/dist/components/toggle-group/ToggleGroup.d.ts +3 -2
- package/dist/components/toggle-group/ToggleGroup.js +4 -3
- package/dist/components/toggle-group/index.d.ts +2 -2
- package/dist/components/tooltip/Tooltip.css +14 -10
- package/dist/components/tooltip/Tooltip.d.ts +3 -2
- package/dist/components/tooltip/Tooltip.js +10 -3
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tour/Tour.css +23 -18
- package/dist/components/tour/Tour.d.ts +6 -0
- package/dist/components/tour/Tour.js +8 -1
- package/dist/components/tree-view/TreeView.css +1 -1
- package/dist/components/tree-view/TreeView.d.ts +2 -2
- package/dist/components/tree-view/TreeView.js +4 -4
- package/dist/components/tree-view/index.d.ts +2 -2
- package/dist/index.d.ts +40 -39
- package/dist/index.js +40 -39
- package/dist/lib/moduix/icons/ui/Icons.d.ts +1 -45
- package/dist/lib/moduix/icons/ui/Icons.js +36 -263
- package/dist/lib/moduix/icons/ui/index.d.ts +2 -2
- package/dist/lib/moduix/overlayPortal.js +1 -1
- package/package.json +4 -3
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
2
|
import Stack_module_default from "./Stack.module.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { ark } from "@ark-ui/react/factory";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
|
-
import {
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/stack/Stack.tsx
|
|
8
|
-
const StackRoot = forwardRef(function StackRoot({ asChild, children, className, style, direction, gap, align, justify, wrap, fill,
|
|
8
|
+
const StackRoot = forwardRef(function StackRoot({ asChild, children, className, style, direction, gap, align, justify, wrap, fill, ...props }, ref) {
|
|
9
9
|
const mobileDirection = typeof direction === "string" ? direction : direction?.mobile ?? direction?.desktop;
|
|
10
10
|
const desktopDirection = typeof direction === "string" ? direction : direction?.desktop ?? direction?.mobile;
|
|
11
|
-
const childArray = separator == null ? void 0 : Children.toArray(children);
|
|
12
|
-
const content = childArray == null ? children : childArray.map((child, index) => /* @__PURE__ */ jsxs(Fragment$1, { children: [index > 0 ? separator : null, child] }, index));
|
|
13
11
|
return /* @__PURE__ */ jsx(ark.div, {
|
|
14
12
|
...props,
|
|
15
13
|
ref,
|
|
@@ -28,7 +26,7 @@ const StackRoot = forwardRef(function StackRoot({ asChild, children, className,
|
|
|
28
26
|
flexWrap: wrap,
|
|
29
27
|
...style
|
|
30
28
|
},
|
|
31
|
-
children
|
|
29
|
+
children
|
|
32
30
|
});
|
|
33
31
|
});
|
|
34
32
|
const Stack = Object.assign(StackRoot, { Root: StackRoot });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Steps } from "@ark-ui/react/steps";
|
|
1
|
+
import { Steps, useSteps } from "@ark-ui/react/steps";
|
|
2
2
|
|
|
3
3
|
//#region src/components/steps/Steps.d.ts
|
|
4
4
|
declare const Steps$1: import("react").ForwardRefExoticComponent<Omit<Steps.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
@@ -14,6 +14,7 @@ declare const Steps$1: import("react").ForwardRefExoticComponent<Omit<Steps.Root
|
|
|
14
14
|
PrevTrigger: import("react").ForwardRefExoticComponent<Omit<Steps.PrevTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
15
|
NextTrigger: import("react").ForwardRefExoticComponent<Omit<Steps.NextTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
16
16
|
Progress: import("react").ForwardRefExoticComponent<Omit<Steps.ProgressProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
useSteps: typeof useSteps;
|
|
17
18
|
};
|
|
18
19
|
//#endregion
|
|
19
20
|
export { Steps$1 as Steps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CheckIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
2
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import { CheckIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
3
3
|
import Steps_module_default from "./Steps.module.js";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
5
|
import { forwardRef } from "react";
|
|
7
|
-
import {
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Steps, useSteps, useStepsItemContext } from "@ark-ui/react/steps";
|
|
8
8
|
//#region src/components/steps/Steps.tsx
|
|
9
9
|
const StepsRoot = forwardRef(function StepsRoot({ className, ...props }, ref) {
|
|
10
10
|
return /* @__PURE__ */ jsx(Steps.Root, {
|
|
@@ -116,7 +116,8 @@ const Steps$1 = Object.assign(StepsRoot, {
|
|
|
116
116
|
CompletedContent: StepsCompletedContent,
|
|
117
117
|
PrevTrigger: StepsPrevTrigger,
|
|
118
118
|
NextTrigger: StepsNextTrigger,
|
|
119
|
-
Progress: StepsProgress
|
|
119
|
+
Progress: StepsProgress,
|
|
120
|
+
useSteps
|
|
120
121
|
});
|
|
121
122
|
//#endregion
|
|
122
123
|
export { Steps$1 as Steps };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@layer ui.components {
|
|
2
|
+
.jqWswG_root {
|
|
3
|
+
vertical-align: middle;
|
|
4
|
+
grid-template-areas: "jqWswG_swap";
|
|
5
|
+
place-items: center;
|
|
6
|
+
display: inline-grid;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.jqWswG_indicator {
|
|
10
|
+
color: inherit;
|
|
11
|
+
grid-area: jqWswG_swap;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
|
|
16
|
+
&[data-state="open"] {
|
|
17
|
+
animation: jqWswG_swap-enter var(--swap-transition, var(--transition-default));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&[data-state="closed"] {
|
|
21
|
+
animation: jqWswG_swap-exit var(--swap-transition, var(--transition-default));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (prefers-reduced-motion: reduce) {
|
|
26
|
+
.jqWswG_indicator[data-state] {
|
|
27
|
+
animation-duration: 1ms;
|
|
28
|
+
animation-delay: 0s;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes jqWswG_swap-enter {
|
|
33
|
+
from {
|
|
34
|
+
opacity: var(--swap-enter-starting-opacity, 0);
|
|
35
|
+
transform: scale(var(--swap-enter-starting-scale, .92));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@keyframes jqWswG_swap-exit {
|
|
40
|
+
to {
|
|
41
|
+
opacity: var(--swap-exit-ending-opacity, 0);
|
|
42
|
+
transform: scale(var(--swap-exit-ending-scale, .92));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Swap, useSwapContext } from "@ark-ui/react/swap";
|
|
2
|
+
|
|
3
|
+
//#region src/components/swap/Swap.d.ts
|
|
4
|
+
declare const Swap$1: import("react").ForwardRefExoticComponent<Omit<Swap.RootProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>> & {
|
|
5
|
+
Root: import("react").ForwardRefExoticComponent<Omit<Swap.RootProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
RootProvider: import("react").ForwardRefExoticComponent<Omit<Swap.RootProviderProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
7
|
+
Indicator: import("react").ForwardRefExoticComponent<Omit<Swap.IndicatorProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
useSwap: (props?: import("@ark-ui/react/swap").UseSwapProps) => import("@ark-ui/react/swap").UseSwapReturn;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Swap$1 as Swap, useSwapContext };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import Swap_module_default from "./Swap.module.js";
|
|
3
|
+
import { clsx } from "clsx";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Swap, useSwap, useSwapContext } from "@ark-ui/react/swap";
|
|
7
|
+
//#region src/components/swap/Swap.tsx
|
|
8
|
+
const SwapRoot = forwardRef(function SwapRoot({ className, ...props }, ref) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Swap.Root, {
|
|
10
|
+
ref,
|
|
11
|
+
"data-slot": "swap-root",
|
|
12
|
+
className: clsx(Swap_module_default.root, normalizeClassName(className)),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
const SwapRootProvider = forwardRef(function SwapRootProvider({ className, ...props }, ref) {
|
|
17
|
+
return /* @__PURE__ */ jsx(Swap.RootProvider, {
|
|
18
|
+
ref,
|
|
19
|
+
"data-slot": "swap-root-provider",
|
|
20
|
+
className: clsx(Swap_module_default.root, normalizeClassName(className)),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
const SwapIndicator = forwardRef(function SwapIndicator({ className, ...props }, ref) {
|
|
25
|
+
return /* @__PURE__ */ jsx(Swap.Indicator, {
|
|
26
|
+
ref,
|
|
27
|
+
"data-slot": "swap-indicator",
|
|
28
|
+
className: clsx(Swap_module_default.indicator, normalizeClassName(className)),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
const Swap$1 = Object.assign(SwapRoot, {
|
|
33
|
+
Root: SwapRoot,
|
|
34
|
+
RootProvider: SwapRootProvider,
|
|
35
|
+
Indicator: SwapIndicator,
|
|
36
|
+
useSwap
|
|
37
|
+
});
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Swap$1 as Swap, useSwapContext };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './Swap.css';
|
|
2
|
+
//#region src/components/swap/Swap.module.css
|
|
3
|
+
var Swap_module_default = {
|
|
4
|
+
"indicator": "jqWswG_indicator",
|
|
5
|
+
"root": "jqWswG_root",
|
|
6
|
+
"swap": "jqWswG_swap",
|
|
7
|
+
"swap-enter": "jqWswG_swap-enter",
|
|
8
|
+
"swap-exit": "jqWswG_swap-exit"
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Swap_module_default as default };
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
@media (hover: hover) {
|
|
54
|
-
&[data-state="unchecked"][data-hover]:not([data-readonly]) {
|
|
54
|
+
&[data-state="unchecked"][data-hover]:not([data-readonly], [data-disabled]) {
|
|
55
55
|
background-color: var(--switch-bg-hover, var(--color-accent));
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
&[data-state="checked"][data-hover]:not([data-readonly]) {
|
|
58
|
+
&[data-state="checked"][data-hover]:not([data-readonly], [data-disabled]) {
|
|
59
59
|
background-color: var(--switch-bg-checked-hover, var(--switch-bg-checked, var(--color-primary)));
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
2
|
-
import { Switch } from "@ark-ui/react/switch";
|
|
1
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import { Switch, useSwitch, useSwitchContext } from "@ark-ui/react/switch";
|
|
3
3
|
|
|
4
4
|
//#region src/components/switch/Switch.d.ts
|
|
5
5
|
type SwitchSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -15,7 +15,7 @@ declare const Switch$1: import("react").ForwardRefExoticComponent<Omit<SwitchRoo
|
|
|
15
15
|
Control: import("react").ForwardRefExoticComponent<Omit<Switch.ControlProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
16
16
|
Thumb: import("react").ForwardRefExoticComponent<Omit<Switch.ThumbProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
17
17
|
Label: import("react").ForwardRefExoticComponent<Omit<Switch.LabelProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
18
|
-
|
|
18
|
+
Context: (props: Switch.ContextProps) => ReactNode;
|
|
19
19
|
};
|
|
20
20
|
//#endregion
|
|
21
|
-
export { Switch$1 as Switch, type SwitchRootProps, type SwitchRootProviderProps, type SwitchSize };
|
|
21
|
+
export { Switch$1 as Switch, type SwitchRootProps, type SwitchRootProviderProps, type SwitchSize, useSwitch, useSwitchContext };
|
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
2
|
import Switch_module_default from "./Switch.module.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import {
|
|
4
|
+
import { Children, cloneElement, forwardRef } from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Switch, SwitchContext, useSwitch, useSwitchContext } from "@ark-ui/react/switch";
|
|
7
7
|
//#region src/components/switch/Switch.tsx
|
|
8
|
-
const SwitchRoot = forwardRef(function SwitchRoot({ className, size = "md", ...props }, ref) {
|
|
8
|
+
const SwitchRoot = forwardRef(function SwitchRoot({ asChild, children, className, size = "md", ...props }, ref) {
|
|
9
9
|
return /* @__PURE__ */ jsx(Switch.Root, {
|
|
10
10
|
ref,
|
|
11
|
+
asChild,
|
|
11
12
|
"data-slot": "switch-root",
|
|
12
13
|
"data-size": size,
|
|
13
14
|
className: clsx(Switch_module_default.root, normalizeClassName(className)),
|
|
14
|
-
...props
|
|
15
|
+
...props,
|
|
16
|
+
children: withHiddenInput(children, asChild)
|
|
15
17
|
});
|
|
16
18
|
});
|
|
17
|
-
const SwitchRootProvider = forwardRef(function SwitchRootProvider({ className, size = "md", ...props }, ref) {
|
|
19
|
+
const SwitchRootProvider = forwardRef(function SwitchRootProvider({ asChild, children, className, size = "md", ...props }, ref) {
|
|
18
20
|
return /* @__PURE__ */ jsx(Switch.RootProvider, {
|
|
19
21
|
ref,
|
|
22
|
+
asChild,
|
|
20
23
|
"data-slot": "switch-root-provider",
|
|
21
24
|
"data-size": size,
|
|
22
25
|
className: clsx(Switch_module_default.root, normalizeClassName(className)),
|
|
23
|
-
...props
|
|
26
|
+
...props,
|
|
27
|
+
children: withHiddenInput(children, asChild)
|
|
24
28
|
});
|
|
25
29
|
});
|
|
26
30
|
const SwitchControl = forwardRef(function SwitchControl({ className, children, ...props }, ref) {
|
|
@@ -48,20 +52,19 @@ const SwitchLabel = forwardRef(function SwitchLabel({ className, ...props }, ref
|
|
|
48
52
|
...props
|
|
49
53
|
});
|
|
50
54
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
});
|
|
55
|
+
function withHiddenInput(children, asChild) {
|
|
56
|
+
const hiddenInput = /* @__PURE__ */ jsx(Switch.HiddenInput, { "data-slot": "switch-hidden-input" });
|
|
57
|
+
if (!asChild) return /* @__PURE__ */ jsxs(Fragment$1, { children: [children, hiddenInput] });
|
|
58
|
+
const child = Children.only(children);
|
|
59
|
+
return cloneElement(child, {}, child.props.children, hiddenInput);
|
|
60
|
+
}
|
|
58
61
|
const Switch$1 = Object.assign(SwitchRoot, {
|
|
59
62
|
Root: SwitchRoot,
|
|
60
63
|
RootProvider: SwitchRootProvider,
|
|
61
64
|
Control: SwitchControl,
|
|
62
65
|
Thumb: SwitchThumb,
|
|
63
66
|
Label: SwitchLabel,
|
|
64
|
-
|
|
67
|
+
Context: SwitchContext
|
|
65
68
|
});
|
|
66
69
|
//#endregion
|
|
67
|
-
export { Switch$1 as Switch };
|
|
70
|
+
export { Switch$1 as Switch, useSwitch, useSwitchContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Switch, SwitchRootProps, SwitchRootProviderProps, SwitchSize } from "./Switch.js";
|
|
2
|
-
export { Switch, type SwitchRootProps, type SwitchRootProviderProps, type SwitchSize };
|
|
1
|
+
import { Switch, SwitchRootProps, SwitchRootProviderProps, SwitchSize, useSwitch, useSwitchContext } from "./Switch.js";
|
|
2
|
+
export { Switch, type SwitchRootProps, type SwitchRootProviderProps, type SwitchSize, useSwitch, useSwitchContext };
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
var(--table-border-color, var(--color-border));
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.-X2Dga_root[data-striped] .-X2Dga_body .-X2Dga_row:nth-child(2n):not(
|
|
82
|
+
.-X2Dga_root[data-striped] .-X2Dga_body .-X2Dga_row:nth-child(2n):not([data-empty]) {
|
|
83
83
|
background-color: var(--table-row-bg-striped, color-mix(in oklab, var(--color-muted) 35%, transparent));
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
.-X2Dga_root[data-interactive] .-X2Dga_body .-X2Dga_row:not(
|
|
86
|
+
.-X2Dga_root[data-interactive] .-X2Dga_body .-X2Dga_row:not([data-empty]):hover {
|
|
87
87
|
background-color: var(--table-row-bg-hover, var(--color-muted));
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
.-X2Dga_numeric {
|
|
152
|
-
text-align:
|
|
152
|
+
text-align: end;
|
|
153
153
|
white-space: nowrap;
|
|
154
154
|
font-variant-numeric: tabular-nums;
|
|
155
155
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
2
|
import Table_module_default from "./Table.module.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { ark } from "@ark-ui/react/factory";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
5
|
import { forwardRef } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/table/Table.tsx
|
|
8
8
|
const TableRoot = forwardRef(function TableRoot({ asChild, className, interactive = false, showColumnBorder = false, size = "md", stickyHeader = false, striped = false, variant = "line", ...props }, ref) {
|
|
9
9
|
return /* @__PURE__ */ jsx(ark.table, {
|
|
@@ -140,8 +140,9 @@ const TableEmpty = forwardRef(function TableEmpty({ asChild, children = "No resu
|
|
|
140
140
|
return /* @__PURE__ */ jsx(ark.tr, {
|
|
141
141
|
"data-scope": "table",
|
|
142
142
|
"data-part": "row",
|
|
143
|
+
"data-empty": true,
|
|
143
144
|
"data-slot": "table-row",
|
|
144
|
-
className:
|
|
145
|
+
className: Table_module_default.row,
|
|
145
146
|
children: /* @__PURE__ */ jsx(ark.td, {
|
|
146
147
|
ref,
|
|
147
148
|
asChild,
|
|
@@ -115,6 +115,8 @@
|
|
|
115
115
|
|
|
116
116
|
.ostTjG_indicator {
|
|
117
117
|
z-index: 0;
|
|
118
|
+
top: 50%;
|
|
119
|
+
left: var(--left, 0);
|
|
118
120
|
width: var(--width, 0);
|
|
119
121
|
height: var(--tabs-indicator-size, 2rem);
|
|
120
122
|
border-radius: var(--tabs-indicator-radius, var(--radius-md));
|
|
@@ -125,7 +127,6 @@
|
|
|
125
127
|
top var(--tabs-indicator-transition, var(--transition-default)),
|
|
126
128
|
left var(--tabs-indicator-transition, var(--transition-default));
|
|
127
129
|
position: absolute;
|
|
128
|
-
top: 50%;
|
|
129
130
|
translate: 0 -50%;
|
|
130
131
|
|
|
131
132
|
.ostTjG_root[data-variant="line"] & {
|
|
@@ -143,6 +144,7 @@
|
|
|
143
144
|
}
|
|
144
145
|
|
|
145
146
|
&[data-orientation="vertical"] {
|
|
147
|
+
top: var(--top, 0);
|
|
146
148
|
width: calc(100% - (var(--tabs-list-padding-x, var(--tabs-list-padding, .25rem)) * 2));
|
|
147
149
|
height: var(--height, 0);
|
|
148
150
|
left: 50%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tabs } from "@ark-ui/react/tabs";
|
|
1
|
+
import { Tabs, useTabs } from "@ark-ui/react/tabs";
|
|
2
2
|
|
|
3
3
|
//#region src/components/tabs/Tabs.d.ts
|
|
4
4
|
type TabsVariant = 'default' | 'line';
|
|
@@ -15,6 +15,7 @@ declare const Tabs$1: import("react").ForwardRefExoticComponent<Omit<Tabs.RootPr
|
|
|
15
15
|
Trigger: import("react").ForwardRefExoticComponent<Omit<Tabs.TriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
16
16
|
Indicator: import("react").ForwardRefExoticComponent<Omit<Tabs.IndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
17
|
Content: import("react").ForwardRefExoticComponent<Omit<Tabs.ContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
useTabs: (props?: import("@ark-ui/react/tabs").UseTabsProps) => import("@ark-ui/react/tabs").UseTabsReturn;
|
|
18
19
|
};
|
|
19
20
|
//#endregion
|
|
20
|
-
export { Tabs$1 as Tabs };
|
|
21
|
+
export { Tabs$1 as Tabs, useTabs };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
2
|
import Tabs_module_default from "./Tabs.module.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
5
4
|
import { forwardRef } from "react";
|
|
6
|
-
import {
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Tabs, useTabs } from "@ark-ui/react/tabs";
|
|
7
7
|
//#region src/components/tabs/Tabs.tsx
|
|
8
8
|
const TabsRoot = forwardRef(function TabsRoot({ className, variant = "default", ...props }, ref) {
|
|
9
9
|
return /* @__PURE__ */ jsx(Tabs.Root, {
|
|
@@ -61,7 +61,8 @@ const Tabs$1 = Object.assign(TabsRoot, {
|
|
|
61
61
|
List: TabsList,
|
|
62
62
|
Trigger: TabsTrigger,
|
|
63
63
|
Indicator: TabsIndicator,
|
|
64
|
-
Content: TabsContent
|
|
64
|
+
Content: TabsContent,
|
|
65
|
+
useTabs
|
|
65
66
|
});
|
|
66
67
|
//#endregion
|
|
67
|
-
export { Tabs$1 as Tabs };
|
|
68
|
+
export { Tabs$1 as Tabs, useTabs };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Tabs } from "./Tabs.js";
|
|
2
|
-
export { Tabs };
|
|
1
|
+
import { Tabs, useTabs } from "./Tabs.js";
|
|
2
|
+
export { Tabs, useTabs };
|
|
@@ -82,47 +82,17 @@
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
.mVOnGG_closeTrigger {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
align-items: center;
|
|
98
|
-
padding: 0;
|
|
99
|
-
display: inline-flex;
|
|
100
|
-
|
|
101
|
-
& > svg {
|
|
102
|
-
width: var(--tag-close-trigger-icon-size, .625rem);
|
|
103
|
-
height: var(--tag-close-trigger-icon-size, .625rem);
|
|
104
|
-
pointer-events: none;
|
|
105
|
-
flex-shrink: 0;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&:hover {
|
|
109
|
-
background-color: var(--tag-close-trigger-bg-hover, color-mix(in oklab, currentColor 12%, transparent));
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&:focus-visible {
|
|
113
|
-
box-shadow: 0 0 0 var(--tag-close-trigger-focus-ring-offset, 0)
|
|
114
|
-
var(--tag-close-trigger-focus-ring-offset-color, transparent),
|
|
115
|
-
0 0 0
|
|
116
|
-
calc(var(--tag-close-trigger-focus-ring-width, var(--border-width-sm)) +
|
|
117
|
-
var(--tag-close-trigger-focus-ring-offset, 0))
|
|
118
|
-
var(--tag-close-trigger-focus-ring-color, var(--color-ring));
|
|
119
|
-
outline: none;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&[disabled], &[data-disabled] {
|
|
123
|
-
cursor: default;
|
|
124
|
-
opacity: var(--tag-disabled-opacity, var(--opacity-disabled));
|
|
125
|
-
pointer-events: none;
|
|
126
|
-
}
|
|
85
|
+
--close-button-size: var(--tag-close-trigger-size, 1rem);
|
|
86
|
+
--close-button-radius: var(--tag-close-trigger-radius, var(--radius-full));
|
|
87
|
+
--close-button-icon-size: var(--tag-close-trigger-icon-size, .625rem);
|
|
88
|
+
--close-button-bg: var(--tag-close-trigger-bg, transparent);
|
|
89
|
+
--close-button-bg-hover: var(--tag-close-trigger-bg-hover, color-mix(in oklab, currentColor 12%, transparent));
|
|
90
|
+
--close-button-color: inherit;
|
|
91
|
+
--close-button-color-hover: inherit;
|
|
92
|
+
--close-button-disabled-opacity: var(--tag-disabled-opacity, var(--opacity-disabled));
|
|
93
|
+
--close-button-focus-ring-width: var(--tag-close-trigger-focus-ring-width, var(--border-width-sm));
|
|
94
|
+
--close-button-focus-ring-color: var(--tag-close-trigger-focus-ring-color, var(--color-ring));
|
|
95
|
+
--close-button-focus-ring-offset: var(--tag-close-trigger-focus-ring-offset, 0);
|
|
96
|
+
--close-button-transition: var(--tag-transition, var(--transition-default));
|
|
127
97
|
}
|
|
128
98
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CloseIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
2
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import { CloseButton } from "../close-button/CloseButton.js";
|
|
3
3
|
import Tag_module_default from "./Tag.module.js";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { ark } from "@ark-ui/react/factory";
|
|
6
5
|
import { clsx } from "clsx";
|
|
7
6
|
import { forwardRef } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/tag/Tag.tsx
|
|
9
9
|
const DEFAULT_CLOSE_LABEL = "Remove tag";
|
|
10
10
|
const TagRoot = forwardRef(function TagRoot({ className, size = "md", variant = "default", ...props }, ref) {
|
|
@@ -49,31 +49,18 @@ const TagEndElement = forwardRef(function TagEndElement({ className, ...props },
|
|
|
49
49
|
className: clsx(Tag_module_default.endElement, normalizeClassName(className))
|
|
50
50
|
});
|
|
51
51
|
});
|
|
52
|
-
const TagCloseTrigger = forwardRef(function TagCloseTrigger({ asChild, className, children,
|
|
53
|
-
|
|
54
|
-
return /* @__PURE__ */ jsx(ark.button, {
|
|
52
|
+
const TagCloseTrigger = forwardRef(function TagCloseTrigger({ asChild, className, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }, ref) {
|
|
53
|
+
return /* @__PURE__ */ jsx(CloseButton.Root, {
|
|
55
54
|
ref,
|
|
56
55
|
asChild,
|
|
57
|
-
type: asChild ? type : type ?? "button",
|
|
58
|
-
disabled,
|
|
59
|
-
"aria-disabled": ariaDisabled,
|
|
60
|
-
"aria-label": ariaLabel ?? (!asChild && children == null && ariaLabelledBy == null ? DEFAULT_CLOSE_LABEL : void 0),
|
|
61
|
-
"aria-labelledby": ariaLabelledBy,
|
|
62
56
|
...props,
|
|
63
57
|
"data-scope": "tag",
|
|
64
58
|
"data-part": "close-trigger",
|
|
65
59
|
"data-slot": "tag-close-trigger",
|
|
66
|
-
"
|
|
60
|
+
"aria-label": ariaLabel ?? (!asChild && children == null && ariaLabelledBy == null ? DEFAULT_CLOSE_LABEL : void 0),
|
|
61
|
+
"aria-labelledby": ariaLabelledBy,
|
|
67
62
|
className: clsx(Tag_module_default.closeTrigger, normalizeClassName(className)),
|
|
68
|
-
|
|
69
|
-
if (isDisabled) {
|
|
70
|
-
event.preventDefault();
|
|
71
|
-
event.stopPropagation();
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
onClick?.(event);
|
|
75
|
-
},
|
|
76
|
-
children: children ?? (!asChild ? /* @__PURE__ */ jsx(CloseIcon, {}) : void 0)
|
|
63
|
+
children
|
|
77
64
|
});
|
|
78
65
|
});
|
|
79
66
|
const Tag = Object.assign(TagRoot, {
|
|
@@ -197,49 +197,12 @@
|
|
|
197
197
|
--close-button-color-hover: var(--tags-input-clear-trigger-color-hover, var(--color-foreground));
|
|
198
198
|
--close-button-focus-ring-color: var(--tags-input-trigger-focus-ring-color, var(--color-ring));
|
|
199
199
|
--close-button-focus-ring-width: var(--tags-input-trigger-focus-ring-width, var(--border-width-sm));
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
background-color: var(--tags-input-clear-trigger-bg, transparent);
|
|
204
|
-
color: var(--tags-input-clear-trigger-color, var(--color-muted-foreground));
|
|
205
|
-
cursor: pointer;
|
|
206
|
-
transition: background-color var(--tags-input-transition, var(--transition-default)),
|
|
207
|
-
color var(--tags-input-transition, var(--transition-default)),
|
|
208
|
-
opacity var(--tags-input-transition, var(--transition-default)),
|
|
209
|
-
outline-color var(--tags-input-transition, var(--transition-default));
|
|
210
|
-
border: 0;
|
|
211
|
-
outline: 0;
|
|
200
|
+
--close-button-focus-ring-offset: var(--tags-input-trigger-focus-ring-offset, 2px);
|
|
201
|
+
--close-button-transition: var(--tags-input-transition, var(--transition-default));
|
|
202
|
+
--close-button-disabled-opacity: var(--tags-input-disabled-opacity, var(--opacity-disabled));
|
|
212
203
|
flex: none;
|
|
213
|
-
justify-content: center;
|
|
214
204
|
align-self: center;
|
|
215
|
-
align-items: center;
|
|
216
205
|
margin-inline-start: auto;
|
|
217
|
-
padding: 0;
|
|
218
|
-
display: inline-flex;
|
|
219
|
-
|
|
220
|
-
& > svg {
|
|
221
|
-
width: var(--tags-input-clear-trigger-icon-size, .75rem);
|
|
222
|
-
height: var(--tags-input-clear-trigger-icon-size, .75rem);
|
|
223
|
-
pointer-events: none;
|
|
224
|
-
flex: none;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
&:hover {
|
|
228
|
-
background-color: var(--tags-input-clear-trigger-bg-hover, var(--color-muted));
|
|
229
|
-
color: var(--tags-input-clear-trigger-color-hover, var(--color-foreground));
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
&:focus-visible {
|
|
233
|
-
outline: var(--tags-input-trigger-focus-ring-width, var(--border-width-sm)) solid
|
|
234
|
-
var(--tags-input-trigger-focus-ring-color, var(--color-ring));
|
|
235
|
-
outline-offset: var(--tags-input-trigger-focus-ring-offset, 2px);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
&[data-disabled], &:disabled {
|
|
239
|
-
cursor: default;
|
|
240
|
-
opacity: var(--tags-input-disabled-opacity, var(--opacity-disabled));
|
|
241
|
-
pointer-events: none;
|
|
242
|
-
}
|
|
243
206
|
|
|
244
207
|
&[data-readonly] {
|
|
245
208
|
display: none;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { TagsInput, useTagsInput, useTagsInputContext, useTagsInputItemContext } from "@ark-ui/react/tags-input";
|
|
2
3
|
|
|
3
4
|
//#region src/components/tags-input/TagsInput.d.ts
|
|
5
|
+
declare function TagsInputItems(): import("react").JSX.Element;
|
|
4
6
|
declare const TagsInput$1: import("react").ForwardRefExoticComponent<Omit<TagsInput.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
5
7
|
Root: import("react").ForwardRefExoticComponent<Omit<TagsInput.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
8
|
RootProvider: import("react").ForwardRefExoticComponent<Omit<TagsInput.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
9
|
Label: import("react").ForwardRefExoticComponent<Omit<TagsInput.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
8
10
|
Control: import("react").ForwardRefExoticComponent<Omit<TagsInput.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
11
|
Item: import("react").ForwardRefExoticComponent<Omit<TagsInput.ItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
ItemContext: (props: TagsInput.ItemContextProps) => ReactNode;
|
|
10
13
|
ItemPreview: import("react").ForwardRefExoticComponent<Omit<TagsInput.ItemPreviewProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
14
|
ItemText: import("react").ForwardRefExoticComponent<Omit<TagsInput.ItemTextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
12
15
|
ItemDeleteTrigger: import("react").ForwardRefExoticComponent<Omit<TagsInput.ItemDeleteTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
16
|
ItemInput: import("react").ForwardRefExoticComponent<Omit<TagsInput.ItemInputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
14
17
|
Input: import("react").ForwardRefExoticComponent<Omit<TagsInput.InputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
15
18
|
ClearTrigger: import("react").ForwardRefExoticComponent<Omit<TagsInput.ClearTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
Context: (props: TagsInput.ContextProps) => ReactNode;
|
|
20
|
+
Items: typeof TagsInputItems;
|
|
18
21
|
};
|
|
19
22
|
//#endregion
|
|
20
|
-
export { TagsInput$1 as TagsInput };
|
|
23
|
+
export { TagsInput$1 as TagsInput, useTagsInput, useTagsInputContext, useTagsInputItemContext };
|