@keboola/design 1.3.1 → 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 (98) hide show
  1. package/dist/icons.cjs +32 -0
  2. package/dist/icons.js +1 -1
  3. package/dist/index.cjs +507 -103
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.js +495 -106
  6. package/dist/index.js.map +1 -1
  7. package/dist/markdown-editor.cjs +78 -42
  8. package/dist/markdown-editor.cjs.map +1 -1
  9. package/dist/markdown-editor.js +78 -42
  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 +8 -6
  17. package/src/blocks/AIKit/PlanApproval.tsx +29 -12
  18. package/src/blocks/AIKit/PromptInput.test.tsx +53 -0
  19. package/src/blocks/AIKit/PromptInput.tsx +1 -1
  20. package/src/blocks/AIKit/Question.tsx +39 -11
  21. package/src/blocks/AIKit/SuggestedPrompt.stories.tsx +2 -8
  22. package/src/blocks/EmptyState/EmptyState.stories.tsx +5 -5
  23. package/src/blocks/EmptyState/EmptyState.tsx +2 -2
  24. package/src/blocks/ErrorState/ErrorState.stories.tsx +6 -6
  25. package/src/blocks/ErrorState/ErrorState.tsx +18 -3
  26. package/src/blocks/InputOtp/InputOtp.stories.tsx +214 -0
  27. package/src/blocks/InputOtp/InputOtp.test.tsx +162 -0
  28. package/src/blocks/InputOtp/InputOtp.tsx +62 -0
  29. package/src/blocks/InputOtp/InputOtpGroup.tsx +13 -0
  30. package/src/blocks/InputOtp/InputOtpSeparator.tsx +23 -0
  31. package/src/blocks/InputOtp/InputOtpSlot.styles.ts +52 -0
  32. package/src/blocks/InputOtp/InputOtpSlot.tsx +44 -0
  33. package/src/blocks/InputOtp/context.ts +23 -0
  34. package/src/blocks/InputOtp/index.ts +23 -0
  35. package/src/blocks/PageHeader/AGENTS.md +1 -1
  36. package/src/blocks/PageHeader/PageHeader.stories.tsx +6 -3
  37. package/src/blocks/PageHeader/PageHeaderIndex.tsx +2 -2
  38. package/src/blocks/PageLayout/AGENTS.md +3 -3
  39. package/src/blocks/PageLayout/PageLayout.stories.tsx +7 -4
  40. package/src/blocks/PageLayout/PageLayout.tsx +1 -18
  41. package/src/blocks/PageToolbar/PageToolbar.stories.tsx +79 -74
  42. package/src/blocks/PageToolbar/PageToolbar.tsx +45 -4
  43. package/src/blocks/PageToolbar/PageToolbarToken.tsx +61 -0
  44. package/src/blocks/SearchInput/SearchInput.tsx +2 -2
  45. package/src/components/Alert/AlertDescription.tsx +5 -0
  46. package/src/components/Alert/AlertIcon.tsx +1 -1
  47. package/src/components/Badge/Badge.stories.tsx +3 -5
  48. package/src/components/Badge/BadgeAddon.tsx +1 -1
  49. package/src/components/Badge/BadgeButton.tsx +1 -1
  50. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +4 -4
  51. package/src/components/Breadcrumb/BreadcrumbLink.tsx +1 -1
  52. package/src/components/Breadcrumb/BreadcrumbSeparator.tsx +1 -1
  53. package/src/components/Button/ButtonInline.stories.tsx +3 -3
  54. package/src/components/Button/ButtonInline.tsx +4 -0
  55. package/src/components/Button/styles.ts +33 -10
  56. package/src/components/Card/Card.stories.tsx +2 -2
  57. package/src/components/Combobox/ComboboxItemIndicator.tsx +1 -1
  58. package/src/components/Command/CommandItem/CommandItem.tsx +1 -1
  59. package/src/components/DropdownMenu/DropdownMenuItemIndicator.tsx +4 -4
  60. package/src/components/DropdownMenu/ItemIcon.tsx +1 -1
  61. package/src/components/FormGroup/FormGroup.stories.tsx +2 -2
  62. package/src/components/HoverCard/HoverCardContent.tsx +5 -0
  63. package/src/components/Input/Input.stories.tsx +2 -2
  64. package/src/components/InputGroup/InputGroup.stories.tsx +4 -5
  65. package/src/components/InputGroup/InputGroup.tsx +1 -1
  66. package/src/components/InputGroup/InputGroupAddon.tsx +35 -24
  67. package/src/components/Kbd/Kbd.stories.tsx +2 -2
  68. package/src/components/Label/Label.stories.tsx +2 -2
  69. package/src/components/Modal/ModalBody.tsx +5 -0
  70. package/src/components/Modal/ModalIcon.tsx +1 -1
  71. package/src/components/Navbar/Navbar.stories.tsx +4 -5
  72. package/src/components/Navbar/NavbarMenuItemAdornment.tsx +2 -2
  73. package/src/components/Pagination/Pagination.stories.tsx +0 -1
  74. package/src/components/Pagination/PaginationEllipsis.tsx +1 -1
  75. package/src/components/Popover/PopoverContent.tsx +4 -0
  76. package/src/components/Select/SelectContent.tsx +1 -1
  77. package/src/components/Select/SelectTrigger.tsx +1 -1
  78. package/src/components/Separator/Separator.stories.tsx +19 -0
  79. package/src/components/Separator/Separator.test.tsx +39 -0
  80. package/src/components/Separator/Separator.tsx +42 -11
  81. package/src/components/Sidebar/Sidebar.stories.tsx +6 -5
  82. package/src/components/Sidebar/SidebarGroup/SidebarGroupAction.tsx +1 -1
  83. package/src/components/Sidebar/SidebarMenu/SidebarMenuAction.tsx +1 -1
  84. package/src/components/Sidebar/SidebarMenu/SidebarMenuIcon.tsx +1 -1
  85. package/src/components/Table/Table.stories.tsx +16 -16
  86. package/src/components/Timeline/Timeline.stories.tsx +8 -8
  87. package/src/components/Timeline/TimelineConnector.tsx +5 -1
  88. package/src/components/Toast/ToastDismiss.tsx +1 -1
  89. package/src/components/Toast/ToastRoot.tsx +1 -1
  90. package/src/components/Toggle/Toggle.tsx +1 -1
  91. package/src/components/ToggleGroup/ToggleGroup.stories.tsx +60 -0
  92. package/src/components/ToggleGroup/ToggleGroup.tsx +99 -0
  93. package/src/components/ToggleGroup/index.ts +1 -0
  94. package/src/components/Tooltip/Tooltip.stories.tsx +2 -2
  95. package/src/hooks/useAutosizeInput.stories.tsx +2 -2
  96. package/src/icons/index.ts +8 -0
  97. package/src/index.ts +2 -0
  98. package/src/patterns/FilterToolbar.stories.tsx +248 -44
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Slot, Root as Root$1, Slottable } from '@radix-ui/react-slot';
2
2
  export { Slot } from '@radix-ui/react-slot';
