@octaviaflow/core 3.1.0-beta.114 → 3.1.0-beta.115

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 (249) hide show
  1. package/dist/chunk-75JAQ4ZG.js +2694 -0
  2. package/dist/chunk-75JAQ4ZG.js.map +1 -0
  3. package/dist/chunk-LQVPNIO5.js +6789 -0
  4. package/dist/chunk-LQVPNIO5.js.map +1 -0
  5. package/dist/chunk-P46JGJC2.js +5619 -0
  6. package/dist/chunk-P46JGJC2.js.map +1 -0
  7. package/dist/chunk-ZALBYWCU.js +1547 -0
  8. package/dist/chunk-ZALBYWCU.js.map +1 -0
  9. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  10. package/dist/components/AgentAppMark/AgentAppMark.d.ts +28 -0
  11. package/dist/components/AgentAppMark/AgentAppMark.d.ts.map +1 -0
  12. package/dist/components/AgentAppMark/index.d.ts +3 -0
  13. package/dist/components/AgentAppMark/index.d.ts.map +1 -0
  14. package/dist/components/AgentCard/AgentCard.d.ts.map +1 -1
  15. package/dist/components/AlertCard/AlertCard.d.ts.map +1 -1
  16. package/dist/components/AuthCard/AuthCard.d.ts.map +1 -1
  17. package/dist/components/AuthScreen/AuthScreen.d.ts.map +1 -1
  18. package/dist/components/Badge/Badge.d.ts.map +1 -1
  19. package/dist/components/Banner/Banner.d.ts.map +1 -1
  20. package/dist/components/BarChart/BarChart.d.ts.map +1 -1
  21. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  22. package/dist/components/CalendarHeatmap/CalendarHeatmap.d.ts.map +1 -1
  23. package/dist/components/CalendarHeatmap/index.d.ts +1 -1
  24. package/dist/components/CalendarHeatmap/index.d.ts.map +1 -1
  25. package/dist/components/Callout/Callout.d.ts.map +1 -1
  26. package/dist/components/Card/Card.d.ts.map +1 -1
  27. package/dist/components/Catalog/Catalog.d.ts.map +1 -1
  28. package/dist/components/Catalog/index.d.ts +1 -1
  29. package/dist/components/Catalog/index.d.ts.map +1 -1
  30. package/dist/components/ChatAttachment/ChatAttachment.d.ts.map +1 -1
  31. package/dist/components/ChatAttachment/index.d.ts +1 -1
  32. package/dist/components/ChatAttachment/index.d.ts.map +1 -1
  33. package/dist/components/ChatBubble/ChatBubble.d.ts.map +1 -1
  34. package/dist/components/ChatCodeBlock/ChatCodeBlock.d.ts.map +1 -1
  35. package/dist/components/ChatDayDivider/ChatDayDivider.d.ts.map +1 -1
  36. package/dist/components/ChatFeedback/ChatFeedback.d.ts.map +1 -1
  37. package/dist/components/ChatPanel/ChatPanel.d.ts +1 -1
  38. package/dist/components/ChatPanel/ChatPanel.d.ts.map +1 -1
  39. package/dist/components/ChatScrollToBottom/ChatScrollToBottom.d.ts.map +1 -1
  40. package/dist/components/ChatSources/ChatSources.d.ts.map +1 -1
  41. package/dist/components/ChatSources/index.d.ts +1 -1
  42. package/dist/components/ChatSources/index.d.ts.map +1 -1
  43. package/dist/components/ChatSuggestions/ChatSuggestions.d.ts.map +1 -1
  44. package/dist/components/ChatSuggestions/index.d.ts +1 -1
  45. package/dist/components/ChatSuggestions/index.d.ts.map +1 -1
  46. package/dist/components/ChatThinking/ChatThinking.d.ts.map +1 -1
  47. package/dist/components/ChatThinking/index.d.ts +1 -1
  48. package/dist/components/ChatThinking/index.d.ts.map +1 -1
  49. package/dist/components/ChatThread/ChatThread.d.ts.map +1 -1
  50. package/dist/components/ChatThread/index.d.ts +1 -1
  51. package/dist/components/ChatThread/index.d.ts.map +1 -1
  52. package/dist/components/ChatToolTrace/ChatToolTrace.d.ts.map +1 -1
  53. package/dist/components/ChatToolTrace/index.d.ts +1 -1
  54. package/dist/components/ChatToolTrace/index.d.ts.map +1 -1
  55. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  56. package/dist/components/Chip/Chip.d.ts.map +1 -1
  57. package/dist/components/ChoiceCard/ChoiceCard.d.ts.map +1 -1
  58. package/dist/components/Coachmark/Coachmark.d.ts.map +1 -1
  59. package/dist/components/CodeEditor/CodeEditor.d.ts +15 -0
  60. package/dist/components/CodeEditor/CodeEditor.d.ts.map +1 -1
  61. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  62. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  63. package/dist/components/Combobox/index.d.ts +1 -1
  64. package/dist/components/Combobox/index.d.ts.map +1 -1
  65. package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -1
  66. package/dist/components/ConditionBuilder/ConditionBuilder.d.ts.map +1 -1
  67. package/dist/components/ConfigPanel/ConfigPanel.d.ts.map +1 -1
  68. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
  69. package/dist/components/ConnectorCard/ConnectorCard.d.ts.map +1 -1
  70. package/dist/components/ConnectorCard/index.d.ts +1 -1
  71. package/dist/components/ConnectorCard/index.d.ts.map +1 -1
  72. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  73. package/dist/components/CountUp/CountUp.d.ts.map +1 -1
  74. package/dist/components/CsvViewer/CsvViewer.d.ts.map +1 -1
  75. package/dist/components/DataMapper/DataMapper.d.ts.map +1 -1
  76. package/dist/components/DataTable/DataTable.d.ts.map +1 -1
  77. package/dist/components/DatasetCard/DatasetCard.d.ts.map +1 -1
  78. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  79. package/dist/components/DescriptionList/DescriptionList.d.ts.map +1 -1
  80. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  81. package/dist/components/Divider/Divider.d.ts.map +1 -1
  82. package/dist/components/DonutChart/DonutChart.d.ts.map +1 -1
  83. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  84. package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  85. package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
  86. package/dist/components/ExecutionConsole/ExecutionConsole.d.ts.map +1 -1
  87. package/dist/components/ExpressionField/ExpressionField.d.ts +21 -3
  88. package/dist/components/ExpressionField/ExpressionField.d.ts.map +1 -1
  89. package/dist/components/ExpressionField/dataRefTokens.d.ts +52 -0
  90. package/dist/components/ExpressionField/dataRefTokens.d.ts.map +1 -0
  91. package/dist/components/ExpressionField/index.d.ts +3 -2
  92. package/dist/components/ExpressionField/index.d.ts.map +1 -1
  93. package/dist/components/FeatureCard/FeatureCard.d.ts.map +1 -1
  94. package/dist/components/FieldPicker/FieldPicker.d.ts.map +1 -1
  95. package/dist/components/FieldPicker/index.d.ts +1 -1
  96. package/dist/components/FieldPicker/index.d.ts.map +1 -1
  97. package/dist/components/FileBrowser/FileBrowser.d.ts.map +1 -1
  98. package/dist/components/FileDropzone/FileDropzone.d.ts.map +1 -1
  99. package/dist/components/FileList/FileList.d.ts.map +1 -1
  100. package/dist/components/FilePicker/FilePicker.d.ts +6 -1
  101. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  102. package/dist/components/FileViewer/FileViewer.d.ts.map +1 -1
  103. package/dist/components/FlowMinimap/FlowMinimap.d.ts.map +1 -1
  104. package/dist/components/Gauge/Gauge.d.ts.map +1 -1
  105. package/dist/components/Grid/Grid.d.ts.map +1 -1
  106. package/dist/components/GroupByBuilder/index.d.ts +1 -1
  107. package/dist/components/GroupByBuilder/index.d.ts.map +1 -1
  108. package/dist/components/Heatmap/Heatmap.d.ts.map +1 -1
  109. package/dist/components/IconCard/IconCard.d.ts.map +1 -1
  110. package/dist/components/InlineMessage/InlineMessage.d.ts.map +1 -1
  111. package/dist/components/IntegrationCard/IntegrationCard.d.ts.map +1 -1
  112. package/dist/components/ItemDetail/ItemDetail.d.ts.map +1 -1
  113. package/dist/components/ItemDetail/index.d.ts +1 -1
  114. package/dist/components/ItemDetail/index.d.ts.map +1 -1
  115. package/dist/components/JsonViewer/JsonViewer.d.ts.map +1 -1
  116. package/dist/components/Kbd/Kbd.d.ts.map +1 -1
  117. package/dist/components/KeyValueEditor/KeyValueEditor.d.ts +22 -1
  118. package/dist/components/KeyValueEditor/KeyValueEditor.d.ts.map +1 -1
  119. package/dist/components/KeyValueEditor/index.d.ts +1 -1
  120. package/dist/components/KeyValueEditor/index.d.ts.map +1 -1
  121. package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
  122. package/dist/components/MetricCard/MetricCard.d.ts.map +1 -1
  123. package/dist/components/MonacoEditor/MonacoDiffEditor.d.ts.map +1 -1
  124. package/dist/components/MonacoEditor/MonacoEditor.d.ts.map +1 -1
  125. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  126. package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
  127. package/dist/components/OnboardingFlow/OnboardingFlow.d.ts.map +1 -1
  128. package/dist/components/OrgSwitcher/OrgSwitcher.d.ts.map +1 -1
  129. package/dist/components/PageHeader/PageHeader.d.ts.map +1 -1
  130. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  131. package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
  132. package/dist/components/PhoneInput/PhoneInput.d.ts.map +1 -1
  133. package/dist/components/PhoneInput/countries.d.ts.map +1 -1
  134. package/dist/components/PhoneInput/index.d.ts +1 -1
  135. package/dist/components/PhoneInput/index.d.ts.map +1 -1
  136. package/dist/components/PipelineCard/PipelineCard.d.ts +1 -1
  137. package/dist/components/PipelineCard/PipelineCard.d.ts.map +1 -1
  138. package/dist/components/PlanCard/PlanCard.d.ts.map +1 -1
  139. package/dist/components/PlanPicker/PlanPicker.d.ts.map +1 -1
  140. package/dist/components/PlanPicker/context.d.ts.map +1 -1
  141. package/dist/components/PresenceBar/PresenceBar.d.ts +11 -0
  142. package/dist/components/PresenceBar/PresenceBar.d.ts.map +1 -1
  143. package/dist/components/PricingCard/PricingCard.d.ts.map +1 -1
  144. package/dist/components/ProductCard/ProductCard.d.ts.map +1 -1
  145. package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
  146. package/dist/components/ProgressRing/ProgressRing.d.ts.map +1 -1
  147. package/dist/components/PromptInput/PromptInput.d.ts.map +1 -1
  148. package/dist/components/Quote/Quote.d.ts.map +1 -1
  149. package/dist/components/Radio/Radio.d.ts.map +1 -1
  150. package/dist/components/Radio/RadioGroup.d.ts.map +1 -1
  151. package/dist/components/RangeSlider/RangeSlider.d.ts.map +1 -1
  152. package/dist/components/Rating/BinaryRating.d.ts.map +1 -1
  153. package/dist/components/Rating/Rating.d.ts.map +1 -1
  154. package/dist/components/Rating/index.d.ts +1 -1
  155. package/dist/components/Rating/index.d.ts.map +1 -1
  156. package/dist/components/Resizable/Resizable.d.ts.map +1 -1
  157. package/dist/components/Ribbon/Ribbon.d.ts.map +1 -1
  158. package/dist/components/Sankey/Sankey.d.ts.map +1 -1
  159. package/dist/components/ScheduleBuilder/ScheduleBuilder.d.ts.map +1 -1
  160. package/dist/components/ScheduleBuilder/index.d.ts +1 -1
  161. package/dist/components/ScheduleBuilder/index.d.ts.map +1 -1
  162. package/dist/components/ScrollArea/ScrollArea.d.ts.map +1 -1
  163. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  164. package/dist/components/Select/Select.d.ts.map +1 -1
  165. package/dist/components/Show/Show.d.ts.map +1 -1
  166. package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
  167. package/dist/components/SlideoutPanel/SlideoutPanel.d.ts.map +1 -1
  168. package/dist/components/Slider/Slider.d.ts.map +1 -1
  169. package/dist/components/SocialButton/SocialButton.d.ts.map +1 -1
  170. package/dist/components/SortBuilder/index.d.ts +1 -1
  171. package/dist/components/SortBuilder/index.d.ts.map +1 -1
  172. package/dist/components/Sortable/Sortable.d.ts.map +1 -1
  173. package/dist/components/Sparkline/Sparkline.d.ts.map +1 -1
  174. package/dist/components/Spinner/Spinner.d.ts.map +1 -1
  175. package/dist/components/Spotlight/Spotlight.d.ts.map +1 -1
  176. package/dist/components/Stack/Stack.d.ts.map +1 -1
  177. package/dist/components/Stat/Stat.d.ts.map +1 -1
  178. package/dist/components/StatusList/StatusList.d.ts +1 -1
  179. package/dist/components/StatusList/StatusList.d.ts.map +1 -1
  180. package/dist/components/StatusList/index.d.ts +1 -1
  181. package/dist/components/StatusList/index.d.ts.map +1 -1
  182. package/dist/components/StatusTiles/StatusTiles.d.ts.map +1 -1
  183. package/dist/components/StatusTiles/index.d.ts +1 -1
  184. package/dist/components/StatusTiles/index.d.ts.map +1 -1
  185. package/dist/components/Stepper/Stepper.d.ts.map +1 -1
  186. package/dist/components/Switch/Switch.d.ts.map +1 -1
  187. package/dist/components/Table/Table.d.ts.map +1 -1
  188. package/dist/components/TagsInput/TagsInput.d.ts.map +1 -1
  189. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  190. package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
  191. package/dist/components/Timeline/Timeline.d.ts.map +1 -1
  192. package/dist/components/TimezonePicker/TimezonePicker.d.ts.map +1 -1
  193. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  194. package/dist/components/ToolCard/ToolCard.d.ts.map +1 -1
  195. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  196. package/dist/components/TraceStep/TraceStep.d.ts.map +1 -1
  197. package/dist/components/TreeView/TreeView.d.ts.map +1 -1
  198. package/dist/components/TreeView/index.d.ts +1 -1
  199. package/dist/components/TreeView/index.d.ts.map +1 -1
  200. package/dist/components/UsageMeter/UsageMeter.d.ts.map +1 -1
  201. package/dist/components/VersionHistory/VersionHistory.d.ts.map +1 -1
  202. package/dist/components/VersionHistory/index.d.ts +1 -1
  203. package/dist/components/VersionHistory/index.d.ts.map +1 -1
  204. package/dist/components/XmlViewer/XmlViewer.d.ts.map +1 -1
  205. package/dist/components/YamlViewer/YamlViewer.d.ts.map +1 -1
  206. package/dist/email/emailPalette.d.ts.map +1 -1
  207. package/dist/email/emailSystem.d.ts +3 -3
  208. package/dist/email/emailSystem.d.ts.map +1 -1
  209. package/dist/email/emailTemplates.d.ts +1 -1
  210. package/dist/email/emailTemplates.d.ts.map +1 -1
  211. package/dist/hooks/useRating.d.ts.map +1 -1
  212. package/dist/hooks/useTextareaCommands.d.ts.map +1 -1
  213. package/dist/hooks/useTextareaSelection.d.ts.map +1 -1
  214. package/dist/hooks/useTextareaTools.d.ts.map +1 -1
  215. package/dist/hooks/useTraceTimeline.d.ts.map +1 -1
  216. package/dist/index.cjs +15999 -17094
  217. package/dist/index.cjs.map +1 -1
  218. package/dist/index.d.ts +6 -5
  219. package/dist/index.d.ts.map +1 -1
  220. package/dist/index.js +14076 -16193
  221. package/dist/index.js.map +1 -1
  222. package/dist/marketing.cjs +580 -726
  223. package/dist/marketing.cjs.map +1 -1
  224. package/dist/marketing.js +2 -2
  225. package/dist/monaco.cjs +364 -389
  226. package/dist/monaco.cjs.map +1 -1
  227. package/dist/monaco.js +381 -410
  228. package/dist/monaco.js.map +1 -1
  229. package/dist/notifications/components/NotificationBell/NotificationBell.d.ts.map +1 -1
  230. package/dist/styles.css +1 -1
  231. package/dist/utils/Slot.d.ts.map +1 -1
  232. package/dist/utils/gradients.d.ts.map +1 -1
  233. package/dist/utils/useAnchoredPopover.d.ts +8 -1
  234. package/dist/utils/useAnchoredPopover.d.ts.map +1 -1
  235. package/dist/workflow/components/ConfigPanel/ConfigPanel.d.ts.map +1 -1
  236. package/dist/workflow/components/FlowNode/FlowNode.d.ts.map +1 -1
  237. package/dist/workflow/components/FxPanel/DataRefButton.d.ts +1 -1
  238. package/dist/workflow/components/FxPanel/DataRefButton.d.ts.map +1 -1
  239. package/dist/workflow/components/FxPanel/FxPanel.d.ts.map +1 -1
  240. package/dist/workflow/editor.d.ts +22 -0
  241. package/dist/workflow/editor.d.ts.map +1 -1
  242. package/dist/workflow/index.d.ts +6 -6
  243. package/dist/workflow/index.d.ts.map +1 -1
  244. package/dist/workflow/types.d.ts.map +1 -1
  245. package/dist/workflow.cjs +10310 -9355
  246. package/dist/workflow.cjs.map +1 -1
  247. package/dist/workflow.js +1932 -1963
  248. package/dist/workflow.js.map +1 -1
  249. package/package.json +2 -2
