@keboola/design 1.3.0 → 2.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.
Files changed (69) hide show
  1. package/dist/icons.cjs +24 -0
  2. package/dist/icons.js +1 -1
  3. package/dist/index.cjs +278 -76
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.js +278 -78
  6. package/dist/index.js.map +1 -1
  7. package/dist/markdown-editor.cjs +39 -26
  8. package/dist/markdown-editor.cjs.map +1 -1
  9. package/dist/markdown-editor.js +39 -26
  10. package/dist/markdown-editor.js.map +1 -1
  11. package/dist/styles.css +1 -1
  12. package/package.json +4 -3
  13. package/src/blocks/AIKit/PlanApproval.tsx +29 -12
  14. package/src/blocks/AIKit/PromptInput.test.tsx +53 -0
  15. package/src/blocks/AIKit/PromptInput.tsx +1 -1
  16. package/src/blocks/AIKit/Question.tsx +39 -11
  17. package/src/blocks/AIKit/SuggestedPrompt.stories.tsx +2 -8
  18. package/src/blocks/EmptyState/EmptyState.stories.tsx +5 -5
  19. package/src/blocks/EmptyState/EmptyState.tsx +2 -2
  20. package/src/blocks/ErrorState/ErrorState.stories.tsx +6 -6
  21. package/src/blocks/ErrorState/ErrorState.tsx +3 -3
  22. package/src/blocks/MultiActionButtonGroup/MultiActionButton.tsx +2 -1
  23. package/src/blocks/PageHeader/AGENTS.md +1 -1
  24. package/src/blocks/PageHeader/PageHeader.stories.tsx +6 -3
  25. package/src/blocks/PageHeader/PageHeaderIndex.tsx +2 -2
  26. package/src/blocks/PageLayout/AGENTS.md +3 -3
  27. package/src/blocks/PageLayout/PageLayout.stories.tsx +7 -4
  28. package/src/blocks/PageLayout/PageLayout.tsx +1 -18
  29. package/src/blocks/PageToolbar/PageToolbar.stories.tsx +79 -74
  30. package/src/blocks/PageToolbar/PageToolbar.tsx +45 -4
  31. package/src/blocks/PageToolbar/PageToolbarToken.tsx +61 -0
  32. package/src/blocks/SearchInput/SearchInput.tsx +3 -3
  33. package/src/blocks/SearchInputWithNavigation/SearchInputWithNavigation.tsx +1 -1
  34. package/src/components/Alert/AlertDescription.tsx +5 -0
  35. package/src/components/Badge/Badge.stories.tsx +3 -5
  36. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +4 -4
  37. package/src/components/Breadcrumb/BreadcrumbLink.tsx +1 -1
  38. package/src/components/Button/ButtonInline.stories.tsx +3 -3
  39. package/src/components/Button/ButtonInline.tsx +4 -0
  40. package/src/components/Card/Card.stories.tsx +2 -2
  41. package/src/components/FormGroup/FormGroup.stories.tsx +2 -2
  42. package/src/components/HoverCard/HoverCardContent.tsx +5 -0
  43. package/src/components/Input/Input.stories.tsx +2 -2
  44. package/src/components/InputGroup/InputGroup.stories.tsx +4 -5
  45. package/src/components/InputGroup/InputGroup.tsx +1 -1
  46. package/src/components/InputGroup/InputGroupAddon.tsx +35 -24
  47. package/src/components/Kbd/Kbd.stories.tsx +2 -2
  48. package/src/components/Label/Label.stories.tsx +2 -2
  49. package/src/components/Modal/ModalBody.tsx +5 -0
  50. package/src/components/Navbar/Navbar.stories.tsx +4 -5
  51. package/src/components/Pagination/Pagination.stories.tsx +0 -1
  52. package/src/components/Popover/PopoverContent.tsx +4 -0
  53. package/src/components/Search/Search.tsx +2 -2
  54. package/src/components/Select/SelectTrigger.tsx +1 -1
  55. package/src/components/Separator/Separator.stories.tsx +19 -0
  56. package/src/components/Separator/Separator.test.tsx +39 -0
  57. package/src/components/Separator/Separator.tsx +42 -11
  58. package/src/components/Sidebar/Sidebar.stories.tsx +6 -5
  59. package/src/components/Table/Table.stories.tsx +16 -16
  60. package/src/components/Timeline/Timeline.stories.tsx +8 -8
  61. package/src/components/Timeline/TimelineConnector.tsx +1 -1
  62. package/src/components/ToggleGroup/ToggleGroup.stories.tsx +60 -0
  63. package/src/components/ToggleGroup/ToggleGroup.tsx +99 -0
  64. package/src/components/ToggleGroup/index.ts +1 -0
  65. package/src/components/Tooltip/Tooltip.stories.tsx +2 -2
  66. package/src/hooks/useAutosizeInput.stories.tsx +2 -2
  67. package/src/icons/index.ts +6 -0
  68. package/src/index.ts +1 -0
  69. package/src/patterns/FilterToolbar.stories.tsx +248 -44
