@foundrykit/primitives 2.1.3 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/{chunk-SEDTBIZW.js → chunk-OMPTY5WQ.js} +1 -1
- package/dist/components/accordion/index.js +60 -6
- package/dist/components/alert/index.js +62 -6
- package/dist/components/alert-dialog/index.js +142 -13
- package/dist/components/aspect-ratio/index.js +9 -3
- package/dist/components/avatar/index.js +50 -5
- package/dist/components/badge/index.js +37 -4
- package/dist/components/breadcrumb/index.js +95 -9
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/index.js +74 -6
- package/dist/components/card/index.js +66 -8
- package/dist/components/checkbox/index.js +30 -3
- package/dist/components/collapsible/index.js +33 -7
- package/dist/components/context-menu/index.js +208 -17
- package/dist/components/dialog/index.js +126 -12
- package/dist/components/direction/index.js +10 -2
- package/dist/components/drawer/index.js +118 -12
- package/dist/components/dropdown/index.js +216 -17
- package/dist/components/empty/index.js +95 -9
- package/dist/components/field/index.js +211 -13
- package/dist/components/hover-card/index.js +35 -5
- package/dist/components/input-group/index.d.ts +1 -1
- package/dist/components/input-group/index.js +1 -1
- package/dist/components/item/index.js +178 -14
- package/dist/components/kbd/index.js +27 -4
- package/dist/components/label/index.js +21 -3
- package/dist/components/menubar/index.js +235 -18
- package/dist/components/native-select/index.js +25 -3
- package/dist/components/navigation-menu/index.js +161 -11
- package/dist/components/popover/index.js +40 -6
- package/dist/components/progress/index.js +30 -3
- package/dist/components/radio-group/index.js +43 -4
- package/dist/components/resizable/index.js +43 -5
- package/dist/components/scroll-area/index.js +58 -4
- package/dist/components/section/index.js +13 -3
- package/dist/components/select/index.js +159 -12
- package/dist/components/sheet/index.js +118 -10
- package/dist/components/skeleton/index.js +13 -3
- package/dist/components/slider/index.js +64 -3
- package/dist/components/sonner/index.js +21 -4
- package/dist/components/spinner/index.js +19 -3
- package/dist/components/switch/index.js +30 -3
- package/dist/components/table/index.js +105 -10
- package/dist/components/tabs/index.js +63 -6
- package/dist/components/toggle/index.js +41 -4
- package/dist/components/toggle-group/index.js +80 -4
- package/dist/components/tooltip/index.js +51 -6
- package/dist/components/typography/index.js +147 -14
- package/dist/index.d.ts +1 -0
- package/dist/index.js +221 -254
- package/package.json +3 -3
- package/dist/chunk-25N35Z5M.js +0 -42
- package/dist/chunk-2JOT4DV4.js +0 -66
- package/dist/chunk-2SBGU5XA.js +0 -233
- package/dist/chunk-2UG6OCGA.js +0 -75
- package/dist/chunk-3BAO7TAS.js +0 -105
- package/dist/chunk-3NQR7JZR.js +0 -128
- package/dist/chunk-3QUMCM5K.js +0 -225
- package/dist/chunk-3TZXV53R.js +0 -55
- package/dist/chunk-3UKWAM5M.js +0 -33
- package/dist/chunk-44I6VK3H.js +0 -105
- package/dist/chunk-67UXTT4O.js +0 -116
- package/dist/chunk-727ACUWN.js +0 -82
- package/dist/chunk-76APYFRN.js +0 -29
- package/dist/chunk-AJAAMJYH.js +0 -12
- package/dist/chunk-B5YCE3UP.js +0 -57
- package/dist/chunk-BIFBYERK.js +0 -69
- package/dist/chunk-DXZ4GUQO.js +0 -33
- package/dist/chunk-ED6T7ZZN.js +0 -130
- package/dist/chunk-EEAK2RWF.js +0 -23
- package/dist/chunk-F2TEA6ER.js +0 -138
- package/dist/chunk-FF5D53KL.js +0 -69
- package/dist/chunk-FRIOQFPE.js +0 -171
- package/dist/chunk-G2YBCHWR.js +0 -46
- package/dist/chunk-GKCBSG2W.js +0 -67
- package/dist/chunk-GPEL656S.js +0 -84
- package/dist/chunk-JKKCRFYB.js +0 -36
- package/dist/chunk-JTSIBZS4.js +0 -194
- package/dist/chunk-MCXSVXO4.js +0 -24
- package/dist/chunk-MMZJQ7RW.js +0 -33
- package/dist/chunk-MYIUX3DT.js +0 -62
- package/dist/chunk-P5KEJOBH.js +0 -155
- package/dist/chunk-PAO3DSEF.js +0 -48
- package/dist/chunk-PLLG76QJ.js +0 -32
- package/dist/chunk-SDYKJVXX.js +0 -253
- package/dist/chunk-SIQHWNPH.js +0 -45
- package/dist/chunk-SKR3J46C.js +0 -17
- package/dist/chunk-STRBREHN.js +0 -17
- package/dist/chunk-SUEPE6OX.js +0 -47
- package/dist/chunk-TA23RNS4.js +0 -162
- package/dist/chunk-TRXU4SOJ.js +0 -224
- package/dist/chunk-U7JIOR7A.js +0 -172
- package/dist/chunk-VPBVKBZ7.js +0 -25
- package/dist/chunk-W4XY3SNY.js +0 -40
- package/dist/chunk-YT2ZIMZI.js +0 -16
- package/dist/components/accordion/index.cjs +0 -104
- package/dist/components/accordion/index.d.cts +0 -25
- package/dist/components/alert/index.cjs +0 -96
- package/dist/components/alert/index.d.cts +0 -28
- package/dist/components/alert-dialog/index.cjs +0 -200
- package/dist/components/alert-dialog/index.d.cts +0 -42
- package/dist/components/aspect-ratio/index.cjs +0 -47
- package/dist/components/aspect-ratio/index.d.cts +0 -19
- package/dist/components/avatar/index.cjs +0 -92
- package/dist/components/avatar/index.d.cts +0 -24
- package/dist/components/badge/index.cjs +0 -67
- package/dist/components/badge/index.d.cts +0 -24
- package/dist/components/breadcrumb/index.cjs +0 -135
- package/dist/components/breadcrumb/index.d.cts +0 -33
- package/dist/components/button/index.cjs +0 -87
- package/dist/components/button/index.d.cts +0 -28
- package/dist/components/button-group/index.cjs +0 -142
- package/dist/components/button-group/index.d.cts +0 -33
- package/dist/components/card/index.cjs +0 -104
- package/dist/components/card/index.d.cts +0 -27
- package/dist/components/checkbox/index.cjs +0 -68
- package/dist/components/checkbox/index.d.cts +0 -17
- package/dist/components/collapsible/index.cjs +0 -73
- package/dist/components/collapsible/index.d.cts +0 -22
- package/dist/components/context-menu/index.cjs +0 -274
- package/dist/components/context-menu/index.d.cts +0 -48
- package/dist/components/dialog/index.cjs +0 -182
- package/dist/components/dialog/index.d.cts +0 -38
- package/dist/components/direction/index.cjs +0 -39
- package/dist/components/direction/index.d.cts +0 -20
- package/dist/components/drawer/index.cjs +0 -164
- package/dist/components/drawer/index.d.cts +0 -35
- package/dist/components/dropdown/index.cjs +0 -282
- package/dist/components/dropdown/index.d.cts +0 -52
- package/dist/components/empty/index.cjs +0 -135
- package/dist/components/empty/index.d.cts +0 -38
- package/dist/components/field/index.cjs +0 -269
- package/dist/components/field/index.d.cts +0 -42
- package/dist/components/hover-card/index.cjs +0 -77
- package/dist/components/hover-card/index.d.cts +0 -22
- package/dist/components/input/index.cjs +0 -47
- package/dist/components/input/index.d.cts +0 -17
- package/dist/components/input-group/index.cjs +0 -270
- package/dist/components/input-group/index.d.cts +0 -44
- package/dist/components/item/index.cjs +0 -262
- package/dist/components/item/index.d.cts +0 -47
- package/dist/components/kbd/index.cjs +0 -57
- package/dist/components/kbd/index.d.cts +0 -19
- package/dist/components/label/index.cjs +0 -59
- package/dist/components/label/index.d.cts +0 -16
- package/dist/components/menubar/index.cjs +0 -303
- package/dist/components/menubar/index.d.cts +0 -49
- package/dist/components/native-select/index.cjs +0 -53
- package/dist/components/native-select/index.d.cts +0 -19
- package/dist/components/navigation-menu/index.cjs +0 -215
- package/dist/components/navigation-menu/index.d.cts +0 -37
- package/dist/components/popover/index.cjs +0 -84
- package/dist/components/popover/index.d.cts +0 -23
- package/dist/components/progress/index.cjs +0 -68
- package/dist/components/progress/index.d.cts +0 -16
- package/dist/components/radio-group/index.cjs +0 -83
- package/dist/components/radio-group/index.d.cts +0 -22
- package/dist/components/resizable/index.cjs +0 -75
- package/dist/components/resizable/index.d.cts +0 -25
- package/dist/components/scroll-area/index.cjs +0 -98
- package/dist/components/scroll-area/index.d.cts +0 -21
- package/dist/components/section/index.cjs +0 -41
- package/dist/components/section/index.d.cts +0 -27
- package/dist/components/select/index.cjs +0 -215
- package/dist/components/select/index.d.cts +0 -36
- package/dist/components/separator/index.cjs +0 -63
- package/dist/components/separator/index.d.cts +0 -18
- package/dist/components/sheet/index.cjs +0 -170
- package/dist/components/sheet/index.d.cts +0 -31
- package/dist/components/skeleton/index.cjs +0 -41
- package/dist/components/skeleton/index.d.cts +0 -14
- package/dist/components/slider/index.cjs +0 -102
- package/dist/components/slider/index.d.cts +0 -19
- package/dist/components/sonner/index.cjs +0 -51
- package/dist/components/sonner/index.d.cts +0 -18
- package/dist/components/spinner/index.cjs +0 -47
- package/dist/components/spinner/index.d.cts +0 -17
- package/dist/components/switch/index.cjs +0 -68
- package/dist/components/switch/index.d.cts +0 -17
- package/dist/components/table/index.cjs +0 -147
- package/dist/components/table/index.d.cts +0 -35
- package/dist/components/tabs/index.cjs +0 -107
- package/dist/components/tabs/index.d.cts +0 -27
- package/dist/components/textarea/index.cjs +0 -44
- package/dist/components/textarea/index.d.cts +0 -15
- package/dist/components/toggle/index.cjs +0 -81
- package/dist/components/toggle/index.d.cts +0 -26
- package/dist/components/toggle-group/index.cjs +0 -120
- package/dist/components/toggle-group/index.d.cts +0 -27
- package/dist/components/tooltip/index.cjs +0 -95
- package/dist/components/tooltip/index.d.cts +0 -25
- package/dist/components/typography/index.cjs +0 -197
- package/dist/components/typography/index.d.cts +0 -28
- package/dist/index.cjs +0 -4094
- package/dist/index.d.cts +0 -83
|
@@ -1,18 +1,182 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
Separator
|
|
3
|
+
} from "../../chunk-6DRII3XC.js";
|
|
4
|
+
|
|
5
|
+
// src/components/item/index.tsx
|
|
6
|
+
import { cn } from "@foundrykit/utils";
|
|
7
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
function ItemGroup({ className, ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
role: "list",
|
|
15
|
+
"data-slot": "item-group",
|
|
16
|
+
className: cn("group/item-group flex flex-col", className),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function ItemSeparator({
|
|
22
|
+
className,
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
Separator,
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "item-separator",
|
|
29
|
+
orientation: "horizontal",
|
|
30
|
+
className: cn("my-0", className),
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
var itemVariants = cva(
|
|
36
|
+
"group/item focus-visible:border-ring focus-visible:ring-ring/50 [a]:hover:bg-accent/50 flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:ring-[3px] [a]:transition-colors",
|
|
37
|
+
{
|
|
38
|
+
variants: {
|
|
39
|
+
variant: {
|
|
40
|
+
default: "bg-transparent",
|
|
41
|
+
outline: "border-border",
|
|
42
|
+
muted: "bg-muted/50"
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
default: "gap-4 p-4",
|
|
46
|
+
sm: "gap-2.5 px-4 py-3"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
variant: "default",
|
|
51
|
+
size: "default"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
function Item({
|
|
56
|
+
className,
|
|
57
|
+
variant,
|
|
58
|
+
size,
|
|
59
|
+
asChild = false,
|
|
60
|
+
...props
|
|
61
|
+
}) {
|
|
62
|
+
const Comp = asChild ? Slot : "div";
|
|
63
|
+
return /* @__PURE__ */ jsx(
|
|
64
|
+
Comp,
|
|
65
|
+
{
|
|
66
|
+
"data-slot": "item",
|
|
67
|
+
"data-variant": variant,
|
|
68
|
+
"data-size": size,
|
|
69
|
+
className: cn(itemVariants({ variant, size, className })),
|
|
70
|
+
...props
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
var itemMediaVariants = cva(
|
|
75
|
+
"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none",
|
|
76
|
+
{
|
|
77
|
+
variants: {
|
|
78
|
+
variant: {
|
|
79
|
+
default: "bg-transparent",
|
|
80
|
+
icon: "bg-muted size-8 rounded-sm border [&_svg:not([class*='size-'])]:size-4",
|
|
81
|
+
image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
defaultVariants: {
|
|
85
|
+
variant: "default"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
function ItemMedia({
|
|
90
|
+
className,
|
|
91
|
+
variant,
|
|
92
|
+
...props
|
|
93
|
+
}) {
|
|
94
|
+
return /* @__PURE__ */ jsx(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "item-media",
|
|
98
|
+
"data-variant": variant,
|
|
99
|
+
className: cn(itemMediaVariants({ variant, className })),
|
|
100
|
+
...props
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
function ItemContent({ className, ...props }) {
|
|
105
|
+
return /* @__PURE__ */ jsx(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
"data-slot": "item-content",
|
|
109
|
+
className: cn(
|
|
110
|
+
"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
|
|
111
|
+
className
|
|
112
|
+
),
|
|
113
|
+
...props
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
function ItemTitle({ className, ...props }) {
|
|
118
|
+
return /* @__PURE__ */ jsx(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
"data-slot": "item-title",
|
|
122
|
+
className: cn(
|
|
123
|
+
"flex w-fit items-center gap-2 text-sm leading-snug font-medium",
|
|
124
|
+
className
|
|
125
|
+
),
|
|
126
|
+
...props
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
function ItemDescription({ className, ...props }) {
|
|
131
|
+
return /* @__PURE__ */ jsx(
|
|
132
|
+
"p",
|
|
133
|
+
{
|
|
134
|
+
"data-slot": "item-description",
|
|
135
|
+
className: cn(
|
|
136
|
+
"text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
|
|
137
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
138
|
+
className
|
|
139
|
+
),
|
|
140
|
+
...props
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
function ItemActions({ className, ...props }) {
|
|
145
|
+
return /* @__PURE__ */ jsx(
|
|
146
|
+
"div",
|
|
147
|
+
{
|
|
148
|
+
"data-slot": "item-actions",
|
|
149
|
+
className: cn("flex items-center gap-2", className),
|
|
150
|
+
...props
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
function ItemHeader({ className, ...props }) {
|
|
155
|
+
return /* @__PURE__ */ jsx(
|
|
156
|
+
"div",
|
|
157
|
+
{
|
|
158
|
+
"data-slot": "item-header",
|
|
159
|
+
className: cn(
|
|
160
|
+
"flex basis-full items-center justify-between gap-2",
|
|
161
|
+
className
|
|
162
|
+
),
|
|
163
|
+
...props
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
function ItemFooter({ className, ...props }) {
|
|
168
|
+
return /* @__PURE__ */ jsx(
|
|
169
|
+
"div",
|
|
170
|
+
{
|
|
171
|
+
"data-slot": "item-footer",
|
|
172
|
+
className: cn(
|
|
173
|
+
"flex basis-full items-center justify-between gap-2",
|
|
174
|
+
className
|
|
175
|
+
),
|
|
176
|
+
...props
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}
|
|
16
180
|
export {
|
|
17
181
|
Item,
|
|
18
182
|
ItemActions,
|
|
@@ -1,7 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
// src/components/kbd/index.tsx
|
|
2
|
+
import { cn } from "@foundrykit/utils";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
function Kbd({ className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
"kbd",
|
|
7
|
+
{
|
|
8
|
+
"data-slot": "kbd",
|
|
9
|
+
className: cn(
|
|
10
|
+
"bg-muted text-muted-foreground 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
|
+
"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
|
|
12
|
+
className
|
|
13
|
+
),
|
|
14
|
+
...props
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
function KbdGroup({ className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
"kbd",
|
|
21
|
+
{
|
|
22
|
+
"data-slot": "kbd-group",
|
|
23
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
24
|
+
...props
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
5
28
|
export {
|
|
6
29
|
Kbd,
|
|
7
30
|
KbdGroup
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "
|
|
2
|
+
|
|
3
|
+
// src/components/label/index.tsx
|
|
4
|
+
import { cn } from "@foundrykit/utils";
|
|
5
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function Label({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
LabelPrimitive.Root,
|
|
13
|
+
{
|
|
14
|
+
"data-slot": "label",
|
|
15
|
+
className: cn(
|
|
16
|
+
"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",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
5
23
|
export {
|
|
6
24
|
Label
|
|
7
25
|
};
|
|
@@ -1,22 +1,239 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
|
|
3
|
+
// src/components/menubar/index.tsx
|
|
4
|
+
import { cn } from "@foundrykit/utils";
|
|
5
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
6
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
function Menubar({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
MenubarPrimitive.Root,
|
|
14
|
+
{
|
|
15
|
+
"data-slot": "menubar",
|
|
16
|
+
className: cn(
|
|
17
|
+
"bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
20
|
+
...props
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
function MenubarMenu({
|
|
25
|
+
...props
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
28
|
+
}
|
|
29
|
+
function MenubarGroup({
|
|
30
|
+
...props
|
|
31
|
+
}) {
|
|
32
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
33
|
+
}
|
|
34
|
+
function MenubarPortal({
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
|
|
38
|
+
}
|
|
39
|
+
function MenubarRadioGroup({
|
|
40
|
+
...props
|
|
41
|
+
}) {
|
|
42
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
43
|
+
}
|
|
44
|
+
function MenubarTrigger({
|
|
45
|
+
className,
|
|
46
|
+
...props
|
|
47
|
+
}) {
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
MenubarPrimitive.Trigger,
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "menubar-trigger",
|
|
52
|
+
className: cn(
|
|
53
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
function MenubarContent({
|
|
61
|
+
className,
|
|
62
|
+
align = "start",
|
|
63
|
+
alignOffset = -4,
|
|
64
|
+
sideOffset = 8,
|
|
65
|
+
...props
|
|
66
|
+
}) {
|
|
67
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
68
|
+
MenubarPrimitive.Content,
|
|
69
|
+
{
|
|
70
|
+
"data-slot": "menubar-content",
|
|
71
|
+
align,
|
|
72
|
+
alignOffset,
|
|
73
|
+
sideOffset,
|
|
74
|
+
className: cn(
|
|
75
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-97 motion-safe:data-[state=open]:zoom-in-97 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
|
|
76
|
+
className
|
|
77
|
+
),
|
|
78
|
+
...props
|
|
79
|
+
}
|
|
80
|
+
) });
|
|
81
|
+
}
|
|
82
|
+
function MenubarItem({
|
|
83
|
+
className,
|
|
84
|
+
inset,
|
|
85
|
+
variant = "default",
|
|
86
|
+
...props
|
|
87
|
+
}) {
|
|
88
|
+
return /* @__PURE__ */ jsx(
|
|
89
|
+
MenubarPrimitive.Item,
|
|
90
|
+
{
|
|
91
|
+
"data-slot": "menubar-item",
|
|
92
|
+
"data-inset": inset,
|
|
93
|
+
"data-variant": variant,
|
|
94
|
+
className: cn(
|
|
95
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
96
|
+
className
|
|
97
|
+
),
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function MenubarCheckboxItem({
|
|
103
|
+
className,
|
|
104
|
+
children,
|
|
105
|
+
checked,
|
|
106
|
+
...props
|
|
107
|
+
}) {
|
|
108
|
+
return /* @__PURE__ */ jsxs(
|
|
109
|
+
MenubarPrimitive.CheckboxItem,
|
|
110
|
+
{
|
|
111
|
+
"data-slot": "menubar-checkbox-item",
|
|
112
|
+
className: cn(
|
|
113
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
114
|
+
className
|
|
115
|
+
),
|
|
116
|
+
checked,
|
|
117
|
+
...props,
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
120
|
+
children
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
function MenubarRadioItem({
|
|
126
|
+
className,
|
|
127
|
+
children,
|
|
128
|
+
...props
|
|
129
|
+
}) {
|
|
130
|
+
return /* @__PURE__ */ jsxs(
|
|
131
|
+
MenubarPrimitive.RadioItem,
|
|
132
|
+
{
|
|
133
|
+
"data-slot": "menubar-radio-item",
|
|
134
|
+
className: cn(
|
|
135
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
136
|
+
className
|
|
137
|
+
),
|
|
138
|
+
...props,
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
141
|
+
children
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
function MenubarLabel({
|
|
147
|
+
className,
|
|
148
|
+
inset,
|
|
149
|
+
...props
|
|
150
|
+
}) {
|
|
151
|
+
return /* @__PURE__ */ jsx(
|
|
152
|
+
MenubarPrimitive.Label,
|
|
153
|
+
{
|
|
154
|
+
"data-slot": "menubar-label",
|
|
155
|
+
"data-inset": inset,
|
|
156
|
+
className: cn(
|
|
157
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
158
|
+
className
|
|
159
|
+
),
|
|
160
|
+
...props
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
function MenubarSeparator({
|
|
165
|
+
className,
|
|
166
|
+
...props
|
|
167
|
+
}) {
|
|
168
|
+
return /* @__PURE__ */ jsx(
|
|
169
|
+
MenubarPrimitive.Separator,
|
|
170
|
+
{
|
|
171
|
+
"data-slot": "menubar-separator",
|
|
172
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
173
|
+
...props
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
function MenubarShortcut({
|
|
178
|
+
className,
|
|
179
|
+
...props
|
|
180
|
+
}) {
|
|
181
|
+
return /* @__PURE__ */ jsx(
|
|
182
|
+
"span",
|
|
183
|
+
{
|
|
184
|
+
"data-slot": "menubar-shortcut",
|
|
185
|
+
className: cn(
|
|
186
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
187
|
+
className
|
|
188
|
+
),
|
|
189
|
+
...props
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
function MenubarSub({
|
|
194
|
+
...props
|
|
195
|
+
}) {
|
|
196
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
197
|
+
}
|
|
198
|
+
function MenubarSubTrigger({
|
|
199
|
+
className,
|
|
200
|
+
inset,
|
|
201
|
+
children,
|
|
202
|
+
...props
|
|
203
|
+
}) {
|
|
204
|
+
return /* @__PURE__ */ jsxs(
|
|
205
|
+
MenubarPrimitive.SubTrigger,
|
|
206
|
+
{
|
|
207
|
+
"data-slot": "menubar-sub-trigger",
|
|
208
|
+
"data-inset": inset,
|
|
209
|
+
className: cn(
|
|
210
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",
|
|
211
|
+
className
|
|
212
|
+
),
|
|
213
|
+
...props,
|
|
214
|
+
children: [
|
|
215
|
+
children,
|
|
216
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
function MenubarSubContent({
|
|
222
|
+
className,
|
|
223
|
+
...props
|
|
224
|
+
}) {
|
|
225
|
+
return /* @__PURE__ */ jsx(
|
|
226
|
+
MenubarPrimitive.SubContent,
|
|
227
|
+
{
|
|
228
|
+
"data-slot": "menubar-sub-content",
|
|
229
|
+
className: cn(
|
|
230
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-97 motion-safe:data-[state=open]:zoom-in-97 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
231
|
+
className
|
|
232
|
+
),
|
|
233
|
+
...props
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
}
|
|
20
237
|
export {
|
|
21
238
|
Menubar,
|
|
22
239
|
MenubarCheckboxItem,
|
|
@@ -1,6 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
} from "
|
|
1
|
+
// src/components/native-select/index.tsx
|
|
2
|
+
import { cn } from "@foundrykit/utils";
|
|
3
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
function NativeSelect({
|
|
6
|
+
className,
|
|
7
|
+
children,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "native-select-wrapper", className: "relative w-full", children: [
|
|
11
|
+
/* @__PURE__ */ jsx(
|
|
12
|
+
"select",
|
|
13
|
+
{
|
|
14
|
+
"data-slot": "native-select",
|
|
15
|
+
className: cn(
|
|
16
|
+
"border-input text-foreground 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:bg-input/30 [&>option]:text-foreground flex h-9 w-full appearance-none items-center rounded-md border bg-transparent py-2 pr-8 pl-3 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...props,
|
|
20
|
+
children
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2 opacity-50" })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
4
26
|
export {
|
|
5
27
|
NativeSelect
|
|
6
28
|
};
|