@@ -223,7 +223,6 @@ function mergeProps(slotProps, childProps) {
223
223
  ...slotValue,
224
224
  ...childValue
225
225
  };
226
- continue;
227
226
  }
228
227
  }
229
228
  return merged;
@@ -495,6 +494,7 @@ var Input = (0, import_react4.forwardRef)(
495
494
  Input.displayName = "Input";
496
495
 
497
496
  // src/components/Select/Select.tsx
497
+ var import_icons2 = require("@octaviaflow/icons");
498
498
  var import_framer_motion3 = require("framer-motion");
499
499
  var import_react16 = require("react");
500
500
  var import_react_aria3 = require("react-aria");
@@ -1735,9 +1735,6 @@ function $3834487504f4fc00$export$4d40659c25ecb50b(props = {}) {
1735
1735
  };
1736
1736
  }
1737
1737
 
1738
- // src/components/Select/Select.tsx
1739
- var import_icons2 = require("@octaviaflow/icons");
1740
-
1741
1738
  // src/components/Tooltip/Tooltip.tsx
1742
1739
  var import_framer_motion2 = require("framer-motion");
1743
1740
  var import_react15 = require("react");
@@ -1781,14 +1778,8 @@ function computePosition(rect, tipRect, position, offset, viewport) {
1781
1778
  const flipped = tryAt(FLIP[position]);
1782
1779
  if (flipped.fits) return flipped;
1783
1780
  const fallback = preferred;
1784
- const clampedLeft = Math.max(
1785
- 4,
1786
- Math.min(fallback.left, viewport.width - tipRect.width - 4)
1787
- );
1788
- const clampedTop = Math.max(
1789
- 4,
1790
- Math.min(fallback.top, viewport.height - tipRect.height - 4)
1791
- );
1781
+ const clampedLeft = Math.max(4, Math.min(fallback.left, viewport.width - tipRect.width - 4));
1782
+ const clampedTop = Math.max(4, Math.min(fallback.top, viewport.height - tipRect.height - 4));
1792
1783
  return { top: clampedTop, left: clampedLeft, position: fallback.position };
1793
1784
  }
