@apipass/design-system 8.3.0 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/dist/lib/embedded-styles.js +2 -2
  2. package/dist/lib/lib.index.cjs +1 -1
  3. package/dist/lib/lib.index.js +798 -796
  4. package/dist/lib/lib.index.js.map +1 -1
  5. package/dist/lib/style.css +1 -1
  6. package/dist/lib/ui/components/ConfirmDialog/ConfirmDialog.cjs +1 -1
  7. package/dist/lib/ui/components/DataTable/DataTable.cjs +1 -1
  8. package/dist/lib/ui/components/Widget/Widget.cjs +1 -1
  9. package/dist/lib/ui/components/WidgetGrid/WidgetGrid.cjs +1 -1
  10. package/dist/lib/ui/components/charts/BarChart/BarChart.cjs +1 -1
  11. package/dist/lib/ui/components/charts/ChartColorPicker/ChartColorPicker.cjs +1 -1
  12. package/dist/lib/ui/components/charts/ChartLegend/use-chart-legend.cjs +1 -1
  13. package/dist/lib/ui/components/charts/PieChart/PieChart.cjs +1 -1
  14. package/dist/lib/ui/components/charts/TimeSeriesChart/TimeSeriesChart.cjs +1 -1
  15. package/dist/lib/ui/components/charts/TopList/TopList.cjs +1 -1
  16. package/dist/lib/ui/primitives/Avatar/Avatar.js +6 -6
  17. package/dist/lib/ui/primitives/BrandLoader/BrandLoader.cjs +1 -1
  18. package/dist/lib/ui/primitives/Button/Button.cjs.map +1 -1
  19. package/dist/lib/ui/primitives/Button/Button.js +6 -6
  20. package/dist/lib/ui/primitives/Button/Button.js.map +1 -1
  21. package/dist/lib/ui/primitives/CodeBlock/CodeBlock.cjs +1 -1
  22. package/dist/lib/ui/primitives/CodeEditor/CodeEditor.cjs +1 -1
  23. package/dist/lib/ui/primitives/ComboBox/ComboBox.cjs +1 -1
  24. package/dist/lib/ui/primitives/ComboBox/ComboBox.cjs.map +1 -1
  25. package/dist/lib/ui/primitives/ComboBox/ComboBox.js +40 -56
  26. package/dist/lib/ui/primitives/ComboBox/ComboBox.js.map +1 -1
  27. package/dist/lib/ui/primitives/ComboBox/MultiComboBox.cjs +2 -0
  28. package/dist/lib/ui/primitives/ComboBox/MultiComboBox.cjs.map +1 -0
  29. package/dist/lib/ui/primitives/ComboBox/MultiComboBox.js +179 -0
  30. package/dist/lib/ui/primitives/ComboBox/MultiComboBox.js.map +1 -0
  31. package/dist/lib/ui/primitives/ComboBox/comboBoxFocus.cjs +2 -0
  32. package/dist/lib/ui/primitives/ComboBox/comboBoxFocus.cjs.map +1 -0
  33. package/dist/lib/ui/primitives/ComboBox/comboBoxFocus.js +30 -0
  34. package/dist/lib/ui/primitives/ComboBox/comboBoxFocus.js.map +1 -0
  35. package/dist/lib/ui/primitives/DateRangePicker/DateRangePicker.cjs +1 -1
  36. package/dist/lib/ui/primitives/FileUpload/FileUpload.cjs +1 -1
  37. package/dist/lib/ui/primitives/FileUpload/FileUpload.js +24 -24
  38. package/dist/lib/ui/primitives/Image/Image.cjs +1 -1
  39. package/dist/lib/ui/primitives/Input/Input.cjs +1 -1
  40. package/dist/lib/ui/primitives/Input/Input.js +2 -2
  41. package/dist/lib/ui/primitives/JsonViewer/JsonEditor.cjs +1 -1
  42. package/dist/lib/ui/primitives/Link/Link.cjs +1 -1
  43. package/dist/lib/ui/primitives/Link/Link.js +3 -3
  44. package/dist/lib/ui/primitives/Menu/Menu.cjs +1 -1
  45. package/dist/lib/ui/primitives/Menu/Menu.js +28 -28
  46. package/dist/lib/ui/primitives/Search/Search.js +8 -8
  47. package/dist/lib/ui/primitives/Select/MultiSelect.cjs +1 -1
  48. package/dist/lib/ui/primitives/Select/MultiSelect.js +17 -17
  49. package/dist/lib/ui/primitives/Select/MultiSelect.js.map +1 -1
  50. package/dist/lib/ui/primitives/Tag/Tag.cjs +1 -1
  51. package/dist/lib/ui/primitives/Tag/Tag.cjs.map +1 -1
  52. package/dist/lib/ui/primitives/Tag/Tag.js +47 -38
  53. package/dist/lib/ui/primitives/Tag/Tag.js.map +1 -1
  54. package/dist/lib/ui/primitives/Textarea/Textarea.cjs +1 -1
  55. package/dist/lib/ui/primitives/Tooltip/Tooltip.cjs +1 -1
  56. package/dist/lib/ui/primitives/Tooltip/Tooltip.cjs.map +1 -1
  57. package/dist/lib/ui/primitives/Tooltip/Tooltip.js +29 -29
  58. package/dist/lib/ui/primitives/Tooltip/Tooltip.js.map +1 -1
  59. package/dist/lib/ui/utils/AnchorOrButton.cjs +1 -1
  60. package/dist/lib/ui/utils/AnchorOrButton.cjs.map +1 -1
  61. package/dist/lib/ui/utils/AnchorOrButton.js +10 -12
  62. package/dist/lib/ui/utils/AnchorOrButton.js.map +1 -1
  63. package/dist/lib/vendor/@monaco-editor/react/dist/index.cjs +1 -1
  64. package/dist/lib/vendor/@monaco-editor/react/dist/index.cjs.map +1 -1
  65. package/dist/lib/vendor/@monaco-editor/react/dist/index.js +41 -41
  66. package/dist/lib/vendor/react-aria/dist/private/interactions/createEventHandler.cjs +2 -0
  67. package/dist/lib/vendor/react-aria/dist/private/interactions/createEventHandler.cjs.map +1 -0
  68. package/dist/lib/vendor/react-aria/dist/private/interactions/createEventHandler.js +28 -0
  69. package/dist/lib/vendor/react-aria/dist/private/interactions/createEventHandler.js.map +1 -0
  70. package/dist/lib/vendor/react-aria/dist/private/interactions/createKeyboardShortcutHandler.cjs +2 -0
  71. package/dist/lib/vendor/react-aria/dist/private/interactions/createKeyboardShortcutHandler.cjs.map +1 -0
  72. package/dist/lib/vendor/react-aria/dist/private/interactions/createKeyboardShortcutHandler.js +93 -0
  73. package/dist/lib/vendor/react-aria/dist/private/interactions/createKeyboardShortcutHandler.js.map +1 -0
  74. package/dist/lib/vendor/react-aria/dist/private/interactions/focusSafely.cjs +2 -0
  75. package/dist/lib/vendor/react-aria/dist/private/interactions/focusSafely.cjs.map +1 -0
  76. package/dist/lib/vendor/react-aria/dist/private/interactions/focusSafely.js +20 -0
  77. package/dist/lib/vendor/react-aria/dist/private/interactions/focusSafely.js.map +1 -0
  78. package/dist/lib/vendor/react-aria/dist/private/interactions/useFocus.cjs +2 -0
  79. package/dist/lib/vendor/react-aria/dist/private/interactions/useFocus.cjs.map +1 -0
  80. package/dist/lib/vendor/react-aria/dist/private/interactions/useFocus.js +32 -0
  81. package/dist/lib/vendor/react-aria/dist/private/interactions/useFocus.js.map +1 -0
  82. package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusVisible.cjs +2 -0
  83. package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusVisible.cjs.map +1 -0
  84. package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusVisible.js +94 -0
  85. package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusVisible.js.map +1 -0
  86. package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusable.cjs +2 -0
  87. package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusable.cjs.map +1 -0
  88. package/dist/lib/vendor/{@react-aria/interactions/dist → react-aria/dist/private/interactions}/useFocusable.js +10 -10
  89. package/dist/lib/vendor/react-aria/dist/private/interactions/useFocusable.js.map +1 -0
  90. package/dist/lib/vendor/react-aria/dist/private/interactions/useHover.cjs +2 -0
  91. package/dist/lib/vendor/react-aria/dist/private/interactions/useHover.cjs.map +1 -0
  92. package/dist/lib/vendor/react-aria/dist/private/interactions/useHover.js +82 -0
  93. package/dist/lib/vendor/react-aria/dist/private/interactions/useHover.js.map +1 -0
  94. package/dist/lib/vendor/react-aria/dist/private/interactions/useKeyboard.cjs +2 -0
  95. package/dist/lib/vendor/react-aria/dist/private/interactions/useKeyboard.cjs.map +1 -0
  96. package/dist/lib/vendor/react-aria/dist/private/interactions/useKeyboard.js +44 -0
  97. package/dist/lib/vendor/react-aria/dist/private/interactions/useKeyboard.js.map +1 -0
  98. package/dist/lib/vendor/react-aria/dist/private/interactions/utils.cjs +2 -0
  99. package/dist/lib/vendor/react-aria/dist/private/interactions/utils.cjs.map +1 -0
  100. package/dist/lib/vendor/react-aria/dist/private/interactions/utils.js +59 -0
  101. package/dist/lib/vendor/react-aria/dist/private/interactions/utils.js.map +1 -0
  102. package/dist/lib/vendor/react-aria/dist/private/ssr/SSRProvider.cjs +2 -0
  103. package/dist/lib/vendor/react-aria/dist/private/ssr/SSRProvider.cjs.map +1 -0
  104. package/dist/lib/vendor/react-aria/dist/private/ssr/SSRProvider.js +52 -0
  105. package/dist/lib/vendor/react-aria/dist/private/ssr/SSRProvider.js.map +1 -0
  106. package/dist/lib/vendor/react-aria/dist/private/tooltip/useTooltipTrigger.cjs +2 -0
  107. package/dist/lib/vendor/react-aria/dist/private/tooltip/useTooltipTrigger.cjs.map +1 -0
  108. package/dist/lib/vendor/react-aria/dist/private/tooltip/useTooltipTrigger.js +62 -0
  109. package/dist/lib/vendor/react-aria/dist/private/tooltip/useTooltipTrigger.js.map +1 -0
  110. package/dist/lib/vendor/react-aria/dist/private/utils/chain.cjs +2 -0
  111. package/dist/lib/vendor/react-aria/dist/private/utils/chain.cjs.map +1 -0
  112. package/dist/lib/vendor/react-aria/dist/private/utils/chain.js +9 -0
  113. package/dist/lib/vendor/react-aria/dist/private/utils/chain.js.map +1 -0
  114. package/dist/lib/vendor/react-aria/dist/private/utils/domHelpers.cjs +2 -0
  115. package/dist/lib/vendor/react-aria/dist/private/utils/domHelpers.cjs.map +1 -0
  116. package/dist/lib/vendor/react-aria/dist/private/utils/domHelpers.js +36 -0
  117. package/dist/lib/vendor/react-aria/dist/private/utils/domHelpers.js.map +1 -0
  118. package/dist/lib/vendor/react-aria/dist/private/utils/focusWithoutScrolling.cjs +2 -0
  119. package/dist/lib/vendor/react-aria/dist/private/utils/focusWithoutScrolling.cjs.map +1 -0
  120. package/dist/lib/vendor/react-aria/dist/private/utils/focusWithoutScrolling.js +9 -0
  121. package/dist/lib/vendor/react-aria/dist/private/utils/focusWithoutScrolling.js.map +1 -0
  122. package/dist/lib/vendor/react-aria/dist/private/utils/isVirtualEvent.cjs.map +1 -0
  123. package/dist/lib/vendor/react-aria/dist/private/utils/isVirtualEvent.js.map +1 -0
  124. package/dist/lib/vendor/react-aria/dist/private/utils/mergeProps.cjs +2 -0
  125. package/dist/lib/vendor/react-aria/dist/private/utils/mergeProps.cjs.map +1 -0
  126. package/dist/lib/vendor/react-aria/dist/private/utils/mergeProps.js +24 -0
  127. package/dist/lib/vendor/react-aria/dist/private/utils/mergeProps.js.map +1 -0
  128. package/dist/lib/vendor/react-aria/dist/private/utils/mergeRefs.cjs +2 -0
  129. package/dist/lib/vendor/react-aria/dist/private/utils/mergeRefs.cjs.map +1 -0
  130. package/dist/lib/vendor/react-aria/dist/private/utils/mergeRefs.js +22 -0
  131. package/dist/lib/vendor/react-aria/dist/private/utils/mergeRefs.js.map +1 -0
  132. package/dist/lib/vendor/react-aria/dist/private/utils/openLink.cjs +2 -0
  133. package/dist/lib/vendor/react-aria/dist/private/utils/openLink.cjs.map +1 -0
  134. package/dist/lib/vendor/react-aria/dist/private/utils/openLink.js +26 -0
  135. package/dist/lib/vendor/react-aria/dist/private/utils/openLink.js.map +1 -0
  136. package/dist/lib/vendor/react-aria/dist/private/utils/platform.cjs +2 -0
  137. package/dist/lib/vendor/react-aria/dist/private/utils/platform.cjs.map +1 -0
  138. package/dist/lib/vendor/react-aria/dist/private/utils/platform.js +40 -0
  139. package/dist/lib/vendor/react-aria/dist/private/utils/platform.js.map +1 -0
  140. package/dist/lib/vendor/react-aria/dist/private/utils/runAfterTransition.cjs +2 -0
  141. package/dist/lib/vendor/react-aria/dist/private/utils/runAfterTransition.cjs.map +1 -0
  142. package/dist/lib/vendor/react-aria/dist/private/utils/runAfterTransition.js +43 -0
  143. package/dist/lib/vendor/react-aria/dist/private/utils/runAfterTransition.js.map +1 -0
  144. package/dist/lib/vendor/react-aria/dist/private/utils/shadowdom/DOMFunctions.cjs +2 -0
  145. package/dist/lib/vendor/react-aria/dist/private/utils/shadowdom/DOMFunctions.cjs.map +1 -0
  146. package/dist/lib/vendor/react-aria/dist/private/utils/shadowdom/DOMFunctions.js +33 -0
  147. package/dist/lib/vendor/react-aria/dist/private/utils/shadowdom/DOMFunctions.js.map +1 -0
  148. package/dist/lib/vendor/react-aria/dist/private/utils/useGlobalListeners.cjs +2 -0
  149. package/dist/lib/vendor/react-aria/dist/private/utils/useGlobalListeners.cjs.map +1 -0
  150. package/dist/lib/vendor/react-aria/dist/private/utils/useGlobalListeners.js +35 -0
  151. package/dist/lib/vendor/react-aria/dist/private/utils/useGlobalListeners.js.map +1 -0
  152. package/dist/lib/vendor/react-aria/dist/private/utils/useId.cjs +2 -0
  153. package/dist/lib/vendor/react-aria/dist/private/utils/useId.cjs.map +1 -0
  154. package/dist/lib/vendor/react-aria/dist/private/utils/useId.js +44 -0
  155. package/dist/lib/vendor/react-aria/dist/private/utils/useId.js.map +1 -0
  156. package/dist/lib/vendor/react-aria/dist/private/utils/useLayoutEffect.cjs.map +1 -0
  157. package/dist/lib/vendor/react-aria/dist/private/utils/useLayoutEffect.js.map +1 -0
  158. package/dist/lib/vendor/{@react-aria/utils/dist → react-aria/dist/private/utils}/useSyncRef.cjs +1 -1
  159. package/dist/lib/vendor/react-aria/dist/private/utils/useSyncRef.cjs.map +1 -0
  160. package/dist/lib/vendor/react-aria/dist/private/utils/useSyncRef.js +13 -0
  161. package/dist/lib/vendor/react-aria/dist/private/utils/useSyncRef.js.map +1 -0
  162. package/dist/lib/vendor/react-draggable/build/cjs/Draggable.cjs +1 -1
  163. package/dist/lib/vendor/react-draggable/build/cjs/Draggable.js +8 -8
  164. package/dist/lib/vendor/react-grid-layout/build/GridItem.cjs +1 -1
  165. package/dist/lib/vendor/react-grid-layout/build/GridItem.js +7 -7
  166. package/dist/lib/vendor/react-grid-layout/build/ReactGridLayout.cjs +1 -1
  167. package/dist/lib/vendor/react-grid-layout/build/ReactGridLayout.js +7 -7
  168. package/dist/lib/vendor/react-grid-layout/build/ReactGridLayout.js.map +1 -1
  169. package/dist/lib/vendor/react-grid-layout/build/ResponsiveReactGridLayout.cjs +1 -1
  170. package/dist/lib/vendor/react-grid-layout/build/ResponsiveReactGridLayout.js +10 -10
  171. package/dist/lib/vendor/react-grid-layout/build/ResponsiveReactGridLayout.js.map +1 -1
  172. package/dist/lib/vendor/react-grid-layout/build/components/WidthProvider.cjs +1 -1
  173. package/dist/lib/vendor/react-grid-layout/build/components/WidthProvider.js +8 -8
  174. package/dist/lib/vendor/react-grid-layout/build/components/WidthProvider.js.map +1 -1
  175. package/dist/lib/vendor/react-grid-layout/build/utils.cjs +1 -1
  176. package/dist/lib/vendor/react-grid-layout/build/utils.js +18 -18
  177. package/dist/lib/vendor/react-resizable/build/Resizable.cjs +1 -1
  178. package/dist/lib/vendor/react-resizable/build/Resizable.js +61 -61
  179. package/dist/lib/vendor/react-resizable/build/Resizable.js.map +1 -1
  180. package/dist/lib/vendor/react-resizable/build/ResizableBox.cjs +1 -1
  181. package/dist/lib/vendor/react-resizable/build/ResizableBox.js +7 -7
  182. package/dist/lib/vendor/react-resizable/build/ResizableBox.js.map +1 -1
  183. package/dist/lib/vendor/react-resizable/build/utils.cjs +1 -1
  184. package/dist/lib/vendor/react-resizable/build/utils.cjs.map +1 -1
  185. package/dist/lib/vendor/react-stately/dist/private/flags/flags.cjs +2 -0
  186. package/dist/lib/vendor/react-stately/dist/private/flags/flags.cjs.map +1 -0
  187. package/dist/lib/vendor/react-stately/dist/private/flags/flags.js +8 -0
  188. package/dist/lib/vendor/react-stately/dist/private/flags/flags.js.map +1 -0
  189. package/dist/lib/vendor/react-stately/dist/private/overlays/useOverlayTriggerState.cjs +2 -0
  190. package/dist/lib/vendor/react-stately/dist/private/overlays/useOverlayTriggerState.cjs.map +1 -0
  191. package/dist/lib/vendor/react-stately/dist/private/overlays/useOverlayTriggerState.js +32 -0
  192. package/dist/lib/vendor/react-stately/dist/private/overlays/useOverlayTriggerState.js.map +1 -0
  193. package/dist/lib/vendor/react-stately/dist/private/tooltip/useTooltipTriggerState.cjs +2 -0
  194. package/dist/lib/vendor/react-stately/dist/private/tooltip/useTooltipTriggerState.cjs.map +1 -0
  195. package/dist/lib/vendor/react-stately/dist/private/tooltip/useTooltipTriggerState.js +43 -0
  196. package/dist/lib/vendor/react-stately/dist/private/tooltip/useTooltipTriggerState.js.map +1 -0
  197. package/dist/lib/vendor/react-stately/dist/private/utils/useControlledState.cjs +2 -0
  198. package/dist/lib/vendor/react-stately/dist/private/utils/useControlledState.cjs.map +1 -0
  199. package/dist/lib/vendor/react-stately/dist/private/utils/useControlledState.js +29 -0
  200. package/dist/lib/vendor/react-stately/dist/private/utils/useControlledState.js.map +1 -0
  201. package/dist/lib/vendor/react-toastify/dist/index.cjs +1 -1
  202. package/dist/lib/vendor/react-toastify/dist/index.js +10 -10
  203. package/dist/types/ui/primitives/ComboBox/MultiComboBox.d.ts +28 -0
  204. package/dist/types/ui/primitives/ComboBox/comboBoxFocus.d.ts +3 -0
  205. package/dist/types/ui/primitives/Tag/Tag.d.ts +2 -1
  206. package/dist/types/ui/primitives/index.d.ts +1 -0
  207. package/dist/types/ui/utils/AnchorOrButton.d.ts +3 -1
  208. package/package.json +3 -3
  209. package/dist/lib/vendor/@react-aria/interactions/dist/createEventHandler.cjs +0 -2
  210. package/dist/lib/vendor/@react-aria/interactions/dist/createEventHandler.cjs.map +0 -1
  211. package/dist/lib/vendor/@react-aria/interactions/dist/createEventHandler.js +0 -29
  212. package/dist/lib/vendor/@react-aria/interactions/dist/createEventHandler.js.map +0 -1
  213. package/dist/lib/vendor/@react-aria/interactions/dist/focusSafely.cjs +0 -2
  214. package/dist/lib/vendor/@react-aria/interactions/dist/focusSafely.cjs.map +0 -1
  215. package/dist/lib/vendor/@react-aria/interactions/dist/focusSafely.js +0 -18
  216. package/dist/lib/vendor/@react-aria/interactions/dist/focusSafely.js.map +0 -1
  217. package/dist/lib/vendor/@react-aria/interactions/dist/useFocus.cjs +0 -2
  218. package/dist/lib/vendor/@react-aria/interactions/dist/useFocus.cjs.map +0 -1
  219. package/dist/lib/vendor/@react-aria/interactions/dist/useFocus.js +0 -31
  220. package/dist/lib/vendor/@react-aria/interactions/dist/useFocus.js.map +0 -1
  221. package/dist/lib/vendor/@react-aria/interactions/dist/useFocusVisible.cjs +0 -2
  222. package/dist/lib/vendor/@react-aria/interactions/dist/useFocusVisible.cjs.map +0 -1
  223. package/dist/lib/vendor/@react-aria/interactions/dist/useFocusVisible.js +0 -66
  224. package/dist/lib/vendor/@react-aria/interactions/dist/useFocusVisible.js.map +0 -1
  225. package/dist/lib/vendor/@react-aria/interactions/dist/useFocusable.cjs +0 -2
  226. package/dist/lib/vendor/@react-aria/interactions/dist/useFocusable.cjs.map +0 -1
  227. package/dist/lib/vendor/@react-aria/interactions/dist/useFocusable.js.map +0 -1
  228. package/dist/lib/vendor/@react-aria/interactions/dist/useHover.cjs +0 -2
  229. package/dist/lib/vendor/@react-aria/interactions/dist/useHover.cjs.map +0 -1
  230. package/dist/lib/vendor/@react-aria/interactions/dist/useHover.js +0 -81
  231. package/dist/lib/vendor/@react-aria/interactions/dist/useHover.js.map +0 -1
  232. package/dist/lib/vendor/@react-aria/interactions/dist/useKeyboard.cjs +0 -2
  233. package/dist/lib/vendor/@react-aria/interactions/dist/useKeyboard.cjs.map +0 -1
  234. package/dist/lib/vendor/@react-aria/interactions/dist/useKeyboard.js +0 -13
  235. package/dist/lib/vendor/@react-aria/interactions/dist/useKeyboard.js.map +0 -1
  236. package/dist/lib/vendor/@react-aria/interactions/dist/utils.cjs +0 -2
  237. package/dist/lib/vendor/@react-aria/interactions/dist/utils.cjs.map +0 -1
  238. package/dist/lib/vendor/@react-aria/interactions/dist/utils.js +0 -64
  239. package/dist/lib/vendor/@react-aria/interactions/dist/utils.js.map +0 -1
  240. package/dist/lib/vendor/@react-aria/ssr/dist/SSRProvider.cjs +0 -2
  241. package/dist/lib/vendor/@react-aria/ssr/dist/SSRProvider.cjs.map +0 -1
  242. package/dist/lib/vendor/@react-aria/ssr/dist/SSRProvider.js +0 -49
  243. package/dist/lib/vendor/@react-aria/ssr/dist/SSRProvider.js.map +0 -1
  244. package/dist/lib/vendor/@react-aria/tooltip/dist/useTooltipTrigger.cjs +0 -2
  245. package/dist/lib/vendor/@react-aria/tooltip/dist/useTooltipTrigger.cjs.map +0 -1
  246. package/dist/lib/vendor/@react-aria/tooltip/dist/useTooltipTrigger.js +0 -61
  247. package/dist/lib/vendor/@react-aria/tooltip/dist/useTooltipTrigger.js.map +0 -1
  248. package/dist/lib/vendor/@react-aria/utils/dist/DOMFunctions.cjs +0 -2
  249. package/dist/lib/vendor/@react-aria/utils/dist/DOMFunctions.cjs.map +0 -1
  250. package/dist/lib/vendor/@react-aria/utils/dist/DOMFunctions.js +0 -28
  251. package/dist/lib/vendor/@react-aria/utils/dist/DOMFunctions.js.map +0 -1
  252. package/dist/lib/vendor/@react-aria/utils/dist/chain.cjs +0 -2
  253. package/dist/lib/vendor/@react-aria/utils/dist/chain.cjs.map +0 -1
  254. package/dist/lib/vendor/@react-aria/utils/dist/chain.js +0 -9
  255. package/dist/lib/vendor/@react-aria/utils/dist/chain.js.map +0 -1
  256. package/dist/lib/vendor/@react-aria/utils/dist/domHelpers.cjs +0 -2
  257. package/dist/lib/vendor/@react-aria/utils/dist/domHelpers.cjs.map +0 -1
  258. package/dist/lib/vendor/@react-aria/utils/dist/domHelpers.js +0 -16
  259. package/dist/lib/vendor/@react-aria/utils/dist/domHelpers.js.map +0 -1
  260. package/dist/lib/vendor/@react-aria/utils/dist/focusWithoutScrolling.cjs +0 -2
  261. package/dist/lib/vendor/@react-aria/utils/dist/focusWithoutScrolling.cjs.map +0 -1
  262. package/dist/lib/vendor/@react-aria/utils/dist/focusWithoutScrolling.js +0 -46
  263. package/dist/lib/vendor/@react-aria/utils/dist/focusWithoutScrolling.js.map +0 -1
  264. package/dist/lib/vendor/@react-aria/utils/dist/isVirtualEvent.cjs.map +0 -1
  265. package/dist/lib/vendor/@react-aria/utils/dist/isVirtualEvent.js.map +0 -1
  266. package/dist/lib/vendor/@react-aria/utils/dist/mergeProps.cjs +0 -2
  267. package/dist/lib/vendor/@react-aria/utils/dist/mergeProps.cjs.map +0 -1
  268. package/dist/lib/vendor/@react-aria/utils/dist/mergeProps.js +0 -23
  269. package/dist/lib/vendor/@react-aria/utils/dist/mergeProps.js.map +0 -1
  270. package/dist/lib/vendor/@react-aria/utils/dist/platform.cjs +0 -2
  271. package/dist/lib/vendor/@react-aria/utils/dist/platform.cjs.map +0 -1
  272. package/dist/lib/vendor/@react-aria/utils/dist/platform.js +0 -24
  273. package/dist/lib/vendor/@react-aria/utils/dist/platform.js.map +0 -1
  274. package/dist/lib/vendor/@react-aria/utils/dist/runAfterTransition.cjs +0 -2
  275. package/dist/lib/vendor/@react-aria/utils/dist/runAfterTransition.cjs.map +0 -1
  276. package/dist/lib/vendor/@react-aria/utils/dist/runAfterTransition.js +0 -36
  277. package/dist/lib/vendor/@react-aria/utils/dist/runAfterTransition.js.map +0 -1
  278. package/dist/lib/vendor/@react-aria/utils/dist/useEffectEvent.cjs +0 -2
  279. package/dist/lib/vendor/@react-aria/utils/dist/useEffectEvent.cjs.map +0 -1
  280. package/dist/lib/vendor/@react-aria/utils/dist/useEffectEvent.js +0 -19
  281. package/dist/lib/vendor/@react-aria/utils/dist/useEffectEvent.js.map +0 -1
  282. package/dist/lib/vendor/@react-aria/utils/dist/useGlobalListeners.cjs +0 -2
  283. package/dist/lib/vendor/@react-aria/utils/dist/useGlobalListeners.cjs.map +0 -1
  284. package/dist/lib/vendor/@react-aria/utils/dist/useGlobalListeners.js +0 -35
  285. package/dist/lib/vendor/@react-aria/utils/dist/useGlobalListeners.js.map +0 -1
  286. package/dist/lib/vendor/@react-aria/utils/dist/useId.cjs +0 -2
  287. package/dist/lib/vendor/@react-aria/utils/dist/useId.cjs.map +0 -1
  288. package/dist/lib/vendor/@react-aria/utils/dist/useId.js +0 -43
  289. package/dist/lib/vendor/@react-aria/utils/dist/useId.js.map +0 -1
  290. package/dist/lib/vendor/@react-aria/utils/dist/useLayoutEffect.cjs.map +0 -1
  291. package/dist/lib/vendor/@react-aria/utils/dist/useLayoutEffect.js.map +0 -1
  292. package/dist/lib/vendor/@react-aria/utils/dist/useSyncRef.cjs.map +0 -1
  293. package/dist/lib/vendor/@react-aria/utils/dist/useSyncRef.js +0 -13
  294. package/dist/lib/vendor/@react-aria/utils/dist/useSyncRef.js.map +0 -1
  295. package/dist/lib/vendor/@react-stately/flags/dist/import.cjs +0 -2
  296. package/dist/lib/vendor/@react-stately/flags/dist/import.cjs.map +0 -1
  297. package/dist/lib/vendor/@react-stately/flags/dist/import.js +0 -8
  298. package/dist/lib/vendor/@react-stately/flags/dist/import.js.map +0 -1
  299. package/dist/lib/vendor/@react-stately/overlays/dist/useOverlayTriggerState.cjs +0 -2
  300. package/dist/lib/vendor/@react-stately/overlays/dist/useOverlayTriggerState.cjs.map +0 -1
  301. package/dist/lib/vendor/@react-stately/overlays/dist/useOverlayTriggerState.js +0 -30
  302. package/dist/lib/vendor/@react-stately/overlays/dist/useOverlayTriggerState.js.map +0 -1
  303. package/dist/lib/vendor/@react-stately/tooltip/dist/useTooltipTriggerState.cjs +0 -2
  304. package/dist/lib/vendor/@react-stately/tooltip/dist/useTooltipTriggerState.cjs.map +0 -1
  305. package/dist/lib/vendor/@react-stately/tooltip/dist/useTooltipTriggerState.js +0 -42
  306. package/dist/lib/vendor/@react-stately/tooltip/dist/useTooltipTriggerState.js.map +0 -1
  307. package/dist/lib/vendor/@react-stately/utils/dist/useControlledState.cjs +0 -2
  308. package/dist/lib/vendor/@react-stately/utils/dist/useControlledState.cjs.map +0 -1
  309. package/dist/lib/vendor/@react-stately/utils/dist/useControlledState.js +0 -30
  310. package/dist/lib/vendor/@react-stately/utils/dist/useControlledState.js.map +0 -1
  311. /package/dist/lib/vendor/{@react-aria/utils/dist → react-aria/dist/private/utils}/isVirtualEvent.cjs +0 -0
  312. /package/dist/lib/vendor/{@react-aria/utils/dist → react-aria/dist/private/utils}/isVirtualEvent.js +0 -0
  313. /package/dist/lib/vendor/{@react-aria/utils/dist → react-aria/dist/private/utils}/useLayoutEffect.cjs +0 -0
  314. /package/dist/lib/vendor/{@react-aria/utils/dist → react-aria/dist/private/utils}/useLayoutEffect.js +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("react");;/* empty css */const r=require("../../primitives/Dialog/Dialog.cjs"),C=require("../../primitives/Input/Input.cjs"),x=require("../../layout/Flex/Flex.cjs"),l=require("../../primitives/Button/Button.cjs");function P(t){return t.isOpen?e.jsx(v,{...t}):null}function v({title:t,message:u,confirmValue:o,confirmValueLabel:j,confirmLabel:c="Confirm",cancelLabel:m="Cancel",isDanger:p=!1,isLoading:i=!1,onConfirm:h,onClose:d}){const[g,D]=y.useState(""),s=o?g===o:!0;function a(){!s||i||h()}function f(){i||d()}return e.jsx(r.DialogModal,{isOpen:!0,onOpenChange:n=>!n&&f(),children:e.jsxs(r.Dialog,{children:[e.jsxs(x.Flex,{direction:"row",alignPrimary:"space-between",alignSecondary:"center",children:[e.jsx(r.DialogTitle,{children:t}),e.jsx(r.DialogClose,{onPress:f})]}),e.jsxs(r.DialogBody,{children:[u&&e.jsx("p",{className:"confirm-dialog-message",dangerouslySetInnerHTML:{__html:u}}),o&&e.jsx(C.InputField,{label:j,value:g,onChange:D,autoFocus:!0,onKeyDown:n=>{n.continuePropagation(),n.key==="Enter"&&!n.repeat&&!n.nativeEvent.isComposing&&a()},isRequired:!0,validationBehavior:"aria"})]}),e.jsxs(x.Flex,{direction:"row",gap:"200",alignPrimary:"end",className:"confirm-dialog-footer",children:[e.jsx(l.Button,{variant:"neutral",onPress:d,isDisabled:i,children:m}),p?e.jsx(l.ButtonDanger,{variant:"danger-primary",onPress:a,isDisabled:!s,isPending:i,children:c}):e.jsx(l.Button,{variant:"primary",onPress:a,isDisabled:!s,isPending:i,children:c})]})]})})}exports.ConfirmDialog=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("react");;/* empty css */const i=require("../../primitives/Dialog/Dialog.cjs"),C=require("../../primitives/Input/Input.cjs"),x=require("../../layout/Flex/Flex.cjs"),l=require("../../primitives/Button/Button.cjs");function P(t){return t.isOpen?e.jsx(v,{...t}):null}function v({title:t,message:u,confirmValue:o,confirmValueLabel:j,confirmLabel:c="Confirm",cancelLabel:m="Cancel",isDanger:p=!1,isLoading:r=!1,onConfirm:h,onClose:d}){const[g,D]=y.useState(""),s=o?g===o:!0;function a(){!s||r||h()}function f(){r||d()}return e.jsx(i.DialogModal,{isOpen:!0,onOpenChange:n=>!n&&f(),children:e.jsxs(i.Dialog,{children:[e.jsxs(x.Flex,{direction:"row",alignPrimary:"space-between",alignSecondary:"center",children:[e.jsx(i.DialogTitle,{children:t}),e.jsx(i.DialogClose,{onPress:f})]}),e.jsxs(i.DialogBody,{children:[u&&e.jsx("p",{className:"confirm-dialog-message",dangerouslySetInnerHTML:{__html:u}}),o&&e.jsx(C.InputField,{label:j,value:g,onChange:D,autoFocus:!0,onKeyDown:n=>{n.continuePropagation(),n.key==="Enter"&&!n.repeat&&!n.nativeEvent.isComposing&&a()},isRequired:!0,validationBehavior:"aria"})]}),e.jsxs(x.Flex,{direction:"row",gap:"200",alignPrimary:"end",className:"confirm-dialog-footer",children:[e.jsx(l.Button,{variant:"neutral",onPress:d,isDisabled:r,children:m}),p?e.jsx(l.ButtonDanger,{variant:"danger-primary",onPress:a,isDisabled:!s,isPending:r,children:c}):e.jsx(l.Button,{variant:"primary",onPress:a,isDisabled:!s,isPending:r,children:c})]})]})})}exports.ConfirmDialog=P;
