@keboola/design 2.0.0 → 2.0.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.
Files changed (50) hide show
  1. package/dist/icons.cjs +8 -0
  2. package/dist/icons.js +1 -1
  3. package/dist/index.cjs +240 -38
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.js +230 -41
  6. package/dist/index.js.map +1 -1
  7. package/dist/markdown-editor.cjs +39 -16
  8. package/dist/markdown-editor.cjs.map +1 -1
  9. package/dist/markdown-editor.js +39 -16
  10. package/dist/markdown-editor.js.map +1 -1
  11. package/dist/mermaid.cjs +32 -9
  12. package/dist/mermaid.cjs.map +1 -1
  13. package/dist/mermaid.js +32 -9
  14. package/dist/mermaid.js.map +1 -1
  15. package/dist/styles.css +1 -1
  16. package/package.json +5 -4
  17. package/src/blocks/EmptyState/EmptyState.tsx +2 -2
  18. package/src/blocks/ErrorState/ErrorState.tsx +18 -3
  19. package/src/blocks/InputOtp/InputOtp.stories.tsx +214 -0
  20. package/src/blocks/InputOtp/InputOtp.test.tsx +162 -0
  21. package/src/blocks/InputOtp/InputOtp.tsx +62 -0
  22. package/src/blocks/InputOtp/InputOtpGroup.tsx +13 -0
  23. package/src/blocks/InputOtp/InputOtpSeparator.tsx +23 -0
  24. package/src/blocks/InputOtp/InputOtpSlot.styles.ts +52 -0
  25. package/src/blocks/InputOtp/InputOtpSlot.tsx +44 -0
  26. package/src/blocks/InputOtp/context.ts +23 -0
  27. package/src/blocks/InputOtp/index.ts +23 -0
  28. package/src/components/Alert/AlertIcon.tsx +1 -1
  29. package/src/components/Badge/BadgeAddon.tsx +1 -1
  30. package/src/components/Badge/BadgeButton.tsx +1 -1
  31. package/src/components/Breadcrumb/BreadcrumbLink.tsx +1 -1
  32. package/src/components/Breadcrumb/BreadcrumbSeparator.tsx +1 -1
  33. package/src/components/Button/styles.ts +33 -10
  34. package/src/components/Combobox/ComboboxItemIndicator.tsx +1 -1
  35. package/src/components/Command/CommandItem/CommandItem.tsx +1 -1
  36. package/src/components/DropdownMenu/DropdownMenuItemIndicator.tsx +4 -4
  37. package/src/components/DropdownMenu/ItemIcon.tsx +1 -1
  38. package/src/components/Modal/ModalIcon.tsx +1 -1
  39. package/src/components/Navbar/NavbarMenuItemAdornment.tsx +2 -2
  40. package/src/components/Pagination/PaginationEllipsis.tsx +1 -1
  41. package/src/components/Select/SelectContent.tsx +1 -1
  42. package/src/components/Sidebar/SidebarGroup/SidebarGroupAction.tsx +1 -1
  43. package/src/components/Sidebar/SidebarMenu/SidebarMenuAction.tsx +1 -1
  44. package/src/components/Sidebar/SidebarMenu/SidebarMenuIcon.tsx +1 -1
  45. package/src/components/Timeline/TimelineConnector.tsx +5 -1
  46. package/src/components/Toast/ToastDismiss.tsx +1 -1
  47. package/src/components/Toast/ToastRoot.tsx +1 -1
  48. package/src/components/Toggle/Toggle.tsx +1 -1
  49. package/src/icons/index.ts +2 -0
  50. package/src/index.ts +1 -0
package/dist/icons.cjs CHANGED
@@ -114,6 +114,10 @@ Object.defineProperty(exports, "BookOpen", {
114
114
  enumerable: true,
115
115
  get: function () { return lucideReact.BookOpen; }
116
116
  });