1794
1785
  var animVariants = {
@@ -1910,25 +1901,16 @@ function Tooltip({
1910
1901
  const tooltipId = providedId ?? `ods-tooltip-${reactId}`;
1911
1902
  const triggerRef = (0, import_react15.useRef)(null);
1912
1903
  const state = $3834487504f4fc00$export$4d40659c25ecb50b({ delay });
1913
- const { triggerProps } = (0, import_react_aria2.useTooltipTrigger)(
1914
- { delay, isDisabled: disabled },
1915
- state,
1916
- triggerRef
1917
- );
1904
+ const { triggerProps } = (0, import_react_aria2.useTooltipTrigger)({ delay, isDisabled: disabled }, state, triggerRef);
1918
1905
  if (!(0, import_react15.isValidElement)(children)) {
1919
1906
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children });
1920
1907
  }
1921
1908
  const childProps = children.props;
1922
1909
  const childRef = childProps.ref ?? children.ref;
1923
1910
  const merged = { ...childProps };
1924
- for (const [key, value] of Object.entries(
1925
- triggerProps
1926
- )) {
1911
+ for (const [key, value] of Object.entries(triggerProps)) {
1927
1912
  if (key.startsWith("on") && typeof value === "function") {
1928
- merged[key] = mergeHandler(
1929
- childProps[key],
1930
- value
1931
- );
1913
+ merged[key] = mergeHandler(childProps[key], value);
1932
1914
  } else {
1933
1915
  merged[key] = value;
1934
1916
  }
@@ -1965,12 +1947,7 @@ function OverflowTooltip({
1965
1947
  }
1966
1948
  function ListBox(props) {
1967
1949
  const ref = (0, import_react16.useRef)(null);
1968
- const {
1969
- listBoxRef = ref,
1970
- state,
1971
- showCheckmark,
1972
- showOverflowTooltips
1973
- } = props;
1950
+ const { listBoxRef = ref, state, showCheckmark, showOverflowTooltips } = props;
1974
1951
  const { listBoxProps } = (0, import_react_aria3.useListBox)(props, state, listBoxRef);
1975
1952
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { ...listBoxProps, ref: listBoxRef, className: "ods-select__options", children: [...state.collection].map((item) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1976
1953
  Option,
@@ -2002,34 +1979,27 @@ function Option({
2002
1979
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("br", {}),
2003
1980
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: { opacity: 0.75 }, children: option.description })
2004
1981
  ] }) : option?.label;
2005
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2006
- OverflowTooltip,
1982
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(OverflowTooltip, { enabled: !!showOverflowTooltips, content: tooltipContent, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1983
+ "li",
2007
1984
  {
2008
- enabled: !!showOverflowTooltips,
2009
- content: tooltipContent,
2010
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
2011
- "li",
2012
- {
2013
- ...optionProps,
2014
- ref,
2015
- className: cn(
2016
- "ods-select__option",
2017
- isFocused && "ods-select__option--highlighted",
2018
- isSelected && "ods-select__option--selected",
2019
- isDisabled && "ods-select__option--disabled"
2020
- ),
2021
- children: [
2022
- option?.icon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ods-select__option-icon", children: option.icon }),
2023
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "ods-select__option-text", children: [
2024
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ods-select__option-label", children: item.rendered }),
2025
- option?.description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ods-select__option-desc", children: option.description })
2026
- ] }),
2027
- isSelected && showCheckmark && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ods-select__check", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons2.CheckmarkIcon, { size: "xs", tone: "accent" }) })
2028
- ]
2029
- }
2030
- )
1985
+ ...optionProps,
1986
+ ref,
1987
+ className: cn(
1988
+ "ods-select__option",
1989
+ isFocused && "ods-select__option--highlighted",
1990
+ isSelected && "ods-select__option--selected",
1991
+ isDisabled && "ods-select__option--disabled"
1992
+ ),
1993
+ children: [
1994
+ option?.icon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ods-select__option-icon", children: option.icon }),
1995
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "ods-select__option-text", children: [
1996
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ods-select__option-label", children: item.rendered }),
1997
+ option?.description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ods-select__option-desc", children: option.description })
1998
+ ] }),
1999
+ isSelected && showCheckmark && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ods-select__check", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons2.CheckmarkIcon, { size: "xs", tone: "accent" }) })
2000
+ ]
2031
2001
  }
2032
- );
2002
+ ) });
2033
2003
  }
2034
2004
  var DEFAULT_SELECT_PLACEHOLDER = "Select an option...";
2035
2005
  var Select = (0, import_react16.forwardRef)(function Select2({
@@ -2068,8 +2038,7 @@ var Select = (0, import_react16.forwardRef)(function Select2({
2068
2038
  const setTriggerRef = (node) => {
2069
2039
  triggerRef.current = node;
2070
2040
  if (typeof forwardedRef === "function") forwardedRef(node);
2071
- else if (forwardedRef)
2072
- forwardedRef.current = node;
2041
+ else if (forwardedRef) forwardedRef.current = node;
2073
2042
  };
2074
2043
  const reactId = (0, import_react16.useId)();
2075
2044
  const baseId = providedId ?? `ods-select-${reactId}`;
@@ -2229,10 +2198,7 @@ var Select = (0, import_react16.forwardRef)(function Select2({
2229
2198
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2230
2199
  "span",
2231
2200
  {
2232
- className: cn(
2233
- "ods-select__chevron",
2234
- state.isOpen && "ods-select__chevron--open"
2235
- ),
2201
+ className: cn("ods-select__chevron", state.isOpen && "ods-select__chevron--open"),
2236
2202
  "aria-hidden": "true",
2237
2203
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons2.ChevronDownIcon, { size: "xs" })
2238
2204
  }
@@ -2305,15 +2271,7 @@ var Select = (0, import_react16.forwardRef)(function Select2({
2305
2271
  ) }),
2306
2272
  document.body
2307
2273
  ),
2308
- error && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2309
- "span",
2310
- {
2311
- id: hintId,
2312
- className: "ods-select__error",
2313
- role: "alert",
2314
- children: errorMessage
2315
- }
2316
- ) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { id: hintId, className: "ods-select__hint", children: helperText }) : null
2274
+ error && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { id: hintId, className: "ods-select__error", role: "alert", children: errorMessage }) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { id: hintId, className: "ods-select__hint", children: helperText }) : null
2317
2275
  ]
2318
2276
  }
2319
2277
  );