3
- import { ChevronLeft, Loader2, Calendar, Clock, Sparkles, Search, Check, Minus, X, ChevronDown as ChevronDown$1, Plus, Copy, CircleCheck, AlertTriangle, ChevronUp, Send, ChevronRight, FileText, ArrowBigUpDash, EyeOff, Eye, Minimize2, Maximize2, Circle, Ellipsis, XCircle, Info, ChevronsRight, ChevronsLeft, CirclePause, Play, AlertCircle, ToggleRight } from 'lucide-react';
3
+ import { ChevronLeft, Plus, ChevronDown as ChevronDown$1, X, Minus, Loader2, Calendar, Clock, Sparkles, Search, Check, Copy, CircleCheck, AlertTriangle, ChevronUp, Send, ChevronRight, FileText, ArrowBigUpDash, EyeOff, Eye, Minimize2, Maximize2, Circle, Ellipsis, XCircle, Info, ChevronsRight, ChevronsLeft, CirclePause, Play, AlertCircle, ToggleRight } from 'lucide-react';
4
4
  import { clsx } from 'clsx';
5
5
  import { extendTailwindMerge } from 'tailwind-merge';
6
- import { createContext, useRef, useEffect, useMemo, useState, useId, use, useCallback, Fragment as Fragment$1, useLayoutEffect, useReducer, Children } from 'react';
6
+ import { createContext, useRef, useEffect, useMemo, useState, use, useId, useCallback, Fragment as Fragment$1, useLayoutEffect, useReducer, Children } from 'react';
7
7
  import { Provider, Root as Root$b, Trigger as Trigger$3, Portal, Content } from '@radix-ui/react-tooltip';
8
8
  import { cva } from 'class-variance-authority';
9
9
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -39,6 +39,7 @@ import * as RadixAvatar from '@radix-ui/react-avatar';
39
39
  import BoringAvatar from 'boring-avatars';
40
40
  import { library } from '@fortawesome/fontawesome-svg-core';
41
41
  import { Root as Root$9 } from '@radix-ui/react-toggle';
42
+ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
42
43
  import { Root as Root$a, Indicator as Indicator$1 } from '@radix-ui/react-progress';
43
44
  import { diffLines, diffWords } from 'diff';
44
45
  import * as RadixTabs from '@radix-ui/react-tabs';
@@ -63,6 +64,8 @@ import { StateEffect, StateField, RangeSet, RangeSetBuilder } from '@codemirror/
63
64
  import { diff3Merge } from 'node-diff3';
64
65
  import * as ResizablePrimitive from 'react-resizable-panels';
65
66
  import { toast as toast$1, Toaster as Toaster$1 } from 'sonner';
67
+ import { OTPInput, REGEXP_ONLY_DIGITS, OTPInputContext } from 'input-otp';
68
+ export { REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from 'input-otp';
66
69
  import { createFormHookContexts, createFormHook } from '@tanstack/react-form';
67
70
 
68
71
  // src/components/Button/Button.tsx
@@ -478,15 +481,38 @@ var variants = cva(
478
481
  ]
479
482
  },