2
2
  //# sourceMappingURL=ConfirmDialog.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),D=require("../../../vendor/clsx/dist/clsx.cjs"),b=require("react");;/* empty css */const we=require("../../primitives/Search/Search.cjs"),i=require("../../primitives/Table/Table.cjs"),me=require("../../icons/IconChevronDown.cjs"),ye=require("../../icons/IconChevronRight.cjs"),Se=require("../../primitives/Pagination/Pagination.cjs"),ve=require("../../primitives/PermissionGate/PermissionGate.cjs"),Q=require("../../hooks/useLoadingVisibility.cjs"),Ne=require("../../layout/Flex/Flex.cjs"),Ce=require("../../primitives/BrandLoader/BrandLoader.cjs"),Te=require("../../primitives/IconButton/IconButton.cjs"),Pe=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function qe(t,n){return t==null||n==null?t==null?n==null?0:1:-1:t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():typeof t=="number"&&typeof n=="number"?t-n:Pe.compare(String(t),String(n))}function Re(t,n,d){const o=n.sortValue??(x=>x[n.key]),h=d==="descending"?-1:1;return[...t].sort((x,g)=>qe(o(x),o(g))*h)}function Me({action:t,item:n}){const d=t.isPending===!0,o=t.isAllowed!==!1&&!d,h=a.jsx(Te.IconButton,{variant:"text",size:"small","aria-label":t.label,isDisabled:!o&&!d,isPending:d,onPress:o?()=>t.onPress(n):void 0,children:t.icon});return o?h:a.jsx(ve.PermissionGate,{isAllowed:!1,noAccessLabel:t.noAccessLabel??"",isPending:d,pendingLabel:t.pendingLabel??"",children:h})}function J({columns:t,data:n,actions:d,rowActions:o,rowActionsLabel:h="",selectable:x=!1,selectionType:g="checkbox",selectedKeys:U,onSelectionChange:W,defaultSortDescriptor:X,sortDescriptor:Y,onSortChange:y,ariaLabel:Z,dense:_,striped:A,maxHeight:I,searchPlaceholder:K="Search...",searchKeys:S=[],isLoading:v=!1,isRefreshing:V=!1,loadingMessage:N,emptyMessage:ee="No records found",previousLabel:ae="Previous",nextLabel:te="Next",pageSize:f=10,nestedColumns:B,getNestedData:E,nestedLoadingMessage:se,nestedEmptyMessage:ne="No records found",nestedSearchKeys:le,nestedSearchPlaceholder:re,nestedActions:C,nestedPageSize:ie}){const T=Q.useLoadingVisibility(v),F=Q.useLoadingVisibility(V&&!v),[P,oe]=b.useState(""),[de,q]=b.useState(1),[ce,ue]=b.useState(X),u=Y??ce,[H,be]=b.useState(new Set),[z,p]=b.useState(new Map),R=!!E&&!!B,M=!!o;function G(e,s){be(r=>{const c=new Set(r);return s?c.add(e):c.delete(e),c})}function he(e){const s=e.id,r=!H.has(s);if(G(s,r),!r||z.has(s))return;const c=E(e);c instanceof Promise?(p(l=>new Map(l).set(s,{status:"loading",data:[]})),c.then(l=>{p(m=>new Map(m).set(s,{status:"loaded",data:l}))},()=>{p(l=>{const m=new Map(l);return m.delete(s),m}),G(s,!1)})):p(l=>new Map(l).set(s,{status:"loaded",data:c}))}const j=S.length>0,xe=t.some(e=>e.isRowHeader),ge=j||!!d,w=b.useMemo(()=>{if(!P.trim()||!j)return n;const e=P.toLowerCase();return n.filter(s=>S.some(r=>String(s[r]??"").toLowerCase().includes(e)))},[n,P,S,j]),L=t.find(e=>e.sortable&&String(e.key)===String(u==null?void 0:u.column)),O=b.useMemo(()=>L&&u?Re(w,L,u.direction):w,[w,L,u]);function fe(e){ue(e),q(1),y==null||y(e)}const $=Math.max(1,Math.ceil(O.length/f)),k=Math.min(de,$),pe=O.slice((k-1)*f,k*f);function je(e,s){return s.render?s.render(e):String(e[s.key]??"")}return a.jsxs(Ne.Flex,{direction:"column",gap:"300",className:D.clsx("data-table",I!==void 0&&"data-table--fill"),children:[ge&&a.jsxs("div",{className:"data-table-toolbar",children:[j&&a.jsx(we.Search,{placeholder:K,onSearch:e=>{oe(e),q(1)},className:"data-table-search"}),d&&a.jsx("div",{className:"data-table-actions",children:d})]}),v||T?a.jsx("div",{role:"status","aria-live":"polite","aria-label":N,className:D.clsx("data-table-status",T?"data-table-loading":"data-table-loading-delay"),children:T&&a.jsxs(a.Fragment,{children:[a.jsx(Ce.BrandLoader,{"aria-hidden":!0,variant:"trace",size:"32",tone:"brand"}),a.jsx("span",{children:N})]})}):a.jsxs("div",{className:D.clsx("data-table-body",F&&"data-table-body--refreshing"),"aria-busy":V||void 0,children:[F&&a.jsx("div",{role:"progressbar","aria-label":N,className:"data-table-refresh-indicator"}),w.length===0?a.jsx("div",{role:"status",className:"data-table-status data-table-empty",children:ee}):a.jsxs(i.Table,{"aria-label":Z,dense:_,striped:A,maxHeight:I,selectionMode:x?g==="radio"?"single":"multiple":"none",selectionType:g,selectedKeys:U,onSelectionChange:W,sortDescriptor:u,onSortChange:fe,children:[a.jsxs(i.TableHead,{children:[R&&a.jsx(i.TableColumn,{className:"data-table-expand-col"}),t.map((e,s)=>a.jsx(i.TableColumn,{id:String(e.key),align:e.align,allowsSorting:e.sortable,isRowHeader:xe?e.isRowHeader:s===0,children:e.label},String(e.key))),M&&a.jsx(i.TableColumn,{align:"right",className:"data-table-row-actions-col",children:h})]}),a.jsx(i.TableBody,{children:pe.flatMap(e=>{const s=H.has(e.id),r=z.get(e.id),c=[a.jsxs(i.TableRow,{id:e.id,children:[R&&a.jsx(i.TableCell,{className:"data-table-expand-cell",children:a.jsx("button",{type:"button",className:"data-table-expand-btn","aria-label":s?"Collapse row":"Expand row","aria-expanded":s,onClick:()=>he(e),children:s?a.jsx(me.IconChevronDown,{size:"16"}):a.jsx(ye.IconChevronRight,{size:"16"})})}),t.map(l=>a.jsx(i.TableCell,{align:l.align,children:je(e,l)},String(l.key))),M&&a.jsx(i.TableCell,{align:"right",className:"data-table-row-actions-cell",children:a.jsx("div",{className:"data-table-row-actions",children:(typeof o=="function"?o(e):o).map(l=>a.jsx(Me,{action:l,item:e},l.key))})})]},e.id)];return s&&c.push(a.jsx(i.TableRow,{id:`${e.id}-nested`,className:"data-table-nested-row",children:a.jsx(i.TableCell,{colSpan:t.length+(R?1:0)+(x?1:0)+(M?1:0),className:"data-table-nested-cell",children:a.jsx(J,{columns:B,data:(r==null?void 0:r.data)??[],isLoading:!r||r.status==="loading",loadingMessage:se??"",emptyMessage:ne,searchKeys:le,searchPlaceholder:re,actions:C==null?void 0:C(e),pageSize:ie??f})})},`${e.id}-nested`)),c})})]})]}),a.jsx(Se.Pagination,{page:k,totalPages:$,onPageChange:q,previousLabel:ae,nextLabel:te})]})}exports.DataTable=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),D=require("../../../vendor/clsx/dist/clsx.cjs"),b=require("react");;/* empty css */const we=require("../../primitives/Search/Search.cjs"),i=require("../../primitives/Table/Table.cjs"),me=require("../../icons/IconChevronDown.cjs"),ye=require("../../icons/IconChevronRight.cjs"),Se=require("../../primitives/Pagination/Pagination.cjs"),ve=require("../../primitives/PermissionGate/PermissionGate.cjs"),Q=require("../../hooks/useLoadingVisibility.cjs"),Ne=require("../../layout/Flex/Flex.cjs"),Ce=require("../../primitives/BrandLoader/BrandLoader.cjs"),Te=require("../../primitives/IconButton/IconButton.cjs"),Pe=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function qe(t,n){return t==null||n==null?t==null?n==null?0:1:-1:t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():typeof t=="number"&&typeof n=="number"?t-n:Pe.compare(String(t),String(n))}function Re(t,n,d){const o=n.sortValue??(x=>x[n.key]),h=d==="descending"?-1:1;return[...t].sort((x,g)=>qe(o(x),o(g))*h)}function Me({action:t,item:n}){const d=t.isPending===!0,o=t.isAllowed!==!1&&!d,h=a.jsx(Te.IconButton,{variant:"text",size:"small","aria-label":t.label,isDisabled:!o&&!d,isPending:d,onPress:o?()=>t.onPress(n):void 0,children:t.icon});return o?h:a.jsx(ve.PermissionGate,{isAllowed:!1,noAccessLabel:t.noAccessLabel??"",isPending:d,pendingLabel:t.pendingLabel??"",children:h})}function U({columns:t,data:n,actions:d,rowActions:o,rowActionsLabel:h="",selectable:x=!1,selectionType:g="checkbox",selectedKeys:J,onSelectionChange:W,defaultSortDescriptor:X,sortDescriptor:Y,onSortChange:y,ariaLabel:Z,dense:_,striped:A,maxHeight:I,searchPlaceholder:K="Search...",searchKeys:S=[],isLoading:v=!1,isRefreshing:V=!1,loadingMessage:N,emptyMessage:ee="No records found",previousLabel:ae="Previous",nextLabel:te="Next",pageSize:f=10,nestedColumns:B,getNestedData:E,nestedLoadingMessage:se,nestedEmptyMessage:ne="No records found",nestedSearchKeys:le,nestedSearchPlaceholder:re,nestedActions:C,nestedPageSize:ie}){const T=Q.useLoadingVisibility(v),F=Q.useLoadingVisibility(V&&!v),[P,oe]=b.useState(""),[de,q]=b.useState(1),[ce,ue]=b.useState(X),u=Y??ce,[H,be]=b.useState(new Set),[$,p]=b.useState(new Map),R=!!E&&!!B,M=!!o;function z(e,s){be(r=>{const c=new Set(r);return s?c.add(e):c.delete(e),c})}function he(e){const s=e.id,r=!H.has(s);if(z(s,r),!r||$.has(s))return;const c=E(e);c instanceof Promise?(p(l=>new Map(l).set(s,{status:"loading",data:[]})),c.then(l=>{p(m=>new Map(m).set(s,{status:"loaded",data:l}))},()=>{p(l=>{const m=new Map(l);return m.delete(s),m}),z(s,!1)})):p(l=>new Map(l).set(s,{status:"loaded",data:c}))}const j=S.length>0,xe=t.some(e=>e.isRowHeader),ge=j||!!d,w=b.useMemo(()=>{if(!P.trim()||!j)return n;const e=P.toLowerCase();return n.filter(s=>S.some(r=>String(s[r]??"").toLowerCase().includes(e)))},[n,P,S,j]),L=t.find(e=>e.sortable&&String(e.key)===String(u==null?void 0:u.column)),G=b.useMemo(()=>L&&u?Re(w,L,u.direction):w,[w,L,u]);function fe(e){ue(e),q(1),y==null||y(e)}const O=Math.max(1,Math.ceil(G.length/f)),k=Math.min(de,O),pe=G.slice((k-1)*f,k*f);function je(e,s){return s.render?s.render(e):String(e[s.key]??"")}return a.jsxs(Ne.Flex,{direction:"column",gap:"300",className:D.clsx("data-table",I!==void 0&&"data-table--fill"),children:[ge&&a.jsxs("div",{className:"data-table-toolbar",children:[j&&a.jsx(we.Search,{placeholder:K,onSearch:e=>{oe(e),q(1)},className:"data-table-search"}),d&&a.jsx("div",{className:"data-table-actions",children:d})]}),v||T?a.jsx("div",{role:"status","aria-live":"polite","aria-label":N,className:D.clsx("data-table-status",T?"data-table-loading":"data-table-loading-delay"),children:T&&a.jsxs(a.Fragment,{children:[a.jsx(Ce.BrandLoader,{"aria-hidden":!0,variant:"trace",size:"32",tone:"brand"}),a.jsx("span",{children:N})]})}):a.jsxs("div",{className:D.clsx("data-table-body",F&&"data-table-body--refreshing"),"aria-busy":V||void 0,children:[F&&a.jsx("div",{role:"progressbar","aria-label":N,className:"data-table-refresh-indicator"}),w.length===0?a.jsx("div",{role:"status",className:"data-table-status data-table-empty",children:ee}):a.jsxs(i.Table,{"aria-label":Z,dense:_,striped:A,maxHeight:I,selectionMode:x?g==="radio"?"single":"multiple":"none",selectionType:g,selectedKeys:J,onSelectionChange:W,sortDescriptor:u,onSortChange:fe,children:[a.jsxs(i.TableHead,{children:[R&&a.jsx(i.TableColumn,{className:"data-table-expand-col"}),t.map((e,s)=>a.jsx(i.TableColumn,{id:String(e.key),align:e.align,allowsSorting:e.sortable,isRowHeader:xe?e.isRowHeader:s===0,children:e.label},String(e.key))),M&&a.jsx(i.TableColumn,{align:"right",className:"data-table-row-actions-col",children:h})]}),a.jsx(i.TableBody,{children:pe.flatMap(e=>{const s=H.has(e.id),r=$.get(e.id),c=[a.jsxs(i.TableRow,{id:e.id,children:[R&&a.jsx(i.TableCell,{className:"data-table-expand-cell",children:a.jsx("button",{type:"button",className:"data-table-expand-btn","aria-label":s?"Collapse row":"Expand row","aria-expanded":s,onClick:()=>he(e),children:s?a.jsx(me.IconChevronDown,{size:"16"}):a.jsx(ye.IconChevronRight,{size:"16"})})}),t.map(l=>a.jsx(i.TableCell,{align:l.align,children:je(e,l)},String(l.key))),M&&a.jsx(i.TableCell,{align:"right",className:"data-table-row-actions-cell",children:a.jsx("div",{className:"data-table-row-actions",children:(typeof o=="function"?o(e):o).map(l=>a.jsx(Me,{action:l,item:e},l.key))})})]},e.id)];return s&&c.push(a.jsx(i.TableRow,{id:`${e.id}-nested`,className:"data-table-nested-row",children:a.jsx(i.TableCell,{colSpan:t.length+(R?1:0)+(x?1:0)+(M?1:0),className:"data-table-nested-cell",children:a.jsx(U,{columns:B,data:(r==null?void 0:r.data)??[],isLoading:!r||r.status==="loading",loadingMessage:se??"",emptyMessage:ne,searchKeys:le,searchPlaceholder:re,actions:C==null?void 0:C(e),pageSize:ie??f})})},`${e.id}-nested`)),c})})]})]}),a.jsx(Se.Pagination,{page:k,totalPages:O,onPageChange:q,previousLabel:ae,nextLabel:te})]})}exports.DataTable=U;