@@ -2321,10 +2279,10 @@ var Select = (0, import_react16.forwardRef)(function Select2({
2321
2279
  Select.displayName = "Select";
2322
2280
 
2323
2281
  // src/components/Textarea/Textarea.tsx
2282
+ var import_icons4 = require("@octaviaflow/icons");
2324
2283
  var import_react20 = require("react");
2325
2284
  var import_react_aria4 = require("react-aria");
2326
2285
  var import_react_dom3 = require("react-dom");
2327
- var import_icons4 = require("@octaviaflow/icons");
2328
2286
 
2329
2287
  // src/hooks/useTextareaCommands.ts
2330
2288
  var import_react17 = require("react");
@@ -2410,9 +2368,7 @@ function useTextareaCommands({
2410
2368
  const [activeIndex, setActiveIndex] = (0, import_react17.useState)(0);
2411
2369
  const [triggerIndex, setTriggerIndex] = (0, import_react17.useState)(null);
2412
2370
  const [caretRect, setCaretRect] = (0, import_react17.useState)(null);
2413
- const dismissedAtRef = (0, import_react17.useRef)(
2414
- null
2415
- );
2371
+ const dismissedAtRef = (0, import_react17.useRef)(null);
2416
2372
  const items = (0, import_react17.useMemo)(() => {
2417
2373
  const q = query.trim().toLowerCase();
2418
2374
  if (!q) return commands.slice(0, maxItems);
@@ -2611,31 +2567,28 @@ function useTextareaSelection({
2611
2567
  }, [textareaRef]);
2612
2568
  const active = start !== end;
2613
2569
  const text = active ? value.slice(start, end) : "";
2614
- const writeToClipboard = (0, import_react18.useCallback)(
2615
- async (str) => {
2616
- try {
2617
- if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
2618
- await navigator.clipboard.writeText(str);
2619
- return true;
2620
- }
2621
- } catch {
2622
- }
2623
- try {
2624
- const tmp = document.createElement("textarea");
2625
- tmp.value = str;
2626
- tmp.style.position = "fixed";
2627
- tmp.style.left = "-9999px";
2628
- document.body.appendChild(tmp);
2629
- tmp.select();
2630
- const ok = document.execCommand("copy");
2631
- document.body.removeChild(tmp);
2632
- return ok;
2633
- } catch {
2634
- return false;
2570
+ const writeToClipboard = (0, import_react18.useCallback)(async (str) => {
2571
+ try {
2572
+ if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
2573
+ await navigator.clipboard.writeText(str);
2574
+ return true;
2635
2575
  }
2636
- },
2637
- []
2638
- );
2576
+ } catch {
2577
+ }
2578
+ try {
2579
+ const tmp = document.createElement("textarea");
2580
+ tmp.value = str;
2581
+ tmp.style.position = "fixed";
2582
+ tmp.style.left = "-9999px";
2583
+ document.body.appendChild(tmp);
2584
+ tmp.select();
2585
+ const ok = document.execCommand("copy");
2586
+ document.body.removeChild(tmp);
2587
+ return ok;
2588
+ } catch {
2589
+ return false;
2590
+ }
2591
+ }, []);
2639
2592
  const copy = (0, import_react18.useCallback)(async () => {
2640
2593
  if (!active) return false;
2641
2594
  return writeToClipboard(text);
@@ -2765,10 +2718,7 @@ function useTextareaTools({
2765
2718
  onChange(next);
2766
2719
  requestAnimationFrame(() => {
2767
2720
  ta.focus();
2768
- ta.setSelectionRange(
2769
- lineStart,
2770
- lineStart + updated.length
2771
- );
2721
+ ta.setSelectionRange(lineStart, lineStart + updated.length);
2772
2722
  });
2773
2723
  };
2774
2724
  const undo = () => {
@@ -2819,346 +2769,305 @@ function useTextareaTools({
2819
2769
 
2820
2770
  // src/components/Textarea/Textarea.tsx
2821
2771
  var import_jsx_runtime8 = require("react/jsx-runtime");
2822
- var Textarea = (0, import_react20.forwardRef)(
2823
- function Textarea2({
2824
- label,
2825
- error = false,
2826
- errorMessage,
2827
- helperText,
2828
- resize = "vertical",
2829
- autoResize = false,
2830
- minRows,
2831
- maxRows,
2832
- maxHeight,
2833
- maxWidth,
2834
- minHeight,
2835
- minWidth,
2836
- maxLength,
2837
- size = "md",
2838
- rows = 3,
2839
- disabled = false,
2840
- className,
2841
- style: consumerStyle,
2842
- defaultValue,
2843
- value,
2844
- onChange,
2845
- id: providedId,
2846
- commands,
2847
- commandTrigger = "/",
2848
- selectionToolbar = false,
2849
- selectionActions,
2850
- tools,
2851
- toolbarPosition = "top",
2852
- ...props
2853
- }, forwardedRef) {
2854
- const innerRef = (0, import_react20.useRef)(null);
2855
- const setRef = (node) => {
2856
- innerRef.current = node;
2857
- if (typeof forwardedRef === "function") forwardedRef(node);
2858
- else if (forwardedRef)
2859
- forwardedRef.current = node;
2860
- };
2861
- const reactId = (0, import_react20.useId)();
2862
- const baseId = providedId ?? `ods-textarea-${reactId}`;
2863
- const hintId = error && errorMessage || helperText ? `${baseId}-hint` : void 0;
2864
- const [charCount, setCharCount] = (0, import_react20.useState)(
2865
- () => String(value ?? defaultValue ?? "").length
2866
- );
2867
- const ariaNameProps = resolveAccessibleName({
2772
+ var Textarea = (0, import_react20.forwardRef)(function Textarea2({
2773
+ label,
2774
+ error = false,
2775
+ errorMessage,
2776
+ helperText,
2777
+ resize = "vertical",
2778
+ autoResize = false,
2779
+ minRows,
2780
+ maxRows,
2781
+ maxHeight,
2782
+ maxWidth,
2783
+ minHeight,
2784
+ minWidth,
2785
+ maxLength,
2786
+ size = "md",
2787
+ rows = 3,
2788
+ disabled = false,
2789
+ className,
2790
+ style: consumerStyle,
2791
+ defaultValue,
2792
+ value,
2793
+ onChange,
2794
+ id: providedId,
2795
+ commands,
2796
+ commandTrigger = "/",
2797
+ selectionToolbar = false,
2798
+ selectionActions,
2799
+ tools,
2800
+ toolbarPosition = "top",
2801
+ ...props
2802
+ }, forwardedRef) {
2803
+ const innerRef = (0, import_react20.useRef)(null);
2804
+ const setRef = (node) => {
2805
+ innerRef.current = node;
2806
+ if (typeof forwardedRef === "function") forwardedRef(node);
2807
+ else if (forwardedRef) forwardedRef.current = node;
2808
+ };
2809
+ const reactId = (0, import_react20.useId)();
2810
+ const baseId = providedId ?? `ods-textarea-${reactId}`;
2811
+ const hintId = error && errorMessage || helperText ? `${baseId}-hint` : void 0;
2812
+ const [charCount, setCharCount] = (0, import_react20.useState)(() => String(value ?? defaultValue ?? "").length);
2813
+ const ariaNameProps = resolveAccessibleName({
2814
+ label: typeof label === "string" ? label : void 0,
2815
+ ariaLabel: props["aria-label"],
2816
+ ariaLabelledby: props["aria-labelledby"],
2817
+ componentName: "Textarea"
2818
+ });
2819
+ const { labelProps, inputProps } = (0, import_react_aria4.useTextField)(
2820
+ {
2868
2821
  label: typeof label === "string" ? label : void 0,
2869
- ariaLabel: props["aria-label"],
2870
- ariaLabelledby: props["aria-labelledby"],
2871
- componentName: "Textarea"
2872
- });
2873
- const { labelProps, inputProps } = (0, import_react_aria4.useTextField)(
2874
- {
2875
- label: typeof label === "string" ? label : void 0,
2876
- ...ariaNameProps,
2877
- isDisabled: disabled,
2878
- errorMessage: typeof errorMessage === "string" ? errorMessage : void 0,
2879
- validationState: error ? "invalid" : void 0,
2880
- inputElementType: "textarea",
2881
- value,
2882
- defaultValue
2883
- },
2884
- innerRef
2885
- );
2886
- const describedBy = [
2887
- props["aria-describedby"],
2888
- hintId
2889
- ].filter(Boolean).join(" ") || void 0;
2890
- const handleChange = (e) => {
2891
- setCharCount(e.target.value.length);
2892
- onChange?.(e);
2893
- };
2894
- const [liveValue, setLiveValue] = (0, import_react20.useState)(
2895
- String(value ?? defaultValue ?? "")
2896
- );
2897
- (0, import_react20.useEffect)(() => {
2898
- if (value != null) setLiveValue(String(value));
2899
- }, [value]);
2900
- const handleChangeWithMirror = (e) => {
2901
- setLiveValue(e.target.value);
2902
- handleChange(e);
2903
- };
2904
- const setLiveAndCommit = (next) => {
2905
- setLiveValue(next);
2906
- if (innerRef.current) innerRef.current.value = next;
2907
- onChange?.({
2908
- target: innerRef.current,
2909
- currentTarget: innerRef.current
2910
- });
2911
- setCharCount(next.length);
2912
- };
2913
- const cmdPalette = useTextareaCommands({
2914
- textareaRef: innerRef,
2915
- value: liveValue,
2916
- onChange: setLiveAndCommit,
2917
- commands: commands ?? [],
2918
- trigger: commandTrigger
2919
- });
2920
- const cmdEnabled = (commands?.length ?? 0) > 0;
2921
- const sel = useTextareaSelection({
2922
- textareaRef: innerRef,
2923
- value: liveValue,
2924
- onChange: setLiveAndCommit
2925
- });
2926
- const toolbar = useTextareaTools({
2927
- textareaRef: innerRef,
2928
- value: liveValue,
2929
- onChange: setLiveAndCommit,
2930
- tools: tools ?? []
2822
+ ...ariaNameProps,
2823
+ isDisabled: disabled,
2824
+ errorMessage: typeof errorMessage === "string" ? errorMessage : void 0,
2825
+ validationState: error ? "invalid" : void 0,
2826
+ inputElementType: "textarea",
2827
+ value,
2828
+ defaultValue
2829
+ },
2830
+ innerRef
2831
+ );
2832
+ const describedBy = [props["aria-describedby"], hintId].filter(Boolean).join(" ") || void 0;
2833
+ const handleChange = (e) => {
2834
+ setCharCount(e.target.value.length);
2835
+ onChange?.(e);
2836
+ };
2837
+ const [liveValue, setLiveValue] = (0, import_react20.useState)(String(value ?? defaultValue ?? ""));
2838
+ (0, import_react20.useEffect)(() => {
2839
+ if (value != null) setLiveValue(String(value));
2840
+ }, [value]);
2841
+ const handleChangeWithMirror = (e) => {
2842
+ setLiveValue(e.target.value);
2843
+ handleChange(e);
2844
+ };
2845
+ const setLiveAndCommit = (next) => {
2846
+ setLiveValue(next);
2847
+ if (innerRef.current) innerRef.current.value = next;
2848
+ onChange?.({
2849
+ target: innerRef.current,
2850
+ currentTarget: innerRef.current
2931
2851
  });
2932
- const toolbarEnabled = (tools?.length ?? 0) > 0;
2933
- const handleKeyDownWithCommands = (e) => {
2934
- if (cmdEnabled) {
2935
- const consumed = cmdPalette.onKeyDown(e);
2936
- if (consumed) return;
2937
- }
2938
- props.onKeyDown?.(e);
2939
- };
2940
- (0, import_react20.useEffect)(() => {
2941
- if (!autoResize) return;
2942
- const el = innerRef.current;
2943
- if (!el) return;
2944
- const computed = window.getComputedStyle(el);
2945
- const fontSize = parseFloat(computed.fontSize) || 16;
2946
- const lhRaw = computed.lineHeight;
2947
- const lh = lhRaw === "normal" ? fontSize * 1.2 : lhRaw.endsWith("px") ? parseFloat(lhRaw) : parseFloat(lhRaw) * fontSize;
2948
- const padding = parseFloat(computed.paddingTop) + parseFloat(computed.paddingBottom);
2949
- const rowCap = maxRows != null && Number.isFinite(maxRows) ? lh * maxRows + padding : Number.POSITIVE_INFINITY;
2950
- const pixelCap = typeof maxHeight === "number" ? maxHeight : Number.POSITIVE_INFINITY;
2951
- const effectiveMax = Math.min(rowCap, pixelCap);
2952
- const rowFloor = lh * (minRows ?? rows) + padding;
2953
- el.style.height = "auto";
2954
- const target = Math.max(
2955
- rowFloor,
2956
- Math.min(effectiveMax, el.scrollHeight)
2957
- );
2958
- el.style.height = `${target}px`;
2959
- el.style.overflowY = el.scrollHeight > effectiveMax ? "auto" : "hidden";
2960
- }, [autoResize, value, defaultValue, minRows, maxRows, maxHeight, rows]);
2961
- const resolvedResize = typeof resize === "boolean" ? resize ? "vertical" : "none" : resize;
2962
- const toCss = (v) => v == null ? void 0 : typeof v === "number" ? `${v}px` : v;
2963
- const fieldStyle = {
2964
- maxHeight: toCss(maxHeight),
2965
- maxWidth: toCss(maxWidth),
2966
- minHeight: toCss(minHeight),
2967
- minWidth: toCss(minWidth),
2968
- resize: resolvedResize
2969
- };
2970
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2971
- "div",
2972
- {
2973
- className: cn(
2974
- "ods-textarea",
2975
- `ods-textarea--${size}`,
2976
- `ods-textarea--resize-${resolvedResize}`,
2977
- autoResize && "ods-textarea--auto-resize",
2978
- error && "ods-textarea--error",
2979
- disabled && "ods-textarea--disabled",
2980
- className
2981
- ),
2982
- style: consumerStyle,
2983
- children: [
2984
- label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2985
- "label",
2986
- {
2987
- ...labelProps,
2988
- htmlFor: baseId,
2989
- className: "ods-textarea__label",
2990
- children: label
2991
- }
2992
- ),
2993
- toolbarEnabled && toolbarPosition === "top" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2994
- TextareaToolbar,
2852
+ setCharCount(next.length);
2853
+ };
2854
+ const cmdPalette = useTextareaCommands({
2855
+ textareaRef: innerRef,
2856
+ value: liveValue,
2857
+ onChange: setLiveAndCommit,
2858
+ commands: commands ?? [],
2859
+ trigger: commandTrigger
2860
+ });
2861
+ const cmdEnabled = (commands?.length ?? 0) > 0;
2862
+ const sel = useTextareaSelection({
2863
+ textareaRef: innerRef,
2864
+ value: liveValue,
2865
+ onChange: setLiveAndCommit
2866
+ });
2867
+ const toolbar = useTextareaTools({
2868
+ textareaRef: innerRef,
2869
+ value: liveValue,
2870
+ onChange: setLiveAndCommit,
2871
+ tools: tools ?? []
2872
+ });
2873
+ const toolbarEnabled = (tools?.length ?? 0) > 0;
2874
+ const handleKeyDownWithCommands = (e) => {
2875
+ if (cmdEnabled) {
2876
+ const consumed = cmdPalette.onKeyDown(e);
2877
+ if (consumed) return;
2878
+ }
2879
+ props.onKeyDown?.(e);
2880
+ };
2881
+ (0, import_react20.useEffect)(() => {
2882
+ if (!autoResize) return;
2883
+ const el = innerRef.current;
2884
+ if (!el) return;
2885
+ const computed = window.getComputedStyle(el);
2886
+ const fontSize = parseFloat(computed.fontSize) || 16;
2887
+ const lhRaw = computed.lineHeight;
2888
+ const lh = lhRaw === "normal" ? fontSize * 1.2 : lhRaw.endsWith("px") ? parseFloat(lhRaw) : parseFloat(lhRaw) * fontSize;
2889
+ const padding = parseFloat(computed.paddingTop) + parseFloat(computed.paddingBottom);
2890
+ const rowCap = maxRows != null && Number.isFinite(maxRows) ? lh * maxRows + padding : Number.POSITIVE_INFINITY;
2891
+ const pixelCap = typeof maxHeight === "number" ? maxHeight : Number.POSITIVE_INFINITY;
2892
+ const effectiveMax = Math.min(rowCap, pixelCap);
2893
+ const rowFloor = lh * (minRows ?? rows) + padding;
2894
+ el.style.height = "auto";
2895
+ const target = Math.max(rowFloor, Math.min(effectiveMax, el.scrollHeight));
2896
+ el.style.height = `${target}px`;
2897
+ el.style.overflowY = el.scrollHeight > effectiveMax ? "auto" : "hidden";
2898
+ }, [autoResize, value, defaultValue, minRows, maxRows, maxHeight, rows]);
2899
+ const resolvedResize = typeof resize === "boolean" ? resize ? "vertical" : "none" : resize;
2900
+ const toCss = (v) => v == null ? void 0 : typeof v === "number" ? `${v}px` : v;
2901
+ const fieldStyle = {
2902
+ maxHeight: toCss(maxHeight),
2903
+ maxWidth: toCss(maxWidth),
2904
+ minHeight: toCss(minHeight),
2905
+ minWidth: toCss(minWidth),
2906
+ resize: resolvedResize
2907
+ };
2908
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2909
+ "div",
2910
+ {
2911
+ className: cn(
2912
+ "ods-textarea",
2913
+ `ods-textarea--${size}`,
2914
+ `ods-textarea--resize-${resolvedResize}`,
2915
+ autoResize && "ods-textarea--auto-resize",
2916
+ error && "ods-textarea--error",
2917
+ disabled && "ods-textarea--disabled",
2918
+ className
2919
+ ),
2920
+ style: consumerStyle,
2921
+ children: [
2922
+ label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { ...labelProps, htmlFor: baseId, className: "ods-textarea__label", children: label }),
2923
+ toolbarEnabled && toolbarPosition === "top" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TextareaToolbar, { tools: toolbar.tools, onRun: toolbar.runTool }),
2924
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "ods-textarea__wrapper", children: [
2925
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2926
+ "textarea",
2995
2927
  {
2996
- tools: toolbar.tools,
2997
- onRun: toolbar.runTool
2928
+ ...props,
2929
+ ...inputProps,
2930
+ ref: setRef,
2931
+ id: baseId,
2932
+ rows: autoResize ? minRows ?? rows : rows,
2933
+ disabled,
2934
+ maxLength,
2935
+ defaultValue,
2936
+ value,
2937
+ onChange: handleChangeWithMirror,
2938
+ onKeyDown: handleKeyDownWithCommands,
2939
+ className: "ods-textarea__field",
2940
+ style: fieldStyle,
2941
+ "aria-invalid": error || void 0,
2942
+ "aria-describedby": describedBy,
2943
+ "aria-autocomplete": cmdEnabled ? "list" : void 0,
2944
+ "aria-expanded": cmdEnabled ? cmdPalette.isOpen : void 0,
2945
+ "aria-controls": cmdEnabled && cmdPalette.isOpen ? `${baseId}-cmd-list` : void 0,
2946
+ "aria-activedescendant": cmdEnabled && cmdPalette.isOpen && cmdPalette.items[cmdPalette.activeIndex] ? `${baseId}-cmd-${cmdPalette.items[cmdPalette.activeIndex].id}` : void 0
2998
2947
  }
2999
2948
  ),
3000
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "ods-textarea__wrapper", children: [
2949
+ cmdEnabled && cmdPalette.isOpen && cmdPalette.items.length > 0 && typeof document !== "undefined" && (0, import_react_dom3.createPortal)(
3001
2950
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3002
- "textarea",
2951
+ "ul",
3003
2952
  {
3004
- ...props,
3005
- ...inputProps,
3006
- ref: setRef,
3007
- id: baseId,
3008
- rows: autoResize ? minRows ?? rows : rows,
3009
- disabled,
3010
- maxLength,
3011
- defaultValue,
3012
- value,
3013
- onChange: handleChangeWithMirror,
3014
- onKeyDown: handleKeyDownWithCommands,
3015
- className: "ods-textarea__field",
3016
- style: fieldStyle,
3017
- "aria-invalid": error || void 0,
3018
- "aria-describedby": describedBy,
3019
- "aria-autocomplete": cmdEnabled ? "list" : void 0,
3020
- "aria-expanded": cmdEnabled ? cmdPalette.isOpen : void 0,
3021
- "aria-controls": cmdEnabled && cmdPalette.isOpen ? `${baseId}-cmd-list` : void 0,
3022
- "aria-activedescendant": cmdEnabled && cmdPalette.isOpen && cmdPalette.items[cmdPalette.activeIndex] ? `${baseId}-cmd-${cmdPalette.items[cmdPalette.activeIndex].id}` : void 0
2953
+ id: `${baseId}-cmd-list`,
2954
+ role: "listbox",
2955
+ "aria-label": "Inline commands",
2956
+ className: "ods-textarea__cmd-popover",
2957
+ style: {
2958
+ position: "fixed",
2959
+ top: (cmdPalette.caretRect?.bottom ?? 0) + 6,
2960
+ left: cmdPalette.caretRect?.left ?? 0
2961
+ },
2962
+ children: cmdPalette.items.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2963
+ "li",
2964
+ {
2965
+ id: `${baseId}-cmd-${c.id}`,
2966
+ role: "option",
2967
+ "aria-selected": i === cmdPalette.activeIndex,
2968
+ className: cn(
2969
+ "ods-textarea__cmd-item",
2970
+ i === cmdPalette.activeIndex && "ods-textarea__cmd-item--active"
2971
+ ),
2972
+ onMouseDown: (e) => {
2973
+ e.preventDefault();
2974
+ cmdPalette.commit(c);
2975
+ },
2976
+ onMouseEnter: () => {
2977
+ },
2978
+ children: [
2979
+ c.icon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ods-textarea__cmd-icon", children: c.icon }),
2980
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "ods-textarea__cmd-text", children: [
2981
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ods-textarea__cmd-label", children: c.label }),
2982
+ c.description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ods-textarea__cmd-desc", children: c.description })
2983
+ ] })
2984
+ ]
2985
+ },
2986
+ c.id
2987
+ ))
3023
2988
  }
3024
2989
  ),
3025
- cmdEnabled && cmdPalette.isOpen && cmdPalette.items.length > 0 && typeof document !== "undefined" && (0, import_react_dom3.createPortal)(
3026
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3027
- "ul",
3028
- {
3029
- id: `${baseId}-cmd-list`,
3030
- role: "listbox",
3031
- "aria-label": "Inline commands",
3032
- className: "ods-textarea__cmd-popover",
3033
- style: {
3034
- position: "fixed",
3035
- top: (cmdPalette.caretRect?.bottom ?? 0) + 6,
3036
- left: cmdPalette.caretRect?.left ?? 0
3037
- },
3038
- children: cmdPalette.items.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
3039
- "li",
2990
+ document.body
2991
+ ),
2992
+ selectionToolbar && sel.active && sel.rect && typeof document !== "undefined" && (0, import_react_dom3.createPortal)(
2993
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2994
+ "div",
2995
+ {
2996
+ role: "toolbar",
2997
+ "aria-label": "Selection actions",
2998
+ className: "ods-textarea__sel-toolbar",
2999
+ style: {
3000
+ position: "fixed",
3001
+ top: sel.rect.top - 36,
3002
+ left: sel.rect.left
3003
+ },
3004
+ onMouseDown: (e) => e.preventDefault(),
3005
+ children: [
3006
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3007
+ "button",
3008
+ {
3009
+ type: "button",
3010
+ className: "ods-textarea__sel-btn",
3011
+ onClick: () => sel.copy(),
3012
+ "aria-label": "Copy selection",
3013
+ title: "Copy",
3014
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons4.CopyIcon, { size: "xs" })
3015
+ }
3016
+ ),
3017
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3018
+ "button",
3040
3019
  {
3041
- id: `${baseId}-cmd-${c.id}`,
3042
- role: "option",
3043
- "aria-selected": i === cmdPalette.activeIndex,
3044
- className: cn(
3045
- "ods-textarea__cmd-item",
3046
- i === cmdPalette.activeIndex && "ods-textarea__cmd-item--active"
3047
- ),
3048
- onMouseDown: (e) => {
3049
- e.preventDefault();
3050
- cmdPalette.commit(c);
3051
- },
3052
- onMouseEnter: () => {
3053
- },
3020
+ type: "button",
3021
+ className: "ods-textarea__sel-btn",
3022
+ onClick: () => sel.cut(),
3023
+ "aria-label": "Cut selection",
3024
+ title: "Cut",
3025
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons4.CutIcon, { size: "xs" })
3026
+ }
3027
+ ),
3028
+ selectionActions?.map((a) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
3029
+ "button",
3030
+ {
3031
+ type: "button",
3032
+ className: "ods-textarea__sel-btn",
3033
+ onClick: () => a.onAction(sel.text, {
3034
+ replace: sel.replace,
3035
+ wrap: sel.wrap,
3036
+ copy: sel.copy,
3037
+ cut: sel.cut
3038
+ }),
3039
+ title: typeof a.label === "string" ? a.label : void 0,
3054
3040
  children: [
3055
- c.icon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ods-textarea__cmd-icon", children: c.icon }),
3056
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "ods-textarea__cmd-text", children: [
3057
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ods-textarea__cmd-label", children: c.label }),
3058
- c.description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ods-textarea__cmd-desc", children: c.description })
3059
- ] })
3041
+ a.icon,
3042
+ a.label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ods-textarea__sel-btn-label", children: a.label })
3060
3043
  ]
3061
3044
  },
3062
- c.id
3045
+ a.id
3063
3046
  ))
3064
- }
3065
- ),
3066
- document.body
3067
- ),
3068
- selectionToolbar && sel.active && sel.rect && typeof document !== "undefined" && (0, import_react_dom3.createPortal)(
3069
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
3070
- "div",
3071
- {
3072
- role: "toolbar",
3073
- "aria-label": "Selection actions",
3074
- className: "ods-textarea__sel-toolbar",
3075
- style: {
3076
- position: "fixed",
3077
- top: sel.rect.top - 36,
3078
- left: sel.rect.left
3079
- },
3080
- onMouseDown: (e) => e.preventDefault(),
3081
- children: [
3082
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3083
- "button",
3084
- {
3085
- type: "button",
3086
- className: "ods-textarea__sel-btn",
3087
- onClick: () => sel.copy(),
3088
- "aria-label": "Copy selection",
3089
- title: "Copy",
3090
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons4.CopyIcon, { size: "xs" })
3091
- }
3092
- ),
3093
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3094
- "button",
3095
- {
3096
- type: "button",
3097
- className: "ods-textarea__sel-btn",
3098
- onClick: () => sel.cut(),
3099
- "aria-label": "Cut selection",
3100
- title: "Cut",
3101
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons4.CutIcon, { size: "xs" })
3102
- }
3103
- ),
3104
- selectionActions?.map((a) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
3105
- "button",
3106
- {
3107
- type: "button",
3108
- className: "ods-textarea__sel-btn",
3109
- onClick: () => a.onAction(sel.text, {
3110
- replace: sel.replace,
3111
- wrap: sel.wrap,
3112
- copy: sel.copy,
3113
- cut: sel.cut
3114
- }),
3115
- title: typeof a.label === "string" ? a.label : void 0,
3116
- children: [
3117
- a.icon,
3118
- a.label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ods-textarea__sel-btn-label", children: a.label })
3119
- ]
3120
- },
3121
- a.id
3122
- ))
3123
- ]
3124
- }
3125
- ),
3126
- document.body
3127
- ),
3128
- maxLength != null && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
3129
- "span",
3130
- {
3131
- className: "ods-textarea__count",
3132
- "aria-live": charCount > maxLength ? "polite" : "off",
3133
- children: [
3134
- charCount,
3135
- "/",
3136
- maxLength
3137
3047
  ]
3138
3048
  }
3139
- )
3140
- ] }),
3141
- toolbarEnabled && toolbarPosition === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3142
- TextareaToolbar,
3143
- {
3144
- tools: toolbar.tools,
3145
- onRun: toolbar.runTool
3146
- }
3049
+ ),
3050
+ document.body
3147
3051
  ),
