@keboola/design 2.1.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.
@@ -1,11 +1,13 @@
1
1
  import { clsx } from 'clsx';
2
2
  import { extendTailwindMerge } from 'tailwind-merge';
3
+ import { createContext, lazy, Suspense, use, useId, useState, useRef, useEffect, forwardRef, useCallback, useMemo } from 'react';
4
+ import { keboolaLegacy } from '@keboola/brand-registry';
3
5
  import { Portal, Content, Root, Trigger } from '@radix-ui/react-tooltip';
4
6
  import { cva } from 'class-variance-authority';
5
7
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
6
- import { createContext, lazy, Suspense, use, useId, useState, useRef, useEffect, useCallback, useMemo } from 'react';
7
- import { AlignLeft, AlignCenter, AlignRight, AlignJustify, SquareCode, Quote, ListOrdered, List, Heading3, Heading2, Heading1, Type, Bold, Italic, Underline, Strikethrough, Code, Minimize2, Maximize2, ChevronDown, Link, Copy, X, Loader2, AlertCircle, CircleCheck, Info, AlertTriangle, ChevronRight, Pipette, ToggleRight, Circle, Check } from 'lucide-react';
8
+ import * as lucide_react_star from 'lucide-react';
8
9
  import { Root as Root$2, Slottable } from '@radix-ui/react-slot';
10
+ import DOMPurify from 'dompurify';
9
11
  import { renderMermaidSVG } from 'beautiful-mermaid';
10
12
  import colors from '@keboola/tailwind-config/colors';
11
13
  import { CodeNode, $isCodeNode, $createCodeNode } from '@lexical/code';
