@keboola/design 2.1.0 → 3.0.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.
@@ -3,8 +3,8 @@ import { extendTailwindMerge } from 'tailwind-merge';
3
3
  import { Portal, Content, Root, Trigger } from '@radix-ui/react-tooltip';
4
4
  import { cva } from 'class-variance-authority';
5
5
  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';
6
+ import { createContext, lazy, Suspense, use, useId, useState, useRef, useEffect, forwardRef, useCallback, useMemo } from 'react';
7
+ import * as lucide_react_star from 'lucide-react';
8
8
  import { Root as Root$2, Slottable } from '@radix-ui/react-slot';
9
9
  import { renderMermaidSVG } from 'beautiful-mermaid';
10
10
  import colors from '@keboola/tailwind-config/colors';
@@ -30,7 +30,6 @@ import { HeadingNode, QuoteNode, $isHeadingNode, $isQuoteNode, $createQuoteNode,
30
30
  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
31
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
32
32
  import { toast as toast$1 } from 'sonner';
33
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
34
33
  import { createPortal } from 'react-dom';
35
34
  import { $getNearestBlockElementAncestorOrThrow } from '@lexical/utils';
36
35
  import * as DropdownMenuPrimitive3 from '@radix-ui/react-dropdown-menu';
@@ -40,7 +39,9 @@ import TextareaAutosize from 'react-textarea-autosize';
40
39
  import * as RLabel from '@radix-ui/react-label';
41
40
 
42
41
  var __defProp = Object.defineProperty;
42
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
43
43
  var __getOwnPropNames = Object.getOwnPropertyNames;
44
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
44
45
  var __esm = (fn, res) => function __init() {
45
46
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
46
47
  };
@@ -48,6 +49,15 @@ var __export = (target, all) => {
48
49
  for (var name in all)
49
50
  __defProp(target, name, { get: all[name], enumerable: true });
50
51
  };
52
+ var __copyProps = (to, from, except, desc) => {
53
+ if (from && typeof from === "object" || typeof from === "function") {
54
+ for (let key of __getOwnPropNames(from))
55
+ if (!__hasOwnProp.call(to, key) && key !== except)
56
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
57
+ }
58
+ return to;
59
+ };
60
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
51
61
  var twMerge, cn;
52
62
  var init_classNames = __esm({
53
63
  "src/utils/classNames.ts"() {
@@ -384,6 +394,28 @@ var init_isMac = __esm({
384
394
  getIsMac();
385
395
  }
386
396
  });
397
+
398
+ // src/utils/legacyIcon.tsx
399
+ var isFAIconValue, registeredRenderer, warnedOnce, renderLegacyIcon;
400
+ var init_legacyIcon = __esm({
401
+ "src/utils/legacyIcon.tsx"() {
402
+ isFAIconValue = (value) => typeof value === "string" || Array.isArray(value) && value.length === 2 && typeof value[0] === "string" && typeof value[1] === "string";
403
+ registeredRenderer = null;
404
+ warnedOnce = false;
405
+ renderLegacyIcon = (value) => {
406
+ if (!isFAIconValue(value)) return value;
407
+ if (registeredRenderer) return registeredRenderer(value);
408
+ if (!warnedOnce) {
409
+ warnedOnce = true;
410
+ console.warn(
411
+ "[@keboola/design] renderLegacyIcon received a legacy FontAwesome icon value but no renderer is registered. Call setLegacyIconRenderer at app boot. Returning null.",
412
+ value
413
+ );
414
+ }
415
+ return null;
416
+ };
417
+ }
418
+ });
387
419
  var init_useSHA256 = __esm({
388
420
  "src/utils/useSHA256.ts"() {
389
421
  }
@@ -450,8 +482,42 @@ var init_Skeleton = __esm({
450
482
  };
451
483
  }
452
484
  });
485
+ var Keboola;
486
+ var init_Keboola = __esm({
487
+ "src/icons/Keboola.tsx"() {
488
+ init_utils();
489
+ Keboola = forwardRef(
490
+ ({ size = 24, color = "currentColor", className, children, ...rest }, ref) => /* @__PURE__ */ jsxs(
491
+ "svg",
492
+ {
493
+ ref,
494
+ xmlns: "http://www.w3.org/2000/svg",
495
+ width: size,
496
+ height: size,
497
+ viewBox: "0 0 300 512",
498
+ fill: color,
499
+ className: cn("lucide", className),
500
+ ...rest,
501
+ children: [
502
+ /* @__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" }),
503
+ children
504
+ ]
505
+ }
506
+ )
507
+ );
508
+ Keboola.displayName = "Keboola";
509
+ }
510
+ });
511
+
512
+ // src/icons/index.ts
513
+ var icons_exports = {};
514
+ __export(icons_exports, {
515
+ Keboola: () => Keboola
516
+ });
453
517
  var init_icons = __esm({
454
518
  "src/icons/index.ts"() {
519
+ __reExport(icons_exports, lucide_react_star);
520
+ init_Keboola();
455
521
  }
456
522
  });
457
523
  var variants, argoVariants;
@@ -783,7 +849,7 @@ var init_Button = __esm({
783
849
  onClick: handleClick,
784
850
  className: cn(classNames),
785
851
  children: [
786
- isLoading && /* @__PURE__ */ jsx(Loader2, { className: "tw-size-4 tw-shrink-0 tw-animate-spin" }),
852
+ isLoading && /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-size-4 tw-shrink-0 tw-animate-spin" }),
787
853
  /* @__PURE__ */ jsx(Slottable, { children: isLoading && isIconOnly ? null : children })
788
854
  ]
789
855
  }
@@ -806,7 +872,7 @@ var init_ButtonInline = __esm({
806
872
  "disabled:tw-no-underline",
807
873
  "[&_svg]:disabled:tw-text-neutral-400",
808
874
  // Default size for nested Lucide icons; callers can override on the icon.
809
- "[&_svg:not([class*='tw-size-'])]:tw-size-4",
875
+ "[&_svg.lucide:not([class*='tw-size-'])]:tw-size-4",
810
876
  "[&_svg]:tw-shrink-0"
811
877
  ],
812
878
  {
@@ -927,7 +993,7 @@ var init_ClipboardButton = __esm({
927
993
  init_Button2();
928
994
  init_Clipboard2();
929
995
  init_icons();
930
- DEFAULT_ICON = /* @__PURE__ */ jsx(Copy, {});
996
+ DEFAULT_ICON = /* @__PURE__ */ jsx(icons_exports.Copy, {});
931
997
  ClipboardButton = ({
932
998
  // clipboard props
933
999
  text,
@@ -1106,7 +1172,7 @@ var init_ZoomableSvg = __esm({
1106
1172
  "aria-label": isFullscreen ? "Exit fullscreen" : "Fullscreen",
1107
1173
  onClick: () => setIsFullscreen((f) => !f),
1108
1174
  argo: true,
1109
- children: isFullscreen ? /* @__PURE__ */ jsx(Minimize2, { className: "tw-size-4" }) : /* @__PURE__ */ jsx(Maximize2, { className: "tw-size-4" })
1175
+ children: isFullscreen ? /* @__PURE__ */ jsx(icons_exports.Minimize2, { className: "tw-size-4" }) : /* @__PURE__ */ jsx(icons_exports.Maximize2, { className: "tw-size-4" })
1110
1176
  }
1111
1177
  )
1112
1178
  }
@@ -1549,9 +1615,7 @@ init_utils();
1549
1615
  // src/components/Toast/ToastRoot.tsx
1550
1616
  init_icons();
1551
1617
  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;
1618
+ init_legacyIcon();
1555
1619
 
1556
1620
  // src/components/Toast/ToastAction.tsx
1557
1621
  init_utils();
@@ -1641,7 +1705,7 @@ var ToastDismiss = ({
1641
1705
  type: "button",
1642
1706
  ...rest,
1643
1707
  children: [
1644
- /* @__PURE__ */ jsx(X, {}),
1708
+ /* @__PURE__ */ jsx(icons_exports.X, {}),
1645
1709
  /* @__PURE__ */ jsx("span", { className: "tw-sr-only", children: "Dismiss" })
1646
1710
  ]
1647
1711
  }
@@ -1749,10 +1813,10 @@ var variants2 = cva(
1749
1813
  }
1750
1814
  );
1751
1815
  var DEFAULT_VARIANT_ICON = {
1752
- error: /* @__PURE__ */ jsx(AlertTriangle, {}),
1753
- info: /* @__PURE__ */ jsx(Info, {}),
1754
- success: /* @__PURE__ */ jsx(CircleCheck, {}),
1755
- warning: /* @__PURE__ */ jsx(AlertCircle, {})
1816
+ error: /* @__PURE__ */ jsx(icons_exports.AlertTriangle, {}),
1817
+ info: /* @__PURE__ */ jsx(icons_exports.Info, {}),
1818
+ success: /* @__PURE__ */ jsx(icons_exports.CircleCheck, {}),
1819
+ warning: /* @__PURE__ */ jsx(icons_exports.AlertCircle, {})
1756
1820
  };
1757
1821
  var ToastRoot = ({
1758
1822
  id,
@@ -1765,7 +1829,7 @@ var ToastRoot = ({
1765
1829
  icon: iconProp
1766
1830
  }) => {
1767
1831
  const icon = (() => {
1768
- if (loading) return /* @__PURE__ */ jsx(Loader2, { className: "tw-animate-spin" });
1832
+ if (loading) return /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-animate-spin" });
1769
1833
  if (iconProp) return renderLegacyIcon(iconProp);
1770
1834
  if (variant === "default" || variant === null) return null;
1771
1835
  return DEFAULT_VARIANT_ICON[variant];
@@ -2265,9 +2329,9 @@ var DropdownMenuItemIndicator = ({
2265
2329
  ...rest
2266
2330
  }) => {
2267
2331
  const IconComp = (() => {
2268
- if (variant === "switch") return ToggleRight;
2269
- if (variant === "radio") return Circle;
2270
- return Check;
2332
+ if (variant === "switch") return icons_exports.ToggleRight;
2333
+ if (variant === "radio") return icons_exports.Circle;
2334
+ return icons_exports.Check;
2271
2335
  })();
2272
2336
  const forceMount = (() => {
2273
2337
  if (forceMountProp) return true;
@@ -2388,7 +2452,7 @@ var DropdownMenuCheckboxItem = ({
2388
2452
  ...props
2389
2453
  }) => {
2390
2454
  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" });
2455
+ 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
2456
  const handleSelect = (event) => {
2393
2457
  if (!closeOnSelect) event.preventDefault();
2394
2458
  onSelect?.(event);
@@ -2523,6 +2587,7 @@ var DropdownMenuContent = ({
2523
2587
  // src/components/DropdownMenu/DropdownMenuItem.tsx
2524
2588
  init_icons();
2525
2589
  init_utils();
2590
+ init_legacyIcon();
2526
2591
  var DropdownMenuItem = ({
2527
2592
  ref,
2528
2593
  className,
@@ -2538,7 +2603,7 @@ var DropdownMenuItem = ({
2538
2603
  ...props
2539
2604
  }) => {
2540
2605
  const Comp = asChild ? Root$2 : "div";
2541
- const adornment = isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "tw-animate-spin" }) : renderLegacyIcon(icon);
2606
+ const adornment = isLoading ? /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-animate-spin" }) : renderLegacyIcon(icon);
2542
2607
  const handleOnSelect = (event) => {
2543
2608
  if (asModalTrigger) event.preventDefault();
2544
2609
  onSelect?.(event);
@@ -2640,6 +2705,7 @@ var DropdownMenuRadioGroup = ({
2640
2705
  // src/components/DropdownMenu/DropdownMenuRadioGroup/DropdownMenuRadioItem.tsx
2641
2706
  init_icons();
2642
2707
  init_utils();
2708
+ init_legacyIcon();
2643
2709
  var DropdownMenuRadioItem = ({
2644
2710
  className,
2645
2711
  children,
@@ -2653,7 +2719,7 @@ var DropdownMenuRadioItem = ({
2653
2719
  ...props
2654
2720
  }) => {
2655
2721
  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 });
2722
+ const indicatorEle = isLoading ? /* @__PURE__ */ jsx(ItemIcon, { className: iconClassName, children: /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-animate-spin" }) }) : /* @__PURE__ */ jsx(DropdownMenuItemIndicator, { variant: indicator });
2657
2723
  const handleSelect = (event) => {
2658
2724
  if (!closeOnSelect) event.preventDefault();
2659
2725
  onSelect?.(event);
@@ -2730,7 +2796,7 @@ init_utils();
2730
2796
  var DropdownMenuSubTrigger = ({ className, children, ...props }) => {
2731
2797
  return /* @__PURE__ */ jsxs(DropdownMenuPrimitive3.SubTrigger, { className: cn(itemVariants, className), ...props, children: [
2732
2798
  children,
2733
- /* @__PURE__ */ jsx(ChevronRight, { className: "tw-ml-auto tw-size-5" })
2799
+ /* @__PURE__ */ jsx(icons_exports.ChevronRight, { className: "tw-ml-auto tw-size-5" })
2734
2800
  ] });
2735
2801
  };
2736
2802
 
@@ -2775,10 +2841,10 @@ DropdownMenu.ItemDescription = DropdownMenuItemDescription;
2775
2841
  // src/components/MarkdownEditor/plugins/toolbar/AlignmentDropdown.tsx
2776
2842
  init_Tooltip2();
2777
2843
  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 }
2844
+ { value: "left", label: "Left", icon: icons_exports.AlignLeft },
2845
+ { value: "center", label: "Center", icon: icons_exports.AlignCenter },
2846
+ { value: "right", label: "Right", icon: icons_exports.AlignRight },
2847
+ { value: "justify", label: "Justify", icon: icons_exports.AlignJustify }
2782
2848
  ];
2783
2849
  var ALIGNMENT_ICONS = Object.fromEntries(
2784
2850
  ALIGNMENT_OPTIONS.map(({ value, icon }) => [value, icon])
@@ -2804,7 +2870,7 @@ var AlignmentDropdown = ({
2804
2870
  editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, align);
2805
2871
  });
2806
2872
  };
2807
- const CurrentAlignmentIcon = ALIGNMENT_ICONS[alignment] ?? AlignLeft;
2873
+ const CurrentAlignmentIcon = ALIGNMENT_ICONS[alignment] ?? icons_exports.AlignLeft;
2808
2874
  return /* @__PURE__ */ jsxs(DropdownMenu, { onOpenChange: handleOpenChange, children: [
2809
2875
  /* @__PURE__ */ jsx(Tooltip, { tooltip: "Text alignment", placement: "top", triggerAsChild: true, children: /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
2810
2876
  "button",
@@ -2816,7 +2882,7 @@ var AlignmentDropdown = ({
2816
2882
  ),
2817
2883
  children: [
2818
2884
  /* @__PURE__ */ jsx(CurrentAlignmentIcon, { className: "tw-size-4" }),
2819
- /* @__PURE__ */ jsx(ChevronDown, { className: "tw-size-3" })
2885
+ /* @__PURE__ */ jsx(icons_exports.ChevronDown, { className: "tw-size-3" })
2820
2886
  ]
2821
2887
  }
2822
2888
  ) }) }),
@@ -2843,14 +2909,14 @@ init_icons();
2843
2909
  init_utils();
2844
2910
  init_Tooltip2();
2845
2911
  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 }
2912
+ paragraph: { label: "Normal", icon: icons_exports.Type, selectable: true },
2913
+ h1: { label: "Heading 1", icon: icons_exports.Heading1, selectable: true },
2914
+ h2: { label: "Heading 2", icon: icons_exports.Heading2, selectable: true },
2915
+ h3: { label: "Heading 3", icon: icons_exports.Heading3, selectable: true },
2916
+ bullet: { label: "Bullet List", icon: icons_exports.List, selectable: false },
2917
+ number: { label: "Numbered List", icon: icons_exports.ListOrdered, selectable: false },
2918
+ quote: { label: "Quote", icon: icons_exports.Quote, selectable: false },
2919
+ code: { label: "Code Block", icon: icons_exports.SquareCode, selectable: false }
2854
2920
  };
2855
2921
  var BLOCK_TYPE_OPTIONS = Object.entries(BLOCK_TYPE_META).filter(([, meta]) => meta.selectable).map(([value, { label, icon }]) => ({ value, label, icon }));
2856
2922
  var isBlockType = (value) => Object.prototype.hasOwnProperty.call(BLOCK_TYPE_META, value);
@@ -2860,7 +2926,7 @@ var BlockTypeDropdown = ({
2860
2926
  }) => {
2861
2927
  const savedSelectionRef = useRef(null);
2862
2928
  const currentMeta = isBlockType(blockType) ? BLOCK_TYPE_META[blockType] : null;
2863
- const CurrentBlockIcon = currentMeta?.icon ?? Type;
2929
+ const CurrentBlockIcon = currentMeta?.icon ?? icons_exports.Type;
2864
2930
  const handleOpenChange = (open) => {
2865
2931
  if (open) {
2866
2932
  editor.getEditorState().read(() => {
@@ -2903,7 +2969,7 @@ var BlockTypeDropdown = ({
2903
2969
  children: [
2904
2970
  /* @__PURE__ */ jsx(CurrentBlockIcon, { className: "tw-size-4" }),
2905
2971
  currentMeta?.label ?? "Normal",
2906
- /* @__PURE__ */ jsx(ChevronDown, { className: "tw-size-3" })
2972
+ /* @__PURE__ */ jsx(icons_exports.ChevronDown, { className: "tw-size-3" })
2907
2973
  ]
2908
2974
  }
2909
2975
  ) }) }),
@@ -3013,7 +3079,7 @@ var addonVariants = cva(
3013
3079
  "tw-items-center",
3014
3080
  "tw-gap-1",
3015
3081
  // 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",
3082
+ "[&_svg.lucide:not([class*='tw-size-'])]:tw-size-4",
3017
3083
  "[&_svg]:tw-shrink-0"
3018
3084
  ],
3019
3085
  {
@@ -3440,7 +3506,7 @@ var ColorPicker = ({ value, disabled, readOnly, ...props }) => {
3440
3506
  disabled: disabled || readOnly,
3441
3507
  onClick: handleOpenPicker,
3442
3508
  "aria-label": "Pick color",
3443
- children: /* @__PURE__ */ jsx(Pipette, { className: "tw-size-4" })
3509
+ children: /* @__PURE__ */ jsx(icons_exports.Pipette, { className: "tw-size-4" })
3444
3510
  }
3445
3511
  )
3446
3512
  ] });
@@ -3559,7 +3625,7 @@ var ColorInput = ({
3559
3625
  onMouseDown: (event) => event.preventDefault(),
3560
3626
  onClick: handleClear,
3561
3627
  "aria-label": "Clear color",
3562
- children: /* @__PURE__ */ jsx(X, { className: "tw-size-4" })
3628
+ children: /* @__PURE__ */ jsx(icons_exports.X, { className: "tw-size-4" })
3563
3629
  }
3564
3630
  ),
3565
3631
  /* @__PURE__ */ jsx(
@@ -3794,7 +3860,7 @@ var Input = ({
3794
3860
  onMouseDown: (e) => e.preventDefault(),
3795
3861
  onClick: handleClear,
3796
3862
  "data-testid": testId.clearButton,
3797
- children: /* @__PURE__ */ jsx(X, { className: "tw-size-4" })
3863
+ children: /* @__PURE__ */ jsx(icons_exports.X, { className: "tw-size-4" })
3798
3864
  }
3799
3865
  ),
3800
3866
  rightSuffix && /* @__PURE__ */ jsx(
@@ -3974,12 +4040,12 @@ var LinkPanel = ({ editor, isLink }) => {
3974
4040
  active: true,
3975
4041
  onClick: () => editor.dispatchCommand(TOGGLE_LINK_COMMAND, null),
3976
4042
  tooltip: "Remove Link",
3977
- children: /* @__PURE__ */ jsx(Link, { className: "tw-size-4" })
4043
+ children: /* @__PURE__ */ jsx(icons_exports.Link, { className: "tw-size-4" })
3978
4044
  }
3979
4045
  );
3980
4046
  }
3981
4047
  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" }) }),
4048
+ /* @__PURE__ */ jsx(ToolbarButton, { active: open, onClick: handleOpen, tooltip: "Insert Link", children: /* @__PURE__ */ jsx(icons_exports.Link, { className: "tw-size-4" }) }),
3983
4049
  open && /* @__PURE__ */ jsx(
3984
4050
  "div",
3985
4051
  {
@@ -4143,7 +4209,7 @@ var ToolbarPlugin = () => {
4143
4209
  active: isBold,
4144
4210
  onClick: () => editor.dispatchCommand(FORMAT_TEXT_COMMAND, "bold"),
4145
4211
  tooltip: "Bold (Ctrl+B)",
4146
- children: /* @__PURE__ */ jsx(Bold, { className: "tw-size-4" })
4212
+ children: /* @__PURE__ */ jsx(icons_exports.Bold, { className: "tw-size-4" })
4147
4213
  }
4148
4214
  ),
4149
4215
  /* @__PURE__ */ jsx(
@@ -4152,7 +4218,7 @@ var ToolbarPlugin = () => {
4152
4218
  active: isItalic,
4153
4219
  onClick: () => editor.dispatchCommand(FORMAT_TEXT_COMMAND, "italic"),
4154
4220
  tooltip: "Italic (Ctrl+I)",
4155
- children: /* @__PURE__ */ jsx(Italic, { className: "tw-size-4" })
4221
+ children: /* @__PURE__ */ jsx(icons_exports.Italic, { className: "tw-size-4" })
4156
4222
  }
4157
4223
  ),
4158
4224
  /* @__PURE__ */ jsx(
@@ -4161,7 +4227,7 @@ var ToolbarPlugin = () => {
4161
4227
  active: isUnderline,
4162
4228
  onClick: () => editor.dispatchCommand(FORMAT_TEXT_COMMAND, "underline"),
4163
4229
  tooltip: "Underline (Ctrl+U)",
4164
- children: /* @__PURE__ */ jsx(Underline, { className: "tw-size-4" })
4230
+ children: /* @__PURE__ */ jsx(icons_exports.Underline, { className: "tw-size-4" })
4165
4231
  }
4166
4232
  ),
4167
4233
  /* @__PURE__ */ jsx(
@@ -4170,7 +4236,7 @@ var ToolbarPlugin = () => {
4170
4236
  active: isStrikethrough,
4171
4237
  onClick: () => editor.dispatchCommand(FORMAT_TEXT_COMMAND, "strikethrough"),
4172
4238
  tooltip: "Strikethrough",
4173
- children: /* @__PURE__ */ jsx(Strikethrough, { className: "tw-size-4" })
4239
+ children: /* @__PURE__ */ jsx(icons_exports.Strikethrough, { className: "tw-size-4" })
4174
4240
  }
4175
4241
  ),
4176
4242
  /* @__PURE__ */ jsx(
@@ -4179,7 +4245,7 @@ var ToolbarPlugin = () => {
4179
4245
  active: isCode,
4180
4246
  onClick: () => editor.dispatchCommand(FORMAT_TEXT_COMMAND, "code"),
4181
4247
  tooltip: "Inline Code",
4182
- children: /* @__PURE__ */ jsx(Code, { className: "tw-size-4" })
4248
+ children: /* @__PURE__ */ jsx(icons_exports.Code, { className: "tw-size-4" })
4183
4249
  }
4184
4250
  ),
4185
4251
  /* @__PURE__ */ jsx(ToolbarDivider, {}),
@@ -4197,7 +4263,7 @@ var ToolbarPlugin = () => {
4197
4263
  }
4198
4264
  },
4199
4265
  tooltip: "Bullet List",
4200
- children: /* @__PURE__ */ jsx(List, { className: "tw-size-4" })
4266
+ children: /* @__PURE__ */ jsx(icons_exports.List, { className: "tw-size-4" })
4201
4267
  }
4202
4268
  ),
4203
4269
  /* @__PURE__ */ jsx(
@@ -4212,7 +4278,7 @@ var ToolbarPlugin = () => {
4212
4278
  }
4213
4279
  },
4214
4280
  tooltip: "Numbered List",
4215
- children: /* @__PURE__ */ jsx(ListOrdered, { className: "tw-size-4" })
4281
+ children: /* @__PURE__ */ jsx(icons_exports.ListOrdered, { className: "tw-size-4" })
4216
4282
  }
4217
4283
  ),
4218
4284
  /* @__PURE__ */ jsx(ToolbarDivider, {}),
@@ -4234,7 +4300,7 @@ var ToolbarPlugin = () => {
4234
4300
  });
4235
4301
  },
4236
4302
  tooltip: "Quote",
4237
- children: /* @__PURE__ */ jsx(Quote, { className: "tw-size-4" })
4303
+ children: /* @__PURE__ */ jsx(icons_exports.Quote, { className: "tw-size-4" })
4238
4304
  }
4239
4305
  ),
4240
4306
  /* @__PURE__ */ jsx(
@@ -4253,7 +4319,7 @@ var ToolbarPlugin = () => {
4253
4319
  });
4254
4320
  },
4255
4321
  tooltip: "Code Block",
4256
- children: /* @__PURE__ */ jsx(SquareCode, { className: "tw-size-4" })
4322
+ children: /* @__PURE__ */ jsx(icons_exports.SquareCode, { className: "tw-size-4" })
4257
4323
  }
4258
4324
  )
4259
4325
  ]