@flamingo-stack/openframe-frontend-core 0.0.849 → 0.0.851

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 (140) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/chat-protocol/events.d.ts +4 -1
  3. package/dist/chat-protocol/events.d.ts.map +1 -1
  4. package/dist/chat-protocol/index.cjs +90 -40
  5. package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
  6. package/dist/chat-protocol/nats-decoder.js +5 -1
  7. package/dist/chat-protocol/policy-review.d.ts +18 -0
  8. package/dist/chat-protocol/policy-review.d.ts.map +1 -0
  9. package/dist/chat-protocol/policy-review.js +55 -0
  10. package/dist/{chunk-C3P7IUTU.cjs → chunk-2NGW73T2.cjs} +5 -4
  11. package/dist/{chunk-SHQY4GOE.cjs → chunk-2WZHNMQY.cjs} +67 -67
  12. package/dist/{chunk-R5JPZ6TY.cjs → chunk-5SEJEBAB.cjs} +8 -8
  13. package/dist/{chunk-TX4NTH22.cjs → chunk-B6D4WWKD.cjs} +36 -36
  14. package/dist/{chunk-FXLROQUT.cjs → chunk-CDW6JTAQ.cjs} +442 -459
  15. package/dist/{chunk-5PIR77V5.cjs → chunk-DN227KZH.cjs} +4 -4
  16. package/dist/{chunk-MC3L525K.cjs → chunk-FGSN5UNY.cjs} +3 -3
  17. package/dist/{chunk-ZGEWT3SF.cjs → chunk-HXURNKXI.cjs} +3 -3
  18. package/dist/{chunk-FRG724DU.cjs → chunk-KRTTH3ET.cjs} +4 -4
  19. package/dist/{chunk-YJZ7R3W5.cjs → chunk-KXFIYO4O.cjs} +8 -8
  20. package/dist/{chunk-4YBS4HIO.cjs → chunk-LM7EL3UQ.cjs} +444 -27
  21. package/dist/{chunk-YYHQY3K6.cjs → chunk-NQEPLUUW.cjs} +21 -21
  22. package/dist/{chunk-KXBZCUDW.cjs → chunk-ODMZSAIY.cjs} +36 -36
  23. package/dist/{chunk-36XWCVSM.cjs → chunk-OUP7L3U5.cjs} +50 -50
  24. package/dist/{chunk-5CBI2ZYV.cjs → chunk-PJNEBSP5.cjs} +5 -5
  25. package/dist/{chunk-6AJYGXXS.cjs → chunk-PPCRLSVR.cjs} +11 -11
  26. package/dist/{chunk-SA2NNWIJ.cjs → chunk-QCSA7GIX.cjs} +17 -62
  27. package/dist/{chunk-PV2XQJ2R.cjs → chunk-SPKAXETT.cjs} +42 -42
  28. package/dist/{chunk-IKOL6NJY.cjs → chunk-U4RTWH5D.cjs} +53 -43
  29. package/dist/{chunk-IHY7E4EX.cjs → chunk-UFGPLXH6.cjs} +4 -4
  30. package/dist/{chunk-TEKN6TJ5.cjs → chunk-UQK6J3ZS.cjs} +13 -13
  31. package/dist/{chunk-S3QXLD4X.cjs → chunk-VCFQHPOO.cjs} +37 -3
  32. package/dist/{chunk-Z5UCDEKZ.cjs → chunk-VU6N3NZS.cjs} +6 -6
  33. package/dist/{chunk-ZY34R37A.cjs → chunk-VXIZCUNZ.cjs} +61 -61
  34. package/dist/{chunk-3W4ASAXN.cjs → chunk-WYROOMUZ.cjs} +2 -2
  35. package/dist/{chunk-YLETC7LP.cjs → chunk-ZEPEFKHA.cjs} +893 -973
  36. package/dist/{cloud-tenants-HKUUEUAY.cjs → cloud-tenants-XH6GV4EI.cjs} +12 -13
  37. package/dist/components/case-studies/index.cjs +24 -25
  38. package/dist/components/chat/approval-batch-message.d.ts +5 -0
  39. package/dist/components/chat/approval-batch-message.d.ts.map +1 -1
  40. package/dist/components/chat/approval-batch-message.js +36 -10
  41. package/dist/components/chat/index.cjs +8 -9
  42. package/dist/components/chat/policy-review.d.ts +27 -0
  43. package/dist/components/chat/policy-review.d.ts.map +1 -0
  44. package/dist/components/chat/policy-review.js +67 -0
  45. package/dist/components/chat/stream/message-mutations.d.ts.map +1 -1
  46. package/dist/components/chat/stream/message-mutations.js +4 -1
  47. package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
  48. package/dist/components/chat/tool-execution-display.js +16 -5
  49. package/dist/components/chat/types/message.types.d.ts +40 -2
  50. package/dist/components/chat/types/message.types.d.ts.map +1 -1
  51. package/dist/components/chat/utils/extract-incomplete-message-state.d.ts.map +1 -1
  52. package/dist/components/chat/utils/extract-incomplete-message-state.js +2 -0
  53. package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
  54. package/dist/components/chat/utils/message-segment-accumulator.js +3 -0
  55. package/dist/components/chat/utils/process-historical-messages.d.ts +2 -2
  56. package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
  57. package/dist/components/chat/utils/process-historical-messages.js +7 -1
  58. package/dist/components/contact/index.cjs +13 -14
  59. package/dist/components/docs/index.cjs +16 -17
  60. package/dist/components/embeds/embed-viewer-frame.d.ts +2 -0
  61. package/dist/components/embeds/embed-viewer-frame.d.ts.map +1 -1
  62. package/dist/components/embeds/embed-viewer-frame.js +12 -2
  63. package/dist/components/embeds/index.cjs +13 -14
  64. package/dist/components/embeds/pdf-viewer.d.ts.map +1 -1
  65. package/dist/components/embeds/pdf-viewer.js +2 -1
  66. package/dist/components/faq/index.cjs +14 -15
  67. package/dist/components/features/approval-level.d.ts +6 -12
  68. package/dist/components/features/approval-level.d.ts.map +1 -1
  69. package/dist/components/features/approval-level.js +45 -55
  70. package/dist/components/features/index.cjs +17 -15
  71. package/dist/components/features/notifications/approval-request-notification-tile.d.ts.map +1 -1
  72. package/dist/components/features/notifications/approval-request-notification-tile.js +71 -48
  73. package/dist/components/features/notifications/types.d.ts +2 -0
  74. package/dist/components/features/notifications/types.d.ts.map +1 -1
  75. package/dist/components/features/notifications/types.js +3 -1
  76. package/dist/components/features/policy-configuration-panel.d.ts.map +1 -1
  77. package/dist/components/features/policy-configuration-panel.js +75 -64
  78. package/dist/components/features/software/index.d.ts +1 -1
  79. package/dist/components/features/software/index.d.ts.map +1 -1
  80. package/dist/components/features/software/index.js +2 -0
  81. package/dist/components/features/software/software-action-copy.d.ts.map +1 -1
  82. package/dist/components/features/software/software-action-copy.js +6 -12
  83. package/dist/components/features/software/software-action-form.d.ts +7 -1
  84. package/dist/components/features/software/software-action-form.d.ts.map +1 -1
  85. package/dist/components/features/software/software-action-form.js +11 -3
  86. package/dist/components/features/software/update-settings-fields.d.ts +12 -1
  87. package/dist/components/features/software/update-settings-fields.d.ts.map +1 -1
  88. package/dist/components/features/software/update-settings-fields.js +57 -29
  89. package/dist/components/help-center-pages/index.cjs +78 -79
  90. package/dist/components/index.cjs +58 -58
  91. package/dist/components/meeting-scheduler/index.cjs +61 -61
  92. package/dist/components/navigation/index.cjs +15 -16
  93. package/dist/components/onboarding-guides/index.cjs +14 -15
  94. package/dist/components/product-demo/index.cjs +23 -24
  95. package/dist/components/tickets/index.cjs +17 -18
  96. package/dist/components/ui/file-manager/index.cjs +8 -9
  97. package/dist/components/ui/index.cjs +16 -18
  98. package/dist/components/ui/page-actions.d.ts.map +1 -1
  99. package/dist/components/ui/page-actions.js +11 -1
  100. package/dist/components/ui/radio-group.d.ts.map +1 -1
  101. package/dist/components/ui/radio-group.js +8 -2
  102. package/dist/components/ui/tab-selector.d.ts +7 -1
  103. package/dist/components/ui/tab-selector.d.ts.map +1 -1
  104. package/dist/components/ui/tab-selector.js +22 -3
  105. package/dist/{devices-P7M4Z7VP.cjs → devices-7PT6MPJI.cjs} +13 -14
  106. package/dist/{embeddable-chat-322NDFP5.cjs → embeddable-chat-5NY76K7K.cjs} +84 -85
  107. package/dist/index.cjs +24 -24
  108. package/dist/{knowledge-TC7JLOWI.cjs → knowledge-J6N7IEVI.cjs} +13 -14
  109. package/dist/{logs-GPOYCP4B.cjs → logs-D6KQP2BX.cjs} +19 -20
  110. package/dist/{policies-ZUHOUMDD.cjs → policies-J7MCOL3C.cjs} +16 -17
  111. package/dist/{remote-session-NT4NG7EF.cjs → remote-session-PXHA5KFK.cjs} +8 -9
  112. package/dist/{scripts-FOEVDGTH.cjs → scripts-VURXIHVS.cjs} +19 -20
  113. package/dist/{software-update-XGTMNFST.cjs → software-update-6SHUBDIE.cjs} +16 -17
  114. package/dist/{tickets-board-7FLGQEHF.cjs → tickets-board-NLCN7WNX.cjs} +9 -9
  115. package/package.json +1 -1
  116. package/src/chat-protocol/events.ts +4 -1
  117. package/src/chat-protocol/nats-decoder.ts +4 -0
  118. package/src/chat-protocol/policy-review.ts +71 -0
  119. package/src/components/chat/approval-batch-message.tsx +47 -10
  120. package/src/components/chat/policy-review.tsx +90 -0
  121. package/src/components/chat/stream/message-mutations.ts +4 -0
  122. package/src/components/chat/tool-execution-display.tsx +23 -4
  123. package/src/components/chat/types/message.types.ts +42 -2
  124. package/src/components/chat/utils/extract-incomplete-message-state.ts +2 -0
  125. package/src/components/chat/utils/message-segment-accumulator.ts +3 -0
  126. package/src/components/chat/utils/process-historical-messages.ts +14 -3
  127. package/src/components/embeds/embed-viewer-frame.tsx +10 -2
  128. package/src/components/embeds/pdf-viewer.tsx +4 -1
  129. package/src/components/features/approval-level.tsx +74 -78
  130. package/src/components/features/notifications/approval-request-notification-tile.tsx +75 -50
  131. package/src/components/features/notifications/types.ts +4 -0
  132. package/src/components/features/policy-configuration-panel.tsx +100 -83
  133. package/src/components/features/software/index.ts +1 -0
  134. package/src/components/features/software/software-action-copy.ts +19 -12
  135. package/src/components/features/software/software-action-form.tsx +16 -3
  136. package/src/components/features/software/update-settings-fields.tsx +104 -32
  137. package/src/components/ui/page-actions.tsx +19 -2
  138. package/src/components/ui/radio-group.tsx +20 -2
  139. package/src/components/ui/tab-selector.tsx +26 -3
  140. package/dist/chunk-N3MBQRCQ.cjs +0 -41