480
483
  size: {
481
- medium: ["tw-max-h-10", "tw-min-h-10", "tw-px-4", "tw-py-2.5", "[&_svg]:tw-size-4"],
482
- small: ["tw-max-h-8", "tw-min-h-8", "tw-px-4", "tw-py-1.5", "[&_svg]:tw-size-4"],
483
- large: ["tw-max-h-12", "tw-min-h-12", "tw-px-4", "tw-py-3.5", "[&_svg]:tw-size-4"],
484
- "icon-lg": ["tw-size-12", "tw-p-0", "[&_svg]:tw-size-6"],
485
- icon: ["tw-size-10", "tw-p-0", "[&_svg]:tw-size-4"],
486
- "icon-sm": ["tw-size-8", "tw-p-0", "[&_svg]:tw-size-4"],
487
- "icon-xs": ["tw-size-6", "tw-p-0", "[&_svg]:tw-size-4"],
488
- "icon-2xs": ["!tw-inline-flex", "tw-size-5", "tw-max-h-5", "[&_svg]:tw-size-3"],
489
- "icon-3xs": ["tw-h-fit", "tw-w-fit", "[&_svg]:tw-size-4"]
484
+ medium: [
485
+ "tw-max-h-10",
486
+ "tw-min-h-10",
487
+ "tw-px-4",
488
+ "tw-py-2.5",
489
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4'
490
+ ],
491
+ small: [
492
+ "tw-max-h-8",
493
+ "tw-min-h-8",
494
+ "tw-px-4",
495
+ "tw-py-1.5",
496
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4'
497
+ ],
498
+ large: [
499
+ "tw-max-h-12",
500
+ "tw-min-h-12",
501
+ "tw-px-4",
502
+ "tw-py-3.5",
503
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4'
504
+ ],
505
+ "icon-lg": ["tw-size-12", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-6'],
506
+ icon: ["tw-size-10", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
507
+ "icon-sm": ["tw-size-8", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
508
+ "icon-xs": ["tw-size-6", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
509
+ "icon-2xs": [
510
+ "!tw-inline-flex",
511
+ "tw-size-5",
512
+ "tw-max-h-5",
513
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3'
514
+ ],
515
+ "icon-3xs": ["tw-h-fit", "tw-w-fit", '[&_svg:not([class*="tw-size-"])]:tw-size-4']
490
516
  }
491
517
  }
492
518
  }
@@ -668,7 +694,10 @@ var buttonInlineVariants = cva(
668
694
  "disabled:tw-cursor-not-allowed",
669
695
  "disabled:tw-text-neutral-500",
670
696
  "disabled:tw-no-underline",
671
- "[&_svg]:disabled:tw-text-neutral-400"
697
+ "[&_svg]:disabled:tw-text-neutral-400",
698
+ // Default size for nested Lucide icons; callers can override on the icon.
699
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4",
700
+ "[&_svg]:tw-shrink-0"
672
701
  ],
673
702
  {
674
703
  defaultVariants: {
@@ -849,7 +878,10 @@ var variants2 = cva(
849
878
  "data-[side=bottom]:tw-slide-in-from-top-2",
850
879
  "data-[side=left]:tw-slide-in-from-right-2",
851
880
  "data-[side=right]:tw-slide-in-from-left-2",
852
- "data-[side=top]:tw-slide-in-from-bottom-2"
881
+ "data-[side=top]:tw-slide-in-from-bottom-2",
882
+ // Default size for nested Lucide icons; callers can override on the icon.
883
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4",
884
+ "[&_svg]:tw-shrink-0"
853
885
  ],
854
886
  {
855
887
  defaultVariants: {
@@ -1103,32 +1135,42 @@ var TimePicker = ({
1103
1135
  )
1104
1136
  ] });
1105
1137
  };
1106
- var addonVariants = cva(["tw-flex", "tw-items-center", "tw-gap-1"], {
1107
- defaultVariants: {
1108
- align: "inline-start"
1109
- },
1110
- variants: {
1111
- align: {
1112
- "inline-start": ["tw-order-first", "[&:not(:empty)]:tw-pl-4"],
1113
- "inline-end": ["tw-order-last", "[&:not(:empty)]:tw-pr-4"],
1114
- "block-start": [
1115
- "tw-order-first",
1116
- // `tw-w-full` needs to be empty-conditional too — when the addon
1117
- // has no content the root stays in flex-row, and a 100%-wide
1118
- // empty addon would claim half of the input row beside the input.
1119
- "[&:not(:empty)]:tw-w-full",
1120
- "[&:not(:empty)]:tw-px-4",
1121
- "[&:not(:empty)]:tw-py-1.5"
1122
- ],
1123
- "block-end": [
1124
- "tw-order-last",
1125
- "[&:not(:empty)]:tw-w-full",
1126
- "[&:not(:empty)]:tw-px-4",
1127
- "[&:not(:empty)]:tw-py-1.5"
1128
- ]
1138
+ var addonVariants = cva(
1139
+ [
1140
+ "tw-flex",
1141
+ "tw-items-center",
1142
+ "tw-gap-1",
1143
+ // Default size for nested Lucide icons in prefix/suffix slots; callers can override on the icon.
1144
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4",
1145
+ "[&_svg]:tw-shrink-0"
1146
+ ],
1147
+ {
1148
+ defaultVariants: {
1149
+ align: "inline-start"
1150
+ },
1151
+ variants: {
1152
+ align: {
1153
+ "inline-start": ["tw-order-first", "[&:not(:empty)]:tw-pl-4"],
1154
+ "inline-end": ["tw-order-last", "[&:not(:empty)]:tw-pr-4"],
1155
+ "block-start": [
1156
+ "tw-order-first",
1157
+ // `tw-w-full` needs to be empty-conditional too — when the addon
1158
+ // has no content the root stays in flex-row, and a 100%-wide
1159
+ // empty addon would claim half of the input row beside the input.
1160
+ "[&:not(:empty)]:tw-w-full",
1161
+ "[&:not(:empty)]:tw-px-4",
1162
+ "[&:not(:empty)]:tw-py-1.5"
1163
+ ],
1164
+ "block-end": [
1165
+ "tw-order-last",
1166
+ "[&:not(:empty)]:tw-w-full",
1167
+ "[&:not(:empty)]:tw-px-4",
1168
+ "[&:not(:empty)]:tw-py-1.5"
1169
+ ]
1170
+ }
1129
1171
  }
1130
1172
  }
1131
- });
1173
+ );
1132
1174
  var InputGroupAddon = ({
1133
1175
  children,
1134
1176
  align = "inline-start",
@@ -1287,7 +1329,7 @@ var inputGroupVariants = cva(
1287
1329
  defaultVariants: {
1288
1330
  variant: "primary",
1289
1331
  state: "default",
1290
- sizing: "default",
1332
+ sizing: "medium",
1291
1333
  focusVariant: "default"
1292
1334
  },
1293
1335
  compoundVariants: [
@@ -2398,6 +2440,9 @@ var HoverCardContent = ({
2398
2440
  "data-[state=closed]:tw-animate-out",
2399
2441
  "data-[state=closed]:tw-fade-out-0",
2400
2442
  "data-[state=closed]:tw-zoom-out-95",
2443
+ // Default size for nested Lucide icons; callers can override on the icon.
2444
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4",
2445
+ "[&_svg]:tw-shrink-0",
2401
2446
  className
2402
2447
  ),
2403
2448
  ...props,
@@ -2416,7 +2461,7 @@ var separatorVariants = cva(
2416
2461
  "tw-self-stretch",
2417
2462
  // before
2418
2463
  "before:tw-content-['']",
2419
- "before:tw-bg-neutral-150"
2464
+ "before:tw-bg-border"
2420
2465
  ],
2421
2466
  {
2422
2467
  defaultVariants: {
@@ -2472,16 +2517,37 @@ var Separator = ({
2472
2517
  className,
2473
2518
  orientation = "vertical",
2474
2519
  size = "full",
2520
+ label,
2475
2521
  ...props
2476
- }) => /* @__PURE__ */ jsx(
2477
- RSeparator.Root,
2478
- {
2479
- ...props,
2480
- decorative: true,
2481
- orientation,
2482
- className: separatorVariants({ size, orientation, className })
2522
+ }) => {
2523
+ if (label != null && label !== false) {
2524
+ return /* @__PURE__ */ jsx(
2525
+ RSeparator.Root,
2526
+ {
2527
+ ...props,
2528
+ decorative: true,
2529
+ orientation: "horizontal",
2530
+ className: cn(
2531
+ "tw-flex tw-w-full tw-items-center tw-gap-3 tw-self-stretch",
2532
+ "tw-text-xs tw-font-medium tw-text-muted-foreground",
2533
+ "before:tw-content-[''] before:tw-h-px before:tw-flex-1 before:tw-bg-border",
2534
+ "after:tw-content-[''] after:tw-h-px after:tw-flex-1 after:tw-bg-border",
2535
+ className
2536
+ ),
2537
+ children: label
2538
+ }
2539
+ );
2483
2540
  }
2484
- );
2541
+ return /* @__PURE__ */ jsx(
2542
+ RSeparator.Root,
2543
+ {
2544
+ ...props,
2545
+ decorative: true,
2546
+ orientation,
2547
+ className: separatorVariants({ size, orientation, className })
2548
+ }
2549
+ );
2550
+ };
2485
2551
  var RadioGroupContext = createContext({
2486
2552
  variant: "radio",
2487
2553
  orientation: "horizontal"
@@ -3089,7 +3155,7 @@ var scrollButtonStyles = cn(
3089
3155
  "tw-justify-center",
3090
3156
  "tw-rounded-sm",
3091
3157
  "tw-p-1",
3092
- "[&_svg]:tw-size-5"
3158
+ '[&_svg:not([class*="tw-size-"])]:tw-size-5'
3093
3159
  );
3094
3160
  var SelectContent = ({
3095
3161
  ref,
@@ -3285,7 +3351,7 @@ var variants3 = cva(
3285
3351
  defaultVariants: {
3286
3352
  variant: "primary",
3287
3353
  state: "default",
3288
- sizing: "default"
3354
+ sizing: "medium"
3289
3355
  },
3290
3356
  compoundVariants: [
3291
3357
  {
@@ -3585,7 +3651,7 @@ var variants4 = cva(
3585
3651
  "tw-border-border",
3586
3652
  "tw-rounded-full",
3587
3653
  "tw-bg-white",
3588
- "[&_svg]:tw-size-2",
3654
+ '[&_svg:not([class*="tw-size-"])]:tw-size-2',
3589
3655
  "[&_svg]:data-[state=unchecked]:tw-hidden",
3590
3656
  // Lucide Circle is stroke-only — force fill to match the stroke
3591
3657
  // (currentColor) so the indicator reads as a solid dot.
@@ -3593,14 +3659,14 @@ var variants4 = cva(
3593
3659
  "group-data-[variant=argo]/dropdown-menu-content:[&_svg]:tw-text-primary",
3594
3660
  "group-data-[variant=default]/dropdown-menu-content:[&_svg]:tw-text-secondary-500"
3595
3661
  ],
3596
- check: ["[&_svg]:tw-size-3.5", "[&_svg]:tw-text-primary"],
3662
+ check: ['[&_svg:not([class*="tw-size-"])]:tw-size-3.5', "[&_svg]:tw-text-primary"],
3597
3663
  checkbox: [
3598
3664
  "[&_svg]:tw-text-white",
3599
3665
  "tw-border",
3600
3666
  "tw-border-solid",
3601
3667
  "tw-border-neutral-200",
3602
3668
  "tw-rounded",
3603
- "[&_svg]:tw-size-3",
3669
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3',
3604
3670
  "[&_svg]:data-[state=unchecked]:tw-hidden",
3605
3671
  "group-data-[variant=argo]/dropdown-menu-content:data-[state=checked]:tw-border-primary",
3606
3672
  "group-data-[variant=argo]/dropdown-menu-content:data-[state=checked]:tw-bg-primary",
@@ -3611,7 +3677,7 @@ var variants4 = cva(
3611
3677
  "tw-size-5",
3612
3678
  // Lucide SVGs default to 24×24 — constrain the rendered ToggleRight
3613
3679
  // to the indicator slot so it doesn't overflow.
3614
- "[&_svg]:tw-size-5",
3680
+ '[&_svg:not([class*="tw-size-"])]:tw-size-5',
3615
3681
  "tw-text-neutral-400",
3616
3682
  "data-[state=unchecked]:tw-rotate-180",
3617
3683
  "group-data-[variant=default]/dropdown-menu-content:data-[state=checked]:tw-text-secondary-500",
@@ -3659,7 +3725,7 @@ var ItemIcon = ({ className, children, ...props }) => /* @__PURE__ */ jsx(
3659
3725
  // 20px container fits the 16px Lucide glyph plus 2px breathing room
3660
3726
  // each side — the previous tw-size-4 + tw-p-0.5 clipped the 16px child.
3661
3727
  "tw-size-5",
3662
- "[&_svg]:tw-size-4",
3728
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
3663
3729
  "group-data-[variant=default]/dropdown-menu-content:tw-text-neutral-400",
3664
3730
  "group-data-[variant=argo]/dropdown-menu-content:tw-text-primary",
3665
3731
  "group-data-[variant=argo]/dropdown-menu-content:group-aria-disabled:tw-text-muted-foreground",
@@ -4040,6 +4106,9 @@ var ModalBody = ({ className, ...props }) => /* @__PURE__ */ jsx(
4040
4106
  "tw-px-1",
4041
4107
  // 4 px to complement ModalContent and still keep input focus outline visible
4042
4108
  "tw-py-1",
4109
+ // Default size for nested Lucide icons; callers can override on the icon.
4110
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4",
4111
+ "[&_svg]:tw-shrink-0",
4043
4112
  className
4044
4113
  ),
4045
4114
  ...props
@@ -4277,7 +4346,7 @@ var ModalIcon = (props) => {
4277
4346
  "tw-text-white": props.color !== "violet",
4278
4347
  "tw-text-purple-500": props.color === "violet"
4279
4348
  },
4280
- "[&_svg]:tw-size-6",
4349
+ '[&_svg:not([class*="tw-size-"])]:tw-size-6',
4281
4350
  "[&_svg]:tw-aspect-square"
4282
4351
  ),
4283
4352
  children: isFAIconValue(props.icon) ? /* @__PURE__ */ jsx(Icon, { icon: props.icon, spin: props.spin }) : props.icon
@@ -5284,7 +5353,7 @@ var SidebarGroupAction = ({
5284
5353
  "tw-text-neutral-800",
5285
5354
  "tw-rounded-full",
5286
5355
  // svg defaults: size + colour
5287
- "[&_svg]:tw-size-3",
5356
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3',
5288
5357
  "[&_svg]:tw-text-neutral-400",
5289
5358
  "hover:[&_svg]:tw-text-secondary-600",
5290
5359
  "hover:tw-bg-neutral-100",
@@ -5428,7 +5497,7 @@ var SidebarMenuIcon = ({
5428
5497
  "tw-shrink-0",
5429
5498
  "tw-p-0.5",
5430
5499
  "tw-text-sidebar-primary",
5431
- "[&_svg]:tw-size-4",
5500
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
5432
5501
  className
5433
5502
  ),
5434
5503
  children
@@ -5557,7 +5626,7 @@ var SidebarMenuAction = ({
5557
5626
  "tw-rounded",
5558
5627
  // icon styling
5559
5628
  "[&_svg]:tw-shrink-0",
5560
- "[&_svg]:tw-size-3.5",
5629
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3.5',
5561
5630
  "[&_svg]:tw-text-sidebar-accent-foreground",
5562
5631
  // focus visible
5563
5632
  "focus-visible:tw-outline-none",
@@ -6443,7 +6512,7 @@ var CommandItem = ({
6443
6512
  ),
6444
6513
  children: [
6445
6514
  /* @__PURE__ */ jsx(CheckIndicator, { variant }),
6446
- icon && /* @__PURE__ */ 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 }),
6515
+ icon && /* @__PURE__ */ 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 }),
6447
6516
  children
6448
6517
  ]
6449
6518
  }
@@ -6517,7 +6586,7 @@ var addonVariants2 = cva(
6517
6586
  "tw-self-stretch",
6518
6587
  "tw-px-1",
6519
6588
  "has-[button]:tw-px-0",
6520
- "[&_svg]:tw-size-3"
6589
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3'
6521
6590
  ],
6522
6591
  {
6523
6592
  defaultVariants: {
@@ -6588,7 +6657,7 @@ var BadgeButton = ({
6588
6657
  // Default sizing for Lucide-icon children (which ship at 24×24); keeps
6589
6658
  // the visual baseline aligned with the previous FA-icon API and other
6590
6659
  // icon-wrapper components (ItemIcon, SidebarMenuIcon).
6591
- "[&_svg]:tw-size-3",
6660
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3',
6592
6661
  className
6593
6662
  ),
6594
6663
  children
@@ -6991,7 +7060,7 @@ var ComboboxItemIndicator = ({
6991
7060
  "group-data-[variant=default]/combobox-content:tw-right-4",
6992
7061
  // Lucide SVGs default to 24×24 — constrain the rendered child so the
6993
7062
  // 16px indicator slot owns the actual size.
6994
- "[&_svg]:tw-size-4",
7063
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
6995
7064
  "group-data-[highlighted]/combobox-item:tw-text-accent-foreground",
6996
7065
  "group-data-[variant=default]/combobox-content:group-data-[highlighted]/combobox-item:tw-text-foreground",
6997
7066
  className
@@ -7389,7 +7458,7 @@ var BreadcrumbLink = ({
7389
7458
  "focus-visible:tw-ring-secondary-500/50",
7390
7459
  "focus-visible:tw-rounded-sm",
7391
7460
  // Icon
7392
- "[&_svg]:tw-size-2.5",
7461
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3.5',
7393
7462
  // transition
7394
7463
  "tw-transition-colors",
7395
7464
  className
@@ -7445,7 +7514,7 @@ var BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */
7445
7514
  "tw-justify-center",
7446
7515
  "tw-aspect-square",
7447
7516
  "tw-size-[15px]",
7448
- "[&_svg]:tw-size-2.5",
7517
+ '[&_svg:not([class*="tw-size-"])]:tw-size-2.5',
7449
7518
  "tw-text-muted-foreground",
7450
7519
  className
7451
7520
  ),
@@ -7549,7 +7618,7 @@ var variants6 = cva(
7549
7618
  "tw-flex",
7550
7619
  "tw-justify-center",
7551
7620
  "tw-items-center",
7552
- "[&_svg]:tw-size-3",
7621
+ '[&_svg:not([class*="tw-size-"])]:tw-size-3',
7553
7622
  "[&:not(svg)]:tw-h-5",
7554
7623
  "[&:not(svg)]:tw-min-w-5",
7555
7624
  "tw-p-1",
@@ -7581,7 +7650,7 @@ var variants6 = cva(
7581
7650
  "group-data-[accent=orange]/navbar:tw-bg-warning-500",
7582
7651
  "group-data-[accent=green]/navbar:tw-bg-primary-500"
7583
7652
  ],
7584
- "icon-button": ["tw-size-4", "tw-max-h-9", "tw-leading-9", "tw-p-0"],
7653
+ "icon-button": ["tw-size-4", "!tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
7585
7654
  shortcut: ["tw-bg-muted", "tw-text-sidebar-foreground", "tw-ml-auto"]
7586
7655
  }
7587
7656
  }
@@ -7799,7 +7868,7 @@ var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsx(
7799
7868
  "tw-items-center",
7800
7869
  "tw-justify-center",
7801
7870
  "tw-text-foreground",
7802
- "[&_svg]:tw-size-4",
7871
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
7803
7872
  className
7804
7873
  ),
7805
7874
  ...props,
@@ -8125,12 +8194,83 @@ var Toggle = ({
8125
8194
  disabled,
8126
8195
  children: [
8127
8196
  badge && /* @__PURE__ */ jsx("span", { className: "tw-absolute tw-right-0 tw-top-0 -tw-translate-y-1/2 tw-translate-x-1/4", children: badge }),
8128
- icon && /* @__PURE__ */ 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) }),
8197
+ icon && /* @__PURE__ */ jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-align-middle [&_svg:not([class*='tw-size-'])]:tw-size-4", children: renderLegacyIcon(icon) }),
8129
8198
  isAiVariant ? /* @__PURE__ */ jsx("div", { className: "tw-bg-gradient-to-br tw-from-secondary-700 tw-to-purple-700 tw-bg-clip-text tw-text-transparent", children }) : children
8130
8199
  ]
8131
8200
  }
8132
8201
  );
8133
8202
  };
8203
+ var rootVariants2 = cva(
8204
+ [
8205
+ "tailwindcss-preflight",
8206
+ "tw-inline-flex",
8207
+ "tw-items-center",
8208
+ "tw-shrink-0",
8209
+ "tw-bg-muted",
8210
+ "tw-rounded-lg",
8211
+ "tw-p-[3px]",
8212
+ "tw-gap-0"
8213
+ ],
8214
+ {
8215
+ defaultVariants: { size: "medium" },
8216
+ variants: {
8217
+ size: {
8218
+ small: ["tw-h-8"],
8219
+ medium: ["tw-h-9"],
8220
+ large: ["tw-h-10"]
8221
+ }
8222
+ }
8223
+ }
8224
+ );
8225
+ var itemClasses = cn(
8226
+ "tailwindcss-preflight",
8227
+ "tw-inline-flex",
8228
+ "tw-items-center",
8229
+ "tw-justify-center",
8230
+ "tw-gap-2",
8231
+ "tw-shrink-0",
8232
+ "tw-whitespace-nowrap",
8233
+ "tw-h-full",
8234
+ "tw-rounded-md",
8235
+ "tw-px-2",
8236
+ "tw-py-1",
8237
+ "tw-bg-transparent",
8238
+ "tw-text-foreground",
8239
+ "tw-text-sm",
8240
+ "tw-font-medium",
8241
+ "tw-transition-colors",
8242
+ "disabled:tw-cursor-not-allowed",
8243
+ "disabled:tw-opacity-50",
8244
+ "!tw-outline-none",
8245
+ "focus-visible:tw-ring-2",
8246
+ "focus-visible:tw-ring-primary/50",
8247
+ // hover on non-pressed
8248
+ "not-disabled:[&[data-state=off]]:hover:tw-bg-background/60",
8249
+ // pressed
8250
+ "data-[state=on]:tw-bg-background",
8251
+ "data-[state=on]:tw-shadow-[0_1px_2px_rgba(0,0,0,0.05),0_1px_1px_rgba(0,0,0,0.1)]",
8252
+ "[&_svg]:tw-shrink-0",
8253
+ "[&_svg]:tw-pointer-events-none",
8254
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4"
8255
+ );
8256
+ var Root25 = ({
8257
+ ref,
8258
+ className,
8259
+ size = "medium",
8260
+ ...props
8261
+ }) => /* @__PURE__ */ jsx(
8262
+ ToggleGroupPrimitive.Root,
8263
+ {
8264
+ ref,
8265
+ ...props,
8266
+ className: cn(rootVariants2({ size, className }))
8267
+ }
8268
+ );
8269
+ var Item6 = ({ ref, className, ...props }) => /* @__PURE__ */ jsx(ToggleGroupPrimitive.Item, { ref, ...props, className: cn(itemClasses, className) });
8270
+ var ToggleGroup = Object.assign(Root25, {
8271
+ /** Individual segment inside a `ToggleGroup`. `value` is required and must be unique within the group. */
8272
+ Item: Item6
8273
+ });
8134
8274
  var CONNECTOR_MARGIN_TOP = 8;
8135
8275
  var useLastLineHeight = () => {
8136
8276
  const [wrapper, setWrapper] = useElement();
@@ -8219,7 +8359,11 @@ var connector = cva(
8219
8359
  "tw-text-nowrap",
8220
8360
  "tw-text-xs"
8221
8361
  ],
8222
- icon: ["tw-bg-white", "[&_svg]:tw-text-neutral-300"],
8362
+ icon: [
8363
+ "tw-bg-white",
8364
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
8365
+ "[&_svg]:tw-text-neutral-300"
8366
+ ],
8223
8367
  line: [
8224
8368
  "tw-min-w-8",
8225
8369
  "tw-overflow-hidden",
@@ -9455,6 +9599,9 @@ var AlertDescription = ({
9455
9599
  "group-has-[[data-slot=alert-title]]/alert:before:tw-h-4",
9456
9600
  "group-has-[[data-slot=alert-title]]/alert:before:tw-content-['']",
9457
9601
  "tw-break-anywhere",
9602
+ // Default size for nested Lucide icons; callers can override on the icon.
9603
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4",
9604
+ "[&_svg]:tw-shrink-0",
9458
9605
  className
9459
9606
  ),
9460
9607
  children
@@ -9477,7 +9624,7 @@ var AlertIcon = ({ variant, icon, className, ...rest }) => /* @__PURE__ */ jsx(
9477
9624
  "tw-justify-center",
9478
9625
  "tw-self-start",
9479
9626
  "tw-p-0.5",
9480
- "[&_svg]:tw-size-4",
9627
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
9481
9628
  "group-data-[variant=info]/alert:tw-text-secondary-500",
9482
9629
  "group-data-[variant=warning]/alert:tw-text-warning-500",
9483
9630
  "group-data-[variant=error]/alert:tw-text-error-500",
@@ -11541,7 +11688,7 @@ var Skeleton = ({ height = "md", className, count = 1 }) => {
11541
11688
  var duplicateArray = (arr, times) => {
11542
11689
  return Array(times).fill(arr).flat();
11543
11690
  };
11544
- var Item5 = ({
11691
+ var Item7 = ({
11545
11692
  className,
11546
11693
  iconHeight = "md",
11547
11694
  rowHeight = "sm",
@@ -11568,7 +11715,7 @@ var SkeletonList = ({
11568
11715
  ),
11569
11716
  children: duplicateArray(["tw-w-5/6", "tw-w-3/4", "tw-w-4/5", "tw-w-2/3"], groups).map(
11570
11717
  (className2, index) => /* @__PURE__ */ jsx(
11571
- Item5,
11718
+ Item7,
11572
11719
  {
11573
11720
  iconHeight,
11574
11721
  rowHeight,
@@ -11836,7 +11983,7 @@ var ToastDismiss = ({
11836
11983
  "tw-row-start-1",
11837
11984
  "tailwindcss-preflight",
11838
11985
  "[&_svg]:tw-aspect-square",
11839
- "[&_svg]:tw-size-4",
11986
+ '[&_svg:not([class*="tw-size-"])]:tw-size-4',
11840
11987
  "[&_svg]:tw-m-1",
11841
11988
  "tw-text-white",
11842
11989
  "group-data-[variant=default]/toast:[&_svg]:tw-text-popover-foreground",
@@ -11987,7 +12134,7 @@ var ToastRoot = ({
11987
12134
  "tw-aspect-square",
11988
12135
  "tw-size-5",
11989
12136
  "tw-shrink-0",
11990
- "[&_svg]:tw-size-5",
12137
+ '[&_svg:not([class*="tw-size-"])]:tw-size-5',
11991
12138
  "tw-text-white",
11992
12139
  "group-data-[variant=default]/toast:tw-text-popover-foreground"
11993
12140
  ),
@@ -12117,8 +12264,8 @@ var emptyStateIconClassnames = cva(
12117
12264
  {
12118
12265
  variants: {
12119
12266
  variant: {
12120
- default: ["tw-size-16", "tw-text-4xl"],
12121
- compact: ["tw-size-10", "tw-text-2xl"]
12267
+ default: ["tw-size-16", "tw-text-4xl", '[&_svg:not([class*="tw-size-"])]:tw-size-10'],
12268
+ compact: ["tw-size-10", "tw-text-2xl", '[&_svg:not([class*="tw-size-"])]:tw-size-6']
12122
12269
  }
12123
12270
  },
12124
12271
  defaultVariants: {
@@ -12189,9 +12336,24 @@ var errorStateClassnames = cva(["tw-flex", "tw-flex-col", "tw-items-center", "tw
12189
12336
  var errorStateIconClassnames = cva(["tw-flex", "tw-items-center", "tw-justify-center"], {
12190
12337
  variants: {
12191
12338
  variant: {
12192
- default: ["tw-size-16", "tw-text-4xl", "tw-text-warning-500"],
12193
- compact: ["tw-size-10", "tw-text-2xl", "tw-text-warning-500"],
12194
- destructive: ["tw-size-16", "tw-text-4xl", "tw-text-error-500"]
12339
+ default: [
12340
+ "tw-size-16",
12341
+ "tw-text-4xl",
12342
+ '[&_svg:not([class*="tw-size-"])]:tw-size-10',
12343
+ "tw-text-warning-500"
12344
+ ],
12345
+ compact: [
12346
+ "tw-size-10",
12347
+ "tw-text-2xl",
12348
+ '[&_svg:not([class*="tw-size-"])]:tw-size-6',
12349
+ "tw-text-warning-500"
12350
+ ],
12351
+ destructive: [
12352
+ "tw-size-16",
12353
+ "tw-text-4xl",
12354
+ '[&_svg:not([class*="tw-size-"])]:tw-size-10',
12355
+ "tw-text-error-500"
12356
+ ]
12195
12357
  }
12196
12358
  },
12197
12359
  defaultVariants: {
@@ -12255,7 +12417,7 @@ var maxWidthClass = {
12255
12417
  wide: "tw-max-w-[1600px]",
12256
12418
  full: "tw-max-w-full"
12257
12419
  };
12258
- var Root27 = ({
12420
+ var Root29 = ({
12259
12421
  ref,
12260
12422
  className,
12261
12423
  maxWidth = "full",
@@ -12300,20 +12462,6 @@ var Tabs2 = ({
12300
12462
  children
12301
12463
  }
12302
12464
  );
12303
- var Toolbar = ({
12304
- ref,
12305
- className,
12306
- children,
12307
- ...props
12308
- }) => /* @__PURE__ */ jsx(
12309
- "div",
12310
- {
12311
- ref,
12312
- className: cn("tw-flex tw-w-full tw-flex-wrap tw-items-center tw-gap-3", className),
12313
- ...props,
12314
- children
12315
- }
12316
- );
12317
12465
  var Content11 = ({
12318
12466
  ref,
12319
12467
  className,
@@ -12339,15 +12487,13 @@ var Footer = ({
12339
12487
  children
12340
12488
  }
12341
12489
  );
12342
- var PageLayout = Object.assign(Root27, {
12490
+ var PageLayout = Object.assign(Root29, {
12343
12491
  /** Detail-pattern breadcrumb row. Usually composed automatically by `PageHeader.Detail` — slot exists for layouts that don't fit either `PageHeader` variant. */
12344
12492
  Breadcrumbs,
12345
12493
  /** Host slot for `PageHeader.Index` / `PageHeader.Detail`, or custom header JSX when neither variant fits. */
12346
12494
  Header,
12347
12495
  /** Escape hatch for routing-based tab rows. Use `Tabs` / `TabsContent` core components inside, never a raw `<button>`. */
12348
12496
  Tabs: Tabs2,
12349
- /** Search / filter pill row. Belongs here, NOT in the header per the page-header patterns. */
12350
- Toolbar,
12351
12497
  /** Main content slot. Lists, cards, tables. */
12352
12498
  Content: Content11,
12353
12499
  /** Bottom action bar — form submit + cancel. Pass `sticky` for a footer that pins to the viewport. */
@@ -12433,7 +12579,47 @@ var PageHeader = {
12433
12579
  /** Detail variant — single-entity pages with required breadcrumbs and an overflow-actions slot. Max 2 visible actions. */
12434
12580
  Detail: PageHeaderDetail
12435
12581
  };
12436
- var Root28 = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsx(
12582
+ var PageToolbarToken = ({
12583
+ children,
12584
+ popover,
12585
+ onRemove,
12586
+ removeAriaLabel,
12587
+ ...props
12588
+ }) => /* @__PURE__ */ jsxs(Popover, { children: [
12589
+ /* @__PURE__ */ jsx(
12590
+ Badge,
12591
+ {
12592
+ ...props,
12593
+ asChild: true,
12594
+ variant: "pill",
12595
+ color: "blue-inverse",
12596
+ suffix: /* @__PURE__ */ jsx(
12597
+ Button,
12598
+ {
12599
+ type: "button",
12600
+ variant: "inline",
12601
+ size: "icon-2xs",
12602
+ "aria-label": removeAriaLabel,
12603
+ onClick: onRemove,
12604
+ children: /* @__PURE__ */ jsx(X, { className: "tw-size-3" })
12605
+ }
12606
+ ),
12607
+ children: /* @__PURE__ */ jsxs(
12608
+ Popover.Trigger,
12609
+ {
12610
+ type: "button",
12611
+ className: "tailwindcss-preflight tw-inline-flex tw-cursor-pointer tw-items-center tw-gap-1 tw-bg-inherit tw-text-inherit",
12612
+ children: [
12613
+ children,
12614
+ /* @__PURE__ */ jsx(ChevronDown$1, { className: "tw-size-3" })
12615
+ ]
12616
+ }
12617
+ )
12618
+ }
12619
+ ),
12620
+ /* @__PURE__ */ jsx(Popover.Content, { variant: "argo", align: "start", children: popover })
12621
+ ] });
12622
+ var Root30 = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsx(
12437
12623
  "div",
12438
12624
  {
12439
12625
  ref,
@@ -12473,12 +12659,32 @@ var ActiveFilters = ({ ref, className, children, ...props }) => /* @__PURE__ */
12473
12659
  children
12474
12660
  }
12475
12661
  );
12662
+ var Chip = ({ children, onRemove, removeAriaLabel, ...props }) => /* @__PURE__ */ jsx(
12663
+ Badge,
12664
+ {
12665
+ ...props,
12666
+ variant: "pill",
12667
+ color: "blue-inverse",
12668
+ suffix: /* @__PURE__ */ jsx(
12669
+ Button,
12670
+ {
12671
+ type: "button",
12672
+ variant: "inline",
12673
+ size: "icon-2xs",
12674
+ "aria-label": removeAriaLabel,
12675
+ onClick: onRemove,
12676
+ children: /* @__PURE__ */ jsx(X, { className: "tw-size-3" })
12677
+ }
12678
+ ),
12679
+ children
12680
+ }
12681
+ );
12476
12682
  var AddFilter = ({ className, children, ...props }) => /* @__PURE__ */ jsxs(Button, { argo: true, variant: "invisible", size: "small", className: cn("tw-gap-1.5", className), ...props, children: [
12477
- /* @__PURE__ */ jsx(Icon, { icon: "plus" }),
12683
+ /* @__PURE__ */ jsx(Plus, { className: "tw-size-4" }),
12478
12684
  children ?? "Add filter"
12479
12685
  ] });
12480
12686
  var Clear = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Button, { argo: true, variant: "invisible", size: "small", className: cn("tw-ml-auto", className), ...props, children: children ?? "Clear all" });
12481
- var PageToolbar = Object.assign(Root28, {
12687
+ var PageToolbar = Object.assign(Root30, {
12482
12688
  /** Left slot — typically a `SearchInput`. */
12483
12689
  Search: Search4,
12484
12690
  /** Right cluster — host the four control groups below in the recommended order. */
@@ -12497,6 +12703,14 @@ var PageToolbar = Object.assign(Root28, {
12497
12703
  * by `AddFilter` / `Clear`.
12498
12704
  */
12499
12705
  ActiveFilters,
12706
+ /** Non-editable filter chip (Standard variant) — `Badge` pill with a dismiss button. */
12707
+ Chip,
12708
+ /**
12709
+ * Editable filter token (Query Builder variant) — `Badge` pill with a `chevron-down`
12710
+ * popover trigger for editing values and an `×` dismiss button. The popover content
12711
+ * is supplied by the caller via the `popover` slot (typically a `Combobox` or option list).
12712
+ */
12713
+ Token: PageToolbarToken,
12500
12714
  /** "+ Add filter" action — typically rendered after the chips/tokens in `ActiveFilters`. */
12501
12715
  AddFilter,
12502
12716
  /** "Clear all" action — self-aligns to the far right of `ActiveFilters`. */
@@ -13104,6 +13318,7 @@ var PlanApproval = ({
13104
13318
  onRequestChanges,
13105
13319
  onClose,
13106
13320
  isSubmitting = false,
13321
+ approveTooltip,
13107
13322
  pendingPillLabel = "Ready for approval",
13108
13323
  approvedPillLabel = "Approved",
13109
13324
  dismissedPillLabel = "Dismissed",
@@ -13290,7 +13505,7 @@ var PlanApproval = ({
13290
13505
  children: requestChangesLabel
13291
13506
  }
13292
13507
  ),
13293
- onApprove && /* @__PURE__ */ jsx(
13508
+ onApprove && (approveTooltip ? /* @__PURE__ */ jsx(Tooltip, { tooltip: approveTooltip, placement: "top", triggerAsChild: true, children: /* @__PURE__ */ jsx(
13294
13509
  Button,
13295
13510
  {
13296
13511
  argo: true,
@@ -13301,7 +13516,18 @@ var PlanApproval = ({
13301
13516
  "data-testid": "plan-approve-button",
13302
13517
  children: approveLabel
13303
13518
  }
13304
- )
13519
+ ) }) : /* @__PURE__ */ jsx(
13520
+ Button,
13521
+ {
13522
+ argo: true,
13523
+ variant: "primary",
13524
+ size: "small",
13525
+ onClick: onApprove,
13526
+ disabled: isSubmitting || isRequestingChanges,
13527
+ "data-testid": "plan-approve-button",
13528
+ children: approveLabel
13529
+ }
13530
+ ))
13305
13531
  ] })
13306
13532
  ]
13307
13533
  }
@@ -13452,7 +13678,7 @@ var PromptInput = ({
13452
13678
  const handleOnKeyDown = (event) => {
13453
13679
  if (event.key === "Enter" && !event.shiftKey && !event.ctrlKey && !event.metaKey) {
13454
13680
  event.preventDefault();
13455
- handleSubmit();
13681
+ if (status !== "streaming") handleSubmit();
13456
13682
  }
13457
13683
  };
13458
13684
  const handleOnMouseDown = (event) => {
@@ -13536,12 +13762,14 @@ var Question = ({
13536
13762
  onSelectionChange,
13537
13763
  customAnswer = "",
13538
13764
  onCustomAnswerChange,
13765
+ onCustomAnswerConfirm,
13539
13766
  showCustomAnswer = true,
13540
13767
  customAnswerPlaceholder = "Type your answer\u2026",
13541
13768
  showSkip = true,
13542
13769
  onSkip,
13543
13770
  onClose,
13544
13771
  onNext,
13772
+ submitTooltip,
13545
13773
  onPrevious,
13546
13774
  currentStep,
13547
13775
  totalSteps,
@@ -13696,6 +13924,12 @@ var Question = ({
13696
13924
  value: customAnswer,
13697
13925
  onValueChange: (value) => onCustomAnswerChange?.(value),
13698
13926
  onFocus: handleCustomFocus,
13927
+ onKeyDown: onCustomAnswerConfirm ? (e) => {
13928
+ if (e.key === "Enter" && !e.shiftKey && !(e.metaKey || e.ctrlKey)) {
13929
+ e.preventDefault();
13930
+ onCustomAnswerConfirm();
13931
+ }
13932
+ } : void 0,
13699
13933
  placeholder: customAnswerPlaceholder,
13700
13934
  sizing: "small",
13701
13935
  testId: "question-custom"
@@ -13769,7 +14003,7 @@ var Question = ({
13769
14003
  children: "Skip"
13770
14004
  }
13771
14005
  ),
13772
- (multiSelect || isCustomSelected) && /* @__PURE__ */ jsx(
14006
+ (multiSelect || isCustomSelected) && (submitTooltip ? /* @__PURE__ */ jsx(Tooltip, { tooltip: submitTooltip, placement: "top", triggerAsChild: true, children: /* @__PURE__ */ jsx(
13773
14007
  Button,
13774
14008
  {
13775
14009
  argo: true,
@@ -13779,7 +14013,17 @@ var Question = ({
13779
14013
  "data-testid": "question-next-button",
13780
14014
  children: isLastStep ? "Submit" : "Next"
13781
14015
  }
13782
- )
14016
+ ) }) : /* @__PURE__ */ jsx(
14017
+ Button,
14018
+ {
14019
+ argo: true,
14020
+ variant: "primary",
14021
+ size: "small",
14022
+ onClick: onNext,
14023
+ "data-testid": "question-next-button",
14024
+ children: isLastStep ? "Submit" : "Next"
14025
+ }
14026
+ ))
13783
14027
  ]
13784
14028
  }
13785
14029
  )
@@ -14082,6 +14326,151 @@ var PasswordInput = ({
14082
14326
  }
14083
14327
  );
14084
14328
  };
14329
+ var InputOtpVariantContext = createContext({
14330
+ sizing: "md",
14331
+ state: "default"
14332
+ });
14333
+ var useInputOtpVariant = () => use(InputOtpVariantContext);
14334
+ var useInputOtpRenderContext = () => use(OTPInputContext);
14335
+ var InputOtpGroup = ({
14336
+ ref,
14337
+ className,
14338
+ ...props
14339
+ }) => /* @__PURE__ */ jsx("div", { ref, className: cn("tw-flex tw-items-center tw-gap-2", className), ...props });
14340
+ var InputOtpSeparator = ({
14341
+ ref,
14342
+ children,
14343
+ className,
14344
+ ...props
14345
+ }) => /* @__PURE__ */ jsx(
14346
+ "div",
14347
+ {
14348
+ ref,
14349
+ role: "separator",
14350
+ "aria-orientation": "vertical",
14351
+ className: cn("tw-flex tw-items-center tw-text-muted-foreground", className),
14352
+ ...props,
14353
+ children: children ?? /* @__PURE__ */ jsx(Minus, { className: "tw-size-4" })
14354
+ }
14355
+ );
14356
+ var slotVariants = cva(
14357
+ [
14358
+ "tw-relative",
14359
+ "tw-flex",
14360
+ "tw-items-center",
14361
+ "tw-justify-center",
14362
+ "tw-border",
14363
+ "tw-border-input",
14364
+ "tw-bg-background",
14365
+ "tw-text-foreground",
14366
+ "tw-font-medium",
14367
+ "tw-tabular-nums",
14368
+ "tw-rounded-lg",
14369
+ "tw-transition",
14370
+ "tw-outline-none",
14371
+ // active slot sits above its neighbours so its ring isn't clipped
14372
+ "data-[active=true]:tw-z-10",
14373
+ "data-[active=true]:tw-border-primary",
14374
+ "data-[active=true]:tw-ring-2",
14375
+ "data-[active=true]:tw-ring-primary/50"
14376
+ ],
14377
+ {
14378
+ defaultVariants: {
14379
+ sizing: "md",
14380
+ state: "default"
14381
+ },
14382
+ variants: {
14383
+ sizing: {
14384
+ sm: ["tw-h-8", "tw-w-8", "tw-text-sm"],
14385
+ md: ["tw-h-9", "tw-w-9", "tw-text-base"],
14386
+ lg: ["tw-h-10", "tw-w-10", "tw-text-lg"]
14387
+ },
14388
+ // `!` forces the border colour over the base `tw-border-input` once tailwind-merge dedupes.
14389
+ // Matches the pattern InputGroup uses for its argo error state.
14390
+ state: {
14391
+ default: [],
14392
+ error: [
14393
+ "!tw-border-destructive",
14394
+ "tw-bg-destructive/5",
14395
+ "data-[active=true]:!tw-border-destructive",
14396
+ "data-[active=true]:tw-ring-destructive/40"
14397
+ ]
14398
+ }
14399
+ }
14400
+ }
14401
+ );
14402
+ var InputOtpSlot = ({
14403
+ ref,
14404
+ index,
14405
+ className,
14406
+ ...props
14407
+ }) => {
14408
+ const { slots } = useInputOtpRenderContext();
14409
+ const { sizing, state } = useInputOtpVariant();
14410
+ const slot = slots[index];
14411
+ const char = slot?.char ?? null;
14412
+ const isActive = slot?.isActive ?? false;
14413
+ const hasFakeCaret = slot?.hasFakeCaret ?? false;
14414
+ return /* @__PURE__ */ jsxs(
14415
+ "div",
14416
+ {
14417
+ ref,
14418
+ "data-active": isActive || void 0,
14419
+ "data-slot-index": index,
14420
+ className: cn(slotVariants({ sizing, state }), className),
14421
+ ...props,
14422
+ children: [
14423
+ char,
14424
+ hasFakeCaret && /* @__PURE__ */ jsx(
14425
+ "div",
14426
+ {
14427
+ "aria-hidden": "true",
14428
+ className: "tw-pointer-events-none tw-absolute tw-inset-0 tw-flex tw-items-center tw-justify-center",
14429
+ children: /* @__PURE__ */ jsx("div", { className: "tw-h-1/2 tw-w-px tw-animate-caret-blink tw-bg-foreground" })
14430
+ }
14431
+ )
14432
+ ]
14433
+ }
14434
+ );
14435
+ };
14436
+ var Root31 = ({
14437
+ ref,
14438
+ sizing = "md",
14439
+ state = "default",
14440
+ pattern = REGEXP_ONLY_DIGITS,
14441
+ containerClassName,
14442
+ className,
14443
+ children,
14444
+ ...rest
14445
+ }) => /* @__PURE__ */ jsx(InputOtpVariantContext, { value: { sizing, state }, children: /* @__PURE__ */ jsx(
14446
+ OTPInput,
14447
+ {
14448
+ ...rest,
14449
+ ref,
14450
+ pattern,
14451
+ "aria-invalid": state === "error" || void 0,
14452
+ containerClassName: cn(
14453
+ "tw-flex tw-items-center tw-gap-2 has-[:disabled]:tw-opacity-50",
14454
+ containerClassName
14455
+ ),
14456
+ className: cn("disabled:tw-cursor-not-allowed", className),
14457
+ children
14458
+ }
14459
+ ) });
14460
+ var InputOtp = Object.assign(Root31, {
14461
+ Group: InputOtpGroup,
14462
+ Slot: InputOtpSlot,
14463
+ Separator: InputOtpSeparator
14464
+ });
14465
+
14466
+ // src/blocks/InputOtp/index.ts
14467
+ var useInputOtpContext = () => {
14468
+ const ctx = use(OTPInputContext);
14469
+ if (!ctx.slots) {
14470
+ throw new Error("useInputOtpContext must be used inside <InputOtp>.");
14471
+ }
14472
+ return ctx;
14473
+ };
14085
14474
  var { fieldContext, useFieldContext, formContext, useFormContext } = createFormHookContexts();
14086
14475
  var FormBody = ({ children, className, ...formProps }) => {
14087
14476
  const form = useFormContext();
@@ -14548,6 +14937,6 @@ function useAutosizeInput({
14548
14937
  return { inputRef, inputStyle, sizerElement };
14549
14938
  }
14550
14939
 
14551
- export { Alert, AnswerSummary, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar2 as Calendar, Card, Checkbox, Clipboard, ClipboardButton, ClipboardInline, CodeEditor, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, DateRangeInput, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, ErrorState, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, Icon, InlineStepDetail, InlineStepLabel, InputGroup, Kbd, Label, Link2 as Link, MarkedText, MergeEditor, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, PlanRewritingIndicator, Popconfirm, Popover, Progress, PromptInput, Question, QuestionBlock, RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search2 as Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, Separator, Sheet, Sidebar, SidebarProvider, Skeleton, SkeletonList, Slider, SplitButton, SqlEditor, SuggestedPrompt, Switch, Table2 as Table, Tabs, TabsContent, Tagger, TextInput, Textarea, ThemeProvider, ThinkingIndicator, TimeInput, TimePicker, Timeline, Toaster, Toggle, Tooltip, TooltipProvider, Truncated, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isIconName, isMac, kbdVariants, keys, mergeRefs, setServerFieldErrors, toast, useAppForm, useAutosizeInput, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, withForm };
14940
+ export { Alert, AnswerSummary, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar2 as Calendar, Card, Checkbox, Clipboard, ClipboardButton, ClipboardInline, CodeEditor, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, DateRangeInput, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, ErrorState, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, Icon, InlineStepDetail, InlineStepLabel, InputGroup, InputOtp, Kbd, Label, Link2 as Link, MarkedText, MergeEditor, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, PlanRewritingIndicator, Popconfirm, Popover, Progress, PromptInput, Question, QuestionBlock, RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search2 as Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, Separator, Sheet, Sidebar, SidebarProvider, Skeleton, SkeletonList, Slider, SplitButton, SqlEditor, SuggestedPrompt, Switch, Table2 as Table, Tabs, TabsContent, Tagger, TextInput, Textarea, ThemeProvider, ThinkingIndicator, TimeInput, TimePicker, Timeline, Toaster, Toggle, ToggleGroup, Tooltip, TooltipProvider, Truncated, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isIconName, isMac, kbdVariants, keys, mergeRefs, setServerFieldErrors, toast, useAppForm, useAutosizeInput, useInputOtpContext, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, withForm };
14552
14941
  //# sourceMappingURL=index.js.map
14553
14942
  //# sourceMappingURL=index.js.map