3148
- error && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3149
- "div",
3052
+ maxLength != null && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
3053
+ "span",
3150
3054
  {
3151
- id: hintId,
3152
- className: "ods-textarea__error-message",
3153
- role: "alert",
3154
- children: errorMessage
3055
+ className: "ods-textarea__count",
3056
+ "aria-live": charCount > maxLength ? "polite" : "off",
3057
+ children: [
3058
+ charCount,
3059
+ "/",
3060
+ maxLength
3061
+ ]
3155
3062
  }
3156
- ) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { id: hintId, className: "ods-textarea__hint", children: helperText }) : null
3157
- ]
3158
- }
3159
- );
3160
- }
3161
- );
3063
+ )
3064
+ ] }),
3065
+ toolbarEnabled && toolbarPosition === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TextareaToolbar, { tools: toolbar.tools, onRun: toolbar.runTool }),
3066
+ error && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { id: hintId, className: "ods-textarea__error-message", role: "alert", children: errorMessage }) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { id: hintId, className: "ods-textarea__hint", children: helperText }) : null
3067
+ ]
3068
+ }
3069
+ );
3070
+ });
3162
3071
  Textarea.displayName = "Textarea";
3163
3072
  function TextareaToolbar({
3164
3073
  tools,
@@ -3177,14 +3086,7 @@ function TextareaToolbar({
3177
3086
  },
3178
3087
  children: tools.map((t) => {
3179
3088
  if (t.kind === "divider") {
3180
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3181
- "span",
3182
- {
3183
- className: "ods-textarea__toolbar-divider",
3184
- "aria-hidden": "true"
3185
- },
3186
- t.id
3187
- );
3089
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ods-textarea__toolbar-divider", "aria-hidden": "true" }, t.id);
3188
3090
  }
3189
3091
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3190
3092
  "button",
@@ -3857,17 +3759,7 @@ var Card = (0, import_react23.forwardRef)(function Card2({
3857
3759
  );
3858
3760
  }
3859
3761
  if (loading) {
3860
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3861
- "div",
3862
- {
3863
- ...rest,
3864
- ref,
3865
- className: rootClassName,
3866
- "aria-busy": "true",
3867
- "aria-label": "Loading",
3868
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "ods-card__skeleton", "data-ods-animate": "shimmer" })
3869
- }
3870
- );
3762
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ...rest, ref, className: rootClassName, "aria-busy": "true", "aria-label": "Loading", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "ods-card__skeleton", "data-ods-animate": "shimmer" }) });
3871
3763
  }