@@ -269,8 +269,18 @@ function CompactPrimaryActions({ actions, loading: loadingProp }) {
269
269
  inline.map((action, idx) => /* @__PURE__ */ jsx(React.Fragment, { children: renderActionButton(action, { inert: loading }) }, `compact-${actionKey(action, idx)}`))
270
270
  ] });
271
271
  }
272
+ const subscribeNothing = () => () => {
273
+ };
274
+ function useHydrated() {
275
+ return React.useSyncExternalStore(
276
+ subscribeNothing,
277
+ () => true,
278
+ () => false
279
+ );
280
+ }
272
281
  function MobileBottomActions({ actions, loading: loadingProp }) {
273
282
  const loading = useLoadingScope() || loadingProp;
283
+ const hydrated = useHydrated();
274
284
  const dockHeight = useComposerDockHeight();
275
285
  const barRef = React.useRef(null);
276
286
  useReportMobileActionBar(barRef);
@@ -281,7 +291,7 @@ function MobileBottomActions({ actions, loading: loadingProp }) {
281
291
  {
282
292
  ref: barRef,
283
293
  "data-testid": "mobile-action-bar",
284
- style: dockHeight > 0 ? { bottom: dockHeight } : void 0,
294
+ style: hydrated && dockHeight > 0 ? { bottom: dockHeight } : void 0,
285
295
  className: cn(
286
296
  "fixed bottom-0 left-0 right-0 z-50 md:hidden",
287
297
  "border-t border-ods-border bg-ods-card",
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,KAAK,wBAAwB,EAAqB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAQrG,QAAA,MAAM,UAAU,6LAKd,CAAC;AAGH,QAAA,MAAM,cAAc,uMAwBlB,CAAC;AAeH,0FAA0F;AAC1F,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,yGAAyG;IACzG,KAAK,EAAE,SAAS,CAAC;IACjB;oDACgD;IAChD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,UAAU,oBAAqB,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAChH,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;iDAC6C;IAC7C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,eAAe,iHA6KpB,CAAC;AAGF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AACvD,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,KAAK,wBAAwB,EAAqB,KAAK,SAAS,EAAwB,MAAM,OAAO,CAAC;AAQ/G,QAAA,MAAM,UAAU,6LAKd,CAAC;AAGH,QAAA,MAAM,cAAc,uMAwBlB,CAAC;AAeH,0FAA0F;AAC1F,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,yGAAyG;IACzG,KAAK,EAAE,SAAS,CAAC;IACjB;oDACgD;IAChD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,UAAU,oBAAqB,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAChH,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;iDAC6C;IAC7C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,eAAe,iHA+LpB,CAAC;AAGF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AACvD,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
4
- import { forwardRef } from "react";
4
+ import { forwardRef, useState } from "react";
5
5
  import { CONTROL_SIZE } from "../../styles/component-sizes.js";
6
6
  import { cn } from "../../utils/cn.js";
7
7
  import { TextLineSkeleton, UnifiedSkeleton } from "../loading/unified-skeleton.js";
@@ -55,6 +55,8 @@ const RadioGroupBlock = forwardRef(
55
55
  const rows = loading && options.length === 0 ? Array.from({ length: skeletonCount }, () => null) : options;
56
56
  const isGrouped = variant === "grouped";
57
57
  const isHorizontal = orientation === "horizontal";
58
+ const [firstOptions, setFirstOptions] = useState(null);
59
+ if (!loading && firstOptions === null) setFirstOptions(new Set(options.map((option) => option.value)));
58
60
  return /* @__PURE__ */ jsxs("div", { className: cn("relative flex w-full flex-col", className), children: [
59
61
  /* @__PURE__ */ jsx(
60
62
  RadioGroupPrimitive.Root,
@@ -125,7 +127,7 @@ const RadioGroupBlock = forwardRef(
125
127
  ]
126
128
  }
127
129
  ),
128
- option?.trailing && /* @__PURE__ */ jsx("div", { className: "ml-auto flex shrink-0 items-center", children: option.trailing })
130
+ option?.trailing && /* @__PURE__ */ jsx("div", { "data-radio-trailing": true, className: "ml-auto flex shrink-0 items-center self-stretch", children: option.trailing })
129
131
  ] });
130
132
  return /* @__PURE__ */ jsxs(
131
133
  Label,
@@ -144,6 +146,9 @@ const RadioGroupBlock = forwardRef(
144
146
  // CheckboxBlock — the border stays put so an unselected row
145
147
  // never flashes "selected" under the cursor.
146
148
  interactive && "hover:bg-ods-bg-hover active:bg-ods-bg-active",
149
+ // A control in `trailing` (a button, a menu) is its own target: on it, the row is not hovered or
150
+ // pressed, so the row never looks like what the click will do.
151
+ interactive && "[&:has([data-radio-trailing]_:active)]:bg-ods-card [&:has([data-radio-trailing]_:hover)]:bg-ods-card",
147
152
  isGrouped ? cn(
148
153
  "bg-ods-card px-[var(--spacing-system-sf)] py-[var(--spacing-system-xs,8px)]",
149
154
  !isLast && (isHorizontal ? "border-r" : "border-b"),
@@ -160,6 +165,7 @@ const RadioGroupBlock = forwardRef(
160
165
  // `Tag`'s label is a span too, and it went invisible against
161
166
  // its own fill.
162
167
  isDisabled && "bg-ods-bg",
168
+ option && firstOptions !== null && !firstOptions.has(option.value) && "duration-300 animate-in fade-in slide-in-from-top-2 motion-reduce:animate-none",
163
169
  // With a footer the option stacks: its row, then the footer.
164
170
  hasFooter && "flex-col items-stretch gap-[var(--spacing-system-sf)]",
165
171
  itemClassName
@@ -22,6 +22,12 @@ export interface TabSelectorProps {
22
22
  items: TabSelectorItem[];
23
23
  /** Visual variant: primary (accent bg) or secondary (soft grey bg) */
24
24
  variant?: 'primary' | 'secondary';
25
+ /**
26
+ * `compact`: an icon-only strip at its content's width: 44px tall, 36px segments and 20px icons from `content-md`,
27
+ * 40 / 32 / 16px below it (the guardrails level picker, Figma 4365-22670 / 4365-22462). Default: the full-width
28
+ * strip, 48px at `content-md`.
29
+ */
30
+ size?: 'default' | 'compact';
25
31
  /** Optional label displayed above the selector */
26
32
  label?: string;
27
33
  /** Disable the entire selector (overrides per-item enabled state) */
@@ -37,5 +43,5 @@ export interface TabSelectorProps {
37
43
  /** Additional CSS classes for the root container */
38
44
  className?: string;
39
45
  }
40
- export declare function TabSelector({ value, onValueChange, items, variant, label, disabled, scrollable, className, }: TabSelectorProps): React.JSX.Element;
46
+ export declare function TabSelector({ value, onValueChange, items, variant, size, label, disabled, scrollable, className, }: TabSelectorProps): React.JSX.Element;
41
47
  //# sourceMappingURL=tab-selector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab-selector.d.ts","sourceRoot":"","sources":["../../../src/components/ui/tab-selector.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,eAAe;IAC9B,oCAAoC;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,iGAAiG;IACjG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,2BAA2B;IAC3B,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,sEAAsE;IACtE,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAa,EACb,KAAK,EACL,OAAmB,EACnB,KAAK,EACL,QAAQ,EACR,UAAkB,EAClB,SAAS,GACV,EAAE,gBAAgB,qBA2DlB"}
1
+ {"version":3,"file":"tab-selector.d.ts","sourceRoot":"","sources":["../../../src/components/ui/tab-selector.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,eAAe;IAC9B,oCAAoC;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,iGAAiG;IACjG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,2BAA2B;IAC3B,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,sEAAsE;IACtE,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAa,EACb,KAAK,EACL,OAAmB,EACnB,IAAgB,EAChB,KAAK,EACL,QAAQ,EACR,UAAkB,EAClB,SAAS,GACV,EAAE,gBAAgB,qBA2ElB"}
@@ -9,12 +9,14 @@ function TabSelector({
9
9
  onValueChange,
10
10
  items,
11
11
  variant = "primary",
12
+ size = "default",
12
13
  label,
13
14
  disabled,
14
15
  scrollable = false,
15
16
  className
16
17
  }) {
17
18
  const flush = useIsInActionsMenuHeader();
19
+ const compact = size === "compact";
18
20
  return /* @__PURE__ */ jsxs(
19
21
  "div",
20
22
  {
@@ -30,7 +32,11 @@ function TabSelector({
30
32
  {
31
33
  className: cn(
32
34
  "flex gap-[var(--spacing-system-xxs)] bg-ods-bg p-[var(--spacing-system-xxs)]",
33
- flush ? "h-10 w-full" : cn("h-11 rounded-md border border-ods-border content-md:h-12", scrollable ? "overflow-x-auto" : "w-full")
35
+ flush ? "h-10 w-full" : cn(
36
+ "rounded-md border border-ods-border",
37
+ compact ? "h-10 content-md:h-11" : "h-11 content-md:h-12",
38
+ scrollable ? "overflow-x-auto" : compact ? "w-auto" : "w-full"
39
+ )
34
40
  ),
35
41
  children: items.map((item) => {
36
42
  const isActive = value === item.id;
@@ -46,9 +52,22 @@ function TabSelector({
46
52
  "aria-pressed": isActive,
47
53
  "data-state": isActive ? "active" : void 0,
48
54
  "data-tone": variant === "primary" ? "accent" : void 0,
49
- className: cn("h-full", scrollable ? "flex-none shrink-0 basis-auto" : "flex-1"),
55
+ className: cn(
56
+ "h-full",
57
+ compact ? "w-8 flex-none content-md:w-9" : scrollable ? "flex-none shrink-0 basis-auto" : "flex-1"
58
+ ),
50
59
  children: [
51
- item.icon && /* @__PURE__ */ jsx("span", { className: "flex size-4 shrink-0 items-center justify-center content-md:size-6", children: item.icon }),
60
+ item.icon && /* @__PURE__ */ jsx(
61
+ "span",
62
+ {
63
+ className: cn(
64
+ "flex shrink-0 items-center justify-center",
65
+ // compact: the box sizes the icon, whatever size the caller drew it at.
66
+ compact ? "size-4 content-md:size-5 [&>svg]:size-full" : "size-4 content-md:size-6"
67
+ ),
68
+ children: item.icon
69
+ }
70
+ ),
52
71
  item.label,
53
72
  item.badge && item.badge
54
73
  ]
@@ -5,15 +5,15 @@
5
5
  var _chunkQKZQ5Q6Ecjs = require('./chunk-QKZQ5Q6E.cjs');
6
6
 
7
7
 
8
- var _chunkMC3L525Kcjs = require('./chunk-MC3L525K.cjs');
8
+ var _chunkFGSN5UNYcjs = require('./chunk-FGSN5UNY.cjs');
9
9
 
10
10
 
11
11
  var _chunkLHV2R6QUcjs = require('./chunk-LHV2R6QU.cjs');
12
12
  require('./chunk-FDZOE5TL.cjs');
13
- require('./chunk-YLETC7LP.cjs');
14
- require('./chunk-IKOL6NJY.cjs');
15
- require('./chunk-SA2NNWIJ.cjs');
16
- require('./chunk-IHY7E4EX.cjs');
13
+ require('./chunk-ZEPEFKHA.cjs');
14
+ require('./chunk-U4RTWH5D.cjs');
15
+ require('./chunk-QCSA7GIX.cjs');
16
+ require('./chunk-UFGPLXH6.cjs');
17
17
  require('./chunk-HQQE74RO.cjs');
18
18
  require('./chunk-DEY6XXGO.cjs');
19
19
  require('./chunk-FNQWL4W4.cjs');
@@ -21,12 +21,12 @@ require('./chunk-IUDBG3HJ.cjs');
21
21
  require('./chunk-24I6RFVU.cjs');
22
22
  require('./chunk-MZ4KBSH7.cjs');
23
23
  require('./chunk-ZZDFMUEU.cjs');
24
- require('./chunk-TX4NTH22.cjs');
24
+ require('./chunk-B6D4WWKD.cjs');
25
25
  require('./chunk-OT6P57ZS.cjs');
26
- require('./chunk-FXLROQUT.cjs');
27
- require('./chunk-3W4ASAXN.cjs');
28
- require('./chunk-4YBS4HIO.cjs');
29
- require('./chunk-YJZ7R3W5.cjs');
26
+ require('./chunk-CDW6JTAQ.cjs');
27
+ require('./chunk-WYROOMUZ.cjs');
28
+ require('./chunk-LM7EL3UQ.cjs');
29
+ require('./chunk-KXFIYO4O.cjs');
30
30
  require('./chunk-PGAMWM6C.cjs');
31
31
  require('./chunk-46547WQW.cjs');
32
32
  require('./chunk-LNUFH4E2.cjs');
@@ -1852,9 +1852,8 @@ require('./chunk-NTPX5GXI.cjs');
1852
1852
  require('./chunk-GI3MMBP3.cjs');
1853
1853
  require('./chunk-GG466XFQ.cjs');
1854
1854
  require('./chunk-UJ7AXHRZ.cjs');
1855
- require('./chunk-ZGEWT3SF.cjs');
1856
- require('./chunk-N3MBQRCQ.cjs');
1857
- require('./chunk-S3QXLD4X.cjs');
1855
+ require('./chunk-HXURNKXI.cjs');
1856
+ require('./chunk-VCFQHPOO.cjs');
1858
1857
  require('./chunk-Z74QE57T.cjs');
1859
1858
  require('./chunk-XZJCBIYR.cjs');
1860
1859
  require('./chunk-2XCORRJV.cjs');
@@ -1871,7 +1870,7 @@ function DevicesScreen({ compact = false }) {
1871
1870
  const cast = _chunkLHV2R6QUcjs.useProductDemoCast.call(void 0, );
1872
1871
  const fixture = _react.useMemo.call(void 0, () => _chunkQKZQ5Q6Ecjs.buildWindowsDevicesFixture.call(void 0, cast), [cast]);
1873
1872
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1874
- _chunkMC3L525Kcjs.DevicesScreenView,
1873
+ _chunkFGSN5UNYcjs.DevicesScreenView,
1875
1874
  {
1876
1875
  compact,
1877
1876
  devices: fixture.devices,