2
2
  //# sourceMappingURL=DataTable.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("../../../vendor/clsx/dist/clsx.cjs"),r=require("react");;/* empty css */const y=require("../../primitives/Tooltip/Tooltip.cjs"),z=require("../../icons/IconInfo.cjs"),B=require("../../icons/IconChevronDown.cjs"),u=require("../../primitives/IconButton/IconButton.cjs"),R=r.forwardRef(function({title:g,description:o,descriptionButtonLabel:x,headerActions:n,isCollapsible:s,collapseButtonLabel:m,expandButtonLabel:h,collapsed:a,defaultCollapsed:j,onCollapsedChange:i,children:w,className:f,...v},I){const d=r.useId(),c=a!==void 0,[p,N]=r.useState(j??!1),t=s===!0&&(c?a===!0:p);function q(){const l=!t;c||N(l),i==null||i(l)}return e.jsxs("div",{ref:I,className:b.clsx("widget",f),...v,"data-collapsed":t||void 0,children:[e.jsxs("div",{className:"widget-header widget-drag-handle",children:[e.jsxs("span",{className:"widget-header-title-group",children:[e.jsx("span",{className:"widget-header-title",children:g}),o&&e.jsx(y.Tooltip,{content:o,placement:"bottom",offset:4,children:e.jsx(u.IconButton,{"aria-label":x,variant:"subtle",size:"small",className:"widget-header-description-trigger",children:e.jsx(z.IconInfo,{size:"14"})})})]}),(n||s)&&e.jsxs("div",{className:"widget-header-actions",children:[n,s&&e.jsx(u.IconButton,{"aria-label":t?h:m,"aria-expanded":!t,"aria-controls":d,variant:"subtle",size:"small",className:"widget-header-collapse-trigger",onPress:q,children:e.jsx(B.IconChevronDown,{size:"16",className:"widget-header-collapse-indicator"})})]})]}),e.jsx("div",{id:d,className:"widget-body",hidden:t,children:w})]})});exports.Widget=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("../../../vendor/clsx/dist/clsx.cjs"),i=require("react");;/* empty css */const y=require("../../primitives/Tooltip/Tooltip.cjs"),z=require("../../icons/IconInfo.cjs"),T=require("../../icons/IconChevronDown.cjs"),u=require("../../primitives/IconButton/IconButton.cjs"),B=i.forwardRef(function({title:g,description:o,descriptionButtonLabel:x,headerActions:n,isCollapsible:s,collapseButtonLabel:m,expandButtonLabel:h,collapsed:a,defaultCollapsed:j,onCollapsedChange:r,children:w,className:f,...v},I){const d=i.useId(),c=a!==void 0,[p,N]=i.useState(j??!1),t=s===!0&&(c?a===!0:p);function q(){const l=!t;c||N(l),r==null||r(l)}return e.jsxs("div",{ref:I,className:b.clsx("widget",f),...v,"data-collapsed":t||void 0,children:[e.jsxs("div",{className:"widget-header widget-drag-handle",children:[e.jsxs("span",{className:"widget-header-title-group",children:[e.jsx("span",{className:"widget-header-title",children:g}),o&&e.jsx(y.Tooltip,{content:o,placement:"bottom",offset:4,children:e.jsx(u.IconButton,{"aria-label":x,variant:"subtle",size:"small",className:"widget-header-description-trigger",children:e.jsx(z.IconInfo,{size:"14"})})})]}),(n||s)&&e.jsxs("div",{className:"widget-header-actions",children:[n,s&&e.jsx(u.IconButton,{"aria-label":t?h:m,"aria-expanded":!t,"aria-controls":d,variant:"subtle",size:"small",className:"widget-header-collapse-trigger",onPress:q,children:e.jsx(T.IconChevronDown,{size:"16",className:"widget-header-collapse-indicator"})})]})]}),e.jsx("div",{id:d,className:"widget-body",hidden:t,children:w})]})});exports.Widget=B;
2
2
  //# sourceMappingURL=Widget.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),A=require("../../../vendor/clsx/dist/clsx.cjs"),G=require("react"),c=require("../../../_virtual/index.cjs");;/* empty css */;/* empty css */;/* empty css */const T=c.WidthProvider(c),_=".widget-drag-handle",w=".widget-header-actions";function S({layout:o,onLayoutChange:r,cols:u=12,rowHeight:E=80,isEditable:g=!1,isDraggable:m,isResizable:b,className:R,style:q,children:i}){const D=o.map(({id:e,x:a,y:t,w:s,h:d})=>({i:e,x:a,y:t,w:s,h:d})),n=m??g;function x(e){r==null||r(e.map(({i:a,x:t,y:s,w:d,h:y})=>({id:a,x:t,y:s,w:d,h:y})))}return l.jsx(T,{className:A.clsx("widget-grid",n&&"widget-grid-draggable",R),style:q,layout:D,cols:u,rowHeight:E,isDraggable:n,isResizable:b??g,draggableHandle:_,draggableCancel:w,onLayoutChange:x,children:(Array.isArray(i)?i:[i]).map(e=>G.isValidElement(e)?l.jsx("div",{className:"widget-grid-item",children:e},e.key):e)})}exports.WidgetGrid=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),y=require("../../../vendor/clsx/dist/clsx.cjs"),A=require("react"),c=require("../../../_virtual/index.cjs");;/* empty css */;/* empty css */;/* empty css */const G=c.WidthProvider(c),_=".widget-drag-handle",w=".widget-header-actions";function S({layout:o,onLayoutChange:r,cols:u=12,rowHeight:E=80,isEditable:g=!1,isDraggable:m,isResizable:b,className:q,style:D,children:i}){const R=o.map(({id:e,x:a,y:t,w:s,h:d})=>({i:e,x:a,y:t,w:s,h:d})),n=m??g;function T(e){r==null||r(e.map(({i:a,x:t,y:s,w:d,h:x})=>({id:a,x:t,y:s,w:d,h:x})))}return l.jsx(G,{className:y.clsx("widget-grid",n&&"widget-grid-draggable",q),style:D,layout:R,cols:u,rowHeight:E,isDraggable:n,isResizable:b??g,draggableHandle:_,draggableCancel:w,onLayoutChange:T,children:(Array.isArray(i)?i:[i]).map(e=>A.isValidElement(e)?l.jsx("div",{className:"widget-grid-item",children:e},e.key):e)})}exports.WidgetGrid=S;
2
2
  //# sourceMappingURL=WidgetGrid.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),T=require("../../../../vendor/clsx/dist/clsx.cjs"),C=require("react"),_=require("../useChartInstance.cjs"),m=require("../ChartLegend/ChartLegend.cjs"),p=require("../ChartLegend/use-chart-legend.cjs"),y=require("./bar-chart-option.cjs");;/* empty css */const M={};function E({categories:n,series:r,orientation:o="vertical",stacking:i="off",valueLabel:c="auto",legend:g="inline",valueAxis:a=M,valueFormatter:l,onSeriesColorChange:f,legendLabels:S,className:b,...q}){const{containerRef:I,chart:s,theme:e,resolveSeriesColor:O}=_.useChartInstance(),{items:j,colorsBySeriesId:u,colorTokensBySeriesId:v,hiddenSeriesIds:d,toggleSeries:x}=p.useChartLegend(r,(e==null?void 0:e.seriesColors)??[],O),h=C.useMemo(()=>r.filter(L=>!d.has(L.id)),[r,d]);C.useEffect(()=>{!s||!e||s.setOption(y.buildBarChartOption({categories:n,series:h,orientation:o,stacking:i,valueLabel:c,valueAxis:a,theme:e,seriesColorOverrides:u,valueFormatter:l}),{notMerge:!0})},[s,e,n,h,o,i,c,a,u,l]);const B=g!=="none"&&r.length>0;return t.jsxs("div",{className:T.clsx("bar-chart",b),...q,children:[B&&t.jsx(m.ChartLegend,{items:j,onToggle:x,onColorChange:f,colorTokensBySeriesId:v,labels:S}),t.jsx("div",{ref:I,className:"bar-chart__canvas"})]})}exports.BarChart=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),L=require("../../../../vendor/clsx/dist/clsx.cjs"),C=require("react"),_=require("../useChartInstance.cjs"),m=require("../ChartLegend/ChartLegend.cjs"),p=require("../ChartLegend/use-chart-legend.cjs"),y=require("./bar-chart-option.cjs");;/* empty css */const M={};function E({categories:n,series:r,orientation:o="vertical",stacking:i="off",valueLabel:c="auto",legend:g="inline",valueAxis:a=M,valueFormatter:l,onSeriesColorChange:f,legendLabels:S,className:b,...q}){const{containerRef:I,chart:s,theme:e,resolveSeriesColor:O}=_.useChartInstance(),{items:T,colorsBySeriesId:u,colorTokensBySeriesId:j,hiddenSeriesIds:d,toggleSeries:v}=p.useChartLegend(r,(e==null?void 0:e.seriesColors)??[],O),h=C.useMemo(()=>r.filter(B=>!d.has(B.id)),[r,d]);C.useEffect(()=>{!s||!e||s.setOption(y.buildBarChartOption({categories:n,series:h,orientation:o,stacking:i,valueLabel:c,valueAxis:a,theme:e,seriesColorOverrides:u,valueFormatter:l}),{notMerge:!0})},[s,e,n,h,o,i,c,a,u,l]);const x=g!=="none"&&r.length>0;return t.jsxs("div",{className:L.clsx("bar-chart",b),...q,children:[x&&t.jsx(m.ChartLegend,{items:T,onToggle:v,onColorChange:f,colorTokensBySeriesId:j,labels:S}),t.jsx("div",{ref:I,className:"bar-chart__canvas"})]})}exports.BarChart=E;
2
2
  //# sourceMappingURL=BarChart.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),S=require("react"),l=require("react-aria-components"),C=require("../chart-palette.cjs");;/* empty css */const _=require("../../../hooks/useOverlayPortal.cjs"),m={palette:"Color palette",colorOption:e=>`Color ${e}`,automaticColor:"Automatic color"};function d(e){try{return l.parseColor(e).toString("hex")}catch{return e}}function E(e,c){const o=c.toString("hex"),n=e.findIndex(r=>d(r)===o);return n<0?void 0:C.CHART_SERIES_COLOR_TOKENS[n]}function R(e){const c=window.getComputedStyle(e);return C.CHART_SERIES_COLOR_TOKENS.map(o=>c.getPropertyValue(o).trim())}const f=[];function P({colorToken:e,isResettable:c,labels:o,onChoose:n}){const[r,h]=S.useState(f),i=S.useRef(null);S.useLayoutEffect(()=>{const a=i.current;a&&r.length===0&&h(R(a))},[r]);const u=e?C.CHART_SERIES_COLOR_TOKENS.indexOf(e):-1,p=u<0?void 0:r[u];return t.jsxs("div",{ref:i,className:"chart-color-picker",children:[t.jsx(l.ColorSwatchPicker,{className:"chart-color-picker__colors","aria-label":o.palette,value:p,onChange:a=>{const s=E(r,a);s&&n(s)},children:r.map((a,s)=>t.jsx(l.ColorSwatchPickerItem,{color:a,className:"chart-color-picker__color",children:t.jsx(l.ColorSwatch,{"aria-label":o.colorOption(s+1)})},C.CHART_SERIES_COLOR_TOKENS[s]))}),c&&t.jsx(l.Button,{className:"chart-color-picker__reset",onPress:()=>n(null),children:o.automaticColor})]})}function x({colorToken:e,onChange:c,isResettable:o=!0,labels:n,triggerLabel:r,triggerClassName:h,triggerStyle:i,children:u}){const p=_.useOverlayPortalContainer(),a={...m,...n};return t.jsxs(l.DialogTrigger,{children:[t.jsx(l.Button,{className:h,style:i,"aria-label":r,children:u}),t.jsx(l.Popover,{className:"chart-color-picker-popover",placement:"bottom start",UNSTABLE_portalContainer:p,children:t.jsx(l.Dialog,{className:"chart-color-picker-dialog","aria-label":a.palette,children:({close:s})=>t.jsx(P,{colorToken:e,isResettable:o,labels:a,onChoose:O=>{s(),c(O)}})})})]})}exports.ChartColorPicker=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),S=require("react"),l=require("react-aria-components"),C=require("../chart-palette.cjs");;/* empty css */const _=require("../../../hooks/useOverlayPortal.cjs"),m={palette:"Color palette",colorOption:e=>`Color ${e}`,automaticColor:"Automatic color"};function d(e){try{return l.parseColor(e).toString("hex")}catch{return e}}function E(e,c){const o=c.toString("hex"),n=e.findIndex(r=>d(r)===o);return n<0?void 0:C.CHART_SERIES_COLOR_TOKENS[n]}function f(e){const c=window.getComputedStyle(e);return C.CHART_SERIES_COLOR_TOKENS.map(o=>c.getPropertyValue(o).trim())}const P=[];function R({colorToken:e,isResettable:c,labels:o,onChoose:n}){const[r,h]=S.useState(P),i=S.useRef(null);S.useLayoutEffect(()=>{const a=i.current;a&&r.length===0&&h(f(a))},[r]);const u=e?C.CHART_SERIES_COLOR_TOKENS.indexOf(e):-1,p=u<0?void 0:r[u];return t.jsxs("div",{ref:i,className:"chart-color-picker",children:[t.jsx(l.ColorSwatchPicker,{className:"chart-color-picker__colors","aria-label":o.palette,value:p,onChange:a=>{const s=E(r,a);s&&n(s)},children:r.map((a,s)=>t.jsx(l.ColorSwatchPickerItem,{color:a,className:"chart-color-picker__color",children:t.jsx(l.ColorSwatch,{"aria-label":o.colorOption(s+1)})},C.CHART_SERIES_COLOR_TOKENS[s]))}),c&&t.jsx(l.Button,{className:"chart-color-picker__reset",onPress:()=>n(null),children:o.automaticColor})]})}function x({colorToken:e,onChange:c,isResettable:o=!0,labels:n,triggerLabel:r,triggerClassName:h,triggerStyle:i,children:u}){const p=_.useOverlayPortalContainer(),a={...m,...n};return t.jsxs(l.DialogTrigger,{children:[t.jsx(l.Button,{className:h,style:i,"aria-label":r,children:u}),t.jsx(l.Popover,{className:"chart-color-picker-popover",placement:"bottom start",UNSTABLE_portalContainer:p,children:t.jsx(l.Dialog,{className:"chart-color-picker-dialog","aria-label":a.palette,children:({close:s})=>t.jsx(R,{colorToken:e,isResettable:o,labels:a,onChoose:O=>{s(),c(O)}})})})]})}exports.ChartColorPicker=x;
