@keboola/design 3.0.0 → 3.1.1

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.
@@ -2,12 +2,14 @@
2
2
 
3
3
  var clsx = require('clsx');
4
4
  var tailwindMerge = require('tailwind-merge');
5
+ var react = require('react');
6
+ var brandRegistry = require('@keboola/brand-registry');
5
7
  var reactTooltip = require('@radix-ui/react-tooltip');
6
8
  var classVarianceAuthority = require('class-variance-authority');
7
9
  var jsxRuntime = require('react/jsx-runtime');
8
- var react = require('react');
9
10
  var lucide_react_star = require('lucide-react');
10
11
  var reactSlot = require('@radix-ui/react-slot');
12
+ var DOMPurify = require('dompurify');
11
13
  var beautifulMermaid = require('beautiful-mermaid');
12
14
  var colors = require('@keboola/tailwind-config/colors');
13
15
  var code = require('@lexical/code');
@@ -60,6 +62,7 @@ function _interopNamespace(e) {
60
62
  }
61
63
 
62
64
  var lucide_react_star__namespace = /*#__PURE__*/_interopNamespace(lucide_react_star);
65
+ var DOMPurify__default = /*#__PURE__*/_interopDefault(DOMPurify);
63
66
  var colors__default = /*#__PURE__*/_interopDefault(colors);
64
67
  var DropdownMenuPrimitive3__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive3);
65
68
  var ScrollAreaPrimitive2__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive2);
@@ -154,20 +157,62 @@ var init_keyCodes = __esm({
154
157
  };
155
158
  }
156
159
  });
160
+ var ThemeContext;
161
+ var init_themeContext = __esm({
162
+ "src/components/ThemeProvider/themeContext.ts"() {
163
+ ThemeContext = react.createContext(null);
164
+ }
165
+ });
166
+ var useIsLegacyBrand;
167
+ var init_useIsLegacyBrand = __esm({
168
+ "src/components/internal/useIsLegacyBrand.ts"() {
169
+ init_themeContext();
170
+ useIsLegacyBrand = () => {
171
+ const context = react.use(ThemeContext);
172
+ return context === null || context.brand.id === brandRegistry.keboolaLegacy.id;
173
+ };
174
+ }
175
+ });
157
176
  var tooltipVariants, TooltipContent;
