@waveso/ui 0.0.10 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +24 -8
- package/dist/accordion.d.ts.map +1 -0
- package/dist/accordion.js +50 -73
- package/dist/accordion.js.map +1 -1
- package/dist/action-bar.d.ts +83 -0
- package/dist/action-bar.d.ts.map +1 -0
- package/dist/action-bar.js +264 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/alert-dialog.d.ts +56 -21
- package/dist/alert-dialog.d.ts.map +1 -0
- package/dist/alert-dialog.js +75 -127
- package/dist/alert-dialog.js.map +1 -1
- package/dist/alert.d.ts +26 -11
- package/dist/alert.d.ts.map +1 -0
- package/dist/alert.js +37 -68
- package/dist/alert.js.map +1 -1
- package/dist/animate.d.ts +117 -75
- package/dist/animate.d.ts.map +1 -0
- package/dist/animate.js +259 -223
- package/dist/animate.js.map +1 -1
- package/dist/aspect-ratio.d.ts +11 -6
- package/dist/aspect-ratio.d.ts.map +1 -0
- package/dist/aspect-ratio.js +12 -14
- package/dist/aspect-ratio.js.map +1 -1
- package/dist/autocomplete.d.ts +91 -25
- package/dist/autocomplete.d.ts.map +1 -0
- package/dist/autocomplete.js +119 -181
- package/dist/autocomplete.js.map +1 -1
- package/dist/avatar.d.ts +32 -11
- package/dist/avatar.d.ts.map +1 -0
- package/dist/avatar.js +42 -89
- package/dist/avatar.js.map +1 -1
- package/dist/badge.d.ts +15 -8
- package/dist/badge.d.ts.map +1 -0
- package/dist/badge.js +34 -48
- package/dist/badge.js.map +1 -1
- package/dist/breadcrumb.d.ts +35 -11
- package/dist/breadcrumb.d.ts.map +1 -0
- package/dist/breadcrumb.js +60 -110
- package/dist/breadcrumb.js.map +1 -1
- package/dist/button-group.d.ts +26 -13
- package/dist/button-group.d.ts.map +1 -0
- package/dist/button-group.js +38 -76
- package/dist/button-group.js.map +1 -1
- package/dist/button.d.ts +17 -10
- package/dist/button.d.ts.map +1 -0
- package/dist/button.js +50 -3
- package/dist/button.js.map +1 -1
- package/dist/card.d.ts +35 -11
- package/dist/card.d.ts.map +1 -0
- package/dist/card.js +43 -82
- package/dist/card.js.map +1 -1
- package/dist/checkbox.d.ts +6 -4
- package/dist/checkbox.d.ts.map +1 -0
- package/dist/checkbox.js +21 -29
- package/dist/checkbox.js.map +1 -1
- package/dist/collapsible.d.ts +15 -7
- package/dist/collapsible.d.ts.map +1 -0
- package/dist/collapsible.js +19 -8
- package/dist/collapsible.js.map +1 -1
- package/dist/combobox.d.ts +83 -23
- package/dist/combobox.d.ts.map +1 -0
- package/dist/combobox.js +149 -247
- package/dist/combobox.js.map +1 -1
- package/dist/context-menu.d.ts +80 -26
- package/dist/context-menu.d.ts.map +1 -0
- package/dist/context-menu.js +108 -164
- package/dist/context-menu.js.map +1 -1
- package/dist/count.d.ts +45 -31
- package/dist/count.d.ts.map +1 -0
- package/dist/count.js +170 -165
- package/dist/count.js.map +1 -1
- package/dist/dialog.d.ts +61 -28
- package/dist/dialog.d.ts.map +1 -0
- package/dist/dialog.js +77 -120
- package/dist/dialog.js.map +1 -1
- package/dist/direction.d.ts +2 -1
- package/dist/direction.js +3 -3
- package/dist/drawer.d.ts +45 -15
- package/dist/drawer.d.ts.map +1 -0
- package/dist/drawer.js +93 -5
- package/dist/drawer.js.map +1 -1
- package/dist/encrypted-text.d.ts +25 -12
- package/dist/encrypted-text.d.ts.map +1 -0
- package/dist/encrypted-text.js +102 -134
- package/dist/encrypted-text.js.map +1 -1
- package/dist/field.d.ts +37 -21
- package/dist/field.d.ts.map +1 -0
- package/dist/field.js +52 -3
- package/dist/field.js.map +1 -1
- package/dist/film-grain-shader.d.ts +6 -0
- package/dist/film-grain-shader.d.ts.map +1 -0
- package/dist/film-grain-shader.js +88 -0
- package/dist/film-grain-shader.js.map +1 -0
- package/dist/film-grain-webgl.d.ts +20 -0
- package/dist/film-grain-webgl.d.ts.map +1 -0
- package/dist/film-grain-webgl.js +306 -0
- package/dist/film-grain-webgl.js.map +1 -0
- package/dist/film-grain.d.ts +21 -11
- package/dist/film-grain.d.ts.map +1 -0
- package/dist/film-grain.js +28 -420
- package/dist/film-grain.js.map +1 -1
- package/dist/form.d.ts +64 -49
- package/dist/form.d.ts.map +1 -0
- package/dist/form.js +112 -91
- package/dist/form.js.map +1 -1
- package/dist/gradient-reveal-text.d.ts +35 -22
- package/dist/gradient-reveal-text.d.ts.map +1 -0
- package/dist/gradient-reveal-text.js +238 -205
- package/dist/gradient-reveal-text.js.map +1 -1
- package/dist/hooks/use-mobile.d.ts +3 -1
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +28 -2
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/infinite-scroll.d.ts +29 -15
- package/dist/infinite-scroll.d.ts.map +1 -0
- package/dist/infinite-scroll.js +69 -99
- package/dist/infinite-scroll.js.map +1 -1
- package/dist/input-group.d.ts +41 -18
- package/dist/input-group.d.ts.map +1 -0
- package/dist/input-group.js +80 -6
- package/dist/input-group.js.map +1 -1
- package/dist/input-otp.d.ts +26 -10
- package/dist/input-otp.d.ts.map +1 -0
- package/dist/input-otp.js +40 -70
- package/dist/input-otp.js.map +1 -1
- package/dist/input.d.ts +10 -4
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +16 -3
- package/dist/input.js.map +1 -1
- package/dist/item.d.ts +58 -23
- package/dist/item.d.ts.map +1 -0
- package/dist/item.js +102 -160
- package/dist/item.js.map +1 -1
- package/dist/kbd.d.ts +12 -4
- package/dist/kbd.d.ts.map +1 -0
- package/dist/kbd.js +15 -24
- package/dist/kbd.js.map +1 -1
- package/dist/label.d.ts +9 -4
- package/dist/label.d.ts.map +1 -0
- package/dist/label.js +12 -16
- package/dist/label.js.map +1 -1
- package/dist/lib/focus.d.ts +42 -0
- package/dist/lib/focus.d.ts.map +1 -0
- package/dist/lib/focus.js +21 -0
- package/dist/lib/focus.js.map +1 -0
- package/dist/lib/internal-icons.d.ts +32 -0
- package/dist/lib/internal-icons.d.ts.map +1 -0
- package/dist/lib/internal-icons.js +222 -0
- package/dist/lib/internal-icons.js.map +1 -0
- package/dist/lib/utils.d.ts +4 -2
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +12 -2
- package/dist/lib/utils.js.map +1 -1
- package/dist/masonry.d.ts +25 -11
- package/dist/masonry.d.ts.map +1 -0
- package/dist/masonry.js +188 -229
- package/dist/masonry.js.map +1 -1
- package/dist/menu.d.ts +84 -26
- package/dist/menu.d.ts.map +1 -0
- package/dist/menu.js +141 -4
- package/dist/menu.js.map +1 -1
- package/dist/menubar.d.ts +60 -22
- package/dist/menubar.d.ts.map +1 -0
- package/dist/menubar.js +80 -52
- package/dist/menubar.js.map +1 -1
- package/dist/pagination.d.ts +38 -17
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +68 -107
- package/dist/pagination.js.map +1 -1
- package/dist/popover.d.ts +56 -14
- package/dist/popover.d.ts.map +1 -0
- package/dist/popover.js +62 -87
- package/dist/popover.js.map +1 -1
- package/dist/preview-card.d.ts +28 -9
- package/dist/preview-card.d.ts.map +1 -0
- package/dist/preview-card.js +40 -60
- package/dist/preview-card.js.map +1 -1
- package/dist/progress.d.ts +28 -9
- package/dist/progress.d.ts.map +1 -0
- package/dist/progress.js +35 -60
- package/dist/progress.js.map +1 -1
- package/dist/radio-group.d.ts +14 -8
- package/dist/radio-group.d.ts.map +1 -0
- package/dist/radio-group.js +18 -22
- package/dist/radio-group.js.map +1 -1
- package/dist/radio.d.ts +14 -6
- package/dist/radio.d.ts.map +1 -0
- package/dist/radio.js +24 -3
- package/dist/radio.js.map +1 -1
- package/dist/scroll-area.d.ts +16 -6
- package/dist/scroll-area.d.ts.map +1 -0
- package/dist/scroll-area.js +34 -55
- package/dist/scroll-area.js.map +1 -1
- package/dist/select.d.ts +66 -18
- package/dist/select.d.ts.map +1 -0
- package/dist/select.js +105 -185
- package/dist/select.js.map +1 -1
- package/dist/separator.d.ts +11 -5
- package/dist/separator.d.ts.map +1 -0
- package/dist/separator.js +17 -3
- package/dist/separator.js.map +1 -1
- package/dist/sidebar.d.ts +172 -79
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.js +363 -585
- package/dist/sidebar.js.map +1 -1
- package/dist/skeleton.d.ts +8 -3
- package/dist/skeleton.d.ts.map +1 -0
- package/dist/skeleton.js +13 -3
- package/dist/skeleton.js.map +1 -1
- package/dist/slider.d.ts +16 -6
- package/dist/slider.d.ts.map +1 -0
- package/dist/slider.js +40 -67
- package/dist/slider.js.map +1 -1
- package/dist/spinner.d.ts +8 -3
- package/dist/spinner.d.ts.map +1 -0
- package/dist/spinner.js +15 -4
- package/dist/spinner.js.map +1 -1
- package/dist/switch.d.ts +12 -6
- package/dist/switch.d.ts.map +1 -0
- package/dist/switch.js +18 -25
- package/dist/switch.js.map +1 -1
- package/dist/table.d.ts +37 -11
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +51 -88
- package/dist/table.js.map +1 -1
- package/dist/tabs.d.ts +28 -12
- package/dist/tabs.d.ts.map +1 -0
- package/dist/tabs.js +40 -74
- package/dist/tabs.js.map +1 -1
- package/dist/textarea.d.ts +13 -6
- package/dist/textarea.d.ts.map +1 -0
- package/dist/textarea.js +19 -3
- package/dist/textarea.js.map +1 -1
- package/dist/toast.d.ts +63 -39
- package/dist/toast.d.ts.map +1 -0
- package/dist/toast.js +177 -215
- package/dist/toast.js.map +1 -1
- package/dist/toggle-group.d.ts +26 -12
- package/dist/toggle-group.d.ts.map +1 -0
- package/dist/toggle-group.js +49 -73
- package/dist/toggle-group.js.map +1 -1
- package/dist/toggle.d.ts +17 -10
- package/dist/toggle.d.ts.map +1 -0
- package/dist/toggle.js +38 -3
- package/dist/toggle.js.map +1 -1
- package/dist/tooltip.d.ts +35 -14
- package/dist/tooltip.d.ts.map +1 -0
- package/dist/tooltip.js +52 -3
- package/dist/tooltip.js.map +1 -1
- package/dist/typewriter.d.ts +44 -31
- package/dist/typewriter.d.ts.map +1 -0
- package/dist/typewriter.js +185 -185
- package/dist/typewriter.js.map +1 -1
- package/package.json +6 -6
- package/dist/chunk-45VQAWIM.js +0 -228
- package/dist/chunk-45VQAWIM.js.map +0 -1
- package/dist/chunk-6Y7LPQMO.js +0 -11
- package/dist/chunk-6Y7LPQMO.js.map +0 -1
- package/dist/chunk-76UQO56T.js +0 -19
- package/dist/chunk-76UQO56T.js.map +0 -1
- package/dist/chunk-7F4MPMLJ.js +0 -17
- package/dist/chunk-7F4MPMLJ.js.map +0 -1
- package/dist/chunk-BKTJYX4M.js +0 -143
- package/dist/chunk-BKTJYX4M.js.map +0 -1
- package/dist/chunk-D5XPEJ6T.js +0 -36
- package/dist/chunk-D5XPEJ6T.js.map +0 -1
- package/dist/chunk-DIGOLJIR.js +0 -105
- package/dist/chunk-DIGOLJIR.js.map +0 -1
- package/dist/chunk-IQ7YQ5XA.js +0 -141
- package/dist/chunk-IQ7YQ5XA.js.map +0 -1
- package/dist/chunk-NCHHHWTB.js +0 -85
- package/dist/chunk-NCHHHWTB.js.map +0 -1
- package/dist/chunk-OUFYQLVN.js +0 -56
- package/dist/chunk-OUFYQLVN.js.map +0 -1
- package/dist/chunk-QFSEK4M6.js +0 -22
- package/dist/chunk-QFSEK4M6.js.map +0 -1
- package/dist/chunk-QRW37LRP.js +0 -25
- package/dist/chunk-QRW37LRP.js.map +0 -1
- package/dist/chunk-RPQHL6C5.js +0 -26
- package/dist/chunk-RPQHL6C5.js.map +0 -1
- package/dist/chunk-V4ZX4YCP.js +0 -66
- package/dist/chunk-V4ZX4YCP.js.map +0 -1
- package/dist/chunk-YTSQQTSF.js +0 -44
- package/dist/chunk-YTSQQTSF.js.map +0 -1
- package/dist/chunk-ZZZH3JGW.js +0 -23
- package/dist/chunk-ZZZH3JGW.js.map +0 -1
- package/dist/direction.js.map +0 -1
package/dist/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"input.js","names":["InputPrimitive"],"sources":["../src/input.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Input as InputPrimitive } from \"@base-ui/react/input\"\n\nimport { cn } from \"./lib/utils\"\n\ntype InputProps = React.ComponentProps<\"input\">\n\nfunction Input({ className, type, ...props }: InputProps) {\n return (\n <InputPrimitive\n type={type}\n data-slot=\"input\"\n className={cn(\n \"dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 file:text-foreground placeholder:text-muted-foreground h-8 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":";;;;;AAOA,SAAS,MAAM,EAAE,WAAW,MAAM,GAAG,SAAqB;AACxD,QACE,oBAACA,SAAD;EACQ;EACN,aAAU;EACV,WAAW,GACT,+oBACA,UACD;EACD,GAAI;EACJ,CAAA"}
|
package/dist/item.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import '@base-ui/react/separator';
|
|
1
|
+
import { Separator } from "./separator.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
8
7
|
|
|
8
|
+
//#region src/item.d.ts
|
|
9
9
|
declare const itemVariants: (props?: ({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} &
|
|
10
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
11
|
+
size?: "default" | "xs" | "sm" | null | undefined;
|
|
12
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
13
13
|
declare const itemMediaVariants: (props?: ({
|
|
14
|
-
|
|
15
|
-
} &
|
|
14
|
+
variant?: "default" | "icon" | "image" | null | undefined;
|
|
15
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
16
16
|
type ItemGroupProps = React.ComponentProps<"div">;
|
|
17
17
|
type ItemSeparatorProps = React.ComponentProps<typeof Separator>;
|
|
18
18
|
type ItemProps = useRender.ComponentProps<"div"> & VariantProps<typeof itemVariants>;
|
|
@@ -23,15 +23,50 @@ type ItemDescriptionProps = React.ComponentProps<"p">;
|
|
|
23
23
|
type ItemActionsProps = React.ComponentProps<"div">;
|
|
24
24
|
type ItemHeaderProps = React.ComponentProps<"div">;
|
|
25
25
|
type ItemFooterProps = React.ComponentProps<"div">;
|
|
26
|
-
declare function ItemGroup({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
declare function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
declare function
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
declare function ItemGroup({
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}: ItemGroupProps): _$react_jsx_runtime0.JSX.Element;
|
|
30
|
+
declare function ItemSeparator({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: ItemSeparatorProps): _$react_jsx_runtime0.JSX.Element;
|
|
34
|
+
declare function Item({
|
|
35
|
+
className,
|
|
36
|
+
variant,
|
|
37
|
+
size,
|
|
38
|
+
render,
|
|
39
|
+
...props
|
|
40
|
+
}: ItemProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
41
|
+
declare function ItemMedia({
|
|
42
|
+
className,
|
|
43
|
+
variant,
|
|
44
|
+
...props
|
|
45
|
+
}: ItemMediaProps): _$react_jsx_runtime0.JSX.Element;
|
|
46
|
+
declare function ItemContent({
|
|
47
|
+
className,
|
|
48
|
+
...props
|
|
49
|
+
}: ItemContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
50
|
+
declare function ItemTitle({
|
|
51
|
+
className,
|
|
52
|
+
...props
|
|
53
|
+
}: ItemTitleProps): _$react_jsx_runtime0.JSX.Element;
|
|
54
|
+
declare function ItemDescription({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}: ItemDescriptionProps): _$react_jsx_runtime0.JSX.Element;
|
|
58
|
+
declare function ItemActions({
|
|
59
|
+
className,
|
|
60
|
+
...props
|
|
61
|
+
}: ItemActionsProps): _$react_jsx_runtime0.JSX.Element;
|
|
62
|
+
declare function ItemHeader({
|
|
63
|
+
className,
|
|
64
|
+
...props
|
|
65
|
+
}: ItemHeaderProps): _$react_jsx_runtime0.JSX.Element;
|
|
66
|
+
declare function ItemFooter({
|
|
67
|
+
className,
|
|
68
|
+
...props
|
|
69
|
+
}: ItemFooterProps): _$react_jsx_runtime0.JSX.Element;
|
|
70
|
+
//#endregion
|
|
37
71
|
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
72
|
+
//# sourceMappingURL=item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.d.ts","names":[],"sources":["../src/item.tsx"],"mappings":";;;;;;;;cAQM,YAAA,GAAY,KAAA;;;IAoBjB,iCAAA,CAAA,SAAA;AAAA,cAEK,iBAAA,GAAiB,KAAA;;IActB,iCAAA,CAAA,SAAA;AAAA,KAEI,cAAA,GAAiB,KAAA,CAAM,cAAA;AAAA,KACvB,kBAAA,GAAqB,KAAA,CAAM,cAAA,QAAsB,SAAA;AAAA,KACjD,SAAA,GAAY,SAAA,CAAU,cAAA,UAAwB,YAAA,QAAoB,YAAA;AAAA,KAClE,cAAA,GAAiB,KAAA,CAAM,cAAA,UAAwB,YAAA,QAAoB,iBAAA;AAAA,KACnE,gBAAA,GAAmB,KAAA,CAAM,cAAA;AAAA,KACzB,cAAA,GAAiB,KAAA,CAAM,cAAA;AAAA,KACvB,oBAAA,GAAuB,KAAA,CAAM,cAAA;AAAA,KAC7B,gBAAA,GAAmB,KAAA,CAAM,cAAA;AAAA,KACzB,eAAA,GAAkB,KAAA,CAAM,cAAA;AAAA,KACxB,eAAA,GAAkB,KAAA,CAAM,cAAA;AAAA,iBAEpB,SAAA,CAAA;EAAY,SAAA;EAAA,GAAc;AAAA,GAAS,cAAA,GAAc,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAcjD,aAAA,CAAA;EAAgB,SAAA;EAAA,GAAc;AAAA,GAAS,kBAAA,GAAkB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAWzD,IAAA,CAAA;EACP,SAAA;EACA,OAAA;EACA,IAAA;EACA,MAAA;EAAA,GACG;AAAA,GACF,SAAA,GAAS,KAAA,CAAA,YAAA,mBAAA,KAAA,CAAA,qBAAA;AAAA,iBAkBH,SAAA,CAAA;EAAY,SAAA;EAAW,OAAA;EAAA,GAAwB;AAAA,GAAS,cAAA,GAAc,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAWtE,WAAA,CAAA;EAAc,SAAA;EAAA,GAAc;AAAA,GAAS,gBAAA,GAAgB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAarD,SAAA,CAAA;EAAY,SAAA;EAAA,GAAc;AAAA,GAAS,cAAA,GAAc,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAajD,eAAA,CAAA;EAAkB,SAAA;EAAA,GAAc;AAAA,GAAS,oBAAA,GAAoB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAa7D,WAAA,CAAA;EAAc,SAAA;EAAA,GAAc;AAAA,GAAS,gBAAA,GAAgB,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAUrD,UAAA,CAAA;EAAa,SAAA;EAAA,GAAc;AAAA,GAAS,eAAA,GAAe,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAanD,UAAA,CAAA;EAAa,SAAA;EAAA,GAAc;AAAA,GAAS,eAAA,GAAe,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/item.js
CHANGED
|
@@ -1,181 +1,123 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { cva } from
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
36
|
-
image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
defaultVariants: {
|
|
40
|
-
variant: "default"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
);
|
|
1
|
+
import { cn } from "./lib/utils.js";
|
|
2
|
+
import { Separator } from "./separator.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
8
|
+
//#region src/item.tsx
|
|
9
|
+
const itemVariants = cva("[a]:hover:bg-muted rounded-lg border text-sm w-full group/item focus-visible:border-ring focus-visible:ring-ring/50 flex items-center flex-wrap outline-none transition-colors duration-100 focus-visible:ring-3 [a]:transition-colors", {
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "border-transparent",
|
|
13
|
+
outline: "border-border",
|
|
14
|
+
muted: "bg-muted/50 border-transparent"
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
default: "gap-2.5 px-3 py-2.5",
|
|
18
|
+
sm: "gap-2.5 px-3 py-2.5",
|
|
19
|
+
xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default",
|
|
24
|
+
size: "default"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const itemMediaVariants = cva("gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none", {
|
|
28
|
+
variants: { variant: {
|
|
29
|
+
default: "bg-transparent",
|
|
30
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
31
|
+
image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
|
|
32
|
+
} },
|
|
33
|
+
defaultVariants: { variant: "default" }
|
|
34
|
+
});
|
|
44
35
|
function ItemGroup({ className, ...props }) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
|
|
52
|
-
className
|
|
53
|
-
),
|
|
54
|
-
...props
|
|
55
|
-
}
|
|
56
|
-
);
|
|
36
|
+
return /* @__PURE__ */ jsx("div", {
|
|
37
|
+
role: "list",
|
|
38
|
+
"data-slot": "item-group",
|
|
39
|
+
className: cn("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", className),
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
57
42
|
}
|
|
58
43
|
function ItemSeparator({ className, ...props }) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
...props
|
|
66
|
-
}
|
|
67
|
-
);
|
|
44
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
45
|
+
"data-slot": "item-separator",
|
|
46
|
+
orientation: "horizontal",
|
|
47
|
+
className: cn("my-2", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
68
50
|
}
|
|
69
|
-
function Item({
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
render,
|
|
85
|
-
state: {
|
|
86
|
-
slot: "item",
|
|
87
|
-
variant,
|
|
88
|
-
size
|
|
89
|
-
}
|
|
90
|
-
});
|
|
51
|
+
function Item({ className, variant = "default", size = "default", render, ...props }) {
|
|
52
|
+
return useRender({
|
|
53
|
+
defaultTagName: "div",
|
|
54
|
+
props: mergeProps({ className: cn(itemVariants({
|
|
55
|
+
variant,
|
|
56
|
+
size,
|
|
57
|
+
className
|
|
58
|
+
})) }, props),
|
|
59
|
+
render,
|
|
60
|
+
state: {
|
|
61
|
+
slot: "item",
|
|
62
|
+
variant,
|
|
63
|
+
size
|
|
64
|
+
}
|
|
65
|
+
});
|
|
91
66
|
}
|
|
92
67
|
function ItemMedia({ className, variant = "default", ...props }) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
68
|
+
return /* @__PURE__ */ jsx("div", {
|
|
69
|
+
"data-slot": "item-media",
|
|
70
|
+
"data-variant": variant,
|
|
71
|
+
className: cn(itemMediaVariants({
|
|
72
|
+
variant,
|
|
73
|
+
className
|
|
74
|
+
})),
|
|
75
|
+
...props
|
|
76
|
+
});
|
|
102
77
|
}
|
|
103
78
|
function ItemContent({ className, ...props }) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
|
|
110
|
-
className
|
|
111
|
-
),
|
|
112
|
-
...props
|
|
113
|
-
}
|
|
114
|
-
);
|
|
79
|
+
return /* @__PURE__ */ jsx("div", {
|
|
80
|
+
"data-slot": "item-content",
|
|
81
|
+
className: cn("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
|
|
82
|
+
...props
|
|
83
|
+
});
|
|
115
84
|
}
|
|
116
85
|
function ItemTitle({ className, ...props }) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
|
|
123
|
-
className
|
|
124
|
-
),
|
|
125
|
-
...props
|
|
126
|
-
}
|
|
127
|
-
);
|
|
86
|
+
return /* @__PURE__ */ jsx("div", {
|
|
87
|
+
"data-slot": "item-title",
|
|
88
|
+
className: cn("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
128
91
|
}
|
|
129
92
|
function ItemDescription({ className, ...props }) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
"text-muted-foreground [&>a:hover]:text-primary line-clamp-2 text-left text-sm leading-normal font-normal group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4",
|
|
136
|
-
className
|
|
137
|
-
),
|
|
138
|
-
...props
|
|
139
|
-
}
|
|
140
|
-
);
|
|
93
|
+
return /* @__PURE__ */ jsx("p", {
|
|
94
|
+
"data-slot": "item-description",
|
|
95
|
+
className: cn("text-muted-foreground [&>a:hover]:text-primary line-clamp-2 text-left text-sm leading-normal font-normal group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4", className),
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
141
98
|
}
|
|
142
99
|
function ItemActions({ className, ...props }) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
...props
|
|
149
|
-
}
|
|
150
|
-
);
|
|
100
|
+
return /* @__PURE__ */ jsx("div", {
|
|
101
|
+
"data-slot": "item-actions",
|
|
102
|
+
className: cn("flex items-center gap-2", className),
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
151
105
|
}
|
|
152
106
|
function ItemHeader({ className, ...props }) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
"flex basis-full items-center justify-between gap-2",
|
|
159
|
-
className
|
|
160
|
-
),
|
|
161
|
-
...props
|
|
162
|
-
}
|
|
163
|
-
);
|
|
107
|
+
return /* @__PURE__ */ jsx("div", {
|
|
108
|
+
"data-slot": "item-header",
|
|
109
|
+
className: cn("flex basis-full items-center justify-between gap-2", className),
|
|
110
|
+
...props
|
|
111
|
+
});
|
|
164
112
|
}
|
|
165
113
|
function ItemFooter({ className, ...props }) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"flex basis-full items-center justify-between gap-2",
|
|
172
|
-
className
|
|
173
|
-
),
|
|
174
|
-
...props
|
|
175
|
-
}
|
|
176
|
-
);
|
|
114
|
+
return /* @__PURE__ */ jsx("div", {
|
|
115
|
+
"data-slot": "item-footer",
|
|
116
|
+
className: cn("flex basis-full items-center justify-between gap-2", className),
|
|
117
|
+
...props
|
|
118
|
+
});
|
|
177
119
|
}
|
|
178
|
-
|
|
120
|
+
//#endregion
|
|
179
121
|
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
180
|
-
|
|
122
|
+
|
|
181
123
|
//# sourceMappingURL=item.js.map
|
package/dist/item.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"item.js","names":[],"sources":["../src/item.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"./lib/utils\"\nimport { Separator } from \"./separator\"\n\nconst itemVariants = cva(\n \"[a]:hover:bg-muted rounded-lg border text-sm w-full group/item focus-visible:border-ring focus-visible:ring-ring/50 flex items-center flex-wrap outline-none transition-colors duration-100 focus-visible:ring-3 [a]:transition-colors\",\n {\n variants: {\n variant: {\n default: \"border-transparent\",\n outline: \"border-border\",\n muted: \"bg-muted/50 border-transparent\",\n },\n size: {\n default: \"gap-2.5 px-3 py-2.5\",\n sm: \"gap-2.5 px-3 py-2.5\",\n xs: \"gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst itemMediaVariants = cva(\n \"gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"[&_svg:not([class*='size-'])]:size-4\",\n image: \"size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\ntype ItemGroupProps = React.ComponentProps<\"div\">\ntype ItemSeparatorProps = React.ComponentProps<typeof Separator>\ntype ItemProps = useRender.ComponentProps<\"div\"> & VariantProps<typeof itemVariants>\ntype ItemMediaProps = React.ComponentProps<\"div\"> & VariantProps<typeof itemMediaVariants>\ntype ItemContentProps = React.ComponentProps<\"div\">\ntype ItemTitleProps = React.ComponentProps<\"div\">\ntype ItemDescriptionProps = React.ComponentProps<\"p\">\ntype ItemActionsProps = React.ComponentProps<\"div\">\ntype ItemHeaderProps = React.ComponentProps<\"div\">\ntype ItemFooterProps = React.ComponentProps<\"div\">\n\nfunction ItemGroup({ className, ...props }: ItemGroupProps) {\n return (\n <div\n role=\"list\"\n data-slot=\"item-group\"\n className={cn(\n \"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemSeparator({ className, ...props }: ItemSeparatorProps) {\n return (\n <Separator\n data-slot=\"item-separator\"\n orientation=\"horizontal\"\n className={cn(\"my-2\", className)}\n {...props}\n />\n )\n}\n\nfunction Item({\n className,\n variant = \"default\",\n size = \"default\",\n render,\n ...props\n}: ItemProps) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(itemVariants({ variant, size, className })),\n },\n props\n ),\n render,\n state: {\n slot: \"item\",\n variant,\n size,\n },\n })\n}\n\nfunction ItemMedia({ className, variant = \"default\", ...props }: ItemMediaProps) {\n return (\n <div\n data-slot=\"item-media\"\n data-variant={variant}\n className={cn(itemMediaVariants({ variant, className }))}\n {...props}\n />\n )\n}\n\nfunction ItemContent({ className, ...props }: ItemContentProps) {\n return (\n <div\n data-slot=\"item-content\"\n className={cn(\n \"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemTitle({ className, ...props }: ItemTitleProps) {\n return (\n <div\n data-slot=\"item-title\"\n className={cn(\n \"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemDescription({ className, ...props }: ItemDescriptionProps) {\n return (\n <p\n data-slot=\"item-description\"\n className={cn(\n \"text-muted-foreground [&>a:hover]:text-primary line-clamp-2 text-left text-sm leading-normal font-normal group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemActions({ className, ...props }: ItemActionsProps) {\n return (\n <div\n data-slot=\"item-actions\"\n className={cn(\"flex items-center gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction ItemHeader({ className, ...props }: ItemHeaderProps) {\n return (\n <div\n data-slot=\"item-header\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemFooter({ className, ...props }: ItemFooterProps) {\n return (\n <div\n data-slot=\"item-footer\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Item,\n ItemMedia,\n ItemContent,\n ItemActions,\n ItemGroup,\n ItemSeparator,\n ItemTitle,\n ItemDescription,\n ItemHeader,\n ItemFooter,\n}\n"],"mappings":";;;;;;;;AAQA,MAAM,eAAe,IACnB,0OACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SAAS;GACT,OAAO;GACR;EACD,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GACL;EACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACP;CACF,CACF;AAED,MAAM,oBAAoB,IACxB,kMACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,MAAM;EACN,OAAO;EACR,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CACF;AAaD,SAAS,UAAU,EAAE,WAAW,GAAG,SAAyB;AAC1D,QACE,oBAAC,OAAD;EACE,MAAK;EACL,aAAU;EACV,WAAW,GACT,mGACA,UACD;EACD,GAAI;EACJ,CAAA;;AAIN,SAAS,cAAc,EAAE,WAAW,GAAG,SAA6B;AAClE,QACE,oBAAC,WAAD;EACE,aAAU;EACV,aAAY;EACZ,WAAW,GAAG,QAAQ,UAAU;EAChC,GAAI;EACJ,CAAA;;AAIN,SAAS,KAAK,EACZ,WACA,UAAU,WACV,OAAO,WACP,QACA,GAAG,SACS;AACZ,QAAO,UAAU;EACf,gBAAgB;EAChB,OAAO,WACL,EACE,WAAW,GAAG,aAAa;GAAE;GAAS;GAAM;GAAW,CAAC,CAAC,EAC1D,EACD,MACD;EACD;EACA,OAAO;GACL,MAAM;GACN;GACA;GACD;EACF,CAAC;;AAGJ,SAAS,UAAU,EAAE,WAAW,UAAU,WAAW,GAAG,SAAyB;AAC/E,QACE,oBAAC,OAAD;EACE,aAAU;EACV,gBAAc;EACd,WAAW,GAAG,kBAAkB;GAAE;GAAS;GAAW,CAAC,CAAC;EACxD,GAAI;EACJ,CAAA;;AAIN,SAAS,YAAY,EAAE,WAAW,GAAG,SAA2B;AAC9D,QACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,qGACA,UACD;EACD,GAAI;EACJ,CAAA;;AAIN,SAAS,UAAU,EAAE,WAAW,GAAG,SAAyB;AAC1D,QACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,kGACA,UACD;EACD,GAAI;EACJ,CAAA;;AAIN,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAA+B;AACtE,QACE,oBAAC,KAAD;EACE,aAAU;EACV,WAAW,GACT,uLACA,UACD;EACD,GAAI;EACJ,CAAA;;AAIN,SAAS,YAAY,EAAE,WAAW,GAAG,SAA2B;AAC9D,QACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,2BAA2B,UAAU;EACnD,GAAI;EACJ,CAAA;;AAIN,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;AAC5D,QACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,sDACA,UACD;EACD,GAAI;EACJ,CAAA;;AAIN,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;AAC5D,QACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,sDACA,UACD;EACD,GAAI;EACJ,CAAA"}
|
package/dist/kbd.d.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
|
+
//#region src/kbd.d.ts
|
|
3
4
|
type KbdProps = React.ComponentProps<"kbd">;
|
|
4
5
|
type KbdGroupProps = React.ComponentProps<"div">;
|
|
5
|
-
declare function Kbd({
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
declare function Kbd({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: KbdProps): _$react_jsx_runtime0.JSX.Element;
|
|
10
|
+
declare function KbdGroup({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}: KbdGroupProps): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
//#endregion
|
|
8
15
|
export { Kbd, KbdGroup, type KbdGroupProps, type KbdProps };
|
|
16
|
+
//# sourceMappingURL=kbd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.d.ts","names":[],"sources":["../src/kbd.tsx"],"mappings":";;;KAEK,QAAA,GAAW,KAAA,CAAM,cAAA;AAAA,KAEjB,aAAA,GAAgB,KAAA,CAAM,cAAA;AAAA,iBAElB,GAAA,CAAA;EAAM,SAAA;EAAA,GAAc;AAAA,GAAS,QAAA,GAAQ,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAarC,QAAA,CAAA;EAAW,SAAA;EAAA,GAAc;AAAA,GAAS,aAAA,GAAa,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/kbd.js
CHANGED
|
@@ -1,30 +1,21 @@
|
|
|
1
|
-
import { cn } from
|
|
2
|
-
import { jsx } from
|
|
3
|
-
|
|
1
|
+
import { cn } from "./lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/kbd.tsx
|
|
4
4
|
function Kbd({ className, ...props }) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none [&_svg:not([class*='size-'])]:size-3",
|
|
11
|
-
className
|
|
12
|
-
),
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
);
|
|
5
|
+
return /* @__PURE__ */ jsx("kbd", {
|
|
6
|
+
"data-slot": "kbd",
|
|
7
|
+
className: cn("bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none [&_svg:not([class*='size-'])]:size-3", className),
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
16
10
|
}
|
|
17
11
|
function KbdGroup({ className, ...props }) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
...props
|
|
24
|
-
}
|
|
25
|
-
);
|
|
12
|
+
return /* @__PURE__ */ jsx("div", {
|
|
13
|
+
"data-slot": "kbd-group",
|
|
14
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
26
17
|
}
|
|
27
|
-
|
|
18
|
+
//#endregion
|
|
28
19
|
export { Kbd, KbdGroup };
|
|
29
|
-
|
|
20
|
+
|
|
30
21
|
//# sourceMappingURL=kbd.js.map
|
package/dist/kbd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"kbd.js","names":[],"sources":["../src/kbd.tsx"],"sourcesContent":["import { cn } from \"./lib/utils\"\n\ntype KbdProps = React.ComponentProps<\"kbd\">\n\ntype KbdGroupProps = React.ComponentProps<\"div\">\n\nfunction Kbd({ className, ...props }: KbdProps) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n \"bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none [&_svg:not([class*='size-'])]:size-3\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction KbdGroup({ className, ...props }: KbdGroupProps) {\n return (\n <div\n data-slot=\"kbd-group\"\n className={cn(\"inline-flex items-center gap-1\", className)}\n {...props}\n />\n )\n}\n\nexport { Kbd, KbdGroup }\nexport type { KbdProps, KbdGroupProps }\n"],"mappings":";;;AAMA,SAAS,IAAI,EAAE,WAAW,GAAG,SAAmB;AAC9C,QACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,yWACA,UACD;EACD,GAAI;EACJ,CAAA;;AAIN,SAAS,SAAS,EAAE,WAAW,GAAG,SAAwB;AACxD,QACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,kCAAkC,UAAU;EAC1D,GAAI;EACJ,CAAA"}
|
package/dist/label.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
|
+
//#region src/label.d.ts
|
|
4
5
|
type LabelProps = React.ComponentProps<"label">;
|
|
5
|
-
declare function Label({
|
|
6
|
-
|
|
6
|
+
declare function Label({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: LabelProps): _$react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
7
11
|
export { Label };
|
|
12
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","names":[],"sources":["../src/label.tsx"],"mappings":";;;;KAMK,UAAA,GAAa,KAAA,CAAM,cAAA;AAAA,iBAEf,KAAA,CAAA;EAAQ,SAAA;EAAA,GAAc;AAAA,GAAS,UAAA,GAAU,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/label.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "./lib/utils.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/label.tsx
|
|
4
6
|
function Label({ className, ...props }) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
11
|
-
className
|
|
12
|
-
),
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
);
|
|
7
|
+
return /* @__PURE__ */ jsx("label", {
|
|
8
|
+
"data-slot": "label",
|
|
9
|
+
className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
16
12
|
}
|
|
17
|
-
|
|
13
|
+
//#endregion
|
|
18
14
|
export { Label };
|
|
19
|
-
|
|
15
|
+
|
|
20
16
|
//# sourceMappingURL=label.js.map
|
package/dist/label.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"label.js","names":[],"sources":["../src/label.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"./lib/utils\"\n\ntype LabelProps = React.ComponentProps<\"label\">\n\nfunction Label({ className, ...props }: LabelProps) {\n return (\n <label\n data-slot=\"label\"\n className={cn(\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n"],"mappings":";;;;;AAQA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAqB;AAClD,QACE,oBAAC,SAAD;EACE,aAAU;EACV,WAAW,GACT,uNACA,UACD;EACD,GAAI;EACJ,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Menu } from "@base-ui/react/menu";
|
|
3
|
+
|
|
4
|
+
//#region src/lib/focus.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* The full shape Base UI's `finalFocus` prop accepts on the
|
|
7
|
+
* Menu / Popover / ContextMenu popups (these primitives share the
|
|
8
|
+
* `MenuPopup` contract). Derived from Base UI so it tracks the
|
|
9
|
+
* upstream type automatically — no hand-mirrored lockstep.
|
|
10
|
+
*/
|
|
11
|
+
type FinalFocus = NonNullable<React.ComponentProps<typeof Menu.Popup>["finalFocus"]>;
|
|
12
|
+
/**
|
|
13
|
+
* Focus-restoration policy for a floating surface (menu, popover,
|
|
14
|
+
* context menu) when it closes.
|
|
15
|
+
*
|
|
16
|
+
* - `"always"` — restore focus to the trigger on every close. This is
|
|
17
|
+
* Base UI's default and the right choice for most surfaces (standard
|
|
18
|
+
* a11y: closing returns you to whatever opened it).
|
|
19
|
+
* - `"keyboard"` — restore focus to the trigger **only** when the
|
|
20
|
+
* surface was closed via the keyboard. For mouse / touch / pen
|
|
21
|
+
* closes, focus is left where it is. Use this when the trigger is
|
|
22
|
+
* visually ephemeral — e.g. revealed on hover or `focus-within` —
|
|
23
|
+
* so that restoring focus to it wouldn't keep it (and its container)
|
|
24
|
+
* pinned visible after a pointer close. Keyboard users still get the
|
|
25
|
+
* expected focus return.
|
|
26
|
+
* - `"never"` — never auto-restore focus on close.
|
|
27
|
+
*/
|
|
28
|
+
type RestoreFocusOnClose = "always" | "keyboard" | "never";
|
|
29
|
+
/**
|
|
30
|
+
* Resolve the high-level {@link RestoreFocusOnClose} policy to the
|
|
31
|
+
* Base UI `finalFocus` value.
|
|
32
|
+
*
|
|
33
|
+
* `restoreFocusOnClose` is the ergonomic, intent-expressing API;
|
|
34
|
+
* `finalFocus` remains available as the low-level escape hatch for
|
|
35
|
+
* full control (a custom element/ref/predicate). Pass one or the
|
|
36
|
+
* other — when `restoreFocusOnClose` is set it fully governs
|
|
37
|
+
* `finalFocus`.
|
|
38
|
+
*/
|
|
39
|
+
declare function resolveFinalFocus(restoreFocusOnClose: RestoreFocusOnClose | undefined, finalFocus: FinalFocus | undefined): FinalFocus | undefined;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { RestoreFocusOnClose, resolveFinalFocus };
|
|
42
|
+
//# sourceMappingURL=focus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus.d.ts","names":[],"sources":["../../src/lib/focus.ts"],"mappings":";;;;;;AACgD;;;;KAQ3C,UAAA,GAAa,WAAA,CAChB,KAAA,CAAM,cAAA,QAAsB,IAAA,CAAK,KAAA;;;;;;;;;;;AAmBnC;;;;;AAYA;KAZY,mBAAA;;;;;;;;;;;iBAYI,iBAAA,CACd,mBAAA,EAAqB,mBAAA,cACrB,UAAA,EAAY,UAAA,eACX,UAAA"}
|