@umami/react-zen 0.251.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 +660 -574
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +505 -431
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/styles.css +224 -179
- package/styles.full.css +1 -1
- package/tailwind.preset.ts +58 -35
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
|
|
3
3
|
import * as lucide_react_star from 'lucide-react';
|
|
4
|
-
import { forwardRef, createContext, isValidElement, cloneElement, Children, useState, useRef, useCallback, useEffect, useContext,
|
|
5
|
-
import {
|
|
6
|
-
|
|
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';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { tv } from 'tailwind-variants';
|
|
9
9
|
import { AlertDialog as AlertDialog$1 } from '@base-ui/react/alert-dialog';
|
|
@@ -12,6 +12,7 @@ import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
|
12
12
|
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
13
13
|
import { Menu as Menu$1 } from '@base-ui/react/menu';
|
|
14
14
|
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
15
|
+
import { Autocomplete as Autocomplete$1 } from '@base-ui/react/autocomplete';
|
|
15
16
|
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
16
17
|
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
17
18
|
import { DayPicker } from 'react-day-picker';
|
|
@@ -24,6 +25,7 @@ import { Select as Select$1 } from '@base-ui/react/select';
|
|
|
24
25
|
import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
|
|
25
26
|
import { Command as Command$1 } from 'cmdk';
|
|
26
27
|
import { ContextMenu as ContextMenu$1 } from '@base-ui/react/context-menu';
|
|
28
|
+
import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
|
|
27
29
|
import { useForm, FormProvider, Controller, useFormContext, useFieldArray } from 'react-hook-form';
|
|
28
30
|
import { create } from 'zustand';
|
|
29
31
|
import { animated, useTransition } from '@react-spring/web';
|
|
@@ -32,6 +34,7 @@ import { Meter as Meter$1 } from '@base-ui/react/meter';
|
|
|
32
34
|
import { NavigationMenu } from '@base-ui/react/navigation-menu';
|
|
33
35
|
import { NumberField as NumberField$1 } from '@base-ui/react/number-field';
|
|
34
36
|
import { OTPField as OTPField$1 } from '@base-ui/react/otp-field';
|
|
37
|
+
import { PreviewCard as PreviewCard$1 } from '@base-ui/react/preview-card';
|
|
35
38
|
import { Progress } from '@base-ui/react/progress';
|
|
36
39
|
import { Radio as Radio$1 } from '@base-ui/react/radio';
|
|
37
40
|
import { RadioGroup as RadioGroup$1 } from '@base-ui/react/radio-group';
|
|
@@ -60,9 +63,6 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
60
63
|
// src/components/icons.tsx
|
|
61
64
|
var icons_exports = {};
|
|
62
65
|
__reExport(icons_exports, lucide_react_star);
|
|
63
|
-
function cn(...inputs) {
|
|
64
|
-
return twMerge(clsx(inputs));
|
|
65
|
-
}
|
|
66
66
|
var paddingMap = {
|
|
67
67
|
"0": "p-0",
|
|
68
68
|
px: "p-px",
|
|
@@ -99,7 +99,7 @@ var paddingMap = {
|
|
|
99
99
|
"72": "p-72",
|
|
100
100
|
"80": "p-80",
|
|
101
101
|
"96": "p-96",
|
|
102
|
-
true: "px-[var(--zen-padding-x
|
|
102
|
+
true: "px-[var(--zen-padding-x)] py-[var(--zen-padding-y)]"
|
|
103
103
|
};
|
|
104
104
|
var pxMap = {
|
|
105
105
|
"0": "px-0",
|
|
@@ -137,7 +137,7 @@ var pxMap = {
|
|
|
137
137
|
"72": "px-72",
|
|
138
138
|
"80": "px-80",
|
|
139
139
|
"96": "px-96",
|
|
140
|
-
true: "px-[var(--zen-padding-x
|
|
140
|
+
true: "px-[var(--zen-padding-x)]"
|
|
141
141
|
};
|
|
142
142
|
var pyMap = {
|
|
143
143
|
"0": "py-0",
|
|
@@ -175,7 +175,7 @@ var pyMap = {
|
|
|
175
175
|
"72": "py-72",
|
|
176
176
|
"80": "py-80",
|
|
177
177
|
"96": "py-96",
|
|
178
|
-
true: "py-[var(--zen-padding-y
|
|
178
|
+
true: "py-[var(--zen-padding-y)]"
|
|
179
179
|
};
|
|
180
180
|
var ptMap = {
|
|
181
181
|
"0": "pt-0",
|
|
@@ -648,7 +648,7 @@ var gapMap = {
|
|
|
648
648
|
"72": "gap-72",
|
|
649
649
|
"80": "gap-80",
|
|
650
650
|
"96": "gap-96",
|
|
651
|
-
true: "gap-[var(--zen-gap
|
|
651
|
+
true: "gap-[var(--zen-gap)]"
|
|
652
652
|
};
|
|
653
653
|
var gapXMap = {
|
|
654
654
|
"0": "gap-x-0",
|
|
@@ -675,7 +675,7 @@ var gapXMap = {
|
|
|
675
675
|
"24": "gap-x-24",
|
|
676
676
|
"28": "gap-x-28",
|
|
677
677
|
"32": "gap-x-32",
|
|
678
|
-
true: "gap-x-[var(--zen-gap
|
|
678
|
+
true: "gap-x-[var(--zen-gap)]"
|
|
679
679
|
};
|
|
680
680
|
var gapYMap = {
|
|
681
681
|
"0": "gap-y-0",
|
|
@@ -702,7 +702,7 @@ var gapYMap = {
|
|
|
702
702
|
"24": "gap-y-24",
|
|
703
703
|
"28": "gap-y-28",
|
|
704
704
|
"32": "gap-y-32",
|
|
705
|
-
true: "gap-y-[var(--zen-gap
|
|
705
|
+
true: "gap-y-[var(--zen-gap)]"
|
|
706
706
|
};
|
|
707
707
|
var spaceXMap = {
|
|
708
708
|
"0": "space-x-0",
|
|
@@ -779,33 +779,33 @@ var spaceYMap = {
|
|
|
779
779
|
"96": "space-y-96"
|
|
780
780
|
};
|
|
781
781
|
var fontSizeMap = {
|
|
782
|
-
xs: "text-
|
|
783
|
-
sm: "text-
|
|
784
|
-
base: "text-
|
|
785
|
-
lg: "text-
|
|
786
|
-
xl: "text-
|
|
787
|
-
"2xl": "text-
|
|
788
|
-
"3xl": "text-
|
|
789
|
-
"4xl": "text-
|
|
790
|
-
"5xl": "text-
|
|
791
|
-
"6xl": "text-
|
|
792
|
-
"7xl": "text-
|
|
793
|
-
"8xl": "text-
|
|
794
|
-
"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"
|
|
795
795
|
};
|
|
796
796
|
var headingSizeMap = {
|
|
797
|
-
sm: "text-
|
|
798
|
-
base: "text-
|
|
799
|
-
lg: "text-
|
|
800
|
-
xl: "text-
|
|
801
|
-
"2xl": "text-
|
|
802
|
-
"3xl": "text-
|
|
803
|
-
"4xl": "text-
|
|
804
|
-
"5xl": "text-
|
|
805
|
-
"6xl": "text-
|
|
806
|
-
"7xl": "text-
|
|
807
|
-
"8xl": "text-
|
|
808
|
-
"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"
|
|
809
809
|
};
|
|
810
810
|
var fontWeightMap = {
|
|
811
811
|
thin: "font-thin",
|
|
@@ -827,7 +827,7 @@ var borderRadiusMap = {
|
|
|
827
827
|
"2xl": "rounded-2xl",
|
|
828
828
|
"3xl": "rounded-3xl",
|
|
829
829
|
full: "rounded-full",
|
|
830
|
-
true: "rounded-[var(--zen-radius
|
|
830
|
+
true: "rounded-[var(--zen-radius)]"
|
|
831
831
|
};
|
|
832
832
|
var borderWidthMap = {
|
|
833
833
|
sm: "border",
|
|
@@ -843,17 +843,17 @@ var shadowMap = {
|
|
|
843
843
|
xl: "shadow-xl",
|
|
844
844
|
"2xl": "shadow-2xl",
|
|
845
845
|
inner: "shadow-inner",
|
|
846
|
-
true: "shadow-[var(--zen-shadow
|
|
846
|
+
true: "shadow-[var(--zen-shadow)]"
|
|
847
847
|
};
|
|
848
848
|
var semanticColorMap = {
|
|
849
|
-
primary: { text: "text-
|
|
850
|
-
muted: { text: "text-
|
|
851
|
-
inverted: { text: "text-surface
|
|
852
|
-
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" },
|
|
853
853
|
transparent: { text: "text-transparent", bg: "bg-transparent" },
|
|
854
|
-
true: { text: "text-
|
|
854
|
+
true: { text: "text-fg", bg: "bg-interactive" },
|
|
855
855
|
// Surface colors
|
|
856
|
-
|
|
856
|
+
surface: { text: "", bg: "bg-surface" },
|
|
857
857
|
"surface-raised": { text: "", bg: "bg-surface-raised" },
|
|
858
858
|
"surface-sunken": { text: "", bg: "bg-surface-sunken" },
|
|
859
859
|
"surface-overlay": { text: "", bg: "bg-surface-overlay" },
|
|
@@ -1355,9 +1355,9 @@ function mapBorderColor(value) {
|
|
|
1355
1355
|
return "";
|
|
1356
1356
|
}
|
|
1357
1357
|
var semanticCssColorValues = {
|
|
1358
|
-
primary: "var(--zen-
|
|
1359
|
-
muted: "var(--zen-
|
|
1360
|
-
disabled: "var(--zen-
|
|
1358
|
+
primary: "var(--zen-fg)",
|
|
1359
|
+
muted: "var(--zen-fg-muted)",
|
|
1360
|
+
disabled: "var(--zen-fg-disabled)"
|
|
1361
1361
|
};
|
|
1362
1362
|
var tailwindColorHex = {
|
|
1363
1363
|
gray: {
|
|
@@ -2135,7 +2135,7 @@ function resolveRender(render, props, defaultElement) {
|
|
|
2135
2135
|
}
|
|
2136
2136
|
function Text({
|
|
2137
2137
|
color,
|
|
2138
|
-
size = "
|
|
2138
|
+
size = "sm",
|
|
2139
2139
|
weight,
|
|
2140
2140
|
align,
|
|
2141
2141
|
spacing,
|
|
@@ -2208,10 +2208,7 @@ function Accordion({
|
|
|
2208
2208
|
value: expandedKeys ? Array.from(expandedKeys) : void 0,
|
|
2209
2209
|
defaultValue: defaultExpandedKeys ? Array.from(defaultExpandedKeys) : void 0,
|
|
2210
2210
|
onValueChange: (value) => onExpandedChange?.(new Set(value)),
|
|
2211
|
-
className: cn(
|
|
2212
|
-
"flex flex-col items-start w-full gap-2 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
|
|
2213
|
-
className
|
|
2214
|
-
),
|
|
2211
|
+
className: cn("flex flex-col items-start w-full gap-2 text-sm", className),
|
|
2215
2212
|
children
|
|
2216
2213
|
}
|
|
2217
2214
|
);
|
|
@@ -2247,33 +2244,33 @@ var button = tv({
|
|
|
2247
2244
|
"inline-flex items-center justify-center gap-3 whitespace-nowrap",
|
|
2248
2245
|
"font-medium rounded border border-transparent cursor-pointer",
|
|
2249
2246
|
"transition-colors leading-normal relative no-underline",
|
|
2250
|
-
"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"
|
|
2251
2248
|
],
|
|
2252
2249
|
variants: {
|
|
2253
2250
|
variant: {
|
|
2254
2251
|
default: [
|
|
2255
|
-
"bg-interactive text-
|
|
2252
|
+
"bg-interactive text-fg",
|
|
2256
2253
|
"hover:bg-interactive-hover",
|
|
2257
2254
|
"pressed:bg-interactive-pressed",
|
|
2258
|
-
"disabled:text-
|
|
2255
|
+
"disabled:text-fg-disabled"
|
|
2259
2256
|
],
|
|
2260
2257
|
primary: [
|
|
2261
|
-
"bg-primary text-primary-
|
|
2258
|
+
"bg-primary text-primary-fg",
|
|
2262
2259
|
"hover:opacity-90",
|
|
2263
2260
|
"pressed:opacity-80",
|
|
2264
2261
|
"disabled:opacity-50"
|
|
2265
2262
|
],
|
|
2266
2263
|
outline: [
|
|
2267
|
-
"bg-surface
|
|
2264
|
+
"bg-surface border-edge shadow-sm text-fg",
|
|
2268
2265
|
"hover:border-edge-strong",
|
|
2269
2266
|
"pressed:bg-surface-raised",
|
|
2270
|
-
"disabled:bg-surface-disabled disabled:text-
|
|
2267
|
+
"disabled:bg-surface-disabled disabled:text-fg-disabled"
|
|
2271
2268
|
],
|
|
2272
2269
|
quiet: [
|
|
2273
2270
|
"bg-transparent",
|
|
2274
2271
|
"hover:bg-interactive",
|
|
2275
2272
|
"pressed:bg-interactive-hover",
|
|
2276
|
-
"disabled:text-
|
|
2273
|
+
"disabled:text-fg-disabled"
|
|
2277
2274
|
],
|
|
2278
2275
|
danger: [
|
|
2279
2276
|
"bg-status-error text-white",
|
|
@@ -2285,15 +2282,15 @@ var button = tv({
|
|
|
2285
2282
|
"bg-transparent border-0",
|
|
2286
2283
|
"hover:bg-transparent",
|
|
2287
2284
|
"pressed:bg-transparent",
|
|
2288
|
-
"disabled:text-
|
|
2285
|
+
"disabled:text-fg-disabled"
|
|
2289
2286
|
]
|
|
2290
2287
|
},
|
|
2291
2288
|
size: {
|
|
2292
|
-
xs: "text-
|
|
2293
|
-
sm: "text-
|
|
2294
|
-
md: "text-
|
|
2295
|
-
lg: "text-
|
|
2296
|
-
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"
|
|
2297
2294
|
}
|
|
2298
2295
|
},
|
|
2299
2296
|
defaultVariants: {
|
|
@@ -2304,8 +2301,8 @@ var button = tv({
|
|
|
2304
2301
|
var inputField = tv({
|
|
2305
2302
|
base: [
|
|
2306
2303
|
"relative flex items-center",
|
|
2307
|
-
"text-
|
|
2308
|
-
"leading-6 text-
|
|
2304
|
+
"text-sm rounded border border-edge bg-surface shadow-sm",
|
|
2305
|
+
"leading-6 text-fg transition-colors",
|
|
2309
2306
|
"focus-within:border-edge-strong",
|
|
2310
2307
|
"has-[input:read-only]:bg-surface-raised has-[textarea:read-only]:bg-surface-raised",
|
|
2311
2308
|
"has-[:disabled]:bg-surface-disabled has-[:disabled]:opacity-50"
|
|
@@ -2323,13 +2320,13 @@ var inputField = tv({
|
|
|
2323
2320
|
tv({
|
|
2324
2321
|
base: [
|
|
2325
2322
|
"flex items-center justify-between",
|
|
2326
|
-
"gap-3 text-
|
|
2323
|
+
"gap-3 text-sm py-2 px-3 min-w-[120px]",
|
|
2327
2324
|
"cursor-pointer outline-none rounded",
|
|
2328
|
-
"text-
|
|
2325
|
+
"text-fg",
|
|
2329
2326
|
"hovered:bg-interactive",
|
|
2330
2327
|
"focused:bg-interactive",
|
|
2331
2328
|
"focus-visible:bg-interactive",
|
|
2332
|
-
"disabled:text-
|
|
2329
|
+
"disabled:text-fg-disabled disabled:cursor-default",
|
|
2333
2330
|
"selected:font-semibold"
|
|
2334
2331
|
]
|
|
2335
2332
|
});
|
|
@@ -2360,23 +2357,21 @@ tv({
|
|
|
2360
2357
|
}
|
|
2361
2358
|
});
|
|
2362
2359
|
var tooltip = tv({
|
|
2363
|
-
base: [
|
|
2364
|
-
"bg-surface-inverted text-surface-base text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] px-2 py-1 rounded"
|
|
2365
|
-
]
|
|
2360
|
+
base: ["bg-surface-inverted text-surface text-sm px-2 py-1 rounded"]
|
|
2366
2361
|
});
|
|
2367
2362
|
var checkbox = tv({
|
|
2368
2363
|
slots: {
|
|
2369
2364
|
root: [
|
|
2370
2365
|
"group flex items-center gap-3",
|
|
2371
|
-
"text-
|
|
2372
|
-
"disabled:text-
|
|
2366
|
+
"text-sm cursor-pointer",
|
|
2367
|
+
"disabled:text-fg-disabled disabled:cursor-default"
|
|
2373
2368
|
],
|
|
2374
2369
|
box: [
|
|
2375
2370
|
"flex items-center justify-center",
|
|
2376
|
-
"w-5 h-5 rounded border border-edge bg-surface
|
|
2371
|
+
"w-5 h-5 rounded border border-edge bg-surface",
|
|
2377
2372
|
"shadow-sm transition-colors",
|
|
2378
|
-
"group-data-[checked]:bg-primary group-data-[checked]:border-primary group-data-[checked]:text-primary-
|
|
2379
|
-
"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",
|
|
2380
2375
|
"group-disabled:bg-surface-disabled",
|
|
2381
2376
|
"group-focus-visible:ring-2 group-focus-visible:ring-focus-ring group-focus-visible:ring-offset-1"
|
|
2382
2377
|
],
|
|
@@ -2392,7 +2387,7 @@ var switchVariant = tv({
|
|
|
2392
2387
|
slots: {
|
|
2393
2388
|
root: [
|
|
2394
2389
|
"group flex items-center gap-3",
|
|
2395
|
-
"text-
|
|
2390
|
+
"text-sm cursor-pointer",
|
|
2396
2391
|
"disabled:opacity-50 disabled:cursor-default"
|
|
2397
2392
|
],
|
|
2398
2393
|
track: [
|
|
@@ -2404,7 +2399,7 @@ var switchVariant = tv({
|
|
|
2404
2399
|
],
|
|
2405
2400
|
thumb: [
|
|
2406
2401
|
"w-4 h-4 rounded-full",
|
|
2407
|
-
"bg-surface
|
|
2402
|
+
"bg-surface shadow-sm",
|
|
2408
2403
|
"transition-transform",
|
|
2409
2404
|
"group-data-[checked]:translate-x-4"
|
|
2410
2405
|
]
|
|
@@ -2415,34 +2410,34 @@ tv({
|
|
|
2415
2410
|
root: "flex flex-col",
|
|
2416
2411
|
list: ["flex gap-1 border-b border-edge-muted"],
|
|
2417
2412
|
tab: [
|
|
2418
|
-
"px-4 py-2 text-
|
|
2419
|
-
"text-
|
|
2413
|
+
"px-4 py-2 text-sm font-medium cursor-pointer",
|
|
2414
|
+
"text-fg-muted outline-none",
|
|
2420
2415
|
"border-b-2 border-transparent -mb-px",
|
|
2421
|
-
"hovered:text-
|
|
2422
|
-
"selected:text-
|
|
2423
|
-
"disabled:text-
|
|
2416
|
+
"hovered:text-fg",
|
|
2417
|
+
"selected:text-fg selected:border-primary",
|
|
2418
|
+
"disabled:text-fg-disabled disabled:cursor-default",
|
|
2424
2419
|
"focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2"
|
|
2425
2420
|
],
|
|
2426
2421
|
panel: "py-4"
|
|
2427
2422
|
}
|
|
2428
2423
|
});
|
|
2429
2424
|
tv({
|
|
2430
|
-
base: "text-
|
|
2425
|
+
base: "text-fg",
|
|
2431
2426
|
variants: {
|
|
2432
2427
|
size: {
|
|
2433
|
-
xs: "text-
|
|
2434
|
-
sm: "text-
|
|
2435
|
-
base: "text-
|
|
2436
|
-
lg: "text-
|
|
2437
|
-
xl: "text-
|
|
2438
|
-
"2xl": "text-
|
|
2439
|
-
"3xl": "text-
|
|
2440
|
-
"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"
|
|
2441
2436
|
},
|
|
2442
2437
|
color: {
|
|
2443
2438
|
default: "",
|
|
2444
|
-
muted: "text-
|
|
2445
|
-
disabled: "text-
|
|
2439
|
+
muted: "text-fg-muted",
|
|
2440
|
+
disabled: "text-fg-disabled"
|
|
2446
2441
|
},
|
|
2447
2442
|
weight: {
|
|
2448
2443
|
thin: "font-thin",
|
|
@@ -2461,18 +2456,18 @@ tv({
|
|
|
2461
2456
|
}
|
|
2462
2457
|
});
|
|
2463
2458
|
tv({
|
|
2464
|
-
base: "font-semibold text-
|
|
2459
|
+
base: "font-semibold text-fg",
|
|
2465
2460
|
variants: {
|
|
2466
2461
|
size: {
|
|
2467
|
-
sm: "text-
|
|
2468
|
-
base: "text-
|
|
2469
|
-
lg: "text-
|
|
2470
|
-
xl: "text-
|
|
2471
|
-
"2xl": "text-
|
|
2472
|
-
"3xl": "text-
|
|
2473
|
-
"4xl": "text-
|
|
2474
|
-
"5xl": "text-
|
|
2475
|
-
"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"
|
|
2476
2471
|
}
|
|
2477
2472
|
},
|
|
2478
2473
|
defaultVariants: {
|
|
@@ -2481,15 +2476,15 @@ tv({
|
|
|
2481
2476
|
});
|
|
2482
2477
|
var alert = tv({
|
|
2483
2478
|
base: [
|
|
2484
|
-
"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",
|
|
2485
2480
|
"has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3",
|
|
2486
2481
|
"[&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current"
|
|
2487
2482
|
],
|
|
2488
2483
|
variants: {
|
|
2489
2484
|
variant: {
|
|
2490
|
-
default: "bg-surface
|
|
2485
|
+
default: "bg-surface text-fg",
|
|
2491
2486
|
danger: [
|
|
2492
|
-
"border-status-error bg-surface
|
|
2487
|
+
"border-status-error bg-surface text-status-error",
|
|
2493
2488
|
"*:data-[slot=alert-description]:text-status-error/90"
|
|
2494
2489
|
]
|
|
2495
2490
|
}
|
|
@@ -2503,7 +2498,7 @@ var emptyMedia = tv({
|
|
|
2503
2498
|
variants: {
|
|
2504
2499
|
variant: {
|
|
2505
2500
|
default: "bg-transparent",
|
|
2506
|
-
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"
|
|
2507
2502
|
}
|
|
2508
2503
|
},
|
|
2509
2504
|
defaultVariants: {
|
|
@@ -2514,7 +2509,7 @@ tv({
|
|
|
2514
2509
|
base: "inline-flex items-center gap-2",
|
|
2515
2510
|
slots: {
|
|
2516
2511
|
dot: "w-2 h-2 rounded-full",
|
|
2517
|
-
label: "text-
|
|
2512
|
+
label: "text-sm"
|
|
2518
2513
|
},
|
|
2519
2514
|
variants: {
|
|
2520
2515
|
color: {
|
|
@@ -2534,13 +2529,13 @@ var toast = tv({
|
|
|
2534
2529
|
"flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg",
|
|
2535
2530
|
"bg-surface-overlay",
|
|
2536
2531
|
"border border-edge-muted",
|
|
2537
|
-
"text-
|
|
2532
|
+
"text-sm"
|
|
2538
2533
|
],
|
|
2539
2534
|
variants: {
|
|
2540
2535
|
variant: {
|
|
2541
2536
|
default: "",
|
|
2542
|
-
success: "bg-status-success-bg text-status-success-
|
|
2543
|
-
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"
|
|
2544
2539
|
}
|
|
2545
2540
|
}
|
|
2546
2541
|
});
|
|
@@ -2551,13 +2546,13 @@ var badge = tv({
|
|
|
2551
2546
|
],
|
|
2552
2547
|
variants: {
|
|
2553
2548
|
variant: {
|
|
2554
|
-
default: "bg-interactive text-
|
|
2555
|
-
primary: "bg-primary text-primary-
|
|
2556
|
-
outline: "bg-transparent border-edge text-
|
|
2557
|
-
success: "bg-status-success-bg text-status-success-
|
|
2558
|
-
warning: "bg-status-warning-bg text-status-warning-
|
|
2559
|
-
error: "bg-status-error-bg text-status-error-
|
|
2560
|
-
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",
|
|
2561
2556
|
// Tailwind base color palette (soft tint + readable text, dark-mode aware)
|
|
2562
2557
|
slate: "bg-slate-50 text-slate-900 dark:bg-slate-500/20 dark:text-slate-100",
|
|
2563
2558
|
gray: "bg-gray-50 text-gray-900 dark:bg-gray-500/20 dark:text-gray-100",
|
|
@@ -2583,8 +2578,8 @@ var badge = tv({
|
|
|
2583
2578
|
rose: "bg-rose-50 text-rose-900 dark:bg-rose-500/20 dark:text-rose-100"
|
|
2584
2579
|
},
|
|
2585
2580
|
size: {
|
|
2586
|
-
sm: "text-
|
|
2587
|
-
md: "text-
|
|
2581
|
+
sm: "text-xs px-2 py-0.5",
|
|
2582
|
+
md: "text-sm px-2.5 py-0.5"
|
|
2588
2583
|
}
|
|
2589
2584
|
},
|
|
2590
2585
|
defaultVariants: {
|
|
@@ -2599,32 +2594,29 @@ var avatar = tv({
|
|
|
2599
2594
|
"overflow-hidden rounded-full align-middle bg-interactive"
|
|
2600
2595
|
],
|
|
2601
2596
|
image: "size-full object-cover",
|
|
2602
|
-
fallback: [
|
|
2603
|
-
"flex size-full items-center justify-center",
|
|
2604
|
-
"font-medium text-foreground-primary uppercase"
|
|
2605
|
-
]
|
|
2597
|
+
fallback: ["flex size-full items-center justify-center", "font-medium text-fg uppercase"]
|
|
2606
2598
|
},
|
|
2607
2599
|
variants: {
|
|
2608
2600
|
size: {
|
|
2609
2601
|
xs: {
|
|
2610
2602
|
root: "size-6",
|
|
2611
|
-
fallback: "text-
|
|
2603
|
+
fallback: "text-xs"
|
|
2612
2604
|
},
|
|
2613
2605
|
sm: {
|
|
2614
2606
|
root: "size-8",
|
|
2615
|
-
fallback: "text-
|
|
2607
|
+
fallback: "text-sm"
|
|
2616
2608
|
},
|
|
2617
2609
|
md: {
|
|
2618
2610
|
root: "size-10",
|
|
2619
|
-
fallback: "text-
|
|
2611
|
+
fallback: "text-sm"
|
|
2620
2612
|
},
|
|
2621
2613
|
lg: {
|
|
2622
2614
|
root: "size-12",
|
|
2623
|
-
fallback: "text-
|
|
2615
|
+
fallback: "text-lg"
|
|
2624
2616
|
},
|
|
2625
2617
|
xl: {
|
|
2626
2618
|
root: "size-16",
|
|
2627
|
-
fallback: "text-
|
|
2619
|
+
fallback: "text-xl"
|
|
2628
2620
|
}
|
|
2629
2621
|
}
|
|
2630
2622
|
},
|
|
@@ -2635,7 +2627,7 @@ var avatar = tv({
|
|
|
2635
2627
|
var tag = tv({
|
|
2636
2628
|
slots: {
|
|
2637
2629
|
base: [
|
|
2638
|
-
"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",
|
|
2639
2631
|
"cursor-default outline-none",
|
|
2640
2632
|
"focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-1"
|
|
2641
2633
|
],
|
|
@@ -2649,13 +2641,13 @@ var tag = tv({
|
|
|
2649
2641
|
variants: {
|
|
2650
2642
|
variant: {
|
|
2651
2643
|
default: {
|
|
2652
|
-
base: "bg-interactive text-
|
|
2644
|
+
base: "bg-interactive text-fg"
|
|
2653
2645
|
},
|
|
2654
2646
|
outline: {
|
|
2655
|
-
base: "bg-transparent border border-edge text-
|
|
2647
|
+
base: "bg-transparent border border-edge text-fg"
|
|
2656
2648
|
},
|
|
2657
2649
|
primary: {
|
|
2658
|
-
base: "bg-primary text-primary-
|
|
2650
|
+
base: "bg-primary text-primary-fg"
|
|
2659
2651
|
}
|
|
2660
2652
|
}
|
|
2661
2653
|
},
|
|
@@ -2696,7 +2688,7 @@ var AlertDescription = forwardRef(
|
|
|
2696
2688
|
ref,
|
|
2697
2689
|
"data-slot": "alert-description",
|
|
2698
2690
|
className: cn(
|
|
2699
|
-
"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",
|
|
2700
2692
|
className
|
|
2701
2693
|
)
|
|
2702
2694
|
}
|
|
@@ -3149,7 +3141,7 @@ function Dialog({ title, children, className, ...props }) {
|
|
|
3149
3141
|
{
|
|
3150
3142
|
...props,
|
|
3151
3143
|
className: cn(
|
|
3152
|
-
"p-6 shadow-xl bg-surface
|
|
3144
|
+
"p-6 shadow-xl bg-surface border border-edge rounded relative outline-none overflow-auto",
|
|
3153
3145
|
className
|
|
3154
3146
|
),
|
|
3155
3147
|
children: /* @__PURE__ */ jsxs(Column, { height: "100%", gap: true, children: [
|
|
@@ -3215,6 +3207,204 @@ function AspectRatio({ ratio = 1, className, style, children, ...props }) {
|
|
|
3215
3207
|
}
|
|
3216
3208
|
);
|
|
3217
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";
|
|
3218
3408
|
function getInitials(name) {
|
|
3219
3409
|
if (!name) {
|
|
3220
3410
|
return null;
|
|
@@ -3253,15 +3443,15 @@ function Breadcrumb({ children, className, isDisabled, ...props }) {
|
|
|
3253
3443
|
...props,
|
|
3254
3444
|
"aria-disabled": isDisabled || void 0,
|
|
3255
3445
|
className: cn(
|
|
3256
|
-
"flex items-center text-
|
|
3257
|
-
"[&_a]:text-
|
|
3258
|
-
"[&_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",
|
|
3259
3449
|
"last:[&>span]:hidden",
|
|
3260
3450
|
className
|
|
3261
3451
|
),
|
|
3262
3452
|
children: [
|
|
3263
3453
|
children,
|
|
3264
|
-
/* @__PURE__ */ jsx(Icon, { className: "text-
|
|
3454
|
+
/* @__PURE__ */ jsx(Icon, { className: "text-fg-muted", size: "xs", children: /* @__PURE__ */ jsx(icons_exports.ChevronRight, {}) })
|
|
3265
3455
|
]
|
|
3266
3456
|
}
|
|
3267
3457
|
);
|
|
@@ -3310,7 +3500,7 @@ function ButtonGroup({ className, orientation = "horizontal", ...props }) {
|
|
|
3310
3500
|
}
|
|
3311
3501
|
function ButtonGroupText({ className, render, children, ...props }) {
|
|
3312
3502
|
const classes = cn(
|
|
3313
|
-
"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",
|
|
3314
3504
|
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
3315
3505
|
className
|
|
3316
3506
|
);
|
|
@@ -3375,7 +3565,7 @@ function Calendar({
|
|
|
3375
3565
|
}
|
|
3376
3566
|
},
|
|
3377
3567
|
className: cn(
|
|
3378
|
-
"w-fit max-w-full text-
|
|
3568
|
+
"w-fit max-w-full text-sm",
|
|
3379
3569
|
// The month grid is a real <table>; host prose styles (docs sites,
|
|
3380
3570
|
// CMS themes) often style table/th/td with borders, padding, and
|
|
3381
3571
|
// width. Reset them at matching specificity so zen styles hold.
|
|
@@ -3399,9 +3589,9 @@ function Calendar({
|
|
|
3399
3589
|
week: "flex mt-1",
|
|
3400
3590
|
day: "size-12 text-center",
|
|
3401
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",
|
|
3402
|
-
selected: "[&>button]:text-primary-
|
|
3592
|
+
selected: "[&>button]:text-primary-fg [&>button]:bg-primary [&>button:hover]:bg-primary",
|
|
3403
3593
|
outside: "invisible",
|
|
3404
|
-
disabled: "text-
|
|
3594
|
+
disabled: "text-fg-disabled pointer-events-none opacity-50",
|
|
3405
3595
|
today: "[&>button]:font-bold"
|
|
3406
3596
|
},
|
|
3407
3597
|
components: {
|
|
@@ -3586,7 +3776,7 @@ function Checkbox({
|
|
|
3586
3776
|
);
|
|
3587
3777
|
}
|
|
3588
3778
|
function Label({
|
|
3589
|
-
size = "
|
|
3779
|
+
size = "sm",
|
|
3590
3780
|
weight = "semibold",
|
|
3591
3781
|
lineHeight = "loose",
|
|
3592
3782
|
...props
|
|
@@ -3627,13 +3817,13 @@ function CheckboxGroup({
|
|
|
3627
3817
|
)
|
|
3628
3818
|
] });
|
|
3629
3819
|
}
|
|
3630
|
-
function Code({ className, children, ...props }) {
|
|
3820
|
+
function Code({ className, children, size = "sm", ...props }) {
|
|
3631
3821
|
return /* @__PURE__ */ jsx(
|
|
3632
3822
|
Text,
|
|
3633
3823
|
{
|
|
3634
3824
|
...props,
|
|
3635
3825
|
as: "code",
|
|
3636
|
-
size
|
|
3826
|
+
size,
|
|
3637
3827
|
weight: "medium",
|
|
3638
3828
|
className: cn("font-mono bg-surface-sunken rounded p-1", className),
|
|
3639
3829
|
children
|
|
@@ -3668,9 +3858,9 @@ function CollapsibleTrigger({ className, children, ...props }) {
|
|
|
3668
3858
|
{
|
|
3669
3859
|
...props,
|
|
3670
3860
|
className: cn(
|
|
3671
|
-
"flex items-center gap-2 cursor-pointer outline-none text-
|
|
3861
|
+
"flex items-center gap-2 cursor-pointer outline-none text-sm",
|
|
3672
3862
|
"focus-visible:ring-2 focus-visible:ring-focus-ring rounded",
|
|
3673
|
-
"disabled:text-
|
|
3863
|
+
"disabled:text-fg-disabled disabled:cursor-default",
|
|
3674
3864
|
className
|
|
3675
3865
|
),
|
|
3676
3866
|
children
|
|
@@ -3810,7 +4000,7 @@ function List({
|
|
|
3810
4000
|
};
|
|
3811
4001
|
const classes = cn(
|
|
3812
4002
|
"grid outline-none overflow-auto gap-1",
|
|
3813
|
-
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",
|
|
3814
4004
|
className
|
|
3815
4005
|
);
|
|
3816
4006
|
if (parent.kind === "select") {
|
|
@@ -3839,7 +4029,7 @@ function List({
|
|
|
3839
4029
|
}
|
|
3840
4030
|
return listbox;
|
|
3841
4031
|
}
|
|
3842
|
-
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";
|
|
3843
4033
|
function ListItem({
|
|
3844
4034
|
id,
|
|
3845
4035
|
value,
|
|
@@ -3921,147 +4111,21 @@ function ListSection({ title, className, children, ...props }) {
|
|
|
3921
4111
|
const { kind } = useContext(ListContext);
|
|
3922
4112
|
if (kind === "select") {
|
|
3923
4113
|
return /* @__PURE__ */ jsxs(Select$1.Group, { ...props, className: cn("[&:not(:last-child)]:mb-4", className), children: [
|
|
3924
|
-
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 }),
|
|
3925
4115
|
children
|
|
3926
4116
|
] });
|
|
3927
4117
|
}
|
|
3928
4118
|
if (kind === "combobox") {
|
|
3929
4119
|
return /* @__PURE__ */ jsxs(Combobox.Group, { ...props, className: cn("[&:not(:last-child)]:mb-4", className), children: [
|
|
3930
|
-
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 }),
|
|
3931
4121
|
children
|
|
3932
4122
|
] });
|
|
3933
4123
|
}
|
|
3934
4124
|
return /* @__PURE__ */ jsxs("div", { ...props, role: "group", className: cn("[&:not(:last-child)]:mb-4", className), children: [
|
|
3935
|
-
title && /* @__PURE__ */ jsx("div", { className: "text-
|
|
4125
|
+
title && /* @__PURE__ */ jsx("div", { className: "text-sm font-bold px-2 py-1.5", children: title }),
|
|
3936
4126
|
children
|
|
3937
4127
|
] });
|
|
3938
4128
|
}
|
|
3939
|
-
var InputGroup = forwardRef(
|
|
3940
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3941
|
-
"div",
|
|
3942
|
-
{
|
|
3943
|
-
...props,
|
|
3944
|
-
ref,
|
|
3945
|
-
"data-slot": "input-group",
|
|
3946
|
-
role: props.role ?? "group",
|
|
3947
|
-
className: inputField({
|
|
3948
|
-
variant,
|
|
3949
|
-
className: cn(
|
|
3950
|
-
"group/input-group w-full min-w-0 gap-0 p-0",
|
|
3951
|
-
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col",
|
|
3952
|
-
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col",
|
|
3953
|
-
"has-[>textarea]:h-auto",
|
|
3954
|
-
className
|
|
3955
|
-
)
|
|
3956
|
-
})
|
|
3957
|
-
}
|
|
3958
|
-
)
|
|
3959
|
-
);
|
|
3960
|
-
InputGroup.displayName = "InputGroup";
|
|
3961
|
-
var addonClasses = {
|
|
3962
|
-
"inline-start": "order-first ps-3",
|
|
3963
|
-
"inline-end": "order-last pe-3",
|
|
3964
|
-
"block-start": "order-first w-full justify-start px-3 pt-3",
|
|
3965
|
-
"block-end": "order-last w-full justify-start px-3 pb-3"
|
|
3966
|
-
};
|
|
3967
|
-
var InputGroupAddon = forwardRef(
|
|
3968
|
-
({ align = "inline-start", className, onClick, ...props }, ref) => {
|
|
3969
|
-
const handleClick = (event) => {
|
|
3970
|
-
onClick?.(event);
|
|
3971
|
-
if (event.defaultPrevented || event.target.closest("button")) {
|
|
3972
|
-
return;
|
|
3973
|
-
}
|
|
3974
|
-
event.currentTarget.parentElement?.querySelector('[data-slot="input-group-control"]')?.focus();
|
|
3975
|
-
};
|
|
3976
|
-
return /* @__PURE__ */ jsx(
|
|
3977
|
-
"div",
|
|
3978
|
-
{
|
|
3979
|
-
...props,
|
|
3980
|
-
ref,
|
|
3981
|
-
role: props.role ?? "group",
|
|
3982
|
-
"data-slot": "input-group-addon",
|
|
3983
|
-
"data-align": align,
|
|
3984
|
-
className: cn(
|
|
3985
|
-
"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",
|
|
3986
|
-
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
3987
|
-
addonClasses[align],
|
|
3988
|
-
className
|
|
3989
|
-
),
|
|
3990
|
-
onClick: handleClick
|
|
3991
|
-
}
|
|
3992
|
-
);
|
|
3993
|
-
}
|
|
3994
|
-
);
|
|
3995
|
-
InputGroupAddon.displayName = "InputGroupAddon";
|
|
3996
|
-
var buttonSizeClasses = {
|
|
3997
|
-
xs: "h-6 gap-1 rounded px-1.5 py-0 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
|
|
3998
|
-
sm: "h-8 gap-2 rounded px-2 py-0 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
|
|
3999
|
-
"icon-xs": "size-6 rounded p-0",
|
|
4000
|
-
"icon-sm": "size-8 rounded p-0"
|
|
4001
|
-
};
|
|
4002
|
-
var InputGroupButton = forwardRef(
|
|
4003
|
-
({ className, size = "xs", type = "button", variant = "quiet", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4004
|
-
Button,
|
|
4005
|
-
{
|
|
4006
|
-
...props,
|
|
4007
|
-
ref,
|
|
4008
|
-
type,
|
|
4009
|
-
variant,
|
|
4010
|
-
size: "xs",
|
|
4011
|
-
"data-size": size,
|
|
4012
|
-
className: cn(
|
|
4013
|
-
"shrink-0 shadow-none",
|
|
4014
|
-
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
4015
|
-
buttonSizeClasses[size],
|
|
4016
|
-
className
|
|
4017
|
-
)
|
|
4018
|
-
}
|
|
4019
|
-
)
|
|
4020
|
-
);
|
|
4021
|
-
InputGroupButton.displayName = "InputGroupButton";
|
|
4022
|
-
var InputGroupText = forwardRef(
|
|
4023
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4024
|
-
"span",
|
|
4025
|
-
{
|
|
4026
|
-
...props,
|
|
4027
|
-
ref,
|
|
4028
|
-
"data-slot": "input-group-text",
|
|
4029
|
-
className: cn(
|
|
4030
|
-
"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",
|
|
4031
|
-
className
|
|
4032
|
-
)
|
|
4033
|
-
}
|
|
4034
|
-
)
|
|
4035
|
-
);
|
|
4036
|
-
InputGroupText.displayName = "InputGroupText";
|
|
4037
|
-
var InputGroupInput = forwardRef(
|
|
4038
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4039
|
-
"input",
|
|
4040
|
-
{
|
|
4041
|
-
...props,
|
|
4042
|
-
ref,
|
|
4043
|
-
"data-slot": "input-group-control",
|
|
4044
|
-
className: cn(
|
|
4045
|
-
"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",
|
|
4046
|
-
className
|
|
4047
|
-
)
|
|
4048
|
-
}
|
|
4049
|
-
)
|
|
4050
|
-
);
|
|
4051
|
-
InputGroupInput.displayName = "InputGroupInput";
|
|
4052
|
-
var InputGroupTextarea = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4053
|
-
"textarea",
|
|
4054
|
-
{
|
|
4055
|
-
...props,
|
|
4056
|
-
ref,
|
|
4057
|
-
"data-slot": "input-group-control",
|
|
4058
|
-
className: cn(
|
|
4059
|
-
"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",
|
|
4060
|
-
className
|
|
4061
|
-
)
|
|
4062
|
-
}
|
|
4063
|
-
));
|
|
4064
|
-
InputGroupTextarea.displayName = "InputGroupTextarea";
|
|
4065
4129
|
var scrollbarClasses = [
|
|
4066
4130
|
"flex touch-none select-none justify-center rounded bg-transparent",
|
|
4067
4131
|
"opacity-0 transition-opacity duration-200 delay-300",
|
|
@@ -4163,10 +4227,10 @@ function ComboBox({
|
|
|
4163
4227
|
disabled: isDisabled,
|
|
4164
4228
|
onValueChange: onChange,
|
|
4165
4229
|
children: /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
|
|
4166
|
-
label && /* @__PURE__ */ jsx(Combobox.Label, { className: "text-
|
|
4230
|
+
label && /* @__PURE__ */ jsx(Combobox.Label, { className: "text-sm font-semibold", children: label }),
|
|
4167
4231
|
/* @__PURE__ */ jsxs(Combobox.InputGroup, { render: /* @__PURE__ */ jsx(InputGroup, {}), children: [
|
|
4168
4232
|
/* @__PURE__ */ jsx(Combobox.Input, { placeholder, render: /* @__PURE__ */ jsx(InputGroupInput, {}) }),
|
|
4169
|
-
/* @__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, {}) }) }) })
|
|
4170
4234
|
] }),
|
|
4171
4235
|
/* @__PURE__ */ jsx(Combobox.Portal, { children: /* @__PURE__ */ jsx(
|
|
4172
4236
|
Combobox.Positioner,
|
|
@@ -4183,7 +4247,7 @@ function ComboBox({
|
|
|
4183
4247
|
}
|
|
4184
4248
|
return item.element ?? /* @__PURE__ */ jsx(ListItem, { value: item.value, children: item.label }, item.value);
|
|
4185
4249
|
} }) }) }) }),
|
|
4186
|
-
/* @__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." }) }) })
|
|
4187
4251
|
] })
|
|
4188
4252
|
}
|
|
4189
4253
|
) })
|
|
@@ -4224,7 +4288,7 @@ function Command({ className, children, ...props }) {
|
|
|
4224
4288
|
{
|
|
4225
4289
|
...props,
|
|
4226
4290
|
className: cn(
|
|
4227
|
-
"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",
|
|
4228
4292
|
className
|
|
4229
4293
|
),
|
|
4230
4294
|
children
|
|
@@ -4233,15 +4297,15 @@ function Command({ className, children, ...props }) {
|
|
|
4233
4297
|
}
|
|
4234
4298
|
function CommandInput({ className, ...props }) {
|
|
4235
4299
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 border-b border-edge px-3", children: [
|
|
4236
|
-
/* @__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, {}) }),
|
|
4237
4301
|
/* @__PURE__ */ jsx(
|
|
4238
4302
|
Command$1.Input,
|
|
4239
4303
|
{
|
|
4240
4304
|
...props,
|
|
4241
4305
|
className: cn(
|
|
4242
|
-
"flex h-11 w-full bg-transparent text-
|
|
4243
|
-
"placeholder:text-
|
|
4244
|
-
"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",
|
|
4245
4309
|
className
|
|
4246
4310
|
)
|
|
4247
4311
|
}
|
|
@@ -4256,10 +4320,7 @@ function CommandEmpty({ className, ...props }) {
|
|
|
4256
4320
|
Command$1.Empty,
|
|
4257
4321
|
{
|
|
4258
4322
|
...props,
|
|
4259
|
-
className: cn(
|
|
4260
|
-
"py-6 text-center text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] text-foreground-muted",
|
|
4261
|
-
className
|
|
4262
|
-
)
|
|
4323
|
+
className: cn("py-6 text-center text-sm text-fg-muted", className)
|
|
4263
4324
|
}
|
|
4264
4325
|
);
|
|
4265
4326
|
}
|
|
@@ -4271,7 +4332,7 @@ function CommandGroup({ className, ...props }) {
|
|
|
4271
4332
|
className: cn(
|
|
4272
4333
|
"overflow-hidden [&:not(:last-child)]:mb-2",
|
|
4273
4334
|
"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5",
|
|
4274
|
-
"[&_[cmdk-group-heading]]:text-
|
|
4335
|
+
"[&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-bold [&_[cmdk-group-heading]]:text-fg-muted",
|
|
4275
4336
|
className
|
|
4276
4337
|
)
|
|
4277
4338
|
}
|
|
@@ -4284,9 +4345,9 @@ function CommandItem({ icon, isDisabled, className, children, ...props }) {
|
|
|
4284
4345
|
...props,
|
|
4285
4346
|
disabled: isDisabled,
|
|
4286
4347
|
className: cn(
|
|
4287
|
-
"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",
|
|
4288
4349
|
"data-[selected=true]:bg-interactive",
|
|
4289
|
-
"data-[disabled=true]:text-
|
|
4350
|
+
"data-[disabled=true]:text-fg-disabled data-[disabled=true]:cursor-default",
|
|
4290
4351
|
className
|
|
4291
4352
|
),
|
|
4292
4353
|
children: [
|
|
@@ -4395,14 +4456,14 @@ function TextField({
|
|
|
4395
4456
|
setInputValue(defaultValue ?? "");
|
|
4396
4457
|
}
|
|
4397
4458
|
}, [value, defaultValue]);
|
|
4398
|
-
const inputClasses = cn(resize && resizeClasses[resize]);
|
|
4459
|
+
const inputClasses = cn(allowCopy && asTextArea && "pe-12", resize && resizeClasses[resize]);
|
|
4399
4460
|
const input = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
4400
4461
|
InputGroup,
|
|
4401
4462
|
{
|
|
4402
4463
|
variant: variant === "quiet" ? "quiet" : "default",
|
|
4403
4464
|
className: cn(
|
|
4404
4465
|
isReadOnly && "focus-within:border-edge",
|
|
4405
|
-
isDisabled && "text-
|
|
4466
|
+
isDisabled && "text-fg-disabled",
|
|
4406
4467
|
variant === "quiet" && "text-[length:inherit]",
|
|
4407
4468
|
className
|
|
4408
4469
|
),
|
|
@@ -4433,17 +4494,14 @@ function TextField({
|
|
|
4433
4494
|
allowCopy && /* @__PURE__ */ jsx(
|
|
4434
4495
|
InputGroupAddon,
|
|
4435
4496
|
{
|
|
4436
|
-
align:
|
|
4437
|
-
className: cn(asTextArea && "
|
|
4497
|
+
align: "inline-end",
|
|
4498
|
+
className: cn(asTextArea && "absolute end-0 top-1 z-10"),
|
|
4438
4499
|
children: /* @__PURE__ */ jsx(
|
|
4439
4500
|
CopyButton,
|
|
4440
4501
|
{
|
|
4441
4502
|
value: String(inputValue),
|
|
4442
4503
|
"aria-disabled": !inputValue,
|
|
4443
|
-
className: cn(
|
|
4444
|
-
"text-foreground-muted hover:text-foreground-primary",
|
|
4445
|
-
!inputValue && "text-foreground-disabled"
|
|
4446
|
-
)
|
|
4504
|
+
className: cn("text-fg-muted hover:text-fg", !inputValue && "text-fg-disabled")
|
|
4447
4505
|
}
|
|
4448
4506
|
)
|
|
4449
4507
|
}
|
|
@@ -4484,7 +4542,7 @@ function ConfirmationDialog({
|
|
|
4484
4542
|
paddingY: "2",
|
|
4485
4543
|
marginY: "2",
|
|
4486
4544
|
borderRadius: "md",
|
|
4487
|
-
className: "font-mono text-
|
|
4545
|
+
className: "font-mono text-sm bg-surface-sunken",
|
|
4488
4546
|
children: value
|
|
4489
4547
|
}
|
|
4490
4548
|
),
|
|
@@ -4753,17 +4811,7 @@ function Table({
|
|
|
4753
4811
|
}),
|
|
4754
4812
|
[registerRow, rowKeys, selectedKeys, selectionMode, setAllSelected, setRowSelected]
|
|
4755
4813
|
);
|
|
4756
|
-
return /* @__PURE__ */ jsx(TableSelectionContext.Provider, { value: selection, children: /* @__PURE__ */ jsx(
|
|
4757
|
-
"table",
|
|
4758
|
-
{
|
|
4759
|
-
...props,
|
|
4760
|
-
className: cn(
|
|
4761
|
-
"grid text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] w-full relative",
|
|
4762
|
-
className
|
|
4763
|
-
),
|
|
4764
|
-
children
|
|
4765
|
-
}
|
|
4766
|
-
) });
|
|
4814
|
+
return /* @__PURE__ */ jsx(TableSelectionContext.Provider, { value: selection, children: /* @__PURE__ */ jsx("table", { ...props, className: cn("grid text-sm w-full relative", className), children }) });
|
|
4767
4815
|
}
|
|
4768
4816
|
function TableHeader({ children, className, style, ...props }) {
|
|
4769
4817
|
const cols = style?.gridTemplateColumns || gridTemplateColumns;
|
|
@@ -4898,55 +4946,45 @@ function DataTable({
|
|
|
4898
4946
|
return /* @__PURE__ */ jsx(DataCard, { data: items }, `${row.id}-${index}`);
|
|
4899
4947
|
}) });
|
|
4900
4948
|
}
|
|
4901
|
-
return /* @__PURE__ */ jsxs(
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
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
|
+
);
|
|
4913
4983
|
}
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: row data may not have unique ids
|
|
4919
|
-
/* @__PURE__ */ jsx(TableRow, { id: String(row.id), style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(
|
|
4920
|
-
({
|
|
4921
|
-
id,
|
|
4922
|
-
label: _label,
|
|
4923
|
-
width: _width,
|
|
4924
|
-
as,
|
|
4925
|
-
hidden,
|
|
4926
|
-
className: className2,
|
|
4927
|
-
children: children2,
|
|
4928
|
-
...cellProps
|
|
4929
|
-
}) => {
|
|
4930
|
-
if (hidden) {
|
|
4931
|
-
return null;
|
|
4932
|
-
}
|
|
4933
|
-
const value = typeof children2 === "function" ? children2(row, index) : children2 || row[id];
|
|
4934
|
-
return /* @__PURE__ */ createElement(
|
|
4935
|
-
TableCell,
|
|
4936
|
-
{
|
|
4937
|
-
...cellProps,
|
|
4938
|
-
key: id,
|
|
4939
|
-
className: cn("items-center", className2)
|
|
4940
|
-
},
|
|
4941
|
-
as ? createElement(as, {}, value) : value
|
|
4942
|
-
);
|
|
4943
|
-
}
|
|
4944
|
-
) }, index)
|
|
4945
|
-
);
|
|
4946
|
-
}) })
|
|
4947
|
-
]
|
|
4948
|
-
}
|
|
4949
|
-
);
|
|
4984
|
+
) }, index)
|
|
4985
|
+
);
|
|
4986
|
+
}) })
|
|
4987
|
+
] });
|
|
4950
4988
|
}
|
|
4951
4989
|
function DataColumn(_props) {
|
|
4952
4990
|
return null;
|
|
@@ -4966,7 +5004,7 @@ function Popover({
|
|
|
4966
5004
|
{
|
|
4967
5005
|
className: cn(
|
|
4968
5006
|
"zen-popover outline-none",
|
|
4969
|
-
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",
|
|
4970
5008
|
className
|
|
4971
5009
|
),
|
|
4972
5010
|
children
|
|
@@ -5015,7 +5053,7 @@ function DatePicker({
|
|
|
5015
5053
|
className: cn("justify-start gap-3 font-normal", buttonProps?.className),
|
|
5016
5054
|
children: [
|
|
5017
5055
|
/* @__PURE__ */ jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsx(icons_exports.CalendarDays, {}) }),
|
|
5018
|
-
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 })
|
|
5019
5057
|
]
|
|
5020
5058
|
}
|
|
5021
5059
|
),
|
|
@@ -5053,6 +5091,29 @@ function Dots({ size = "md", className, color: _color, ...props }) {
|
|
|
5053
5091
|
/* @__PURE__ */ jsx(Dot, { size })
|
|
5054
5092
|
] });
|
|
5055
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";
|
|
5056
5117
|
var Empty = forwardRef(
|
|
5057
5118
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5058
5119
|
"div",
|
|
@@ -5099,10 +5160,7 @@ var EmptyTitle = forwardRef(
|
|
|
5099
5160
|
...props,
|
|
5100
5161
|
ref,
|
|
5101
5162
|
"data-slot": "empty-title",
|
|
5102
|
-
className: cn(
|
|
5103
|
-
"text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)] font-medium tracking-tight",
|
|
5104
|
-
className
|
|
5105
|
-
)
|
|
5163
|
+
className: cn("text-lg font-medium tracking-tight", className)
|
|
5106
5164
|
}
|
|
5107
5165
|
)
|
|
5108
5166
|
);
|
|
@@ -5114,7 +5172,7 @@ var EmptyDescription = forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
5114
5172
|
ref,
|
|
5115
5173
|
"data-slot": "empty-description",
|
|
5116
5174
|
className: cn(
|
|
5117
|
-
"text-
|
|
5175
|
+
"text-fg-muted [&>a:hover]:text-fg text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",
|
|
5118
5176
|
className
|
|
5119
5177
|
)
|
|
5120
5178
|
}
|
|
@@ -5128,7 +5186,7 @@ var EmptyContent = forwardRef(
|
|
|
5128
5186
|
ref,
|
|
5129
5187
|
"data-slot": "empty-content",
|
|
5130
5188
|
className: cn(
|
|
5131
|
-
"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",
|
|
5132
5190
|
className
|
|
5133
5191
|
)
|
|
5134
5192
|
}
|
|
@@ -5263,10 +5321,7 @@ function Form({
|
|
|
5263
5321
|
{
|
|
5264
5322
|
...props,
|
|
5265
5323
|
autoComplete,
|
|
5266
|
-
className: cn(
|
|
5267
|
-
"flex flex-col relative text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] gap-3",
|
|
5268
|
-
className
|
|
5269
|
-
),
|
|
5324
|
+
className: cn("flex flex-col relative text-sm gap-3", className),
|
|
5270
5325
|
onSubmit: onSubmit ? handleSubmit(onSubmit) : void 0,
|
|
5271
5326
|
onKeyDown,
|
|
5272
5327
|
children: typeof children === "function" ? children(formValues) : children
|
|
@@ -5649,7 +5704,7 @@ function Toast({
|
|
|
5649
5704
|
"aria-hidden": true,
|
|
5650
5705
|
"aria-label": "Close",
|
|
5651
5706
|
size: "sm",
|
|
5652
|
-
className: "cursor-pointer text-
|
|
5707
|
+
className: "cursor-pointer text-fg-muted hover:text-fg",
|
|
5653
5708
|
onClick: () => onClose?.(TOAST_CLOSE_ACTION),
|
|
5654
5709
|
children: /* @__PURE__ */ jsx(icons_exports.X, {})
|
|
5655
5710
|
}
|
|
@@ -5784,7 +5839,7 @@ function Kbd({ className, children, ...props }) {
|
|
|
5784
5839
|
...props,
|
|
5785
5840
|
className: cn(
|
|
5786
5841
|
"inline-flex items-center justify-center gap-1",
|
|
5787
|
-
"text-
|
|
5842
|
+
"text-sm font-mono text-fg",
|
|
5788
5843
|
"px-1.5 py-0.5 rounded border border-edge bg-surface-raised shadow-sm",
|
|
5789
5844
|
className
|
|
5790
5845
|
),
|
|
@@ -5862,7 +5917,7 @@ function Menu({
|
|
|
5862
5917
|
onSelectionChange?.(next);
|
|
5863
5918
|
};
|
|
5864
5919
|
const popupClassName2 = cn(
|
|
5865
|
-
"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",
|
|
5866
5921
|
className
|
|
5867
5922
|
);
|
|
5868
5923
|
const popupContent = /* @__PURE__ */ jsx(MenuContext.Provider, { value: { selected, select }, children });
|
|
@@ -5908,9 +5963,9 @@ function MenuItem({
|
|
|
5908
5963
|
}
|
|
5909
5964
|
};
|
|
5910
5965
|
const itemClassName = cn(
|
|
5911
|
-
"text-
|
|
5966
|
+
"text-sm flex items-center justify-between gap-3 px-2 py-1.5 rounded cursor-pointer outline-none w-full",
|
|
5912
5967
|
"hover:bg-interactive focus:bg-interactive data-[highlighted]:bg-interactive",
|
|
5913
|
-
"data-[disabled]:text-
|
|
5968
|
+
"data-[disabled]:text-fg-disabled",
|
|
5914
5969
|
"data-[selected]:font-semibold",
|
|
5915
5970
|
className
|
|
5916
5971
|
);
|
|
@@ -5999,7 +6054,7 @@ function MenuSection({
|
|
|
5999
6054
|
const groupStyle = style;
|
|
6000
6055
|
const body = maxHeight ? /* @__PURE__ */ jsx(ScrollArea, { maxHeight, children }) : children;
|
|
6001
6056
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6002
|
-
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 })),
|
|
6003
6058
|
body
|
|
6004
6059
|
] });
|
|
6005
6060
|
if (primitiveKind === "context-menu") {
|
|
@@ -6086,7 +6141,7 @@ function Meter({
|
|
|
6086
6141
|
var NavbarContext = createContext({ showArrow: true });
|
|
6087
6142
|
var triggerClassName = cn(
|
|
6088
6143
|
"flex items-center gap-1 select-none cursor-pointer rounded-md px-3 py-2",
|
|
6089
|
-
"text-
|
|
6144
|
+
"text-sm font-medium text-fg bg-transparent border-0",
|
|
6090
6145
|
"hover:bg-interactive data-[popup-open]:bg-interactive",
|
|
6091
6146
|
"outline-none [&:focus-visible]:outline-2 [&:focus-visible]:outline-offset-1 [&:focus-visible]:outline-focus-ring"
|
|
6092
6147
|
);
|
|
@@ -6120,7 +6175,7 @@ var popupClassName = cn(
|
|
|
6120
6175
|
"relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin)",
|
|
6121
6176
|
// `overflow-hidden` clips the nested menu's square background to the rounded
|
|
6122
6177
|
// corners so the popup border stays visible all the way around.
|
|
6123
|
-
"overflow-hidden rounded-md border border-edge bg-surface
|
|
6178
|
+
"overflow-hidden rounded-md border border-edge bg-surface shadow-lg outline-none",
|
|
6124
6179
|
"transition-[opacity,transform,width,height,scale,translate] duration-(--duration) ease-(--easing)",
|
|
6125
6180
|
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
6126
6181
|
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[ending-style]:ease-[ease]"
|
|
@@ -6161,7 +6216,7 @@ function NavbarItem({
|
|
|
6161
6216
|
return /* @__PURE__ */ jsxs(NavigationMenu.Item, { ...props, children: [
|
|
6162
6217
|
/* @__PURE__ */ jsxs(NavigationMenu.Trigger, { className: cn(triggerClassName, className), children: [
|
|
6163
6218
|
/* @__PURE__ */ jsx(Text, { children: label }),
|
|
6164
|
-
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" }) })
|
|
6165
6220
|
] }),
|
|
6166
6221
|
/* @__PURE__ */ jsx(NavigationMenu.Content, { className: contentClassName, children })
|
|
6167
6222
|
] });
|
|
@@ -6173,7 +6228,7 @@ function NavbarLink({ className, ...props }) {
|
|
|
6173
6228
|
NavigationMenu.Link,
|
|
6174
6229
|
{
|
|
6175
6230
|
className: cn(
|
|
6176
|
-
"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",
|
|
6177
6232
|
"hover:bg-interactive",
|
|
6178
6233
|
"outline-none [&:focus-visible]:outline-2 [&:focus-visible]:outline-offset-1 [&:focus-visible]:outline-focus-ring",
|
|
6179
6234
|
className
|
|
@@ -6184,9 +6239,9 @@ function NavbarLink({ className, ...props }) {
|
|
|
6184
6239
|
}
|
|
6185
6240
|
var stepperClasses = [
|
|
6186
6241
|
"flex items-center justify-center self-stretch px-3 shrink-0",
|
|
6187
|
-
"cursor-pointer select-none bg-transparent text-
|
|
6242
|
+
"cursor-pointer select-none bg-transparent text-fg",
|
|
6188
6243
|
"hover:bg-interactive active:bg-interactive-hover",
|
|
6189
|
-
"disabled:text-
|
|
6244
|
+
"disabled:text-fg-disabled disabled:cursor-default disabled:hover:bg-transparent"
|
|
6190
6245
|
];
|
|
6191
6246
|
function NumberField({
|
|
6192
6247
|
label,
|
|
@@ -6224,7 +6279,7 @@ function NumberField({
|
|
|
6224
6279
|
NumberField$1.Input,
|
|
6225
6280
|
{
|
|
6226
6281
|
placeholder,
|
|
6227
|
-
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"
|
|
6228
6283
|
}
|
|
6229
6284
|
),
|
|
6230
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, {}) }) })
|
|
@@ -6264,11 +6319,11 @@ function OTPField({
|
|
|
6264
6319
|
OTPField$1.Input,
|
|
6265
6320
|
{
|
|
6266
6321
|
className: cn(
|
|
6267
|
-
"size-10 text-center text-
|
|
6268
|
-
"text-
|
|
6269
|
-
"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",
|
|
6270
6325
|
"data-[filled]:border-edge-strong",
|
|
6271
|
-
"disabled:bg-surface-disabled disabled:text-
|
|
6326
|
+
"disabled:bg-surface-disabled disabled:text-fg-disabled"
|
|
6272
6327
|
)
|
|
6273
6328
|
},
|
|
6274
6329
|
index
|
|
@@ -6371,7 +6426,7 @@ function Pagination({
|
|
|
6371
6426
|
(item, index) => item === "ellipsis" ? /* @__PURE__ */ jsx(
|
|
6372
6427
|
"span",
|
|
6373
6428
|
{
|
|
6374
|
-
className: "flex items-center justify-center size-9 text-
|
|
6429
|
+
className: "flex items-center justify-center size-9 text-fg-muted",
|
|
6375
6430
|
"aria-hidden": "true",
|
|
6376
6431
|
children: /* @__PURE__ */ jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsx(icons_exports.Ellipsis, {}) })
|
|
6377
6432
|
},
|
|
@@ -6494,6 +6549,34 @@ function PasswordField({
|
|
|
6494
6549
|
}
|
|
6495
6550
|
return input;
|
|
6496
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";
|
|
6497
6580
|
function ProgressBar({ className, showPercentage, ...props }) {
|
|
6498
6581
|
return /* @__PURE__ */ jsxs(Progress.Root, { ...props, className: cn("flex items-center gap-3 w-full", className), children: [
|
|
6499
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" }) }),
|
|
@@ -6544,7 +6627,7 @@ function ProgressCircle({
|
|
|
6544
6627
|
]
|
|
6545
6628
|
}
|
|
6546
6629
|
),
|
|
6547
|
-
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" })
|
|
6548
6631
|
]
|
|
6549
6632
|
}
|
|
6550
6633
|
);
|
|
@@ -6584,9 +6667,9 @@ function Radio({ children, className, isDisabled, ...props }) {
|
|
|
6584
6667
|
...props,
|
|
6585
6668
|
disabled: isDisabled,
|
|
6586
6669
|
className: cn(
|
|
6587
|
-
"radio group flex items-center gap-3 cursor-pointer text-
|
|
6670
|
+
"radio group flex items-center gap-3 cursor-pointer text-sm",
|
|
6588
6671
|
"before:content-[''] before:block before:w-5 before:h-5 before:box-border before:rounded-full",
|
|
6589
|
-
"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",
|
|
6590
6673
|
"data-[checked]:before:border-[6px] data-[checked]:before:border-primary",
|
|
6591
6674
|
"data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",
|
|
6592
6675
|
className
|
|
@@ -6634,7 +6717,7 @@ function ResizableHandle({ withHandle, className, ...props }) {
|
|
|
6634
6717
|
"z-10 flex h-5 w-3.5 items-center justify-center rounded-sm border border-edge bg-surface-raised",
|
|
6635
6718
|
isVertical && "rotate-90"
|
|
6636
6719
|
),
|
|
6637
|
-
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" })
|
|
6638
6721
|
}
|
|
6639
6722
|
)
|
|
6640
6723
|
}
|
|
@@ -6700,7 +6783,7 @@ function SearchField({
|
|
|
6700
6783
|
size: "icon-xs",
|
|
6701
6784
|
isDisabled: props.disabled,
|
|
6702
6785
|
"aria-label": "Clear search",
|
|
6703
|
-
className: "text-
|
|
6786
|
+
className: "text-fg-muted",
|
|
6704
6787
|
onClick: () => handleChange(""),
|
|
6705
6788
|
children: /* @__PURE__ */ jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsx(icons_exports.X, {}) })
|
|
6706
6789
|
}
|
|
@@ -6845,7 +6928,7 @@ function Select({
|
|
|
6845
6928
|
}
|
|
6846
6929
|
),
|
|
6847
6930
|
isLoading && /* @__PURE__ */ jsx(Loading, { className: "py-8", icon: "dots", placement: "center", size: "sm" }),
|
|
6848
|
-
!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" }),
|
|
6849
6932
|
/* @__PURE__ */ jsx(ListPrimitiveProvider, { kind: "select", children: /* @__PURE__ */ jsx(
|
|
6850
6933
|
ScrollArea,
|
|
6851
6934
|
{
|
|
@@ -6900,7 +6983,7 @@ function Sheet({
|
|
|
6900
6983
|
{
|
|
6901
6984
|
className: cn(
|
|
6902
6985
|
"relative p-6 overflow-auto outline-none",
|
|
6903
|
-
"bg-surface
|
|
6986
|
+
"bg-surface border-edge shadow-xl",
|
|
6904
6987
|
sideClasses[side],
|
|
6905
6988
|
className
|
|
6906
6989
|
),
|
|
@@ -6998,7 +7081,7 @@ function Slider({
|
|
|
6998
7081
|
children: [
|
|
6999
7082
|
/* @__PURE__ */ jsxs(Row, { justifyContent: "space-between", alignItems: "center", children: [
|
|
7000
7083
|
label && /* @__PURE__ */ jsx(Label, { id: labelId, children: label }),
|
|
7001
|
-
showValue && /* @__PURE__ */ jsx(Slider$1.Value, { className: "text-
|
|
7084
|
+
showValue && /* @__PURE__ */ jsx(Slider$1.Value, { className: "text-sm tabular-nums" })
|
|
7002
7085
|
] }),
|
|
7003
7086
|
/* @__PURE__ */ jsxs(Slider$1.Control, { className: "relative h-5 w-full touch-none", children: [
|
|
7004
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" }) }),
|
|
@@ -7006,7 +7089,7 @@ function Slider({
|
|
|
7006
7089
|
Slider$1.Thumb,
|
|
7007
7090
|
{
|
|
7008
7091
|
className: cn(
|
|
7009
|
-
"w-5 h-5 rounded-full bg-surface
|
|
7092
|
+
"w-5 h-5 rounded-full bg-surface border-2 border-primary shadow",
|
|
7010
7093
|
"focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2"
|
|
7011
7094
|
)
|
|
7012
7095
|
}
|
|
@@ -7037,19 +7120,10 @@ function StatusDot({ color, variant }) {
|
|
|
7037
7120
|
}
|
|
7038
7121
|
function StatusLight(props) {
|
|
7039
7122
|
const { color, variant = "inactive", children, className, ...domProps } = props;
|
|
7040
|
-
return /* @__PURE__ */ jsxs(
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
alignItems: "center",
|
|
7045
|
-
gap: "2",
|
|
7046
|
-
className: cn("text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]", className),
|
|
7047
|
-
children: [
|
|
7048
|
-
/* @__PURE__ */ jsx(StatusDot, { color, variant }),
|
|
7049
|
-
children
|
|
7050
|
-
]
|
|
7051
|
-
}
|
|
7052
|
-
);
|
|
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
|
+
] });
|
|
7053
7127
|
}
|
|
7054
7128
|
function Switch({
|
|
7055
7129
|
label,
|
|
@@ -7131,10 +7205,10 @@ function Tab({ id, value, isDisabled, href, children, className, ...props }) {
|
|
|
7131
7205
|
render: href ? /* @__PURE__ */ jsx("a", { href }) : void 0,
|
|
7132
7206
|
nativeButton: !href,
|
|
7133
7207
|
className: cn(
|
|
7134
|
-
"tab flex items-center justify-center text-
|
|
7135
|
-
"hover:text-
|
|
7136
|
-
"data-[active]:text-
|
|
7137
|
-
"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",
|
|
7138
7212
|
className
|
|
7139
7213
|
),
|
|
7140
7214
|
children
|
|
@@ -7307,7 +7381,7 @@ function ThemeSwitcher({ className }) {
|
|
|
7307
7381
|
"div",
|
|
7308
7382
|
{
|
|
7309
7383
|
className: cn(
|
|
7310
|
-
"inline-flex items-center bg-surface
|
|
7384
|
+
"inline-flex items-center bg-surface border border-edge rounded-md overflow-hidden",
|
|
7311
7385
|
className
|
|
7312
7386
|
),
|
|
7313
7387
|
children: options.map((option) => /* @__PURE__ */ jsx(
|
|
@@ -7322,7 +7396,7 @@ function ThemeSwitcher({ className }) {
|
|
|
7322
7396
|
"[&:not(:first-child)]:border-l [&:not(:first-child)]:border-edge",
|
|
7323
7397
|
"hover:bg-interactive",
|
|
7324
7398
|
"focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset",
|
|
7325
|
-
mode === option.value ? "bg-interactive text-
|
|
7399
|
+
mode === option.value ? "bg-interactive text-fg" : "text-fg-muted"
|
|
7326
7400
|
),
|
|
7327
7401
|
children: /* @__PURE__ */ jsx(Icon, { size: "sm", children: option.icon })
|
|
7328
7402
|
},
|
|
@@ -7354,7 +7428,7 @@ function Toggle({
|
|
|
7354
7428
|
className: cn(
|
|
7355
7429
|
"flex items-center justify-center whitespace-nowrap gap-3 font-medium bg-interactive border border-transparent rounded p-2 relative cursor-pointer",
|
|
7356
7430
|
"hover:bg-interactive-hover",
|
|
7357
|
-
"data-[pressed]:text-primary-
|
|
7431
|
+
"data-[pressed]:text-primary-fg data-[pressed]:bg-primary",
|
|
7358
7432
|
className
|
|
7359
7433
|
),
|
|
7360
7434
|
children
|
|
@@ -7398,7 +7472,7 @@ function ToggleGroup({
|
|
|
7398
7472
|
multiple: selectionMode === "multiple",
|
|
7399
7473
|
onValueChange: handleChange,
|
|
7400
7474
|
className: cn(
|
|
7401
|
-
"inline-flex bg-surface
|
|
7475
|
+
"inline-flex bg-surface shadow-sm border border-edge rounded overflow-hidden",
|
|
7402
7476
|
className
|
|
7403
7477
|
),
|
|
7404
7478
|
children
|
|
@@ -7427,11 +7501,11 @@ function ToggleGroupItem({
|
|
|
7427
7501
|
value: props.value || id,
|
|
7428
7502
|
disabled: isDisabled,
|
|
7429
7503
|
className: cn(
|
|
7430
|
-
"text-
|
|
7504
|
+
"text-fg-muted bg-surface font-bold flex items-center justify-center p-2 cursor-pointer outline-none",
|
|
7431
7505
|
"[&:not(:first-child)]:border-l [&:not(:first-child)]:border-edge",
|
|
7432
7506
|
"hover:bg-interactive",
|
|
7433
|
-
variant === "primary" ? "data-[pressed]:text-primary-
|
|
7434
|
-
"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",
|
|
7435
7509
|
className
|
|
7436
7510
|
),
|
|
7437
7511
|
children
|
|
@@ -7446,7 +7520,7 @@ function Toolbar({ isDisabled, orientation, className, children, ...props }) {
|
|
|
7446
7520
|
disabled: isDisabled,
|
|
7447
7521
|
orientation,
|
|
7448
7522
|
className: cn(
|
|
7449
|
-
"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",
|
|
7450
7524
|
orientation === "vertical" && "flex-col",
|
|
7451
7525
|
className
|
|
7452
7526
|
),
|
|
@@ -7477,6 +7551,6 @@ function ZenProvider({ children, theme, colorScheme, palette, toast: toast2 }) {
|
|
|
7477
7551
|
return /* @__PURE__ */ jsx(ToastProvider, { ...defaultToastConfig, ...toast2, children });
|
|
7478
7552
|
}
|
|
7479
7553
|
|
|
7480
|
-
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 };
|
|
7481
7555
|
//# sourceMappingURL=index.mjs.map
|
|
7482
7556
|
//# sourceMappingURL=index.mjs.map
|