@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.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
var accordion = require('@base-ui/react/accordion');
|
|
4
5
|
var lucide_react_star = require('lucide-react');
|
|
5
6
|
var react = require('react');
|
|
6
|
-
var
|
|
7
|
-
var tailwindMerge = require('tailwind-merge');
|
|
7
|
+
var cn = require('cn');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
var tailwindVariants = require('tailwind-variants');
|
|
10
10
|
var alertDialog = require('@base-ui/react/alert-dialog');
|
|
@@ -13,6 +13,7 @@ var dialog = require('@base-ui/react/dialog');
|
|
|
13
13
|
var popover = require('@base-ui/react/popover');
|
|
14
14
|
var menu = require('@base-ui/react/menu');
|
|
15
15
|
var tooltip$1 = require('@base-ui/react/tooltip');
|
|
16
|
+
var autocomplete = require('@base-ui/react/autocomplete');
|
|
16
17
|
var avatar$1 = require('@base-ui/react/avatar');
|
|
17
18
|
var separator = require('@base-ui/react/separator');
|
|
18
19
|
var reactDayPicker = require('react-day-picker');
|
|
@@ -25,6 +26,7 @@ var select = require('@base-ui/react/select');
|
|
|
25
26
|
var scrollArea = require('@base-ui/react/scroll-area');
|
|
26
27
|
var cmdk = require('cmdk');
|
|
27
28
|
var contextMenu = require('@base-ui/react/context-menu');
|
|
29
|
+
var drawer = require('@base-ui/react/drawer');
|
|
28
30
|
var reactHookForm = require('react-hook-form');
|
|
29
31
|
var zustand = require('zustand');
|
|
30
32
|
var web = require('@react-spring/web');
|
|
@@ -33,6 +35,7 @@ var meter = require('@base-ui/react/meter');
|
|
|
33
35
|
var navigationMenu = require('@base-ui/react/navigation-menu');
|
|
34
36
|
var numberField = require('@base-ui/react/number-field');
|
|
35
37
|
var otpField = require('@base-ui/react/otp-field');
|
|
38
|
+
var previewCard = require('@base-ui/react/preview-card');
|
|
36
39
|
var progress = require('@base-ui/react/progress');
|
|
37
40
|
var radio = require('@base-ui/react/radio');
|
|
38
41
|
var radioGroup = require('@base-ui/react/radio-group');
|
|
@@ -84,9 +87,6 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
84
87
|
// src/components/icons.tsx
|
|
85
88
|
var icons_exports = {};
|
|
86
89
|
__reExport(icons_exports, lucide_react_star__namespace);
|
|
87
|
-
function cn(...inputs) {
|
|
88
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
89
|
-
}
|
|
90
90
|
var paddingMap = {
|
|
91
91
|
"0": "p-0",
|
|
92
92
|
px: "p-px",
|
|
@@ -123,7 +123,7 @@ var paddingMap = {
|
|
|
123
123
|
"72": "p-72",
|
|
124
124
|
"80": "p-80",
|
|
125
125
|
"96": "p-96",
|
|
126
|
-
true: "px-[var(--zen-padding-x
|
|
126
|
+
true: "px-[var(--zen-padding-x)] py-[var(--zen-padding-y)]"
|
|
127
127
|
};
|
|
128
128
|
var pxMap = {
|
|
129
129
|
"0": "px-0",
|
|
@@ -161,7 +161,7 @@ var pxMap = {
|
|
|
161
161
|
"72": "px-72",
|
|
162
162
|
"80": "px-80",
|
|
163
163
|
"96": "px-96",
|
|
164
|
-
true: "px-[var(--zen-padding-x
|
|
164
|
+
true: "px-[var(--zen-padding-x)]"
|
|
165
165
|
};
|
|
166
166
|
var pyMap = {
|
|
167
167
|
"0": "py-0",
|
|
@@ -199,7 +199,7 @@ var pyMap = {
|
|
|
199
199
|
"72": "py-72",
|
|
200
200
|
"80": "py-80",
|
|
201
201
|
"96": "py-96",
|
|
202
|
-
true: "py-[var(--zen-padding-y
|
|
202
|
+
true: "py-[var(--zen-padding-y)]"
|
|
203
203
|
};
|
|
204
204
|
var ptMap = {
|
|
205
205
|
"0": "pt-0",
|
|
@@ -672,7 +672,7 @@ var gapMap = {
|
|
|
672
672
|
"72": "gap-72",
|
|
673
673
|
"80": "gap-80",
|
|
674
674
|
"96": "gap-96",
|
|
675
|
-
true: "gap-[var(--zen-gap
|
|
675
|
+
true: "gap-[var(--zen-gap)]"
|
|
676
676
|
};
|
|
677
677
|
var gapXMap = {
|
|
678
678
|
"0": "gap-x-0",
|
|
@@ -699,7 +699,7 @@ var gapXMap = {
|
|
|
699
699
|
"24": "gap-x-24",
|
|
700
700
|
"28": "gap-x-28",
|
|
701
701
|
"32": "gap-x-32",
|
|
702
|
-
true: "gap-x-[var(--zen-gap
|
|
702
|
+
true: "gap-x-[var(--zen-gap)]"
|
|
703
703
|
};
|
|
704
704
|
var gapYMap = {
|
|
705
705
|
"0": "gap-y-0",
|
|
@@ -726,7 +726,7 @@ var gapYMap = {
|
|
|
726
726
|
"24": "gap-y-24",
|
|
727
727
|
"28": "gap-y-28",
|
|
728
728
|
"32": "gap-y-32",
|
|
729
|
-
true: "gap-y-[var(--zen-gap
|
|
729
|
+
true: "gap-y-[var(--zen-gap)]"
|
|
730
730
|
};
|
|
731
731
|
var spaceXMap = {
|
|
732
732
|
"0": "space-x-0",
|
|
@@ -803,33 +803,33 @@ var spaceYMap = {
|
|
|
803
803
|
"96": "space-y-96"
|
|
804
804
|
};
|
|
805
805
|
var fontSizeMap = {
|
|
806
|
-
xs: "text-
|
|
807
|
-
sm: "text-
|
|
808
|
-
base: "text-
|
|
809
|
-
lg: "text-
|
|
810
|
-
xl: "text-
|
|
811
|
-
"2xl": "text-
|
|
812
|
-
"3xl": "text-
|
|
813
|
-
"4xl": "text-
|
|
814
|
-
"5xl": "text-
|
|
815
|
-
"6xl": "text-
|
|
816
|
-
"7xl": "text-
|
|
817
|
-
"8xl": "text-
|
|
818
|
-
"9xl": "text-
|
|
806
|
+
xs: "text-xs",
|
|
807
|
+
sm: "text-sm",
|
|
808
|
+
base: "text-base",
|
|
809
|
+
lg: "text-lg",
|
|
810
|
+
xl: "text-xl",
|
|
811
|
+
"2xl": "text-2xl",
|
|
812
|
+
"3xl": "text-3xl",
|
|
813
|
+
"4xl": "text-4xl",
|
|
814
|
+
"5xl": "text-5xl",
|
|
815
|
+
"6xl": "text-6xl",
|
|
816
|
+
"7xl": "text-7xl",
|
|
817
|
+
"8xl": "text-8xl",
|
|
818
|
+
"9xl": "text-9xl"
|
|
819
819
|
};
|
|
820
820
|
var headingSizeMap = {
|
|
821
|
-
sm: "text-
|
|
822
|
-
base: "text-
|
|
823
|
-
lg: "text-
|
|
824
|
-
xl: "text-
|
|
825
|
-
"2xl": "text-
|
|
826
|
-
"3xl": "text-
|
|
827
|
-
"4xl": "text-
|
|
828
|
-
"5xl": "text-
|
|
829
|
-
"6xl": "text-
|
|
830
|
-
"7xl": "text-
|
|
831
|
-
"8xl": "text-
|
|
832
|
-
"9xl": "text-
|
|
821
|
+
sm: "text-sm",
|
|
822
|
+
base: "text-base",
|
|
823
|
+
lg: "text-lg",
|
|
824
|
+
xl: "text-xl",
|
|
825
|
+
"2xl": "text-2xl",
|
|
826
|
+
"3xl": "text-3xl",
|
|
827
|
+
"4xl": "text-4xl",
|
|
828
|
+
"5xl": "text-5xl",
|
|
829
|
+
"6xl": "text-6xl",
|
|
830
|
+
"7xl": "text-7xl",
|
|
831
|
+
"8xl": "text-8xl",
|
|
832
|
+
"9xl": "text-9xl"
|
|
833
833
|
};
|
|
834
834
|
var fontWeightMap = {
|
|
835
835
|
thin: "font-thin",
|
|
@@ -851,7 +851,7 @@ var borderRadiusMap = {
|
|
|
851
851
|
"2xl": "rounded-2xl",
|
|
852
852
|
"3xl": "rounded-3xl",
|
|
853
853
|
full: "rounded-full",
|
|
854
|
-
true: "rounded-[var(--zen-radius
|
|
854
|
+
true: "rounded-[var(--zen-radius)]"
|
|
855
855
|
};
|
|
856
856
|
var borderWidthMap = {
|
|
857
857
|
sm: "border",
|
|
@@ -867,17 +867,17 @@ var shadowMap = {
|
|
|
867
867
|
xl: "shadow-xl",
|
|
868
868
|
"2xl": "shadow-2xl",
|
|
869
869
|
inner: "shadow-inner",
|
|
870
|
-
true: "shadow-[var(--zen-shadow
|
|
870
|
+
true: "shadow-[var(--zen-shadow)]"
|
|
871
871
|
};
|
|
872
872
|
var semanticColorMap = {
|
|
873
|
-
primary: { text: "text-
|
|
874
|
-
muted: { text: "text-
|
|
875
|
-
inverted: { text: "text-surface
|
|
876
|
-
disabled: { text: "text-
|
|
873
|
+
primary: { text: "text-fg", bg: "bg-primary" },
|
|
874
|
+
muted: { text: "text-fg-muted", bg: "bg-surface-raised" },
|
|
875
|
+
inverted: { text: "text-surface", bg: "bg-surface-inverted" },
|
|
876
|
+
disabled: { text: "text-fg-disabled", bg: "bg-surface-disabled" },
|
|
877
877
|
transparent: { text: "text-transparent", bg: "bg-transparent" },
|
|
878
|
-
true: { text: "text-
|
|
878
|
+
true: { text: "text-fg", bg: "bg-interactive" },
|
|
879
879
|
// Surface colors
|
|
880
|
-
|
|
880
|
+
surface: { text: "", bg: "bg-surface" },
|
|
881
881
|
"surface-raised": { text: "", bg: "bg-surface-raised" },
|
|
882
882
|
"surface-sunken": { text: "", bg: "bg-surface-sunken" },
|
|
883
883
|
"surface-overlay": { text: "", bg: "bg-surface-overlay" },
|
|
@@ -1379,9 +1379,9 @@ function mapBorderColor(value) {
|
|
|
1379
1379
|
return "";
|
|
1380
1380
|
}
|
|
1381
1381
|
var semanticCssColorValues = {
|
|
1382
|
-
primary: "var(--zen-
|
|
1383
|
-
muted: "var(--zen-
|
|
1384
|
-
disabled: "var(--zen-
|
|
1382
|
+
primary: "var(--zen-fg)",
|
|
1383
|
+
muted: "var(--zen-fg-muted)",
|
|
1384
|
+
disabled: "var(--zen-fg-disabled)"
|
|
1385
1385
|
};
|
|
1386
1386
|
var tailwindColorHex = {
|
|
1387
1387
|
gray: {
|
|
@@ -2112,14 +2112,14 @@ function Icon({
|
|
|
2112
2112
|
...props
|
|
2113
2113
|
}) {
|
|
2114
2114
|
const colorStr = color === true ? "true" : color;
|
|
2115
|
-
const wrapperClasses = cn("inline-flex items-center justify-center shrink-0");
|
|
2115
|
+
const wrapperClasses = cn.cn("inline-flex items-center justify-center shrink-0");
|
|
2116
2116
|
const strokeColorStr = strokeColor === true ? void 0 : strokeColor;
|
|
2117
2117
|
const fillColorStr = fillColor === true ? void 0 : fillColor;
|
|
2118
2118
|
const wrapperStyle = {
|
|
2119
2119
|
...style,
|
|
2120
2120
|
transform: rotate ? `rotate(${rotate}deg)` : void 0
|
|
2121
2121
|
};
|
|
2122
|
-
const svgClasses = cn(
|
|
2122
|
+
const svgClasses = cn.cn(
|
|
2123
2123
|
sizeMap[size],
|
|
2124
2124
|
mapTextColor(colorStr),
|
|
2125
2125
|
strokeWidth && strokeWidthMap[strokeWidth],
|
|
@@ -2159,7 +2159,7 @@ function resolveRender(render, props, defaultElement) {
|
|
|
2159
2159
|
}
|
|
2160
2160
|
function Text({
|
|
2161
2161
|
color,
|
|
2162
|
-
size = "
|
|
2162
|
+
size = "sm",
|
|
2163
2163
|
weight,
|
|
2164
2164
|
align,
|
|
2165
2165
|
spacing,
|
|
@@ -2185,7 +2185,7 @@ function Text({
|
|
|
2185
2185
|
const Component = as;
|
|
2186
2186
|
const colorStr = color === true ? "true" : color;
|
|
2187
2187
|
const decorationColorStr = decorationColor === true ? "true" : decorationColor;
|
|
2188
|
-
const classes = cn(
|
|
2188
|
+
const classes = cn.cn(
|
|
2189
2189
|
mapFontSize(size),
|
|
2190
2190
|
mapFontWeight(weight),
|
|
2191
2191
|
mapTextAlign(align),
|
|
@@ -2232,10 +2232,7 @@ function Accordion({
|
|
|
2232
2232
|
value: expandedKeys ? Array.from(expandedKeys) : void 0,
|
|
2233
2233
|
defaultValue: defaultExpandedKeys ? Array.from(defaultExpandedKeys) : void 0,
|
|
2234
2234
|
onValueChange: (value) => onExpandedChange?.(new Set(value)),
|
|
2235
|
-
className: cn(
|
|
2236
|
-
"flex flex-col items-start w-full gap-2 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
|
|
2237
|
-
className
|
|
2238
|
-
),
|
|
2235
|
+
className: cn.cn("flex flex-col items-start w-full gap-2 text-sm", className),
|
|
2239
2236
|
children
|
|
2240
2237
|
}
|
|
2241
2238
|
);
|
|
@@ -2255,7 +2252,7 @@ function AccordionItem({
|
|
|
2255
2252
|
...props,
|
|
2256
2253
|
value: value || id,
|
|
2257
2254
|
disabled: isDisabled,
|
|
2258
|
-
className: cn("w-full cursor-pointer group", className),
|
|
2255
|
+
className: cn.cn("w-full cursor-pointer group", className),
|
|
2259
2256
|
children: [
|
|
2260
2257
|
/* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Header, { className: "m-0 text-[length:inherit]", children: /* @__PURE__ */ jsxRuntime.jsxs(accordion.Accordion.Trigger, { className: "w-full flex items-center justify-between font-bold py-2 px-0", children: [
|
|
2261
2258
|
/* @__PURE__ */ jsxRuntime.jsx(Text, { children: trigger }),
|
|
@@ -2271,33 +2268,33 @@ var button = tailwindVariants.tv({
|
|
|
2271
2268
|
"inline-flex items-center justify-center gap-3 whitespace-nowrap",
|
|
2272
2269
|
"font-medium rounded border border-transparent cursor-pointer",
|
|
2273
2270
|
"transition-colors leading-normal relative no-underline",
|
|
2274
|
-
"outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface
|
|
2271
|
+
"outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface"
|
|
2275
2272
|
],
|
|
2276
2273
|
variants: {
|
|
2277
2274
|
variant: {
|
|
2278
2275
|
default: [
|
|
2279
|
-
"bg-interactive text-
|
|
2276
|
+
"bg-interactive text-fg",
|
|
2280
2277
|
"hover:bg-interactive-hover",
|
|
2281
2278
|
"pressed:bg-interactive-pressed",
|
|
2282
|
-
"disabled:text-
|
|
2279
|
+
"disabled:text-fg-disabled"
|
|
2283
2280
|
],
|
|
2284
2281
|
primary: [
|
|
2285
|
-
"bg-primary text-primary-
|
|
2282
|
+
"bg-primary text-primary-fg",
|
|
2286
2283
|
"hover:opacity-90",
|
|
2287
2284
|
"pressed:opacity-80",
|
|
2288
2285
|
"disabled:opacity-50"
|
|
2289
2286
|
],
|
|
2290
2287
|
outline: [
|
|
2291
|
-
"bg-surface
|
|
2288
|
+
"bg-surface border-edge shadow-sm text-fg",
|
|
2292
2289
|
"hover:border-edge-strong",
|
|
2293
2290
|
"pressed:bg-surface-raised",
|
|
2294
|
-
"disabled:bg-surface-disabled disabled:text-
|
|
2291
|
+
"disabled:bg-surface-disabled disabled:text-fg-disabled"
|
|
2295
2292
|
],
|
|
2296
2293
|
quiet: [
|
|
2297
2294
|
"bg-transparent",
|
|
2298
2295
|
"hover:bg-interactive",
|
|
2299
2296
|
"pressed:bg-interactive-hover",
|
|
2300
|
-
"disabled:text-
|
|
2297
|
+
"disabled:text-fg-disabled"
|
|
2301
2298
|
],
|
|
2302
2299
|
danger: [
|
|
2303
2300
|
"bg-status-error text-white",
|
|
@@ -2309,15 +2306,15 @@ var button = tailwindVariants.tv({
|
|
|
2309
2306
|
"bg-transparent border-0",
|
|
2310
2307
|
"hover:bg-transparent",
|
|
2311
2308
|
"pressed:bg-transparent",
|
|
2312
|
-
"disabled:text-
|
|
2309
|
+
"disabled:text-fg-disabled"
|
|
2313
2310
|
]
|
|
2314
2311
|
},
|
|
2315
2312
|
size: {
|
|
2316
|
-
xs: "text-
|
|
2317
|
-
sm: "text-
|
|
2318
|
-
md: "text-
|
|
2319
|
-
lg: "text-
|
|
2320
|
-
xl: "text-
|
|
2313
|
+
xs: "text-xs py-1 px-2",
|
|
2314
|
+
sm: "text-sm py-1.5 px-2.5",
|
|
2315
|
+
md: "text-sm py-2 px-3",
|
|
2316
|
+
lg: "text-base py-2.5 px-4",
|
|
2317
|
+
xl: "text-lg py-3 px-5"
|
|
2321
2318
|
}
|
|
2322
2319
|
},
|
|
2323
2320
|
defaultVariants: {
|
|
@@ -2328,8 +2325,8 @@ var button = tailwindVariants.tv({
|
|
|
2328
2325
|
var inputField = tailwindVariants.tv({
|
|
2329
2326
|
base: [
|
|
2330
2327
|
"relative flex items-center",
|
|
2331
|
-
"text-
|
|
2332
|
-
"leading-6 text-
|
|
2328
|
+
"text-sm rounded border border-edge bg-surface shadow-sm",
|
|
2329
|
+
"leading-6 text-fg transition-colors",
|
|
2333
2330
|
"focus-within:border-edge-strong",
|
|
2334
2331
|
"has-[input:read-only]:bg-surface-raised has-[textarea:read-only]:bg-surface-raised",
|
|
2335
2332
|
"has-[:disabled]:bg-surface-disabled has-[:disabled]:opacity-50"
|
|
@@ -2347,13 +2344,13 @@ var inputField = tailwindVariants.tv({
|
|
|
2347
2344
|
tailwindVariants.tv({
|
|
2348
2345
|
base: [
|
|
2349
2346
|
"flex items-center justify-between",
|
|
2350
|
-
"gap-3 text-
|
|
2347
|
+
"gap-3 text-sm py-2 px-3 min-w-[120px]",
|
|
2351
2348
|
"cursor-pointer outline-none rounded",
|
|
2352
|
-
"text-
|
|
2349
|
+
"text-fg",
|
|
2353
2350
|
"hovered:bg-interactive",
|
|
2354
2351
|
"focused:bg-interactive",
|
|
2355
2352
|
"focus-visible:bg-interactive",
|
|
2356
|
-
"disabled:text-
|
|
2353
|
+
"disabled:text-fg-disabled disabled:cursor-default",
|
|
2357
2354
|
"selected:font-semibold"
|
|
2358
2355
|
]
|
|
2359
2356
|
});
|
|
@@ -2384,23 +2381,21 @@ tailwindVariants.tv({
|
|
|
2384
2381
|
}
|
|
2385
2382
|
});
|
|
2386
2383
|
var tooltip = tailwindVariants.tv({
|
|
2387
|
-
base: [
|
|
2388
|
-
"bg-surface-inverted text-surface-base text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] px-2 py-1 rounded"
|
|
2389
|
-
]
|
|
2384
|
+
base: ["bg-surface-inverted text-surface text-sm px-2 py-1 rounded"]
|
|
2390
2385
|
});
|
|
2391
2386
|
var checkbox = tailwindVariants.tv({
|
|
2392
2387
|
slots: {
|
|
2393
2388
|
root: [
|
|
2394
2389
|
"group flex items-center gap-3",
|
|
2395
|
-
"text-
|
|
2396
|
-
"disabled:text-
|
|
2390
|
+
"text-sm cursor-pointer",
|
|
2391
|
+
"disabled:text-fg-disabled disabled:cursor-default"
|
|
2397
2392
|
],
|
|
2398
2393
|
box: [
|
|
2399
2394
|
"flex items-center justify-center",
|
|
2400
|
-
"w-5 h-5 rounded border border-edge bg-surface
|
|
2395
|
+
"w-5 h-5 rounded border border-edge bg-surface",
|
|
2401
2396
|
"shadow-sm transition-colors",
|
|
2402
|
-
"group-data-[checked]:bg-primary group-data-[checked]:border-primary group-data-[checked]:text-primary-
|
|
2403
|
-
"group-indeterminate:bg-surface
|
|
2397
|
+
"group-data-[checked]:bg-primary group-data-[checked]:border-primary group-data-[checked]:text-primary-fg",
|
|
2398
|
+
"group-indeterminate:bg-surface group-indeterminate:text-fg",
|
|
2404
2399
|
"group-disabled:bg-surface-disabled",
|
|
2405
2400
|
"group-focus-visible:ring-2 group-focus-visible:ring-focus-ring group-focus-visible:ring-offset-1"
|
|
2406
2401
|
],
|
|
@@ -2416,7 +2411,7 @@ var switchVariant = tailwindVariants.tv({
|
|
|
2416
2411
|
slots: {
|
|
2417
2412
|
root: [
|
|
2418
2413
|
"group flex items-center gap-3",
|
|
2419
|
-
"text-
|
|
2414
|
+
"text-sm cursor-pointer",
|
|
2420
2415
|
"disabled:opacity-50 disabled:cursor-default"
|
|
2421
2416
|
],
|
|
2422
2417
|
track: [
|
|
@@ -2428,7 +2423,7 @@ var switchVariant = tailwindVariants.tv({
|
|
|
2428
2423
|
],
|
|
2429
2424
|
thumb: [
|
|
2430
2425
|
"w-4 h-4 rounded-full",
|
|
2431
|
-
"bg-surface
|
|
2426
|
+
"bg-surface shadow-sm",
|
|
2432
2427
|
"transition-transform",
|
|
2433
2428
|
"group-data-[checked]:translate-x-4"
|
|
2434
2429
|
]
|
|
@@ -2439,34 +2434,34 @@ tailwindVariants.tv({
|
|
|
2439
2434
|
root: "flex flex-col",
|
|
2440
2435
|
list: ["flex gap-1 border-b border-edge-muted"],
|
|
2441
2436
|
tab: [
|
|
2442
|
-
"px-4 py-2 text-
|
|
2443
|
-
"text-
|
|
2437
|
+
"px-4 py-2 text-sm font-medium cursor-pointer",
|
|
2438
|
+
"text-fg-muted outline-none",
|
|
2444
2439
|
"border-b-2 border-transparent -mb-px",
|
|
2445
|
-
"hovered:text-
|
|
2446
|
-
"selected:text-
|
|
2447
|
-
"disabled:text-
|
|
2440
|
+
"hovered:text-fg",
|
|
2441
|
+
"selected:text-fg selected:border-primary",
|
|
2442
|
+
"disabled:text-fg-disabled disabled:cursor-default",
|
|
2448
2443
|
"focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2"
|
|
2449
2444
|
],
|
|
2450
2445
|
panel: "py-4"
|
|
2451
2446
|
}
|
|
2452
2447
|
});
|
|
2453
2448
|
tailwindVariants.tv({
|
|
2454
|
-
base: "text-
|
|
2449
|
+
base: "text-fg",
|
|
2455
2450
|
variants: {
|
|
2456
2451
|
size: {
|
|
2457
|
-
xs: "text-
|
|
2458
|
-
sm: "text-
|
|
2459
|
-
base: "text-
|
|
2460
|
-
lg: "text-
|
|
2461
|
-
xl: "text-
|
|
2462
|
-
"2xl": "text-
|
|
2463
|
-
"3xl": "text-
|
|
2464
|
-
"4xl": "text-
|
|
2452
|
+
xs: "text-xs",
|
|
2453
|
+
sm: "text-sm",
|
|
2454
|
+
base: "text-base",
|
|
2455
|
+
lg: "text-lg",
|
|
2456
|
+
xl: "text-xl",
|
|
2457
|
+
"2xl": "text-2xl",
|
|
2458
|
+
"3xl": "text-3xl",
|
|
2459
|
+
"4xl": "text-4xl"
|
|
2465
2460
|
},
|
|
2466
2461
|
color: {
|
|
2467
2462
|
default: "",
|
|
2468
|
-
muted: "text-
|
|
2469
|
-
disabled: "text-
|
|
2463
|
+
muted: "text-fg-muted",
|
|
2464
|
+
disabled: "text-fg-disabled"
|
|
2470
2465
|
},
|
|
2471
2466
|
weight: {
|
|
2472
2467
|
thin: "font-thin",
|
|
@@ -2485,18 +2480,18 @@ tailwindVariants.tv({
|
|
|
2485
2480
|
}
|
|
2486
2481
|
});
|
|
2487
2482
|
tailwindVariants.tv({
|
|
2488
|
-
base: "font-semibold text-
|
|
2483
|
+
base: "font-semibold text-fg",
|
|
2489
2484
|
variants: {
|
|
2490
2485
|
size: {
|
|
2491
|
-
sm: "text-
|
|
2492
|
-
base: "text-
|
|
2493
|
-
lg: "text-
|
|
2494
|
-
xl: "text-
|
|
2495
|
-
"2xl": "text-
|
|
2496
|
-
"3xl": "text-
|
|
2497
|
-
"4xl": "text-
|
|
2498
|
-
"5xl": "text-
|
|
2499
|
-
"6xl": "text-
|
|
2486
|
+
sm: "text-sm",
|
|
2487
|
+
base: "text-base",
|
|
2488
|
+
lg: "text-lg",
|
|
2489
|
+
xl: "text-xl",
|
|
2490
|
+
"2xl": "text-2xl",
|
|
2491
|
+
"3xl": "text-3xl",
|
|
2492
|
+
"4xl": "text-4xl",
|
|
2493
|
+
"5xl": "text-5xl",
|
|
2494
|
+
"6xl": "text-6xl"
|
|
2500
2495
|
}
|
|
2501
2496
|
},
|
|
2502
2497
|
defaultVariants: {
|
|
@@ -2505,15 +2500,15 @@ tailwindVariants.tv({
|
|
|
2505
2500
|
});
|
|
2506
2501
|
var alert = tailwindVariants.tv({
|
|
2507
2502
|
base: [
|
|
2508
|
-
"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-
|
|
2503
|
+
"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",
|
|
2509
2504
|
"has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3",
|
|
2510
2505
|
"[&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current"
|
|
2511
2506
|
],
|
|
2512
2507
|
variants: {
|
|
2513
2508
|
variant: {
|
|
2514
|
-
default: "bg-surface
|
|
2509
|
+
default: "bg-surface text-fg",
|
|
2515
2510
|
danger: [
|
|
2516
|
-
"border-status-error bg-surface
|
|
2511
|
+
"border-status-error bg-surface text-status-error",
|
|
2517
2512
|
"*:data-[slot=alert-description]:text-status-error/90"
|
|
2518
2513
|
]
|
|
2519
2514
|
}
|
|
@@ -2527,7 +2522,7 @@ var emptyMedia = tailwindVariants.tv({
|
|
|
2527
2522
|
variants: {
|
|
2528
2523
|
variant: {
|
|
2529
2524
|
default: "bg-transparent",
|
|
2530
|
-
icon: "bg-surface-raised text-
|
|
2525
|
+
icon: "bg-surface-raised text-fg flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
|
|
2531
2526
|
}
|
|
2532
2527
|
},
|
|
2533
2528
|
defaultVariants: {
|
|
@@ -2538,7 +2533,7 @@ tailwindVariants.tv({
|
|
|
2538
2533
|
base: "inline-flex items-center gap-2",
|
|
2539
2534
|
slots: {
|
|
2540
2535
|
dot: "w-2 h-2 rounded-full",
|
|
2541
|
-
label: "text-
|
|
2536
|
+
label: "text-sm"
|
|
2542
2537
|
},
|
|
2543
2538
|
variants: {
|
|
2544
2539
|
color: {
|
|
@@ -2558,13 +2553,13 @@ var toast = tailwindVariants.tv({
|
|
|
2558
2553
|
"flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg",
|
|
2559
2554
|
"bg-surface-overlay",
|
|
2560
2555
|
"border border-edge-muted",
|
|
2561
|
-
"text-
|
|
2556
|
+
"text-sm"
|
|
2562
2557
|
],
|
|
2563
2558
|
variants: {
|
|
2564
2559
|
variant: {
|
|
2565
2560
|
default: "",
|
|
2566
|
-
success: "bg-status-success-bg text-status-success-
|
|
2567
|
-
error: "bg-status-error-bg text-status-error-
|
|
2561
|
+
success: "bg-status-success-bg text-status-success-fg",
|
|
2562
|
+
error: "bg-status-error-bg text-status-error-fg"
|
|
2568
2563
|
}
|
|
2569
2564
|
}
|
|
2570
2565
|
});
|
|
@@ -2575,13 +2570,13 @@ var badge = tailwindVariants.tv({
|
|
|
2575
2570
|
],
|
|
2576
2571
|
variants: {
|
|
2577
2572
|
variant: {
|
|
2578
|
-
default: "bg-interactive text-
|
|
2579
|
-
primary: "bg-primary text-primary-
|
|
2580
|
-
outline: "bg-transparent border-edge text-
|
|
2581
|
-
success: "bg-status-success-bg text-status-success-
|
|
2582
|
-
warning: "bg-status-warning-bg text-status-warning-
|
|
2583
|
-
error: "bg-status-error-bg text-status-error-
|
|
2584
|
-
info: "bg-status-info-bg text-status-info-
|
|
2573
|
+
default: "bg-interactive text-fg",
|
|
2574
|
+
primary: "bg-primary text-primary-fg",
|
|
2575
|
+
outline: "bg-transparent border-edge text-fg",
|
|
2576
|
+
success: "bg-status-success-bg text-status-success-fg",
|
|
2577
|
+
warning: "bg-status-warning-bg text-status-warning-fg",
|
|
2578
|
+
error: "bg-status-error-bg text-status-error-fg",
|
|
2579
|
+
info: "bg-status-info-bg text-status-info-fg",
|
|
2585
2580
|
// Tailwind base color palette (soft tint + readable text, dark-mode aware)
|
|
2586
2581
|
slate: "bg-slate-50 text-slate-900 dark:bg-slate-500/20 dark:text-slate-100",
|
|
2587
2582
|
gray: "bg-gray-50 text-gray-900 dark:bg-gray-500/20 dark:text-gray-100",
|
|
@@ -2607,8 +2602,8 @@ var badge = tailwindVariants.tv({
|
|
|
2607
2602
|
rose: "bg-rose-50 text-rose-900 dark:bg-rose-500/20 dark:text-rose-100"
|
|
2608
2603
|
},
|
|
2609
2604
|
size: {
|
|
2610
|
-
sm: "text-
|
|
2611
|
-
md: "text-
|
|
2605
|
+
sm: "text-xs px-2 py-0.5",
|
|
2606
|
+
md: "text-sm px-2.5 py-0.5"
|
|
2612
2607
|
}
|
|
2613
2608
|
},
|
|
2614
2609
|
defaultVariants: {
|
|
@@ -2623,32 +2618,29 @@ var avatar = tailwindVariants.tv({
|
|
|
2623
2618
|
"overflow-hidden rounded-full align-middle bg-interactive"
|
|
2624
2619
|
],
|
|
2625
2620
|
image: "size-full object-cover",
|
|
2626
|
-
fallback: [
|
|
2627
|
-
"flex size-full items-center justify-center",
|
|
2628
|
-
"font-medium text-foreground-primary uppercase"
|
|
2629
|
-
]
|
|
2621
|
+
fallback: ["flex size-full items-center justify-center", "font-medium text-fg uppercase"]
|
|
2630
2622
|
},
|
|
2631
2623
|
variants: {
|
|
2632
2624
|
size: {
|
|
2633
2625
|
xs: {
|
|
2634
2626
|
root: "size-6",
|
|
2635
|
-
fallback: "text-
|
|
2627
|
+
fallback: "text-xs"
|
|
2636
2628
|
},
|
|
2637
2629
|
sm: {
|
|
2638
2630
|
root: "size-8",
|
|
2639
|
-
fallback: "text-
|
|
2631
|
+
fallback: "text-sm"
|
|
2640
2632
|
},
|
|
2641
2633
|
md: {
|
|
2642
2634
|
root: "size-10",
|
|
2643
|
-
fallback: "text-
|
|
2635
|
+
fallback: "text-sm"
|
|
2644
2636
|
},
|
|
2645
2637
|
lg: {
|
|
2646
2638
|
root: "size-12",
|
|
2647
|
-
fallback: "text-
|
|
2639
|
+
fallback: "text-lg"
|
|
2648
2640
|
},
|
|
2649
2641
|
xl: {
|
|
2650
2642
|
root: "size-16",
|
|
2651
|
-
fallback: "text-
|
|
2643
|
+
fallback: "text-xl"
|
|
2652
2644
|
}
|
|
2653
2645
|
}
|
|
2654
2646
|
},
|
|
@@ -2659,7 +2651,7 @@ var avatar = tailwindVariants.tv({
|
|
|
2659
2651
|
var tag = tailwindVariants.tv({
|
|
2660
2652
|
slots: {
|
|
2661
2653
|
base: [
|
|
2662
|
-
"inline-flex items-center gap-1 px-2 py-0.5 rounded text-
|
|
2654
|
+
"inline-flex items-center gap-1 px-2 py-0.5 rounded text-sm",
|
|
2663
2655
|
"cursor-default outline-none",
|
|
2664
2656
|
"focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-1"
|
|
2665
2657
|
],
|
|
@@ -2673,13 +2665,13 @@ var tag = tailwindVariants.tv({
|
|
|
2673
2665
|
variants: {
|
|
2674
2666
|
variant: {
|
|
2675
2667
|
default: {
|
|
2676
|
-
base: "bg-interactive text-
|
|
2668
|
+
base: "bg-interactive text-fg"
|
|
2677
2669
|
},
|
|
2678
2670
|
outline: {
|
|
2679
|
-
base: "bg-transparent border border-edge text-
|
|
2671
|
+
base: "bg-transparent border border-edge text-fg"
|
|
2680
2672
|
},
|
|
2681
2673
|
primary: {
|
|
2682
|
-
base: "bg-primary text-primary-
|
|
2674
|
+
base: "bg-primary text-primary-fg"
|
|
2683
2675
|
}
|
|
2684
2676
|
}
|
|
2685
2677
|
},
|
|
@@ -2707,7 +2699,7 @@ var AlertTitle = react.forwardRef(
|
|
|
2707
2699
|
...props,
|
|
2708
2700
|
ref,
|
|
2709
2701
|
"data-slot": "alert-title",
|
|
2710
|
-
className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className)
|
|
2702
|
+
className: cn.cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className)
|
|
2711
2703
|
}
|
|
2712
2704
|
)
|
|
2713
2705
|
);
|
|
@@ -2719,8 +2711,8 @@ var AlertDescription = react.forwardRef(
|
|
|
2719
2711
|
...props,
|
|
2720
2712
|
ref,
|
|
2721
2713
|
"data-slot": "alert-description",
|
|
2722
|
-
className: cn(
|
|
2723
|
-
"col-start-2 grid justify-items-start gap-1 text-
|
|
2714
|
+
className: cn.cn(
|
|
2715
|
+
"col-start-2 grid justify-items-start gap-1 text-sm text-fg-muted [&_p]:leading-relaxed",
|
|
2724
2716
|
className
|
|
2725
2717
|
)
|
|
2726
2718
|
}
|
|
@@ -2854,7 +2846,7 @@ var Box = react.forwardRef(function Box2({
|
|
|
2854
2846
|
if (typeof value === "string" && !isPreset(value)) return value;
|
|
2855
2847
|
return void 0;
|
|
2856
2848
|
};
|
|
2857
|
-
const classes = cn(
|
|
2849
|
+
const classes = cn.cn(
|
|
2858
2850
|
mapDisplay(display),
|
|
2859
2851
|
mapTextColor(toStringValue(color)),
|
|
2860
2852
|
mapBackgroundColor(toStringValue(backgroundColor)),
|
|
@@ -2967,7 +2959,7 @@ function Flexbox({
|
|
|
2967
2959
|
children,
|
|
2968
2960
|
...props
|
|
2969
2961
|
}) {
|
|
2970
|
-
const classes = cn(
|
|
2962
|
+
const classes = cn.cn(
|
|
2971
2963
|
mapDisplay(display),
|
|
2972
2964
|
mapFlexDirection(direction),
|
|
2973
2965
|
mapFlexWrap(wrap),
|
|
@@ -3000,7 +2992,7 @@ function Heading({
|
|
|
3000
2992
|
as,
|
|
3001
2993
|
spacing,
|
|
3002
2994
|
weight: "semibold",
|
|
3003
|
-
className: cn(mapHeadingSize(size), className),
|
|
2995
|
+
className: cn.cn(mapHeadingSize(size), className),
|
|
3004
2996
|
children
|
|
3005
2997
|
}
|
|
3006
2998
|
);
|
|
@@ -3172,8 +3164,8 @@ function Dialog({ title, children, className, ...props }) {
|
|
|
3172
3164
|
"div",
|
|
3173
3165
|
{
|
|
3174
3166
|
...props,
|
|
3175
|
-
className: cn(
|
|
3176
|
-
"p-6 shadow-xl bg-surface
|
|
3167
|
+
className: cn.cn(
|
|
3168
|
+
"p-6 shadow-xl bg-surface border border-edge rounded relative outline-none overflow-auto",
|
|
3177
3169
|
className
|
|
3178
3170
|
),
|
|
3179
3171
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Column, { height: "100%", gap: true, children: [
|
|
@@ -3199,7 +3191,7 @@ function AlertDialog({
|
|
|
3199
3191
|
children,
|
|
3200
3192
|
...props
|
|
3201
3193
|
}) {
|
|
3202
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { ...props, title, className: cn("grid", className), children: ({ close }) => {
|
|
3194
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { ...props, title, className: cn.cn("grid", className), children: ({ close }) => {
|
|
3203
3195
|
return /* @__PURE__ */ jsxRuntime.jsxs(Column, { gap: "4", children: [
|
|
3204
3196
|
description && /* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Description, { render: /* @__PURE__ */ jsxRuntime.jsx(Text, { color: "muted" }), children: description }),
|
|
3205
3197
|
typeof children === "function" ? children({ close }) : children,
|
|
@@ -3229,7 +3221,7 @@ function AspectRatio({ ratio = 1, className, style, children, ...props }) {
|
|
|
3229
3221
|
"div",
|
|
3230
3222
|
{
|
|
3231
3223
|
...props,
|
|
3232
|
-
className: cn(
|
|
3224
|
+
className: cn.cn(
|
|
3233
3225
|
"relative w-full overflow-hidden",
|
|
3234
3226
|
"[&>*]:absolute [&>*]:inset-0 [&>*]:size-full [&>img]:object-cover [&>video]:object-cover",
|
|
3235
3227
|
className
|
|
@@ -3239,6 +3231,204 @@ function AspectRatio({ ratio = 1, className, style, children, ...props }) {
|
|
|
3239
3231
|
}
|
|
3240
3232
|
);
|
|
3241
3233
|
}
|
|
3234
|
+
var InputGroup = react.forwardRef(
|
|
3235
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3236
|
+
"div",
|
|
3237
|
+
{
|
|
3238
|
+
...props,
|
|
3239
|
+
ref,
|
|
3240
|
+
"data-slot": "input-group",
|
|
3241
|
+
role: props.role ?? "group",
|
|
3242
|
+
className: inputField({
|
|
3243
|
+
variant,
|
|
3244
|
+
className: cn.cn(
|
|
3245
|
+
"group/input-group w-full min-w-0 gap-0 p-0",
|
|
3246
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col",
|
|
3247
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col",
|
|
3248
|
+
"has-[>textarea]:h-auto",
|
|
3249
|
+
className
|
|
3250
|
+
)
|
|
3251
|
+
})
|
|
3252
|
+
}
|
|
3253
|
+
)
|
|
3254
|
+
);
|
|
3255
|
+
InputGroup.displayName = "InputGroup";
|
|
3256
|
+
var addonClasses = {
|
|
3257
|
+
// Inline addons must not add vertical padding around their buttons; the
|
|
3258
|
+
// input's padding determines the height of a single-line control.
|
|
3259
|
+
"inline-start": "order-first ps-3 py-0",
|
|
3260
|
+
"inline-end": "order-last pe-3 py-0",
|
|
3261
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 pb-2",
|
|
3262
|
+
"block-end": "order-last w-full justify-start px-3 pt-2 pb-3"
|
|
3263
|
+
};
|
|
3264
|
+
var InputGroupAddon = react.forwardRef(
|
|
3265
|
+
({ align = "inline-start", className, onClick, ...props }, ref) => {
|
|
3266
|
+
const handleClick = (event) => {
|
|
3267
|
+
onClick?.(event);
|
|
3268
|
+
if (event.defaultPrevented || event.target.closest("button")) {
|
|
3269
|
+
return;
|
|
3270
|
+
}
|
|
3271
|
+
event.currentTarget.parentElement?.querySelector('[data-slot="input-group-control"]')?.focus();
|
|
3272
|
+
};
|
|
3273
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3274
|
+
"div",
|
|
3275
|
+
{
|
|
3276
|
+
...props,
|
|
3277
|
+
ref,
|
|
3278
|
+
role: props.role ?? "group",
|
|
3279
|
+
"data-slot": "input-group-addon",
|
|
3280
|
+
"data-align": align,
|
|
3281
|
+
className: cn.cn(
|
|
3282
|
+
"flex h-auto shrink-0 cursor-text items-center justify-center gap-2 text-sm text-fg-muted",
|
|
3283
|
+
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
3284
|
+
addonClasses[align],
|
|
3285
|
+
className
|
|
3286
|
+
),
|
|
3287
|
+
onClick: handleClick
|
|
3288
|
+
}
|
|
3289
|
+
);
|
|
3290
|
+
}
|
|
3291
|
+
);
|
|
3292
|
+
InputGroupAddon.displayName = "InputGroupAddon";
|
|
3293
|
+
var buttonSizeClasses = {
|
|
3294
|
+
xs: "h-6 gap-1 rounded px-1.5 py-0 text-sm",
|
|
3295
|
+
sm: "h-8 gap-2 rounded px-2 py-0 text-sm",
|
|
3296
|
+
"icon-xs": "size-6 rounded p-0",
|
|
3297
|
+
"icon-sm": "size-8 rounded p-0"
|
|
3298
|
+
};
|
|
3299
|
+
var InputGroupButton = react.forwardRef(
|
|
3300
|
+
({ className, size = "xs", type = "button", variant = "quiet", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3301
|
+
Button,
|
|
3302
|
+
{
|
|
3303
|
+
...props,
|
|
3304
|
+
ref,
|
|
3305
|
+
type,
|
|
3306
|
+
variant,
|
|
3307
|
+
size: "xs",
|
|
3308
|
+
"data-size": size,
|
|
3309
|
+
className: cn.cn(
|
|
3310
|
+
"shrink-0 shadow-none",
|
|
3311
|
+
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
3312
|
+
buttonSizeClasses[size],
|
|
3313
|
+
className
|
|
3314
|
+
)
|
|
3315
|
+
}
|
|
3316
|
+
)
|
|
3317
|
+
);
|
|
3318
|
+
InputGroupButton.displayName = "InputGroupButton";
|
|
3319
|
+
var InputGroupText = react.forwardRef(
|
|
3320
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3321
|
+
"span",
|
|
3322
|
+
{
|
|
3323
|
+
...props,
|
|
3324
|
+
ref,
|
|
3325
|
+
"data-slot": "input-group-text",
|
|
3326
|
+
className: cn.cn(
|
|
3327
|
+
"flex items-center gap-2 text-sm text-fg-muted [&_svg]:pointer-events-none [&_svg]:size-4",
|
|
3328
|
+
className
|
|
3329
|
+
)
|
|
3330
|
+
}
|
|
3331
|
+
)
|
|
3332
|
+
);
|
|
3333
|
+
InputGroupText.displayName = "InputGroupText";
|
|
3334
|
+
var InputGroupInput = react.forwardRef(
|
|
3335
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3336
|
+
"input",
|
|
3337
|
+
{
|
|
3338
|
+
...props,
|
|
3339
|
+
ref,
|
|
3340
|
+
"data-slot": "input-group-control",
|
|
3341
|
+
className: cn.cn(
|
|
3342
|
+
"min-w-0 flex-1 bg-transparent px-3 py-2 text-sm outline-none placeholder:text-fg-muted disabled:cursor-not-allowed",
|
|
3343
|
+
className
|
|
3344
|
+
)
|
|
3345
|
+
}
|
|
3346
|
+
)
|
|
3347
|
+
);
|
|
3348
|
+
InputGroupInput.displayName = "InputGroupInput";
|
|
3349
|
+
var InputGroupTextarea = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3350
|
+
"textarea",
|
|
3351
|
+
{
|
|
3352
|
+
...props,
|
|
3353
|
+
ref,
|
|
3354
|
+
"data-slot": "input-group-control",
|
|
3355
|
+
className: cn.cn(
|
|
3356
|
+
"min-w-0 w-full flex-1 bg-transparent p-3 text-sm outline-none placeholder:text-fg-muted disabled:cursor-not-allowed",
|
|
3357
|
+
className
|
|
3358
|
+
)
|
|
3359
|
+
}
|
|
3360
|
+
));
|
|
3361
|
+
InputGroupTextarea.displayName = "InputGroupTextarea";
|
|
3362
|
+
var Autocomplete = react.forwardRef(
|
|
3363
|
+
({
|
|
3364
|
+
items,
|
|
3365
|
+
label,
|
|
3366
|
+
placeholder,
|
|
3367
|
+
isDisabled,
|
|
3368
|
+
disabled,
|
|
3369
|
+
onChange,
|
|
3370
|
+
onValueChange,
|
|
3371
|
+
className,
|
|
3372
|
+
inputProps,
|
|
3373
|
+
positionerProps,
|
|
3374
|
+
renderItem,
|
|
3375
|
+
emptyMessage = "No suggestions found.",
|
|
3376
|
+
...props
|
|
3377
|
+
}, ref) => {
|
|
3378
|
+
const generatedId = react.useId();
|
|
3379
|
+
const inputId = inputProps?.id ?? generatedId;
|
|
3380
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3381
|
+
autocomplete.Autocomplete.Root,
|
|
3382
|
+
{
|
|
3383
|
+
...props,
|
|
3384
|
+
items,
|
|
3385
|
+
disabled: isDisabled ?? disabled,
|
|
3386
|
+
onValueChange: (value, details) => {
|
|
3387
|
+
onValueChange?.(value, details);
|
|
3388
|
+
if (!details.isCanceled) onChange?.(value);
|
|
3389
|
+
},
|
|
3390
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn.cn("relative flex flex-col gap-1", className), children: [
|
|
3391
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: inputId, className: "text-sm font-semibold", children: label }),
|
|
3392
|
+
/* @__PURE__ */ jsxRuntime.jsx(InputGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3393
|
+
autocomplete.Autocomplete.Input,
|
|
3394
|
+
{
|
|
3395
|
+
placeholder,
|
|
3396
|
+
...inputProps,
|
|
3397
|
+
id: inputId,
|
|
3398
|
+
ref,
|
|
3399
|
+
render: /* @__PURE__ */ jsxRuntime.jsx(InputGroupInput, { className: "text-sm" })
|
|
3400
|
+
}
|
|
3401
|
+
) }),
|
|
3402
|
+
/* @__PURE__ */ jsxRuntime.jsx(autocomplete.Autocomplete.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3403
|
+
autocomplete.Autocomplete.Positioner,
|
|
3404
|
+
{
|
|
3405
|
+
align: "start",
|
|
3406
|
+
sideOffset: 4,
|
|
3407
|
+
...positionerProps,
|
|
3408
|
+
className: (state) => cn.cn(
|
|
3409
|
+
"zen-layer-floating",
|
|
3410
|
+
typeof positionerProps?.className === "function" ? positionerProps.className(state) : positionerProps?.className
|
|
3411
|
+
),
|
|
3412
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(autocomplete.Autocomplete.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: [
|
|
3413
|
+
/* @__PURE__ */ jsxRuntime.jsx(autocomplete.Autocomplete.List, { children: (item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3414
|
+
autocomplete.Autocomplete.Item,
|
|
3415
|
+
{
|
|
3416
|
+
value: item,
|
|
3417
|
+
className: "cursor-default rounded px-3 py-2 text-sm outline-none data-[highlighted]:bg-interactive",
|
|
3418
|
+
children: renderItem ? renderItem(item) : item
|
|
3419
|
+
},
|
|
3420
|
+
item
|
|
3421
|
+
) }),
|
|
3422
|
+
/* @__PURE__ */ jsxRuntime.jsx(autocomplete.Autocomplete.Empty, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-4 text-center text-sm text-fg-muted", children: emptyMessage }) })
|
|
3423
|
+
] })
|
|
3424
|
+
}
|
|
3425
|
+
) })
|
|
3426
|
+
] })
|
|
3427
|
+
}
|
|
3428
|
+
);
|
|
3429
|
+
}
|
|
3430
|
+
);
|
|
3431
|
+
Autocomplete.displayName = "Autocomplete";
|
|
3242
3432
|
function getInitials(name) {
|
|
3243
3433
|
if (!name) {
|
|
3244
3434
|
return null;
|
|
@@ -3247,17 +3437,17 @@ function getInitials(name) {
|
|
|
3247
3437
|
}
|
|
3248
3438
|
function Avatar({ src, alt, fallback, size, className, children, ...props }) {
|
|
3249
3439
|
const styles = avatar({ size });
|
|
3250
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(avatar$1.Avatar.Root, { ...props, className: cn(styles.root(), className), children: [
|
|
3440
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(avatar$1.Avatar.Root, { ...props, className: cn.cn(styles.root(), className), children: [
|
|
3251
3441
|
src && /* @__PURE__ */ jsxRuntime.jsx(avatar$1.Avatar.Image, { src, alt, className: styles.image() }),
|
|
3252
3442
|
/* @__PURE__ */ jsxRuntime.jsx(avatar$1.Avatar.Fallback, { className: styles.fallback(), children: fallback ?? getInitials(alt) }),
|
|
3253
3443
|
children
|
|
3254
3444
|
] });
|
|
3255
3445
|
}
|
|
3256
3446
|
function Badge({ variant, size, className, children, ...props }) {
|
|
3257
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { ...props, className: cn(badge({ variant, size }), className), children });
|
|
3447
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ...props, className: cn.cn(badge({ variant, size }), className), children });
|
|
3258
3448
|
}
|
|
3259
3449
|
function Blockquote({ className, children, ...props }) {
|
|
3260
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Text, { ...props, as: "blockquote", className: cn("border-l-2 border-primary pl-5", className), children });
|
|
3450
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Text, { ...props, as: "blockquote", className: cn.cn("border-l-2 border-primary pl-5", className), children });
|
|
3261
3451
|
}
|
|
3262
3452
|
function Breadcrumbs({ children, className, isDisabled, ...props }) {
|
|
3263
3453
|
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3265,7 +3455,7 @@ function Breadcrumbs({ children, className, isDisabled, ...props }) {
|
|
|
3265
3455
|
{
|
|
3266
3456
|
...props,
|
|
3267
3457
|
"aria-disabled": isDisabled || void 0,
|
|
3268
|
-
className: cn("flex items-center gap-3", className),
|
|
3458
|
+
className: cn.cn("flex items-center gap-3", className),
|
|
3269
3459
|
children
|
|
3270
3460
|
}
|
|
3271
3461
|
) });
|
|
@@ -3276,16 +3466,16 @@ function Breadcrumb({ children, className, isDisabled, ...props }) {
|
|
|
3276
3466
|
{
|
|
3277
3467
|
...props,
|
|
3278
3468
|
"aria-disabled": isDisabled || void 0,
|
|
3279
|
-
className: cn(
|
|
3280
|
-
"flex items-center text-
|
|
3281
|
-
"[&_a]:text-
|
|
3282
|
-
"[&_a:hover]:text-
|
|
3469
|
+
className: cn.cn(
|
|
3470
|
+
"flex items-center text-sm gap-3 list-none",
|
|
3471
|
+
"[&_a]:text-fg-muted [&_a]:no-underline [&_a]:font-normal",
|
|
3472
|
+
"[&_a:hover]:text-fg",
|
|
3283
3473
|
"last:[&>span]:hidden",
|
|
3284
3474
|
className
|
|
3285
3475
|
),
|
|
3286
3476
|
children: [
|
|
3287
3477
|
children,
|
|
3288
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "text-
|
|
3478
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "text-fg-muted", size: "xs", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.ChevronRight, {}) })
|
|
3289
3479
|
]
|
|
3290
3480
|
}
|
|
3291
3481
|
);
|
|
@@ -3296,7 +3486,7 @@ function Separator({ orientation = "horizontal", className, ...props }) {
|
|
|
3296
3486
|
{
|
|
3297
3487
|
...props,
|
|
3298
3488
|
orientation,
|
|
3299
|
-
className: cn(
|
|
3489
|
+
className: cn.cn(
|
|
3300
3490
|
"shrink-0 bg-edge-muted",
|
|
3301
3491
|
orientation === "horizontal" ? "h-px w-full" : "w-px self-stretch",
|
|
3302
3492
|
className
|
|
@@ -3312,7 +3502,7 @@ function ButtonGroup({ className, orientation = "horizontal", ...props }) {
|
|
|
3312
3502
|
role: props.role ?? "group",
|
|
3313
3503
|
"data-slot": "button-group",
|
|
3314
3504
|
"data-orientation": orientation,
|
|
3315
|
-
className: cn(
|
|
3505
|
+
className: cn.cn(
|
|
3316
3506
|
"flex w-fit items-stretch",
|
|
3317
3507
|
"has-[>[data-slot=button-group]]:gap-2",
|
|
3318
3508
|
"[&>[data-slot]]:focus-visible:relative [&>[data-slot]]:focus-visible:z-10",
|
|
@@ -3333,8 +3523,8 @@ function ButtonGroup({ className, orientation = "horizontal", ...props }) {
|
|
|
3333
3523
|
);
|
|
3334
3524
|
}
|
|
3335
3525
|
function ButtonGroupText({ className, render, children, ...props }) {
|
|
3336
|
-
const classes = cn(
|
|
3337
|
-
"flex items-center gap-2 rounded border border-edge bg-surface-raised px-4 text-
|
|
3526
|
+
const classes = cn.cn(
|
|
3527
|
+
"flex items-center gap-2 rounded border border-edge bg-surface-raised px-4 text-sm font-medium shadow-sm",
|
|
3338
3528
|
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
3339
3529
|
className
|
|
3340
3530
|
);
|
|
@@ -3361,7 +3551,7 @@ function ButtonGroupSeparator({
|
|
|
3361
3551
|
...props,
|
|
3362
3552
|
"data-slot": "button-group-separator",
|
|
3363
3553
|
orientation,
|
|
3364
|
-
className: cn(
|
|
3554
|
+
className: cn.cn(
|
|
3365
3555
|
"relative self-stretch",
|
|
3366
3556
|
"data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto",
|
|
3367
3557
|
"data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto",
|
|
@@ -3398,8 +3588,8 @@ function Calendar({
|
|
|
3398
3588
|
onChange?.(date);
|
|
3399
3589
|
}
|
|
3400
3590
|
},
|
|
3401
|
-
className: cn(
|
|
3402
|
-
"w-fit max-w-full text-
|
|
3591
|
+
className: cn.cn(
|
|
3592
|
+
"w-fit max-w-full text-sm",
|
|
3403
3593
|
// The month grid is a real <table>; host prose styles (docs sites,
|
|
3404
3594
|
// CMS themes) often style table/th/td with borders, padding, and
|
|
3405
3595
|
// width. Reset them at matching specificity so zen styles hold.
|
|
@@ -3423,16 +3613,16 @@ function Calendar({
|
|
|
3423
3613
|
week: "flex mt-1",
|
|
3424
3614
|
day: "size-12 text-center",
|
|
3425
3615
|
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",
|
|
3426
|
-
selected: "[&>button]:text-primary-
|
|
3616
|
+
selected: "[&>button]:text-primary-fg [&>button]:bg-primary [&>button:hover]:bg-primary",
|
|
3427
3617
|
outside: "invisible",
|
|
3428
|
-
disabled: "text-
|
|
3618
|
+
disabled: "text-fg-disabled pointer-events-none opacity-50",
|
|
3429
3619
|
today: "[&>button]:font-bold"
|
|
3430
3620
|
},
|
|
3431
3621
|
components: {
|
|
3432
3622
|
Chevron: ({ orientation }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3433
3623
|
icons_exports.ChevronRight,
|
|
3434
3624
|
{
|
|
3435
|
-
className: cn(
|
|
3625
|
+
className: cn.cn(
|
|
3436
3626
|
"size-4",
|
|
3437
3627
|
orientation === "left" && "rotate-180",
|
|
3438
3628
|
orientation === "up" && "-rotate-90",
|
|
@@ -3493,9 +3683,9 @@ function Carousel({
|
|
|
3493
3683
|
...props,
|
|
3494
3684
|
role: "region",
|
|
3495
3685
|
"aria-roledescription": "carousel",
|
|
3496
|
-
className: cn("relative", className),
|
|
3686
|
+
className: cn.cn("relative", className),
|
|
3497
3687
|
children: [
|
|
3498
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: emblaRef, className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex", isVertical && "flex-col max-h-full"), children }) }),
|
|
3688
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: emblaRef, className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn.cn("flex", isVertical && "flex-col max-h-full"), children }) }),
|
|
3499
3689
|
showArrows && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3500
3690
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3501
3691
|
Button,
|
|
@@ -3503,7 +3693,7 @@ function Carousel({
|
|
|
3503
3693
|
variant: "outline",
|
|
3504
3694
|
"aria-label": "Previous slide",
|
|
3505
3695
|
isDisabled: !canScrollPrev,
|
|
3506
|
-
className: cn(
|
|
3696
|
+
className: cn.cn(
|
|
3507
3697
|
"absolute rounded-full size-9 p-0",
|
|
3508
3698
|
isVertical ? "left-1/2 -translate-x-1/2 top-2 rotate-90" : "top-1/2 -translate-y-1/2 left-2"
|
|
3509
3699
|
),
|
|
@@ -3517,7 +3707,7 @@ function Carousel({
|
|
|
3517
3707
|
variant: "outline",
|
|
3518
3708
|
"aria-label": "Next slide",
|
|
3519
3709
|
isDisabled: !canScrollNext,
|
|
3520
|
-
className: cn(
|
|
3710
|
+
className: cn.cn(
|
|
3521
3711
|
"absolute rounded-full size-9 p-0",
|
|
3522
3712
|
isVertical ? "left-1/2 -translate-x-1/2 bottom-2 rotate-90" : "top-1/2 -translate-y-1/2 right-2"
|
|
3523
3713
|
),
|
|
@@ -3531,7 +3721,7 @@ function Carousel({
|
|
|
3531
3721
|
{
|
|
3532
3722
|
type: "button",
|
|
3533
3723
|
"aria-label": `Go to slide ${index + 1}`,
|
|
3534
|
-
className: cn(
|
|
3724
|
+
className: cn.cn(
|
|
3535
3725
|
"size-2 rounded-full cursor-pointer transition-colors",
|
|
3536
3726
|
index === selectedIndex ? "bg-primary" : "bg-interactive hover:bg-interactive-hover"
|
|
3537
3727
|
),
|
|
@@ -3550,7 +3740,7 @@ function CarouselItem({ className, children, ...props }) {
|
|
|
3550
3740
|
...props,
|
|
3551
3741
|
role: "group",
|
|
3552
3742
|
"aria-roledescription": "slide",
|
|
3553
|
-
className: cn("min-w-0 shrink-0 grow-0 basis-full", className),
|
|
3743
|
+
className: cn.cn("min-w-0 shrink-0 grow-0 basis-full", className),
|
|
3554
3744
|
children
|
|
3555
3745
|
}
|
|
3556
3746
|
);
|
|
@@ -3589,7 +3779,7 @@ function Checkbox({
|
|
|
3589
3779
|
defaultChecked: defaultSelected,
|
|
3590
3780
|
disabled: isDisabled || isTableSelection && (tableSelection.selectionMode === "none" || isHeaderSelection && tableSelection.selectionMode !== "multiple"),
|
|
3591
3781
|
indeterminate: isTableSelection ? tableIndeterminate : isIndeterminate,
|
|
3592
|
-
className: cn(styles.root(), className),
|
|
3782
|
+
className: cn.cn(styles.root(), className),
|
|
3593
3783
|
slot: isTableSelection ? void 0 : slot,
|
|
3594
3784
|
onCheckedChange: (selected) => {
|
|
3595
3785
|
onChange?.(selected);
|
|
@@ -3610,7 +3800,7 @@ function Checkbox({
|
|
|
3610
3800
|
);
|
|
3611
3801
|
}
|
|
3612
3802
|
function Label({
|
|
3613
|
-
size = "
|
|
3803
|
+
size = "sm",
|
|
3614
3804
|
weight = "semibold",
|
|
3615
3805
|
lineHeight = "loose",
|
|
3616
3806
|
...props
|
|
@@ -3636,7 +3826,7 @@ function CheckboxGroup({
|
|
|
3636
3826
|
...props
|
|
3637
3827
|
}) {
|
|
3638
3828
|
const labelId = react.useId();
|
|
3639
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
3829
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn.cn("flex flex-col gap-2", className), children: [
|
|
3640
3830
|
label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
|
|
3641
3831
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3642
3832
|
checkboxGroup.CheckboxGroup,
|
|
@@ -3645,21 +3835,21 @@ function CheckboxGroup({
|
|
|
3645
3835
|
"aria-labelledby": label ? labelId : props["aria-labelledby"],
|
|
3646
3836
|
disabled: isDisabled,
|
|
3647
3837
|
onValueChange: (value) => onChange?.(value),
|
|
3648
|
-
className: cn("flex gap-3", orientation === "vertical" ? "flex-col" : "flex-row flex-wrap"),
|
|
3838
|
+
className: cn.cn("flex gap-3", orientation === "vertical" ? "flex-col" : "flex-row flex-wrap"),
|
|
3649
3839
|
children
|
|
3650
3840
|
}
|
|
3651
3841
|
)
|
|
3652
3842
|
] });
|
|
3653
3843
|
}
|
|
3654
|
-
function Code({ className, children, ...props }) {
|
|
3844
|
+
function Code({ className, children, size = "sm", ...props }) {
|
|
3655
3845
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3656
3846
|
Text,
|
|
3657
3847
|
{
|
|
3658
3848
|
...props,
|
|
3659
3849
|
as: "code",
|
|
3660
|
-
size
|
|
3850
|
+
size,
|
|
3661
3851
|
weight: "medium",
|
|
3662
|
-
className: cn("font-mono bg-surface-sunken rounded p-1", className),
|
|
3852
|
+
className: cn.cn("font-mono bg-surface-sunken rounded p-1", className),
|
|
3663
3853
|
children
|
|
3664
3854
|
}
|
|
3665
3855
|
);
|
|
@@ -3681,7 +3871,7 @@ function Collapsible({
|
|
|
3681
3871
|
defaultOpen: defaultExpanded,
|
|
3682
3872
|
disabled: isDisabled,
|
|
3683
3873
|
onOpenChange: onExpandedChange,
|
|
3684
|
-
className: cn("flex flex-col w-full", className),
|
|
3874
|
+
className: cn.cn("flex flex-col w-full", className),
|
|
3685
3875
|
children
|
|
3686
3876
|
}
|
|
3687
3877
|
);
|
|
@@ -3691,10 +3881,10 @@ function CollapsibleTrigger({ className, children, ...props }) {
|
|
|
3691
3881
|
collapsible.Collapsible.Trigger,
|
|
3692
3882
|
{
|
|
3693
3883
|
...props,
|
|
3694
|
-
className: cn(
|
|
3695
|
-
"flex items-center gap-2 cursor-pointer outline-none text-
|
|
3884
|
+
className: cn.cn(
|
|
3885
|
+
"flex items-center gap-2 cursor-pointer outline-none text-sm",
|
|
3696
3886
|
"focus-visible:ring-2 focus-visible:ring-focus-ring rounded",
|
|
3697
|
-
"disabled:text-
|
|
3887
|
+
"disabled:text-fg-disabled disabled:cursor-default",
|
|
3698
3888
|
className
|
|
3699
3889
|
),
|
|
3700
3890
|
children
|
|
@@ -3706,7 +3896,7 @@ function CollapsiblePanel({ className, children, ...props }) {
|
|
|
3706
3896
|
collapsible.Collapsible.Panel,
|
|
3707
3897
|
{
|
|
3708
3898
|
...props,
|
|
3709
|
-
className: cn(
|
|
3899
|
+
className: cn.cn(
|
|
3710
3900
|
"overflow-hidden transition-all duration-300 ease-out",
|
|
3711
3901
|
"h-[var(--collapsible-panel-height)] data-[starting-style]:h-0 data-[ending-style]:h-0",
|
|
3712
3902
|
className
|
|
@@ -3832,9 +4022,9 @@ function List({
|
|
|
3832
4022
|
onSelectionChange?.(next);
|
|
3833
4023
|
onChange?.(Array.from(next, String));
|
|
3834
4024
|
};
|
|
3835
|
-
const classes = cn(
|
|
4025
|
+
const classes = cn.cn(
|
|
3836
4026
|
"grid outline-none overflow-auto gap-1",
|
|
3837
|
-
isFullscreen && "zen-layer-floating block p-3 rounded-none fixed inset-0 overflow-auto bg-surface
|
|
4027
|
+
isFullscreen && "zen-layer-floating block p-3 rounded-none fixed inset-0 overflow-auto bg-surface",
|
|
3838
4028
|
className
|
|
3839
4029
|
);
|
|
3840
4030
|
if (parent.kind === "select") {
|
|
@@ -3863,7 +4053,7 @@ function List({
|
|
|
3863
4053
|
}
|
|
3864
4054
|
return listbox;
|
|
3865
4055
|
}
|
|
3866
|
-
var itemClasses = "text-
|
|
4056
|
+
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";
|
|
3867
4057
|
function ListItem({
|
|
3868
4058
|
id,
|
|
3869
4059
|
value,
|
|
@@ -3883,7 +4073,7 @@ function ListItem({
|
|
|
3883
4073
|
...props,
|
|
3884
4074
|
value: itemValue,
|
|
3885
4075
|
disabled: isDisabled,
|
|
3886
|
-
className: cn(itemClasses, className),
|
|
4076
|
+
className: cn.cn(itemClasses, className),
|
|
3887
4077
|
children: [
|
|
3888
4078
|
/* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemText, { children }),
|
|
3889
4079
|
showCheckmark && /* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Check, {}) }) })
|
|
@@ -3898,7 +4088,7 @@ function ListItem({
|
|
|
3898
4088
|
...props,
|
|
3899
4089
|
value: String(itemValue),
|
|
3900
4090
|
disabled: isDisabled,
|
|
3901
|
-
className: cn(itemClasses, className),
|
|
4091
|
+
className: cn.cn(itemClasses, className),
|
|
3902
4092
|
children: [
|
|
3903
4093
|
children,
|
|
3904
4094
|
showCheckmark && /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Check, {}) }) })
|
|
@@ -3917,7 +4107,7 @@ function ListItem({
|
|
|
3917
4107
|
"aria-disabled": isDisabled || void 0,
|
|
3918
4108
|
"aria-selected": isSelected,
|
|
3919
4109
|
"data-selected": isSelected || void 0,
|
|
3920
|
-
className: cn(itemClasses, className),
|
|
4110
|
+
className: cn.cn(itemClasses, className),
|
|
3921
4111
|
onClick: (event) => {
|
|
3922
4112
|
onClick?.(event);
|
|
3923
4113
|
if (!event.defaultPrevented && !isDisabled) {
|
|
@@ -3939,153 +4129,27 @@ function ListItem({
|
|
|
3939
4129
|
);
|
|
3940
4130
|
}
|
|
3941
4131
|
function ListSeparator({ className, ...props }) {
|
|
3942
|
-
return /* @__PURE__ */ jsxRuntime.jsx(select.Select.Separator, { ...props, className: cn("block h-px bg-edge-muted", className) });
|
|
4132
|
+
return /* @__PURE__ */ jsxRuntime.jsx(select.Select.Separator, { ...props, className: cn.cn("block h-px bg-edge-muted", className) });
|
|
3943
4133
|
}
|
|
3944
4134
|
function ListSection({ title, className, children, ...props }) {
|
|
3945
4135
|
const { kind } = react.useContext(ListContext);
|
|
3946
4136
|
if (kind === "select") {
|
|
3947
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(select.Select.Group, { ...props, className: cn("[&:not(:last-child)]:mb-4", className), children: [
|
|
3948
|
-
title && /* @__PURE__ */ jsxRuntime.jsx(select.Select.GroupLabel, { className: "text-
|
|
4137
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(select.Select.Group, { ...props, className: cn.cn("[&:not(:last-child)]:mb-4", className), children: [
|
|
4138
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(select.Select.GroupLabel, { className: "text-sm font-bold px-2 py-1.5", children: title }),
|
|
3949
4139
|
children
|
|
3950
4140
|
] });
|
|
3951
4141
|
}
|
|
3952
4142
|
if (kind === "combobox") {
|
|
3953
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.Group, { ...props, className: cn("[&:not(:last-child)]:mb-4", className), children: [
|
|
3954
|
-
title && /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.GroupLabel, { className: "text-
|
|
4143
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.Group, { ...props, className: cn.cn("[&:not(:last-child)]:mb-4", className), children: [
|
|
4144
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.GroupLabel, { className: "text-sm font-bold px-2 py-1.5", children: title }),
|
|
3955
4145
|
children
|
|
3956
4146
|
] });
|
|
3957
4147
|
}
|
|
3958
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, role: "group", className: cn("[&:not(:last-child)]:mb-4", className), children: [
|
|
3959
|
-
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-
|
|
4148
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, role: "group", className: cn.cn("[&:not(:last-child)]:mb-4", className), children: [
|
|
4149
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-bold px-2 py-1.5", children: title }),
|
|
3960
4150
|
children
|
|
3961
4151
|
] });
|
|
3962
4152
|
}
|
|
3963
|
-
var InputGroup = react.forwardRef(
|
|
3964
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3965
|
-
"div",
|
|
3966
|
-
{
|
|
3967
|
-
...props,
|
|
3968
|
-
ref,
|
|
3969
|
-
"data-slot": "input-group",
|
|
3970
|
-
role: props.role ?? "group",
|
|
3971
|
-
className: inputField({
|
|
3972
|
-
variant,
|
|
3973
|
-
className: cn(
|
|
3974
|
-
"group/input-group w-full min-w-0 gap-0 p-0",
|
|
3975
|
-
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col",
|
|
3976
|
-
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col",
|
|
3977
|
-
"has-[>textarea]:h-auto",
|
|
3978
|
-
className
|
|
3979
|
-
)
|
|
3980
|
-
})
|
|
3981
|
-
}
|
|
3982
|
-
)
|
|
3983
|
-
);
|
|
3984
|
-
InputGroup.displayName = "InputGroup";
|
|
3985
|
-
var addonClasses = {
|
|
3986
|
-
"inline-start": "order-first ps-3",
|
|
3987
|
-
"inline-end": "order-last pe-3",
|
|
3988
|
-
"block-start": "order-first w-full justify-start px-3 pt-3",
|
|
3989
|
-
"block-end": "order-last w-full justify-start px-3 pb-3"
|
|
3990
|
-
};
|
|
3991
|
-
var InputGroupAddon = react.forwardRef(
|
|
3992
|
-
({ align = "inline-start", className, onClick, ...props }, ref) => {
|
|
3993
|
-
const handleClick = (event) => {
|
|
3994
|
-
onClick?.(event);
|
|
3995
|
-
if (event.defaultPrevented || event.target.closest("button")) {
|
|
3996
|
-
return;
|
|
3997
|
-
}
|
|
3998
|
-
event.currentTarget.parentElement?.querySelector('[data-slot="input-group-control"]')?.focus();
|
|
3999
|
-
};
|
|
4000
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4001
|
-
"div",
|
|
4002
|
-
{
|
|
4003
|
-
...props,
|
|
4004
|
-
ref,
|
|
4005
|
-
role: props.role ?? "group",
|
|
4006
|
-
"data-slot": "input-group-addon",
|
|
4007
|
-
"data-align": align,
|
|
4008
|
-
className: cn(
|
|
4009
|
-
"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",
|
|
4010
|
-
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
4011
|
-
addonClasses[align],
|
|
4012
|
-
className
|
|
4013
|
-
),
|
|
4014
|
-
onClick: handleClick
|
|
4015
|
-
}
|
|
4016
|
-
);
|
|
4017
|
-
}
|
|
4018
|
-
);
|
|
4019
|
-
InputGroupAddon.displayName = "InputGroupAddon";
|
|
4020
|
-
var buttonSizeClasses = {
|
|
4021
|
-
xs: "h-6 gap-1 rounded px-1.5 py-0 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
|
|
4022
|
-
sm: "h-8 gap-2 rounded px-2 py-0 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
|
|
4023
|
-
"icon-xs": "size-6 rounded p-0",
|
|
4024
|
-
"icon-sm": "size-8 rounded p-0"
|
|
4025
|
-
};
|
|
4026
|
-
var InputGroupButton = react.forwardRef(
|
|
4027
|
-
({ className, size = "xs", type = "button", variant = "quiet", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4028
|
-
Button,
|
|
4029
|
-
{
|
|
4030
|
-
...props,
|
|
4031
|
-
ref,
|
|
4032
|
-
type,
|
|
4033
|
-
variant,
|
|
4034
|
-
size: "xs",
|
|
4035
|
-
"data-size": size,
|
|
4036
|
-
className: cn(
|
|
4037
|
-
"shrink-0 shadow-none",
|
|
4038
|
-
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
4039
|
-
buttonSizeClasses[size],
|
|
4040
|
-
className
|
|
4041
|
-
)
|
|
4042
|
-
}
|
|
4043
|
-
)
|
|
4044
|
-
);
|
|
4045
|
-
InputGroupButton.displayName = "InputGroupButton";
|
|
4046
|
-
var InputGroupText = react.forwardRef(
|
|
4047
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4048
|
-
"span",
|
|
4049
|
-
{
|
|
4050
|
-
...props,
|
|
4051
|
-
ref,
|
|
4052
|
-
"data-slot": "input-group-text",
|
|
4053
|
-
className: cn(
|
|
4054
|
-
"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",
|
|
4055
|
-
className
|
|
4056
|
-
)
|
|
4057
|
-
}
|
|
4058
|
-
)
|
|
4059
|
-
);
|
|
4060
|
-
InputGroupText.displayName = "InputGroupText";
|
|
4061
|
-
var InputGroupInput = react.forwardRef(
|
|
4062
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4063
|
-
"input",
|
|
4064
|
-
{
|
|
4065
|
-
...props,
|
|
4066
|
-
ref,
|
|
4067
|
-
"data-slot": "input-group-control",
|
|
4068
|
-
className: cn(
|
|
4069
|
-
"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",
|
|
4070
|
-
className
|
|
4071
|
-
)
|
|
4072
|
-
}
|
|
4073
|
-
)
|
|
4074
|
-
);
|
|
4075
|
-
InputGroupInput.displayName = "InputGroupInput";
|
|
4076
|
-
var InputGroupTextarea = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4077
|
-
"textarea",
|
|
4078
|
-
{
|
|
4079
|
-
...props,
|
|
4080
|
-
ref,
|
|
4081
|
-
"data-slot": "input-group-control",
|
|
4082
|
-
className: cn(
|
|
4083
|
-
"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",
|
|
4084
|
-
className
|
|
4085
|
-
)
|
|
4086
|
-
}
|
|
4087
|
-
));
|
|
4088
|
-
InputGroupTextarea.displayName = "InputGroupTextarea";
|
|
4089
4153
|
var scrollbarClasses = [
|
|
4090
4154
|
"flex touch-none select-none justify-center rounded bg-transparent",
|
|
4091
4155
|
"opacity-0 transition-opacity duration-200 delay-300",
|
|
@@ -4106,7 +4170,7 @@ function ScrollArea({
|
|
|
4106
4170
|
scrollArea.ScrollArea.Root,
|
|
4107
4171
|
{
|
|
4108
4172
|
...props,
|
|
4109
|
-
className: cn("relative overflow-hidden", className),
|
|
4173
|
+
className: cn.cn("relative overflow-hidden", className),
|
|
4110
4174
|
style,
|
|
4111
4175
|
children: [
|
|
4112
4176
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4121,7 +4185,7 @@ function ScrollArea({
|
|
|
4121
4185
|
scrollArea.ScrollArea.Scrollbar,
|
|
4122
4186
|
{
|
|
4123
4187
|
orientation: "vertical",
|
|
4124
|
-
className: cn(scrollbarClasses, "w-1.5 mr-0.5"),
|
|
4188
|
+
className: cn.cn(scrollbarClasses, "w-1.5 mr-0.5"),
|
|
4125
4189
|
children: /* @__PURE__ */ jsxRuntime.jsx(scrollArea.ScrollArea.Thumb, { className: "w-full rounded bg-edge-strong" })
|
|
4126
4190
|
}
|
|
4127
4191
|
),
|
|
@@ -4129,7 +4193,7 @@ function ScrollArea({
|
|
|
4129
4193
|
scrollArea.ScrollArea.Scrollbar,
|
|
4130
4194
|
{
|
|
4131
4195
|
orientation: "horizontal",
|
|
4132
|
-
className: cn(scrollbarClasses, "h-1.5 mb-0.5 flex-col"),
|
|
4196
|
+
className: cn.cn(scrollbarClasses, "h-1.5 mb-0.5 flex-col"),
|
|
4133
4197
|
children: /* @__PURE__ */ jsxRuntime.jsx(scrollArea.ScrollArea.Thumb, { className: "h-full rounded bg-edge-strong" })
|
|
4134
4198
|
}
|
|
4135
4199
|
),
|
|
@@ -4186,11 +4250,11 @@ function ComboBox({
|
|
|
4186
4250
|
itemToStringLabel: itemToStringLabel ?? ((value) => itemLabels.get(value) ?? value),
|
|
4187
4251
|
disabled: isDisabled,
|
|
4188
4252
|
onValueChange: onChange,
|
|
4189
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
|
|
4190
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Label, { className: "text-
|
|
4253
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn.cn("relative", className), children: [
|
|
4254
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Label, { className: "text-sm font-semibold", children: label }),
|
|
4191
4255
|
/* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.InputGroup, { render: /* @__PURE__ */ jsxRuntime.jsx(InputGroup, {}), children: [
|
|
4192
4256
|
/* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Input, { placeholder, render: /* @__PURE__ */ jsxRuntime.jsx(InputGroupInput, {}) }),
|
|
4193
|
-
/* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Trigger, { className: "flex size-6 shrink-0 items-center justify-center rounded text-
|
|
4257
|
+
/* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Trigger, { className: "flex size-6 shrink-0 items-center justify-center rounded text-fg-muted hover:bg-interactive hover:text-fg", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { rotate: 90, "aria-hidden": "true", size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.ChevronRight, {}) }) }) })
|
|
4194
4258
|
] }),
|
|
4195
4259
|
/* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4196
4260
|
combobox.Combobox.Positioner,
|
|
@@ -4198,16 +4262,16 @@ function ComboBox({
|
|
|
4198
4262
|
align: "start",
|
|
4199
4263
|
sideOffset: 4,
|
|
4200
4264
|
...popoverProps,
|
|
4201
|
-
className: cn("zen-layer-floating", popoverProps?.className),
|
|
4265
|
+
className: cn.cn("zen-layer-floating", popoverProps?.className),
|
|
4202
4266
|
children: /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.Popup, { className: "zen-popover w-[var(--anchor-width)] max-w-[var(--available-width)] p-2 border border-edge rounded-md shadow-lg bg-surface-overlay outline-none", children: [
|
|
4203
|
-
/* @__PURE__ */ jsxRuntime.jsx(ListPrimitiveProvider, { kind: "combobox", children: /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { maxHeight: maxHeight ?? "min(23rem, var(--available-height))", children: /* @__PURE__ */ jsxRuntime.jsx(List, { ...listProps, className: cn("overflow-visible", listProps?.className), children: /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Collection, { children: (value) => {
|
|
4267
|
+
/* @__PURE__ */ jsxRuntime.jsx(ListPrimitiveProvider, { kind: "combobox", children: /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { maxHeight: maxHeight ?? "min(23rem, var(--available-height))", children: /* @__PURE__ */ jsxRuntime.jsx(List, { ...listProps, className: cn.cn("overflow-visible", listProps?.className), children: /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Collection, { children: (value) => {
|
|
4204
4268
|
const item = normalizedItems.find((option) => option.value === value);
|
|
4205
4269
|
if (!item) {
|
|
4206
4270
|
return null;
|
|
4207
4271
|
}
|
|
4208
4272
|
return item.element ?? /* @__PURE__ */ jsxRuntime.jsx(ListItem, { value: item.value, children: item.label }, item.value);
|
|
4209
4273
|
} }) }) }) }),
|
|
4210
|
-
/* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Empty, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-16 items-center justify-center px-4 py-3 text-center", children: renderEmptyState ? renderEmptyState({}) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
4274
|
+
/* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Empty, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-16 items-center justify-center px-4 py-3 text-center", children: renderEmptyState ? renderEmptyState({}) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-fg-muted", children: "No items found." }) }) })
|
|
4211
4275
|
] })
|
|
4212
4276
|
}
|
|
4213
4277
|
) })
|
|
@@ -4229,7 +4293,7 @@ function Modal({
|
|
|
4229
4293
|
...props
|
|
4230
4294
|
}) {
|
|
4231
4295
|
const { kind } = useOverlayTrigger();
|
|
4232
|
-
const popupClassName2 = cn("relative", placementClasses[placement], className);
|
|
4296
|
+
const popupClassName2 = cn.cn("relative", placementClasses[placement], className);
|
|
4233
4297
|
if (kind === "alert-dialog") {
|
|
4234
4298
|
return /* @__PURE__ */ jsxRuntime.jsxs(alertDialog.AlertDialog.Portal, { ...props, children: [
|
|
4235
4299
|
/* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Backdrop, { className: "zen-modal-overlay zen-layer-backdrop fixed inset-0 bg-black/80" }),
|
|
@@ -4247,8 +4311,8 @@ function Command({ className, children, ...props }) {
|
|
|
4247
4311
|
cmdk.Command,
|
|
4248
4312
|
{
|
|
4249
4313
|
...props,
|
|
4250
|
-
className: cn(
|
|
4251
|
-
"flex size-full flex-col overflow-hidden rounded-md bg-surface
|
|
4314
|
+
className: cn.cn(
|
|
4315
|
+
"flex size-full flex-col overflow-hidden rounded-md bg-surface text-fg",
|
|
4252
4316
|
className
|
|
4253
4317
|
),
|
|
4254
4318
|
children
|
|
@@ -4257,15 +4321,15 @@ function Command({ className, children, ...props }) {
|
|
|
4257
4321
|
}
|
|
4258
4322
|
function CommandInput({ className, ...props }) {
|
|
4259
4323
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 border-b border-edge px-3", children: [
|
|
4260
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", className: "shrink-0 text-
|
|
4324
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", className: "shrink-0 text-fg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Search, {}) }),
|
|
4261
4325
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4262
4326
|
cmdk.Command.Input,
|
|
4263
4327
|
{
|
|
4264
4328
|
...props,
|
|
4265
|
-
className: cn(
|
|
4266
|
-
"flex h-11 w-full bg-transparent text-
|
|
4267
|
-
"placeholder:text-
|
|
4268
|
-
"disabled:cursor-not-allowed disabled:text-
|
|
4329
|
+
className: cn.cn(
|
|
4330
|
+
"flex h-11 w-full bg-transparent text-sm outline-none",
|
|
4331
|
+
"placeholder:text-fg-muted",
|
|
4332
|
+
"disabled:cursor-not-allowed disabled:text-fg-disabled",
|
|
4269
4333
|
className
|
|
4270
4334
|
)
|
|
4271
4335
|
}
|
|
@@ -4273,17 +4337,14 @@ function CommandInput({ className, ...props }) {
|
|
|
4273
4337
|
] });
|
|
4274
4338
|
}
|
|
4275
4339
|
function CommandList({ maxHeight = 300, className, ...props }) {
|
|
4276
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { maxHeight, children: /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.List, { ...props, className: cn("p-2", className) }) });
|
|
4340
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { maxHeight, children: /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.List, { ...props, className: cn.cn("p-2", className) }) });
|
|
4277
4341
|
}
|
|
4278
4342
|
function CommandEmpty({ className, ...props }) {
|
|
4279
4343
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4280
4344
|
cmdk.Command.Empty,
|
|
4281
4345
|
{
|
|
4282
4346
|
...props,
|
|
4283
|
-
className: cn(
|
|
4284
|
-
"py-6 text-center text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] text-foreground-muted",
|
|
4285
|
-
className
|
|
4286
|
-
)
|
|
4347
|
+
className: cn.cn("py-6 text-center text-sm text-fg-muted", className)
|
|
4287
4348
|
}
|
|
4288
4349
|
);
|
|
4289
4350
|
}
|
|
@@ -4292,10 +4353,10 @@ function CommandGroup({ className, ...props }) {
|
|
|
4292
4353
|
cmdk.Command.Group,
|
|
4293
4354
|
{
|
|
4294
4355
|
...props,
|
|
4295
|
-
className: cn(
|
|
4356
|
+
className: cn.cn(
|
|
4296
4357
|
"overflow-hidden [&:not(:last-child)]:mb-2",
|
|
4297
4358
|
"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5",
|
|
4298
|
-
"[&_[cmdk-group-heading]]:text-
|
|
4359
|
+
"[&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-bold [&_[cmdk-group-heading]]:text-fg-muted",
|
|
4299
4360
|
className
|
|
4300
4361
|
)
|
|
4301
4362
|
}
|
|
@@ -4307,10 +4368,10 @@ function CommandItem({ icon, isDisabled, className, children, ...props }) {
|
|
|
4307
4368
|
{
|
|
4308
4369
|
...props,
|
|
4309
4370
|
disabled: isDisabled,
|
|
4310
|
-
className: cn(
|
|
4311
|
-
"flex items-center gap-3 px-2 py-1.5 rounded cursor-pointer outline-none text-
|
|
4371
|
+
className: cn.cn(
|
|
4372
|
+
"flex items-center gap-3 px-2 py-1.5 rounded cursor-pointer outline-none text-sm",
|
|
4312
4373
|
"data-[selected=true]:bg-interactive",
|
|
4313
|
-
"data-[disabled=true]:text-
|
|
4374
|
+
"data-[disabled=true]:text-fg-disabled data-[disabled=true]:cursor-default",
|
|
4314
4375
|
className
|
|
4315
4376
|
),
|
|
4316
4377
|
children: [
|
|
@@ -4325,7 +4386,7 @@ function CommandSeparator({ className, ...props }) {
|
|
|
4325
4386
|
cmdk.Command.Separator,
|
|
4326
4387
|
{
|
|
4327
4388
|
...props,
|
|
4328
|
-
className: cn("h-px bg-edge-muted my-2 -mx-2", className)
|
|
4389
|
+
className: cn.cn("h-px bg-edge-muted my-2 -mx-2", className)
|
|
4329
4390
|
}
|
|
4330
4391
|
);
|
|
4331
4392
|
}
|
|
@@ -4346,7 +4407,7 @@ function CommandDialog({
|
|
|
4346
4407
|
Command,
|
|
4347
4408
|
{
|
|
4348
4409
|
...props,
|
|
4349
|
-
className: cn(
|
|
4410
|
+
className: cn.cn(
|
|
4350
4411
|
"w-[32rem] max-w-[calc(100dvw-2rem)] border border-edge shadow-xl",
|
|
4351
4412
|
props.className
|
|
4352
4413
|
),
|
|
@@ -4376,7 +4437,7 @@ function CopyButton({ value, timeout = TIMEOUT, className, ...props }) {
|
|
|
4376
4437
|
variant: "quiet",
|
|
4377
4438
|
size: "xs",
|
|
4378
4439
|
"aria-label": props["aria-label"] ?? "Copy",
|
|
4379
|
-
className: cn("size-6 shrink-0 p-0", className),
|
|
4440
|
+
className: cn.cn("size-6 shrink-0 p-0", className),
|
|
4380
4441
|
onClick: handleCopy,
|
|
4381
4442
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "animate-icon-pop", children: copied ? /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Check, {}) : /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Copy, {}) })
|
|
4382
4443
|
}
|
|
@@ -4419,14 +4480,14 @@ function TextField({
|
|
|
4419
4480
|
setInputValue(defaultValue ?? "");
|
|
4420
4481
|
}
|
|
4421
4482
|
}, [value, defaultValue]);
|
|
4422
|
-
const inputClasses = cn(resize && resizeClasses[resize]);
|
|
4483
|
+
const inputClasses = cn.cn(allowCopy && asTextArea && "pe-12", resize && resizeClasses[resize]);
|
|
4423
4484
|
const input = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4424
4485
|
InputGroup,
|
|
4425
4486
|
{
|
|
4426
4487
|
variant: variant === "quiet" ? "quiet" : "default",
|
|
4427
|
-
className: cn(
|
|
4488
|
+
className: cn.cn(
|
|
4428
4489
|
isReadOnly && "focus-within:border-edge",
|
|
4429
|
-
isDisabled && "text-
|
|
4490
|
+
isDisabled && "text-fg-disabled",
|
|
4430
4491
|
variant === "quiet" && "text-[length:inherit]",
|
|
4431
4492
|
className
|
|
4432
4493
|
),
|
|
@@ -4457,17 +4518,14 @@ function TextField({
|
|
|
4457
4518
|
allowCopy && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4458
4519
|
InputGroupAddon,
|
|
4459
4520
|
{
|
|
4460
|
-
align:
|
|
4461
|
-
className: cn(asTextArea && "
|
|
4521
|
+
align: "inline-end",
|
|
4522
|
+
className: cn.cn(asTextArea && "absolute end-0 top-1 z-10"),
|
|
4462
4523
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4463
4524
|
CopyButton,
|
|
4464
4525
|
{
|
|
4465
4526
|
value: String(inputValue),
|
|
4466
4527
|
"aria-disabled": !inputValue,
|
|
4467
|
-
className: cn(
|
|
4468
|
-
"text-foreground-muted hover:text-foreground-primary",
|
|
4469
|
-
!inputValue && "text-foreground-disabled"
|
|
4470
|
-
)
|
|
4528
|
+
className: cn.cn("text-fg-muted hover:text-fg", !inputValue && "text-fg-disabled")
|
|
4471
4529
|
}
|
|
4472
4530
|
)
|
|
4473
4531
|
}
|
|
@@ -4494,7 +4552,7 @@ function ConfirmationDialog({
|
|
|
4494
4552
|
const handleChange = (e) => {
|
|
4495
4553
|
setCanSave(e.target.value === value);
|
|
4496
4554
|
};
|
|
4497
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog, { ...props, className: cn(className), isConfirmDisabled: !canSave, children: ({ close }) => {
|
|
4555
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog, { ...props, className: cn.cn(className), isConfirmDisabled: !canSave, children: ({ close }) => {
|
|
4498
4556
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4499
4557
|
typeof children === "function" ? children({ close }) : children,
|
|
4500
4558
|
/* @__PURE__ */ jsxRuntime.jsxs(Text, { children: [
|
|
@@ -4508,7 +4566,7 @@ function ConfirmationDialog({
|
|
|
4508
4566
|
paddingY: "2",
|
|
4509
4567
|
marginY: "2",
|
|
4510
4568
|
borderRadius: "md",
|
|
4511
|
-
className: "font-mono text-
|
|
4569
|
+
className: "font-mono text-sm bg-surface-sunken",
|
|
4512
4570
|
children: value
|
|
4513
4571
|
}
|
|
4514
4572
|
),
|
|
@@ -4527,7 +4585,7 @@ function Container({
|
|
|
4527
4585
|
Box,
|
|
4528
4586
|
{
|
|
4529
4587
|
...props,
|
|
4530
|
-
className: cn(
|
|
4588
|
+
className: cn.cn(
|
|
4531
4589
|
"w-full px-4",
|
|
4532
4590
|
"sm:max-w-[500px] md:max-w-[740px] lg:max-w-[1000px] xl:max-w-[1240px] 2xl:max-w-[1600px]",
|
|
4533
4591
|
isCentered && "mx-auto",
|
|
@@ -4629,7 +4687,7 @@ function Grid({
|
|
|
4629
4687
|
const hasResponsiveCustomColumns = hasCustomResponsiveValues(columns);
|
|
4630
4688
|
const hasResponsiveCustomRows = hasCustomResponsiveValues(rows);
|
|
4631
4689
|
const needsStyleTag = hasResponsiveCustomColumns || hasResponsiveCustomRows;
|
|
4632
|
-
const classes = cn(
|
|
4690
|
+
const classes = cn.cn(
|
|
4633
4691
|
mapDisplay(display),
|
|
4634
4692
|
mapJustifyContent(justifyContent),
|
|
4635
4693
|
mapJustifyItems(justifyItems),
|
|
@@ -4777,17 +4835,7 @@ function Table({
|
|
|
4777
4835
|
}),
|
|
4778
4836
|
[registerRow, rowKeys, selectedKeys, selectionMode, setAllSelected, setRowSelected]
|
|
4779
4837
|
);
|
|
4780
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TableSelectionContext.Provider, { value: selection, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4781
|
-
"table",
|
|
4782
|
-
{
|
|
4783
|
-
...props,
|
|
4784
|
-
className: cn(
|
|
4785
|
-
"grid text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] w-full relative",
|
|
4786
|
-
className
|
|
4787
|
-
),
|
|
4788
|
-
children
|
|
4789
|
-
}
|
|
4790
|
-
) });
|
|
4838
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableSelectionContext.Provider, { value: selection, children: /* @__PURE__ */ jsxRuntime.jsx("table", { ...props, className: cn.cn("grid text-sm w-full relative", className), children }) });
|
|
4791
4839
|
}
|
|
4792
4840
|
function TableHeader({ children, className, style, ...props }) {
|
|
4793
4841
|
const cols = style?.gridTemplateColumns || gridTemplateColumns;
|
|
@@ -4795,7 +4843,7 @@ function TableHeader({ children, className, style, ...props }) {
|
|
|
4795
4843
|
"thead",
|
|
4796
4844
|
{
|
|
4797
4845
|
...props,
|
|
4798
|
-
className: cn(
|
|
4846
|
+
className: cn.cn(
|
|
4799
4847
|
"[&>tr]:grid [&>tr]:border-b [&>tr]:border-edge [&>tr]:[grid-template-columns:var(--grid-cols)]",
|
|
4800
4848
|
className
|
|
4801
4849
|
),
|
|
@@ -4809,7 +4857,7 @@ function TableBody({
|
|
|
4809
4857
|
className,
|
|
4810
4858
|
...props
|
|
4811
4859
|
}) {
|
|
4812
|
-
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { ...props, className: cn("contents", className), children });
|
|
4860
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { ...props, className: cn.cn("contents", className), children });
|
|
4813
4861
|
}
|
|
4814
4862
|
function TableRow({ children, className, style, id, ...props }) {
|
|
4815
4863
|
const generatedId = react.useId();
|
|
@@ -4836,7 +4884,7 @@ function TableRow({ children, className, style, id, ...props }) {
|
|
|
4836
4884
|
"data-selected": isSelected || void 0,
|
|
4837
4885
|
"aria-selected": isSelectable ? isSelected : props["aria-selected"],
|
|
4838
4886
|
tabIndex: isSelectable ? props.tabIndex ?? 0 : props.tabIndex,
|
|
4839
|
-
className: cn(
|
|
4887
|
+
className: cn.cn(
|
|
4840
4888
|
"grid border-b border-edge-muted min-h-10",
|
|
4841
4889
|
isSelectable && "cursor-pointer data-[selected]:bg-interactive",
|
|
4842
4890
|
className
|
|
@@ -4871,7 +4919,7 @@ function TableColumn({
|
|
|
4871
4919
|
{
|
|
4872
4920
|
...props,
|
|
4873
4921
|
scope: "col",
|
|
4874
|
-
className: cn(
|
|
4922
|
+
className: cn.cn(
|
|
4875
4923
|
"flex p-2 text-left font-bold flex-1 first:pl-0 last:pr-0",
|
|
4876
4924
|
align && alignClasses[align],
|
|
4877
4925
|
className
|
|
@@ -4885,7 +4933,7 @@ function TableCell({ children, className, align, ...props }) {
|
|
|
4885
4933
|
"td",
|
|
4886
4934
|
{
|
|
4887
4935
|
...props,
|
|
4888
|
-
className: cn(
|
|
4936
|
+
className: cn.cn(
|
|
4889
4937
|
"flex p-2 flex-1 first:pl-0 last:pr-0",
|
|
4890
4938
|
"[&_a]:font-medium [&_a]:underline [&_a]:decoration-edge [&_a]:underline-offset-4",
|
|
4891
4939
|
"[&_a:hover]:decoration-primary",
|
|
@@ -4922,44 +4970,45 @@ function DataTable({
|
|
|
4922
4970
|
return /* @__PURE__ */ jsxRuntime.jsx(DataCard, { data: items }, `${row.id}-${index}`);
|
|
4923
4971
|
}) });
|
|
4924
4972
|
}
|
|
4925
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4973
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Table, { ...props, className: cn.cn("relative text-sm", className), children: [
|
|
4974
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableHeader, { style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(({ id, label, as, hidden, width, ...columnProps }) => {
|
|
4975
|
+
if (hidden) {
|
|
4976
|
+
return null;
|
|
4977
|
+
}
|
|
4978
|
+
return /* @__PURE__ */ react.createElement(TableColumn, { ...columnProps, key: id, id }, label);
|
|
4979
|
+
}) }),
|
|
4980
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: rows.map((row, index) => {
|
|
4981
|
+
return (
|
|
4982
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: row data may not have unique ids
|
|
4983
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableRow, { id: String(row.id), style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(
|
|
4984
|
+
({
|
|
4985
|
+
id,
|
|
4986
|
+
label: _label,
|
|
4987
|
+
width: _width,
|
|
4988
|
+
as,
|
|
4989
|
+
hidden,
|
|
4990
|
+
className: className2,
|
|
4991
|
+
children: children2,
|
|
4992
|
+
...cellProps
|
|
4993
|
+
}) => {
|
|
4994
|
+
if (hidden) {
|
|
4995
|
+
return null;
|
|
4996
|
+
}
|
|
4997
|
+
const value = typeof children2 === "function" ? children2(row, index) : children2 || row[id];
|
|
4998
|
+
return /* @__PURE__ */ react.createElement(
|
|
4999
|
+
TableCell,
|
|
5000
|
+
{
|
|
5001
|
+
...cellProps,
|
|
5002
|
+
key: id,
|
|
5003
|
+
className: cn.cn("items-center", className2)
|
|
5004
|
+
},
|
|
5005
|
+
as ? react.createElement(as, {}, value) : value
|
|
5006
|
+
);
|
|
4937
5007
|
}
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: row data may not have unique ids
|
|
4943
|
-
/* @__PURE__ */ jsxRuntime.jsx(TableRow, { id: String(row.id), style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(({ id, as, hidden, className: className2, children: children2, ...cellProps }) => {
|
|
4944
|
-
if (hidden) {
|
|
4945
|
-
return null;
|
|
4946
|
-
}
|
|
4947
|
-
const value = typeof children2 === "function" ? children2(row, index) : children2 || row[id];
|
|
4948
|
-
return /* @__PURE__ */ react.createElement(
|
|
4949
|
-
TableCell,
|
|
4950
|
-
{
|
|
4951
|
-
...cellProps,
|
|
4952
|
-
key: id,
|
|
4953
|
-
className: cn("items-center", className2)
|
|
4954
|
-
},
|
|
4955
|
-
as ? react.createElement(as, {}, value) : value
|
|
4956
|
-
);
|
|
4957
|
-
}) }, index)
|
|
4958
|
-
);
|
|
4959
|
-
}) })
|
|
4960
|
-
]
|
|
4961
|
-
}
|
|
4962
|
-
);
|
|
5008
|
+
) }, index)
|
|
5009
|
+
);
|
|
5010
|
+
}) })
|
|
5011
|
+
] });
|
|
4963
5012
|
}
|
|
4964
5013
|
function DataColumn(_props) {
|
|
4965
5014
|
return null;
|
|
@@ -4977,9 +5026,9 @@ function Popover({
|
|
|
4977
5026
|
return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Positioner, { ...props, className: "zen-layer-floating", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4978
5027
|
popover.Popover.Popup,
|
|
4979
5028
|
{
|
|
4980
|
-
className: cn(
|
|
5029
|
+
className: cn.cn(
|
|
4981
5030
|
"zen-popover outline-none",
|
|
4982
|
-
isFullscreen && "zen-popover-fullscreen block border-0 rounded-none fixed inset-0 overflow-auto bg-surface
|
|
5031
|
+
isFullscreen && "zen-popover-fullscreen block border-0 rounded-none fixed inset-0 overflow-auto bg-surface",
|
|
4983
5032
|
className
|
|
4984
5033
|
),
|
|
4985
5034
|
children
|
|
@@ -5015,7 +5064,7 @@ function DatePicker({
|
|
|
5015
5064
|
onChange?.(nextDate);
|
|
5016
5065
|
setIsOpen(false);
|
|
5017
5066
|
};
|
|
5018
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
|
|
5067
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn.cn("flex flex-col gap-1", className), children: [
|
|
5019
5068
|
label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
|
|
5020
5069
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogTrigger, { overlayType: "popover", isOpen, onOpenChange: setIsOpen, children: [
|
|
5021
5070
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5025,10 +5074,10 @@ function DatePicker({
|
|
|
5025
5074
|
isDisabled,
|
|
5026
5075
|
...buttonProps,
|
|
5027
5076
|
id: fieldId,
|
|
5028
|
-
className: cn("justify-start gap-3 font-normal", buttonProps?.className),
|
|
5077
|
+
className: cn.cn("justify-start gap-3 font-normal", buttonProps?.className),
|
|
5029
5078
|
children: [
|
|
5030
5079
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.CalendarDays, {}) }),
|
|
5031
|
-
date ? new Intl.DateTimeFormat(locale, formatOptions).format(date) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5080
|
+
date ? new Intl.DateTimeFormat(locale, formatOptions).format(date) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-fg-muted", children: placeholder })
|
|
5032
5081
|
]
|
|
5033
5082
|
}
|
|
5034
5083
|
),
|
|
@@ -5052,7 +5101,7 @@ var sizeMap2 = {
|
|
|
5052
5101
|
lg: "w-3 h-3"
|
|
5053
5102
|
};
|
|
5054
5103
|
function Dot({ size }) {
|
|
5055
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("zen-dot", sizeMap2[size]) });
|
|
5104
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn.cn("zen-dot", sizeMap2[size]) });
|
|
5056
5105
|
}
|
|
5057
5106
|
var gapMap2 = {
|
|
5058
5107
|
sm: "1",
|
|
@@ -5066,6 +5115,29 @@ function Dots({ size = "md", className, color: _color, ...props }) {
|
|
|
5066
5115
|
/* @__PURE__ */ jsxRuntime.jsx(Dot, { size })
|
|
5067
5116
|
] });
|
|
5068
5117
|
}
|
|
5118
|
+
var Drawer = drawer.Drawer.Root;
|
|
5119
|
+
var DrawerTrigger = drawer.Drawer.Trigger;
|
|
5120
|
+
var DrawerClose = drawer.Drawer.Close;
|
|
5121
|
+
var DrawerTitle = drawer.Drawer.Title;
|
|
5122
|
+
var DrawerDescription = drawer.Drawer.Description;
|
|
5123
|
+
var DrawerContent = react.forwardRef(
|
|
5124
|
+
({ children, className, portalProps, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(drawer.Drawer.Portal, { ...portalProps, children: [
|
|
5125
|
+
/* @__PURE__ */ jsxRuntime.jsx(drawer.Drawer.Backdrop, { className: "zen-drawer-backdrop zen-layer-backdrop fixed inset-0 bg-black/80" }),
|
|
5126
|
+
/* @__PURE__ */ jsxRuntime.jsx(drawer.Drawer.Viewport, { className: "zen-layer-modal fixed inset-0 pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5127
|
+
drawer.Drawer.Popup,
|
|
5128
|
+
{
|
|
5129
|
+
...props,
|
|
5130
|
+
ref,
|
|
5131
|
+
className: (state) => cn.cn(
|
|
5132
|
+
"zen-drawer pointer-events-auto border border-edge bg-surface text-fg shadow-xl outline-none",
|
|
5133
|
+
typeof className === "function" ? className(state) : className
|
|
5134
|
+
),
|
|
5135
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(drawer.Drawer.Content, { className: "flex min-h-0 flex-col gap-4 overflow-auto p-6", children })
|
|
5136
|
+
}
|
|
5137
|
+
) })
|
|
5138
|
+
] })
|
|
5139
|
+
);
|
|
5140
|
+
DrawerContent.displayName = "DrawerContent";
|
|
5069
5141
|
var Empty = react.forwardRef(
|
|
5070
5142
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5071
5143
|
"div",
|
|
@@ -5073,7 +5145,7 @@ var Empty = react.forwardRef(
|
|
|
5073
5145
|
...props,
|
|
5074
5146
|
ref,
|
|
5075
5147
|
"data-slot": "empty",
|
|
5076
|
-
className: cn(
|
|
5148
|
+
className: cn.cn(
|
|
5077
5149
|
"flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",
|
|
5078
5150
|
className
|
|
5079
5151
|
)
|
|
@@ -5088,7 +5160,7 @@ var EmptyHeader = react.forwardRef(
|
|
|
5088
5160
|
...props,
|
|
5089
5161
|
ref,
|
|
5090
5162
|
"data-slot": "empty-header",
|
|
5091
|
-
className: cn("flex max-w-sm flex-col items-center gap-2 text-center", className)
|
|
5163
|
+
className: cn.cn("flex max-w-sm flex-col items-center gap-2 text-center", className)
|
|
5092
5164
|
}
|
|
5093
5165
|
)
|
|
5094
5166
|
);
|
|
@@ -5112,10 +5184,7 @@ var EmptyTitle = react.forwardRef(
|
|
|
5112
5184
|
...props,
|
|
5113
5185
|
ref,
|
|
5114
5186
|
"data-slot": "empty-title",
|
|
5115
|
-
className: cn(
|
|
5116
|
-
"text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)] font-medium tracking-tight",
|
|
5117
|
-
className
|
|
5118
|
-
)
|
|
5187
|
+
className: cn.cn("text-lg font-medium tracking-tight", className)
|
|
5119
5188
|
}
|
|
5120
5189
|
)
|
|
5121
5190
|
);
|
|
@@ -5126,8 +5195,8 @@ var EmptyDescription = react.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
5126
5195
|
...props,
|
|
5127
5196
|
ref,
|
|
5128
5197
|
"data-slot": "empty-description",
|
|
5129
|
-
className: cn(
|
|
5130
|
-
"text-
|
|
5198
|
+
className: cn.cn(
|
|
5199
|
+
"text-fg-muted [&>a:hover]:text-fg text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",
|
|
5131
5200
|
className
|
|
5132
5201
|
)
|
|
5133
5202
|
}
|
|
@@ -5140,8 +5209,8 @@ var EmptyContent = react.forwardRef(
|
|
|
5140
5209
|
...props,
|
|
5141
5210
|
ref,
|
|
5142
5211
|
"data-slot": "empty-content",
|
|
5143
|
-
className: cn(
|
|
5144
|
-
"flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-
|
|
5212
|
+
className: cn.cn(
|
|
5213
|
+
"flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
|
|
5145
5214
|
className
|
|
5146
5215
|
)
|
|
5147
5216
|
}
|
|
@@ -5164,7 +5233,7 @@ function Tooltip({
|
|
|
5164
5233
|
className: "zen-layer-floating",
|
|
5165
5234
|
side: placement ?? side,
|
|
5166
5235
|
sideOffset,
|
|
5167
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(tooltip$1.Tooltip.Popup, { className: cn("zen-popover group", tooltip(), className), children: [
|
|
5236
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(tooltip$1.Tooltip.Popup, { className: cn.cn("zen-popover group", tooltip(), className), children: [
|
|
5168
5237
|
showArrow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5169
5238
|
tooltip$1.Tooltip.Arrow,
|
|
5170
5239
|
{
|
|
@@ -5207,7 +5276,7 @@ function FloatingTooltip({ className, style, children, ...props }) {
|
|
|
5207
5276
|
TooltipBubble,
|
|
5208
5277
|
{
|
|
5209
5278
|
...props,
|
|
5210
|
-
className: cn(
|
|
5279
|
+
className: cn.cn(
|
|
5211
5280
|
"zen-layer-floating fixed pointer-events-none -translate-x-1/2 -translate-y-[calc(100%+10px)]",
|
|
5212
5281
|
className
|
|
5213
5282
|
),
|
|
@@ -5276,10 +5345,7 @@ function Form({
|
|
|
5276
5345
|
{
|
|
5277
5346
|
...props,
|
|
5278
5347
|
autoComplete,
|
|
5279
|
-
className: cn(
|
|
5280
|
-
"flex flex-col relative text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] gap-3",
|
|
5281
|
-
className
|
|
5282
|
-
),
|
|
5348
|
+
className: cn.cn("flex flex-col relative text-sm gap-3", className),
|
|
5283
5349
|
onSubmit: onSubmit ? handleSubmit(onSubmit) : void 0,
|
|
5284
5350
|
onKeyDown,
|
|
5285
5351
|
children: typeof children === "function" ? children(formValues) : children
|
|
@@ -5372,13 +5438,13 @@ function Spinner(props) {
|
|
|
5372
5438
|
Box,
|
|
5373
5439
|
{
|
|
5374
5440
|
...domProps,
|
|
5375
|
-
className: cn("relative inline-flex justify-center items-center", sizeMap3[size], className),
|
|
5441
|
+
className: cn.cn("relative inline-flex justify-center items-center", sizeMap3[size], className),
|
|
5376
5442
|
children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: "25 25 50 50", className: "zen-spinner-svg w-full h-full", children: [
|
|
5377
5443
|
!quiet && /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "zen-spinner-track stroke-interactive", cx: "50", cy: "50", r: "20" }),
|
|
5378
5444
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5379
5445
|
"circle",
|
|
5380
5446
|
{
|
|
5381
|
-
className: cn(
|
|
5447
|
+
className: cn.cn(
|
|
5382
5448
|
"zen-spinner-fill",
|
|
5383
5449
|
isDisabled ? "stroke-content-disabled" : "stroke-primary"
|
|
5384
5450
|
),
|
|
@@ -5648,7 +5714,7 @@ function Toast({
|
|
|
5648
5714
|
...props
|
|
5649
5715
|
}) {
|
|
5650
5716
|
const hasActions = actions?.length > 0;
|
|
5651
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Row, { ...props, className: cn(toast({ variant }), className), children: [
|
|
5717
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Row, { ...props, className: cn.cn(toast({ variant }), className), children: [
|
|
5652
5718
|
/* @__PURE__ */ jsxRuntime.jsxs(Column, { flexGrow: 1, gap: "1", children: [
|
|
5653
5719
|
title && /* @__PURE__ */ jsxRuntime.jsx(Text, { weight: "semibold", children: title }),
|
|
5654
5720
|
message && /* @__PURE__ */ jsxRuntime.jsx(Text, { color: title ? "muted" : void 0, children: message })
|
|
@@ -5662,7 +5728,7 @@ function Toast({
|
|
|
5662
5728
|
"aria-hidden": true,
|
|
5663
5729
|
"aria-label": "Close",
|
|
5664
5730
|
size: "sm",
|
|
5665
|
-
className: "cursor-pointer text-
|
|
5731
|
+
className: "cursor-pointer text-fg-muted hover:text-fg",
|
|
5666
5732
|
onClick: () => onClose?.(TOAST_CLOSE_ACTION),
|
|
5667
5733
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.X, {})
|
|
5668
5734
|
}
|
|
@@ -5715,7 +5781,7 @@ function Toaster({ duration = 0, position = "bottom-right" }) {
|
|
|
5715
5781
|
Column,
|
|
5716
5782
|
{
|
|
5717
5783
|
gap: "2",
|
|
5718
|
-
className: cn("zen-layer-toast fixed", positionClasses[position]),
|
|
5784
|
+
className: cn.cn("zen-layer-toast fixed", positionClasses[position]),
|
|
5719
5785
|
onMouseEnter: () => setHovered(true),
|
|
5720
5786
|
onMouseLeave: () => setHovered(false),
|
|
5721
5787
|
children: transitions((style, item) => {
|
|
@@ -5779,7 +5845,7 @@ function Image({
|
|
|
5779
5845
|
className,
|
|
5780
5846
|
...props
|
|
5781
5847
|
}) {
|
|
5782
|
-
const classes = cn(
|
|
5848
|
+
const classes = cn.cn(
|
|
5783
5849
|
"block max-w-full",
|
|
5784
5850
|
mapBorderRadius(borderRadius),
|
|
5785
5851
|
mapShadow(shadow),
|
|
@@ -5795,9 +5861,9 @@ function Kbd({ className, children, ...props }) {
|
|
|
5795
5861
|
"kbd",
|
|
5796
5862
|
{
|
|
5797
5863
|
...props,
|
|
5798
|
-
className: cn(
|
|
5864
|
+
className: cn.cn(
|
|
5799
5865
|
"inline-flex items-center justify-center gap-1",
|
|
5800
|
-
"text-
|
|
5866
|
+
"text-sm font-mono text-fg",
|
|
5801
5867
|
"px-1.5 py-0.5 rounded border border-edge bg-surface-raised shadow-sm",
|
|
5802
5868
|
className
|
|
5803
5869
|
),
|
|
@@ -5821,7 +5887,7 @@ function Loading({
|
|
|
5821
5887
|
Box,
|
|
5822
5888
|
{
|
|
5823
5889
|
...props,
|
|
5824
|
-
className: cn(
|
|
5890
|
+
className: cn.cn(
|
|
5825
5891
|
"relative flex justify-center items-center flex-1 pointer-events-none",
|
|
5826
5892
|
placementClasses2[placement],
|
|
5827
5893
|
className
|
|
@@ -5874,13 +5940,13 @@ function Menu({
|
|
|
5874
5940
|
}
|
|
5875
5941
|
onSelectionChange?.(next);
|
|
5876
5942
|
};
|
|
5877
|
-
const popupClassName2 = cn(
|
|
5878
|
-
"min-w-[200px] p-2 border border-edge rounded-md shadow-lg bg-surface
|
|
5943
|
+
const popupClassName2 = cn.cn(
|
|
5944
|
+
"min-w-[200px] p-2 border border-edge rounded-md shadow-lg bg-surface overflow-hidden outline-none",
|
|
5879
5945
|
className
|
|
5880
5946
|
);
|
|
5881
5947
|
const popupContent = /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value: { selected, select }, children });
|
|
5882
5948
|
if (primitiveKind === "context-menu") {
|
|
5883
|
-
return /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.Positioner, { className: "zen-layer-floating", children: /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.Popup, { ...props, className: cn("zen-popover", popupClassName2), children: popupContent }) }) });
|
|
5949
|
+
return /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.Positioner, { className: "zen-layer-floating", children: /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.Popup, { ...props, className: cn.cn("zen-popover", popupClassName2), children: popupContent }) }) });
|
|
5884
5950
|
}
|
|
5885
5951
|
if (primitiveKind === "menu") {
|
|
5886
5952
|
return /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5889,7 +5955,7 @@ function Menu({
|
|
|
5889
5955
|
sideOffset: 4,
|
|
5890
5956
|
...inMenubar ? { align: "start" } : {},
|
|
5891
5957
|
className: "zen-layer-floating",
|
|
5892
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Popup, { ...props, className: cn("zen-popover", popupClassName2), children: popupContent })
|
|
5958
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Popup, { ...props, className: cn.cn("zen-popover", popupClassName2), children: popupContent })
|
|
5893
5959
|
}
|
|
5894
5960
|
) });
|
|
5895
5961
|
}
|
|
@@ -5920,10 +5986,10 @@ function MenuItem({
|
|
|
5920
5986
|
onAction?.(key);
|
|
5921
5987
|
}
|
|
5922
5988
|
};
|
|
5923
|
-
const itemClassName = cn(
|
|
5924
|
-
"text-
|
|
5989
|
+
const itemClassName = cn.cn(
|
|
5990
|
+
"text-sm flex items-center justify-between gap-3 px-2 py-1.5 rounded cursor-pointer outline-none w-full",
|
|
5925
5991
|
"hover:bg-interactive focus:bg-interactive data-[highlighted]:bg-interactive",
|
|
5926
|
-
"data-[disabled]:text-
|
|
5992
|
+
"data-[disabled]:text-fg-disabled",
|
|
5927
5993
|
"data-[selected]:font-semibold",
|
|
5928
5994
|
className
|
|
5929
5995
|
);
|
|
@@ -5995,7 +6061,7 @@ function MenuSeparator({ className, ...props }) {
|
|
|
5995
6061
|
menu.Menu.Separator,
|
|
5996
6062
|
{
|
|
5997
6063
|
...props,
|
|
5998
|
-
className: cn("block h-px bg-edge-muted my-2 -mx-2", className)
|
|
6064
|
+
className: cn.cn("block h-px bg-edge-muted my-2 -mx-2", className)
|
|
5999
6065
|
}
|
|
6000
6066
|
);
|
|
6001
6067
|
}
|
|
@@ -6008,11 +6074,11 @@ function MenuSection({
|
|
|
6008
6074
|
...props
|
|
6009
6075
|
}) {
|
|
6010
6076
|
const primitiveKind = react.useContext(MenuPrimitiveContext);
|
|
6011
|
-
const groupClassName = cn("[&:not(:last-child)]:mb-4", className);
|
|
6077
|
+
const groupClassName = cn.cn("[&:not(:last-child)]:mb-4", className);
|
|
6012
6078
|
const groupStyle = style;
|
|
6013
6079
|
const body = maxHeight ? /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { maxHeight, children }) : children;
|
|
6014
6080
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6015
|
-
title && (primitiveKind === "context-menu" ? /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.GroupLabel, { className: "text-
|
|
6081
|
+
title && (primitiveKind === "context-menu" ? /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.GroupLabel, { className: "text-sm font-bold px-2 py-1.5", children: title }) : primitiveKind === "menu" ? /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.GroupLabel, { className: "text-sm font-bold px-2 py-1.5", children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-bold px-2 py-1.5", children: title })),
|
|
6016
6082
|
body
|
|
6017
6083
|
] });
|
|
6018
6084
|
if (primitiveKind === "context-menu") {
|
|
@@ -6051,7 +6117,7 @@ function Menubar({ isDisabled, className, children, ...props }) {
|
|
|
6051
6117
|
{
|
|
6052
6118
|
...props,
|
|
6053
6119
|
disabled: isDisabled,
|
|
6054
|
-
className: cn("flex items-center gap-1 w-fit", className),
|
|
6120
|
+
className: cn.cn("flex items-center gap-1 w-fit", className),
|
|
6055
6121
|
children
|
|
6056
6122
|
}
|
|
6057
6123
|
);
|
|
@@ -6085,7 +6151,7 @@ function Meter({
|
|
|
6085
6151
|
min: minValue,
|
|
6086
6152
|
max: maxValue,
|
|
6087
6153
|
format: formatOptions,
|
|
6088
|
-
className: cn("flex flex-col gap-1 w-full", className),
|
|
6154
|
+
className: cn.cn("flex flex-col gap-1 w-full", className),
|
|
6089
6155
|
children: [
|
|
6090
6156
|
(label || showValue) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
6091
6157
|
label && /* @__PURE__ */ jsxRuntime.jsx(meter.Meter.Label, { render: /* @__PURE__ */ jsxRuntime.jsx(Label, {}), children: label }),
|
|
@@ -6097,18 +6163,18 @@ function Meter({
|
|
|
6097
6163
|
);
|
|
6098
6164
|
}
|
|
6099
6165
|
var NavbarContext = react.createContext({ showArrow: true });
|
|
6100
|
-
var triggerClassName = cn(
|
|
6166
|
+
var triggerClassName = cn.cn(
|
|
6101
6167
|
"flex items-center gap-1 select-none cursor-pointer rounded-md px-3 py-2",
|
|
6102
|
-
"text-
|
|
6168
|
+
"text-sm font-medium text-fg bg-transparent border-0",
|
|
6103
6169
|
"hover:bg-interactive data-[popup-open]:bg-interactive",
|
|
6104
6170
|
"outline-none [&:focus-visible]:outline-2 [&:focus-visible]:outline-offset-1 [&:focus-visible]:outline-focus-ring"
|
|
6105
6171
|
);
|
|
6106
|
-
var itemLinkClassName = cn(
|
|
6172
|
+
var itemLinkClassName = cn.cn(
|
|
6107
6173
|
"flex items-center gap-1 select-none cursor-pointer rounded-md px-3 py-2",
|
|
6108
6174
|
"hover:bg-interactive",
|
|
6109
6175
|
"outline-none [&:focus-visible]:outline-2 [&:focus-visible]:outline-offset-1 [&:focus-visible]:outline-focus-ring"
|
|
6110
6176
|
);
|
|
6111
|
-
var contentClassName = cn(
|
|
6177
|
+
var contentClassName = cn.cn(
|
|
6112
6178
|
"w-max",
|
|
6113
6179
|
// Menu already provides the popup padding. Let the shared navbar popup own
|
|
6114
6180
|
// the surface so nested menus do not render a second border and shadow.
|
|
@@ -6120,7 +6186,7 @@ var contentClassName = cn(
|
|
|
6120
6186
|
"data-[ending-style]:data-[activation-direction=left]:translate-x-[50%]",
|
|
6121
6187
|
"data-[ending-style]:data-[activation-direction=right]:translate-x-[-50%]"
|
|
6122
6188
|
);
|
|
6123
|
-
var positionerClassName = cn(
|
|
6189
|
+
var positionerClassName = cn.cn(
|
|
6124
6190
|
"box-border h-(--positioner-height) w-(--positioner-width) max-w-(--available-width)",
|
|
6125
6191
|
"transition-[top,left,right,bottom] duration-(--duration) ease-(--easing)",
|
|
6126
6192
|
"data-[instant]:transition-none",
|
|
@@ -6129,11 +6195,11 @@ var positionerClassName = cn(
|
|
|
6129
6195
|
"data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0 data-[side=bottom]:before:h-2.5",
|
|
6130
6196
|
"data-[side=top]:before:bottom-[-10px] data-[side=top]:before:right-0 data-[side=top]:before:left-0 data-[side=top]:before:h-2.5"
|
|
6131
6197
|
);
|
|
6132
|
-
var popupClassName = cn(
|
|
6198
|
+
var popupClassName = cn.cn(
|
|
6133
6199
|
"relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin)",
|
|
6134
6200
|
// `overflow-hidden` clips the nested menu's square background to the rounded
|
|
6135
6201
|
// corners so the popup border stays visible all the way around.
|
|
6136
|
-
"overflow-hidden rounded-md border border-edge bg-surface
|
|
6202
|
+
"overflow-hidden rounded-md border border-edge bg-surface shadow-lg outline-none",
|
|
6137
6203
|
"transition-[opacity,transform,width,height,scale,translate] duration-(--duration) ease-(--easing)",
|
|
6138
6204
|
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
6139
6205
|
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[ending-style]:ease-[ease]"
|
|
@@ -6145,12 +6211,12 @@ function Navbar({
|
|
|
6145
6211
|
color: _color,
|
|
6146
6212
|
...props
|
|
6147
6213
|
}) {
|
|
6148
|
-
return /* @__PURE__ */ jsxRuntime.jsx(NavbarContext.Provider, { value: { showArrow }, children: /* @__PURE__ */ jsxRuntime.jsxs(navigationMenu.NavigationMenu.Root, { className: cn("relative", className), ...props, children: [
|
|
6214
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NavbarContext.Provider, { value: { showArrow }, children: /* @__PURE__ */ jsxRuntime.jsxs(navigationMenu.NavigationMenu.Root, { className: cn.cn("relative", className), ...props, children: [
|
|
6149
6215
|
/* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.List, { className: "flex items-center gap-1", children }),
|
|
6150
6216
|
/* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6151
6217
|
navigationMenu.NavigationMenu.Positioner,
|
|
6152
6218
|
{
|
|
6153
|
-
className: cn("zen-layer-floating", positionerClassName),
|
|
6219
|
+
className: cn.cn("zen-layer-floating", positionerClassName),
|
|
6154
6220
|
sideOffset: 10,
|
|
6155
6221
|
collisionPadding: 16,
|
|
6156
6222
|
style: {
|
|
@@ -6172,21 +6238,21 @@ function NavbarItem({
|
|
|
6172
6238
|
const { showArrow } = react.useContext(NavbarContext);
|
|
6173
6239
|
if (label) {
|
|
6174
6240
|
return /* @__PURE__ */ jsxRuntime.jsxs(navigationMenu.NavigationMenu.Item, { ...props, children: [
|
|
6175
|
-
/* @__PURE__ */ jsxRuntime.jsxs(navigationMenu.NavigationMenu.Trigger, { className: cn(triggerClassName, className), children: [
|
|
6241
|
+
/* @__PURE__ */ jsxRuntime.jsxs(navigationMenu.NavigationMenu.Trigger, { className: cn.cn(triggerClassName, className), children: [
|
|
6176
6242
|
/* @__PURE__ */ jsxRuntime.jsx(Text, { children: label }),
|
|
6177
|
-
showArrow && /* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Icon, { className: "flex text-
|
|
6243
|
+
showArrow && /* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Icon, { className: "flex text-fg-muted transition-transform duration-200 ease-in-out data-[popup-open]:rotate-180", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.ChevronDown, { className: "size-4" }) })
|
|
6178
6244
|
] }),
|
|
6179
6245
|
/* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Content, { className: contentClassName, children })
|
|
6180
6246
|
] });
|
|
6181
6247
|
}
|
|
6182
|
-
return /* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Item, { ...props, className: cn(itemLinkClassName, className), children });
|
|
6248
|
+
return /* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Item, { ...props, className: cn.cn(itemLinkClassName, className), children });
|
|
6183
6249
|
}
|
|
6184
6250
|
function NavbarLink({ className, ...props }) {
|
|
6185
6251
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6186
6252
|
navigationMenu.NavigationMenu.Link,
|
|
6187
6253
|
{
|
|
6188
|
-
className: cn(
|
|
6189
|
-
"flex items-center gap-1 select-none rounded-md px-3 py-2 no-underline text-
|
|
6254
|
+
className: cn.cn(
|
|
6255
|
+
"flex items-center gap-1 select-none rounded-md px-3 py-2 no-underline text-fg",
|
|
6190
6256
|
"hover:bg-interactive",
|
|
6191
6257
|
"outline-none [&:focus-visible]:outline-2 [&:focus-visible]:outline-offset-1 [&:focus-visible]:outline-focus-ring",
|
|
6192
6258
|
className
|
|
@@ -6197,9 +6263,9 @@ function NavbarLink({ className, ...props }) {
|
|
|
6197
6263
|
}
|
|
6198
6264
|
var stepperClasses = [
|
|
6199
6265
|
"flex items-center justify-center self-stretch px-3 shrink-0",
|
|
6200
|
-
"cursor-pointer select-none bg-transparent text-
|
|
6266
|
+
"cursor-pointer select-none bg-transparent text-fg",
|
|
6201
6267
|
"hover:bg-interactive active:bg-interactive-hover",
|
|
6202
|
-
"disabled:text-
|
|
6268
|
+
"disabled:text-fg-disabled disabled:cursor-default disabled:hover:bg-transparent"
|
|
6203
6269
|
];
|
|
6204
6270
|
function NumberField({
|
|
6205
6271
|
label,
|
|
@@ -6228,19 +6294,19 @@ function NumberField({
|
|
|
6228
6294
|
required: isRequired,
|
|
6229
6295
|
format: formatOptions,
|
|
6230
6296
|
onValueChange: (value) => onChange?.(value),
|
|
6231
|
-
className: cn("flex flex-col gap-1", className),
|
|
6297
|
+
className: cn.cn("flex flex-col gap-1", className),
|
|
6232
6298
|
children: [
|
|
6233
6299
|
label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
|
|
6234
|
-
/* @__PURE__ */ jsxRuntime.jsxs(numberField.NumberField.Group, { className: cn(inputField(), "p-0 px-0 gap-0 overflow-hidden"), children: [
|
|
6235
|
-
/* @__PURE__ */ jsxRuntime.jsx(numberField.NumberField.Decrement, { className: cn(stepperClasses, "border-r border-edge"), children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Minus, {}) }) }),
|
|
6300
|
+
/* @__PURE__ */ jsxRuntime.jsxs(numberField.NumberField.Group, { className: cn.cn(inputField(), "p-0 px-0 gap-0 overflow-hidden"), children: [
|
|
6301
|
+
/* @__PURE__ */ jsxRuntime.jsx(numberField.NumberField.Decrement, { className: cn.cn(stepperClasses, "border-r border-edge"), children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Minus, {}) }) }),
|
|
6236
6302
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6237
6303
|
numberField.NumberField.Input,
|
|
6238
6304
|
{
|
|
6239
6305
|
placeholder,
|
|
6240
|
-
className: "w-full min-w-0 text-
|
|
6306
|
+
className: "w-full min-w-0 text-sm text-center tabular-nums bg-transparent py-2 px-3 outline-none placeholder:text-fg-muted"
|
|
6241
6307
|
}
|
|
6242
6308
|
),
|
|
6243
|
-
/* @__PURE__ */ jsxRuntime.jsx(numberField.NumberField.Increment, { className: cn(stepperClasses, "border-l border-edge"), children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Plus, {}) }) })
|
|
6309
|
+
/* @__PURE__ */ jsxRuntime.jsx(numberField.NumberField.Increment, { className: cn.cn(stepperClasses, "border-l border-edge"), children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Plus, {}) }) })
|
|
6244
6310
|
] })
|
|
6245
6311
|
]
|
|
6246
6312
|
}
|
|
@@ -6272,16 +6338,16 @@ function OTPField({
|
|
|
6272
6338
|
required: isRequired,
|
|
6273
6339
|
onValueChange: (value) => onChange?.(value),
|
|
6274
6340
|
onValueComplete: (value) => onComplete?.(value),
|
|
6275
|
-
className: cn("flex items-center gap-2", className),
|
|
6341
|
+
className: cn.cn("flex items-center gap-2", className),
|
|
6276
6342
|
children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6277
6343
|
otpField.OTPField.Input,
|
|
6278
6344
|
{
|
|
6279
|
-
className: cn(
|
|
6280
|
-
"size-10 text-center text-
|
|
6281
|
-
"text-
|
|
6282
|
-
"focus:border-edge-strong focus:ring-2 focus:ring-focus-ring focus:ring-offset-1 focus:ring-offset-surface
|
|
6345
|
+
className: cn.cn(
|
|
6346
|
+
"size-10 text-center text-sm rounded border border-edge bg-surface shadow-sm",
|
|
6347
|
+
"text-fg outline-none transition-colors",
|
|
6348
|
+
"focus:border-edge-strong focus:ring-2 focus:ring-focus-ring focus:ring-offset-1 focus:ring-offset-surface",
|
|
6283
6349
|
"data-[filled]:border-edge-strong",
|
|
6284
|
-
"disabled:bg-surface-disabled disabled:text-
|
|
6350
|
+
"disabled:bg-surface-disabled disabled:text-fg-disabled"
|
|
6285
6351
|
)
|
|
6286
6352
|
},
|
|
6287
6353
|
index
|
|
@@ -6369,7 +6435,7 @@ function Pagination({
|
|
|
6369
6435
|
}
|
|
6370
6436
|
onChange?.(clamped);
|
|
6371
6437
|
};
|
|
6372
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("nav", { ...props, "aria-label": "Pagination", className: cn("flex items-center gap-1", className), children: [
|
|
6438
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("nav", { ...props, "aria-label": "Pagination", className: cn.cn("flex items-center gap-1", className), children: [
|
|
6373
6439
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6374
6440
|
Button,
|
|
6375
6441
|
{
|
|
@@ -6384,7 +6450,7 @@ function Pagination({
|
|
|
6384
6450
|
(item, index) => item === "ellipsis" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6385
6451
|
"span",
|
|
6386
6452
|
{
|
|
6387
|
-
className: "flex items-center justify-center size-9 text-
|
|
6453
|
+
className: "flex items-center justify-center size-9 text-fg-muted",
|
|
6388
6454
|
"aria-hidden": "true",
|
|
6389
6455
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Ellipsis, {}) })
|
|
6390
6456
|
},
|
|
@@ -6507,8 +6573,36 @@ function PasswordField({
|
|
|
6507
6573
|
}
|
|
6508
6574
|
return input;
|
|
6509
6575
|
}
|
|
6576
|
+
var PreviewCard = previewCard.PreviewCard.Root;
|
|
6577
|
+
var PreviewCardTrigger = previewCard.PreviewCard.Trigger;
|
|
6578
|
+
var PreviewCardContent = react.forwardRef(
|
|
6579
|
+
({ className, positionerProps, portalProps, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(previewCard.PreviewCard.Portal, { ...portalProps, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6580
|
+
previewCard.PreviewCard.Positioner,
|
|
6581
|
+
{
|
|
6582
|
+
sideOffset: 8,
|
|
6583
|
+
align: "start",
|
|
6584
|
+
...positionerProps,
|
|
6585
|
+
className: (state) => cn.cn(
|
|
6586
|
+
"zen-layer-floating",
|
|
6587
|
+
typeof positionerProps?.className === "function" ? positionerProps.className(state) : positionerProps?.className
|
|
6588
|
+
),
|
|
6589
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6590
|
+
previewCard.PreviewCard.Popup,
|
|
6591
|
+
{
|
|
6592
|
+
...props,
|
|
6593
|
+
ref,
|
|
6594
|
+
className: (state) => cn.cn(
|
|
6595
|
+
"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",
|
|
6596
|
+
typeof className === "function" ? className(state) : className
|
|
6597
|
+
)
|
|
6598
|
+
}
|
|
6599
|
+
)
|
|
6600
|
+
}
|
|
6601
|
+
) })
|
|
6602
|
+
);
|
|
6603
|
+
PreviewCardContent.displayName = "PreviewCardContent";
|
|
6510
6604
|
function ProgressBar({ className, showPercentage, ...props }) {
|
|
6511
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(progress.Progress.Root, { ...props, className: cn("flex items-center gap-3 w-full", className), children: [
|
|
6605
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(progress.Progress.Root, { ...props, className: cn.cn("flex items-center gap-3 w-full", className), children: [
|
|
6512
6606
|
/* @__PURE__ */ jsxRuntime.jsx(progress.Progress.Track, { className: "relative overflow-hidden w-full h-2 rounded-full bg-interactive", children: /* @__PURE__ */ jsxRuntime.jsx(progress.Progress.Indicator, { className: "h-full rounded-full bg-primary transition-all" }) }),
|
|
6513
6607
|
showPercentage && /* @__PURE__ */ jsxRuntime.jsx(Text, { className: "tabular-nums", children: /* @__PURE__ */ jsxRuntime.jsx(progress.Progress.Value, {}) })
|
|
6514
6608
|
] });
|
|
@@ -6533,7 +6627,7 @@ function ProgressCircle({
|
|
|
6533
6627
|
value,
|
|
6534
6628
|
min,
|
|
6535
6629
|
max,
|
|
6536
|
-
className: cn("relative flex justify-center items-center", className),
|
|
6630
|
+
className: cn.cn("relative flex justify-center items-center", className),
|
|
6537
6631
|
children: [
|
|
6538
6632
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6539
6633
|
"svg",
|
|
@@ -6557,7 +6651,7 @@ function ProgressCircle({
|
|
|
6557
6651
|
]
|
|
6558
6652
|
}
|
|
6559
6653
|
),
|
|
6560
|
-
showPercentage && /* @__PURE__ */ jsxRuntime.jsx(progress.Progress.Value, { className: "text-
|
|
6654
|
+
showPercentage && /* @__PURE__ */ jsxRuntime.jsx(progress.Progress.Value, { className: "text-sm font-bold absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" })
|
|
6561
6655
|
]
|
|
6562
6656
|
}
|
|
6563
6657
|
);
|
|
@@ -6582,7 +6676,7 @@ function RadioGroup({
|
|
|
6582
6676
|
disabled: isDisabled,
|
|
6583
6677
|
readOnly: isReadOnly,
|
|
6584
6678
|
onValueChange: onChange,
|
|
6585
|
-
className: cn("flex flex-col gap-2", className),
|
|
6679
|
+
className: cn.cn("flex flex-col gap-2", className),
|
|
6586
6680
|
children: [
|
|
6587
6681
|
label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
|
|
6588
6682
|
/* @__PURE__ */ jsxRuntime.jsx(Column, { gap: "2", children })
|
|
@@ -6596,10 +6690,10 @@ function Radio({ children, className, isDisabled, ...props }) {
|
|
|
6596
6690
|
{
|
|
6597
6691
|
...props,
|
|
6598
6692
|
disabled: isDisabled,
|
|
6599
|
-
className: cn(
|
|
6600
|
-
"radio group flex items-center gap-3 cursor-pointer text-
|
|
6693
|
+
className: cn.cn(
|
|
6694
|
+
"radio group flex items-center gap-3 cursor-pointer text-sm",
|
|
6601
6695
|
"before:content-[''] before:block before:w-5 before:h-5 before:box-border before:rounded-full",
|
|
6602
|
-
"before:border before:border-edge-strong before:bg-surface
|
|
6696
|
+
"before:border before:border-edge-strong before:bg-surface before:transition-all before:duration-200",
|
|
6603
6697
|
"data-[checked]:before:border-[6px] data-[checked]:before:border-primary",
|
|
6604
6698
|
"data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",
|
|
6605
6699
|
className
|
|
@@ -6619,12 +6713,12 @@ function ResizablePanelGroup({
|
|
|
6619
6713
|
{
|
|
6620
6714
|
...props,
|
|
6621
6715
|
orientation: direction,
|
|
6622
|
-
className: cn("flex size-full", direction === "vertical" && "flex-col", className)
|
|
6716
|
+
className: cn.cn("flex size-full", direction === "vertical" && "flex-col", className)
|
|
6623
6717
|
}
|
|
6624
6718
|
) });
|
|
6625
6719
|
}
|
|
6626
6720
|
function ResizablePanel({ className, ...props }) {
|
|
6627
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactResizablePanels.Panel, { ...props, className: cn("overflow-hidden", className) });
|
|
6721
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactResizablePanels.Panel, { ...props, className: cn.cn("overflow-hidden", className) });
|
|
6628
6722
|
}
|
|
6629
6723
|
function ResizableHandle({ withHandle, className, ...props }) {
|
|
6630
6724
|
const direction = react.useContext(ResizableOrientationContext);
|
|
@@ -6633,7 +6727,7 @@ function ResizableHandle({ withHandle, className, ...props }) {
|
|
|
6633
6727
|
reactResizablePanels.Separator,
|
|
6634
6728
|
{
|
|
6635
6729
|
...props,
|
|
6636
|
-
className: cn(
|
|
6730
|
+
className: cn.cn(
|
|
6637
6731
|
"relative flex items-center justify-center bg-edge shrink-0",
|
|
6638
6732
|
isVertical ? "h-px w-full" : "w-px",
|
|
6639
6733
|
isVertical ? "after:absolute after:inset-x-0 after:-top-1 after:h-2" : "after:absolute after:inset-y-0 after:-left-1 after:w-2",
|
|
@@ -6643,11 +6737,11 @@ function ResizableHandle({ withHandle, className, ...props }) {
|
|
|
6643
6737
|
children: withHandle && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6644
6738
|
"div",
|
|
6645
6739
|
{
|
|
6646
|
-
className: cn(
|
|
6740
|
+
className: cn.cn(
|
|
6647
6741
|
"z-10 flex h-5 w-3.5 items-center justify-center rounded-sm border border-edge bg-surface-raised",
|
|
6648
6742
|
isVertical && "rotate-90"
|
|
6649
6743
|
),
|
|
6650
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.GripVertical, { className: "size-2.5 text-
|
|
6744
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.GripVertical, { className: "size-2.5 text-fg-muted" })
|
|
6651
6745
|
}
|
|
6652
6746
|
)
|
|
6653
6747
|
}
|
|
@@ -6713,7 +6807,7 @@ function SearchField({
|
|
|
6713
6807
|
size: "icon-xs",
|
|
6714
6808
|
isDisabled: props.disabled,
|
|
6715
6809
|
"aria-label": "Clear search",
|
|
6716
|
-
className: "text-
|
|
6810
|
+
className: "text-fg-muted",
|
|
6717
6811
|
onClick: () => handleChange(""),
|
|
6718
6812
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.X, {}) })
|
|
6719
6813
|
}
|
|
@@ -6779,7 +6873,7 @@ function Select({
|
|
|
6779
6873
|
);
|
|
6780
6874
|
const collection = children || normalizedItems?.map((item) => /* @__PURE__ */ jsxRuntime.jsx(ListItem, { value: item.value, children: item.label }, item.value));
|
|
6781
6875
|
const isEmpty = !collection || Array.isArray(collection) && collection.length === 0;
|
|
6782
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-1", className), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6876
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn.cn("flex flex-col gap-1", className), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6783
6877
|
select.Select.Root,
|
|
6784
6878
|
{
|
|
6785
6879
|
...props,
|
|
@@ -6806,7 +6900,7 @@ function Select({
|
|
|
6806
6900
|
{
|
|
6807
6901
|
variant: "outline",
|
|
6808
6902
|
...buttonProps,
|
|
6809
|
-
className: cn("w-full justify-between", buttonProps?.className)
|
|
6903
|
+
className: cn.cn("w-full justify-between", buttonProps?.className)
|
|
6810
6904
|
}
|
|
6811
6905
|
),
|
|
6812
6906
|
children: [
|
|
@@ -6828,11 +6922,11 @@ function Select({
|
|
|
6828
6922
|
sideOffset: 4,
|
|
6829
6923
|
alignItemWithTrigger,
|
|
6830
6924
|
...popoverProps,
|
|
6831
|
-
className: cn("zen-layer-floating", popoverProps?.className),
|
|
6925
|
+
className: cn.cn("zen-layer-floating", popoverProps?.className),
|
|
6832
6926
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6833
6927
|
select.Select.Popup,
|
|
6834
6928
|
{
|
|
6835
|
-
className: cn(
|
|
6929
|
+
className: cn.cn(
|
|
6836
6930
|
"zen-popover bg-surface-overlay border border-edge rounded-md shadow-lg outline-none",
|
|
6837
6931
|
isFullscreen && "zen-popover-fullscreen fixed inset-0 rounded-none"
|
|
6838
6932
|
),
|
|
@@ -6858,7 +6952,7 @@ function Select({
|
|
|
6858
6952
|
}
|
|
6859
6953
|
),
|
|
6860
6954
|
isLoading && /* @__PURE__ */ jsxRuntime.jsx(Loading, { className: "py-8", icon: "dots", placement: "center", size: "sm" }),
|
|
6861
|
-
!isLoading && isEmpty && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-8 text-center text-
|
|
6955
|
+
!isLoading && isEmpty && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-8 text-center text-sm text-fg-muted", children: "No results found" }),
|
|
6862
6956
|
/* @__PURE__ */ jsxRuntime.jsx(ListPrimitiveProvider, { kind: "select", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6863
6957
|
ScrollArea,
|
|
6864
6958
|
{
|
|
@@ -6869,7 +6963,7 @@ function Select({
|
|
|
6869
6963
|
{
|
|
6870
6964
|
...listProps,
|
|
6871
6965
|
isFullscreen,
|
|
6872
|
-
className: cn("overflow-visible", listProps?.className),
|
|
6966
|
+
className: cn.cn("overflow-visible", listProps?.className),
|
|
6873
6967
|
style: listProps?.style,
|
|
6874
6968
|
children: collection
|
|
6875
6969
|
}
|
|
@@ -6911,9 +7005,9 @@ function Sheet({
|
|
|
6911
7005
|
/* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Viewport, { className: "zen-layer-modal fixed inset-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6912
7006
|
dialog.Dialog.Popup,
|
|
6913
7007
|
{
|
|
6914
|
-
className: cn(
|
|
7008
|
+
className: cn.cn(
|
|
6915
7009
|
"relative p-6 overflow-auto outline-none",
|
|
6916
|
-
"bg-surface
|
|
7010
|
+
"bg-surface border-edge shadow-xl",
|
|
6917
7011
|
sideClasses[side],
|
|
6918
7012
|
className
|
|
6919
7013
|
),
|
|
@@ -6925,7 +7019,7 @@ function Sheet({
|
|
|
6925
7019
|
}
|
|
6926
7020
|
Sheet.zenOverlayType = "dialog";
|
|
6927
7021
|
function SheetHeader({ title, showClose = true, className, children }) {
|
|
6928
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-start justify-between gap-3 mb-4", className), children: [
|
|
7022
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn.cn("flex items-start justify-between gap-3 mb-4", className), children: [
|
|
6929
7023
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
6930
7024
|
title && /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Title, { render: /* @__PURE__ */ jsxRuntime.jsx(Heading, { size: "xl" }), children: title }),
|
|
6931
7025
|
children
|
|
@@ -6953,7 +7047,7 @@ function Skeleton({
|
|
|
6953
7047
|
width,
|
|
6954
7048
|
height,
|
|
6955
7049
|
borderRadius,
|
|
6956
|
-
className: cn("zen-skeleton", className)
|
|
7050
|
+
className: cn.cn("zen-skeleton", className)
|
|
6957
7051
|
}
|
|
6958
7052
|
);
|
|
6959
7053
|
}
|
|
@@ -7007,19 +7101,19 @@ function Slider({
|
|
|
7007
7101
|
disabled: isDisabled,
|
|
7008
7102
|
onValueChange: onChange,
|
|
7009
7103
|
onValueCommitted: onChangeEnd,
|
|
7010
|
-
className: cn("flex flex-col gap-2 w-full", className),
|
|
7104
|
+
className: cn.cn("flex flex-col gap-2 w-full", className),
|
|
7011
7105
|
children: [
|
|
7012
7106
|
/* @__PURE__ */ jsxRuntime.jsxs(Row, { justifyContent: "space-between", alignItems: "center", children: [
|
|
7013
7107
|
label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
|
|
7014
|
-
showValue && /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Value, { className: "text-
|
|
7108
|
+
showValue && /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Value, { className: "text-sm tabular-nums" })
|
|
7015
7109
|
] }),
|
|
7016
7110
|
/* @__PURE__ */ jsxRuntime.jsxs(slider.Slider.Control, { className: "relative h-5 w-full touch-none", children: [
|
|
7017
7111
|
/* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Track, { className: "absolute inset-x-0 top-1/2 -translate-y-1/2 h-2 rounded-full bg-interactive overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Indicator, { className: "h-full rounded-full bg-primary" }) }),
|
|
7018
7112
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7019
7113
|
slider.Slider.Thumb,
|
|
7020
7114
|
{
|
|
7021
|
-
className: cn(
|
|
7022
|
-
"w-5 h-5 rounded-full bg-surface
|
|
7115
|
+
className: cn.cn(
|
|
7116
|
+
"w-5 h-5 rounded-full bg-surface border-2 border-primary shadow",
|
|
7023
7117
|
"focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2"
|
|
7024
7118
|
)
|
|
7025
7119
|
}
|
|
@@ -7043,29 +7137,17 @@ function StatusDot({ color, variant }) {
|
|
|
7043
7137
|
Box,
|
|
7044
7138
|
{
|
|
7045
7139
|
borderRadius: "full",
|
|
7046
|
-
className: cn("w-2 h-2", variantColors[variant]),
|
|
7140
|
+
className: cn.cn("w-2 h-2", variantColors[variant]),
|
|
7047
7141
|
style: color ? { backgroundColor: color } : void 0
|
|
7048
7142
|
}
|
|
7049
7143
|
) });
|
|
7050
7144
|
}
|
|
7051
7145
|
function StatusLight(props) {
|
|
7052
7146
|
const { color, variant = "inactive", children, className, ...domProps } = props;
|
|
7053
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
alignItems: "center",
|
|
7058
|
-
gap: "2",
|
|
7059
|
-
className: cn(
|
|
7060
|
-
"text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
|
|
7061
|
-
className
|
|
7062
|
-
),
|
|
7063
|
-
children: [
|
|
7064
|
-
/* @__PURE__ */ jsxRuntime.jsx(StatusDot, { color, variant }),
|
|
7065
|
-
children
|
|
7066
|
-
]
|
|
7067
|
-
}
|
|
7068
|
-
);
|
|
7147
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Row, { ...domProps, alignItems: "center", gap: "2", className: cn.cn("text-sm", className), children: [
|
|
7148
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatusDot, { color, variant }),
|
|
7149
|
+
children
|
|
7150
|
+
] });
|
|
7069
7151
|
}
|
|
7070
7152
|
function Switch({
|
|
7071
7153
|
label,
|
|
@@ -7093,7 +7175,7 @@ function Switch({
|
|
|
7093
7175
|
checked,
|
|
7094
7176
|
defaultChecked: defaultSelected,
|
|
7095
7177
|
disabled: isDisabled,
|
|
7096
|
-
className: cn(styles.root(), className),
|
|
7178
|
+
className: cn.cn(styles.root(), className),
|
|
7097
7179
|
onCheckedChange: onChange,
|
|
7098
7180
|
children: [
|
|
7099
7181
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.track(), children: /* @__PURE__ */ jsxRuntime.jsx(_switch.Switch.Thumb, { className: styles.thumb() }) }),
|
|
@@ -7118,7 +7200,7 @@ function Tabs({
|
|
|
7118
7200
|
value: selectedKey,
|
|
7119
7201
|
defaultValue: defaultSelectedKey,
|
|
7120
7202
|
onValueChange: (value) => onSelectionChange?.(String(value)),
|
|
7121
|
-
className: cn("grid relative w-full gap-6", className),
|
|
7203
|
+
className: cn.cn("grid relative w-full gap-6", className),
|
|
7122
7204
|
children
|
|
7123
7205
|
}
|
|
7124
7206
|
);
|
|
@@ -7128,7 +7210,7 @@ function TabList({ children, className, ...props }) {
|
|
|
7128
7210
|
tabs.Tabs.List,
|
|
7129
7211
|
{
|
|
7130
7212
|
...props,
|
|
7131
|
-
className: cn(
|
|
7213
|
+
className: cn.cn(
|
|
7132
7214
|
"flex items-center border-b border-edge gap-6",
|
|
7133
7215
|
"[&_a.tab]:font-medium [&_a.tab]:no-underline",
|
|
7134
7216
|
className
|
|
@@ -7146,11 +7228,11 @@ function Tab({ id, value, isDisabled, href, children, className, ...props }) {
|
|
|
7146
7228
|
disabled: isDisabled,
|
|
7147
7229
|
render: href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href }) : void 0,
|
|
7148
7230
|
nativeButton: !href,
|
|
7149
|
-
className: cn(
|
|
7150
|
-
"tab flex items-center justify-center text-
|
|
7151
|
-
"hover:text-
|
|
7152
|
-
"data-[active]:text-
|
|
7153
|
-
"data-[disabled]:text-
|
|
7231
|
+
className: cn.cn(
|
|
7232
|
+
"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",
|
|
7233
|
+
"hover:text-fg",
|
|
7234
|
+
"data-[active]:text-fg data-[active]:border-b-primary",
|
|
7235
|
+
"data-[disabled]:text-fg-disabled data-[disabled]:cursor-default",
|
|
7154
7236
|
className
|
|
7155
7237
|
),
|
|
7156
7238
|
children
|
|
@@ -7172,7 +7254,7 @@ function TagGroup({ label, children, className, onRemove, ...props }) {
|
|
|
7172
7254
|
allowsRemoving: !!onRemove,
|
|
7173
7255
|
remove: (key) => onRemove?.(/* @__PURE__ */ new Set([key]))
|
|
7174
7256
|
},
|
|
7175
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, className: cn("flex flex-col gap-1", className), children: [
|
|
7257
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, className: cn.cn("flex flex-col gap-1", className), children: [
|
|
7176
7258
|
label && /* @__PURE__ */ jsxRuntime.jsx(Label, { children: label }),
|
|
7177
7259
|
/* @__PURE__ */ jsxRuntime.jsx("div", { role: "list", className: "flex flex-wrap gap-1", children })
|
|
7178
7260
|
] })
|
|
@@ -7188,7 +7270,7 @@ function Tag({ id, variant, children, className, isDisabled, ...props }) {
|
|
|
7188
7270
|
...props,
|
|
7189
7271
|
role: "listitem",
|
|
7190
7272
|
"aria-disabled": isDisabled || void 0,
|
|
7191
|
-
className: cn(styles.base(), className),
|
|
7273
|
+
className: cn.cn(styles.base(), className),
|
|
7192
7274
|
children: [
|
|
7193
7275
|
children,
|
|
7194
7276
|
allowsRemoving && !isDisabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7267,7 +7349,7 @@ function ThemeButton({
|
|
|
7267
7349
|
Button,
|
|
7268
7350
|
{
|
|
7269
7351
|
...props,
|
|
7270
|
-
className: cn(
|
|
7352
|
+
className: cn.cn(
|
|
7271
7353
|
"w-[42px] flex justify-center items-center cursor-pointer [&>div]:flex [&>div]:justify-center [&>div]:items-center [&>div]:absolute",
|
|
7272
7354
|
className
|
|
7273
7355
|
),
|
|
@@ -7322,8 +7404,8 @@ function ThemeSwitcher({ className }) {
|
|
|
7322
7404
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7323
7405
|
"div",
|
|
7324
7406
|
{
|
|
7325
|
-
className: cn(
|
|
7326
|
-
"inline-flex items-center bg-surface
|
|
7407
|
+
className: cn.cn(
|
|
7408
|
+
"inline-flex items-center bg-surface border border-edge rounded-md overflow-hidden",
|
|
7327
7409
|
className
|
|
7328
7410
|
),
|
|
7329
7411
|
children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7333,12 +7415,12 @@ function ThemeSwitcher({ className }) {
|
|
|
7333
7415
|
onClick: () => setMode(option.value),
|
|
7334
7416
|
"aria-label": option.label,
|
|
7335
7417
|
"aria-pressed": mode === option.value,
|
|
7336
|
-
className: cn(
|
|
7418
|
+
className: cn.cn(
|
|
7337
7419
|
"size-9 flex items-center justify-center cursor-pointer outline-none transition-colors",
|
|
7338
7420
|
"[&:not(:first-child)]:border-l [&:not(:first-child)]:border-edge",
|
|
7339
7421
|
"hover:bg-interactive",
|
|
7340
7422
|
"focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset",
|
|
7341
|
-
mode === option.value ? "bg-interactive text-
|
|
7423
|
+
mode === option.value ? "bg-interactive text-fg" : "text-fg-muted"
|
|
7342
7424
|
),
|
|
7343
7425
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: option.icon })
|
|
7344
7426
|
},
|
|
@@ -7367,10 +7449,10 @@ function Toggle({
|
|
|
7367
7449
|
defaultPressed: defaultSelected,
|
|
7368
7450
|
disabled: isDisabled,
|
|
7369
7451
|
onPressedChange: onChange,
|
|
7370
|
-
className: cn(
|
|
7452
|
+
className: cn.cn(
|
|
7371
7453
|
"flex items-center justify-center whitespace-nowrap gap-3 font-medium bg-interactive border border-transparent rounded p-2 relative cursor-pointer",
|
|
7372
7454
|
"hover:bg-interactive-hover",
|
|
7373
|
-
"data-[pressed]:text-primary-
|
|
7455
|
+
"data-[pressed]:text-primary-fg data-[pressed]:bg-primary",
|
|
7374
7456
|
className
|
|
7375
7457
|
),
|
|
7376
7458
|
children
|
|
@@ -7413,8 +7495,8 @@ function ToggleGroup({
|
|
|
7413
7495
|
defaultValue: defaultValue || (defaultSelectedKeys ? Array.from(defaultSelectedKeys) : void 0),
|
|
7414
7496
|
multiple: selectionMode === "multiple",
|
|
7415
7497
|
onValueChange: handleChange,
|
|
7416
|
-
className: cn(
|
|
7417
|
-
"inline-flex bg-surface
|
|
7498
|
+
className: cn.cn(
|
|
7499
|
+
"inline-flex bg-surface shadow-sm border border-edge rounded overflow-hidden",
|
|
7418
7500
|
className
|
|
7419
7501
|
),
|
|
7420
7502
|
children
|
|
@@ -7442,12 +7524,12 @@ function ToggleGroupItem({
|
|
|
7442
7524
|
...props,
|
|
7443
7525
|
value: props.value || id,
|
|
7444
7526
|
disabled: isDisabled,
|
|
7445
|
-
className: cn(
|
|
7446
|
-
"text-
|
|
7527
|
+
className: cn.cn(
|
|
7528
|
+
"text-fg-muted bg-surface font-bold flex items-center justify-center p-2 cursor-pointer outline-none",
|
|
7447
7529
|
"[&:not(:first-child)]:border-l [&:not(:first-child)]:border-edge",
|
|
7448
7530
|
"hover:bg-interactive",
|
|
7449
|
-
variant === "primary" ? "data-[pressed]:text-primary-
|
|
7450
|
-
"data-[disabled]:text-
|
|
7531
|
+
variant === "primary" ? "data-[pressed]:text-primary-fg data-[pressed]:bg-primary" : "data-[pressed]:text-fg data-[pressed]:bg-interactive",
|
|
7532
|
+
"data-[disabled]:text-fg-disabled",
|
|
7451
7533
|
className
|
|
7452
7534
|
),
|
|
7453
7535
|
children
|
|
@@ -7461,8 +7543,8 @@ function Toolbar({ isDisabled, orientation, className, children, ...props }) {
|
|
|
7461
7543
|
...props,
|
|
7462
7544
|
disabled: isDisabled,
|
|
7463
7545
|
orientation,
|
|
7464
|
-
className: cn(
|
|
7465
|
-
"flex items-center gap-1 p-1 rounded-md border border-edge bg-surface
|
|
7546
|
+
className: cn.cn(
|
|
7547
|
+
"flex items-center gap-1 p-1 rounded-md border border-edge bg-surface shadow-sm w-fit",
|
|
7466
7548
|
orientation === "vertical" && "flex-col",
|
|
7467
7549
|
className
|
|
7468
7550
|
),
|
|
@@ -7471,7 +7553,7 @@ function Toolbar({ isDisabled, orientation, className, children, ...props }) {
|
|
|
7471
7553
|
);
|
|
7472
7554
|
}
|
|
7473
7555
|
function ToolbarGroup({ className, children, ...props }) {
|
|
7474
|
-
return /* @__PURE__ */ jsxRuntime.jsx(toolbar.Toolbar.Group, { ...props, className: cn("flex items-center gap-1", className), children });
|
|
7556
|
+
return /* @__PURE__ */ jsxRuntime.jsx(toolbar.Toolbar.Group, { ...props, className: cn.cn("flex items-center gap-1", className), children });
|
|
7475
7557
|
}
|
|
7476
7558
|
function ToolbarButton({ isDisabled, variant = "quiet", ...props }) {
|
|
7477
7559
|
return /* @__PURE__ */ jsxRuntime.jsx(toolbar.Toolbar.Button, { disabled: isDisabled, render: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant, ...props }) });
|
|
@@ -7481,7 +7563,7 @@ function ToolbarSeparator({ className, ...props }) {
|
|
|
7481
7563
|
toolbar.Toolbar.Separator,
|
|
7482
7564
|
{
|
|
7483
7565
|
...props,
|
|
7484
|
-
render: /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "vertical", className: cn("mx-1 h-5 self-center", className) })
|
|
7566
|
+
render: /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "vertical", className: cn.cn("mx-1 h-5 self-center", className) })
|
|
7485
7567
|
}
|
|
7486
7568
|
);
|
|
7487
7569
|
}
|
|
@@ -7493,6 +7575,10 @@ function ZenProvider({ children, theme, colorScheme, palette, toast: toast2 }) {
|
|
|
7493
7575
|
return /* @__PURE__ */ jsxRuntime.jsx(ToastProvider, { ...defaultToastConfig, ...toast2, children });
|
|
7494
7576
|
}
|
|
7495
7577
|
|
|
7578
|
+
Object.defineProperty(exports, "cn", {
|
|
7579
|
+
enumerable: true,
|
|
7580
|
+
get: function () { return cn.cn; }
|
|
7581
|
+
});
|
|
7496
7582
|
exports.Accordion = Accordion;
|
|
7497
7583
|
exports.AccordionItem = AccordionItem;
|
|
7498
7584
|
exports.Alert = Alert;
|
|
@@ -7500,6 +7586,7 @@ exports.AlertDescription = AlertDescription;
|
|
|
7500
7586
|
exports.AlertDialog = AlertDialog;
|
|
7501
7587
|
exports.AlertTitle = AlertTitle;
|
|
7502
7588
|
exports.AspectRatio = AspectRatio;
|
|
7589
|
+
exports.Autocomplete = Autocomplete;
|
|
7503
7590
|
exports.Avatar = Avatar;
|
|
7504
7591
|
exports.Badge = Badge;
|
|
7505
7592
|
exports.Blockquote = Blockquote;
|
|
@@ -7540,6 +7627,12 @@ exports.DatePicker = DatePicker;
|
|
|
7540
7627
|
exports.Dialog = Dialog;
|
|
7541
7628
|
exports.DialogTrigger = DialogTrigger;
|
|
7542
7629
|
exports.Dots = Dots;
|
|
7630
|
+
exports.Drawer = Drawer;
|
|
7631
|
+
exports.DrawerClose = DrawerClose;
|
|
7632
|
+
exports.DrawerContent = DrawerContent;
|
|
7633
|
+
exports.DrawerDescription = DrawerDescription;
|
|
7634
|
+
exports.DrawerTitle = DrawerTitle;
|
|
7635
|
+
exports.DrawerTrigger = DrawerTrigger;
|
|
7543
7636
|
exports.Empty = Empty;
|
|
7544
7637
|
exports.EmptyContent = EmptyContent;
|
|
7545
7638
|
exports.EmptyDescription = EmptyDescription;
|
|
@@ -7599,6 +7692,9 @@ exports.Pagination = Pagination;
|
|
|
7599
7692
|
exports.PasswordField = PasswordField;
|
|
7600
7693
|
exports.Popover = Popover;
|
|
7601
7694
|
exports.Pressable = Pressable;
|
|
7695
|
+
exports.PreviewCard = PreviewCard;
|
|
7696
|
+
exports.PreviewCardContent = PreviewCardContent;
|
|
7697
|
+
exports.PreviewCardTrigger = PreviewCardTrigger;
|
|
7602
7698
|
exports.ProgressBar = ProgressBar;
|
|
7603
7699
|
exports.ProgressCircle = ProgressCircle;
|
|
7604
7700
|
exports.Radio = Radio;
|
|
@@ -7654,7 +7750,6 @@ exports.Tooltip = Tooltip;
|
|
|
7654
7750
|
exports.TooltipBubble = TooltipBubble;
|
|
7655
7751
|
exports.TooltipTrigger = TooltipTrigger;
|
|
7656
7752
|
exports.ZenProvider = ZenProvider;
|
|
7657
|
-
exports.cn = cn;
|
|
7658
7753
|
exports.getCssColorValue = getCssColorValue;
|
|
7659
7754
|
exports.isHeightPreset = isHeightPreset;
|
|
7660
7755
|
exports.isMaxHeightPreset = isMaxHeightPreset;
|