3872
3764
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3873
3765
  import_framer_motion4.motion.div,
@@ -3887,41 +3779,35 @@ var Card = (0, import_react23.forwardRef)(function Card2({
3887
3779
  );
3888
3780
  });
3889
3781
  Card.displayName = "Card";
3890
- var CardHeader = (0, import_react23.forwardRef)(
3891
- function CardHeader2({ className, children, ...rest }, ref) {
3892
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ...rest, ref, className: cn("ods-card__header", className), children });
3893
- }
3894
- );
3782
+ var CardHeader = (0, import_react23.forwardRef)(function CardHeader2({ className, children, ...rest }, ref) {
3783
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ...rest, ref, className: cn("ods-card__header", className), children });
3784
+ });
3895
3785
  CardHeader.displayName = "Card.Header";
3896
- var CardBody = (0, import_react23.forwardRef)(
3897
- function CardBody2({ className, children, ...rest }, ref) {
3898
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ...rest, ref, className: cn("ods-card__body", className), children });
3899
- }
3900
- );
3786
+ var CardBody = (0, import_react23.forwardRef)(function CardBody2({ className, children, ...rest }, ref) {
3787
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ...rest, ref, className: cn("ods-card__body", className), children });
3788
+ });
3901
3789
  CardBody.displayName = "Card.Body";
3902
- var CardFooter = (0, import_react23.forwardRef)(
3903
- function CardFooter2({ className, children, ...rest }, ref) {
3904
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ...rest, ref, className: cn("ods-card__footer", className), children });
3905
- }
3906
- );
3790
+ var CardFooter = (0, import_react23.forwardRef)(function CardFooter2({ className, children, ...rest }, ref) {
3791
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ...rest, ref, className: cn("ods-card__footer", className), children });
3792
+ });
3907
3793
  CardFooter.displayName = "Card.Footer";
3908
- var CardTitle = (0, import_react23.forwardRef)(
3909
- function CardTitle2({ as: Comp = "h3", className, children, ...rest }, ref) {
3910
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3911
- Comp,
3912
- {
3913
- ...rest,
3914
- ref,
3915
- className: cn("ods-card__title", className),
3916
- children
3917
- }
3918
- );
3794
+ var CardTitle = (0, import_react23.forwardRef)(function CardTitle2({ as: Comp = "h3", className, children, ...rest }, ref) {
3795
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3796
+ Comp,
3797
+ {
3798
+ ...rest,
3799
+ ref,
3800
+ className: cn("ods-card__title", className),
3801
+ children
3802
+ }
3803
+ );
3804
+ });
3805
+ CardTitle.displayName = "Card.Title";
3806
+ var CardDescription = (0, import_react23.forwardRef)(
3807
+ function CardDescription2({ className, children, ...rest }, ref) {
3808
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { ...rest, ref, className: cn("ods-card__description", className), children });
3919
3809
  }
