@dynamic-labs-sdk/droplet 1.51.0 → 1.52.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 +0 -1
- package/dist/components/ui/field/field.d.ts +4 -0
- package/dist/components/ui/field/field.d.ts.map +1 -1
- package/dist/components/ui/field/field.stories.d.ts +8 -0
- package/dist/components/ui/field/field.stories.d.ts.map +1 -1
- package/dist/components/ui/field/use-field-feedback.d.ts +25 -0
- package/dist/components/ui/field/use-field-feedback.d.ts.map +1 -0
- package/dist/components/ui/table/table.d.ts +7 -1
- package/dist/components/ui/table/table.d.ts.map +1 -1
- package/dist/components/ui/well/index.d.ts +1 -1
- package/dist/components/ui/well/index.d.ts.map +1 -1
- package/dist/components/ui/well/well-reveal.stories.d.ts.map +1 -1
- package/dist/components/ui/well/well.d.ts +18 -3
- package/dist/components/ui/well/well.d.ts.map +1 -1
- package/dist/components/ui/well/well.stories.d.ts +1 -9
- package/dist/components/ui/well/well.stories.d.ts.map +1 -1
- package/dist/index.cjs +727 -279
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +520 -69
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -6
- package/dist/components/migration/banner/banner.d.ts +0 -24
- package/dist/components/migration/banner/banner.d.ts.map +0 -1
- package/dist/components/migration/banner/banner.stories.d.ts +0 -39
- package/dist/components/migration/banner/banner.stories.d.ts.map +0 -1
- package/dist/components/migration/banner/index.d.ts +0 -2
- package/dist/components/migration/banner/index.d.ts.map +0 -1
- package/dist/components/migration/double-section/double-section.d.ts +0 -29
- package/dist/components/migration/double-section/double-section.d.ts.map +0 -1
- package/dist/components/migration/double-section/double-section.stories.d.ts +0 -32
- package/dist/components/migration/double-section/double-section.stories.d.ts.map +0 -1
- package/dist/components/migration/double-section/index.d.ts +0 -2
- package/dist/components/migration/double-section/index.d.ts.map +0 -1
- package/dist/components/migration/field/field.d.ts +0 -19
- package/dist/components/migration/field/field.d.ts.map +0 -1
- package/dist/components/migration/field/field.stories.d.ts +0 -43
- package/dist/components/migration/field/field.stories.d.ts.map +0 -1
- package/dist/components/migration/field/index.d.ts +0 -2
- package/dist/components/migration/field/index.d.ts.map +0 -1
- package/dist/components/migration/index.d.ts +0 -16
- package/dist/components/migration/index.d.ts.map +0 -1
- package/dist/components/migration/settings-section-v2/index.d.ts +0 -2
- package/dist/components/migration/settings-section-v2/index.d.ts.map +0 -1
- package/dist/components/migration/settings-section-v2/settings-section-v2.d.ts +0 -45
- package/dist/components/migration/settings-section-v2/settings-section-v2.d.ts.map +0 -1
- package/dist/components/migration/settings-section-v2/settings-section-v2.stories.d.ts +0 -40
- package/dist/components/migration/settings-section-v2/settings-section-v2.stories.d.ts.map +0 -1
- package/dist/components/migration/sub-section/index.d.ts +0 -2
- package/dist/components/migration/sub-section/index.d.ts.map +0 -1
- package/dist/components/migration/sub-section/sub-section.d.ts +0 -26
- package/dist/components/migration/sub-section/sub-section.d.ts.map +0 -1
- package/dist/components/migration/sub-section/sub-section.stories.d.ts +0 -33
- package/dist/components/migration/sub-section/sub-section.stories.d.ts.map +0 -1
- package/dist/components/migration/toggle-group/index.d.ts +0 -2
- package/dist/components/migration/toggle-group/index.d.ts.map +0 -1
- package/dist/components/migration/toggle-group/toggle-group.d.ts +0 -22
- package/dist/components/migration/toggle-group/toggle-group.d.ts.map +0 -1
- package/dist/components/migration/toggle-group/toggle-group.stories.d.ts +0 -30
- package/dist/components/migration/toggle-group/toggle-group.stories.d.ts.map +0 -1
- package/dist/components/patterns/config-tab-with-pill/config-tab-with-pill.stories.d.ts +0 -17
- package/dist/components/patterns/config-tab-with-pill/config-tab-with-pill.stories.d.ts.map +0 -1
- package/dist/components/patterns/cors-list/cors-list.stories.d.ts +0 -17
- package/dist/components/patterns/cors-list/cors-list.stories.d.ts.map +0 -1
- package/dist/components/patterns/rounded-row-list/rounded-row-list.stories.d.ts +0 -17
- package/dist/components/patterns/rounded-row-list/rounded-row-list.stories.d.ts.map +0 -1
- package/dist/components/status-badge/index.d.ts +0 -2
- package/dist/components/status-badge/index.d.ts.map +0 -1
- package/dist/components/status-badge/status-badge.d.ts +0 -10
- package/dist/components/status-badge/status-badge.d.ts.map +0 -1
- package/dist/components/status-badge/status-badge.stories.d.ts +0 -24
- package/dist/components/status-badge/status-badge.stories.d.ts.map +0 -1
- package/dist/components/ui/flush-card-detach/flush-card-detach.stories.d.ts +0 -17
- package/dist/components/ui/flush-card-detach/flush-card-detach.stories.d.ts.map +0 -1
- package/dist/migration.cjs +0 -328
- package/dist/migration.cjs.map +0 -1
- package/dist/migration.esm.js +0 -322
- package/dist/migration.esm.js.map +0 -1
- package/dist/toggle-row-CeiCy3Aa.esm.js +0 -385
- package/dist/toggle-row-CeiCy3Aa.esm.js.map +0 -1
- package/dist/toggle-row-DcV81G3w.cjs +0 -433
- package/dist/toggle-row-DcV81G3w.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -25,7 +25,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
|
-
|
|
28
|
+
let clsx = require("clsx");
|
|
29
|
+
let tailwind_merge = require("tailwind-merge");
|
|
29
30
|
let react = require("react");
|
|
30
31
|
let motion_react = require("motion/react");
|
|
31
32
|
let _hugeicons_react = require("@hugeicons/react");
|
|
@@ -49,6 +50,8 @@ let _radix_ui_react_popover = require("@radix-ui/react-popover");
|
|
|
49
50
|
_radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
50
51
|
let _radix_ui_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
51
52
|
let lucide_react = require("lucide-react");
|
|
53
|
+
let _paper_design_shaders_react = require("@paper-design/shaders-react");
|
|
54
|
+
let _radix_ui_react_label = require("@radix-ui/react-label");
|
|
52
55
|
let _radix_ui_react_select = require("@radix-ui/react-select");
|
|
53
56
|
let _radix_ui_react_radio_group = require("@radix-ui/react-radio-group");
|
|
54
57
|
_radix_ui_react_radio_group = __toESM(_radix_ui_react_radio_group);
|
|
@@ -57,6 +60,7 @@ _radix_ui_react_scroll_area = __toESM(_radix_ui_react_scroll_area);
|
|
|
57
60
|
let _radix_ui_react_separator = require("@radix-ui/react-separator");
|
|
58
61
|
let next_themes = require("next-themes");
|
|
59
62
|
let sonner = require("sonner");
|
|
63
|
+
let _radix_ui_react_switch = require("@radix-ui/react-switch");
|
|
60
64
|
let _tanstack_react_table = require("@tanstack/react-table");
|
|
61
65
|
let _tanstack_react_virtual = require("@tanstack/react-virtual");
|
|
62
66
|
let _radix_ui_react_tabs = require("@radix-ui/react-tabs");
|
|
@@ -65,8 +69,145 @@ let _radix_ui_react_tooltip = require("@radix-ui/react-tooltip");
|
|
|
65
69
|
let next_link = require("next/link");
|
|
66
70
|
next_link = __toESM(next_link);
|
|
67
71
|
|
|
72
|
+
//#region src/lib/utils.ts
|
|
73
|
+
const cn = (...inputs) => (0, tailwind_merge.twMerge)((0, clsx.clsx)(inputs));
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/components/ui/spinner/spinner.tsx
|
|
77
|
+
/** Maps the `size` prop to Tailwind size utilities. */
|
|
78
|
+
const sizeMap = {
|
|
79
|
+
lg: "size-6",
|
|
80
|
+
md: "size-4",
|
|
81
|
+
sm: "size-3"
|
|
82
|
+
};
|
|
83
|
+
const Spinner = ({ className, size = "md" }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("output", {
|
|
84
|
+
"aria-label": "Loading",
|
|
85
|
+
className: "inline-flex",
|
|
86
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
87
|
+
viewBox: "0 0 24 24",
|
|
88
|
+
fill: "none",
|
|
89
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
90
|
+
className: cn("animate-spin motion-reduce:animate-none", sizeMap[size], className),
|
|
91
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
92
|
+
className: "opacity-25",
|
|
93
|
+
cx: "12",
|
|
94
|
+
cy: "12",
|
|
95
|
+
r: "10",
|
|
96
|
+
stroke: "currentColor",
|
|
97
|
+
strokeWidth: "4"
|
|
98
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
99
|
+
className: "opacity-75",
|
|
100
|
+
fill: "currentColor",
|
|
101
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
102
|
+
})]
|
|
103
|
+
})
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/components/ui/button/button.tsx
|
|
108
|
+
const buttonVariants = (0, class_variance_authority.cva)("relative isolate inline-flex items-center justify-center gap-1.5 whitespace-nowrap select-none text-[13px] font-medium leading-[calc(18/13)] touch-manipulation transition-[background-color,color,opacity,box-shadow,transform,filter,scale] duration-150 ease-out active:scale-[0.96] motion-reduce:transition-none cursor-pointer border-0 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", {
|
|
109
|
+
compoundVariants: [
|
|
110
|
+
{
|
|
111
|
+
class: "min-w-16",
|
|
112
|
+
size: "sm",
|
|
113
|
+
variant: [
|
|
114
|
+
"default",
|
|
115
|
+
"destructive",
|
|
116
|
+
"outline",
|
|
117
|
+
"secondary"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
class: "min-w-20",
|
|
122
|
+
size: "default",
|
|
123
|
+
variant: [
|
|
124
|
+
"default",
|
|
125
|
+
"destructive",
|
|
126
|
+
"outline",
|
|
127
|
+
"secondary"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
class: "min-w-24",
|
|
132
|
+
size: "lg",
|
|
133
|
+
variant: [
|
|
134
|
+
"default",
|
|
135
|
+
"destructive",
|
|
136
|
+
"outline",
|
|
137
|
+
"secondary"
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
defaultVariants: {
|
|
142
|
+
size: "default",
|
|
143
|
+
variant: "default"
|
|
144
|
+
},
|
|
145
|
+
variants: {
|
|
146
|
+
size: {
|
|
147
|
+
default: "rounded-md px-3 py-1.5 h-8 has-[>svg]:px-2.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
148
|
+
icon: "size-9 rounded-md",
|
|
149
|
+
"icon-sm": "size-7 rounded-md [&_svg:not([class*='size-'])]:size-3.5 relative before:absolute before:-inset-[8px] before:content-['']",
|
|
150
|
+
"icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3 relative before:absolute before:-inset-[10px] before:content-['']",
|
|
151
|
+
lg: "rounded-md px-5 py-2.5 h-10 has-[>svg]:px-4 [&_svg:not([class*='size-'])]:size-4",
|
|
152
|
+
sm: "rounded-md px-2.5 py-1 h-7 has-[>svg]:px-2 [&_svg:not([class*='size-'])]:size-3 before:absolute before:-inset-y-[6px] before:inset-x-0 before:content-['']",
|
|
153
|
+
xs: "rounded-md px-3 py-1 h-7 [&_svg:not([class*='size-'])]:size-3"
|
|
154
|
+
},
|
|
155
|
+
variant: {
|
|
156
|
+
default: "bg-(--action) text-white shadow-[0_0_0_1px_var(--action),var(--shadow-button)] hover:brightness-105 [text-shadow:0_1px_1px_rgba(0,0,0,0.16)]",
|
|
157
|
+
destructive: "bg-destructive text-white shadow-[0_0_0_1px_var(--destructive),var(--shadow-button)] hover:brightness-105 [text-shadow:0_1px_1px_rgba(0,0,0,0.16)] focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
158
|
+
ghost: "text-muted-foreground hover:bg-[#f8f8f9] hover:text-foreground dark:hover:bg-white/[0.06]",
|
|
159
|
+
link: "text-(--action) underline-offset-4 hover:underline",
|
|
160
|
+
outline: "bg-white shadow-[var(--shadow-input)] hover:bg-[#f8f8f9] hover:shadow-[var(--shadow-input-hover)] dark:bg-input/30 dark:hover:bg-white/[0.06]",
|
|
161
|
+
secondary: "bg-white shadow-[var(--shadow-secondary)] hover:bg-[#f8f8f9] hover:shadow-[var(--shadow-secondary-hover)] dark:bg-input/30 dark:hover:bg-white/[0.06]"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
/**
|
|
166
|
+
* Primary clickable action button.
|
|
167
|
+
*
|
|
168
|
+
* Variants: `default` | `destructive` | `outline` | `secondary` | `ghost` | `link`.
|
|
169
|
+
* Sizes: `default` | `sm` | `xs` | `lg` | `icon` | `icon-sm` | `icon-xs`.
|
|
170
|
+
* Set `asChild` to render the button styles onto a child element (e.g. an anchor) instead of a `<button>`.
|
|
171
|
+
* Set `loading` to show an inline spinner before the label and disable interaction while an async action is pending.
|
|
172
|
+
* When `asChild` is true, `loading` is ignored — the Slot host cannot render an additional spinner child.
|
|
173
|
+
*/
|
|
174
|
+
const Button = ({ className, variant = "default", size = "default", asChild = false, loading = false, disabled, children, style, ...props }) => {
|
|
175
|
+
if (asChild) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_slot.Slot, {
|
|
176
|
+
"data-slot": "button",
|
|
177
|
+
"data-size": size,
|
|
178
|
+
"data-variant": variant,
|
|
179
|
+
className: cn(buttonVariants({
|
|
180
|
+
className,
|
|
181
|
+
size,
|
|
182
|
+
variant
|
|
183
|
+
})),
|
|
184
|
+
...props,
|
|
185
|
+
disabled,
|
|
186
|
+
style,
|
|
187
|
+
children
|
|
188
|
+
});
|
|
189
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
190
|
+
"data-slot": "button",
|
|
191
|
+
"data-size": size,
|
|
192
|
+
"data-variant": variant,
|
|
193
|
+
className: cn(buttonVariants({
|
|
194
|
+
size,
|
|
195
|
+
variant
|
|
196
|
+
}), loading && "cursor-wait", className),
|
|
197
|
+
disabled: disabled || loading,
|
|
198
|
+
"aria-busy": loading || void 0,
|
|
199
|
+
style: loading ? {
|
|
200
|
+
opacity: 1,
|
|
201
|
+
...style
|
|
202
|
+
} : style,
|
|
203
|
+
...props,
|
|
204
|
+
children: [loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, { className: "size-3.5" }), children]
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
//#endregion
|
|
68
209
|
//#region src/components/unsaved-changes-bar/unsaved-changes-bar.tsx
|
|
69
|
-
const spring$
|
|
210
|
+
const spring$4 = {
|
|
70
211
|
bounce: 0,
|
|
71
212
|
duration: .35,
|
|
72
213
|
type: "spring"
|
|
@@ -104,7 +245,7 @@ const ProgressiveBlur = () => {
|
|
|
104
245
|
});
|
|
105
246
|
};
|
|
106
247
|
const popTransition = {
|
|
107
|
-
...spring$
|
|
248
|
+
...spring$4,
|
|
108
249
|
duration: .25
|
|
109
250
|
};
|
|
110
251
|
const StatusIcon = ({ state }) => {
|
|
@@ -203,7 +344,7 @@ const UnsavedChangesBar = ({ hasChanges, onSave, onReset, suppressed = false })
|
|
|
203
344
|
initial: { opacity: 0 },
|
|
204
345
|
animate: { opacity: 1 },
|
|
205
346
|
exit: { opacity: 0 },
|
|
206
|
-
transition: spring$
|
|
347
|
+
transition: spring$4,
|
|
207
348
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressiveBlur, {})
|
|
208
349
|
}, "blur") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
209
350
|
className: "fixed bottom-10 left-1/2 -translate-x-1/2 z-50",
|
|
@@ -223,7 +364,7 @@ const UnsavedChangesBar = ({ hasChanges, onSave, onReset, suppressed = false })
|
|
|
223
364
|
scale: .95,
|
|
224
365
|
y: 20
|
|
225
366
|
},
|
|
226
|
-
transition: spring$
|
|
367
|
+
transition: spring$4,
|
|
227
368
|
style: { willChange: "opacity, transform" },
|
|
228
369
|
className: "flex items-center gap-1.5 rounded-xl bg-zinc-900 dark:bg-[oklch(0.940_0.008_231)] shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_8px_24px_-4px_rgba(0,0,0,0.25),0_20px_50px_-8px_rgba(0,0,0,0.20)] dark:shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_8px_20px_-4px_rgba(0,0,0,0.10),0_20px_50px_-8px_rgba(0,0,0,0.08)] pl-3 pr-1.5 py-1.5",
|
|
229
370
|
children: [
|
|
@@ -234,13 +375,13 @@ const UnsavedChangesBar = ({ hasChanges, onSave, onReset, suppressed = false })
|
|
|
234
375
|
transition: popTransition,
|
|
235
376
|
className: "flex items-center gap-1.5 ml-0.5",
|
|
236
377
|
style: { pointerEvents: barState === "unsaved" ? "auto" : "none" },
|
|
237
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
378
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
238
379
|
variant: "ghost",
|
|
239
380
|
size: "sm",
|
|
240
381
|
className: "rounded-md text-zinc-400 hover:text-white hover:bg-white/10 dark:text-zinc-500 dark:hover:text-zinc-800 dark:hover:bg-black/[0.06] shrink-0 touch-manipulation",
|
|
241
382
|
onClick: onReset,
|
|
242
383
|
children: "Reset"
|
|
243
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
384
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
244
385
|
size: "sm",
|
|
245
386
|
className: "rounded-md shrink-0 touch-manipulation",
|
|
246
387
|
onClick: handleSave,
|
|
@@ -326,7 +467,7 @@ const Accordion = ({ ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_
|
|
|
326
467
|
const AccordionItem = ({ className, ...props }) => {
|
|
327
468
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_accordion.Item, {
|
|
328
469
|
"data-slot": "accordion-item",
|
|
329
|
-
className:
|
|
470
|
+
className: cn("border-b border-[var(--border-divider)] last:border-b-0", className),
|
|
330
471
|
...props
|
|
331
472
|
});
|
|
332
473
|
};
|
|
@@ -335,7 +476,7 @@ const AccordionTrigger = ({ className, children, ...props }) => {
|
|
|
335
476
|
className: "flex",
|
|
336
477
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_accordion.Trigger, {
|
|
337
478
|
"data-slot": "accordion-trigger",
|
|
338
|
-
className:
|
|
479
|
+
className: cn("focus-visible:ring-ring/50 flex flex-1 items-center justify-between gap-4 rounded-md px-1 py-4 text-left text-sm font-medium touch-manipulation transition-[color,background-color,opacity] duration-150 ease-out motion-reduce:transition-none outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 cursor-pointer", className),
|
|
339
480
|
...props,
|
|
340
481
|
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
341
482
|
icon: _hugeicons_core_free_icons.ArrowRight01Icon,
|
|
@@ -351,7 +492,7 @@ const AccordionContent = ({ className, children, ...props }) => {
|
|
|
351
492
|
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down motion-reduce:animate-none overflow-hidden text-sm",
|
|
352
493
|
...props,
|
|
353
494
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
354
|
-
className:
|
|
495
|
+
className: cn("px-1 pt-0 pb-4", className),
|
|
355
496
|
children
|
|
356
497
|
})
|
|
357
498
|
});
|
|
@@ -421,13 +562,13 @@ const renderTrayLayout = ({ children, isHeader, isFooter, tray = "auto", shelfCl
|
|
|
421
562
|
edge,
|
|
422
563
|
shellClassName: "bg-card"
|
|
423
564
|
};
|
|
424
|
-
const shellClassName =
|
|
565
|
+
const shellClassName = cn("flex flex-col bg-[var(--tray-chrome)] px-[var(--tray-inset)]", edge === "footer" ? "pt-[var(--tray-inset)]" : "pb-[var(--tray-inset)]");
|
|
425
566
|
return {
|
|
426
567
|
content: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
427
568
|
edge === "header" && trayChild,
|
|
428
569
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
429
570
|
"data-slot": "tray-shelf",
|
|
430
|
-
className:
|
|
571
|
+
className: cn("flex flex-1 flex-col overflow-hidden bg-card rounded-[var(--tray-shelf-radius)] shadow-[var(--tray-shelf-shadow)]", shelfClassName),
|
|
431
572
|
children: shelf
|
|
432
573
|
}),
|
|
433
574
|
edge === "footer" && trayChild
|
|
@@ -444,7 +585,7 @@ const AlertDialogTrigger = _radix_ui_react_alert_dialog.Trigger;
|
|
|
444
585
|
const AlertDialogPortal = _radix_ui_react_alert_dialog.Portal;
|
|
445
586
|
const AlertDialogOverlay = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_alert_dialog.Overlay, {
|
|
446
587
|
"data-slot": "alert-dialog-overlay",
|
|
447
|
-
className:
|
|
588
|
+
className: cn("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-[var(--overlay-md)] backdrop-blur-[2px] will-change-[opacity] duration-200 motion-reduce:animate-none", className),
|
|
448
589
|
...props
|
|
449
590
|
});
|
|
450
591
|
const AlertDialogContent = ({ className, size = "default", tray = "auto", children, ...props }) => {
|
|
@@ -458,48 +599,48 @@ const AlertDialogContent = ({ className, size = "default", tray = "auto", childr
|
|
|
458
599
|
"data-slot": "alert-dialog-content",
|
|
459
600
|
"data-size": size,
|
|
460
601
|
"data-tray": edge,
|
|
461
|
-
className:
|
|
602
|
+
className: cn("overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-98 data-[state=open]:zoom-in-95 group/alert-dialog-content fixed top-[50%] left-[50%] z-50 w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-[16px] border-0 shadow-[var(--shadow-elevated)] duration-200 data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md will-change-[opacity,transform] motion-reduce:animate-none", shellClassName, className),
|
|
462
603
|
...props,
|
|
463
604
|
children: content
|
|
464
605
|
})] });
|
|
465
606
|
};
|
|
466
607
|
const AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
467
608
|
"data-slot": "alert-dialog-header",
|
|
468
|
-
className:
|
|
609
|
+
className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 px-5 py-4 bg-card text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
|
|
469
610
|
...props
|
|
470
611
|
});
|
|
471
612
|
const AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
472
613
|
"data-slot": "alert-dialog-footer",
|
|
473
|
-
className:
|
|
614
|
+
className: cn("grid grid-cols-2 gap-2 px-5 py-4 bg-muted", className),
|
|
474
615
|
...props
|
|
475
616
|
});
|
|
476
617
|
const AlertDialogTitle = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_alert_dialog.Title, {
|
|
477
618
|
"data-slot": "alert-dialog-title",
|
|
478
|
-
className:
|
|
619
|
+
className: cn("text-[17px] font-semibold text-balance sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
|
|
479
620
|
...props
|
|
480
621
|
});
|
|
481
622
|
const AlertDialogDescription = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_alert_dialog.Description, {
|
|
482
623
|
"data-slot": "alert-dialog-description",
|
|
483
|
-
className:
|
|
624
|
+
className: cn("text-muted-foreground text-sm text-pretty", className),
|
|
484
625
|
...props
|
|
485
626
|
});
|
|
486
|
-
const AlertDialogAction = ({ className, variant = "destructive", size = "default", ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
627
|
+
const AlertDialogAction = ({ className, variant = "destructive", size = "default", ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
487
628
|
variant,
|
|
488
629
|
size,
|
|
489
630
|
asChild: true,
|
|
490
631
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_alert_dialog.Action, {
|
|
491
632
|
"data-slot": "alert-dialog-action",
|
|
492
|
-
className:
|
|
633
|
+
className: cn(className),
|
|
493
634
|
...props
|
|
494
635
|
})
|
|
495
636
|
});
|
|
496
|
-
const AlertDialogCancel = ({ className, variant = "outline", size = "default", ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
637
|
+
const AlertDialogCancel = ({ className, variant = "outline", size = "default", ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
497
638
|
variant,
|
|
498
639
|
size,
|
|
499
640
|
asChild: true,
|
|
500
641
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_alert_dialog.Cancel, {
|
|
501
642
|
"data-slot": "alert-dialog-cancel",
|
|
502
|
-
className:
|
|
643
|
+
className: cn(className),
|
|
503
644
|
...props
|
|
504
645
|
})
|
|
505
646
|
});
|
|
@@ -510,49 +651,49 @@ const Avatar = ({ className, size = "default", ...props }) => {
|
|
|
510
651
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_avatar.Root, {
|
|
511
652
|
"data-slot": "avatar",
|
|
512
653
|
"data-size": size,
|
|
513
|
-
className:
|
|
654
|
+
className: cn("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6", className),
|
|
514
655
|
...props
|
|
515
656
|
});
|
|
516
657
|
};
|
|
517
658
|
const AvatarImage = ({ className, ...props }) => {
|
|
518
659
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_avatar.Image, {
|
|
519
660
|
"data-slot": "avatar-image",
|
|
520
|
-
className:
|
|
661
|
+
className: cn("aspect-square size-full outline-1 -outline-offset-1 outline-black/10", className),
|
|
521
662
|
...props
|
|
522
663
|
});
|
|
523
664
|
};
|
|
524
665
|
const AvatarFallback = ({ className, ...props }) => {
|
|
525
666
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_avatar.Fallback, {
|
|
526
667
|
"data-slot": "avatar-fallback",
|
|
527
|
-
className:
|
|
668
|
+
className: cn("bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs", className),
|
|
528
669
|
...props
|
|
529
670
|
});
|
|
530
671
|
};
|
|
531
672
|
const AvatarBadge = ({ className, ...props }) => {
|
|
532
673
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
533
674
|
"data-slot": "avatar-badge",
|
|
534
|
-
className:
|
|
675
|
+
className: cn("bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className),
|
|
535
676
|
...props
|
|
536
677
|
});
|
|
537
678
|
};
|
|
538
679
|
const AvatarGroup = ({ className, ...props }) => {
|
|
539
680
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
540
681
|
"data-slot": "avatar-group",
|
|
541
|
-
className:
|
|
682
|
+
className: cn("*:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2", className),
|
|
542
683
|
...props
|
|
543
684
|
});
|
|
544
685
|
};
|
|
545
686
|
const AvatarGroupCount = ({ className, ...props }) => {
|
|
546
687
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
547
688
|
"data-slot": "avatar-group-count",
|
|
548
|
-
className:
|
|
689
|
+
className: cn("bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", className),
|
|
549
690
|
...props
|
|
550
691
|
});
|
|
551
692
|
};
|
|
552
693
|
|
|
553
694
|
//#endregion
|
|
554
695
|
//#region src/components/ui/alert/alert.tsx
|
|
555
|
-
const spring$
|
|
696
|
+
const spring$3 = {
|
|
556
697
|
bounce: 0,
|
|
557
698
|
duration: .35,
|
|
558
699
|
type: "spring"
|
|
@@ -600,7 +741,7 @@ const Alert = ({ variant = "neutral", title, children, dismissible = false, onDi
|
|
|
600
741
|
role: variant === "danger" || variant === "warning" ? "alert" : "status",
|
|
601
742
|
"data-slot": "alert",
|
|
602
743
|
"data-variant": variant,
|
|
603
|
-
className:
|
|
744
|
+
className: cn(alertVariants({ variant }), className),
|
|
604
745
|
...props,
|
|
605
746
|
children: [
|
|
606
747
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -624,7 +765,7 @@ const Alert = ({ variant = "neutral", title, children, dismissible = false, onDi
|
|
|
624
765
|
type: "button",
|
|
625
766
|
"aria-label": "Dismiss",
|
|
626
767
|
whileTap: shouldReduceMotion ? void 0 : { scale: .96 },
|
|
627
|
-
transition: spring$
|
|
768
|
+
transition: spring$3,
|
|
628
769
|
onClick: () => {
|
|
629
770
|
setDismissed(true);
|
|
630
771
|
onDismiss?.();
|
|
@@ -677,7 +818,7 @@ const Badge = ({ className, variant = "neutral", asChild = false, ...props }) =>
|
|
|
677
818
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(asChild ? _radix_ui_react_slot.Slot : "span", {
|
|
678
819
|
"data-slot": "badge",
|
|
679
820
|
"data-variant": variant,
|
|
680
|
-
className:
|
|
821
|
+
className: cn(badgeVariants({ variant }), className),
|
|
681
822
|
...props
|
|
682
823
|
});
|
|
683
824
|
};
|
|
@@ -692,7 +833,7 @@ const Badge = ({ className, variant = "neutral", asChild = false, ...props }) =>
|
|
|
692
833
|
const Breadcrumb = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
693
834
|
"data-slot": "breadcrumb",
|
|
694
835
|
"aria-label": "breadcrumb",
|
|
695
|
-
className:
|
|
836
|
+
className: cn("", className),
|
|
696
837
|
...props
|
|
697
838
|
});
|
|
698
839
|
/**
|
|
@@ -701,7 +842,7 @@ const Breadcrumb = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_ru
|
|
|
701
842
|
*/
|
|
702
843
|
const BreadcrumbList = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", {
|
|
703
844
|
"data-slot": "breadcrumb-list",
|
|
704
|
-
className:
|
|
845
|
+
className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className),
|
|
705
846
|
...props
|
|
706
847
|
});
|
|
707
848
|
/**
|
|
@@ -711,7 +852,7 @@ const BreadcrumbList = ({ className, ...props }) => /* @__PURE__ */ (0, react_js
|
|
|
711
852
|
*/
|
|
712
853
|
const BreadcrumbItem = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
713
854
|
"data-slot": "breadcrumb-item",
|
|
714
|
-
className:
|
|
855
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
715
856
|
...props
|
|
716
857
|
});
|
|
717
858
|
/**
|
|
@@ -730,7 +871,7 @@ const BreadcrumbItem = ({ className, ...props }) => /* @__PURE__ */ (0, react_js
|
|
|
730
871
|
const BreadcrumbLink = ({ asChild = false, className, children, ...props }) => {
|
|
731
872
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(asChild ? _radix_ui_react_slot.Slot : "a", {
|
|
732
873
|
"data-slot": "breadcrumb-link",
|
|
733
|
-
className:
|
|
874
|
+
className: cn("transition-colors duration-150 ease-out hover:text-foreground motion-reduce:transition-none", className),
|
|
734
875
|
...props,
|
|
735
876
|
children
|
|
736
877
|
});
|
|
@@ -745,7 +886,7 @@ const BreadcrumbLink = ({ asChild = false, className, children, ...props }) => {
|
|
|
745
886
|
const BreadcrumbPage = ({ className, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
746
887
|
"data-slot": "breadcrumb-page",
|
|
747
888
|
"aria-current": "page",
|
|
748
|
-
className:
|
|
889
|
+
className: cn("font-normal text-foreground", className),
|
|
749
890
|
...props,
|
|
750
891
|
children
|
|
751
892
|
});
|
|
@@ -758,7 +899,7 @@ const BreadcrumbPage = ({ className, children, ...props }) => /* @__PURE__ */ (0
|
|
|
758
899
|
const BreadcrumbSeparator = ({ className, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
759
900
|
"data-slot": "breadcrumb-separator",
|
|
760
901
|
"aria-hidden": "true",
|
|
761
|
-
className:
|
|
902
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
762
903
|
...props,
|
|
763
904
|
children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
764
905
|
icon: _hugeicons_core_free_icons.ArrowRight01Icon,
|
|
@@ -777,7 +918,7 @@ const BreadcrumbSeparator = ({ className, children, ...props }) => /* @__PURE__
|
|
|
777
918
|
const BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
778
919
|
"data-slot": "breadcrumb-ellipsis",
|
|
779
920
|
"aria-hidden": "true",
|
|
780
|
-
className:
|
|
921
|
+
className: cn("flex size-6 items-center justify-center", className),
|
|
781
922
|
...props,
|
|
782
923
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
783
924
|
icon: _hugeicons_core_free_icons.MoreHorizontalIcon,
|
|
@@ -802,35 +943,35 @@ const Card = ({ className, interactive = false, selected = false, tray = "none",
|
|
|
802
943
|
"data-slot": "card",
|
|
803
944
|
"data-selected": selected || void 0,
|
|
804
945
|
"data-tray": edge,
|
|
805
|
-
className:
|
|
946
|
+
className: cn("text-card-foreground flex flex-col rounded-[16px] border-0 shadow-[var(--shadow-card)] overflow-hidden", shellClassName, interactive && "cursor-pointer transition-[box-shadow,transform] duration-150 ease-out motion-reduce:transition-none hover:shadow-[var(--shadow-elevated)] active:scale-[0.99]", selected && "shadow-[0_0_0_2px_var(--action),var(--shadow-card)]", className),
|
|
806
947
|
...props,
|
|
807
948
|
children: content
|
|
808
949
|
});
|
|
809
950
|
};
|
|
810
951
|
const CardHeader = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
811
952
|
"data-slot": "card-header",
|
|
812
|
-
className:
|
|
953
|
+
className: cn("@container/card-header relative flex flex-col gap-0.5 px-4 py-3.5 bg-card border-b border-[var(--border-divider)]", className),
|
|
813
954
|
...props
|
|
814
955
|
});
|
|
815
956
|
const CardTitle = ({ className, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
816
957
|
"data-slot": "card-title",
|
|
817
|
-
className:
|
|
958
|
+
className: cn("text-base leading-none font-semibold text-balance", className),
|
|
818
959
|
...props,
|
|
819
960
|
children
|
|
820
961
|
});
|
|
821
962
|
const CardDescription = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
822
963
|
"data-slot": "card-description",
|
|
823
|
-
className:
|
|
964
|
+
className: cn("text-muted-foreground text-sm text-pretty", className),
|
|
824
965
|
...props
|
|
825
966
|
});
|
|
826
967
|
const CardContent = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
827
968
|
"data-slot": "card-content",
|
|
828
|
-
className:
|
|
969
|
+
className: cn("flex-1 px-4 py-3 bg-card", className),
|
|
829
970
|
...props
|
|
830
971
|
});
|
|
831
972
|
const CardFooter = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
832
973
|
"data-slot": "card-footer",
|
|
833
|
-
className:
|
|
974
|
+
className: cn("mt-auto flex items-center justify-end gap-2 px-4 py-3.5 border-t border-[var(--border-divider)] bg-muted", className),
|
|
834
975
|
...props
|
|
835
976
|
});
|
|
836
977
|
|
|
@@ -861,7 +1002,7 @@ const CheckIcon = ({ size = 14, strokeWidth = 3, className, ...props }) => /* @_
|
|
|
861
1002
|
const Checkbox = ({ className, ...props }) => {
|
|
862
1003
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_checkbox.Root, {
|
|
863
1004
|
"data-slot": "checkbox",
|
|
864
|
-
className:
|
|
1005
|
+
className: cn("group peer dark:bg-input/30 data-[state=checked]:bg-[var(--action)] data-[state=checked]:text-white dark:data-[state=checked]:bg-[var(--action)] data-[state=indeterminate]:bg-[var(--action)] data-[state=indeterminate]:text-white relative size-4 shrink-0 touch-manipulation rounded-[4px] border-0 shadow-[var(--shadow-control)] dark:shadow-[var(--shadow-control)] hover:data-[state=unchecked]:shadow-[var(--shadow-control-hover)] dark:hover:data-[state=unchecked]:shadow-[var(--shadow-control-hover)] data-[state=checked]:shadow-[var(--shadow-control-checked)] dark:data-[state=checked]:shadow-[var(--shadow-control-checked)] data-[state=indeterminate]:shadow-[var(--shadow-control-checked)] dark:data-[state=indeterminate]:shadow-[var(--shadow-control-checked)] transition-[color,box-shadow,background-color] duration-200 ease-out motion-reduce:transition-none outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:shadow-[0_0_0_1px_var(--destructive)] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer after:absolute after:-inset-[14px] after:content-['']", className),
|
|
865
1006
|
...props,
|
|
866
1007
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_checkbox.Indicator, {
|
|
867
1008
|
"data-slot": "checkbox-indicator",
|
|
@@ -924,14 +1065,14 @@ const CollapsibleTrigger = ({ className, children, ...props }) => {
|
|
|
924
1065
|
if (keepsCallerPressScale) pressScaleClassName = "";
|
|
925
1066
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_collapsible.CollapsibleTrigger, {
|
|
926
1067
|
"data-slot": "collapsible-trigger",
|
|
927
|
-
className:
|
|
1068
|
+
className: cn("touch-manipulation", pressScaleClassName, className),
|
|
928
1069
|
...props,
|
|
929
1070
|
children
|
|
930
1071
|
});
|
|
931
1072
|
};
|
|
932
1073
|
const CollapsibleContent = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_collapsible.CollapsibleContent, {
|
|
933
1074
|
"data-slot": "collapsible-content",
|
|
934
|
-
className:
|
|
1075
|
+
className: cn("overflow-hidden", "data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up", "motion-reduce:animate-none", className),
|
|
935
1076
|
...props
|
|
936
1077
|
});
|
|
937
1078
|
|
|
@@ -949,7 +1090,7 @@ const DialogPortal = _radix_ui_react_dialog.Portal;
|
|
|
949
1090
|
const DialogClose = _radix_ui_react_dialog.Close;
|
|
950
1091
|
const DialogOverlay = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Overlay, {
|
|
951
1092
|
"data-slot": "dialog-overlay",
|
|
952
|
-
className:
|
|
1093
|
+
className: cn("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-[var(--overlay-md)] backdrop-blur-[2px] will-change-[opacity] duration-200 data-[state=open]:ease-out data-[state=closed]:ease-in motion-reduce:animate-none", className),
|
|
953
1094
|
...props
|
|
954
1095
|
});
|
|
955
1096
|
const DialogContent = ({ className, children, tray = "auto", ...props }) => {
|
|
@@ -964,7 +1105,7 @@ const DialogContent = ({ className, children, tray = "auto", ...props }) => {
|
|
|
964
1105
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Content, {
|
|
965
1106
|
"data-slot": "dialog-content",
|
|
966
1107
|
"data-tray": edge,
|
|
967
|
-
className:
|
|
1108
|
+
className: cn("overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-98 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-[16px] border-0 shadow-[var(--shadow-elevated)] duration-200 data-[state=open]:ease-out data-[state=closed]:ease-in outline-none sm:max-w-md will-change-[opacity,transform] motion-reduce:animate-none", shellClassName, className),
|
|
968
1109
|
...props,
|
|
969
1110
|
children: content
|
|
970
1111
|
})]
|
|
@@ -982,7 +1123,7 @@ const DialogContent = ({ className, children, tray = "auto", ...props }) => {
|
|
|
982
1123
|
const CLOSE_BUTTON_CLASS_NAME = "absolute top-3 right-3 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground opacity-70 transition-[opacity,background-color] duration-150 ease-out motion-reduce:transition-none hover:opacity-100 hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring/50 focus:outline-hidden cursor-pointer touch-manipulation before:absolute before:-inset-[8px] before:content-[\"\"]";
|
|
983
1124
|
const DialogHeader = ({ className, showCloseButton = true, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
984
1125
|
"data-slot": "dialog-header",
|
|
985
|
-
className:
|
|
1126
|
+
className: cn("relative flex flex-col gap-0.5 px-4 py-4 border-b border-[var(--border-hairline)] bg-card sm:text-left", showCloseButton && "pr-12", className),
|
|
986
1127
|
...props,
|
|
987
1128
|
children: [children, showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Close, {
|
|
988
1129
|
"data-slot": "dialog-close",
|
|
@@ -998,16 +1139,16 @@ const DialogHeader = ({ className, showCloseButton = true, children, ...props })
|
|
|
998
1139
|
});
|
|
999
1140
|
const DialogBody = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1000
1141
|
"data-slot": "dialog-body",
|
|
1001
|
-
className:
|
|
1142
|
+
className: cn("px-4 py-[18px] bg-card", className),
|
|
1002
1143
|
...props
|
|
1003
1144
|
});
|
|
1004
1145
|
const DialogFooter = ({ className, showCloseButton = false, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1005
1146
|
"data-slot": "dialog-footer",
|
|
1006
|
-
className:
|
|
1147
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end px-3 py-3.5 border-t border-[var(--border-divider)] bg-muted", className),
|
|
1007
1148
|
...props,
|
|
1008
1149
|
children: [children, showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Close, {
|
|
1009
1150
|
asChild: true,
|
|
1010
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1151
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
1011
1152
|
variant: "outline",
|
|
1012
1153
|
children: "Close"
|
|
1013
1154
|
})
|
|
@@ -1015,12 +1156,12 @@ const DialogFooter = ({ className, showCloseButton = false, children, ...props }
|
|
|
1015
1156
|
});
|
|
1016
1157
|
const DialogTitle = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Title, {
|
|
1017
1158
|
"data-slot": "dialog-title",
|
|
1018
|
-
className:
|
|
1159
|
+
className: cn("text-[17px] leading-none font-semibold text-balance", className),
|
|
1019
1160
|
...props
|
|
1020
1161
|
});
|
|
1021
1162
|
const DialogDescription = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Description, {
|
|
1022
1163
|
"data-slot": "dialog-description",
|
|
1023
|
-
className:
|
|
1164
|
+
className: cn("text-muted-foreground text-sm text-pretty", className),
|
|
1024
1165
|
...props
|
|
1025
1166
|
});
|
|
1026
1167
|
|
|
@@ -1028,13 +1169,13 @@ const DialogDescription = ({ className, ...props }) => /* @__PURE__ */ (0, react
|
|
|
1028
1169
|
//#region src/components/ui/command/command.tsx
|
|
1029
1170
|
const Command = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command, {
|
|
1030
1171
|
"data-slot": "command",
|
|
1031
|
-
className:
|
|
1172
|
+
className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
|
|
1032
1173
|
...props
|
|
1033
1174
|
});
|
|
1034
1175
|
const CommandDialog = ({ title = "Command Palette", description = "Search for a command to run...", children, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Dialog, {
|
|
1035
1176
|
...props,
|
|
1036
1177
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DialogContent, {
|
|
1037
|
-
className:
|
|
1178
|
+
className: cn("overflow-hidden p-0", className),
|
|
1038
1179
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DialogHeader, {
|
|
1039
1180
|
className: "sr-only",
|
|
1040
1181
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogTitle, { children: title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogDescription, { children: description })]
|
|
@@ -1053,13 +1194,13 @@ const CommandInput = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_
|
|
|
1053
1194
|
className: "shrink-0 text-muted-foreground/70"
|
|
1054
1195
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Input, {
|
|
1055
1196
|
"data-slot": "command-input",
|
|
1056
|
-
className:
|
|
1197
|
+
className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
1057
1198
|
...props
|
|
1058
1199
|
})]
|
|
1059
1200
|
});
|
|
1060
1201
|
const CommandList = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.List, {
|
|
1061
1202
|
"data-slot": "command-list",
|
|
1062
|
-
className:
|
|
1203
|
+
className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto p-1", className),
|
|
1063
1204
|
...props
|
|
1064
1205
|
});
|
|
1065
1206
|
const CommandEmpty = ({ ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Empty, {
|
|
@@ -1069,22 +1210,22 @@ const CommandEmpty = ({ ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx
|
|
|
1069
1210
|
});
|
|
1070
1211
|
const CommandGroup = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Group, {
|
|
1071
1212
|
"data-slot": "command-group",
|
|
1072
|
-
className:
|
|
1213
|
+
className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className),
|
|
1073
1214
|
...props
|
|
1074
1215
|
});
|
|
1075
1216
|
const CommandSeparator = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Separator, {
|
|
1076
1217
|
"data-slot": "command-separator",
|
|
1077
|
-
className:
|
|
1218
|
+
className: cn("bg-border -mx-1 h-px", className),
|
|
1078
1219
|
...props
|
|
1079
1220
|
});
|
|
1080
1221
|
const CommandItem = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Item, {
|
|
1081
1222
|
"data-slot": "command-item",
|
|
1082
|
-
className:
|
|
1223
|
+
className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_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=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1083
1224
|
...props
|
|
1084
1225
|
});
|
|
1085
1226
|
const CommandShortcut = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1086
1227
|
"data-slot": "command-shortcut",
|
|
1087
|
-
className:
|
|
1228
|
+
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
1088
1229
|
...props
|
|
1089
1230
|
});
|
|
1090
1231
|
|
|
@@ -1103,7 +1244,7 @@ const PopoverContent = ({ className, align = "center", sideOffset = 8, ...props
|
|
|
1103
1244
|
"data-slot": "popover-content",
|
|
1104
1245
|
align,
|
|
1105
1246
|
sideOffset,
|
|
1106
|
-
className:
|
|
1247
|
+
className: cn("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 data-[state=closed]:zoom-out-98 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-xl border-0 p-4 shadow-[var(--shadow-elevated)] outline-hidden will-change-[opacity,transform] motion-reduce:animate-none", className),
|
|
1107
1248
|
...props
|
|
1108
1249
|
}) });
|
|
1109
1250
|
};
|
|
@@ -1206,14 +1347,14 @@ const Combobox = (props) => {
|
|
|
1206
1347
|
"aria-expanded": open,
|
|
1207
1348
|
"aria-haspopup": "listbox",
|
|
1208
1349
|
disabled,
|
|
1209
|
-
className:
|
|
1350
|
+
className: cn("flex h-8 w-full touch-manipulation items-center justify-between gap-1.5 rounded-md border-0 bg-background px-3 text-[13px] whitespace-nowrap dark:bg-input/30", "shadow-[var(--shadow-input)] hover:shadow-[var(--shadow-input-hover)]", "transition-[color,box-shadow] duration-100 ease-out motion-reduce:transition-none", "outline-none focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo)]", "cursor-pointer disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
1210
1351
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1211
|
-
className:
|
|
1352
|
+
className: cn("truncate", !selectedLabel && "text-muted-foreground/60"),
|
|
1212
1353
|
children: selectedLabel ?? placeholder
|
|
1213
1354
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
1214
1355
|
icon: _hugeicons_core_free_icons.ArrowDown01Icon,
|
|
1215
1356
|
size: 16,
|
|
1216
|
-
className:
|
|
1357
|
+
className: cn("shrink-0 opacity-50 transition-transform duration-150 ease-out motion-reduce:transition-none", open && "rotate-180")
|
|
1217
1358
|
})]
|
|
1218
1359
|
})
|
|
1219
1360
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverContent, {
|
|
@@ -1243,7 +1384,7 @@ const Combobox = (props) => {
|
|
|
1243
1384
|
keywords: [opt.label],
|
|
1244
1385
|
"aria-checked": props.multiple ? isSelected : void 0,
|
|
1245
1386
|
onSelect: handleSelect,
|
|
1246
|
-
children: [props.multiple ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OptionCheckbox, { checked: isSelected }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckIcon, { className:
|
|
1387
|
+
children: [props.multiple ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OptionCheckbox, { checked: isSelected }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckIcon, { className: cn("shrink-0", isSelected ? "opacity-100" : "opacity-0") }), opt.label]
|
|
1247
1388
|
}, opt.value);
|
|
1248
1389
|
})
|
|
1249
1390
|
]
|
|
@@ -1262,19 +1403,19 @@ const DropdownMenuSub = _radix_ui_react_dropdown_menu.Sub;
|
|
|
1262
1403
|
const DropdownMenuContent = (0, react.forwardRef)(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Content, {
|
|
1263
1404
|
ref,
|
|
1264
1405
|
sideOffset,
|
|
1265
|
-
className:
|
|
1406
|
+
className: cn("z-50 min-w-32 overflow-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-[var(--shadow-elevated)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:animate-none", className),
|
|
1266
1407
|
...props
|
|
1267
1408
|
}) }));
|
|
1268
1409
|
DropdownMenuContent.displayName = _radix_ui_react_dropdown_menu.Content.displayName;
|
|
1269
1410
|
const DropdownMenuItem = (0, react.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Item, {
|
|
1270
1411
|
ref,
|
|
1271
|
-
className:
|
|
1412
|
+
className: cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\"size-\"])]:size-4", inset && "pl-8", className),
|
|
1272
1413
|
...props
|
|
1273
1414
|
}));
|
|
1274
1415
|
DropdownMenuItem.displayName = _radix_ui_react_dropdown_menu.Item.displayName;
|
|
1275
1416
|
const DropdownMenuCheckboxItem = (0, react.forwardRef)(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dropdown_menu.CheckboxItem, {
|
|
1276
1417
|
ref,
|
|
1277
|
-
className:
|
|
1418
|
+
className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", className),
|
|
1278
1419
|
checked,
|
|
1279
1420
|
...props,
|
|
1280
1421
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -1286,7 +1427,7 @@ DropdownMenuCheckboxItem.displayName = _radix_ui_react_dropdown_menu.CheckboxIte
|
|
|
1286
1427
|
const DropdownMenuRadioGroup = _radix_ui_react_dropdown_menu.RadioGroup;
|
|
1287
1428
|
const DropdownMenuRadioItem = (0, react.forwardRef)(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dropdown_menu.RadioItem, {
|
|
1288
1429
|
ref,
|
|
1289
|
-
className:
|
|
1430
|
+
className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", className),
|
|
1290
1431
|
...props,
|
|
1291
1432
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1292
1433
|
className: "absolute left-2 flex size-3.5 items-center justify-center",
|
|
@@ -1297,43 +1438,43 @@ DropdownMenuRadioItem.displayName = _radix_ui_react_dropdown_menu.RadioItem.disp
|
|
|
1297
1438
|
const DropdownMenuLabel = (0, react.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Label, {
|
|
1298
1439
|
ref,
|
|
1299
1440
|
"data-slot": "dropdown-menu-label",
|
|
1300
|
-
className:
|
|
1441
|
+
className: cn("px-2 py-1.5 text-sm font-medium", inset && "pl-8", className),
|
|
1301
1442
|
...props
|
|
1302
1443
|
}));
|
|
1303
1444
|
DropdownMenuLabel.displayName = _radix_ui_react_dropdown_menu.Label.displayName;
|
|
1304
1445
|
const DropdownMenuSeparator = (0, react.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Separator, {
|
|
1305
1446
|
ref,
|
|
1306
|
-
className:
|
|
1447
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
1307
1448
|
...props
|
|
1308
1449
|
}));
|
|
1309
1450
|
DropdownMenuSeparator.displayName = _radix_ui_react_dropdown_menu.Separator.displayName;
|
|
1310
1451
|
const DropdownMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1311
1452
|
"aria-hidden": "true",
|
|
1312
|
-
className:
|
|
1453
|
+
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
1313
1454
|
...props
|
|
1314
1455
|
});
|
|
1315
1456
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
1316
1457
|
const DropdownMenuSubTrigger = (0, react.forwardRef)(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dropdown_menu.SubTrigger, {
|
|
1317
1458
|
ref,
|
|
1318
|
-
className:
|
|
1459
|
+
className: cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent", inset && "pl-8", className),
|
|
1319
1460
|
...props,
|
|
1320
1461
|
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRightIcon, { className: "ml-auto size-4" })]
|
|
1321
1462
|
}));
|
|
1322
1463
|
DropdownMenuSubTrigger.displayName = _radix_ui_react_dropdown_menu.SubTrigger.displayName;
|
|
1323
1464
|
const DropdownMenuSubContent = (0, react.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.SubContent, {
|
|
1324
1465
|
ref,
|
|
1325
|
-
className:
|
|
1466
|
+
className: cn("z-50 min-w-32 overflow-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:animate-none", className),
|
|
1326
1467
|
...props
|
|
1327
1468
|
}));
|
|
1328
1469
|
DropdownMenuSubContent.displayName = _radix_ui_react_dropdown_menu.SubContent.displayName;
|
|
1329
1470
|
|
|
1330
1471
|
//#endregion
|
|
1331
1472
|
//#region src/components/ui/well/well.tsx
|
|
1332
|
-
|
|
1473
|
+
/** The Well's one look plus the rhythm knobs (`gap`, `spacing`). */
|
|
1474
|
+
const wellVariants = (0, class_variance_authority.cva)("rounded-xl flex flex-col bg-muted/50 border border-border", {
|
|
1333
1475
|
defaultVariants: {
|
|
1334
1476
|
gap: "sm",
|
|
1335
|
-
spacing: "default"
|
|
1336
|
-
variant: "inset"
|
|
1477
|
+
spacing: "default"
|
|
1337
1478
|
},
|
|
1338
1479
|
variants: {
|
|
1339
1480
|
gap: {
|
|
@@ -1347,21 +1488,29 @@ const wellVariants = (0, class_variance_authority.cva)("rounded-xl flex flex-col
|
|
|
1347
1488
|
lg: "p-5",
|
|
1348
1489
|
none: "p-0",
|
|
1349
1490
|
sm: "p-3"
|
|
1350
|
-
},
|
|
1351
|
-
variant: {
|
|
1352
|
-
default: "bg-muted/50",
|
|
1353
|
-
inset: "bg-muted/50 border border-border",
|
|
1354
|
-
outline: "border border-border"
|
|
1355
1491
|
}
|
|
1356
1492
|
}
|
|
1357
1493
|
});
|
|
1358
|
-
|
|
1494
|
+
/**
|
|
1495
|
+
* The muted surface that holds the settings a toggle reveals. Put it inside `WellReveal`
|
|
1496
|
+
* or a `FlushCardStack.Item`. It has one look; `gap` and `spacing` only tune its rhythm.
|
|
1497
|
+
*
|
|
1498
|
+
* @example
|
|
1499
|
+
* ```tsx
|
|
1500
|
+
* <WellReveal open={emailOn}>
|
|
1501
|
+
* <Well>{rows}</Well>
|
|
1502
|
+
* </WellReveal>
|
|
1503
|
+
* ```
|
|
1504
|
+
* @returns The rendered surface.
|
|
1505
|
+
* @see WellReveal
|
|
1506
|
+
* @see FlushCardStack
|
|
1507
|
+
*/
|
|
1508
|
+
const Well = ({ className, gap, spacing, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1359
1509
|
"data-slot": "well",
|
|
1360
1510
|
"data-spacing": spacing ?? "default",
|
|
1361
|
-
className:
|
|
1511
|
+
className: cn(wellVariants({
|
|
1362
1512
|
gap,
|
|
1363
|
-
spacing
|
|
1364
|
-
variant
|
|
1513
|
+
spacing
|
|
1365
1514
|
}), className),
|
|
1366
1515
|
...props
|
|
1367
1516
|
});
|
|
@@ -1374,7 +1523,7 @@ const WellReveal = ({ children, className, open }) => /* @__PURE__ */ (0, react_
|
|
|
1374
1523
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1375
1524
|
className: "overflow-hidden",
|
|
1376
1525
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1377
|
-
className:
|
|
1526
|
+
className: cn("px-0.5 pb-0.5 [&>[data-slot=well]:not([data-spacing=none])]:p-[22px]", "[[data-slot=card]>[data-slot=well-reveal]>div>&>[data-slot=well]]:rounded-2xl", className),
|
|
1378
1527
|
children
|
|
1379
1528
|
})
|
|
1380
1529
|
})
|
|
@@ -1437,7 +1586,7 @@ const FlushCardStack = ({ children, className }) => {
|
|
|
1437
1586
|
const gapPossible = !isLast && (hasReveal(item) || hasReveal(next));
|
|
1438
1587
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Card, {
|
|
1439
1588
|
"data-detached": detaches(item) || void 0,
|
|
1440
|
-
className:
|
|
1589
|
+
className: cn("gap-0 py-0 transition-[border-radius] duration-300", !roundTop && "rounded-t-none -mt-px", !roundBottom && "rounded-b-none", item.props.className),
|
|
1441
1590
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1442
1591
|
className: "px-5 py-4",
|
|
1443
1592
|
children: item.props.header
|
|
@@ -1501,6 +1650,133 @@ const Icon = (props) => {
|
|
|
1501
1650
|
});
|
|
1502
1651
|
};
|
|
1503
1652
|
|
|
1653
|
+
//#endregion
|
|
1654
|
+
//#region src/components/ui/input/input.tsx
|
|
1655
|
+
const shaderDefaults = {
|
|
1656
|
+
bloom: 0,
|
|
1657
|
+
colors: [
|
|
1658
|
+
"#BDDCFF",
|
|
1659
|
+
"#57A7FF",
|
|
1660
|
+
"#DEEAFC"
|
|
1661
|
+
],
|
|
1662
|
+
inset: 1,
|
|
1663
|
+
intensity: 0,
|
|
1664
|
+
pulse: .3,
|
|
1665
|
+
roundness: .6,
|
|
1666
|
+
scale: 1,
|
|
1667
|
+
smoke: .75,
|
|
1668
|
+
smokeSize: .7,
|
|
1669
|
+
softness: .6,
|
|
1670
|
+
speed: 2.2,
|
|
1671
|
+
spots: 8,
|
|
1672
|
+
spotSize: .75,
|
|
1673
|
+
thickness: .04
|
|
1674
|
+
};
|
|
1675
|
+
const spring$2 = {
|
|
1676
|
+
bounce: 0,
|
|
1677
|
+
duration: .35,
|
|
1678
|
+
type: "spring"
|
|
1679
|
+
};
|
|
1680
|
+
const Input = (0, react.forwardRef)(({ className, type, shaderBorder, style, ...props }, ref) => {
|
|
1681
|
+
const prefersReducedMotion = (0, motion_react.useReducedMotion)();
|
|
1682
|
+
const inputClassName = cn("file:text-foreground placeholder:text-muted-foreground/60 selection:bg-primary selection:text-primary-foreground dark:bg-input/30 h-8 w-full min-w-0 touch-manipulation rounded-md border-0 bg-background px-3 py-1 text-base shadow-[var(--shadow-input)] transition-[color,box-shadow] duration-100 ease-out 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", "hover:shadow-[var(--shadow-input-hover)]", "focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo,#0072EF26)]", "aria-invalid:shadow-[0_0_0_1px_var(--destructive),0_0_1px_0_var(--destructive)] dark:aria-invalid:shadow-[0_0_0_1px_var(--destructive)]", className);
|
|
1683
|
+
const isActive = !!shaderBorder;
|
|
1684
|
+
const config = typeof shaderBorder === "object" ? {
|
|
1685
|
+
...shaderDefaults,
|
|
1686
|
+
...shaderBorder
|
|
1687
|
+
} : shaderDefaults;
|
|
1688
|
+
const inset = config.inset;
|
|
1689
|
+
if (shaderBorder !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1690
|
+
className: "relative",
|
|
1691
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.AnimatePresence, {
|
|
1692
|
+
initial: false,
|
|
1693
|
+
children: isActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.motion.div, {
|
|
1694
|
+
initial: prefersReducedMotion ? false : { opacity: 0 },
|
|
1695
|
+
animate: { opacity: 1 },
|
|
1696
|
+
exit: { opacity: 0 },
|
|
1697
|
+
transition: prefersReducedMotion ? { duration: 0 } : spring$2,
|
|
1698
|
+
className: "absolute pointer-events-none z-20",
|
|
1699
|
+
style: {
|
|
1700
|
+
borderRadius: `${8 + inset}px`,
|
|
1701
|
+
inset: `-${inset}px`,
|
|
1702
|
+
willChange: "opacity"
|
|
1703
|
+
},
|
|
1704
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_paper_design_shaders_react.PulsingBorder, {
|
|
1705
|
+
colorBack: "#00000000",
|
|
1706
|
+
colors: config.colors,
|
|
1707
|
+
speed: config.speed,
|
|
1708
|
+
scale: config.scale,
|
|
1709
|
+
roundness: config.roundness,
|
|
1710
|
+
thickness: config.thickness,
|
|
1711
|
+
softness: config.softness,
|
|
1712
|
+
intensity: config.intensity,
|
|
1713
|
+
bloom: config.bloom,
|
|
1714
|
+
spots: config.spots,
|
|
1715
|
+
spotSize: config.spotSize,
|
|
1716
|
+
pulse: config.pulse,
|
|
1717
|
+
smoke: config.smoke,
|
|
1718
|
+
smokeSize: config.smokeSize,
|
|
1719
|
+
webGlContextAttributes: {
|
|
1720
|
+
alpha: true,
|
|
1721
|
+
premultipliedAlpha: true
|
|
1722
|
+
},
|
|
1723
|
+
className: "size-full",
|
|
1724
|
+
style: { borderRadius: `${8 + inset}px` }
|
|
1725
|
+
})
|
|
1726
|
+
}, "shader-border")
|
|
1727
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1728
|
+
ref,
|
|
1729
|
+
type,
|
|
1730
|
+
"data-slot": "input",
|
|
1731
|
+
className: cn(inputClassName, isActive && "animate-shimmer motion-reduce:animate-none", isActive && "focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--ring)]"),
|
|
1732
|
+
style: isActive ? {
|
|
1733
|
+
backgroundClip: "text",
|
|
1734
|
+
backgroundImage: `linear-gradient(to right, color-mix(in srgb, ${config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[1] || config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[2] || config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[0]} 70%, #000))`,
|
|
1735
|
+
backgroundSize: "200% 100%",
|
|
1736
|
+
boxShadow: "none",
|
|
1737
|
+
color: "transparent",
|
|
1738
|
+
WebkitBackgroundClip: "text",
|
|
1739
|
+
...style
|
|
1740
|
+
} : style,
|
|
1741
|
+
...props
|
|
1742
|
+
})]
|
|
1743
|
+
});
|
|
1744
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1745
|
+
ref,
|
|
1746
|
+
type,
|
|
1747
|
+
"data-slot": "input",
|
|
1748
|
+
className: inputClassName,
|
|
1749
|
+
style,
|
|
1750
|
+
...props
|
|
1751
|
+
});
|
|
1752
|
+
});
|
|
1753
|
+
Input.displayName = "Input";
|
|
1754
|
+
|
|
1755
|
+
//#endregion
|
|
1756
|
+
//#region src/components/ui/label/label.tsx
|
|
1757
|
+
const labelVariants = (0, class_variance_authority.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
1758
|
+
/**
|
|
1759
|
+
* The text label for a form control.
|
|
1760
|
+
*
|
|
1761
|
+
* `Label` carries no spacing of its own. To label a form control, wrap the
|
|
1762
|
+
* control in `Field` and pass `label`: `Field` sets the gap between the label
|
|
1763
|
+
* and the control and wires up `htmlFor`. A bare `Label` placed next to a
|
|
1764
|
+
* control ends up at whatever gap its parent happens to use.
|
|
1765
|
+
*
|
|
1766
|
+
* @example
|
|
1767
|
+
* ```tsx
|
|
1768
|
+
* <Field label="Email">
|
|
1769
|
+
* <Input type="email" />
|
|
1770
|
+
* </Field>
|
|
1771
|
+
* ```
|
|
1772
|
+
*/
|
|
1773
|
+
const Label = (0, react.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_label.Root, {
|
|
1774
|
+
ref,
|
|
1775
|
+
className: cn(labelVariants(), className),
|
|
1776
|
+
...props
|
|
1777
|
+
}));
|
|
1778
|
+
Label.displayName = _radix_ui_react_label.Root.displayName;
|
|
1779
|
+
|
|
1504
1780
|
//#endregion
|
|
1505
1781
|
//#region src/components/ui/field/field-control-context.ts
|
|
1506
1782
|
/**
|
|
@@ -1533,7 +1809,7 @@ const SelectTrigger = ({ className, size = "default", children, ...props }) => {
|
|
|
1533
1809
|
...fieldControlProps,
|
|
1534
1810
|
"data-slot": "select-trigger",
|
|
1535
1811
|
"data-size": size,
|
|
1536
|
-
className:
|
|
1812
|
+
className: cn("data-[placeholder]:text-muted-foreground/60 [&_svg:not([class*='text-'])]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit touch-manipulation items-center justify-between gap-1.5 rounded-md border-0 bg-transparent px-3 py-2 text-[13px] whitespace-nowrap shadow-[var(--shadow-input)] hover:shadow-[var(--shadow-input-hover)] transition-[color,box-shadow] duration-100 ease-out outline-none focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo,#0072EF26)] aria-invalid:shadow-[0_0_0_1px_var(--destructive)] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:text-[13px] data-[size=sm]:px-2.5 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[state=open]:[&>svg:last-of-type]:rotate-180", className),
|
|
1537
1813
|
...props,
|
|
1538
1814
|
...fieldControlProps ? { id: fieldControlProps.id } : {},
|
|
1539
1815
|
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Icon, {
|
|
@@ -1548,14 +1824,14 @@ const SelectTrigger = ({ className, size = "default", children, ...props }) => {
|
|
|
1548
1824
|
};
|
|
1549
1825
|
const SelectContent = ({ className, children, position = "popper", align = "start", ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_select.Content, {
|
|
1550
1826
|
"data-slot": "select-content",
|
|
1551
|
-
className:
|
|
1827
|
+
className: cn("bg-popover text-popover-foreground will-change-[opacity,transform] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:animate-none relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border-0 shadow-[var(--shadow-elevated)]", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
1552
1828
|
position,
|
|
1553
1829
|
align,
|
|
1554
1830
|
...props,
|
|
1555
1831
|
children: [
|
|
1556
1832
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectScrollUpButton, {}),
|
|
1557
1833
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Viewport, {
|
|
1558
|
-
className:
|
|
1834
|
+
className: cn("p-1", position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
1559
1835
|
children
|
|
1560
1836
|
}),
|
|
1561
1837
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectScrollDownButton, {})
|
|
@@ -1563,12 +1839,12 @@ const SelectContent = ({ className, children, position = "popper", align = "star
|
|
|
1563
1839
|
}) });
|
|
1564
1840
|
const SelectLabel = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Label, {
|
|
1565
1841
|
"data-slot": "select-label",
|
|
1566
|
-
className:
|
|
1842
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
1567
1843
|
...props
|
|
1568
1844
|
});
|
|
1569
1845
|
const SelectItem = ({ className, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_select.Item, {
|
|
1570
1846
|
"data-slot": "select-item",
|
|
1571
|
-
className:
|
|
1847
|
+
className: cn("data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=checked]:font-medium [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
1572
1848
|
...props,
|
|
1573
1849
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1574
1850
|
"data-slot": "select-item-indicator",
|
|
@@ -1581,12 +1857,12 @@ const SelectItem = ({ className, children, ...props }) => /* @__PURE__ */ (0, re
|
|
|
1581
1857
|
});
|
|
1582
1858
|
const SelectSeparator = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Separator, {
|
|
1583
1859
|
"data-slot": "select-separator",
|
|
1584
|
-
className:
|
|
1860
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
1585
1861
|
...props
|
|
1586
1862
|
});
|
|
1587
1863
|
const SelectScrollUpButton = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.ScrollUpButton, {
|
|
1588
1864
|
"data-slot": "select-scroll-up-button",
|
|
1589
|
-
className:
|
|
1865
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1590
1866
|
...props,
|
|
1591
1867
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
1592
1868
|
icon: _hugeicons_core_free_icons.ArrowUp01Icon,
|
|
@@ -1596,7 +1872,7 @@ const SelectScrollUpButton = ({ className, ...props }) => /* @__PURE__ */ (0, re
|
|
|
1596
1872
|
});
|
|
1597
1873
|
const SelectScrollDownButton = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.ScrollDownButton, {
|
|
1598
1874
|
"data-slot": "select-scroll-down-button",
|
|
1599
|
-
className:
|
|
1875
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1600
1876
|
...props,
|
|
1601
1877
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
1602
1878
|
icon: _hugeicons_core_free_icons.ArrowDown01Icon,
|
|
@@ -1605,6 +1881,102 @@ const SelectScrollDownButton = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
|
1605
1881
|
})
|
|
1606
1882
|
});
|
|
1607
1883
|
|
|
1884
|
+
//#endregion
|
|
1885
|
+
//#region src/components/ui/field/use-field-feedback.ts
|
|
1886
|
+
const EASE_OUT = "cubic-bezier(0.215, 0.61, 0.355, 1)";
|
|
1887
|
+
const EASE_IN_OUT = "cubic-bezier(0.645, 0.045, 0.355, 1)";
|
|
1888
|
+
const SHAKE_KEYFRAMES = [
|
|
1889
|
+
0,
|
|
1890
|
+
-4,
|
|
1891
|
+
3.5,
|
|
1892
|
+
-2,
|
|
1893
|
+
1,
|
|
1894
|
+
0
|
|
1895
|
+
].map((offset) => ({
|
|
1896
|
+
easing: EASE_IN_OUT,
|
|
1897
|
+
transform: `translateX(${offset}px)`
|
|
1898
|
+
}));
|
|
1899
|
+
const SHAKE_TIMING = {
|
|
1900
|
+
duration: 300,
|
|
1901
|
+
easing: "linear"
|
|
1902
|
+
};
|
|
1903
|
+
const MESSAGE_KEYFRAMES = [{
|
|
1904
|
+
opacity: 0,
|
|
1905
|
+
transform: "translateY(-4px)"
|
|
1906
|
+
}, {
|
|
1907
|
+
opacity: 1,
|
|
1908
|
+
transform: "translateY(0)"
|
|
1909
|
+
}];
|
|
1910
|
+
const MESSAGE_TIMING = {
|
|
1911
|
+
duration: 150,
|
|
1912
|
+
easing: EASE_OUT
|
|
1913
|
+
};
|
|
1914
|
+
const ERROR_HAPTIC_MS = 12;
|
|
1915
|
+
const CONTROL_SELECTOR = ":scope > :not([data-slot^=\"field-\"])";
|
|
1916
|
+
const ERROR_SELECTOR = ":scope > [data-slot=\"field-error\"]";
|
|
1917
|
+
const MESSAGE_SELECTOR = `${ERROR_SELECTOR}, :scope > [data-slot="field-description"]`;
|
|
1918
|
+
const tickHaptics = () => {
|
|
1919
|
+
if (window.matchMedia?.("(pointer: coarse)").matches) navigator.vibrate?.(ERROR_HAPTIC_MS);
|
|
1920
|
+
};
|
|
1921
|
+
const shakeControl = (wrapper) => {
|
|
1922
|
+
wrapper.querySelectorAll(CONTROL_SELECTOR).forEach((control) => {
|
|
1923
|
+
control.animate?.(SHAKE_KEYFRAMES, SHAKE_TIMING);
|
|
1924
|
+
});
|
|
1925
|
+
};
|
|
1926
|
+
/**
|
|
1927
|
+
* Plays a field's validation feedback and returns the ref for its wrapper.
|
|
1928
|
+
*
|
|
1929
|
+
* When an error appears, the control shakes, the message under it slides in,
|
|
1930
|
+
* and touch devices get a short haptic tick. Each later submit of the
|
|
1931
|
+
* surrounding `<form>` that leaves the error in place shakes and ticks again,
|
|
1932
|
+
* so every failed attempt is acknowledged. When the error clears, the
|
|
1933
|
+
* description slides back in. A change to the error's text alone swaps
|
|
1934
|
+
* instantly: it usually comes from re-validating while the user types, and
|
|
1935
|
+
* motion on every keystroke reads as noise. Nothing plays on first render, and
|
|
1936
|
+
* motion is skipped under `prefers-reduced-motion`.
|
|
1937
|
+
*
|
|
1938
|
+
* Uses the Web Animations API, so the feedback needs no stylesheet.
|
|
1939
|
+
*
|
|
1940
|
+
* @see Field
|
|
1941
|
+
* @see FieldControlContext
|
|
1942
|
+
*/
|
|
1943
|
+
const useFieldFeedback = ({ error }) => {
|
|
1944
|
+
const wrapperRef = (0, react.useRef)(null);
|
|
1945
|
+
const hasError = Boolean(error);
|
|
1946
|
+
const previousHasErrorRef = (0, react.useRef)(hasError);
|
|
1947
|
+
const prefersReducedMotion = (0, motion_react.useReducedMotion)();
|
|
1948
|
+
const prefersReducedMotionRef = (0, react.useRef)(prefersReducedMotion);
|
|
1949
|
+
prefersReducedMotionRef.current = prefersReducedMotion;
|
|
1950
|
+
(0, react.useEffect)(() => {
|
|
1951
|
+
if (previousHasErrorRef.current === hasError) return;
|
|
1952
|
+
previousHasErrorRef.current = hasError;
|
|
1953
|
+
const wrapper = wrapperRef.current;
|
|
1954
|
+
if (!wrapper) return;
|
|
1955
|
+
if (hasError) tickHaptics();
|
|
1956
|
+
if (prefersReducedMotionRef.current) return;
|
|
1957
|
+
wrapper.querySelectorAll(MESSAGE_SELECTOR).forEach((message) => {
|
|
1958
|
+
message.animate?.(MESSAGE_KEYFRAMES, MESSAGE_TIMING);
|
|
1959
|
+
});
|
|
1960
|
+
if (hasError) shakeControl(wrapper);
|
|
1961
|
+
}, [hasError]);
|
|
1962
|
+
(0, react.useEffect)(() => {
|
|
1963
|
+
const form = wrapperRef.current?.closest("form");
|
|
1964
|
+
if (!form) return void 0;
|
|
1965
|
+
const handleSubmit = () => {
|
|
1966
|
+
const wrapper = wrapperRef.current;
|
|
1967
|
+
if (!wrapper?.querySelector(ERROR_SELECTOR)) return;
|
|
1968
|
+
requestAnimationFrame(() => {
|
|
1969
|
+
if (!wrapper.querySelector(ERROR_SELECTOR)) return;
|
|
1970
|
+
tickHaptics();
|
|
1971
|
+
if (!prefersReducedMotionRef.current) shakeControl(wrapper);
|
|
1972
|
+
});
|
|
1973
|
+
};
|
|
1974
|
+
form.addEventListener("submit", handleSubmit);
|
|
1975
|
+
return () => form.removeEventListener("submit", handleSubmit);
|
|
1976
|
+
}, []);
|
|
1977
|
+
return wrapperRef;
|
|
1978
|
+
};
|
|
1979
|
+
|
|
1608
1980
|
//#endregion
|
|
1609
1981
|
//#region src/components/ui/field/field.tsx
|
|
1610
1982
|
const FIELD_GAP_CLASS_NAME = "grid [--field-gap:6px] [--label-gap:10px] gap-[var(--field-gap)]";
|
|
@@ -1629,6 +2001,10 @@ const LABEL_GAP_CLASS_NAME = "mb-[calc(var(--label-gap)-var(--field-gap))]";
|
|
|
1629
2001
|
* - `aria-describedby` — references the description and/or error paragraph ids
|
|
1630
2002
|
* - `aria-invalid` — `true` when `error` is present
|
|
1631
2003
|
*
|
|
2004
|
+
* When an error appears, the control shakes, the message slides in, and
|
|
2005
|
+
* touch devices get a short haptic tick. Motion is skipped under
|
|
2006
|
+
* `prefers-reduced-motion` and never plays on first render.
|
|
2007
|
+
*
|
|
1632
2008
|
* `Select` renders no element of its own, so `SelectTrigger` picks up `id`,
|
|
1633
2009
|
* `aria-describedby` and `aria-invalid` from `Field` instead.
|
|
1634
2010
|
*
|
|
@@ -1648,6 +2024,7 @@ const Field = ({ label, description, error, required, htmlFor, children, classNa
|
|
|
1648
2024
|
const singleChild = childArray.length === 1 && (0, react.isValidElement)(childArray[0]) ? childArray[0] : null;
|
|
1649
2025
|
const childId = (singleChild?.props)?.id;
|
|
1650
2026
|
const generatedId = (0, react.useId)();
|
|
2027
|
+
const wrapperRef = useFieldFeedback({ error });
|
|
1651
2028
|
const controlId = (typeof childId === "string" ? childId : void 0) ?? htmlFor ?? generatedId;
|
|
1652
2029
|
const descriptionId = `${controlId}-description`;
|
|
1653
2030
|
const errorId = `${controlId}-error`;
|
|
@@ -1673,9 +2050,10 @@ const Field = ({ label, description, error, required, htmlFor, children, classNa
|
|
|
1673
2050
|
...error ? { "aria-invalid": true } : {}
|
|
1674
2051
|
}) : null;
|
|
1675
2052
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1676
|
-
|
|
2053
|
+
ref: wrapperRef,
|
|
2054
|
+
className: cn(FIELD_GAP_CLASS_NAME, className),
|
|
1677
2055
|
children: [
|
|
1678
|
-
label && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
2056
|
+
label && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Label, {
|
|
1679
2057
|
id: labelId,
|
|
1680
2058
|
htmlFor: controlId,
|
|
1681
2059
|
"data-slot": "field-label",
|
|
@@ -1692,11 +2070,13 @@ const Field = ({ label, description, error, required, htmlFor, children, classNa
|
|
|
1692
2070
|
}),
|
|
1693
2071
|
showDescription && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1694
2072
|
id: descriptionId,
|
|
2073
|
+
"data-slot": "field-description",
|
|
1695
2074
|
className: "text-sm text-muted-foreground",
|
|
1696
2075
|
children: description
|
|
1697
2076
|
}),
|
|
1698
2077
|
error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1699
2078
|
id: errorId,
|
|
2079
|
+
"data-slot": "field-error",
|
|
1700
2080
|
role: "alert",
|
|
1701
2081
|
className: "text-sm text-[var(--text-danger)]",
|
|
1702
2082
|
children: error
|
|
@@ -1711,7 +2091,7 @@ Field.displayName = "Field";
|
|
|
1711
2091
|
const Kbd = ({ className, ...props }) => {
|
|
1712
2092
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("kbd", {
|
|
1713
2093
|
"data-slot": "kbd",
|
|
1714
|
-
className:
|
|
2094
|
+
className: cn("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", "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10", className),
|
|
1715
2095
|
...props
|
|
1716
2096
|
});
|
|
1717
2097
|
};
|
|
@@ -1733,7 +2113,7 @@ const Progress = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy,
|
|
|
1733
2113
|
const clamped = Math.min(100, Math.max(0, value ?? 0));
|
|
1734
2114
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1735
2115
|
"data-slot": "progress",
|
|
1736
|
-
className:
|
|
2116
|
+
className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
|
|
1737
2117
|
...props,
|
|
1738
2118
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("progress", {
|
|
1739
2119
|
"aria-label": ariaLabel ?? "Progress",
|
|
@@ -1743,7 +2123,7 @@ const Progress = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy,
|
|
|
1743
2123
|
value: indeterminate ? void 0 : clamped
|
|
1744
2124
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1745
2125
|
"data-slot": "progress-indicator",
|
|
1746
|
-
className:
|
|
2126
|
+
className: cn(progressVariants({ variant }), indeterminate && "animate-progress-indeterminate motion-reduce:animate-none"),
|
|
1747
2127
|
style: indeterminate ? void 0 : { transform: `translateX(-${100 - clamped}%)` }
|
|
1748
2128
|
})]
|
|
1749
2129
|
});
|
|
@@ -1754,14 +2134,14 @@ const Progress = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy,
|
|
|
1754
2134
|
const RadioGroup = ({ className, ...props }) => {
|
|
1755
2135
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_radio_group.Root, {
|
|
1756
2136
|
"data-slot": "radio-group",
|
|
1757
|
-
className:
|
|
2137
|
+
className: cn("grid gap-3", className),
|
|
1758
2138
|
...props
|
|
1759
2139
|
});
|
|
1760
2140
|
};
|
|
1761
2141
|
const RadioGroupItem = ({ className, ...props }) => {
|
|
1762
2142
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_radio_group.Item, {
|
|
1763
2143
|
"data-slot": "radio-group-item",
|
|
1764
|
-
className:
|
|
2144
|
+
className: cn("text-[var(--action)] dark:bg-input/30 relative aspect-square size-4 shrink-0 touch-manipulation rounded-full border border-[rgba(31,41,55,0.30)] dark:border-[rgba(255,255,255,0.20)] hover:data-[state=unchecked]:border-[rgba(31,41,55,0.45)] dark:hover:data-[state=unchecked]:border-[rgba(255,255,255,0.35)] data-[state=checked]:border-[var(--action)] shadow-[var(--shadow-radio)] dark:shadow-[var(--shadow-radio)] transition-[color,box-shadow,border-color] duration-100 ease-out motion-reduce:transition-none outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-[var(--destructive)] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer after:absolute after:-inset-[14px] after:content-['']", className),
|
|
1765
2145
|
...props,
|
|
1766
2146
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_radio_group.Indicator, {
|
|
1767
2147
|
"data-slot": "radio-group-indicator",
|
|
@@ -1800,7 +2180,7 @@ const RadioField = ({ value, label, description, disabled, id: idProp, className
|
|
|
1800
2180
|
const generatedId = (0, react.useId)();
|
|
1801
2181
|
const id = idProp ?? generatedId;
|
|
1802
2182
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1803
|
-
className:
|
|
2183
|
+
className: cn("flex items-start gap-3", disabled && "opacity-50", className),
|
|
1804
2184
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RadioGroupItem, {
|
|
1805
2185
|
value,
|
|
1806
2186
|
id,
|
|
@@ -1808,9 +2188,9 @@ const RadioField = ({ value, label, description, disabled, id: idProp, className
|
|
|
1808
2188
|
className: "mt-0.5"
|
|
1809
2189
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1810
2190
|
className: "grid gap-0.5",
|
|
1811
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2191
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label, {
|
|
1812
2192
|
htmlFor: id,
|
|
1813
|
-
className:
|
|
2193
|
+
className: cn("cursor-pointer transition-colors duration-100 ease-out motion-reduce:transition-none", disabled && "cursor-not-allowed"),
|
|
1814
2194
|
children: label
|
|
1815
2195
|
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1816
2196
|
className: "text-sm text-muted-foreground",
|
|
@@ -1832,7 +2212,7 @@ const Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_ru
|
|
|
1832
2212
|
"data-slot": "pagination",
|
|
1833
2213
|
role: "navigation",
|
|
1834
2214
|
"aria-label": "pagination",
|
|
1835
|
-
className:
|
|
2215
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
1836
2216
|
...props
|
|
1837
2217
|
});
|
|
1838
2218
|
/**
|
|
@@ -1841,7 +2221,7 @@ const Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_ru
|
|
|
1841
2221
|
*/
|
|
1842
2222
|
const PaginationContent = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
1843
2223
|
"data-slot": "pagination-content",
|
|
1844
|
-
className:
|
|
2224
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
1845
2225
|
...props
|
|
1846
2226
|
});
|
|
1847
2227
|
/**
|
|
@@ -1850,7 +2230,7 @@ const PaginationContent = ({ className, ...props }) => /* @__PURE__ */ (0, react
|
|
|
1850
2230
|
*/
|
|
1851
2231
|
const PaginationItem = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
1852
2232
|
"data-slot": "pagination-item",
|
|
1853
|
-
className:
|
|
2233
|
+
className: cn("", className),
|
|
1854
2234
|
...props
|
|
1855
2235
|
});
|
|
1856
2236
|
/**
|
|
@@ -1861,7 +2241,7 @@ const PaginationItem = ({ className, ...props }) => /* @__PURE__ */ (0, react_js
|
|
|
1861
2241
|
const PaginationLink = ({ className, isActive = false, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
1862
2242
|
"data-slot": "pagination-link",
|
|
1863
2243
|
"aria-current": isActive ? "page" : void 0,
|
|
1864
|
-
className:
|
|
2244
|
+
className: cn(buttonVariants({
|
|
1865
2245
|
size: "icon-sm",
|
|
1866
2246
|
variant: isActive ? "outline" : "ghost"
|
|
1867
2247
|
}), PAGINATION_HIT_AREA, className),
|
|
@@ -1876,7 +2256,7 @@ const PaginationLink = ({ className, isActive = false, children, ...props }) =>
|
|
|
1876
2256
|
const PaginationPrevious = ({ className, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
1877
2257
|
"data-slot": "pagination-previous",
|
|
1878
2258
|
"aria-label": "Go to previous page",
|
|
1879
|
-
className:
|
|
2259
|
+
className: cn(buttonVariants({
|
|
1880
2260
|
size: "icon-sm",
|
|
1881
2261
|
variant: "ghost"
|
|
1882
2262
|
}), PAGINATION_HIT_AREA, "gap-1 pl-2.5", className),
|
|
@@ -1897,7 +2277,7 @@ const PaginationPrevious = ({ className, children, ...props }) => /* @__PURE__ *
|
|
|
1897
2277
|
const PaginationNext = ({ className, children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
1898
2278
|
"data-slot": "pagination-next",
|
|
1899
2279
|
"aria-label": "Go to next page",
|
|
1900
|
-
className:
|
|
2280
|
+
className: cn(buttonVariants({
|
|
1901
2281
|
size: "icon-sm",
|
|
1902
2282
|
variant: "ghost"
|
|
1903
2283
|
}), PAGINATION_HIT_AREA, "gap-1 pr-2.5", className),
|
|
@@ -1919,7 +2299,7 @@ const PaginationNext = ({ className, children, ...props }) => /* @__PURE__ */ (0
|
|
|
1919
2299
|
const PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1920
2300
|
"data-slot": "pagination-ellipsis",
|
|
1921
2301
|
"aria-hidden": "true",
|
|
1922
|
-
className:
|
|
2302
|
+
className: cn("flex size-7 items-center justify-center text-muted-foreground", className),
|
|
1923
2303
|
...props,
|
|
1924
2304
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
1925
2305
|
icon: _hugeicons_core_free_icons.MoreHorizontalIcon,
|
|
@@ -1951,13 +2331,13 @@ const PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ (0, reac
|
|
|
1951
2331
|
const CursorPagination = ({ hasPrevious, hasNext, onPrevious, onNext, label, className }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("nav", {
|
|
1952
2332
|
"aria-label": "Pagination",
|
|
1953
2333
|
"data-slot": "cursor-pagination",
|
|
1954
|
-
className:
|
|
2334
|
+
className: cn("flex items-center justify-end gap-3", className),
|
|
1955
2335
|
children: [label !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1956
2336
|
className: "text-[13px] text-muted-foreground tabular-nums",
|
|
1957
2337
|
children: label
|
|
1958
2338
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1959
2339
|
className: "flex items-center gap-2",
|
|
1960
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2340
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
1961
2341
|
variant: "outline",
|
|
1962
2342
|
size: "icon-sm",
|
|
1963
2343
|
className: "size-8 before:-inset-1",
|
|
@@ -1969,7 +2349,7 @@ const CursorPagination = ({ hasPrevious, hasNext, onPrevious, onNext, label, cla
|
|
|
1969
2349
|
size: 16,
|
|
1970
2350
|
"aria-hidden": "true"
|
|
1971
2351
|
})
|
|
1972
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2352
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
1973
2353
|
variant: "outline",
|
|
1974
2354
|
size: "icon-sm",
|
|
1975
2355
|
className: "size-8 before:-inset-1",
|
|
@@ -1990,7 +2370,7 @@ const CursorPagination = ({ hasPrevious, hasNext, onPrevious, onNext, label, cla
|
|
|
1990
2370
|
const ScrollArea = ({ className, children, ...props }) => {
|
|
1991
2371
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_scroll_area.Root, {
|
|
1992
2372
|
"data-slot": "scroll-area",
|
|
1993
|
-
className:
|
|
2373
|
+
className: cn("relative", className),
|
|
1994
2374
|
...props,
|
|
1995
2375
|
children: [
|
|
1996
2376
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_scroll_area.Viewport, {
|
|
@@ -2007,7 +2387,7 @@ const ScrollBar = ({ className, orientation = "vertical", ...props }) => {
|
|
|
2007
2387
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_scroll_area.ScrollAreaScrollbar, {
|
|
2008
2388
|
"data-slot": "scroll-area-scrollbar",
|
|
2009
2389
|
orientation,
|
|
2010
|
-
className:
|
|
2390
|
+
className: cn("flex touch-none touch-manipulation p-px transition-[background-color] motion-reduce:transition-none select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className),
|
|
2011
2391
|
...props,
|
|
2012
2392
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_scroll_area.ScrollAreaThumb, {
|
|
2013
2393
|
"data-slot": "scroll-area-thumb",
|
|
@@ -2022,7 +2402,7 @@ const SearchInput = ({ className, placeholder = "Search...", shortcut = "⌘K",
|
|
|
2022
2402
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2023
2403
|
type: "button",
|
|
2024
2404
|
"data-slot": "search-input",
|
|
2025
|
-
className:
|
|
2405
|
+
className: cn("h-8 w-full touch-manipulation rounded-md border-0 bg-background dark:bg-input/30 shadow-[var(--shadow-input)]", "hover:shadow-[var(--shadow-input-hover)]", "transition-[color,box-shadow] duration-100 ease-out motion-reduce:transition-none", "outline-none focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo,#0072EF26)]", "flex items-center gap-2 px-2", "text-sm text-muted-foreground/60 cursor-pointer", className),
|
|
2026
2406
|
onClick,
|
|
2027
2407
|
...props,
|
|
2028
2408
|
children: [
|
|
@@ -2045,7 +2425,7 @@ const SearchInput = ({ className, placeholder = "Search...", shortcut = "⌘K",
|
|
|
2045
2425
|
const SelectableCard = ({ badge, className, description, icon, iconSize = 20, label, selected, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2046
2426
|
"data-slot": "selectable-card",
|
|
2047
2427
|
"data-selected": selected,
|
|
2048
|
-
className:
|
|
2428
|
+
className: cn("group/card relative flex flex-col items-start gap-2.5 p-4 rounded-xl text-left transition-[box-shadow,background-color,scale] duration-150 motion-reduce:transition-none touch-manipulation active:scale-[0.96] cursor-pointer w-full outline-none focus-visible:shadow-[0_0_0_1.5px_var(--action),0_0_0_4px_oklch(from_var(--action)_l_c_h_/_0.25)]", selected ? "bg-[var(--action)]/5 shadow-[0_0_0_1.5px_var(--action)]" : "shadow-[0_0_0_1px_oklch(0.278_0.03_256.85_/_0.12)] hover:shadow-[0_0_0_1px_oklch(0.278_0.03_256.85_/_0.20)]", className),
|
|
2049
2429
|
...props,
|
|
2050
2430
|
children: [
|
|
2051
2431
|
icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
@@ -2072,10 +2452,10 @@ const SelectableCard = ({ badge, className, description, icon, iconSize = 20, la
|
|
|
2072
2452
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2073
2453
|
className: "absolute top-4 right-4",
|
|
2074
2454
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2075
|
-
className:
|
|
2455
|
+
className: cn("relative size-4 shrink-0 rounded-[4px] transition-[color,box-shadow,background-color] duration-200 ease-out motion-reduce:transition-none", selected ? "bg-[var(--action)] text-white shadow-[0_0_0_1px_var(--action),0px_1px_1px_0px_oklch(1_0_0_/_0.07)_inset,0px_2px_3px_0px_oklch(0.278_0.03_256.85_/_0.20),0px_1px_1px_0px_oklch(0_0_0_/_0.24)]" : "shadow-[0_0_0_1px_oklch(0.278_0.03_256.85_/_0.20),0_1px_2px_0_oklch(0_0_0_/_0.06),0_0_1px_0_oklch(0_0_0_/_0.02)] group-hover/card:shadow-[0_0_0_1px_oklch(0.278_0.03_256.85_/_0.30),0_1px_2px_0_oklch(0_0_0_/_0.06),0_0_1px_0_oklch(0_0_0_/_0.02)]"),
|
|
2076
2456
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckIcon, {
|
|
2077
2457
|
size: 14,
|
|
2078
|
-
className:
|
|
2458
|
+
className: cn("absolute inset-0 m-auto text-current transition-[opacity,transform,filter] duration-200 motion-reduce:transition-none", selected ? "opacity-100 scale-100 blur-none" : "opacity-0 scale-[0.25] blur-[4px]")
|
|
2079
2459
|
})
|
|
2080
2460
|
})
|
|
2081
2461
|
})
|
|
@@ -2088,7 +2468,7 @@ const Separator = (0, react.forwardRef)(({ className, orientation = "horizontal"
|
|
|
2088
2468
|
ref,
|
|
2089
2469
|
decorative,
|
|
2090
2470
|
orientation,
|
|
2091
|
-
className:
|
|
2471
|
+
className: cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className),
|
|
2092
2472
|
...props
|
|
2093
2473
|
}));
|
|
2094
2474
|
Separator.displayName = _radix_ui_react_separator.Root.displayName;
|
|
@@ -2109,7 +2489,7 @@ const Slider = ({ value, onValueChange, min = 0, max = 100, step = 1, disabled =
|
|
|
2109
2489
|
const fillPercent = range === 0 ? 0 : (clamped - min) / range * 100;
|
|
2110
2490
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2111
2491
|
"data-slot": "slider",
|
|
2112
|
-
className:
|
|
2492
|
+
className: cn("relative flex w-full touch-manipulation items-center", className),
|
|
2113
2493
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2114
2494
|
type: "range",
|
|
2115
2495
|
"data-slot": "slider-input",
|
|
@@ -2122,7 +2502,7 @@ const Slider = ({ value, onValueChange, min = 0, max = 100, step = 1, disabled =
|
|
|
2122
2502
|
"aria-valuemax": max,
|
|
2123
2503
|
"aria-valuenow": clamped,
|
|
2124
2504
|
onChange: (e) => onValueChange(Number(e.target.value)),
|
|
2125
|
-
className:
|
|
2505
|
+
className: cn("w-full appearance-none bg-transparent outline-none", "cursor-pointer disabled:cursor-not-allowed disabled:opacity-50", "[&::-webkit-slider-runnable-track]:h-1.5", "[&::-webkit-slider-runnable-track]:w-full", "[&::-webkit-slider-runnable-track]:rounded-full", "[&::-webkit-slider-runnable-track]:bg-[linear-gradient(to_right,var(--action)_var(--slider-fill,0%),var(--bg-accented)_var(--slider-fill,0%))]", "[&::-webkit-slider-runnable-track]:transition-[background-size] [&::-webkit-slider-runnable-track]:duration-150 [&::-webkit-slider-runnable-track]:ease-out", "[&::-webkit-slider-runnable-track]:motion-reduce:transition-none", "[&::-webkit-slider-thumb]:appearance-none", "[&::-webkit-slider-thumb]:size-4", "[&::-webkit-slider-thumb]:rounded-full", "[&::-webkit-slider-thumb]:bg-background", "[&::-webkit-slider-thumb]:border", "[&::-webkit-slider-thumb]:border-[var(--action)]", "[&::-webkit-slider-thumb]:shadow-[var(--shadow-control-thumb)]", "[&::-webkit-slider-thumb]:-mt-[5px]", "[&::-webkit-slider-thumb]:transition-[box-shadow] [&::-webkit-slider-thumb]:duration-150 [&::-webkit-slider-thumb]:ease-out", "[&::-webkit-slider-thumb]:motion-reduce:transition-none", "focus-visible:[&::-webkit-slider-thumb]:shadow-[0_0_0_3px_var(--ring-halo),var(--shadow-control-thumb)]", "[&::-moz-range-track]:h-1.5", "[&::-moz-range-track]:w-full", "[&::-moz-range-track]:rounded-full", "[&::-moz-range-track]:bg-[var(--bg-accented)]", "[&::-moz-range-progress]:h-1.5", "[&::-moz-range-progress]:rounded-full", "[&::-moz-range-progress]:bg-[var(--action)]", "[&::-moz-range-thumb]:size-4", "[&::-moz-range-thumb]:rounded-full", "[&::-moz-range-thumb]:border", "[&::-moz-range-thumb]:border-[var(--action)]", "[&::-moz-range-thumb]:bg-background", "[&::-moz-range-thumb]:shadow-[var(--shadow-control-thumb)]", "[&::-moz-range-thumb]:transition-[box-shadow] [&::-moz-range-thumb]:duration-150 [&::-moz-range-thumb]:ease-out", "[&::-moz-range-thumb]:motion-reduce:transition-none", "focus-visible:[&::-moz-range-thumb]:shadow-[0_0_0_3px_var(--ring-halo),var(--shadow-control-thumb)]"),
|
|
2126
2506
|
style: { "--slider-fill": `${fillPercent}%` }
|
|
2127
2507
|
})
|
|
2128
2508
|
});
|
|
@@ -2149,14 +2529,14 @@ const SheetPortal = ({ ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)
|
|
|
2149
2529
|
const SheetOverlay = ({ className, ...props }) => {
|
|
2150
2530
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Overlay, {
|
|
2151
2531
|
"data-slot": "sheet-overlay",
|
|
2152
|
-
className:
|
|
2532
|
+
className: cn("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-[var(--overlay-md)] will-change-[opacity] data-[state=closed]:duration-100 data-[state=open]:duration-150 [animation-timing-function:cubic-bezier(0.16,1,0.3,1)] motion-reduce:animate-none", className),
|
|
2153
2533
|
...props
|
|
2154
2534
|
});
|
|
2155
2535
|
};
|
|
2156
2536
|
const SheetContent = ({ className, children, side = "right", showCloseButton = true, overlayClassName, ...props }) => {
|
|
2157
2537
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SheetPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SheetOverlay, { className: overlayClassName }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Content, {
|
|
2158
2538
|
"data-slot": "sheet-content",
|
|
2159
|
-
className:
|
|
2539
|
+
className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 border-0 shadow-[var(--shadow-elevated)] [animation-timing-function:cubic-bezier(0.32,0.72,0,1)] data-[state=closed]:duration-150 data-[state=open]:duration-200 will-change-[opacity,transform] motion-reduce:animate-none", side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 sm:max-w-sm rounded-l-xl rounded-r-md", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 sm:max-w-sm rounded-r-xl rounded-l-md", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto rounded-b-md", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto rounded-t-md", className),
|
|
2160
2540
|
...props,
|
|
2161
2541
|
children: [children, showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Close, {
|
|
2162
2542
|
className: "absolute top-3 right-3 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground opacity-70 transition-[opacity,background-color] duration-150 ease-out motion-reduce:transition-none hover:opacity-100 hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring/50 focus:outline-hidden disabled:pointer-events-none cursor-pointer touch-manipulation before:absolute before:-inset-2 before:content-['']",
|
|
@@ -2173,28 +2553,28 @@ const SheetContent = ({ className, children, side = "right", showCloseButton = t
|
|
|
2173
2553
|
const SheetHeader = ({ className, ...props }) => {
|
|
2174
2554
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2175
2555
|
"data-slot": "sheet-header",
|
|
2176
|
-
className:
|
|
2556
|
+
className: cn("flex flex-col gap-0.5 px-4 py-3.5 border-b border-[var(--border-divider)]", className),
|
|
2177
2557
|
...props
|
|
2178
2558
|
});
|
|
2179
2559
|
};
|
|
2180
2560
|
const SheetFooter = ({ className, ...props }) => {
|
|
2181
2561
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2182
2562
|
"data-slot": "sheet-footer",
|
|
2183
|
-
className:
|
|
2563
|
+
className: cn("mt-auto flex flex-col gap-2 px-4 py-3.5 border-t border-[var(--border-divider)] bg-muted", className),
|
|
2184
2564
|
...props
|
|
2185
2565
|
});
|
|
2186
2566
|
};
|
|
2187
2567
|
const SheetTitle = ({ className, ...props }) => {
|
|
2188
2568
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Title, {
|
|
2189
2569
|
"data-slot": "sheet-title",
|
|
2190
|
-
className:
|
|
2570
|
+
className: cn("text-foreground font-semibold", className),
|
|
2191
2571
|
...props
|
|
2192
2572
|
});
|
|
2193
2573
|
};
|
|
2194
2574
|
const SheetDescription = ({ className, ...props }) => {
|
|
2195
2575
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Description, {
|
|
2196
2576
|
"data-slot": "sheet-description",
|
|
2197
|
-
className:
|
|
2577
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
2198
2578
|
...props
|
|
2199
2579
|
});
|
|
2200
2580
|
};
|
|
@@ -2205,7 +2585,7 @@ const Skeleton = ({ className, ...props }) => {
|
|
|
2205
2585
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("output", {
|
|
2206
2586
|
"aria-label": "Loading",
|
|
2207
2587
|
"data-slot": "skeleton",
|
|
2208
|
-
className:
|
|
2588
|
+
className: cn("block bg-accent animate-shimmer motion-reduce:animate-none rounded-md bg-[length:200%_100%] bg-gradient-to-r from-accent via-accent/50 to-accent dark:via-accent/70", className),
|
|
2209
2589
|
...props
|
|
2210
2590
|
});
|
|
2211
2591
|
};
|
|
@@ -2280,33 +2660,33 @@ const Toaster = ({ ...props }) => {
|
|
|
2280
2660
|
*/
|
|
2281
2661
|
const Stepper = ({ steps, currentStep, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", {
|
|
2282
2662
|
"aria-label": "Progress",
|
|
2283
|
-
className:
|
|
2663
|
+
className: cn("flex w-full items-start", className),
|
|
2284
2664
|
...props,
|
|
2285
2665
|
children: steps.map((step, index) => {
|
|
2286
2666
|
const isCompleted = index < currentStep;
|
|
2287
2667
|
const isCurrent = index === currentStep;
|
|
2288
2668
|
const connectorCompleted = index > 0 && index <= currentStep;
|
|
2289
2669
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
2290
|
-
className:
|
|
2670
|
+
className: cn("flex flex-1 items-start", index === steps.length - 1 && "flex-none"),
|
|
2291
2671
|
"aria-current": isCurrent ? "step" : void 0,
|
|
2292
2672
|
children: [
|
|
2293
2673
|
index > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2294
2674
|
"aria-hidden": "true",
|
|
2295
|
-
className:
|
|
2675
|
+
className: cn("mt-3.5 h-px flex-1 transition-colors duration-300 ease-out motion-reduce:transition-none", connectorCompleted ? "bg-[var(--action)]" : "bg-[var(--border-divider)]")
|
|
2296
2676
|
}),
|
|
2297
2677
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2298
2678
|
className: "flex flex-col items-center gap-1.5",
|
|
2299
2679
|
children: [
|
|
2300
2680
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2301
2681
|
"aria-hidden": "true",
|
|
2302
|
-
className:
|
|
2682
|
+
className: cn("flex size-7 shrink-0 items-center justify-center rounded-full text-xs font-semibold transition-[background-color,border-color,color] duration-300 ease-out motion-reduce:transition-none select-none", isCompleted && "bg-[var(--action)] text-white", isCurrent && "border-2 border-[var(--action)] text-[var(--action)]", !isCompleted && !isCurrent && "border border-[var(--border-default)] text-muted-foreground"),
|
|
2303
2683
|
children: isCompleted ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckIcon, {
|
|
2304
2684
|
size: 13,
|
|
2305
2685
|
strokeWidth: 3
|
|
2306
2686
|
}) : String(index + 1)
|
|
2307
2687
|
}),
|
|
2308
2688
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2309
|
-
className:
|
|
2689
|
+
className: cn("max-w-[6rem] text-center text-xs leading-tight transition-colors duration-300 ease-out motion-reduce:transition-none", isCurrent ? "font-medium text-foreground" : "text-muted-foreground"),
|
|
2310
2690
|
children: step.label
|
|
2311
2691
|
}),
|
|
2312
2692
|
step.description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -2317,13 +2697,29 @@ const Stepper = ({ steps, currentStep, className, ...props }) => /* @__PURE__ */
|
|
|
2317
2697
|
}),
|
|
2318
2698
|
index < steps.length - 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2319
2699
|
"aria-hidden": "true",
|
|
2320
|
-
className:
|
|
2700
|
+
className: cn("mt-3.5 h-px flex-1 transition-colors duration-300 ease-out motion-reduce:transition-none", index + 1 <= currentStep ? "bg-[var(--action)]" : "bg-[var(--border-divider)]")
|
|
2321
2701
|
})
|
|
2322
2702
|
]
|
|
2323
2703
|
}, step.label);
|
|
2324
2704
|
})
|
|
2325
2705
|
});
|
|
2326
2706
|
|
|
2707
|
+
//#endregion
|
|
2708
|
+
//#region src/components/ui/switch/switch.tsx
|
|
2709
|
+
const Switch = (0, react.forwardRef)(({ className, size = "default", ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_switch.Root, {
|
|
2710
|
+
ref,
|
|
2711
|
+
"data-slot": "switch",
|
|
2712
|
+
"data-size": size,
|
|
2713
|
+
className: cn("peer data-[state=checked]:bg-(--action) data-[state=unchecked]:bg-input hover:data-[state=unchecked]:bg-[rgba(31,41,55,0.16)] group-hover/toggle:data-[state=unchecked]:bg-[rgba(31,41,55,0.16)] focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 dark:hover:data-[state=unchecked]:bg-[rgba(255,255,255,0.12)] dark:group-hover/toggle:data-[state=unchecked]:bg-[rgba(255,255,255,0.12)] relative group/switch inline-flex shrink-0 touch-manipulation items-center rounded-full border-0 shadow-[var(--shadow-control)] dark:shadow-[var(--shadow-control)] data-[state=checked]:shadow-[var(--shadow-control-checked)] dark:data-[state=checked]:shadow-[var(--shadow-control-checked)] transition-[color,background-color,box-shadow] duration-200 ease-out motion-reduce:transition-none outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer data-[size=default]:h-[18px] data-[size=default]:w-[30px] data-[size=sm]:h-3.5 data-[size=sm]:w-[22px] before:absolute before:-inset-[15px] before:content-['']", className),
|
|
2714
|
+
...props,
|
|
2715
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_switch.Thumb, {
|
|
2716
|
+
"data-slot": "switch-thumb",
|
|
2717
|
+
className: cn("pointer-events-none relative block ring-0", "transition-transform duration-200 ease-out motion-reduce:transition-none", "group-data-[size=default]/switch:size-3.5 group-data-[size=sm]/switch:size-2.5", "data-[state=unchecked]:translate-x-0.5 group-data-[size=default]/switch:data-[state=checked]:translate-x-[14px] group-data-[size=sm]/switch:data-[state=checked]:translate-x-[10px]"),
|
|
2718
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: cn("absolute top-0 h-full rounded-full", "bg-background dark:group-data-[state=checked]/switch:bg-white dark:group-data-[state=unchecked]/switch:bg-[oklch(0.500_0.013_253)]", "shadow-[var(--shadow-control-thumb)] dark:shadow-[var(--shadow-control-thumb)]", "group-data-[size=default]/switch:w-3.5 group-data-[size=sm]/switch:w-2.5", "group-data-[state=checked]/switch:right-0 group-data-[state=unchecked]/switch:left-0", "group-[&[data-size=default]:active]/switch:w-[17px] group-[&[data-size=sm]:active]/switch:w-3", "transition-[width,background-color] duration-[120ms] ease-out motion-reduce:transition-none") })
|
|
2719
|
+
})
|
|
2720
|
+
}));
|
|
2721
|
+
Switch.displayName = "Switch";
|
|
2722
|
+
|
|
2327
2723
|
//#endregion
|
|
2328
2724
|
//#region src/components/ui/table/table.tsx
|
|
2329
2725
|
/** Keep overlay tracks clear of the shelf's rounded corners. */
|
|
@@ -2369,7 +2765,13 @@ const measureShelfTop = ({ scrollArea, table }) => {
|
|
|
2369
2765
|
const body = table?.tBodies[0];
|
|
2370
2766
|
return body ? body.getBoundingClientRect().top - scrollArea.getBoundingClientRect().top + scrollArea.scrollTop : 0;
|
|
2371
2767
|
};
|
|
2372
|
-
/**
|
|
2768
|
+
/**
|
|
2769
|
+
* Render a table in a stable tray with keyboard access only when content overflows.
|
|
2770
|
+
* For any list of records, use `DataTable`, which is built on this. Use `Table` directly
|
|
2771
|
+
* only for static layout: a short fixed grid of values that nobody sorts, filters, pages or selects.
|
|
2772
|
+
*
|
|
2773
|
+
* @deprecated For lists of records, use `DataTable`. Direct use is only for static layout.
|
|
2774
|
+
*/
|
|
2373
2775
|
const Table = ({ className, fill = false, scrollAreaProps = {}, stickyFirstColumn = false, viewportRef, ...props }) => {
|
|
2374
2776
|
const scrollAreaRef = (0, react.useRef)(null);
|
|
2375
2777
|
const setViewportRef = (0, react.useMemo)(() => mergeRefs(scrollAreaRef, viewportRef), [viewportRef]);
|
|
@@ -2479,7 +2881,7 @@ const Table = ({ className, fill = false, scrollAreaProps = {}, stickyFirstColum
|
|
|
2479
2881
|
"data-tray": "header",
|
|
2480
2882
|
"data-fill": fill || void 0,
|
|
2481
2883
|
dir: props.dir,
|
|
2482
|
-
className:
|
|
2884
|
+
className: cn("group/table relative min-w-0 w-full overflow-hidden [container-type:inline-size] [--table-radius:16px] [--table-shelf-radius:calc(var(--table-radius)_-_var(--tray-inset))] rounded-[var(--table-radius)] bg-[var(--tray-chrome)] px-[var(--tray-inset)] pb-[var(--tray-inset)]", fill && "flex min-h-0 flex-1 flex-col"),
|
|
2483
2885
|
children: [
|
|
2484
2886
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2485
2887
|
"aria-hidden": "true",
|
|
@@ -2504,11 +2906,11 @@ const Table = ({ className, fill = false, scrollAreaProps = {}, stickyFirstColum
|
|
|
2504
2906
|
scrollPaddingTop: headerHeight + topCaptionHeight,
|
|
2505
2907
|
...scrollAreaStyle
|
|
2506
2908
|
},
|
|
2507
|
-
className:
|
|
2909
|
+
className: cn("relative min-w-0 overflow-auto overscroll-none rounded-[var(--table-shelf-radius)] data-[native-scrollbars=true]:[scrollbar-width:auto] data-[native-scrollbars=true]:[&::-webkit-scrollbar]:block focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ring)]", fill && "min-h-0 flex-1", scrollAreaClassName),
|
|
2508
2910
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", {
|
|
2509
2911
|
"data-slot": "table",
|
|
2510
2912
|
"data-sticky-first-column": stickyFirstColumn || void 0,
|
|
2511
|
-
className:
|
|
2913
|
+
className: cn("w-full caption-bottom border-separate border-spacing-0 text-sm", stickyFirstColumn && [
|
|
2512
2914
|
"[&>*>tr>[data-table-pinned]]:sticky [&>*>tr>[data-table-pinned]]:start-0 [&>*>tr>[data-table-pinned]]:z-10",
|
|
2513
2915
|
"[&>*>tr>[data-table-pinned]]:bg-card",
|
|
2514
2916
|
"[&>thead>tr>[data-table-pinned]]:bg-[var(--tray-chrome)]",
|
|
@@ -2557,7 +2959,7 @@ const Table = ({ className, fill = false, scrollAreaProps = {}, stickyFirstColum
|
|
|
2557
2959
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_scroll_area.Thumb, {
|
|
2558
2960
|
"data-slot": "table-scrollbar-thumb",
|
|
2559
2961
|
style: orientation === "vertical" ? { width: "100%" } : { height: "100%" },
|
|
2560
|
-
className:
|
|
2962
|
+
className: cn("relative [--table-scrollbar-thumb:color-mix(in_oklab,var(--foreground)_25%,transparent)] [--table-scrollbar-thumb-hover:color-mix(in_oklab,var(--foreground)_35%,transparent)] before:pointer-events-none before:absolute before:rounded-full before:bg-[var(--table-scrollbar-thumb)] group-hover/scrollbar:before:bg-[var(--table-scrollbar-thumb-hover)] contrast-more:before:bg-[var(--border-strong)] contrast-more:group-hover/scrollbar:before:bg-[var(--border-strong)] forced-colors:before:bg-[CanvasText] forced-colors:group-hover/scrollbar:before:bg-[CanvasText]", orientation === "vertical" ? "before:inset-y-0 before:left-1/2 before:w-1 before:-translate-x-1/2 group-hover/scrollbar:before:w-1.5" : "before:inset-x-0 before:top-1/2 before:h-1 before:-translate-y-1/2 group-hover/scrollbar:before:h-1.5")
|
|
2561
2963
|
})
|
|
2562
2964
|
}, orientation))
|
|
2563
2965
|
]
|
|
@@ -2567,28 +2969,28 @@ const Table = ({ className, fill = false, scrollAreaProps = {}, stickyFirstColum
|
|
|
2567
2969
|
const TableHeader = ({ className, ...props }) => {
|
|
2568
2970
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", {
|
|
2569
2971
|
"data-slot": "table-header",
|
|
2570
|
-
className:
|
|
2972
|
+
className: cn("sticky top-[var(--table-caption-height,0px)] z-20 bg-[var(--tray-chrome)] [&_tr]:border-0 [&_tr]:hover:bg-transparent", className),
|
|
2571
2973
|
...props
|
|
2572
2974
|
});
|
|
2573
2975
|
};
|
|
2574
2976
|
const TableBody = ({ className, ...props }) => {
|
|
2575
2977
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", {
|
|
2576
2978
|
"data-slot": "table-body",
|
|
2577
|
-
className:
|
|
2979
|
+
className: cn("[&>tr:not(:last-child)>*]:border-b [&>tr:not(:last-child)>*]:border-[var(--border-divider)]", className),
|
|
2578
2980
|
...props
|
|
2579
2981
|
});
|
|
2580
2982
|
};
|
|
2581
2983
|
const TableFooter = ({ className, ...props }) => {
|
|
2582
2984
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tfoot", {
|
|
2583
2985
|
"data-slot": "table-footer",
|
|
2584
|
-
className:
|
|
2986
|
+
className: cn("font-medium [&>tr>*]:border-t [&>tr>*]:border-[var(--border-divider)]", className),
|
|
2585
2987
|
...props
|
|
2586
2988
|
});
|
|
2587
2989
|
};
|
|
2588
2990
|
const TableRow = (0, react.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
|
|
2589
2991
|
ref,
|
|
2590
2992
|
"data-slot": "table-row",
|
|
2591
|
-
className:
|
|
2993
|
+
className: cn("hover:bg-[var(--overlay-hover)] data-[state=selected]:bg-[var(--table-row-selected)] data-[state=selected]:hover:bg-[var(--table-row-selected-hover)] border-b border-[var(--border-divider)]", "hover:[--table-row-overlay:var(--overlay-hover)] data-[state=selected]:[--table-row-overlay:var(--table-row-selected)] data-[state=selected]:hover:[--table-row-overlay:var(--table-row-selected-hover)]", className),
|
|
2592
2994
|
...props
|
|
2593
2995
|
}));
|
|
2594
2996
|
TableRow.displayName = "TableRow";
|
|
@@ -2596,21 +2998,21 @@ const TableHead = ({ className, scope, ...props }) => {
|
|
|
2596
2998
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
2597
2999
|
"data-slot": "table-head",
|
|
2598
3000
|
scope: scope ?? "col",
|
|
2599
|
-
className:
|
|
3001
|
+
className: cn("text-foreground/75 h-[38px] px-4 text-left align-middle text-xs font-medium whitespace-nowrap tabular-nums [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
2600
3002
|
...props
|
|
2601
3003
|
});
|
|
2602
3004
|
};
|
|
2603
3005
|
const TableCell = ({ className, ...props }) => {
|
|
2604
3006
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
2605
3007
|
"data-slot": "table-cell",
|
|
2606
|
-
className:
|
|
3008
|
+
className: cn("px-4 py-2.5 align-middle whitespace-nowrap tabular-nums [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
2607
3009
|
...props
|
|
2608
3010
|
});
|
|
2609
3011
|
};
|
|
2610
3012
|
const TableCaption = ({ className, ...props }) => {
|
|
2611
3013
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("caption", {
|
|
2612
3014
|
"data-slot": "table-caption",
|
|
2613
|
-
className:
|
|
3015
|
+
className: cn("text-muted-foreground mt-4 text-sm [[data-caption-top=true]_&]:sticky [[data-caption-top=true]_&]:top-0 [[data-caption-top=true]_&]:z-20 [[data-caption-top=true]_&]:mt-0 [[data-caption-top=true]_&]:bg-[var(--tray-chrome)]", className),
|
|
2614
3016
|
...props
|
|
2615
3017
|
});
|
|
2616
3018
|
};
|
|
@@ -2679,7 +3081,7 @@ const DataTable = ({ children, className, fill = false, table, ...props }) => {
|
|
|
2679
3081
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2680
3082
|
"data-slot": "data-table",
|
|
2681
3083
|
"data-fill": fill || void 0,
|
|
2682
|
-
className:
|
|
3084
|
+
className: cn("flex min-w-0 flex-col gap-3", fill && "min-h-0 flex-1", className),
|
|
2683
3085
|
...props,
|
|
2684
3086
|
children
|
|
2685
3087
|
})
|
|
@@ -2701,7 +3103,7 @@ const DataTable = ({ children, className, fill = false, table, ...props }) => {
|
|
|
2701
3103
|
*/
|
|
2702
3104
|
const DataTableToolbar = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2703
3105
|
"data-slot": "data-table-toolbar",
|
|
2704
|
-
className:
|
|
3106
|
+
className: cn("flex flex-wrap items-center gap-2", className),
|
|
2705
3107
|
...props
|
|
2706
3108
|
});
|
|
2707
3109
|
|
|
@@ -2759,7 +3161,7 @@ const DataTableValuesFilter = ({ column, filterValue }) => {
|
|
|
2759
3161
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2760
3162
|
"data-slot": "data-table-column-filter-options",
|
|
2761
3163
|
className: "-m-1 flex max-h-60 flex-col gap-2 overflow-y-auto p-1",
|
|
2762
|
-
children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
3164
|
+
children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Label, {
|
|
2763
3165
|
className: "flex items-center gap-2 text-sm font-normal",
|
|
2764
3166
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Checkbox, {
|
|
2765
3167
|
checked: selected.includes(option),
|
|
@@ -2799,13 +3201,13 @@ const DataTableColumnFilter = ({ className, column }) => {
|
|
|
2799
3201
|
const isFiltered = column.getIsFiltered();
|
|
2800
3202
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Popover, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverTrigger, {
|
|
2801
3203
|
asChild: true,
|
|
2802
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
3204
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Button, {
|
|
2803
3205
|
"aria-label": isFiltered ? `Filter ${label}, filtered` : `Filter ${label}`,
|
|
2804
3206
|
"data-slot": "data-table-column-filter",
|
|
2805
3207
|
"data-filtered": isFiltered || void 0,
|
|
2806
3208
|
size: "icon-xs",
|
|
2807
3209
|
variant: "ghost",
|
|
2808
|
-
className:
|
|
3210
|
+
className: cn("ms-1 align-middle before:-inset-1 data-[filtered=true]:text-foreground", className),
|
|
2809
3211
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
2810
3212
|
icon: _hugeicons_core_free_icons.FilterIcon,
|
|
2811
3213
|
"aria-hidden": "true"
|
|
@@ -2827,7 +3229,7 @@ const DataTableColumnFilterContent = ({ column }) => {
|
|
|
2827
3229
|
children: [column.columnDef.meta?.filter === "values" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataTableValuesFilter, {
|
|
2828
3230
|
column,
|
|
2829
3231
|
filterValue
|
|
2830
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3232
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Input, {
|
|
2831
3233
|
"aria-label": `Filter ${label}`,
|
|
2832
3234
|
placeholder: TEXT_FILTER_PLACEHOLDER,
|
|
2833
3235
|
value: typeof filterValue === "string" ? filterValue : "",
|
|
@@ -2835,7 +3237,7 @@ const DataTableColumnFilterContent = ({ column }) => {
|
|
|
2835
3237
|
}), column.getIsFiltered() && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2836
3238
|
"data-slot": "data-table-column-filter-footer",
|
|
2837
3239
|
className: "-mx-3 flex justify-end border-t border-[var(--border-divider)] px-3 pt-3",
|
|
2838
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3240
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
2839
3241
|
size: "sm",
|
|
2840
3242
|
variant: "secondary",
|
|
2841
3243
|
onClick: () => column.setFilterValue(void 0),
|
|
@@ -2867,7 +3269,7 @@ const DataTableFilterChip = ({ column, label, onRemove, removeLabel, values }) =
|
|
|
2867
3269
|
type: "button",
|
|
2868
3270
|
"aria-label": removeLabel,
|
|
2869
3271
|
onClick: onRemove,
|
|
2870
|
-
className:
|
|
3272
|
+
className: cn(CHIP_CONTROL, "w-6 justify-center text-muted-foreground/70 hover:text-foreground"),
|
|
2871
3273
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
2872
3274
|
icon: _hugeicons_core_free_icons.Cancel01Icon,
|
|
2873
3275
|
size: 12,
|
|
@@ -2891,7 +3293,7 @@ const DataTableFilterChip = ({ column, label, onRemove, removeLabel, values }) =
|
|
|
2891
3293
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2892
3294
|
type: "button",
|
|
2893
3295
|
"aria-label": `Change ${label} filter: ${fullValue}`,
|
|
2894
|
-
className:
|
|
3296
|
+
className: cn(CHIP_CONTROL, "ms-1 gap-1 ps-1.5 pe-1 font-medium text-[var(--action)]"),
|
|
2895
3297
|
children: [shownValue, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
2896
3298
|
icon: _hugeicons_core_free_icons.ArrowDown01Icon,
|
|
2897
3299
|
size: 14,
|
|
@@ -2937,7 +3339,7 @@ const DataTableActiveFilters = ({ className }) => {
|
|
|
2937
3339
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", {
|
|
2938
3340
|
"aria-label": "Active filters",
|
|
2939
3341
|
"data-slot": "data-table-active-filters",
|
|
2940
|
-
className:
|
|
3342
|
+
className: cn("flex min-w-0 flex-wrap items-center gap-2", className),
|
|
2941
3343
|
children: [
|
|
2942
3344
|
search !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataTableFilterChip, {
|
|
2943
3345
|
label: "Search",
|
|
@@ -2956,7 +3358,7 @@ const DataTableActiveFilters = ({ className }) => {
|
|
|
2956
3358
|
values: toFilterValues(value)
|
|
2957
3359
|
}, id);
|
|
2958
3360
|
}),
|
|
2959
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3361
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
2960
3362
|
className: "text-muted-foreground hover:text-foreground",
|
|
2961
3363
|
variant: "ghost",
|
|
2962
3364
|
onClick: clearAll,
|
|
@@ -2990,7 +3392,7 @@ const DataTableColumnVisibility = ({ className, label = "Columns" }) => {
|
|
|
2990
3392
|
const columns = table.getAllLeafColumns().filter((column) => column.getCanHide());
|
|
2991
3393
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DropdownMenu, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownMenuTrigger, {
|
|
2992
3394
|
asChild: true,
|
|
2993
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
3395
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Button, {
|
|
2994
3396
|
"data-slot": "data-table-column-visibility",
|
|
2995
3397
|
className,
|
|
2996
3398
|
variant: "outline",
|
|
@@ -3031,7 +3433,7 @@ const DataTableColumnVisibility = ({ className, label = "Columns" }) => {
|
|
|
3031
3433
|
//#region src/components/empty-state/empty-state.tsx
|
|
3032
3434
|
const EmptyState = ({ icon: Icon$2, title, description, action, className }) => {
|
|
3033
3435
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3034
|
-
className:
|
|
3436
|
+
className: cn("flex flex-col items-center justify-center py-16 px-8 text-center", className),
|
|
3035
3437
|
children: [
|
|
3036
3438
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3037
3439
|
className: "flex size-12 items-center justify-center rounded-xl bg-muted mb-4",
|
|
@@ -3074,7 +3476,7 @@ const DataTableSkeletonRows = ({ columnCount, rowCount }) => /* @__PURE__ */ (0,
|
|
|
3074
3476
|
className: STATIC_ROW,
|
|
3075
3477
|
children: Array.from({ length: columnCount }, (_$1, columnIndex) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, {
|
|
3076
3478
|
"aria-hidden": rowIndex > 0 || columnIndex > 0 || void 0,
|
|
3077
|
-
className:
|
|
3479
|
+
className: cn("h-4 max-w-full", getBarWidth(columnIndex))
|
|
3078
3480
|
}) }, columnIndex))
|
|
3079
3481
|
}, rowIndex)) });
|
|
3080
3482
|
/** Ghost rows keep the table's shape behind an icon and title. */
|
|
@@ -3095,7 +3497,7 @@ const DataTableEmptyRow = ({ action, columnCount, icon, title }) => /* @__PURE__
|
|
|
3095
3497
|
style: { gridTemplateColumns: `repeat(${columnCount}, minmax(0, 1fr))` },
|
|
3096
3498
|
children: Array.from({ length: columnCount }, (_$1, columnIndex) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3097
3499
|
className: "px-4",
|
|
3098
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className:
|
|
3500
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: cn("block h-2.5 max-w-full rounded-full bg-[var(--bg-accented)]", getBarWidth(columnIndex)) })
|
|
3099
3501
|
}, columnIndex))
|
|
3100
3502
|
}, rowIndex))
|
|
3101
3503
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -3117,7 +3519,7 @@ const DataTableEmptyRow = ({ action, columnCount, icon, title }) => /* @__PURE__
|
|
|
3117
3519
|
const ExpandChevron = ({ isOpen }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
3118
3520
|
icon: _hugeicons_core_free_icons.ArrowRight01Icon,
|
|
3119
3521
|
"aria-hidden": "true",
|
|
3120
|
-
className:
|
|
3522
|
+
className: cn("transition-transform duration-150 motion-reduce:transition-none", isOpen && "rotate-90")
|
|
3121
3523
|
});
|
|
3122
3524
|
|
|
3123
3525
|
//#endregion
|
|
@@ -3138,7 +3540,7 @@ const getPinnedCellProps = ({ column, section }) => {
|
|
|
3138
3540
|
if (!side) return {};
|
|
3139
3541
|
const isEdge = side === "left" ? column.getIsLastColumn("left") : column.getIsFirstColumn("right");
|
|
3140
3542
|
return {
|
|
3141
|
-
className:
|
|
3543
|
+
className: cn("sticky z-10", PINNED_BACKGROUND[section], isEdge && PINNED_EDGE[side]),
|
|
3142
3544
|
"data-pinned": side,
|
|
3143
3545
|
style: side === "left" ? { insetInlineStart: column.getStart("left") } : { insetInlineEnd: column.getAfter("right") }
|
|
3144
3546
|
};
|
|
@@ -3228,7 +3630,7 @@ const DataTableRow = ({ hasFixedLayout, row, rowRef, ...props }) => {
|
|
|
3228
3630
|
});
|
|
3229
3631
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
|
|
3230
3632
|
"data-pinned": pinned["data-pinned"],
|
|
3231
|
-
className:
|
|
3633
|
+
className: cn(hasFixedLayout && !isControlColumn(cell.column.id) && FIXED_LAYOUT_CELL_CLASS, pinned.className),
|
|
3232
3634
|
style: cell.id === indentedCellId ? {
|
|
3233
3635
|
...pinned.style,
|
|
3234
3636
|
paddingInlineStart: getIndent(row.depth)
|
|
@@ -3359,7 +3761,7 @@ const DataTableHeadCell = ({ header, hasFixedLayout }) => {
|
|
|
3359
3761
|
colSpan: header.colSpan,
|
|
3360
3762
|
"aria-sort": sorted && sortIndex === 0 ? ARIA_SORT[sorted] : void 0,
|
|
3361
3763
|
"data-pinned": pinned["data-pinned"],
|
|
3362
|
-
className:
|
|
3764
|
+
className: cn(column.getCanResize() && "relative", isControlColumn(column.id) && "w-px", hasFixedLayout && !isControlColumn(column.id) && FIXED_LAYOUT_CELL_CLASS, pinned.className),
|
|
3363
3765
|
style: {
|
|
3364
3766
|
...pinned.style,
|
|
3365
3767
|
width: hasFixedLayout ? header.getSize() : void 0
|
|
@@ -3479,7 +3881,7 @@ const DataTableContent = ({ className, emptyFilteredTitle = DEFAULT_EMPTY_FILTER
|
|
|
3479
3881
|
table.setGlobalFilter("");
|
|
3480
3882
|
};
|
|
3481
3883
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataTableEmptyRow, {
|
|
3482
|
-
action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3884
|
+
action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
3483
3885
|
variant: "outline",
|
|
3484
3886
|
size: "sm",
|
|
3485
3887
|
onClick: clearFilters,
|
|
@@ -3507,7 +3909,7 @@ const DataTableContent = ({ className, emptyFilteredTitle = DEFAULT_EMPTY_FILTER
|
|
|
3507
3909
|
fill,
|
|
3508
3910
|
"aria-busy": loading || void 0,
|
|
3509
3911
|
"aria-rowcount": isVirtualized ? rows.length + headerRowCount : void 0,
|
|
3510
|
-
className:
|
|
3912
|
+
className: cn(hasFixedLayout && "w-auto table-fixed", className),
|
|
3511
3913
|
style: hasFixedLayout ? {
|
|
3512
3914
|
minWidth: "100%",
|
|
3513
3915
|
width: table.getTotalSize(),
|
|
@@ -3604,13 +4006,13 @@ const DataTableSearch = ({ className, placeholder = "Search" }) => {
|
|
|
3604
4006
|
const { globalFilter } = table.getState();
|
|
3605
4007
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3606
4008
|
"data-slot": "data-table-search",
|
|
3607
|
-
className:
|
|
4009
|
+
className: cn("relative w-full max-w-64", className),
|
|
3608
4010
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
3609
4011
|
icon: _hugeicons_core_free_icons.Search01Icon,
|
|
3610
4012
|
size: 16,
|
|
3611
4013
|
"aria-hidden": "true",
|
|
3612
4014
|
className: "pointer-events-none absolute start-2 top-1/2 -translate-y-1/2 text-muted-foreground/70"
|
|
3613
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4015
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Input, {
|
|
3614
4016
|
type: "search",
|
|
3615
4017
|
"aria-label": placeholder,
|
|
3616
4018
|
placeholder,
|
|
@@ -3931,7 +4333,7 @@ const Tabs = ({ className, orientation = "horizontal", ...props }) => {
|
|
|
3931
4333
|
"data-slot": "tabs",
|
|
3932
4334
|
"data-orientation": orientation,
|
|
3933
4335
|
orientation,
|
|
3934
|
-
className:
|
|
4336
|
+
className: cn("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col", className),
|
|
3935
4337
|
...props
|
|
3936
4338
|
});
|
|
3937
4339
|
};
|
|
@@ -3947,21 +4349,21 @@ const TabsList = (0, react.forwardRef)(({ className, variant = "default", ...pro
|
|
|
3947
4349
|
ref,
|
|
3948
4350
|
"data-slot": "tabs-list",
|
|
3949
4351
|
"data-variant": variant,
|
|
3950
|
-
className:
|
|
4352
|
+
className: cn(tabsListVariants({ variant }), className),
|
|
3951
4353
|
...props
|
|
3952
4354
|
}));
|
|
3953
4355
|
TabsList.displayName = _radix_ui_react_tabs.List.displayName;
|
|
3954
4356
|
const TabsTrigger = ({ className, ...props }) => {
|
|
3955
4357
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tabs.Trigger, {
|
|
3956
4358
|
"data-slot": "tabs-trigger",
|
|
3957
|
-
className:
|
|
4359
|
+
className: cn("focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap touch-manipulation transition-[color,background-color,border-color,box-shadow,opacity] duration-150 motion-reduce:transition-none group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent", "data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground", "after:bg-foreground after:absolute after:opacity-0 after:transition-[opacity] after:motion-reduce:transition-none group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100", "group-data-[variant=navigation]/tabs-list:h-11 group-data-[variant=navigation]/tabs-list:flex-none group-data-[variant=navigation]/tabs-list:rounded-none group-data-[variant=navigation]/tabs-list:border-0 group-data-[variant=navigation]/tabs-list:bg-transparent group-data-[variant=navigation]/tabs-list:px-0 group-data-[variant=navigation]/tabs-list:py-0 group-data-[variant=navigation]/tabs-list:text-sm group-data-[variant=navigation]/tabs-list:font-normal group-data-[variant=navigation]/tabs-list:after:hidden group-data-[variant=navigation]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=navigation]/tabs-list:data-[state=active]:bg-transparent", className),
|
|
3958
4360
|
...props
|
|
3959
4361
|
});
|
|
3960
4362
|
};
|
|
3961
4363
|
const TabsContent = ({ className, ...props }) => {
|
|
3962
4364
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tabs.Content, {
|
|
3963
4365
|
"data-slot": "tabs-content",
|
|
3964
|
-
className:
|
|
4366
|
+
className: cn("flex-1 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:rounded-md", className),
|
|
3965
4367
|
...props
|
|
3966
4368
|
});
|
|
3967
4369
|
};
|
|
@@ -4045,7 +4447,7 @@ const ToggleGroup = ({ type, value, onValueChange, disabled = false, className,
|
|
|
4045
4447
|
"data-slot": "toggle-group",
|
|
4046
4448
|
role: type === "single" ? "radiogroup" : "toolbar",
|
|
4047
4449
|
onKeyDown: handleKeyDown,
|
|
4048
|
-
className:
|
|
4450
|
+
className: cn("inline-flex items-center rounded-lg bg-muted p-[3px] gap-0.5", disabled && "opacity-50 pointer-events-none", className),
|
|
4049
4451
|
...props,
|
|
4050
4452
|
children
|
|
4051
4453
|
})
|
|
@@ -4073,7 +4475,7 @@ const ToggleGroupItem = ({ value, disabled, className, children, onClick, ...pro
|
|
|
4073
4475
|
};
|
|
4074
4476
|
const tabIndex = isActive ? 0 : -1;
|
|
4075
4477
|
const sharedButtonProps = {
|
|
4076
|
-
className:
|
|
4478
|
+
className: cn("relative inline-flex h-8 flex-1 items-center justify-center gap-1.5", "rounded-md px-3 text-sm font-medium whitespace-nowrap", "cursor-pointer", "text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground", "transition-[color,background-color,box-shadow] duration-150 ease-out motion-reduce:transition-none", "data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm", "dark:data-[state=on]:bg-input/30 dark:data-[state=on]:text-foreground dark:data-[state=on]:border dark:data-[state=on]:border-input", "focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50", "disabled:pointer-events-none disabled:opacity-50", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
4077
4479
|
"data-slot": "toggle-group-item",
|
|
4078
4480
|
"data-state": isActive ? "on" : "off",
|
|
4079
4481
|
disabled: isDisabled,
|
|
@@ -4102,7 +4504,7 @@ const ToggleGroupItem = ({ value, disabled, className, children, onClick, ...pro
|
|
|
4102
4504
|
const Textarea = ({ className, ...props }) => {
|
|
4103
4505
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
4104
4506
|
"data-slot": "textarea",
|
|
4105
|
-
className:
|
|
4507
|
+
className: cn("placeholder:text-muted-foreground/60 dark:bg-input/30 flex field-sizing-content min-h-20 w-full touch-manipulation rounded-md border-0 bg-background px-3 py-2 text-base shadow-[var(--shadow-input)] transition-[color,box-shadow] duration-100 ease-out outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "hover:shadow-[var(--shadow-input-hover)]", "focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo,#0072EF26)]", "aria-invalid:shadow-[0_0_0_1px_var(--destructive),0_0_1px_0_var(--destructive)]", className),
|
|
4106
4508
|
...props
|
|
4107
4509
|
});
|
|
4108
4510
|
};
|
|
@@ -4116,7 +4518,7 @@ const TooltipContent = (0, react.forwardRef)(({ children, className, sideOffset
|
|
|
4116
4518
|
ref,
|
|
4117
4519
|
"data-slot": "tooltip-content",
|
|
4118
4520
|
sideOffset,
|
|
4119
|
-
className:
|
|
4521
|
+
className: cn("z-50 max-w-xs rounded-[6px] bg-[var(--tooltip-bg)] px-2 py-1 text-xs leading-4 font-medium text-balance text-[var(--tooltip-fg)] shadow-[inset_0_1px_0_0_oklch(1_0_0/0.08)] [filter:var(--tooltip-drop)]", className),
|
|
4120
4522
|
...props,
|
|
4121
4523
|
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tooltip.Arrow, {
|
|
4122
4524
|
asChild: true,
|
|
@@ -4174,7 +4576,7 @@ const AssetIcon = ({ symbol, size = 32, className }) => {
|
|
|
4174
4576
|
alt: symbol,
|
|
4175
4577
|
width: size,
|
|
4176
4578
|
height: size,
|
|
4177
|
-
className:
|
|
4579
|
+
className: cn("object-contain", className),
|
|
4178
4580
|
onError: (e) => {
|
|
4179
4581
|
const target = e.currentTarget;
|
|
4180
4582
|
if (!target.src.endsWith("/assets/generic.svg")) target.src = "/assets/generic.svg";
|
|
@@ -4307,12 +4709,12 @@ const CopyButton = ({ value, ariaLabel: idleAriaLabel, label, variant = "outline
|
|
|
4307
4709
|
stage: COPY_STAGE.error
|
|
4308
4710
|
}
|
|
4309
4711
|
];
|
|
4310
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
4712
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Button, {
|
|
4311
4713
|
variant,
|
|
4312
4714
|
size,
|
|
4313
4715
|
onClick: handleCopy,
|
|
4314
4716
|
"aria-label": ariaLabel,
|
|
4315
|
-
className:
|
|
4717
|
+
className: cn(stage === COPY_STAGE.copied && "text-[var(--text-success)]", stage === COPY_STAGE.error && "text-[var(--text-danger)]", className),
|
|
4316
4718
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4317
4719
|
"aria-hidden": "true",
|
|
4318
4720
|
className: "grid items-center",
|
|
@@ -4386,21 +4788,21 @@ const CodeBlock = (0, react.forwardRef)(({ code, title, language: _language, sho
|
|
|
4386
4788
|
const s = variantStyles[variant];
|
|
4387
4789
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4388
4790
|
ref,
|
|
4389
|
-
className:
|
|
4791
|
+
className: cn("rounded-xl overflow-hidden", s.wrapper, className),
|
|
4390
4792
|
children: [(title || showWindowChrome) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4391
|
-
className:
|
|
4793
|
+
className: cn("flex items-center justify-between border-b px-4 py-2.5", s.header),
|
|
4392
4794
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4393
4795
|
className: "flex items-center gap-3",
|
|
4394
4796
|
children: [showWindowChrome && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4395
4797
|
className: "flex gap-[6px]",
|
|
4396
4798
|
"aria-hidden": "true",
|
|
4397
4799
|
children: [
|
|
4398
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className:
|
|
4399
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className:
|
|
4400
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className:
|
|
4800
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: cn("size-[9px] rounded-full", s.chromeDot) }),
|
|
4801
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: cn("size-[9px] rounded-full", s.chromeDot) }),
|
|
4802
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: cn("size-[9px] rounded-full", s.chromeDot) })
|
|
4401
4803
|
]
|
|
4402
4804
|
}), title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4403
|
-
className:
|
|
4805
|
+
className: cn("text-[13px] font-medium", s.headerText),
|
|
4404
4806
|
children: title
|
|
4405
4807
|
})]
|
|
4406
4808
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopyButton, {
|
|
@@ -4420,25 +4822,25 @@ const CodeBlock = (0, react.forwardRef)(({ code, title, language: _language, sho
|
|
|
4420
4822
|
className: s.copyBtn
|
|
4421
4823
|
})
|
|
4422
4824
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
|
|
4423
|
-
className:
|
|
4825
|
+
className: cn("overflow-x-auto px-4 py-3.5 text-[13px] font-mono leading-relaxed", !title && !showWindowChrome && "pr-10", variant === "dark" && "bg-[var(--background)]"),
|
|
4424
4826
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: showLineNumbers ? lines.map((line, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4425
4827
|
className: "table-row",
|
|
4426
4828
|
children: [
|
|
4427
4829
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4428
|
-
className:
|
|
4830
|
+
className: cn("table-cell pr-4 text-right select-none tabular-nums w-[2ch]", s.lineNumber),
|
|
4429
4831
|
children: i + 1
|
|
4430
4832
|
}),
|
|
4431
4833
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4432
4834
|
className: "table-cell",
|
|
4433
4835
|
children: [showTerminalPrompt && i === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4434
|
-
className:
|
|
4836
|
+
className: cn("select-none mr-2", s.prompt),
|
|
4435
4837
|
children: "$"
|
|
4436
4838
|
}), line]
|
|
4437
4839
|
}),
|
|
4438
4840
|
i < lines.length - 1 && "\n"
|
|
4439
4841
|
]
|
|
4440
4842
|
}, `L${i}:${line}`)) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [showTerminalPrompt && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4441
|
-
className:
|
|
4843
|
+
className: cn("select-none mr-2", s.prompt),
|
|
4442
4844
|
children: "$"
|
|
4443
4845
|
}), code] }) })
|
|
4444
4846
|
})]
|
|
@@ -4451,7 +4853,7 @@ CodeBlock.displayName = "CodeBlock";
|
|
|
4451
4853
|
//#region src/components/danger-zone/danger-zone.tsx
|
|
4452
4854
|
const DangerZone = ({ title, description, actionLabel, confirmTitle, confirmDescription, onConfirm, className }) => {
|
|
4453
4855
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4454
|
-
className:
|
|
4856
|
+
className: cn("rounded-xl border border-[var(--border-danger)]/30 p-6 shadow-[var(--shadow-card)] bg-card", className),
|
|
4455
4857
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4456
4858
|
className: "flex items-start gap-3",
|
|
4457
4859
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -4476,7 +4878,7 @@ const DangerZone = ({ title, description, actionLabel, confirmTitle, confirmDesc
|
|
|
4476
4878
|
className: "mt-4",
|
|
4477
4879
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AlertDialog, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertDialogTrigger, {
|
|
4478
4880
|
asChild: true,
|
|
4479
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4881
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
4480
4882
|
variant: "destructive",
|
|
4481
4883
|
children: actionLabel
|
|
4482
4884
|
})
|
|
@@ -4525,12 +4927,12 @@ const DomainList = ({ className, domains, onChange, placeholder = "https://examp
|
|
|
4525
4927
|
}
|
|
4526
4928
|
};
|
|
4527
4929
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4528
|
-
className:
|
|
4930
|
+
className: cn("space-y-3", className),
|
|
4529
4931
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4530
4932
|
className: "flex gap-2",
|
|
4531
4933
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4532
4934
|
className: "flex-1",
|
|
4533
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4935
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Input, {
|
|
4534
4936
|
value: inputValue,
|
|
4535
4937
|
onChange: (e) => {
|
|
4536
4938
|
setInputValue(e.target.value);
|
|
@@ -4543,7 +4945,7 @@ const DomainList = ({ className, domains, onChange, placeholder = "https://examp
|
|
|
4543
4945
|
className: "text-xs text-[var(--text-danger)] mt-1",
|
|
4544
4946
|
children: error
|
|
4545
4947
|
})]
|
|
4546
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
4948
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Button, {
|
|
4547
4949
|
variant: "outline",
|
|
4548
4950
|
size: "default",
|
|
4549
4951
|
onClick: handleAdd,
|
|
@@ -4587,7 +4989,7 @@ const InfoBanner = ({ children, dismissible = false, onDismiss, className }) =>
|
|
|
4587
4989
|
const shouldReduceMotion = (0, motion_react.useReducedMotion)();
|
|
4588
4990
|
if (dismissed) return null;
|
|
4589
4991
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4590
|
-
className:
|
|
4992
|
+
className: cn("flex items-center gap-2 rounded-lg border border-border bg-muted/50 px-3 py-2 text-sm text-muted-foreground", className),
|
|
4591
4993
|
children: [
|
|
4592
4994
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4593
4995
|
className: "text-muted-foreground shrink-0",
|
|
@@ -4623,7 +5025,7 @@ const buildIdList = (length) => Array.from({ length }, () => crypto.randomUUID()
|
|
|
4623
5025
|
/** Full-page skeleton with header and content area */
|
|
4624
5026
|
const PageSkeleton = ({ className }) => {
|
|
4625
5027
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4626
|
-
className:
|
|
5028
|
+
className: cn("space-y-6 p-6", className),
|
|
4627
5029
|
children: [
|
|
4628
5030
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4629
5031
|
className: "space-y-2",
|
|
@@ -4644,7 +5046,7 @@ const PageSkeleton = ({ className }) => {
|
|
|
4644
5046
|
/** Stat/metric card skeleton */
|
|
4645
5047
|
const StatCardSkeleton = ({ className }) => {
|
|
4646
5048
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4647
|
-
className:
|
|
5049
|
+
className: cn("rounded-xl p-5 shadow-[var(--shadow-card)] bg-card", className),
|
|
4648
5050
|
children: [
|
|
4649
5051
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4650
5052
|
className: "flex items-center justify-between mb-3",
|
|
@@ -4661,13 +5063,13 @@ const TableSkeleton = ({ rows = 5, columns = 4, className }) => {
|
|
|
4661
5063
|
const rowIds = (0, react.useMemo)(() => buildIdList(rows), [rows]);
|
|
4662
5064
|
const colIds = (0, react.useMemo)(() => buildIdList(columns), [columns]);
|
|
4663
5065
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4664
|
-
className:
|
|
5066
|
+
className: cn("rounded-xl border shadow-[var(--shadow-card)] bg-card overflow-hidden", className),
|
|
4665
5067
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4666
5068
|
className: "flex items-center gap-4 px-4 py-3 border-b",
|
|
4667
5069
|
children: headerIds.map((id) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, { className: "h-4 flex-1" }, id))
|
|
4668
5070
|
}), rowIds.map((rowId) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4669
5071
|
className: "flex items-center gap-4 px-4 py-3 border-b last:border-b-0",
|
|
4670
|
-
children: colIds.map((colId, colIdx) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, { className:
|
|
5072
|
+
children: colIds.map((colId, colIdx) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, { className: cn("h-4 flex-1", colIdx === 0 && "max-w-32", colIdx === columns - 1 && "max-w-16") }, `${rowId}-${colId}`))
|
|
4671
5073
|
}, rowId))]
|
|
4672
5074
|
});
|
|
4673
5075
|
};
|
|
@@ -4682,11 +5084,11 @@ const trendColor = {
|
|
|
4682
5084
|
const MetricCard = (props) => {
|
|
4683
5085
|
const { label, icon: Icon$2, loading = false, className } = props;
|
|
4684
5086
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4685
|
-
className:
|
|
5087
|
+
className: cn("rounded-[16px] bg-card shadow-[var(--shadow-card)] px-5 py-4", className),
|
|
4686
5088
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, { className: "h-3.5 w-20 mb-2.5" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, { className: "h-7 w-24" })]
|
|
4687
5089
|
});
|
|
4688
5090
|
if (props.inactive) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4689
|
-
className:
|
|
5091
|
+
className: cn("rounded-[16px] bg-card shadow-[var(--shadow-card)] px-5 py-4", className),
|
|
4690
5092
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4691
5093
|
className: "flex items-center gap-1.5",
|
|
4692
5094
|
children: [Icon$2 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon$2, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -4699,7 +5101,7 @@ const MetricCard = (props) => {
|
|
|
4699
5101
|
})]
|
|
4700
5102
|
});
|
|
4701
5103
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4702
|
-
className:
|
|
5104
|
+
className: cn("rounded-[16px] bg-card shadow-[var(--shadow-card)] px-5 py-4", className),
|
|
4703
5105
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4704
5106
|
className: "flex items-center gap-1.5",
|
|
4705
5107
|
children: [Icon$2 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon$2, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -4712,7 +5114,7 @@ const MetricCard = (props) => {
|
|
|
4712
5114
|
className: "text-2xl font-semibold tracking-tight tabular-nums",
|
|
4713
5115
|
children: props.value
|
|
4714
5116
|
}), props.trend && props.trendValue && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4715
|
-
className:
|
|
5117
|
+
className: cn("text-xs font-medium tabular-nums", trendColor[props.trend]),
|
|
4716
5118
|
children: props.trendValue
|
|
4717
5119
|
})]
|
|
4718
5120
|
})]
|
|
@@ -4738,7 +5140,7 @@ const AskAIAction = ({ docsPath }) => {
|
|
|
4738
5140
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AskAISheet, { docsPath });
|
|
4739
5141
|
};
|
|
4740
5142
|
const WebhooksAction = () => {
|
|
4741
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5143
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
4742
5144
|
variant: "outline",
|
|
4743
5145
|
size: "sm",
|
|
4744
5146
|
asChild: true,
|
|
@@ -4774,7 +5176,7 @@ const WebhooksAction = () => {
|
|
|
4774
5176
|
* @see SettingsSection
|
|
4775
5177
|
*/
|
|
4776
5178
|
const PageHeader = ({ title, description, badge, actions, className }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4777
|
-
className:
|
|
5179
|
+
className: cn("flex items-start justify-between gap-4", className),
|
|
4778
5180
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [badge ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4779
5181
|
className: "flex flex-wrap items-center gap-2",
|
|
4780
5182
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", {
|
|
@@ -4818,7 +5220,7 @@ const ProductPageLayout = ({ title, tabs, activeTab, onTabChange, children, head
|
|
|
4818
5220
|
whileTap: shouldReduceMotion ? void 0 : { scale: .96 },
|
|
4819
5221
|
transition: spring,
|
|
4820
5222
|
onClick: () => onTabChange(tab.id),
|
|
4821
|
-
className:
|
|
5223
|
+
className: cn("flex items-center rounded-md px-3 py-1.5 text-[13px] font-medium transition-[color,background-color] text-left touch-manipulation", activeTab === tab.id ? "bg-muted text-foreground" : "text-muted-foreground hover:bg-muted/50 hover:text-foreground"),
|
|
4822
5224
|
children: tab.label
|
|
4823
5225
|
}, tab.id))
|
|
4824
5226
|
}),
|
|
@@ -4845,11 +5247,11 @@ const ProductPageLayout = ({ title, tabs, activeTab, onTabChange, children, head
|
|
|
4845
5247
|
//#region src/components/settings-section/settings-section.tsx
|
|
4846
5248
|
const SettingsSection = ({ title, description, children, variant = "default", className }) => {
|
|
4847
5249
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4848
|
-
className:
|
|
5250
|
+
className: cn("rounded-xl border p-6 shadow-[var(--shadow-card)] bg-card", variant === "danger" && "border-[var(--border-danger)]/30", className),
|
|
4849
5251
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4850
5252
|
className: "mb-4",
|
|
4851
5253
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
4852
|
-
className:
|
|
5254
|
+
className: cn("text-sm font-semibold text-balance", variant === "danger" && "text-[var(--text-danger)]"),
|
|
4853
5255
|
children: title
|
|
4854
5256
|
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4855
5257
|
className: "text-sm text-muted-foreground mt-1 text-pretty",
|
|
@@ -4862,47 +5264,6 @@ const SettingsSection = ({ title, description, children, variant = "default", cl
|
|
|
4862
5264
|
});
|
|
4863
5265
|
};
|
|
4864
5266
|
|
|
4865
|
-
//#endregion
|
|
4866
|
-
//#region src/components/status-badge/status-badge.tsx
|
|
4867
|
-
const statusConfig = {
|
|
4868
|
-
active: {
|
|
4869
|
-
label: "Active",
|
|
4870
|
-
variant: "success"
|
|
4871
|
-
},
|
|
4872
|
-
blocked: {
|
|
4873
|
-
label: "Blocked",
|
|
4874
|
-
variant: "danger"
|
|
4875
|
-
},
|
|
4876
|
-
inactive: {
|
|
4877
|
-
label: "Inactive",
|
|
4878
|
-
variant: "inactive"
|
|
4879
|
-
},
|
|
4880
|
-
live: {
|
|
4881
|
-
label: "Live",
|
|
4882
|
-
variant: "success"
|
|
4883
|
-
},
|
|
4884
|
-
pending: {
|
|
4885
|
-
label: "Pending",
|
|
4886
|
-
variant: "warning"
|
|
4887
|
-
},
|
|
4888
|
-
processing: {
|
|
4889
|
-
label: "Processing",
|
|
4890
|
-
variant: "process"
|
|
4891
|
-
},
|
|
4892
|
-
sandbox: {
|
|
4893
|
-
label: "Sandbox",
|
|
4894
|
-
variant: "warning"
|
|
4895
|
-
}
|
|
4896
|
-
};
|
|
4897
|
-
const StatusBadge = ({ status, label, className }) => {
|
|
4898
|
-
const config = statusConfig[status];
|
|
4899
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Badge, {
|
|
4900
|
-
variant: config.variant,
|
|
4901
|
-
className,
|
|
4902
|
-
children: label || config.label
|
|
4903
|
-
});
|
|
4904
|
-
};
|
|
4905
|
-
|
|
4906
5267
|
//#endregion
|
|
4907
5268
|
//#region src/components/tab-navigation/tab-navigation.tsx
|
|
4908
5269
|
/**
|
|
@@ -5054,19 +5415,19 @@ const renderInput = (input, id) => {
|
|
|
5054
5415
|
name: input.name ?? ""
|
|
5055
5416
|
} });
|
|
5056
5417
|
};
|
|
5057
|
-
if (type === "toggle") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5418
|
+
if (type === "toggle") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Switch, {
|
|
5058
5419
|
id: input.id ?? id,
|
|
5059
5420
|
checked: Boolean(input.checked),
|
|
5060
5421
|
disabled: input.disabled,
|
|
5061
5422
|
onCheckedChange: handleChange,
|
|
5062
|
-
className:
|
|
5423
|
+
className: cn(inputCommon, "mt-0.5")
|
|
5063
5424
|
});
|
|
5064
5425
|
if (type === "checkbox") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Checkbox, {
|
|
5065
5426
|
id: input.id ?? id,
|
|
5066
5427
|
checked: Boolean(input.checked),
|
|
5067
5428
|
disabled: input.disabled,
|
|
5068
5429
|
onCheckedChange: (state) => handleChange(state === true),
|
|
5069
|
-
className:
|
|
5430
|
+
className: cn(inputCommon, "mt-1")
|
|
5070
5431
|
});
|
|
5071
5432
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RadioGroup, {
|
|
5072
5433
|
value: input.checked ? input.id ?? id : "",
|
|
@@ -5118,14 +5479,14 @@ const ToggleCard = ({ accordionKey, title, description, inputProps, allowExpand
|
|
|
5118
5479
|
value,
|
|
5119
5480
|
onValueChange,
|
|
5120
5481
|
"data-slot": "toggle-card",
|
|
5121
|
-
className:
|
|
5482
|
+
className: cn("rounded-xl bg-card shadow-card overflow-hidden", disabled && "opacity-60", className),
|
|
5122
5483
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_accordion.Item, {
|
|
5123
5484
|
value: accordionKey,
|
|
5124
5485
|
className: "border-0",
|
|
5125
5486
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_accordion.Header, {
|
|
5126
5487
|
className: "m-0",
|
|
5127
5488
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5128
|
-
className:
|
|
5489
|
+
className: cn("group flex items-start gap-3 px-5 py-4", isParentMode && "bg-bg-bottom", triggerClassName),
|
|
5129
5490
|
children: [
|
|
5130
5491
|
renderInput(inputProps, inputId),
|
|
5131
5492
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -5135,7 +5496,7 @@ const ToggleCard = ({ accordionKey, title, description, inputProps, allowExpand
|
|
|
5135
5496
|
className: "flex items-baseline gap-1.5 flex-wrap leading-5",
|
|
5136
5497
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5137
5498
|
htmlFor: inputId,
|
|
5138
|
-
className:
|
|
5499
|
+
className: cn("text-sm font-medium select-none leading-5", disabled && "text-muted-foreground"),
|
|
5139
5500
|
children: [title, notification && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5140
5501
|
"aria-hidden": true,
|
|
5141
5502
|
className: "inline-block ml-1.5 size-1.5 rounded-full bg-destructive align-middle"
|
|
@@ -5165,7 +5526,7 @@ const ToggleCard = ({ accordionKey, title, description, inputProps, allowExpand
|
|
|
5165
5526
|
children: RightSideTags.map((t) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t.Tag }, t.id))
|
|
5166
5527
|
}), allowExpand && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_accordion.Trigger, {
|
|
5167
5528
|
"data-testid": triggerTestId,
|
|
5168
|
-
className:
|
|
5529
|
+
className: cn("shrink-0 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground transition-[transform,background-color] duration-150 hover:bg-overlay-hover [&[data-state=open]>svg]:rotate-180", customActionIcon?.className),
|
|
5169
5530
|
disabled: !allowExpand,
|
|
5170
5531
|
children: customActionIcon ? customActionIcon.Icon : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
5171
5532
|
className: "size-4",
|
|
@@ -5187,6 +5548,96 @@ const ToggleCard = ({ accordionKey, title, description, inputProps, allowExpand
|
|
|
5187
5548
|
});
|
|
5188
5549
|
};
|
|
5189
5550
|
|
|
5551
|
+
//#endregion
|
|
5552
|
+
//#region src/components/toggle-row/toggle-row.tsx
|
|
5553
|
+
/**
|
|
5554
|
+
* A single on/off setting: switch on the left, then label, description and
|
|
5555
|
+
* optional `Badge`. It has no surface of its own.
|
|
5556
|
+
*
|
|
5557
|
+
* Use it as the `header` of a `FlushCardStack.Item`, or on its own inside a
|
|
5558
|
+
* `Card`. Never put a `Well` under it directly; sub-options go in the
|
|
5559
|
+
* `FlushCardStack.Item` reveal.
|
|
5560
|
+
*
|
|
5561
|
+
* @see FlushCardStack
|
|
5562
|
+
* @see Switch
|
|
5563
|
+
*/
|
|
5564
|
+
const ToggleRow = (props) => {
|
|
5565
|
+
const { label, description, checked, onCheckedChange, disabled = false, switchPosition = "left", icon, badge, onSettings, children, className } = props;
|
|
5566
|
+
const switchId = (0, react.useId)();
|
|
5567
|
+
const descId = (0, react.useId)();
|
|
5568
|
+
const cursorClass = disabled ? "cursor-not-allowed" : "cursor-pointer";
|
|
5569
|
+
if (switchPosition === "left") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5570
|
+
className,
|
|
5571
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5572
|
+
className: cn("flex items-start gap-2.5 touch-manipulation group/toggle"),
|
|
5573
|
+
children: [
|
|
5574
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Switch, {
|
|
5575
|
+
id: switchId,
|
|
5576
|
+
"aria-describedby": description ? descId : void 0,
|
|
5577
|
+
checked,
|
|
5578
|
+
onCheckedChange,
|
|
5579
|
+
disabled,
|
|
5580
|
+
className: "mt-0.5"
|
|
5581
|
+
}),
|
|
5582
|
+
icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
5583
|
+
htmlFor: switchId,
|
|
5584
|
+
className: cn("text-muted-foreground shrink-0 self-start", cursorClass),
|
|
5585
|
+
children: icon
|
|
5586
|
+
}),
|
|
5587
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5588
|
+
className: "flex-1 min-w-0",
|
|
5589
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5590
|
+
className: "flex items-center gap-2",
|
|
5591
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
5592
|
+
htmlFor: switchId,
|
|
5593
|
+
className: cn("font-medium select-none", disabled && "text-muted-foreground", cursorClass),
|
|
5594
|
+
children: label
|
|
5595
|
+
}), badge]
|
|
5596
|
+
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5597
|
+
id: descId,
|
|
5598
|
+
className: "text-sm text-muted-foreground mt-1 text-pretty",
|
|
5599
|
+
children: description
|
|
5600
|
+
})]
|
|
5601
|
+
})
|
|
5602
|
+
]
|
|
5603
|
+
}), children]
|
|
5604
|
+
});
|
|
5605
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5606
|
+
className: cn("space-y-3", className),
|
|
5607
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5608
|
+
className: "flex items-center justify-between gap-4",
|
|
5609
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
5610
|
+
htmlFor: switchId,
|
|
5611
|
+
className: cn("text-sm font-medium select-none", cursorClass),
|
|
5612
|
+
children: label
|
|
5613
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5614
|
+
className: "flex items-center gap-2 shrink-0",
|
|
5615
|
+
children: [onSettings && checked && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
5616
|
+
variant: "ghost",
|
|
5617
|
+
size: "icon-xs",
|
|
5618
|
+
onClick: onSettings,
|
|
5619
|
+
className: "text-muted-foreground hover:text-foreground",
|
|
5620
|
+
"aria-label": "Configure",
|
|
5621
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_hugeicons_react.HugeiconsIcon, {
|
|
5622
|
+
icon: _hugeicons_core_free_icons.Setting07Icon,
|
|
5623
|
+
size: 14
|
|
5624
|
+
})
|
|
5625
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Switch, {
|
|
5626
|
+
id: switchId,
|
|
5627
|
+
"aria-describedby": description ? descId : void 0,
|
|
5628
|
+
checked,
|
|
5629
|
+
onCheckedChange,
|
|
5630
|
+
disabled
|
|
5631
|
+
})]
|
|
5632
|
+
})]
|
|
5633
|
+
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5634
|
+
id: descId,
|
|
5635
|
+
className: "text-sm text-muted-foreground mt-0.5 text-pretty",
|
|
5636
|
+
children: description
|
|
5637
|
+
})] }), checked && children && children]
|
|
5638
|
+
});
|
|
5639
|
+
};
|
|
5640
|
+
|
|
5190
5641
|
//#endregion
|
|
5191
5642
|
//#region src/components/icons/animated-icon/animated-icon.tsx
|
|
5192
5643
|
const AnimatedIcon = (0, react.forwardRef)(({ children, className, onMouseEnter, onMouseLeave, size = 28, ...props }, ref) => {
|
|
@@ -5209,7 +5660,7 @@ const AnimatedIcon = (0, react.forwardRef)(({ children, className, onMouseEnter,
|
|
|
5209
5660
|
}, [controls, onMouseLeave]);
|
|
5210
5661
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5211
5662
|
"aria-hidden": "true",
|
|
5212
|
-
className:
|
|
5663
|
+
className: cn("inline-flex items-center justify-center", className),
|
|
5213
5664
|
onMouseEnter: handleMouseEnter,
|
|
5214
5665
|
onMouseLeave: handleMouseLeave,
|
|
5215
5666
|
...props,
|
|
@@ -5354,7 +5805,7 @@ const ChartBarIncreasingIcon = (0, react.forwardRef)(({ onMouseEnter, onMouseLea
|
|
|
5354
5805
|
}, [controls, onMouseLeave]);
|
|
5355
5806
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5356
5807
|
"aria-hidden": "true",
|
|
5357
|
-
className:
|
|
5808
|
+
className: cn("inline-flex items-center justify-center", className),
|
|
5358
5809
|
onMouseEnter: handleMouseEnter,
|
|
5359
5810
|
onMouseLeave: handleMouseLeave,
|
|
5360
5811
|
...props,
|
|
@@ -5579,7 +6030,7 @@ const CopyCheckIcon = (0, react.forwardRef)(({ onMouseEnter, onMouseLeave, class
|
|
|
5579
6030
|
]);
|
|
5580
6031
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5581
6032
|
"aria-hidden": "true",
|
|
5582
|
-
className:
|
|
6033
|
+
className: cn("relative inline-flex items-center justify-center", className),
|
|
5583
6034
|
onMouseEnter: handleMouseEnter,
|
|
5584
6035
|
onMouseLeave: handleMouseLeave,
|
|
5585
6036
|
...props,
|
|
@@ -6808,7 +7259,7 @@ exports.BreadcrumbLink = BreadcrumbLink;
|
|
|
6808
7259
|
exports.BreadcrumbList = BreadcrumbList;
|
|
6809
7260
|
exports.BreadcrumbPage = BreadcrumbPage;
|
|
6810
7261
|
exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
6811
|
-
exports.Button =
|
|
7262
|
+
exports.Button = Button;
|
|
6812
7263
|
exports.Card = Card;
|
|
6813
7264
|
exports.CardContent = CardContent;
|
|
6814
7265
|
exports.CardDescription = CardDescription;
|
|
@@ -6885,10 +7336,10 @@ exports.HomeIcon = HomeIcon;
|
|
|
6885
7336
|
exports.Icon = Icon;
|
|
6886
7337
|
exports.IconConfigProvider = IconConfigProvider;
|
|
6887
7338
|
exports.InfoBanner = InfoBanner;
|
|
6888
|
-
exports.Input =
|
|
7339
|
+
exports.Input = Input;
|
|
6889
7340
|
exports.Kbd = Kbd;
|
|
6890
7341
|
exports.KeyIcon = KeyIcon;
|
|
6891
|
-
exports.Label =
|
|
7342
|
+
exports.Label = Label;
|
|
6892
7343
|
exports.LayoutPanelTopIcon = LayoutPanelTopIcon;
|
|
6893
7344
|
exports.LinkIcon = LinkIcon;
|
|
6894
7345
|
exports.MetricCard = MetricCard;
|
|
@@ -6947,12 +7398,11 @@ exports.SheetTrigger = SheetTrigger;
|
|
|
6947
7398
|
exports.ShieldCheckIcon = ShieldCheckIcon;
|
|
6948
7399
|
exports.Skeleton = Skeleton;
|
|
6949
7400
|
exports.Slider = Slider;
|
|
6950
|
-
exports.Spinner =
|
|
7401
|
+
exports.Spinner = Spinner;
|
|
6951
7402
|
exports.StatCardSkeleton = StatCardSkeleton;
|
|
6952
|
-
exports.StatusBadge = StatusBadge;
|
|
6953
7403
|
exports.Stepper = Stepper;
|
|
6954
7404
|
exports.SunIcon = SunIcon;
|
|
6955
|
-
exports.Switch =
|
|
7405
|
+
exports.Switch = Switch;
|
|
6956
7406
|
exports.TabNavigation = TabNavigation;
|
|
6957
7407
|
exports.Table = Table;
|
|
6958
7408
|
exports.TableBody = TableBody;
|
|
@@ -6973,7 +7423,7 @@ exports.Toaster = Toaster;
|
|
|
6973
7423
|
exports.ToggleCard = ToggleCard;
|
|
6974
7424
|
exports.ToggleGroup = ToggleGroup;
|
|
6975
7425
|
exports.ToggleGroupItem = ToggleGroupItem;
|
|
6976
|
-
exports.ToggleRow =
|
|
7426
|
+
exports.ToggleRow = ToggleRow;
|
|
6977
7427
|
exports.Tooltip = Tooltip;
|
|
6978
7428
|
exports.TooltipContent = TooltipContent;
|
|
6979
7429
|
exports.TooltipProvider = TooltipProvider;
|
|
@@ -6985,10 +7435,9 @@ exports.WebhooksAction = WebhooksAction;
|
|
|
6985
7435
|
exports.Well = Well;
|
|
6986
7436
|
exports.WellReveal = WellReveal;
|
|
6987
7437
|
exports.WindsurfLogo = WindsurfLogo;
|
|
6988
|
-
exports.__toESM = __toESM;
|
|
6989
7438
|
exports.badgeVariants = badgeVariants;
|
|
6990
|
-
exports.buttonVariants =
|
|
6991
|
-
exports.cn =
|
|
7439
|
+
exports.buttonVariants = buttonVariants;
|
|
7440
|
+
exports.cn = cn;
|
|
6992
7441
|
exports.createColumnHelper = createColumnHelper;
|
|
6993
7442
|
exports.selectionColumn = selectionColumn;
|
|
6994
7443
|
Object.defineProperty(exports, 'toast', {
|
|
@@ -7000,5 +7449,4 @@ Object.defineProperty(exports, 'toast', {
|
|
|
7000
7449
|
exports.useDataTable = useDataTable;
|
|
7001
7450
|
exports.useIconConfig = useIconConfig;
|
|
7002
7451
|
exports.useUnsavedChanges = useUnsavedChanges;
|
|
7003
|
-
exports.wellVariants = wellVariants;
|
|
7004
7452
|
//# sourceMappingURL=index.cjs.map
|