@umami/react-zen 0.250.0 → 0.252.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +46 -5
- package/dist/index.d.ts +46 -5
- package/dist/index.js +661 -566
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +506 -423
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -4
- package/styles.css +224 -179
- package/styles.full.css +1 -1
- package/tailwind.preset.ts +58 -35
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
|
|
2
3
|
import * as lucide_react_star from 'lucide-react';
|
|
3
|
-
import { forwardRef, createContext, isValidElement, cloneElement, Children, useState, useRef, useCallback, useEffect, useContext,
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { forwardRef, createContext, useId, isValidElement, cloneElement, Children, useState, useRef, useCallback, useEffect, useContext, useMemo, Fragment as Fragment$1, createElement, useLayoutEffect } from 'react';
|
|
5
|
+
import { cn } from 'cn';
|
|
6
|
+
export { cn } from 'cn';
|
|
6
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
8
|
import { tv } from 'tailwind-variants';
|
|
8
9
|
import { AlertDialog as AlertDialog$1 } from '@base-ui/react/alert-dialog';
|
|
@@ -11,6 +12,7 @@ import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
|
11
12
|
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
12
13
|
import { Menu as Menu$1 } from '@base-ui/react/menu';
|
|
13
14
|
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
15
|
+
import { Autocomplete as Autocomplete$1 } from '@base-ui/react/autocomplete';
|
|
14
16
|
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
15
17
|
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
16
18
|
import { DayPicker } from 'react-day-picker';
|
|
@@ -23,6 +25,7 @@ import { Select as Select$1 } from '@base-ui/react/select';
|
|
|
23
25
|
import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
|
|
24
26
|
import { Command as Command$1 } from 'cmdk';
|
|
25
27
|
import { ContextMenu as ContextMenu$1 } from '@base-ui/react/context-menu';
|
|
28
|
+
import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
|
|
26
29
|
import { useForm, FormProvider, Controller, useFormContext, useFieldArray } from 'react-hook-form';
|
|
27
30
|
import { create } from 'zustand';
|
|
28
31
|
import { animated, useTransition } from '@react-spring/web';
|
|
@@ -31,6 +34,7 @@ import { Meter as Meter$1 } from '@base-ui/react/meter';
|
|
|
31
34
|
import { NavigationMenu } from '@base-ui/react/navigation-menu';
|
|
32
35
|
import { NumberField as NumberField$1 } from '@base-ui/react/number-field';
|
|
33
36
|
import { OTPField as OTPField$1 } from '@base-ui/react/otp-field';
|
|
37
|
+
import { PreviewCard as PreviewCard$1 } from '@base-ui/react/preview-card';
|
|
34
38
|
import { Progress } from '@base-ui/react/progress';
|
|
35
39
|
import { Radio as Radio$1 } from '@base-ui/react/radio';
|
|
36
40
|
import { RadioGroup as RadioGroup$1 } from '@base-ui/react/radio-group';
|
|
@@ -59,9 +63,6 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
59
63
|
// src/components/icons.tsx
|
|
60
64
|
var icons_exports = {};
|
|
61
65
|
__reExport(icons_exports, lucide_react_star);
|
|
62
|
-
function cn(...inputs) {
|
|
63
|
-
return twMerge(clsx(inputs));
|
|
64
|
-
}
|
|
65
66
|
var paddingMap = {
|
|
66
67
|
"0": "p-0",
|
|
67
68
|
px: "p-px",
|
|
@@ -98,7 +99,7 @@ var paddingMap = {
|
|
|
98
99
|
"72": "p-72",
|
|
99
100
|
"80": "p-80",
|
|
100
101
|
"96": "p-96",
|
|
101
|
-
true: "px-[var(--zen-padding-x
|
|
102
|
+
true: "px-[var(--zen-padding-x)] py-[var(--zen-padding-y)]"
|
|
102
103
|
};
|
|
103
104
|
var pxMap = {
|
|
104
105
|
"0": "px-0",
|
|
@@ -136,7 +137,7 @@ var pxMap = {
|
|
|
136
137
|
"72": "px-72",
|
|
137
138
|
"80": "px-80",
|
|
138
139
|
"96": "px-96",
|
|
139
|
-
true: "px-[var(--zen-padding-x
|
|
140
|
+
true: "px-[var(--zen-padding-x)]"
|
|
140
141
|
};
|
|
141
142
|
var pyMap = {
|
|
142
143
|
"0": "py-0",
|
|
@@ -174,7 +175,7 @@ var pyMap = {
|
|
|
174
175
|
"72": "py-72",
|
|
175
176
|
"80": "py-80",
|
|
176
177
|
"96": "py-96",
|
|
177
|
-
true: "py-[var(--zen-padding-y
|
|
178
|
+
true: "py-[var(--zen-padding-y)]"
|
|
178
179
|
};
|
|
179
180
|
var ptMap = {
|
|
180
181
|
"0": "pt-0",
|
|
@@ -647,7 +648,7 @@ var gapMap = {
|
|
|
647
648
|
"72": "gap-72",
|
|
648
649
|
"80": "gap-80",
|
|
649
650
|
"96": "gap-96",
|
|
650
|
-
true: "gap-[var(--zen-gap
|
|
651
|
+
true: "gap-[var(--zen-gap)]"
|
|
651
652
|
};
|
|
652
653
|
var gapXMap = {
|
|
653
654
|
"0": "gap-x-0",
|
|
@@ -674,7 +675,7 @@ var gapXMap = {
|
|
|
674
675
|
"24": "gap-x-24",
|
|
675
676
|
"28": "gap-x-28",
|
|
676
677
|
"32": "gap-x-32",
|
|
677
|
-
true: "gap-x-[var(--zen-gap
|
|
678
|
+
true: "gap-x-[var(--zen-gap)]"
|
|
678
679
|
};
|
|
679
680
|
var gapYMap = {
|
|
680
681
|
"0": "gap-y-0",
|
|
@@ -701,7 +702,7 @@ var gapYMap = {
|
|
|
701
702
|
"24": "gap-y-24",
|
|
702
703
|
"28": "gap-y-28",
|
|
703
704
|
"32": "gap-y-32",
|
|
704
|
-
true: "gap-y-[var(--zen-gap
|
|
705
|
+
true: "gap-y-[var(--zen-gap)]"
|
|
705
706
|
};
|
|
706
707
|
var spaceXMap = {
|
|
707
708
|
"0": "space-x-0",
|
|
@@ -778,33 +779,33 @@ var spaceYMap = {
|
|
|
778
779
|
"96": "space-y-96"
|
|
779
780
|
};
|
|
780
781
|
var fontSizeMap = {
|
|
781
|
-
xs: "text-
|
|
782
|
-
sm: "text-
|
|
783
|
-
base: "text-
|
|
784
|
-
lg: "text-
|
|
785
|
-
xl: "text-
|
|
786
|
-
"2xl": "text-
|
|
787
|
-
"3xl": "text-
|
|
788
|
-
"4xl": "text-
|
|
789
|
-
"5xl": "text-
|
|
790
|
-
"6xl": "text-
|
|
791
|
-
"7xl": "text-
|
|
792
|
-
"8xl": "text-
|
|
793
|
-
"9xl": "text-
|
|
782
|
+
xs: "text-xs",
|
|
783
|
+
sm: "text-sm",
|
|
784
|
+
base: "text-base",
|
|
785
|
+
lg: "text-lg",
|
|
786
|
+
xl: "text-xl",
|
|
787
|
+
"2xl": "text-2xl",
|
|
788
|
+
"3xl": "text-3xl",
|
|
789
|
+
"4xl": "text-4xl",
|
|
790
|
+
"5xl": "text-5xl",
|
|
791
|
+
"6xl": "text-6xl",
|
|
792
|
+
"7xl": "text-7xl",
|
|
793
|
+
"8xl": "text-8xl",
|
|
794
|
+
"9xl": "text-9xl"
|
|
794
795
|
};
|
|
795
796
|
var headingSizeMap = {
|
|
796
|
-
sm: "text-
|
|
797
|
-
base: "text-
|
|
798
|
-
lg: "text-
|
|
799
|
-
xl: "text-
|
|
800
|
-
"2xl": "text-
|
|
801
|
-
"3xl": "text-
|
|
802
|
-
"4xl": "text-
|
|
803
|
-
"5xl": "text-
|
|
804
|
-
"6xl": "text-
|
|
805
|
-
"7xl": "text-
|
|
806
|
-
"8xl": "text-
|
|
807
|
-
"9xl": "text-
|
|
797
|
+
sm: "text-sm",
|
|
798
|
+
base: "text-base",
|
|
799
|
+
lg: "text-lg",
|
|
800
|
+
xl: "text-xl",
|
|
801
|
+
"2xl": "text-2xl",
|
|
802
|
+
"3xl": "text-3xl",
|
|
803
|
+
"4xl": "text-4xl",
|
|
804
|
+
"5xl": "text-5xl",
|
|
805
|
+
"6xl": "text-6xl",
|
|
806
|
+
"7xl": "text-7xl",
|
|
807
|
+
"8xl": "text-8xl",
|
|
808
|
+
"9xl": "text-9xl"
|
|
808
809
|
};
|
|
809
810
|
var fontWeightMap = {
|
|
810
811
|
thin: "font-thin",
|
|
@@ -826,7 +827,7 @@ var borderRadiusMap = {
|
|
|
826
827
|
"2xl": "rounded-2xl",
|
|
827
828
|
"3xl": "rounded-3xl",
|
|
828
829
|
full: "rounded-full",
|
|
829
|
-
true: "rounded-[var(--zen-radius
|
|
830
|
+
true: "rounded-[var(--zen-radius)]"
|
|
830
831
|
};
|
|
831
832
|
var borderWidthMap = {
|
|
832
833
|
sm: "border",
|
|
@@ -842,17 +843,17 @@ var shadowMap = {
|
|
|
842
843
|
xl: "shadow-xl",
|
|
843
844
|
"2xl": "shadow-2xl",
|
|
844
845
|
inner: "shadow-inner",
|
|
845
|
-
true: "shadow-[var(--zen-shadow
|
|
846
|
+
true: "shadow-[var(--zen-shadow)]"
|
|
846
847
|
};
|
|
847
848
|
var semanticColorMap = {
|
|
848
|
-
primary: { text: "text-
|
|
849
|
-
muted: { text: "text-
|
|
850
|
-
inverted: { text: "text-surface
|
|
851
|
-
disabled: { text: "text-
|
|
849
|
+
primary: { text: "text-fg", bg: "bg-primary" },
|
|
850
|
+
muted: { text: "text-fg-muted", bg: "bg-surface-raised" },
|
|
851
|
+
inverted: { text: "text-surface", bg: "bg-surface-inverted" },
|
|
852
|
+
disabled: { text: "text-fg-disabled", bg: "bg-surface-disabled" },
|
|
852
853
|
transparent: { text: "text-transparent", bg: "bg-transparent" },
|
|
853
|
-
true: { text: "text-
|
|
854
|
+
true: { text: "text-fg", bg: "bg-interactive" },
|
|
854
855
|
// Surface colors
|
|
855
|
-
|
|
856
|
+
surface: { text: "", bg: "bg-surface" },
|
|
856
857
|
"surface-raised": { text: "", bg: "bg-surface-raised" },
|
|
857
858
|
"surface-sunken": { text: "", bg: "bg-surface-sunken" },
|
|
858
859
|
"surface-overlay": { text: "", bg: "bg-surface-overlay" },
|
|
@@ -1354,9 +1355,9 @@ function mapBorderColor(value) {
|
|
|
1354
1355
|
return "";
|
|
1355
1356
|
}
|
|
1356
1357
|
var semanticCssColorValues = {
|
|
1357
|
-
primary: "var(--zen-
|
|
1358
|
-
muted: "var(--zen-
|
|
1359
|
-
disabled: "var(--zen-
|
|
1358
|
+
primary: "var(--zen-fg)",
|
|
1359
|
+
muted: "var(--zen-fg-muted)",
|
|
1360
|
+
disabled: "var(--zen-fg-disabled)"
|
|
1360
1361
|
};
|
|
1361
1362
|
var tailwindColorHex = {
|
|
1362
1363
|
gray: {
|
|
@@ -2134,7 +2135,7 @@ function resolveRender(render, props, defaultElement) {
|
|
|
2134
2135
|
}
|
|
2135
2136
|
function Text({
|
|
2136
2137
|
color,
|
|
2137
|
-
size = "
|
|
2138
|
+
size = "sm",
|
|
2138
2139
|
weight,
|
|
2139
2140
|
align,
|
|
2140
2141
|
spacing,
|
|
@@ -2207,10 +2208,7 @@ function Accordion({
|
|
|
2207
2208
|
value: expandedKeys ? Array.from(expandedKeys) : void 0,
|
|
2208
2209
|
defaultValue: defaultExpandedKeys ? Array.from(defaultExpandedKeys) : void 0,
|
|
2209
2210
|
onValueChange: (value) => onExpandedChange?.(new Set(value)),
|
|
2210
|
-
className: cn(
|
|
2211
|
-
"flex flex-col items-start w-full gap-2 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
|
|
2212
|
-
className
|
|
2213
|
-
),
|
|
2211
|
+
className: cn("flex flex-col items-start w-full gap-2 text-sm", className),
|
|
2214
2212
|
children
|
|
2215
2213
|
}
|
|
2216
2214
|
);
|
|
@@ -2246,33 +2244,33 @@ var button = tv({
|
|
|
2246
2244
|
"inline-flex items-center justify-center gap-3 whitespace-nowrap",
|
|
2247
2245
|
"font-medium rounded border border-transparent cursor-pointer",
|
|
2248
2246
|
"transition-colors leading-normal relative no-underline",
|
|
2249
|
-
"outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface
|
|
2247
|
+
"outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface"
|
|
2250
2248
|
],
|
|
2251
2249
|
variants: {
|
|
2252
2250
|
variant: {
|
|
2253
2251
|
default: [
|
|
2254
|
-
"bg-interactive text-
|
|
2252
|
+
"bg-interactive text-fg",
|
|
2255
2253
|
"hover:bg-interactive-hover",
|
|
2256
2254
|
"pressed:bg-interactive-pressed",
|
|
2257
|
-
"disabled:text-
|
|
2255
|
+
"disabled:text-fg-disabled"
|
|
2258
2256
|
],
|
|
2259
2257
|
primary: [
|
|
2260
|
-
"bg-primary text-primary-
|
|
2258
|
+
"bg-primary text-primary-fg",
|
|
2261
2259
|
"hover:opacity-90",
|
|
2262
2260
|
"pressed:opacity-80",
|
|
2263
2261
|
"disabled:opacity-50"
|
|
2264
2262
|
],
|
|
2265
2263
|
outline: [
|
|
2266
|
-
"bg-surface
|
|
2264
|
+
"bg-surface border-edge shadow-sm text-fg",
|
|
2267
2265
|
"hover:border-edge-strong",
|
|
2268
2266
|
"pressed:bg-surface-raised",
|
|
2269
|
-
"disabled:bg-surface-disabled disabled:text-
|
|
2267
|
+
"disabled:bg-surface-disabled disabled:text-fg-disabled"
|
|
2270
2268
|
],
|
|
2271
2269
|
quiet: [
|
|
2272
2270
|
"bg-transparent",
|
|
2273
2271
|
"hover:bg-interactive",
|
|
2274
2272
|
"pressed:bg-interactive-hover",
|
|
2275
|
-
"disabled:text-
|
|
2273
|
+
"disabled:text-fg-disabled"
|
|
2276
2274
|
],
|
|
2277
2275
|
danger: [
|
|
2278
2276
|
"bg-status-error text-white",
|
|
@@ -2284,15 +2282,15 @@ var button = tv({
|
|
|
2284
2282
|
"bg-transparent border-0",
|
|
2285
2283
|
"hover:bg-transparent",
|
|
2286
2284
|
"pressed:bg-transparent",
|
|
2287
|
-
"disabled:text-
|
|
2285
|
+
"disabled:text-fg-disabled"
|
|
2288
2286
|
]
|
|
2289
2287
|
},
|
|
2290
2288
|
size: {
|
|
2291
|
-
xs: "text-
|
|
2292
|
-
sm: "text-
|
|
2293
|
-
md: "text-
|
|
2294
|
-
lg: "text-
|
|
2295
|
-
xl: "text-
|
|
2289
|
+
xs: "text-xs py-1 px-2",
|
|
2290
|
+
sm: "text-sm py-1.5 px-2.5",
|
|
2291
|
+
md: "text-sm py-2 px-3",
|
|
2292
|
+
lg: "text-base py-2.5 px-4",
|
|
2293
|
+
xl: "text-lg py-3 px-5"
|
|
2296
2294
|
}
|
|
2297
2295
|
},
|
|
2298
2296
|
defaultVariants: {
|
|
@@ -2303,8 +2301,8 @@ var button = tv({
|
|
|
2303
2301
|
var inputField = tv({
|
|
2304
2302
|
base: [
|
|
2305
2303
|
"relative flex items-center",
|
|
2306
|
-
"text-
|
|
2307
|
-
"leading-6 text-
|
|
2304
|
+
"text-sm rounded border border-edge bg-surface shadow-sm",
|
|
2305
|
+
"leading-6 text-fg transition-colors",
|
|
2308
2306
|
"focus-within:border-edge-strong",
|
|
2309
2307
|
"has-[input:read-only]:bg-surface-raised has-[textarea:read-only]:bg-surface-raised",
|
|
2310
2308
|
"has-[:disabled]:bg-surface-disabled has-[:disabled]:opacity-50"
|
|
@@ -2322,13 +2320,13 @@ var inputField = tv({
|
|
|
2322
2320
|
tv({
|
|
2323
2321
|
base: [
|
|
2324
2322
|
"flex items-center justify-between",
|
|
2325
|
-
"gap-3 text-
|
|
2323
|
+
"gap-3 text-sm py-2 px-3 min-w-[120px]",
|
|
2326
2324
|
"cursor-pointer outline-none rounded",
|
|
2327
|
-
"text-
|
|
2325
|
+
"text-fg",
|
|
2328
2326
|
"hovered:bg-interactive",
|
|
2329
2327
|
"focused:bg-interactive",
|
|
2330
2328
|
"focus-visible:bg-interactive",
|
|
2331
|
-
"disabled:text-
|
|
2329
|
+
"disabled:text-fg-disabled disabled:cursor-default",
|
|
2332
2330
|
"selected:font-semibold"
|
|
2333
2331
|
]
|
|
2334
2332
|
});
|
|
@@ -2359,23 +2357,21 @@ tv({
|
|
|
2359
2357
|
}
|
|
2360
2358
|
});
|
|
2361
2359
|
var tooltip = tv({
|
|
2362
|
-
base: [
|
|
2363
|
-
"bg-surface-inverted text-surface-base text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] px-2 py-1 rounded"
|
|
2364
|
-
]
|
|
2360
|
+
base: ["bg-surface-inverted text-surface text-sm px-2 py-1 rounded"]
|
|
2365
2361
|
});
|
|
2366
2362
|
var checkbox = tv({
|
|
2367
2363
|
slots: {
|
|
2368
2364
|
root: [
|
|
2369
2365
|
"group flex items-center gap-3",
|
|
2370
|
-
"text-
|
|
2371
|
-
"disabled:text-
|
|
2366
|
+
"text-sm cursor-pointer",
|
|
2367
|
+
"disabled:text-fg-disabled disabled:cursor-default"
|
|
2372
2368
|
],
|
|
2373
2369
|
box: [
|
|
2374
2370
|
"flex items-center justify-center",
|
|
2375
|
-
"w-5 h-5 rounded border border-edge bg-surface
|
|
2371
|
+
"w-5 h-5 rounded border border-edge bg-surface",
|
|
2376
2372
|
"shadow-sm transition-colors",
|
|
2377
|
-
"group-data-[checked]:bg-primary group-data-[checked]:border-primary group-data-[checked]:text-primary-
|
|
2378
|
-
"group-indeterminate:bg-surface
|
|
2373
|
+
"group-data-[checked]:bg-primary group-data-[checked]:border-primary group-data-[checked]:text-primary-fg",
|
|
2374
|
+
"group-indeterminate:bg-surface group-indeterminate:text-fg",
|
|
2379
2375
|
"group-disabled:bg-surface-disabled",
|
|
2380
2376
|
"group-focus-visible:ring-2 group-focus-visible:ring-focus-ring group-focus-visible:ring-offset-1"
|
|
2381
2377
|
],
|
|
@@ -2391,7 +2387,7 @@ var switchVariant = tv({
|
|
|
2391
2387
|
slots: {
|
|
2392
2388
|
root: [
|
|
2393
2389
|
"group flex items-center gap-3",
|
|
2394
|
-
"text-
|
|
2390
|
+
"text-sm cursor-pointer",
|
|
2395
2391
|
"disabled:opacity-50 disabled:cursor-default"
|
|
2396
2392
|
],
|
|
2397
2393
|
track: [
|
|
@@ -2403,7 +2399,7 @@ var switchVariant = tv({
|
|
|
2403
2399
|
],
|
|
2404
2400
|
thumb: [
|
|
2405
2401
|
"w-4 h-4 rounded-full",
|
|
2406
|
-
"bg-surface
|
|
2402
|
+
"bg-surface shadow-sm",
|
|
2407
2403
|
"transition-transform",
|
|
2408
2404
|
"group-data-[checked]:translate-x-4"
|
|
2409
2405
|
]
|
|
@@ -2414,34 +2410,34 @@ tv({
|
|
|
2414
2410
|
root: "flex flex-col",
|
|
2415
2411
|
list: ["flex gap-1 border-b border-edge-muted"],
|
|
2416
2412
|
tab: [
|
|
2417
|
-
"px-4 py-2 text-
|
|
2418
|
-
"text-
|
|
2413
|
+
"px-4 py-2 text-sm font-medium cursor-pointer",
|
|
2414
|
+
"text-fg-muted outline-none",
|
|
2419
2415
|
"border-b-2 border-transparent -mb-px",
|
|
2420
|
-
"hovered:text-
|
|
2421
|
-
"selected:text-
|
|
2422
|
-
"disabled:text-
|
|
2416
|
+
"hovered:text-fg",
|
|
2417
|
+
"selected:text-fg selected:border-primary",
|
|
2418
|
+
"disabled:text-fg-disabled disabled:cursor-default",
|
|
2423
2419
|
"focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2"
|
|
2424
2420
|
],
|
|
2425
2421
|
panel: "py-4"
|
|
2426
2422
|
}
|
|
2427
2423
|
});
|
|
2428
2424
|
tv({
|
|
2429
|
-
base: "text-
|
|
2425
|
+
base: "text-fg",
|
|
2430
2426
|
variants: {
|
|
2431
2427
|
size: {
|
|
2432
|
-
xs: "text-
|
|
2433
|
-
sm: "text-
|
|
2434
|
-
base: "text-
|
|
2435
|
-
lg: "text-
|
|
2436
|
-
xl: "text-
|
|
2437
|
-
"2xl": "text-
|
|
2438
|
-
"3xl": "text-
|
|
2439
|
-
"4xl": "text-
|
|
2428
|
+
xs: "text-xs",
|
|
2429
|
+
sm: "text-sm",
|
|
2430
|
+
base: "text-base",
|
|
2431
|
+
lg: "text-lg",
|
|
2432
|
+
xl: "text-xl",
|
|
2433
|
+
"2xl": "text-2xl",
|
|
2434
|
+
"3xl": "text-3xl",
|
|
2435
|
+
"4xl": "text-4xl"
|
|
2440
2436
|
},
|
|
2441
2437
|
color: {
|
|
2442
2438
|
default: "",
|
|
2443
|
-
muted: "text-
|
|
2444
|
-
disabled: "text-
|
|
2439
|
+
muted: "text-fg-muted",
|
|
2440
|
+
disabled: "text-fg-disabled"
|
|
2445
2441
|
},
|
|
2446
2442
|
weight: {
|
|
2447
2443
|
thin: "font-thin",
|
|
@@ -2460,18 +2456,18 @@ tv({
|
|
|
2460
2456
|
}
|
|
2461
2457
|
});
|
|
2462
2458
|
tv({
|
|
2463
|
-
base: "font-semibold text-
|
|
2459
|
+
base: "font-semibold text-fg",
|
|
2464
2460
|
variants: {
|
|
2465
2461
|
size: {
|
|
2466
|
-
sm: "text-
|
|
2467
|
-
base: "text-
|
|
2468
|
-
lg: "text-
|
|
2469
|
-
xl: "text-
|
|
2470
|
-
"2xl": "text-
|
|
2471
|
-
"3xl": "text-
|
|
2472
|
-
"4xl": "text-
|
|
2473
|
-
"5xl": "text-
|
|
2474
|
-
"6xl": "text-
|
|
2462
|
+
sm: "text-sm",
|
|
2463
|
+
base: "text-base",
|
|
2464
|
+
lg: "text-lg",
|
|
2465
|
+
xl: "text-xl",
|
|
2466
|
+
"2xl": "text-2xl",
|
|
2467
|
+
"3xl": "text-3xl",
|
|
2468
|
+
"4xl": "text-4xl",
|
|
2469
|
+
"5xl": "text-5xl",
|
|
2470
|
+
"6xl": "text-6xl"
|
|
2475
2471
|
}
|
|
2476
2472
|
},
|
|
2477
2473
|
defaultVariants: {
|
|
@@ -2480,15 +2476,15 @@ tv({
|
|
|
2480
2476
|
});
|
|
2481
2477
|
var alert = tv({
|
|
2482
2478
|
base: [
|
|
2483
|
-
"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border border-edge-muted px-4 py-3 text-
|
|
2479
|
+
"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border border-edge-muted px-4 py-3 text-sm",
|
|
2484
2480
|
"has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3",
|
|
2485
2481
|
"[&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current"
|
|
2486
2482
|
],
|
|
2487
2483
|
variants: {
|
|
2488
2484
|
variant: {
|
|
2489
|
-
default: "bg-surface
|
|
2485
|
+
default: "bg-surface text-fg",
|
|
2490
2486
|
danger: [
|
|
2491
|
-
"border-status-error bg-surface
|
|
2487
|
+
"border-status-error bg-surface text-status-error",
|
|
2492
2488
|
"*:data-[slot=alert-description]:text-status-error/90"
|
|
2493
2489
|
]
|
|
2494
2490
|
}
|
|
@@ -2502,7 +2498,7 @@ var emptyMedia = tv({
|
|
|
2502
2498
|
variants: {
|
|
2503
2499
|
variant: {
|
|
2504
2500
|
default: "bg-transparent",
|
|
2505
|
-
icon: "bg-surface-raised text-
|
|
2501
|
+
icon: "bg-surface-raised text-fg flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
|
|
2506
2502
|
}
|
|
2507
2503
|
},
|
|
2508
2504
|
defaultVariants: {
|
|
@@ -2513,7 +2509,7 @@ tv({
|
|
|
2513
2509
|
base: "inline-flex items-center gap-2",
|
|
2514
2510
|
slots: {
|
|
2515
2511
|
dot: "w-2 h-2 rounded-full",
|
|
2516
|
-
label: "text-
|
|
2512
|
+
label: "text-sm"
|
|
2517
2513
|
},
|
|
2518
2514
|
variants: {
|
|
2519
2515
|
color: {
|
|
@@ -2533,13 +2529,13 @@ var toast = tv({
|
|
|
2533
2529
|
"flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg",
|
|
2534
2530
|
"bg-surface-overlay",
|
|
2535
2531
|
"border border-edge-muted",
|
|
2536
|
-
"text-
|
|
2532
|
+
"text-sm"
|
|
2537
2533
|
],
|
|
2538
2534
|
variants: {
|
|
2539
2535
|
variant: {
|
|
2540
2536
|
default: "",
|
|
2541
|
-
success: "bg-status-success-bg text-status-success-
|
|
2542
|
-
error: "bg-status-error-bg text-status-error-
|
|
2537
|
+
success: "bg-status-success-bg text-status-success-fg",
|
|
2538
|
+
error: "bg-status-error-bg text-status-error-fg"
|
|
2543
2539
|
}
|
|
2544
2540
|
}
|
|
2545
2541
|
});
|
|
@@ -2550,13 +2546,13 @@ var badge = tv({
|
|
|
2550
2546
|
],
|
|
2551
2547
|
variants: {
|
|
2552
2548
|
variant: {
|
|
2553
|
-
default: "bg-interactive text-
|
|
2554
|
-
primary: "bg-primary text-primary-
|
|
2555
|
-
outline: "bg-transparent border-edge text-
|
|
2556
|
-
success: "bg-status-success-bg text-status-success-
|
|
2557
|
-
warning: "bg-status-warning-bg text-status-warning-
|
|
2558
|
-
error: "bg-status-error-bg text-status-error-
|
|
2559
|
-
info: "bg-status-info-bg text-status-info-
|
|
2549
|
+
default: "bg-interactive text-fg",
|
|
2550
|
+
primary: "bg-primary text-primary-fg",
|
|
2551
|
+
outline: "bg-transparent border-edge text-fg",
|
|
2552
|
+
success: "bg-status-success-bg text-status-success-fg",
|
|
2553
|
+
warning: "bg-status-warning-bg text-status-warning-fg",
|
|
2554
|
+
error: "bg-status-error-bg text-status-error-fg",
|
|
2555
|
+
info: "bg-status-info-bg text-status-info-fg",
|
|
2560
2556
|
// Tailwind base color palette (soft tint + readable text, dark-mode aware)
|
|
2561
2557
|
slate: "bg-slate-50 text-slate-900 dark:bg-slate-500/20 dark:text-slate-100",
|
|
2562
2558
|
gray: "bg-gray-50 text-gray-900 dark:bg-gray-500/20 dark:text-gray-100",
|
|
@@ -2582,8 +2578,8 @@ var badge = tv({
|
|
|
2582
2578
|
rose: "bg-rose-50 text-rose-900 dark:bg-rose-500/20 dark:text-rose-100"
|
|
2583
2579
|
},
|
|
2584
2580
|
size: {
|
|
2585
|
-
sm: "text-
|
|
2586
|
-
md: "text-
|
|
2581
|
+
sm: "text-xs px-2 py-0.5",
|
|
2582
|
+
md: "text-sm px-2.5 py-0.5"
|
|
2587
2583
|
}
|
|
2588
2584
|
},
|
|
2589
2585
|
defaultVariants: {
|
|
@@ -2598,32 +2594,29 @@ var avatar = tv({
|
|
|
2598
2594
|
"overflow-hidden rounded-full align-middle bg-interactive"
|
|
2599
2595
|
],
|
|
2600
2596
|
image: "size-full object-cover",
|
|
2601
|
-
fallback: [
|
|
2602
|
-
"flex size-full items-center justify-center",
|
|
2603
|
-
"font-medium text-foreground-primary uppercase"
|
|
2604
|
-
]
|
|
2597
|
+
fallback: ["flex size-full items-center justify-center", "font-medium text-fg uppercase"]
|
|
2605
2598
|
},
|
|
2606
2599
|
variants: {
|
|
2607
2600
|
size: {
|
|
2608
2601
|
xs: {
|
|
2609
2602
|
root: "size-6",
|
|
2610
|
-
fallback: "text-
|
|
2603
|
+
fallback: "text-xs"
|
|
2611
2604
|
},
|
|
2612
2605
|
sm: {
|
|
2613
2606
|
root: "size-8",
|
|
2614
|
-
fallback: "text-
|
|
2607
|
+
fallback: "text-sm"
|
|
2615
2608
|
},
|
|
2616
2609
|
md: {
|
|
2617
2610
|
root: "size-10",
|
|
2618
|
-
fallback: "text-
|
|
2611
|
+
fallback: "text-sm"
|
|
2619
2612
|
},
|
|
2620
2613
|
lg: {
|
|
2621
2614
|
root: "size-12",
|
|
2622
|
-
fallback: "text-
|
|
2615
|
+
fallback: "text-lg"
|
|
2623
2616
|
},
|
|
2624
2617
|
xl: {
|
|
2625
2618
|
root: "size-16",
|
|
2626
|
-
fallback: "text-
|
|
2619
|
+
fallback: "text-xl"
|
|
2627
2620
|
}
|
|
2628
2621
|
}
|
|
2629
2622
|
},
|
|
@@ -2634,7 +2627,7 @@ var avatar = tv({
|
|
|
2634
2627
|
var tag = tv({
|
|
2635
2628
|
slots: {
|
|
2636
2629
|
base: [
|
|
2637
|
-
"inline-flex items-center gap-1 px-2 py-0.5 rounded text-
|
|
2630
|
+
"inline-flex items-center gap-1 px-2 py-0.5 rounded text-sm",
|
|
2638
2631
|
"cursor-default outline-none",
|
|
2639
2632
|
"focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-1"
|
|
2640
2633
|
],
|
|
@@ -2648,13 +2641,13 @@ var tag = tv({
|
|
|
2648
2641
|
variants: {
|
|
2649
2642
|
variant: {
|
|
2650
2643
|
default: {
|
|
2651
|
-
base: "bg-interactive text-
|
|
2644
|
+
base: "bg-interactive text-fg"
|
|
2652
2645
|
},
|
|
2653
2646
|
outline: {
|
|
2654
|
-
base: "bg-transparent border border-edge text-
|
|
2647
|
+
base: "bg-transparent border border-edge text-fg"
|
|
2655
2648
|
},
|
|
2656
2649
|
primary: {
|
|
2657
|
-
base: "bg-primary text-primary-
|
|
2650
|
+
base: "bg-primary text-primary-fg"
|
|
2658
2651
|
}
|
|
2659
2652
|
}
|
|
2660
2653
|
},
|
|
@@ -2695,7 +2688,7 @@ var AlertDescription = forwardRef(
|
|
|
2695
2688
|
ref,
|
|
2696
2689
|
"data-slot": "alert-description",
|
|
2697
2690
|
className: cn(
|
|
2698
|
-
"col-start-2 grid justify-items-start gap-1 text-
|
|
2691
|
+
"col-start-2 grid justify-items-start gap-1 text-sm text-fg-muted [&_p]:leading-relaxed",
|
|
2699
2692
|
className
|
|
2700
2693
|
)
|
|
2701
2694
|
}
|
|
@@ -3148,7 +3141,7 @@ function Dialog({ title, children, className, ...props }) {
|
|
|
3148
3141
|
{
|
|
3149
3142
|
...props,
|
|
3150
3143
|
className: cn(
|
|
3151
|
-
"p-6 shadow-xl bg-surface
|
|
3144
|
+
"p-6 shadow-xl bg-surface border border-edge rounded relative outline-none overflow-auto",
|
|
3152
3145
|
className
|
|
3153
3146
|
),
|
|
3154
3147
|
children: /* @__PURE__ */ jsxs(Column, { height: "100%", gap: true, children: [
|
|
@@ -3214,6 +3207,204 @@ function AspectRatio({ ratio = 1, className, style, children, ...props }) {
|
|
|
3214
3207
|
}
|
|
3215
3208
|
);
|
|
3216
3209
|
}
|
|
3210
|
+
var InputGroup = forwardRef(
|
|
3211
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3212
|
+
"div",
|
|
3213
|
+
{
|
|
3214
|
+
...props,
|
|
3215
|
+
ref,
|
|
3216
|
+
"data-slot": "input-group",
|
|
3217
|
+
role: props.role ?? "group",
|
|
3218
|
+
className: inputField({
|
|
3219
|
+
variant,
|
|
3220
|
+
className: cn(
|
|
3221
|
+
"group/input-group w-full min-w-0 gap-0 p-0",
|
|
3222
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col",
|
|
3223
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col",
|
|
3224
|
+
"has-[>textarea]:h-auto",
|
|
3225
|
+
className
|
|
3226
|
+
)
|
|
3227
|
+
})
|
|
3228
|
+
}
|
|
3229
|
+
)
|
|
3230
|
+
);
|
|
3231
|
+
InputGroup.displayName = "InputGroup";
|
|
3232
|
+
var addonClasses = {
|
|
3233
|
+
// Inline addons must not add vertical padding around their buttons; the
|
|
3234
|
+
// input's padding determines the height of a single-line control.
|
|
3235
|
+
"inline-start": "order-first ps-3 py-0",
|
|
3236
|
+
"inline-end": "order-last pe-3 py-0",
|
|
3237
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 pb-2",
|
|
3238
|
+
"block-end": "order-last w-full justify-start px-3 pt-2 pb-3"
|
|
3239
|
+
};
|
|
3240
|
+
var InputGroupAddon = forwardRef(
|
|
3241
|
+
({ align = "inline-start", className, onClick, ...props }, ref) => {
|
|
3242
|
+
const handleClick = (event) => {
|
|
3243
|
+
onClick?.(event);
|
|
3244
|
+
if (event.defaultPrevented || event.target.closest("button")) {
|
|
3245
|
+
return;
|
|
3246
|
+
}
|
|
3247
|
+
event.currentTarget.parentElement?.querySelector('[data-slot="input-group-control"]')?.focus();
|
|
3248
|
+
};
|
|
3249
|
+
return /* @__PURE__ */ jsx(
|
|
3250
|
+
"div",
|
|
3251
|
+
{
|
|
3252
|
+
...props,
|
|
3253
|
+
ref,
|
|
3254
|
+
role: props.role ?? "group",
|
|
3255
|
+
"data-slot": "input-group-addon",
|
|
3256
|
+
"data-align": align,
|
|
3257
|
+
className: cn(
|
|
3258
|
+
"flex h-auto shrink-0 cursor-text items-center justify-center gap-2 text-sm text-fg-muted",
|
|
3259
|
+
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
3260
|
+
addonClasses[align],
|
|
3261
|
+
className
|
|
3262
|
+
),
|
|
3263
|
+
onClick: handleClick
|
|
3264
|
+
}
|
|
3265
|
+
);
|
|
3266
|
+
}
|
|
3267
|
+
);
|
|
3268
|
+
InputGroupAddon.displayName = "InputGroupAddon";
|
|
3269
|
+
var buttonSizeClasses = {
|
|
3270
|
+
xs: "h-6 gap-1 rounded px-1.5 py-0 text-sm",
|
|
3271
|
+
sm: "h-8 gap-2 rounded px-2 py-0 text-sm",
|
|
3272
|
+
"icon-xs": "size-6 rounded p-0",
|
|
3273
|
+
"icon-sm": "size-8 rounded p-0"
|
|
3274
|
+
};
|
|
3275
|
+
var InputGroupButton = forwardRef(
|
|
3276
|
+
({ className, size = "xs", type = "button", variant = "quiet", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3277
|
+
Button,
|
|
3278
|
+
{
|
|
3279
|
+
...props,
|
|
3280
|
+
ref,
|
|
3281
|
+
type,
|
|
3282
|
+
variant,
|
|
3283
|
+
size: "xs",
|
|
3284
|
+
"data-size": size,
|
|
3285
|
+
className: cn(
|
|
3286
|
+
"shrink-0 shadow-none",
|
|
3287
|
+
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
3288
|
+
buttonSizeClasses[size],
|
|
3289
|
+
className
|
|
3290
|
+
)
|
|
3291
|
+
}
|
|
3292
|
+
)
|
|
3293
|
+
);
|
|
3294
|
+
InputGroupButton.displayName = "InputGroupButton";
|
|
3295
|
+
var InputGroupText = forwardRef(
|
|
3296
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3297
|
+
"span",
|
|
3298
|
+
{
|
|
3299
|
+
...props,
|
|
3300
|
+
ref,
|
|
3301
|
+
"data-slot": "input-group-text",
|
|
3302
|
+
className: cn(
|
|
3303
|
+
"flex items-center gap-2 text-sm text-fg-muted [&_svg]:pointer-events-none [&_svg]:size-4",
|
|
3304
|
+
className
|
|
3305
|
+
)
|
|
3306
|
+
}
|
|
3307
|
+
)
|
|
3308
|
+
);
|
|
3309
|
+
InputGroupText.displayName = "InputGroupText";
|
|
3310
|
+
var InputGroupInput = forwardRef(
|
|
3311
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3312
|
+
"input",
|
|
3313
|
+
{
|
|
3314
|
+
...props,
|
|
3315
|
+
ref,
|
|
3316
|
+
"data-slot": "input-group-control",
|
|
3317
|
+
className: cn(
|
|
3318
|
+
"min-w-0 flex-1 bg-transparent px-3 py-2 text-sm outline-none placeholder:text-fg-muted disabled:cursor-not-allowed",
|
|
3319
|
+
className
|
|
3320
|
+
)
|
|
3321
|
+
}
|
|
3322
|
+
)
|
|
3323
|
+
);
|
|
3324
|
+
InputGroupInput.displayName = "InputGroupInput";
|
|
3325
|
+
var InputGroupTextarea = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3326
|
+
"textarea",
|
|
3327
|
+
{
|
|
3328
|
+
...props,
|
|
3329
|
+
ref,
|
|
3330
|
+
"data-slot": "input-group-control",
|
|
3331
|
+
className: cn(
|
|
3332
|
+
"min-w-0 w-full flex-1 bg-transparent p-3 text-sm outline-none placeholder:text-fg-muted disabled:cursor-not-allowed",
|
|
3333
|
+
className
|
|
3334
|
+
)
|
|
3335
|
+
}
|
|
3336
|
+
));
|
|
3337
|
+
InputGroupTextarea.displayName = "InputGroupTextarea";
|
|
3338
|
+
var Autocomplete = forwardRef(
|
|
3339
|
+
({
|
|
3340
|
+
items,
|
|
3341
|
+
label,
|
|
3342
|
+
placeholder,
|
|
3343
|
+
isDisabled,
|
|
3344
|
+
disabled,
|
|
3345
|
+
onChange,
|
|
3346
|
+
onValueChange,
|
|
3347
|
+
className,
|
|
3348
|
+
inputProps,
|
|
3349
|
+
positionerProps,
|
|
3350
|
+
renderItem,
|
|
3351
|
+
emptyMessage = "No suggestions found.",
|
|
3352
|
+
...props
|
|
3353
|
+
}, ref) => {
|
|
3354
|
+
const generatedId = useId();
|
|
3355
|
+
const inputId = inputProps?.id ?? generatedId;
|
|
3356
|
+
return /* @__PURE__ */ jsx(
|
|
3357
|
+
Autocomplete$1.Root,
|
|
3358
|
+
{
|
|
3359
|
+
...props,
|
|
3360
|
+
items,
|
|
3361
|
+
disabled: isDisabled ?? disabled,
|
|
3362
|
+
onValueChange: (value, details) => {
|
|
3363
|
+
onValueChange?.(value, details);
|
|
3364
|
+
if (!details.isCanceled) onChange?.(value);
|
|
3365
|
+
},
|
|
3366
|
+
children: /* @__PURE__ */ jsxs("div", { className: cn("relative flex flex-col gap-1", className), children: [
|
|
3367
|
+
label && /* @__PURE__ */ jsx("label", { htmlFor: inputId, className: "text-sm font-semibold", children: label }),
|
|
3368
|
+
/* @__PURE__ */ jsx(InputGroup, { children: /* @__PURE__ */ jsx(
|
|
3369
|
+
Autocomplete$1.Input,
|
|
3370
|
+
{
|
|
3371
|
+
placeholder,
|
|
3372
|
+
...inputProps,
|
|
3373
|
+
id: inputId,
|
|
3374
|
+
ref,
|
|
3375
|
+
render: /* @__PURE__ */ jsx(InputGroupInput, { className: "text-sm" })
|
|
3376
|
+
}
|
|
3377
|
+
) }),
|
|
3378
|
+
/* @__PURE__ */ jsx(Autocomplete$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
3379
|
+
Autocomplete$1.Positioner,
|
|
3380
|
+
{
|
|
3381
|
+
align: "start",
|
|
3382
|
+
sideOffset: 4,
|
|
3383
|
+
...positionerProps,
|
|
3384
|
+
className: (state) => cn(
|
|
3385
|
+
"zen-layer-floating",
|
|
3386
|
+
typeof positionerProps?.className === "function" ? positionerProps.className(state) : positionerProps?.className
|
|
3387
|
+
),
|
|
3388
|
+
children: /* @__PURE__ */ jsxs(Autocomplete$1.Popup, { className: "zen-popover w-[var(--anchor-width)] max-w-[var(--available-width)] max-h-[min(23rem,var(--available-height))] overflow-auto rounded-md border border-edge bg-surface-overlay p-2 text-fg shadow-lg outline-none", children: [
|
|
3389
|
+
/* @__PURE__ */ jsx(Autocomplete$1.List, { children: (item) => /* @__PURE__ */ jsx(
|
|
3390
|
+
Autocomplete$1.Item,
|
|
3391
|
+
{
|
|
3392
|
+
value: item,
|
|
3393
|
+
className: "cursor-default rounded px-3 py-2 text-sm outline-none data-[highlighted]:bg-interactive",
|
|
3394
|
+
children: renderItem ? renderItem(item) : item
|
|
3395
|
+
},
|
|
3396
|
+
item
|
|
3397
|
+
) }),
|
|
3398
|
+
/* @__PURE__ */ jsx(Autocomplete$1.Empty, { children: /* @__PURE__ */ jsx("div", { className: "px-3 py-4 text-center text-sm text-fg-muted", children: emptyMessage }) })
|
|
3399
|
+
] })
|
|
3400
|
+
}
|
|
3401
|
+
) })
|
|
3402
|
+
] })
|
|
3403
|
+
}
|
|
3404
|
+
);
|
|
3405
|
+
}
|
|
3406
|
+
);
|
|
3407
|
+
Autocomplete.displayName = "Autocomplete";
|
|
3217
3408
|
function getInitials(name) {
|
|
3218
3409
|
if (!name) {
|
|
3219
3410
|
return null;
|
|
@@ -3252,15 +3443,15 @@ function Breadcrumb({ children, className, isDisabled, ...props }) {
|
|
|
3252
3443
|
...props,
|
|
3253
3444
|
"aria-disabled": isDisabled || void 0,
|
|
3254
3445
|
className: cn(
|
|
3255
|
-
"flex items-center text-
|
|
3256
|
-
"[&_a]:text-
|
|
3257
|
-
"[&_a:hover]:text-
|
|
3446
|
+
"flex items-center text-sm gap-3 list-none",
|
|
3447
|
+
"[&_a]:text-fg-muted [&_a]:no-underline [&_a]:font-normal",
|
|
3448
|
+
"[&_a:hover]:text-fg",
|
|
3258
3449
|
"last:[&>span]:hidden",
|
|
3259
3450
|
className
|
|
3260
3451
|
),
|
|
3261
3452
|
children: [
|
|
3262
3453
|
children,
|
|
3263
|
-
/* @__PURE__ */ jsx(Icon, { className: "text-
|
|
3454
|
+
/* @__PURE__ */ jsx(Icon, { className: "text-fg-muted", size: "xs", children: /* @__PURE__ */ jsx(icons_exports.ChevronRight, {}) })
|
|
3264
3455
|
]
|
|
3265
3456
|
}
|
|
3266
3457
|
);
|
|
@@ -3309,7 +3500,7 @@ function ButtonGroup({ className, orientation = "horizontal", ...props }) {
|
|
|
3309
3500
|
}
|
|
3310
3501
|
function ButtonGroupText({ className, render, children, ...props }) {
|
|
3311
3502
|
const classes = cn(
|
|
3312
|
-
"flex items-center gap-2 rounded border border-edge bg-surface-raised px-4 text-
|
|
3503
|
+
"flex items-center gap-2 rounded border border-edge bg-surface-raised px-4 text-sm font-medium shadow-sm",
|
|
3313
3504
|
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
3314
3505
|
className
|
|
3315
3506
|
);
|
|
@@ -3374,7 +3565,7 @@ function Calendar({
|
|
|
3374
3565
|
}
|
|
3375
3566
|
},
|
|
3376
3567
|
className: cn(
|
|
3377
|
-
"w-fit max-w-full text-
|
|
3568
|
+
"w-fit max-w-full text-sm",
|
|
3378
3569
|
// The month grid is a real <table>; host prose styles (docs sites,
|
|
3379
3570
|
// CMS themes) often style table/th/td with borders, padding, and
|
|
3380
3571
|
// width. Reset them at matching specificity so zen styles hold.
|
|
@@ -3398,9 +3589,9 @@ function Calendar({
|
|
|
3398
3589
|
week: "flex mt-1",
|
|
3399
3590
|
day: "size-12 text-center",
|
|
3400
3591
|
day_button: "size-12 rounded cursor-pointer outline-none hover:bg-interactive focus-visible:outline-2 focus-visible:outline-focus-ring focus-visible:outline-offset-2",
|
|
3401
|
-
selected: "[&>button]:text-primary-
|
|
3592
|
+
selected: "[&>button]:text-primary-fg [&>button]:bg-primary [&>button:hover]:bg-primary",
|
|
3402
3593
|
outside: "invisible",
|
|
3403
|
-
disabled: "text-
|
|
3594
|
+
disabled: "text-fg-disabled pointer-events-none opacity-50",
|
|
3404
3595
|
today: "[&>button]:font-bold"
|
|
3405
3596
|
},
|
|
3406
3597
|
components: {
|
|
@@ -3585,7 +3776,7 @@ function Checkbox({
|
|
|
3585
3776
|
);
|
|
3586
3777
|
}
|
|
3587
3778
|
function Label({
|
|
3588
|
-
size = "
|
|
3779
|
+
size = "sm",
|
|
3589
3780
|
weight = "semibold",
|
|
3590
3781
|
lineHeight = "loose",
|
|
3591
3782
|
...props
|
|
@@ -3626,13 +3817,13 @@ function CheckboxGroup({
|
|
|
3626
3817
|
)
|
|
3627
3818
|
] });
|
|
3628
3819
|
}
|
|
3629
|
-
function Code({ className, children, ...props }) {
|
|
3820
|
+
function Code({ className, children, size = "sm", ...props }) {
|
|
3630
3821
|
return /* @__PURE__ */ jsx(
|
|
3631
3822
|
Text,
|
|
3632
3823
|
{
|
|
3633
3824
|
...props,
|
|
3634
3825
|
as: "code",
|
|
3635
|
-
size
|
|
3826
|
+
size,
|
|
3636
3827
|
weight: "medium",
|
|
3637
3828
|
className: cn("font-mono bg-surface-sunken rounded p-1", className),
|
|
3638
3829
|
children
|
|
@@ -3667,9 +3858,9 @@ function CollapsibleTrigger({ className, children, ...props }) {
|
|
|
3667
3858
|
{
|
|
3668
3859
|
...props,
|
|
3669
3860
|
className: cn(
|
|
3670
|
-
"flex items-center gap-2 cursor-pointer outline-none text-
|
|
3861
|
+
"flex items-center gap-2 cursor-pointer outline-none text-sm",
|
|
3671
3862
|
"focus-visible:ring-2 focus-visible:ring-focus-ring rounded",
|
|
3672
|
-
"disabled:text-
|
|
3863
|
+
"disabled:text-fg-disabled disabled:cursor-default",
|
|
3673
3864
|
className
|
|
3674
3865
|
),
|
|
3675
3866
|
children
|
|
@@ -3809,7 +4000,7 @@ function List({
|
|
|
3809
4000
|
};
|
|
3810
4001
|
const classes = cn(
|
|
3811
4002
|
"grid outline-none overflow-auto gap-1",
|
|
3812
|
-
isFullscreen && "zen-layer-floating block p-3 rounded-none fixed inset-0 overflow-auto bg-surface
|
|
4003
|
+
isFullscreen && "zen-layer-floating block p-3 rounded-none fixed inset-0 overflow-auto bg-surface",
|
|
3813
4004
|
className
|
|
3814
4005
|
);
|
|
3815
4006
|
if (parent.kind === "select") {
|
|
@@ -3838,7 +4029,7 @@ function List({
|
|
|
3838
4029
|
}
|
|
3839
4030
|
return listbox;
|
|
3840
4031
|
}
|
|
3841
|
-
var itemClasses = "text-
|
|
4032
|
+
var itemClasses = "text-sm flex items-center justify-between px-2 py-1.5 gap-3 min-w-[120px] cursor-pointer outline-none rounded hover:bg-interactive data-[highlighted]:bg-interactive data-[disabled]:text-fg-disabled data-[selected]:font-semibold";
|
|
3842
4033
|
function ListItem({
|
|
3843
4034
|
id,
|
|
3844
4035
|
value,
|
|
@@ -3920,147 +4111,21 @@ function ListSection({ title, className, children, ...props }) {
|
|
|
3920
4111
|
const { kind } = useContext(ListContext);
|
|
3921
4112
|
if (kind === "select") {
|
|
3922
4113
|
return /* @__PURE__ */ jsxs(Select$1.Group, { ...props, className: cn("[&:not(:last-child)]:mb-4", className), children: [
|
|
3923
|
-
title && /* @__PURE__ */ jsx(Select$1.GroupLabel, { className: "text-
|
|
4114
|
+
title && /* @__PURE__ */ jsx(Select$1.GroupLabel, { className: "text-sm font-bold px-2 py-1.5", children: title }),
|
|
3924
4115
|
children
|
|
3925
4116
|
] });
|
|
3926
4117
|
}
|
|
3927
4118
|
if (kind === "combobox") {
|
|
3928
4119
|
return /* @__PURE__ */ jsxs(Combobox.Group, { ...props, className: cn("[&:not(:last-child)]:mb-4", className), children: [
|
|
3929
|
-
title && /* @__PURE__ */ jsx(Combobox.GroupLabel, { className: "text-
|
|
4120
|
+
title && /* @__PURE__ */ jsx(Combobox.GroupLabel, { className: "text-sm font-bold px-2 py-1.5", children: title }),
|
|
3930
4121
|
children
|
|
3931
4122
|
] });
|
|
3932
4123
|
}
|
|
3933
4124
|
return /* @__PURE__ */ jsxs("div", { ...props, role: "group", className: cn("[&:not(:last-child)]:mb-4", className), children: [
|
|
3934
|
-
title && /* @__PURE__ */ jsx("div", { className: "text-
|
|
4125
|
+
title && /* @__PURE__ */ jsx("div", { className: "text-sm font-bold px-2 py-1.5", children: title }),
|
|
3935
4126
|
children
|
|
3936
4127
|
] });
|
|
3937
4128
|
}
|
|
3938
|
-
var InputGroup = forwardRef(
|
|
3939
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3940
|
-
"div",
|
|
3941
|
-
{
|
|
3942
|
-
...props,
|
|
3943
|
-
ref,
|
|
3944
|
-
"data-slot": "input-group",
|
|
3945
|
-
role: props.role ?? "group",
|
|
3946
|
-
className: inputField({
|
|
3947
|
-
variant,
|
|
3948
|
-
className: cn(
|
|
3949
|
-
"group/input-group w-full min-w-0 gap-0 p-0",
|
|
3950
|
-
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col",
|
|
3951
|
-
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col",
|
|
3952
|
-
"has-[>textarea]:h-auto",
|
|
3953
|
-
className
|
|
3954
|
-
)
|
|
3955
|
-
})
|
|
3956
|
-
}
|
|
3957
|
-
)
|
|
3958
|
-
);
|
|
3959
|
-
InputGroup.displayName = "InputGroup";
|
|
3960
|
-
var addonClasses = {
|
|
3961
|
-
"inline-start": "order-first ps-3",
|
|
3962
|
-
"inline-end": "order-last pe-3",
|
|
3963
|
-
"block-start": "order-first w-full justify-start px-3 pt-3",
|
|
3964
|
-
"block-end": "order-last w-full justify-start px-3 pb-3"
|
|
3965
|
-
};
|
|
3966
|
-
var InputGroupAddon = forwardRef(
|
|
3967
|
-
({ align = "inline-start", className, onClick, ...props }, ref) => {
|
|
3968
|
-
const handleClick = (event) => {
|
|
3969
|
-
onClick?.(event);
|
|
3970
|
-
if (event.defaultPrevented || event.target.closest("button")) {
|
|
3971
|
-
return;
|
|
3972
|
-
}
|
|
3973
|
-
event.currentTarget.parentElement?.querySelector('[data-slot="input-group-control"]')?.focus();
|
|
3974
|
-
};
|
|
3975
|
-
return /* @__PURE__ */ jsx(
|
|
3976
|
-
"div",
|
|
3977
|
-
{
|
|
3978
|
-
...props,
|
|
3979
|
-
ref,
|
|
3980
|
-
role: props.role ?? "group",
|
|
3981
|
-
"data-slot": "input-group-addon",
|
|
3982
|
-
"data-align": align,
|
|
3983
|
-
className: cn(
|
|
3984
|
-
"flex h-auto shrink-0 cursor-text items-center justify-center gap-2 py-2 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] text-foreground-muted",
|
|
3985
|
-
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
3986
|
-
addonClasses[align],
|
|
3987
|
-
className
|
|
3988
|
-
),
|
|
3989
|
-
onClick: handleClick
|
|
3990
|
-
}
|
|
3991
|
-
);
|
|
3992
|
-
}
|
|
3993
|
-
);
|
|
3994
|
-
InputGroupAddon.displayName = "InputGroupAddon";
|
|
3995
|
-
var buttonSizeClasses = {
|
|
3996
|
-
xs: "h-6 gap-1 rounded px-1.5 py-0 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
|
|
3997
|
-
sm: "h-8 gap-2 rounded px-2 py-0 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
|
|
3998
|
-
"icon-xs": "size-6 rounded p-0",
|
|
3999
|
-
"icon-sm": "size-8 rounded p-0"
|
|
4000
|
-
};
|
|
4001
|
-
var InputGroupButton = forwardRef(
|
|
4002
|
-
({ className, size = "xs", type = "button", variant = "quiet", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4003
|
-
Button,
|
|
4004
|
-
{
|
|
4005
|
-
...props,
|
|
4006
|
-
ref,
|
|
4007
|
-
type,
|
|
4008
|
-
variant,
|
|
4009
|
-
size: "xs",
|
|
4010
|
-
"data-size": size,
|
|
4011
|
-
className: cn(
|
|
4012
|
-
"shrink-0 shadow-none",
|
|
4013
|
-
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
4014
|
-
buttonSizeClasses[size],
|
|
4015
|
-
className
|
|
4016
|
-
)
|
|
4017
|
-
}
|
|
4018
|
-
)
|
|
4019
|
-
);
|
|
4020
|
-
InputGroupButton.displayName = "InputGroupButton";
|
|
4021
|
-
var InputGroupText = forwardRef(
|
|
4022
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4023
|
-
"span",
|
|
4024
|
-
{
|
|
4025
|
-
...props,
|
|
4026
|
-
ref,
|
|
4027
|
-
"data-slot": "input-group-text",
|
|
4028
|
-
className: cn(
|
|
4029
|
-
"flex items-center gap-2 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] text-foreground-muted [&_svg]:pointer-events-none [&_svg]:size-4",
|
|
4030
|
-
className
|
|
4031
|
-
)
|
|
4032
|
-
}
|
|
4033
|
-
)
|
|
4034
|
-
);
|
|
4035
|
-
InputGroupText.displayName = "InputGroupText";
|
|
4036
|
-
var InputGroupInput = forwardRef(
|
|
4037
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4038
|
-
"input",
|
|
4039
|
-
{
|
|
4040
|
-
...props,
|
|
4041
|
-
ref,
|
|
4042
|
-
"data-slot": "input-group-control",
|
|
4043
|
-
className: cn(
|
|
4044
|
-
"min-w-0 flex-1 bg-transparent px-3 py-2 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] outline-none placeholder:text-foreground-muted disabled:cursor-not-allowed",
|
|
4045
|
-
className
|
|
4046
|
-
)
|
|
4047
|
-
}
|
|
4048
|
-
)
|
|
4049
|
-
);
|
|
4050
|
-
InputGroupInput.displayName = "InputGroupInput";
|
|
4051
|
-
var InputGroupTextarea = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4052
|
-
"textarea",
|
|
4053
|
-
{
|
|
4054
|
-
...props,
|
|
4055
|
-
ref,
|
|
4056
|
-
"data-slot": "input-group-control",
|
|
4057
|
-
className: cn(
|
|
4058
|
-
"min-w-0 w-full flex-1 bg-transparent p-3 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] outline-none placeholder:text-foreground-muted disabled:cursor-not-allowed",
|
|
4059
|
-
className
|
|
4060
|
-
)
|
|
4061
|
-
}
|
|
4062
|
-
));
|
|
4063
|
-
InputGroupTextarea.displayName = "InputGroupTextarea";
|
|
4064
4129
|
var scrollbarClasses = [
|
|
4065
4130
|
"flex touch-none select-none justify-center rounded bg-transparent",
|
|
4066
4131
|
"opacity-0 transition-opacity duration-200 delay-300",
|
|
@@ -4162,10 +4227,10 @@ function ComboBox({
|
|
|
4162
4227
|
disabled: isDisabled,
|
|
4163
4228
|
onValueChange: onChange,
|
|
4164
4229
|
children: /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
|
|
4165
|
-
label && /* @__PURE__ */ jsx(Combobox.Label, { className: "text-
|
|
4230
|
+
label && /* @__PURE__ */ jsx(Combobox.Label, { className: "text-sm font-semibold", children: label }),
|
|
4166
4231
|
/* @__PURE__ */ jsxs(Combobox.InputGroup, { render: /* @__PURE__ */ jsx(InputGroup, {}), children: [
|
|
4167
4232
|
/* @__PURE__ */ jsx(Combobox.Input, { placeholder, render: /* @__PURE__ */ jsx(InputGroupInput, {}) }),
|
|
4168
|
-
/* @__PURE__ */ jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx(Combobox.Trigger, { className: "flex size-6 shrink-0 items-center justify-center rounded text-
|
|
4233
|
+
/* @__PURE__ */ jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx(Combobox.Trigger, { className: "flex size-6 shrink-0 items-center justify-center rounded text-fg-muted hover:bg-interactive hover:text-fg", children: /* @__PURE__ */ jsx(Icon, { rotate: 90, "aria-hidden": "true", size: "sm", children: /* @__PURE__ */ jsx(icons_exports.ChevronRight, {}) }) }) })
|
|
4169
4234
|
] }),
|
|
4170
4235
|
/* @__PURE__ */ jsx(Combobox.Portal, { children: /* @__PURE__ */ jsx(
|
|
4171
4236
|
Combobox.Positioner,
|
|
@@ -4182,7 +4247,7 @@ function ComboBox({
|
|
|
4182
4247
|
}
|
|
4183
4248
|
return item.element ?? /* @__PURE__ */ jsx(ListItem, { value: item.value, children: item.label }, item.value);
|
|
4184
4249
|
} }) }) }) }),
|
|
4185
|
-
/* @__PURE__ */ jsx(Combobox.Empty, { children: /* @__PURE__ */ jsx("div", { className: "flex min-h-16 items-center justify-center px-4 py-3 text-center", children: renderEmptyState ? renderEmptyState({}) : /* @__PURE__ */ jsx("span", { className: "text-
|
|
4250
|
+
/* @__PURE__ */ jsx(Combobox.Empty, { children: /* @__PURE__ */ jsx("div", { className: "flex min-h-16 items-center justify-center px-4 py-3 text-center", children: renderEmptyState ? renderEmptyState({}) : /* @__PURE__ */ jsx("span", { className: "text-sm text-fg-muted", children: "No items found." }) }) })
|
|
4186
4251
|
] })
|
|
4187
4252
|
}
|
|
4188
4253
|
) })
|
|
@@ -4223,7 +4288,7 @@ function Command({ className, children, ...props }) {
|
|
|
4223
4288
|
{
|
|
4224
4289
|
...props,
|
|
4225
4290
|
className: cn(
|
|
4226
|
-
"flex size-full flex-col overflow-hidden rounded-md bg-surface
|
|
4291
|
+
"flex size-full flex-col overflow-hidden rounded-md bg-surface text-fg",
|
|
4227
4292
|
className
|
|
4228
4293
|
),
|
|
4229
4294
|
children
|
|
@@ -4232,15 +4297,15 @@ function Command({ className, children, ...props }) {
|
|
|
4232
4297
|
}
|
|
4233
4298
|
function CommandInput({ className, ...props }) {
|
|
4234
4299
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 border-b border-edge px-3", children: [
|
|
4235
|
-
/* @__PURE__ */ jsx(Icon, { size: "sm", className: "shrink-0 text-
|
|
4300
|
+
/* @__PURE__ */ jsx(Icon, { size: "sm", className: "shrink-0 text-fg-muted", children: /* @__PURE__ */ jsx(icons_exports.Search, {}) }),
|
|
4236
4301
|
/* @__PURE__ */ jsx(
|
|
4237
4302
|
Command$1.Input,
|
|
4238
4303
|
{
|
|
4239
4304
|
...props,
|
|
4240
4305
|
className: cn(
|
|
4241
|
-
"flex h-11 w-full bg-transparent text-
|
|
4242
|
-
"placeholder:text-
|
|
4243
|
-
"disabled:cursor-not-allowed disabled:text-
|
|
4306
|
+
"flex h-11 w-full bg-transparent text-sm outline-none",
|
|
4307
|
+
"placeholder:text-fg-muted",
|
|
4308
|
+
"disabled:cursor-not-allowed disabled:text-fg-disabled",
|
|
4244
4309
|
className
|
|
4245
4310
|
)
|
|
4246
4311
|
}
|
|
@@ -4255,10 +4320,7 @@ function CommandEmpty({ className, ...props }) {
|
|
|
4255
4320
|
Command$1.Empty,
|
|
4256
4321
|
{
|
|
4257
4322
|
...props,
|
|
4258
|
-
className: cn(
|
|
4259
|
-
"py-6 text-center text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] text-foreground-muted",
|
|
4260
|
-
className
|
|
4261
|
-
)
|
|
4323
|
+
className: cn("py-6 text-center text-sm text-fg-muted", className)
|
|
4262
4324
|
}
|
|
4263
4325
|
);
|
|
4264
4326
|
}
|
|
@@ -4270,7 +4332,7 @@ function CommandGroup({ className, ...props }) {
|
|
|
4270
4332
|
className: cn(
|
|
4271
4333
|
"overflow-hidden [&:not(:last-child)]:mb-2",
|
|
4272
4334
|
"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5",
|
|
4273
|
-
"[&_[cmdk-group-heading]]:text-
|
|
4335
|
+
"[&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-bold [&_[cmdk-group-heading]]:text-fg-muted",
|
|
4274
4336
|
className
|
|
4275
4337
|
)
|
|
4276
4338
|
}
|
|
@@ -4283,9 +4345,9 @@ function CommandItem({ icon, isDisabled, className, children, ...props }) {
|
|
|
4283
4345
|
...props,
|
|
4284
4346
|
disabled: isDisabled,
|
|
4285
4347
|
className: cn(
|
|
4286
|
-
"flex items-center gap-3 px-2 py-1.5 rounded cursor-pointer outline-none text-
|
|
4348
|
+
"flex items-center gap-3 px-2 py-1.5 rounded cursor-pointer outline-none text-sm",
|
|
4287
4349
|
"data-[selected=true]:bg-interactive",
|
|
4288
|
-
"data-[disabled=true]:text-
|
|
4350
|
+
"data-[disabled=true]:text-fg-disabled data-[disabled=true]:cursor-default",
|
|
4289
4351
|
className
|
|
4290
4352
|
),
|
|
4291
4353
|
children: [
|
|
@@ -4394,14 +4456,14 @@ function TextField({
|
|
|
4394
4456
|
setInputValue(defaultValue ?? "");
|
|
4395
4457
|
}
|
|
4396
4458
|
}, [value, defaultValue]);
|
|
4397
|
-
const inputClasses = cn(resize && resizeClasses[resize]);
|
|
4459
|
+
const inputClasses = cn(allowCopy && asTextArea && "pe-12", resize && resizeClasses[resize]);
|
|
4398
4460
|
const input = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
4399
4461
|
InputGroup,
|
|
4400
4462
|
{
|
|
4401
4463
|
variant: variant === "quiet" ? "quiet" : "default",
|
|
4402
4464
|
className: cn(
|
|
4403
4465
|
isReadOnly && "focus-within:border-edge",
|
|
4404
|
-
isDisabled && "text-
|
|
4466
|
+
isDisabled && "text-fg-disabled",
|
|
4405
4467
|
variant === "quiet" && "text-[length:inherit]",
|
|
4406
4468
|
className
|
|
4407
4469
|
),
|
|
@@ -4432,17 +4494,14 @@ function TextField({
|
|
|
4432
4494
|
allowCopy && /* @__PURE__ */ jsx(
|
|
4433
4495
|
InputGroupAddon,
|
|
4434
4496
|
{
|
|
4435
|
-
align:
|
|
4436
|
-
className: cn(asTextArea && "
|
|
4497
|
+
align: "inline-end",
|
|
4498
|
+
className: cn(asTextArea && "absolute end-0 top-1 z-10"),
|
|
4437
4499
|
children: /* @__PURE__ */ jsx(
|
|
4438
4500
|
CopyButton,
|
|
4439
4501
|
{
|
|
4440
4502
|
value: String(inputValue),
|
|
4441
4503
|
"aria-disabled": !inputValue,
|
|
4442
|
-
className: cn(
|
|
4443
|
-
"text-foreground-muted hover:text-foreground-primary",
|
|
4444
|
-
!inputValue && "text-foreground-disabled"
|
|
4445
|
-
)
|
|
4504
|
+
className: cn("text-fg-muted hover:text-fg", !inputValue && "text-fg-disabled")
|
|
4446
4505
|
}
|
|
4447
4506
|
)
|
|
4448
4507
|
}
|
|
@@ -4483,7 +4542,7 @@ function ConfirmationDialog({
|
|
|
4483
4542
|
paddingY: "2",
|
|
4484
4543
|
marginY: "2",
|
|
4485
4544
|
borderRadius: "md",
|
|
4486
|
-
className: "font-mono text-
|
|
4545
|
+
className: "font-mono text-sm bg-surface-sunken",
|
|
4487
4546
|
children: value
|
|
4488
4547
|
}
|
|
4489
4548
|
),
|
|
@@ -4752,17 +4811,7 @@ function Table({
|
|
|
4752
4811
|
}),
|
|
4753
4812
|
[registerRow, rowKeys, selectedKeys, selectionMode, setAllSelected, setRowSelected]
|
|
4754
4813
|
);
|
|
4755
|
-
return /* @__PURE__ */ jsx(TableSelectionContext.Provider, { value: selection, children: /* @__PURE__ */ jsx(
|
|
4756
|
-
"table",
|
|
4757
|
-
{
|
|
4758
|
-
...props,
|
|
4759
|
-
className: cn(
|
|
4760
|
-
"grid text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] w-full relative",
|
|
4761
|
-
className
|
|
4762
|
-
),
|
|
4763
|
-
children
|
|
4764
|
-
}
|
|
4765
|
-
) });
|
|
4814
|
+
return /* @__PURE__ */ jsx(TableSelectionContext.Provider, { value: selection, children: /* @__PURE__ */ jsx("table", { ...props, className: cn("grid text-sm w-full relative", className), children }) });
|
|
4766
4815
|
}
|
|
4767
4816
|
function TableHeader({ children, className, style, ...props }) {
|
|
4768
4817
|
const cols = style?.gridTemplateColumns || gridTemplateColumns;
|
|
@@ -4897,44 +4946,45 @@ function DataTable({
|
|
|
4897
4946
|
return /* @__PURE__ */ jsx(DataCard, { data: items }, `${row.id}-${index}`);
|
|
4898
4947
|
}) });
|
|
4899
4948
|
}
|
|
4900
|
-
return /* @__PURE__ */ jsxs(
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4949
|
+
return /* @__PURE__ */ jsxs(Table, { ...props, className: cn("relative text-sm", className), children: [
|
|
4950
|
+
/* @__PURE__ */ jsx(TableHeader, { style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(({ id, label, as, hidden, width, ...columnProps }) => {
|
|
4951
|
+
if (hidden) {
|
|
4952
|
+
return null;
|
|
4953
|
+
}
|
|
4954
|
+
return /* @__PURE__ */ createElement(TableColumn, { ...columnProps, key: id, id }, label);
|
|
4955
|
+
}) }),
|
|
4956
|
+
/* @__PURE__ */ jsx(TableBody, { children: rows.map((row, index) => {
|
|
4957
|
+
return (
|
|
4958
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: row data may not have unique ids
|
|
4959
|
+
/* @__PURE__ */ jsx(TableRow, { id: String(row.id), style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(
|
|
4960
|
+
({
|
|
4961
|
+
id,
|
|
4962
|
+
label: _label,
|
|
4963
|
+
width: _width,
|
|
4964
|
+
as,
|
|
4965
|
+
hidden,
|
|
4966
|
+
className: className2,
|
|
4967
|
+
children: children2,
|
|
4968
|
+
...cellProps
|
|
4969
|
+
}) => {
|
|
4970
|
+
if (hidden) {
|
|
4971
|
+
return null;
|
|
4972
|
+
}
|
|
4973
|
+
const value = typeof children2 === "function" ? children2(row, index) : children2 || row[id];
|
|
4974
|
+
return /* @__PURE__ */ createElement(
|
|
4975
|
+
TableCell,
|
|
4976
|
+
{
|
|
4977
|
+
...cellProps,
|
|
4978
|
+
key: id,
|
|
4979
|
+
className: cn("items-center", className2)
|
|
4980
|
+
},
|
|
4981
|
+
as ? createElement(as, {}, value) : value
|
|
4982
|
+
);
|
|
4912
4983
|
}
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: row data may not have unique ids
|
|
4918
|
-
/* @__PURE__ */ jsx(TableRow, { id: String(row.id), style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(({ id, as, hidden, className: className2, children: children2, ...cellProps }) => {
|
|
4919
|
-
if (hidden) {
|
|
4920
|
-
return null;
|
|
4921
|
-
}
|
|
4922
|
-
const value = typeof children2 === "function" ? children2(row, index) : children2 || row[id];
|
|
4923
|
-
return /* @__PURE__ */ createElement(
|
|
4924
|
-
TableCell,
|
|
4925
|
-
{
|
|
4926
|
-
...cellProps,
|
|
4927
|
-
key: id,
|
|
4928
|
-
className: cn("items-center", className2)
|
|
4929
|
-
},
|
|
4930
|
-
as ? createElement(as, {}, value) : value
|
|
4931
|
-
);
|
|
4932
|
-
}) }, index)
|
|
4933
|
-
);
|
|
4934
|
-
}) })
|
|
4935
|
-
]
|
|
4936
|
-
}
|
|
4937
|
-
);
|
|
4984
|
+
) }, index)
|
|
4985
|
+
);
|
|
4986
|
+
}) })
|
|
4987
|
+
] });
|
|
4938
4988
|
}
|
|
4939
4989
|
function DataColumn(_props) {
|
|
4940
4990
|
return null;
|
|
@@ -4954,7 +5004,7 @@ function Popover({
|
|
|
4954
5004
|
{
|
|
4955
5005
|
className: cn(
|
|
4956
5006
|
"zen-popover outline-none",
|
|
4957
|
-
isFullscreen && "zen-popover-fullscreen block border-0 rounded-none fixed inset-0 overflow-auto bg-surface
|
|
5007
|
+
isFullscreen && "zen-popover-fullscreen block border-0 rounded-none fixed inset-0 overflow-auto bg-surface",
|
|
4958
5008
|
className
|
|
4959
5009
|
),
|
|
4960
5010
|
children
|
|
@@ -5003,7 +5053,7 @@ function DatePicker({
|
|
|
5003
5053
|
className: cn("justify-start gap-3 font-normal", buttonProps?.className),
|
|
5004
5054
|
children: [
|
|
5005
5055
|
/* @__PURE__ */ jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsx(icons_exports.CalendarDays, {}) }),
|
|
5006
|
-
date ? new Intl.DateTimeFormat(locale, formatOptions).format(date) : /* @__PURE__ */ jsx("span", { className: "text-
|
|
5056
|
+
date ? new Intl.DateTimeFormat(locale, formatOptions).format(date) : /* @__PURE__ */ jsx("span", { className: "text-fg-muted", children: placeholder })
|
|
5007
5057
|
]
|
|
5008
5058
|
}
|
|
5009
5059
|
),
|
|
@@ -5041,6 +5091,29 @@ function Dots({ size = "md", className, color: _color, ...props }) {
|
|
|
5041
5091
|
/* @__PURE__ */ jsx(Dot, { size })
|
|
5042
5092
|
] });
|
|
5043
5093
|
}
|
|
5094
|
+
var Drawer = Drawer$1.Root;
|
|
5095
|
+
var DrawerTrigger = Drawer$1.Trigger;
|
|
5096
|
+
var DrawerClose = Drawer$1.Close;
|
|
5097
|
+
var DrawerTitle = Drawer$1.Title;
|
|
5098
|
+
var DrawerDescription = Drawer$1.Description;
|
|
5099
|
+
var DrawerContent = forwardRef(
|
|
5100
|
+
({ children, className, portalProps, ...props }, ref) => /* @__PURE__ */ jsxs(Drawer$1.Portal, { ...portalProps, children: [
|
|
5101
|
+
/* @__PURE__ */ jsx(Drawer$1.Backdrop, { className: "zen-drawer-backdrop zen-layer-backdrop fixed inset-0 bg-black/80" }),
|
|
5102
|
+
/* @__PURE__ */ jsx(Drawer$1.Viewport, { className: "zen-layer-modal fixed inset-0 pointer-events-none", children: /* @__PURE__ */ jsx(
|
|
5103
|
+
Drawer$1.Popup,
|
|
5104
|
+
{
|
|
5105
|
+
...props,
|
|
5106
|
+
ref,
|
|
5107
|
+
className: (state) => cn(
|
|
5108
|
+
"zen-drawer pointer-events-auto border border-edge bg-surface text-fg shadow-xl outline-none",
|
|
5109
|
+
typeof className === "function" ? className(state) : className
|
|
5110
|
+
),
|
|
5111
|
+
children: /* @__PURE__ */ jsx(Drawer$1.Content, { className: "flex min-h-0 flex-col gap-4 overflow-auto p-6", children })
|
|
5112
|
+
}
|
|
5113
|
+
) })
|
|
5114
|
+
] })
|
|
5115
|
+
);
|
|
5116
|
+
DrawerContent.displayName = "DrawerContent";
|
|
5044
5117
|
var Empty = forwardRef(
|
|
5045
5118
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5046
5119
|
"div",
|
|
@@ -5087,10 +5160,7 @@ var EmptyTitle = forwardRef(
|
|
|
5087
5160
|
...props,
|
|
5088
5161
|
ref,
|
|
5089
5162
|
"data-slot": "empty-title",
|
|
5090
|
-
className: cn(
|
|
5091
|
-
"text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)] font-medium tracking-tight",
|
|
5092
|
-
className
|
|
5093
|
-
)
|
|
5163
|
+
className: cn("text-lg font-medium tracking-tight", className)
|
|
5094
5164
|
}
|
|
5095
5165
|
)
|
|
5096
5166
|
);
|
|
@@ -5102,7 +5172,7 @@ var EmptyDescription = forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
5102
5172
|
ref,
|
|
5103
5173
|
"data-slot": "empty-description",
|
|
5104
5174
|
className: cn(
|
|
5105
|
-
"text-
|
|
5175
|
+
"text-fg-muted [&>a:hover]:text-fg text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",
|
|
5106
5176
|
className
|
|
5107
5177
|
)
|
|
5108
5178
|
}
|
|
@@ -5116,7 +5186,7 @@ var EmptyContent = forwardRef(
|
|
|
5116
5186
|
ref,
|
|
5117
5187
|
"data-slot": "empty-content",
|
|
5118
5188
|
className: cn(
|
|
5119
|
-
"flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-
|
|
5189
|
+
"flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
|
|
5120
5190
|
className
|
|
5121
5191
|
)
|
|
5122
5192
|
}
|
|
@@ -5251,10 +5321,7 @@ function Form({
|
|
|
5251
5321
|
{
|
|
5252
5322
|
...props,
|
|
5253
5323
|
autoComplete,
|
|
5254
|
-
className: cn(
|
|
5255
|
-
"flex flex-col relative text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] gap-3",
|
|
5256
|
-
className
|
|
5257
|
-
),
|
|
5324
|
+
className: cn("flex flex-col relative text-sm gap-3", className),
|
|
5258
5325
|
onSubmit: onSubmit ? handleSubmit(onSubmit) : void 0,
|
|
5259
5326
|
onKeyDown,
|
|
5260
5327
|
children: typeof children === "function" ? children(formValues) : children
|
|
@@ -5637,7 +5704,7 @@ function Toast({
|
|
|
5637
5704
|
"aria-hidden": true,
|
|
5638
5705
|
"aria-label": "Close",
|
|
5639
5706
|
size: "sm",
|
|
5640
|
-
className: "cursor-pointer text-
|
|
5707
|
+
className: "cursor-pointer text-fg-muted hover:text-fg",
|
|
5641
5708
|
onClick: () => onClose?.(TOAST_CLOSE_ACTION),
|
|
5642
5709
|
children: /* @__PURE__ */ jsx(icons_exports.X, {})
|
|
5643
5710
|
}
|
|
@@ -5772,7 +5839,7 @@ function Kbd({ className, children, ...props }) {
|
|
|
5772
5839
|
...props,
|
|
5773
5840
|
className: cn(
|
|
5774
5841
|
"inline-flex items-center justify-center gap-1",
|
|
5775
|
-
"text-
|
|
5842
|
+
"text-sm font-mono text-fg",
|
|
5776
5843
|
"px-1.5 py-0.5 rounded border border-edge bg-surface-raised shadow-sm",
|
|
5777
5844
|
className
|
|
5778
5845
|
),
|
|
@@ -5850,7 +5917,7 @@ function Menu({
|
|
|
5850
5917
|
onSelectionChange?.(next);
|
|
5851
5918
|
};
|
|
5852
5919
|
const popupClassName2 = cn(
|
|
5853
|
-
"min-w-[200px] p-2 border border-edge rounded-md shadow-lg bg-surface
|
|
5920
|
+
"min-w-[200px] p-2 border border-edge rounded-md shadow-lg bg-surface overflow-hidden outline-none",
|
|
5854
5921
|
className
|
|
5855
5922
|
);
|
|
5856
5923
|
const popupContent = /* @__PURE__ */ jsx(MenuContext.Provider, { value: { selected, select }, children });
|
|
@@ -5896,9 +5963,9 @@ function MenuItem({
|
|
|
5896
5963
|
}
|
|
5897
5964
|
};
|
|
5898
5965
|
const itemClassName = cn(
|
|
5899
|
-
"text-
|
|
5966
|
+
"text-sm flex items-center justify-between gap-3 px-2 py-1.5 rounded cursor-pointer outline-none w-full",
|
|
5900
5967
|
"hover:bg-interactive focus:bg-interactive data-[highlighted]:bg-interactive",
|
|
5901
|
-
"data-[disabled]:text-
|
|
5968
|
+
"data-[disabled]:text-fg-disabled",
|
|
5902
5969
|
"data-[selected]:font-semibold",
|
|
5903
5970
|
className
|
|
5904
5971
|
);
|
|
@@ -5987,7 +6054,7 @@ function MenuSection({
|
|
|
5987
6054
|
const groupStyle = style;
|
|
5988
6055
|
const body = maxHeight ? /* @__PURE__ */ jsx(ScrollArea, { maxHeight, children }) : children;
|
|
5989
6056
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5990
|
-
title && (primitiveKind === "context-menu" ? /* @__PURE__ */ jsx(ContextMenu$1.GroupLabel, { className: "text-
|
|
6057
|
+
title && (primitiveKind === "context-menu" ? /* @__PURE__ */ jsx(ContextMenu$1.GroupLabel, { className: "text-sm font-bold px-2 py-1.5", children: title }) : primitiveKind === "menu" ? /* @__PURE__ */ jsx(Menu$1.GroupLabel, { className: "text-sm font-bold px-2 py-1.5", children: title }) : /* @__PURE__ */ jsx("div", { className: "text-sm font-bold px-2 py-1.5", children: title })),
|
|
5991
6058
|
body
|
|
5992
6059
|
] });
|
|
5993
6060
|
if (primitiveKind === "context-menu") {
|
|
@@ -6074,7 +6141,7 @@ function Meter({
|
|
|
6074
6141
|
var NavbarContext = createContext({ showArrow: true });
|
|
6075
6142
|
var triggerClassName = cn(
|
|
6076
6143
|
"flex items-center gap-1 select-none cursor-pointer rounded-md px-3 py-2",
|
|
6077
|
-
"text-
|
|
6144
|
+
"text-sm font-medium text-fg bg-transparent border-0",
|
|
6078
6145
|
"hover:bg-interactive data-[popup-open]:bg-interactive",
|
|
6079
6146
|
"outline-none [&:focus-visible]:outline-2 [&:focus-visible]:outline-offset-1 [&:focus-visible]:outline-focus-ring"
|
|
6080
6147
|
);
|
|
@@ -6108,7 +6175,7 @@ var popupClassName = cn(
|
|
|
6108
6175
|
"relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin)",
|
|
6109
6176
|
// `overflow-hidden` clips the nested menu's square background to the rounded
|
|
6110
6177
|
// corners so the popup border stays visible all the way around.
|
|
6111
|
-
"overflow-hidden rounded-md border border-edge bg-surface
|
|
6178
|
+
"overflow-hidden rounded-md border border-edge bg-surface shadow-lg outline-none",
|
|
6112
6179
|
"transition-[opacity,transform,width,height,scale,translate] duration-(--duration) ease-(--easing)",
|
|
6113
6180
|
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
6114
6181
|
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[ending-style]:ease-[ease]"
|
|
@@ -6149,7 +6216,7 @@ function NavbarItem({
|
|
|
6149
6216
|
return /* @__PURE__ */ jsxs(NavigationMenu.Item, { ...props, children: [
|
|
6150
6217
|
/* @__PURE__ */ jsxs(NavigationMenu.Trigger, { className: cn(triggerClassName, className), children: [
|
|
6151
6218
|
/* @__PURE__ */ jsx(Text, { children: label }),
|
|
6152
|
-
showArrow && /* @__PURE__ */ jsx(NavigationMenu.Icon, { className: "flex text-
|
|
6219
|
+
showArrow && /* @__PURE__ */ jsx(NavigationMenu.Icon, { className: "flex text-fg-muted transition-transform duration-200 ease-in-out data-[popup-open]:rotate-180", children: /* @__PURE__ */ jsx(icons_exports.ChevronDown, { className: "size-4" }) })
|
|
6153
6220
|
] }),
|
|
6154
6221
|
/* @__PURE__ */ jsx(NavigationMenu.Content, { className: contentClassName, children })
|
|
6155
6222
|
] });
|
|
@@ -6161,7 +6228,7 @@ function NavbarLink({ className, ...props }) {
|
|
|
6161
6228
|
NavigationMenu.Link,
|
|
6162
6229
|
{
|
|
6163
6230
|
className: cn(
|
|
6164
|
-
"flex items-center gap-1 select-none rounded-md px-3 py-2 no-underline text-
|
|
6231
|
+
"flex items-center gap-1 select-none rounded-md px-3 py-2 no-underline text-fg",
|
|
6165
6232
|
"hover:bg-interactive",
|
|
6166
6233
|
"outline-none [&:focus-visible]:outline-2 [&:focus-visible]:outline-offset-1 [&:focus-visible]:outline-focus-ring",
|
|
6167
6234
|
className
|
|
@@ -6172,9 +6239,9 @@ function NavbarLink({ className, ...props }) {
|
|
|
6172
6239
|
}
|
|
6173
6240
|
var stepperClasses = [
|
|
6174
6241
|
"flex items-center justify-center self-stretch px-3 shrink-0",
|
|
6175
|
-
"cursor-pointer select-none bg-transparent text-
|
|
6242
|
+
"cursor-pointer select-none bg-transparent text-fg",
|
|
6176
6243
|
"hover:bg-interactive active:bg-interactive-hover",
|
|
6177
|
-
"disabled:text-
|
|
6244
|
+
"disabled:text-fg-disabled disabled:cursor-default disabled:hover:bg-transparent"
|
|
6178
6245
|
];
|
|
6179
6246
|
function NumberField({
|
|
6180
6247
|
label,
|
|
@@ -6212,7 +6279,7 @@ function NumberField({
|
|
|
6212
6279
|
NumberField$1.Input,
|
|
6213
6280
|
{
|
|
6214
6281
|
placeholder,
|
|
6215
|
-
className: "w-full min-w-0 text-
|
|
6282
|
+
className: "w-full min-w-0 text-sm text-center tabular-nums bg-transparent py-2 px-3 outline-none placeholder:text-fg-muted"
|
|
6216
6283
|
}
|
|
6217
6284
|
),
|
|
6218
6285
|
/* @__PURE__ */ jsx(NumberField$1.Increment, { className: cn(stepperClasses, "border-l border-edge"), children: /* @__PURE__ */ jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsx(icons_exports.Plus, {}) }) })
|
|
@@ -6252,11 +6319,11 @@ function OTPField({
|
|
|
6252
6319
|
OTPField$1.Input,
|
|
6253
6320
|
{
|
|
6254
6321
|
className: cn(
|
|
6255
|
-
"size-10 text-center text-
|
|
6256
|
-
"text-
|
|
6257
|
-
"focus:border-edge-strong focus:ring-2 focus:ring-focus-ring focus:ring-offset-1 focus:ring-offset-surface
|
|
6322
|
+
"size-10 text-center text-sm rounded border border-edge bg-surface shadow-sm",
|
|
6323
|
+
"text-fg outline-none transition-colors",
|
|
6324
|
+
"focus:border-edge-strong focus:ring-2 focus:ring-focus-ring focus:ring-offset-1 focus:ring-offset-surface",
|
|
6258
6325
|
"data-[filled]:border-edge-strong",
|
|
6259
|
-
"disabled:bg-surface-disabled disabled:text-
|
|
6326
|
+
"disabled:bg-surface-disabled disabled:text-fg-disabled"
|
|
6260
6327
|
)
|
|
6261
6328
|
},
|
|
6262
6329
|
index
|
|
@@ -6359,7 +6426,7 @@ function Pagination({
|
|
|
6359
6426
|
(item, index) => item === "ellipsis" ? /* @__PURE__ */ jsx(
|
|
6360
6427
|
"span",
|
|
6361
6428
|
{
|
|
6362
|
-
className: "flex items-center justify-center size-9 text-
|
|
6429
|
+
className: "flex items-center justify-center size-9 text-fg-muted",
|
|
6363
6430
|
"aria-hidden": "true",
|
|
6364
6431
|
children: /* @__PURE__ */ jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsx(icons_exports.Ellipsis, {}) })
|
|
6365
6432
|
},
|
|
@@ -6482,6 +6549,34 @@ function PasswordField({
|
|
|
6482
6549
|
}
|
|
6483
6550
|
return input;
|
|
6484
6551
|
}
|
|
6552
|
+
var PreviewCard = PreviewCard$1.Root;
|
|
6553
|
+
var PreviewCardTrigger = PreviewCard$1.Trigger;
|
|
6554
|
+
var PreviewCardContent = forwardRef(
|
|
6555
|
+
({ className, positionerProps, portalProps, ...props }, ref) => /* @__PURE__ */ jsx(PreviewCard$1.Portal, { ...portalProps, children: /* @__PURE__ */ jsx(
|
|
6556
|
+
PreviewCard$1.Positioner,
|
|
6557
|
+
{
|
|
6558
|
+
sideOffset: 8,
|
|
6559
|
+
align: "start",
|
|
6560
|
+
...positionerProps,
|
|
6561
|
+
className: (state) => cn(
|
|
6562
|
+
"zen-layer-floating",
|
|
6563
|
+
typeof positionerProps?.className === "function" ? positionerProps.className(state) : positionerProps?.className
|
|
6564
|
+
),
|
|
6565
|
+
children: /* @__PURE__ */ jsx(
|
|
6566
|
+
PreviewCard$1.Popup,
|
|
6567
|
+
{
|
|
6568
|
+
...props,
|
|
6569
|
+
ref,
|
|
6570
|
+
className: (state) => cn(
|
|
6571
|
+
"zen-popover w-80 max-w-[var(--available-width)] max-h-[var(--available-height)] overflow-auto rounded-md border border-edge bg-surface-overlay p-4 text-sm text-fg shadow-lg outline-none",
|
|
6572
|
+
typeof className === "function" ? className(state) : className
|
|
6573
|
+
)
|
|
6574
|
+
}
|
|
6575
|
+
)
|
|
6576
|
+
}
|
|
6577
|
+
) })
|
|
6578
|
+
);
|
|
6579
|
+
PreviewCardContent.displayName = "PreviewCardContent";
|
|
6485
6580
|
function ProgressBar({ className, showPercentage, ...props }) {
|
|
6486
6581
|
return /* @__PURE__ */ jsxs(Progress.Root, { ...props, className: cn("flex items-center gap-3 w-full", className), children: [
|
|
6487
6582
|
/* @__PURE__ */ jsx(Progress.Track, { className: "relative overflow-hidden w-full h-2 rounded-full bg-interactive", children: /* @__PURE__ */ jsx(Progress.Indicator, { className: "h-full rounded-full bg-primary transition-all" }) }),
|
|
@@ -6532,7 +6627,7 @@ function ProgressCircle({
|
|
|
6532
6627
|
]
|
|
6533
6628
|
}
|
|
6534
6629
|
),
|
|
6535
|
-
showPercentage && /* @__PURE__ */ jsx(Progress.Value, { className: "text-
|
|
6630
|
+
showPercentage && /* @__PURE__ */ jsx(Progress.Value, { className: "text-sm font-bold absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" })
|
|
6536
6631
|
]
|
|
6537
6632
|
}
|
|
6538
6633
|
);
|
|
@@ -6572,9 +6667,9 @@ function Radio({ children, className, isDisabled, ...props }) {
|
|
|
6572
6667
|
...props,
|
|
6573
6668
|
disabled: isDisabled,
|
|
6574
6669
|
className: cn(
|
|
6575
|
-
"radio group flex items-center gap-3 cursor-pointer text-
|
|
6670
|
+
"radio group flex items-center gap-3 cursor-pointer text-sm",
|
|
6576
6671
|
"before:content-[''] before:block before:w-5 before:h-5 before:box-border before:rounded-full",
|
|
6577
|
-
"before:border before:border-edge-strong before:bg-surface
|
|
6672
|
+
"before:border before:border-edge-strong before:bg-surface before:transition-all before:duration-200",
|
|
6578
6673
|
"data-[checked]:before:border-[6px] data-[checked]:before:border-primary",
|
|
6579
6674
|
"data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",
|
|
6580
6675
|
className
|
|
@@ -6622,7 +6717,7 @@ function ResizableHandle({ withHandle, className, ...props }) {
|
|
|
6622
6717
|
"z-10 flex h-5 w-3.5 items-center justify-center rounded-sm border border-edge bg-surface-raised",
|
|
6623
6718
|
isVertical && "rotate-90"
|
|
6624
6719
|
),
|
|
6625
|
-
children: /* @__PURE__ */ jsx(icons_exports.GripVertical, { className: "size-2.5 text-
|
|
6720
|
+
children: /* @__PURE__ */ jsx(icons_exports.GripVertical, { className: "size-2.5 text-fg-muted" })
|
|
6626
6721
|
}
|
|
6627
6722
|
)
|
|
6628
6723
|
}
|
|
@@ -6688,7 +6783,7 @@ function SearchField({
|
|
|
6688
6783
|
size: "icon-xs",
|
|
6689
6784
|
isDisabled: props.disabled,
|
|
6690
6785
|
"aria-label": "Clear search",
|
|
6691
|
-
className: "text-
|
|
6786
|
+
className: "text-fg-muted",
|
|
6692
6787
|
onClick: () => handleChange(""),
|
|
6693
6788
|
children: /* @__PURE__ */ jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsx(icons_exports.X, {}) })
|
|
6694
6789
|
}
|
|
@@ -6833,7 +6928,7 @@ function Select({
|
|
|
6833
6928
|
}
|
|
6834
6929
|
),
|
|
6835
6930
|
isLoading && /* @__PURE__ */ jsx(Loading, { className: "py-8", icon: "dots", placement: "center", size: "sm" }),
|
|
6836
|
-
!isLoading && isEmpty && /* @__PURE__ */ jsx("div", { className: "px-2 py-8 text-center text-
|
|
6931
|
+
!isLoading && isEmpty && /* @__PURE__ */ jsx("div", { className: "px-2 py-8 text-center text-sm text-fg-muted", children: "No results found" }),
|
|
6837
6932
|
/* @__PURE__ */ jsx(ListPrimitiveProvider, { kind: "select", children: /* @__PURE__ */ jsx(
|
|
6838
6933
|
ScrollArea,
|
|
6839
6934
|
{
|
|
@@ -6888,7 +6983,7 @@ function Sheet({
|
|
|
6888
6983
|
{
|
|
6889
6984
|
className: cn(
|
|
6890
6985
|
"relative p-6 overflow-auto outline-none",
|
|
6891
|
-
"bg-surface
|
|
6986
|
+
"bg-surface border-edge shadow-xl",
|
|
6892
6987
|
sideClasses[side],
|
|
6893
6988
|
className
|
|
6894
6989
|
),
|
|
@@ -6986,7 +7081,7 @@ function Slider({
|
|
|
6986
7081
|
children: [
|
|
6987
7082
|
/* @__PURE__ */ jsxs(Row, { justifyContent: "space-between", alignItems: "center", children: [
|
|
6988
7083
|
label && /* @__PURE__ */ jsx(Label, { id: labelId, children: label }),
|
|
6989
|
-
showValue && /* @__PURE__ */ jsx(Slider$1.Value, { className: "text-
|
|
7084
|
+
showValue && /* @__PURE__ */ jsx(Slider$1.Value, { className: "text-sm tabular-nums" })
|
|
6990
7085
|
] }),
|
|
6991
7086
|
/* @__PURE__ */ jsxs(Slider$1.Control, { className: "relative h-5 w-full touch-none", children: [
|
|
6992
7087
|
/* @__PURE__ */ jsx(Slider$1.Track, { className: "absolute inset-x-0 top-1/2 -translate-y-1/2 h-2 rounded-full bg-interactive overflow-hidden", children: /* @__PURE__ */ jsx(Slider$1.Indicator, { className: "h-full rounded-full bg-primary" }) }),
|
|
@@ -6994,7 +7089,7 @@ function Slider({
|
|
|
6994
7089
|
Slider$1.Thumb,
|
|
6995
7090
|
{
|
|
6996
7091
|
className: cn(
|
|
6997
|
-
"w-5 h-5 rounded-full bg-surface
|
|
7092
|
+
"w-5 h-5 rounded-full bg-surface border-2 border-primary shadow",
|
|
6998
7093
|
"focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2"
|
|
6999
7094
|
)
|
|
7000
7095
|
}
|
|
@@ -7025,22 +7120,10 @@ function StatusDot({ color, variant }) {
|
|
|
7025
7120
|
}
|
|
7026
7121
|
function StatusLight(props) {
|
|
7027
7122
|
const { color, variant = "inactive", children, className, ...domProps } = props;
|
|
7028
|
-
return /* @__PURE__ */ jsxs(
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
alignItems: "center",
|
|
7033
|
-
gap: "2",
|
|
7034
|
-
className: cn(
|
|
7035
|
-
"text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
|
|
7036
|
-
className
|
|
7037
|
-
),
|
|
7038
|
-
children: [
|
|
7039
|
-
/* @__PURE__ */ jsx(StatusDot, { color, variant }),
|
|
7040
|
-
children
|
|
7041
|
-
]
|
|
7042
|
-
}
|
|
7043
|
-
);
|
|
7123
|
+
return /* @__PURE__ */ jsxs(Row, { ...domProps, alignItems: "center", gap: "2", className: cn("text-sm", className), children: [
|
|
7124
|
+
/* @__PURE__ */ jsx(StatusDot, { color, variant }),
|
|
7125
|
+
children
|
|
7126
|
+
] });
|
|
7044
7127
|
}
|
|
7045
7128
|
function Switch({
|
|
7046
7129
|
label,
|
|
@@ -7122,10 +7205,10 @@ function Tab({ id, value, isDisabled, href, children, className, ...props }) {
|
|
|
7122
7205
|
render: href ? /* @__PURE__ */ jsx("a", { href }) : void 0,
|
|
7123
7206
|
nativeButton: !href,
|
|
7124
7207
|
className: cn(
|
|
7125
|
-
"tab flex items-center justify-center text-
|
|
7126
|
-
"hover:text-
|
|
7127
|
-
"data-[active]:text-
|
|
7128
|
-
"data-[disabled]:text-
|
|
7208
|
+
"tab flex items-center justify-center text-sm text-fg-muted py-2 border-b-2 border-transparent select-none -mb-[2px] cursor-pointer outline-none",
|
|
7209
|
+
"hover:text-fg",
|
|
7210
|
+
"data-[active]:text-fg data-[active]:border-b-primary",
|
|
7211
|
+
"data-[disabled]:text-fg-disabled data-[disabled]:cursor-default",
|
|
7129
7212
|
className
|
|
7130
7213
|
),
|
|
7131
7214
|
children
|
|
@@ -7298,7 +7381,7 @@ function ThemeSwitcher({ className }) {
|
|
|
7298
7381
|
"div",
|
|
7299
7382
|
{
|
|
7300
7383
|
className: cn(
|
|
7301
|
-
"inline-flex items-center bg-surface
|
|
7384
|
+
"inline-flex items-center bg-surface border border-edge rounded-md overflow-hidden",
|
|
7302
7385
|
className
|
|
7303
7386
|
),
|
|
7304
7387
|
children: options.map((option) => /* @__PURE__ */ jsx(
|
|
@@ -7313,7 +7396,7 @@ function ThemeSwitcher({ className }) {
|
|
|
7313
7396
|
"[&:not(:first-child)]:border-l [&:not(:first-child)]:border-edge",
|
|
7314
7397
|
"hover:bg-interactive",
|
|
7315
7398
|
"focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset",
|
|
7316
|
-
mode === option.value ? "bg-interactive text-
|
|
7399
|
+
mode === option.value ? "bg-interactive text-fg" : "text-fg-muted"
|
|
7317
7400
|
),
|
|
7318
7401
|
children: /* @__PURE__ */ jsx(Icon, { size: "sm", children: option.icon })
|
|
7319
7402
|
},
|
|
@@ -7345,7 +7428,7 @@ function Toggle({
|
|
|
7345
7428
|
className: cn(
|
|
7346
7429
|
"flex items-center justify-center whitespace-nowrap gap-3 font-medium bg-interactive border border-transparent rounded p-2 relative cursor-pointer",
|
|
7347
7430
|
"hover:bg-interactive-hover",
|
|
7348
|
-
"data-[pressed]:text-primary-
|
|
7431
|
+
"data-[pressed]:text-primary-fg data-[pressed]:bg-primary",
|
|
7349
7432
|
className
|
|
7350
7433
|
),
|
|
7351
7434
|
children
|
|
@@ -7389,7 +7472,7 @@ function ToggleGroup({
|
|
|
7389
7472
|
multiple: selectionMode === "multiple",
|
|
7390
7473
|
onValueChange: handleChange,
|
|
7391
7474
|
className: cn(
|
|
7392
|
-
"inline-flex bg-surface
|
|
7475
|
+
"inline-flex bg-surface shadow-sm border border-edge rounded overflow-hidden",
|
|
7393
7476
|
className
|
|
7394
7477
|
),
|
|
7395
7478
|
children
|
|
@@ -7418,11 +7501,11 @@ function ToggleGroupItem({
|
|
|
7418
7501
|
value: props.value || id,
|
|
7419
7502
|
disabled: isDisabled,
|
|
7420
7503
|
className: cn(
|
|
7421
|
-
"text-
|
|
7504
|
+
"text-fg-muted bg-surface font-bold flex items-center justify-center p-2 cursor-pointer outline-none",
|
|
7422
7505
|
"[&:not(:first-child)]:border-l [&:not(:first-child)]:border-edge",
|
|
7423
7506
|
"hover:bg-interactive",
|
|
7424
|
-
variant === "primary" ? "data-[pressed]:text-primary-
|
|
7425
|
-
"data-[disabled]:text-
|
|
7507
|
+
variant === "primary" ? "data-[pressed]:text-primary-fg data-[pressed]:bg-primary" : "data-[pressed]:text-fg data-[pressed]:bg-interactive",
|
|
7508
|
+
"data-[disabled]:text-fg-disabled",
|
|
7426
7509
|
className
|
|
7427
7510
|
),
|
|
7428
7511
|
children
|
|
@@ -7437,7 +7520,7 @@ function Toolbar({ isDisabled, orientation, className, children, ...props }) {
|
|
|
7437
7520
|
disabled: isDisabled,
|
|
7438
7521
|
orientation,
|
|
7439
7522
|
className: cn(
|
|
7440
|
-
"flex items-center gap-1 p-1 rounded-md border border-edge bg-surface
|
|
7523
|
+
"flex items-center gap-1 p-1 rounded-md border border-edge bg-surface shadow-sm w-fit",
|
|
7441
7524
|
orientation === "vertical" && "flex-col",
|
|
7442
7525
|
className
|
|
7443
7526
|
),
|
|
@@ -7468,6 +7551,6 @@ function ZenProvider({ children, theme, colorScheme, palette, toast: toast2 }) {
|
|
|
7468
7551
|
return /* @__PURE__ */ jsx(ToastProvider, { ...defaultToastConfig, ...toast2, children });
|
|
7469
7552
|
}
|
|
7470
7553
|
|
|
7471
|
-
export { Accordion, AccordionItem, Alert, AlertDescription, AlertDialog, AlertTitle, AspectRatio, Avatar, Badge, Blockquote, Box, Breadcrumb, Breadcrumbs, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, Carousel, CarouselItem, Checkbox, CheckboxGroup, Code, Collapsible, CollapsiblePanel, CollapsibleTrigger, Column, ComboBox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, ConfirmationDialog, Container, ContextMenu, CopyButton, DataCard, DataColumn, DataTable, DatePicker, Dialog, DialogTrigger, Dots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FileTrigger, Flexbox, FloatingTooltip, Focusable, Form, FormButtons, FormController, FormField, FormFieldArray, FormResetButton, FormSubmitButton, Grid, Heading, HoverTrigger, Icon, Image, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Kbd, Label, List, ListItem, ListPrimitiveProvider, ListSection, ListSeparator, Loading, LoadingButton, Menu, MenuItem, MenuSection, MenuSeparator, MenuTrigger, Menubar, MenubarMenu, Meter, Modal, Navbar, NavbarItem, NavbarLink, NumberField, OTPField, PALETTES, PageHeader, PageHeaderActions, PageHeaderTitle, Pagination, PasswordField, Popover, Pressable, ProgressBar, ProgressCircle, Radio, RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, RouterProvider, Row, ScrollArea, SearchField, Select, Separator, Sheet, SheetHeader, Skeleton, SkeletonAvatar, SkeletonText, Slider, Spinner, StatusLight, SubMenuTrigger, SubMenuTrigger as SubmenuTrigger, Switch, Tab, TabList, TabPanel, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tabs, Tag, TagGroup, Text, TextField, ThemeButton, ThemeSwitcher, Toast, ToastContext, ToastProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, ToolbarButton, ToolbarGroup, ToolbarSeparator, Tooltip, TooltipBubble, TooltipTrigger, ZenProvider,
|
|
7554
|
+
export { Accordion, AccordionItem, Alert, AlertDescription, AlertDialog, AlertTitle, AspectRatio, Autocomplete, Avatar, Badge, Blockquote, Box, Breadcrumb, Breadcrumbs, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, Carousel, CarouselItem, Checkbox, CheckboxGroup, Code, Collapsible, CollapsiblePanel, CollapsibleTrigger, Column, ComboBox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, ConfirmationDialog, Container, ContextMenu, CopyButton, DataCard, DataColumn, DataTable, DatePicker, Dialog, DialogTrigger, Dots, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerTitle, DrawerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FileTrigger, Flexbox, FloatingTooltip, Focusable, Form, FormButtons, FormController, FormField, FormFieldArray, FormResetButton, FormSubmitButton, Grid, Heading, HoverTrigger, Icon, Image, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Kbd, Label, List, ListItem, ListPrimitiveProvider, ListSection, ListSeparator, Loading, LoadingButton, Menu, MenuItem, MenuSection, MenuSeparator, MenuTrigger, Menubar, MenubarMenu, Meter, Modal, Navbar, NavbarItem, NavbarLink, NumberField, OTPField, PALETTES, PageHeader, PageHeaderActions, PageHeaderTitle, Pagination, PasswordField, Popover, Pressable, PreviewCard, PreviewCardContent, PreviewCardTrigger, ProgressBar, ProgressCircle, Radio, RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, RouterProvider, Row, ScrollArea, SearchField, Select, Separator, Sheet, SheetHeader, Skeleton, SkeletonAvatar, SkeletonText, Slider, Spinner, StatusLight, SubMenuTrigger, SubMenuTrigger as SubmenuTrigger, Switch, Tab, TabList, TabPanel, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tabs, Tag, TagGroup, Text, TextField, ThemeButton, ThemeSwitcher, Toast, ToastContext, ToastProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, ToolbarButton, ToolbarGroup, ToolbarSeparator, Tooltip, TooltipBubble, TooltipTrigger, ZenProvider, getCssColorValue, isHeightPreset, isMaxHeightPreset, isMaxWidthPreset, isMinHeightPreset, isMinWidthPreset, isWidthPreset, mapAlignContent, mapAlignItems, mapAlignSelf, mapBackgroundColor, mapBorder, mapBorderColor, mapBorderRadius, mapBorderWidth, mapCursor, mapDisplay, mapFlexDirection, mapFlexWrap, mapFontSize, mapFontWeight, mapGap, mapGridAutoFlow, mapGridColumns, mapGridRows, mapHeadingSize, mapHeight, mapJustifyContent, mapJustifyItems, mapLetterSpacing, mapLineHeight, mapMargin, mapMaxHeight, mapMaxWidth, mapMinHeight, mapMinWidth, mapOpacity, mapOverflow, mapPadding, mapPointerEvents, mapPosition, mapShadow, mapSpace, mapStateStyles, mapTextAlign, mapTextColor, mapTextDecorationStyle, mapTextIndent, mapTextTransform, mapTextWrap, mapVerticalAlign, mapWhitespace, mapWidth, mapWordBreak, removeToast, resolveRender, selectionToStrings, toSelection, useBreakpoint, useDebounce, useInitTheme, useTheme, useToast };
|
|
7472
7555
|
//# sourceMappingURL=index.mjs.map
|
|
7473
7556
|
//# sourceMappingURL=index.mjs.map
|