@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
package/dist/chunk-G2YBCHWR.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// src/components/popover/index.tsx
|
|
2
|
-
import { cn } from "@foundrykit/utils";
|
|
3
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
function Popover({
|
|
6
|
-
...props
|
|
7
|
-
}) {
|
|
8
|
-
return /* @__PURE__ */ jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
9
|
-
}
|
|
10
|
-
function PopoverTrigger({
|
|
11
|
-
...props
|
|
12
|
-
}) {
|
|
13
|
-
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
14
|
-
}
|
|
15
|
-
function PopoverContent({
|
|
16
|
-
className,
|
|
17
|
-
align = "center",
|
|
18
|
-
sideOffset = 4,
|
|
19
|
-
...props
|
|
20
|
-
}) {
|
|
21
|
-
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
22
|
-
PopoverPrimitive.Content,
|
|
23
|
-
{
|
|
24
|
-
"data-slot": "popover-content",
|
|
25
|
-
align,
|
|
26
|
-
sideOffset,
|
|
27
|
-
className: cn(
|
|
28
|
-
"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-95 motion-safe:data-[state=open]:zoom-in-95 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 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
29
|
-
className
|
|
30
|
-
),
|
|
31
|
-
...props
|
|
32
|
-
}
|
|
33
|
-
) });
|
|
34
|
-
}
|
|
35
|
-
function PopoverAnchor({
|
|
36
|
-
...props
|
|
37
|
-
}) {
|
|
38
|
-
return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export {
|
|
42
|
-
Popover,
|
|
43
|
-
PopoverTrigger,
|
|
44
|
-
PopoverContent,
|
|
45
|
-
PopoverAnchor
|
|
46
|
-
};
|
package/dist/chunk-GKCBSG2W.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
// src/components/slider/index.tsx
|
|
2
|
-
import { cn } from "@foundrykit/utils";
|
|
3
|
-
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
function Slider({
|
|
7
|
-
className,
|
|
8
|
-
defaultValue,
|
|
9
|
-
value,
|
|
10
|
-
min = 0,
|
|
11
|
-
max = 100,
|
|
12
|
-
"aria-label": ariaLabel,
|
|
13
|
-
...props
|
|
14
|
-
}) {
|
|
15
|
-
const _values = React.useMemo(
|
|
16
|
-
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
17
|
-
[value, defaultValue, min, max]
|
|
18
|
-
);
|
|
19
|
-
return /* @__PURE__ */ jsxs(
|
|
20
|
-
SliderPrimitive.Root,
|
|
21
|
-
{
|
|
22
|
-
"data-slot": "slider",
|
|
23
|
-
defaultValue,
|
|
24
|
-
value,
|
|
25
|
-
min,
|
|
26
|
-
max,
|
|
27
|
-
className: cn(
|
|
28
|
-
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
29
|
-
className
|
|
30
|
-
),
|
|
31
|
-
...props,
|
|
32
|
-
children: [
|
|
33
|
-
/* @__PURE__ */ jsx(
|
|
34
|
-
SliderPrimitive.Track,
|
|
35
|
-
{
|
|
36
|
-
"data-slot": "slider-track",
|
|
37
|
-
className: cn(
|
|
38
|
-
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
39
|
-
),
|
|
40
|
-
children: /* @__PURE__ */ jsx(
|
|
41
|
-
SliderPrimitive.Range,
|
|
42
|
-
{
|
|
43
|
-
"data-slot": "slider-range",
|
|
44
|
-
className: cn(
|
|
45
|
-
"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
),
|
|
51
|
-
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(
|
|
52
|
-
SliderPrimitive.Thumb,
|
|
53
|
-
{
|
|
54
|
-
"data-slot": "slider-thumb",
|
|
55
|
-
"aria-label": ariaLabel,
|
|
56
|
-
className: "border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
57
|
-
},
|
|
58
|
-
index
|
|
59
|
-
))
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export {
|
|
66
|
-
Slider
|
|
67
|
-
};
|
package/dist/chunk-GPEL656S.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
// src/components/toggle-group/index.tsx
|
|
2
|
-
import { cn } from "@foundrykit/utils";
|
|
3
|
-
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
4
|
-
import { cva } from "class-variance-authority";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
var toggleGroupItemVariants = cva(
|
|
8
|
-
"hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-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 inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: "bg-transparent",
|
|
13
|
-
outline: "border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-xs"
|
|
14
|
-
},
|
|
15
|
-
size: {
|
|
16
|
-
default: "h-9 min-w-9 px-2",
|
|
17
|
-
sm: "h-8 min-w-8 px-1.5",
|
|
18
|
-
lg: "h-10 min-w-10 px-2.5"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: {
|
|
22
|
-
variant: "default",
|
|
23
|
-
size: "default"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
var ToggleGroupContext = React.createContext({
|
|
28
|
-
size: "default",
|
|
29
|
-
variant: "default"
|
|
30
|
-
});
|
|
31
|
-
function ToggleGroup({
|
|
32
|
-
className,
|
|
33
|
-
variant,
|
|
34
|
-
size,
|
|
35
|
-
children,
|
|
36
|
-
...props
|
|
37
|
-
}) {
|
|
38
|
-
return /* @__PURE__ */ jsx(
|
|
39
|
-
ToggleGroupPrimitive.Root,
|
|
40
|
-
{
|
|
41
|
-
"data-slot": "toggle-group",
|
|
42
|
-
"data-variant": variant,
|
|
43
|
-
"data-size": size,
|
|
44
|
-
className: cn(
|
|
45
|
-
"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
|
|
46
|
-
className
|
|
47
|
-
),
|
|
48
|
-
...props,
|
|
49
|
-
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
function ToggleGroupItem({
|
|
54
|
-
className,
|
|
55
|
-
children,
|
|
56
|
-
variant,
|
|
57
|
-
size,
|
|
58
|
-
...props
|
|
59
|
-
}) {
|
|
60
|
-
const context = React.useContext(ToggleGroupContext);
|
|
61
|
-
return /* @__PURE__ */ jsx(
|
|
62
|
-
ToggleGroupPrimitive.Item,
|
|
63
|
-
{
|
|
64
|
-
"data-slot": "toggle-group-item",
|
|
65
|
-
"data-variant": context.variant || variant,
|
|
66
|
-
"data-size": context.size || size,
|
|
67
|
-
className: cn(
|
|
68
|
-
toggleGroupItemVariants({
|
|
69
|
-
variant: context.variant || variant,
|
|
70
|
-
size: context.size || size
|
|
71
|
-
}),
|
|
72
|
-
"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
|
|
73
|
-
className
|
|
74
|
-
),
|
|
75
|
-
...props,
|
|
76
|
-
children
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export {
|
|
82
|
-
ToggleGroup,
|
|
83
|
-
ToggleGroupItem
|
|
84
|
-
};
|
package/dist/chunk-JKKCRFYB.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// src/components/collapsible/index.tsx
|
|
2
|
-
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
function Collapsible({
|
|
5
|
-
...props
|
|
6
|
-
}) {
|
|
7
|
-
return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
|
|
8
|
-
}
|
|
9
|
-
function CollapsibleTrigger2({
|
|
10
|
-
...props
|
|
11
|
-
}) {
|
|
12
|
-
return /* @__PURE__ */ jsx(
|
|
13
|
-
CollapsiblePrimitive.CollapsibleTrigger,
|
|
14
|
-
{
|
|
15
|
-
"data-slot": "collapsible-trigger",
|
|
16
|
-
...props
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
function CollapsibleContent2({
|
|
21
|
-
...props
|
|
22
|
-
}) {
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
24
|
-
CollapsiblePrimitive.CollapsibleContent,
|
|
25
|
-
{
|
|
26
|
-
"data-slot": "collapsible-content",
|
|
27
|
-
...props
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export {
|
|
33
|
-
Collapsible,
|
|
34
|
-
CollapsibleTrigger2 as CollapsibleTrigger,
|
|
35
|
-
CollapsibleContent2 as CollapsibleContent
|
|
36
|
-
};
|
package/dist/chunk-JTSIBZS4.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import {
|
|
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
|
-
}
|
|
180
|
-
|
|
181
|
-
export {
|
|
182
|
-
ItemGroup,
|
|
183
|
-
ItemSeparator,
|
|
184
|
-
itemVariants,
|
|
185
|
-
Item,
|
|
186
|
-
itemMediaVariants,
|
|
187
|
-
ItemMedia,
|
|
188
|
-
ItemContent,
|
|
189
|
-
ItemTitle,
|
|
190
|
-
ItemDescription,
|
|
191
|
-
ItemActions,
|
|
192
|
-
ItemHeader,
|
|
193
|
-
ItemFooter
|
|
194
|
-
};
|
package/dist/chunk-MCXSVXO4.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// src/components/label/index.tsx
|
|
2
|
-
import { cn } from "@foundrykit/utils";
|
|
3
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
function Label({
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}) {
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
10
|
-
LabelPrimitive.Root,
|
|
11
|
-
{
|
|
12
|
-
"data-slot": "label",
|
|
13
|
-
className: cn(
|
|
14
|
-
"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",
|
|
15
|
-
className
|
|
16
|
-
),
|
|
17
|
-
...props
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
Label
|
|
24
|
-
};
|
package/dist/chunk-MMZJQ7RW.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// src/components/progress/index.tsx
|
|
2
|
-
import { cn } from "@foundrykit/utils";
|
|
3
|
-
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
function Progress({
|
|
6
|
-
className,
|
|
7
|
-
value,
|
|
8
|
-
...props
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ jsx(
|
|
11
|
-
ProgressPrimitive.Root,
|
|
12
|
-
{
|
|
13
|
-
"data-slot": "progress",
|
|
14
|
-
className: cn(
|
|
15
|
-
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
16
|
-
className
|
|
17
|
-
),
|
|
18
|
-
...props,
|
|
19
|
-
children: /* @__PURE__ */ jsx(
|
|
20
|
-
ProgressPrimitive.Indicator,
|
|
21
|
-
{
|
|
22
|
-
"data-slot": "progress-indicator",
|
|
23
|
-
className: "bg-primary h-full w-full flex-1 transition-all",
|
|
24
|
-
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
25
|
-
}
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export {
|
|
32
|
-
Progress
|
|
33
|
-
};
|
package/dist/chunk-MYIUX3DT.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// src/components/scroll-area/index.tsx
|
|
2
|
-
import { cn } from "@foundrykit/utils";
|
|
3
|
-
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
function ScrollArea({
|
|
6
|
-
className,
|
|
7
|
-
children,
|
|
8
|
-
...props
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ jsxs(
|
|
11
|
-
ScrollAreaPrimitive.Root,
|
|
12
|
-
{
|
|
13
|
-
"data-slot": "scroll-area",
|
|
14
|
-
className: cn("relative", className),
|
|
15
|
-
...props,
|
|
16
|
-
children: [
|
|
17
|
-
/* @__PURE__ */ jsx(
|
|
18
|
-
ScrollAreaPrimitive.Viewport,
|
|
19
|
-
{
|
|
20
|
-
"data-slot": "scroll-area-viewport",
|
|
21
|
-
className: "focus-visible:ring-ring/50 size-full h-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
22
|
-
children
|
|
23
|
-
}
|
|
24
|
-
),
|
|
25
|
-
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
26
|
-
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
function ScrollBar({
|
|
32
|
-
className,
|
|
33
|
-
orientation = "vertical",
|
|
34
|
-
...props
|
|
35
|
-
}) {
|
|
36
|
-
return /* @__PURE__ */ jsx(
|
|
37
|
-
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
38
|
-
{
|
|
39
|
-
"data-slot": "scroll-area-scrollbar",
|
|
40
|
-
orientation,
|
|
41
|
-
className: cn(
|
|
42
|
-
"flex touch-none p-px transition-colors select-none",
|
|
43
|
-
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
44
|
-
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
45
|
-
className
|
|
46
|
-
),
|
|
47
|
-
...props,
|
|
48
|
-
children: /* @__PURE__ */ jsx(
|
|
49
|
-
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
50
|
-
{
|
|
51
|
-
"data-slot": "scroll-area-thumb",
|
|
52
|
-
className: "bg-border relative flex-1 rounded-full"
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export {
|
|
60
|
-
ScrollArea,
|
|
61
|
-
ScrollBar
|
|
62
|
-
};
|
package/dist/chunk-P5KEJOBH.js
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
// src/components/alert-dialog/index.tsx
|
|
2
|
-
import { cn } from "@foundrykit/utils";
|
|
3
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
function AlertDialog({
|
|
6
|
-
...props
|
|
7
|
-
}) {
|
|
8
|
-
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
9
|
-
}
|
|
10
|
-
function AlertDialogTrigger({
|
|
11
|
-
...props
|
|
12
|
-
}) {
|
|
13
|
-
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
14
|
-
}
|
|
15
|
-
function AlertDialogPortal({
|
|
16
|
-
...props
|
|
17
|
-
}) {
|
|
18
|
-
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
19
|
-
}
|
|
20
|
-
function AlertDialogOverlay({
|
|
21
|
-
className,
|
|
22
|
-
...props
|
|
23
|
-
}) {
|
|
24
|
-
return /* @__PURE__ */ jsx(
|
|
25
|
-
AlertDialogPrimitive.Overlay,
|
|
26
|
-
{
|
|
27
|
-
"data-slot": "alert-dialog-overlay",
|
|
28
|
-
className: cn(
|
|
29
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
30
|
-
className
|
|
31
|
-
),
|
|
32
|
-
...props
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
function AlertDialogContent({
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}) {
|
|
40
|
-
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
41
|
-
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
42
|
-
/* @__PURE__ */ jsx(
|
|
43
|
-
AlertDialogPrimitive.Content,
|
|
44
|
-
{
|
|
45
|
-
"data-slot": "alert-dialog-content",
|
|
46
|
-
className: cn(
|
|
47
|
-
"bg-background 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-95 motion-safe:data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
48
|
-
className
|
|
49
|
-
),
|
|
50
|
-
...props
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
] });
|
|
54
|
-
}
|
|
55
|
-
function AlertDialogHeader({
|
|
56
|
-
className,
|
|
57
|
-
...props
|
|
58
|
-
}) {
|
|
59
|
-
return /* @__PURE__ */ jsx(
|
|
60
|
-
"div",
|
|
61
|
-
{
|
|
62
|
-
"data-slot": "alert-dialog-header",
|
|
63
|
-
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
64
|
-
...props
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
function AlertDialogFooter({
|
|
69
|
-
className,
|
|
70
|
-
...props
|
|
71
|
-
}) {
|
|
72
|
-
return /* @__PURE__ */ jsx(
|
|
73
|
-
"div",
|
|
74
|
-
{
|
|
75
|
-
"data-slot": "alert-dialog-footer",
|
|
76
|
-
className: cn(
|
|
77
|
-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
78
|
-
className
|
|
79
|
-
),
|
|
80
|
-
...props
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
function AlertDialogTitle({
|
|
85
|
-
className,
|
|
86
|
-
...props
|
|
87
|
-
}) {
|
|
88
|
-
return /* @__PURE__ */ jsx(
|
|
89
|
-
AlertDialogPrimitive.Title,
|
|
90
|
-
{
|
|
91
|
-
"data-slot": "alert-dialog-title",
|
|
92
|
-
className: cn("text-lg font-semibold", className),
|
|
93
|
-
...props
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
function AlertDialogDescription({
|
|
98
|
-
className,
|
|
99
|
-
...props
|
|
100
|
-
}) {
|
|
101
|
-
return /* @__PURE__ */ jsx(
|
|
102
|
-
AlertDialogPrimitive.Description,
|
|
103
|
-
{
|
|
104
|
-
"data-slot": "alert-dialog-description",
|
|
105
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
106
|
-
...props
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
function AlertDialogAction({
|
|
111
|
-
className,
|
|
112
|
-
...props
|
|
113
|
-
}) {
|
|
114
|
-
return /* @__PURE__ */ jsx(
|
|
115
|
-
AlertDialogPrimitive.Action,
|
|
116
|
-
{
|
|
117
|
-
"data-slot": "alert-dialog-action",
|
|
118
|
-
className: cn(
|
|
119
|
-
"bg-primary text-primary-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 hover:bg-primary/90 inline-flex h-9 shrink-0 items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium whitespace-nowrap shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 has-[>svg]:px-3 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
120
|
-
className
|
|
121
|
-
),
|
|
122
|
-
...props
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
function AlertDialogCancel({
|
|
127
|
-
className,
|
|
128
|
-
...props
|
|
129
|
-
}) {
|
|
130
|
-
return /* @__PURE__ */ jsx(
|
|
131
|
-
AlertDialogPrimitive.Cancel,
|
|
132
|
-
{
|
|
133
|
-
"data-slot": "alert-dialog-cancel",
|
|
134
|
-
className: cn(
|
|
135
|
-
"bg-background 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 dark:border-input dark:hover:bg-input/50 hover:bg-accent hover:text-accent-foreground inline-flex h-9 shrink-0 items-center justify-center gap-2 rounded-md border px-4 py-2 text-sm font-medium whitespace-nowrap shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 has-[>svg]:px-3 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
136
|
-
className
|
|
137
|
-
),
|
|
138
|
-
...props
|
|
139
|
-
}
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export {
|
|
144
|
-
AlertDialog,
|
|
145
|
-
AlertDialogTrigger,
|
|
146
|
-
AlertDialogPortal,
|
|
147
|
-
AlertDialogOverlay,
|
|
148
|
-
AlertDialogContent,
|
|
149
|
-
AlertDialogHeader,
|
|
150
|
-
AlertDialogFooter,
|
|
151
|
-
AlertDialogTitle,
|
|
152
|
-
AlertDialogDescription,
|
|
153
|
-
AlertDialogAction,
|
|
154
|
-
AlertDialogCancel
|
|
155
|
-
};
|