117
+ Object.defineProperty(exports, "Box", {
118
+ enumerable: true,
119
+ get: function () { return lucideReact.Box; }
120
+ });
117
121
  Object.defineProperty(exports, "Braces", {
118
122
  enumerable: true,
119
123
  get: function () { return lucideReact.Braces; }
@@ -674,6 +678,10 @@ Object.defineProperty(exports, "Table", {
674
678
  enumerable: true,
675
679
  get: function () { return lucideReact.Table; }
676
680
  });
681
+ Object.defineProperty(exports, "TableProperties", {
682
+ enumerable: true,
683
+ get: function () { return lucideReact.TableProperties; }
684
+ });
677
685
  Object.defineProperty(exports, "ThumbsDown", {
678
686
  enumerable: true,
679
687
  get: function () { return lucideReact.ThumbsDown; }
package/dist/icons.js CHANGED
@@ -1,4 +1,4 @@
1
- export { AlertCircle, AlertTriangle, AlignCenter, AlignJustify, AlignLeft, AlignRight, ArrowBigUpDash, ArrowDown, ArrowDownToLine, ArrowLeft, ArrowLeftRight, ArrowLeftToLine, ArrowRight, ArrowRightLeft, ArrowUp, ArrowUpAZ, ArrowUpRight, Ban, Bell, BellRing, Bold, BookOpen, Braces, Bug, Calendar, Camera, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, CircleAlert, CircleArrowDown, CircleArrowRight, CircleArrowUp, CircleCheck, CircleChevronDown, CircleChevronUp, CircleHelp, CirclePause, CirclePlay, CirclePlus, CircleUser, CircleX, Clock, CloudDownload, Code, Cog, Columns2, Columns3, Copy, CreditCard, Crosshair, Database, Diamond, Download, Ellipsis, EllipsisVertical, Expand, ExternalLink, Eye, EyeOff, File, FileDown, FileInput, FileSpreadsheet, FileText, Flag, Folder, FolderOpen, FolderTree, FolderUp, Gauge, Gift, GitBranch, GitCompare, GitMerge, GitPullRequest, Globe, GripVertical, Heading1, Heading2, Heading3, History, Hourglass, Image, Info, Italic, KanbanSquare, Key, Keyboard, Layers, LayoutGrid, LineChart, Link, List, ListChecks, ListFilter, ListOrdered, Loader2, Lock, LogIn, Mail, Map, Maximize, Maximize2, Menu, MessageCircleQuestion, Minimize, Minimize2, Minus, Moon, MoveHorizontal, MoveVertical, OctagonAlert, PanelBottomClose, PanelBottomOpen, PanelLeft, PanelLeftClose, PanelLeftOpen, PartyPopper, Pause, Pencil, PencilLine, Pipette, Play, Plus, Quote, RefreshCw, Repeat, Repeat2, Reply, Rocket, RotateCcw, RotateCw, Rows3, ScanLine, Search, Send, Settings, Share, Share2, Slash, Sliders, SlidersHorizontal, Sparkle, Sparkles, Split, Square, SquareChevronRight, SquareCode, SquareKanban, SquarePen, SquareTerminal, Star, StickyNote, Strikethrough, Table, ThumbsDown, ThumbsUp, ToggleRight, Trash2, TriangleAlert, Type, Underline, Unlink, Upload, User, Users, Wand2, Warehouse, Webhook, Workflow, Wrench, X, XCircle, Zap } from 'lucide-react';
1
+ export { AlertCircle, AlertTriangle, AlignCenter, AlignJustify, AlignLeft, AlignRight, ArrowBigUpDash, ArrowDown, ArrowDownToLine, ArrowLeft, ArrowLeftRight, ArrowLeftToLine, ArrowRight, ArrowRightLeft, ArrowUp, ArrowUpAZ, ArrowUpRight, Ban, Bell, BellRing, Bold, BookOpen, Box, Braces, Bug, Calendar, Camera, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, CircleAlert, CircleArrowDown, CircleArrowRight, CircleArrowUp, CircleCheck, CircleChevronDown, CircleChevronUp, CircleHelp, CirclePause, CirclePlay, CirclePlus, CircleUser, CircleX, Clock, CloudDownload, Code, Cog, Columns2, Columns3, Copy, CreditCard, Crosshair, Database, Diamond, Download, Ellipsis, EllipsisVertical, Expand, ExternalLink, Eye, EyeOff, File, FileDown, FileInput, FileSpreadsheet, FileText, Flag, Folder, FolderOpen, FolderTree, FolderUp, Gauge, Gift, GitBranch, GitCompare, GitMerge, GitPullRequest, Globe, GripVertical, Heading1, Heading2, Heading3, History, Hourglass, Image, Info, Italic, KanbanSquare, Key, Keyboard, Layers, LayoutGrid, LineChart, Link, List, ListChecks, ListFilter, ListOrdered, Loader2, Lock, LogIn, Mail, Map, Maximize, Maximize2, Menu, MessageCircleQuestion, Minimize, Minimize2, Minus, Moon, MoveHorizontal, MoveVertical, OctagonAlert, PanelBottomClose, PanelBottomOpen, PanelLeft, PanelLeftClose, PanelLeftOpen, PartyPopper, Pause, Pencil, PencilLine, Pipette, Play, Plus, Quote, RefreshCw, Repeat, Repeat2, Reply, Rocket, RotateCcw, RotateCw, Rows3, ScanLine, Search, Send, Settings, Share, Share2, Slash, Sliders, SlidersHorizontal, Sparkle, Sparkles, Split, Square, SquareChevronRight, SquareCode, SquareKanban, SquarePen, SquareTerminal, Star, StickyNote, Strikethrough, Table, TableProperties, ThumbsDown, ThumbsUp, ToggleRight, Trash2, TriangleAlert, Type, Underline, Unlink, Upload, User, Users, Wand2, Warehouse, Webhook, Workflow, Wrench, X, XCircle, Zap } from 'lucide-react';
2
2
  import { forwardRef } from 'react';
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
 
package/dist/index.cjs CHANGED
@@ -60,6 +60,7 @@ var state = require('@codemirror/state');
60
60
  var nodeDiff3 = require('node-diff3');
61
61
  var ResizablePrimitive = require('react-resizable-panels');
62
62
  var sonner = require('sonner');
63
+ var inputOtp = require('input-otp');
63
64
  var reactForm = require('@tanstack/react-form');
64
65
 
65
66
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -511,15 +512,38 @@ var variants = classVarianceAuthority.cva(
511
512
  ]
512
513
  },
513
514
  size: {
514
- medium: ["tw-max-h-10", "tw-min-h-10", "tw-px-4", "tw-py-2.5", "[&_svg]:tw-size-4"],
515
- small: ["tw-max-h-8", "tw-min-h-8", "tw-px-4", "tw-py-1.5", "[&_svg]:tw-size-4"],
516
- large: ["tw-max-h-12", "tw-min-h-12", "tw-px-4", "tw-py-3.5", "[&_svg]:tw-size-4"],
517
- "icon-lg": ["tw-size-12", "tw-p-0", "[&_svg]:tw-size-6"],
518
- icon: ["tw-size-10", "tw-p-0", "[&_svg]:tw-size-4"],
519
- "icon-sm": ["tw-size-8", "tw-p-0", "[&_svg]:tw-size-4"],
520
- "icon-xs": ["tw-size-6", "tw-p-0", "[&_svg]:tw-size-4"],
521
- "icon-2xs": ["!tw-inline-flex", "tw-size-5", "tw-max-h-5", "[&_svg]:tw-size-3"],
522
- "icon-3xs": ["tw-h-fit", "tw-w-fit", "[&_svg]:tw-size-4"]
515
+ medium: [
516
+ "tw-max-h-10",
517
+ "tw-min-h-10",
518
+ "tw-px-4",
519
+ "tw-py-2.5",
520
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4'
521
+ ],
522
+ small: [
523
+ "tw-max-h-8",
524
+ "tw-min-h-8",
525
+ "tw-px-4",
526
+ "tw-py-1.5",
527
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4'
528
+ ],
529
+ large: [
530
+ "tw-max-h-12",
531
+ "tw-min-h-12",
532
+ "tw-px-4",
533
+ "tw-py-3.5",
534
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4'
535
+ ],
536
+ "icon-lg": ["tw-size-12", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-6'],
537
+ icon: ["tw-size-10", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
538
+ "icon-sm": ["tw-size-8", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
539
+ "icon-xs": ["tw-size-6", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
540
+ "icon-2xs": [
541
+ "!tw-inline-flex",
542
+ "tw-size-5",
543
+ "tw-max-h-5",
544
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3'
545
+ ],
546
+ "icon-3xs": ["tw-h-fit", "tw-w-fit", '[&_svg:not([class*="tw-size-"])]:tw-size-4']
523
547
  }
524
548
  }
525
549
  }
@@ -3162,7 +3186,7 @@ var scrollButtonStyles = cn(
3162
3186
  "tw-justify-center",
3163
3187
  "tw-rounded-sm",
3164
3188
  "tw-p-1",
3165
- "[&_svg]:tw-size-5"
3189
+ '[&_svg:not([class*="tw-size-"])]:tw-size-5'
3166
3190
  );
3167
3191
  var SelectContent = ({
3168
3192
  ref,
@@ -3658,7 +3682,7 @@ var variants4 = classVarianceAuthority.cva(
3658
3682
  "tw-border-border",
3659
3683
  "tw-rounded-full",
3660
3684
  "tw-bg-white",
3661
- "[&_svg]:tw-size-2",
3685
+ '[&_svg:not([class*="tw-size-"])]:tw-size-2',
3662
3686
  "[&_svg]:data-[state=unchecked]:tw-hidden",
3663
3687
  // Lucide Circle is stroke-only — force fill to match the stroke
3664
3688
  // (currentColor) so the indicator reads as a solid dot.
@@ -3666,14 +3690,14 @@ var variants4 = classVarianceAuthority.cva(
3666
3690
  "group-data-[variant=argo]/dropdown-menu-content:[&_svg]:tw-text-primary",
3667
3691
  "group-data-[variant=default]/dropdown-menu-content:[&_svg]:tw-text-secondary-500"
3668
3692
  ],
3669
- check: ["[&_svg]:tw-size-3.5", "[&_svg]:tw-text-primary"],
3693
+ check: ['[&_svg:not([class*="tw-size-"])]:tw-size-3.5', "[&_svg]:tw-text-primary"],
3670
3694
  checkbox: [
3671
3695
  "[&_svg]:tw-text-white",
3672
3696
  "tw-border",
3673
3697
  "tw-border-solid",
3674
3698
  "tw-border-neutral-200",
3675
3699
  "tw-rounded",
3676
- "[&_svg]:tw-size-3",
3700
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3',
3677
3701
  "[&_svg]:data-[state=unchecked]:tw-hidden",
3678
3702
  "group-data-[variant=argo]/dropdown-menu-content:data-[state=checked]:tw-border-primary",
3679
3703
  "group-data-[variant=argo]/dropdown-menu-content:data-[state=checked]:tw-bg-primary",
@@ -3684,7 +3708,7 @@ var variants4 = classVarianceAuthority.cva(
3684
3708
  "tw-size-5",
3685
3709
  // Lucide SVGs default to 24×24 — constrain the rendered ToggleRight
3686
3710
  // to the indicator slot so it doesn't overflow.
3687
- "[&_svg]:tw-size-5",
3711
+ '[&_svg:not([class*="tw-size-"])]:tw-size-5',
3688
3712
  "tw-text-neutral-400",
3689
3713
  "data-[state=unchecked]:tw-rotate-180",
3690
3714
  "group-data-[variant=default]/dropdown-menu-content:data-[state=checked]:tw-text-secondary-500",
@@ -3732,7 +3756,7 @@ var ItemIcon = ({ className, children, ...props }) => /* @__PURE__ */ jsxRuntime
3732
3756
  // 20px container fits the 16px Lucide glyph plus 2px breathing room
3733
3757
  // each side — the previous tw-size-4 + tw-p-0.5 clipped the 16px child.
3734
3758
  "tw-size-5",
3735
- "[&_svg]:tw-size-4",
3759
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
3736
3760
  "group-data-[variant=default]/dropdown-menu-content:tw-text-neutral-400",
3737
3761
  "group-data-[variant=argo]/dropdown-menu-content:tw-text-primary",
3738
3762
  "group-data-[variant=argo]/dropdown-menu-content:group-aria-disabled:tw-text-muted-foreground",
@@ -4353,7 +4377,7 @@ var ModalIcon = (props) => {
4353
4377
  "tw-text-white": props.color !== "violet",
4354
4378
  "tw-text-purple-500": props.color === "violet"
4355
4379
  },
4356
- "[&_svg]:tw-size-6",
4380
+ '[&_svg:not([class*="tw-size-"])]:tw-size-6',
4357
4381
  "[&_svg]:tw-aspect-square"
4358
4382
  ),
4359
4383
  children: isFAIconValue(props.icon) ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: props.icon, spin: props.spin }) : props.icon
@@ -5360,7 +5384,7 @@ var SidebarGroupAction = ({
5360
5384
  "tw-text-neutral-800",
5361
5385
  "tw-rounded-full",
5362
5386
  // svg defaults: size + colour
5363
- "[&_svg]:tw-size-3",
5387
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3',
5364
5388
  "[&_svg]:tw-text-neutral-400",
5365
5389
  "hover:[&_svg]:tw-text-secondary-600",
5366
5390
  "hover:tw-bg-neutral-100",
@@ -5504,7 +5528,7 @@ var SidebarMenuIcon = ({
5504
5528
  "tw-shrink-0",
5505
5529
  "tw-p-0.5",
5506
5530
  "tw-text-sidebar-primary",
5507
- "[&_svg]:tw-size-4",
5531
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
5508
5532
  className
5509
5533
  ),
5510
5534
  children
@@ -5633,7 +5657,7 @@ var SidebarMenuAction = ({
5633
5657
  "tw-rounded",
5634
5658
  // icon styling
5635
5659
  "[&_svg]:tw-shrink-0",
5636
- "[&_svg]:tw-size-3.5",
5660
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3.5',
5637
5661
  "[&_svg]:tw-text-sidebar-accent-foreground",
5638
5662
  // focus visible
5639
5663
  "focus-visible:tw-outline-none",
@@ -6519,7 +6543,7 @@ var CommandItem = ({
6519
6543
  ),
6520
6544
  children: [
6521
6545
  /* @__PURE__ */ jsxRuntime.jsx(CheckIndicator, { variant }),
6522
- icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-text-neutral-400 [&_svg]:tw-size-4", children: icon }),
6546
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-text-neutral-400 [&_svg:not([class*='tw-size-'])]:tw-size-4", children: icon }),
6523
6547
  children
6524
6548
  ]
6525
6549
  }
@@ -6593,7 +6617,7 @@ var addonVariants2 = classVarianceAuthority.cva(
6593
6617
  "tw-self-stretch",
6594
6618
  "tw-px-1",
6595
6619
  "has-[button]:tw-px-0",
6596
- "[&_svg]:tw-size-3"
6620
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3'
6597
6621
  ],
6598
6622
  {
6599
6623
  defaultVariants: {
@@ -6664,7 +6688,7 @@ var BadgeButton = ({
6664
6688
  // Default sizing for Lucide-icon children (which ship at 24×24); keeps
6665
6689
  // the visual baseline aligned with the previous FA-icon API and other
6666
6690
  // icon-wrapper components (ItemIcon, SidebarMenuIcon).
6667
- "[&_svg]:tw-size-3",
6691
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3',
6668
6692
  className
6669
6693
  ),
6670
6694
  children
@@ -7067,7 +7091,7 @@ var ComboboxItemIndicator = ({
7067
7091
  "group-data-[variant=default]/combobox-content:tw-right-4",
7068
7092
  // Lucide SVGs default to 24×24 — constrain the rendered child so the
7069
7093
  // 16px indicator slot owns the actual size.
7070
- "[&_svg]:tw-size-4",
7094
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
7071
7095
  "group-data-[highlighted]/combobox-item:tw-text-accent-foreground",
7072
7096
  "group-data-[variant=default]/combobox-content:group-data-[highlighted]/combobox-item:tw-text-foreground",
7073
7097
  className
@@ -7465,7 +7489,7 @@ var BreadcrumbLink = ({
7465
7489
  "focus-visible:tw-ring-secondary-500/50",
7466
7490
  "focus-visible:tw-rounded-sm",
7467
7491
  // Icon
7468
- "[&_svg]:tw-size-3.5",
7492
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3.5',
7469
7493
  // transition
7470
7494
  "tw-transition-colors",
7471
7495
  className
@@ -7521,7 +7545,7 @@ var BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */
7521
7545
  "tw-justify-center",
7522
7546
  "tw-aspect-square",
7523
7547
  "tw-size-[15px]",
7524
- "[&_svg]:tw-size-2.5",
7548
+ '[&_svg:not([class*="tw-size-"])]:tw-size-2.5',
7525
7549
  "tw-text-muted-foreground",
7526
7550
  className
7527
7551
  ),
@@ -7625,7 +7649,7 @@ var variants6 = classVarianceAuthority.cva(
7625
7649
  "tw-flex",
7626
7650
  "tw-justify-center",
7627
7651
  "tw-items-center",
7628
- "[&_svg]:tw-size-3",
7652
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3',
7629
7653
  "[&:not(svg)]:tw-h-5",
7630
7654
  "[&:not(svg)]:tw-min-w-5",
7631
7655
  "tw-p-1",
@@ -7657,7 +7681,7 @@ var variants6 = classVarianceAuthority.cva(
7657
7681
  "group-data-[accent=orange]/navbar:tw-bg-warning-500",
7658
7682
  "group-data-[accent=green]/navbar:tw-bg-primary-500"
7659
7683
  ],
7660
- "icon-button": ["tw-size-4", "tw-max-h-9", "tw-leading-9", "tw-p-0"],
7684
+ "icon-button": ["tw-size-4", "!tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
7661
7685
  shortcut: ["tw-bg-muted", "tw-text-sidebar-foreground", "tw-ml-auto"]
7662
7686
  }
7663
7687
  }
@@ -7875,7 +7899,7 @@ var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime
7875
7899
  "tw-items-center",
7876
7900
  "tw-justify-center",
7877
7901
  "tw-text-foreground",
7878
- "[&_svg]:tw-size-4",
7902
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
7879
7903
  className
7880
7904
  ),
7881
7905
  ...props,
@@ -8201,7 +8225,7 @@ var Toggle = ({
8201
8225
  disabled,
8202
8226
  children: [
8203
8227
  badge && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-absolute tw-right-0 tw-top-0 -tw-translate-y-1/2 tw-translate-x-1/4", children: badge }),
8204
- icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-align-middle [&_svg]:tw-size-4", children: renderLegacyIcon(icon) }),
8228
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-align-middle [&_svg:not([class*='tw-size-'])]:tw-size-4", children: renderLegacyIcon(icon) }),
8205
8229
  isAiVariant ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tw-bg-gradient-to-br tw-from-secondary-700 tw-to-purple-700 tw-bg-clip-text tw-text-transparent", children }) : children
8206
8230
  ]
8207
8231
  }
@@ -8366,7 +8390,11 @@ var connector = classVarianceAuthority.cva(
8366
8390
  "tw-text-nowrap",
8367
8391
  "tw-text-xs"
8368
8392
  ],
8369
- icon: ["tw-bg-white", "[&_svg]:tw-size-4", "[&_svg]:tw-text-neutral-300"],
8393
+ icon: [
8394
+ "tw-bg-white",
8395
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
8396
+ "[&_svg]:tw-text-neutral-300"
8397
+ ],
8370
8398
  line: [
8371
8399
  "tw-min-w-8",
8372
8400
  "tw-overflow-hidden",
@@ -9627,7 +9655,7 @@ var AlertIcon = ({ variant, icon, className, ...rest }) => /* @__PURE__ */ jsxRu
9627
9655
  "tw-justify-center",
9628
9656
  "tw-self-start",
9629
9657
  "tw-p-0.5",
9630
- "[&_svg]:tw-size-4",
9658
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
9631
9659
  "group-data-[variant=info]/alert:tw-text-secondary-500",
9632
9660
  "group-data-[variant=warning]/alert:tw-text-warning-500",
9633
9661
  "group-data-[variant=error]/alert:tw-text-error-500",
@@ -11986,7 +12014,7 @@ var ToastDismiss = ({
11986
12014
  "tw-row-start-1",
11987
12015
  "tailwindcss-preflight",
11988
12016
  "[&_svg]:tw-aspect-square",
11989
- "[&_svg]:tw-size-4",
12017
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
11990
12018
  "[&_svg]:tw-m-1",
11991
12019
  "tw-text-white",
11992
12020
  "group-data-[variant=default]/toast:[&_svg]:tw-text-popover-foreground",
@@ -12137,7 +12165,7 @@ var ToastRoot = ({
12137
12165
  "tw-aspect-square",
12138
12166
  "tw-size-5",
12139
12167
  "tw-shrink-0",
12140
- "[&_svg]:tw-size-5",
12168
+ '[&_svg:not([class*="tw-size-"])]:tw-size-5',
12141
12169
  "tw-text-white",
12142
12170
  "group-data-[variant=default]/toast:tw-text-popover-foreground"
12143
12171
  ),
@@ -12267,8 +12295,8 @@ var emptyStateIconClassnames = classVarianceAuthority.cva(
12267
12295
  {
12268
12296
  variants: {
12269
12297
  variant: {
12270
- default: ["tw-size-16", "tw-text-4xl", "[&_svg]:tw-size-10"],
12271
- compact: ["tw-size-10", "tw-text-2xl", "[&_svg]:tw-size-6"]
12298
+ default: ["tw-size-16", "tw-text-4xl", '[&_svg:not([class*="tw-size-"])]:tw-size-10'],
12299
+ compact: ["tw-size-10", "tw-text-2xl", '[&_svg:not([class*="tw-size-"])]:tw-size-6']
12272
12300
  }
12273
12301
  },
12274
12302
  defaultVariants: {
@@ -12339,9 +12367,24 @@ var errorStateClassnames = classVarianceAuthority.cva(["tw-flex", "tw-flex-col",
12339
12367
  var errorStateIconClassnames = classVarianceAuthority.cva(["tw-flex", "tw-items-center", "tw-justify-center"], {
12340
12368
  variants: {
12341
12369
  variant: {
12342
- default: ["tw-size-16", "tw-text-4xl", "[&_svg]:tw-size-10", "tw-text-warning-500"],
12343
- compact: ["tw-size-10", "tw-text-2xl", "[&_svg]:tw-size-6", "tw-text-warning-500"],
12344
- destructive: ["tw-size-16", "tw-text-4xl", "[&_svg]:tw-size-10", "tw-text-error-500"]
12370
+ default: [
12371
+ "tw-size-16",
12372
+ "tw-text-4xl",
12373
+ '[&_svg:not([class*="tw-size-"])]:tw-size-10',
12374
+ "tw-text-warning-500"
12375
+ ],
12376
+ compact: [
12377
+ "tw-size-10",
12378
+ "tw-text-2xl",
12379
+ '[&_svg:not([class*="tw-size-"])]:tw-size-6',
12380
+ "tw-text-warning-500"
12381
+ ],
12382
+ destructive: [
12383
+ "tw-size-16",
12384
+ "tw-text-4xl",
12385
+ '[&_svg:not([class*="tw-size-"])]:tw-size-10',
12386
+ "tw-text-error-500"
12387
+ ]
12345
12388
  }
12346
12389
  },
12347
12390
  defaultVariants: {
@@ -14314,6 +14357,151 @@ var PasswordInput = ({
14314
14357
  }
14315
14358
  );
14316
14359
  };
14360
+ var InputOtpVariantContext = react.createContext({
14361
+ sizing: "md",
14362
+ state: "default"
14363
+ });
14364
+ var useInputOtpVariant = () => react.use(InputOtpVariantContext);
14365
+ var useInputOtpRenderContext = () => react.use(inputOtp.OTPInputContext);
14366
+ var InputOtpGroup = ({
14367
+ ref,
14368
+ className,
14369
+ ...props
14370
+ }) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("tw-flex tw-items-center tw-gap-2", className), ...props });
14371
+ var InputOtpSeparator = ({
14372
+ ref,
14373
+ children,
14374
+ className,
14375
+ ...props
14376
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
14377
+ "div",
14378
+ {
14379
+ ref,
14380
+ role: "separator",
14381
+ "aria-orientation": "vertical",
14382
+ className: cn("tw-flex tw-items-center tw-text-muted-foreground", className),
14383
+ ...props,
14384
+ children: children ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { className: "tw-size-4" })
14385
+ }
14386
+ );
14387
+ var slotVariants = classVarianceAuthority.cva(
14388
+ [
14389
+ "tw-relative",
14390
+ "tw-flex",
14391
+ "tw-items-center",
14392
+ "tw-justify-center",
14393
+ "tw-border",
14394
+ "tw-border-input",
14395
+ "tw-bg-background",
14396
+ "tw-text-foreground",
14397
+ "tw-font-medium",
14398
+ "tw-tabular-nums",
14399
+ "tw-rounded-lg",
14400
+ "tw-transition",
14401
+ "tw-outline-none",
14402
+ // active slot sits above its neighbours so its ring isn't clipped
14403
+ "data-[active=true]:tw-z-10",
14404
+ "data-[active=true]:tw-border-primary",
14405
+ "data-[active=true]:tw-ring-2",
14406
+ "data-[active=true]:tw-ring-primary/50"
14407
+ ],
14408
+ {
14409
+ defaultVariants: {
14410
+ sizing: "md",
14411
+ state: "default"
14412
+ },
14413
+ variants: {
14414
+ sizing: {
14415
+ sm: ["tw-h-8", "tw-w-8", "tw-text-sm"],
14416
+ md: ["tw-h-9", "tw-w-9", "tw-text-base"],
14417
+ lg: ["tw-h-10", "tw-w-10", "tw-text-lg"]
14418
+ },
14419
+ // `!` forces the border colour over the base `tw-border-input` once tailwind-merge dedupes.
14420
+ // Matches the pattern InputGroup uses for its argo error state.
14421
+ state: {
14422
+ default: [],
14423
+ error: [
14424
+ "!tw-border-destructive",
14425
+ "tw-bg-destructive/5",
14426
+ "data-[active=true]:!tw-border-destructive",
14427
+ "data-[active=true]:tw-ring-destructive/40"
14428
+ ]
14429
+ }
14430
+ }
14431
+ }
14432
+ );
14433
+ var InputOtpSlot = ({
14434
+ ref,
14435
+ index,
14436
+ className,
14437
+ ...props
14438
+ }) => {
14439
+ const { slots } = useInputOtpRenderContext();
14440
+ const { sizing, state } = useInputOtpVariant();
14441
+ const slot = slots[index];
14442
+ const char = slot?.char ?? null;
14443
+ const isActive = slot?.isActive ?? false;
14444
+ const hasFakeCaret = slot?.hasFakeCaret ?? false;
14445
+ return /* @__PURE__ */ jsxRuntime.jsxs(
14446
+ "div",
14447
+ {
14448
+ ref,
14449
+ "data-active": isActive || void 0,
14450
+ "data-slot-index": index,
14451
+ className: cn(slotVariants({ sizing, state }), className),
14452
+ ...props,
14453
+ children: [
14454
+ char,
14455
+ hasFakeCaret && /* @__PURE__ */ jsxRuntime.jsx(
14456
+ "div",
14457
+ {
14458
+ "aria-hidden": "true",
14459
+ className: "tw-pointer-events-none tw-absolute tw-inset-0 tw-flex tw-items-center tw-justify-center",
14460
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tw-h-1/2 tw-w-px tw-animate-caret-blink tw-bg-foreground" })
14461
+ }
14462
+ )
14463
+ ]
14464
+ }
14465
+ );
14466
+ };
14467
+ var Root31 = ({
14468
+ ref,
14469
+ sizing = "md",
14470
+ state = "default",
14471
+ pattern = inputOtp.REGEXP_ONLY_DIGITS,
14472
+ containerClassName,
14473
+ className,
14474
+ children,
14475
+ ...rest
14476
+ }) => /* @__PURE__ */ jsxRuntime.jsx(InputOtpVariantContext, { value: { sizing, state }, children: /* @__PURE__ */ jsxRuntime.jsx(
14477
+ inputOtp.OTPInput,
14478
+ {
14479
+ ...rest,
14480
+ ref,
14481
+ pattern,
14482
+ "aria-invalid": state === "error" || void 0,
14483
+ containerClassName: cn(
14484
+ "tw-flex tw-items-center tw-gap-2 has-[:disabled]:tw-opacity-50",
14485
+ containerClassName
14486
+ ),
14487
+ className: cn("disabled:tw-cursor-not-allowed", className),
14488
+ children
14489
+ }
14490
+ ) });
14491
+ var InputOtp = Object.assign(Root31, {
14492
+ Group: InputOtpGroup,
14493
+ Slot: InputOtpSlot,
14494
+ Separator: InputOtpSeparator
14495
+ });
14496
+
14497
+ // src/blocks/InputOtp/index.ts
14498
+ var useInputOtpContext = () => {
14499
+ const ctx = react.use(inputOtp.OTPInputContext);
14500
+ if (!ctx.slots) {
14501
+ throw new Error("useInputOtpContext must be used inside <InputOtp>.");
14502
+ }
14503
+ return ctx;
14504
+ };
14317
14505
  var { fieldContext, useFieldContext, formContext, useFormContext } = reactForm.createFormHookContexts();
14318
14506
  var FormBody = ({ children, className, ...formProps }) => {
14319
14507
  const form = useFormContext();
@@ -14792,6 +14980,18 @@ Object.defineProperty(exports, "useCommandState", {
14792
14980
  enumerable: true,
14793
14981
  get: function () { return cmdk.useCommandState; }
14794
14982
  });
14983
+ Object.defineProperty(exports, "REGEXP_ONLY_CHARS", {
14984
+ enumerable: true,
14985
+ get: function () { return inputOtp.REGEXP_ONLY_CHARS; }
14986
+ });
14987
+ Object.defineProperty(exports, "REGEXP_ONLY_DIGITS", {
14988
+ enumerable: true,
14989
+ get: function () { return inputOtp.REGEXP_ONLY_DIGITS; }
14990
+ });
14991
+ Object.defineProperty(exports, "REGEXP_ONLY_DIGITS_AND_CHARS", {
14992
+ enumerable: true,
14993
+ get: function () { return inputOtp.REGEXP_ONLY_DIGITS_AND_CHARS; }
14994
+ });
14795
14995
  exports.Alert = Alert;
14796
14996
  exports.AnswerSummary = AnswerSummary;
14797
14997
  exports.AutoSaveTextarea = AutoSaveTextarea;
@@ -14841,6 +15041,7 @@ exports.Icon = Icon;
14841
15041
  exports.InlineStepDetail = InlineStepDetail;
14842
15042
  exports.InlineStepLabel = InlineStepLabel;
14843
15043
  exports.InputGroup = InputGroup;
15044
+ exports.InputOtp = InputOtp;
14844
15045
  exports.Kbd = Kbd;
14845
15046
  exports.Label = Label;
14846
15047
  exports.Link = Link2;
@@ -14921,6 +15122,7 @@ exports.setServerFieldErrors = setServerFieldErrors;
14921
15122
  exports.toast = toast;
14922
15123
  exports.useAppForm = useAppForm;
14923
15124
  exports.useAutosizeInput = useAutosizeInput;
15125
+ exports.useInputOtpContext = useInputOtpContext;
14924
15126
  exports.useMergeDiff = useMergeDiff;
14925
15127
  exports.useNotification = useNotification;
14926
15128
  exports.useScrollbarPosition = useScrollbarPosition;