@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,270 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/components/input-group/index.tsx
|
|
22
|
-
var input_group_exports = {};
|
|
23
|
-
__export(input_group_exports, {
|
|
24
|
-
InputGroup: () => InputGroup,
|
|
25
|
-
InputGroupAddon: () => InputGroupAddon,
|
|
26
|
-
InputGroupButton: () => InputGroupButton,
|
|
27
|
-
InputGroupInput: () => InputGroupInput,
|
|
28
|
-
InputGroupText: () => InputGroupText,
|
|
29
|
-
InputGroupTextarea: () => InputGroupTextarea
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(input_group_exports);
|
|
32
|
-
var import_utils4 = require("@foundrykit/utils");
|
|
33
|
-
var import_class_variance_authority2 = require("class-variance-authority");
|
|
34
|
-
|
|
35
|
-
// src/components/button/index.tsx
|
|
36
|
-
var import_utils = require("@foundrykit/utils");
|
|
37
|
-
var import_react_slot = require("@radix-ui/react-slot");
|
|
38
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
39
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
-
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
41
|
-
"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 shrink-0 items-center justify-center gap-2 rounded-[var(--button-radius,calc(var(--radius)-2px))] font-[var(--button-weight,500)] text-sm whitespace-nowrap [text-transform:var(--button-case,none)] transition-all outline-none focus-visible:ring-[3px] active:not-disabled:scale-[var(--motion-press-scale,0.97)] disabled:pointer-events-none disabled:opacity-50 motion-reduce:active:not-disabled:scale-100 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
42
|
-
{
|
|
43
|
-
variants: {
|
|
44
|
-
variant: {
|
|
45
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",
|
|
46
|
-
destructive: "bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",
|
|
47
|
-
outline: "bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
|
|
48
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",
|
|
49
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
50
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
51
|
-
"inline-link": "inline align-baseline text-inherit underline underline-offset-4 hover:text-inherit",
|
|
52
|
-
navlink: "text-foreground hover:text-accent-foreground underline-offset-4 hover:underline"
|
|
53
|
-
},
|
|
54
|
-
size: {
|
|
55
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
56
|
-
sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
57
|
-
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
58
|
-
icon: "size-9"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
// The link-style variants read as inline text, not a button box: strip the
|
|
62
|
-
// height/padding/radius that `size` would otherwise apply, across all sizes.
|
|
63
|
-
compoundVariants: [
|
|
64
|
-
{
|
|
65
|
-
variant: ["inline-link", "navlink"],
|
|
66
|
-
className: "h-auto rounded-none p-0 has-[>svg]:px-0"
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
defaultVariants: {
|
|
70
|
-
variant: "default",
|
|
71
|
-
size: "default"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
function Button({
|
|
76
|
-
className,
|
|
77
|
-
variant,
|
|
78
|
-
size,
|
|
79
|
-
asChild = false,
|
|
80
|
-
...props
|
|
81
|
-
}) {
|
|
82
|
-
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
83
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
84
|
-
Comp,
|
|
85
|
-
{
|
|
86
|
-
"data-slot": "button",
|
|
87
|
-
className: (0, import_utils.cn)(buttonVariants({ variant, size, className })),
|
|
88
|
-
...props
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// src/components/input/index.tsx
|
|
94
|
-
var import_utils2 = require("@foundrykit/utils");
|
|
95
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
96
|
-
function Input({ className, type, ...props }) {
|
|
97
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
98
|
-
"input",
|
|
99
|
-
{
|
|
100
|
-
type,
|
|
101
|
-
"data-slot": "input",
|
|
102
|
-
className: (0, import_utils2.cn)(
|
|
103
|
-
"border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 flex h-[var(--input-height,2.25rem)] w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
104
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
105
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
106
|
-
className
|
|
107
|
-
),
|
|
108
|
-
...props
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// src/components/textarea/index.tsx
|
|
114
|
-
var import_utils3 = require("@foundrykit/utils");
|
|
115
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
116
|
-
function Textarea({ className, ...props }) {
|
|
117
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
118
|
-
"textarea",
|
|
119
|
-
{
|
|
120
|
-
"data-slot": "textarea",
|
|
121
|
-
className: (0, import_utils3.cn)(
|
|
122
|
-
"border-input placeholder:text-muted-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 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
123
|
-
className
|
|
124
|
-
),
|
|
125
|
-
...props
|
|
126
|
-
}
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// src/components/input-group/index.tsx
|
|
131
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
132
|
-
function InputGroup({ className, ...props }) {
|
|
133
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
134
|
-
"div",
|
|
135
|
-
{
|
|
136
|
-
"data-slot": "input-group",
|
|
137
|
-
role: "group",
|
|
138
|
-
className: (0, import_utils4.cn)(
|
|
139
|
-
"group/input-group border-input has-disabled:bg-input/50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 relative flex h-8 w-full min-w-0 items-center rounded-lg border transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:opacity-50 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
140
|
-
className
|
|
141
|
-
),
|
|
142
|
-
...props
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
var inputGroupAddonVariants = (0, import_class_variance_authority2.cva)(
|
|
147
|
-
"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
148
|
-
{
|
|
149
|
-
variants: {
|
|
150
|
-
align: {
|
|
151
|
-
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
152
|
-
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
153
|
-
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
154
|
-
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
defaultVariants: {
|
|
158
|
-
align: "inline-start"
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
);
|
|
162
|
-
function InputGroupAddon({
|
|
163
|
-
className,
|
|
164
|
-
align = "inline-start",
|
|
165
|
-
...props
|
|
166
|
-
}) {
|
|
167
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
168
|
-
"div",
|
|
169
|
-
{
|
|
170
|
-
role: "group",
|
|
171
|
-
"data-slot": "input-group-addon",
|
|
172
|
-
"data-align": align,
|
|
173
|
-
className: (0, import_utils4.cn)(inputGroupAddonVariants({ align }), className),
|
|
174
|
-
onClick: (e) => {
|
|
175
|
-
if (e.target.closest("button")) {
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
179
|
-
},
|
|
180
|
-
...props
|
|
181
|
-
}
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
var inputGroupButtonVariants = (0, import_class_variance_authority2.cva)(
|
|
185
|
-
"flex items-center gap-2 text-sm shadow-none",
|
|
186
|
-
{
|
|
187
|
-
variants: {
|
|
188
|
-
size: {
|
|
189
|
-
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
190
|
-
sm: "",
|
|
191
|
-
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
192
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
defaultVariants: {
|
|
196
|
-
size: "xs"
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
);
|
|
200
|
-
function InputGroupButton({
|
|
201
|
-
className,
|
|
202
|
-
type = "button",
|
|
203
|
-
variant = "ghost",
|
|
204
|
-
size = "xs",
|
|
205
|
-
...props
|
|
206
|
-
}) {
|
|
207
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
208
|
-
Button,
|
|
209
|
-
{
|
|
210
|
-
type,
|
|
211
|
-
"data-size": size,
|
|
212
|
-
variant,
|
|
213
|
-
className: (0, import_utils4.cn)(inputGroupButtonVariants({ size }), className),
|
|
214
|
-
...props
|
|
215
|
-
}
|
|
216
|
-
);
|
|
217
|
-
}
|
|
218
|
-
function InputGroupText({ className, ...props }) {
|
|
219
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
220
|
-
"span",
|
|
221
|
-
{
|
|
222
|
-
className: (0, import_utils4.cn)(
|
|
223
|
-
"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
224
|
-
className
|
|
225
|
-
),
|
|
226
|
-
...props
|
|
227
|
-
}
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
function InputGroupInput({
|
|
231
|
-
className,
|
|
232
|
-
...props
|
|
233
|
-
}) {
|
|
234
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
235
|
-
Input,
|
|
236
|
-
{
|
|
237
|
-
"data-slot": "input-group-control",
|
|
238
|
-
className: (0, import_utils4.cn)(
|
|
239
|
-
"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
240
|
-
className
|
|
241
|
-
),
|
|
242
|
-
...props
|
|
243
|
-
}
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
function InputGroupTextarea({
|
|
247
|
-
className,
|
|
248
|
-
...props
|
|
249
|
-
}) {
|
|
250
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
251
|
-
Textarea,
|
|
252
|
-
{
|
|
253
|
-
"data-slot": "input-group-control",
|
|
254
|
-
className: (0, import_utils4.cn)(
|
|
255
|
-
"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
256
|
-
className
|
|
257
|
-
),
|
|
258
|
-
...props
|
|
259
|
-
}
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
263
|
-
0 && (module.exports = {
|
|
264
|
-
InputGroup,
|
|
265
|
-
InputGroupAddon,
|
|
266
|
-
InputGroupButton,
|
|
267
|
-
InputGroupInput,
|
|
268
|
-
InputGroupText,
|
|
269
|
-
InputGroupTextarea
|
|
270
|
-
});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { Button } from '../button/index.cjs';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Container that groups a control with addons in a single bordered field,
|
|
9
|
-
* managing shared focus/invalid/disabled styling. Compose with
|
|
10
|
-
* {@link InputGroupInput} or {@link InputGroupTextarea} as the control and
|
|
11
|
-
* {@link InputGroupAddon} (holding {@link InputGroupText} or
|
|
12
|
-
* {@link InputGroupButton}) for leading/trailing content.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```tsx
|
|
16
|
-
* <InputGroup>
|
|
17
|
-
* <InputGroupAddon><SearchIcon /></InputGroupAddon>
|
|
18
|
-
* <InputGroupInput placeholder="Search" />
|
|
19
|
-
* </InputGroup>
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
declare function InputGroup({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
23
|
-
declare const inputGroupAddonVariants: (props?: ({
|
|
24
|
-
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
25
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
26
|
-
/**
|
|
27
|
-
* Slot for icons, text or buttons alongside the control. The `align` variant
|
|
28
|
-
* (`inline-start`/`inline-end`/`block-start`/`block-end`) positions it; clicking
|
|
29
|
-
* empty addon space focuses the group's input.
|
|
30
|
-
*/
|
|
31
|
-
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>): react_jsx_runtime.JSX.Element;
|
|
32
|
-
declare const inputGroupButtonVariants: (props?: ({
|
|
33
|
-
size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
|
|
34
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
35
|
-
/**
|
|
36
|
-
* {@link Button} preset for use inside an addon: defaults to `type="button"`,
|
|
37
|
-
* `variant="ghost"` and a compact `size` (`xs`, `sm`, `icon-xs`, `icon-sm`).
|
|
38
|
-
*/
|
|
39
|
-
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, 'size'> & VariantProps<typeof inputGroupButtonVariants>): react_jsx_runtime.JSX.Element;
|
|
40
|
-
declare function InputGroupText({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
|
|
41
|
-
declare function InputGroupInput({ className, ...props }: React.ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
|
|
42
|
-
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<'textarea'>): react_jsx_runtime.JSX.Element;
|
|
43
|
-
|
|
44
|
-
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/components/item/index.tsx
|
|
31
|
-
var item_exports = {};
|
|
32
|
-
__export(item_exports, {
|
|
33
|
-
Item: () => Item,
|
|
34
|
-
ItemActions: () => ItemActions,
|
|
35
|
-
ItemContent: () => ItemContent,
|
|
36
|
-
ItemDescription: () => ItemDescription,
|
|
37
|
-
ItemFooter: () => ItemFooter,
|
|
38
|
-
ItemGroup: () => ItemGroup,
|
|
39
|
-
ItemHeader: () => ItemHeader,
|
|
40
|
-
ItemMedia: () => ItemMedia,
|
|
41
|
-
ItemSeparator: () => ItemSeparator,
|
|
42
|
-
ItemTitle: () => ItemTitle,
|
|
43
|
-
itemMediaVariants: () => itemMediaVariants,
|
|
44
|
-
itemVariants: () => itemVariants
|
|
45
|
-
});
|
|
46
|
-
module.exports = __toCommonJS(item_exports);
|
|
47
|
-
var import_utils2 = require("@foundrykit/utils");
|
|
48
|
-
var import_react_slot = require("@radix-ui/react-slot");
|
|
49
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
50
|
-
|
|
51
|
-
// src/components/separator/index.tsx
|
|
52
|
-
var import_utils = require("@foundrykit/utils");
|
|
53
|
-
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
54
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
55
|
-
function Separator({
|
|
56
|
-
className,
|
|
57
|
-
orientation = "horizontal",
|
|
58
|
-
decorative = true,
|
|
59
|
-
...props
|
|
60
|
-
}) {
|
|
61
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
62
|
-
SeparatorPrimitive.Root,
|
|
63
|
-
{
|
|
64
|
-
"data-slot": "separator",
|
|
65
|
-
decorative,
|
|
66
|
-
orientation,
|
|
67
|
-
className: (0, import_utils.cn)(
|
|
68
|
-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
69
|
-
className
|
|
70
|
-
),
|
|
71
|
-
...props
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// src/components/item/index.tsx
|
|
77
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
78
|
-
function ItemGroup({ className, ...props }) {
|
|
79
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
80
|
-
"div",
|
|
81
|
-
{
|
|
82
|
-
role: "list",
|
|
83
|
-
"data-slot": "item-group",
|
|
84
|
-
className: (0, import_utils2.cn)("group/item-group flex flex-col", className),
|
|
85
|
-
...props
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
function ItemSeparator({
|
|
90
|
-
className,
|
|
91
|
-
...props
|
|
92
|
-
}) {
|
|
93
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
94
|
-
Separator,
|
|
95
|
-
{
|
|
96
|
-
"data-slot": "item-separator",
|
|
97
|
-
orientation: "horizontal",
|
|
98
|
-
className: (0, import_utils2.cn)("my-0", className),
|
|
99
|
-
...props
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
var itemVariants = (0, import_class_variance_authority.cva)(
|
|
104
|
-
"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",
|
|
105
|
-
{
|
|
106
|
-
variants: {
|
|
107
|
-
variant: {
|
|
108
|
-
default: "bg-transparent",
|
|
109
|
-
outline: "border-border",
|
|
110
|
-
muted: "bg-muted/50"
|
|
111
|
-
},
|
|
112
|
-
size: {
|
|
113
|
-
default: "gap-4 p-4",
|
|
114
|
-
sm: "gap-2.5 px-4 py-3"
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
defaultVariants: {
|
|
118
|
-
variant: "default",
|
|
119
|
-
size: "default"
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
function Item({
|
|
124
|
-
className,
|
|
125
|
-
variant,
|
|
126
|
-
size,
|
|
127
|
-
asChild = false,
|
|
128
|
-
...props
|
|
129
|
-
}) {
|
|
130
|
-
const Comp = asChild ? import_react_slot.Slot : "div";
|
|
131
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
132
|
-
Comp,
|
|
133
|
-
{
|
|
134
|
-
"data-slot": "item",
|
|
135
|
-
"data-variant": variant,
|
|
136
|
-
"data-size": size,
|
|
137
|
-
className: (0, import_utils2.cn)(itemVariants({ variant, size, className })),
|
|
138
|
-
...props
|
|
139
|
-
}
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
var itemMediaVariants = (0, import_class_variance_authority.cva)(
|
|
143
|
-
"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",
|
|
144
|
-
{
|
|
145
|
-
variants: {
|
|
146
|
-
variant: {
|
|
147
|
-
default: "bg-transparent",
|
|
148
|
-
icon: "bg-muted size-8 rounded-sm border [&_svg:not([class*='size-'])]:size-4",
|
|
149
|
-
image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
defaultVariants: {
|
|
153
|
-
variant: "default"
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
);
|
|
157
|
-
function ItemMedia({
|
|
158
|
-
className,
|
|
159
|
-
variant,
|
|
160
|
-
...props
|
|
161
|
-
}) {
|
|
162
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
163
|
-
"div",
|
|
164
|
-
{
|
|
165
|
-
"data-slot": "item-media",
|
|
166
|
-
"data-variant": variant,
|
|
167
|
-
className: (0, import_utils2.cn)(itemMediaVariants({ variant, className })),
|
|
168
|
-
...props
|
|
169
|
-
}
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
function ItemContent({ className, ...props }) {
|
|
173
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
174
|
-
"div",
|
|
175
|
-
{
|
|
176
|
-
"data-slot": "item-content",
|
|
177
|
-
className: (0, import_utils2.cn)(
|
|
178
|
-
"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
|
|
179
|
-
className
|
|
180
|
-
),
|
|
181
|
-
...props
|
|
182
|
-
}
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
function ItemTitle({ className, ...props }) {
|
|
186
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
187
|
-
"div",
|
|
188
|
-
{
|
|
189
|
-
"data-slot": "item-title",
|
|
190
|
-
className: (0, import_utils2.cn)(
|
|
191
|
-
"flex w-fit items-center gap-2 text-sm leading-snug font-medium",
|
|
192
|
-
className
|
|
193
|
-
),
|
|
194
|
-
...props
|
|
195
|
-
}
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
function ItemDescription({ className, ...props }) {
|
|
199
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
200
|
-
"p",
|
|
201
|
-
{
|
|
202
|
-
"data-slot": "item-description",
|
|
203
|
-
className: (0, import_utils2.cn)(
|
|
204
|
-
"text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
|
|
205
|
-
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
206
|
-
className
|
|
207
|
-
),
|
|
208
|
-
...props
|
|
209
|
-
}
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
function ItemActions({ className, ...props }) {
|
|
213
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
214
|
-
"div",
|
|
215
|
-
{
|
|
216
|
-
"data-slot": "item-actions",
|
|
217
|
-
className: (0, import_utils2.cn)("flex items-center gap-2", className),
|
|
218
|
-
...props
|
|
219
|
-
}
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
function ItemHeader({ className, ...props }) {
|
|
223
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
224
|
-
"div",
|
|
225
|
-
{
|
|
226
|
-
"data-slot": "item-header",
|
|
227
|
-
className: (0, import_utils2.cn)(
|
|
228
|
-
"flex basis-full items-center justify-between gap-2",
|
|
229
|
-
className
|
|
230
|
-
),
|
|
231
|
-
...props
|
|
232
|
-
}
|
|
233
|
-
);
|
|
234
|
-
}
|
|
235
|
-
function ItemFooter({ className, ...props }) {
|
|
236
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
237
|
-
"div",
|
|
238
|
-
{
|
|
239
|
-
"data-slot": "item-footer",
|
|
240
|
-
className: (0, import_utils2.cn)(
|
|
241
|
-
"flex basis-full items-center justify-between gap-2",
|
|
242
|
-
className
|
|
243
|
-
),
|
|
244
|
-
...props
|
|
245
|
-
}
|
|
246
|
-
);
|
|
247
|
-
}
|
|
248
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
249
|
-
0 && (module.exports = {
|
|
250
|
-
Item,
|
|
251
|
-
ItemActions,
|
|
252
|
-
ItemContent,
|
|
253
|
-
ItemDescription,
|
|
254
|
-
ItemFooter,
|
|
255
|
-
ItemGroup,
|
|
256
|
-
ItemHeader,
|
|
257
|
-
ItemMedia,
|
|
258
|
-
ItemSeparator,
|
|
259
|
-
ItemTitle,
|
|
260
|
-
itemMediaVariants,
|
|
261
|
-
itemVariants
|
|
262
|
-
});
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { Separator } from '../separator/index.cjs';
|
|
6
|
-
import '@radix-ui/react-separator';
|
|
7
|
-
|
|
8
|
-
declare function ItemGroup({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
9
|
-
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
|
|
10
|
-
declare const itemVariants: (props?: ({
|
|
11
|
-
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
12
|
-
size?: "default" | "sm" | null | undefined;
|
|
13
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
|
-
/**
|
|
15
|
-
* Flexible row for lists of content: a leading {@link ItemMedia}, a stacked
|
|
16
|
-
* {@link ItemContent} (with {@link ItemTitle}/{@link ItemDescription}) and
|
|
17
|
-
* trailing {@link ItemActions}. Styled via {@link itemVariants} with `variant`
|
|
18
|
-
* (default, outline, muted) and `size`; set `asChild` to render as a link.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```tsx
|
|
22
|
-
* <Item variant="outline">
|
|
23
|
-
* <ItemMedia variant="icon"><StarIcon /></ItemMedia>
|
|
24
|
-
* <ItemContent>
|
|
25
|
-
* <ItemTitle>Favorites</ItemTitle>
|
|
26
|
-
* <ItemDescription>Your starred items</ItemDescription>
|
|
27
|
-
* </ItemContent>
|
|
28
|
-
* <ItemActions><ChevronRightIcon /></ItemActions>
|
|
29
|
-
* </Item>
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemVariants> & {
|
|
33
|
-
asChild?: boolean;
|
|
34
|
-
}): react_jsx_runtime.JSX.Element;
|
|
35
|
-
declare const itemMediaVariants: (props?: ({
|
|
36
|
-
variant?: "default" | "image" | "icon" | null | undefined;
|
|
37
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
38
|
-
/** Leading media slot for icons (`variant="icon"`), images (`variant="image"`) or arbitrary content. */
|
|
39
|
-
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): react_jsx_runtime.JSX.Element;
|
|
40
|
-
declare function ItemContent({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
41
|
-
declare function ItemTitle({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
42
|
-
declare function ItemDescription({ className, ...props }: React.ComponentProps<'p'>): react_jsx_runtime.JSX.Element;
|
|
43
|
-
declare function ItemActions({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
44
|
-
declare function ItemHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
45
|
-
declare function ItemFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
46
|
-
|
|
47
|
-
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, itemMediaVariants, itemVariants };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/components/kbd/index.tsx
|
|
21
|
-
var kbd_exports = {};
|
|
22
|
-
__export(kbd_exports, {
|
|
23
|
-
Kbd: () => Kbd,
|
|
24
|
-
KbdGroup: () => KbdGroup
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(kbd_exports);
|
|
27
|
-
var import_utils = require("@foundrykit/utils");
|
|
28
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
function Kbd({ className, ...props }) {
|
|
30
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
31
|
-
"kbd",
|
|
32
|
-
{
|
|
33
|
-
"data-slot": "kbd",
|
|
34
|
-
className: (0, import_utils.cn)(
|
|
35
|
-
"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",
|
|
36
|
-
"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
|
|
37
|
-
className
|
|
38
|
-
),
|
|
39
|
-
...props
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
function KbdGroup({ className, ...props }) {
|
|
44
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
45
|
-
"kbd",
|
|
46
|
-
{
|
|
47
|
-
"data-slot": "kbd-group",
|
|
48
|
-
className: (0, import_utils.cn)("inline-flex items-center gap-1", className),
|
|
49
|
-
...props
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
54
|
-
0 && (module.exports = {
|
|
55
|
-
Kbd,
|
|
56
|
-
KbdGroup
|
|
57
|
-
});
|