2
2
  //# sourceMappingURL=ChartColorPicker.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),d=require("../chart-palette.cjs");function T(t,r,u){const[s,S]=c.useState(()=>new Set),l=c.useCallback(e=>{S(n=>{const o=new Set(n);return o.has(e)?o.delete(e):o.add(e),o})},[]),h=c.useMemo(()=>{const e={};return t.forEach((n,o)=>{e[n.id]=n.colorToken??d.CHART_SERIES_COLOR_TOKENS[o%d.CHART_SERIES_COLOR_TOKENS.length]}),e},[t]),i=c.useMemo(()=>{const e={};return t.forEach((n,o)=>{const m=n.colorToken?u(n.colorToken):void 0;e[n.id]=m??r[o%r.length]}),e},[t,r,u]);return{items:c.useMemo(()=>t.map(e=>({id:e.id,name:e.name,color:i[e.id],isHidden:s.has(e.id)})),[t,i,s]),colorsBySeriesId:i,colorTokensBySeriesId:h,hiddenSeriesIds:s,toggleSeries:l}}exports.useChartLegend=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),d=require("../chart-palette.cjs");function m(t,r,u){const[s,S]=c.useState(()=>new Set),l=c.useCallback(e=>{S(n=>{const o=new Set(n);return o.has(e)?o.delete(e):o.add(e),o})},[]),h=c.useMemo(()=>{const e={};return t.forEach((n,o)=>{e[n.id]=n.colorToken??d.CHART_SERIES_COLOR_TOKENS[o%d.CHART_SERIES_COLOR_TOKENS.length]}),e},[t]),i=c.useMemo(()=>{const e={};return t.forEach((n,o)=>{const T=n.colorToken?u(n.colorToken):void 0;e[n.id]=T??r[o%r.length]}),e},[t,r,u]);return{items:c.useMemo(()=>t.map(e=>({id:e.id,name:e.name,color:i[e.id],isHidden:s.has(e.id)})),[t,i,s]),colorsBySeriesId:i,colorTokensBySeriesId:h,hiddenSeriesIds:s,toggleSeries:l}}exports.useChartLegend=m;
2
2
  //# sourceMappingURL=use-chart-legend.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),ee=require("../../../../vendor/clsx/dist/clsx.cjs"),i=require("react"),te=require("../ChartLegend/ChartLegend.cjs"),re=require("../ChartLegend/use-chart-legend.cjs"),ne=require("../chart-palette.cjs"),I=require("../chart-share.cjs"),ie=require("../useChartInstance.cjs"),se=require("./pie-chart-option.cjs"),h=require("./pie-chart-slices.cjs");;/* empty css */const ce={others:"Others",total:"Total",backToPrevious:e=>`Back from ${e}`},oe=200,ae=["percent"],le=[];function ue(e,s,a){if(!e||s.length===0)return;const l=s.includes("percent"),S=s.includes("value");return l&&S?`${a(e.value)} (${I.formatShare(e.share)})`:S?a(e.value):I.formatShare(e.share)}function de(e){const[s,a]=i.useState(0);return i.useLayoutEffect(()=>{if(!e)return;const l=new ResizeObserver(()=>a(Math.min(e.clientWidth,e.clientHeight)));return l.observe(e),()=>l.disconnect()},[e]),s}function he({data:e,shape:s="donut",labelContent:a=ae,showTotal:l="auto",total:S,valueFormatter:p,legend:q="inline",legendPosition:y="bottom",legendValues:M=le,onSeriesColorChange:A,onFocusChange:b,legendLabels:R,labels:B,className:$,...D}){const{containerRef:U,chart:u,theme:c,resolveSeriesColor:H}=ie.useChartInstance(),o={...ce,...B},[f,V]=i.useState(null),[w,z]=i.useState(null),G=de(w),K=i.useMemo(()=>e.map(t=>({id:t.id,name:h.displayNameOf(t,o.others),colorToken:t.colorToken??(t.isOthers?ne.CHART_NEUTRAL_COLOR_TOKEN:void 0)})),[e,o.others]),{items:W,colorsBySeriesId:L,colorTokensBySeriesId:X,hiddenSeriesIds:O,toggleSeries:Z}=re.useChartLegend(K,(c==null?void 0:c.seriesColors)??[],H),d=i.useMemo(()=>h.buildPieSlices({nodes:e.filter(t=>!O.has(t.id)),colorsByRootId:L,fallbackColor:(c==null?void 0:c.neutralColor)??"#9ca3af",othersName:o.others}),[e,O,L,c,o.others]),r=i.useMemo(()=>f===null?void 0:h.findSlice(d,f),[d,f]),m=r?r.children:d,_=i.useCallback(t=>{V(t),b==null||b(t)},[b]);i.useEffect(()=>{f!==null&&!r&&_(null)},[f,r,_]),i.useEffect(()=>{!u||!c||u.setOption(se.buildPieChartOption({slices:m,shape:s,labelContent:a,theme:c,valueFormatter:p}),{notMerge:!0})},[u,c,m,s,a,p]),i.useEffect(()=>{if(!u)return;function t(C){var P;const x=(P=C.data)==null?void 0:P.id;if(typeof x!="string")return;const T=h.findSlice(m,x);T&&T.children.length>0&&_(T.id)}return u.on("click",t),()=>{u.off("click",t)}},[u,m,_]);function v(t){return p?p(t):String(t)}const J=W.map(t=>({...t,detail:ue(d.find(C=>C.id===t.id),M,v)})),g=l==="on"||l==="auto"&&G>=oe,N=r?r.value:S??h.totalOf(d),k=r?h.findParentSlice(d,r.id):void 0,Q=q!=="none"&&e.length>0,E=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"pie-chart__total-value",children:v(N)}),n.jsx("span",{className:"pie-chart__total-caption",children:r?r.name:o.total})]});function j(){_(k?k.id:null)}function Y(){return r?n.jsx("button",{type:"button",className:"pie-chart__center pie-chart__center--button","aria-label":o.backToPrevious(r.name),onClick:j,children:g&&E}):g&&n.jsx("div",{className:"pie-chart__center",children:E})}function F(){return r?n.jsxs("button",{type:"button",className:"pie-chart__footer pie-chart__footer--button","aria-label":o.backToPrevious(r.name),onClick:j,children:[r.name,g&&`: ${v(N)}`]}):g&&n.jsx("div",{className:"pie-chart__footer",children:`${o.total}: ${v(N)}`})}return n.jsxs("div",{className:ee.clsx("pie-chart",`pie-chart--legend-${y}`,$),...D,children:[Q&&n.jsx(te.ChartLegend,{className:"pie-chart__legend",items:J,onToggle:Z,onColorChange:A,colorTokensBySeriesId:X,labels:R}),n.jsxs("div",{className:"pie-chart__body",children:[n.jsxs("div",{ref:z,className:"pie-chart__stage",children:[n.jsx("div",{ref:U,className:"pie-chart__canvas"}),s==="donut"&&Y()]}),s==="pie"&&F()]})]})}exports.PieChart=he;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),ee=require("../../../../vendor/clsx/dist/clsx.cjs"),i=require("react"),te=require("../ChartLegend/ChartLegend.cjs"),re=require("../ChartLegend/use-chart-legend.cjs"),ne=require("../chart-palette.cjs"),I=require("../chart-share.cjs"),ie=require("../useChartInstance.cjs"),se=require("./pie-chart-option.cjs"),h=require("./pie-chart-slices.cjs");;/* empty css */const ce={others:"Others",total:"Total",backToPrevious:e=>`Back from ${e}`},oe=200,ae=["percent"],le=[];function ue(e,s,a){if(!e||s.length===0)return;const l=s.includes("percent"),S=s.includes("value");return l&&S?`${a(e.value)} (${I.formatShare(e.share)})`:S?a(e.value):I.formatShare(e.share)}function de(e){const[s,a]=i.useState(0);return i.useLayoutEffect(()=>{if(!e)return;const l=new ResizeObserver(()=>a(Math.min(e.clientWidth,e.clientHeight)));return l.observe(e),()=>l.disconnect()},[e]),s}function he({data:e,shape:s="donut",labelContent:a=ae,showTotal:l="auto",total:S,valueFormatter:p,legend:q="inline",legendPosition:y="bottom",legendValues:M=le,onSeriesColorChange:A,onFocusChange:b,legendLabels:$,labels:R,className:B,...U}){const{containerRef:D,chart:u,theme:c,resolveSeriesColor:H}=ie.useChartInstance(),o={...ce,...R},[f,V]=i.useState(null),[w,z]=i.useState(null),G=de(w),K=i.useMemo(()=>e.map(t=>({id:t.id,name:h.displayNameOf(t,o.others),colorToken:t.colorToken??(t.isOthers?ne.CHART_NEUTRAL_COLOR_TOKEN:void 0)})),[e,o.others]),{items:W,colorsBySeriesId:k,colorTokensBySeriesId:X,hiddenSeriesIds:L,toggleSeries:Z}=re.useChartLegend(K,(c==null?void 0:c.seriesColors)??[],H),d=i.useMemo(()=>h.buildPieSlices({nodes:e.filter(t=>!L.has(t.id)),colorsByRootId:k,fallbackColor:(c==null?void 0:c.neutralColor)??"#9ca3af",othersName:o.others}),[e,L,k,c,o.others]),r=i.useMemo(()=>f===null?void 0:h.findSlice(d,f),[d,f]),m=r?r.children:d,_=i.useCallback(t=>{V(t),b==null||b(t)},[b]);i.useEffect(()=>{f!==null&&!r&&_(null)},[f,r,_]),i.useEffect(()=>{!u||!c||u.setOption(se.buildPieChartOption({slices:m,shape:s,labelContent:a,theme:c,valueFormatter:p}),{notMerge:!0})},[u,c,m,s,a,p]),i.useEffect(()=>{if(!u)return;function t(T){var P;const x=(P=T.data)==null?void 0:P.id;if(typeof x!="string")return;const C=h.findSlice(m,x);C&&C.children.length>0&&_(C.id)}return u.on("click",t),()=>{u.off("click",t)}},[u,m,_]);function v(t){return p?p(t):String(t)}const J=W.map(t=>({...t,detail:ue(d.find(T=>T.id===t.id),M,v)})),g=l==="on"||l==="auto"&&G>=oe,N=r?r.value:S??h.totalOf(d),O=r?h.findParentSlice(d,r.id):void 0,Q=q!=="none"&&e.length>0,E=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"pie-chart__total-value",children:v(N)}),n.jsx("span",{className:"pie-chart__total-caption",children:r?r.name:o.total})]});function j(){_(O?O.id:null)}function Y(){return r?n.jsx("button",{type:"button",className:"pie-chart__center pie-chart__center--button","aria-label":o.backToPrevious(r.name),onClick:j,children:g&&E}):g&&n.jsx("div",{className:"pie-chart__center",children:E})}function F(){return r?n.jsxs("button",{type:"button",className:"pie-chart__footer pie-chart__footer--button","aria-label":o.backToPrevious(r.name),onClick:j,children:[r.name,g&&`: ${v(N)}`]}):g&&n.jsx("div",{className:"pie-chart__footer",children:`${o.total}: ${v(N)}`})}return n.jsxs("div",{className:ee.clsx("pie-chart",`pie-chart--legend-${y}`,B),...U,children:[Q&&n.jsx(te.ChartLegend,{className:"pie-chart__legend",items:J,onToggle:Z,onColorChange:A,colorTokensBySeriesId:X,labels:$}),n.jsxs("div",{className:"pie-chart__body",children:[n.jsxs("div",{ref:z,className:"pie-chart__stage",children:[n.jsx("div",{ref:D,className:"pie-chart__canvas"}),s==="donut"&&Y()]}),s==="pie"&&F()]})]})}exports.PieChart=he;
2
2
  //# sourceMappingURL=PieChart.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),j=require("../../../../vendor/clsx/dist/clsx.cjs"),h=require("react"),E=require("../useChartInstance.cjs"),L=require("../ChartLegend/ChartLegend.cjs"),b=require("../ChartLegend/use-chart-legend.cjs"),Y=require("./time-series-option.cjs");;/* empty css */const x={},R={},X={};function p({series:r,displayType:i="line",legend:C="inline",line:n=X,xAxis:o=x,yAxis:c=R,showSymbols:a=!1,showValueLabels:l=!1,valueFormatter:u,onSeriesColorChange:I,legendLabels:O,className:T,...f}){const{containerRef:_,chart:s,theme:e,resolveSeriesColor:m}=E.useChartInstance(),{items:q,colorsBySeriesId:d,colorTokensBySeriesId:P,hiddenSeriesIds:S,toggleSeries:v}=b.useChartLegend(r,(e==null?void 0:e.seriesColors)??[],m),g=h.useMemo(()=>r.filter(N=>!S.has(N.id)),[r,S]);h.useEffect(()=>{!s||!e||s.setOption(Y.buildTimeSeriesOption({series:g,displayType:i,line:n,xAxis:o,yAxis:c,theme:e,showSymbols:a,showValueLabels:l,seriesColorOverrides:d,valueFormatter:u}),{notMerge:!0})},[s,e,g,i,n,o,c,a,l,d,u]);const M=C!=="none"&&r.length>0;return t.jsxs("div",{className:j.clsx("time-series-chart",T),...f,children:[M&&t.jsx(L.ChartLegend,{items:q,onToggle:v,onColorChange:I,colorTokensBySeriesId:P,labels:O}),t.jsx("div",{ref:_,className:"time-series-chart__canvas"})]})}exports.TimeSeriesChart=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),j=require("../../../../vendor/clsx/dist/clsx.cjs"),h=require("react"),E=require("../useChartInstance.cjs"),L=require("../ChartLegend/ChartLegend.cjs"),b=require("../ChartLegend/use-chart-legend.cjs"),Y=require("./time-series-option.cjs");;/* empty css */const x={},X={},k={};function p({series:r,displayType:i="line",legend:C="inline",line:n=k,xAxis:o=x,yAxis:c=X,showSymbols:a=!1,showValueLabels:l=!1,valueFormatter:u,onSeriesColorChange:T,legendLabels:I,className:O,...f}){const{containerRef:_,chart:s,theme:e,resolveSeriesColor:m}=E.useChartInstance(),{items:q,colorsBySeriesId:d,colorTokensBySeriesId:P,hiddenSeriesIds:S,toggleSeries:v}=b.useChartLegend(r,(e==null?void 0:e.seriesColors)??[],m),g=h.useMemo(()=>r.filter(N=>!S.has(N.id)),[r,S]);h.useEffect(()=>{!s||!e||s.setOption(Y.buildTimeSeriesOption({series:g,displayType:i,line:n,xAxis:o,yAxis:c,theme:e,showSymbols:a,showValueLabels:l,seriesColorOverrides:d,valueFormatter:u}),{notMerge:!0})},[s,e,g,i,n,o,c,a,l,d,u]);const M=C!=="none"&&r.length>0;return t.jsxs("div",{className:j.clsx("time-series-chart",O),...f,children:[M&&t.jsx(L.ChartLegend,{items:q,onToggle:v,onColorChange:T,colorTokensBySeriesId:P,labels:I}),t.jsx("div",{ref:_,className:"time-series-chart__canvas"})]})}exports.TimeSeriesChart=p;
2
2
  //# sourceMappingURL=TimeSeriesChart.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),w=require("../../../../vendor/clsx/dist/clsx.cjs"),c=require("react"),_=require("../chart-palette.cjs"),q=require("../useChartInstance.cjs"),x=require("./top-list-option.cjs");;/* empty css */const M=["value"],P=_.CHART_SERIES_COLOR_TOKENS[0];function A(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function j(t,a){const u=new Set(t.map(e=>e.id)),o=a.filter(e=>u.has(e)),d=t.map(e=>e.id).filter(e=>!o.includes(e));return[...o,...d]}function y({items:t,sort:a="desc",total:u,valueDisplay:o=M,valueFormatter:d,colorToken:e=P,className:C,...L}){const{containerRef:f,chart:p,theme:l,resolveSeriesColor:h}=q.useChartInstance(),R=c.useRef(!1),v=c.useRef([]),[O,T]=c.useState(0),[S,m]=c.useState(0);c.useEffect(()=>{const s=f.current;if(!s)return;const r=new ResizeObserver(()=>{T(s.clientHeight),m(s.clientWidth)});return r.observe(s),()=>r.disconnect()},[f]);const E=O>0,I=x.labeledRowStepFor(O,t.length),b=c.useMemo(()=>{const s=h(e),r=[];return t.forEach(i=>{const n=(i.colorToken?h(i.colorToken):void 0)??s;n&&r.push([i.id,n])}),Object.fromEntries(r)},[t,e,l,h]);return c.useEffect(()=>{if(!p||!l||!E)return;const s=R.current&&!A();v.current=j(t,v.current);const r=new Map(t.map(n=>[n.id,n])),i=v.current.map(n=>r.get(n));p.setOption(x.buildTopListOption({items:i,sort:a,total:u,valueDisplay:o,theme:l,colorsByItemId:b,animate:s,labeledRowStep:I,canvasWidthPx:S,valueFormatter:d}),{replaceMerge:["series","yAxis"]}),R.current=!0},[p,l,t,a,u,o,b,E,I,S,d]),g.jsx("div",{className:w.clsx("top-list",C),...L,children:g.jsx("div",{ref:f,className:"top-list__canvas"})})}exports.TopList=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),w=require("../../../../vendor/clsx/dist/clsx.cjs"),c=require("react"),_=require("../chart-palette.cjs"),q=require("../useChartInstance.cjs"),g=require("./top-list-option.cjs");;/* empty css */const M=["value"],P=_.CHART_SERIES_COLOR_TOKENS[0];function A(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function j(t,a){const u=new Set(t.map(e=>e.id)),o=a.filter(e=>u.has(e)),d=t.map(e=>e.id).filter(e=>!o.includes(e));return[...o,...d]}function y({items:t,sort:a="desc",total:u,valueDisplay:o=M,valueFormatter:d,colorToken:e=P,className:x,...C}){const{containerRef:f,chart:p,theme:l,resolveSeriesColor:h}=q.useChartInstance(),O=c.useRef(!1),v=c.useRef([]),[R,L]=c.useState(0),[S,m]=c.useState(0);c.useEffect(()=>{const r=f.current;if(!r)return;const s=new ResizeObserver(()=>{L(r.clientHeight),m(r.clientWidth)});return s.observe(r),()=>s.disconnect()},[f]);const E=R>0,I=g.labeledRowStepFor(R,t.length),T=c.useMemo(()=>{const r=h(e),s=[];return t.forEach(i=>{const n=(i.colorToken?h(i.colorToken):void 0)??r;n&&s.push([i.id,n])}),Object.fromEntries(s)},[t,e,l,h]);return c.useEffect(()=>{if(!p||!l||!E)return;const r=O.current&&!A();v.current=j(t,v.current);const s=new Map(t.map(n=>[n.id,n])),i=v.current.map(n=>s.get(n));p.setOption(g.buildTopListOption({items:i,sort:a,total:u,valueDisplay:o,theme:l,colorsByItemId:T,animate:r,labeledRowStep:I,canvasWidthPx:S,valueFormatter:d}),{replaceMerge:["series","yAxis"]}),O.current=!0},[p,l,t,a,u,o,T,E,I,S,d]),b.jsx("div",{className:w.clsx("top-list",x),...C,children:b.jsx("div",{ref:f,className:"top-list__canvas"})})}exports.TopList=y;