158
177
  var init_TooltipContent = __esm({
159
178
  "src/components/Tooltip/TooltipContent.tsx"() {
179
+ init_useIsLegacyBrand();
160
180
  tooltipVariants = classVarianceAuthority.cva(
161
181
  [
162
182
  "tailwindcss-preflight",
163
183
  "tw-inline-block",
164
- "tw-rounded",
165
- "tw-bg-neutral-800",
166
- "tw-text-white",
167
184
  "tw-break-anywhere",
168
185
  "tw-max-h-96",
169
186
  "tw-overflow-y-auto",
170
- "tw-z-[1060]"
187
+ "tw-z-[1060]",
188
+ // legacy (dark) chrome — default
189
+ "tw-rounded",
190
+ "tw-bg-neutral-800",
191
+ "tw-text-white",
192
+ // argo chrome overrides — semantic floating-panel tokens
193
+ "data-[argo=true]:tw-rounded-2xl",
194
+ "data-[argo=true]:tw-border",
195
+ "data-[argo=true]:tw-border-solid",
196
+ "data-[argo=true]:tw-border-border",
197
+ "data-[argo=true]:tw-bg-popover",
198
+ "data-[argo=true]:tw-text-popover-foreground",
199
+ "data-[argo=true]:tw-shadow-md",
200
+ // argo open animation
201
+ "data-[argo=true]:data-[state=delayed-open]:tw-animate-in",
202
+ "data-[argo=true]:data-[state=instant-open]:tw-animate-in",
203
+ "data-[argo=true]:data-[state=delayed-open]:tw-fade-in-0",
204
+ "data-[argo=true]:data-[state=instant-open]:tw-fade-in-0",
205
+ "data-[argo=true]:data-[state=delayed-open]:tw-zoom-in-95",
206
+ "data-[argo=true]:data-[state=instant-open]:tw-zoom-in-95",
207
+ // argo closed animation
208
+ "data-[argo=true]:data-[state=closed]:tw-animate-out",
209
+ "data-[argo=true]:data-[state=closed]:tw-fade-out-0",
210
+ "data-[argo=true]:data-[state=closed]:tw-zoom-out-95",
211
+ // argo position animation
212
+ "data-[argo=true]:data-[side=bottom]:tw-slide-in-from-top-2",
213
+ "data-[argo=true]:data-[side=left]:tw-slide-in-from-right-2",
214
+ "data-[argo=true]:data-[side=right]:tw-slide-in-from-left-2",
215
+ "data-[argo=true]:data-[side=top]:tw-slide-in-from-bottom-2"
171
216
  ],
172
217
  {
173
218
  defaultVariants: {
@@ -200,6 +245,7 @@ var init_TooltipContent = __esm({
200
245
  TooltipContent = ({
201
246
  className,
202
247
  variant,
248
+ argo,
203
249
  keepOpenOnPointerDownOutside = false,
204
250
  children,
205
251
  onPointerDownOutside,
@@ -209,6 +255,8 @@ var init_TooltipContent = __esm({
209
255
  placement = "right",
210
256
  ...rest
211
257
  }) => {
258
+ const isLegacy = useIsLegacyBrand();
259
+ const renderArgo = !isLegacy || argo === true;
212
260
  const handlePointerDownOutside = (event) => {
213
261
  if (keepOpenOnPointerDownOutside) event.preventDefault();
214
262
  onPointerDownOutside?.(event);
@@ -217,7 +265,8 @@ var init_TooltipContent = __esm({
217
265
  reactTooltip.Content,
218
266
  {
219
267
  ...rest,
220
- "data-tooltip-content": true,
268
+ "data-tooltip-content": renderArgo ? void 0 : true,
269
+ "data-argo": renderArgo,
221
270
  sideOffset,
222
271
  collisionPadding,
223
272
  onPointerDownOutside: handlePointerDownOutside,
@@ -296,6 +345,7 @@ var init_Tooltip = __esm({
296
345
  className,
297
346
  keepOpenOnTriggerClick = false,
298
347
  variant,
348
+ argo,
299
349
  placement = "right",
300
350
  forceHide = false,
301
351
  forceShow = false,
@@ -334,6 +384,7 @@ var init_Tooltip = __esm({
334
384
  {
335
385
  className,
336
386
  variant: resolvedVariant,
387
+ argo,
337
388
  placement,
338
389
  keepOpenOnPointerDownOutside: keepOpenOnTriggerClick,
339
390
  children: tooltip
@@ -422,28 +473,6 @@ var init_isMac = __esm({
422
473
  getIsMac();
423
474
  }
424
475
  });
425
-
426
- // src/utils/legacyIcon.tsx
427
- var isFAIconValue, registeredRenderer, warnedOnce, renderLegacyIcon;
428
- var init_legacyIcon = __esm({
429
- "src/utils/legacyIcon.tsx"() {
430
- isFAIconValue = (value) => typeof value === "string" || Array.isArray(value) && value.length === 2 && typeof value[0] === "string" && typeof value[1] === "string";
431
- registeredRenderer = null;
432
- warnedOnce = false;
433
- renderLegacyIcon = (value) => {
434
- if (!isFAIconValue(value)) return value;
435
- if (registeredRenderer) return registeredRenderer(value);
436
- if (!warnedOnce) {
437
- warnedOnce = true;
438
- console.warn(
439
- "[@keboola/design] renderLegacyIcon received a legacy FontAwesome icon value but no renderer is registered. Call setLegacyIconRenderer at app boot. Returning null.",
440
- value
441
- );
442
- }
443
- return null;
444
- };
445
- }
446
- });
447
476
  var init_useSHA256 = __esm({
448
477
  "src/utils/useSHA256.ts"() {
449
478
  }
@@ -483,7 +512,7 @@ var init_Skeleton = __esm({
483
512
  "tw-relative",
484
513
  "tw-overflow-hidden",
485
514
  "tw-pointer-events-none",
486
- "tw-bg-neutral-150",
515
+ "tw-bg-muted",
487
516
  // before
488
517
  'before:tw-content-[""]',
489
518
  "before:tw-opacity-100",
@@ -738,6 +767,8 @@ var init_styles = __esm({
738
767
  "tw-bg-clip-padding",
739
768
  // anchor support
740
769
  "!tw-no-underline",
770
+ "aria-disabled:tw-cursor-not-allowed",
771
+ "aria-disabled:tw-opacity-50",
741
772
  // icon
742
773
  "tw-shrink-0",
743
774
  "[&_svg]:tw-pointer-events-none",
@@ -832,6 +863,7 @@ var init_Button = __esm({
832
863
  "src/components/Button/Button.tsx"() {
833
864
  init_icons();
834
865
  init_utils();
866
+ init_useIsLegacyBrand();
835
867
  init_styles();
836
868
  Button = ({
837
869
  ref,
@@ -848,14 +880,11 @@ var init_Button = __esm({
848
880
  block = false,
849
881
  ...buttonProps
850
882
  }) => {
883
+ const isLegacy = useIsLegacyBrand();
884
+ const renderArgo = !isLegacy || argo;
851
885
  const Comp = asChild ? reactSlot.Root : "button";
852
886
  const isIconOnly = String(size).startsWith("icon");
853
- const classNames = argo ? argoVariants({ variant, size, block, className }) : variants({
854
- size,
855
- variant,
856
- block,
857
- className
858
- });
887
+ const classNames = renderArgo ? argoVariants({ variant, size, block, className }) : variants({ size, variant, block, className });
859
888
  const handleClick = (event) => {
860
889
  const isAnchor = event.currentTarget.tagName === "A";
861
890
  if (isAnchor && disabled) {
@@ -910,11 +939,7 @@ var init_ButtonInline = __esm({
910
939
  },
911
940
  variants: {
912
941
  color: {
913
- link: [
914
- "tw-text-secondary-500",
915
- "hover:tw-text-secondary-600",
916
- "[&_svg]:tw-text-secondary-500"
917
- ],
942
+ link: ["tw-text-primary", "hover:tw-text-primary/90", "[&_svg]:tw-text-primary"],
918
943
  dark: ["tw-text-neutral-800 [&_svg]:tw-text-neutral-400"],
919
944
  danger: ["tw-text-error-500 [&_svg]:tw-text-error-500"],
920
945
  muted: ["tw-text-muted-foreground [&_svg]:tw-text-muted-foreground"],
@@ -1068,6 +1093,10 @@ var init_ZoomableSvg = __esm({
1068
1093
  MAX_SCALE = 3;
1069
1094
  ZOOM_STEP = 0.1;
1070
1095
  ZoomableSvg = ({ html, copyText, className }) => {
1096
+ const safeHtml = react.useMemo(
1097
+ () => DOMPurify__default.default.sanitize(html, { USE_PROFILES: { svg: true, svgFilters: true } }),
1098
+ [html]
1099
+ );
1071
1100
  const containerRef = react.useRef(null);
1072
1101
  const [scale, setScale] = react.useState(1);
1073
1102
  const [translate, setTranslate] = react.useState({ x: 0, y: 0 });
@@ -1163,7 +1192,7 @@ var init_ZoomableSvg = __esm({
1163
1192
  isFullscreen && "tw-h-full [&>svg]:tw-h-full"
1164
1193
  ),
1165
1194
  style: { transform: `translate(${translate.x}px, ${translate.y}px) scale(${scale})` },
1166
- dangerouslySetInnerHTML: { __html: html }
1195
+ dangerouslySetInnerHTML: { __html: safeHtml }
1167
1196
  }
1168
1197
  )
1169
1198
  }
@@ -1216,7 +1245,7 @@ var init_ZoomableSvg = __esm({
1216
1245
  "div",
1217
1246
  {
1218
1247
  role: "presentation",
1219
- className: "tw-fixed tw-inset-0 tw-z-[1060] tw-bg-neutral-50 tw-p-4",
1248
+ className: "tw-fixed tw-inset-0 tw-z-[1060] tw-bg-muted tw-p-4",
1220
1249
  onClick: stopPropagation,
1221
1250
  children: diagramContent
1222
1251
  }
@@ -1226,7 +1255,7 @@ var init_ZoomableSvg = __esm({
1226
1255
  "div",
1227
1256
  {
1228
1257
  className: cn(
1229
- "tw-overflow-hidden tw-rounded-md tw-border tw-border-neutral-150 tw-bg-neutral-50",
1258
+ "tw-overflow-hidden tw-rounded-md tw-border tw-border-border tw-bg-muted",
1230
1259
  className
1231
1260
  ),
1232
1261
  children: diagramContent
@@ -1248,12 +1277,17 @@ var MermaidDiagram_exports = {};
1248
1277
  __export(MermaidDiagram_exports, {
1249
1278
  MermaidDiagram: () => MermaidDiagram
1250
1279
  });
1251
- var mermaidPromise, getMermaid, stripFontImports, tryFastRender, makeResponsive, RENDER_DEBOUNCE_MS, svgCache, MermaidDiagram;
1280
+ var PRIMARY_FALLBACK_CHANNELS, resolvePrimary, mermaidPromise, getMermaid, stripFontImports, tryFastRender, makeResponsive, RENDER_DEBOUNCE_MS, svgCache, resolveSyncSvg, MermaidDiagram;
1252
1281
  var init_MermaidDiagram = __esm({
1253
1282
  "src/blocks/MermaidDiagram/MermaidDiagram.tsx"() {
1254
1283
  init_Skeleton();
1255
1284
  init_ZoomableSvg2();
1256
1285
  init_utils();
1286
+ PRIMARY_FALLBACK_CHANNELS = "31 143 255";
1287
+ resolvePrimary = () => {
1288
+ const channels = typeof document === "undefined" ? PRIMARY_FALLBACK_CHANNELS : getComputedStyle(document.documentElement).getPropertyValue("--color-primary").trim() || PRIMARY_FALLBACK_CHANNELS;
1289
+ return `rgb(${channels})`;
1290
+ };
1257
1291
  mermaidPromise = null;
1258
1292
  getMermaid = () => {
1259
1293
  if (!mermaidPromise) {
@@ -1302,7 +1336,7 @@ var init_MermaidDiagram = __esm({
1302
1336
  taskTextColor: colors__default.default.neutral[800],
1303
1337
  taskTextDarkColor: colors__default.default.neutral[800],
1304
1338
  taskTextLightColor: colors__default.default.neutral[800],
1305
- activeTaskBorderColor: colors__default.default.primary.DEFAULT,
1339
+ activeTaskBorderColor: resolvePrimary(),
1306
1340
  activeTaskBkgColor: colors__default.default.secondary[200],
1307
1341
  doneTaskBorderColor: colors__default.default.primary[600],
1308
1342
  doneTaskBkgColor: colors__default.default.primary[100],
@@ -1354,46 +1388,28 @@ var init_MermaidDiagram = __esm({
1354
1388
  };
1355
1389
  RENDER_DEBOUNCE_MS = 300;
1356
1390
  svgCache = /* @__PURE__ */ new Map();
1391
+ resolveSyncSvg = (code) => {
1392
+ const cached = svgCache.get(code);
1393
+ if (cached) return cached;
1394
+ const fast = tryFastRender(code);
1395
+ if (fast) svgCache.set(code, fast);
1396
+ return fast;
1397
+ };
1357
1398
  MermaidDiagram = ({ code }) => {
1358
1399
  const id = react.useId();
1359
- const [svg, setSvg] = react.useState(() => {
1360
- const cached = svgCache.get(code);
1361
- if (cached) return cached;
1362
- const fast = tryFastRender(code);
1363
- if (fast) {
1364
- svgCache.set(code, fast);
1365
- return fast;
1366
- }
1367
- return null;
1368
- });
1400
+ const [svg, setSvg] = react.useState(() => resolveSyncSvg(code));
1369
1401
  const [renderFailed, setRenderFailed] = react.useState(false);
1370
1402
  const debounceRef = react.useRef(null);
1371
1403
  const renderIdRef = react.useRef(0);
1372
1404
  const [prevCode, setPrevCode] = react.useState(code);
1373
1405
  if (code !== prevCode) {
1374
1406
  setPrevCode(code);
1375
- const cached = svgCache.get(code);
1376
- const fast = cached ?? tryFastRender(code);
1377
- if (fast && !cached) svgCache.set(code, fast);
1378
- setSvg(fast);
1407
+ setSvg(resolveSyncSvg(code));
1379
1408
  setRenderFailed(false);
1380
1409
  }
1381
1410
  react.useEffect(() => {
1382
- if (svgCache.has(code)) {
1383
- setSvg(svgCache.get(code));
1384
- setRenderFailed(false);
1385
- return;
1386
- }
1387
- const fastResult = tryFastRender(code);
1388
- if (fastResult) {
1389
- svgCache.set(code, fastResult);
1390
- setSvg(fastResult);
1391
- setRenderFailed(false);
1392
- return;
1393
- }
1394
- setSvg(null);
1411
+ if (svgCache.has(code)) return;
1395
1412
  const currentRenderId = ++renderIdRef.current;
1396
- setRenderFailed(false);
1397
1413
  if (debounceRef.current) {
1398
1414
  clearTimeout(debounceRef.current);
1399
1415
  }
@@ -1643,7 +1659,7 @@ init_utils();
1643
1659
  // src/components/Toast/ToastRoot.tsx
1644
1660
  init_icons();
1645
1661
  init_utils();
1646
- init_legacyIcon();
1662
+ init_useIsLegacyBrand();
1647
1663
 
1648
1664
  // src/components/Toast/ToastAction.tsx
1649
1665
  init_utils();
@@ -1728,6 +1744,7 @@ var ToastDismiss = ({
1728
1744
  "[&_svg]:tw-m-1",
1729
1745
  "tw-text-white",
1730
1746
  "group-data-[variant=default]/toast:[&_svg]:tw-text-popover-foreground",
1747
+ "group-data-[variant=default]/toast:group-data-[argo=true]/toast:[&_svg]:tw-text-foreground",
1731
1748
  className
1732
1749
  ),
1733
1750
  type: "button",
@@ -1755,6 +1772,7 @@ var ToastDuration = ({
1755
1772
  className: cn(
1756
1773
  "tw-bg-white/30",
1757
1774
  "group-data-[variant=default]/toast:tw-bg-popover-foreground/20",
1775
+ "group-data-[variant=default]/toast:group-data-[argo=true]/toast:tw-bg-foreground/20",
1758
1776
  "tw-rounded-bl-lg",
1759
1777
  "tw-mx-px",
1760
1778
  // positioning
@@ -1795,6 +1813,7 @@ var ToastTitle = ({
1795
1813
  "tw-self-center",
1796
1814
  "tw-text-white",
1797
1815
  "group-data-[variant=default]/toast:tw-text-popover-foreground",
1816
+ "group-data-[variant=default]/toast:group-data-[argo=true]/toast:tw-text-foreground",
1798
1817
  "tw-break-words",
1799
1818
  "tw-font-medium",
1800
1819
  className
@@ -1854,11 +1873,14 @@ var ToastRoot = ({
1854
1873
  duration = Infinity,
1855
1874
  variant = "info",
1856
1875
  loading = false,
1857
- icon: iconProp
1876
+ icon: iconProp,
1877
+ argo
1858
1878
  }) => {
1879
+ const isLegacy = useIsLegacyBrand();
1880
+ const renderArgo = !isLegacy || argo;
1859
1881
  const icon = (() => {
1860
1882
  if (loading) return /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Loader2, { className: "tw-animate-spin" });
1861
- if (iconProp) return renderLegacyIcon(iconProp);
1883
+ if (iconProp) return iconProp;
1862
1884
  if (variant === "default" || variant === null) return null;
1863
1885
  return DEFAULT_VARIANT_ICON[variant];
1864
1886
  })();
@@ -1866,35 +1888,44 @@ var ToastRoot = ({
1866
1888
  sonner.toast.dismiss(id);
1867
1889
  action?.onClick(event);
1868
1890
  };
1869
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-variant": variant, className: cn(variants2({ variant })), children: [
1870
- icon && /* @__PURE__ */ jsxRuntime.jsx(
1871
- "span",
1872
- {
1873
- "data-slot": "toast-icon",
1874
- className: cn(
1875
- "tw-inline-flex",
1876
- "tw-items-center",
1877
- "tw-justify-center",
1878
- "tw-self-center",
1879
- // styles — container at 20px with no padding so the 20px Lucide
1880
- // glyph fills the slot (previous tw-size-4 + tw-p-1 clipped a
1881
- // 16px child into 8px of visible space)
1882
- "tw-aspect-square",
1883
- "tw-size-5",
1884
- "tw-shrink-0",
1885
- '[&_svg:not([class*="tw-size-"])]:tw-size-5',
1886
- "tw-text-white",
1887
- "group-data-[variant=default]/toast:tw-text-popover-foreground"
1891
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1892
+ "div",
1893
+ {
1894
+ "data-variant": variant,
1895
+ "data-argo": renderArgo,
1896
+ className: cn(
1897
+ variants2({ variant }),
1898
+ "data-[variant=default]:data-[argo=true]:tw-bg-background"
1899
+ ),
1900
+ children: [
1901
+ icon && /* @__PURE__ */ jsxRuntime.jsx(
1902
+ "span",
1903
+ {
1904
+ "data-slot": "toast-icon",
1905
+ className: cn(
1906
+ "tw-inline-flex",
1907
+ "tw-items-center",
1908
+ "tw-justify-center",
1909
+ "tw-self-center",
1910
+ "tw-aspect-square",
1911
+ "tw-size-5",
1912
+ "tw-shrink-0",
1913
+ '[&_svg:not([class*="tw-size-"])]:tw-size-5',
1914
+ "tw-text-white",
1915
+ "group-data-[variant=default]/toast:tw-text-popover-foreground",
1916
+ "group-data-[variant=default]/toast:group-data-[argo=true]/toast:tw-text-foreground"
1917
+ ),
1918
+ children: icon
1919
+ }
1888
1920
  ),
1889
- children: icon
1890
- }
1891
- ),
1892
- /* @__PURE__ */ jsxRuntime.jsx(ToastTitle, { children: title }),
1893
- description && /* @__PURE__ */ jsxRuntime.jsx(ToastDescription, { children: description }),
1894
- action && /* @__PURE__ */ jsxRuntime.jsx(ToastAction, { style: action?.actionButtonStyle, onClick: handleActionClick, children: action.label }),
1895
- /* @__PURE__ */ jsxRuntime.jsx(ToastDismiss, { onClick: () => sonner.toast.dismiss(id) }),
1896
- duration !== Infinity && /* @__PURE__ */ jsxRuntime.jsx(ToastDuration, { duration })
1897
- ] });
1921
+ /* @__PURE__ */ jsxRuntime.jsx(ToastTitle, { children: title }),
1922
+ description && /* @__PURE__ */ jsxRuntime.jsx(ToastDescription, { children: description }),
1923
+ action && /* @__PURE__ */ jsxRuntime.jsx(ToastAction, { style: action?.actionButtonStyle, onClick: handleActionClick, children: action.label }),
1924
+ /* @__PURE__ */ jsxRuntime.jsx(ToastDismiss, { onClick: () => sonner.toast.dismiss(id) }),
1925
+ duration !== Infinity && /* @__PURE__ */ jsxRuntime.jsx(ToastDuration, { duration })
1926
+ ]
1927
+ }
1928
+ );
1898
1929
  };
1899
1930
  var toast = ({
1900
1931
  onAutoClose,
@@ -2285,6 +2316,9 @@ init_icons();
2285
2316
  init_icons();
2286
2317
  init_utils();
2287
2318
 
2319
+ // src/components/DropdownMenu/DropdownMenu.tsx
2320
+ init_useIsLegacyBrand();
2321
+
2288
2322
  // src/components/DropdownMenu/DropdownMenuCheckboxItem.tsx
2289
2323
  init_icons();
2290
2324
  init_utils();
@@ -2433,17 +2467,16 @@ var itemVariants = cn(
2433
2467
  "group-data-[variant=default]/dropdown-menu-content:hover:tw-bg-neutral-100",
2434
2468
  "group-data-[variant=default]/dropdown-menu-content:hover:tw-text-neutral-900",
2435
2469
  "group-data-[variant=argo]/dropdown-menu-content:tw-rounded-md",
2436
- "group-data-[variant=argo]/dropdown-menu-content:tw-text-slate-800",
2437
- "group-data-[variant=argo]/dropdown-menu-content:focus:tw-text-slate-800",
2438
- "group-data-[variant=argo]/dropdown-menu-content:focus:tw-bg-sky-100",
2439
- "group-data-[variant=argo]/dropdown-menu-content:hover:tw-text-slate-800",
2440
- "group-data-[variant=argo]/dropdown-menu-content:hover:tw-bg-sky-100"
2470
+ "group-data-[variant=argo]/dropdown-menu-content:tw-text-popover-foreground",
2471
+ "group-data-[variant=argo]/dropdown-menu-content:focus:tw-text-accent-foreground",
2472
+ "group-data-[variant=argo]/dropdown-menu-content:focus:tw-bg-accent",
2473
+ "group-data-[variant=argo]/dropdown-menu-content:hover:tw-text-accent-foreground",
2474
+ "group-data-[variant=argo]/dropdown-menu-content:hover:tw-bg-accent"
2441
2475
  );
2442
2476
  var contentVariants = cn(
2443
2477
  "tailwindcss-preflight",
2444
2478
  "tw-group/dropdown-menu-content",
2445
2479
  "tw-z-[1040]",
2446
- "tw-bg-white",
2447
2480
  // positioning
2448
2481
  "tw-flex",
2449
2482
  "tw-flex-col",
@@ -2454,8 +2487,16 @@ var contentVariants = cn(
2454
2487
  // border
2455
2488
  "tw-border",
2456
2489
  "tw-shadow-md",
2490
+ // Legacy surface — fixed white panel.
2457
2491
  "data-[variant=default]:tw-rounded-md",
2492
+ "data-[variant=default]:tw-bg-white",
2493
+ "data-[variant=default]:tw-border-neutral-100",
2494
+ "data-[variant=default]:tw-text-neutral-800",
2495
+ // Argo surface — semantic popover tokens (brand + dark aware).
2458
2496
  "data-[variant=argo]:tw-rounded-2xl",
2497
+ "data-[variant=argo]:tw-bg-popover",
2498
+ "data-[variant=argo]:tw-text-popover-foreground",
2499
+ "data-[variant=argo]:tw-border-border",
2459
2500
  // animations
2460
2501
  "data-[state=open]:tw-animate-in",
2461
2502
  "data-[state=open]:tw-fade-in-0",
@@ -2515,7 +2556,6 @@ var ScrollBar = ({ className, orientation = "vertical", ...props }) => /* @__PUR
2515
2556
  orientation,
2516
2557
  className: cn(
2517
2558
  "tw-flex tw-touch-none tw-select-none tw-transition-color",
2518
- '[data-state="hidden"]:tw-bg-pink-500',
2519
2559
  {
2520
2560
  "tw-h-full tw-w-2.5 tw-p-px": orientation === "vertical",
2521
2561
  "tw-h-2.5 tw-flex-col tw-p-px": orientation === "horizontal"
@@ -2530,8 +2570,8 @@ var ScrollBar = ({ className, orientation = "vertical", ...props }) => /* @__PUR
2530
2570
  "tw-relative",
2531
2571
  "tw-flex-1",
2532
2572
  "tw-rounded-full",
2533
- "tw-bg-neutral-200",
2534
- "hover:tw-bg-neutral-400"
2573
+ "tw-bg-border",
2574
+ "hover:tw-bg-muted-foreground"
2535
2575
  )
2536
2576
  }
2537
2577
  )
@@ -2615,7 +2655,6 @@ var DropdownMenuContent = ({
2615
2655
  // src/components/DropdownMenu/DropdownMenuItem.tsx
2616
2656
  init_icons();
2617
2657
  init_utils();
2618
- init_legacyIcon();
2619
2658
  var DropdownMenuItem = ({
2620
2659
  ref,
2621
2660
  className,
@@ -2631,7 +2670,7 @@ var DropdownMenuItem = ({
2631
2670
  ...props
2632
2671
  }) => {
2633
2672
  const Comp = asChild ? reactSlot.Root : "div";
2634
- const adornment = isLoading ? /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Loader2, { className: "tw-animate-spin" }) : renderLegacyIcon(icon);
2673
+ const adornment = isLoading ? /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Loader2, { className: "tw-animate-spin" }) : icon;
2635
2674
  const handleOnSelect = (event) => {
2636
2675
  if (asModalTrigger) event.preventDefault();
2637
2676
  onSelect?.(event);
@@ -2733,7 +2772,6 @@ var DropdownMenuRadioGroup = ({
2733
2772
  // src/components/DropdownMenu/DropdownMenuRadioGroup/DropdownMenuRadioItem.tsx
2734
2773
  init_icons();
2735
2774
  init_utils();
2736
- init_legacyIcon();
2737
2775
  var DropdownMenuRadioItem = ({
2738
2776
  className,
2739
2777
  children,
@@ -2768,7 +2806,7 @@ var DropdownMenuRadioItem = ({
2768
2806
  ...props,
2769
2807
  children: [
2770
2808
  isAtStart && indicatorEle,
2771
- icon && /* @__PURE__ */ jsxRuntime.jsx(ItemIcon, { className: iconClassName, children: renderLegacyIcon(icon) }),
2809
+ icon && /* @__PURE__ */ jsxRuntime.jsx(ItemIcon, { className: iconClassName, children: icon }),
2772
2810
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-flex tw-min-w-0 tw-flex-1 tw-items-center tw-gap-2", children }),
2773
2811
  !isAtStart && indicatorEle
2774
2812
  ]
@@ -2846,10 +2884,12 @@ var DropdownMenuTrigger = ({
2846
2884
  var DropdownMenu = ({
2847
2885
  // change a default value to false, for modal property, as it is not used in most cases
2848
2886
  modal = false,
2849
- variant = "default",
2887
+ variant,
2850
2888
  ...props
2851
2889
  }) => {
2852
- const contextValue = react.useMemo(() => ({ variant }), [variant]);
2890
+ const isLegacy = useIsLegacyBrand();
2891
+ const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : "default";
2892
+ const contextValue = react.useMemo(() => ({ variant: effectiveVariant }), [effectiveVariant]);
2853
2893
  return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContext, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive3.Root, { ...props, modal }) });
2854
2894
  };
2855
2895
  DropdownMenu.Trigger = DropdownMenuTrigger;
@@ -3098,6 +3138,7 @@ var useFormGroupContext = () => react.use(FormGroupContext);
3098
3138
 
3099
3139
  // src/components/InputGroup/InputGroup.tsx
3100
3140
  init_utils();
3141
+ init_useIsLegacyBrand();
3101
3142
 
3102
3143
  // src/components/InputGroup/InputGroupAddon.tsx
3103
3144
  init_utils();
@@ -3396,7 +3437,8 @@ var inputGroupVariants = classVarianceAuthority.cva(
3396
3437
  "has-[:is(input,textarea):disabled]:tw-opacity-40"
3397
3438
  ],
3398
3439
  argo: [
3399
- "tw-bg-background",
3440
+ // muted filled input surface — gray, distinct from white containers; not the app-background token
3441
+ "tw-bg-muted",
3400
3442
  "tw-border-input",
3401
3443
  "tw-rounded-lg",
3402
3444
  "tw-text-foreground",
@@ -3450,15 +3492,28 @@ var InputGroupRoot = ({
3450
3492
  focusVariant,
3451
3493
  className,
3452
3494
  ...props
3453
- }) => /* @__PURE__ */ jsxRuntime.jsx(
3454
- "div",
3455
- {
3456
- ...props,
3457
- ref,
3458
- className: cn(inputGroupVariants({ state, variant, sizing, focusVariant, className })),
3459
- children
3460
- }
3461
- );
3495
+ }) => {
3496
+ const isLegacy = useIsLegacyBrand();
3497
+ const effectiveVariant = !isLegacy || variant === "argo" ? "argo" : variant;
3498
+ const effectiveSizing = effectiveVariant === "argo" ? "medium" : sizing;
3499
+ return /* @__PURE__ */ jsxRuntime.jsx(
3500
+ "div",
3501
+ {
3502
+ ...props,
3503
+ ref,
3504
+ className: cn(
3505
+ inputGroupVariants({
3506
+ state,
3507
+ variant: effectiveVariant,
3508
+ sizing: effectiveSizing,
3509
+ focusVariant,
3510
+ className
3511
+ })
3512
+ ),
3513
+ children
3514
+ }
3515
+ );
3516
+ };
3462
3517
  var InputGroup = InputGroupRoot;
3463
3518
  InputGroup.Input = InputGroupInput;
3464
3519
  InputGroup.Addon = InputGroupAddon;
@@ -3683,8 +3738,8 @@ var helpVariants = classVarianceAuthority.cva(["tw-m-0", "tw-text-xs"], {
3683
3738
  },
3684
3739
  variants: {
3685
3740
  state: {
3686
- default: ["tw-text-neutral-500"],
3687
- error: ["tw-text-error-500"],
3741
+ default: ["tw-text-muted-foreground"],
3742
+ error: ["tw-text-destructive"],
3688
3743
  warning: ["tw-text-warning-500"]
3689
3744
  }
3690
3745
  }
@@ -3763,7 +3818,7 @@ var Textarea = ({
3763
3818
  containerClassName,
3764
3819
  // group props
3765
3820
  state = "default",
3766
- variant = "primary",
3821
+ variant,
3767
3822
  sizing,
3768
3823
  focusVariant,
3769
3824
  ...rest
@@ -3895,7 +3950,7 @@ var Input = ({
3895
3950
  "div",
3896
3951
  {
3897
3952
  className: cn({
3898
- "tw-whitespace-nowrap tw-bg-neutral-200 tw-px-4 -tw-mr-4 tw-py-2.5": rightSuffixVariant === "addon"
3953
+ "tw-whitespace-nowrap tw-bg-muted tw-px-4 -tw-mr-4 tw-py-2.5": rightSuffixVariant === "addon"
3899
3954
  }),
3900
3955
  children: rightSuffix
3901
3956
  }
@@ -3914,6 +3969,7 @@ var TextInput = ({
3914
3969
  value,
3915
3970
  defaultValue,
3916
3971
  type = "text",
3972
+ variant,
3917
3973
  onValueChange,
3918
3974
  onChange,
3919
3975
  onValueBlur,
@@ -3936,6 +3992,7 @@ var TextInput = ({
3936
3992
  onChange: handleChange,
3937
3993
  onBlur: handleBlur,
3938
3994
  type,
3995
+ variant,
3939
3996
  value: sanitizeTextInputValue(value),
3940
3997
  defaultValue: sanitizeTextInputValue(defaultValue)
3941
3998
  }
@@ -3959,7 +4016,7 @@ FormGroup.Textarea = FormGroupTextarea;
3959
4016
 
3960
4017
  // src/components/Label/Label.tsx
3961
4018
  init_utils();
3962
- var Optional = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("tw-text-neutral-400", className), children: "(optional)" });
4019
+ var Optional = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("tw-text-muted-foreground", className), children: "(optional)" });
3963
4020
  var Label2 = ({ className, children, id, htmlFor, ...rest }) => {
3964
4021
  return /* @__PURE__ */ jsxRuntime.jsx(
3965
4022
  RLabel__namespace.Root,
@@ -3968,7 +4025,7 @@ var Label2 = ({ className, children, id, htmlFor, ...rest }) => {
3968
4025
  id: id?.toString(),
3969
4026
  htmlFor: htmlFor?.toString(),
3970
4027
  className: cn(
3971
- "tw-m-0 tw-text-neutral-800 tw-font-normal peer-disabled:tw-opacity-50",
4028
+ "tw-m-0 tw-text-foreground tw-font-normal peer-disabled:tw-opacity-50",
3972
4029
  className
3973
4030
  ),
3974
4031
  children
@@ -4359,25 +4416,25 @@ var ToolbarPlugin = () => {
4359
4416
 
4360
4417
  // src/components/MarkdownEditor/theme.ts
4361
4418
  var editorTheme = {
4362
- link: "tw-cursor-pointer !tw-text-secondary-500 tw-underline",
4419
+ link: "tw-cursor-pointer !tw-text-primary tw-underline",
4363
4420
  text: {
4364
4421
  bold: "tw-font-bold",
4365
4422
  italic: "tw-italic",
4366
4423
  strikethrough: "tw-line-through",
4367
4424
  underline: "tw-underline",
4368
- code: "tw-rounded tw-bg-neutral-100 tw-px-1 tw-py-0.5 tw-font-mono tw-text-[0.85em]"
4425
+ code: "tw-rounded tw-bg-muted tw-px-1 tw-py-0.5 tw-font-mono tw-text-[0.85em]"
4369
4426
  },
4370
4427
  list: {
4371
4428
  ol: "!tw-list-decimal",
4372
4429
  ul: "!tw-list-disc",
4373
4430
  checklist: "!tw-list-none !tw-pl-0",
4374
4431
  listitemChecked: [
4375
- "tw-relative !tw-pl-6 tw-list-none tw-outline-none tw-line-through tw-text-neutral-400",
4432
+ "tw-relative !tw-pl-6 tw-list-none tw-outline-none tw-line-through tw-text-muted-foreground",
4376
4433
  'before:tw-content-[""] before:tw-absolute before:tw-left-0 before:tw-top-[3px]',
4377
4434
  "before:tw-size-4 before:tw-rounded before:tw-border before:tw-border-solid",
4378
- "before:tw-bg-secondary-500 before:tw-border-secondary-500 before:tw-cursor-pointer",
4435
+ "before:tw-bg-primary before:tw-border-primary before:tw-cursor-pointer",
4379
4436
  'after:tw-content-[""] after:tw-absolute after:tw-left-[5.5px] after:tw-top-[5.5px]',
4380
- "after:tw-w-1 after:tw-h-2 after:tw-border-white after:tw-border-solid",
4437
+ "after:tw-w-1 after:tw-h-2 after:tw-border-primary-foreground after:tw-border-solid",
4381
4438
  "after:tw-border-r-[1.5px] after:tw-border-b-[1.5px] after:tw-border-t-0 after:tw-border-l-0",
4382
4439
  "after:tw-rotate-45"
4383
4440
  ].join(" "),
@@ -4385,7 +4442,7 @@ var editorTheme = {
4385
4442
  "tw-relative !tw-pl-6 tw-list-none tw-outline-none",
4386
4443
  'before:tw-content-[""] before:tw-absolute before:tw-left-0 before:tw-top-[3px]',
4387
4444
  "before:tw-size-4 before:tw-rounded before:tw-border before:tw-border-solid",
4388
- "before:tw-border-neutral-200 before:tw-bg-white before:tw-cursor-pointer"
4445
+ "before:tw-border-input before:tw-bg-background before:tw-cursor-pointer"
4389
4446
  ].join(" ")
4390
4447
  }
4391
4448
  };
@@ -4473,7 +4530,7 @@ var MarkdownEditor = ({
4473
4530
  // but a matching negative margin shifts the wrapper outward so the text itself stays
4474
4531
  // aligned with the parent's content edge (i.e. with where static text would render).
4475
4532
  compact ? "tw-px-1.5 tw-py-0.5 -tw-mx-1.5 -tw-my-0.5" : "tw-p-2",
4476
- editable && "tw-cursor-text hover:tw-bg-neutral-50 focus-within:tw-ring-2 focus-within:tw-ring-secondary-500/40"
4533
+ editable && "tw-cursor-text hover:tw-bg-muted focus-within:tw-ring-2 focus-within:tw-ring-primary/40"
4477
4534
  ),
4478
4535
  children: /* @__PURE__ */ jsxRuntime.jsx(
4479
4536
  LexicalRichTextPlugin.RichTextPlugin,
@@ -4488,7 +4545,7 @@ var MarkdownEditor = ({
4488
4545
  "div",
4489
4546
  {
4490
4547
  className: cn(
4491
- "tw-pointer-events-none tw-absolute tw-select-none tw-text-neutral-400",
4548
+ "tw-pointer-events-none tw-absolute tw-select-none tw-text-muted-foreground",
4492
4549
  compact ? "tw-left-1.5 tw-top-0.5" : "tw-left-2 tw-top-[calc(0.5rem+0.35em)]"
4493
4550
  ),
4494
4551
  children: placeholder