3920
3810
  );
3921
- CardTitle.displayName = "Card.Title";
3922
- var CardDescription = (0, import_react23.forwardRef)(function CardDescription2({ className, children, ...rest }, ref) {
3923
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { ...rest, ref, className: cn("ods-card__description", className), children });
3924
- });
3925
3811
  CardDescription.displayName = "Card.Description";
3926
3812
  Card.Header = CardHeader;
3927
3813
  Card.Body = CardBody;
@@ -4296,175 +4182,152 @@ var import_icons5 = require("@octaviaflow/icons");
4296
4182
  var import_framer_motion5 = require("framer-motion");
4297
4183
  var import_react26 = require("react");
4298
4184
  var import_jsx_runtime16 = require("react/jsx-runtime");
4299
- var Accordion = (0, import_react26.forwardRef)(
4300
- function Accordion2({
4301
- items,
4302
- mode = "single",
4303
- value: controlledValue,
4304
- defaultValue,
4305
- onValueChange,
4306
- collapsible = true,
4307
- variant = "default",
4308
- size = "md",
4309
- disabled = false,
4310
- id: providedId,
4311
- className,
4312
- ...rest
4313
- }, ref) {
4314
- const reactId = (0, import_react26.useId)();
4315
- const baseId = providedId ?? `ods-accordion-${reactId}`;
4316
- const reducedMotion = (0, import_framer_motion5.useReducedMotion)();
4317
- const [internalValue, setInternalValue] = (0, import_react26.useState)(
4318
- defaultValue ?? []
4319
- );
4320
- const isControlled = controlledValue !== void 0;
4321
- const value = isControlled ? controlledValue : internalValue;
4322
- const valueSet = new Set(value);
4323
- const setValue = (0, import_react26.useCallback)(
4324
- (next) => {
4325
- if (!isControlled) setInternalValue(next);
4326
- onValueChange?.(next);
4327
- },
4328
- [isControlled, onValueChange]
4329
- );
4330
- const toggleItem = (0, import_react26.useCallback)(
4331
- (id) => {
4332
- const isOpen = valueSet.has(id);
4333
- if (mode === "multiple") {
4334
- const next = isOpen ? value.filter((v) => v !== id) : [...value, id];
4335
- setValue(next);
4336
- return;
4337
- }
4338
- if (isOpen) {
4339
- if (collapsible) setValue([]);
4340
- return;
4341
- }
4342
- setValue([id]);
4343
- },
4344
- [collapsible, mode, setValue, value, valueSet]
4345
- );
4346
- const handleKeyDown = (e, index) => {
4347
- const enabledIdx = items.map((it, i) => it.disabled ? -1 : i).filter((i) => i !== -1);
4348
- const curr = enabledIdx.indexOf(index);
4349
- const focusIdx = (i) => {
4350
- const target = enabledIdx[i];
4351
- if (target === void 0) return;
4352
- const btn = document.getElementById(
4353
- `${baseId}-trigger-${items[target].id}`
4354
- );
4355
- btn?.focus();
4356
- };
4357
- if (e.key === "ArrowDown") {
4358
- e.preventDefault();
4359
- focusIdx((curr + 1) % enabledIdx.length);
4360
- } else if (e.key === "ArrowUp") {
4361
- e.preventDefault();
4362
- focusIdx((curr - 1 + enabledIdx.length) % enabledIdx.length);
4363
- } else if (e.key === "Home") {
4364
- e.preventDefault();
4365
- focusIdx(0);
4366
- } else if (e.key === "End") {
4367
- e.preventDefault();
4368
- focusIdx(enabledIdx.length - 1);
4185
+ var Accordion = (0, import_react26.forwardRef)(function Accordion2({
4186
+ items,
4187
+ mode = "single",
4188
+ value: controlledValue,
4189
+ defaultValue,
4190
+ onValueChange,
4191
+ collapsible = true,
4192
+ variant = "default",
4193
+ size = "md",
4194
+ disabled = false,
4195
+ id: providedId,
4196
+ className,
4197
+ ...rest
4198
+ }, ref) {
4199
+ const reactId = (0, import_react26.useId)();
4200
+ const baseId = providedId ?? `ods-accordion-${reactId}`;
4201
+ const reducedMotion = (0, import_framer_motion5.useReducedMotion)();
4202
+ const [internalValue, setInternalValue] = (0, import_react26.useState)(defaultValue ?? []);
4203
+ const isControlled = controlledValue !== void 0;
4204
+ const value = isControlled ? controlledValue : internalValue;
4205
+ const valueSet = new Set(value);
4206
+ const setValue = (0, import_react26.useCallback)(
4207
+ (next) => {
4208
+ if (!isControlled) setInternalValue(next);
4209
+ onValueChange?.(next);
4210
+ },
4211
+ [isControlled, onValueChange]
4212
+ );
4213
+ const toggleItem = (0, import_react26.useCallback)(
4214
+ (id) => {
4215
+ const isOpen = valueSet.has(id);
4216
+ if (mode === "multiple") {
4217
+ const next = isOpen ? value.filter((v) => v !== id) : [...value, id];
4218
+ setValue(next);
4219
+ return;
4220
+ }
4221
+ if (isOpen) {
4222
+ if (collapsible) setValue([]);
4223
+ return;
4369
4224
  }
4225
+ setValue([id]);
4226
+ },
4227
+ [collapsible, mode, setValue, value, valueSet]
4228
+ );
4229
+ const handleKeyDown = (e, index) => {
4230
+ const enabledIdx = items.map((it, i) => it.disabled ? -1 : i).filter((i) => i !== -1);
4231
+ const curr = enabledIdx.indexOf(index);
4232
+ const focusIdx = (i) => {
4233
+ const target = enabledIdx[i];
4234
+ if (target === void 0) return;
4235
+ const btn = document.getElementById(`${baseId}-trigger-${items[target].id}`);
4236
+ btn?.focus();
4370
4237
  };
4371
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4372
- "div",
4373
- {
4374
- ...rest,
4375
- ref,
4376
- id: baseId,
4377
- className: cn(
4378
- "ods-accordion",
4379
- `ods-accordion--${variant}`,
4380
- `ods-accordion--${size}`,
4381
- disabled && "ods-accordion--disabled",
4382
- className
4383
- ),
4384
- children: items.map((item, i) => {
4385
- const isOpen = valueSet.has(item.id);
4386
- const itemDisabled = item.disabled || disabled;
4387
- const triggerId = `${baseId}-trigger-${item.id}`;
4388
- const panelId = `${baseId}-panel-${item.id}`;
4389
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
4390
- "div",
4391
- {
4392
- className: cn(
4393
- "ods-accordion__item",
4394
- isOpen && "ods-accordion__item--open",
4395
- itemDisabled && "ods-accordion__item--disabled"
4238
+ if (e.key === "ArrowDown") {
4239
+ e.preventDefault();
4240
+ focusIdx((curr + 1) % enabledIdx.length);
4241
+ } else if (e.key === "ArrowUp") {
4242
+ e.preventDefault();
4243
+ focusIdx((curr - 1 + enabledIdx.length) % enabledIdx.length);
4244
+ } else if (e.key === "Home") {
4245
+ e.preventDefault();
4246
+ focusIdx(0);
4247
+ } else if (e.key === "End") {
4248
+ e.preventDefault();
4249
+ focusIdx(enabledIdx.length - 1);
4250
+ }
4251
+ };
4252
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4253
+ "div",
4254
+ {
4255
+ ...rest,
4256
+ ref,
4257
+ id: baseId,
4258
+ className: cn(
4259
+ "ods-accordion",
4260
+ `ods-accordion--${variant}`,
4261
+ `ods-accordion--${size}`,
4262
+ disabled && "ods-accordion--disabled",
4263
+ className
4264
+ ),
4265
+ children: items.map((item, i) => {
4266
+ const isOpen = valueSet.has(item.id);
4267
+ const itemDisabled = item.disabled || disabled;
4268
+ const triggerId = `${baseId}-trigger-${item.id}`;
4269
+ const panelId = `${baseId}-panel-${item.id}`;
4270
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
4271
+ "div",
4272
+ {
4273
+ className: cn(
4274
+ "ods-accordion__item",
4275
+ isOpen && "ods-accordion__item--open",
4276
+ itemDisabled && "ods-accordion__item--disabled"
4277
+ ),
4278
+ children: [
4279
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
4280
+ "button",
4281
+ {
4282
+ id: triggerId,
4283
+ type: "button",
4284
+ className: "ods-accordion__trigger",
4285
+ "aria-expanded": isOpen,
4286
+ "aria-controls": panelId,
4287
+ disabled: itemDisabled,
4288
+ onClick: () => toggleItem(item.id),
4289
+ onKeyDown: (e) => handleKeyDown(e, i),
4290
+ children: [
4291
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "ods-accordion__icon", "aria-hidden": "true", children: item.icon }),
4292
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "ods-accordion__label-wrap", children: [
4293
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "ods-accordion__label", children: item.label }),
4294
+ item.description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "ods-accordion__description", children: item.description })
4295
+ ] }),
4296
+ item.trailing && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "ods-accordion__trailing", onClick: (e) => e.stopPropagation(), children: item.trailing }),
4297
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4298
+ "span",
4299
+ {
4300
+ className: cn("ods-accordion__chevron", isOpen && "ods-accordion__chevron--open"),
4301
+ "aria-hidden": "true",
4302
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons5.ChevronDownIcon, { size: "sm", "aria-hidden": true })
4303
+ }
4304
+ )
4305
+ ]
4306
+ }
4396
4307
  ),
4397
- children: [
4398
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
4399
- "button",
4400
- {
4401
- id: triggerId,
4402
- type: "button",
4403
- className: "ods-accordion__trigger",
4404
- "aria-expanded": isOpen,
4405
- "aria-controls": panelId,
4406
- disabled: itemDisabled,
4407
- onClick: () => toggleItem(item.id),
4408
- onKeyDown: (e) => handleKeyDown(e, i),
4409
- children: [
4410
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4411
- "span",
4412
- {
4413
- className: "ods-accordion__icon",
4414
- "aria-hidden": "true",
4415
- children: item.icon
4416
- }
4417
- ),
4418
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "ods-accordion__label-wrap", children: [
4419
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "ods-accordion__label", children: item.label }),
4420
- item.description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "ods-accordion__description", children: item.description })
4421
- ] }),
4422
- item.trailing && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4423
- "span",
4424
- {
4425
- className: "ods-accordion__trailing",
4426
- onClick: (e) => e.stopPropagation(),
4427
- children: item.trailing
4428
- }
4429
- ),
4430
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4431
- "span",
4432
- {
4433
- className: cn(
4434
- "ods-accordion__chevron",
4435
- isOpen && "ods-accordion__chevron--open"
4436
- ),
4437
- "aria-hidden": "true",
4438
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons5.ChevronDownIcon, { size: "sm", "aria-hidden": true })
4439
- }
4440
- )
4441
- ]
4442
- }
4443
- ),
4444
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_framer_motion5.AnimatePresence, { initial: false, children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4445
- import_framer_motion5.motion.div,
4446
- {
4447
- role: "region",
4448
- id: panelId,
4449
- "aria-labelledby": triggerId,
4450
- className: "ods-accordion__panel",
4451
- initial: reducedMotion ? false : { height: 0, opacity: 0 },
4452
- animate: reducedMotion ? void 0 : { height: "auto", opacity: 1 },
4453
- exit: reducedMotion ? void 0 : { height: 0, opacity: 0 },
4454
- transition: reducedMotion ? { duration: 0 } : { duration: 0.18 },
4455
- style: { overflow: "hidden" },
4456
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "ods-accordion__content", children: item.content })
4457
- }
4458
- ) })
4459
- ]
4460
- },
4461
- item.id
4462
- );
4463
- })
4464
- }
4465
- );
4466
- }
4467
- );
4308
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_framer_motion5.AnimatePresence, { initial: false, children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4309
+ import_framer_motion5.motion.div,
4310
+ {
4311
+ role: "region",
4312
+ id: panelId,
4313
+ "aria-labelledby": triggerId,
4314
+ className: "ods-accordion__panel",
4315
+ initial: reducedMotion ? false : { height: 0, opacity: 0 },
4316
+ animate: reducedMotion ? void 0 : { height: "auto", opacity: 1 },
4317
+ exit: reducedMotion ? void 0 : { height: 0, opacity: 0 },
4318
+ transition: reducedMotion ? { duration: 0 } : { duration: 0.18 },
4319
+ style: { overflow: "hidden" },
4320
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "ods-accordion__content", children: item.content })
4321
+ }
4322
+ ) })
4323
+ ]
4324
+ },
4325
+ item.id
4326
+ );
4327
+ })
4328
+ }
4329
+ );
4330
+ });
4468
4331
  Accordion.displayName = "Accordion";