package/dist/index.cjs CHANGED
@@ -35,6 +35,7 @@ var RadixAvatar = require('@radix-ui/react-avatar');
35
35
  var BoringAvatar = require('boring-avatars');
36
36
  var fontawesomeSvgCore = require('@fortawesome/fontawesome-svg-core');
37
37
  var reactToggle = require('@radix-ui/react-toggle');
38
+ var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
38
39
  var reactProgress = require('@radix-ui/react-progress');
39
40
  var diff = require('diff');
40
41
  var RadixTabs = require('@radix-ui/react-tabs');
@@ -91,6 +92,7 @@ var DropdownMenuPrimitive3__namespace = /*#__PURE__*/_interopNamespace(DropdownM
91
92
  var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
92
93
  var RadixAvatar__namespace = /*#__PURE__*/_interopNamespace(RadixAvatar);
93
94
  var BoringAvatar__default = /*#__PURE__*/_interopDefault(BoringAvatar);
95
+ var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
94
96
  var RadixTabs__namespace = /*#__PURE__*/_interopNamespace(RadixTabs);
95
97
  var CodeMirror__default = /*#__PURE__*/_interopDefault(CodeMirror);
96
98
  var colors__default = /*#__PURE__*/_interopDefault(colors);
@@ -699,7 +701,10 @@ var buttonInlineVariants = classVarianceAuthority.cva(
699
701
  "disabled:tw-cursor-not-allowed",
700
702
  "disabled:tw-text-neutral-500",
701
703
  "disabled:tw-no-underline",
702
- "[&_svg]:disabled:tw-text-neutral-400"
704
+ "[&_svg]:disabled:tw-text-neutral-400",
705
+ // Default size for nested Lucide icons; callers can override on the icon.
706
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4",
707
+ "[&_svg]:tw-shrink-0"
703
708
  ],
704
709
  {
705
710
  defaultVariants: {
@@ -880,7 +885,10 @@ var variants2 = classVarianceAuthority.cva(
880
885
  "data-[side=bottom]:tw-slide-in-from-top-2",
881
886
  "data-[side=left]:tw-slide-in-from-right-2",
882
887
  "data-[side=right]:tw-slide-in-from-left-2",
883
- "data-[side=top]:tw-slide-in-from-bottom-2"
888
+ "data-[side=top]:tw-slide-in-from-bottom-2",
889
+ // Default size for nested Lucide icons; callers can override on the icon.
890
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4",
891
+ "[&_svg]:tw-shrink-0"
884
892
  ],
885
893
  {
886
894
  defaultVariants: {
@@ -1134,32 +1142,42 @@ var TimePicker = ({
1134
1142
  )
1135
1143
  ] });
1136
1144
  };
1137
- var addonVariants = classVarianceAuthority.cva(["tw-flex", "tw-items-center", "tw-gap-1"], {
1138
- defaultVariants: {
1139
- align: "inline-start"
1140
- },
1141
- variants: {
1142
- align: {
1143
- "inline-start": ["tw-order-first", "[&:not(:empty)]:tw-pl-4"],
1144
- "inline-end": ["tw-order-last", "[&:not(:empty)]:tw-pr-4"],
1145
- "block-start": [
1146
- "tw-order-first",
1147
- // `tw-w-full` needs to be empty-conditional too — when the addon
1148
- // has no content the root stays in flex-row, and a 100%-wide
1149
- // empty addon would claim half of the input row beside the input.
1150
- "[&:not(:empty)]:tw-w-full",
1151
- "[&:not(:empty)]:tw-px-4",
1152
- "[&:not(:empty)]:tw-py-1.5"
1153
- ],
1154
- "block-end": [
1155
- "tw-order-last",
1156
- "[&:not(:empty)]:tw-w-full",
1157
- "[&:not(:empty)]:tw-px-4",
1158
- "[&:not(:empty)]:tw-py-1.5"
1159
- ]
1145
+ var addonVariants = classVarianceAuthority.cva(
1146
+ [
1147
+ "tw-flex",
1148
+ "tw-items-center",
1149
+ "tw-gap-1",
1150
+ // Default size for nested Lucide icons in prefix/suffix slots; callers can override on the icon.
1151
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4",
1152
+ "[&_svg]:tw-shrink-0"
1153
+ ],
1154
+ {
1155
+ defaultVariants: {
1156
+ align: "inline-start"
1157
+ },
1158
+ variants: {
1159
+ align: {
1160
+ "inline-start": ["tw-order-first", "[&:not(:empty)]:tw-pl-4"],
1161
+ "inline-end": ["tw-order-last", "[&:not(:empty)]:tw-pr-4"],
1162
+ "block-start": [
1163
+ "tw-order-first",
1164
+ // `tw-w-full` needs to be empty-conditional too — when the addon
1165
+ // has no content the root stays in flex-row, and a 100%-wide
1166
+ // empty addon would claim half of the input row beside the input.
1167
+ "[&:not(:empty)]:tw-w-full",
1168
+ "[&:not(:empty)]:tw-px-4",
1169
+ "[&:not(:empty)]:tw-py-1.5"
1170
+ ],
1171
+ "block-end": [
1172
+ "tw-order-last",
1173
+ "[&:not(:empty)]:tw-w-full",
1174
+ "[&:not(:empty)]:tw-px-4",
1175
+ "[&:not(:empty)]:tw-py-1.5"
1176
+ ]
1177
+ }
1160
1178
  }
1161
1179
  }
1162
- });
1180
+ );
1163
1181
  var InputGroupAddon = ({
1164
1182
  children,
1165
1183
  align = "inline-start",
@@ -1318,7 +1336,7 @@ var inputGroupVariants = classVarianceAuthority.cva(
1318
1336
  defaultVariants: {
1319
1337
  variant: "primary",
1320
1338
  state: "default",
1321
- sizing: "default",
1339
+ sizing: "medium",
1322
1340
  focusVariant: "default"
1323
1341
  },
1324
1342
  compoundVariants: [
@@ -2429,6 +2447,9 @@ var HoverCardContent = ({
2429
2447
  "data-[state=closed]:tw-animate-out",
2430
2448
  "data-[state=closed]:tw-fade-out-0",
2431
2449
  "data-[state=closed]:tw-zoom-out-95",
2450
+ // Default size for nested Lucide icons; callers can override on the icon.
2451
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4",
2452
+ "[&_svg]:tw-shrink-0",
2432
2453
  className
2433
2454
  ),
2434
2455
  ...props,
@@ -2447,7 +2468,7 @@ var separatorVariants = classVarianceAuthority.cva(
2447
2468
  "tw-self-stretch",
2448
2469
  // before
2449
2470
  "before:tw-content-['']",
2450
- "before:tw-bg-neutral-150"
2471
+ "before:tw-bg-border"
2451
2472
  ],
2452
2473
  {
2453
2474
  defaultVariants: {
@@ -2503,16 +2524,37 @@ var Separator = ({
2503
2524
  className,
2504
2525
  orientation = "vertical",
2505
2526
  size = "full",
2527
+ label,
2506
2528
  ...props
2507
- }) => /* @__PURE__ */ jsxRuntime.jsx(
2508
- RSeparator__namespace.Root,
2509
- {
2510
- ...props,
2511
- decorative: true,
2512
- orientation,
2513
- className: separatorVariants({ size, orientation, className })
2529
+ }) => {
2530
+ if (label != null && label !== false) {
2531
+ return /* @__PURE__ */ jsxRuntime.jsx(
2532
+ RSeparator__namespace.Root,
2533
+ {
2534
+ ...props,
2535
+ decorative: true,
2536
+ orientation: "horizontal",
2537
+ className: cn(
2538
+ "tw-flex tw-w-full tw-items-center tw-gap-3 tw-self-stretch",
2539
+ "tw-text-xs tw-font-medium tw-text-muted-foreground",
2540
+ "before:tw-content-[''] before:tw-h-px before:tw-flex-1 before:tw-bg-border",
2541
+ "after:tw-content-[''] after:tw-h-px after:tw-flex-1 after:tw-bg-border",
2542
+ className
2543
+ ),
2544
+ children: label
2545
+ }
2546
+ );
2514
2547
  }
2515
- );
2548
+ return /* @__PURE__ */ jsxRuntime.jsx(
2549
+ RSeparator__namespace.Root,
2550
+ {
2551
+ ...props,
2552
+ decorative: true,
2553
+ orientation,
2554
+ className: separatorVariants({ size, orientation, className })
2555
+ }
2556
+ );
2557
+ };
2516
2558
  var RadioGroupContext = react.createContext({
2517
2559
  variant: "radio",
2518
2560
  orientation: "horizontal"
@@ -3066,7 +3108,7 @@ var Search2 = ({
3066
3108
  ),
3067
3109
  "data-testid": testId.wrapper,
3068
3110
  children: [
3069
- variant === "ai" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "tw-size-4 [&_*]:tw-stroke-aigradient-600" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "tw-size-4 tw-text-neutral-400" }),
3111
+ variant === "ai" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "tw-size-4 tw-shrink-0 [&_*]:tw-stroke-aigradient-600" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "tw-size-4 tw-shrink-0 tw-text-neutral-400" }),
3070
3112
  /* @__PURE__ */ jsxRuntime.jsx(
3071
3113
  "input",
3072
3114
  {
@@ -3316,7 +3358,7 @@ var variants3 = classVarianceAuthority.cva(
3316
3358
  defaultVariants: {
3317
3359
  variant: "primary",
3318
3360
  state: "default",
3319
- sizing: "default"
3361
+ sizing: "medium"
3320
3362
  },
3321
3363
  compoundVariants: [
3322
3364
  {
@@ -4071,6 +4113,9 @@ var ModalBody = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
4071
4113
  "tw-px-1",
4072
4114
  // 4 px to complement ModalContent and still keep input focus outline visible
4073
4115
  "tw-py-1",
4116
+ // Default size for nested Lucide icons; callers can override on the icon.
4117
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4",
4118
+ "[&_svg]:tw-shrink-0",
4074
4119
  className
4075
4120
  ),
4076
4121
  ...props
@@ -7420,7 +7465,7 @@ var BreadcrumbLink = ({
7420
7465
  "focus-visible:tw-ring-secondary-500/50",
7421
7466
  "focus-visible:tw-rounded-sm",
7422
7467
  // Icon
7423
- "[&_svg]:tw-size-2.5",
7468
+ "[&_svg]:tw-size-3.5",
7424
7469
  // transition
7425
7470
  "tw-transition-colors",
7426
7471
  className
@@ -8162,6 +8207,77 @@ var Toggle = ({
8162
8207
  }
8163
8208
  );
8164
8209
  };
8210
+ var rootVariants2 = classVarianceAuthority.cva(
8211
+ [
8212
+ "tailwindcss-preflight",
8213
+ "tw-inline-flex",
8214
+ "tw-items-center",
8215
+ "tw-shrink-0",
8216
+ "tw-bg-muted",
8217
+ "tw-rounded-lg",
8218
+ "tw-p-[3px]",
8219
+ "tw-gap-0"
8220
+ ],
8221
+ {
8222
+ defaultVariants: { size: "medium" },
8223
+ variants: {
8224
+ size: {
8225
+ small: ["tw-h-8"],
8226
+ medium: ["tw-h-9"],
8227
+ large: ["tw-h-10"]
8228
+ }
8229
+ }
8230
+ }
8231
+ );
8232
+ var itemClasses = cn(
8233
+ "tailwindcss-preflight",
8234
+ "tw-inline-flex",
8235
+ "tw-items-center",
8236
+ "tw-justify-center",
8237
+ "tw-gap-2",
8238
+ "tw-shrink-0",
8239
+ "tw-whitespace-nowrap",
8240
+ "tw-h-full",
8241
+ "tw-rounded-md",
8242
+ "tw-px-2",
8243
+ "tw-py-1",
8244
+ "tw-bg-transparent",
8245
+ "tw-text-foreground",
8246
+ "tw-text-sm",
8247
+ "tw-font-medium",
8248
+ "tw-transition-colors",
8249
+ "disabled:tw-cursor-not-allowed",
8250
+ "disabled:tw-opacity-50",
8251
+ "!tw-outline-none",
8252
+ "focus-visible:tw-ring-2",
8253
+ "focus-visible:tw-ring-primary/50",
8254
+ // hover on non-pressed
8255
+ "not-disabled:[&[data-state=off]]:hover:tw-bg-background/60",
8256
+ // pressed
8257
+ "data-[state=on]:tw-bg-background",
8258
+ "data-[state=on]:tw-shadow-[0_1px_2px_rgba(0,0,0,0.05),0_1px_1px_rgba(0,0,0,0.1)]",
8259
+ "[&_svg]:tw-shrink-0",
8260
+ "[&_svg]:tw-pointer-events-none",
8261
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4"
8262
+ );
8263
+ var Root25 = ({
8264
+ ref,
8265
+ className,
8266
+ size = "medium",
8267
+ ...props
8268
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
8269
+ ToggleGroupPrimitive__namespace.Root,
8270
+ {
8271
+ ref,
8272
+ ...props,
8273
+ className: cn(rootVariants2({ size, className }))
8274
+ }
8275
+ );
8276
+ var Item6 = ({ ref, className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupPrimitive__namespace.Item, { ref, ...props, className: cn(itemClasses, className) });
8277
+ var ToggleGroup = Object.assign(Root25, {
8278
+ /** Individual segment inside a `ToggleGroup`. `value` is required and must be unique within the group. */
8279
+ Item: Item6
8280
+ });
8165
8281
  var CONNECTOR_MARGIN_TOP = 8;
8166
8282
  var useLastLineHeight = () => {
8167
8283
  const [wrapper, setWrapper] = useElement();
@@ -8250,7 +8366,7 @@ var connector = classVarianceAuthority.cva(
8250
8366
  "tw-text-nowrap",
8251
8367
  "tw-text-xs"
8252
8368
  ],
8253
- icon: ["tw-bg-white", "[&_svg]:tw-text-neutral-300"],
8369
+ icon: ["tw-bg-white", "[&_svg]:tw-size-4", "[&_svg]:tw-text-neutral-300"],
8254
8370
  line: [
8255
8371
  "tw-min-w-8",
8256
8372
  "tw-overflow-hidden",
@@ -9486,6 +9602,9 @@ var AlertDescription = ({
9486
9602
  "group-has-[[data-slot=alert-title]]/alert:before:tw-h-4",
9487
9603
  "group-has-[[data-slot=alert-title]]/alert:before:tw-content-['']",
9488
9604
  "tw-break-anywhere",
9605
+ // Default size for nested Lucide icons; callers can override on the icon.
9606
+ "[&_svg:not([class*='tw-size-'])]:tw-size-4",
9607
+ "[&_svg]:tw-shrink-0",
9489
9608
  className
9490
9609
  ),
9491
9610
  children
@@ -11572,7 +11691,7 @@ var Skeleton = ({ height = "md", className, count = 1 }) => {
11572
11691
  var duplicateArray = (arr, times) => {
11573
11692
  return Array(times).fill(arr).flat();
11574
11693
  };
11575
- var Item5 = ({
11694
+ var Item7 = ({
11576
11695
  className,
11577
11696
  iconHeight = "md",
11578
11697
  rowHeight = "sm",
@@ -11599,7 +11718,7 @@ var SkeletonList = ({
11599
11718
  ),
11600
11719
  children: duplicateArray(["tw-w-5/6", "tw-w-3/4", "tw-w-4/5", "tw-w-2/3"], groups).map(
11601
11720
  (className2, index) => /* @__PURE__ */ jsxRuntime.jsx(
11602
- Item5,
11721
+ Item7,
11603
11722
  {
11604
11723
  iconHeight,
11605
11724
  rowHeight,
@@ -12148,8 +12267,8 @@ var emptyStateIconClassnames = classVarianceAuthority.cva(
12148
12267
  {
12149
12268
  variants: {
12150
12269
  variant: {
12151
- default: ["tw-size-16", "tw-text-4xl"],
12152
- compact: ["tw-size-10", "tw-text-2xl"]
12270
+ default: ["tw-size-16", "tw-text-4xl", "[&_svg]:tw-size-10"],
12271
+ compact: ["tw-size-10", "tw-text-2xl", "[&_svg]:tw-size-6"]
12153
12272
  }
12154
12273
  },
12155
12274
  defaultVariants: {
@@ -12220,9 +12339,9 @@ var errorStateClassnames = classVarianceAuthority.cva(["tw-flex", "tw-flex-col",
12220
12339
  var errorStateIconClassnames = classVarianceAuthority.cva(["tw-flex", "tw-items-center", "tw-justify-center"], {
12221
12340
  variants: {
12222
12341
  variant: {
12223
- default: ["tw-size-16", "tw-text-4xl", "tw-text-warning-500"],
12224
- compact: ["tw-size-10", "tw-text-2xl", "tw-text-warning-500"],
12225
- destructive: ["tw-size-16", "tw-text-4xl", "tw-text-error-500"]
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"]
12226
12345
  }
12227
12346
  },
12228
12347
  defaultVariants: {
@@ -12286,7 +12405,7 @@ var maxWidthClass = {
12286
12405
  wide: "tw-max-w-[1600px]",
12287
12406
  full: "tw-max-w-full"
12288
12407
  };
12289
- var Root27 = ({
12408
+ var Root29 = ({
12290
12409
  ref,
12291
12410
  className,
12292
12411
  maxWidth = "full",
@@ -12331,20 +12450,6 @@ var Tabs2 = ({
12331
12450
  children
12332
12451
  }
12333
12452
  );
12334
- var Toolbar = ({
12335
- ref,
12336
- className,
12337
- children,
12338
- ...props
12339
- }) => /* @__PURE__ */ jsxRuntime.jsx(
12340
- "div",
12341
- {
12342
- ref,
12343
- className: cn("tw-flex tw-w-full tw-flex-wrap tw-items-center tw-gap-3", className),
12344
- ...props,
12345
- children
12346
- }
12347
- );
12348
12453
  var Content11 = ({
12349
12454
  ref,
12350
12455
  className,
@@ -12370,15 +12475,13 @@ var Footer = ({
12370
12475
  children
12371
12476
  }
12372
12477
  );
12373
- var PageLayout = Object.assign(Root27, {
12478
+ var PageLayout = Object.assign(Root29, {
12374
12479
  /** Detail-pattern breadcrumb row. Usually composed automatically by `PageHeader.Detail` — slot exists for layouts that don't fit either `PageHeader` variant. */
12375
12480
  Breadcrumbs,
12376
12481
  /** Host slot for `PageHeader.Index` / `PageHeader.Detail`, or custom header JSX when neither variant fits. */
12377
12482
  Header,
12378
12483
  /** Escape hatch for routing-based tab rows. Use `Tabs` / `TabsContent` core components inside, never a raw `<button>`. */
12379
12484
  Tabs: Tabs2,
12380
- /** Search / filter pill row. Belongs here, NOT in the header per the page-header patterns. */
12381
- Toolbar,
12382
12485
  /** Main content slot. Lists, cards, tables. */
12383
12486
  Content: Content11,
12384
12487
  /** Bottom action bar — form submit + cancel. Pass `sticky` for a footer that pins to the viewport. */
@@ -12464,7 +12567,47 @@ var PageHeader = {
12464
12567
  /** Detail variant — single-entity pages with required breadcrumbs and an overflow-actions slot. Max 2 visible actions. */
12465
12568
  Detail: PageHeaderDetail
12466
12569
  };
12467
- var Root28 = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
12570
+ var PageToolbarToken = ({
12571
+ children,
12572
+ popover,
12573
+ onRemove,
12574
+ removeAriaLabel,
12575
+ ...props
12576
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
12577
+ /* @__PURE__ */ jsxRuntime.jsx(
12578
+ Badge,
12579
+ {
12580
+ ...props,
12581
+ asChild: true,
12582
+ variant: "pill",
12583
+ color: "blue-inverse",
12584
+ suffix: /* @__PURE__ */ jsxRuntime.jsx(
12585
+ Button,
12586
+ {
12587
+ type: "button",
12588
+ variant: "inline",
12589
+ size: "icon-2xs",
12590
+ "aria-label": removeAriaLabel,
12591
+ onClick: onRemove,
12592
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "tw-size-3" })
12593
+ }
12594
+ ),
12595
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
12596
+ Popover.Trigger,
12597
+ {
12598
+ type: "button",
12599
+ className: "tailwindcss-preflight tw-inline-flex tw-cursor-pointer tw-items-center tw-gap-1 tw-bg-inherit tw-text-inherit",
12600
+ children: [
12601
+ children,
12602
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "tw-size-3" })
12603
+ ]
12604
+ }
12605
+ )
12606
+ }
12607
+ ),
12608
+ /* @__PURE__ */ jsxRuntime.jsx(Popover.Content, { variant: "argo", align: "start", children: popover })
12609
+ ] });
12610
+ var Root30 = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
12468
12611
  "div",
12469
12612
  {
12470
12613
  ref,
@@ -12504,12 +12647,32 @@ var ActiveFilters = ({ ref, className, children, ...props }) => /* @__PURE__ */
12504
12647
  children
12505
12648
  }
12506
12649
  );
12650
+ var Chip = ({ children, onRemove, removeAriaLabel, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
12651
+ Badge,
12652
+ {
12653
+ ...props,
12654
+ variant: "pill",
12655
+ color: "blue-inverse",
12656
+ suffix: /* @__PURE__ */ jsxRuntime.jsx(
12657
+ Button,
12658
+ {
12659
+ type: "button",
12660
+ variant: "inline",
12661
+ size: "icon-2xs",
12662
+ "aria-label": removeAriaLabel,
12663
+ onClick: onRemove,
12664
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "tw-size-3" })
12665
+ }
12666
+ ),
12667
+ children
12668
+ }
12669
+ );
12507
12670
  var AddFilter = ({ className, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(Button, { argo: true, variant: "invisible", size: "small", className: cn("tw-gap-1.5", className), ...props, children: [
12508
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: "plus" }),
12671
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "tw-size-4" }),
12509
12672
  children ?? "Add filter"
12510
12673
  ] });
12511
12674
  var Clear = ({ className, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(Button, { argo: true, variant: "invisible", size: "small", className: cn("tw-ml-auto", className), ...props, children: children ?? "Clear all" });
12512
- var PageToolbar = Object.assign(Root28, {
12675
+ var PageToolbar = Object.assign(Root30, {
12513
12676
  /** Left slot — typically a `SearchInput`. */
12514
12677
  Search: Search4,
12515
12678
  /** Right cluster — host the four control groups below in the recommended order. */
@@ -12528,6 +12691,14 @@ var PageToolbar = Object.assign(Root28, {
12528
12691
  * by `AddFilter` / `Clear`.
12529
12692
  */
12530
12693
  ActiveFilters,
12694
+ /** Non-editable filter chip (Standard variant) — `Badge` pill with a dismiss button. */
12695
+ Chip,
12696
+ /**
12697
+ * Editable filter token (Query Builder variant) — `Badge` pill with a `chevron-down`
12698
+ * popover trigger for editing values and an `×` dismiss button. The popover content
12699
+ * is supplied by the caller via the `popover` slot (typically a `Combobox` or option list).
12700
+ */
12701
+ Token: PageToolbarToken,
12531
12702
  /** "+ Add filter" action — typically rendered after the chips/tokens in `ActiveFilters`. */
12532
12703
  AddFilter,
12533
12704
  /** "Clear all" action — self-aligns to the far right of `ActiveFilters`. */
@@ -12612,7 +12783,7 @@ var SearchInput = ({
12612
12783
  focusVariant,
12613
12784
  className,
12614
12785
  children: [
12615
- /* @__PURE__ */ jsxRuntime.jsx(InputGroup.Addon, { align: "inline-start", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "tw-size-4 tw-text-muted-foreground" }) }),
12786
+ /* @__PURE__ */ jsxRuntime.jsx(InputGroup.Addon, { align: "inline-start", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "tw-size-4 tw-shrink-0 tw-text-muted-foreground" }) }),
12616
12787
  /* @__PURE__ */ jsxRuntime.jsx(
12617
12788
  InputGroup.Input,
12618
12789
  {
@@ -12668,7 +12839,7 @@ var SearchInputWithNavigation = ({
12668
12839
  placeholder,
12669
12840
  onValueChange,
12670
12841
  onClear,
12671
- prefix: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "tw-size-4 tw-text-neutral-400" }),
12842
+ prefix: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "tw-size-4 tw-shrink-0 tw-text-neutral-400" }),
12672
12843
  focusVariant,
12673
12844
  onKeyDown: handleKeyDown2,
12674
12845
  variant,
@@ -12930,7 +13101,7 @@ var MultiActionButton = ({
12930
13101
  variant: "invisible",
12931
13102
  size: "icon",
12932
13103
  "data-testid": dataTestId,
12933
- children: !isLoading && icon
13104
+ children: !isLoading && renderLegacyIcon(icon)
12934
13105
  }
12935
13106
  ) });
12936
13107
  var MultiActionButtonGroup = ({ children, className }) => /* @__PURE__ */ jsxRuntime.jsx(ButtonGroup, { className: cn("tw-text-nowrap", className), children });
@@ -13135,6 +13306,7 @@ var PlanApproval = ({
13135
13306
  onRequestChanges,
13136
13307
  onClose,
13137
13308
  isSubmitting = false,
13309
+ approveTooltip,
13138
13310
  pendingPillLabel = "Ready for approval",
13139
13311
  approvedPillLabel = "Approved",
13140
13312
  dismissedPillLabel = "Dismissed",
@@ -13321,7 +13493,7 @@ var PlanApproval = ({
13321
13493
  children: requestChangesLabel
13322
13494
  }
13323
13495
  ),
13324
- onApprove && /* @__PURE__ */ jsxRuntime.jsx(
13496
+ onApprove && (approveTooltip ? /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { tooltip: approveTooltip, placement: "top", triggerAsChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
13325
13497
  Button,
13326
13498
  {
13327
13499
  argo: true,
@@ -13332,7 +13504,18 @@ var PlanApproval = ({
13332
13504
  "data-testid": "plan-approve-button",
13333
13505
  children: approveLabel
13334
13506
  }
13335
- )
13507
+ ) }) : /* @__PURE__ */ jsxRuntime.jsx(
13508
+ Button,
13509
+ {
13510
+ argo: true,
13511
+ variant: "primary",
13512
+ size: "small",
13513
+ onClick: onApprove,
13514
+ disabled: isSubmitting || isRequestingChanges,
13515
+ "data-testid": "plan-approve-button",
13516
+ children: approveLabel
13517
+ }
13518
+ ))
13336
13519
  ] })
13337
13520
  ]
13338
13521
  }
@@ -13483,7 +13666,7 @@ var PromptInput = ({
13483
13666
  const handleOnKeyDown = (event) => {
13484
13667
  if (event.key === "Enter" && !event.shiftKey && !event.ctrlKey && !event.metaKey) {
13485
13668
  event.preventDefault();
13486
- handleSubmit();
13669
+ if (status !== "streaming") handleSubmit();
13487
13670
  }
13488
13671
  };
13489
13672
  const handleOnMouseDown = (event) => {
@@ -13567,12 +13750,14 @@ var Question = ({
13567
13750
  onSelectionChange,
13568
13751
  customAnswer = "",
13569
13752
  onCustomAnswerChange,
13753
+ onCustomAnswerConfirm,
13570
13754
  showCustomAnswer = true,
13571
13755
  customAnswerPlaceholder = "Type your answer\u2026",
13572
13756
  showSkip = true,
13573
13757
  onSkip,
13574
13758
  onClose,
13575
13759
  onNext,
13760
+ submitTooltip,
13576
13761
  onPrevious,
13577
13762
  currentStep,
13578
13763
  totalSteps,
@@ -13727,6 +13912,12 @@ var Question = ({
13727
13912
  value: customAnswer,
13728
13913
  onValueChange: (value) => onCustomAnswerChange?.(value),
13729
13914
  onFocus: handleCustomFocus,
13915
+ onKeyDown: onCustomAnswerConfirm ? (e) => {
13916
+ if (e.key === "Enter" && !e.shiftKey && !(e.metaKey || e.ctrlKey)) {
13917
+ e.preventDefault();
13918
+ onCustomAnswerConfirm();
13919
+ }
13920
+ } : void 0,
13730
13921
  placeholder: customAnswerPlaceholder,
13731
13922
  sizing: "small",
13732
13923
  testId: "question-custom"
@@ -13800,7 +13991,7 @@ var Question = ({
13800
13991
  children: "Skip"
13801
13992
  }
13802
13993
  ),
13803
- (multiSelect || isCustomSelected) && /* @__PURE__ */ jsxRuntime.jsx(
13994
+ (multiSelect || isCustomSelected) && (submitTooltip ? /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { tooltip: submitTooltip, placement: "top", triggerAsChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
13804
13995
  Button,
13805
13996
  {
13806
13997
  argo: true,
@@ -13810,7 +14001,17 @@ var Question = ({
13810
14001
  "data-testid": "question-next-button",
13811
14002
  children: isLastStep ? "Submit" : "Next"
13812
14003
  }
13813
- )
14004
+ ) }) : /* @__PURE__ */ jsxRuntime.jsx(
14005
+ Button,
14006
+ {
14007
+ argo: true,
14008
+ variant: "primary",
14009
+ size: "small",
14010
+ onClick: onNext,
14011
+ "data-testid": "question-next-button",
14012
+ children: isLastStep ? "Submit" : "Next"
14013
+ }
14014
+ ))
13814
14015
  ]
13815
14016
  }
13816
14017
  )
@@ -14701,6 +14902,7 @@ exports.TimePicker = TimePicker;
14701
14902
  exports.Timeline = Timeline;
14702
14903
  exports.Toaster = Toaster;
14703
14904
  exports.Toggle = Toggle;
14905
+ exports.ToggleGroup = ToggleGroup;
14704
14906
  exports.Tooltip = Tooltip;
14705
14907
  exports.TooltipProvider = TooltipProvider;
14706
14908
  exports.Truncated = Truncated;