@codefast/ui 0.0.8 → 0.0.9
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/dist/accordion.d.mts +5 -1
- package/dist/accordion.d.ts +5 -1
- package/dist/accordion.js.map +1 -1
- package/dist/accordion.mjs.map +1 -1
- package/dist/alert-dialog.d.mts +12 -3
- package/dist/alert-dialog.d.ts +12 -3
- package/dist/alert-dialog.js +3 -3
- package/dist/alert-dialog.js.map +1 -1
- package/dist/alert-dialog.mjs +1 -1
- package/dist/alert-dialog.mjs.map +1 -1
- package/dist/alert.d.mts +10 -5
- package/dist/alert.d.ts +10 -5
- package/dist/alert.js +22 -18
- package/dist/alert.js.map +1 -1
- package/dist/alert.mjs +22 -18
- package/dist/alert.mjs.map +1 -1
- package/dist/aspect-ratio.d.mts +2 -1
- package/dist/aspect-ratio.d.ts +2 -1
- package/dist/aspect-ratio.js.map +1 -1
- package/dist/aspect-ratio.mjs.map +1 -1
- package/dist/avatar.d.mts +4 -1
- package/dist/avatar.d.ts +4 -1
- package/dist/avatar.js.map +1 -1
- package/dist/avatar.mjs.map +1 -1
- package/dist/badge.d.mts +5 -2
- package/dist/badge.d.ts +5 -2
- package/dist/badge.js.map +1 -1
- package/dist/badge.mjs.map +1 -1
- package/dist/blockquote.d.mts +5 -4
- package/dist/blockquote.d.ts +5 -4
- package/dist/blockquote.js +6 -4
- package/dist/blockquote.js.map +1 -1
- package/dist/blockquote.mjs +6 -4
- package/dist/blockquote.mjs.map +1 -1
- package/dist/box.d.mts +1 -1
- package/dist/box.d.ts +1 -1
- package/dist/box.js.map +1 -1
- package/dist/box.mjs.map +1 -1
- package/dist/breadcrumb.d.mts +18 -11
- package/dist/breadcrumb.d.ts +18 -11
- package/dist/breadcrumb.js +49 -39
- package/dist/breadcrumb.js.map +1 -1
- package/dist/breadcrumb.mjs +49 -39
- package/dist/breadcrumb.mjs.map +1 -1
- package/dist/button.d.mts +3 -2
- package/dist/button.d.ts +3 -2
- package/dist/button.js +2 -2
- package/dist/button.mjs +1 -1
- package/dist/calendar.d.mts +3 -2
- package/dist/calendar.d.ts +3 -2
- package/dist/calendar.js +3 -3
- package/dist/calendar.js.map +1 -1
- package/dist/calendar.mjs +1 -1
- package/dist/calendar.mjs.map +1 -1
- package/dist/card.d.mts +13 -7
- package/dist/card.d.ts +13 -7
- package/dist/card.js +47 -37
- package/dist/card.js.map +1 -1
- package/dist/card.mjs +47 -37
- package/dist/card.mjs.map +1 -1
- package/dist/carousel.d.mts +13 -8
- package/dist/carousel.d.ts +13 -8
- package/dist/carousel.js +63 -57
- package/dist/carousel.js.map +1 -1
- package/dist/carousel.mjs +62 -56
- package/dist/carousel.mjs.map +1 -1
- package/dist/checkbox.d.mts +2 -1
- package/dist/checkbox.d.ts +2 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/checkbox.mjs.map +1 -1
- package/dist/{chunk-OCLLX7EY.js → chunk-3BDLWZ3W.js} +1 -1
- package/dist/chunk-3BDLWZ3W.js.map +1 -0
- package/dist/{chunk-2D7SRYKN.js → chunk-43YGVOCO.js} +1 -1
- package/dist/chunk-43YGVOCO.js.map +1 -0
- package/dist/{chunk-EIHWTXQ4.mjs → chunk-AJLEALVP.mjs} +1 -1
- package/dist/chunk-AJLEALVP.mjs.map +1 -0
- package/dist/{chunk-LDYBRDAY.js → chunk-D6NQEMTJ.js} +1 -1
- package/dist/chunk-D6NQEMTJ.js.map +1 -0
- package/dist/{chunk-KW5FJ62U.mjs → chunk-FATZHRHR.mjs} +1 -1
- package/dist/chunk-FATZHRHR.mjs.map +1 -0
- package/dist/{chunk-RTKEO347.js → chunk-GRKABVK4.js} +1 -1
- package/dist/chunk-GRKABVK4.js.map +1 -0
- package/dist/{chunk-U2WDUCW3.js → chunk-JOJW7BBY.js} +1 -1
- package/dist/{chunk-U2WDUCW3.js.map → chunk-JOJW7BBY.js.map} +1 -1
- package/dist/{chunk-ESWGFN3R.mjs → chunk-KV4VL2ZF.mjs} +1 -1
- package/dist/chunk-KV4VL2ZF.mjs.map +1 -0
- package/dist/{chunk-T52N6ZBP.mjs → chunk-MJDKD2K4.mjs} +1 -1
- package/dist/{chunk-T52N6ZBP.mjs.map → chunk-MJDKD2K4.mjs.map} +1 -1
- package/dist/{chunk-EDVCMWDT.mjs → chunk-NCEN3XBK.mjs} +1 -1
- package/dist/chunk-NCEN3XBK.mjs.map +1 -0
- package/dist/{chunk-PTD4AMHI.mjs → chunk-PIU627A3.mjs} +1 -1
- package/dist/chunk-PIU627A3.mjs.map +1 -0
- package/dist/{chunk-5GHZ6EXI.js → chunk-PKB2G726.js} +1 -1
- package/dist/{chunk-5GHZ6EXI.js.map → chunk-PKB2G726.js.map} +1 -1
- package/dist/code.d.mts +5 -4
- package/dist/code.d.ts +5 -4
- package/dist/code.js +6 -4
- package/dist/code.js.map +1 -1
- package/dist/code.mjs +6 -4
- package/dist/code.mjs.map +1 -1
- package/dist/collapsible.d.mts +4 -1
- package/dist/collapsible.d.ts +4 -1
- package/dist/collapsible.js.map +1 -1
- package/dist/collapsible.mjs.map +1 -1
- package/dist/command.d.mts +14 -3
- package/dist/command.d.ts +14 -3
- package/dist/command.js +6 -3
- package/dist/command.js.map +1 -1
- package/dist/command.mjs +5 -2
- package/dist/command.mjs.map +1 -1
- package/dist/container.d.mts +5 -4
- package/dist/container.d.ts +5 -4
- package/dist/container.js +6 -4
- package/dist/container.js.map +1 -1
- package/dist/container.mjs +6 -4
- package/dist/container.mjs.map +1 -1
- package/dist/context-menu.d.mts +26 -11
- package/dist/context-menu.d.ts +26 -11
- package/dist/context-menu.js.map +1 -1
- package/dist/context-menu.mjs.map +1 -1
- package/dist/data-table.d.mts +10 -7
- package/dist/data-table.d.ts +10 -7
- package/dist/data-table.js +25 -25
- package/dist/data-table.js.map +1 -1
- package/dist/data-table.mjs +3 -3
- package/dist/data-table.mjs.map +1 -1
- package/dist/dialog.d.mts +11 -3
- package/dist/dialog.d.ts +11 -3
- package/dist/dialog.js +2 -2
- package/dist/dialog.mjs +1 -1
- package/dist/drawer.d.mts +12 -4
- package/dist/drawer.d.ts +12 -4
- package/dist/drawer.js.map +1 -1
- package/dist/drawer.mjs.map +1 -1
- package/dist/dropdown-menu.d.mts +25 -11
- package/dist/dropdown-menu.d.ts +25 -11
- package/dist/dropdown-menu.js +2 -2
- package/dist/dropdown-menu.mjs +1 -1
- package/dist/em.d.mts +5 -4
- package/dist/em.d.ts +5 -4
- package/dist/em.js +6 -4
- package/dist/em.js.map +1 -1
- package/dist/em.mjs +6 -4
- package/dist/em.mjs.map +1 -1
- package/dist/form.d.mts +14 -6
- package/dist/form.d.ts +14 -6
- package/dist/form.js +26 -22
- package/dist/form.js.map +1 -1
- package/dist/form.mjs +25 -21
- package/dist/form.mjs.map +1 -1
- package/dist/heading.d.mts +6 -5
- package/dist/heading.d.ts +6 -5
- package/dist/heading.js +6 -4
- package/dist/heading.js.map +1 -1
- package/dist/heading.mjs +6 -4
- package/dist/heading.mjs.map +1 -1
- package/dist/hover-card.d.mts +4 -1
- package/dist/hover-card.d.ts +4 -1
- package/dist/hover-card.js.map +1 -1
- package/dist/hover-card.mjs.map +1 -1
- package/dist/input-otp.d.mts +12 -32
- package/dist/input-otp.d.ts +12 -32
- package/dist/input-otp.js +30 -22
- package/dist/input-otp.js.map +1 -1
- package/dist/input-otp.mjs +29 -21
- package/dist/input-otp.mjs.map +1 -1
- package/dist/input.d.mts +6 -3
- package/dist/input.d.ts +6 -3
- package/dist/input.js +13 -11
- package/dist/input.js.map +1 -1
- package/dist/input.mjs +13 -11
- package/dist/input.mjs.map +1 -1
- package/dist/kbd.d.mts +5 -4
- package/dist/kbd.d.ts +5 -4
- package/dist/kbd.js +16 -14
- package/dist/kbd.js.map +1 -1
- package/dist/kbd.mjs +16 -14
- package/dist/kbd.mjs.map +1 -1
- package/dist/label.d.mts +2 -1
- package/dist/label.d.ts +2 -1
- package/dist/label.js +2 -2
- package/dist/label.mjs +1 -1
- package/dist/menubar.d.mts +27 -12
- package/dist/menubar.d.ts +27 -12
- package/dist/menubar.js.map +1 -1
- package/dist/menubar.mjs.map +1 -1
- package/dist/navigation-menu.d.mts +9 -1
- package/dist/navigation-menu.d.ts +9 -1
- package/dist/navigation-menu.js.map +1 -1
- package/dist/navigation-menu.mjs.map +1 -1
- package/dist/pagination.d.mts +13 -7
- package/dist/pagination.d.ts +13 -7
- package/dist/pagination.js +5 -3
- package/dist/pagination.js.map +1 -1
- package/dist/pagination.mjs +4 -2
- package/dist/pagination.mjs.map +1 -1
- package/dist/popover.d.mts +6 -1
- package/dist/popover.d.ts +6 -1
- package/dist/popover.js.map +1 -1
- package/dist/popover.mjs.map +1 -1
- package/dist/pre.d.mts +5 -4
- package/dist/pre.d.ts +5 -4
- package/dist/pre.js +6 -4
- package/dist/pre.js.map +1 -1
- package/dist/pre.mjs +6 -4
- package/dist/pre.mjs.map +1 -1
- package/dist/progress.d.mts +2 -1
- package/dist/progress.d.ts +2 -1
- package/dist/progress.js +1 -1
- package/dist/progress.js.map +1 -1
- package/dist/progress.mjs +1 -1
- package/dist/progress.mjs.map +1 -1
- package/dist/quote.d.mts +5 -4
- package/dist/quote.d.ts +5 -4
- package/dist/quote.js +6 -4
- package/dist/quote.js.map +1 -1
- package/dist/quote.mjs +6 -4
- package/dist/quote.mjs.map +1 -1
- package/dist/radio-group.d.mts +3 -1
- package/dist/radio-group.d.ts +3 -1
- package/dist/radio-group.js.map +1 -1
- package/dist/radio-group.mjs.map +1 -1
- package/dist/resizable.d.mts +4 -4
- package/dist/resizable.d.ts +4 -4
- package/dist/resizable.js +1 -1
- package/dist/resizable.js.map +1 -1
- package/dist/resizable.mjs +1 -1
- package/dist/resizable.mjs.map +1 -1
- package/dist/scroll-area.d.mts +4 -2
- package/dist/scroll-area.d.ts +4 -2
- package/dist/scroll-area.js +6 -6
- package/dist/scroll-area.js.map +1 -1
- package/dist/scroll-area.mjs +6 -6
- package/dist/scroll-area.mjs.map +1 -1
- package/dist/section.d.mts +5 -4
- package/dist/section.d.ts +5 -4
- package/dist/section.js +6 -4
- package/dist/section.js.map +1 -1
- package/dist/section.mjs +6 -4
- package/dist/section.mjs.map +1 -1
- package/dist/select.d.mts +11 -1
- package/dist/select.d.ts +11 -1
- package/dist/select.js +2 -2
- package/dist/select.mjs +1 -1
- package/dist/separator.d.mts +2 -1
- package/dist/separator.d.ts +2 -1
- package/dist/separator.js.map +1 -1
- package/dist/separator.mjs.map +1 -1
- package/dist/sheet.d.mts +18 -8
- package/dist/sheet.d.ts +18 -8
- package/dist/sheet.js.map +1 -1
- package/dist/sheet.mjs.map +1 -1
- package/dist/skeleton.d.mts +3 -2
- package/dist/skeleton.d.ts +3 -2
- package/dist/skeleton.js +1 -4
- package/dist/skeleton.js.map +1 -1
- package/dist/skeleton.mjs +1 -4
- package/dist/skeleton.mjs.map +1 -1
- package/dist/slider.d.mts +2 -1
- package/dist/slider.d.ts +2 -1
- package/dist/slider.js.map +1 -1
- package/dist/slider.mjs.map +1 -1
- package/dist/sonner.d.mts +1 -1
- package/dist/sonner.d.ts +1 -1
- package/dist/sonner.js.map +1 -1
- package/dist/sonner.mjs.map +1 -1
- package/dist/strong.d.mts +5 -4
- package/dist/strong.d.ts +5 -4
- package/dist/strong.js +6 -4
- package/dist/strong.js.map +1 -1
- package/dist/strong.mjs +6 -4
- package/dist/strong.mjs.map +1 -1
- package/dist/switch.d.mts +2 -1
- package/dist/switch.d.ts +2 -1
- package/dist/switch.js.map +1 -1
- package/dist/switch.mjs.map +1 -1
- package/dist/table.d.mts +17 -9
- package/dist/table.d.ts +17 -9
- package/dist/table.js +75 -58
- package/dist/table.js.map +1 -1
- package/dist/table.mjs +75 -58
- package/dist/table.mjs.map +1 -1
- package/dist/tabs.d.mts +5 -1
- package/dist/tabs.d.ts +5 -1
- package/dist/tabs.js.map +1 -1
- package/dist/tabs.mjs.map +1 -1
- package/dist/text.d.mts +1 -1
- package/dist/text.d.ts +1 -1
- package/dist/text.js.map +1 -1
- package/dist/text.mjs.map +1 -1
- package/dist/textarea.d.mts +3 -2
- package/dist/textarea.d.ts +3 -2
- package/dist/textarea.js +15 -13
- package/dist/textarea.js.map +1 -1
- package/dist/textarea.mjs +15 -13
- package/dist/textarea.mjs.map +1 -1
- package/dist/toggle-group.d.mts +4 -2
- package/dist/toggle-group.d.ts +4 -2
- package/dist/toggle-group.js +2 -2
- package/dist/toggle-group.js.map +1 -1
- package/dist/toggle-group.mjs +1 -1
- package/dist/toggle-group.mjs.map +1 -1
- package/dist/toggle.d.mts +2 -1
- package/dist/toggle.d.ts +2 -1
- package/dist/toggle.js +2 -2
- package/dist/toggle.mjs +1 -1
- package/dist/tooltip.d.mts +6 -1
- package/dist/tooltip.d.ts +6 -1
- package/dist/tooltip.js.map +1 -1
- package/dist/tooltip.mjs.map +1 -1
- package/package.json +6 -6
- package/src/accordion.tsx +17 -4
- package/src/alert-dialog.tsx +26 -7
- package/src/alert.tsx +35 -25
- package/src/aspect-ratio.tsx +2 -1
- package/src/avatar.tsx +13 -3
- package/src/badge.tsx +6 -3
- package/src/blockquote.tsx +11 -10
- package/src/box.tsx +1 -1
- package/src/breadcrumb.tsx +70 -60
- package/src/button.tsx +4 -2
- package/src/calendar.tsx +3 -2
- package/src/card.tsx +59 -52
- package/src/carousel.tsx +76 -72
- package/src/checkbox.tsx +3 -2
- package/src/code.tsx +10 -8
- package/src/collapsible.tsx +11 -1
- package/src/command.tsx +47 -10
- package/src/container.tsx +10 -10
- package/src/context-menu.tsx +52 -16
- package/src/data-table.tsx +23 -11
- package/src/dialog.tsx +21 -5
- package/src/drawer.tsx +28 -6
- package/src/dropdown-menu.tsx +51 -15
- package/src/em.tsx +10 -8
- package/src/form.tsx +55 -38
- package/src/heading.tsx +11 -11
- package/src/hover-card.tsx +12 -2
- package/src/input-otp.tsx +45 -33
- package/src/input.tsx +17 -15
- package/src/kbd.tsx +19 -17
- package/src/label.tsx +3 -2
- package/src/menubar.tsx +48 -17
- package/src/navigation-menu.tsx +25 -5
- package/src/pagination.tsx +21 -9
- package/src/popover.tsx +18 -2
- package/src/pre.tsx +10 -8
- package/src/progress.tsx +4 -3
- package/src/quote.tsx +10 -8
- package/src/radio-group.tsx +10 -3
- package/src/resizable.tsx +2 -1
- package/src/scroll-area.tsx +18 -11
- package/src/section.tsx +10 -10
- package/src/select.tsx +27 -7
- package/src/separator.tsx +3 -2
- package/src/sheet.tsx +23 -5
- package/src/skeleton.tsx +3 -5
- package/src/slider.tsx +3 -2
- package/src/sonner.tsx +1 -1
- package/src/strong.tsx +10 -8
- package/src/switch.tsx +3 -2
- package/src/table.tsx +90 -78
- package/src/tabs.tsx +17 -4
- package/src/text.tsx +1 -1
- package/src/textarea.tsx +16 -16
- package/src/toggle-group.tsx +14 -4
- package/src/toggle.tsx +3 -2
- package/src/tooltip.tsx +12 -2
- package/dist/chunk-2D7SRYKN.js.map +0 -1
- package/dist/chunk-EDVCMWDT.mjs.map +0 -1
- package/dist/chunk-EIHWTXQ4.mjs.map +0 -1
- package/dist/chunk-ESWGFN3R.mjs.map +0 -1
- package/dist/chunk-KW5FJ62U.mjs.map +0 -1
- package/dist/chunk-LDYBRDAY.js.map +0 -1
- package/dist/chunk-OCLLX7EY.js.map +0 -1
- package/dist/chunk-PTD4AMHI.mjs.map +0 -1
- package/dist/chunk-RTKEO347.js.map +0 -1
package/dist/input-otp.mjs
CHANGED
|
@@ -9,6 +9,8 @@ import { DotFilledIcon } from "@radix-ui/react-icons";
|
|
|
9
9
|
import {
|
|
10
10
|
OTPInput,
|
|
11
11
|
OTPInputContext,
|
|
12
|
+
REGEXP_ONLY_CHARS,
|
|
13
|
+
REGEXP_ONLY_DIGITS,
|
|
12
14
|
REGEXP_ONLY_DIGITS_AND_CHARS
|
|
13
15
|
} from "input-otp";
|
|
14
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -25,28 +27,32 @@ var InputOTP = React.forwardRef(({ className, containerClassName, ...props }, re
|
|
|
25
27
|
}
|
|
26
28
|
));
|
|
27
29
|
InputOTP.displayName = "InputOTP";
|
|
28
|
-
var InputOTPGroup = React.forwardRef(
|
|
30
|
+
var InputOTPGroup = React.forwardRef(
|
|
31
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center", className), ...props })
|
|
32
|
+
);
|
|
29
33
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
30
|
-
var InputOTPSlot = React.forwardRef(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
var InputOTPSlot = React.forwardRef(
|
|
35
|
+
({ index, className, ...props }, ref) => {
|
|
36
|
+
const inputOTPContext = React.useContext(OTPInputContext);
|
|
37
|
+
const slot = inputOTPContext.slots[index];
|
|
38
|
+
return /* @__PURE__ */ jsxs(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
ref,
|
|
42
|
+
className: cn(
|
|
43
|
+
"border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
44
|
+
slot?.isActive && "ring-ring z-10 ring-2",
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
...props,
|
|
48
|
+
children: [
|
|
49
|
+
slot?.char,
|
|
50
|
+
slot?.hasFakeCaret ? /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) }) : null
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
);
|
|
50
56
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
51
57
|
var InputOTPSeparator = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx(DotFilledIcon, {}) }));
|
|
52
58
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
@@ -55,6 +61,8 @@ export {
|
|
|
55
61
|
InputOTPGroup,
|
|
56
62
|
InputOTPSeparator,
|
|
57
63
|
InputOTPSlot,
|
|
64
|
+
REGEXP_ONLY_CHARS,
|
|
65
|
+
REGEXP_ONLY_DIGITS,
|
|
58
66
|
REGEXP_ONLY_DIGITS_AND_CHARS
|
|
59
67
|
};
|
|
60
68
|
//# sourceMappingURL=input-otp.mjs.map
|
package/dist/input-otp.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/input-otp.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { DotFilledIcon } from \"@radix-ui/react-icons\";\nimport {\n OTPInput,\n OTPInputContext,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n} from \"input-otp\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: InputOtp\n * -------------------------------------------------------------------------- */\n\nconst InputOTP = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n
|
|
1
|
+
{"version":3,"sources":["../src/input-otp.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { DotFilledIcon } from \"@radix-ui/react-icons\";\nimport {\n OTPInput,\n OTPInputContext,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n} from \"input-otp\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: InputOtp\n * -------------------------------------------------------------------------- */\n\ntype InputOTPProps = React.ComponentPropsWithoutRef<typeof OTPInput>;\nconst InputOTP = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n InputOTPProps\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n \"flex items-center gap-2 has-[:disabled]:opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n));\nInputOTP.displayName = \"InputOTP\";\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPGroup\n * -------------------------------------------------------------------------- */\n\ntype InputOTPGroupProps = React.HTMLAttributes<HTMLDivElement>;\nconst InputOTPGroup = React.forwardRef<HTMLDivElement, InputOTPGroupProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex items-center\", className)} {...props} />\n ),\n);\nInputOTPGroup.displayName = \"InputOTPGroup\";\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSlot\n * -------------------------------------------------------------------------- */\n\ninterface InputOTPSlotProps extends React.HTMLAttributes<HTMLDivElement> {\n index: number;\n}\nconst InputOTPSlot = React.forwardRef<HTMLDivElement, InputOTPSlotProps>(\n ({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const slot = inputOTPContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n \"border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md\",\n slot?.isActive && \"ring-ring z-10 ring-2\",\n className,\n )}\n {...props}\n >\n {slot?.char}\n {slot?.hasFakeCaret ? (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n ) : null}\n </div>\n );\n },\n);\nInputOTPSlot.displayName = \"InputOTPSlot\";\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSeparator\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSeparatorProps = React.HTMLAttributes<HTMLDivElement>;\nconst InputOTPSeparator = React.forwardRef<\n HTMLDivElement,\n InputOTPSeparatorProps\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <DotFilledIcon />\n </div>\n));\nInputOTPSeparator.displayName = \"InputOTPSeparator\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSlot,\n InputOTPSeparator,\n type InputOTPProps,\n type InputOTPGroupProps,\n type InputOTPSlotProps,\n type InputOTPSeparatorProps,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n};\n"],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAYL,cAqCI,YArCJ;AAJF,IAAM,WAAiB,iBAGrB,CAAC,EAAE,WAAW,oBAAoB,GAAG,MAAM,GAAG,QAC9C;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,MACA;AAAA,IACF;AAAA,IACA,WAAW,GAAG,+BAA+B,SAAS;AAAA,IACrD,GAAG;AAAA;AACN,CACD;AACD,SAAS,cAAc;AAOvB,IAAM,gBAAsB;AAAA,EAC1B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAC,SAAI,KAAU,WAAW,GAAG,qBAAqB,SAAS,GAAI,GAAG,OAAO;AAE7E;AACA,cAAc,cAAc;AAS5B,IAAM,eAAqB;AAAA,EACzB,CAAC,EAAE,OAAO,WAAW,GAAG,MAAM,GAAG,QAAQ;AACvC,UAAM,kBAAwB,iBAAW,eAAe;AACxD,UAAM,OAAO,gBAAgB,MAAM,KAAK;AAExC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA,MAAM,YAAY;AAAA,UAClB;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEH;AAAA,gBAAM;AAAA,UACN,MAAM,eACL,oBAAC,SAAI,WAAU,yEACb,8BAAC,SAAI,WAAU,4DAA2D,GAC5E,IACE;AAAA;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,aAAa,cAAc;AAO3B,IAAM,oBAA0B,iBAG9B,CAAC,EAAE,GAAG,MAAM,GAAG,QACf,oBAAC,SAAI,KAAU,MAAK,aAAa,GAAG,OAClC,8BAAC,iBAAc,GACjB,CACD;AACD,kBAAkB,cAAc;","names":[]}
|
package/dist/input.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { VariantProps } from 'cva';
|
|
3
3
|
|
|
4
|
-
declare const
|
|
4
|
+
declare const inputVariants: (props?: ({
|
|
5
5
|
inputSize?: "default" | "xs" | "sm" | "lg" | undefined;
|
|
6
6
|
} & ({
|
|
7
7
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
|
|
@@ -57,6 +57,9 @@ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttribu
|
|
|
57
57
|
} | null | undefined)[] | {
|
|
58
58
|
[x: string]: any;
|
|
59
59
|
} | null | undefined;
|
|
60
|
-
})) | undefined) => string
|
|
60
|
+
})) | undefined) => string;
|
|
61
|
+
type InputVariantsProps = VariantProps<typeof inputVariants>;
|
|
62
|
+
type InputProps = React.InputHTMLAttributes<HTMLInputElement> & InputVariantsProps;
|
|
63
|
+
declare const Input: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & InputVariantsProps & React.RefAttributes<HTMLInputElement>>;
|
|
61
64
|
|
|
62
|
-
export { Input };
|
|
65
|
+
export { Input, type InputProps };
|
package/dist/input.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { VariantProps } from 'cva';
|
|
3
3
|
|
|
4
|
-
declare const
|
|
4
|
+
declare const inputVariants: (props?: ({
|
|
5
5
|
inputSize?: "default" | "xs" | "sm" | "lg" | undefined;
|
|
6
6
|
} & ({
|
|
7
7
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
|
|
@@ -57,6 +57,9 @@ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttribu
|
|
|
57
57
|
} | null | undefined)[] | {
|
|
58
58
|
[x: string]: any;
|
|
59
59
|
} | null | undefined;
|
|
60
|
-
})) | undefined) => string
|
|
60
|
+
})) | undefined) => string;
|
|
61
|
+
type InputVariantsProps = VariantProps<typeof inputVariants>;
|
|
62
|
+
type InputProps = React.InputHTMLAttributes<HTMLInputElement> & InputVariantsProps;
|
|
63
|
+
declare const Input: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & InputVariantsProps & React.RefAttributes<HTMLInputElement>>;
|
|
61
64
|
|
|
62
|
-
export { Input };
|
|
65
|
+
export { Input, type InputProps };
|
package/dist/input.js
CHANGED
|
@@ -19,17 +19,19 @@ var inputVariants = _chunkG3NP7M2Njs.cva.call(void 0, {
|
|
|
19
19
|
inputSize: "default"
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
var Input = React.forwardRef(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
var Input = React.forwardRef(
|
|
23
|
+
({ className, inputSize, ...props }, ref) => {
|
|
24
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
25
|
+
"input",
|
|
26
|
+
{
|
|
27
|
+
type: "text",
|
|
28
|
+
className: inputVariants({ className, inputSize }),
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
);
|
|
33
35
|
Input.displayName = "Input";
|
|
34
36
|
|
|
35
37
|
|
package/dist/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/input.tsx"],"names":[],"mappings":";;;;;AAAA,YAAY,WAAW;
|
|
1
|
+
{"version":3,"sources":["../src/input.tsx"],"names":[],"mappings":";;;;;AAAA,YAAY,WAAW;AAkCjB;AA1BN,IAAM,gBAAgB,IAAI;AAAA,EACxB,MAAM;AAAA,EACN,UAAU;AAAA,IACR,WAAW;AAAA,MACT,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,WAAW;AAAA,EACb;AACF,CAAC;AAUD,IAAM,QAAc;AAAA,EAClB,CAAC,EAAE,WAAW,WAAW,GAAG,MAAM,GAAG,QAAQ;AAC3C,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,WAAW,cAAc,EAAE,WAAW,UAAU,CAAC;AAAA,QACjD;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,MAAM,cAAc","sourcesContent":["import * as React from \"react\";\nimport { type VariantProps } from \"cva\";\nimport { cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst inputVariants = cva({\n base: \"border-input focus-visible:ring-ring focus-visible:ring-offset-background placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n variants: {\n inputSize: {\n default: \"h-10\",\n xs: \"h-8\",\n sm: \"h-9\",\n lg: \"h-11\",\n },\n },\n defaultVariants: {\n inputSize: \"default\",\n },\n});\n\ntype InputVariantsProps = VariantProps<typeof inputVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Input\n * -------------------------------------------------------------------------- */\n\ntype InputProps = React.InputHTMLAttributes<HTMLInputElement> &\n InputVariantsProps;\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, inputSize, ...props }, ref) => {\n return (\n <input\n type=\"text\"\n className={inputVariants({ className, inputSize })}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Input, type InputProps };\n"]}
|
package/dist/input.mjs
CHANGED
|
@@ -19,17 +19,19 @@ var inputVariants = cva({
|
|
|
19
19
|
inputSize: "default"
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
var Input = React.forwardRef(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
var Input = React.forwardRef(
|
|
23
|
+
({ className, inputSize, ...props }, ref) => {
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
"input",
|
|
26
|
+
{
|
|
27
|
+
type: "text",
|
|
28
|
+
className: inputVariants({ className, inputSize }),
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
);
|
|
33
35
|
Input.displayName = "Input";
|
|
34
36
|
export {
|
|
35
37
|
Input
|
package/dist/input.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/input.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { type VariantProps } from \"cva\";\nimport { cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst inputVariants = cva({\n base: \"border-input focus-visible:ring-ring focus-visible:ring-offset-background placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n variants: {\n inputSize: {\n default: \"h-10\",\n xs: \"h-8\",\n sm: \"h-9\",\n lg: \"h-11\",\n },\n },\n defaultVariants: {\n inputSize: \"default\",\n },\n});\n\n/* -----------------------------------------------------------------------------\n * Component: Input\n * -------------------------------------------------------------------------- */\n\
|
|
1
|
+
{"version":3,"sources":["../src/input.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { type VariantProps } from \"cva\";\nimport { cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst inputVariants = cva({\n base: \"border-input focus-visible:ring-ring focus-visible:ring-offset-background placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n variants: {\n inputSize: {\n default: \"h-10\",\n xs: \"h-8\",\n sm: \"h-9\",\n lg: \"h-11\",\n },\n },\n defaultVariants: {\n inputSize: \"default\",\n },\n});\n\ntype InputVariantsProps = VariantProps<typeof inputVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Input\n * -------------------------------------------------------------------------- */\n\ntype InputProps = React.InputHTMLAttributes<HTMLInputElement> &\n InputVariantsProps;\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, inputSize, ...props }, ref) => {\n return (\n <input\n type=\"text\"\n className={inputVariants({ className, inputSize })}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Input, type InputProps };\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AAkCjB;AA1BN,IAAM,gBAAgB,IAAI;AAAA,EACxB,MAAM;AAAA,EACN,UAAU;AAAA,IACR,WAAW;AAAA,MACT,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,WAAW;AAAA,EACb;AACF,CAAC;AAUD,IAAM,QAAc;AAAA,EAClB,CAAC,EAAE,WAAW,WAAW,GAAG,MAAM,GAAG,QAAQ;AAC3C,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,WAAW,cAAc,EAAE,WAAW,UAAU,CAAC;AAAA,QACjD;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":[]}
|
package/dist/kbd.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
asChild?: boolean
|
|
5
|
-
}
|
|
3
|
+
interface KbdProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const Kbd: React.ForwardRefExoticComponent<KbdProps & React.RefAttributes<HTMLElement>>;
|
|
6
7
|
|
|
7
|
-
export { Kbd };
|
|
8
|
+
export { Kbd, type KbdProps };
|
package/dist/kbd.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
asChild?: boolean
|
|
5
|
-
}
|
|
3
|
+
interface KbdProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const Kbd: React.ForwardRefExoticComponent<KbdProps & React.RefAttributes<HTMLElement>>;
|
|
6
7
|
|
|
7
|
-
export { Kbd };
|
|
8
|
+
export { Kbd, type KbdProps };
|
package/dist/kbd.js
CHANGED
|
@@ -6,20 +6,22 @@ var _chunkG3NP7M2Njs = require('./chunk-G3NP7M2N.js');
|
|
|
6
6
|
var _react = require('react'); var React = _interopRequireWildcard(_react);
|
|
7
7
|
var _reactslot = require('@radix-ui/react-slot');
|
|
8
8
|
var _jsxruntime = require('react/jsx-runtime');
|
|
9
|
-
var Kbd = React.forwardRef(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
var Kbd = React.forwardRef(
|
|
10
|
+
({ asChild, className, ...props }, ref) => {
|
|
11
|
+
const Comp = asChild ? _reactslot.Slot : "kbd";
|
|
12
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13
|
+
Comp,
|
|
14
|
+
{
|
|
15
|
+
ref,
|
|
16
|
+
className: _chunkG3NP7M2Njs.cn.call(void 0,
|
|
17
|
+
"bg-muted text-muted-foreground inline-flex h-5 select-none items-center gap-1 rounded border px-1.5 font-mono text-xs font-medium",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
20
|
+
...props
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
);
|
|
23
25
|
Kbd.displayName = "Kbd";
|
|
24
26
|
|
|
25
27
|
|
package/dist/kbd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/kbd.tsx"],"names":[],"mappings":";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;
|
|
1
|
+
{"version":3,"sources":["../src/kbd.tsx"],"names":[],"mappings":";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AAef;AALN,IAAM,MAAY;AAAA,EAChB,CAAC,EAAE,SAAS,WAAW,GAAG,MAAM,GAAG,QAAQ;AACzC,UAAM,OAAO,UAAU,OAAO;AAE9B,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,IAAI,cAAc","sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Kbd\n * -------------------------------------------------------------------------- */\n\ninterface KbdProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\nconst Kbd = React.forwardRef<HTMLElement, KbdProps>(\n ({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"kbd\";\n\n return (\n <Comp\n ref={ref}\n className={cn(\n \"bg-muted text-muted-foreground inline-flex h-5 select-none items-center gap-1 rounded border px-1.5 font-mono text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nKbd.displayName = \"Kbd\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Kbd, type KbdProps };\n"]}
|
package/dist/kbd.mjs
CHANGED
|
@@ -6,20 +6,22 @@ import {
|
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { Slot } from "@radix-ui/react-slot";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
var Kbd = React.forwardRef(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
var Kbd = React.forwardRef(
|
|
10
|
+
({ asChild, className, ...props }, ref) => {
|
|
11
|
+
const Comp = asChild ? Slot : "kbd";
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
Comp,
|
|
14
|
+
{
|
|
15
|
+
ref,
|
|
16
|
+
className: cn(
|
|
17
|
+
"bg-muted text-muted-foreground inline-flex h-5 select-none items-center gap-1 rounded border px-1.5 font-mono text-xs font-medium",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
20
|
+
...props
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
);
|
|
23
25
|
Kbd.displayName = "Kbd";
|
|
24
26
|
export {
|
|
25
27
|
Kbd
|
package/dist/kbd.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/kbd.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Kbd\n * -------------------------------------------------------------------------- */\n\
|
|
1
|
+
{"version":3,"sources":["../src/kbd.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Kbd\n * -------------------------------------------------------------------------- */\n\ninterface KbdProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\nconst Kbd = React.forwardRef<HTMLElement, KbdProps>(\n ({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"kbd\";\n\n return (\n <Comp\n ref={ref}\n className={cn(\n \"bg-muted text-muted-foreground inline-flex h-5 select-none items-center gap-1 rounded border px-1.5 font-mono text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nKbd.displayName = \"Kbd\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Kbd, type KbdProps };\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AAef;AALN,IAAM,MAAY;AAAA,EAChB,CAAC,EAAE,SAAS,WAAW,GAAG,MAAM,GAAG,QAAQ;AACzC,UAAM,OAAO,UAAU,OAAO;AAE9B,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,IAAI,cAAc;","names":[]}
|
package/dist/label.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
3
|
|
|
4
|
+
type LabelProps = LabelPrimitive.LabelProps;
|
|
4
5
|
declare const Label: React.ForwardRefExoticComponent<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
5
6
|
|
|
6
|
-
export { Label };
|
|
7
|
+
export { Label, type LabelProps };
|
package/dist/label.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
3
|
|
|
4
|
+
type LabelProps = LabelPrimitive.LabelProps;
|
|
4
5
|
declare const Label: React.ForwardRefExoticComponent<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
5
6
|
|
|
6
|
-
export { Label };
|
|
7
|
+
export { Label, type LabelProps };
|
package/dist/label.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkGRKABVK4js = require('./chunk-GRKABVK4.js');
|
|
5
5
|
require('./chunk-G3NP7M2N.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.Label =
|
|
8
|
+
exports.Label = _chunkGRKABVK4js.Label;
|
|
9
9
|
//# sourceMappingURL=label.js.map
|
package/dist/label.mjs
CHANGED
package/dist/menubar.d.mts
CHANGED
|
@@ -1,29 +1,44 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
3
3
|
|
|
4
|
+
type MenubarMenuProps = MenubarPrimitive.MenubarMenuProps;
|
|
4
5
|
declare const MenubarMenu: {
|
|
5
6
|
(props: MenubarPrimitive.ScopedProps<MenubarPrimitive.MenubarMenuProps>): JSX.Element;
|
|
6
7
|
displayName: string;
|
|
7
8
|
};
|
|
9
|
+
type MenubarGroupProps = MenubarPrimitive.MenubarGroupProps;
|
|
8
10
|
declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
type MenubarSubProps = MenubarPrimitive.MenubarSubProps;
|
|
9
12
|
declare const MenubarSub: React.FC<MenubarPrimitive.MenubarSubProps>;
|
|
13
|
+
type MenubarRadioGroupProps = MenubarPrimitive.MenubarRadioGroupProps;
|
|
10
14
|
declare const MenubarRadioGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
type MenubarProps = MenubarPrimitive.MenubarProps;
|
|
11
16
|
declare const Menubar: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
type MenubarTriggerProps = MenubarPrimitive.MenubarTriggerProps;
|
|
12
18
|
declare const MenubarTrigger: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
-
|
|
14
|
-
inset?: boolean
|
|
15
|
-
}
|
|
19
|
+
interface MenubarSubTriggerProps extends MenubarPrimitive.MenubarSubTriggerProps {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const MenubarSubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
type MenubarSubContentProps = MenubarPrimitive.MenubarSubContentProps;
|
|
16
24
|
declare const MenubarSubContent: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
type MenubarContentProps = MenubarPrimitive.MenubarContentProps;
|
|
17
26
|
declare const MenubarContent: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
|
|
19
|
-
inset?: boolean
|
|
20
|
-
}
|
|
27
|
+
interface MenubarItemProps extends MenubarPrimitive.MenubarItemProps {
|
|
28
|
+
inset?: boolean;
|
|
29
|
+
}
|
|
30
|
+
declare const MenubarItem: React.ForwardRefExoticComponent<MenubarItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
type MenubarCheckboxItemProps = MenubarPrimitive.MenubarCheckboxItemProps;
|
|
21
32
|
declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
type MenubarRadioItemProps = MenubarPrimitive.MenubarRadioItemProps;
|
|
22
34
|
declare const MenubarRadioItem: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
|
|
24
|
-
inset?: boolean
|
|
25
|
-
}
|
|
26
|
-
declare const
|
|
27
|
-
|
|
35
|
+
interface MenubarLabelProps extends MenubarPrimitive.MenubarLabelProps {
|
|
36
|
+
inset?: boolean;
|
|
37
|
+
}
|
|
38
|
+
declare const MenubarLabel: React.ForwardRefExoticComponent<MenubarLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
type MenubarSeparatorProps = MenubarPrimitive.MenubarSeparatorProps;
|
|
40
|
+
declare const MenubarSeparator: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
type MenubarShortcutProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
42
|
+
declare function MenubarShortcut({ className, ...props }: MenubarShortcutProps): React.JSX.Element;
|
|
28
43
|
|
|
29
|
-
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
44
|
+
export { Menubar, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarShortcut, type MenubarShortcutProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps };
|
package/dist/menubar.d.ts
CHANGED
|
@@ -1,29 +1,44 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
3
3
|
|
|
4
|
+
type MenubarMenuProps = MenubarPrimitive.MenubarMenuProps;
|
|
4
5
|
declare const MenubarMenu: {
|
|
5
6
|
(props: MenubarPrimitive.ScopedProps<MenubarPrimitive.MenubarMenuProps>): JSX.Element;
|
|
6
7
|
displayName: string;
|
|
7
8
|
};
|
|
9
|
+
type MenubarGroupProps = MenubarPrimitive.MenubarGroupProps;
|
|
8
10
|
declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
type MenubarSubProps = MenubarPrimitive.MenubarSubProps;
|
|
9
12
|
declare const MenubarSub: React.FC<MenubarPrimitive.MenubarSubProps>;
|
|
13
|
+
type MenubarRadioGroupProps = MenubarPrimitive.MenubarRadioGroupProps;
|
|
10
14
|
declare const MenubarRadioGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
type MenubarProps = MenubarPrimitive.MenubarProps;
|
|
11
16
|
declare const Menubar: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
type MenubarTriggerProps = MenubarPrimitive.MenubarTriggerProps;
|
|
12
18
|
declare const MenubarTrigger: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
-
|
|
14
|
-
inset?: boolean
|
|
15
|
-
}
|
|
19
|
+
interface MenubarSubTriggerProps extends MenubarPrimitive.MenubarSubTriggerProps {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const MenubarSubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
type MenubarSubContentProps = MenubarPrimitive.MenubarSubContentProps;
|
|
16
24
|
declare const MenubarSubContent: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
type MenubarContentProps = MenubarPrimitive.MenubarContentProps;
|
|
17
26
|
declare const MenubarContent: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
|
|
19
|
-
inset?: boolean
|
|
20
|
-
}
|
|
27
|
+
interface MenubarItemProps extends MenubarPrimitive.MenubarItemProps {
|
|
28
|
+
inset?: boolean;
|
|
29
|
+
}
|
|
30
|
+
declare const MenubarItem: React.ForwardRefExoticComponent<MenubarItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
type MenubarCheckboxItemProps = MenubarPrimitive.MenubarCheckboxItemProps;
|
|
21
32
|
declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
type MenubarRadioItemProps = MenubarPrimitive.MenubarRadioItemProps;
|
|
22
34
|
declare const MenubarRadioItem: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
|
|
24
|
-
inset?: boolean
|
|
25
|
-
}
|
|
26
|
-
declare const
|
|
27
|
-
|
|
35
|
+
interface MenubarLabelProps extends MenubarPrimitive.MenubarLabelProps {
|
|
36
|
+
inset?: boolean;
|
|
37
|
+
}
|
|
38
|
+
declare const MenubarLabel: React.ForwardRefExoticComponent<MenubarLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
type MenubarSeparatorProps = MenubarPrimitive.MenubarSeparatorProps;
|
|
40
|
+
declare const MenubarSeparator: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
type MenubarShortcutProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
42
|
+
declare function MenubarShortcut({ className, ...props }: MenubarShortcutProps): React.JSX.Element;
|
|
28
43
|
|
|
29
|
-
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
44
|
+
export { Menubar, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarShortcut, type MenubarShortcutProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps };
|
package/dist/menubar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/menubar.tsx"],"names":[],"mappings":"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","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\";\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarMenu\n * -------------------------------------------------------------------------- */\n\nconst MenubarMenu = MenubarPrimitive.Menu;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarGroup\n * -------------------------------------------------------------------------- */\n\nconst MenubarGroup = MenubarPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSub\n * -------------------------------------------------------------------------- */\n\nconst MenubarSub = MenubarPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioGroup\n * -------------------------------------------------------------------------- */\n\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: Menubar\n * -------------------------------------------------------------------------- */\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n MenubarPrimitive.MenubarProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"bg-background flex h-10 items-center space-x-1 rounded-md border p-1 shadow-sm\",\n className,\n )}\n {...props}\n />\n));\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarTrigger\n * -------------------------------------------------------------------------- */\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n MenubarPrimitive.MenubarTriggerProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium focus:outline-none\",\n className,\n )}\n {...props}\n />\n));\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubTrigger\n * -------------------------------------------------------------------------- */\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n MenubarPrimitive.MenubarSubTriggerProps & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </MenubarPrimitive.SubTrigger>\n));\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubContent\n * -------------------------------------------------------------------------- */\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n MenubarPrimitive.MenubarSubContentProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n));\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarContent\n * -------------------------------------------------------------------------- */\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n MenubarPrimitive.MenubarContentProps\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref,\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarItem\n * -------------------------------------------------------------------------- */\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n MenubarPrimitive.MenubarItemProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarCheckboxItem\n * -------------------------------------------------------------------------- */\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n MenubarPrimitive.MenubarCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n));\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioItem\n * -------------------------------------------------------------------------- */\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n MenubarPrimitive.MenubarRadioItemProps\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n));\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarLabel\n * -------------------------------------------------------------------------- */\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n MenubarPrimitive.MenubarLabelProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSeparator\n * -------------------------------------------------------------------------- */\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"bg-muted -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarShortcut\n * -------------------------------------------------------------------------- */\n\nfunction MenubarShortcut({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/menubar.tsx"],"names":[],"mappings":"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","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\";\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarMenu\n * -------------------------------------------------------------------------- */\n\ntype MenubarMenuProps = MenubarPrimitive.MenubarMenuProps;\nconst MenubarMenu = MenubarPrimitive.Menu;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarGroupProps = MenubarPrimitive.MenubarGroupProps;\nconst MenubarGroup = MenubarPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSub\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubProps = MenubarPrimitive.MenubarSubProps;\nconst MenubarSub = MenubarPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioGroupProps = MenubarPrimitive.MenubarRadioGroupProps;\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: Menubar\n * -------------------------------------------------------------------------- */\n\ntype MenubarProps = MenubarPrimitive.MenubarProps;\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n MenubarProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"bg-background flex h-10 items-center space-x-1 rounded-md border p-1 shadow-sm\",\n className,\n )}\n {...props}\n />\n));\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarTrigger\n * -------------------------------------------------------------------------- */\n\ntype MenubarTriggerProps = MenubarPrimitive.MenubarTriggerProps;\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n MenubarTriggerProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium focus:outline-none\",\n className,\n )}\n {...props}\n />\n));\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubTrigger\n * -------------------------------------------------------------------------- */\n\ninterface MenubarSubTriggerProps\n extends MenubarPrimitive.MenubarSubTriggerProps {\n inset?: boolean;\n}\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n MenubarSubTriggerProps\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </MenubarPrimitive.SubTrigger>\n));\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubContentProps = MenubarPrimitive.MenubarSubContentProps;\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n MenubarSubContentProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n));\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarContentProps = MenubarPrimitive.MenubarContentProps;\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n MenubarContentProps\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref,\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarItem\n * -------------------------------------------------------------------------- */\n\ninterface MenubarItemProps extends MenubarPrimitive.MenubarItemProps {\n inset?: boolean;\n}\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n MenubarItemProps\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarCheckboxItemProps = MenubarPrimitive.MenubarCheckboxItemProps;\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n MenubarCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n));\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioItemProps = MenubarPrimitive.MenubarRadioItemProps;\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n MenubarRadioItemProps\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n));\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarLabel\n * -------------------------------------------------------------------------- */\n\ninterface MenubarLabelProps extends MenubarPrimitive.MenubarLabelProps {\n inset?: boolean;\n}\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n MenubarLabelProps\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSeparator\n * -------------------------------------------------------------------------- */\n\ntype MenubarSeparatorProps = MenubarPrimitive.MenubarSeparatorProps;\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n MenubarSeparatorProps\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"bg-muted -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarShortcut\n * -------------------------------------------------------------------------- */\n\ntype MenubarShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\nfunction MenubarShortcut({\n className,\n ...props\n}: MenubarShortcutProps): React.JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n type MenubarProps,\n type MenubarMenuProps,\n type MenubarTriggerProps,\n type MenubarContentProps,\n type MenubarItemProps,\n type MenubarSeparatorProps,\n type MenubarLabelProps,\n type MenubarCheckboxItemProps,\n type MenubarRadioGroupProps,\n type MenubarRadioItemProps,\n type MenubarSubContentProps,\n type MenubarSubTriggerProps,\n type MenubarGroupProps,\n type MenubarSubProps,\n type MenubarShortcutProps,\n};\n"]}
|