4469
4332
 
4470
4333
  // src/marketing/components/FaqSection/FaqSection.tsx
@@ -4715,14 +4578,7 @@ var SIZE_PX = {
4715
4578
  lg: 32,
4716
4579
  xl: 48
4717
4580
  };
4718
- var Spinner = (0, import_react28.forwardRef)(function Spinner2({
4719
- size = "md",
4720
- tone = "accent",
4721
- label = "Loading",
4722
- className,
4723
- style,
4724
- ...rest
4725
- }, ref) {
4581
+ var Spinner = (0, import_react28.forwardRef)(function Spinner2({ size = "md", tone = "accent", label = "Loading", className, style, ...rest }, ref) {
4726
4582
  const px = typeof size === "number" ? size : SIZE_PX[size];
4727
4583
  const isKeyword = typeof size === "string";
4728
4584
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
@@ -5238,88 +5094,86 @@ var import_framer_motion7 = require("framer-motion");
5238
5094
  // src/components/CountUp/CountUp.tsx
5239
5095
  var import_react30 = require("react");
5240
5096
  var import_jsx_runtime31 = require("react/jsx-runtime");
5241
- var easeOutCubic = (t) => 1 - Math.pow(1 - t, 3);
5242
- var CountUp = (0, import_react30.forwardRef)(
5243
- function CountUp2({
5244
- value,
5245
- from = 0,
5246
- duration = 800,
5247
- easing = easeOutCubic,
5248
- decimals = 0,
5249
- formatValue,
5250
- prefix,
5251
- suffix,
5252
- delay = 0,
5253
- disableAnimation = false,
5254
- onComplete,
5255
- className,
5256
- ...rest
5257
- }, ref) {
5258
- const [n, setN] = (0, import_react30.useState)(disableAnimation ? value : from);
5259
- const lastRendered = (0, import_react30.useRef)(disableAnimation ? value : from);
5260
- (0, import_react30.useEffect)(() => {
5261
- const reduced = typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
5262
- if (disableAnimation || reduced) {
5263
- setN(value);
5264
- lastRendered.current = value;
5265
- onComplete?.();
5266
- return;
5267
- }
5268
- const startValue = lastRendered.current;
5269
- const delta = value - startValue;
5270
- if (delta === 0) return;
5271
- let raf = null;
5272
- let timeoutId = null;
5273
- let startTime = null;
5274
- let cancelled = false;
5275
- const tick = (ts) => {
5276
- if (cancelled) return;
5277
- if (startTime === null) startTime = ts;
5278
- const t = Math.min(1, (ts - startTime) / Math.max(1, duration));
5279
- const eased = easing(t);
5280
- const current = startValue + delta * eased;
5281
- setN(current);
5282
- lastRendered.current = current;
5283
- if (t < 1) {
5284
- raf = requestAnimationFrame(tick);
5285
- } else {
5286
- lastRendered.current = value;
5287
- setN(value);
5288
- onComplete?.();
5289
- }
5290
- };
5291
- const start = () => {
5097
+ var easeOutCubic = (t) => 1 - (1 - t) ** 3;
5098
+ var CountUp = (0, import_react30.forwardRef)(function CountUp2({
5099
+ value,
5100
+ from = 0,
5101
+ duration = 800,
5102
+ easing = easeOutCubic,
5103
+ decimals = 0,
5104
+ formatValue,
5105
+ prefix,
5106
+ suffix,
5107
+ delay = 0,
5108
+ disableAnimation = false,
5109
+ onComplete,
5110
+ className,
5111
+ ...rest
5112
+ }, ref) {
5113
+ const [n, setN] = (0, import_react30.useState)(disableAnimation ? value : from);
5114
+ const lastRendered = (0, import_react30.useRef)(disableAnimation ? value : from);
5115
+ (0, import_react30.useEffect)(() => {
5116
+ const reduced = typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
5117
+ if (disableAnimation || reduced) {
5118
+ setN(value);
5119
+ lastRendered.current = value;
5120
+ onComplete?.();
5121
+ return;
5122
+ }
5123
+ const startValue = lastRendered.current;
5124
+ const delta = value - startValue;
5125
+ if (delta === 0) return;
5126
+ let raf = null;
5127
+ let timeoutId = null;
5128
+ let startTime = null;
5129
+ let cancelled = false;
5130
+ const tick = (ts) => {
5131
+ if (cancelled) return;
5132
+ if (startTime === null) startTime = ts;
5133
+ const t = Math.min(1, (ts - startTime) / Math.max(1, duration));
5134
+ const eased = easing(t);
5135
+ const current = startValue + delta * eased;
5136
+ setN(current);
5137
+ lastRendered.current = current;
5138
+ if (t < 1) {
5292
5139
  raf = requestAnimationFrame(tick);
5293
- };
5294
- if (delay > 0) {
5295
- timeoutId = window.setTimeout(start, delay);
5296
5140
  } else {
5297
- start();
5298
- }
5299
- return () => {
5300
- cancelled = true;
5301
- if (raf !== null) cancelAnimationFrame(raf);
5302
- if (timeoutId !== null) window.clearTimeout(timeoutId);
5303
- };
5304
- }, [value, duration, delay, disableAnimation]);
5305
- const display = formatValue ? formatValue(n) : n.toFixed(decimals);
5306
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5307
- "span",
5308
- {
5309
- ...rest,
5310
- ref,
5311
- className: cn("ods-count-up", className),
5312
- "aria-live": "polite",
5313
- "aria-atomic": "true",
5314
- children: [
5315
- prefix,
5316
- display,
5317
- suffix
5318
- ]
5141
+ lastRendered.current = value;
5142
+ setN(value);
5143
+ onComplete?.();
5319
5144
  }
5320
- );
5321
- }
5322
- );
5145
+ };
5146
+ const start = () => {
5147
+ raf = requestAnimationFrame(tick);
5148
+ };
5149
+ if (delay > 0) {
5150
+ timeoutId = window.setTimeout(start, delay);
5151
+ } else {
5152
+ start();
5153
+ }
5154
+ return () => {
5155
+ cancelled = true;
5156
+ if (raf !== null) cancelAnimationFrame(raf);
5157
+ if (timeoutId !== null) window.clearTimeout(timeoutId);
5158
+ };
5159
+ }, [value, duration, delay, disableAnimation]);
5160
+ const display = formatValue ? formatValue(n) : n.toFixed(decimals);
5161
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5162
+ "span",
5163
+ {
5164
+ ...rest,
5165
+ ref,
5166
+ className: cn("ods-count-up", className),
5167
+ "aria-live": "polite",
5168
+ "aria-atomic": "true",
5169
+ children: [
5170
+ prefix,
5171
+ display,
5172
+ suffix
5173
+ ]
5174
+ }
5175
+ );
5176
+ });
5323
5177
  CountUp.displayName = "CountUp";
5324
5178
 
5325
5179
  // src/marketing/components/StatBand/StatBand.tsx