2
2
  //# sourceMappingURL=TopList.cjs.map
@@ -46,7 +46,7 @@ function b({
46
46
  );
47
47
  return /* @__PURE__ */ s("span", { className: l, ...o, children: h({ initials: e, src: r, alt: n }) });
48
48
  }
49
- const C = u.forwardRef(function({
49
+ const k = u.forwardRef(function({
50
50
  className: r,
51
51
  src: a = null,
52
52
  square: e = !1,
@@ -64,7 +64,7 @@ const C = u.forwardRef(function({
64
64
  a ? "avatar-image" : "avatar-initials"
65
65
  );
66
66
  return /* @__PURE__ */ s(f, { ...l, className: v, ref: c, children: h({ initials: n, src: a, alt: i }) });
67
- }), j = ({
67
+ }), C = ({
68
68
  className: t,
69
69
  children: r,
70
70
  title: a,
@@ -77,7 +77,7 @@ const C = u.forwardRef(function({
77
77
  /* @__PURE__ */ s(g, { slot: "label", children: a }),
78
78
  e && /* @__PURE__ */ s(x, { slot: "description", children: e })
79
79
  ] });
80
- }, k = ({
80
+ }, T = ({
81
81
  className: t,
82
82
  children: r,
83
83
  max: a = 3,
@@ -99,8 +99,8 @@ const C = u.forwardRef(function({
99
99
  };
100
100
  export {
101
101
  b as Avatar,
102
- j as AvatarBlock,
103
- C as AvatarButton,
104
- k as AvatarGroup
102
+ C as AvatarBlock,
103
+ k as AvatarButton,
104
+ T as AvatarGroup
105
105
  };
106
106
  //# sourceMappingURL=Avatar.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),w=require("../../../vendor/clsx/dist/clsx.cjs"),r=require("react"),N=require("../../hooks/useAnimationFrame.cjs"),n=require("./brandLoaderVariants.cjs"),q=require("./brandLoaderSymbolContext.cjs");;/* empty css */const A=require("../../hooks/useMediaQuery.cjs");function B(){return typeof window<"u"&&typeof window.requestAnimationFrame=="function"&&typeof SVGPathElement<"u"&&typeof SVGPathElement.prototype.getPointAtLength=="function"}function S(s,o){return typeof s.getTotalLength=="function"?s.getTotalLength():o}function $({label:s,"aria-hidden":o,variant:t="trace",size:a="32",tone:i="accent",speed:b=1,isPaused:f=!1,symbol:p,className:h,...m}){const g=q.useBrandLoaderSymbol(),c=p??g,x=A.useCustomMediaQuery("(prefers-reduced-motion: reduce)"),d=!f&&!x;return e.jsx("span",{role:o?void 0:"status","aria-label":s,"aria-hidden":o||void 0,className:w.clsx("brand-loader",`brand-loader-size-${a}`,`brand-loader-tone-${i}`,`brand-loader-${c}`,`brand-loader-variant-${t}`,!d&&"brand-loader-paused",h),...m,children:c==="neutral"?e.jsx(C,{}):e.jsx(E,{variant:t,speed:b,isAnimating:d&&B()},t)})}function C(){return e.jsxs("svg",{className:"brand-loader-neutral-glyph",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:[e.jsx("circle",{className:"brand-loader-neutral-track",cx:"12",cy:"12",r:"9"}),e.jsx("circle",{className:"brand-loader-neutral-arc",cx:"12",cy:"12",r:"9",pathLength:100})]})}function E({variant:s,speed:o,isAnimating:t}){const a=n.brandLoaderVariants[s],i=`brand-loader-sweep-${r.useId().replace(/:/g,"")}`,b=r.useRef(null),f=r.useRef(null),p=r.useRef(null),h=r.useRef(null),m=r.useRef(null),g=r.useRef(null),c=r.useRef(null),x=r.useRef(null),d=r.useRef(0),y=r.useRef(null),P=()=>d.current%a.period/a.period;return r.useLayoutEffect(()=>{const u=b.current,l=f.current,L=p.current,R=h.current;if(!u||!l||!L||!R)return;const j={strokes:u,slash:l,big:L,tri:R,ball:m.current,sweepClip:g.current,sweepEdge:c.current,lengths:{slash:S(l,n.brandLoaderPathLengths.slash),big:S(L,n.brandLoaderPathLengths.big),tri:S(R,n.brandLoaderPathLengths.tri)}};x.current=j,y.current=null,t?a.render(d.current%a.period/a.period,j):a.renderRest(j)},[a,t]),N.useAnimationFrame(u=>{const l=x.current;l&&(y.current!==null&&(d.current+=(u-y.current)*o),y.current=u,a.render(P(),l))},t),e.jsxs("svg",{className:"brand-loader-symbol",viewBox:n.brandLoaderViewBox,"aria-hidden":"true",focusable:"false",children:[s==="sweep"&&e.jsx("defs",{children:e.jsx("clipPath",{id:i,children:e.jsx("polygon",{ref:g})})}),e.jsxs("g",{ref:b,className:"brand-loader-strokes",clipPath:s==="sweep"?`url(#${i})`:void 0,children:[s==="comet"&&e.jsxs("g",{className:"brand-loader-ghost",children:[e.jsx("path",{d:n.brandLoaderSymbolPaths.slash}),e.jsx("path",{d:n.brandLoaderSymbolPaths.big}),e.jsx("path",{d:n.brandLoaderSymbolPaths.tri})]}),e.jsx("path",{ref:f,className:"brand-loader-piece brand-loader-slash",d:n.brandLoaderSymbolPaths.slash}),e.jsx("path",{ref:p,className:"brand-loader-piece brand-loader-big",d:n.brandLoaderSymbolPaths.big}),e.jsx("path",{ref:h,className:"brand-loader-piece brand-loader-tri",d:n.brandLoaderSymbolPaths.tri})]}),s==="bounce"&&e.jsx("ellipse",{ref:m,className:"brand-loader-ball"}),s==="sweep"&&e.jsx("line",{ref:c,className:"brand-loader-sweep-edge"})]})}exports.BrandLoader=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),w=require("../../../vendor/clsx/dist/clsx.cjs"),r=require("react"),N=require("../../hooks/useAnimationFrame.cjs"),n=require("./brandLoaderVariants.cjs"),q=require("./brandLoaderSymbolContext.cjs");;/* empty css */const $=require("../../hooks/useMediaQuery.cjs");function A(){return typeof window<"u"&&typeof window.requestAnimationFrame=="function"&&typeof SVGPathElement<"u"&&typeof SVGPathElement.prototype.getPointAtLength=="function"}function S(s,o){return typeof s.getTotalLength=="function"?s.getTotalLength():o}function B({label:s,"aria-hidden":o,variant:t="trace",size:a="32",tone:i="accent",speed:b=1,isPaused:f=!1,symbol:p,className:h,...m}){const g=q.useBrandLoaderSymbol(),c=p??g,x=$.useCustomMediaQuery("(prefers-reduced-motion: reduce)"),d=!f&&!x;return e.jsx("span",{role:o?void 0:"status","aria-label":s,"aria-hidden":o||void 0,className:w.clsx("brand-loader",`brand-loader-size-${a}`,`brand-loader-tone-${i}`,`brand-loader-${c}`,`brand-loader-variant-${t}`,!d&&"brand-loader-paused",h),...m,children:c==="neutral"?e.jsx(k,{}):e.jsx(C,{variant:t,speed:b,isAnimating:d&&A()},t)})}function k(){return e.jsxs("svg",{className:"brand-loader-neutral-glyph",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:[e.jsx("circle",{className:"brand-loader-neutral-track",cx:"12",cy:"12",r:"9"}),e.jsx("circle",{className:"brand-loader-neutral-arc",cx:"12",cy:"12",r:"9",pathLength:100})]})}function C({variant:s,speed:o,isAnimating:t}){const a=n.brandLoaderVariants[s],i=`brand-loader-sweep-${r.useId().replace(/:/g,"")}`,b=r.useRef(null),f=r.useRef(null),p=r.useRef(null),h=r.useRef(null),m=r.useRef(null),g=r.useRef(null),c=r.useRef(null),x=r.useRef(null),d=r.useRef(0),y=r.useRef(null),P=()=>d.current%a.period/a.period;return r.useLayoutEffect(()=>{const u=b.current,l=f.current,L=p.current,R=h.current;if(!u||!l||!L||!R)return;const j={strokes:u,slash:l,big:L,tri:R,ball:m.current,sweepClip:g.current,sweepEdge:c.current,lengths:{slash:S(l,n.brandLoaderPathLengths.slash),big:S(L,n.brandLoaderPathLengths.big),tri:S(R,n.brandLoaderPathLengths.tri)}};x.current=j,y.current=null,t?a.render(d.current%a.period/a.period,j):a.renderRest(j)},[a,t]),N.useAnimationFrame(u=>{const l=x.current;l&&(y.current!==null&&(d.current+=(u-y.current)*o),y.current=u,a.render(P(),l))},t),e.jsxs("svg",{className:"brand-loader-symbol",viewBox:n.brandLoaderViewBox,"aria-hidden":"true",focusable:"false",children:[s==="sweep"&&e.jsx("defs",{children:e.jsx("clipPath",{id:i,children:e.jsx("polygon",{ref:g})})}),e.jsxs("g",{ref:b,className:"brand-loader-strokes",clipPath:s==="sweep"?`url(#${i})`:void 0,children:[s==="comet"&&e.jsxs("g",{className:"brand-loader-ghost",children:[e.jsx("path",{d:n.brandLoaderSymbolPaths.slash}),e.jsx("path",{d:n.brandLoaderSymbolPaths.big}),e.jsx("path",{d:n.brandLoaderSymbolPaths.tri})]}),e.jsx("path",{ref:f,className:"brand-loader-piece brand-loader-slash",d:n.brandLoaderSymbolPaths.slash}),e.jsx("path",{ref:p,className:"brand-loader-piece brand-loader-big",d:n.brandLoaderSymbolPaths.big}),e.jsx("path",{ref:h,className:"brand-loader-piece brand-loader-tri",d:n.brandLoaderSymbolPaths.tri})]}),s==="bounce"&&e.jsx("ellipse",{ref:m,className:"brand-loader-ball"}),s==="sweep"&&e.jsx("line",{ref:c,className:"brand-loader-sweep-edge"})]})}exports.BrandLoader=B;
2
2
  //# sourceMappingURL=BrandLoader.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.cjs","sources":["../../../../../src/ui/primitives/Button/Button.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport React, { ComponentPropsWithoutRef } from \"react\";\nimport {\n Button as RACButton,\n Link as RACLink,\n type ButtonProps as RACButtonProps,\n} from \"react-aria-components\";\nimport { type AnchorOrButtonProps } from \"utils\";\nimport { BrandLoader } from \"../BrandLoader/BrandLoader\";\nimport \"./button.css\";\n\nconst pendingIndicator = (\n <BrandLoader aria-hidden variant=\"pulse\" size=\"16\" tone=\"current\" />\n);\n\nfunction withPendingIndicator(\n children: RACButtonProps[\"children\"],\n isPending: boolean | undefined,\n): RACButtonProps[\"children\"] {\n if (!isPending) return children;\n return (renderProps) => (\n <>\n {pendingIndicator}\n {typeof children === \"function\" ? children(renderProps) : children}\n </>\n );\n}\n\nexport type ButtonProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"danger-primary\" | \"danger-subtle\"\n >;\n};\nexport const Button = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...sharedProps}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...sharedProps}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\nexport type ButtonDangerProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"primary\" | \"subtle\" | \"neutral\" | \"text\"\n >;\n};\n/**\n * Only used for destructive actions\n */\nexport const ButtonDanger = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"danger-primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonDangerProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...sharedProps}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...sharedProps}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\ntype ButtonBaseProps = {\n type?: ComponentPropsWithoutRef<\"button\">[\"type\"];\n isPending?: boolean;\n size?: \"small\" | \"medium\";\n variant?:\n | \"primary\"\n | \"neutral\"\n | \"subtle\"\n | \"text\"\n | \"danger-primary\"\n | \"danger-subtle\";\n} & AnchorOrButtonProps;\n\nfunction isAnchorProps(\n props: ButtonBaseProps | ButtonDangerProps,\n): props is (ButtonBaseProps | ButtonDangerProps) &\n ComponentPropsWithoutRef<typeof RACLink> {\n return \"href\" in props;\n}\n\nexport type ButtonGroupProps = React.ComponentPropsWithoutRef<\"div\"> & {\n align?: \"start\" | \"end\" | \"center\" | \"justify\" | \"stack\";\n};\nexport const ButtonGroup = ({\n align = \"start\",\n className,\n ...props\n}: ButtonGroupProps) => {\n const classNames = clsx(\n className,\n \"button-group\",\n `button-group-align-${align}`,\n );\n return <div className={classNames} {...props} />;\n};\n"],"names":["pendingIndicator","jsx","BrandLoader","withPendingIndicator","children","isPending","renderProps","jsxs","Fragment","Button","React","className","size","variant","isDisabled","props","ref","classNames","clsx","style","sharedProps","isAnchorProps","RACLink","RACButton","ButtonDanger","ButtonGroup","align"],"mappings":"mSAWA,MAAMA,EACJC,EAAAA,IAACC,cAAA,CAAY,cAAW,GAAC,QAAQ,QAAQ,KAAK,KAAK,KAAK,SAAA,CAAU,EAGpE,SAASC,EACPC,EACAC,EAC4B,CAC5B,OAAKA,EACGC,GACNC,EAAAA,KAAAC,EAAAA,SAAA,CACG,SAAA,CAAAR,EACA,OAAOI,GAAa,WAAaA,EAASE,CAAW,EAAIF,CAAA,EAC5D,EALqBA,CAOzB,CAQO,MAAMK,EAASC,EAAM,WAAW,SACrC,CACE,UAAAC,EACA,KAAAC,EAAO,SACP,QAAAC,EAAU,UACV,UAAAR,EACA,WAAAS,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAaC,EAAAA,KACjBP,EACA,SACA,eAAeC,CAAI,GACnB,kBAAkBC,CAAO,EAAA,EAGrB,CAAE,MAAAM,EAAO,GAAGC,CAAA,EAAgBL,EAElC,OAAOM,EAAcN,CAAK,EACxBd,EAAAA,IAACqB,EAAAA,KAAA,CACE,GAAGF,EACJ,WAAAN,EACA,UAAWG,EACX,IAAAD,EAEC,SAAAD,EAAM,QAAA,CAAA,EAGTd,EAAAA,IAACsB,EAAAA,OAAA,CACE,GAAGH,EACJ,UAAWH,EACX,UAAAZ,EACA,WAAAS,EACA,IAAAE,EAEC,SAAAb,EAAqBY,EAAM,SAAUV,CAAS,CAAA,CAAA,CAGrD,CAAC,EAWYmB,EAAed,EAAM,WAAW,SAC3C,CACE,UAAAC,EACA,KAAAC,EAAO,SACP,QAAAC,EAAU,iBACV,UAAAR,EACA,WAAAS,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAaC,EAAAA,KACjBP,EACA,SACA,eAAeC,CAAI,GACnB,kBAAkBC,CAAO,EAAA,EAGrB,CAAE,MAAAM,EAAO,GAAGC,CAAA,EAAgBL,EAElC,OAAOM,EAAcN,CAAK,EACxBd,EAAAA,IAACqB,EAAAA,KAAA,CACE,GAAGF,EACJ,WAAAN,EACA,UAAWG,EACX,IAAAD,EAEC,SAAAD,EAAM,QAAA,CAAA,EAGTd,EAAAA,IAACsB,EAAAA,OAAA,CACE,GAAGH,EACJ,UAAWH,EACX,UAAAZ,EACA,WAAAS,EACA,IAAAE,EAEC,SAAAb,EAAqBY,EAAM,SAAUV,CAAS,CAAA,CAAA,CAGrD,CAAC,EAeD,SAASgB,EACPN,EAEyC,CACzC,MAAO,SAAUA,CACnB,CAKO,MAAMU,EAAc,CAAC,CAC1B,MAAAC,EAAQ,QACR,UAAAf,EACA,GAAGI,CACL,IAAwB,CACtB,MAAME,EAAaC,EAAAA,KACjBP,EACA,eACA,sBAAsBe,CAAK,EAAA,EAE7B,OAAOzB,EAAAA,IAAC,MAAA,CAAI,UAAWgB,EAAa,GAAGF,EAAO,CAChD"}
1
+ {"version":3,"file":"Button.cjs","sources":["../../../../../src/ui/primitives/Button/Button.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport React, { ComponentPropsWithoutRef } from \"react\";\nimport {\n Button as RACButton,\n Link as RACLink,\n type ButtonProps as RACButtonProps,\n type LinkProps as RACLinkProps,\n} from \"react-aria-components\";\nimport { type AnchorOrButtonProps } from \"utils\";\nimport { BrandLoader } from \"../BrandLoader/BrandLoader\";\nimport \"./button.css\";\n\nconst pendingIndicator = (\n <BrandLoader aria-hidden variant=\"pulse\" size=\"16\" tone=\"current\" />\n);\n\nfunction withPendingIndicator(\n children: RACButtonProps[\"children\"],\n isPending: boolean | undefined,\n): RACButtonProps[\"children\"] {\n if (!isPending) return children;\n return (renderProps) => (\n <>\n {pendingIndicator}\n {typeof children === \"function\" ? children(renderProps) : children}\n </>\n );\n}\n\nexport type ButtonProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"danger-primary\" | \"danger-subtle\"\n >;\n};\nexport const Button = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...(sharedProps as RACLinkProps)}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...(sharedProps as RACButtonProps)}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\nexport type ButtonDangerProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"primary\" | \"subtle\" | \"neutral\" | \"text\"\n >;\n};\n/**\n * Only used for destructive actions\n */\nexport const ButtonDanger = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"danger-primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonDangerProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...(sharedProps as RACLinkProps)}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...(sharedProps as RACButtonProps)}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\ntype ButtonBaseProps = {\n type?: ComponentPropsWithoutRef<\"button\">[\"type\"];\n isPending?: boolean;\n size?: \"small\" | \"medium\";\n variant?:\n | \"primary\"\n | \"neutral\"\n | \"subtle\"\n | \"text\"\n | \"danger-primary\"\n | \"danger-subtle\";\n} & AnchorOrButtonProps;\n\nfunction isAnchorProps(\n props: ButtonBaseProps | ButtonDangerProps,\n): props is (ButtonBaseProps | ButtonDangerProps) &\n ComponentPropsWithoutRef<typeof RACLink> {\n return \"href\" in props;\n}\n\nexport type ButtonGroupProps = React.ComponentPropsWithoutRef<\"div\"> & {\n align?: \"start\" | \"end\" | \"center\" | \"justify\" | \"stack\";\n};\nexport const ButtonGroup = ({\n align = \"start\",\n className,\n ...props\n}: ButtonGroupProps) => {\n const classNames = clsx(\n className,\n \"button-group\",\n `button-group-align-${align}`,\n );\n return <div className={classNames} {...props} />;\n};\n"],"names":["pendingIndicator","jsx","BrandLoader","withPendingIndicator","children","isPending","renderProps","jsxs","Fragment","Button","React","className","size","variant","isDisabled","props","ref","classNames","clsx","style","sharedProps","isAnchorProps","RACLink","RACButton","ButtonDanger","ButtonGroup","align"],"mappings":"mSAYA,MAAMA,EACJC,EAAAA,IAACC,cAAA,CAAY,cAAW,GAAC,QAAQ,QAAQ,KAAK,KAAK,KAAK,SAAA,CAAU,EAGpE,SAASC,EACPC,EACAC,EAC4B,CAC5B,OAAKA,EACGC,GACNC,EAAAA,KAAAC,EAAAA,SAAA,CACG,SAAA,CAAAR,EACA,OAAOI,GAAa,WAAaA,EAASE,CAAW,EAAIF,CAAA,EAC5D,EALqBA,CAOzB,CAQO,MAAMK,EAASC,EAAM,WAAW,SACrC,CACE,UAAAC,EACA,KAAAC,EAAO,SACP,QAAAC,EAAU,UACV,UAAAR,EACA,WAAAS,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAaC,EAAAA,KACjBP,EACA,SACA,eAAeC,CAAI,GACnB,kBAAkBC,CAAO,EAAA,EAGrB,CAAE,MAAAM,EAAO,GAAGC,CAAA,EAAgBL,EAElC,OAAOM,EAAcN,CAAK,EACxBd,EAAAA,IAACqB,EAAAA,KAAA,CACE,GAAIF,EACL,WAAAN,EACA,UAAWG,EACX,IAAAD,EAEC,SAAAD,EAAM,QAAA,CAAA,EAGTd,EAAAA,IAACsB,EAAAA,OAAA,CACE,GAAIH,EACL,UAAWH,EACX,UAAAZ,EACA,WAAAS,EACA,IAAAE,EAEC,SAAAb,EAAqBY,EAAM,SAAUV,CAAS,CAAA,CAAA,CAGrD,CAAC,EAWYmB,EAAed,EAAM,WAAW,SAC3C,CACE,UAAAC,EACA,KAAAC,EAAO,SACP,QAAAC,EAAU,iBACV,UAAAR,EACA,WAAAS,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAaC,EAAAA,KACjBP,EACA,SACA,eAAeC,CAAI,GACnB,kBAAkBC,CAAO,EAAA,EAGrB,CAAE,MAAAM,EAAO,GAAGC,CAAA,EAAgBL,EAElC,OAAOM,EAAcN,CAAK,EACxBd,EAAAA,IAACqB,EAAAA,KAAA,CACE,GAAIF,EACL,WAAAN,EACA,UAAWG,EACX,IAAAD,EAEC,SAAAD,EAAM,QAAA,CAAA,EAGTd,EAAAA,IAACsB,EAAAA,OAAA,CACE,GAAIH,EACL,UAAWH,EACX,UAAAZ,EACA,WAAAS,EACA,IAAAE,EAEC,SAAAb,EAAqBY,EAAM,SAAUV,CAAS,CAAA,CAAA,CAGrD,CAAC,EAeD,SAASgB,EACPN,EAEyC,CACzC,MAAO,SAAUA,CACnB,CAKO,MAAMU,EAAc,CAAC,CAC1B,MAAAC,EAAQ,QACR,UAAAf,EACA,GAAGI,CACL,IAAwB,CACtB,MAAME,EAAaC,EAAAA,KACjBP,EACA,eACA,sBAAsBe,CAAK,EAAA,EAE7B,OAAOzB,EAAAA,IAAC,MAAA,CAAI,UAAWgB,EAAa,GAAGF,EAAO,CAChD"}
@@ -1,12 +1,12 @@
1
- import { jsx as e, jsxs as g, Fragment as p } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as b, Fragment as g } from "react/jsx-runtime";
2
2
  import { clsx as d } from "../../../vendor/clsx/dist/clsx.js";
3
3
  import l from "react";
4
4
  import { Link as f, Button as h } from "react-aria-components";
5
- import { BrandLoader as $ } from "../BrandLoader/BrandLoader.js";
5
+ import { BrandLoader as p } from "../BrandLoader/BrandLoader.js";
6
6
  /* empty css */
7
- const y = /* @__PURE__ */ e($, { "aria-hidden": !0, variant: "pulse", size: "16", tone: "current" });
7
+ const y = /* @__PURE__ */ e(p, { "aria-hidden": !0, variant: "pulse", size: "16", tone: "current" });
8
8
  function B(t, r) {
9
- return r ? (o) => /* @__PURE__ */ g(p, { children: [
9
+ return r ? (o) => /* @__PURE__ */ b(g, { children: [
10
10
  y,
11
11
  typeof t == "function" ? t(o) : t
12
12
  ] }) : t;
@@ -24,7 +24,7 @@ const I = l.forwardRef(function({
24
24
  "button",
25
25
  `button-size-${o}`,
26
26
  `button-variant-${a}`
27
- ), { style: b, ...m } = n;
27
+ ), { style: $, ...m } = n;
28
28
  return N(n) ? /* @__PURE__ */ e(
29
29
  f,
30
30
  {
@@ -58,7 +58,7 @@ const I = l.forwardRef(function({
58
58
  "button",
59
59
  `button-size-${o}`,
60
60
  `button-variant-${a}`
61
- ), { style: b, ...m } = n;
61
+ ), { style: $, ...m } = n;
62
62
  return N(n) ? /* @__PURE__ */ e(
63
63
  f,
64
64
  {
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../../../src/ui/primitives/Button/Button.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport React, { ComponentPropsWithoutRef } from \"react\";\nimport {\n Button as RACButton,\n Link as RACLink,\n type ButtonProps as RACButtonProps,\n} from \"react-aria-components\";\nimport { type AnchorOrButtonProps } from \"utils\";\nimport { BrandLoader } from \"../BrandLoader/BrandLoader\";\nimport \"./button.css\";\n\nconst pendingIndicator = (\n <BrandLoader aria-hidden variant=\"pulse\" size=\"16\" tone=\"current\" />\n);\n\nfunction withPendingIndicator(\n children: RACButtonProps[\"children\"],\n isPending: boolean | undefined,\n): RACButtonProps[\"children\"] {\n if (!isPending) return children;\n return (renderProps) => (\n <>\n {pendingIndicator}\n {typeof children === \"function\" ? children(renderProps) : children}\n </>\n );\n}\n\nexport type ButtonProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"danger-primary\" | \"danger-subtle\"\n >;\n};\nexport const Button = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...sharedProps}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...sharedProps}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\nexport type ButtonDangerProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"primary\" | \"subtle\" | \"neutral\" | \"text\"\n >;\n};\n/**\n * Only used for destructive actions\n */\nexport const ButtonDanger = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"danger-primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonDangerProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...sharedProps}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...sharedProps}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\ntype ButtonBaseProps = {\n type?: ComponentPropsWithoutRef<\"button\">[\"type\"];\n isPending?: boolean;\n size?: \"small\" | \"medium\";\n variant?:\n | \"primary\"\n | \"neutral\"\n | \"subtle\"\n | \"text\"\n | \"danger-primary\"\n | \"danger-subtle\";\n} & AnchorOrButtonProps;\n\nfunction isAnchorProps(\n props: ButtonBaseProps | ButtonDangerProps,\n): props is (ButtonBaseProps | ButtonDangerProps) &\n ComponentPropsWithoutRef<typeof RACLink> {\n return \"href\" in props;\n}\n\nexport type ButtonGroupProps = React.ComponentPropsWithoutRef<\"div\"> & {\n align?: \"start\" | \"end\" | \"center\" | \"justify\" | \"stack\";\n};\nexport const ButtonGroup = ({\n align = \"start\",\n className,\n ...props\n}: ButtonGroupProps) => {\n const classNames = clsx(\n className,\n \"button-group\",\n `button-group-align-${align}`,\n );\n return <div className={classNames} {...props} />;\n};\n"],"names":["pendingIndicator","jsx","BrandLoader","withPendingIndicator","children","isPending","renderProps","jsxs","Fragment","Button","React","className","size","variant","isDisabled","props","ref","classNames","clsx","style","sharedProps","isAnchorProps","RACLink","RACButton","ButtonDanger","ButtonGroup","align"],"mappings":";;;;;;AAWA,MAAMA,IACJ,gBAAAC,EAACC,GAAA,EAAY,eAAW,IAAC,SAAQ,SAAQ,MAAK,MAAK,MAAK,UAAA,CAAU;AAGpE,SAASC,EACPC,GACAC,GAC4B;AAC5B,SAAKA,IACE,CAACC,MACN,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAR;AAAA,IACA,OAAOI,KAAa,aAAaA,EAASE,CAAW,IAAIF;AAAA,EAAA,GAC5D,IALqBA;AAOzB;AAQO,MAAMK,IAASC,EAAM,WAAW,SACrC;AAAA,EACE,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAR;AAAA,EACA,YAAAS;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAaC;AAAA,IACjBP;AAAA,IACA;AAAA,IACA,eAAeC,CAAI;AAAA,IACnB,kBAAkBC,CAAO;AAAA,EAAA,GAGrB,EAAE,OAAAM,GAAO,GAAGC,EAAA,IAAgBL;AAElC,SAAOM,EAAcN,CAAK,IACxB,gBAAAd;AAAA,IAACqB;AAAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,YAAAN;AAAA,MACA,WAAWG;AAAA,MACX,KAAAD;AAAA,MAEC,UAAAD,EAAM;AAAA,IAAA;AAAA,EAAA,IAGT,gBAAAd;AAAA,IAACsB;AAAAA,IAAA;AAAA,MACE,GAAGH;AAAA,MACJ,WAAWH;AAAA,MACX,WAAAZ;AAAA,MACA,YAAAS;AAAA,MACA,KAAAE;AAAA,MAEC,UAAAb,EAAqBY,EAAM,UAAUV,CAAS;AAAA,IAAA;AAAA,EAAA;AAGrD,CAAC,GAWYmB,IAAed,EAAM,WAAW,SAC3C;AAAA,EACE,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAR;AAAA,EACA,YAAAS;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAaC;AAAA,IACjBP;AAAA,IACA;AAAA,IACA,eAAeC,CAAI;AAAA,IACnB,kBAAkBC,CAAO;AAAA,EAAA,GAGrB,EAAE,OAAAM,GAAO,GAAGC,EAAA,IAAgBL;AAElC,SAAOM,EAAcN,CAAK,IACxB,gBAAAd;AAAA,IAACqB;AAAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,YAAAN;AAAA,MACA,WAAWG;AAAA,MACX,KAAAD;AAAA,MAEC,UAAAD,EAAM;AAAA,IAAA;AAAA,EAAA,IAGT,gBAAAd;AAAA,IAACsB;AAAAA,IAAA;AAAA,MACE,GAAGH;AAAA,MACJ,WAAWH;AAAA,MACX,WAAAZ;AAAA,MACA,YAAAS;AAAA,MACA,KAAAE;AAAA,MAEC,UAAAb,EAAqBY,EAAM,UAAUV,CAAS;AAAA,IAAA;AAAA,EAAA;AAGrD,CAAC;AAeD,SAASgB,EACPN,GAEyC;AACzC,SAAO,UAAUA;AACnB;AAKO,MAAMU,IAAc,CAAC;AAAA,EAC1B,OAAAC,IAAQ;AAAA,EACR,WAAAf;AAAA,EACA,GAAGI;AACL,MAAwB;AACtB,QAAME,IAAaC;AAAA,IACjBP;AAAA,IACA;AAAA,IACA,sBAAsBe,CAAK;AAAA,EAAA;AAE7B,SAAO,gBAAAzB,EAAC,OAAA,EAAI,WAAWgB,GAAa,GAAGF,GAAO;AAChD;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../../../src/ui/primitives/Button/Button.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport React, { ComponentPropsWithoutRef } from \"react\";\nimport {\n Button as RACButton,\n Link as RACLink,\n type ButtonProps as RACButtonProps,\n type LinkProps as RACLinkProps,\n} from \"react-aria-components\";\nimport { type AnchorOrButtonProps } from \"utils\";\nimport { BrandLoader } from \"../BrandLoader/BrandLoader\";\nimport \"./button.css\";\n\nconst pendingIndicator = (\n <BrandLoader aria-hidden variant=\"pulse\" size=\"16\" tone=\"current\" />\n);\n\nfunction withPendingIndicator(\n children: RACButtonProps[\"children\"],\n isPending: boolean | undefined,\n): RACButtonProps[\"children\"] {\n if (!isPending) return children;\n return (renderProps) => (\n <>\n {pendingIndicator}\n {typeof children === \"function\" ? children(renderProps) : children}\n </>\n );\n}\n\nexport type ButtonProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"danger-primary\" | \"danger-subtle\"\n >;\n};\nexport const Button = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...(sharedProps as RACLinkProps)}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...(sharedProps as RACButtonProps)}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\nexport type ButtonDangerProps = Omit<ButtonBaseProps, \"variant\"> & {\n variant?: Exclude<\n ButtonBaseProps[\"variant\"],\n \"primary\" | \"subtle\" | \"neutral\" | \"text\"\n >;\n};\n/**\n * Only used for destructive actions\n */\nexport const ButtonDanger = React.forwardRef(function Button(\n {\n className,\n size = \"medium\",\n variant = \"danger-primary\",\n isPending,\n isDisabled,\n ...props\n }: ButtonDangerProps,\n ref: React.ForwardedRef<HTMLElement>,\n) {\n const classNames = clsx(\n className,\n \"button\",\n `button-size-${size}`,\n `button-variant-${variant}`,\n );\n\n const { style, ...sharedProps } = props;\n\n return isAnchorProps(props) ? (\n <RACLink\n {...(sharedProps as RACLinkProps)}\n isDisabled={isDisabled}\n className={classNames}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n >\n {props.children}\n </RACLink>\n ) : (\n <RACButton\n {...(sharedProps as RACButtonProps)}\n className={classNames}\n isPending={isPending}\n isDisabled={isDisabled}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n >\n {withPendingIndicator(props.children, isPending)}\n </RACButton>\n );\n});\n\ntype ButtonBaseProps = {\n type?: ComponentPropsWithoutRef<\"button\">[\"type\"];\n isPending?: boolean;\n size?: \"small\" | \"medium\";\n variant?:\n | \"primary\"\n | \"neutral\"\n | \"subtle\"\n | \"text\"\n | \"danger-primary\"\n | \"danger-subtle\";\n} & AnchorOrButtonProps;\n\nfunction isAnchorProps(\n props: ButtonBaseProps | ButtonDangerProps,\n): props is (ButtonBaseProps | ButtonDangerProps) &\n ComponentPropsWithoutRef<typeof RACLink> {\n return \"href\" in props;\n}\n\nexport type ButtonGroupProps = React.ComponentPropsWithoutRef<\"div\"> & {\n align?: \"start\" | \"end\" | \"center\" | \"justify\" | \"stack\";\n};\nexport const ButtonGroup = ({\n align = \"start\",\n className,\n ...props\n}: ButtonGroupProps) => {\n const classNames = clsx(\n className,\n \"button-group\",\n `button-group-align-${align}`,\n );\n return <div className={classNames} {...props} />;\n};\n"],"names":["pendingIndicator","jsx","BrandLoader","withPendingIndicator","children","isPending","renderProps","jsxs","Fragment","Button","React","className","size","variant","isDisabled","props","ref","classNames","clsx","style","sharedProps","isAnchorProps","RACLink","RACButton","ButtonDanger","ButtonGroup","align"],"mappings":";;;;;;AAYA,MAAMA,IACJ,gBAAAC,EAACC,GAAA,EAAY,eAAW,IAAC,SAAQ,SAAQ,MAAK,MAAK,MAAK,UAAA,CAAU;AAGpE,SAASC,EACPC,GACAC,GAC4B;AAC5B,SAAKA,IACE,CAACC,MACN,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAR;AAAA,IACA,OAAOI,KAAa,aAAaA,EAASE,CAAW,IAAIF;AAAA,EAAA,GAC5D,IALqBA;AAOzB;AAQO,MAAMK,IAASC,EAAM,WAAW,SACrC;AAAA,EACE,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAR;AAAA,EACA,YAAAS;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAaC;AAAA,IACjBP;AAAA,IACA;AAAA,IACA,eAAeC,CAAI;AAAA,IACnB,kBAAkBC,CAAO;AAAA,EAAA,GAGrB,EAAE,OAAAM,GAAO,GAAGC,EAAA,IAAgBL;AAElC,SAAOM,EAAcN,CAAK,IACxB,gBAAAd;AAAA,IAACqB;AAAAA,IAAA;AAAA,MACE,GAAIF;AAAA,MACL,YAAAN;AAAA,MACA,WAAWG;AAAA,MACX,KAAAD;AAAA,MAEC,UAAAD,EAAM;AAAA,IAAA;AAAA,EAAA,IAGT,gBAAAd;AAAA,IAACsB;AAAAA,IAAA;AAAA,MACE,GAAIH;AAAA,MACL,WAAWH;AAAA,MACX,WAAAZ;AAAA,MACA,YAAAS;AAAA,MACA,KAAAE;AAAA,MAEC,UAAAb,EAAqBY,EAAM,UAAUV,CAAS;AAAA,IAAA;AAAA,EAAA;AAGrD,CAAC,GAWYmB,IAAed,EAAM,WAAW,SAC3C;AAAA,EACE,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAR;AAAA,EACA,YAAAS;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAaC;AAAA,IACjBP;AAAA,IACA;AAAA,IACA,eAAeC,CAAI;AAAA,IACnB,kBAAkBC,CAAO;AAAA,EAAA,GAGrB,EAAE,OAAAM,GAAO,GAAGC,EAAA,IAAgBL;AAElC,SAAOM,EAAcN,CAAK,IACxB,gBAAAd;AAAA,IAACqB;AAAAA,IAAA;AAAA,MACE,GAAIF;AAAA,MACL,YAAAN;AAAA,MACA,WAAWG;AAAA,MACX,KAAAD;AAAA,MAEC,UAAAD,EAAM;AAAA,IAAA;AAAA,EAAA,IAGT,gBAAAd;AAAA,IAACsB;AAAAA,IAAA;AAAA,MACE,GAAIH;AAAA,MACL,WAAWH;AAAA,MACX,WAAAZ;AAAA,MACA,YAAAS;AAAA,MACA,KAAAE;AAAA,MAEC,UAAAb,EAAqBY,EAAM,UAAUV,CAAS;AAAA,IAAA;AAAA,EAAA;AAGrD,CAAC;AAeD,SAASgB,EACPN,GAEyC;AACzC,SAAO,UAAUA;AACnB;AAKO,MAAMU,IAAc,CAAC;AAAA,EAC1B,OAAAC,IAAQ;AAAA,EACR,WAAAf;AAAA,EACA,GAAGI;AACL,MAAwB;AACtB,QAAME,IAAaC;AAAA,IACjBP;AAAA,IACA;AAAA,IACA,sBAAsBe,CAAK;AAAA,EAAA;AAE7B,SAAO,gBAAAzB,EAAC,OAAA,EAAI,WAAWgB,GAAa,GAAGF,GAAO;AAChD;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react");;/* empty css */const a=require("../IconButton/IconButton.cjs"),l=require("../../icons/IconCheck.cjs"),d=require("../../icons/IconCopy.cjs");function u({text:c,copyLabel:n="Copy",copiedLabel:i="Copied"}){const[o,t]=r.useState(!1);function s(){navigator.clipboard.writeText(c).then(()=>{t(!0),setTimeout(()=>t(!1),2e3)}).catch(()=>{})}return e.jsxs("div",{className:"codeblock","data-copied":o||void 0,children:[e.jsx("code",{className:"codeblock-text",children:c}),e.jsx(a.IconButton,{"aria-label":o?i:n,variant:"subtle",size:"small",onPress:s,children:o?e.jsx(l.IconCheck,{}):e.jsx(d.IconCopy,{})})]})}exports.CodeBlock=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react");;/* empty css */const a=require("../IconButton/IconButton.cjs"),l=require("../../icons/IconCheck.cjs"),d=require("../../icons/IconCopy.cjs");function u({text:c,copyLabel:n="Copy",copiedLabel:r="Copied"}){const[o,t]=s.useState(!1);function i(){navigator.clipboard.writeText(c).then(()=>{t(!0),setTimeout(()=>t(!1),2e3)}).catch(()=>{})}return e.jsxs("div",{className:"codeblock","data-copied":o||void 0,children:[e.jsx("code",{className:"codeblock-text",children:c}),e.jsx(a.IconButton,{"aria-label":o?r:n,variant:"subtle",size:"small",onPress:i,children:o?e.jsx(l.IconCheck,{}):e.jsx(d.IconCopy,{})})]})}exports.CodeBlock=u;
2
2
  //# sourceMappingURL=CodeBlock.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("../../../vendor/clsx/dist/clsx.cjs"),u=require("react"),F=require("../../../vendor/@monaco-editor/react/dist/index.cjs");;/* empty css */const m=require("../Fieldset/Fieldset.cjs"),g=require("../Button/Button.cjs");function j({value:d,defaultValue:s,onChange:o,language:i="javascript",theme:n="vs",height:r="300px",isDisabled:t=!1,isReadOnly:a=!1,options:f,className:p,editorRef:l}){const[c,v]=u.useState(!1),E=u.useRef(null);function N(x,B){l&&(l.current=x),x.onDidFocusEditorWidget(()=>v(!0)),x.onDidBlurEditorWidget(()=>v(!1))}const C=h.clsx("code-editor-wrapper",p,{"code-editor-focused":c,"code-editor-disabled":t});return e.jsx("div",{ref:E,className:C,"data-disabled":t||void 0,style:{height:r},children:e.jsx(F.default,{height:"100%",value:d,defaultValue:s,language:i,theme:n,onChange:o,onMount:N,loading:e.jsx("div",{className:"code-editor-loading"}),options:{readOnly:a||t,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbersMinChars:3,...f}})})}function q({className:d,label:s,description:o,errorMessage:i,...n}){const r=u.useId(),t=h.clsx(d,"field");return e.jsxs("div",{className:t,children:[s&&e.jsx(m.Label,{htmlFor:r,children:s}),e.jsx(j,{...n}),o&&e.jsx(m.Description,{children:o}),i&&typeof i=="string"&&e.jsx(m.FieldError,{children:i})]})}const y="Clique no editor e pressione F1 para visualizar os atalhos do teclado";function R({title:d,shortcutHint:s=y,onBeautify:o,className:i,isDisabled:n=!1,isReadOnly:r=!1,...t}){const a=u.useRef(null),f=!n&&!r;function p(){var l,c;if(o){o();return}(c=(l=a.current)==null?void 0:l.getAction("editor.action.formatDocument"))==null||c.run()}return e.jsxs("div",{className:h.clsx("code-editor-panel",i),children:[f&&e.jsxs("div",{className:"code-editor-panel-header",children:[e.jsxs("div",{className:"code-editor-panel-title-group",children:[e.jsx("span",{className:"code-editor-panel-title",children:d}),s&&e.jsxs("span",{className:"code-editor-panel-hint",children:["(",s,")"]})]}),e.jsx(g.Button,{size:"small",variant:"primary",onPress:p,children:"Beautify"})]}),e.jsx(j,{...t,isDisabled:n,isReadOnly:r,editorRef:a})]})}exports.CodeEditor=j;exports.CodeEditorField=q;exports.CodeEditorPanel=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("../../../vendor/clsx/dist/clsx.cjs"),u=require("react"),F=require("../../../vendor/@monaco-editor/react/dist/index.cjs");;/* empty css */const m=require("../Fieldset/Fieldset.cjs"),g=require("../Button/Button.cjs");function j({value:d,defaultValue:s,onChange:o,language:i="javascript",theme:n="vs",height:r="300px",isDisabled:t=!1,isReadOnly:a=!1,options:f,className:p,editorRef:l}){const[c,v]=u.useState(!1),E=u.useRef(null);function N(x,B){l&&(l.current=x),x.onDidFocusEditorWidget(()=>v(!0)),x.onDidBlurEditorWidget(()=>v(!1))}const C=h.clsx("code-editor-wrapper",p,{"code-editor-focused":c,"code-editor-disabled":t});return e.jsx("div",{ref:E,className:C,"data-disabled":t||void 0,style:{height:r},children:e.jsx(F.default,{height:"100%",value:d,defaultValue:s,language:i,theme:n,onChange:o,onMount:N,loading:e.jsx("div",{className:"code-editor-loading"}),options:{readOnly:a||t,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbersMinChars:3,...f}})})}function q({className:d,label:s,description:o,errorMessage:i,...n}){const r=u.useId(),t=h.clsx(d,"field");return e.jsxs("div",{className:t,children:[s&&e.jsx(m.Label,{htmlFor:r,children:s}),e.jsx(j,{...n}),o&&e.jsx(m.Description,{children:o}),i&&typeof i=="string"&&e.jsx(m.FieldError,{children:i})]})}const y="Clique no editor e pressione F1 para visualizar os atalhos do teclado";function T({title:d,shortcutHint:s=y,onBeautify:o,className:i,isDisabled:n=!1,isReadOnly:r=!1,...t}){const a=u.useRef(null),f=!n&&!r;function p(){var l,c;if(o){o();return}(c=(l=a.current)==null?void 0:l.getAction("editor.action.formatDocument"))==null||c.run()}return e.jsxs("div",{className:h.clsx("code-editor-panel",i),children:[f&&e.jsxs("div",{className:"code-editor-panel-header",children:[e.jsxs("div",{className:"code-editor-panel-title-group",children:[e.jsx("span",{className:"code-editor-panel-title",children:d}),s&&e.jsxs("span",{className:"code-editor-panel-hint",children:["(",s,")"]})]}),e.jsx(g.Button,{size:"small",variant:"primary",onPress:p,children:"Beautify"})]}),e.jsx(j,{...t,isDisabled:n,isReadOnly:r,editorRef:a})]})}exports.CodeEditor=j;exports.CodeEditorField=q;exports.CodeEditorPanel=T;
2
2
  //# sourceMappingURL=CodeEditor.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("../../../vendor/clsx/dist/clsx.cjs"),x=require("react"),c=require("react-aria-components");;/* empty css */const v=require("../../hooks/useOverlayPortal.cjs"),s=require("../Fieldset/Fieldset.cjs"),g=require("../Input/Input.cjs"),B=require("../../icons/IconChevronDown.cjs"),b=require("../ListBox/ListBox.cjs"),q=require("../../icons/IconCheck.cjs");function N(o){const n=o.getRootNode();return n instanceof ShadowRoot||n instanceof Document?n.activeElement:null}function I(o){x.useEffect(()=>{const n=o.current;if(!n)return;function t(r){r.preventDefault()}return n.addEventListener("mousedown",t),()=>n.removeEventListener("mousedown",t)},[o])}function F({className:o,label:n,description:t,errorMessage:r,placeholder:i,children:f,items:j,...p}){const h=m.clsx(o,"combobox-container"),u=x.useRef(null);I(u);const C=v.useOverlayPortalContainer();return e.jsx(d,{className:h,...p,children:e.jsxs(s.Field,{children:[n&&e.jsx(s.Label,{children:n}),e.jsxs(c.Group,{className:"combobox",children:[e.jsx(g.Input,{className:"combobox-input",placeholder:i,onPointerDown:a=>{var l;N(a.currentTarget)===a.currentTarget&&((l=u.current)==null||l.click())}}),e.jsx(c.Button,{ref:u,className:"combobox-trigger",children:e.jsx(B.IconChevronDown,{"aria-hidden":"true"})})]}),e.jsx(c.Popover,{className:"combobox-popover",UNSTABLE_portalContainer:C,children:e.jsx(b.ListBox,{items:j,children:f})}),t&&e.jsx(s.Description,{children:t}),e.jsx(s.FieldError,{children:r})]})})}function d({...o}){return e.jsx(c.ComboBox,{menuTrigger:"focus",...o})}function E({children:o,className:n,...t}){const r=m.clsx(n,"combobox-item"),i=typeof o=="string"?o:"";return e.jsx(b.ListBoxItem,{textValue:i,className:r,...t,children:e.jsxs(e.Fragment,{children:[e.jsx(q.IconCheck,{className:"combobox-item-check"}),o]})})}exports.ComboBox=d;exports.ComboBoxField=F;exports.ComboBoxItem=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("../../../vendor/clsx/dist/clsx.cjs"),C=require("react"),t=require("react-aria-components"),x=require("./comboBoxFocus.cjs");;/* empty css */const B=require("../../hooks/useOverlayPortal.cjs"),n=require("../Fieldset/Fieldset.cjs"),q=require("../Input/Input.cjs"),I=require("../../icons/IconChevronDown.cjs"),l=require("../ListBox/ListBox.cjs"),g=require("../../icons/IconCheck.cjs");function N({className:o,label:r,description:s,errorMessage:c,placeholder:i,children:b,items:d,...j}){const p=a.clsx(o,"combobox-container"),u=C.useRef(null);x.useKeepFocusOnInput(u);const h=B.useOverlayPortalContainer();return e.jsx(m,{className:p,...j,children:e.jsxs(n.Field,{children:[r&&e.jsx(n.Label,{children:r}),e.jsxs(t.Group,{className:"combobox",children:[e.jsx(q.Input,{className:"combobox-input",placeholder:i,onPointerDown:x.openMenuWhenFocusedInputIsPressed(u)}),e.jsx(t.Button,{ref:u,className:"combobox-trigger",children:e.jsx(I.IconChevronDown,{"aria-hidden":"true"})})]}),e.jsx(t.Popover,{className:"combobox-popover",UNSTABLE_portalContainer:h,children:e.jsx(l.ListBox,{items:d,children:b})}),s&&e.jsx(n.Description,{children:s}),e.jsx(n.FieldError,{children:c})]})})}function m({...o}){return e.jsx(t.ComboBox,{menuTrigger:"focus",...o})}function f({children:o,className:r,...s}){const c=a.clsx(r,"combobox-item"),i=typeof o=="string"?o:"";return e.jsx(l.ListBoxItem,{textValue:i,className:c,...s,children:e.jsxs(e.Fragment,{children:[e.jsx(g.IconCheck,{className:"combobox-item-check"}),o]})})}exports.ComboBox=m;exports.ComboBoxField=N;exports.ComboBoxItem=f;
2
2
  //# sourceMappingURL=ComboBox.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.cjs","sources":["../../../../../src/ui/primitives/ComboBox/ComboBox.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconCheck, IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Input,\n ListBox,\n ListBoxItem,\n Label,\n SharedFieldProps,\n type ListBoxItemProps,\n} from \"primitives\";\nimport { useEffect, useRef } from \"react\";\nimport {\n Button as RACButton,\n ComboBox as RACComboBox,\n Group as RACGroup,\n Popover as RACPopover,\n type ComboBoxProps as RACComboBoxProps,\n} from \"react-aria-components\";\nimport \"./combobox.css\";\n\nexport interface ComboBoxFieldProps<T extends object>\n extends Omit<ComboBoxProps<T>, \"children\">,\n SharedFieldProps {\n items?: Iterable<T>;\n children: React.ReactNode | ((item: T) => React.ReactNode);\n}\n\n// `document.activeElement` para no host da shadow root: quem sabe o que está focado\n// dentro dela é a própria raiz. Ver ui/hooks/useOverlayPortal.\nfunction activeElementOf(element: Element): Element | null {\n const root = element.getRootNode();\n return root instanceof ShadowRoot || root instanceof Document\n ? root.activeElement\n : null;\n}\n\n// O react-aria pede `preventFocusOnPress` para o botão do dropdown, mas a implementação\n// dele guarda `document.activeElement` — que dentro de uma shadow root devolve o host, e\n// não o input. O botão fica com o foco de verdade, o input nunca mais recebe blur, e a\n// partir daí só escolher um item fecha o dropdown: clicar fora não fecha nada. Impedir o\n// padrão do mousedown é o que mantém o foco no input, dentro e fora da shadow root.\n//\n// Via listener nativo, e não por prop: o `useButton` do react-aria só repassa ao <button>\n// os handlers que ele mesmo declara, e descarta um `onMouseDown` vindo de fora.\nfunction useKeepFocusOnInput(triggerRef: React.RefObject<HTMLButtonElement | null>): void {\n useEffect(() => {\n const trigger: HTMLButtonElement | null = triggerRef.current;\n if (!trigger) return undefined;\n\n function preventFocus(event: MouseEvent): void {\n event.preventDefault();\n }\n\n trigger.addEventListener(\"mousedown\", preventFocus);\n return () => trigger.removeEventListener(\"mousedown\", preventFocus);\n }, [triggerRef]);\n}\n\nexport function ComboBoxField<T extends object>({\n className,\n label,\n description,\n errorMessage,\n placeholder,\n children,\n items,\n ...props\n}: ComboBoxFieldProps<T>) {\n const classNames = clsx(className, \"combobox-container\");\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n useKeepFocusOnInput(triggerRef);\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n return (\n <ComboBox className={classNames} {...props}>\n <Field>\n {label && <Label>{label}</Label>}\n <RACGroup className=\"combobox\">\n <Input\n className=\"combobox-input\"\n placeholder={placeholder}\n onPointerDown={(event) => {\n if (activeElementOf(event.currentTarget) === event.currentTarget) {\n triggerRef.current?.click();\n }\n }}\n />\n <RACButton ref={triggerRef} className=\"combobox-trigger\">\n <IconChevronDown aria-hidden=\"true\" />\n </RACButton>\n </RACGroup>\n <RACPopover\n className=\"combobox-popover\"\n UNSTABLE_portalContainer={portalContainer}\n >\n <ListBox items={items}>{children}</ListBox>\n </RACPopover>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </Field>\n </ComboBox>\n );\n}\n\nexport type ComboBoxProps<T extends object> = RACComboBoxProps<T>;\nexport function ComboBox<T extends object>({ ...props }: ComboBoxProps<T>) {\n return <RACComboBox<T> menuTrigger=\"focus\" {...props} />;\n}\n\nexport type ComboBoxItemProps = ListBoxItemProps;\nexport function ComboBoxItem({ children, className, ...props }: ComboBoxItemProps) {\n const classNames = clsx(className, \"combobox-item\");\n const textValue = typeof children === \"string\" ? children : \"\";\n return (\n <ListBoxItem textValue={textValue} className={classNames} {...props}>\n <>\n <IconCheck className=\"combobox-item-check\" />\n {children}\n </>\n </ListBoxItem>\n );\n}\n"],"names":["activeElementOf","element","root","useKeepFocusOnInput","triggerRef","useEffect","trigger","preventFocus","event","ComboBoxField","className","label","description","errorMessage","placeholder","children","items","props","classNames","clsx","useRef","portalContainer","useOverlayPortalContainer","ComboBox","Field","jsx","Label","jsxs","RACGroup","Input","_a","RACButton","IconChevronDown","RACPopover","ListBox","Description","FieldError","RACComboBox","ComboBoxItem","textValue","ListBoxItem","Fragment","IconCheck"],"mappings":"2eAiCA,SAASA,EAAgBC,EAAkC,CACzD,MAAMC,EAAOD,EAAQ,YAAA,EACrB,OAAOC,aAAgB,YAAcA,aAAgB,SACjDA,EAAK,cACL,IACN,CAUA,SAASC,EAAoBC,EAA6D,CACxFC,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAoCF,EAAW,QACrD,GAAI,CAACE,EAAS,OAEd,SAASC,EAAaC,EAAyB,CAC7CA,EAAM,eAAA,CACR,CAEA,OAAAF,EAAQ,iBAAiB,YAAaC,CAAY,EAC3C,IAAMD,EAAQ,oBAAoB,YAAaC,CAAY,CACpE,EAAG,CAACH,CAAU,CAAC,CACjB,CAEO,SAASK,EAAgC,CAC9C,UAAAC,EACA,MAAAC,EACA,YAAAC,EACA,aAAAC,EACA,YAAAC,EACA,SAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EAA0B,CACxB,MAAMC,EAAaC,EAAAA,KAAKT,EAAW,oBAAoB,EACjDN,EAAagB,EAAAA,OAAiC,IAAI,EACxDjB,EAAoBC,CAAU,EAG9B,MAAMiB,EAAkBC,EAAAA,0BAAA,EACxB,aACGC,EAAA,CAAS,UAAWL,EAAa,GAAGD,EACnC,gBAACO,EAAAA,MAAA,CACE,SAAA,CAAAb,GAASc,EAAAA,IAACC,EAAAA,OAAO,SAAAf,CAAA,CAAM,EACxBgB,EAAAA,KAACC,EAAAA,MAAA,CAAS,UAAU,WAClB,SAAA,CAAAH,EAAAA,IAACI,EAAAA,MAAA,CACC,UAAU,iBACV,YAAAf,EACA,cAAgBN,GAAU,OACpBR,EAAgBQ,EAAM,aAAa,IAAMA,EAAM,iBACjDsB,EAAA1B,EAAW,UAAX,MAAA0B,EAAoB,QAExB,CAAA,CAAA,EAEFL,EAAAA,IAACM,EAAAA,OAAA,CAAU,IAAK3B,EAAY,UAAU,mBACpC,SAAAqB,EAAAA,IAACO,EAAAA,gBAAA,CAAgB,cAAY,MAAA,CAAO,CAAA,CACtC,CAAA,EACF,EACAP,EAAAA,IAACQ,EAAAA,QAAA,CACC,UAAU,mBACV,yBAA0BZ,EAE1B,SAAAI,EAAAA,IAACS,EAAAA,QAAA,CAAQ,MAAAlB,EAAe,SAAAD,CAAA,CAAS,CAAA,CAAA,EAElCH,GAAea,EAAAA,IAACU,EAAAA,YAAA,CAAa,SAAAvB,CAAA,CAAY,EAC1Ca,EAAAA,IAACW,EAAAA,YAAY,SAAAvB,CAAA,CAAa,CAAA,CAAA,CAC5B,CAAA,CACF,CAEJ,CAGO,SAASU,EAA2B,CAAE,GAAGN,GAA2B,CACzE,OAAOQ,EAAAA,IAACY,EAAAA,SAAA,CAAe,YAAY,QAAS,GAAGpB,EAAO,CACxD,CAGO,SAASqB,EAAa,CAAE,SAAAvB,EAAU,UAAAL,EAAW,GAAGO,GAA4B,CACjF,MAAMC,EAAaC,EAAAA,KAAKT,EAAW,eAAe,EAC5C6B,EAAY,OAAOxB,GAAa,SAAWA,EAAW,GAC5D,aACGyB,EAAAA,YAAA,CAAY,UAAAD,EAAsB,UAAWrB,EAAa,GAAGD,EAC5D,SAAAU,EAAAA,KAAAc,EAAAA,SAAA,CACE,SAAA,CAAAhB,EAAAA,IAACiB,EAAAA,UAAA,CAAU,UAAU,qBAAA,CAAsB,EAC1C3B,CAAA,CAAA,CACH,CAAA,CACF,CAEJ"}
1
+ {"version":3,"file":"ComboBox.cjs","sources":["../../../../../src/ui/primitives/ComboBox/ComboBox.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconCheck, IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Input,\n ListBox,\n ListBoxItem,\n Label,\n SharedFieldProps,\n type ListBoxItemProps,\n} from \"primitives\";\nimport { useRef } from \"react\";\nimport {\n Button as RACButton,\n ComboBox as RACComboBox,\n Group as RACGroup,\n Popover as RACPopover,\n type ComboBoxProps as RACComboBoxProps,\n} from \"react-aria-components\";\nimport {\n openMenuWhenFocusedInputIsPressed,\n useKeepFocusOnInput,\n} from \"./comboBoxFocus\";\nimport \"./combobox.css\";\n\nexport interface ComboBoxFieldProps<T extends object>\n extends Omit<ComboBoxProps<T>, \"children\">,\n SharedFieldProps {\n items?: Iterable<T>;\n children: React.ReactNode | ((item: T) => React.ReactNode);\n}\n\nexport function ComboBoxField<T extends object>({\n className,\n label,\n description,\n errorMessage,\n placeholder,\n children,\n items,\n ...props\n}: ComboBoxFieldProps<T>) {\n const classNames = clsx(className, \"combobox-container\");\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n useKeepFocusOnInput(triggerRef);\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n return (\n <ComboBox className={classNames} {...props}>\n <Field>\n {label && <Label>{label}</Label>}\n <RACGroup className=\"combobox\">\n <Input\n className=\"combobox-input\"\n placeholder={placeholder}\n onPointerDown={openMenuWhenFocusedInputIsPressed(triggerRef)}\n />\n <RACButton ref={triggerRef} className=\"combobox-trigger\">\n <IconChevronDown aria-hidden=\"true\" />\n </RACButton>\n </RACGroup>\n <RACPopover\n className=\"combobox-popover\"\n UNSTABLE_portalContainer={portalContainer}\n >\n <ListBox items={items}>{children}</ListBox>\n </RACPopover>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </Field>\n </ComboBox>\n );\n}\n\nexport type ComboBoxProps<T extends object> = RACComboBoxProps<T>;\nexport function ComboBox<T extends object>({ ...props }: ComboBoxProps<T>) {\n return <RACComboBox<T> menuTrigger=\"focus\" {...props} />;\n}\n\nexport type ComboBoxItemProps = ListBoxItemProps;\nexport function ComboBoxItem({ children, className, ...props }: ComboBoxItemProps) {\n const classNames = clsx(className, \"combobox-item\");\n const textValue = typeof children === \"string\" ? children : \"\";\n return (\n <ListBoxItem textValue={textValue} className={classNames} {...props}>\n <>\n <IconCheck className=\"combobox-item-check\" />\n {children}\n </>\n </ListBoxItem>\n );\n}\n"],"names":["ComboBoxField","className","label","description","errorMessage","placeholder","children","items","props","classNames","clsx","triggerRef","useRef","useKeepFocusOnInput","portalContainer","useOverlayPortalContainer","ComboBox","Field","jsx","Label","jsxs","RACGroup","Input","openMenuWhenFocusedInputIsPressed","RACButton","IconChevronDown","RACPopover","ListBox","Description","FieldError","RACComboBox","ComboBoxItem","textValue","ListBoxItem","Fragment","IconCheck"],"mappings":"4gBAmCO,SAASA,EAAgC,CAC9C,UAAAC,EACA,MAAAC,EACA,YAAAC,EACA,aAAAC,EACA,YAAAC,EACA,SAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EAA0B,CACxB,MAAMC,EAAaC,EAAAA,KAAKT,EAAW,oBAAoB,EACjDU,EAAaC,EAAAA,OAAiC,IAAI,EACxDC,EAAAA,oBAAoBF,CAAU,EAG9B,MAAMG,EAAkBC,EAAAA,0BAAA,EACxB,aACGC,EAAA,CAAS,UAAWP,EAAa,GAAGD,EACnC,gBAACS,EAAAA,MAAA,CACE,SAAA,CAAAf,GAASgB,EAAAA,IAACC,EAAAA,OAAO,SAAAjB,CAAA,CAAM,EACxBkB,EAAAA,KAACC,EAAAA,MAAA,CAAS,UAAU,WAClB,SAAA,CAAAH,EAAAA,IAACI,EAAAA,MAAA,CACC,UAAU,iBACV,YAAAjB,EACA,cAAekB,EAAAA,kCAAkCZ,CAAU,CAAA,CAAA,EAE7DO,EAAAA,IAACM,EAAAA,OAAA,CAAU,IAAKb,EAAY,UAAU,mBACpC,SAAAO,EAAAA,IAACO,EAAAA,gBAAA,CAAgB,cAAY,MAAA,CAAO,CAAA,CACtC,CAAA,EACF,EACAP,EAAAA,IAACQ,EAAAA,QAAA,CACC,UAAU,mBACV,yBAA0BZ,EAE1B,SAAAI,EAAAA,IAACS,EAAAA,QAAA,CAAQ,MAAApB,EAAe,SAAAD,CAAA,CAAS,CAAA,CAAA,EAElCH,GAAee,EAAAA,IAACU,EAAAA,YAAA,CAAa,SAAAzB,CAAA,CAAY,EAC1Ce,EAAAA,IAACW,EAAAA,YAAY,SAAAzB,CAAA,CAAa,CAAA,CAAA,CAC5B,CAAA,CACF,CAEJ,CAGO,SAASY,EAA2B,CAAE,GAAGR,GAA2B,CACzE,OAAOU,EAAAA,IAACY,EAAAA,SAAA,CAAe,YAAY,QAAS,GAAGtB,EAAO,CACxD,CAGO,SAASuB,EAAa,CAAE,SAAAzB,EAAU,UAAAL,EAAW,GAAGO,GAA4B,CACjF,MAAMC,EAAaC,EAAAA,KAAKT,EAAW,eAAe,EAC5C+B,EAAY,OAAO1B,GAAa,SAAWA,EAAW,GAC5D,aACG2B,EAAAA,YAAA,CAAY,UAAAD,EAAsB,UAAWvB,EAAa,GAAGD,EAC5D,SAAAY,EAAAA,KAAAc,EAAAA,SAAA,CACE,SAAA,CAAAhB,EAAAA,IAACiB,EAAAA,UAAA,CAAU,UAAU,qBAAA,CAAsB,EAC1C7B,CAAA,CAAA,CACH,CAAA,CACF,CAEJ"}
@@ -1,82 +1,66 @@
1
- import { jsx as r, jsxs as i, Fragment as d } from "react/jsx-runtime";
2
- import { clsx as u } from "../../../vendor/clsx/dist/clsx.js";
3
- import { useRef as h, useEffect as g } from "react";
4
- import { Group as v, Button as N, Popover as C, ComboBox as B } from "react-aria-components";
1
+ import { jsx as o, jsxs as c, Fragment as b } from "react/jsx-runtime";
2
+ import { clsx as s } from "../../../vendor/clsx/dist/clsx.js";
3
+ import { useRef as f } from "react";
4
+ import { Group as d, Button as h, Popover as C, ComboBox as N } from "react-aria-components";
5
+ import { useKeepFocusOnInput as B, openMenuWhenFocusedInputIsPressed as g } from "./comboBoxFocus.js";
5
6
  /* empty css */
6
- import { useOverlayPortalContainer as E } from "../../hooks/useOverlayPortal.js";
7
- import { Field as F, Label as I, Description as L, FieldError as w } from "../Fieldset/Fieldset.js";
7
+ import { useOverlayPortalContainer as I } from "../../hooks/useOverlayPortal.js";
8
+ import { Field as F, Label as v, Description as L, FieldError as P } from "../Fieldset/Fieldset.js";
8
9
  import { Input as D } from "../Input/Input.js";
9
- import { IconChevronDown as T } from "../../icons/IconChevronDown.js";
10
- import { ListBox as k, ListBoxItem as O } from "../ListBox/ListBox.js";
11
- import { IconCheck as P } from "../../icons/IconCheck.js";
12
- function R(o) {
13
- const e = o.getRootNode();
14
- return e instanceof ShadowRoot || e instanceof Document ? e.activeElement : null;
15
- }
16
- function j(o) {
17
- g(() => {
18
- const e = o.current;
19
- if (!e) return;
20
- function t(n) {
21
- n.preventDefault();
22
- }
23
- return e.addEventListener("mousedown", t), () => e.removeEventListener("mousedown", t);
24
- }, [o]);
25
- }
26
- function J({
27
- className: o,
10
+ import { IconChevronDown as j } from "../../icons/IconChevronDown.js";
11
+ import { ListBox as k, ListBoxItem as w } from "../ListBox/ListBox.js";
12
+ import { IconCheck as y } from "../../icons/IconCheck.js";
13
+ function $({
14
+ className: r,
28
15
  label: e,
29
16
  description: t,
30
17
  errorMessage: n,
31
- placeholder: m,
32
- children: l,
33
- items: f,
18
+ placeholder: i,
19
+ children: a,
20
+ items: l,
34
21
  ...p
35
22
  }) {
36
- const x = u(o, "combobox-container"), c = h(null);
37
- j(c);
38
- const b = E();
39
- return /* @__PURE__ */ r(y, { className: x, ...p, children: /* @__PURE__ */ i(F, { children: [
40
- e && /* @__PURE__ */ r(I, { children: e }),
41
- /* @__PURE__ */ i(v, { className: "combobox", children: [
42
- /* @__PURE__ */ r(
23
+ const u = s(r, "combobox-container"), m = f(null);
24
+ B(m);
25
+ const x = I();
26
+ return /* @__PURE__ */ o(E, { className: u, ...p, children: /* @__PURE__ */ c(F, { children: [
27
+ e && /* @__PURE__ */ o(v, { children: e }),
28
+ /* @__PURE__ */ c(d, { className: "combobox", children: [
29
+ /* @__PURE__ */ o(
43
30
  D,
44
31
  {
45
32
  className: "combobox-input",
46
- placeholder: m,
47
- onPointerDown: (s) => {
48
- var a;
49
- R(s.currentTarget) === s.currentTarget && ((a = c.current) == null || a.click());
50
- }
33
+ placeholder: i,
34
+ onPointerDown: g(m)
51
35
  }
52
36
  ),
53
- /* @__PURE__ */ r(N, { ref: c, className: "combobox-trigger", children: /* @__PURE__ */ r(T, { "aria-hidden": "true" }) })
37
+ /* @__PURE__ */ o(h, { ref: m, className: "combobox-trigger", children: /* @__PURE__ */ o(j, { "aria-hidden": "true" }) })
54
38
  ] }),
55
- /* @__PURE__ */ r(
39
+ /* @__PURE__ */ o(
56
40
  C,
57
41
  {
58
42
  className: "combobox-popover",
59
- UNSTABLE_portalContainer: b,
60
- children: /* @__PURE__ */ r(k, { items: f, children: l })
43
+ UNSTABLE_portalContainer: x,
44
+ children: /* @__PURE__ */ o(k, { items: l, children: a })
61
45
  }
62
46
  ),
63
- t && /* @__PURE__ */ r(L, { children: t }),
64
- /* @__PURE__ */ r(w, { children: n })
47
+ t && /* @__PURE__ */ o(L, { children: t }),
48
+ /* @__PURE__ */ o(P, { children: n })
65
49
  ] }) });
66
50
  }
67
- function y({ ...o }) {
68
- return /* @__PURE__ */ r(B, { menuTrigger: "focus", ...o });
51
+ function E({ ...r }) {
52
+ return /* @__PURE__ */ o(N, { menuTrigger: "focus", ...r });
69
53
  }
70
- function M({ children: o, className: e, ...t }) {
71
- const n = u(e, "combobox-item");
72
- return /* @__PURE__ */ r(O, { textValue: typeof o == "string" ? o : "", className: n, ...t, children: /* @__PURE__ */ i(d, { children: [
73
- /* @__PURE__ */ r(P, { className: "combobox-item-check" }),
74
- o
54
+ function q({ children: r, className: e, ...t }) {
55
+ const n = s(e, "combobox-item");
56
+ return /* @__PURE__ */ o(w, { textValue: typeof r == "string" ? r : "", className: n, ...t, children: /* @__PURE__ */ c(b, { children: [
57
+ /* @__PURE__ */ o(y, { className: "combobox-item-check" }),
58
+ r
75
59
  ] }) });
76
60
  }
77
61
  export {
78
- y as ComboBox,
79
- J as ComboBoxField,
80
- M as ComboBoxItem
62
+ E as ComboBox,
63
+ $ as ComboBoxField,
64
+ q as ComboBoxItem
81
65
  };
82
66
  //# sourceMappingURL=ComboBox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.js","sources":["../../../../../src/ui/primitives/ComboBox/ComboBox.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconCheck, IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Input,\n ListBox,\n ListBoxItem,\n Label,\n SharedFieldProps,\n type ListBoxItemProps,\n} from \"primitives\";\nimport { useEffect, useRef } from \"react\";\nimport {\n Button as RACButton,\n ComboBox as RACComboBox,\n Group as RACGroup,\n Popover as RACPopover,\n type ComboBoxProps as RACComboBoxProps,\n} from \"react-aria-components\";\nimport \"./combobox.css\";\n\nexport interface ComboBoxFieldProps<T extends object>\n extends Omit<ComboBoxProps<T>, \"children\">,\n SharedFieldProps {\n items?: Iterable<T>;\n children: React.ReactNode | ((item: T) => React.ReactNode);\n}\n\n// `document.activeElement` para no host da shadow root: quem sabe o que está focado\n// dentro dela é a própria raiz. Ver ui/hooks/useOverlayPortal.\nfunction activeElementOf(element: Element): Element | null {\n const root = element.getRootNode();\n return root instanceof ShadowRoot || root instanceof Document\n ? root.activeElement\n : null;\n}\n\n// O react-aria pede `preventFocusOnPress` para o botão do dropdown, mas a implementação\n// dele guarda `document.activeElement` — que dentro de uma shadow root devolve o host, e\n// não o input. O botão fica com o foco de verdade, o input nunca mais recebe blur, e a\n// partir daí só escolher um item fecha o dropdown: clicar fora não fecha nada. Impedir o\n// padrão do mousedown é o que mantém o foco no input, dentro e fora da shadow root.\n//\n// Via listener nativo, e não por prop: o `useButton` do react-aria só repassa ao <button>\n// os handlers que ele mesmo declara, e descarta um `onMouseDown` vindo de fora.\nfunction useKeepFocusOnInput(triggerRef: React.RefObject<HTMLButtonElement | null>): void {\n useEffect(() => {\n const trigger: HTMLButtonElement | null = triggerRef.current;\n if (!trigger) return undefined;\n\n function preventFocus(event: MouseEvent): void {\n event.preventDefault();\n }\n\n trigger.addEventListener(\"mousedown\", preventFocus);\n return () => trigger.removeEventListener(\"mousedown\", preventFocus);\n }, [triggerRef]);\n}\n\nexport function ComboBoxField<T extends object>({\n className,\n label,\n description,\n errorMessage,\n placeholder,\n children,\n items,\n ...props\n}: ComboBoxFieldProps<T>) {\n const classNames = clsx(className, \"combobox-container\");\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n useKeepFocusOnInput(triggerRef);\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n return (\n <ComboBox className={classNames} {...props}>\n <Field>\n {label && <Label>{label}</Label>}\n <RACGroup className=\"combobox\">\n <Input\n className=\"combobox-input\"\n placeholder={placeholder}\n onPointerDown={(event) => {\n if (activeElementOf(event.currentTarget) === event.currentTarget) {\n triggerRef.current?.click();\n }\n }}\n />\n <RACButton ref={triggerRef} className=\"combobox-trigger\">\n <IconChevronDown aria-hidden=\"true\" />\n </RACButton>\n </RACGroup>\n <RACPopover\n className=\"combobox-popover\"\n UNSTABLE_portalContainer={portalContainer}\n >\n <ListBox items={items}>{children}</ListBox>\n </RACPopover>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </Field>\n </ComboBox>\n );\n}\n\nexport type ComboBoxProps<T extends object> = RACComboBoxProps<T>;\nexport function ComboBox<T extends object>({ ...props }: ComboBoxProps<T>) {\n return <RACComboBox<T> menuTrigger=\"focus\" {...props} />;\n}\n\nexport type ComboBoxItemProps = ListBoxItemProps;\nexport function ComboBoxItem({ children, className, ...props }: ComboBoxItemProps) {\n const classNames = clsx(className, \"combobox-item\");\n const textValue = typeof children === \"string\" ? children : \"\";\n return (\n <ListBoxItem textValue={textValue} className={classNames} {...props}>\n <>\n <IconCheck className=\"combobox-item-check\" />\n {children}\n </>\n </ListBoxItem>\n );\n}\n"],"names":["activeElementOf","element","root","useKeepFocusOnInput","triggerRef","useEffect","trigger","preventFocus","event","ComboBoxField","className","label","description","errorMessage","placeholder","children","items","props","classNames","clsx","useRef","portalContainer","useOverlayPortalContainer","ComboBox","Field","jsx","Label","jsxs","RACGroup","Input","_a","RACButton","IconChevronDown","RACPopover","ListBox","Description","FieldError","RACComboBox","ComboBoxItem","ListBoxItem","Fragment","IconCheck"],"mappings":";;;;;;;;;;;AAiCA,SAASA,EAAgBC,GAAkC;AACzD,QAAMC,IAAOD,EAAQ,YAAA;AACrB,SAAOC,aAAgB,cAAcA,aAAgB,WACjDA,EAAK,gBACL;AACN;AAUA,SAASC,EAAoBC,GAA6D;AACxF,EAAAC,EAAU,MAAM;AACd,UAAMC,IAAoCF,EAAW;AACrD,QAAI,CAACE,EAAS;AAEd,aAASC,EAAaC,GAAyB;AAC7C,MAAAA,EAAM,eAAA;AAAA,IACR;AAEA,WAAAF,EAAQ,iBAAiB,aAAaC,CAAY,GAC3C,MAAMD,EAAQ,oBAAoB,aAAaC,CAAY;AAAA,EACpE,GAAG,CAACH,CAAU,CAAC;AACjB;AAEO,SAASK,EAAgC;AAAA,EAC9C,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,GAA0B;AACxB,QAAMC,IAAaC,EAAKT,GAAW,oBAAoB,GACjDN,IAAagB,EAAiC,IAAI;AACxD,EAAAjB,EAAoBC,CAAU;AAG9B,QAAMiB,IAAkBC,EAAA;AACxB,2BACGC,GAAA,EAAS,WAAWL,GAAa,GAAGD,GACnC,4BAACO,GAAA,EACE,UAAA;AAAA,IAAAb,KAAS,gBAAAc,EAACC,KAAO,UAAAf,EAAA,CAAM;AAAA,IACxB,gBAAAgB,EAACC,GAAA,EAAS,WAAU,YAClB,UAAA;AAAA,MAAA,gBAAAH;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,aAAAf;AAAA,UACA,eAAe,CAACN,MAAU;;AACxB,YAAIR,EAAgBQ,EAAM,aAAa,MAAMA,EAAM,mBACjDsB,IAAA1B,EAAW,YAAX,QAAA0B,EAAoB;AAAA,UAExB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEF,gBAAAL,EAACM,GAAA,EAAU,KAAK3B,GAAY,WAAU,oBACpC,UAAA,gBAAAqB,EAACO,GAAA,EAAgB,eAAY,OAAA,CAAO,EAAA,CACtC;AAAA,IAAA,GACF;AAAA,IACA,gBAAAP;AAAA,MAACQ;AAAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,0BAA0BZ;AAAA,QAE1B,UAAA,gBAAAI,EAACS,GAAA,EAAQ,OAAAlB,GAAe,UAAAD,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,IAElCH,KAAe,gBAAAa,EAACU,GAAA,EAAa,UAAAvB,EAAA,CAAY;AAAA,IAC1C,gBAAAa,EAACW,KAAY,UAAAvB,EAAA,CAAa;AAAA,EAAA,EAAA,CAC5B,EAAA,CACF;AAEJ;AAGO,SAASU,EAA2B,EAAE,GAAGN,KAA2B;AACzE,SAAO,gBAAAQ,EAACY,GAAA,EAAe,aAAY,SAAS,GAAGpB,GAAO;AACxD;AAGO,SAASqB,EAAa,EAAE,UAAAvB,GAAU,WAAAL,GAAW,GAAGO,KAA4B;AACjF,QAAMC,IAAaC,EAAKT,GAAW,eAAe;AAElD,2BACG6B,GAAA,EAAY,WAFG,OAAOxB,KAAa,WAAWA,IAAW,IAEvB,WAAWG,GAAa,GAAGD,GAC5D,UAAA,gBAAAU,EAAAa,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAf,EAACgB,GAAA,EAAU,WAAU,sBAAA,CAAsB;AAAA,IAC1C1B;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"ComboBox.js","sources":["../../../../../src/ui/primitives/ComboBox/ComboBox.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { IconCheck, IconChevronDown } from \"icons\";\nimport {\n Description,\n Field,\n FieldError,\n Input,\n ListBox,\n ListBoxItem,\n Label,\n SharedFieldProps,\n type ListBoxItemProps,\n} from \"primitives\";\nimport { useRef } from \"react\";\nimport {\n Button as RACButton,\n ComboBox as RACComboBox,\n Group as RACGroup,\n Popover as RACPopover,\n type ComboBoxProps as RACComboBoxProps,\n} from \"react-aria-components\";\nimport {\n openMenuWhenFocusedInputIsPressed,\n useKeepFocusOnInput,\n} from \"./comboBoxFocus\";\nimport \"./combobox.css\";\n\nexport interface ComboBoxFieldProps<T extends object>\n extends Omit<ComboBoxProps<T>, \"children\">,\n SharedFieldProps {\n items?: Iterable<T>;\n children: React.ReactNode | ((item: T) => React.ReactNode);\n}\n\nexport function ComboBoxField<T extends object>({\n className,\n label,\n description,\n errorMessage,\n placeholder,\n children,\n items,\n ...props\n}: ComboBoxFieldProps<T>) {\n const classNames = clsx(className, \"combobox-container\");\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n useKeepFocusOnInput(triggerRef);\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n return (\n <ComboBox className={classNames} {...props}>\n <Field>\n {label && <Label>{label}</Label>}\n <RACGroup className=\"combobox\">\n <Input\n className=\"combobox-input\"\n placeholder={placeholder}\n onPointerDown={openMenuWhenFocusedInputIsPressed(triggerRef)}\n />\n <RACButton ref={triggerRef} className=\"combobox-trigger\">\n <IconChevronDown aria-hidden=\"true\" />\n </RACButton>\n </RACGroup>\n <RACPopover\n className=\"combobox-popover\"\n UNSTABLE_portalContainer={portalContainer}\n >\n <ListBox items={items}>{children}</ListBox>\n </RACPopover>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </Field>\n </ComboBox>\n );\n}\n\nexport type ComboBoxProps<T extends object> = RACComboBoxProps<T>;\nexport function ComboBox<T extends object>({ ...props }: ComboBoxProps<T>) {\n return <RACComboBox<T> menuTrigger=\"focus\" {...props} />;\n}\n\nexport type ComboBoxItemProps = ListBoxItemProps;\nexport function ComboBoxItem({ children, className, ...props }: ComboBoxItemProps) {\n const classNames = clsx(className, \"combobox-item\");\n const textValue = typeof children === \"string\" ? children : \"\";\n return (\n <ListBoxItem textValue={textValue} className={classNames} {...props}>\n <>\n <IconCheck className=\"combobox-item-check\" />\n {children}\n </>\n </ListBoxItem>\n );\n}\n"],"names":["ComboBoxField","className","label","description","errorMessage","placeholder","children","items","props","classNames","clsx","triggerRef","useRef","useKeepFocusOnInput","portalContainer","useOverlayPortalContainer","ComboBox","Field","jsx","Label","jsxs","RACGroup","Input","openMenuWhenFocusedInputIsPressed","RACButton","IconChevronDown","RACPopover","ListBox","Description","FieldError","RACComboBox","ComboBoxItem","ListBoxItem","Fragment","IconCheck"],"mappings":";;;;;;;;;;;;AAmCO,SAASA,EAAgC;AAAA,EAC9C,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,GAA0B;AACxB,QAAMC,IAAaC,EAAKT,GAAW,oBAAoB,GACjDU,IAAaC,EAAiC,IAAI;AACxD,EAAAC,EAAoBF,CAAU;AAG9B,QAAMG,IAAkBC,EAAA;AACxB,2BACGC,GAAA,EAAS,WAAWP,GAAa,GAAGD,GACnC,4BAACS,GAAA,EACE,UAAA;AAAA,IAAAf,KAAS,gBAAAgB,EAACC,KAAO,UAAAjB,EAAA,CAAM;AAAA,IACxB,gBAAAkB,EAACC,GAAA,EAAS,WAAU,YAClB,UAAA;AAAA,MAAA,gBAAAH;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,aAAAjB;AAAA,UACA,eAAekB,EAAkCZ,CAAU;AAAA,QAAA;AAAA,MAAA;AAAA,MAE7D,gBAAAO,EAACM,GAAA,EAAU,KAAKb,GAAY,WAAU,oBACpC,UAAA,gBAAAO,EAACO,GAAA,EAAgB,eAAY,OAAA,CAAO,EAAA,CACtC;AAAA,IAAA,GACF;AAAA,IACA,gBAAAP;AAAA,MAACQ;AAAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,0BAA0BZ;AAAA,QAE1B,UAAA,gBAAAI,EAACS,GAAA,EAAQ,OAAApB,GAAe,UAAAD,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,IAElCH,KAAe,gBAAAe,EAACU,GAAA,EAAa,UAAAzB,EAAA,CAAY;AAAA,IAC1C,gBAAAe,EAACW,KAAY,UAAAzB,EAAA,CAAa;AAAA,EAAA,EAAA,CAC5B,EAAA,CACF;AAEJ;AAGO,SAASY,EAA2B,EAAE,GAAGR,KAA2B;AACzE,SAAO,gBAAAU,EAACY,GAAA,EAAe,aAAY,SAAS,GAAGtB,GAAO;AACxD;AAGO,SAASuB,EAAa,EAAE,UAAAzB,GAAU,WAAAL,GAAW,GAAGO,KAA4B;AACjF,QAAMC,IAAaC,EAAKT,GAAW,eAAe;AAElD,2BACG+B,GAAA,EAAY,WAFG,OAAO1B,KAAa,WAAWA,IAAW,IAEvB,WAAWG,GAAa,GAAGD,GAC5D,UAAA,gBAAAY,EAAAa,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAf,EAACgB,GAAA,EAAU,WAAU,sBAAA,CAAsB;AAAA,IAC1C5B;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ;"}