@keboola/design 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -4
- package/dist/index.cjs +1065 -803
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +379 -389
- package/dist/index.d.ts +379 -389
- package/dist/index.js +1046 -785
- package/dist/index.js.map +1 -1
- package/dist/markdown-editor.cjs +200 -143
- package/dist/markdown-editor.cjs.map +1 -1
- package/dist/markdown-editor.js +199 -143
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mermaid.cjs +75 -44
- package/dist/mermaid.cjs.map +1 -1
- package/dist/mermaid.js +75 -45
- package/dist/mermaid.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/testing.cjs +11 -28
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.js +11 -28
- package/dist/testing.js.map +1 -1
- package/package.json +13 -3
- package/src/styles.css +19 -18
package/dist/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Slot, Root as Root$1, Slottable } from '@radix-ui/react-slot';
|
|
2
2
|
export { Slot } from '@radix-ui/react-slot';
|
|
3
3
|
import * as lucide_react_star from 'lucide-react';
|
|
4
|
-
import {
|
|
4
|
+
import { createContext, forwardRef, useMemo, useRef, useEffect, use, useState, useId, Fragment as Fragment$1, useCallback, Children, useLayoutEffect, useReducer, isValidElement } from 'react';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { extendTailwindMerge } from 'tailwind-merge';
|
|
7
7
|
import { Root as Root$6, Trigger, Portal, Content, Provider } from '@radix-ui/react-tooltip';
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
9
|
+
import { keboolaLegacy, keboola, exampleCustomer, getBrand } from '@keboola/brand-registry';
|
|
10
|
+
export { brandSchema, brands, exampleCustomer, getBrand, keboola, keboolaLegacy } from '@keboola/brand-registry';
|
|
9
11
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
10
12
|
import * as DropdownMenuPrimitive3 from '@radix-ui/react-dropdown-menu';
|
|
11
13
|
import { Root, Group, Trigger as Trigger$4 } from '@radix-ui/react-dropdown-menu';
|
|
@@ -39,8 +41,6 @@ import BoringAvatar from 'boring-avatars';
|
|
|
39
41
|
import { Root as Root$b, Indicator as Indicator$1 } from '@radix-ui/react-progress';
|
|
40
42
|
import { Root as Root$c, CollapsibleTrigger, Content as Content$4 } from '@radix-ui/react-collapsible';
|
|
41
43
|
import { toast as toast$1, Toaster as Toaster$1 } from 'sonner';
|
|
42
|
-
import { keboola, keboolaLegacy, exampleCustomer, getBrand } from '@keboola/brand-registry';
|
|
43
|
-
export { brandSchema, brands, exampleCustomer, getBrand, keboola, keboolaLegacy } from '@keboola/brand-registry';
|
|
44
44
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
45
45
|
import * as RadixAvatar from '@radix-ui/react-avatar';
|
|
46
46
|
import * as RadixTabs from '@radix-ui/react-tabs';
|
|
@@ -51,6 +51,7 @@ import colors3 from '@keboola/tailwind-config/colors';
|
|
|
51
51
|
import { StateEffect, StateField, RangeSet, RangeSetBuilder } from '@codemirror/state';
|
|
52
52
|
import { diff3Merge } from 'node-diff3';
|
|
53
53
|
import { createFormHookContexts, createFormHook } from '@tanstack/react-form';
|
|
54
|
+
import DOMPurify from 'dompurify';
|
|
54
55
|
import { completeAnyWord, autocompletion } from '@codemirror/autocomplete';
|
|
55
56
|
import { jsonParseLinter, json } from '@codemirror/lang-json';
|
|
56
57
|
import { linter } from '@codemirror/lint';
|
|
@@ -138,17 +139,49 @@ var keyCodes = {
|
|
|
138
139
|
ESCAPE: "Escape",
|
|
139
140
|
SPACE: " "
|
|
140
141
|
};
|
|
142
|
+
var ThemeContext = createContext(null);
|
|
143
|
+
|
|
144
|
+
// src/components/internal/useIsLegacyBrand.ts
|
|
145
|
+
var useIsLegacyBrand = () => {
|
|
146
|
+
const context = use(ThemeContext);
|
|
147
|
+
return context === null || context.brand.id === keboolaLegacy.id;
|
|
148
|
+
};
|
|
141
149
|
var tooltipVariants = cva(
|
|
142
150
|
[
|
|
143
151
|
"tailwindcss-preflight",
|
|
144
152
|
"tw-inline-block",
|
|
145
|
-
"tw-rounded",
|
|
146
|
-
"tw-bg-neutral-800",
|
|
147
|
-
"tw-text-white",
|
|
148
153
|
"tw-break-anywhere",
|
|
149
154
|
"tw-max-h-96",
|
|
150
155
|
"tw-overflow-y-auto",
|
|
151
|
-
"tw-z-[1060]"
|
|
156
|
+
"tw-z-[1060]",
|
|
157
|
+
// legacy (dark) chrome — default
|
|
158
|
+
"tw-rounded",
|
|
159
|
+
"tw-bg-neutral-800",
|
|
160
|
+
"tw-text-white",
|
|
161
|
+
// argo chrome overrides — semantic floating-panel tokens
|
|
162
|
+
"data-[argo=true]:tw-rounded-2xl",
|
|
163
|
+
"data-[argo=true]:tw-border",
|
|
164
|
+
"data-[argo=true]:tw-border-solid",
|
|
165
|
+
"data-[argo=true]:tw-border-border",
|
|
166
|
+
"data-[argo=true]:tw-bg-popover",
|
|
167
|
+
"data-[argo=true]:tw-text-popover-foreground",
|
|
168
|
+
"data-[argo=true]:tw-shadow-md",
|
|
169
|
+
// argo open animation
|
|
170
|
+
"data-[argo=true]:data-[state=delayed-open]:tw-animate-in",
|
|
171
|
+
"data-[argo=true]:data-[state=instant-open]:tw-animate-in",
|
|
172
|
+
"data-[argo=true]:data-[state=delayed-open]:tw-fade-in-0",
|
|
173
|
+
"data-[argo=true]:data-[state=instant-open]:tw-fade-in-0",
|
|
174
|
+
"data-[argo=true]:data-[state=delayed-open]:tw-zoom-in-95",
|
|
175
|
+
"data-[argo=true]:data-[state=instant-open]:tw-zoom-in-95",
|
|
176
|
+
// argo closed animation
|
|
177
|
+
"data-[argo=true]:data-[state=closed]:tw-animate-out",
|
|
178
|
+
"data-[argo=true]:data-[state=closed]:tw-fade-out-0",
|
|
179
|
+
"data-[argo=true]:data-[state=closed]:tw-zoom-out-95",
|
|
180
|
+
// argo position animation
|
|
181
|
+
"data-[argo=true]:data-[side=bottom]:tw-slide-in-from-top-2",
|
|
182
|
+
"data-[argo=true]:data-[side=left]:tw-slide-in-from-right-2",
|
|
183
|
+
"data-[argo=true]:data-[side=right]:tw-slide-in-from-left-2",
|
|
184
|
+
"data-[argo=true]:data-[side=top]:tw-slide-in-from-bottom-2"
|
|
152
185
|
],
|
|
153
186
|
{
|
|
154
187
|
defaultVariants: {
|
|
@@ -181,6 +214,7 @@ var tooltipVariants = cva(
|
|
|
181
214
|
var TooltipContent = ({
|
|
182
215
|
className,
|
|
183
216
|
variant,
|
|
217
|
+
argo,
|
|
184
218
|
keepOpenOnPointerDownOutside = false,
|
|
185
219
|
children,
|
|
186
220
|
onPointerDownOutside,
|
|
@@ -190,6 +224,8 @@ var TooltipContent = ({
|
|
|
190
224
|
placement = "right",
|
|
191
225
|
...rest
|
|
192
226
|
}) => {
|
|
227
|
+
const isLegacy = useIsLegacyBrand();
|
|
228
|
+
const renderArgo = !isLegacy || argo === true;
|
|
193
229
|
const handlePointerDownOutside = (event) => {
|
|
194
230
|
if (keepOpenOnPointerDownOutside) event.preventDefault();
|
|
195
231
|
onPointerDownOutside?.(event);
|
|
@@ -198,7 +234,8 @@ var TooltipContent = ({
|
|
|
198
234
|
Content,
|
|
199
235
|
{
|
|
200
236
|
...rest,
|
|
201
|
-
"data-tooltip-content": true,
|
|
237
|
+
"data-tooltip-content": renderArgo ? void 0 : true,
|
|
238
|
+
"data-argo": renderArgo,
|
|
202
239
|
sideOffset,
|
|
203
240
|
collisionPadding,
|
|
204
241
|
onPointerDownOutside: handlePointerDownOutside,
|
|
@@ -258,6 +295,7 @@ var Tooltip = ({
|
|
|
258
295
|
className,
|
|
259
296
|
keepOpenOnTriggerClick = false,
|
|
260
297
|
variant,
|
|
298
|
+
argo,
|
|
261
299
|
placement = "right",
|
|
262
300
|
forceHide = false,
|
|
263
301
|
forceShow = false,
|
|
@@ -296,6 +334,7 @@ var Tooltip = ({
|
|
|
296
334
|
{
|
|
297
335
|
className,
|
|
298
336
|
variant: resolvedVariant,
|
|
337
|
+
argo,
|
|
299
338
|
placement,
|
|
300
339
|
keepOpenOnPointerDownOutside: keepOpenOnTriggerClick,
|
|
301
340
|
children: tooltip
|
|
@@ -355,26 +394,6 @@ var getIsMac = () => {
|
|
|
355
394
|
return false;
|
|
356
395
|
};
|
|
357
396
|
var isMac = getIsMac();
|
|
358
|
-
|
|
359
|
-
// src/utils/legacyIcon.tsx
|
|
360
|
-
var isFAIconValue = (value) => typeof value === "string" || Array.isArray(value) && value.length === 2 && typeof value[0] === "string" && typeof value[1] === "string";
|
|
361
|
-
var registeredRenderer = null;
|
|
362
|
-
var setLegacyIconRenderer = (renderer) => {
|
|
363
|
-
registeredRenderer = renderer;
|
|
364
|
-
};
|
|
365
|
-
var warnedOnce = false;
|
|
366
|
-
var renderLegacyIcon = (value) => {
|
|
367
|
-
if (!isFAIconValue(value)) return value;
|
|
368
|
-
if (registeredRenderer) return registeredRenderer(value);
|
|
369
|
-
if (!warnedOnce) {
|
|
370
|
-
warnedOnce = true;
|
|
371
|
-
console.warn(
|
|
372
|
-
"[@keboola/design] renderLegacyIcon received a legacy FontAwesome icon value but no renderer is registered. Call setLegacyIconRenderer at app boot. Returning null.",
|
|
373
|
-
value
|
|
374
|
-
);
|
|
375
|
-
}
|
|
376
|
-
return null;
|
|
377
|
-
};
|
|
378
397
|
var sha256 = async (text) => {
|
|
379
398
|
const msgUint8 = new TextEncoder().encode(text);
|
|
380
399
|
const hashBuffer = await crypto.subtle.digest("SHA-256", msgUint8);
|
|
@@ -384,10 +403,7 @@ var sha256 = async (text) => {
|
|
|
384
403
|
var useSHA256 = (text) => {
|
|
385
404
|
const [hash, setHash] = useState("");
|
|
386
405
|
useEffect(() => {
|
|
387
|
-
if (!text)
|
|
388
|
-
setHash("");
|
|
389
|
-
return;
|
|
390
|
-
}
|
|
406
|
+
if (!text) return;
|
|
391
407
|
let cancelled = false;
|
|
392
408
|
sha256(text).then((h) => {
|
|
393
409
|
if (!cancelled) setHash(h);
|
|
@@ -396,7 +412,7 @@ var useSHA256 = (text) => {
|
|
|
396
412
|
cancelled = true;
|
|
397
413
|
};
|
|
398
414
|
}, [text]);
|
|
399
|
-
return hash;
|
|
415
|
+
return text ? hash : "";
|
|
400
416
|
};
|
|
401
417
|
var Keboola = forwardRef(
|
|
402
418
|
({ size = 24, color = "currentColor", className, children, ...rest }, ref) => /* @__PURE__ */ jsxs(
|
|
@@ -605,6 +621,8 @@ var argoVariants = cva(
|
|
|
605
621
|
"tw-bg-clip-padding",
|
|
606
622
|
// anchor support
|
|
607
623
|
"!tw-no-underline",
|
|
624
|
+
"aria-disabled:tw-cursor-not-allowed",
|
|
625
|
+
"aria-disabled:tw-opacity-50",
|
|
608
626
|
// icon
|
|
609
627
|
"tw-shrink-0",
|
|
610
628
|
"[&_svg]:tw-pointer-events-none",
|
|
@@ -707,14 +725,11 @@ var Button = ({
|
|
|
707
725
|
block = false,
|
|
708
726
|
...buttonProps
|
|
709
727
|
}) => {
|
|
728
|
+
const isLegacy = useIsLegacyBrand();
|
|
729
|
+
const renderArgo = !isLegacy || argo;
|
|
710
730
|
const Comp = asChild ? Root$1 : "button";
|
|
711
731
|
const isIconOnly = String(size).startsWith("icon");
|
|
712
|
-
const classNames =
|
|
713
|
-
size,
|
|
714
|
-
variant,
|
|
715
|
-
block,
|
|
716
|
-
className
|
|
717
|
-
});
|
|
732
|
+
const classNames = renderArgo ? argoVariants({ variant, size, block, className }) : variants({ size, variant, block, className });
|
|
718
733
|
const handleClick = (event) => {
|
|
719
734
|
const isAnchor = event.currentTarget.tagName === "A";
|
|
720
735
|
if (isAnchor && disabled) {
|
|
@@ -765,11 +780,7 @@ var buttonInlineVariants = cva(
|
|
|
765
780
|
},
|
|
766
781
|
variants: {
|
|
767
782
|
color: {
|
|
768
|
-
link: [
|
|
769
|
-
"tw-text-secondary-500",
|
|
770
|
-
"hover:tw-text-secondary-600",
|
|
771
|
-
"[&_svg]:tw-text-secondary-500"
|
|
772
|
-
],
|
|
783
|
+
link: ["tw-text-primary", "hover:tw-text-primary/90", "[&_svg]:tw-text-primary"],
|
|
773
784
|
dark: ["tw-text-neutral-800 [&_svg]:tw-text-neutral-400"],
|
|
774
785
|
danger: ["tw-text-error-500 [&_svg]:tw-text-error-500"],
|
|
775
786
|
muted: ["tw-text-muted-foreground [&_svg]:tw-text-muted-foreground"],
|
|
@@ -1008,17 +1019,16 @@ var itemVariants = cn(
|
|
|
1008
1019
|
"group-data-[variant=default]/dropdown-menu-content:hover:tw-bg-neutral-100",
|
|
1009
1020
|
"group-data-[variant=default]/dropdown-menu-content:hover:tw-text-neutral-900",
|
|
1010
1021
|
"group-data-[variant=argo]/dropdown-menu-content:tw-rounded-md",
|
|
1011
|
-
"group-data-[variant=argo]/dropdown-menu-content:tw-text-
|
|
1012
|
-
"group-data-[variant=argo]/dropdown-menu-content:focus:tw-text-
|
|
1013
|
-
"group-data-[variant=argo]/dropdown-menu-content:focus:tw-bg-
|
|
1014
|
-
"group-data-[variant=argo]/dropdown-menu-content:hover:tw-text-
|
|
1015
|
-
"group-data-[variant=argo]/dropdown-menu-content:hover:tw-bg-
|
|
1022
|
+
"group-data-[variant=argo]/dropdown-menu-content:tw-text-popover-foreground",
|
|
1023
|
+
"group-data-[variant=argo]/dropdown-menu-content:focus:tw-text-accent-foreground",
|
|
1024
|
+
"group-data-[variant=argo]/dropdown-menu-content:focus:tw-bg-accent",
|
|
1025
|
+
"group-data-[variant=argo]/dropdown-menu-content:hover:tw-text-accent-foreground",
|
|
1026
|
+
"group-data-[variant=argo]/dropdown-menu-content:hover:tw-bg-accent"
|
|
1016
1027
|
);
|
|
1017
1028
|
var contentVariants = cn(
|
|
1018
1029
|
"tailwindcss-preflight",
|
|
1019
1030
|
"tw-group/dropdown-menu-content",
|
|
1020
1031
|
"tw-z-[1040]",
|
|
1021
|
-
"tw-bg-white",
|
|
1022
1032
|
// positioning
|
|
1023
1033
|
"tw-flex",
|
|
1024
1034
|
"tw-flex-col",
|
|
@@ -1029,8 +1039,16 @@ var contentVariants = cn(
|
|
|
1029
1039
|
// border
|
|
1030
1040
|
"tw-border",
|
|
1031
1041
|
"tw-shadow-md",
|
|
1042
|
+
// Legacy surface — fixed white panel.
|
|
1032
1043
|
"data-[variant=default]:tw-rounded-md",
|
|
1044
|
+
"data-[variant=default]:tw-bg-white",
|
|
1045
|
+
"data-[variant=default]:tw-border-neutral-100",
|
|
1046
|
+
"data-[variant=default]:tw-text-neutral-800",
|
|
1047
|
+
// Argo surface — semantic popover tokens (brand + dark aware).
|
|
1033
1048
|
"data-[variant=argo]:tw-rounded-2xl",
|
|
1049
|
+
"data-[variant=argo]:tw-bg-popover",
|
|
1050
|
+
"data-[variant=argo]:tw-text-popover-foreground",
|
|
1051
|
+
"data-[variant=argo]:tw-border-border",
|
|
1034
1052
|
// animations
|
|
1035
1053
|
"data-[state=open]:tw-animate-in",
|
|
1036
1054
|
"data-[state=open]:tw-fade-in-0",
|
|
@@ -1081,7 +1099,6 @@ var ScrollBar = ({ className, orientation = "vertical", ...props }) => /* @__PUR
|
|
|
1081
1099
|
orientation,
|
|
1082
1100
|
className: cn(
|
|
1083
1101
|
"tw-flex tw-touch-none tw-select-none tw-transition-color",
|
|
1084
|
-
'[data-state="hidden"]:tw-bg-pink-500',
|
|
1085
1102
|
{
|
|
1086
1103
|
"tw-h-full tw-w-2.5 tw-p-px": orientation === "vertical",
|
|
1087
1104
|
"tw-h-2.5 tw-flex-col tw-p-px": orientation === "horizontal"
|
|
@@ -1096,8 +1113,8 @@ var ScrollBar = ({ className, orientation = "vertical", ...props }) => /* @__PUR
|
|
|
1096
1113
|
"tw-relative",
|
|
1097
1114
|
"tw-flex-1",
|
|
1098
1115
|
"tw-rounded-full",
|
|
1099
|
-
"tw-bg-
|
|
1100
|
-
"hover:tw-bg-
|
|
1116
|
+
"tw-bg-border",
|
|
1117
|
+
"hover:tw-bg-muted-foreground"
|
|
1101
1118
|
)
|
|
1102
1119
|
}
|
|
1103
1120
|
)
|
|
@@ -1192,7 +1209,7 @@ var DropdownMenuItem = ({
|
|
|
1192
1209
|
...props
|
|
1193
1210
|
}) => {
|
|
1194
1211
|
const Comp = asChild ? Root$1 : "div";
|
|
1195
|
-
const adornment = isLoading ? /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-animate-spin" }) :
|
|
1212
|
+
const adornment = isLoading ? /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-animate-spin" }) : icon;
|
|
1196
1213
|
const handleOnSelect = (event) => {
|
|
1197
1214
|
if (asModalTrigger) event.preventDefault();
|
|
1198
1215
|
onSelect?.(event);
|
|
@@ -1318,7 +1335,7 @@ var DropdownMenuRadioItem = ({
|
|
|
1318
1335
|
...props,
|
|
1319
1336
|
children: [
|
|
1320
1337
|
isAtStart && indicatorEle,
|
|
1321
|
-
icon && /* @__PURE__ */ jsx(ItemIcon, { className: iconClassName, children:
|
|
1338
|
+
icon && /* @__PURE__ */ jsx(ItemIcon, { className: iconClassName, children: icon }),
|
|
1322
1339
|
/* @__PURE__ */ jsx("span", { className: "tw-flex tw-min-w-0 tw-flex-1 tw-items-center tw-gap-2", children }),
|
|
1323
1340
|
!isAtStart && indicatorEle
|
|
1324
1341
|
]
|
|
@@ -1383,10 +1400,12 @@ var DropdownMenuTrigger = ({
|
|
|
1383
1400
|
var DropdownMenu = ({
|
|
1384
1401
|
// change a default value to false, for modal property, as it is not used in most cases
|
|
1385
1402
|
modal = false,
|
|
1386
|
-
variant
|
|
1403
|
+
variant,
|
|
1387
1404
|
...props
|
|
1388
1405
|
}) => {
|
|
1389
|
-
const
|
|
1406
|
+
const isLegacy = useIsLegacyBrand();
|
|
1407
|
+
const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : "default";
|
|
1408
|
+
const contextValue = useMemo(() => ({ variant: effectiveVariant }), [effectiveVariant]);
|
|
1390
1409
|
return /* @__PURE__ */ jsx(DropdownMenuContext, { value: contextValue, children: /* @__PURE__ */ jsx(Root, { ...props, modal }) });
|
|
1391
1410
|
};
|
|
1392
1411
|
DropdownMenu.Trigger = DropdownMenuTrigger;
|
|
@@ -1419,33 +1438,37 @@ var SplitButtonBase = ({
|
|
|
1419
1438
|
icon,
|
|
1420
1439
|
children,
|
|
1421
1440
|
...rest
|
|
1422
|
-
}) =>
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
]
|
|
1441
|
+
}) => {
|
|
1442
|
+
const isLegacy = useIsLegacyBrand();
|
|
1443
|
+
const renderArgo = !isLegacy || argo;
|
|
1444
|
+
return /* @__PURE__ */ jsxs(ButtonGroup, { space: "compact", children: [
|
|
1445
|
+
/* @__PURE__ */ jsxs(Button, { ...rest, ref, disabled, variant, size, argo, children: [
|
|
1446
|
+
!rest.isLoading && icon,
|
|
1447
|
+
children
|
|
1448
|
+
] }),
|
|
1449
|
+
actions && /* @__PURE__ */ jsxs(
|
|
1450
|
+
DropdownMenu,
|
|
1451
|
+
{
|
|
1452
|
+
open: isActionsOpen,
|
|
1453
|
+
onOpenChange: onActionsOpenChange,
|
|
1454
|
+
variant: renderArgo ? "argo" : "default",
|
|
1455
|
+
children: [
|
|
1456
|
+
/* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ jsx(
|
|
1457
|
+
Button,
|
|
1458
|
+
{
|
|
1459
|
+
argo,
|
|
1460
|
+
size: iconSizeMap[size],
|
|
1461
|
+
variant,
|
|
1462
|
+
"aria-label": "Additional actions",
|
|
1463
|
+
children: /* @__PURE__ */ jsx(icons_exports.ChevronDown, { className: "tw-size-5" })
|
|
1464
|
+
}
|
|
1465
|
+
) }),
|
|
1466
|
+
/* @__PURE__ */ jsx(DropdownMenu.Content, { align: "end", children: actions })
|
|
1467
|
+
]
|
|
1468
|
+
}
|
|
1469
|
+
)
|
|
1470
|
+
] });
|
|
1471
|
+
};
|
|
1449
1472
|
var SplitButton = Object.assign(SplitButtonBase, {
|
|
1450
1473
|
Action: DropdownMenu.Item,
|
|
1451
1474
|
Actions: DropdownMenu.Group
|
|
@@ -1469,7 +1492,7 @@ var MultiActionButton = ({
|
|
|
1469
1492
|
variant: "invisible",
|
|
1470
1493
|
size: "icon",
|
|
1471
1494
|
"data-testid": dataTestId,
|
|
1472
|
-
children: !isLoading &&
|
|
1495
|
+
children: !isLoading && icon
|
|
1473
1496
|
}
|
|
1474
1497
|
) });
|
|
1475
1498
|
var MultiActionButtonGroup = ({ children, className }) => /* @__PURE__ */ jsx(ButtonGroup, { className: cn("tw-text-nowrap", className), children });
|
|
@@ -1578,6 +1601,33 @@ var toggleVariants = cva(
|
|
|
1578
1601
|
// hover on pressed state
|
|
1579
1602
|
"not-disabled:hover:aria-pressed:tw-bg-secondary-200",
|
|
1580
1603
|
"[&_svg]:not-disabled:hover:aria-pressed:tw-text-secondary-600"
|
|
1604
|
+
],
|
|
1605
|
+
argo: [
|
|
1606
|
+
// chrome — semantic tokens, opt-in via variant="argo"
|
|
1607
|
+
"tw-border-border",
|
|
1608
|
+
"tw-rounded-lg",
|
|
1609
|
+
"tw-text-foreground",
|
|
1610
|
+
// typography — override base uppercase / tw-text-xs / tracking from outer class list
|
|
1611
|
+
// so argo matches `Button argo` (sentence case, sm text)
|
|
1612
|
+
"tw-normal-case",
|
|
1613
|
+
"tw-tracking-normal",
|
|
1614
|
+
"tw-text-sm",
|
|
1615
|
+
// default state - transparent background
|
|
1616
|
+
"tw-bg-transparent",
|
|
1617
|
+
"[&_svg]:tw-text-muted-foreground",
|
|
1618
|
+
// hover state (off only — explicit so pressed doesn't double-up) — muted bg
|
|
1619
|
+
// is visibly subtler than the accent pressed bg, so hover and active read distinct.
|
|
1620
|
+
"not-disabled:hover:tw-border-border",
|
|
1621
|
+
"data-[state=off]:not-disabled:hover:tw-bg-muted",
|
|
1622
|
+
"data-[state=off]:not-disabled:hover:[&_svg]:tw-text-primary",
|
|
1623
|
+
// pressed state — stronger accent bg; hover-on keeps the same colour to avoid flicker
|
|
1624
|
+
"data-[state=on]:tw-bg-accent",
|
|
1625
|
+
"data-[state=on]:[&_svg]:tw-text-primary",
|
|
1626
|
+
// focus-visible ring (overrides base outline + shadow)
|
|
1627
|
+
"!tw-outline-none",
|
|
1628
|
+
"focus-visible:!tw-shadow-none",
|
|
1629
|
+
"focus-visible:tw-ring-2",
|
|
1630
|
+
"focus-visible:tw-ring-primary/50"
|
|
1581
1631
|
]
|
|
1582
1632
|
},
|
|
1583
1633
|
size: {
|
|
@@ -1593,7 +1643,27 @@ var toggleVariants = cva(
|
|
|
1593
1643
|
compoundVariants: [
|
|
1594
1644
|
{ iconOnly: true, size: "small", className: "tw-size-8" },
|
|
1595
1645
|
{ iconOnly: true, size: "medium", className: "tw-size-10" },
|
|
1596
|
-
{ iconOnly: true, size: "large", className: "tw-size-12" }
|
|
1646
|
+
{ iconOnly: true, size: "large", className: "tw-size-12" },
|
|
1647
|
+
// argo sizes match `Button argo` (small 32px / medium 36px / large 40px)
|
|
1648
|
+
// and `InputGroup argo` heights so argo Toggle aligns vertically next to them.
|
|
1649
|
+
{
|
|
1650
|
+
variant: "argo",
|
|
1651
|
+
size: "small",
|
|
1652
|
+
className: "tw-max-h-8 tw-min-h-8 tw-px-3 tw-py-2"
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
variant: "argo",
|
|
1656
|
+
size: "medium",
|
|
1657
|
+
className: "tw-max-h-9 tw-min-h-9 tw-px-4 tw-py-2"
|
|
1658
|
+
},
|
|
1659
|
+
{
|
|
1660
|
+
variant: "argo",
|
|
1661
|
+
size: "large",
|
|
1662
|
+
className: "tw-max-h-10 tw-min-h-10 tw-px-6 tw-py-2.5"
|
|
1663
|
+
},
|
|
1664
|
+
{ variant: "argo", iconOnly: true, size: "small", className: "tw-size-8" },
|
|
1665
|
+
{ variant: "argo", iconOnly: true, size: "medium", className: "tw-size-9" },
|
|
1666
|
+
{ variant: "argo", iconOnly: true, size: "large", className: "tw-size-10" }
|
|
1597
1667
|
],
|
|
1598
1668
|
defaultVariants: {
|
|
1599
1669
|
variant: "ai",
|
|
@@ -1624,7 +1694,7 @@ var Toggle = ({
|
|
|
1624
1694
|
disabled,
|
|
1625
1695
|
children: [
|
|
1626
1696
|
badge && /* @__PURE__ */ jsx("span", { className: "tw-absolute tw-right-0 tw-top-0 -tw-translate-y-1/2 tw-translate-x-1/4", children: badge }),
|
|
1627
|
-
icon && /* @__PURE__ */ jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-align-middle [&_svg:not([class*='tw-size-'])]:tw-size-4", children:
|
|
1697
|
+
icon && /* @__PURE__ */ jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-align-middle [&_svg:not([class*='tw-size-'])]:tw-size-4", children: icon }),
|
|
1628
1698
|
isAiVariant ? /* @__PURE__ */ jsx("div", { className: "tw-bg-gradient-to-br tw-from-secondary-700 tw-to-purple-700 tw-bg-clip-text tw-text-transparent", children }) : children
|
|
1629
1699
|
]
|
|
1630
1700
|
}
|
|
@@ -1838,7 +1908,7 @@ var Link = ({
|
|
|
1838
1908
|
rel,
|
|
1839
1909
|
onClick: handleOnClick,
|
|
1840
1910
|
className: cn(
|
|
1841
|
-
"tw-text-
|
|
1911
|
+
"tw-text-primary tw-underline hover:tw-text-primary/90 hover:tw-no-underline",
|
|
1842
1912
|
className
|
|
1843
1913
|
),
|
|
1844
1914
|
children
|
|
@@ -1865,6 +1935,8 @@ var ModalBody = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
1865
1935
|
...props
|
|
1866
1936
|
}
|
|
1867
1937
|
);
|
|
1938
|
+
var ModalArgoContext = createContext(false);
|
|
1939
|
+
var useModalArgo = () => use(ModalArgoContext);
|
|
1868
1940
|
var ModalOverlay = ({
|
|
1869
1941
|
ref,
|
|
1870
1942
|
className,
|
|
@@ -1901,8 +1973,11 @@ var ModalContent = ({
|
|
|
1901
1973
|
className,
|
|
1902
1974
|
children,
|
|
1903
1975
|
onEscapeKeyDown,
|
|
1976
|
+
argo,
|
|
1904
1977
|
...props
|
|
1905
1978
|
}) => {
|
|
1979
|
+
const isLegacy = useIsLegacyBrand();
|
|
1980
|
+
const renderArgo = !isLegacy || argo === true;
|
|
1906
1981
|
const handleEscapeKeyDown = (event) => {
|
|
1907
1982
|
event.stopPropagation();
|
|
1908
1983
|
onEscapeKeyDown?.(event);
|
|
@@ -1911,6 +1986,7 @@ var ModalContent = ({
|
|
|
1911
1986
|
Content$1,
|
|
1912
1987
|
{
|
|
1913
1988
|
"aria-describedby": void 0,
|
|
1989
|
+
"data-argo": renderArgo,
|
|
1914
1990
|
className: cn(
|
|
1915
1991
|
// reset
|
|
1916
1992
|
"tailwindcss-preflight",
|
|
@@ -1929,7 +2005,7 @@ var ModalContent = ({
|
|
|
1929
2005
|
"tw-flex-col",
|
|
1930
2006
|
"tw-gap-4",
|
|
1931
2007
|
"tw-rounded-lg",
|
|
1932
|
-
"tw-bg-
|
|
2008
|
+
"tw-bg-surface",
|
|
1933
2009
|
"tw-px-7",
|
|
1934
2010
|
// 4 px less padding to prevent input focus rings/outlines from being clipped by overflow
|
|
1935
2011
|
"tw-py-8",
|
|
@@ -1954,7 +2030,7 @@ var ModalContent = ({
|
|
|
1954
2030
|
),
|
|
1955
2031
|
onEscapeKeyDown: handleEscapeKeyDown,
|
|
1956
2032
|
...props,
|
|
1957
|
-
children
|
|
2033
|
+
children: /* @__PURE__ */ jsx(ModalArgoContext, { value: renderArgo, children })
|
|
1958
2034
|
}
|
|
1959
2035
|
) }) });
|
|
1960
2036
|
};
|
|
@@ -1969,34 +2045,37 @@ var ModalFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
1969
2045
|
...props
|
|
1970
2046
|
}
|
|
1971
2047
|
);
|
|
1972
|
-
var ModalCloseIcon = ({ className, ...rest }) =>
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
/* @__PURE__ */ jsx(
|
|
1986
|
-
icons_exports.X,
|
|
1987
|
-
{
|
|
1988
|
-
className: cn(
|
|
1989
|
-
"tw-size-4",
|
|
1990
|
-
"tw-text-neutral-400",
|
|
1991
|
-
"group-focus/modal-close-icon:tw-text-neutral-500",
|
|
1992
|
-
"group-hover/modal-close-icon:tw-text-neutral-500"
|
|
1993
|
-
)
|
|
1994
|
-
}
|
|
2048
|
+
var ModalCloseIcon = ({ className, ...rest }) => {
|
|
2049
|
+
const argo = useModalArgo();
|
|
2050
|
+
return /* @__PURE__ */ jsxs(
|
|
2051
|
+
Close,
|
|
2052
|
+
{
|
|
2053
|
+
...rest,
|
|
2054
|
+
className: cn(
|
|
2055
|
+
"tw-group/modal-close-icon",
|
|
2056
|
+
"tw-flex",
|
|
2057
|
+
"tw-items-center",
|
|
2058
|
+
"tw-justify-center",
|
|
2059
|
+
"focus:tw-outline-none",
|
|
2060
|
+
className
|
|
1995
2061
|
),
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2062
|
+
children: [
|
|
2063
|
+
/* @__PURE__ */ jsx(
|
|
2064
|
+
icons_exports.X,
|
|
2065
|
+
{
|
|
2066
|
+
className: cn(
|
|
2067
|
+
"tw-size-4",
|
|
2068
|
+
argo ? "tw-text-muted-foreground" : "tw-text-neutral-400",
|
|
2069
|
+
argo ? "group-focus/modal-close-icon:tw-text-foreground" : "group-focus/modal-close-icon:tw-text-neutral-500",
|
|
2070
|
+
argo ? "group-hover/modal-close-icon:tw-text-foreground" : "group-hover/modal-close-icon:tw-text-neutral-500"
|
|
2071
|
+
)
|
|
2072
|
+
}
|
|
2073
|
+
),
|
|
2074
|
+
/* @__PURE__ */ jsx("span", { className: "tw-sr-only", children: "Close" })
|
|
2075
|
+
]
|
|
2076
|
+
}
|
|
2077
|
+
);
|
|
2078
|
+
};
|
|
2000
2079
|
var ModalDescription = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
2001
2080
|
DialogPrimitive.Description,
|
|
2002
2081
|
{
|
|
@@ -2019,37 +2098,40 @@ var ModalHeader = ({
|
|
|
2019
2098
|
hideCloseIcon = false,
|
|
2020
2099
|
children,
|
|
2021
2100
|
...props
|
|
2022
|
-
}) =>
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2101
|
+
}) => {
|
|
2102
|
+
const argo = useModalArgo();
|
|
2103
|
+
return /* @__PURE__ */ jsxs(
|
|
2104
|
+
"div",
|
|
2105
|
+
{
|
|
2106
|
+
className: cn(
|
|
2107
|
+
"tw-flex",
|
|
2108
|
+
"tw-flex-col",
|
|
2109
|
+
"tw-gap-3",
|
|
2110
|
+
"tw-pb-5",
|
|
2111
|
+
// Show border separator only if body is visible
|
|
2112
|
+
"[&:has(~[data-slot=modal-body])]:tw-border-b",
|
|
2113
|
+
// Tabs render their own bottom border — drop header border + padding to avoid the double-line look
|
|
2114
|
+
"[&:has(~[data-slot=modal-body]_[data-slot=tabs-root])]:!tw-border-b-0",
|
|
2115
|
+
"[&:has(~[data-slot=modal-body]_[data-slot=tabs-root])]:!tw-pb-0",
|
|
2116
|
+
argo ? "tw-border-border" : "tw-border-neutral-150",
|
|
2117
|
+
"tw-px-1",
|
|
2118
|
+
// 4 px to complement ModalContent and still keep input focus outline visible
|
|
2119
|
+
className
|
|
2120
|
+
),
|
|
2121
|
+
...props,
|
|
2122
|
+
children: [
|
|
2123
|
+
/* @__PURE__ */ jsxs("div", { className: "tw-flex tw-flex-col", children: [
|
|
2124
|
+
/* @__PURE__ */ jsxs("div", { className: "tw-flex tw-justify-end tw-gap-2", children: [
|
|
2125
|
+
title && /* @__PURE__ */ jsx(ModalTitle, { children: title }),
|
|
2126
|
+
!hideCloseIcon && /* @__PURE__ */ jsx(ModalCloseIcon, {})
|
|
2127
|
+
] }),
|
|
2128
|
+
description && /* @__PURE__ */ jsx(ModalDescription, { children: description })
|
|
2046
2129
|
] }),
|
|
2047
|
-
|
|
2048
|
-
]
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
);
|
|
2130
|
+
children
|
|
2131
|
+
]
|
|
2132
|
+
}
|
|
2133
|
+
);
|
|
2134
|
+
};
|
|
2053
2135
|
var NAMED_COLORS = /* @__PURE__ */ new Set(["orange", "blue", "red", "green", "gray", "violet"]);
|
|
2054
2136
|
var ModalIcon = (props) => {
|
|
2055
2137
|
const [hasImageError, setHasImageError] = useState(false);
|
|
@@ -2100,7 +2182,7 @@ var ModalIcon = (props) => {
|
|
|
2100
2182
|
'[&_svg:not([class*="tw-size-"])]:tw-size-6',
|
|
2101
2183
|
"[&_svg]:tw-aspect-square"
|
|
2102
2184
|
),
|
|
2103
|
-
children:
|
|
2185
|
+
children: props.icon
|
|
2104
2186
|
}
|
|
2105
2187
|
)
|
|
2106
2188
|
}
|
|
@@ -2253,10 +2335,13 @@ var FullScreenModalRoot = ({
|
|
|
2253
2335
|
className,
|
|
2254
2336
|
lockBodyScroll = true,
|
|
2255
2337
|
onEscapeKeyDown,
|
|
2256
|
-
|
|
2338
|
+
onKeyDown,
|
|
2339
|
+
argo,
|
|
2257
2340
|
...props
|
|
2258
2341
|
}) => {
|
|
2259
2342
|
const modalRef = useRef(null);
|
|
2343
|
+
const isLegacy = useIsLegacyBrand();
|
|
2344
|
+
const renderArgo = !isLegacy || argo === true;
|
|
2260
2345
|
useEffect(() => {
|
|
2261
2346
|
const modalElement = modalRef.current;
|
|
2262
2347
|
if (lockBodyScroll) {
|
|
@@ -2272,6 +2357,7 @@ var FullScreenModalRoot = ({
|
|
|
2272
2357
|
};
|
|
2273
2358
|
}, [lockBodyScroll]);
|
|
2274
2359
|
const handleKeyDown2 = (event) => {
|
|
2360
|
+
onKeyDown?.(event);
|
|
2275
2361
|
if (event.key === "Escape" && !event.defaultPrevented) {
|
|
2276
2362
|
onEscapeKeyDown?.(event);
|
|
2277
2363
|
}
|
|
@@ -2280,12 +2366,13 @@ var FullScreenModalRoot = ({
|
|
|
2280
2366
|
/* @__PURE__ */ jsx(
|
|
2281
2367
|
"div",
|
|
2282
2368
|
{
|
|
2369
|
+
...props,
|
|
2283
2370
|
ref: modalRef,
|
|
2284
2371
|
role: "dialog",
|
|
2285
2372
|
"aria-modal": "true",
|
|
2286
2373
|
tabIndex: -1,
|
|
2287
2374
|
"data-fullscreen-modal": true,
|
|
2288
|
-
"data-argo":
|
|
2375
|
+
"data-argo": renderArgo,
|
|
2289
2376
|
onKeyDown: handleKeyDown2,
|
|
2290
2377
|
className: cn(
|
|
2291
2378
|
"tailwindcss-preflight",
|
|
@@ -2299,7 +2386,6 @@ var FullScreenModalRoot = ({
|
|
|
2299
2386
|
"focus-visible:tw-outline-none",
|
|
2300
2387
|
className
|
|
2301
2388
|
),
|
|
2302
|
-
...props,
|
|
2303
2389
|
children
|
|
2304
2390
|
}
|
|
2305
2391
|
),
|
|
@@ -2333,8 +2419,14 @@ var sheetContentVariants = cva(
|
|
|
2333
2419
|
"tw-z-[1051]",
|
|
2334
2420
|
"tw-flex",
|
|
2335
2421
|
"tw-flex-col",
|
|
2336
|
-
"tw-bg-
|
|
2422
|
+
"tw-bg-surface",
|
|
2337
2423
|
"tw-shadow-lg",
|
|
2424
|
+
// argo chrome overrides
|
|
2425
|
+
"data-[argo=true]:tw-border",
|
|
2426
|
+
"data-[argo=true]:tw-border-border",
|
|
2427
|
+
"data-[argo=true]:focus-visible:tw-outline-none",
|
|
2428
|
+
"data-[argo=true]:focus-visible:tw-ring-2",
|
|
2429
|
+
"data-[argo=true]:focus-visible:tw-ring-primary/50",
|
|
2338
2430
|
"tw-ease-in-out",
|
|
2339
2431
|
// opening animation
|
|
2340
2432
|
"data-[state=open]:tw-duration-200",
|
|
@@ -2357,14 +2449,16 @@ var sheetContentVariants = cva(
|
|
|
2357
2449
|
"tw-top-0",
|
|
2358
2450
|
"tw-h-auto",
|
|
2359
2451
|
"data-[state=closed]:tw-slide-out-to-top",
|
|
2360
|
-
"data-[state=open]:tw-slide-in-from-top"
|
|
2452
|
+
"data-[state=open]:tw-slide-in-from-top",
|
|
2453
|
+
"data-[argo=true]:tw-rounded-b-lg"
|
|
2361
2454
|
],
|
|
2362
2455
|
right: [
|
|
2363
2456
|
"tw-inset-y-0",
|
|
2364
2457
|
"tw-right-0",
|
|
2365
2458
|
"tw-h-full",
|
|
2366
2459
|
"data-[state=closed]:tw-slide-out-to-right",
|
|
2367
|
-
"data-[state=open]:tw-slide-in-from-right"
|
|
2460
|
+
"data-[state=open]:tw-slide-in-from-right",
|
|
2461
|
+
"data-[argo=true]:tw-rounded-l-lg"
|
|
2368
2462
|
],
|
|
2369
2463
|
bottom: [
|
|
2370
2464
|
"tw-inset-x-0",
|
|
@@ -2372,15 +2466,17 @@ var sheetContentVariants = cva(
|
|
|
2372
2466
|
"tw-h-auto",
|
|
2373
2467
|
"data-[state=closed]:tw-slide-out-to-bottom",
|
|
2374
2468
|
"data-[state=open]:tw-slide-in-from-bottom",
|
|
2375
|
-
"tw-drop-shadow-2xl"
|
|
2469
|
+
"tw-drop-shadow-2xl",
|
|
2376
2470
|
// standard tailwindcss shadow is invisible for a bottom sheet because of positioning
|
|
2471
|
+
"data-[argo=true]:tw-rounded-t-lg"
|
|
2377
2472
|
],
|
|
2378
2473
|
left: [
|
|
2379
2474
|
"tw-inset-y-0",
|
|
2380
2475
|
"tw-left-0",
|
|
2381
2476
|
"tw-h-full",
|
|
2382
2477
|
"data-[state=closed]:tw-slide-out-to-left",
|
|
2383
|
-
"data-[state=open]:tw-slide-in-from-left"
|
|
2478
|
+
"data-[state=open]:tw-slide-in-from-left",
|
|
2479
|
+
"data-[argo=true]:tw-rounded-r-lg"
|
|
2384
2480
|
]
|
|
2385
2481
|
}
|
|
2386
2482
|
}
|
|
@@ -2396,8 +2492,11 @@ var SheetContent = ({
|
|
|
2396
2492
|
onPointerDownOutside,
|
|
2397
2493
|
onInteractOutside,
|
|
2398
2494
|
container,
|
|
2495
|
+
argo,
|
|
2399
2496
|
...props
|
|
2400
2497
|
}) => {
|
|
2498
|
+
const isLegacy = useIsLegacyBrand();
|
|
2499
|
+
const renderArgo = !isLegacy || argo === true;
|
|
2401
2500
|
const handleOnPointerDownOutside = (event) => {
|
|
2402
2501
|
if (keepOpenOnPointerDownOutside) event.preventDefault();
|
|
2403
2502
|
onPointerDownOutside?.(event);
|
|
@@ -2417,6 +2516,7 @@ var SheetContent = ({
|
|
|
2417
2516
|
onPointerDownOutside: handleOnPointerDownOutside,
|
|
2418
2517
|
onInteractOutside: handleOnInteractOutside,
|
|
2419
2518
|
"data-side": side,
|
|
2519
|
+
"data-argo": renderArgo,
|
|
2420
2520
|
children
|
|
2421
2521
|
}
|
|
2422
2522
|
)
|
|
@@ -2444,7 +2544,7 @@ var SheetHeader = ({
|
|
|
2444
2544
|
] });
|
|
2445
2545
|
};
|
|
2446
2546
|
var SheetTitle = ({ className, visuallyHidden = false, ...props }) => /* @__PURE__ */ jsx(Title, { className: cn({ "tw-sr-only": visuallyHidden }, className), ...props });
|
|
2447
|
-
var Sheet = (
|
|
2547
|
+
var Sheet = (props) => /* @__PURE__ */ jsx(Root$8, { ...props });
|
|
2448
2548
|
Sheet.Close = Close;
|
|
2449
2549
|
Sheet.Trigger = Trigger$1;
|
|
2450
2550
|
Sheet.Content = SheetContent;
|
|
@@ -2470,11 +2570,7 @@ var variants3 = cva(
|
|
|
2470
2570
|
"tw-box-border",
|
|
2471
2571
|
"tw-border",
|
|
2472
2572
|
"tw-border-solid",
|
|
2473
|
-
"tw-border-neutral-100",
|
|
2474
2573
|
"tw-shadow-lg",
|
|
2475
|
-
// colors
|
|
2476
|
-
"tw-bg-white",
|
|
2477
|
-
"tw-text-neutral-800",
|
|
2478
2574
|
// open animation
|
|
2479
2575
|
"data-[state=open]:tw-animate-in",
|
|
2480
2576
|
"data-[state=open]:tw-fade-in-0",
|
|
@@ -2499,8 +2595,10 @@ var variants3 = cva(
|
|
|
2499
2595
|
},
|
|
2500
2596
|
variants: {
|
|
2501
2597
|
variant: {
|
|
2502
|
-
|
|
2503
|
-
|
|
2598
|
+
// Legacy surface — fixed white panel.
|
|
2599
|
+
default: ["tw-rounded-md", "tw-border-neutral-100", "tw-bg-white", "tw-text-neutral-800"],
|
|
2600
|
+
// Argo surface — semantic popover tokens (brand + dark aware).
|
|
2601
|
+
argo: ["tw-rounded-2xl", "tw-border-border", "tw-bg-popover", "tw-text-popover-foreground"]
|
|
2504
2602
|
},
|
|
2505
2603
|
matchTriggerWidth: {
|
|
2506
2604
|
true: ["tw-w-[var(--radix-popover-trigger-width)]"],
|
|
@@ -2519,21 +2617,25 @@ var PopoverContent = ({
|
|
|
2519
2617
|
variant,
|
|
2520
2618
|
onEscapeKeyDown,
|
|
2521
2619
|
...props
|
|
2522
|
-
}) =>
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2620
|
+
}) => {
|
|
2621
|
+
const isLegacy = useIsLegacyBrand();
|
|
2622
|
+
const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : "default";
|
|
2623
|
+
return /* @__PURE__ */ jsx(Portal$2, { children: /* @__PURE__ */ jsx(
|
|
2624
|
+
Content$2,
|
|
2625
|
+
{
|
|
2626
|
+
ref,
|
|
2627
|
+
align: matchTriggerWidth ? "start" : align,
|
|
2628
|
+
sideOffset,
|
|
2629
|
+
className: cn(variants3({ className, matchTriggerWidth, variant: effectiveVariant })),
|
|
2630
|
+
onEscapeKeyDown: (event) => {
|
|
2631
|
+
event.stopPropagation();
|
|
2632
|
+
onEscapeKeyDown?.(event);
|
|
2633
|
+
},
|
|
2634
|
+
...props,
|
|
2635
|
+
children
|
|
2636
|
+
}
|
|
2637
|
+
) });
|
|
2638
|
+
};
|
|
2537
2639
|
var Popover = (props) => /* @__PURE__ */ jsx(Root$2, { ...props });
|
|
2538
2640
|
Popover.Content = PopoverContent;
|
|
2539
2641
|
Popover.Trigger = Trigger$2;
|
|
@@ -2602,15 +2704,7 @@ var PopconfirmContent = ({ className, onInteractOutside, ...props }) => {
|
|
|
2602
2704
|
{
|
|
2603
2705
|
...props,
|
|
2604
2706
|
onInteractOutside: handleOnInteractOutside,
|
|
2605
|
-
className: cn(
|
|
2606
|
-
"tw-flex",
|
|
2607
|
-
"tw-flex-col",
|
|
2608
|
-
"tw-gap-2",
|
|
2609
|
-
"tw-gap-3",
|
|
2610
|
-
"tw-px-4 ",
|
|
2611
|
-
"tw-py-3",
|
|
2612
|
-
className
|
|
2613
|
-
)
|
|
2707
|
+
className: cn("tw-flex", "tw-flex-col", "tw-gap-3", "tw-px-4", "tw-py-3", className)
|
|
2614
2708
|
}
|
|
2615
2709
|
);
|
|
2616
2710
|
};
|
|
@@ -2682,53 +2776,61 @@ var HoverCardContent = ({
|
|
|
2682
2776
|
className,
|
|
2683
2777
|
align = "center",
|
|
2684
2778
|
sideOffset = 4,
|
|
2779
|
+
argo,
|
|
2685
2780
|
children,
|
|
2686
2781
|
...props
|
|
2687
|
-
}) =>
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
"
|
|
2697
|
-
"
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2782
|
+
}) => {
|
|
2783
|
+
const isLegacy = useIsLegacyBrand();
|
|
2784
|
+
const renderArgo = !isLegacy || argo === true;
|
|
2785
|
+
return /* @__PURE__ */ jsx(Portal$3, { children: /* @__PURE__ */ jsx(
|
|
2786
|
+
Content$3,
|
|
2787
|
+
{
|
|
2788
|
+
ref,
|
|
2789
|
+
align,
|
|
2790
|
+
sideOffset,
|
|
2791
|
+
"data-slot": "hover-card-content",
|
|
2792
|
+
"data-argo": renderArgo,
|
|
2793
|
+
className: cn(
|
|
2794
|
+
"tailwindcss-preflight",
|
|
2795
|
+
"tw-group/hover-card-content",
|
|
2796
|
+
"tw-z-50",
|
|
2797
|
+
// border
|
|
2798
|
+
"tw-box-border",
|
|
2799
|
+
"tw-border",
|
|
2800
|
+
"tw-rounded-2xl",
|
|
2801
|
+
// sizing
|
|
2802
|
+
"tw-min-w-32",
|
|
2803
|
+
"tw-origin-[--radix-hover-card-content-transform-origin]",
|
|
2804
|
+
"tw-max-h-[var(--radix-hover-card-content-available-height)]",
|
|
2805
|
+
// padding + shared shadow
|
|
2806
|
+
"tw-p-4",
|
|
2807
|
+
"tw-shadow-md",
|
|
2808
|
+
// legacy chrome — default
|
|
2809
|
+
"tw-border-neutral-150 tw-bg-white",
|
|
2810
|
+
// argo chrome overrides — semantic floating-panel tokens
|
|
2811
|
+
"data-[argo=true]:tw-border-solid data-[argo=true]:tw-border-border data-[argo=true]:tw-bg-popover data-[argo=true]:tw-text-popover-foreground",
|
|
2812
|
+
// directional animations
|
|
2813
|
+
"data-[side=bottom]:tw-slide-in-from-top-2",
|
|
2814
|
+
"data-[side=left]:tw-slide-in-from-right-2",
|
|
2815
|
+
"data-[side=right]:tw-slide-in-from-left-2",
|
|
2816
|
+
"data-[side=top]:tw-slide-in-from-bottom-2",
|
|
2817
|
+
// animations
|
|
2818
|
+
"data-[state=open]:tw-animate-in",
|
|
2819
|
+
"data-[state=open]:tw-fade-in-0",
|
|
2820
|
+
"data-[state=open]:tw-zoom-in-95",
|
|
2821
|
+
"data-[state=closed]:tw-animate-out",
|
|
2822
|
+
"data-[state=closed]:tw-fade-out-0",
|
|
2823
|
+
"data-[state=closed]:tw-zoom-out-95",
|
|
2824
|
+
// Default size for nested Lucide icons; callers can override on the icon.
|
|
2825
|
+
"[&_svg.lucide:not([class*='tw-size-'])]:tw-size-4",
|
|
2826
|
+
"[&_svg]:tw-shrink-0",
|
|
2827
|
+
className
|
|
2828
|
+
),
|
|
2829
|
+
...props,
|
|
2830
|
+
children
|
|
2831
|
+
}
|
|
2832
|
+
) });
|
|
2833
|
+
};
|
|
2732
2834
|
var HoverCard = ({ openDelay = 200, closeDelay = 200, ...rest }) => /* @__PURE__ */ jsx(Root$9, { ...rest, openDelay, closeDelay });
|
|
2733
2835
|
HoverCard.Content = HoverCardContent;
|
|
2734
2836
|
HoverCard.Trigger = Trigger$3;
|
|
@@ -2757,10 +2859,10 @@ var CommandGroup = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
2757
2859
|
"[&_[cmdk-group-heading]]:tw-py-0.5",
|
|
2758
2860
|
"[&_[cmdk-group-heading]]:tw-uppercase",
|
|
2759
2861
|
"[&_[cmdk-group-heading]]:tw-text-[11px]",
|
|
2760
|
-
"[&_[cmdk-group-heading]]:tw-text-
|
|
2862
|
+
"[&_[cmdk-group-heading]]:tw-text-muted-foreground",
|
|
2761
2863
|
"[&_[cmdk-group-heading]]:tw-tracking-[1px]",
|
|
2762
2864
|
"[&_[cmdk-group-heading]]:tw-border-b",
|
|
2763
|
-
"[&_[cmdk-group-heading]]:tw-border-
|
|
2865
|
+
"[&_[cmdk-group-heading]]:tw-border-border",
|
|
2764
2866
|
"[&_[cmdk-group-heading]]:tw-my-2",
|
|
2765
2867
|
className
|
|
2766
2868
|
),
|
|
@@ -2768,13 +2870,13 @@ var CommandGroup = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
2768
2870
|
}
|
|
2769
2871
|
);
|
|
2770
2872
|
var dayPickerClassNames = {
|
|
2771
|
-
selected: `tw-bg-
|
|
2873
|
+
selected: `tw-bg-primary tw-border-primary tw-font-medium hover:tw-bg-primary/90 hover:tw-border-primary/90 tw-text-primary-foreground tw-rounded`
|
|
2772
2874
|
};
|
|
2773
2875
|
var rangePickerClassNames = {
|
|
2774
|
-
range_start: `tw-bg-
|
|
2775
|
-
range_end: `tw-bg-
|
|
2876
|
+
range_start: `tw-bg-primary tw-rounded-r-none tw-font-medium tw-border-primary hover:tw-bg-primary/90 hover:tw-border-primary/90 tw-text-primary-foreground`,
|
|
2877
|
+
range_end: `tw-bg-primary tw-rounded-l-none tw-font-medium tw-border-primary hover:tw-bg-primary/90 hover:tw-border-primary/90 tw-text-primary-foreground`,
|
|
2776
2878
|
selected: `tw-font-medium tw-rounded`,
|
|
2777
|
-
range_middle: `tw-bg-
|
|
2879
|
+
range_middle: `tw-bg-accent tw-border-accent tw-text-accent-foreground tw-rounded-none tw-font-medium`
|
|
2778
2880
|
};
|
|
2779
2881
|
var Calendar = ({ className, classNames, ...props }) => {
|
|
2780
2882
|
const defaultClassNames = getDefaultClassNames();
|
|
@@ -2785,10 +2887,10 @@ var Calendar = ({ className, classNames, ...props }) => {
|
|
|
2785
2887
|
captionLayout: "dropdown",
|
|
2786
2888
|
className: cn(className, "tw-p-3"),
|
|
2787
2889
|
classNames: {
|
|
2788
|
-
chevron: `${defaultClassNames.chevron} tw-fill-
|
|
2789
|
-
day: `${defaultClassNames.day} hover:tw-bg-
|
|
2890
|
+
chevron: `${defaultClassNames.chevron} tw-fill-foreground`,
|
|
2891
|
+
day: `${defaultClassNames.day} hover:tw-bg-accent tw-rounded`,
|
|
2790
2892
|
day_button: `${defaultClassNames.day_button} tw-rounded`,
|
|
2791
|
-
today: `tw-bg-
|
|
2893
|
+
today: `tw-bg-accent tw-text-accent-foreground tw-font-medium`,
|
|
2792
2894
|
...dayPickerClassNames,
|
|
2793
2895
|
...rangePickerClassNames,
|
|
2794
2896
|
selected: `${props.mode === "range" ? rangePickerClassNames.selected : dayPickerClassNames.selected}`,
|
|
@@ -2802,27 +2904,31 @@ Calendar.displayName = "Calendar";
|
|
|
2802
2904
|
var DatePicker = ({
|
|
2803
2905
|
align = "end",
|
|
2804
2906
|
alignOffset = -18,
|
|
2805
|
-
argo
|
|
2907
|
+
argo,
|
|
2806
2908
|
children,
|
|
2807
2909
|
defaultOpen,
|
|
2808
2910
|
onOpenChange,
|
|
2809
2911
|
open,
|
|
2810
2912
|
sideOffset = 12,
|
|
2811
2913
|
...calendarProps
|
|
2812
|
-
}) =>
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
{
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2914
|
+
}) => {
|
|
2915
|
+
const isLegacy = useIsLegacyBrand();
|
|
2916
|
+
const renderArgo = !isLegacy || argo === true;
|
|
2917
|
+
return /* @__PURE__ */ jsxs(Popover, { defaultOpen, open, onOpenChange, children: [
|
|
2918
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children }),
|
|
2919
|
+
/* @__PURE__ */ jsx(
|
|
2920
|
+
Popover.Content,
|
|
2921
|
+
{
|
|
2922
|
+
align,
|
|
2923
|
+
alignOffset,
|
|
2924
|
+
className: "tw-w-auto tw-p-0",
|
|
2925
|
+
sideOffset,
|
|
2926
|
+
variant: renderArgo ? "argo" : "default",
|
|
2927
|
+
children: /* @__PURE__ */ jsx(Calendar, { ...calendarProps })
|
|
2928
|
+
}
|
|
2929
|
+
)
|
|
2930
|
+
] });
|
|
2931
|
+
};
|
|
2826
2932
|
DatePicker.displayName = "DatePicker";
|
|
2827
2933
|
var addonVariants = cva(
|
|
2828
2934
|
[
|
|
@@ -3106,7 +3212,8 @@ var inputGroupVariants = cva(
|
|
|
3106
3212
|
"has-[:is(input,textarea):disabled]:tw-opacity-40"
|
|
3107
3213
|
],
|
|
3108
3214
|
argo: [
|
|
3109
|
-
|
|
3215
|
+
// muted filled input surface — gray, distinct from white containers; not the app-background token
|
|
3216
|
+
"tw-bg-muted",
|
|
3110
3217
|
"tw-border-input",
|
|
3111
3218
|
"tw-rounded-lg",
|
|
3112
3219
|
"tw-text-foreground",
|
|
@@ -3160,15 +3267,28 @@ var InputGroupRoot = ({
|
|
|
3160
3267
|
focusVariant,
|
|
3161
3268
|
className,
|
|
3162
3269
|
...props
|
|
3163
|
-
}) =>
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3270
|
+
}) => {
|
|
3271
|
+
const isLegacy = useIsLegacyBrand();
|
|
3272
|
+
const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : variant;
|
|
3273
|
+
const effectiveSizing = effectiveVariant === "argo" ? "medium" : sizing;
|
|
3274
|
+
return /* @__PURE__ */ jsx(
|
|
3275
|
+
"div",
|
|
3276
|
+
{
|
|
3277
|
+
...props,
|
|
3278
|
+
ref,
|
|
3279
|
+
className: cn(
|
|
3280
|
+
inputGroupVariants({
|
|
3281
|
+
state,
|
|
3282
|
+
variant: effectiveVariant,
|
|
3283
|
+
sizing: effectiveSizing,
|
|
3284
|
+
focusVariant,
|
|
3285
|
+
className
|
|
3286
|
+
})
|
|
3287
|
+
),
|
|
3288
|
+
children
|
|
3289
|
+
}
|
|
3290
|
+
);
|
|
3291
|
+
};
|
|
3172
3292
|
var InputGroup = InputGroupRoot;
|
|
3173
3293
|
InputGroup.Input = InputGroupInput;
|
|
3174
3294
|
InputGroup.Addon = InputGroupAddon;
|
|
@@ -3281,7 +3401,7 @@ var Input = ({
|
|
|
3281
3401
|
"div",
|
|
3282
3402
|
{
|
|
3283
3403
|
className: cn({
|
|
3284
|
-
"tw-whitespace-nowrap tw-bg-
|
|
3404
|
+
"tw-whitespace-nowrap tw-bg-muted tw-px-4 -tw-mr-4 tw-py-2.5": rightSuffixVariant === "addon"
|
|
3285
3405
|
}),
|
|
3286
3406
|
children: rightSuffix
|
|
3287
3407
|
}
|
|
@@ -3345,6 +3465,7 @@ var DateInput = ({
|
|
|
3345
3465
|
readOnly,
|
|
3346
3466
|
startMonth,
|
|
3347
3467
|
value,
|
|
3468
|
+
variant,
|
|
3348
3469
|
...props
|
|
3349
3470
|
}) => {
|
|
3350
3471
|
const [inputValue, setInputValue] = useState("");
|
|
@@ -3414,6 +3535,7 @@ var DateInput = ({
|
|
|
3414
3535
|
readOnly,
|
|
3415
3536
|
ref,
|
|
3416
3537
|
value: displayValue,
|
|
3538
|
+
variant,
|
|
3417
3539
|
rightSuffix: !disabled && !readOnly ? /* @__PURE__ */ jsx(
|
|
3418
3540
|
DatePicker,
|
|
3419
3541
|
{
|
|
@@ -3570,6 +3692,7 @@ var TextInput = ({
|
|
|
3570
3692
|
value,
|
|
3571
3693
|
defaultValue,
|
|
3572
3694
|
type = "text",
|
|
3695
|
+
variant,
|
|
3573
3696
|
onValueChange,
|
|
3574
3697
|
onChange,
|
|
3575
3698
|
onValueBlur,
|
|
@@ -3592,6 +3715,7 @@ var TextInput = ({
|
|
|
3592
3715
|
onChange: handleChange,
|
|
3593
3716
|
onBlur: handleBlur,
|
|
3594
3717
|
type,
|
|
3718
|
+
variant,
|
|
3595
3719
|
value: sanitizeTextInputValue(value),
|
|
3596
3720
|
defaultValue: sanitizeTextInputValue(defaultValue)
|
|
3597
3721
|
}
|
|
@@ -3617,12 +3741,12 @@ var TimePickerButton = ({
|
|
|
3617
3741
|
"tw-rounded",
|
|
3618
3742
|
"tw-transition-colors",
|
|
3619
3743
|
"tw-select-none",
|
|
3620
|
-
"hover:tw-bg-
|
|
3744
|
+
"hover:tw-bg-accent",
|
|
3621
3745
|
"focus-visible:tw-outline",
|
|
3622
3746
|
"focus-visible:tw-outline-2",
|
|
3623
|
-
"focus-visible:tw-outline-
|
|
3624
|
-
"aria-selected:tw-bg-
|
|
3625
|
-
"aria-selected:tw-text-
|
|
3747
|
+
"focus-visible:tw-outline-primary",
|
|
3748
|
+
"aria-selected:tw-bg-primary",
|
|
3749
|
+
"aria-selected:tw-text-primary-foreground",
|
|
3626
3750
|
className
|
|
3627
3751
|
),
|
|
3628
3752
|
children
|
|
@@ -3653,7 +3777,7 @@ var MINUTES = Array.from({ length: 60 }, (_, i) => i);
|
|
|
3653
3777
|
var TimePicker = ({
|
|
3654
3778
|
align = "end",
|
|
3655
3779
|
alignOffset = -18,
|
|
3656
|
-
argo
|
|
3780
|
+
argo,
|
|
3657
3781
|
children,
|
|
3658
3782
|
defaultOpen,
|
|
3659
3783
|
defaultSelected,
|
|
@@ -3663,6 +3787,8 @@ var TimePicker = ({
|
|
|
3663
3787
|
selected,
|
|
3664
3788
|
sideOffset = 12
|
|
3665
3789
|
}) => {
|
|
3790
|
+
const isLegacy = useIsLegacyBrand();
|
|
3791
|
+
const renderArgo = !isLegacy || argo;
|
|
3666
3792
|
const [internalSelected, setInternalSelected] = useState(defaultSelected ?? null);
|
|
3667
3793
|
const isControlled = selected !== void 0;
|
|
3668
3794
|
const currentValue = isControlled ? selected : internalSelected;
|
|
@@ -3692,7 +3818,7 @@ var TimePicker = ({
|
|
|
3692
3818
|
alignOffset,
|
|
3693
3819
|
sideOffset,
|
|
3694
3820
|
className: "tw-flex tw-flex-row",
|
|
3695
|
-
variant:
|
|
3821
|
+
variant: renderArgo ? "argo" : "default",
|
|
3696
3822
|
children: [
|
|
3697
3823
|
/* @__PURE__ */ jsx(ScrollArea, { type: "always", ref: scrollToSelected, viewPortClassName: "tw-h-60 tw-px-3", children: HOURS.map((value) => /* @__PURE__ */ jsx(
|
|
3698
3824
|
TimePickerButton,
|
|
@@ -3728,6 +3854,7 @@ var TimeInput = ({
|
|
|
3728
3854
|
placeholder = "Select time",
|
|
3729
3855
|
readOnly,
|
|
3730
3856
|
value,
|
|
3857
|
+
variant,
|
|
3731
3858
|
className,
|
|
3732
3859
|
...props
|
|
3733
3860
|
}) => {
|
|
@@ -3773,6 +3900,7 @@ var TimeInput = ({
|
|
|
3773
3900
|
placeholder,
|
|
3774
3901
|
className: cn("[&_input::-webkit-calendar-picker-indicator]:tw-hidden", className),
|
|
3775
3902
|
value: currentValue,
|
|
3903
|
+
variant,
|
|
3776
3904
|
onChange: handleChange,
|
|
3777
3905
|
onBlur: handleBlur,
|
|
3778
3906
|
onClear: currentValue ? handleClear : void 0,
|
|
@@ -3931,7 +4059,7 @@ var CommandItem = ({
|
|
|
3931
4059
|
),
|
|
3932
4060
|
children: [
|
|
3933
4061
|
/* @__PURE__ */ jsx(CheckIndicator, { variant }),
|
|
3934
|
-
icon && /* @__PURE__ */ jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-text-
|
|
4062
|
+
icon && /* @__PURE__ */ jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-text-muted-foreground [&_svg:not([class*='tw-size-'])]:tw-size-4", children: icon }),
|
|
3935
4063
|
children
|
|
3936
4064
|
]
|
|
3937
4065
|
}
|
|
@@ -3981,14 +4109,18 @@ var CommandSeparator = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
3981
4109
|
...props
|
|
3982
4110
|
}
|
|
3983
4111
|
);
|
|
3984
|
-
var Command = ({ className, variant
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
)
|
|
4112
|
+
var Command = ({ className, variant, ...rest }) => {
|
|
4113
|
+
const isLegacy = useIsLegacyBrand();
|
|
4114
|
+
const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : "default";
|
|
4115
|
+
return /* @__PURE__ */ jsx(
|
|
4116
|
+
Command$1,
|
|
4117
|
+
{
|
|
4118
|
+
"data-variant": effectiveVariant,
|
|
4119
|
+
className: cn("tw-group/command", "tailwindcss-preflight", className),
|
|
4120
|
+
...rest
|
|
4121
|
+
}
|
|
4122
|
+
);
|
|
4123
|
+
};
|
|
3992
4124
|
Command.Content = CommandContent;
|
|
3993
4125
|
Command.Separator = CommandSeparator;
|
|
3994
4126
|
Command.List = CommandList;
|
|
@@ -4033,7 +4165,7 @@ var DateRangePicker = ({
|
|
|
4033
4165
|
}
|
|
4034
4166
|
) }),
|
|
4035
4167
|
/* @__PURE__ */ jsx(Popover.Content, { variant: "argo", align: "start", className: "tw-w-auto tw-p-0", children: /* @__PURE__ */ jsxs("div", { className: "tw-flex", children: [
|
|
4036
|
-
presets && presets.length > 0 ? /* @__PURE__ */ jsx("div", { className: "tw-flex tw-flex-col tw-gap-1 tw-border-r tw-border-solid tw-border-
|
|
4168
|
+
presets && presets.length > 0 ? /* @__PURE__ */ jsx("div", { className: "tw-flex tw-flex-col tw-gap-1 tw-border-r tw-border-solid tw-border-border tw-p-2", children: presets.map((preset) => /* @__PURE__ */ jsx(
|
|
4037
4169
|
Button,
|
|
4038
4170
|
{
|
|
4039
4171
|
argo: true,
|
|
@@ -4064,7 +4196,7 @@ var DateRangePicker = ({
|
|
|
4064
4196
|
] }) })
|
|
4065
4197
|
] });
|
|
4066
4198
|
DateRangePicker.displayName = "DateRangePicker";
|
|
4067
|
-
var Optional = ({ className }) => /* @__PURE__ */ jsx("span", { className: cn("tw-text-
|
|
4199
|
+
var Optional = ({ className }) => /* @__PURE__ */ jsx("span", { className: cn("tw-text-muted-foreground", className), children: "(optional)" });
|
|
4068
4200
|
var Label2 = ({ className, children, id, htmlFor, ...rest }) => {
|
|
4069
4201
|
return /* @__PURE__ */ jsx(
|
|
4070
4202
|
RLabel.Root,
|
|
@@ -4073,7 +4205,7 @@ var Label2 = ({ className, children, id, htmlFor, ...rest }) => {
|
|
|
4073
4205
|
id: id?.toString(),
|
|
4074
4206
|
htmlFor: htmlFor?.toString(),
|
|
4075
4207
|
className: cn(
|
|
4076
|
-
"tw-m-0 tw-text-
|
|
4208
|
+
"tw-m-0 tw-text-foreground tw-font-normal peer-disabled:tw-opacity-50",
|
|
4077
4209
|
className
|
|
4078
4210
|
),
|
|
4079
4211
|
children
|
|
@@ -4344,7 +4476,8 @@ var Switch = ({
|
|
|
4344
4476
|
}) => {
|
|
4345
4477
|
const fallbackId = useId();
|
|
4346
4478
|
const id = idProp?.toString() ?? fallbackId;
|
|
4347
|
-
const
|
|
4479
|
+
const isLegacy = useIsLegacyBrand();
|
|
4480
|
+
const switchVariant = !isLegacy || argo ? "argo" : "default";
|
|
4348
4481
|
const switchElement = /* @__PURE__ */ jsx(
|
|
4349
4482
|
Root$3,
|
|
4350
4483
|
{
|
|
@@ -4364,110 +4497,163 @@ var Switch = ({
|
|
|
4364
4497
|
};
|
|
4365
4498
|
var RadioGroupContext = createContext({
|
|
4366
4499
|
variant: "radio",
|
|
4367
|
-
orientation: "horizontal"
|
|
4500
|
+
orientation: "horizontal",
|
|
4501
|
+
groupArgo: false
|
|
4368
4502
|
});
|
|
4369
4503
|
var RadioGroupProvider = RadioGroupContext;
|
|
4370
4504
|
var useRadioGroupContext = () => use(RadioGroupContext);
|
|
4371
|
-
var
|
|
4372
|
-
|
|
4505
|
+
var radioVariants = cva(
|
|
4506
|
+
[
|
|
4507
|
+
// reset
|
|
4508
|
+
"tw-bg-transparent",
|
|
4509
|
+
"tw-p-0",
|
|
4510
|
+
"tw-peer",
|
|
4511
|
+
"tw-cursor-pointer",
|
|
4512
|
+
"tw-whitespace-nowrap",
|
|
4513
|
+
"tw-shrink-0",
|
|
4514
|
+
// position
|
|
4515
|
+
"tw-flex",
|
|
4516
|
+
"tw-items-center",
|
|
4517
|
+
"tw-justify-center",
|
|
4518
|
+
"disabled:tw-cursor-not-allowed",
|
|
4519
|
+
"tw-size-4",
|
|
4520
|
+
// border
|
|
4521
|
+
"tw-rounded-full",
|
|
4522
|
+
"tw-border",
|
|
4523
|
+
"tw-border-solid"
|
|
4524
|
+
],
|
|
4373
4525
|
{
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
// focus-visible ring
|
|
4404
|
-
"focus-visible:tw-ring-2",
|
|
4405
|
-
"focus-visible:tw-ring-secondary-200",
|
|
4406
|
-
className
|
|
4407
|
-
),
|
|
4408
|
-
children: /* @__PURE__ */ jsx(Indicator$2, { className: cn("tw-flex", "tw-items-center", "tw-justify-center"), children: /* @__PURE__ */ jsx(icons_exports.Circle, { className: "tw-size-2.5 tw-fill-current tw-text-primary" }) })
|
|
4526
|
+
defaultVariants: {
|
|
4527
|
+
variant: "default"
|
|
4528
|
+
},
|
|
4529
|
+
variants: {
|
|
4530
|
+
variant: {
|
|
4531
|
+
default: [
|
|
4532
|
+
"disabled:tw-opacity-40",
|
|
4533
|
+
"data-[state=checked]:tw-border-primary",
|
|
4534
|
+
"data-[state=unchecked]:tw-border-neutral-200",
|
|
4535
|
+
"data-[state=unchecked]:hover:tw-border-primary",
|
|
4536
|
+
"data-[state=unchecked]:disabled:hover:tw-border-neutral-200",
|
|
4537
|
+
"focus-visible:tw-ring-2",
|
|
4538
|
+
"focus-visible:tw-ring-secondary-200"
|
|
4539
|
+
],
|
|
4540
|
+
argo: [
|
|
4541
|
+
"disabled:tw-opacity-50",
|
|
4542
|
+
"tw-border-input",
|
|
4543
|
+
"tw-transition-colors",
|
|
4544
|
+
"data-[state=checked]:tw-bg-primary",
|
|
4545
|
+
"data-[state=checked]:tw-border-primary",
|
|
4546
|
+
"data-[state=unchecked]:not-disabled:hover:tw-bg-accent",
|
|
4547
|
+
"data-[state=checked]:not-disabled:hover:tw-bg-primary",
|
|
4548
|
+
"focus-visible:tw-outline-none",
|
|
4549
|
+
"focus-visible:tw-border-primary",
|
|
4550
|
+
"focus-visible:tw-ring-2",
|
|
4551
|
+
"focus-visible:tw-ring-primary/50"
|
|
4552
|
+
]
|
|
4553
|
+
}
|
|
4554
|
+
}
|
|
4409
4555
|
}
|
|
4410
4556
|
);
|
|
4557
|
+
var radioIndicatorVariants = cva(["tw-size-2.5", "tw-fill-current"], {
|
|
4558
|
+
defaultVariants: {
|
|
4559
|
+
variant: "default"
|
|
4560
|
+
},
|
|
4561
|
+
variants: {
|
|
4562
|
+
variant: {
|
|
4563
|
+
default: ["tw-text-primary"],
|
|
4564
|
+
argo: ["tw-text-primary-foreground"]
|
|
4565
|
+
}
|
|
4566
|
+
}
|
|
4567
|
+
});
|
|
4568
|
+
var radioItemButtonVariants = cva(
|
|
4569
|
+
[
|
|
4570
|
+
// reset
|
|
4571
|
+
"tw-bg-transparent",
|
|
4572
|
+
"tw-p-0",
|
|
4573
|
+
"tw-peer",
|
|
4574
|
+
"tw-cursor-pointer",
|
|
4575
|
+
"tw-whitespace-nowrap",
|
|
4576
|
+
// position
|
|
4577
|
+
"tw-flex",
|
|
4578
|
+
"tw-items-center",
|
|
4579
|
+
"tw-justify-center",
|
|
4580
|
+
"disabled:tw-cursor-not-allowed",
|
|
4581
|
+
// layouts
|
|
4582
|
+
"tw-w-full",
|
|
4583
|
+
"tw-px-2",
|
|
4584
|
+
"tw-py-1.5",
|
|
4585
|
+
// fonts
|
|
4586
|
+
"tw-uppercase",
|
|
4587
|
+
"tw-font-semibold",
|
|
4588
|
+
"tw-font-sans",
|
|
4589
|
+
"tw-text-[11px]",
|
|
4590
|
+
"tw-whitespace-nowrap",
|
|
4591
|
+
"tw-tracking-widest",
|
|
4592
|
+
"tw-leading-[18px]",
|
|
4593
|
+
// border
|
|
4594
|
+
"tw-border",
|
|
4595
|
+
"tw-border-solid",
|
|
4596
|
+
"tw-rounded"
|
|
4597
|
+
],
|
|
4598
|
+
{
|
|
4599
|
+
defaultVariants: {
|
|
4600
|
+
variant: "default"
|
|
4601
|
+
},
|
|
4602
|
+
variants: {
|
|
4603
|
+
variant: {
|
|
4604
|
+
default: [
|
|
4605
|
+
"disabled:tw-opacity-40",
|
|
4606
|
+
"tw-text-secondary-600",
|
|
4607
|
+
"tw-border-secondary-500",
|
|
4608
|
+
"data-[state=unchecked]:hover:tw-bg-secondary-500",
|
|
4609
|
+
"data-[state=unchecked]:hover:tw-text-white",
|
|
4610
|
+
"data-[state=unchecked]:disabled:hover:tw-bg-white",
|
|
4611
|
+
"data-[state=unchecked]:disabled:hover:tw-text-secondary-500",
|
|
4612
|
+
"data-[state=checked]:disabled:tw-cursor-not-allowed",
|
|
4613
|
+
"data-[state=unchecked]:tw-bg-white",
|
|
4614
|
+
"data-[state=checked]:tw-bg-secondary-500",
|
|
4615
|
+
"data-[state=checked]:tw-text-white",
|
|
4616
|
+
"data-[state=checked]:tw-cursor-default",
|
|
4617
|
+
"focus-visible:tw-outline",
|
|
4618
|
+
"focus-visible:tw-outline-secondary-500",
|
|
4619
|
+
"focus-visible:tw-ring-4",
|
|
4620
|
+
"focus-visible:tw-ring-secondary-200"
|
|
4621
|
+
],
|
|
4622
|
+
argo: [
|
|
4623
|
+
"disabled:tw-opacity-50",
|
|
4624
|
+
"tw-text-foreground",
|
|
4625
|
+
"tw-border-input",
|
|
4626
|
+
"tw-transition-colors",
|
|
4627
|
+
// muted filled control surface — gray, distinct from white containers; not the app-background token
|
|
4628
|
+
"data-[state=unchecked]:tw-bg-muted",
|
|
4629
|
+
"data-[state=unchecked]:not-disabled:hover:tw-bg-accent",
|
|
4630
|
+
"data-[state=unchecked]:not-disabled:hover:tw-text-accent-foreground",
|
|
4631
|
+
"data-[state=checked]:tw-bg-primary",
|
|
4632
|
+
"data-[state=checked]:tw-border-primary",
|
|
4633
|
+
"data-[state=checked]:tw-text-primary-foreground",
|
|
4634
|
+
"data-[state=checked]:not-disabled:tw-cursor-default",
|
|
4635
|
+
"focus-visible:tw-outline-none",
|
|
4636
|
+
"focus-visible:tw-border-primary",
|
|
4637
|
+
"focus-visible:tw-ring-2",
|
|
4638
|
+
"focus-visible:tw-ring-primary/50"
|
|
4639
|
+
]
|
|
4640
|
+
}
|
|
4641
|
+
}
|
|
4642
|
+
}
|
|
4643
|
+
);
|
|
4644
|
+
var Radio = ({ className, styleVariant = "default", ...props }) => /* @__PURE__ */ jsx(Item, { ...props, className: cn(radioVariants({ variant: styleVariant }), className), children: /* @__PURE__ */ jsx(Indicator$2, { className: cn("tw-flex", "tw-items-center", "tw-justify-center"), children: /* @__PURE__ */ jsx(icons_exports.Circle, { className: radioIndicatorVariants({ variant: styleVariant }) }) }) });
|
|
4411
4645
|
var RadioGroupItemButton = ({
|
|
4412
4646
|
ref,
|
|
4413
4647
|
className,
|
|
4414
4648
|
children,
|
|
4649
|
+
styleVariant = "default",
|
|
4415
4650
|
...props
|
|
4416
4651
|
}) => /* @__PURE__ */ jsx(
|
|
4417
4652
|
Item,
|
|
4418
4653
|
{
|
|
4419
4654
|
ref,
|
|
4420
4655
|
...props,
|
|
4421
|
-
className: cn(
|
|
4422
|
-
// reset
|
|
4423
|
-
"tw-bg-transparent",
|
|
4424
|
-
"tw-p-0",
|
|
4425
|
-
"tw-peer",
|
|
4426
|
-
"tw-cursor-pointer",
|
|
4427
|
-
"tw-whitespace-nowrap",
|
|
4428
|
-
// position
|
|
4429
|
-
"tw-flex",
|
|
4430
|
-
"tw-items-center",
|
|
4431
|
-
"tw-justify-center",
|
|
4432
|
-
// disabled
|
|
4433
|
-
"disabled:tw-opacity-40",
|
|
4434
|
-
"disabled:tw-cursor-not-allowed",
|
|
4435
|
-
// layouts
|
|
4436
|
-
"tw-w-full",
|
|
4437
|
-
"tw-px-2",
|
|
4438
|
-
"tw-py-1.5",
|
|
4439
|
-
// fonts
|
|
4440
|
-
"tw-text-secondary-600",
|
|
4441
|
-
"tw-uppercase",
|
|
4442
|
-
"tw-font-semibold",
|
|
4443
|
-
"tw-font-sans",
|
|
4444
|
-
"tw-text-[11px]",
|
|
4445
|
-
"tw-whitespace-nowrap",
|
|
4446
|
-
"tw-tracking-widest",
|
|
4447
|
-
"tw-leading-[18px]",
|
|
4448
|
-
// border
|
|
4449
|
-
"tw-border",
|
|
4450
|
-
"tw-border-solid",
|
|
4451
|
-
"tw-border-secondary-500",
|
|
4452
|
-
"tw-rounded",
|
|
4453
|
-
// hover
|
|
4454
|
-
"data-[state=unchecked]:hover:tw-bg-secondary-500",
|
|
4455
|
-
"data-[state=unchecked]:hover:tw-text-white",
|
|
4456
|
-
// disabled
|
|
4457
|
-
"data-[state=unchecked]:disabled:hover:tw-bg-white",
|
|
4458
|
-
"data-[state=unchecked]:disabled:hover:tw-text-secondary-500",
|
|
4459
|
-
"data-[state=checked]:disabled:tw-cursor-not-allowed",
|
|
4460
|
-
// states
|
|
4461
|
-
"data-[state=unchecked]:tw-bg-white",
|
|
4462
|
-
"data-[state=checked]:tw-bg-secondary-500",
|
|
4463
|
-
"data-[state=checked]:tw-text-white",
|
|
4464
|
-
"data-[state=checked]:tw-cursor-default",
|
|
4465
|
-
"focus-visible:tw-outline",
|
|
4466
|
-
"focus-visible:tw-outline-secondary-500",
|
|
4467
|
-
"focus-visible:tw-ring-4",
|
|
4468
|
-
"focus-visible:tw-ring-secondary-200",
|
|
4469
|
-
className
|
|
4470
|
-
),
|
|
4656
|
+
className: cn(radioItemButtonVariants({ variant: styleVariant }), className),
|
|
4471
4657
|
children
|
|
4472
4658
|
}
|
|
4473
4659
|
);
|
|
@@ -4477,19 +4663,22 @@ var RadioGroupItem = ({
|
|
|
4477
4663
|
tooltipVariant,
|
|
4478
4664
|
tooltipPlacement,
|
|
4479
4665
|
description,
|
|
4666
|
+
argo,
|
|
4480
4667
|
...props
|
|
4481
4668
|
}) => {
|
|
4482
|
-
const { variant } = useRadioGroupContext();
|
|
4669
|
+
const { variant, groupArgo } = useRadioGroupContext();
|
|
4670
|
+
const isLegacy = useIsLegacyBrand();
|
|
4671
|
+
const styleVariant = argo === true || groupArgo || !isLegacy ? "argo" : "default";
|
|
4483
4672
|
const id = useId();
|
|
4484
4673
|
const item = (() => {
|
|
4485
4674
|
if (variant === "button")
|
|
4486
|
-
return /* @__PURE__ */ jsx(RadioGroupItemButton, { ...props, children });
|
|
4675
|
+
return /* @__PURE__ */ jsx(RadioGroupItemButton, { styleVariant, ...props, children });
|
|
4487
4676
|
return /* @__PURE__ */ jsxs(
|
|
4488
4677
|
FieldBox,
|
|
4489
4678
|
{
|
|
4490
4679
|
variant: variant === "radio-block" ? "boxed" : "default",
|
|
4491
4680
|
htmlFor: id,
|
|
4492
|
-
control: /* @__PURE__ */ jsx(Radio, { ...props, id }),
|
|
4681
|
+
control: /* @__PURE__ */ jsx(Radio, { styleVariant, ...props, id }),
|
|
4493
4682
|
className: variant === "radio-block" ? "tw-flex-1" : void 0,
|
|
4494
4683
|
children: [
|
|
4495
4684
|
/* @__PURE__ */ jsx(FieldBox.Title, { children }),
|
|
@@ -4624,12 +4813,15 @@ var RadioGroup2 = ({
|
|
|
4624
4813
|
className,
|
|
4625
4814
|
disabled = false,
|
|
4626
4815
|
orientation = "horizontal",
|
|
4816
|
+
argo,
|
|
4627
4817
|
onValueChange,
|
|
4628
4818
|
children,
|
|
4629
4819
|
value,
|
|
4630
4820
|
defaultValue,
|
|
4631
4821
|
...props
|
|
4632
4822
|
}) => {
|
|
4823
|
+
const isLegacy = useIsLegacyBrand();
|
|
4824
|
+
const groupArgo = !isLegacy || argo === true;
|
|
4633
4825
|
return /* @__PURE__ */ jsx(
|
|
4634
4826
|
RRadioGroup.Root,
|
|
4635
4827
|
{
|
|
@@ -4640,7 +4832,7 @@ var RadioGroup2 = ({
|
|
|
4640
4832
|
disabled,
|
|
4641
4833
|
value: value ?? void 0,
|
|
4642
4834
|
defaultValue: defaultValue ?? void 0,
|
|
4643
|
-
children: /* @__PURE__ */ jsx(RadioGroupProvider, { value: { variant, orientation }, children })
|
|
4835
|
+
children: /* @__PURE__ */ jsx(RadioGroupProvider, { value: { variant, orientation, groupArgo }, children })
|
|
4644
4836
|
}
|
|
4645
4837
|
);
|
|
4646
4838
|
};
|
|
@@ -5088,67 +5280,72 @@ var SelectContent = ({
|
|
|
5088
5280
|
container,
|
|
5089
5281
|
position = "popper",
|
|
5090
5282
|
sideOffset = 4,
|
|
5091
|
-
variant
|
|
5283
|
+
variant,
|
|
5092
5284
|
...props
|
|
5093
|
-
}) =>
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
"
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
SelectPrimitive.Viewport,
|
|
5141
|
-
{
|
|
5142
|
-
className: cn({
|
|
5143
|
-
"tw-h-[var(--radix-select-trigger-height)] tw-w-full tw-min-w-[var(--radix-select-trigger-width)]": position === "popper"
|
|
5144
|
-
}),
|
|
5145
|
-
children
|
|
5146
|
-
}
|
|
5285
|
+
}) => {
|
|
5286
|
+
const isLegacy = useIsLegacyBrand();
|
|
5287
|
+
const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : "default";
|
|
5288
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { container, children: /* @__PURE__ */ jsxs(
|
|
5289
|
+
SelectPrimitive.Content,
|
|
5290
|
+
{
|
|
5291
|
+
...props,
|
|
5292
|
+
ref,
|
|
5293
|
+
position,
|
|
5294
|
+
sideOffset,
|
|
5295
|
+
"data-variant": effectiveVariant,
|
|
5296
|
+
className: cn(
|
|
5297
|
+
"tailwindcss-preflight",
|
|
5298
|
+
"tw-group/select-content",
|
|
5299
|
+
// Floating tier above Modal (1051): Tooltip 1060 / Combobox·Popover·Select 1055 / Modal 1051 / DropdownMenu.SubContent 1041 / FullScreenModal 1039
|
|
5300
|
+
"tw-z-[1055]",
|
|
5301
|
+
// layout
|
|
5302
|
+
"tw-flex tw-flex-col",
|
|
5303
|
+
"tw-p-1",
|
|
5304
|
+
"data-[variant=default]:tw-p-0",
|
|
5305
|
+
"tw-overflow-hidden",
|
|
5306
|
+
"tw-origin-[--radix-select-content-transform-origin]",
|
|
5307
|
+
// sizing
|
|
5308
|
+
"tw-max-h-[var(--radix-select-content-available-height)]",
|
|
5309
|
+
"tw-min-w-[var(--radix-select-trigger-width)]",
|
|
5310
|
+
// appearance
|
|
5311
|
+
"tw-bg-popover",
|
|
5312
|
+
"tw-text-popover-foreground",
|
|
5313
|
+
"tw-shadow-md",
|
|
5314
|
+
"tw-ring-1",
|
|
5315
|
+
"tw-ring-foreground/10",
|
|
5316
|
+
"tw-rounded-lg",
|
|
5317
|
+
"data-[variant=default]:tw-rounded",
|
|
5318
|
+
// open animation
|
|
5319
|
+
"data-[state=open]:tw-animate-in",
|
|
5320
|
+
"data-[state=open]:tw-fade-in-0",
|
|
5321
|
+
"data-[state=open]:tw-zoom-in-95",
|
|
5322
|
+
// closed animation
|
|
5323
|
+
"data-[state=closed]:tw-animate-out",
|
|
5324
|
+
"data-[state=closed]:tw-fade-out-0",
|
|
5325
|
+
"data-[state=closed]:tw-zoom-out-95",
|
|
5326
|
+
// position animations
|
|
5327
|
+
"data-[side=bottom]:tw-slide-in-from-top-2",
|
|
5328
|
+
"data-[side=left]:tw-slide-in-from-right-2",
|
|
5329
|
+
"data-[side=right]:tw-slide-in-from-left-2",
|
|
5330
|
+
"data-[side=top]:tw-slide-in-from-bottom-2",
|
|
5331
|
+
className
|
|
5147
5332
|
),
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5333
|
+
children: [
|
|
5334
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, { className: scrollButtonStyles, children: /* @__PURE__ */ jsx(icons_exports.ChevronUp, {}) }),
|
|
5335
|
+
/* @__PURE__ */ jsx(
|
|
5336
|
+
SelectPrimitive.Viewport,
|
|
5337
|
+
{
|
|
5338
|
+
className: cn({
|
|
5339
|
+
"tw-h-[var(--radix-select-trigger-height)] tw-w-full tw-min-w-[var(--radix-select-trigger-width)]": position === "popper"
|
|
5340
|
+
}),
|
|
5341
|
+
children
|
|
5342
|
+
}
|
|
5343
|
+
),
|
|
5344
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, { className: scrollButtonStyles, children: /* @__PURE__ */ jsx(icons_exports.ChevronDown, {}) })
|
|
5345
|
+
]
|
|
5346
|
+
}
|
|
5347
|
+
) });
|
|
5348
|
+
};
|
|
5152
5349
|
var SelectGroup = ({ className, ...props }) => /* @__PURE__ */ jsx(SelectPrimitive.Group, { ...props, className: cn("tw-flex tw-flex-col tw-gap-0.5", className) });
|
|
5153
5350
|
var SelectItem = ({
|
|
5154
5351
|
ref,
|
|
@@ -5197,7 +5394,7 @@ var SelectItem = ({
|
|
|
5197
5394
|
className
|
|
5198
5395
|
),
|
|
5199
5396
|
children: [
|
|
5200
|
-
|
|
5397
|
+
icon,
|
|
5201
5398
|
/* @__PURE__ */ jsx("span", { className: "tw-flex-1 tw-truncate", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }) }),
|
|
5202
5399
|
/* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { className: "tw-pointer-events-none", children: /* @__PURE__ */ jsx(icons_exports.Check, { className: "tw-size-4" }) })
|
|
5203
5400
|
]
|
|
@@ -5214,7 +5411,7 @@ var SelectLabel = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
5214
5411
|
"tw-text-xs",
|
|
5215
5412
|
"tw-font-medium",
|
|
5216
5413
|
"tw-leading-none",
|
|
5217
|
-
"tw-text-
|
|
5414
|
+
"tw-text-muted-foreground",
|
|
5218
5415
|
// Default variant — uppercase tracked label, matches Combobox default
|
|
5219
5416
|
"group-data-[variant=default]/select-content:tw-uppercase",
|
|
5220
5417
|
"group-data-[variant=default]/select-content:tw-font-semibold",
|
|
@@ -5232,7 +5429,7 @@ var SelectSeparator = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
5232
5429
|
SelectPrimitive.Separator,
|
|
5233
5430
|
{
|
|
5234
5431
|
...props,
|
|
5235
|
-
className: cn("tw-mx-2 tw-my-1 tw-h-px tw-bg-
|
|
5432
|
+
className: cn("tw-mx-2 tw-my-1 tw-h-px tw-bg-border", className)
|
|
5236
5433
|
}
|
|
5237
5434
|
);
|
|
5238
5435
|
var variants4 = cva(
|
|
@@ -5319,7 +5516,8 @@ var variants4 = cva(
|
|
|
5319
5516
|
"aria-disabled:tw-opacity-40"
|
|
5320
5517
|
],
|
|
5321
5518
|
argo: [
|
|
5322
|
-
|
|
5519
|
+
// muted filled input surface — gray, distinct from white containers; not the app-background token
|
|
5520
|
+
"tw-bg-muted",
|
|
5323
5521
|
"tw-border-input",
|
|
5324
5522
|
"tw-rounded-lg",
|
|
5325
5523
|
"tw-text-foreground",
|
|
@@ -5366,18 +5564,22 @@ var SelectTrigger = ({
|
|
|
5366
5564
|
sizing,
|
|
5367
5565
|
placeholder,
|
|
5368
5566
|
...props
|
|
5369
|
-
}) =>
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
)
|
|
5567
|
+
}) => {
|
|
5568
|
+
const isLegacy = useIsLegacyBrand();
|
|
5569
|
+
const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : variant;
|
|
5570
|
+
return /* @__PURE__ */ jsxs(
|
|
5571
|
+
SelectPrimitive.Trigger,
|
|
5572
|
+
{
|
|
5573
|
+
ref,
|
|
5574
|
+
className: cn(variants4({ variant: effectiveVariant, state, sizing }), className),
|
|
5575
|
+
...props,
|
|
5576
|
+
children: [
|
|
5577
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Value, { placeholder }),
|
|
5578
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(icons_exports.ChevronDown, { className: "tw-size-5 tw-text-muted-foreground" }) })
|
|
5579
|
+
]
|
|
5580
|
+
}
|
|
5581
|
+
);
|
|
5582
|
+
};
|
|
5381
5583
|
var isGroup = (itemOrGroup) => "items" in itemOrGroup;
|
|
5382
5584
|
var Select = ({
|
|
5383
5585
|
// root
|
|
@@ -5538,7 +5740,8 @@ function Checkbox({
|
|
|
5538
5740
|
}) {
|
|
5539
5741
|
const fallbackId = useId();
|
|
5540
5742
|
const id = idProp?.toString() ?? fallbackId;
|
|
5541
|
-
const
|
|
5743
|
+
const isLegacy = useIsLegacyBrand();
|
|
5744
|
+
const styleVariant = !isLegacy || argo ? "argo" : "default";
|
|
5542
5745
|
const checkboxElement = /* @__PURE__ */ jsx(Root$4, { id, ...rest, className: cn(rootVariants2({ variant: styleVariant, className })), children: /* @__PURE__ */ jsxs(Indicator, { className: cn(indicatorVariants({ variant: styleVariant })), children: [
|
|
5543
5746
|
/* @__PURE__ */ jsx(icons_exports.Check, { className: "tw-hidden tw-size-3 tw-stroke-[4px] group-data-[state=checked]:tw-block" }),
|
|
5544
5747
|
/* @__PURE__ */ jsx(icons_exports.Minus, { className: "tw-hidden tw-size-3 tw-stroke-[4px] group-data-[state=indeterminate]:tw-block" })
|
|
@@ -5870,66 +6073,70 @@ var ComboboxContent = ({
|
|
|
5870
6073
|
container,
|
|
5871
6074
|
className,
|
|
5872
6075
|
children,
|
|
5873
|
-
variant
|
|
6076
|
+
variant,
|
|
5874
6077
|
...popupProps
|
|
5875
|
-
}) =>
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
"
|
|
5892
|
-
"
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
6078
|
+
}) => {
|
|
6079
|
+
const isLegacy = useIsLegacyBrand();
|
|
6080
|
+
const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : "default";
|
|
6081
|
+
return /* @__PURE__ */ jsx(Combobox$1.Portal, { container, children: /* @__PURE__ */ jsx(
|
|
6082
|
+
Combobox$1.Positioner,
|
|
6083
|
+
{
|
|
6084
|
+
align,
|
|
6085
|
+
side,
|
|
6086
|
+
sideOffset,
|
|
6087
|
+
alignOffset,
|
|
6088
|
+
anchor,
|
|
6089
|
+
className: "tailwindcss-preflight tw-isolate tw-z-[1055]",
|
|
6090
|
+
children: /* @__PURE__ */ jsx(
|
|
6091
|
+
Combobox$1.Popup,
|
|
6092
|
+
{
|
|
6093
|
+
ref,
|
|
6094
|
+
"data-chips": !!anchor,
|
|
6095
|
+
"data-variant": effectiveVariant,
|
|
6096
|
+
className: cn(
|
|
6097
|
+
"!tw-pointer-events-auto",
|
|
6098
|
+
"tw-group/combobox-content",
|
|
6099
|
+
"tw-relative",
|
|
6100
|
+
"tw-flex tw-flex-col tw-overflow-hidden",
|
|
6101
|
+
// sizing
|
|
6102
|
+
"tw-max-h-[var(--available-height)]",
|
|
6103
|
+
"tw-w-[var(--anchor-width)]",
|
|
6104
|
+
"tw-max-w-[var(--available-width)]",
|
|
6105
|
+
"tw-origin-[var(--transform-origin)]",
|
|
6106
|
+
"data-[chips=true]:tw-min-w-[var(--anchor-width)]",
|
|
6107
|
+
// appearance
|
|
6108
|
+
"tw-rounded-lg",
|
|
6109
|
+
"data-[variant=default]:tw-rounded",
|
|
6110
|
+
"tw-bg-popover",
|
|
6111
|
+
"tw-text-popover-foreground",
|
|
6112
|
+
"tw-shadow-md",
|
|
6113
|
+
"tw-ring-1",
|
|
6114
|
+
"tw-ring-foreground/10",
|
|
6115
|
+
"tw-duration-100",
|
|
6116
|
+
// open animation
|
|
6117
|
+
"data-open:animate-in",
|
|
6118
|
+
"data-open:fade-in-0",
|
|
6119
|
+
"data-open:zoom-in-95",
|
|
6120
|
+
// closed animation
|
|
6121
|
+
"data-closed:animate-out",
|
|
6122
|
+
"data-closed:fade-out-0",
|
|
6123
|
+
"data-closed:zoom-out-95",
|
|
6124
|
+
// position animations
|
|
6125
|
+
"data-[side=bottom]:tw-slide-in-from-top-2",
|
|
6126
|
+
"data-[side=top]:tw-slide-in-from-bottom-2",
|
|
6127
|
+
"data-[side=left]:tw-slide-in-from-right-2",
|
|
6128
|
+
"data-[side=right]:tw-slide-in-from-left-2",
|
|
6129
|
+
"data-[side=inline-start]:tw-slide-in-from-right-2",
|
|
6130
|
+
"data-[side=inline-end]:tw-slide-in-from-left-2",
|
|
6131
|
+
className
|
|
6132
|
+
),
|
|
6133
|
+
...popupProps,
|
|
6134
|
+
children
|
|
6135
|
+
}
|
|
6136
|
+
)
|
|
6137
|
+
}
|
|
6138
|
+
) });
|
|
6139
|
+
};
|
|
5933
6140
|
var ComboboxEmpty = ({
|
|
5934
6141
|
ref,
|
|
5935
6142
|
className,
|
|
@@ -6128,7 +6335,7 @@ var ComboboxSeparator = ({
|
|
|
6128
6335
|
Combobox$1.Separator,
|
|
6129
6336
|
{
|
|
6130
6337
|
ref,
|
|
6131
|
-
className: cn("tw-mx-2 tw-my-1 tw-h-px tw-bg-
|
|
6338
|
+
className: cn("tw-mx-2 tw-my-1 tw-h-px tw-bg-border", className),
|
|
6132
6339
|
...props
|
|
6133
6340
|
}
|
|
6134
6341
|
);
|
|
@@ -6162,7 +6369,7 @@ var ComboboxGroupLabel = ({
|
|
|
6162
6369
|
"tw-text-xs",
|
|
6163
6370
|
"tw-font-medium",
|
|
6164
6371
|
"tw-leading-none",
|
|
6165
|
-
"tw-text-
|
|
6372
|
+
"tw-text-muted-foreground",
|
|
6166
6373
|
"group-data-[variant=default]/combobox-content:tw-uppercase",
|
|
6167
6374
|
"group-data-[variant=default]/combobox-content:tw-font-semibold",
|
|
6168
6375
|
"group-data-[variant=default]/combobox-content:tw-tracking-wider",
|
|
@@ -6406,10 +6613,12 @@ var MultiCombobox = ({
|
|
|
6406
6613
|
itemToChipColor,
|
|
6407
6614
|
maxVisible = 3
|
|
6408
6615
|
}) => {
|
|
6616
|
+
const isLegacy = useIsLegacyBrand();
|
|
6409
6617
|
const itemsProp = _itemsProp ?? [];
|
|
6410
6618
|
const valueProp = _valueProp ?? [];
|
|
6411
|
-
const
|
|
6412
|
-
const
|
|
6619
|
+
const renderArgo = !isLegacy || variant === "argo";
|
|
6620
|
+
const contentVariant = renderArgo ? "argo" : "default";
|
|
6621
|
+
const chipVariant = renderArgo ? "pill" : "default";
|
|
6413
6622
|
const allFlatItems = itemsProp.flatMap((item) => isGroupItem(item) ? item.items : item);
|
|
6414
6623
|
const isAllSelected = allFlatItems.length === (valueProp?.length ?? 0);
|
|
6415
6624
|
const defaultFilter3 = Combobox$1.useFilter({
|
|
@@ -6524,7 +6733,7 @@ var Textarea = ({
|
|
|
6524
6733
|
containerClassName,
|
|
6525
6734
|
// group props
|
|
6526
6735
|
state = "default",
|
|
6527
|
-
variant
|
|
6736
|
+
variant,
|
|
6528
6737
|
sizing,
|
|
6529
6738
|
focusVariant,
|
|
6530
6739
|
...rest
|
|
@@ -7037,7 +7246,8 @@ var slotVariants = cva(
|
|
|
7037
7246
|
"tw-justify-center",
|
|
7038
7247
|
"tw-border",
|
|
7039
7248
|
"tw-border-input",
|
|
7040
|
-
|
|
7249
|
+
// muted filled input surface — gray, distinct from white containers; not the app-background token
|
|
7250
|
+
"tw-bg-muted",
|
|
7041
7251
|
"tw-text-foreground",
|
|
7042
7252
|
"tw-font-medium",
|
|
7043
7253
|
"tw-tabular-nums",
|
|
@@ -7732,8 +7942,8 @@ var helpVariants = cva(["tw-m-0", "tw-text-xs"], {
|
|
|
7732
7942
|
},
|
|
7733
7943
|
variants: {
|
|
7734
7944
|
state: {
|
|
7735
|
-
default: ["tw-text-
|
|
7736
|
-
error: ["tw-text-
|
|
7945
|
+
default: ["tw-text-muted-foreground"],
|
|
7946
|
+
error: ["tw-text-destructive"],
|
|
7737
7947
|
warning: ["tw-text-warning-500"]
|
|
7738
7948
|
}
|
|
7739
7949
|
}
|
|
@@ -7850,6 +8060,8 @@ var AnswerSummary = ({
|
|
|
7850
8060
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
7851
8061
|
const toggle = () => setIsExpanded((prev) => !prev);
|
|
7852
8062
|
const count = items.length;
|
|
8063
|
+
const [firstItem] = items;
|
|
8064
|
+
const label = count === 1 && firstItem ? firstItem.question : `${count} questions`;
|
|
7853
8065
|
return /* @__PURE__ */ jsxs("section", { className: "tw-mt-4 tw-flex tw-flex-col tw-gap-4", "aria-label": SECTION_LABELS[variant], children: [
|
|
7854
8066
|
/* @__PURE__ */ jsx(
|
|
7855
8067
|
CollapsibleStepHeader,
|
|
@@ -7857,7 +8069,7 @@ var AnswerSummary = ({
|
|
|
7857
8069
|
isExpanded,
|
|
7858
8070
|
onToggle: toggle,
|
|
7859
8071
|
variant,
|
|
7860
|
-
label
|
|
8072
|
+
label
|
|
7861
8073
|
}
|
|
7862
8074
|
),
|
|
7863
8075
|
isExpanded && /* @__PURE__ */ jsx("div", { className: "tw-flex tw-flex-col tw-gap-4 tw-pl-5", children: items.map(({ question, answer }, index) => /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-flex-col tw-gap-1", children: [
|
|
@@ -8361,6 +8573,7 @@ var PromptInputSubmit = ({
|
|
|
8361
8573
|
getTooltipText() && /* @__PURE__ */ jsx(Tooltip.Content, { placement: "top", variant: "action", children: getTooltipText() })
|
|
8362
8574
|
] });
|
|
8363
8575
|
};
|
|
8576
|
+
var CMDK_HIJACKED_KEYS = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "Home", "End", "Enter"]);
|
|
8364
8577
|
var promptInputVariants = cva(
|
|
8365
8578
|
[
|
|
8366
8579
|
"tailwindcss-preflight",
|
|
@@ -8432,15 +8645,11 @@ var PromptInput = ({
|
|
|
8432
8645
|
const textareaId = useId();
|
|
8433
8646
|
const textareaRef = useRef(null);
|
|
8434
8647
|
const [dismissedValue, setDismissedValue] = useState(null);
|
|
8648
|
+
if (dismissedValue !== null && value !== dismissedValue) setDismissedValue(null);
|
|
8435
8649
|
const hasCommands = !!commands && commands.length > 0;
|
|
8436
8650
|
const valueLooksLikeSlashCommand = value.startsWith("/") && !/\s/.test(value);
|
|
8437
8651
|
const commandsOpen = hasCommands && valueLooksLikeSlashCommand && value !== dismissedValue;
|
|
8438
8652
|
const slashFilter = commandsOpen ? value.slice(1) : "";
|
|
8439
|
-
useEffect(() => {
|
|
8440
|
-
if (dismissedValue !== null && value !== dismissedValue) {
|
|
8441
|
-
setDismissedValue(null);
|
|
8442
|
-
}
|
|
8443
|
-
}, [value, dismissedValue]);
|
|
8444
8653
|
const handleSubmit = () => {
|
|
8445
8654
|
if (isDisabled) return;
|
|
8446
8655
|
if (status === "streaming") onAbort?.();
|
|
@@ -8468,6 +8677,8 @@ var PromptInput = ({
|
|
|
8468
8677
|
if (event.key === "ArrowUp" || event.key === "ArrowDown" || event.key === "Enter") {
|
|
8469
8678
|
return;
|
|
8470
8679
|
}
|
|
8680
|
+
} else if (hasCommands && CMDK_HIJACKED_KEYS.has(event.key)) {
|
|
8681
|
+
event.stopPropagation();
|
|
8471
8682
|
}
|
|
8472
8683
|
if (event.key === "Enter" && !event.shiftKey && !event.ctrlKey && !event.metaKey) {
|
|
8473
8684
|
event.preventDefault();
|
|
@@ -9075,44 +9286,48 @@ var AlertRoot = ({
|
|
|
9075
9286
|
variant,
|
|
9076
9287
|
argo = false,
|
|
9077
9288
|
...rest
|
|
9078
|
-
}) =>
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
"
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
)
|
|
9289
|
+
}) => {
|
|
9290
|
+
const isLegacy = useIsLegacyBrand();
|
|
9291
|
+
const renderArgo = !isLegacy || argo;
|
|
9292
|
+
return /* @__PURE__ */ jsx(
|
|
9293
|
+
"div",
|
|
9294
|
+
{
|
|
9295
|
+
...rest,
|
|
9296
|
+
ref,
|
|
9297
|
+
"data-variant": variant,
|
|
9298
|
+
"data-argo": renderArgo,
|
|
9299
|
+
className: cn(
|
|
9300
|
+
"tw-group/alert",
|
|
9301
|
+
// layout
|
|
9302
|
+
"tw-grid",
|
|
9303
|
+
"tw-grid-cols-[0_1fr_auto]",
|
|
9304
|
+
"has-[[data-slot=alert-icon]]:tw-grid-cols-[auto_1fr_auto]",
|
|
9305
|
+
"has-[[data-slot=alert-icon]]:tw-gap-x-2",
|
|
9306
|
+
// fonts
|
|
9307
|
+
"tw-text-sm",
|
|
9308
|
+
"tw-text-neutral-800",
|
|
9309
|
+
"tw-text-left",
|
|
9310
|
+
"tw-p-4",
|
|
9311
|
+
// border
|
|
9312
|
+
"tw-rounded",
|
|
9313
|
+
"data-[argo=true]:tw-rounded-lg",
|
|
9314
|
+
"tw-border",
|
|
9315
|
+
"tw-border-solid",
|
|
9316
|
+
// border variants
|
|
9317
|
+
"data-[variant=info]:tw-bg-secondary-100",
|
|
9318
|
+
"data-[variant=info]:tw-border-secondary-200",
|
|
9319
|
+
"data-[variant=warning]:tw-bg-warning-100",
|
|
9320
|
+
"data-[variant=warning]:tw-border-warning-300",
|
|
9321
|
+
"data-[variant=error]:tw-bg-error-100",
|
|
9322
|
+
"data-[variant=error]:tw-border-error-200",
|
|
9323
|
+
"data-[variant=success]:tw-bg-primary-100",
|
|
9324
|
+
"data-[variant=success]:tw-border-primary-200",
|
|
9325
|
+
className
|
|
9326
|
+
),
|
|
9327
|
+
children
|
|
9328
|
+
}
|
|
9329
|
+
);
|
|
9330
|
+
};
|
|
9116
9331
|
var AlertTitle = ({
|
|
9117
9332
|
ref,
|
|
9118
9333
|
className,
|
|
@@ -9264,6 +9479,7 @@ var ToastDismiss = ({
|
|
|
9264
9479
|
"[&_svg]:tw-m-1",
|
|
9265
9480
|
"tw-text-white",
|
|
9266
9481
|
"group-data-[variant=default]/toast:[&_svg]:tw-text-popover-foreground",
|
|
9482
|
+
"group-data-[variant=default]/toast:group-data-[argo=true]/toast:[&_svg]:tw-text-foreground",
|
|
9267
9483
|
className
|
|
9268
9484
|
),
|
|
9269
9485
|
type: "button",
|
|
@@ -9288,6 +9504,7 @@ var ToastDuration = ({
|
|
|
9288
9504
|
className: cn(
|
|
9289
9505
|
"tw-bg-white/30",
|
|
9290
9506
|
"group-data-[variant=default]/toast:tw-bg-popover-foreground/20",
|
|
9507
|
+
"group-data-[variant=default]/toast:group-data-[argo=true]/toast:tw-bg-foreground/20",
|
|
9291
9508
|
"tw-rounded-bl-lg",
|
|
9292
9509
|
"tw-mx-px",
|
|
9293
9510
|
// positioning
|
|
@@ -9325,6 +9542,7 @@ var ToastTitle = ({
|
|
|
9325
9542
|
"tw-self-center",
|
|
9326
9543
|
"tw-text-white",
|
|
9327
9544
|
"group-data-[variant=default]/toast:tw-text-popover-foreground",
|
|
9545
|
+
"group-data-[variant=default]/toast:group-data-[argo=true]/toast:tw-text-foreground",
|
|
9328
9546
|
"tw-break-words",
|
|
9329
9547
|
"tw-font-medium",
|
|
9330
9548
|
className
|
|
@@ -9384,11 +9602,14 @@ var ToastRoot = ({
|
|
|
9384
9602
|
duration = Infinity,
|
|
9385
9603
|
variant = "info",
|
|
9386
9604
|
loading = false,
|
|
9387
|
-
icon: iconProp
|
|
9605
|
+
icon: iconProp,
|
|
9606
|
+
argo
|
|
9388
9607
|
}) => {
|
|
9608
|
+
const isLegacy = useIsLegacyBrand();
|
|
9609
|
+
const renderArgo = !isLegacy || argo;
|
|
9389
9610
|
const icon = (() => {
|
|
9390
9611
|
if (loading) return /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-animate-spin" });
|
|
9391
|
-
if (iconProp) return
|
|
9612
|
+
if (iconProp) return iconProp;
|
|
9392
9613
|
if (variant === "default" || variant === null) return null;
|
|
9393
9614
|
return DEFAULT_VARIANT_ICON[variant];
|
|
9394
9615
|
})();
|
|
@@ -9396,35 +9617,44 @@ var ToastRoot = ({
|
|
|
9396
9617
|
toast$1.dismiss(id);
|
|
9397
9618
|
action?.onClick(event);
|
|
9398
9619
|
};
|
|
9399
|
-
return /* @__PURE__ */ jsxs(
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9620
|
+
return /* @__PURE__ */ jsxs(
|
|
9621
|
+
"div",
|
|
9622
|
+
{
|
|
9623
|
+
"data-variant": variant,
|
|
9624
|
+
"data-argo": renderArgo,
|
|
9625
|
+
className: cn(
|
|
9626
|
+
variants6({ variant }),
|
|
9627
|
+
"data-[variant=default]:data-[argo=true]:tw-bg-background"
|
|
9628
|
+
),
|
|
9629
|
+
children: [
|
|
9630
|
+
icon && /* @__PURE__ */ jsx(
|
|
9631
|
+
"span",
|
|
9632
|
+
{
|
|
9633
|
+
"data-slot": "toast-icon",
|
|
9634
|
+
className: cn(
|
|
9635
|
+
"tw-inline-flex",
|
|
9636
|
+
"tw-items-center",
|
|
9637
|
+
"tw-justify-center",
|
|
9638
|
+
"tw-self-center",
|
|
9639
|
+
"tw-aspect-square",
|
|
9640
|
+
"tw-size-5",
|
|
9641
|
+
"tw-shrink-0",
|
|
9642
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-5',
|
|
9643
|
+
"tw-text-white",
|
|
9644
|
+
"group-data-[variant=default]/toast:tw-text-popover-foreground",
|
|
9645
|
+
"group-data-[variant=default]/toast:group-data-[argo=true]/toast:tw-text-foreground"
|
|
9646
|
+
),
|
|
9647
|
+
children: icon
|
|
9648
|
+
}
|
|
9418
9649
|
),
|
|
9419
|
-
children:
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
] });
|
|
9650
|
+
/* @__PURE__ */ jsx(ToastTitle, { children: title }),
|
|
9651
|
+
description && /* @__PURE__ */ jsx(ToastDescription, { children: description }),
|
|
9652
|
+
action && /* @__PURE__ */ jsx(ToastAction, { style: action?.actionButtonStyle, onClick: handleActionClick, children: action.label }),
|
|
9653
|
+
/* @__PURE__ */ jsx(ToastDismiss, { onClick: () => toast$1.dismiss(id) }),
|
|
9654
|
+
duration !== Infinity && /* @__PURE__ */ jsx(ToastDuration, { duration })
|
|
9655
|
+
]
|
|
9656
|
+
}
|
|
9657
|
+
);
|
|
9428
9658
|
};
|
|
9429
9659
|
var toast = ({
|
|
9430
9660
|
onAutoClose,
|
|
@@ -9521,20 +9751,20 @@ var Toaster = ({ gap = 12, visibleToasts = 5, ...props }) => (
|
|
|
9521
9751
|
) })
|
|
9522
9752
|
);
|
|
9523
9753
|
var EmptySearchContent = ({ children = "No results found." }) => {
|
|
9524
|
-
return /* @__PURE__ */ jsx("div", { className: "tw-px-0 tw-py-[30px] tw-text-center tw-text-sm tw-text-
|
|
9754
|
+
return /* @__PURE__ */ jsx("div", { className: "tw-px-0 tw-py-[30px] tw-text-center tw-text-sm tw-text-muted-foreground", children });
|
|
9525
9755
|
};
|
|
9526
9756
|
var CardContent = ({ children, ...rest }) => /* @__PURE__ */ jsx("div", { ...rest, children });
|
|
9527
9757
|
var CardHeader = ({ children, ...rest }) => /* @__PURE__ */ jsx("div", { ...rest, children });
|
|
9528
9758
|
var cardClassnames = cva(
|
|
9529
|
-
["tw-
|
|
9759
|
+
["tw-flex", "tw-flex-col", "tw-rounded-lg", "tw-gap-4", "tw-bg-surface"],
|
|
9530
9760
|
{
|
|
9531
9761
|
defaultVariants: {
|
|
9532
9762
|
padding: "small"
|
|
9533
9763
|
},
|
|
9534
9764
|
variants: {
|
|
9535
9765
|
bordered: {
|
|
9536
|
-
true: "tw-border tw-border-solid tw-border-neutral-200",
|
|
9537
|
-
false: "tw-shadow-[0_2px_6px_0_rgba(100,135,153,0.13)]"
|
|
9766
|
+
true: "tw-border tw-border-solid tw-border-neutral-200 data-[argo=true]:tw-border-border",
|
|
9767
|
+
false: "tw-shadow-[0_2px_6px_0_rgba(100,135,153,0.13)] data-[argo=true]:tw-shadow-sm"
|
|
9538
9768
|
},
|
|
9539
9769
|
padding: {
|
|
9540
9770
|
none: "tw-p-0",
|
|
@@ -9550,7 +9780,7 @@ var cardTitleClassnames = cn(
|
|
|
9550
9780
|
"tw-leading-6",
|
|
9551
9781
|
"tw-font-medium",
|
|
9552
9782
|
"tw-text-base",
|
|
9553
|
-
"tw-
|
|
9783
|
+
"tw-text-foreground"
|
|
9554
9784
|
);
|
|
9555
9785
|
var CardTitle = ({ children, className, ...rest }) => /* @__PURE__ */ jsx("h3", { className: cn(cardTitleClassnames, className), ...rest, children });
|
|
9556
9786
|
var Card = ({
|
|
@@ -9558,8 +9788,21 @@ var Card = ({
|
|
|
9558
9788
|
className,
|
|
9559
9789
|
bordered = false,
|
|
9560
9790
|
padding = "small",
|
|
9791
|
+
argo = false,
|
|
9561
9792
|
...rest
|
|
9562
|
-
}) =>
|
|
9793
|
+
}) => {
|
|
9794
|
+
const isLegacy = useIsLegacyBrand();
|
|
9795
|
+
const renderArgo = !isLegacy || argo;
|
|
9796
|
+
return /* @__PURE__ */ jsx(
|
|
9797
|
+
"div",
|
|
9798
|
+
{
|
|
9799
|
+
...rest,
|
|
9800
|
+
"data-argo": renderArgo,
|
|
9801
|
+
className: cardClassnames({ className, bordered, padding }),
|
|
9802
|
+
children
|
|
9803
|
+
}
|
|
9804
|
+
);
|
|
9805
|
+
};
|
|
9563
9806
|
Card.Header = CardHeader;
|
|
9564
9807
|
Card.Content = CardContent;
|
|
9565
9808
|
Card.Title = CardTitle;
|
|
@@ -9746,7 +9989,7 @@ var ANIMATION_CLASS_NAME = cn(
|
|
|
9746
9989
|
"tw-relative",
|
|
9747
9990
|
"tw-overflow-hidden",
|
|
9748
9991
|
"tw-pointer-events-none",
|
|
9749
|
-
"tw-bg-
|
|
9992
|
+
"tw-bg-muted",
|
|
9750
9993
|
// before
|
|
9751
9994
|
'before:tw-content-[""]',
|
|
9752
9995
|
"before:tw-opacity-100",
|
|
@@ -9814,7 +10057,7 @@ var SkeletonList = ({
|
|
|
9814
10057
|
}
|
|
9815
10058
|
)
|
|
9816
10059
|
] });
|
|
9817
|
-
var DOT_CLASS_NAME = cn("tw-h-1.5", "tw-w-1.5", "tw-rounded-full", "tw-bg-
|
|
10060
|
+
var DOT_CLASS_NAME = cn("tw-h-1.5", "tw-w-1.5", "tw-rounded-full", "tw-bg-muted-foreground");
|
|
9818
10061
|
var DotsLoader = ({ className }) => {
|
|
9819
10062
|
return /* @__PURE__ */ jsxs(
|
|
9820
10063
|
"div",
|
|
@@ -9878,11 +10121,13 @@ var Collapse = ({
|
|
|
9878
10121
|
);
|
|
9879
10122
|
};
|
|
9880
10123
|
var headerVariants = cva(
|
|
9881
|
-
"tw-flex tw-flex-1 tw-items-center tw-gap-2 tw-rounded tw-px-4 tw-py-2.5 tw-text-sm tw-text-
|
|
10124
|
+
"tw-flex tw-flex-1 tw-items-center tw-gap-2 tw-rounded tw-px-4 tw-py-2.5 tw-text-sm tw-text-muted-foreground",
|
|
9882
10125
|
{
|
|
9883
10126
|
variants: {
|
|
9884
10127
|
variant: {
|
|
9885
|
-
default: "tw-bg-
|
|
10128
|
+
default: "tw-bg-muted",
|
|
10129
|
+
// White surface kept literal until a `card` token exists (UT-4396);
|
|
10130
|
+
// `background` is the page base, not an elevated panel surface.
|
|
9886
10131
|
white: "tw-bg-white"
|
|
9887
10132
|
},
|
|
9888
10133
|
isDisabled: {
|
|
@@ -9898,7 +10143,7 @@ var headerVariants = cva(
|
|
|
9898
10143
|
{
|
|
9899
10144
|
isDisabled: false,
|
|
9900
10145
|
hasEnforcedState: false,
|
|
9901
|
-
class: "tw-cursor-pointer hover:tw-text-
|
|
10146
|
+
class: "tw-cursor-pointer hover:tw-text-primary"
|
|
9902
10147
|
}
|
|
9903
10148
|
],
|
|
9904
10149
|
defaultVariants: {
|
|
@@ -9948,7 +10193,7 @@ var CollapsiblePanel = ({
|
|
|
9948
10193
|
{
|
|
9949
10194
|
open,
|
|
9950
10195
|
className: cn(
|
|
9951
|
-
"tw-rounded !tw-border !tw-border-solid !tw-border-
|
|
10196
|
+
"tw-rounded !tw-border !tw-border-solid !tw-border-border tw-bg-white",
|
|
9952
10197
|
className
|
|
9953
10198
|
),
|
|
9954
10199
|
header: /* @__PURE__ */ jsxs(
|
|
@@ -9962,7 +10207,7 @@ var CollapsiblePanel = ({
|
|
|
9962
10207
|
onKeyUp: handleKeyUp
|
|
9963
10208
|
},
|
|
9964
10209
|
children: [
|
|
9965
|
-
/* @__PURE__ */ jsx("div", { className: "tw-flex tw-flex-1 tw-items-center tw-gap-2 tw-py-px tw-text-sm tw-font-medium tw-text-
|
|
10210
|
+
/* @__PURE__ */ jsx("div", { className: "tw-flex tw-flex-1 tw-items-center tw-gap-2 tw-py-px tw-text-sm tw-font-medium tw-text-foreground", children: header }),
|
|
9966
10211
|
!isDisabled && /* @__PURE__ */ jsx("div", { className: "tw-ml-auto tw-shrink-0", children: /* @__PURE__ */ jsx(icons_exports.ChevronDown, { className: cn("tw-size-5 group-data-[state=open]:tw-rotate-180") }) })
|
|
9967
10212
|
]
|
|
9968
10213
|
}
|
|
@@ -9996,8 +10241,8 @@ var PanelWithDetails = ({
|
|
|
9996
10241
|
role: "button",
|
|
9997
10242
|
tabIndex: 0,
|
|
9998
10243
|
className: cn(
|
|
9999
|
-
"tw-flex tw-cursor-pointer tw-items-center tw-rounded-sm tw-bg-
|
|
10000
|
-
"hover:tw-text-
|
|
10244
|
+
"tw-flex tw-cursor-pointer tw-items-center tw-rounded-sm tw-bg-muted tw-px-4 tw-py-3 tw-text-sm tw-text-muted-foreground",
|
|
10245
|
+
"hover:tw-text-primary"
|
|
10001
10246
|
),
|
|
10002
10247
|
onClick: () => setIsOpen(!isOpen),
|
|
10003
10248
|
onKeyUp: handleKeyUp,
|
|
@@ -10032,35 +10277,18 @@ var AIGradientsSvg = () => /* @__PURE__ */ jsx("svg", { width: "0", height: "0",
|
|
|
10032
10277
|
] }) });
|
|
10033
10278
|
|
|
10034
10279
|
// src/components/ThemeProvider/brandToCssVars.ts
|
|
10035
|
-
var hexToRgbTriplet = (hex) => {
|
|
10036
|
-
const match = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(hex.trim());
|
|
10037
|
-
if (!match) return null;
|
|
10038
|
-
let body = match[1];
|
|
10039
|
-
if (body.length === 3) {
|
|
10040
|
-
body = body.split("").map((c) => c + c).join("");
|
|
10041
|
-
}
|
|
10042
|
-
const r2 = parseInt(body.slice(0, 2), 16);
|
|
10043
|
-
const g = parseInt(body.slice(2, 4), 16);
|
|
10044
|
-
const b = parseInt(body.slice(4, 6), 16);
|
|
10045
|
-
return `${r2} ${g} ${b}`;
|
|
10046
|
-
};
|
|
10047
10280
|
var brandToCssVars = (brand) => {
|
|
10048
|
-
const vars = {
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
];
|
|
10060
|
-
for (const [name, hex] of colorMap) {
|
|
10061
|
-
const triplet = hexToRgbTriplet(hex);
|
|
10062
|
-
if (triplet !== null) vars[name] = triplet;
|
|
10063
|
-
}
|
|
10281
|
+
const vars = {
|
|
10282
|
+
"--color-background": brand.colors.background,
|
|
10283
|
+
"--color-foreground": brand.colors.foreground,
|
|
10284
|
+
"--color-muted": brand.colors.muted,
|
|
10285
|
+
"--color-muted-foreground": brand.colors.mutedForeground,
|
|
10286
|
+
"--color-border": brand.colors.border,
|
|
10287
|
+
"--color-primary": brand.colors.primary,
|
|
10288
|
+
"--color-primary-foreground": brand.colors.primaryForeground,
|
|
10289
|
+
"--color-destructive": brand.colors.destructive,
|
|
10290
|
+
"--color-destructive-foreground": brand.colors.destructiveForeground
|
|
10291
|
+
};
|
|
10064
10292
|
if (brand.radii) {
|
|
10065
10293
|
vars["--radius-sm"] = brand.radii.sm;
|
|
10066
10294
|
vars["--radius-md"] = brand.radii.md;
|
|
@@ -10068,7 +10296,6 @@ var brandToCssVars = (brand) => {
|
|
|
10068
10296
|
}
|
|
10069
10297
|
return vars;
|
|
10070
10298
|
};
|
|
10071
|
-
var ThemeContext = createContext(null);
|
|
10072
10299
|
var ThemeProvider = ({ brand = keboola, setBrand, children }) => {
|
|
10073
10300
|
useEffect(() => {
|
|
10074
10301
|
if (typeof document === "undefined") return;
|
|
@@ -10296,7 +10523,7 @@ var Root25 = ({
|
|
|
10296
10523
|
{
|
|
10297
10524
|
ref,
|
|
10298
10525
|
className: cn(
|
|
10299
|
-
"tw-flex tw-flex-col tw-gap-4 tw-w-full tw-mx-auto
|
|
10526
|
+
"tw-flex tw-flex-col tw-gap-4 tw-w-full tw-mx-auto",
|
|
10300
10527
|
maxWidthClass[maxWidth],
|
|
10301
10528
|
className
|
|
10302
10529
|
),
|
|
@@ -10588,14 +10815,14 @@ var PageToolbar = Object.assign(Root26, {
|
|
|
10588
10815
|
});
|
|
10589
10816
|
var resizableHandleVariants = cva([
|
|
10590
10817
|
// base styles
|
|
10591
|
-
"tw-bg-
|
|
10818
|
+
"tw-bg-border",
|
|
10592
10819
|
"tw-relative",
|
|
10593
10820
|
"tw-flex",
|
|
10594
10821
|
"tw-w-px",
|
|
10595
10822
|
"tw-items-center",
|
|
10596
10823
|
"tw-justify-center",
|
|
10597
10824
|
// focus styles
|
|
10598
|
-
"focus-visible:tw-ring-
|
|
10825
|
+
"focus-visible:tw-ring-primary",
|
|
10599
10826
|
"focus-visible:tw-ring-1",
|
|
10600
10827
|
"focus-visible:tw-ring-offset-1",
|
|
10601
10828
|
"focus-visible:tw-outline-hidden",
|
|
@@ -10764,8 +10991,8 @@ var SidebarContent = ({
|
|
|
10764
10991
|
"group-last/sidebar-content:after:tw-hidden",
|
|
10765
10992
|
"!tw-box-border",
|
|
10766
10993
|
{
|
|
10767
|
-
'before:tw-absolute before:tw-top-0 before:tw-left-0 before:tw-right-0 before:tw-h-px before:tw-bg-
|
|
10768
|
-
'after:tw-absolute after:tw-bottom-0 after:tw-left-0 after:tw-right-0 after:tw-h-px after:tw-bg-
|
|
10994
|
+
'before:tw-absolute before:tw-top-0 before:tw-left-0 before:tw-right-0 before:tw-h-px before:tw-bg-sidebar-border before:tw-z-10 before:tw-content-[""]': isBottom || isMiddle,
|
|
10995
|
+
'after:tw-absolute after:tw-bottom-0 after:tw-left-0 after:tw-right-0 after:tw-h-px after:tw-bg-sidebar-border after:tw-z-10 after:tw-content-[""]': isTop || isMiddle
|
|
10769
10996
|
}
|
|
10770
10997
|
),
|
|
10771
10998
|
children: /* @__PURE__ */ jsx(
|
|
@@ -10951,12 +11178,8 @@ var SidebarProvider = ({
|
|
|
10951
11178
|
const [isRightDragging, setIsRightDragging] = useState(false);
|
|
10952
11179
|
const [leftDragWidth, setLeftDragWidth] = useState(null);
|
|
10953
11180
|
const [rightDragWidth, setRightDragWidth] = useState(null);
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
}, [leftWidth, leftDragWidth]);
|
|
10957
|
-
useEffect(() => {
|
|
10958
|
-
if (rightDragWidth !== null && rightWidth === rightDragWidth) setRightDragWidth(null);
|
|
10959
|
-
}, [rightWidth, rightDragWidth]);
|
|
11181
|
+
if (leftDragWidth !== null && leftWidth === leftDragWidth) setLeftDragWidth(null);
|
|
11182
|
+
if (rightDragWidth !== null && rightWidth === rightDragWidth) setRightDragWidth(null);
|
|
10960
11183
|
const leftState = useSidebarState({
|
|
10961
11184
|
defaultMode: defaultLeftMode,
|
|
10962
11185
|
mode: leftMode,
|
|
@@ -11187,7 +11410,7 @@ var SidebarGroupLabel = ({
|
|
|
11187
11410
|
"group-data-[state=collapsed]/sidebar:tw-opacity-0",
|
|
11188
11411
|
"tw-items-center",
|
|
11189
11412
|
"tw-flex-1",
|
|
11190
|
-
"tw-text-
|
|
11413
|
+
"tw-text-muted-foreground",
|
|
11191
11414
|
"tw-whitespace-nowrap",
|
|
11192
11415
|
// transition
|
|
11193
11416
|
"tw-transition-opacity",
|
|
@@ -11337,7 +11560,7 @@ var SidebarMenuButton = ({
|
|
|
11337
11560
|
),
|
|
11338
11561
|
tabIndex: 0,
|
|
11339
11562
|
children: [
|
|
11340
|
-
icon && /* @__PURE__ */ jsx(SidebarMenuIcon, { children:
|
|
11563
|
+
icon && /* @__PURE__ */ jsx(SidebarMenuIcon, { children: icon }),
|
|
11341
11564
|
/* @__PURE__ */ jsx(Slottable, { children })
|
|
11342
11565
|
]
|
|
11343
11566
|
}
|
|
@@ -11536,7 +11759,7 @@ var SidebarMenuCard = ({ children, className, icon, title, ...rest }) => {
|
|
|
11536
11759
|
),
|
|
11537
11760
|
children: /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-flex-col tw-gap-2", children: [
|
|
11538
11761
|
/* @__PURE__ */ jsxs(Title3, { children: [
|
|
11539
|
-
/* @__PURE__ */ jsx(SidebarMenuIcon, { className: "tw-p-px", children:
|
|
11762
|
+
/* @__PURE__ */ jsx(SidebarMenuIcon, { className: "tw-p-px", children: icon }),
|
|
11540
11763
|
title
|
|
11541
11764
|
] }),
|
|
11542
11765
|
/* @__PURE__ */ jsx(Content10, { className, children })
|
|
@@ -12301,7 +12524,7 @@ var NavbarMenuButton = ({
|
|
|
12301
12524
|
const Comp = asChild ? Root$1 : "button";
|
|
12302
12525
|
const isSearchVariant = variant === "search";
|
|
12303
12526
|
const isEmphasizedVariant = variant === "emphasized";
|
|
12304
|
-
const adornment = isSearchVariant ? /* @__PURE__ */ jsx(icons_exports.Search, {}) :
|
|
12527
|
+
const adornment = isSearchVariant ? /* @__PURE__ */ jsx(icons_exports.Search, {}) : icon;
|
|
12305
12528
|
const adornmentVariant = (() => {
|
|
12306
12529
|
if (isSearchVariant || variant === "icon") return "icon-button";
|
|
12307
12530
|
if (isEmphasizedVariant) return "icon-accent-emphasized";
|
|
@@ -12506,15 +12729,22 @@ Breadcrumb.Link = BreadcrumbLink;
|
|
|
12506
12729
|
Breadcrumb.Page = BreadcrumbPage;
|
|
12507
12730
|
Breadcrumb.Separator = BreadcrumbSeparator;
|
|
12508
12731
|
Breadcrumb.Ellipsis = BreadcrumbEllipsis;
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
}
|
|
12732
|
+
|
|
12733
|
+
// src/components/Tabs/styles.ts
|
|
12734
|
+
var tabsListWrapperClass = "tw-shrink-0 tw-border-0 tw-border-b tw-border-solid tw-border-border";
|
|
12735
|
+
var tabsListClass = "tw-flex tw-gap-8 tw-shrink-0 tw-w-max";
|
|
12736
|
+
var tabsTriggerGroupClass = "tw-group/tab-trigger-group tw-flex tw-shrink-0 tw-items-center";
|
|
12737
|
+
var tabsTriggerClass = "tw-flex tw-justify-center tw-items-center tw-gap-1.5 tw-bg-transparent tw-shrink-0 tw-border-0 tw-border-b-[3px] tw-border-solid tw-border-transparent tw-pt-2.5 tw-pb-5 tw-px-0 tw-m-0 tw-font-medium tw-leading-5 tw-text-muted-foreground tw-text-base data-[state=active]:tw-text-primary data-[state=active]:tw-border-primary data-[disabled]:tw-text-muted-foreground data-[disabled]:tw-opacity-50 data-[disabled]:tw-cursor-not-allowed group-hover/tab-trigger-group:enabled:tw-text-primary group-hover/tab-trigger-group:enabled:tw-border-primary group-hover/tab-trigger-group:enabled:tw-cursor-pointer";
|
|
12738
|
+
var tabsTriggerCompactClass = "tw-text-sm tw-pb-4";
|
|
12739
|
+
var TabsList = ({ className, children, ...rest }) => /* @__PURE__ */ jsx(ScrollArea, { orientation: "horizontal", className: tabsListWrapperClass, children: /* @__PURE__ */ jsx(RadixTabs.List, { ...rest, "data-slot": "tabs-list", className: cn(tabsListClass, className), children }) });
|
|
12740
|
+
var TabsTrigger = ({ className, compact = false, ...rest }) => /* @__PURE__ */ jsx(
|
|
12741
|
+
RadixTabs.Trigger,
|
|
12742
|
+
{
|
|
12743
|
+
"data-slot": "tabs-trigger",
|
|
12744
|
+
...rest,
|
|
12745
|
+
className: cn(tabsTriggerClass, compact && tabsTriggerCompactClass, className)
|
|
12746
|
+
}
|
|
12747
|
+
);
|
|
12518
12748
|
var Tabs2 = ({
|
|
12519
12749
|
triggers,
|
|
12520
12750
|
compact = false,
|
|
@@ -12524,66 +12754,56 @@ var Tabs2 = ({
|
|
|
12524
12754
|
rootClassName,
|
|
12525
12755
|
listClassName,
|
|
12526
12756
|
triggerClassName,
|
|
12757
|
+
triggerGroupClassName,
|
|
12527
12758
|
...rest
|
|
12528
|
-
}) =>
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
...
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
|
|
12541
|
-
|
|
12542
|
-
|
|
12543
|
-
|
|
12544
|
-
|
|
12545
|
-
|
|
12546
|
-
|
|
12547
|
-
|
|
12548
|
-
|
|
12549
|
-
|
|
12550
|
-
|
|
12551
|
-
RadixTabs.Trigger,
|
|
12552
|
-
{
|
|
12553
|
-
asChild: true,
|
|
12554
|
-
value,
|
|
12555
|
-
className: triggerClasses,
|
|
12556
|
-
...rest2,
|
|
12557
|
-
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
12558
|
-
title,
|
|
12559
|
-
/* @__PURE__ */ jsx(
|
|
12560
|
-
Button,
|
|
12561
|
-
{
|
|
12562
|
-
variant: "inline",
|
|
12563
|
-
size: "icon-3xs",
|
|
12564
|
-
disabled: rest2.disabled,
|
|
12565
|
-
onClick: () => onClose(value),
|
|
12566
|
-
onMouseDown: (e) => e.preventDefault(),
|
|
12567
|
-
className: "!tw-size-8 tw-opacity-0 tw-duration-200 group-hover/tab-trigger:tw-opacity-100",
|
|
12568
|
-
"aria-label": "Close tab",
|
|
12569
|
-
children: /* @__PURE__ */ jsx(icons_exports.X, { className: "tw-size-4" })
|
|
12570
|
-
}
|
|
12571
|
-
)
|
|
12572
|
-
] })
|
|
12573
|
-
},
|
|
12574
|
-
value
|
|
12575
|
-
);
|
|
12759
|
+
}) => /* @__PURE__ */ jsxs(
|
|
12760
|
+
RadixTabs.Root,
|
|
12761
|
+
{
|
|
12762
|
+
...rest,
|
|
12763
|
+
"data-slot": "tabs-root",
|
|
12764
|
+
className: cn("tw-flex tw-flex-col tw-gap-6", rootClassName),
|
|
12765
|
+
defaultValue: defaultValue ?? triggers[0]?.value,
|
|
12766
|
+
onValueChange,
|
|
12767
|
+
children: [
|
|
12768
|
+
/* @__PURE__ */ jsx(TabsList, { className: listClassName, children: triggers.map(({ value, title, onClose, className: callerClassName, ...triggerRest }) => /* @__PURE__ */ jsxs(
|
|
12769
|
+
"div",
|
|
12770
|
+
{
|
|
12771
|
+
className: cn(tabsTriggerGroupClass, triggerGroupClassName),
|
|
12772
|
+
"data-slot": "tabs-trigger-group",
|
|
12773
|
+
children: [
|
|
12774
|
+
/* @__PURE__ */ jsx(
|
|
12775
|
+
TabsTrigger,
|
|
12776
|
+
{
|
|
12777
|
+
value,
|
|
12778
|
+
compact,
|
|
12779
|
+
...triggerRest,
|
|
12780
|
+
className: cn(triggerClassName, callerClassName),
|
|
12781
|
+
children: title
|
|
12576
12782
|
}
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12783
|
+
),
|
|
12784
|
+
onClose && /* @__PURE__ */ jsx(
|
|
12785
|
+
Button,
|
|
12786
|
+
{
|
|
12787
|
+
type: "button",
|
|
12788
|
+
variant: "inline",
|
|
12789
|
+
size: "icon-3xs",
|
|
12790
|
+
disabled: triggerRest.disabled,
|
|
12791
|
+
onClick: () => onClose(value),
|
|
12792
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
12793
|
+
className: "!tw-size-8 tw-opacity-0 tw-duration-200 focus-visible:tw-opacity-100 group-hover/tab-trigger-group:tw-opacity-100 group-focus-within/tab-trigger-group:tw-opacity-100",
|
|
12794
|
+
"aria-label": typeof title === "string" ? `Close ${title}` : "Close tab",
|
|
12795
|
+
children: /* @__PURE__ */ jsx(icons_exports.X, { className: "tw-size-4" })
|
|
12796
|
+
}
|
|
12797
|
+
)
|
|
12798
|
+
]
|
|
12799
|
+
},
|
|
12800
|
+
value
|
|
12801
|
+
)) }),
|
|
12802
|
+
children
|
|
12803
|
+
]
|
|
12804
|
+
}
|
|
12805
|
+
);
|
|
12806
|
+
var TabsContent = (props) => /* @__PURE__ */ jsx(RadixTabs.Content, { "data-slot": "tabs-content", tabIndex: -1, ...props });
|
|
12587
12807
|
var StepperContext = createContext({
|
|
12588
12808
|
orientation: "horizontal"
|
|
12589
12809
|
});
|
|
@@ -12838,7 +13058,7 @@ var TableBody = ({
|
|
|
12838
13058
|
{
|
|
12839
13059
|
className: cn(
|
|
12840
13060
|
{
|
|
12841
|
-
"[&_tr]:tw-border-0 [&_tr]:tw-border-b-
|
|
13061
|
+
"[&_tr]:tw-border-0 [&_tr]:tw-border-b-border [&_tr]:tw-border-b [&_tr]:tw-border-solid [&_tr:last-child]:tw-border-0": withBorderSeparator
|
|
12842
13062
|
},
|
|
12843
13063
|
className
|
|
12844
13064
|
),
|
|
@@ -12882,7 +13102,7 @@ var TableHeader = ({
|
|
|
12882
13102
|
"thead",
|
|
12883
13103
|
{
|
|
12884
13104
|
className: cn(
|
|
12885
|
-
"tw-sticky tw-top-0 tw-z-10 [&_tr]:tw-bg-
|
|
13105
|
+
"tw-sticky tw-top-0 tw-z-10 [&_tr]:tw-bg-muted [&_tr]:tw-border-b [&_tr]:tw-border-border",
|
|
12886
13106
|
{ "tw-shadow-table": withShadow },
|
|
12887
13107
|
className
|
|
12888
13108
|
),
|
|
@@ -12894,7 +13114,7 @@ var TableRow = ({
|
|
|
12894
13114
|
ref,
|
|
12895
13115
|
className,
|
|
12896
13116
|
...props
|
|
12897
|
-
}) => /* @__PURE__ */ jsx("tr", { ref, className: cn("hover:tw-bg-
|
|
13117
|
+
}) => /* @__PURE__ */ jsx("tr", { ref, className: cn("hover:tw-bg-muted/50", className), ...props });
|
|
12898
13118
|
var Table = ({
|
|
12899
13119
|
borderCollapsed = true,
|
|
12900
13120
|
bordered = false,
|
|
@@ -12907,7 +13127,7 @@ var Table = ({
|
|
|
12907
13127
|
{
|
|
12908
13128
|
className: cn(
|
|
12909
13129
|
"tw-relative tw-w-full",
|
|
12910
|
-
bordered && "tw-overflow-auto tw-rounded-[10px] tw-border tw-border-solid tw-border-
|
|
13130
|
+
bordered && "tw-overflow-auto tw-rounded-[10px] tw-border tw-border-solid tw-border-border",
|
|
12911
13131
|
containerClassName
|
|
12912
13132
|
),
|
|
12913
13133
|
children: /* @__PURE__ */ jsx(
|
|
@@ -12974,10 +13194,10 @@ var connectorWrapper = cva(
|
|
|
12974
13194
|
"before:tw-h-full",
|
|
12975
13195
|
"before:group-last/timeline-item:tw-h-[--connector-line-height]",
|
|
12976
13196
|
// Solid line
|
|
12977
|
-
"before:group-data-[variant=solid]/timeline:tw-bg-
|
|
13197
|
+
"before:group-data-[variant=solid]/timeline:tw-bg-border",
|
|
12978
13198
|
// Dashed line using gradient
|
|
12979
13199
|
"before:group-data-[variant=dashed]/timeline:tw-bg-gradient-to-b",
|
|
12980
|
-
"before:group-data-[variant=dashed]/timeline:tw-from-
|
|
13200
|
+
"before:group-data-[variant=dashed]/timeline:tw-from-border",
|
|
12981
13201
|
"before:group-data-[variant=dashed]/timeline:tw-from-50%",
|
|
12982
13202
|
"before:group-data-[variant=dashed]/timeline:tw-to-transparent",
|
|
12983
13203
|
"before:group-data-[variant=dashed]/timeline:tw-to-50%",
|
|
@@ -13011,17 +13231,17 @@ var connector = cva(
|
|
|
13011
13231
|
variant: {
|
|
13012
13232
|
none: [],
|
|
13013
13233
|
label: [
|
|
13014
|
-
"tw-bg-
|
|
13015
|
-
"tw-text-
|
|
13234
|
+
"tw-bg-muted",
|
|
13235
|
+
"tw-text-muted-foreground",
|
|
13016
13236
|
"tw-rounded",
|
|
13017
13237
|
"tw-p-1.5",
|
|
13018
13238
|
"tw-text-nowrap",
|
|
13019
13239
|
"tw-text-xs"
|
|
13020
13240
|
],
|
|
13021
13241
|
icon: [
|
|
13022
|
-
"tw-bg-
|
|
13242
|
+
"tw-bg-background",
|
|
13023
13243
|
'[&_svg:not([class*="tw-size-"])]:tw-size-4',
|
|
13024
|
-
"[&_svg]:tw-text-
|
|
13244
|
+
"[&_svg]:tw-text-muted-foreground"
|
|
13025
13245
|
],
|
|
13026
13246
|
line: [
|
|
13027
13247
|
"tw-min-w-8",
|
|
@@ -13042,7 +13262,7 @@ var connector = cva(
|
|
|
13042
13262
|
// l-shape
|
|
13043
13263
|
"before:tw-border-l",
|
|
13044
13264
|
"before:tw-border-b",
|
|
13045
|
-
"before:tw-border-
|
|
13265
|
+
"before:tw-border-border",
|
|
13046
13266
|
"before:tw-rounded-bl",
|
|
13047
13267
|
// Solid or dashed
|
|
13048
13268
|
"before:group-data-[variant=dashed]/timeline:tw-border-dashed",
|
|
@@ -13362,7 +13582,7 @@ var variants11 = cva(
|
|
|
13362
13582
|
{
|
|
13363
13583
|
variant: "gutter",
|
|
13364
13584
|
diff: "default",
|
|
13365
|
-
className: ["tw-bg-
|
|
13585
|
+
className: ["tw-bg-muted", "tw-text-muted-foreground"]
|
|
13366
13586
|
},
|
|
13367
13587
|
{
|
|
13368
13588
|
variant: "gutter",
|
|
@@ -13377,7 +13597,7 @@ var variants11 = cva(
|
|
|
13377
13597
|
{
|
|
13378
13598
|
variant: "code",
|
|
13379
13599
|
diff: "default",
|
|
13380
|
-
className: ["tw-bg-
|
|
13600
|
+
className: ["tw-bg-background", "tw-text-foreground"]
|
|
13381
13601
|
},
|
|
13382
13602
|
{
|
|
13383
13603
|
variant: "code",
|
|
@@ -13401,7 +13621,7 @@ var DiffViewTh = ({ variant = "default", children, className, ...props }) => /*
|
|
|
13401
13621
|
{
|
|
13402
13622
|
...props,
|
|
13403
13623
|
className: cn(
|
|
13404
|
-
"tw-bg-
|
|
13624
|
+
"tw-bg-background",
|
|
13405
13625
|
"tw-py-3",
|
|
13406
13626
|
"tw-border-b",
|
|
13407
13627
|
{ "tw-w-14": variant === "gutter" },
|
|
@@ -13622,13 +13842,13 @@ var DiffView = ({
|
|
|
13622
13842
|
{
|
|
13623
13843
|
className: cn(
|
|
13624
13844
|
"tailwindcss-preflight",
|
|
13625
|
-
"tw-bg-
|
|
13845
|
+
"tw-bg-muted",
|
|
13626
13846
|
"tw-border",
|
|
13627
13847
|
"tw-rounded-2xl",
|
|
13628
13848
|
"tw-overflow-auto",
|
|
13629
13849
|
className
|
|
13630
13850
|
),
|
|
13631
|
-
children: /* @__PURE__ */ jsxs("table", { className: "tw-w-full tw-table-fixed tw-bg-
|
|
13851
|
+
children: /* @__PURE__ */ jsxs("table", { className: "tw-w-full tw-table-fixed tw-bg-background", children: [
|
|
13632
13852
|
/* @__PURE__ */ jsx("thead", { className: "tw-sticky tw-top-0 tw-z-10 tw-shadow-sm", children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
13633
13853
|
/* @__PURE__ */ jsx(DiffViewTh, { variant: "gutter", children: leftTitleGutter }),
|
|
13634
13854
|
/* @__PURE__ */ jsx(DiffViewTh, { children: leftTitle }),
|
|
@@ -13645,8 +13865,8 @@ var DiffView = ({
|
|
|
13645
13865
|
className: cn(
|
|
13646
13866
|
"tw-w-full",
|
|
13647
13867
|
"tw-text-center",
|
|
13648
|
-
"tw-bg-
|
|
13649
|
-
"hover:tw-bg-
|
|
13868
|
+
"tw-bg-muted",
|
|
13869
|
+
"hover:tw-bg-accent",
|
|
13650
13870
|
"tw-underline",
|
|
13651
13871
|
"tw-p-2"
|
|
13652
13872
|
),
|
|
@@ -13826,6 +14046,8 @@ var createDiffHighlightExtension = () => {
|
|
|
13826
14046
|
var updateHighlightedLines = (view, lines, classification) => {
|
|
13827
14047
|
view.dispatch({ effects: setHighlightedLines.of({ lines, classification }) });
|
|
13828
14048
|
};
|
|
14049
|
+
var EMPTY_LINES = /* @__PURE__ */ new Set();
|
|
14050
|
+
var EMPTY_CLASSIFICATION = /* @__PURE__ */ new Map();
|
|
13829
14051
|
var MergePane = ({
|
|
13830
14052
|
value,
|
|
13831
14053
|
highlightedLines,
|
|
@@ -13835,7 +14057,8 @@ var MergePane = ({
|
|
|
13835
14057
|
header,
|
|
13836
14058
|
headerClassName,
|
|
13837
14059
|
className,
|
|
13838
|
-
onScrollDOMReady
|
|
14060
|
+
onScrollDOMReady,
|
|
14061
|
+
deleted = false
|
|
13839
14062
|
}) => {
|
|
13840
14063
|
const editorRef = useRef(null);
|
|
13841
14064
|
const extensions = useMemo(
|
|
@@ -13844,11 +14067,11 @@ var MergePane = ({
|
|
|
13844
14067
|
EditorView.theme({
|
|
13845
14068
|
"&.cm-editor": {
|
|
13846
14069
|
height: "100%",
|
|
13847
|
-
backgroundColor: colors3.neutral[50],
|
|
14070
|
+
backgroundColor: deleted ? colors3.error[100] : colors3.neutral[50],
|
|
13848
14071
|
outline: "none"
|
|
13849
14072
|
},
|
|
13850
14073
|
".cm-gutters": {
|
|
13851
|
-
backgroundColor: colors3.neutral[100]
|
|
14074
|
+
backgroundColor: deleted ? colors3.error[200] : colors3.neutral[100]
|
|
13852
14075
|
},
|
|
13853
14076
|
"*": { lineHeight: `${LINE_HEIGHT_PX}px` },
|
|
13854
14077
|
".cm-lineNumbers .cm-gutterElement": { padding: "0 0 0 25px" }
|
|
@@ -13861,20 +14084,27 @@ var MergePane = ({
|
|
|
13861
14084
|
}
|
|
13862
14085
|
})
|
|
13863
14086
|
],
|
|
13864
|
-
[]
|
|
14087
|
+
[deleted]
|
|
13865
14088
|
);
|
|
13866
14089
|
useEffect(() => {
|
|
13867
14090
|
const view = editorRef.current?.view;
|
|
13868
|
-
if (view)
|
|
13869
|
-
|
|
13870
|
-
|
|
13871
|
-
|
|
14091
|
+
if (!view) return;
|
|
14092
|
+
updateHighlightedLines(
|
|
14093
|
+
view,
|
|
14094
|
+
deleted ? EMPTY_LINES : highlightedLines,
|
|
14095
|
+
deleted ? EMPTY_CLASSIFICATION : lineClassification
|
|
14096
|
+
);
|
|
14097
|
+
}, [highlightedLines, lineClassification, deleted]);
|
|
13872
14098
|
const handleCreateEditor = useCallback(
|
|
13873
14099
|
(view) => {
|
|
13874
|
-
updateHighlightedLines(
|
|
14100
|
+
updateHighlightedLines(
|
|
14101
|
+
view,
|
|
14102
|
+
deleted ? EMPTY_LINES : highlightedLines,
|
|
14103
|
+
deleted ? EMPTY_CLASSIFICATION : lineClassification
|
|
14104
|
+
);
|
|
13875
14105
|
onScrollDOMReady?.(view.scrollDOM);
|
|
13876
14106
|
},
|
|
13877
|
-
[highlightedLines, lineClassification, onScrollDOMReady]
|
|
14107
|
+
[highlightedLines, lineClassification, onScrollDOMReady, deleted]
|
|
13878
14108
|
);
|
|
13879
14109
|
useEffect(() => {
|
|
13880
14110
|
return () => onScrollDOMReady?.(null);
|
|
@@ -13887,22 +14117,42 @@ var MergePane = ({
|
|
|
13887
14117
|
observer.observe(wrapper);
|
|
13888
14118
|
return () => observer.disconnect();
|
|
13889
14119
|
}, []);
|
|
13890
|
-
return /* @__PURE__ */ jsxs(
|
|
13891
|
-
|
|
13892
|
-
|
|
13893
|
-
|
|
13894
|
-
|
|
13895
|
-
|
|
13896
|
-
|
|
13897
|
-
|
|
13898
|
-
|
|
13899
|
-
|
|
13900
|
-
|
|
13901
|
-
|
|
13902
|
-
|
|
13903
|
-
|
|
13904
|
-
|
|
13905
|
-
|
|
14120
|
+
return /* @__PURE__ */ jsxs(
|
|
14121
|
+
"div",
|
|
14122
|
+
{
|
|
14123
|
+
className: cn(
|
|
14124
|
+
"tw-flex tw-min-w-0 tw-flex-1 tw-flex-col tw-overflow-hidden",
|
|
14125
|
+
className,
|
|
14126
|
+
deleted && "tw-border-error-300"
|
|
14127
|
+
),
|
|
14128
|
+
children: [
|
|
14129
|
+
header && /* @__PURE__ */ jsx(
|
|
14130
|
+
"div",
|
|
14131
|
+
{
|
|
14132
|
+
className: cn(
|
|
14133
|
+
"tw-px-4 tw-py-3",
|
|
14134
|
+
deleted ? "tw-border-b tw-border-error-200 tw-bg-error-100" : "tw-bg-background",
|
|
14135
|
+
headerClassName
|
|
14136
|
+
),
|
|
14137
|
+
children: header
|
|
14138
|
+
}
|
|
14139
|
+
),
|
|
14140
|
+
/* @__PURE__ */ jsx("div", { className: "tw-flex tw-h-0 tw-flex-1 tw-flex-col [&_>div]:tw-h-full", children: /* @__PURE__ */ jsx(
|
|
14141
|
+
CodeMirror,
|
|
14142
|
+
{
|
|
14143
|
+
ref: editorRef,
|
|
14144
|
+
height: "100%",
|
|
14145
|
+
value,
|
|
14146
|
+
onChange,
|
|
14147
|
+
extensions,
|
|
14148
|
+
readOnly,
|
|
14149
|
+
onCreateEditor: handleCreateEditor,
|
|
14150
|
+
basicSetup: { lineNumbers: true, drawSelection: false }
|
|
14151
|
+
}
|
|
14152
|
+
) })
|
|
14153
|
+
]
|
|
14154
|
+
}
|
|
14155
|
+
);
|
|
13906
14156
|
};
|
|
13907
14157
|
var useScrollSync = () => {
|
|
13908
14158
|
const scrollersRef = useRef([]);
|
|
@@ -13963,6 +14213,8 @@ var useScrollSync = () => {
|
|
|
13963
14213
|
}, []);
|
|
13964
14214
|
return { registerScroller, registerFollower };
|
|
13965
14215
|
};
|
|
14216
|
+
var EMPTY_LINES2 = /* @__PURE__ */ new Set();
|
|
14217
|
+
var EMPTY_CLASSIFICATION2 = /* @__PURE__ */ new Map();
|
|
13966
14218
|
var MergeEditor = ({
|
|
13967
14219
|
mergeValue,
|
|
13968
14220
|
handleMergeChange,
|
|
@@ -13986,14 +14238,17 @@ var MergeEditor = ({
|
|
|
13986
14238
|
middleClassName,
|
|
13987
14239
|
rightHeader,
|
|
13988
14240
|
className,
|
|
13989
|
-
argo
|
|
14241
|
+
argo,
|
|
14242
|
+
leftDeleted = false,
|
|
14243
|
+
rightDeleted = false
|
|
13990
14244
|
}) => {
|
|
13991
14245
|
const { registerScroller, registerFollower } = useScrollSync();
|
|
14246
|
+
const anySideDeleted = leftDeleted || rightDeleted;
|
|
13992
14247
|
return /* @__PURE__ */ jsxs(
|
|
13993
14248
|
"div",
|
|
13994
14249
|
{
|
|
13995
14250
|
className: cn(
|
|
13996
|
-
"tw-flex tw-h-full tw-min-h-0 tw-overflow-hidden tw-bg-
|
|
14251
|
+
"tw-flex tw-h-full tw-min-h-0 tw-overflow-hidden tw-bg-background tw-gap-3",
|
|
13997
14252
|
className
|
|
13998
14253
|
),
|
|
13999
14254
|
children: [
|
|
@@ -14005,14 +14260,15 @@ var MergeEditor = ({
|
|
|
14005
14260
|
lineClassification: leftClassification,
|
|
14006
14261
|
readOnly: true,
|
|
14007
14262
|
header: leftHeader,
|
|
14008
|
-
className: "tw-rounded-r-lg tw-border tw-border-
|
|
14009
|
-
onScrollDOMReady: registerScroller(0)
|
|
14263
|
+
className: "tw-rounded-r-lg tw-border tw-border-border",
|
|
14264
|
+
onScrollDOMReady: registerScroller(0),
|
|
14265
|
+
deleted: leftDeleted
|
|
14010
14266
|
}
|
|
14011
14267
|
),
|
|
14012
14268
|
/* @__PURE__ */ jsx(
|
|
14013
14269
|
AcceptControls,
|
|
14014
14270
|
{
|
|
14015
|
-
conflicts: leftConflicts,
|
|
14271
|
+
conflicts: leftDeleted ? [] : leftConflicts,
|
|
14016
14272
|
side: "left",
|
|
14017
14273
|
onAccept: acceptLeft,
|
|
14018
14274
|
onDismiss: dismissLeft,
|
|
@@ -14024,19 +14280,19 @@ var MergeEditor = ({
|
|
|
14024
14280
|
MergePane,
|
|
14025
14281
|
{
|
|
14026
14282
|
value: mergeValue,
|
|
14027
|
-
highlightedLines: mergeHighlightedLines,
|
|
14028
|
-
lineClassification: mergeClassification,
|
|
14283
|
+
highlightedLines: anySideDeleted ? EMPTY_LINES2 : mergeHighlightedLines,
|
|
14284
|
+
lineClassification: anySideDeleted ? EMPTY_CLASSIFICATION2 : mergeClassification,
|
|
14029
14285
|
onChange: handleMergeChange,
|
|
14030
14286
|
header: middleHeader,
|
|
14031
14287
|
headerClassName: middleHeaderClassName,
|
|
14032
|
-
className: cn("tw-border tw-border-
|
|
14288
|
+
className: cn("tw-border tw-border-border tw-rounded-lg", middleClassName),
|
|
14033
14289
|
onScrollDOMReady: registerScroller(1)
|
|
14034
14290
|
}
|
|
14035
14291
|
),
|
|
14036
14292
|
/* @__PURE__ */ jsx(
|
|
14037
14293
|
AcceptControls,
|
|
14038
14294
|
{
|
|
14039
|
-
conflicts: rightConflicts,
|
|
14295
|
+
conflicts: rightDeleted ? [] : rightConflicts,
|
|
14040
14296
|
side: "right",
|
|
14041
14297
|
onAccept: acceptRight,
|
|
14042
14298
|
onDismiss: dismissRight,
|
|
@@ -14052,8 +14308,9 @@ var MergeEditor = ({
|
|
|
14052
14308
|
lineClassification: rightClassification,
|
|
14053
14309
|
readOnly: true,
|
|
14054
14310
|
header: rightHeader,
|
|
14055
|
-
className: "tw-rounded-l-lg tw-border tw-border-
|
|
14056
|
-
onScrollDOMReady: registerScroller(2)
|
|
14311
|
+
className: "tw-rounded-l-lg tw-border tw-border-border",
|
|
14312
|
+
onScrollDOMReady: registerScroller(2),
|
|
14313
|
+
deleted: rightDeleted
|
|
14057
14314
|
}
|
|
14058
14315
|
)
|
|
14059
14316
|
]
|
|
@@ -14061,13 +14318,13 @@ var MergeEditor = ({
|
|
|
14061
14318
|
);
|
|
14062
14319
|
};
|
|
14063
14320
|
var PaneHeader = ({ label, sublabel }) => /* @__PURE__ */ jsxs("div", { children: [
|
|
14064
|
-
/* @__PURE__ */ jsx("p", { className: "tw-m-0 tw-text-sm tw-font-medium tw-text-
|
|
14065
|
-
sublabel && /* @__PURE__ */ jsx("p", { className: "tw-m-0 tw-text-xs tw-text-
|
|
14321
|
+
/* @__PURE__ */ jsx("p", { className: "tw-m-0 tw-text-sm tw-font-medium tw-text-foreground", children: label }),
|
|
14322
|
+
sublabel && /* @__PURE__ */ jsx("p", { className: "tw-m-0 tw-text-xs tw-text-muted-foreground", children: sublabel })
|
|
14066
14323
|
] });
|
|
14067
14324
|
var ConflictStatusIndicator = ({ remainingConflicts, remainingSafeChanges }) => {
|
|
14068
14325
|
const hasConflicts = remainingConflicts > 0;
|
|
14069
14326
|
const allDone = !hasConflicts && remainingSafeChanges === 0;
|
|
14070
|
-
const colorClass = hasConflicts ? "tw-text-warning-500" : allDone ? "tw-text-primary-500" : "tw-text-
|
|
14327
|
+
const colorClass = hasConflicts ? "tw-text-warning-500" : allDone ? "tw-text-primary-500" : "tw-text-muted-foreground";
|
|
14071
14328
|
const parts = [];
|
|
14072
14329
|
if (hasConflicts) {
|
|
14073
14330
|
parts.push(`${remainingConflicts} conflict${remainingConflicts !== 1 ? "s" : ""}`);
|
|
@@ -14887,6 +15144,10 @@ var MIN_SCALE = 0.5;
|
|
|
14887
15144
|
var MAX_SCALE = 3;
|
|
14888
15145
|
var ZOOM_STEP = 0.1;
|
|
14889
15146
|
var ZoomableSvg = ({ html, copyText, className }) => {
|
|
15147
|
+
const safeHtml = useMemo(
|
|
15148
|
+
() => DOMPurify.sanitize(html, { USE_PROFILES: { svg: true, svgFilters: true } }),
|
|
15149
|
+
[html]
|
|
15150
|
+
);
|
|
14890
15151
|
const containerRef = useRef(null);
|
|
14891
15152
|
const [scale, setScale] = useState(1);
|
|
14892
15153
|
const [translate, setTranslate] = useState({ x: 0, y: 0 });
|
|
@@ -14982,7 +15243,7 @@ var ZoomableSvg = ({ html, copyText, className }) => {
|
|
|
14982
15243
|
isFullscreen && "tw-h-full [&>svg]:tw-h-full"
|
|
14983
15244
|
),
|
|
14984
15245
|
style: { transform: `translate(${translate.x}px, ${translate.y}px) scale(${scale})` },
|
|
14985
|
-
dangerouslySetInnerHTML: { __html:
|
|
15246
|
+
dangerouslySetInnerHTML: { __html: safeHtml }
|
|
14986
15247
|
}
|
|
14987
15248
|
)
|
|
14988
15249
|
}
|
|
@@ -15035,7 +15296,7 @@ var ZoomableSvg = ({ html, copyText, className }) => {
|
|
|
15035
15296
|
"div",
|
|
15036
15297
|
{
|
|
15037
15298
|
role: "presentation",
|
|
15038
|
-
className: "tw-fixed tw-inset-0 tw-z-[1060] tw-bg-
|
|
15299
|
+
className: "tw-fixed tw-inset-0 tw-z-[1060] tw-bg-muted tw-p-4",
|
|
15039
15300
|
onClick: stopPropagation2,
|
|
15040
15301
|
children: diagramContent
|
|
15041
15302
|
}
|
|
@@ -15045,7 +15306,7 @@ var ZoomableSvg = ({ html, copyText, className }) => {
|
|
|
15045
15306
|
"div",
|
|
15046
15307
|
{
|
|
15047
15308
|
className: cn(
|
|
15048
|
-
"tw-overflow-hidden tw-rounded-md tw-border tw-border-
|
|
15309
|
+
"tw-overflow-hidden tw-rounded-md tw-border tw-border-border tw-bg-muted",
|
|
15049
15310
|
className
|
|
15050
15311
|
),
|
|
15051
15312
|
children: diagramContent
|
|
@@ -15054,7 +15315,7 @@ var ZoomableSvg = ({ html, copyText, className }) => {
|
|
|
15054
15315
|
};
|
|
15055
15316
|
var ButtonToolbar = ({ value, children }) => {
|
|
15056
15317
|
if (!value && !children) return null;
|
|
15057
|
-
return /* @__PURE__ */ jsxs("div", { className: "tw-pointer-events-auto tw-ml-auto tw-mr-4 tw-flex tw-w-fit tw-gap-1 tw-overflow-visible tw-rounded-lg tw-border tw-border-solid tw-border-
|
|
15318
|
+
return /* @__PURE__ */ jsxs("div", { className: "tw-pointer-events-auto tw-ml-auto tw-mr-4 tw-flex tw-w-fit tw-gap-1 tw-overflow-visible tw-rounded-lg tw-border tw-border-solid tw-border-border !tw-bg-background tw-p-[3px] tw-shadow", children: [
|
|
15058
15319
|
!!value && /* @__PURE__ */ jsx(ClipboardButton, { size: "icon-sm", variant: "invisible", text: value }),
|
|
15059
15320
|
children
|
|
15060
15321
|
] });
|
|
@@ -15208,7 +15469,7 @@ var CodeEditor = ({
|
|
|
15208
15469
|
"div",
|
|
15209
15470
|
{
|
|
15210
15471
|
className: cn(
|
|
15211
|
-
"tw-relative tw-flex tw-min-h-0 tw-flex-col [&_.cm-mergeViewEditor]:tw-overflow-visible [&_.cm-mergeViewEditors]:tw-h-full [&_.cm-mergeView]:tw-h-full [&_>div]:tw-h-full [&_>div]:tw-overflow-auto [&_>div]:tw-bg-
|
|
15472
|
+
"tw-relative tw-flex tw-min-h-0 tw-flex-col [&_.cm-mergeViewEditor]:tw-overflow-visible [&_.cm-mergeViewEditors]:tw-h-full [&_.cm-mergeView]:tw-h-full [&_>div]:tw-h-full [&_>div]:tw-overflow-auto [&_>div]:tw-bg-background",
|
|
15212
15473
|
{ "tw-mt-5": !!renderAdditionalButtons },
|
|
15213
15474
|
className
|
|
15214
15475
|
),
|
|
@@ -15798,6 +16059,6 @@ var SqlEditor = ({
|
|
|
15798
16059
|
);
|
|
15799
16060
|
};
|
|
15800
16061
|
|
|
15801
|
-
export { Alert, AnswerSummary, AppShell, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar, Card, Checkbox, Clipboard, ClipboardButton, ClipboardInline, CodeEditor, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, DateRangeInput, DateRangePicker, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, ErrorState, FileUpload, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, InlineStepDetail, InlineStepLabel, InputGroup, InputOtp, Kbd, Label2 as Label, Link, MarkedText, MergeEditor, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, PlanRewritingIndicator, Popconfirm, Popover, Progress, PromptInput, Question, QuestionBlock, RadioGroup2 as RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, Separator2 as Separator, Sheet, Sidebar, SidebarProvider, Skeleton, SkeletonList, Slider, SplitButton, SqlEditor, Stepper, SuggestedPrompt, Switch, Table, Tabs2 as Tabs, TabsContent, Tagger, TextInput, Textarea, ThemeDecorator, ThemeProvider, ThinkingIndicator, TimeInput, TimePicker, Timeline, Toaster, Toggle, ToggleGroup, Tooltip, TooltipProvider, Truncated, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isMac, kbdVariants, keys, mergeRefs, resolveStorybookBrand,
|
|
16062
|
+
export { Alert, AnswerSummary, AppShell, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar, Card, Checkbox, Clipboard, ClipboardButton, ClipboardInline, CodeEditor, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, DateRangeInput, DateRangePicker, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, ErrorState, FileUpload, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, InlineStepDetail, InlineStepLabel, InputGroup, InputOtp, Kbd, Label2 as Label, Link, MarkedText, MergeEditor, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, PlanRewritingIndicator, Popconfirm, Popover, Progress, PromptInput, Question, QuestionBlock, RadioGroup2 as RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, Separator2 as Separator, Sheet, Sidebar, SidebarProvider, Skeleton, SkeletonList, Slider, SplitButton, SqlEditor, Stepper, SuggestedPrompt, Switch, Table, Tabs2 as Tabs, TabsContent, Tagger, TextInput, Textarea, ThemeDecorator, ThemeProvider, ThinkingIndicator, TimeInput, TimePicker, Timeline, Toaster, Toggle, ToggleGroup, Tooltip, TooltipProvider, Truncated, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isMac, kbdVariants, keys, mergeRefs, resolveStorybookBrand, setServerFieldErrors, themeToolbarBrands, toast, useAppForm, useAutosizeInput, useInputOtpContext, useIsLegacyBrand, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, useTheme, withForm };
|
|
15802
16063
|
//# sourceMappingURL=index.js.map
|
|
15803
16064
|
//# sourceMappingURL=index.js.map
|