@@ -30,7 +32,6 @@ import { HeadingNode, QuoteNode, $isHeadingNode, $isQuoteNode, $createQuoteNode,
30
32
  import { DecoratorNode, $getSelection, $isRangeSelection, FORMAT_TEXT_COMMAND, $createParagraphNode, PASTE_COMMAND, COMMAND_PRIORITY_CRITICAL, DROP_COMMAND, KEY_DOWN_COMMAND, COMMAND_PRIORITY_HIGH, $insertNodes, $getNodeByKey, $setSelection, FORMAT_ELEMENT_COMMAND, $createTextNode } from 'lexical';
31
33
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
32
34
  import { toast as toast$1 } from 'sonner';
33
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
34
35
  import { createPortal } from 'react-dom';
35
36
  import { $getNearestBlockElementAncestorOrThrow } from '@lexical/utils';
36
37
  import * as DropdownMenuPrimitive3 from '@radix-ui/react-dropdown-menu';
@@ -40,7 +41,9 @@ import TextareaAutosize from 'react-textarea-autosize';
40
41
  import * as RLabel from '@radix-ui/react-label';
41
42
 
42
43
  var __defProp = Object.defineProperty;
44
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
43
45
  var __getOwnPropNames = Object.getOwnPropertyNames;
46
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
44
47
  var __esm = (fn, res) => function __init() {
45
48
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
46
49
  };
@@ -48,6 +51,15 @@ var __export = (target, all) => {
48
51
  for (var name in all)
49
52
  __defProp(target, name, { get: all[name], enumerable: true });
50
53
  };
54
+ var __copyProps = (to, from, except, desc) => {
55
+ if (from && typeof from === "object" || typeof from === "function") {
56
+ for (let key of __getOwnPropNames(from))
57
+ if (!__hasOwnProp.call(to, key) && key !== except)
58
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
59
+ }
60
+ return to;
61
+ };
62
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
51
63
  var twMerge, cn;
52
64
  var init_classNames = __esm({
53
65
  "src/utils/classNames.ts"() {
@@ -116,20 +128,62 @@ var init_keyCodes = __esm({
116
128
  };
117
129
  }
118
130
  });
131
+ var ThemeContext;
132
+ var init_themeContext = __esm({
133
+ "src/components/ThemeProvider/themeContext.ts"() {
134
+ ThemeContext = createContext(null);
135
+ }
136
+ });
137
+ var useIsLegacyBrand;
138
+ var init_useIsLegacyBrand = __esm({
139
+ "src/components/internal/useIsLegacyBrand.ts"() {
140
+ init_themeContext();
141
+ useIsLegacyBrand = () => {
142
+ const context = use(ThemeContext);
143
+ return context === null || context.brand.id === keboolaLegacy.id;
144
+ };
145
+ }
146
+ });
119
147
  var tooltipVariants, TooltipContent;
120
148
  var init_TooltipContent = __esm({
121
149
  "src/components/Tooltip/TooltipContent.tsx"() {
150
+ init_useIsLegacyBrand();
122
151
  tooltipVariants = cva(
123
152
  [
124
153
  "tailwindcss-preflight",
125
154
  "tw-inline-block",
126
- "tw-rounded",
127
- "tw-bg-neutral-800",
128
- "tw-text-white",
129
155
  "tw-break-anywhere",
130
156
  "tw-max-h-96",
131
157
  "tw-overflow-y-auto",
132
- "tw-z-[1060]"
158
+ "tw-z-[1060]",
159
+ // legacy (dark) chrome — default
160
+ "tw-rounded",
161
+ "tw-bg-neutral-800",
162
+ "tw-text-white",
163
+ // argo chrome overrides — semantic floating-panel tokens
164
+ "data-[argo=true]:tw-rounded-2xl",
165
+ "data-[argo=true]:tw-border",
166
+ "data-[argo=true]:tw-border-solid",
167
+ "data-[argo=true]:tw-border-border",
168
+ "data-[argo=true]:tw-bg-popover",
169
+ "data-[argo=true]:tw-text-popover-foreground",
170
+ "data-[argo=true]:tw-shadow-md",
171
+ // argo open animation
172
+ "data-[argo=true]:data-[state=delayed-open]:tw-animate-in",
173
+ "data-[argo=true]:data-[state=instant-open]:tw-animate-in",
174
+ "data-[argo=true]:data-[state=delayed-open]:tw-fade-in-0",
175
+ "data-[argo=true]:data-[state=instant-open]:tw-fade-in-0",
176
+ "data-[argo=true]:data-[state=delayed-open]:tw-zoom-in-95",
177
+ "data-[argo=true]:data-[state=instant-open]:tw-zoom-in-95",
178
+ // argo closed animation
179
+ "data-[argo=true]:data-[state=closed]:tw-animate-out",
180
+ "data-[argo=true]:data-[state=closed]:tw-fade-out-0",
181
+ "data-[argo=true]:data-[state=closed]:tw-zoom-out-95",
182
+ // argo position animation
183
+ "data-[argo=true]:data-[side=bottom]:tw-slide-in-from-top-2",
184
+ "data-[argo=true]:data-[side=left]:tw-slide-in-from-right-2",
185
+ "data-[argo=true]:data-[side=right]:tw-slide-in-from-left-2",
186
+ "data-[argo=true]:data-[side=top]:tw-slide-in-from-bottom-2"
133
187
  ],
134
188
  {
135
189
  defaultVariants: {
@@ -162,6 +216,7 @@ var init_TooltipContent = __esm({
162
216
  TooltipContent = ({
163
217
  className,
164
218
  variant,
219
+ argo,
165
220
  keepOpenOnPointerDownOutside = false,
166
221
  children,
167
222
  onPointerDownOutside,
@@ -171,6 +226,8 @@ var init_TooltipContent = __esm({
171
226
  placement = "right",
172
227
  ...rest
173
228
  }) => {
229
+ const isLegacy = useIsLegacyBrand();
230
+ const renderArgo = !isLegacy || argo === true;
174
231
  const handlePointerDownOutside = (event) => {
175
232
  if (keepOpenOnPointerDownOutside) event.preventDefault();
176
233
  onPointerDownOutside?.(event);
@@ -179,7 +236,8 @@ var init_TooltipContent = __esm({
179
236
  Content,
180
237
  {
181
238
  ...rest,
182
- "data-tooltip-content": true,
239
+ "data-tooltip-content": renderArgo ? void 0 : true,
240
+ "data-argo": renderArgo,
183
241
  sideOffset,
184
242
  collisionPadding,
185
243
  onPointerDownOutside: handlePointerDownOutside,
@@ -258,6 +316,7 @@ var init_Tooltip = __esm({
258
316
  className,
259
317
  keepOpenOnTriggerClick = false,
260
318
  variant,
319
+ argo,
261
320
  placement = "right",
262
321
  forceHide = false,
263
322
  forceShow = false,
@@ -296,6 +355,7 @@ var init_Tooltip = __esm({
296
355
  {
297
356
  className,
298
357
  variant: resolvedVariant,
358
+ argo,
299
359
  placement,
300
360
  keepOpenOnPointerDownOutside: keepOpenOnTriggerClick,
301
361
  children: tooltip
@@ -423,7 +483,7 @@ var init_Skeleton = __esm({
423
483
  "tw-relative",
424
484
  "tw-overflow-hidden",
425
485
  "tw-pointer-events-none",
426
- "tw-bg-neutral-150",
486
+ "tw-bg-muted",
427
487
  // before
428
488
  'before:tw-content-[""]',
429
489
  "before:tw-opacity-100",
@@ -450,8 +510,42 @@ var init_Skeleton = __esm({
450
510
  };
451
511
  }
452
512
  });
513
+ var Keboola;
514
+ var init_Keboola = __esm({
515
+ "src/icons/Keboola.tsx"() {
516
+ init_utils();
517
+ Keboola = forwardRef(
518
+ ({ size = 24, color = "currentColor", className, children, ...rest }, ref) => /* @__PURE__ */ jsxs(
519
+ "svg",
520
+ {
521
+ ref,
522
+ xmlns: "http://www.w3.org/2000/svg",
523
+ width: size,
524
+ height: size,
525
+ viewBox: "0 0 300 512",
526
+ fill: color,
527
+ className: cn("lucide", className),
528
+ ...rest,
529
+ children: [
530
+ /* @__PURE__ */ jsx("path", { d: "M152 320C79.7 320 24.5 233.9 24.5 124.7C24.5 15.6 70.5 0 152 0s123.6 15.6 123.6 124.7C275.5 233.9 217.7 320 152 320zm-8.7-50.5c0-11.2-9.5-20.3-21.2-20.3s-21.2 9.1-21.2 20.3c0 11.2 9.5 20.3 21.2 20.3s21.2-9.1 21.2-20.3zm55.7 0c0-11.2-9.5-20.3-21.2-20.3s-21.2 9.1-21.2 20.3c0 11.2 9.5 20.3 21.2 20.3s21.2-9.1 21.2-20.3zm68.9 115.1c10.2 9.3 20.2 20.5 29 35c5.9 9.7 2.6 22.1-7.5 27.8c-3.4 1.9-7.1 2.8-10.7 2.8c-7.2 0-14.3-3.6-18.3-10c-6.8-11.1-13.8-18.9-21.7-26.1c-7.3-6.7-15.6-12.7-24.9-19.5c-.7-.5-1.4-1-2.1-1.5c-5-3.6-10-6.8-14.9-9.4c.6 1 1.2 2.1 1.8 3.2c14.4 26.4 29.2 63.1 29.2 104.9c0 11.2-9.5 20.3-21.2 20.3c-11.7 0-21.2-9.1-21.2-20.3c.1-31.8-11.6-62.3-23.8-84.9c-4-7.4-8-13.9-11.6-19.3c-3.4 5.2-7.2 11.3-11 18.3c-12.5 22.7-24.5 53.8-24.4 86c0 11.2-9.5 20.3-21.2 20.3s-21.2-9.1-21.2-20.3c.1-41.8 14.9-78.4 29.2-104.9c.6-1.1 1.2-2.1 1.8-3.2c-5 2.7-9.9 5.8-14.9 9.4c-.6 .5-1.3 .9-1.9 1.4c-9.5 6.9-17.8 12.9-25.1 19.7c-7.9 7.2-14.9 15.1-21.7 26.1c-5.9 9.7-18.9 12.9-29 7.2C.5 441.8-2.9 429.3 3.1 419.7c8.9-14.4 18.8-25.7 29-35c9.2-8.4 18.5-15.1 27.6-21.7c1-.7 2-1.4 3-2.2c4.7-3.5 9.6-6.7 14.6-9.6c-5-2.9-9.8-6.1-14.6-9.6C39.8 325 19.9 302.5 3.1 275.1c-5.9-9.7-2.6-22.1 7.5-27.8c10.1-5.7 23.1-2.5 29 7.2c14.6 23.7 31.1 42 48.7 54.9c18.9 13.7 37.4 20.5 56.5 21.5c1.7-.1 3.5-.1 5.2-.1c1.8 0 3.5 .1 5.2 .1c0 0 0 0 0 0c19.1-1.1 37.6-7.9 56.5-21.5c17.6-12.8 34.2-31.2 48.7-54.9c6-9.7 18.9-12.9 29-7.2c10.1 5.7 13.4 18.1 7.5 27.8c-16.8 27.4-36.7 49.9-59.6 66.6c-4.7 3.5-9.6 6.7-14.5 9.6c4.9 2.9 9.8 6.1 14.5 9.6c.9 .7 1.8 1.3 2.7 2c9.2 6.7 18.5 13.5 27.9 22z" }),
531
+ children
532
+ ]
533
+ }
534
+ )
535
+ );
536
+ Keboola.displayName = "Keboola";
537
+ }
538
+ });
539
+
540
+ // src/icons/index.ts
541
+ var icons_exports = {};
542
+ __export(icons_exports, {
543
+ Keboola: () => Keboola
544
+ });
453
545
  var init_icons = __esm({
454
546
  "src/icons/index.ts"() {
547
+ __reExport(icons_exports, lucide_react_star);
548
+ init_Keboola();
455
549
  }
456
550
  });
457
551
  var variants, argoVariants;
@@ -644,6 +738,8 @@ var init_styles = __esm({
644
738
  "tw-bg-clip-padding",
645
739
  // anchor support
646
740
  "!tw-no-underline",
741
+ "aria-disabled:tw-cursor-not-allowed",
742
+ "aria-disabled:tw-opacity-50",
647
743
  // icon
648
744
  "tw-shrink-0",
649
745
  "[&_svg]:tw-pointer-events-none",
@@ -738,6 +834,7 @@ var init_Button = __esm({
738
834
  "src/components/Button/Button.tsx"() {
739
835
  init_icons();
740
836
  init_utils();
837
+ init_useIsLegacyBrand();
741
838
  init_styles();
742
839
  Button = ({
743
840
  ref,
@@ -754,14 +851,11 @@ var init_Button = __esm({
754
851
  block = false,
755
852
  ...buttonProps
756
853
  }) => {
854
+ const isLegacy = useIsLegacyBrand();
855
+ const renderArgo = !isLegacy || argo;
757
856
  const Comp = asChild ? Root$2 : "button";
758
857
  const isIconOnly = String(size).startsWith("icon");
759
- const classNames = argo ? argoVariants({ variant, size, block, className }) : variants({
760
- size,
761
- variant,
762
- block,
763
- className
764
- });
858
+ const classNames = renderArgo ? argoVariants({ variant, size, block, className }) : variants({ size, variant, block, className });
765
859
  const handleClick = (event) => {
766
860
  const isAnchor = event.currentTarget.tagName === "A";
767
861
  if (isAnchor && disabled) {
@@ -783,7 +877,7 @@ var init_Button = __esm({
783
877
  onClick: handleClick,
784
878
  className: cn(classNames),
785
879
  children: [
786
- isLoading && /* @__PURE__ */ jsx(Loader2, { className: "tw-size-4 tw-shrink-0 tw-animate-spin" }),
880
+ isLoading && /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-size-4 tw-shrink-0 tw-animate-spin" }),
787
881
  /* @__PURE__ */ jsx(Slottable, { children: isLoading && isIconOnly ? null : children })
788
882
  ]
789
883
  }
@@ -806,7 +900,7 @@ var init_ButtonInline = __esm({
806
900
  "disabled:tw-no-underline",
807
901
  "[&_svg]:disabled:tw-text-neutral-400",
808
902
  // Default size for nested Lucide icons; callers can override on the icon.
809
- "[&_svg:not([class*='tw-size-'])]:tw-size-4",
903
+ "[&_svg.lucide:not([class*='tw-size-'])]:tw-size-4",
810
904
  "[&_svg]:tw-shrink-0"
811
905
  ],
812
906
  {
@@ -816,11 +910,7 @@ var init_ButtonInline = __esm({
816
910
  },
817
911
  variants: {
818
912
  color: {
819
- link: [
820
- "tw-text-secondary-500",
821
- "hover:tw-text-secondary-600",
822
- "[&_svg]:tw-text-secondary-500"
823
- ],
913
+ link: ["tw-text-primary", "hover:tw-text-primary/90", "[&_svg]:tw-text-primary"],
824
914
  dark: ["tw-text-neutral-800 [&_svg]:tw-text-neutral-400"],
825
915
  danger: ["tw-text-error-500 [&_svg]:tw-text-error-500"],
826
916
  muted: ["tw-text-muted-foreground [&_svg]:tw-text-muted-foreground"],
@@ -927,7 +1017,7 @@ var init_ClipboardButton = __esm({
927
1017
  init_Button2();
928
1018
  init_Clipboard2();
929
1019
  init_icons();
930
- DEFAULT_ICON = /* @__PURE__ */ jsx(Copy, {});
1020
+ DEFAULT_ICON = /* @__PURE__ */ jsx(icons_exports.Copy, {});
931
1021
  ClipboardButton = ({
932
1022
  // clipboard props
933
1023
  text,
@@ -974,6 +1064,10 @@ var init_ZoomableSvg = __esm({
974
1064
  MAX_SCALE = 3;
975
1065
  ZOOM_STEP = 0.1;
976
1066
  ZoomableSvg = ({ html, copyText, className }) => {
1067
+ const safeHtml = useMemo(
1068
+ () => DOMPurify.sanitize(html, { USE_PROFILES: { svg: true, svgFilters: true } }),
1069
+ [html]
1070
+ );
977
1071
  const containerRef = useRef(null);
978
1072
  const [scale, setScale] = useState(1);
979
1073
  const [translate, setTranslate] = useState({ x: 0, y: 0 });
@@ -1069,7 +1163,7 @@ var init_ZoomableSvg = __esm({
1069
1163
  isFullscreen && "tw-h-full [&>svg]:tw-h-full"
1070
1164
  ),
1071
1165
  style: { transform: `translate(${translate.x}px, ${translate.y}px) scale(${scale})` },
1072
- dangerouslySetInnerHTML: { __html: html }
1166
+ dangerouslySetInnerHTML: { __html: safeHtml }
1073
1167
  }
1074
1168
  )
1075
1169
  }
@@ -1106,7 +1200,7 @@ var init_ZoomableSvg = __esm({
1106
1200
  "aria-label": isFullscreen ? "Exit fullscreen" : "Fullscreen",
1107
1201
  onClick: () => setIsFullscreen((f) => !f),
1108
1202
  argo: true,
1109
- children: isFullscreen ? /* @__PURE__ */ jsx(Minimize2, { className: "tw-size-4" }) : /* @__PURE__ */ jsx(Maximize2, { className: "tw-size-4" })
1203
+ children: isFullscreen ? /* @__PURE__ */ jsx(icons_exports.Minimize2, { className: "tw-size-4" }) : /* @__PURE__ */ jsx(icons_exports.Maximize2, { className: "tw-size-4" })
1110
1204
  }
1111
1205
  )
1112
1206
  }
@@ -1122,7 +1216,7 @@ var init_ZoomableSvg = __esm({
1122
1216
  "div",
1123
1217
  {
1124
1218
  role: "presentation",
1125
- className: "tw-fixed tw-inset-0 tw-z-[1060] tw-bg-neutral-50 tw-p-4",
1219
+ className: "tw-fixed tw-inset-0 tw-z-[1060] tw-bg-muted tw-p-4",
1126
1220
  onClick: stopPropagation,
1127
1221
  children: diagramContent
1128
1222
  }
@@ -1132,7 +1226,7 @@ var init_ZoomableSvg = __esm({
1132
1226
  "div",
1133
1227
  {
1134
1228
  className: cn(
1135
- "tw-overflow-hidden tw-rounded-md tw-border tw-border-neutral-150 tw-bg-neutral-50",
1229
+ "tw-overflow-hidden tw-rounded-md tw-border tw-border-border tw-bg-muted",
1136
1230
  className
1137
1231
  ),
1138
1232
  children: diagramContent
@@ -1154,12 +1248,17 @@ var MermaidDiagram_exports = {};
1154
1248
  __export(MermaidDiagram_exports, {
1155
1249
  MermaidDiagram: () => MermaidDiagram
1156
1250
  });
1157
- var mermaidPromise, getMermaid, stripFontImports, tryFastRender, makeResponsive, RENDER_DEBOUNCE_MS, svgCache, MermaidDiagram;
1251
+ var PRIMARY_FALLBACK_CHANNELS, resolvePrimary, mermaidPromise, getMermaid, stripFontImports, tryFastRender, makeResponsive, RENDER_DEBOUNCE_MS, svgCache, resolveSyncSvg, MermaidDiagram;
1158
1252
  var init_MermaidDiagram = __esm({
1159
1253
  "src/blocks/MermaidDiagram/MermaidDiagram.tsx"() {
1160
1254
  init_Skeleton();
1161
1255
  init_ZoomableSvg2();
1162
1256
  init_utils();
1257
+ PRIMARY_FALLBACK_CHANNELS = "31 143 255";
1258
+ resolvePrimary = () => {
1259
+ const channels = typeof document === "undefined" ? PRIMARY_FALLBACK_CHANNELS : getComputedStyle(document.documentElement).getPropertyValue("--color-primary").trim() || PRIMARY_FALLBACK_CHANNELS;
1260
+ return `rgb(${channels})`;
1261
+ };
1163
1262
  mermaidPromise = null;
1164
1263
  getMermaid = () => {
1165
1264
  if (!mermaidPromise) {
@@ -1208,7 +1307,7 @@ var init_MermaidDiagram = __esm({
1208
1307
  taskTextColor: colors.neutral[800],
1209
1308
  taskTextDarkColor: colors.neutral[800],
1210
1309
  taskTextLightColor: colors.neutral[800],
1211
- activeTaskBorderColor: colors.primary.DEFAULT,
1310
+ activeTaskBorderColor: resolvePrimary(),
1212
1311
  activeTaskBkgColor: colors.secondary[200],
1213
1312
  doneTaskBorderColor: colors.primary[600],
1214
1313
  doneTaskBkgColor: colors.primary[100],
@@ -1260,46 +1359,28 @@ var init_MermaidDiagram = __esm({
1260
1359
  };
1261
1360
  RENDER_DEBOUNCE_MS = 300;
1262
1361
  svgCache = /* @__PURE__ */ new Map();
1362
+ resolveSyncSvg = (code) => {
1363
+ const cached = svgCache.get(code);
1364
+ if (cached) return cached;
1365
+ const fast = tryFastRender(code);
1366
+ if (fast) svgCache.set(code, fast);
1367
+ return fast;
1368
+ };
1263
1369
  MermaidDiagram = ({ code }) => {
1264
1370
  const id = useId();
1265
- const [svg, setSvg] = useState(() => {
1266
- const cached = svgCache.get(code);
1267
- if (cached) return cached;
1268
- const fast = tryFastRender(code);
1269
- if (fast) {
1270
- svgCache.set(code, fast);
1271
- return fast;
1272
- }
1273
- return null;
1274
- });
1371
+ const [svg, setSvg] = useState(() => resolveSyncSvg(code));
1275
1372
  const [renderFailed, setRenderFailed] = useState(false);
1276
1373
  const debounceRef = useRef(null);
1277
1374
  const renderIdRef = useRef(0);
1278
1375
  const [prevCode, setPrevCode] = useState(code);
1279
1376
  if (code !== prevCode) {
1280
1377
  setPrevCode(code);
1281
- const cached = svgCache.get(code);
1282
- const fast = cached ?? tryFastRender(code);
1283
- if (fast && !cached) svgCache.set(code, fast);
1284
- setSvg(fast);
1378
+ setSvg(resolveSyncSvg(code));
1285
1379
  setRenderFailed(false);
1286
1380
  }
1287
1381
  useEffect(() => {
1288
- if (svgCache.has(code)) {
1289
- setSvg(svgCache.get(code));
1290
- setRenderFailed(false);
1291
- return;
1292
- }
1293
- const fastResult = tryFastRender(code);
1294
- if (fastResult) {
1295
- svgCache.set(code, fastResult);
1296
- setSvg(fastResult);
1297
- setRenderFailed(false);
1298
- return;
1299
- }
1300
- setSvg(null);
1382
+ if (svgCache.has(code)) return;
1301
1383
  const currentRenderId = ++renderIdRef.current;
1302
- setRenderFailed(false);
1303
1384
  if (debounceRef.current) {
1304
1385
  clearTimeout(debounceRef.current);
1305
1386
  }
@@ -1549,9 +1630,7 @@ init_utils();
1549
1630
  // src/components/Toast/ToastRoot.tsx
1550
1631
  init_icons();
1551
1632
  init_utils();
1552
- var Icon = ({ ref, icon, ...rest }) => /* @__PURE__ */ jsx(FontAwesomeIcon, { ...rest, ref, icon });
1553
- var isFAIconValue = (value) => typeof value === "string" || Array.isArray(value) && value.length === 2 && typeof value[0] === "string" && typeof value[1] === "string";
1554
- var renderLegacyIcon = (value) => isFAIconValue(value) ? /* @__PURE__ */ jsx(Icon, { icon: value }) : value;
1633
+ init_useIsLegacyBrand();
1555
1634
 
1556
1635
  // src/components/Toast/ToastAction.tsx
1557
1636
  init_utils();
@@ -1636,12 +1715,13 @@ var ToastDismiss = ({
1636
1715
  "[&_svg]:tw-m-1",
1637
1716
  "tw-text-white",
1638
1717
  "group-data-[variant=default]/toast:[&_svg]:tw-text-popover-foreground",
1718
+ "group-data-[variant=default]/toast:group-data-[argo=true]/toast:[&_svg]:tw-text-foreground",
1639
1719
  className
1640
1720
  ),
1641
1721
  type: "button",
1642
1722
  ...rest,
1643
1723
  children: [
1644
- /* @__PURE__ */ jsx(X, {}),
1724
+ /* @__PURE__ */ jsx(icons_exports.X, {}),
1645
1725
  /* @__PURE__ */ jsx("span", { className: "tw-sr-only", children: "Dismiss" })
1646
1726
  ]
1647
1727
  }
@@ -1663,6 +1743,7 @@ var ToastDuration = ({
1663
1743
  className: cn(
1664
1744
  "tw-bg-white/30",
1665
1745
  "group-data-[variant=default]/toast:tw-bg-popover-foreground/20",
1746
+ "group-data-[variant=default]/toast:group-data-[argo=true]/toast:tw-bg-foreground/20",
1666
1747
  "tw-rounded-bl-lg",
1667
1748
  "tw-mx-px",
1668
1749
  // positioning
@@ -1703,6 +1784,7 @@ var ToastTitle = ({
1703
1784
  "tw-self-center",
1704
1785
  "tw-text-white",
1705
1786
  "group-data-[variant=default]/toast:tw-text-popover-foreground",
1787
+ "group-data-[variant=default]/toast:group-data-[argo=true]/toast:tw-text-foreground",
1706
1788
  "tw-break-words",
1707
1789
  "tw-font-medium",
1708
1790
  className
@@ -1749,10 +1831,10 @@ var variants2 = cva(
1749
1831
  }
1750
1832
  );
1751
1833
  var DEFAULT_VARIANT_ICON = {
1752
- error: /* @__PURE__ */ jsx(AlertTriangle, {}),
1753
- info: /* @__PURE__ */ jsx(Info, {}),
1754
- success: /* @__PURE__ */ jsx(CircleCheck, {}),
1755
- warning: /* @__PURE__ */ jsx(AlertCircle, {})
1834
+ error: /* @__PURE__ */ jsx(icons_exports.AlertTriangle, {}),
1835
+ info: /* @__PURE__ */ jsx(icons_exports.Info, {}),
1836
+ success: /* @__PURE__ */ jsx(icons_exports.CircleCheck, {}),
1837
+ warning: /* @__PURE__ */ jsx(icons_exports.AlertCircle, {})
1756
1838
  };
1757
1839
  var ToastRoot = ({
1758
1840
  id,
@@ -1762,11 +1844,14 @@ var ToastRoot = ({
1762
1844
  duration = Infinity,
1763
1845
  variant = "info",
1764
1846
  loading = false,
1765
- icon: iconProp
1847
+ icon: iconProp,
1848
+ argo
1766
1849
  }) => {
1850
+ const isLegacy = useIsLegacyBrand();
1851
+ const renderArgo = !isLegacy || argo;
1767
1852
  const icon = (() => {
1768
- if (loading) return /* @__PURE__ */ jsx(Loader2, { className: "tw-animate-spin" });
1769
- if (iconProp) return renderLegacyIcon(iconProp);
1853
+ if (loading) return /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-animate-spin" });
1854
+ if (iconProp) return iconProp;
1770
1855
  if (variant === "default" || variant === null) return null;
1771
1856
  return DEFAULT_VARIANT_ICON[variant];
1772
1857
  })();
@@ -1774,35 +1859,44 @@ var ToastRoot = ({
1774
1859
  toast$1.dismiss(id);
1775
1860
  action?.onClick(event);
1776
1861
  };
1777
- return /* @__PURE__ */ jsxs("div", { "data-variant": variant, className: cn(variants2({ variant })), children: [
1778
- icon && /* @__PURE__ */ jsx(
1779
- "span",
1780
- {
1781
- "data-slot": "toast-icon",
1782
- className: cn(
1783
- "tw-inline-flex",
1784
- "tw-items-center",
1785
- "tw-justify-center",
1786
- "tw-self-center",
1787
- // styles — container at 20px with no padding so the 20px Lucide
1788
- // glyph fills the slot (previous tw-size-4 + tw-p-1 clipped a
1789
- // 16px child into 8px of visible space)
1790
- "tw-aspect-square",
1791
- "tw-size-5",
1792
- "tw-shrink-0",
1793
- '[&_svg:not([class*="tw-size-"])]:tw-size-5',
1794
- "tw-text-white",
1795
- "group-data-[variant=default]/toast:tw-text-popover-foreground"
1862
+ return /* @__PURE__ */ jsxs(
1863
+ "div",
1864
+ {
1865
+ "data-variant": variant,
1866
+ "data-argo": renderArgo,
1867
+ className: cn(
1868
+ variants2({ variant }),
1869
+ "data-[variant=default]:data-[argo=true]:tw-bg-background"
1870
+ ),
1871
+ children: [
1872
+ icon && /* @__PURE__ */ jsx(
1873
+ "span",
1874
+ {
1875
+ "data-slot": "toast-icon",
1876
+ className: cn(
1877
+ "tw-inline-flex",
1878
+ "tw-items-center",
1879
+ "tw-justify-center",
1880
+ "tw-self-center",
1881
+ "tw-aspect-square",
1882
+ "tw-size-5",
1883
+ "tw-shrink-0",
1884
+ '[&_svg:not([class*="tw-size-"])]:tw-size-5',
1885
+ "tw-text-white",
1886
+ "group-data-[variant=default]/toast:tw-text-popover-foreground",
1887
+ "group-data-[variant=default]/toast:group-data-[argo=true]/toast:tw-text-foreground"
1888
+ ),
1889
+ children: icon
1890
+ }
1796
1891
  ),
1797
- children: icon
1798
- }
1799
- ),
1800
- /* @__PURE__ */ jsx(ToastTitle, { children: title }),
1801
- description && /* @__PURE__ */ jsx(ToastDescription, { children: description }),
1802
- action && /* @__PURE__ */ jsx(ToastAction, { style: action?.actionButtonStyle, onClick: handleActionClick, children: action.label }),
1803
- /* @__PURE__ */ jsx(ToastDismiss, { onClick: () => toast$1.dismiss(id) }),
1804
- duration !== Infinity && /* @__PURE__ */ jsx(ToastDuration, { duration })
1805
- ] });
1892
+ /* @__PURE__ */ jsx(ToastTitle, { children: title }),
1893
+ description && /* @__PURE__ */ jsx(ToastDescription, { children: description }),
1894
+ action && /* @__PURE__ */ jsx(ToastAction, { style: action?.actionButtonStyle, onClick: handleActionClick, children: action.label }),
1895
+ /* @__PURE__ */ jsx(ToastDismiss, { onClick: () => toast$1.dismiss(id) }),
1896
+ duration !== Infinity && /* @__PURE__ */ jsx(ToastDuration, { duration })
1897
+ ]
1898
+ }
1899
+ );
1806
1900
  };
1807
1901
  var toast = ({
1808
1902
  onAutoClose,
@@ -2193,6 +2287,9 @@ init_icons();
2193
2287
  init_icons();
2194
2288
  init_utils();
2195
2289
 
2290
+ // src/components/DropdownMenu/DropdownMenu.tsx
2291
+ init_useIsLegacyBrand();
2292
+
2196
2293
  // src/components/DropdownMenu/DropdownMenuCheckboxItem.tsx
2197
2294
  init_icons();
2198
2295
  init_utils();
@@ -2265,9 +2362,9 @@ var DropdownMenuItemIndicator = ({
2265
2362
  ...rest
2266
2363
  }) => {
2267
2364
  const IconComp = (() => {
2268
- if (variant === "switch") return ToggleRight;
2269
- if (variant === "radio") return Circle;
2270
- return Check;
2365
+ if (variant === "switch") return icons_exports.ToggleRight;
2366
+ if (variant === "radio") return icons_exports.Circle;
2367
+ return icons_exports.Check;
2271
2368
  })();
2272
2369
  const forceMount = (() => {
2273
2370
  if (forceMountProp) return true;
@@ -2341,17 +2438,16 @@ var itemVariants = cn(
2341
2438
  "group-data-[variant=default]/dropdown-menu-content:hover:tw-bg-neutral-100",
2342
2439
  "group-data-[variant=default]/dropdown-menu-content:hover:tw-text-neutral-900",
2343
2440
  "group-data-[variant=argo]/dropdown-menu-content:tw-rounded-md",
2344
- "group-data-[variant=argo]/dropdown-menu-content:tw-text-slate-800",
2345
- "group-data-[variant=argo]/dropdown-menu-content:focus:tw-text-slate-800",
2346
- "group-data-[variant=argo]/dropdown-menu-content:focus:tw-bg-sky-100",
2347
- "group-data-[variant=argo]/dropdown-menu-content:hover:tw-text-slate-800",
2348
- "group-data-[variant=argo]/dropdown-menu-content:hover:tw-bg-sky-100"
2441
+ "group-data-[variant=argo]/dropdown-menu-content:tw-text-popover-foreground",
2442
+ "group-data-[variant=argo]/dropdown-menu-content:focus:tw-text-accent-foreground",
2443
+ "group-data-[variant=argo]/dropdown-menu-content:focus:tw-bg-accent",
2444
+ "group-data-[variant=argo]/dropdown-menu-content:hover:tw-text-accent-foreground",
2445
+ "group-data-[variant=argo]/dropdown-menu-content:hover:tw-bg-accent"
2349
2446
  );
2350
2447
  var contentVariants = cn(
2351
2448
  "tailwindcss-preflight",
2352
2449
  "tw-group/dropdown-menu-content",
2353
2450
  "tw-z-[1040]",
2354
- "tw-bg-white",
2355
2451
  // positioning
2356
2452
  "tw-flex",
2357
2453
  "tw-flex-col",
@@ -2362,8 +2458,16 @@ var contentVariants = cn(
2362
2458
  // border
2363
2459
  "tw-border",
2364
2460
  "tw-shadow-md",
2461
+ // Legacy surface — fixed white panel.
2365
2462
  "data-[variant=default]:tw-rounded-md",
2463
+ "data-[variant=default]:tw-bg-white",
2464
+ "data-[variant=default]:tw-border-neutral-100",
2465
+ "data-[variant=default]:tw-text-neutral-800",
2466
+ // Argo surface — semantic popover tokens (brand + dark aware).
2366
2467
  "data-[variant=argo]:tw-rounded-2xl",
2468
+ "data-[variant=argo]:tw-bg-popover",
2469
+ "data-[variant=argo]:tw-text-popover-foreground",
2470
+ "data-[variant=argo]:tw-border-border",
2367
2471
  // animations
2368
2472
  "data-[state=open]:tw-animate-in",
2369
2473
  "data-[state=open]:tw-fade-in-0",
@@ -2388,7 +2492,7 @@ var DropdownMenuCheckboxItem = ({
2388
2492
  ...props
2389
2493
  }) => {
2390
2494
  const isAtStart = indicatorAlign === "start";
2391
- const indicatorEle = isLoading ? /* @__PURE__ */ jsx(ItemIcon, { className: isAtStart ? "" : "tw-ml-auto", children: /* @__PURE__ */ jsx(Loader2, { className: "tw-animate-spin" }) }) : /* @__PURE__ */ jsx(DropdownMenuItemIndicator, { variant: indicator, className: isAtStart ? "" : "tw-ml-auto" });
2495
+ const indicatorEle = isLoading ? /* @__PURE__ */ jsx(ItemIcon, { className: isAtStart ? "" : "tw-ml-auto", children: /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-animate-spin" }) }) : /* @__PURE__ */ jsx(DropdownMenuItemIndicator, { variant: indicator, className: isAtStart ? "" : "tw-ml-auto" });
2392
2496
  const handleSelect = (event) => {
2393
2497
  if (!closeOnSelect) event.preventDefault();
2394
2498
  onSelect?.(event);
@@ -2423,7 +2527,6 @@ var ScrollBar = ({ className, orientation = "vertical", ...props }) => /* @__PUR
2423
2527
  orientation,
2424
2528
  className: cn(
2425
2529
  "tw-flex tw-touch-none tw-select-none tw-transition-color",
2426
- '[data-state="hidden"]:tw-bg-pink-500',
2427
2530
  {
2428
2531
  "tw-h-full tw-w-2.5 tw-p-px": orientation === "vertical",
2429
2532
  "tw-h-2.5 tw-flex-col tw-p-px": orientation === "horizontal"
@@ -2438,8 +2541,8 @@ var ScrollBar = ({ className, orientation = "vertical", ...props }) => /* @__PUR
2438
2541
  "tw-relative",
2439
2542
  "tw-flex-1",
2440
2543
  "tw-rounded-full",
2441
- "tw-bg-neutral-200",
2442
- "hover:tw-bg-neutral-400"
2544
+ "tw-bg-border",
2545
+ "hover:tw-bg-muted-foreground"
2443
2546
  )
2444
2547
  }
2445
2548
  )
@@ -2538,7 +2641,7 @@ var DropdownMenuItem = ({
2538
2641
  ...props
2539
2642
  }) => {
2540
2643
  const Comp = asChild ? Root$2 : "div";
2541
- const adornment = isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "tw-animate-spin" }) : renderLegacyIcon(icon);
2644
+ const adornment = isLoading ? /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-animate-spin" }) : icon;
2542
2645
  const handleOnSelect = (event) => {
2543
2646
  if (asModalTrigger) event.preventDefault();
2544
2647
  onSelect?.(event);
@@ -2653,7 +2756,7 @@ var DropdownMenuRadioItem = ({
2653
2756
  ...props
2654
2757
  }) => {
2655
2758
  const isAtStart = indicatorAlign === "start";
2656
- const indicatorEle = isLoading ? /* @__PURE__ */ jsx(ItemIcon, { className: iconClassName, children: /* @__PURE__ */ jsx(Loader2, { className: "tw-animate-spin" }) }) : /* @__PURE__ */ jsx(DropdownMenuItemIndicator, { variant: indicator });
2759
+ const indicatorEle = isLoading ? /* @__PURE__ */ jsx(ItemIcon, { className: iconClassName, children: /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-animate-spin" }) }) : /* @__PURE__ */ jsx(DropdownMenuItemIndicator, { variant: indicator });
2657
2760
  const handleSelect = (event) => {
2658
2761
  if (!closeOnSelect) event.preventDefault();
2659
2762
  onSelect?.(event);
@@ -2674,7 +2777,7 @@ var DropdownMenuRadioItem = ({
2674
2777
  ...props,
2675
2778
  children: [
2676
2779
  isAtStart && indicatorEle,
2677
- icon && /* @__PURE__ */ jsx(ItemIcon, { className: iconClassName, children: renderLegacyIcon(icon) }),
2780
+ icon && /* @__PURE__ */ jsx(ItemIcon, { className: iconClassName, children: icon }),
2678
2781
  /* @__PURE__ */ jsx("span", { className: "tw-flex tw-min-w-0 tw-flex-1 tw-items-center tw-gap-2", children }),
2679
2782
  !isAtStart && indicatorEle
2680
2783
  ]
@@ -2730,7 +2833,7 @@ init_utils();
2730
2833
  var DropdownMenuSubTrigger = ({ className, children, ...props }) => {
2731
2834
  return /* @__PURE__ */ jsxs(DropdownMenuPrimitive3.SubTrigger, { className: cn(itemVariants, className), ...props, children: [
2732
2835
  children,
2733
- /* @__PURE__ */ jsx(ChevronRight, { className: "tw-ml-auto tw-size-5" })
2836
+ /* @__PURE__ */ jsx(icons_exports.ChevronRight, { className: "tw-ml-auto tw-size-5" })
2734
2837
  ] });
2735
2838
  };
2736
2839
 
@@ -2752,10 +2855,12 @@ var DropdownMenuTrigger = ({
2752
2855
  var DropdownMenu = ({
2753
2856
  // change a default value to false, for modal property, as it is not used in most cases
2754
2857
  modal = false,
2755
- variant = "default",
2858
+ variant,
2756
2859
  ...props
2757
2860
  }) => {
2758
- const contextValue = useMemo(() => ({ variant }), [variant]);
2861
+ const isLegacy = useIsLegacyBrand();
2862
+ const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : "default";
2863
+ const contextValue = useMemo(() => ({ variant: effectiveVariant }), [effectiveVariant]);
2759
2864
  return /* @__PURE__ */ jsx(DropdownMenuContext, { value: contextValue, children: /* @__PURE__ */ jsx(Root$1, { ...props, modal }) });
2760
2865
  };
2761
2866
  DropdownMenu.Trigger = DropdownMenuTrigger;
@@ -2775,10 +2880,10 @@ DropdownMenu.ItemDescription = DropdownMenuItemDescription;
2775
2880
  // src/components/MarkdownEditor/plugins/toolbar/AlignmentDropdown.tsx
2776
2881
  init_Tooltip2();
2777
2882
  var ALIGNMENT_OPTIONS = [
2778
- { value: "left", label: "Left", icon: AlignLeft },
2779
- { value: "center", label: "Center", icon: AlignCenter },
2780
- { value: "right", label: "Right", icon: AlignRight },
2781
- { value: "justify", label: "Justify", icon: AlignJustify }
2883
+ { value: "left", label: "Left", icon: icons_exports.AlignLeft },
2884
+ { value: "center", label: "Center", icon: icons_exports.AlignCenter },
2885
+ { value: "right", label: "Right", icon: icons_exports.AlignRight },
2886
+ { value: "justify", label: "Justify", icon: icons_exports.AlignJustify }
2782
2887
  ];
2783
2888
  var ALIGNMENT_ICONS = Object.fromEntries(
2784
2889
  ALIGNMENT_OPTIONS.map(({ value, icon }) => [value, icon])
@@ -2804,7 +2909,7 @@ var AlignmentDropdown = ({
2804
2909
  editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, align);
2805
2910
  });
2806
2911
  };
2807
- const CurrentAlignmentIcon = ALIGNMENT_ICONS[alignment] ?? AlignLeft;
2912
+ const CurrentAlignmentIcon = ALIGNMENT_ICONS[alignment] ?? icons_exports.AlignLeft;
2808
2913
  return /* @__PURE__ */ jsxs(DropdownMenu, { onOpenChange: handleOpenChange, children: [
2809
2914
  /* @__PURE__ */ jsx(Tooltip, { tooltip: "Text alignment", placement: "top", triggerAsChild: true, children: /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
2810
2915
  "button",
@@ -2816,7 +2921,7 @@ var AlignmentDropdown = ({
2816
2921
  ),
2817
2922
  children: [
2818
2923
  /* @__PURE__ */ jsx(CurrentAlignmentIcon, { className: "tw-size-4" }),
2819
- /* @__PURE__ */ jsx(ChevronDown, { className: "tw-size-3" })
2924
+ /* @__PURE__ */ jsx(icons_exports.ChevronDown, { className: "tw-size-3" })
2820
2925
  ]
2821
2926
  }
2822
2927
  ) }) }),
@@ -2843,14 +2948,14 @@ init_icons();
2843
2948
  init_utils();
2844
2949
  init_Tooltip2();
2845
2950
  var BLOCK_TYPE_META = {
2846
- paragraph: { label: "Normal", icon: Type, selectable: true },
2847
- h1: { label: "Heading 1", icon: Heading1, selectable: true },
2848
- h2: { label: "Heading 2", icon: Heading2, selectable: true },
2849
- h3: { label: "Heading 3", icon: Heading3, selectable: true },
2850
- bullet: { label: "Bullet List", icon: List, selectable: false },
2851
- number: { label: "Numbered List", icon: ListOrdered, selectable: false },
2852
- quote: { label: "Quote", icon: Quote, selectable: false },
2853
- code: { label: "Code Block", icon: SquareCode, selectable: false }
2951
+ paragraph: { label: "Normal", icon: icons_exports.Type, selectable: true },
2952
+ h1: { label: "Heading 1", icon: icons_exports.Heading1, selectable: true },
2953
+ h2: { label: "Heading 2", icon: icons_exports.Heading2, selectable: true },
2954
+ h3: { label: "Heading 3", icon: icons_exports.Heading3, selectable: true },
2955
+ bullet: { label: "Bullet List", icon: icons_exports.List, selectable: false },
2956
+ number: { label: "Numbered List", icon: icons_exports.ListOrdered, selectable: false },
2957
+ quote: { label: "Quote", icon: icons_exports.Quote, selectable: false },
2958
+ code: { label: "Code Block", icon: icons_exports.SquareCode, selectable: false }
2854
2959
  };
2855
2960
  var BLOCK_TYPE_OPTIONS = Object.entries(BLOCK_TYPE_META).filter(([, meta]) => meta.selectable).map(([value, { label, icon }]) => ({ value, label, icon }));
2856
2961
  var isBlockType = (value) => Object.prototype.hasOwnProperty.call(BLOCK_TYPE_META, value);
@@ -2860,7 +2965,7 @@ var BlockTypeDropdown = ({
2860
2965
  }) => {
2861
2966
  const savedSelectionRef = useRef(null);
2862
2967
  const currentMeta = isBlockType(blockType) ? BLOCK_TYPE_META[blockType] : null;
2863
- const CurrentBlockIcon = currentMeta?.icon ?? Type;
2968
+ const CurrentBlockIcon = currentMeta?.icon ?? icons_exports.Type;
2864
2969
  const handleOpenChange = (open) => {
2865
2970
  if (open) {
2866
2971
  editor.getEditorState().read(() => {
@@ -2903,7 +3008,7 @@ var BlockTypeDropdown = ({
2903
3008
  children: [
2904
3009
  /* @__PURE__ */ jsx(CurrentBlockIcon, { className: "tw-size-4" }),
2905
3010
  currentMeta?.label ?? "Normal",
2906
- /* @__PURE__ */ jsx(ChevronDown, { className: "tw-size-3" })
3011
+ /* @__PURE__ */ jsx(icons_exports.ChevronDown, { className: "tw-size-3" })
2907
3012
  ]
2908
3013
  }
2909
3014
  ) }) }),
@@ -3004,6 +3109,7 @@ var useFormGroupContext = () => use(FormGroupContext);
3004
3109
 
3005
3110
  // src/components/InputGroup/InputGroup.tsx
3006
3111
  init_utils();
3112
+ init_useIsLegacyBrand();
3007
3113
 
3008
3114
  // src/components/InputGroup/InputGroupAddon.tsx
3009
3115
  init_utils();
@@ -3013,7 +3119,7 @@ var addonVariants = cva(
3013
3119
  "tw-items-center",
3014
3120
  "tw-gap-1",
3015
3121
  // Default size for nested Lucide icons in prefix/suffix slots; callers can override on the icon.
3016
- "[&_svg:not([class*='tw-size-'])]:tw-size-4",
3122
+ "[&_svg.lucide:not([class*='tw-size-'])]:tw-size-4",
3017
3123
  "[&_svg]:tw-shrink-0"
3018
3124
  ],
3019
3125
  {
@@ -3302,7 +3408,8 @@ var inputGroupVariants = cva(
3302
3408
  "has-[:is(input,textarea):disabled]:tw-opacity-40"
3303
3409
  ],
3304
3410
  argo: [
3305
- "tw-bg-background",
3411
+ // muted filled input surface — gray, distinct from white containers; not the app-background token
3412
+ "tw-bg-muted",
3306
3413
  "tw-border-input",
3307
3414
  "tw-rounded-lg",
3308
3415
  "tw-text-foreground",
@@ -3356,15 +3463,28 @@ var InputGroupRoot = ({
3356
3463
  focusVariant,
3357
3464
  className,
3358
3465
  ...props
3359
- }) => /* @__PURE__ */ jsx(
3360
- "div",
3361
- {
3362
- ...props,
3363
- ref,
3364
- className: cn(inputGroupVariants({ state, variant, sizing, focusVariant, className })),
3365
- children
3366
- }
3367
- );
3466
+ }) => {
3467
+ const isLegacy = useIsLegacyBrand();
3468
+ const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : variant;
3469
+ const effectiveSizing = effectiveVariant === "argo" ? "medium" : sizing;
3470
+ return /* @__PURE__ */ jsx(
3471
+ "div",
3472
+ {
3473
+ ...props,
3474
+ ref,
3475
+ className: cn(
3476
+ inputGroupVariants({
3477
+ state,
3478
+ variant: effectiveVariant,
3479
+ sizing: effectiveSizing,
3480
+ focusVariant,
3481
+ className
3482
+ })
3483
+ ),
3484
+ children
3485
+ }
3486
+ );
3487
+ };
3368
3488
  var InputGroup = InputGroupRoot;
3369
3489
  InputGroup.Input = InputGroupInput;
3370
3490
  InputGroup.Addon = InputGroupAddon;
@@ -3440,7 +3560,7 @@ var ColorPicker = ({ value, disabled, readOnly, ...props }) => {
3440
3560
  disabled: disabled || readOnly,
3441
3561
  onClick: handleOpenPicker,
3442
3562
  "aria-label": "Pick color",
3443
- children: /* @__PURE__ */ jsx(Pipette, { className: "tw-size-4" })
3563
+ children: /* @__PURE__ */ jsx(icons_exports.Pipette, { className: "tw-size-4" })
3444
3564
  }
3445
3565
  )
3446
3566
  ] });
@@ -3559,7 +3679,7 @@ var ColorInput = ({
3559
3679
  onMouseDown: (event) => event.preventDefault(),
3560
3680
  onClick: handleClear,
3561
3681
  "aria-label": "Clear color",
3562
- children: /* @__PURE__ */ jsx(X, { className: "tw-size-4" })
3682
+ children: /* @__PURE__ */ jsx(icons_exports.X, { className: "tw-size-4" })
3563
3683
  }
3564
3684
  ),
3565
3685
  /* @__PURE__ */ jsx(
@@ -3589,8 +3709,8 @@ var helpVariants = cva(["tw-m-0", "tw-text-xs"], {
3589
3709
  },
3590
3710
  variants: {
3591
3711
  state: {
3592
- default: ["tw-text-neutral-500"],
3593
- error: ["tw-text-error-500"],
3712
+ default: ["tw-text-muted-foreground"],
3713
+ error: ["tw-text-destructive"],
3594
3714
  warning: ["tw-text-warning-500"]
3595
3715
  }
3596
3716
  }
@@ -3669,7 +3789,7 @@ var Textarea = ({
3669
3789
  containerClassName,
3670
3790
  // group props
3671
3791
  state = "default",
3672
- variant = "primary",
3792
+ variant,
3673
3793
  sizing,
3674
3794
  focusVariant,
3675
3795
  ...rest
@@ -3794,14 +3914,14 @@ var Input = ({
3794
3914
  onMouseDown: (e) => e.preventDefault(),
3795
3915
  onClick: handleClear,
3796
3916
  "data-testid": testId.clearButton,
3797
- children: /* @__PURE__ */ jsx(X, { className: "tw-size-4" })
3917
+ children: /* @__PURE__ */ jsx(icons_exports.X, { className: "tw-size-4" })
3798
3918
  }
3799
3919
  ),
3800
3920
  rightSuffix && /* @__PURE__ */ jsx(
3801
3921
  "div",
3802
3922
  {
3803
3923
  className: cn({
3804
- "tw-whitespace-nowrap tw-bg-neutral-200 tw-px-4 -tw-mr-4 tw-py-2.5": rightSuffixVariant === "addon"
3924
+ "tw-whitespace-nowrap tw-bg-muted tw-px-4 -tw-mr-4 tw-py-2.5": rightSuffixVariant === "addon"
3805
3925
  }),
3806
3926
  children: rightSuffix
3807
3927
  }
@@ -3820,6 +3940,7 @@ var TextInput = ({
3820
3940
  value,
3821
3941
  defaultValue,
3822
3942
  type = "text",
3943
+ variant,
3823
3944
  onValueChange,
3824
3945
  onChange,
3825
3946
  onValueBlur,
@@ -3842,6 +3963,7 @@ var TextInput = ({
3842
3963
  onChange: handleChange,
3843
3964
  onBlur: handleBlur,
3844
3965
  type,
3966
+ variant,
3845
3967
  value: sanitizeTextInputValue(value),
3846
3968
  defaultValue: sanitizeTextInputValue(defaultValue)
3847
3969
  }
@@ -3865,7 +3987,7 @@ FormGroup.Textarea = FormGroupTextarea;
3865
3987
 
3866
3988
  // src/components/Label/Label.tsx
3867
3989
  init_utils();
3868
- var Optional = ({ className }) => /* @__PURE__ */ jsx("span", { className: cn("tw-text-neutral-400", className), children: "(optional)" });
3990
+ var Optional = ({ className }) => /* @__PURE__ */ jsx("span", { className: cn("tw-text-muted-foreground", className), children: "(optional)" });
3869
3991
  var Label2 = ({ className, children, id, htmlFor, ...rest }) => {
3870
3992
  return /* @__PURE__ */ jsx(
3871
3993
  RLabel.Root,
@@ -3874,7 +3996,7 @@ var Label2 = ({ className, children, id, htmlFor, ...rest }) => {
3874
3996
  id: id?.toString(),
3875
3997
  htmlFor: htmlFor?.toString(),
3876
3998
  className: cn(
3877
- "tw-m-0 tw-text-neutral-800 tw-font-normal peer-disabled:tw-opacity-50",
3999
+ "tw-m-0 tw-text-foreground tw-font-normal peer-disabled:tw-opacity-50",
3878
4000
  className
3879
4001
  ),
3880
4002
  children
@@ -3974,12 +4096,12 @@ var LinkPanel = ({ editor, isLink }) => {
3974
4096
  active: true,
3975
4097
  onClick: () => editor.dispatchCommand(TOGGLE_LINK_COMMAND, null),
3976
4098
  tooltip: "Remove Link",
3977
- children: /* @__PURE__ */ jsx(Link, { className: "tw-size-4" })
4099
+ children: /* @__PURE__ */ jsx(icons_exports.Link, { className: "tw-size-4" })
3978
4100
  }
3979
4101
  );
3980
4102
  }
3981
4103
  return /* @__PURE__ */ jsxs("div", { className: "tw-relative", children: [
3982
- /* @__PURE__ */ jsx(ToolbarButton, { active: open, onClick: handleOpen, tooltip: "Insert Link", children: /* @__PURE__ */ jsx(Link, { className: "tw-size-4" }) }),
4104
+ /* @__PURE__ */ jsx(ToolbarButton, { active: open, onClick: handleOpen, tooltip: "Insert Link", children: /* @__PURE__ */ jsx(icons_exports.Link, { className: "tw-size-4" }) }),
3983
4105
  open && /* @__PURE__ */ jsx(
3984
4106
  "div",
3985
4107
  {
@@ -4143,7 +4265,7 @@ var ToolbarPlugin = () => {
4143
4265
  active: isBold,
4144
4266
  onClick: () => editor.dispatchCommand(FORMAT_TEXT_COMMAND, "bold"),
4145
4267
  tooltip: "Bold (Ctrl+B)",
4146
- children: /* @__PURE__ */ jsx(Bold, { className: "tw-size-4" })
4268
+ children: /* @__PURE__ */ jsx(icons_exports.Bold, { className: "tw-size-4" })
4147
4269
  }
4148
4270
  ),
4149
4271
  /* @__PURE__ */ jsx(
@@ -4152,7 +4274,7 @@ var ToolbarPlugin = () => {
4152
4274
  active: isItalic,
4153
4275
  onClick: () => editor.dispatchCommand(FORMAT_TEXT_COMMAND, "italic"),
4154
4276
  tooltip: "Italic (Ctrl+I)",
4155
- children: /* @__PURE__ */ jsx(Italic, { className: "tw-size-4" })
4277
+ children: /* @__PURE__ */ jsx(icons_exports.Italic, { className: "tw-size-4" })
4156
4278
  }
4157
4279
  ),
4158
4280
  /* @__PURE__ */ jsx(
@@ -4161,7 +4283,7 @@ var ToolbarPlugin = () => {
4161
4283
  active: isUnderline,
4162
4284
  onClick: () => editor.dispatchCommand(FORMAT_TEXT_COMMAND, "underline"),
4163
4285
  tooltip: "Underline (Ctrl+U)",
4164
- children: /* @__PURE__ */ jsx(Underline, { className: "tw-size-4" })
4286
+ children: /* @__PURE__ */ jsx(icons_exports.Underline, { className: "tw-size-4" })
4165
4287
  }
4166
4288
  ),
4167
4289
  /* @__PURE__ */ jsx(
@@ -4170,7 +4292,7 @@ var ToolbarPlugin = () => {
4170
4292
  active: isStrikethrough,
4171
4293
  onClick: () => editor.dispatchCommand(FORMAT_TEXT_COMMAND, "strikethrough"),
4172
4294
  tooltip: "Strikethrough",
4173
- children: /* @__PURE__ */ jsx(Strikethrough, { className: "tw-size-4" })
4295
+ children: /* @__PURE__ */ jsx(icons_exports.Strikethrough, { className: "tw-size-4" })
4174
4296
  }
4175
4297
  ),
4176
4298
  /* @__PURE__ */ jsx(
@@ -4179,7 +4301,7 @@ var ToolbarPlugin = () => {
4179
4301
  active: isCode,
4180
4302
  onClick: () => editor.dispatchCommand(FORMAT_TEXT_COMMAND, "code"),
4181
4303
  tooltip: "Inline Code",
4182
- children: /* @__PURE__ */ jsx(Code, { className: "tw-size-4" })
4304
+ children: /* @__PURE__ */ jsx(icons_exports.Code, { className: "tw-size-4" })
4183
4305
  }
4184
4306
  ),
4185
4307
  /* @__PURE__ */ jsx(ToolbarDivider, {}),
@@ -4197,7 +4319,7 @@ var ToolbarPlugin = () => {
4197
4319
  }
4198
4320
  },
4199
4321
  tooltip: "Bullet List",
4200
- children: /* @__PURE__ */ jsx(List, { className: "tw-size-4" })
4322
+ children: /* @__PURE__ */ jsx(icons_exports.List, { className: "tw-size-4" })
4201
4323
  }
4202
4324
  ),
4203
4325
  /* @__PURE__ */ jsx(
@@ -4212,7 +4334,7 @@ var ToolbarPlugin = () => {
4212
4334
  }
4213
4335
  },
4214
4336
  tooltip: "Numbered List",
4215
- children: /* @__PURE__ */ jsx(ListOrdered, { className: "tw-size-4" })
4337
+ children: /* @__PURE__ */ jsx(icons_exports.ListOrdered, { className: "tw-size-4" })
4216
4338
  }
4217
4339
  ),
4218
4340
  /* @__PURE__ */ jsx(ToolbarDivider, {}),
@@ -4234,7 +4356,7 @@ var ToolbarPlugin = () => {
4234
4356
  });
4235
4357
  },
4236
4358
  tooltip: "Quote",
4237
- children: /* @__PURE__ */ jsx(Quote, { className: "tw-size-4" })
4359
+ children: /* @__PURE__ */ jsx(icons_exports.Quote, { className: "tw-size-4" })
4238
4360
  }
4239
4361
  ),
4240
4362
  /* @__PURE__ */ jsx(
@@ -4253,7 +4375,7 @@ var ToolbarPlugin = () => {
4253
4375
  });
4254
4376
  },
4255
4377
  tooltip: "Code Block",
4256
- children: /* @__PURE__ */ jsx(SquareCode, { className: "tw-size-4" })
4378
+ children: /* @__PURE__ */ jsx(icons_exports.SquareCode, { className: "tw-size-4" })
4257
4379
  }
4258
4380
  )
4259
4381
  ]
@@ -4265,25 +4387,25 @@ var ToolbarPlugin = () => {
4265
4387
 
4266
4388
  // src/components/MarkdownEditor/theme.ts
4267
4389
  var editorTheme = {
4268
- link: "tw-cursor-pointer !tw-text-secondary-500 tw-underline",
4390
+ link: "tw-cursor-pointer !tw-text-primary tw-underline",
4269
4391
  text: {
4270
4392
  bold: "tw-font-bold",
4271
4393
  italic: "tw-italic",
4272
4394
  strikethrough: "tw-line-through",
4273
4395
  underline: "tw-underline",
4274
- code: "tw-rounded tw-bg-neutral-100 tw-px-1 tw-py-0.5 tw-font-mono tw-text-[0.85em]"
4396
+ code: "tw-rounded tw-bg-muted tw-px-1 tw-py-0.5 tw-font-mono tw-text-[0.85em]"
4275
4397
  },
4276
4398
  list: {
4277
4399
  ol: "!tw-list-decimal",
4278
4400
  ul: "!tw-list-disc",
4279
4401
  checklist: "!tw-list-none !tw-pl-0",
4280
4402
  listitemChecked: [
4281
- "tw-relative !tw-pl-6 tw-list-none tw-outline-none tw-line-through tw-text-neutral-400",
4403
+ "tw-relative !tw-pl-6 tw-list-none tw-outline-none tw-line-through tw-text-muted-foreground",
4282
4404
  'before:tw-content-[""] before:tw-absolute before:tw-left-0 before:tw-top-[3px]',
4283
4405
  "before:tw-size-4 before:tw-rounded before:tw-border before:tw-border-solid",
4284
- "before:tw-bg-secondary-500 before:tw-border-secondary-500 before:tw-cursor-pointer",
4406
+ "before:tw-bg-primary before:tw-border-primary before:tw-cursor-pointer",
4285
4407
  'after:tw-content-[""] after:tw-absolute after:tw-left-[5.5px] after:tw-top-[5.5px]',
4286
- "after:tw-w-1 after:tw-h-2 after:tw-border-white after:tw-border-solid",
4408
+ "after:tw-w-1 after:tw-h-2 after:tw-border-primary-foreground after:tw-border-solid",
4287
4409
  "after:tw-border-r-[1.5px] after:tw-border-b-[1.5px] after:tw-border-t-0 after:tw-border-l-0",
4288
4410
  "after:tw-rotate-45"
4289
4411
  ].join(" "),
@@ -4291,7 +4413,7 @@ var editorTheme = {
4291
4413
  "tw-relative !tw-pl-6 tw-list-none tw-outline-none",
4292
4414
  'before:tw-content-[""] before:tw-absolute before:tw-left-0 before:tw-top-[3px]',
4293
4415
  "before:tw-size-4 before:tw-rounded before:tw-border before:tw-border-solid",
4294
- "before:tw-border-neutral-200 before:tw-bg-white before:tw-cursor-pointer"
4416
+ "before:tw-border-input before:tw-bg-background before:tw-cursor-pointer"
4295
4417
  ].join(" ")
4296
4418
  }
4297
4419
  };
@@ -4379,7 +4501,7 @@ var MarkdownEditor = ({
4379
4501
  // but a matching negative margin shifts the wrapper outward so the text itself stays
4380
4502
  // aligned with the parent's content edge (i.e. with where static text would render).
4381
4503
  compact ? "tw-px-1.5 tw-py-0.5 -tw-mx-1.5 -tw-my-0.5" : "tw-p-2",
4382
- editable && "tw-cursor-text hover:tw-bg-neutral-50 focus-within:tw-ring-2 focus-within:tw-ring-secondary-500/40"
4504
+ editable && "tw-cursor-text hover:tw-bg-muted focus-within:tw-ring-2 focus-within:tw-ring-primary/40"
4383
4505
  ),
4384
4506
  children: /* @__PURE__ */ jsx(
4385
4507
  RichTextPlugin,
@@ -4394,7 +4516,7 @@ var MarkdownEditor = ({
4394
4516
  "div",
4395
4517
  {
4396
4518
  className: cn(
4397
- "tw-pointer-events-none tw-absolute tw-select-none tw-text-neutral-400",
4519
+ "tw-pointer-events-none tw-absolute tw-select-none tw-text-muted-foreground",
4398
4520
  compact ? "tw-left-1.5 tw-top-0.5" : "tw-left-2 tw-top-[calc(0.5rem+0.35em)]"
4399
4521
  ),
4400
4522
  children: placeholder