@codefast/ui 0.3.11 → 0.3.12-canary.1
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/CHANGELOG.md +66 -0
- package/README.md +4 -0
- package/dist/components/accordion.d.ts +11 -29
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +11 -38
- package/dist/components/alert-dialog.d.ts +25 -60
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +17 -70
- package/dist/components/alert.d.ts +16 -27
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +33 -31
- package/dist/components/aspect-ratio.d.ts +5 -8
- package/dist/components/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio.js +5 -7
- package/dist/components/avatar.d.ts +7 -17
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +8 -19
- package/dist/components/badge.d.ts +15 -21
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +53 -21
- package/dist/components/breadcrumb.d.ts +13 -35
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +14 -50
- package/dist/components/button-group.d.ts +15 -29
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +37 -28
- package/dist/components/button.d.ts +26 -35
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +87 -52
- package/dist/components/calendar.d.ts +10 -24
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +88 -93
- package/dist/components/card.d.ts +11 -34
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +12 -40
- package/dist/components/carousel.d.ts +25 -55
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +83 -115
- package/dist/components/chart.d.ts +37 -72
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +162 -151
- package/dist/components/checkbox-cards.d.ts +9 -15
- package/dist/components/checkbox-cards.d.ts.map +1 -0
- package/dist/components/checkbox-cards.js +9 -23
- package/dist/components/checkbox-group.d.ts +9 -16
- package/dist/components/checkbox-group.d.ts.map +1 -0
- package/dist/components/checkbox-group.js +8 -20
- package/dist/components/checkbox.d.ts +5 -9
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +7 -15
- package/dist/components/collapsible.d.ts +7 -14
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +7 -15
- package/dist/components/command.d.ts +24 -55
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +19 -70
- package/dist/components/context-menu.d.ts +23 -72
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +22 -90
- package/dist/components/dialog.d.ts +23 -53
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +21 -73
- package/dist/components/drawer.d.ts +29 -60
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +17 -59
- package/dist/components/dropdown-menu.d.ts +23 -73
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +22 -97
- package/dist/components/empty.d.ts +16 -37
- package/dist/components/empty.d.ts.map +1 -0
- package/dist/components/empty.js +33 -45
- package/dist/components/field.d.ts +26 -63
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +61 -90
- package/dist/components/form.d.ts +16 -37
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +51 -67
- package/dist/components/hover-card.d.ts +8 -21
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +9 -24
- package/dist/components/input-group.d.ts +29 -53
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +110 -67
- package/dist/components/input-number.d.ts +8 -28
- package/dist/components/input-number.d.ts.map +1 -0
- package/dist/components/input-number.js +15 -56
- package/dist/components/input-otp.d.ts +11 -24
- package/dist/components/input-otp.d.ts.map +1 -0
- package/dist/components/input-otp.js +14 -35
- package/dist/components/input-password.d.ts +6 -12
- package/dist/components/input-password.d.ts.map +1 -0
- package/dist/components/input-password.js +11 -31
- package/dist/components/input-search.d.ts +9 -18
- package/dist/components/input-search.d.ts.map +1 -0
- package/dist/components/input-search.js +17 -44
- package/dist/components/input.d.ts +5 -10
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +6 -10
- package/dist/components/item.d.ts +33 -69
- package/dist/components/item.d.ts.map +1 -0
- package/dist/components/item.js +69 -91
- package/dist/components/kbd.d.ts +6 -13
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +7 -14
- package/dist/components/label.d.ts +5 -9
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +6 -9
- package/dist/components/menubar.d.ts +24 -80
- package/dist/components/menubar.d.ts.map +1 -0
- package/dist/components/menubar.js +24 -100
- package/dist/components/native-select.d.ts +7 -16
- package/dist/components/native-select.d.ts.map +1 -0
- package/dist/components/native-select.js +8 -26
- package/dist/components/navigation-menu.d.ts +13 -36
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu.js +26 -62
- package/dist/components/pagination.d.ts +15 -35
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +14 -56
- package/dist/components/popover.d.ts +9 -24
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +10 -28
- package/dist/components/progress-circle.d.ts +89 -106
- package/dist/components/progress-circle.d.ts.map +1 -0
- package/dist/components/progress-circle.js +71 -104
- package/dist/components/progress.d.ts +5 -10
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +8 -14
- package/dist/components/radio-cards.d.ts +5 -10
- package/dist/components/radio-cards.d.ts.map +1 -0
- package/dist/components/radio-cards.js +8 -22
- package/dist/components/radio-group.d.ts +6 -13
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +7 -18
- package/dist/components/radio.d.ts +6 -12
- package/dist/components/radio.d.ts.map +1 -0
- package/dist/components/radio.js +6 -11
- package/dist/components/resizable.d.ts +8 -18
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +8 -22
- package/dist/components/scroll-area.d.ts +21 -33
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +65 -85
- package/dist/components/select.d.ts +17 -50
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +27 -79
- package/dist/components/separator.d.ts +20 -29
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +28 -37
- package/dist/components/sheet.d.ts +30 -62
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +68 -81
- package/dist/components/sidebar.d.ts +67 -160
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +184 -302
- package/dist/components/skeleton.d.ts +5 -9
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +6 -9
- package/dist/components/slider.d.ts +5 -13
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +13 -35
- package/dist/components/sonner.d.ts +8 -10
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +14 -16
- package/dist/components/spinner.d.ts +6 -12
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +21 -34
- package/dist/components/switch.d.ts +5 -9
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +6 -13
- package/dist/components/table.d.ts +12 -37
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +13 -48
- package/dist/components/tabs.d.ts +8 -21
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +9 -24
- package/dist/components/textarea.d.ts +5 -9
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +6 -9
- package/dist/components/toggle-group.d.ts +10 -24
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +21 -39
- package/dist/components/toggle.d.ts +18 -25
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +42 -30
- package/dist/components/tooltip.d.ts +9 -24
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +10 -29
- package/dist/hooks/use-animated-value.d.ts +2 -4
- package/dist/hooks/use-animated-value.d.ts.map +1 -0
- package/dist/hooks/use-animated-value.js +67 -58
- package/dist/hooks/use-copy-to-clipboard.d.ts +6 -11
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.js +42 -39
- package/dist/hooks/use-is-mobile.d.ts +2 -4
- package/dist/hooks/use-is-mobile.d.ts.map +1 -0
- package/dist/hooks/use-is-mobile.js +20 -23
- package/dist/hooks/use-media-query.d.ts +2 -4
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +49 -46
- package/dist/hooks/use-mutation-observer.d.ts +3 -6
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
- package/dist/hooks/use-mutation-observer.js +33 -34
- package/dist/hooks/use-pagination.d.ts +15 -22
- package/dist/hooks/use-pagination.d.ts.map +1 -0
- package/dist/hooks/use-pagination.js +99 -99
- package/dist/index.d.ts +131 -69
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +68 -69
- package/dist/lib/utils.d.ts +10 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- package/dist/primitives/checkbox-group.d.ts +84 -105
- package/dist/primitives/checkbox-group.d.ts.map +1 -0
- package/dist/primitives/checkbox-group.js +91 -105
- package/dist/primitives/input-number.d.ts +41 -51
- package/dist/primitives/input-number.d.ts.map +1 -0
- package/dist/primitives/input-number.js +417 -473
- package/dist/primitives/input.d.ts +43 -48
- package/dist/primitives/input.d.ts.map +1 -0
- package/dist/primitives/input.js +67 -66
- package/dist/primitives/progress-circle.d.ts +49 -79
- package/dist/primitives/progress-circle.d.ts.map +1 -0
- package/dist/primitives/progress-circle.js +134 -149
- package/package.json +33 -16
- package/{dist → src}/css/preset.css +86 -9
- /package/{dist → src}/css/amber.css +0 -0
- /package/{dist → src}/css/blue.css +0 -0
- /package/{dist → src}/css/cyan.css +0 -0
- /package/{dist → src}/css/emerald.css +0 -0
- /package/{dist → src}/css/fuchsia.css +0 -0
- /package/{dist → src}/css/gray.css +0 -0
- /package/{dist → src}/css/green.css +0 -0
- /package/{dist → src}/css/indigo.css +0 -0
- /package/{dist → src}/css/lime.css +0 -0
- /package/{dist → src}/css/neutral.css +0 -0
- /package/{dist → src}/css/orange.css +0 -0
- /package/{dist → src}/css/pink.css +0 -0
- /package/{dist → src}/css/purple.css +0 -0
- /package/{dist → src}/css/red.css +0 -0
- /package/{dist → src}/css/rose.css +0 -0
- /package/{dist → src}/css/sky.css +0 -0
- /package/{dist → src}/css/slate.css +0 -0
- /package/{dist → src}/css/stone.css +0 -0
- /package/{dist → src}/css/style.css +0 -0
- /package/{dist → src}/css/teal.css +0 -0
- /package/{dist → src}/css/violet.css +0 -0
- /package/{dist → src}/css/yellow.css +0 -0
- /package/{dist → src}/css/zinc.css +0 -0
|
@@ -1,61 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { DecrementButton as InputNumberDecrementButton, Field as InputNumberField, IncrementButton as InputNumberIncrementButton, InputNumber as InputNumber$1 } from "../primitives/input-number.js";
|
|
5
|
-
import { cn } from "@codefast/tailwind-variants";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "#lib/utils";
|
|
6
4
|
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
7
|
-
import {
|
|
8
|
-
|
|
5
|
+
import { buttonVariants } from "#components/button";
|
|
6
|
+
import { Spinner } from "#components/spinner";
|
|
7
|
+
import * as InputNumberPrimitive from "#primitives/input-number";
|
|
9
8
|
function InputNumber({ ariaDecrementLabel, ariaIncrementLabel, className, defaultValue, disabled, formatOptions, id, loaderPosition, loading, max, min, onChange, prefix, readOnly, spinner, step, suffix, value, ...props }) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
formatOptions,
|
|
18
|
-
id,
|
|
19
|
-
loaderPosition,
|
|
20
|
-
loading,
|
|
21
|
-
max,
|
|
22
|
-
min,
|
|
23
|
-
prefix,
|
|
24
|
-
readOnly,
|
|
25
|
-
spinner: spinner ?? /* @__PURE__ */ jsx(Spinner, {}, "spinner"),
|
|
26
|
-
step,
|
|
27
|
-
suffix,
|
|
28
|
-
value,
|
|
29
|
-
onChange,
|
|
30
|
-
children: [/* @__PURE__ */ jsx(InputNumberField, {
|
|
31
|
-
autoCapitalize: "none",
|
|
32
|
-
autoComplete: "off",
|
|
33
|
-
autoCorrect: "off",
|
|
34
|
-
className: "h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
|
|
35
|
-
spellCheck: "false",
|
|
36
|
-
...props
|
|
37
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
38
|
-
className: cn("group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 order-last ml-auto grid h-full shrink-0 divide-y divide-input border-l border-l-input transition group-focus-within:divide-ring group-focus-within:border-l-ring group-has-aria-invalid:divide-destructive group-has-aria-invalid:border-l-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60", "*:[button]:focus-visible:bg-ring/50 *:[button]:focus-visible:ring-0 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40"),
|
|
39
|
-
"data-slot": "input-number-buttons",
|
|
40
|
-
children: [/* @__PURE__ */ jsx(InputNumberIncrementButton, {
|
|
41
|
-
"aria-label": "Increment",
|
|
42
|
-
className: buttonVariants({
|
|
43
|
-
className: "text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]",
|
|
44
|
-
variant: "ghost"
|
|
45
|
-
}),
|
|
46
|
-
"data-slot": "input-number-increment-button",
|
|
47
|
-
children: /* @__PURE__ */ jsx(ChevronUpIcon, {})
|
|
48
|
-
}), /* @__PURE__ */ jsx(InputNumberDecrementButton, {
|
|
49
|
-
"aria-label": "Decrement",
|
|
50
|
-
className: buttonVariants({
|
|
51
|
-
className: "text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]",
|
|
52
|
-
variant: "ghost"
|
|
53
|
-
}),
|
|
54
|
-
"data-slot": "input-number-decrement-button",
|
|
55
|
-
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
56
|
-
})]
|
|
57
|
-
})]
|
|
58
|
-
});
|
|
9
|
+
return (_jsxs(InputNumberPrimitive.Root, { ariaDecrementLabel: ariaDecrementLabel, ariaIncrementLabel: ariaIncrementLabel, className: cn("group peer flex h-9 w-full grow items-center gap-3 px-3 pr-0", "rounded-lg border border-input", "text-base", "transition", "not-has-disabled:shadow-xs", "focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50", "hover:not-has-disabled:not-focus-within:border-ring/60", "has-disabled:opacity-50", "has-aria-invalid:border-destructive", "focus-within:has-aria-invalid:ring-destructive/20", "hover:not-has-disabled:not-focus-within:has-aria-invalid:border-destructive/60", "md:text-sm", "dark:bg-input/30", "dark:focus-within:has-aria-invalid:ring-destructive/40", "[&_svg]:shrink-0", "[&_svg:not([class*='size-'])]:size-4", "[&>svg]:text-muted-foreground", className), "data-slot": "input-number", defaultValue: defaultValue, disabled: disabled, formatOptions: formatOptions, id: id, loaderPosition: loaderPosition, loading: loading, max: max, min: min, prefix: prefix, readOnly: readOnly, spinner: spinner ?? _jsx(Spinner, {}, "spinner"), step: step, suffix: suffix, value: value, onChange: onChange, children: [_jsx(InputNumberPrimitive.Field, { autoCapitalize: "none", autoComplete: "off", autoCorrect: "off", className: cn("h-9 w-full min-w-0 px-3 py-1", "rounded-md border border-input", "bg-transparent shadow-xs outline-none", "text-base", "transition-[color,box-shadow]", "selection:bg-primary selection:text-primary-foreground", "file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground", "placeholder:text-muted-foreground", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20", "md:text-sm", "dark:bg-input/30", "dark:aria-invalid:ring-destructive/40"), spellCheck: "false", ...props }), _jsxs("div", { className: cn("order-last ml-auto grid h-full shrink-0", "divide-y divide-input border-l border-l-input", "transition", "group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60", "group-focus-within:divide-ring group-focus-within:border-l-ring", "group-has-aria-invalid:divide-destructive group-has-aria-invalid:border-l-destructive", "group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60", "*:[button]:focus-visible:bg-ring/50 *:[button]:focus-visible:ring-0", "group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20", "dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40"), "data-slot": "input-number-buttons", children: [_jsx(InputNumberPrimitive.IncrementButton, { "aria-label": "Increment", className: buttonVariants({
|
|
10
|
+
className: "text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]",
|
|
11
|
+
variant: "ghost",
|
|
12
|
+
}), "data-slot": "input-number-increment-button", children: _jsx(ChevronUpIcon, {}) }), _jsx(InputNumberPrimitive.DecrementButton, { "aria-label": "Decrement", className: buttonVariants({
|
|
13
|
+
className: "text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]",
|
|
14
|
+
variant: "ghost",
|
|
15
|
+
}), "data-slot": "input-number-decrement-button", children: _jsx(ChevronDownIcon, {}) })] })] }));
|
|
59
16
|
}
|
|
60
|
-
|
|
17
|
+
/* -----------------------------------------------------------------------------
|
|
18
|
+
* Exports
|
|
19
|
+
* -------------------------------------------------------------------------- */
|
|
61
20
|
export { InputNumber };
|
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
2
|
-
import { OTPInput
|
|
3
|
-
|
|
4
|
-
//#region src/components/input-otp.d.ts
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import { OTPInput } from "input-otp";
|
|
5
3
|
type InputOTPProps = ComponentProps<typeof OTPInput>;
|
|
6
|
-
declare function InputOTP({
|
|
7
|
-
className,
|
|
8
|
-
containerClassName,
|
|
9
|
-
...props
|
|
10
|
-
}: InputOTPProps): JSX.Element;
|
|
4
|
+
declare function InputOTP({ className, containerClassName, ...props }: InputOTPProps): JSX.Element;
|
|
11
5
|
type InputOTPGroupProps = ComponentProps<"div">;
|
|
12
|
-
declare function InputOTPGroup({
|
|
13
|
-
className,
|
|
14
|
-
...props
|
|
15
|
-
}: InputOTPGroupProps): JSX.Element;
|
|
6
|
+
declare function InputOTPGroup({ className, ...props }: InputOTPGroupProps): JSX.Element;
|
|
16
7
|
interface InputOTPSlotProps extends ComponentProps<"div"> {
|
|
17
|
-
|
|
8
|
+
index: number;
|
|
18
9
|
}
|
|
19
|
-
declare function InputOTPSlot({
|
|
20
|
-
className,
|
|
21
|
-
index,
|
|
22
|
-
...props
|
|
23
|
-
}: InputOTPSlotProps): JSX.Element;
|
|
10
|
+
declare function InputOTPSlot({ className, index, ...props }: InputOTPSlotProps): JSX.Element;
|
|
24
11
|
type InputOTPSeparatorProps = ComponentProps<"div">;
|
|
25
|
-
declare function InputOTPSeparator({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
12
|
+
declare function InputOTPSeparator({ ...props }: InputOTPSeparatorProps): JSX.Element;
|
|
13
|
+
export { REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
|
|
14
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
15
|
+
export type { InputOTPGroupProps, InputOTPProps, InputOTPSeparatorProps, InputOTPSlotProps };
|
|
16
|
+
//# sourceMappingURL=input-otp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../src/components/input-otp.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,QAAQ,EAAmB,MAAM,WAAW,CAAC;AAQtD,KAAK,aAAa,GAAG,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;AAErD,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAczF;AAMD,KAAK,kBAAkB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEhD,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAS/E;AAMD,UAAU,iBAAkB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACvD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CA0CpF;AAMD,KAAK,sBAAsB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEpD,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CAM5E;AAMD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC;AACpE,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,46 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "#lib/utils";
|
|
4
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
|
3
5
|
import { MinusIcon } from "lucide-react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { use } from "react";
|
|
6
|
-
import { OTPInput, OTPInputContext, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
|
|
7
|
-
//#region src/components/input-otp.tsx
|
|
8
7
|
function InputOTP({ className, containerClassName, ...props }) {
|
|
9
|
-
|
|
10
|
-
"aria-label": "One-time password",
|
|
11
|
-
className: cn(className),
|
|
12
|
-
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
|
|
13
|
-
"data-slot": "input-otp",
|
|
14
|
-
...props
|
|
15
|
-
});
|
|
8
|
+
return (_jsx(OTPInput, { "aria-label": "One-time password", className: cn(className), containerClassName: cn("flex items-center gap-2", "has-disabled:opacity-50", containerClassName), "data-slot": "input-otp", ...props }));
|
|
16
9
|
}
|
|
17
10
|
function InputOTPGroup({ className, ...props }) {
|
|
18
|
-
|
|
19
|
-
className: cn("flex items-center -space-x-px", className),
|
|
20
|
-
"data-slot": "input-otp-group",
|
|
21
|
-
role: "group",
|
|
22
|
-
...props
|
|
23
|
-
});
|
|
11
|
+
return (_jsx("div", { className: cn("flex items-center -space-x-px", className), "data-slot": "input-otp-group", role: "group", ...props }));
|
|
24
12
|
}
|
|
25
13
|
function InputOTPSlot({ className, index, ...props }) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"data-active": isActive,
|
|
30
|
-
"data-slot": "input-otp-slot",
|
|
31
|
-
...props,
|
|
32
|
-
children: [char, hasFakeCaret ? /* @__PURE__ */ jsx("div", {
|
|
33
|
-
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
34
|
-
children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground animation-duration-1000" })
|
|
35
|
-
}) : null]
|
|
36
|
-
});
|
|
14
|
+
const inputOTPContext = use(OTPInputContext);
|
|
15
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
16
|
+
return (_jsxs("div", { className: cn("relative flex size-9 items-center justify-center", "border border-input outline-hidden", "text-sm", "transition-all", "not-has-disabled:shadow-xs", "first:rounded-l-lg", "last:rounded-r-lg", "aria-invalid:border-destructive", "dark:bg-input/30", "data-active:z-10 data-active:border-ring data-active:ring-3 data-active:ring-ring/50", "data-active:aria-invalid:border-destructive data-active:aria-invalid:ring-destructive/20", "dark:data-active:aria-invalid:ring-destructive/40", className), "data-active": isActive, "data-slot": "input-otp-slot", ...props, children: [char, hasFakeCaret ? (_jsx("div", { className: cn("absolute inset-0 flex items-center justify-center", "pointer-events-none"), children: _jsx("div", { className: cn("h-4 w-px", "bg-foreground", "animate-caret-blink", "animation-duration-1000") }) })) : null] }));
|
|
37
17
|
}
|
|
38
18
|
function InputOTPSeparator({ ...props }) {
|
|
39
|
-
|
|
40
|
-
"data-slot": "input-otp-separator",
|
|
41
|
-
...props,
|
|
42
|
-
children: /* @__PURE__ */ jsx(MinusIcon, {})
|
|
43
|
-
});
|
|
19
|
+
return (_jsx("div", { "data-slot": "input-otp-separator", ...props, children: _jsx(MinusIcon, {}) }));
|
|
44
20
|
}
|
|
45
|
-
|
|
46
|
-
|
|
21
|
+
/* -----------------------------------------------------------------------------
|
|
22
|
+
* Exports
|
|
23
|
+
* -------------------------------------------------------------------------- */
|
|
24
|
+
export { REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
|
|
25
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
//#region src/components/input-password.d.ts
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import { InputGroupInput } from "#components/input-group";
|
|
5
3
|
type InputPasswordProps = Omit<ComponentProps<typeof InputGroupInput>, "type">;
|
|
6
|
-
declare function InputPassword({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
...props
|
|
11
|
-
}: InputPasswordProps): JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { InputPassword, type InputPasswordProps };
|
|
4
|
+
declare function InputPassword({ className, disabled, readOnly, ...props }: InputPasswordProps): JSX.Element;
|
|
5
|
+
export { InputPassword };
|
|
6
|
+
export type { InputPasswordProps };
|
|
7
|
+
//# sourceMappingURL=input-password.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-password.d.ts","sourceRoot":"","sources":["../../src/components/input-password.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAqB,MAAM,OAAO,CAAC;AAKpE,OAAO,EAAgC,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAMxF,KAAK,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,EAAE,MAAM,CAAC,CAAC;AAE/E,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAuClC;AAMD,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,37 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "#lib/utils";
|
|
3
4
|
import { EyeIcon, EyeOffIcon } from "lucide-react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useCallback, useState } from "react";
|
|
6
|
-
|
|
6
|
+
import { InputGroup, InputGroupButton, InputGroupInput } from "#components/input-group";
|
|
7
7
|
function InputPassword({ className, disabled, readOnly, ...props }) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
className,
|
|
14
|
-
"data-disabled": disabled ? "true" : void 0,
|
|
15
|
-
"data-slot": "input-password",
|
|
16
|
-
children: [/* @__PURE__ */ jsx(InputGroupInput, {
|
|
17
|
-
autoCapitalize: "none",
|
|
18
|
-
"data-slot": "input-password-item",
|
|
19
|
-
disabled,
|
|
20
|
-
readOnly,
|
|
21
|
-
type,
|
|
22
|
-
...props
|
|
23
|
-
}), /* @__PURE__ */ jsx(InputGroupButton, {
|
|
24
|
-
"aria-label": type === "password" ? "Show password" : "Hide password",
|
|
25
|
-
className: "rounded-full focus-visible:ring-0 focus-visible:not-disabled:bg-input",
|
|
26
|
-
"data-slot": "input-password-toggle",
|
|
27
|
-
disabled,
|
|
28
|
-
size: "icon-sm",
|
|
29
|
-
type: "button",
|
|
30
|
-
variant: "ghost",
|
|
31
|
-
onClick: togglePasswordVisibility,
|
|
32
|
-
children: type === "password" ? /* @__PURE__ */ jsx(EyeOffIcon, {}) : /* @__PURE__ */ jsx(EyeIcon, {})
|
|
33
|
-
})]
|
|
34
|
-
});
|
|
8
|
+
const [type, setType] = useState("password");
|
|
9
|
+
const togglePasswordVisibility = useCallback(() => {
|
|
10
|
+
setType((previous) => (previous === "password" ? "text" : "password"));
|
|
11
|
+
}, []);
|
|
12
|
+
return (_jsxs(InputGroup, { className: className, "data-disabled": disabled ? "true" : undefined, "data-slot": "input-password", children: [_jsx(InputGroupInput, { autoCapitalize: "none", "data-slot": "input-password-item", disabled: disabled, readOnly: readOnly, type: type, ...props }), _jsx(InputGroupButton, { "aria-label": type === "password" ? "Show password" : "Hide password", className: cn("rounded-full", "focus-visible:ring-0", "focus-visible:not-disabled:bg-input"), "data-slot": "input-password-toggle", disabled: disabled, size: "icon-sm", type: "button", variant: "ghost", onClick: togglePasswordVisibility, children: type === "password" ? _jsx(EyeOffIcon, {}) : _jsx(EyeIcon, {}) })] }));
|
|
35
13
|
}
|
|
36
|
-
|
|
14
|
+
/* -----------------------------------------------------------------------------
|
|
15
|
+
* Exports
|
|
16
|
+
* -------------------------------------------------------------------------- */
|
|
37
17
|
export { InputPassword };
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
//#region src/components/input-search.d.ts
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import { InputGroupInput } from "#components/input-group";
|
|
5
3
|
interface InputSearchProps extends Omit<ComponentProps<typeof InputGroupInput>, "defaultValue" | "onChange" | "type" | "value"> {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
onChange?: (value?: string) => void;
|
|
6
|
+
value?: string;
|
|
9
7
|
}
|
|
10
|
-
declare function InputSearch({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
onChange,
|
|
15
|
-
readOnly,
|
|
16
|
-
value: valueProperty,
|
|
17
|
-
...props
|
|
18
|
-
}: InputSearchProps): JSX.Element;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { InputSearch, type InputSearchProps };
|
|
8
|
+
declare function InputSearch({ className, defaultValue, disabled, onChange, readOnly, value: valueProperty, ...props }: InputSearchProps): JSX.Element;
|
|
9
|
+
export { InputSearch };
|
|
10
|
+
export type { InputSearchProps };
|
|
11
|
+
//# sourceMappingURL=input-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-search.d.ts","sourceRoot":"","sources":["../../src/components/input-search.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,EAIL,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAMjC,UAAU,gBAAiB,SAAQ,IAAI,CACrC,cAAc,CAAC,OAAO,eAAe,CAAC,EACtC,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAC/C;IACC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EAAE,aAAa,EACpB,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAgDhC;AAMD,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,49 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "#lib/utils";
|
|
5
4
|
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
6
|
-
|
|
5
|
+
import { SearchIcon, XIcon } from "lucide-react";
|
|
6
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, } from "#components/input-group";
|
|
7
7
|
function InputSearch({ className, defaultValue, disabled, onChange, readOnly, value: valueProperty, ...props }) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/* @__PURE__ */ jsx(InputGroupAddon, {
|
|
19
|
-
align: "inline-start",
|
|
20
|
-
children: /* @__PURE__ */ jsx(SearchIcon, {})
|
|
21
|
-
}),
|
|
22
|
-
/* @__PURE__ */ jsx(InputGroupInput, {
|
|
23
|
-
"data-slot": "input-search-item",
|
|
24
|
-
disabled,
|
|
25
|
-
readOnly,
|
|
26
|
-
type: "search",
|
|
27
|
-
value: value ?? "",
|
|
28
|
-
onChange: (event) => {
|
|
29
|
-
setValue(event.target.value);
|
|
30
|
-
},
|
|
31
|
-
...props
|
|
32
|
-
}),
|
|
33
|
-
value ? /* @__PURE__ */ jsx(InputGroupButton, {
|
|
34
|
-
"aria-label": "Clear search",
|
|
35
|
-
className: "rounded-full focus-visible:ring-0 focus-visible:not-disabled:bg-input",
|
|
36
|
-
"data-slot": "input-search-clear",
|
|
37
|
-
disabled: disabled ?? readOnly,
|
|
38
|
-
size: "icon-sm",
|
|
39
|
-
variant: "ghost",
|
|
40
|
-
onClick: () => {
|
|
41
|
-
setValue("");
|
|
42
|
-
},
|
|
43
|
-
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
44
|
-
}) : null
|
|
45
|
-
]
|
|
46
|
-
});
|
|
8
|
+
const [value, setValue] = useControllableState({
|
|
9
|
+
defaultProp: defaultValue,
|
|
10
|
+
onChange,
|
|
11
|
+
prop: valueProperty,
|
|
12
|
+
});
|
|
13
|
+
return (_jsxs(InputGroup, { className: className, "data-disabled": disabled ? "true" : undefined, "data-slot": "input-search", children: [_jsx(InputGroupAddon, { align: "inline-start", children: _jsx(SearchIcon, {}) }), _jsx(InputGroupInput, { "data-slot": "input-search-item", disabled: disabled, readOnly: readOnly, type: "search", value: value ?? "", onChange: (event) => {
|
|
14
|
+
setValue(event.target.value);
|
|
15
|
+
}, ...props }), value ? (_jsx(InputGroupButton, { "aria-label": "Clear search", className: cn("rounded-full", "focus-visible:ring-0", "focus-visible:not-disabled:bg-input"), "data-slot": "input-search-clear", disabled: disabled ?? readOnly, size: "icon-sm", variant: "ghost", onClick: () => {
|
|
16
|
+
setValue("");
|
|
17
|
+
}, children: _jsx(XIcon, {}) })) : null] }));
|
|
47
18
|
}
|
|
48
|
-
|
|
19
|
+
/* -----------------------------------------------------------------------------
|
|
20
|
+
* Exports
|
|
21
|
+
* -------------------------------------------------------------------------- */
|
|
49
22
|
export { InputSearch };
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/components/input.d.ts
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
4
2
|
type InputProps = ComponentProps<"input">;
|
|
5
|
-
declare function Input({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}: InputProps): JSX.Element;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { Input, type InputProps };
|
|
3
|
+
declare function Input({ className, type, ...props }: InputProps): JSX.Element;
|
|
4
|
+
export { Input };
|
|
5
|
+
export type { InputProps };
|
|
6
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAQjD,KAAK,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;AAE1C,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAyBrE;AAMD,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/components/input.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
//#region src/components/input.tsx
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "#lib/utils";
|
|
5
4
|
function Input({ className, type, ...props }) {
|
|
6
|
-
|
|
7
|
-
className: cn("h-9 w-full min-w-0 rounded-lg border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className),
|
|
8
|
-
"data-slot": "input",
|
|
9
|
-
type,
|
|
10
|
-
...props
|
|
11
|
-
});
|
|
5
|
+
return (_jsx("input", { className: cn("h-9 w-full min-w-0 px-3 py-1", "rounded-lg border border-input", "bg-transparent shadow-xs outline-none", "text-base", "transition-[color,box-shadow]", "selection:bg-primary selection:text-primary-foreground", "file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground", "placeholder:text-muted-foreground", "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "md:text-sm", "dark:bg-input/30", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20", "dark:aria-invalid:ring-destructive/40", className), "data-slot": "input", type: type, ...props }));
|
|
12
6
|
}
|
|
13
|
-
|
|
7
|
+
/* -----------------------------------------------------------------------------
|
|
8
|
+
* Exports
|
|
9
|
+
* -------------------------------------------------------------------------- */
|
|
14
10
|
export { Input };
|
|
@@ -1,82 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
muted: string;
|
|
15
|
-
outline: string;
|
|
16
|
-
};
|
|
1
|
+
import type { VariantProps } from "#lib/utils";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
|
+
import { Separator } from "#components/separator";
|
|
4
|
+
declare const itemVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
5
|
+
size: {
|
|
6
|
+
default: string[];
|
|
7
|
+
sm: string[];
|
|
8
|
+
};
|
|
9
|
+
variant: {
|
|
10
|
+
default: string;
|
|
11
|
+
muted: string;
|
|
12
|
+
outline: string;
|
|
13
|
+
};
|
|
17
14
|
}, Record<string, never>>;
|
|
18
|
-
declare const itemMediaVariants:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
declare const itemMediaVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
16
|
+
variant: {
|
|
17
|
+
default: string;
|
|
18
|
+
icon: string[];
|
|
19
|
+
image: string[];
|
|
20
|
+
};
|
|
24
21
|
}, Record<string, never>>;
|
|
25
22
|
type ItemGroupProps = ComponentProps<"div">;
|
|
26
|
-
declare function ItemGroup({
|
|
27
|
-
className,
|
|
28
|
-
...props
|
|
29
|
-
}: ItemGroupProps): JSX.Element;
|
|
23
|
+
declare function ItemGroup({ className, ...props }: ItemGroupProps): JSX.Element;
|
|
30
24
|
type ItemSeparatorProps = ComponentProps<typeof Separator>;
|
|
31
|
-
declare function ItemSeparator({
|
|
32
|
-
className,
|
|
33
|
-
...props
|
|
34
|
-
}: ItemSeparatorProps): JSX.Element;
|
|
25
|
+
declare function ItemSeparator({ className, ...props }: ItemSeparatorProps): JSX.Element;
|
|
35
26
|
type ItemProps = ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
|
|
36
|
-
|
|
27
|
+
asChild?: boolean;
|
|
37
28
|
};
|
|
38
|
-
declare function Item({
|
|
39
|
-
asChild,
|
|
40
|
-
className,
|
|
41
|
-
size,
|
|
42
|
-
variant,
|
|
43
|
-
...props
|
|
44
|
-
}: ItemProps): JSX.Element;
|
|
29
|
+
declare function Item({ asChild, className, size, variant, ...props }: ItemProps): JSX.Element;
|
|
45
30
|
type ItemMediaProps = ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>;
|
|
46
|
-
declare function ItemMedia({
|
|
47
|
-
className,
|
|
48
|
-
variant,
|
|
49
|
-
...props
|
|
50
|
-
}: ItemMediaProps): JSX.Element;
|
|
31
|
+
declare function ItemMedia({ className, variant, ...props }: ItemMediaProps): JSX.Element;
|
|
51
32
|
type ItemContentProps = ComponentProps<"div">;
|
|
52
|
-
declare function ItemContent({
|
|
53
|
-
className,
|
|
54
|
-
...props
|
|
55
|
-
}: ItemContentProps): JSX.Element;
|
|
33
|
+
declare function ItemContent({ className, ...props }: ItemContentProps): JSX.Element;
|
|
56
34
|
type ItemTitleProps = ComponentProps<"div">;
|
|
57
|
-
declare function ItemTitle({
|
|
58
|
-
className,
|
|
59
|
-
...props
|
|
60
|
-
}: ItemTitleProps): JSX.Element;
|
|
35
|
+
declare function ItemTitle({ className, ...props }: ItemTitleProps): JSX.Element;
|
|
61
36
|
type ItemDescriptionProps = ComponentProps<"p">;
|
|
62
|
-
declare function ItemDescription({
|
|
63
|
-
className,
|
|
64
|
-
...props
|
|
65
|
-
}: ItemDescriptionProps): JSX.Element;
|
|
37
|
+
declare function ItemDescription({ className, ...props }: ItemDescriptionProps): JSX.Element;
|
|
66
38
|
type ItemActionsProps = ComponentProps<"div">;
|
|
67
|
-
declare function ItemActions({
|
|
68
|
-
className,
|
|
69
|
-
...props
|
|
70
|
-
}: ItemActionsProps): JSX.Element;
|
|
39
|
+
declare function ItemActions({ className, ...props }: ItemActionsProps): JSX.Element;
|
|
71
40
|
type ItemHeaderProps = ComponentProps<"div">;
|
|
72
|
-
declare function ItemHeader({
|
|
73
|
-
className,
|
|
74
|
-
...props
|
|
75
|
-
}: ItemHeaderProps): JSX.Element;
|
|
41
|
+
declare function ItemHeader({ className, ...props }: ItemHeaderProps): JSX.Element;
|
|
76
42
|
type ItemFooterProps = ComponentProps<"div">;
|
|
77
|
-
declare function ItemFooter({
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
//#endregion
|
|
82
|
-
export { Item, ItemActions, type ItemActionsProps, ItemContent, type ItemContentProps, ItemDescription, type ItemDescriptionProps, ItemFooter, type ItemFooterProps, ItemGroup, type ItemGroupProps, ItemHeader, type ItemHeaderProps, ItemMedia, type ItemMediaProps, type ItemProps, ItemSeparator, type ItemSeparatorProps, ItemTitle, type ItemTitleProps, itemMediaVariants, itemVariants };
|
|
43
|
+
declare function ItemFooter({ className, ...props }: ItemFooterProps): JSX.Element;
|
|
44
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, itemMediaVariants, ItemSeparator, ItemTitle, itemVariants, };
|
|
45
|
+
export type { ItemActionsProps, ItemContentProps, ItemDescriptionProps, ItemFooterProps, ItemGroupProps, ItemHeaderProps, ItemMediaProps, ItemProps, ItemSeparatorProps, ItemTitleProps, };
|
|
46
|
+
//# sourceMappingURL=item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../src/components/item.tsx"],"names":[],"mappings":"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"}
|