@mittwald/flow-react-components 0.2.0-alpha.1030 → 0.2.0-alpha.1032

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 (235) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/assets/doc-properties.json +63626 -63568
  3. package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs +0 -1
  4. package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
  5. package/dist/js/packages/components/src/components/Accordion/Accordion.mjs +0 -1
  6. package/dist/js/packages/components/src/components/Accordion/Accordion.mjs.map +1 -1
  7. package/dist/js/packages/components/src/components/Action/Action.mjs +0 -1
  8. package/dist/js/packages/components/src/components/Action/Action.mjs.map +1 -1
  9. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs +0 -1
  10. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
  11. package/dist/js/packages/components/src/components/Alert/Alert.mjs +0 -1
  12. package/dist/js/packages/components/src/components/Alert/Alert.mjs.map +1 -1
  13. package/dist/js/packages/components/src/components/AlertText/AlertText.mjs +0 -1
  14. package/dist/js/packages/components/src/components/AlertText/AlertText.mjs.map +1 -1
  15. package/dist/js/packages/components/src/components/Align/Align.mjs +0 -1
  16. package/dist/js/packages/components/src/components/Align/Align.mjs.map +1 -1
  17. package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs +0 -1
  18. package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
  19. package/dist/js/packages/components/src/components/Avatar/Avatar.mjs +0 -1
  20. package/dist/js/packages/components/src/components/Avatar/Avatar.mjs.map +1 -1
  21. package/dist/js/packages/components/src/components/AvatarStack/AvatarStack.mjs +0 -1
  22. package/dist/js/packages/components/src/components/AvatarStack/AvatarStack.mjs.map +1 -1
  23. package/dist/js/packages/components/src/components/Badge/Badge.mjs +0 -1
  24. package/dist/js/packages/components/src/components/Badge/Badge.mjs.map +1 -1
  25. package/dist/js/packages/components/src/components/BigNumber/BigNumber.mjs +0 -1
  26. package/dist/js/packages/components/src/components/BigNumber/BigNumber.mjs.map +1 -1
  27. package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.mjs +0 -1
  28. package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.mjs.map +1 -1
  29. package/dist/js/packages/components/src/components/BrowserOnly/BrowserOnly.mjs +0 -1
  30. package/dist/js/packages/components/src/components/BrowserOnly/BrowserOnly.mjs.map +1 -1
  31. package/dist/js/packages/components/src/components/Button/Button.mjs +0 -1
  32. package/dist/js/packages/components/src/components/Button/Button.mjs.map +1 -1
  33. package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
  34. package/dist/js/packages/components/src/components/Chat/Chat.mjs +0 -1
  35. package/dist/js/packages/components/src/components/Chat/Chat.mjs.map +1 -1
  36. package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs +0 -1
  37. package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs.map +1 -1
  38. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs +0 -1
  39. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
  40. package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs +0 -1
  41. package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
  42. package/dist/js/packages/components/src/components/CodeBlock/CodeBlock.mjs.map +1 -1
  43. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs +0 -1
  44. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs.map +1 -1
  45. package/dist/js/packages/components/src/components/CodeEditor/hooks/useCodeEditorExtensions.mjs.map +1 -1
  46. package/dist/js/packages/components/src/components/ColumnLayout/ColumnLayout.mjs +0 -1
  47. package/dist/js/packages/components/src/components/ColumnLayout/ColumnLayout.mjs.map +1 -1
  48. package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs +0 -1
  49. package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
  50. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs +0 -1
  51. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
  52. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs +0 -1
  53. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs.map +1 -1
  54. package/dist/js/packages/components/src/components/ContextualHelp/ContextualHelp.mjs +0 -1
  55. package/dist/js/packages/components/src/components/ContextualHelp/ContextualHelp.mjs.map +1 -1
  56. package/dist/js/packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs +0 -1
  57. package/dist/js/packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs.map +1 -1
  58. package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs +0 -1
  59. package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs.map +1 -1
  60. package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs +0 -1
  61. package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs.map +1 -1
  62. package/dist/js/packages/components/src/components/DonutChart/DonutChart.mjs.map +1 -1
  63. package/dist/js/packages/components/src/components/FileCard/FileCard.mjs +0 -1
  64. package/dist/js/packages/components/src/components/FileCard/FileCard.mjs.map +1 -1
  65. package/dist/js/packages/components/src/components/FileCardList/FileCardList.mjs +0 -1
  66. package/dist/js/packages/components/src/components/FileCardList/FileCardList.mjs.map +1 -1
  67. package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs +0 -1
  68. package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
  69. package/dist/js/packages/components/src/components/FileField/FileField.mjs +0 -1
  70. package/dist/js/packages/components/src/components/FileField/FileField.mjs.map +1 -1
  71. package/dist/js/packages/components/src/components/FileField/components/FileInput.mjs +0 -1
  72. package/dist/js/packages/components/src/components/FileField/components/FileInput.mjs.map +1 -1
  73. package/dist/js/packages/components/src/components/HeaderNavigation/HeaderNavigation.mjs +0 -1
  74. package/dist/js/packages/components/src/components/HeaderNavigation/HeaderNavigation.mjs.map +1 -1
  75. package/dist/js/packages/components/src/components/Heading/Heading.mjs +0 -1
  76. package/dist/js/packages/components/src/components/Heading/Heading.mjs.map +1 -1
  77. package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs +0 -1
  78. package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map +1 -1
  79. package/dist/js/packages/components/src/components/Label/Label.mjs +0 -1
  80. package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
  81. package/dist/js/packages/components/src/components/LabeledValue/LabeledValue.mjs +0 -1
  82. package/dist/js/packages/components/src/components/LabeledValue/LabeledValue.mjs.map +1 -1
  83. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs +0 -1
  84. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs.map +1 -1
  85. package/dist/js/packages/components/src/components/LightBox/LightBox.mjs +0 -1
  86. package/dist/js/packages/components/src/components/LightBox/LightBox.mjs.map +1 -1
  87. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGalleryItem/LightBoxGalleryItem.mjs +0 -1
  88. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGalleryItem/LightBoxGalleryItem.mjs.map +1 -1
  89. package/dist/js/packages/components/src/components/Link/Link.mjs +0 -1
  90. package/dist/js/packages/components/src/components/Link/Link.mjs.map +1 -1
  91. package/dist/js/packages/components/src/components/List/List.mjs +0 -1
  92. package/dist/js/packages/components/src/components/List/List.mjs.map +1 -1
  93. package/dist/js/packages/components/src/components/List/components/Header/components/SearchField/SearchField.mjs +0 -1
  94. package/dist/js/packages/components/src/components/List/components/Header/components/SearchField/SearchField.mjs.map +1 -1
  95. package/dist/js/packages/components/src/components/List/components/Items/components/Item/hooks/useGridItemProps.mjs +0 -1
  96. package/dist/js/packages/components/src/components/List/components/Items/components/Item/hooks/useGridItemProps.mjs.map +1 -1
  97. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs +0 -1
  98. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
  99. package/dist/js/packages/components/src/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.mjs +0 -1
  100. package/dist/js/packages/components/src/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.mjs.map +1 -1
  101. package/dist/js/packages/components/src/components/List/model/types.mjs.map +1 -1
  102. package/dist/js/packages/components/src/components/Markdown/Markdown.mjs.map +1 -1
  103. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs +0 -1
  104. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
  105. package/dist/js/packages/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs +0 -1
  106. package/dist/js/packages/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs.map +1 -1
  107. package/dist/js/packages/components/src/components/Message/Message.mjs +0 -1
  108. package/dist/js/packages/components/src/components/Message/Message.mjs.map +1 -1
  109. package/dist/js/packages/components/src/components/MessageThread/MessageThread.mjs +0 -1
  110. package/dist/js/packages/components/src/components/MessageThread/MessageThread.mjs.map +1 -1
  111. package/dist/js/packages/components/src/components/Modal/Modal.mjs +0 -1
  112. package/dist/js/packages/components/src/components/Modal/Modal.mjs.map +1 -1
  113. package/dist/js/packages/components/src/components/Navigation/Navigation.mjs +0 -1
  114. package/dist/js/packages/components/src/components/Navigation/Navigation.mjs.map +1 -1
  115. package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs +0 -1
  116. package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
  117. package/dist/js/packages/components/src/components/Notification/Notification.mjs +0 -1
  118. package/dist/js/packages/components/src/components/Notification/Notification.mjs.map +1 -1
  119. package/dist/js/packages/components/src/components/NumberField/NumberField.mjs +0 -1
  120. package/dist/js/packages/components/src/components/NumberField/NumberField.mjs.map +1 -1
  121. package/dist/js/packages/components/src/components/Overlay/Overlay.mjs.map +1 -1
  122. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs +0 -1
  123. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
  124. package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.mjs +0 -1
  125. package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.mjs.map +1 -1
  126. package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs +0 -1
  127. package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs.map +1 -1
  128. package/dist/js/packages/components/src/components/RadioGroup/components/RadioButton/RadioButton.mjs +0 -1
  129. package/dist/js/packages/components/src/components/RadioGroup/components/RadioButton/RadioButton.mjs.map +1 -1
  130. package/dist/js/packages/components/src/components/Rating/Rating.mjs +0 -1
  131. package/dist/js/packages/components/src/components/Rating/Rating.mjs.map +1 -1
  132. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/EmptySegment.mjs +0 -1
  133. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/EmptySegment.mjs.map +1 -1
  134. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/FilledSegment.mjs +0 -1
  135. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/FilledSegment.mjs.map +1 -1
  136. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs +0 -1
  137. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs.map +1 -1
  138. package/dist/js/packages/components/src/components/Section/Section.mjs +0 -1
  139. package/dist/js/packages/components/src/components/Section/Section.mjs.map +1 -1
  140. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs +0 -1
  141. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
  142. package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs +0 -1
  143. package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  144. package/dist/js/packages/components/src/components/Select/Select.mjs +0 -1
  145. package/dist/js/packages/components/src/components/Select/Select.mjs.map +1 -1
  146. package/dist/js/packages/components/src/components/Slider/Slider.mjs +0 -1
  147. package/dist/js/packages/components/src/components/Slider/Slider.mjs.map +1 -1
  148. package/dist/js/packages/components/src/components/Switch/Switch.mjs +0 -1
  149. package/dist/js/packages/components/src/components/Switch/Switch.mjs.map +1 -1
  150. package/dist/js/packages/components/src/components/TabNavigation/TabNavigation.mjs +0 -1
  151. package/dist/js/packages/components/src/components/TabNavigation/TabNavigation.mjs.map +1 -1
  152. package/dist/js/packages/components/src/components/Table/Table.mjs.map +1 -1
  153. package/dist/js/packages/components/src/components/Table/components/TableColumn/TableColumn.mjs +0 -1
  154. package/dist/js/packages/components/src/components/Table/components/TableColumn/TableColumn.mjs.map +1 -1
  155. package/dist/js/packages/components/src/components/Tabs/Tabs.mjs.map +1 -1
  156. package/dist/js/packages/components/src/components/Tabs/components/Tab/Tab.mjs +0 -1
  157. package/dist/js/packages/components/src/components/Tabs/components/Tab/Tab.mjs.map +1 -1
  158. package/dist/js/packages/components/src/components/Text/Text.mjs +0 -1
  159. package/dist/js/packages/components/src/components/Text/Text.mjs.map +1 -1
  160. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs +0 -1
  161. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs.map +1 -1
  162. package/dist/js/packages/components/src/components/TextField/TextField.mjs +0 -1
  163. package/dist/js/packages/components/src/components/TextField/TextField.mjs.map +1 -1
  164. package/dist/js/packages/components/src/components/TimeField/TimeField.mjs +0 -1
  165. package/dist/js/packages/components/src/components/TimeField/TimeField.mjs.map +1 -1
  166. package/dist/js/packages/components/src/components/Truncate/Truncate.mjs.map +1 -1
  167. package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs +0 -1
  168. package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
  169. package/dist/js/packages/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
  170. package/dist/js/packages/components/src/integrations/react-hook-form/components/Form/hooks/useFormSubmitController.mjs.map +1 -1
  171. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormResetAction.mjs +0 -1
  172. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormResetAction.mjs.map +1 -1
  173. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormSubmitAction.mjs +0 -1
  174. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormSubmitAction.mjs.map +1 -1
  175. package/dist/js/packages/components/src/lib/componentFactory/flowComponent.mjs.map +1 -1
  176. package/dist/js/packages/components/src/lib/controller/overlay/useModalController.mjs +0 -1
  177. package/dist/js/packages/components/src/lib/controller/overlay/useModalController.mjs.map +1 -1
  178. package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs +0 -1
  179. package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs.map +1 -1
  180. package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs +0 -1
  181. package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs.map +1 -1
  182. package/dist/js/packages/components/src/lib/types/props.mjs.map +1 -1
  183. package/dist/types/components/Action/types.d.ts +32 -0
  184. package/dist/types/components/Action/types.d.ts.map +1 -1
  185. package/dist/types/components/CartesianChart/CartesianChart.d.ts +2 -0
  186. package/dist/types/components/CartesianChart/CartesianChart.d.ts.map +1 -1
  187. package/dist/types/components/Chat/Chat.d.ts +1 -0
  188. package/dist/types/components/Chat/Chat.d.ts.map +1 -1
  189. package/dist/types/components/Checkbox/Checkbox.d.ts +1 -0
  190. package/dist/types/components/Checkbox/Checkbox.d.ts.map +1 -1
  191. package/dist/types/components/CodeBlock/CodeBlock.d.ts +1 -0
  192. package/dist/types/components/CodeBlock/CodeBlock.d.ts.map +1 -1
  193. package/dist/types/components/CodeEditor/CodeEditor.d.ts +24 -1
  194. package/dist/types/components/CodeEditor/CodeEditor.d.ts.map +1 -1
  195. package/dist/types/components/ComboBox/ComboBox.d.ts +1 -0
  196. package/dist/types/components/ComboBox/ComboBox.d.ts.map +1 -1
  197. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +6 -0
  198. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  199. package/dist/types/components/DonutChart/DonutChart.d.ts +1 -0
  200. package/dist/types/components/DonutChart/DonutChart.d.ts.map +1 -1
  201. package/dist/types/components/FileDropZone/FileDropZone.d.ts +1 -0
  202. package/dist/types/components/FileDropZone/FileDropZone.d.ts.map +1 -1
  203. package/dist/types/components/Link/Link.d.ts +2 -0
  204. package/dist/types/components/Link/Link.d.ts.map +1 -1
  205. package/dist/types/components/List/List.d.ts +7 -0
  206. package/dist/types/components/List/List.d.ts.map +1 -1
  207. package/dist/types/components/List/model/types.d.ts +35 -0
  208. package/dist/types/components/List/model/types.d.ts.map +1 -1
  209. package/dist/types/components/Markdown/Markdown.d.ts +1 -0
  210. package/dist/types/components/Markdown/Markdown.d.ts.map +1 -1
  211. package/dist/types/components/Message/Message.d.ts +1 -0
  212. package/dist/types/components/Message/Message.d.ts.map +1 -1
  213. package/dist/types/components/Overlay/Overlay.d.ts +9 -0
  214. package/dist/types/components/Overlay/Overlay.d.ts.map +1 -1
  215. package/dist/types/components/PasswordCreationField/PasswordCreationField.d.ts +9 -0
  216. package/dist/types/components/PasswordCreationField/PasswordCreationField.d.ts.map +1 -1
  217. package/dist/types/components/ProgressBar/ProgressBar.d.ts +1 -0
  218. package/dist/types/components/ProgressBar/ProgressBar.d.ts.map +1 -1
  219. package/dist/types/components/Table/Table.d.ts +1 -0
  220. package/dist/types/components/Table/Table.d.ts.map +1 -1
  221. package/dist/types/components/Tabs/Tabs.d.ts +4 -0
  222. package/dist/types/components/Tabs/Tabs.d.ts.map +1 -1
  223. package/dist/types/components/Text/Text.d.ts +13 -0
  224. package/dist/types/components/Text/Text.d.ts.map +1 -1
  225. package/dist/types/components/Truncate/Truncate.d.ts +5 -0
  226. package/dist/types/components/Truncate/Truncate.d.ts.map +1 -1
  227. package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts +26 -0
  228. package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts.map +1 -1
  229. package/dist/types/integrations/react-hook-form/components/Form/hooks/useFormSubmitController.d.ts +1 -0
  230. package/dist/types/integrations/react-hook-form/components/Form/hooks/useFormSubmitController.d.ts.map +1 -1
  231. package/dist/types/lib/componentFactory/flowComponent.d.ts +6 -0
  232. package/dist/types/lib/componentFactory/flowComponent.d.ts.map +1 -1
  233. package/dist/types/lib/types/props.d.ts +6 -0
  234. package/dist/types/lib/types/props.d.ts.map +1 -1
  235. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"Table.mjs","sources":["../../../../../../../src/components/Table/Table.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"./Table.module.scss\";\nimport { prefixedStyleClassname } from \"@/lib/scss/selectors\";\n\nexport type TableProps = Omit<\n Aria.TableProps,\n \"render\" | \"className\" | \"style\"\n> & {\n /** The vertical alignment of the table cells content. */\n verticalAlign?: \"top\" | \"middle\";\n /**\n * The column-sizing algorithm of the table. Use \"fixed\" together with column\n * widths to enforce exact widths. @default \"auto\"\n */\n layout?: \"auto\" | \"fixed\";\n /**\n * The minimum width of the table. Below this width the table scrolls\n * horizontally instead of shrinking its columns.\n */\n minWidth?: number | string;\n className?: string;\n};\n\n/** @flr-generate all */\nexport const Table: FC<TableProps> = (props) => {\n const {\n children,\n className,\n verticalAlign = \"top\",\n layout = \"auto\",\n minWidth,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.table,\n verticalAlign !== \"top\" &&\n prefixedStyleClassname(styles, \"vertical-align-\", verticalAlign),\n styles[`layout-${layout}`],\n className,\n );\n\n return (\n <div className={styles.tableContainer}>\n <div className={styles.tableScrollArea} style={{ minWidth }}>\n <Aria.Table className={rootClassName} {...rest}>\n {children}\n </Aria.Table>\n </div>\n </div>\n );\n};\n\nexport default Table;\n"],"names":[],"mappings":";;;;;;AA0BO,MAAM,KAAA,GAAwB,CAAC,KAAA,KAAU;AAC9C,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,aAAA,GAAgB,KAAA;AAAA,IAChB,MAAA,GAAS,MAAA;AAAA,IACT,QAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,KAAA;AAAA,IACP,aAAA,KAAkB,KAAA,IAChB,sBAAA,CAAuB,MAAA,EAAQ,mBAAmB,aAAa,CAAA;AAAA,IACjE,MAAA,CAAO,CAAA,OAAA,EAAU,MAAM,CAAA,CAAE,CAAA;AAAA,IACzB;AAAA,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,cAAA,EACrB,8BAAC,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,eAAA,EAAiB,KAAA,EAAO,EAAE,UAAS,EACxD,QAAA,kBAAA,GAAA,CAAC,IAAA,CAAK,KAAA,EAAL,EAAW,SAAA,EAAW,eAAgB,GAAG,IAAA,EACvC,QAAA,EACH,CAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Table.mjs","sources":["../../../../../../../src/components/Table/Table.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"./Table.module.scss\";\nimport { prefixedStyleClassname } from \"@/lib/scss/selectors\";\n\nexport type TableProps = Omit<\n Aria.TableProps,\n \"render\" | \"className\" | \"style\"\n> & {\n /** The vertical alignment of the table cells content. */\n verticalAlign?: \"top\" | \"middle\";\n /**\n * The column-sizing algorithm of the table. Use \"fixed\" together with column\n * widths to enforce exact widths. @default \"auto\"\n */\n layout?: \"auto\" | \"fixed\";\n /**\n * The minimum width of the table. Below this width the table scrolls\n * horizontally instead of shrinking its columns.\n */\n minWidth?: number | string;\n /** The elements class name. */\n className?: string;\n};\n\n/** @flr-generate all */\nexport const Table: FC<TableProps> = (props) => {\n const {\n children,\n className,\n verticalAlign = \"top\",\n layout = \"auto\",\n minWidth,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.table,\n verticalAlign !== \"top\" &&\n prefixedStyleClassname(styles, \"vertical-align-\", verticalAlign),\n styles[`layout-${layout}`],\n className,\n );\n\n return (\n <div className={styles.tableContainer}>\n <div className={styles.tableScrollArea} style={{ minWidth }}>\n <Aria.Table className={rootClassName} {...rest}>\n {children}\n </Aria.Table>\n </div>\n </div>\n );\n};\n\nexport default Table;\n"],"names":[],"mappings":";;;;;;AA2BO,MAAM,KAAA,GAAwB,CAAC,KAAA,KAAU;AAC9C,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,aAAA,GAAgB,KAAA;AAAA,IAChB,MAAA,GAAS,MAAA;AAAA,IACT,QAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,KAAA;AAAA,IACP,aAAA,KAAkB,KAAA,IAChB,sBAAA,CAAuB,MAAA,EAAQ,mBAAmB,aAAa,CAAA;AAAA,IACjE,MAAA,CAAO,CAAA,OAAA,EAAU,MAAM,CAAA,CAAE,CAAA;AAAA,IACzB;AAAA,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,cAAA,EACrB,8BAAC,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,eAAA,EAAiB,KAAA,EAAO,EAAE,UAAS,EACxD,QAAA,kBAAA,GAAA,CAAC,IAAA,CAAK,KAAA,EAAL,EAAW,SAAA,EAAW,eAAgB,GAAG,IAAA,EACvC,QAAA,EACH,CAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
@@ -5,7 +5,6 @@ import * as Aria from 'react-aria-components';
5
5
  import clsx from 'clsx';
6
6
  import styles from '../../Table.module.scss.mjs';
7
7
  import { prefixedStyleClassname } from '../../../../lib/scss/selectors.mjs';
8
- import '../../../../lib/propsContext/propsContext.mjs';
9
8
  import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
10
9
 
11
10
  const TableColumn = (props) => {
@@ -1 +1 @@
1
- {"version":3,"file":"TableColumn.mjs","sources":["../../../../../../../../../src/components/Table/components/TableColumn/TableColumn.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"../../Table.module.scss\";\nimport { prefixedStyleClassname } from \"@/lib/scss/selectors\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\nexport interface TableColumnProps\n extends\n Omit<\n Aria.ColumnProps,\n \"children\" | \"width\" | \"minWidth\" | \"maxWidth\" | \"style\"\n >,\n PropsWithChildren {\n /** Horizontal alignment of the cell content @default \"start\" */\n horizontalAlign?: \"start\" | \"center\" | \"end\";\n /** The width of the column. */\n width?: number | string;\n /** The minimum width of the column. */\n minWidth?: number | string;\n}\n\n/** @flr-generate all */\nexport const TableColumn: FC<TableColumnProps> = (props) => {\n const {\n children,\n className,\n horizontalAlign = \"start\",\n width,\n minWidth,\n ...rest\n } = props;\n const rootClassName = clsx(\n styles.column,\n horizontalAlign !== \"start\" &&\n prefixedStyleClassname(styles, \"horizontal-align-\", horizontalAlign),\n className,\n );\n\n const propsContext: PropsContext = { Checkbox: { slot: null } };\n\n return (\n <Aria.Column\n isRowHeader\n className={rootClassName}\n {...rest}\n style={{ width, minWidth }}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Aria.Column>\n );\n};\n\nexport default TableColumn;\n"],"names":[],"mappings":";;;;;;;;AAuBO,MAAM,WAAA,GAAoC,CAAC,KAAA,KAAU;AAC1D,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,eAAA,GAAkB,OAAA;AAAA,IAClB,KAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AACJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,MAAA;AAAA,IACP,eAAA,KAAoB,OAAA,IAClB,sBAAA,CAAuB,MAAA,EAAQ,qBAAqB,eAAe,CAAA;AAAA,IACrE;AAAA,GACF;AAEA,EAAA,MAAM,eAA6B,EAAE,QAAA,EAAU,EAAE,IAAA,EAAM,MAAK,EAAE;AAE9D,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA,CAAK,MAAA;AAAA,IAAL;AAAA,MACC,WAAA,EAAW,IAAA;AAAA,MACX,SAAA,EAAW,aAAA;AAAA,MACV,GAAG,IAAA;AAAA,MACJ,KAAA,EAAO,EAAE,KAAA,EAAO,QAAA,EAAS;AAAA,MAEzB,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC1B,QAAA,EACH;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"TableColumn.mjs","sources":["../../../../../../../../../src/components/Table/components/TableColumn/TableColumn.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"../../Table.module.scss\";\nimport { prefixedStyleClassname } from \"@/lib/scss/selectors\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\nexport interface TableColumnProps\n extends\n Omit<\n Aria.ColumnProps,\n \"children\" | \"width\" | \"minWidth\" | \"maxWidth\" | \"style\"\n >,\n PropsWithChildren {\n /** Horizontal alignment of the cell content @default \"start\" */\n horizontalAlign?: \"start\" | \"center\" | \"end\";\n /** The width of the column. */\n width?: number | string;\n /** The minimum width of the column. */\n minWidth?: number | string;\n}\n\n/** @flr-generate all */\nexport const TableColumn: FC<TableColumnProps> = (props) => {\n const {\n children,\n className,\n horizontalAlign = \"start\",\n width,\n minWidth,\n ...rest\n } = props;\n const rootClassName = clsx(\n styles.column,\n horizontalAlign !== \"start\" &&\n prefixedStyleClassname(styles, \"horizontal-align-\", horizontalAlign),\n className,\n );\n\n const propsContext: PropsContext = { Checkbox: { slot: null } };\n\n return (\n <Aria.Column\n isRowHeader\n className={rootClassName}\n {...rest}\n style={{ width, minWidth }}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Aria.Column>\n );\n};\n\nexport default TableColumn;\n"],"names":[],"mappings":";;;;;;;AAuBO,MAAM,WAAA,GAAoC,CAAC,KAAA,KAAU;AAC1D,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,eAAA,GAAkB,OAAA;AAAA,IAClB,KAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AACJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,MAAA;AAAA,IACP,eAAA,KAAoB,OAAA,IAClB,sBAAA,CAAuB,MAAA,EAAQ,qBAAqB,eAAe,CAAA;AAAA,IACrE;AAAA,GACF;AAEA,EAAA,MAAM,eAA6B,EAAE,QAAA,EAAU,EAAE,IAAA,EAAM,MAAK,EAAE;AAE9D,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA,CAAK,MAAA;AAAA,IAAL;AAAA,MACC,WAAA,EAAW,IAAA;AAAA,MACX,SAAA,EAAW,aAAA;AAAA,MACV,GAAG,IAAA;AAAA,MACJ,KAAA,EAAO,EAAE,KAAA,EAAO,QAAA,EAAS;AAAA,MAEzB,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC1B,QAAA,EACH;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.mjs","sources":["../../../../../../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import { TabList } from \"@/components/Tabs/components/TabList\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport clsx from \"clsx\";\nimport type { PropsWithChildren, ReactNode } from \"react\";\nimport { useState } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./Tabs.module.scss\";\nimport { FallbackTab } from \"@/components/Tabs/components/FallbackTab\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport { useIsSSR } from \"react-aria\";\n\nexport interface TabsProps\n extends\n Omit<Aria.TabsProps, \"children\">,\n PropsWithChildren,\n FlowComponentProps {\n /* custom fallback view for not found tabs */\n tabNotFoundView?: ReactNode;\n}\n\n/** @flr-generate all */\nexport const Tabs = flowComponent(\"Tabs\", (props) => {\n const {\n children,\n className,\n defaultSelectedKey,\n selectedKey: selectedKeyProps,\n disabledKeys,\n ref,\n onSelectionChange,\n tabNotFoundView,\n ...rest\n } = props;\n\n const rootClassName = clsx(styles.tabs, className);\n const [selectedKeyState, setSelectedKeyState] = useState<\n Aria.Key | undefined\n >(defaultSelectedKey);\n\n const selectedKey = selectedKeyProps ?? selectedKeyState;\n\n const isSsr = useIsSSR();\n\n return (\n <>\n {children}\n <Aria.Tabs\n slot={null}\n className={rootClassName}\n {...rest}\n selectedKey={selectedKey}\n onSelectionChange={(key) => {\n setSelectedKeyState(key);\n if (onSelectionChange) {\n onSelectionChange(key);\n }\n }}\n disabledKeys={disabledKeys}\n ref={ref}\n >\n <TabList\n selection={selectedKey}\n onContextMenuSelectionChange={(key) => {\n setSelectedKeyState(key);\n if (onSelectionChange) {\n onSelectionChange(key);\n }\n }}\n disabledKeys={disabledKeys}\n />\n <UiComponentTunnelExit id=\"Panels\" component=\"Tabs\" />\n {!isSsr && <FallbackTab tabNotFoundView={tabNotFoundView} />}\n </Aria.Tabs>\n </>\n );\n});\n\nexport default Tabs;\n"],"names":[],"mappings":";;;;;;;;;;;AAsBO,MAAM,IAAA,GAAO,aAAA,CAAc,MAAA,EAAQ,CAAC,KAAA,KAAU;AACnD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,kBAAA;AAAA,IACA,WAAA,EAAa,gBAAA;AAAA,IACb,YAAA;AAAA,IACA,GAAA;AAAA,IACA,iBAAA;AAAA,IACA,eAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,MAAA,CAAO,IAAA,EAAM,SAAS,CAAA;AACjD,EAAA,MAAM,CAAC,gBAAA,EAAkB,mBAAmB,CAAA,GAAI,SAE9C,kBAAkB,CAAA;AAEpB,EAAA,MAAM,cAAc,gBAAA,IAAoB,gBAAA;AAExC,EAAA,MAAM,QAAQ,QAAA,EAAS;AAEvB,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,oBACD,IAAA;AAAA,MAAC,IAAA,CAAK,IAAA;AAAA,MAAL;AAAA,QACC,IAAA,EAAM,IAAA;AAAA,QACN,SAAA,EAAW,aAAA;AAAA,QACV,GAAG,IAAA;AAAA,QACJ,WAAA;AAAA,QACA,iBAAA,EAAmB,CAAC,GAAA,KAAQ;AAC1B,UAAA,mBAAA,CAAoB,GAAG,CAAA;AACvB,UAAA,IAAI,iBAAA,EAAmB;AACrB,YAAA,iBAAA,CAAkB,GAAG,CAAA;AAAA,UACvB;AAAA,QACF,CAAA;AAAA,QACA,YAAA;AAAA,QACA,GAAA;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,OAAA;AAAA,YAAA;AAAA,cACC,SAAA,EAAW,WAAA;AAAA,cACX,4BAAA,EAA8B,CAAC,GAAA,KAAQ;AACrC,gBAAA,mBAAA,CAAoB,GAAG,CAAA;AACvB,gBAAA,IAAI,iBAAA,EAAmB;AACrB,kBAAA,iBAAA,CAAkB,GAAG,CAAA;AAAA,gBACvB;AAAA,cACF,CAAA;AAAA,cACA;AAAA;AAAA,WACF;AAAA,0BACA,GAAA,CAAC,qBAAA,EAAA,EAAsB,EAAA,EAAG,QAAA,EAAS,WAAU,MAAA,EAAO,CAAA;AAAA,UACnD,CAAC,KAAA,oBAAS,GAAA,CAAC,WAAA,EAAA,EAAY,eAAA,EAAkC;AAAA;AAAA;AAAA;AAC5D,GAAA,EACF,CAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"Tabs.mjs","sources":["../../../../../../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import { TabList } from \"@/components/Tabs/components/TabList\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport clsx from \"clsx\";\nimport type { PropsWithChildren, ReactNode } from \"react\";\nimport { useState } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./Tabs.module.scss\";\nimport { FallbackTab } from \"@/components/Tabs/components/FallbackTab\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport { useIsSSR } from \"react-aria\";\n\nexport interface TabsProps\n extends\n Omit<Aria.TabsProps, \"children\">,\n PropsWithChildren,\n FlowComponentProps {\n /**\n * The view rendered when the selected tab does not exist. Defaults to a\n * built-in IllustratedMessage.\n */\n tabNotFoundView?: ReactNode;\n}\n\n/** @flr-generate all */\nexport const Tabs = flowComponent(\"Tabs\", (props) => {\n const {\n children,\n className,\n defaultSelectedKey,\n selectedKey: selectedKeyProps,\n disabledKeys,\n ref,\n onSelectionChange,\n tabNotFoundView,\n ...rest\n } = props;\n\n const rootClassName = clsx(styles.tabs, className);\n const [selectedKeyState, setSelectedKeyState] = useState<\n Aria.Key | undefined\n >(defaultSelectedKey);\n\n const selectedKey = selectedKeyProps ?? selectedKeyState;\n\n const isSsr = useIsSSR();\n\n return (\n <>\n {children}\n <Aria.Tabs\n slot={null}\n className={rootClassName}\n {...rest}\n selectedKey={selectedKey}\n onSelectionChange={(key) => {\n setSelectedKeyState(key);\n if (onSelectionChange) {\n onSelectionChange(key);\n }\n }}\n disabledKeys={disabledKeys}\n ref={ref}\n >\n <TabList\n selection={selectedKey}\n onContextMenuSelectionChange={(key) => {\n setSelectedKeyState(key);\n if (onSelectionChange) {\n onSelectionChange(key);\n }\n }}\n disabledKeys={disabledKeys}\n />\n <UiComponentTunnelExit id=\"Panels\" component=\"Tabs\" />\n {!isSsr && <FallbackTab tabNotFoundView={tabNotFoundView} />}\n </Aria.Tabs>\n </>\n );\n});\n\nexport default Tabs;\n"],"names":[],"mappings":";;;;;;;;;;;AAyBO,MAAM,IAAA,GAAO,aAAA,CAAc,MAAA,EAAQ,CAAC,KAAA,KAAU;AACnD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,kBAAA;AAAA,IACA,WAAA,EAAa,gBAAA;AAAA,IACb,YAAA;AAAA,IACA,GAAA;AAAA,IACA,iBAAA;AAAA,IACA,eAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,MAAA,CAAO,IAAA,EAAM,SAAS,CAAA;AACjD,EAAA,MAAM,CAAC,gBAAA,EAAkB,mBAAmB,CAAA,GAAI,SAE9C,kBAAkB,CAAA;AAEpB,EAAA,MAAM,cAAc,gBAAA,IAAoB,gBAAA;AAExC,EAAA,MAAM,QAAQ,QAAA,EAAS;AAEvB,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,oBACD,IAAA;AAAA,MAAC,IAAA,CAAK,IAAA;AAAA,MAAL;AAAA,QACC,IAAA,EAAM,IAAA;AAAA,QACN,SAAA,EAAW,aAAA;AAAA,QACV,GAAG,IAAA;AAAA,QACJ,WAAA;AAAA,QACA,iBAAA,EAAmB,CAAC,GAAA,KAAQ;AAC1B,UAAA,mBAAA,CAAoB,GAAG,CAAA;AACvB,UAAA,IAAI,iBAAA,EAAmB;AACrB,YAAA,iBAAA,CAAkB,GAAG,CAAA;AAAA,UACvB;AAAA,QACF,CAAA;AAAA,QACA,YAAA;AAAA,QACA,GAAA;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,OAAA;AAAA,YAAA;AAAA,cACC,SAAA,EAAW,WAAA;AAAA,cACX,4BAAA,EAA8B,CAAC,GAAA,KAAQ;AACrC,gBAAA,mBAAA,CAAoB,GAAG,CAAA;AACvB,gBAAA,IAAI,iBAAA,EAAmB;AACrB,kBAAA,iBAAA,CAAkB,GAAG,CAAA;AAAA,gBACvB;AAAA,cACF,CAAA;AAAA,cACA;AAAA;AAAA,WACF;AAAA,0BACA,GAAA,CAAC,qBAAA,EAAA,EAAsB,EAAA,EAAG,QAAA,EAAS,WAAU,MAAA,EAAO,CAAA;AAAA,UACnD,CAAC,KAAA,oBAAS,GAAA,CAAC,WAAA,EAAA,EAAY,eAAA,EAAkC;AAAA;AAAA;AAAA;AAC5D,GAAA,EACF,CAAA;AAEJ,CAAC;;;;"}
@@ -6,7 +6,6 @@ import * as Aria from 'react-aria-components';
6
6
  import styles from '../../Tabs.module.scss.mjs';
7
7
  import clsx from 'clsx';
8
8
  import { TabContextProvider } from './context.mjs';
9
- import '../../../../lib/propsContext/propsContext.mjs';
10
9
  import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
11
10
  import { Activity } from '../../../Activity/Activity.mjs';
12
11
  import { UiComponentTunnelEntry } from '../../../UiComponentTunnel/UiComponentTunnelEntry.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"Tab.mjs","sources":["../../../../../../../../../src/components/Tabs/components/Tab/Tab.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, ReactNode } from \"react\";\nimport { useId } from \"react\";\nimport type { TabPanelRenderProps } from \"react-aria-components\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"../../Tabs.module.scss\";\nimport clsx from \"clsx\";\nimport { TabContextProvider } from \"@/components/Tabs/components/Tab/context\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Activity } from \"@/components/Activity\";\nimport { UiComponentTunnelEntry } from \"@/components/UiComponentTunnel/UiComponentTunnelEntry\";\n\nexport interface TabProps\n extends Omit<Aria.TabPanelProps, \"children\">, PropsWithChildren {}\n\n/** @flr-generate all */\nexport const Tab: FC<TabProps> = (props) => {\n const { children, className, id: idFromProps, ...rest } = props;\n\n const rootClassName = clsx(styles.tabPanel, className);\n\n const generatedId = useId();\n const id = idFromProps ?? generatedId;\n\n const TabPanelRenderer = (props: TabPanelRenderProps): Awaited<ReactNode> => {\n const isSelected = props.state.selectedKey === id;\n\n const propsContext: PropsContext = {\n Content: {\n wrapWith: <Activity isActive={isSelected} forceCustomActivity />,\n },\n Section: {\n wrapWith: <Activity isActive={isSelected} forceCustomActivity />,\n },\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[isSelected, children]}\n >\n {children}\n </PropsContextProvider>\n );\n };\n\n return (\n <UiComponentTunnelEntry id=\"Panels\" component=\"Tabs\">\n <TabContextProvider value={{ id }}>\n <Aria.TabPanel\n className={rootClassName}\n shouldForceMount\n id={id}\n {...rest}\n >\n {TabPanelRenderer}\n </Aria.TabPanel>\n </TabContextProvider>\n </UiComponentTunnelEntry>\n );\n};\n\nexport default Tab;\n"],"names":["props"],"mappings":";;;;;;;;;;;AAgBO,MAAM,GAAA,GAAoB,CAAC,KAAA,KAAU;AAC1C,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,IAAI,WAAA,EAAa,GAAG,MAAK,GAAI,KAAA;AAE1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Tabs/components/Tab/Tab.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, ReactNode } from \"react\";\nimport { useId } from \"react\";\nimport type { TabPanelRenderProps } from \"react-aria-components\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"../../Tabs.module.scss\";\nimport clsx from \"clsx\";\nimport { TabContextProvider } from \"@/components/Tabs/components/Tab/context\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Activity } from \"@/components/Activity\";\nimport { UiComponentTunnelEntry } from \"@/components/UiComponentTunnel/UiComponentTunnelEntry\";\n\nexport interface TabProps\n extends Omit<Aria.TabPanelProps, \"children\">, PropsWithChildren {}\n\n/** @flr-generate all */\nexport const Tab: FC<TabProps> = (props) => {\n const { children, className, id: idFromProps, ...rest } = props;\n\n const rootClassName = clsx(styles.tabPanel, className);\n\n const generatedId = useId();\n const id = idFromProps ?? generatedId;\n\n const TabPanelRenderer = (props: TabPanelRenderProps): Awaited<ReactNode> => {\n const isSelected = props.state.selectedKey === id;\n\n const propsContext: PropsContext = {\n Content: {\n wrapWith: <Activity isActive={isSelected} forceCustomActivity />,\n },\n Section: {\n wrapWith: <Activity isActive={isSelected} forceCustomActivity />,\n },\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[isSelected, children]}\n >\n {children}\n </PropsContextProvider>\n );\n };\n\n return (\n <UiComponentTunnelEntry id=\"Panels\" component=\"Tabs\">\n <TabContextProvider value={{ id }}>\n <Aria.TabPanel\n className={rootClassName}\n shouldForceMount\n id={id}\n {...rest}\n >\n {TabPanelRenderer}\n </Aria.TabPanel>\n </TabContextProvider>\n </UiComponentTunnelEntry>\n );\n};\n\nexport default Tab;\n"],"names":["props"],"mappings":";;;;;;;;;;AAgBO,MAAM,GAAA,GAAoB,CAAC,KAAA,KAAU;AAC1C,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,IAAI,WAAA,EAAa,GAAG,MAAK,GAAI,KAAA;A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from 'react/jsx-runtime';
4
4
  import * as Aria from 'react-aria-components';
5
- import '../../lib/propsContext/propsContext.mjs';
6
5
  import { PropsContextProvider } from '../../lib/propsContext/components/PropsContextProvider.mjs';
7
6
  import { isAlphaColor } from '../../lib/types/props.mjs';
8
7
  import invariant from 'invariant';
@@ -1 +1 @@
1
- {"version":3,"file":"Text.mjs","sources":["../../../../../../../src/components/Text/Text.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type React from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n type AlphaColor,\n isAlphaColor,\n type PropsWithElementType,\n} from \"@/lib/types/props\";\nimport invariant from \"invariant\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { EmulatedBoldText } from \"@/components/EmulatedBoldText\";\nimport { Wrap } from \"@/components/Wrap\";\nimport clsx from \"clsx\";\nimport styles from \"./Text.module.scss\";\n\nexport interface TextProps\n extends\n PropsWithChildren,\n Omit<Aria.TextProps, \"children\" | \"elementType\">,\n PropsWithElementType<\"span\" | \"div\" | \"p\">,\n FlowComponentProps {\n /* Whether the elements width should match the width it would have with mold text. */\n emulateBoldWidth?: boolean;\n /* The color of the text. @default \"default\" */\n color?: \"default\" | AlphaColor;\n /* The alignment of the text. @default \"start\" */\n align?: \"start\" | \"end\" | \"center\";\n /* The text-wrap property of the text. @default undefined */\n wrap?: \"wrap\" | \"balance\" | \"pretty\";\n /* The white-space property of the text. @default undefined */\n whiteSpace?: React.CSSProperties[\"whiteSpace\"];\n /* The word-break property of the text. @default undefined */\n wordBreak?: React.CSSProperties[\"wordBreak\"];\n /* Disables standard and contextual ligatures for predictable, literal text rendering */\n noLigatures?: boolean;\n}\n\n/** @flr-generate all */\nexport const Text = flowComponent(\"Text\", (props) => {\n const {\n children,\n className,\n elementType = \"span\",\n emulateBoldWidth,\n ref,\n color = \"default\",\n align = \"start\",\n wrap,\n style: styleFromProps,\n whiteSpace,\n wordBreak,\n noLigatures,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.text,\n isAlphaColor(color) && styles[color],\n align && styles[`align-${align}`],\n wrap && styles[`wrap-${wrap}`],\n noLigatures && styles[`no-ligatures`],\n className,\n );\n\n const textProps = { ...rest, className: rootClassName };\n\n const propsContext: PropsContext = {\n Link: {\n inline: true,\n color: isAlphaColor(color) ? color : undefined,\n },\n Icon: { className: styles.icon },\n Kbd: { variant: \"soft\" },\n };\n\n const style = {\n whiteSpace,\n wordBreak,\n ...styleFromProps,\n };\n\n const childrenElement = (\n <PropsContextProvider props={propsContext}>\n <Wrap if={emulateBoldWidth}>\n <EmulatedBoldText>{children}</EmulatedBoldText>\n </Wrap>\n </PropsContextProvider>\n );\n\n if (!props.slot) {\n const Element = elementType;\n return (\n <Element style={style} {...textProps} ref={ref}>\n {childrenElement}\n </Element>\n );\n }\n\n invariant(\n typeof elementType === \"string\",\n \"'elementType' in Text component must be of type string\",\n );\n\n return (\n <Aria.Text style={style} {...textProps} elementType={elementType} ref={ref}>\n {childrenElement}\n </Aria.Text>\n );\n});\n\nexport default Text;\n"],"names":[],"mappings":";;;;;;;;;;;;AAyCO,MAAM,IAAA,GAAO,aAAA,CAAc,MAAA,EAAQ,CAAC,KAAA,KAAU;AACnD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA,GAAc,MAAA;AAAA,IACd,gBAAA;AAAA,IACA,GAAA;AAAA,IACA,KAAA,GAAQ,SAAA;AAAA,IACR,KAAA,GAAQ,OAAA;AAAA,IACR,IAAA;AAAA,IACA,KAAA,EAAO,cAAA;AAAA,IACP,UAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO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,WAAA,KAAgB,QAAA;AAAA,IACvB;AAAA,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,KAAK,IAAA,EAAL,EAAU,OAAe,GAAG,SAAA,EAAW,WAAA,EAA0B,GAAA,EAC/D,QAAA,EAAA,eAAA,EACH,CAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"Text.mjs","sources":["../../../../../../../src/components/Text/Text.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type React from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n type AlphaColor,\n isAlphaColor,\n type PropsWithElementType,\n} from \"@/lib/types/props\";\nimport invariant from \"invariant\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { EmulatedBoldText } from \"@/components/EmulatedBoldText\";\nimport { Wrap } from \"@/components/Wrap\";\nimport clsx from \"clsx\";\nimport styles from \"./Text.module.scss\";\n\nexport interface TextProps\n extends\n PropsWithChildren,\n Omit<Aria.TextProps, \"children\" | \"elementType\">,\n PropsWithElementType<\"span\" | \"div\" | \"p\">,\n FlowComponentProps {\n /**\n * Whether the elements width should match the width it would have with bold\n * text.\n */\n emulateBoldWidth?: boolean;\n /** The color of the text. @default \"default\" */\n color?: \"default\" | AlphaColor;\n /** The alignment of the text. @default \"start\" */\n align?: \"start\" | \"end\" | \"center\";\n /** The text-wrap property of the text. */\n wrap?: \"wrap\" | \"balance\" | \"pretty\";\n /** The white-space property of the text. */\n whiteSpace?: React.CSSProperties[\"whiteSpace\"];\n /** The word-break property of the text. */\n wordBreak?: React.CSSProperties[\"wordBreak\"];\n /**\n * Disables standard and contextual ligatures for predictable, literal text\n * rendering.\n */\n noLigatures?: boolean;\n}\n\n/** @flr-generate all */\nexport const Text = flowComponent(\"Text\", (props) => {\n const {\n children,\n className,\n elementType = \"span\",\n emulateBoldWidth,\n ref,\n color = \"default\",\n align = \"start\",\n wrap,\n style: styleFromProps,\n whiteSpace,\n wordBreak,\n noLigatures,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.text,\n isAlphaColor(color) && styles[color],\n align && styles[`align-${align}`],\n wrap && styles[`wrap-${wrap}`],\n noLigatures && styles[`no-ligatures`],\n className,\n );\n\n const textProps = { ...rest, className: rootClassName };\n\n const propsContext: PropsContext = {\n Link: {\n inline: true,\n color: isAlphaColor(color) ? color : undefined,\n },\n Icon: { className: styles.icon },\n Kbd: { variant: \"soft\" },\n };\n\n const style = {\n whiteSpace,\n wordBreak,\n ...styleFromProps,\n };\n\n const childrenElement = (\n <PropsContextProvider props={propsContext}>\n <Wrap if={emulateBoldWidth}>\n <EmulatedBoldText>{children}</EmulatedBoldText>\n </Wrap>\n </PropsContextProvider>\n );\n\n if (!props.slot) {\n const Element = elementType;\n return (\n <Element style={style} {...textProps} ref={ref}>\n {childrenElement}\n </Element>\n );\n }\n\n invariant(\n typeof elementType === \"string\",\n \"'elementType' in Text component must be of type string\",\n );\n\n return (\n <Aria.Text style={style} {...textProps} elementType={elementType} ref={ref}>\n {childrenElement}\n </Aria.Text>\n );\n});\n\nexport default Text;\n"],"names":[],"mappings":";;;;;;;;;;;AA+CO,MAAM,IAAA,GAAO,aAAA,CAAc,MAAA,EAAQ,CAAC,KAAA,KAAU;AACnD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA,GAAc,MAAA;AAAA,IACd,gBAAA;AAAA,IACA,GAAA;AAAA,IACA,KAAA,GAAQ,SAAA;AAAA,IACR,KAAA,GAAQ,OAAA;AAAA,IACR,IAAA;AAAA,IACA,KAAA,EAAO,cAAA;AAAA,IACP,UAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAA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O,WAAA,KAAgB,QAAA;AAAA,IACvB;AAAA,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,KAAK,IAAA,EAAL,EAAU,OAAe,GAAG,SAAA,EAAW,WAAA,EAA0B,GAAA,EAC/D,QAAA,EAAA,eAAA,EACH,CAAA;AAEJ,CAAC;;;;"}
@@ -6,7 +6,6 @@ import styles from './TextArea.module.scss.mjs';
6
6
  import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
7
7
  import { useObjectRef } from '@react-aria/utils';
8
8
  import { useFieldComponent } from '../../lib/hooks/useFieldComponent.mjs';
9
- import '../../lib/propsContext/propsContext.mjs';
10
9
  import { PropsContextProvider } from '../../lib/propsContext/components/PropsContextProvider.mjs';
11
10
  import clsx from 'clsx';
12
11
  import { useState, useEffect } from 'react';
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.mjs","sources":["../../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport styles from \"./TextArea.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport { type PropsWithChildren, useEffect, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\n\nexport interface TextAreaProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\" | \"aria-hidden\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n /** Allows the user to manually resize the textArea horizontally. */\n allowResize?: boolean | \"horizontal\" | \"vertical\";\n /** @deprecated Use `allowResize` instead. */\n allowHorizontalResize?: boolean;\n /** @deprecated Use `allowResize` instead. */\n allowVerticalResize?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const warnDeprecation = useWarnDeprecation();\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowVerticalResize,\n allowHorizontalResize,\n showCharacterCount,\n className,\n onChange,\n isReadOnly,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n if (allowHorizontalResize !== undefined) {\n warnDeprecation(\n \"The 'allowHorizontalResize' prop is deprecated and will be removed in a future release. Use 'allowResize' instead.\",\n );\n }\n if (allowVerticalResize !== undefined) {\n warnDeprecation(\n \"The 'allowVerticalResize' prop is deprecated and will be removed in a future release. Use 'allowResize' instead.\",\n );\n }\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props, \"TextArea\");\n\n let { allowResize } = props;\n if (allowVerticalResize) {\n allowResize = \"vertical\";\n } else if (allowHorizontalResize) {\n allowResize = \"horizontal\";\n }\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const inputClassName = clsx(\n styles.input,\n typeof allowResize === \"boolean\" && allowResize ? styles.resize : null,\n allowResize === \"horizontal\"\n ? styles.horizontalResize\n : allowResize === \"vertical\"\n ? styles.verticalResize\n : null,\n );\n\n const handleChange = (v: string) => {\n if (isReadOnly) {\n return;\n }\n\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales, \"TextArea\");\n\n const charactersCountDescription = translation.format(\"characters\", {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n });\n\n const localRef = useObjectRef(ref);\n\n const getHeight = (rows: number) => {\n return `calc(var(--line-height-m) * ${rows} + (var(--form-control--padding-y) * 2))`;\n };\n\n const [resized, setResized] = useState(false);\n\n const autoResizable = rows !== autoResizeMaxRows;\n\n const verticallyResizable =\n allowResize && (!autoResizable || (autoResizable && resized));\n\n useEffect(() => {\n const textarea = localRef.current;\n if (!textarea) return;\n\n const startHeight = textarea.offsetHeight;\n let tracking = false;\n\n const handleMouseDown = () => {\n tracking = true;\n };\n\n const handleMouseMove = () => {\n if (!tracking || resized) return;\n\n const currentHeight = textarea.offsetHeight;\n\n if (currentHeight !== startHeight) {\n setResized(true);\n tracking = false;\n }\n };\n\n const handleMouseUp = () => {\n tracking = false;\n };\n\n window.addEventListener(\"mousedown\", handleMouseDown);\n window.addEventListener(\"mousemove\", handleMouseMove);\n window.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n window.removeEventListener(\"mousedown\", handleMouseDown);\n window.removeEventListener(\"mousemove\", handleMouseMove);\n window.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [resized]);\n\n const updateHeight = () => {\n if (localRef.current && autoResizable && !verticallyResizable) {\n // https://stackoverflow.com/a/60795884\n localRef.current.style.height = \"0px\";\n const scrollHeight = localRef.current.scrollHeight;\n // + 2 to add border height\n localRef.current.style.height = scrollHeight + 2 + \"px\";\n }\n };\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n <Aria.TextArea\n rows={rows}\n {...(isReadOnly ? { \"data-readonly\": true } : {})}\n aria-readonly={isReadOnly}\n aria-hidden={props[\"aria-hidden\"]}\n placeholder={placeholder}\n className={inputClassName}\n ref={localRef}\n onChange={updateHeight}\n style={{\n caretColor: isReadOnly ? \"transparent\" : undefined,\n minHeight: getHeight(rows),\n maxHeight: verticallyResizable\n ? undefined\n : getHeight(autoResizeMaxRows),\n }}\n />\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextArea;\n"],"names":["rows"],"mappings":";;;;;;;;;;;;;;;;AAoCO,MAAM,QAAA,GAAW,aAAA,CAAc,UAAA,EAAY,CAAC,KAAA,KAAU;AAC3D,EAAA,MAAM,kBAAkB,kBAAA,EAAmB;AAC3C,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,WAAA;AAAA,IACA,IAAA,GAAO,CAAA;AAAA,IACP,iBAAA,GAAoB,IAAA;AAAA,IACpB,GAAA;AAAA,IACA,mBAAA;AAAA,IACA,qBAAA;AAAA,IACA,kBAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,4BAA4B,KAAK,CAAA;AAErC,EAAA,MAAM,CAAC,eAAA,EAAiB,kBAAkB,CAAA,GAAI,QAAA;AAAA,IAC5C,KAAA,CAAM,YAAA,EAAc,MAAA,IAAU,KAAA,CAAM,OAAO,MAAA,IAAU;AAAA,GACvD;AAEA,EAAA,IAAI,0BAA0B,MAAA,EAAW;AACvC,IAAA,eAAA;AAAA,MACE;AAAA,KACF;AAAA,EACF;AACA,EAAA,IAAI,wBAAwB,MAAA,EAAW;AACrC,IAAA,eAAA;AAAA,MACE;AAAA,KACF;AAAA,EACF;AAEA,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,GAAI,iBAAA,CAAkB,KAAA,EAAO,UAAU,CAAA;AAEvC,EAAA,IAAI,EAAE,aAAY,GAAI,KAAA;AACtB,EAAA,IAAI,mBAAA,EAAqB;AACvB,IAAA,WAAA,GAAc,UAAA;AAAA,EA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3,"file":"TextArea.mjs","sources":["../../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport styles from \"./TextArea.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport { type PropsWithChildren, useEffect, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\n\nexport interface TextAreaProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\" | \"aria-hidden\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n /** Allows the user to manually resize the textArea horizontally. */\n allowResize?: boolean | \"horizontal\" | \"vertical\";\n /** @deprecated Use `allowResize` instead. */\n allowHorizontalResize?: boolean;\n /** @deprecated Use `allowResize` instead. */\n allowVerticalResize?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const warnDeprecation = useWarnDeprecation();\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowVerticalResize,\n allowHorizontalResize,\n showCharacterCount,\n className,\n onChange,\n isReadOnly,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n if (allowHorizontalResize !== undefined) {\n warnDeprecation(\n \"The 'allowHorizontalResize' prop is deprecated and will be removed in a future release. Use 'allowResize' instead.\",\n );\n }\n if (allowVerticalResize !== undefined) {\n warnDeprecation(\n \"The 'allowVerticalResize' prop is deprecated and will be removed in a future release. Use 'allowResize' instead.\",\n );\n }\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props, \"TextArea\");\n\n let { allowResize } = props;\n if (allowVerticalResize) {\n allowResize = \"vertical\";\n } else if (allowHorizontalResize) {\n allowResize = \"horizontal\";\n }\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const inputClassName = clsx(\n styles.input,\n typeof allowResize === \"boolean\" && allowResize ? styles.resize : null,\n allowResize === \"horizontal\"\n ? styles.horizontalResize\n : allowResize === \"vertical\"\n ? styles.verticalResize\n : null,\n );\n\n const handleChange = (v: string) => {\n if (isReadOnly) {\n return;\n }\n\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales, \"TextArea\");\n\n const charactersCountDescription = translation.format(\"characters\", {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n });\n\n const localRef = useObjectRef(ref);\n\n const getHeight = (rows: number) => {\n return `calc(var(--line-height-m) * ${rows} + (var(--form-control--padding-y) * 2))`;\n };\n\n const [resized, setResized] = useState(false);\n\n const autoResizable = rows !== autoResizeMaxRows;\n\n const verticallyResizable =\n allowResize && (!autoResizable || (autoResizable && resized));\n\n useEffect(() => {\n const textarea = localRef.current;\n if (!textarea) return;\n\n const startHeight = textarea.offsetHeight;\n let tracking = false;\n\n const handleMouseDown = () => {\n tracking = true;\n };\n\n const handleMouseMove = () => {\n if (!tracking || resized) return;\n\n const currentHeight = textarea.offsetHeight;\n\n if (currentHeight !== startHeight) {\n setResized(true);\n tracking = false;\n }\n };\n\n const handleMouseUp = () => {\n tracking = false;\n };\n\n window.addEventListener(\"mousedown\", handleMouseDown);\n window.addEventListener(\"mousemove\", handleMouseMove);\n window.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n window.removeEventListener(\"mousedown\", handleMouseDown);\n window.removeEventListener(\"mousemove\", handleMouseMove);\n window.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [resized]);\n\n const updateHeight = () => {\n if (localRef.current && autoResizable && !verticallyResizable) {\n // https://stackoverflow.com/a/60795884\n localRef.current.style.height = \"0px\";\n const scrollHeight = localRef.current.scrollHeight;\n // + 2 to add border height\n localRef.current.style.height = scrollHeight + 2 + \"px\";\n }\n };\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n <Aria.TextArea\n rows={rows}\n {...(isReadOnly ? { \"data-readonly\": true } : {})}\n aria-readonly={isReadOnly}\n aria-hidden={props[\"aria-hidden\"]}\n placeholder={placeholder}\n className={inputClassName}\n ref={localRef}\n onChange={updateHeight}\n style={{\n caretColor: isReadOnly ? \"transparent\" : undefined,\n minHeight: getHeight(rows),\n maxHeight: verticallyResizable\n ? undefined\n : getHeight(autoResizeMaxRows),\n }}\n />\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextArea;\n"],"names":["rows"],"mappings":";;;;;;;;;;;;;;;AAoCO,MAAM,QAAA,GAAW,aAAA,CAAc,UAAA,EAAY,CAAC,KAAA,KAAU;AAC3D,EAAA,MAAM,kBAAkB,kBAAA,EAAmB;AAC3C,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,WAAA;AAAA,IACA,IAAA,GAAO,CAAA;AAAA,IACP,iBAAA,GAAoB,IAAA;AAAA,IACpB,GAAA;AAAA,IACA,mBAAA;AAAA,IACA,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AA;AAAA,wBACpC,GAAA;AAAA,UAAC,IAAA,CAAK,QAAA;AAAA,UAAL;AAAA,YACC,IAAA;AAAA,YACC,GAAI,UAAA,GAAa,EAAE,eAAA,EAAiB,IAAA,KAAS,EAAC;AAAA,YAC/C,eAAA,EAAe,UAAA;AAAA,YACf,aAAA,EAAa,MAAM,aAAa,CAAA;AAAA,YAChC,WAAA;AAAA,YACA,SAAA,EAAW,cAAA;AAAA,YACX,GAAA,EAAK,QAAA;AAAA,YACL,QAAA,EAAU,YAAA;AAAA,YACV,KAAA,EAAO;AAAA,cACL,UAAA,EAAY,aAAa,aAAA,GAAgB,MAAA;AAAA,cACzC,SAAA,EAAW,UAAU,IAAI,CAAA;AAAA,cACzB,SAAA,EAAW,mBAAA,GACP,MAAA,GACA,SAAA,CAAU,iBAAiB;AAAA;AACjC;AAAA,SACF;AAAA,QACC,kBAAA,oBACC,GAAA,CAAC,gBAAA,EAAA,EAAkB,QAAA,EAAA,0BAAA,EAA2B,CAAA;AAAA,4BAE/C,cAAA,EAAA,EAAe;AAAA,OAAA,EAClB;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
@@ -5,7 +5,6 @@ import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
5
5
  import * as Aria from 'react-aria-components';
6
6
  import { useState } from 'react';
7
7
  import { useControlledHostValueProps } from '../../lib/remote/useControlledHostValueProps.mjs';
8
- import '../../lib/propsContext/propsContext.mjs';
9
8
  import { PropsContextProvider } from '../../lib/propsContext/components/PropsContextProvider.mjs';
10
9
  import { useFieldComponent } from '../../lib/hooks/useFieldComponent.mjs';
11
10
  import styles from './TextField.module.scss.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.mjs","sources":["../../../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { type PropsWithChildren, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./TextField.module.scss\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport locales from \"./locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface TextFieldProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.InputProps, \"placeholder\">,\n FlowComponentProps<HTMLInputElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextField = flowComponent(\"TextField\", (props) => {\n const {\n className,\n showCharacterCount,\n form,\n placeholder,\n ref,\n type: typeFromProps,\n children,\n onChange,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const [type, setType] = useState(typeFromProps);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props, \"TextField\");\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const propsContext: PropsContext = {\n Button: {\n className: styles.button,\n variant: \"plain\",\n color: \"secondary\",\n tunnel: {\n id: \"button\",\n component: \"TextField\",\n },\n },\n CopyButton: {\n className: styles.button,\n tunnel: {\n id: \"button\",\n component: \"TextField\",\n },\n },\n ...fieldPropsContext,\n };\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales, \"TextField\");\n\n const charactersCountDescription = translation.format(\"characters\", {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n });\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n type={type}\n >\n <PropsContextProvider props={propsContext}>\n <FieldErrorCaptureContext>\n {children}\n <div className={styles.inputContainer}>\n <Aria.Input\n form={form}\n placeholder={placeholder}\n className={styles.input}\n ref={ref}\n />\n <UiComponentTunnelExit id=\"button\" component=\"TextField\" />\n {typeFromProps === \"password\" && (\n <Button\n color=\"secondary\"\n variant=\"plain\"\n className={styles.button}\n onPress={() =>\n setType(type === \"password\" ? \"text\" : \"password\")\n }\n aria-label={translation.format(\n `password.${type === \"password\" ? \"show\" : \"hide\"}`,\n )}\n >\n {type === \"password\" ? <IconShow /> : <IconHide />}\n </Button>\n )}\n </div>\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextField;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AA4BO,MAAM,SAAA,GAAY,aAAA,CAAc,WAAA,EAAa,CAAC,KAAA,KAAU;AAC7D,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,kBAAA;AAAA,IACA,IAAA;AAAA,IACA,WAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA,EAAM,aAAA;AAAA,IACN,QAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,4BAA4B,KAAK,CAAA;AAErC,EAAA,MAAM,CAAC,eAAA,EAAiB,kBAAkB,CAAA,GAAI,QAAA;AAAA,IAC5C,KAAA,CAAM,YAAA,EAAc,MAAA,IAAU,KAAA,CAAM,OAAO,MAAA,IAAU;AAAA,GACvD;AAEA,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,aAAa,CAAA;AAE9C,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA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,"file":"TextField.mjs","sources":["../../../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { type PropsWithChildren, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./TextField.module.scss\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport locales from \"./locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface TextFieldProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.InputProps, \"placeholder\">,\n FlowComponentProps<HTMLInputElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextField = flowComponent(\"TextField\", (props) => {\n const {\n className,\n showCharacterCount,\n form,\n placeholder,\n ref,\n type: typeFromProps,\n children,\n onChange,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const [type, setType] = useState(typeFromProps);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props, \"TextField\");\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const propsContext: PropsContext = {\n Button: {\n className: styles.button,\n variant: \"plain\",\n color: \"secondary\",\n tunnel: {\n id: \"button\",\n component: \"TextField\",\n },\n },\n CopyButton: {\n className: styles.button,\n tunnel: {\n id: \"button\",\n component: \"TextField\",\n },\n },\n ...fieldPropsContext,\n };\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales, \"TextField\");\n\n const charactersCountDescription = translation.format(\"characters\", {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n });\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n type={type}\n >\n <PropsContextProvider props={propsContext}>\n <FieldErrorCaptureContext>\n {children}\n <div className={styles.inputContainer}>\n <Aria.Input\n form={form}\n placeholder={placeholder}\n className={styles.input}\n ref={ref}\n />\n <UiComponentTunnelExit id=\"button\" component=\"TextField\" />\n {typeFromProps === \"password\" && (\n <Button\n color=\"secondary\"\n variant=\"plain\"\n className={styles.button}\n onPress={() =>\n setType(type === \"password\" ? \"text\" : \"password\")\n }\n aria-label={translation.format(\n `password.${type === \"password\" ? \"show\" : \"hide\"}`,\n )}\n >\n {type === \"password\" ? <IconShow /> : <IconHide />}\n </Button>\n )}\n </div>\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextField;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA4BO,MAAM,SAAA,GAAY,aAAA,CAAc,WAAA,EAAa,CAAC,KAAA,KAAU;AAC7D,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,kBAAA;AAAA,IACA,IAAA;AAAA,IACA,WAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA,EAAM,aAAA;AAAA,IACN,QAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,4BAA4B,KAAK,CAAA;AAErC,EAAA,MAAM,CAAC,eAAA,EAAiB,kBAAkB,CAAA,GAAI,QAAA;AAAA,IAC5C,KAAA,CAAM,YAAA,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,oBACC,GAAA,CAAC,gBAAA,EAAA,EAAkB,QAAA,EAAA,0BAAA,EAA2B;AAAA,SAAA,EAElD,CAAA;AAAA,4BACC,cAAA,EAAA,EAAe;AAAA,OAAA,EAClB;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
@@ -4,7 +4,6 @@ import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import 'react';
5
5
  import * as Aria from 'react-aria-components';
6
6
  import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
7
- import '../../lib/propsContext/propsContext.mjs';
8
7
  import { PropsContextProvider } from '../../lib/propsContext/components/PropsContextProvider.mjs';
9
8
  import styles from './TimeField.module.scss.mjs';
10
9
  import { useFieldComponent } from '../../lib/hooks/useFieldComponent.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"TimeField.mjs","sources":["../../../../../../../src/components/TimeField/TimeField.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport styles from \"./TimeField.module.scss\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport DateInput from \"@/components/DateInput\";\n\nexport interface TimeFieldProps<T extends Aria.TimeValue = Aria.TimeValue>\n extends\n PropsWithChildren<Omit<Aria.TimeFieldProps<T>, \"children\">>,\n FlowComponentProps<HTMLSpanElement> {}\n\n/** @flr-generate all */\nexport const TimeField = flowComponent(\"TimeField\", (props) => {\n const { children, ref, ...rest } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props, \"TimeField\");\n\n return (\n <Aria.TimeField hourCycle={24} {...rest} {...fieldProps}>\n <FieldErrorCaptureContext>\n <DateInput className={styles.dateInput} ref={ref} />\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </Aria.TimeField>\n );\n});\n\nexport default TimeField;\n"],"names":[],"mappings":";;;;;;;;;;AAiBO,MAAM,SAAA,GAAY,aAAA,CAAc,WAAA,EAAa,CAAC,KAAA,KAAU;AAC7D,EAAA,MAAM,EAAE,QAAA,EAAU,GAAA,EAAK,GAAG,MAAK,GAAI,KAAA;AAEnC,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,GAAI,iBAAA,CAAkB,KAAA,EAAO,WAAW,CAAA;AAExC,EAAA,uBACE,IAAA,CAAC,KAAK,SAAA,EAAL,EAAe,WAAW,EAAA,EAAK,GAAG,IAAA,EAAO,GAAG,UAAA,EAC3C,QAAA,EAAA;AAAA,oBAAA,IAAA,CAAC,wBAAA,EAAA,EACC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAW,MAAA,CAAO,SAAA,EAAW,GAAA,EAAU,CAAA;AAAA,sBAClD,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,iBAAA,EAC1B,QAAA,EACH;AAAA,KAAA,EACF,CAAA;AAAA,wBACC,cAAA,EAAA,EAAe;AAAA,GAAA,EAClB,CAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"TimeField.mjs","sources":["../../../../../../../src/components/TimeField/TimeField.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport styles from \"./TimeField.module.scss\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport DateInput from \"@/components/DateInput\";\n\nexport interface TimeFieldProps<T extends Aria.TimeValue = Aria.TimeValue>\n extends\n PropsWithChildren<Omit<Aria.TimeFieldProps<T>, \"children\">>,\n FlowComponentProps<HTMLSpanElement> {}\n\n/** @flr-generate all */\nexport const TimeField = flowComponent(\"TimeField\", (props) => {\n const { children, ref, ...rest } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props, \"TimeField\");\n\n return (\n <Aria.TimeField hourCycle={24} {...rest} {...fieldProps}>\n <FieldErrorCaptureContext>\n <DateInput className={styles.dateInput} ref={ref} />\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </Aria.TimeField>\n );\n});\n\nexport default TimeField;\n"],"names":[],"mappings":";;;;;;;;;AAiBO,MAAM,SAAA,GAAY,aAAA,CAAc,WAAA,EAAa,CAAC,KAAA,KAAU;AAC7D,EAAA,MAAM,EAAE,QAAA,EAAU,GAAA,EAAK,GAAG,MAAK,GAAI,KAAA;AAEnC,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,GAAI,iBAAA,CAAkB,KAAA,EAAO,WAAW,CAAA;AAExC,EAAA,uBACE,IAAA,CAAC,KAAK,SAAA,EAAL,EAAe,WAAW,EAAA,EAAK,GAAG,IAAA,EAAO,GAAG,UAAA,EAC3C,QAAA,EAAA;AAAA,oBAAA,IAAA,CAAC,wBAAA,EAAA,EACC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAW,MAAA,CAAO,SAAA,EAAW,GAAA,EAAU,CAAA;AAAA,sBAClD,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,iBAAA,EAC1B,QAAA,EACH;AAAA,KAAA,EACF,CAAA;AAAA,wBACC,cAAA,EAAA,EAAe;AAAA,GAAA,EAClB,CAAA;AAEJ,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Truncate.mjs","sources":["../../../../../../../src/components/Truncate/Truncate.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./Truncate.module.scss\";\nimport type { TruncateProps as ReactTruncateProps } from \"react-truncate-inside\";\nimport ReactTruncate from \"react-truncate-inside\";\nimport { extractTextFromFirstChild } from \"@/lib/react/remote\";\nimport { useIsSSR } from \"react-aria\";\n\nexport interface TruncateProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Omit<ReactTruncateProps, \"text\" | \"width\"> {\n title?: string;\n}\n\n/** @flr-generate all */\nexport const Truncate: FC<TruncateProps> = (props) => {\n const { children, className, title, offset, ellipsis } = props;\n\n const rootClassName = clsx(styles.truncate, className);\n\n const isSsr = useIsSSR();\n\n if (!isSsr && (offset || ellipsis)) {\n const text = extractTextFromFirstChild(children) ?? \"\";\n\n return (\n <span title={title} className={rootClassName}>\n <ReactTruncate offset={offset} ellipsis={ellipsis} text={text} />\n </span>\n );\n }\n\n return (\n <span title={title} className={clsx(rootClassName, styles.ellipsis)}>\n {children}\n </span>\n );\n};\n\nexport default Truncate;\n"],"names":[],"mappings":";;;;;;;AAkBO,MAAM,QAAA,GAA8B,CAAC,KAAA,KAAU;AACpD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,KAAA,EAAO,MAAA,EAAQ,UAAS,GAAI,KAAA;AAEzD,EAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,SAAS,CAAA;AAErD,EAAA,MAAM,QAAQ,QAAA,EAAS;AAEvB,EAAA,IAAI,CAAC,KAAA,KAAU,MAAA,IAAU,QAAA,CAAA,EAAW;AAClC,IAAA,MAAM,IAAA,GAAO,yBAAA,CAA0B,QAAQ,CAAA,IAAK,EAAA;AAEpD,IAAA,uBACE,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAc,SAAA,EAAW,aAAA,EAC7B,8BAAC,aAAA,EAAA,EAAc,MAAA,EAAgB,QAAA,EAAoB,IAAA,EAAY,CAAA,EACjE,CAAA;AAAA,EAEJ;AAEA,EAAA,uBACE,GAAA,CAAC,UAAK,KAAA,EAAc,SAAA,EAAW,KAAK,aAAA,EAAe,MAAA,CAAO,QAAQ,CAAA,EAC/D,QAAA,EACH,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Truncate.mjs","sources":["../../../../../../../src/components/Truncate/Truncate.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./Truncate.module.scss\";\nimport type { TruncateProps as ReactTruncateProps } from \"react-truncate-inside\";\nimport ReactTruncate from \"react-truncate-inside\";\nimport { extractTextFromFirstChild } from \"@/lib/react/remote\";\nimport { useIsSSR } from \"react-aria\";\n\nexport interface TruncateProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Omit<ReactTruncateProps, \"text\" | \"width\"> {\n /**\n * The `title` attribute of the elements root, which browsers show as a native\n * tooltip on hover. It is not derived from the children — pass the full text\n * to make it readable while truncated.\n */\n title?: string;\n}\n\n/** @flr-generate all */\nexport const Truncate: FC<TruncateProps> = (props) => {\n const { children, className, title, offset, ellipsis } = props;\n\n const rootClassName = clsx(styles.truncate, className);\n\n const isSsr = useIsSSR();\n\n if (!isSsr && (offset || ellipsis)) {\n const text = extractTextFromFirstChild(children) ?? \"\";\n\n return (\n <span title={title} className={rootClassName}>\n <ReactTruncate offset={offset} ellipsis={ellipsis} text={text} />\n </span>\n );\n }\n\n return (\n <span title={title} className={clsx(rootClassName, styles.ellipsis)}>\n {children}\n </span>\n );\n};\n\nexport default Truncate;\n"],"names":[],"mappings":";;;;;;;AAuBO,MAAM,QAAA,GAA8B,CAAC,KAAA,KAAU;AACpD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,KAAA,EAAO,MAAA,EAAQ,UAAS,GAAI,KAAA;AAEzD,EAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,SAAS,CAAA;AAErD,EAAA,MAAM,QAAQ,QAAA,EAAS;AAEvB,EAAA,IAAI,CAAC,KAAA,KAAU,MAAA,IAAU,QAAA,CAAA,EAAW;AAClC,IAAA,MAAM,IAAA,GAAO,yBAAA,CAA0B,QAAQ,CAAA,IAAK,EAAA;AAEpD,IAAA,uBACE,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAc,SAAA,EAAW,aAAA,EAC7B,8BAAC,aAAA,EAAA,EAAc,MAAA,EAAgB,QAAA,EAAoB,IAAA,EAAY,CAAA,EACjE,CAAA;AAAA,EAEJ;AAEA,EAAA,uBACE,GAAA,CAAC,UAAK,KAAA,EAAc,SAAA,EAAW,KAAK,aAAA,EAAe,MAAA,CAAO,QAAQ,CAAA,EAC/D,QAAA,EACH,CAAA;AAEJ;;;;"}
@@ -3,7 +3,6 @@
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  import { useFormContext } from '../FormContextProvider/FormContextProvider.mjs';
5
5
  import { dynamic } from '../../../../lib/propsContext/dynamicProps/dynamic.mjs';
6
- import '../../../../lib/propsContext/propsContext.mjs';
7
6
  import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
8
7
  import 'react';
9
8
  import { useController, useWatch } from 'react-hook-form';
@@ -1 +1 @@
1
- {"version":3,"file":"Field.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { type PropsWithChildren } from \"react\";\nimport {\n type ControllerProps,\n type FieldValues,\n useController,\n type UseFormReturn,\n useWatch,\n} from \"react-hook-form\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useUpdateFormDefaultValue } from \"@/integrations/react-hook-form/components/Field/hooks/useUpdateFormDefaultValue\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">, PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(\n locales,\n \"ReactHookForm.Field\",\n );\n\n const controller = useController({\n ...props,\n rules: {\n ...props.rules,\n min:\n typeof rest.rules?.min === \"number\"\n ? {\n value: rest.rules.min,\n message: stringFormatter.format(\"validation.min\", {\n number: rest.rules.min,\n }),\n }\n : rest.rules?.min,\n max:\n typeof rest.rules?.max === \"number\"\n ? {\n value: rest.rules.max,\n message: stringFormatter.format(\"validation.max\", {\n number: rest.rules.max,\n }),\n }\n : rest.rules?.max,\n required:\n typeof rest.rules?.required === \"boolean\"\n ? stringFormatter.format(\"validation.required\")\n : rest.rules?.required,\n pattern:\n rest.rules?.pattern instanceof RegExp\n ? {\n value: rest.rules.pattern,\n message: stringFormatter.format(\"validation.pattern\", {\n pattern: rest.rules.pattern.source,\n }),\n }\n : rest.rules?.pattern,\n minLength:\n typeof rest.rules?.minLength === \"number\"\n ? {\n value: rest.rules.minLength,\n message: stringFormatter.format(\"validation.minLength\", {\n number: rest.rules.minLength,\n }),\n }\n : rest.rules?.minLength,\n maxLength:\n typeof rest.rules?.maxLength === \"number\"\n ? {\n value: rest.rules.maxLength,\n message: stringFormatter.format(\"validation.maxLength\", {\n number: rest.rules.maxLength,\n }),\n }\n : rest.rules?.maxLength,\n },\n });\n const formContext = useFormContext<T>();\n\n useUpdateFormDefaultValue(props, formContext.form);\n\n /**\n * We don't use controller.field.value here, because it doesn't update when\n * the form value is updated outside of this field (e.g. when setting values\n * with form.setValue or resetting the form), and the Field unmounts in\n * between. This is generally a feature of React Hook Form, but this breaks\n * dynamic forms where fields are conditionally rendered.\n *\n * By using formContext.form.watch(name), we ensure that the field value is\n * always in sync with the form state. See:\n * https://react-hook-form.com/api/usecontroller/controller/\n */\n const value =\n useWatch({\n control: formContext.form.control,\n name,\n }) ?? controller.field.value;\n\n const isFieldInvalid = controller.fieldState.invalid;\n\n const fieldProps = {\n ...controller.field,\n value,\n name,\n form: formContext.id,\n isRequired: !!rest.rules?.required,\n isReadOnly: formContext.isReadOnly,\n validationBehavior: \"aria\" as const,\n defaultValue,\n isInvalid: isFieldInvalid,\n children: dynamic((p) => {\n return (\n <>\n {p.children}\n <FieldErrorView>\n {controller.fieldState.error?.message}\n </FieldErrorView>\n </>\n );\n }),\n };\n\n const propsContext: PropsContext = {\n Autocomplete: {\n SearchField: fieldProps,\n TextField: fieldProps,\n },\n SearchField: fieldProps,\n TextField: fieldProps,\n TextArea: fieldProps,\n MarkdownEditor: fieldProps,\n CodeEditor: fieldProps,\n Checkbox: {\n ...fieldProps,\n isSelected: value,\n },\n CheckboxGroup: {\n ...fieldProps,\n },\n CheckboxButton: {\n ...fieldProps,\n isSelected: value,\n },\n FileField: fieldProps,\n FileDropZone: fieldProps,\n NumberField: fieldProps,\n RadioGroup: fieldProps,\n Switch: {\n ...fieldProps,\n isSelected: value,\n },\n Slider: fieldProps,\n PasswordCreationField: fieldProps,\n DatePicker: fieldProps,\n DateRangePicker: fieldProps,\n TimeField: fieldProps,\n SegmentedControl: fieldProps,\n Select: {\n ...fieldProps,\n selectedKey: value,\n },\n ComboBox: {\n ...fieldProps,\n selectedKey: value,\n },\n Rating: fieldProps,\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[\n controller.fieldState,\n controller.field,\n value,\n formContext.isReadOnly,\n ]}\n >\n {children}\n </PropsContextProvider>\n );\n}\n\nexport const typedField = <T extends FieldValues>(\n ignoredForm: UseFormReturn<T> | UseFormReturn<T>[\"control\"],\n): typeof Field<T> => Field;\n\nexport default Field;\n"],"names":[],"mappings":";;;;;;;;;;;;AAsBO,SAAS,MAA6B,KAAA,EAAsB;AACjE,EAAA,MAAM,EA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A,IACA,QAAA,EAAU;AAAA,MACR,GAAG,UAAA;AAAA,MACH,WAAA,EAAa;AAAA,KACf;AAAA,IACA,MAAA,EAAQ;AAAA,GACV;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,YAAA;AAAA,MACP,YAAA,EAAc;AAAA,QACZ,UAAA,CAAW,UAAA;AAAA,QACX,UAAA,CAAW,KAAA;AAAA,QACX,KAAA;AAAA,QACA,WAAA,CAAY;AAAA,OACd;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ;AAEO,MAAM,UAAA,GAAa,CACxB,WAAA,KACoB;;;;"}
1
+ {"version":3,"file":"Field.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { type PropsWithChildren } from \"react\";\nimport {\n type ControllerProps,\n type FieldValues,\n useController,\n type UseFormReturn,\n useWatch,\n} from \"react-hook-form\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useUpdateFormDefaultValue } from \"@/integrations/react-hook-form/components/Field/hooks/useUpdateFormDefaultValue\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">, PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(\n locales,\n \"ReactHookForm.Field\",\n );\n\n const controller = useController({\n ...props,\n rules: {\n ...props.rules,\n min:\n typeof rest.rules?.min === \"number\"\n ? {\n value: rest.rules.min,\n message: stringFormatter.format(\"validation.min\", {\n number: rest.rules.min,\n }),\n }\n : rest.rules?.min,\n max:\n typeof rest.rules?.max === \"number\"\n ? {\n value: rest.rules.max,\n message: stringFormatter.format(\"validation.max\", {\n number: rest.rules.max,\n }),\n }\n : rest.rules?.max,\n required:\n typeof rest.rules?.required === \"boolean\"\n ? stringFormatter.format(\"validation.required\")\n : rest.rules?.required,\n pattern:\n rest.rules?.pattern instanceof RegExp\n ? {\n value: rest.rules.pattern,\n message: stringFormatter.format(\"validation.pattern\", {\n pattern: rest.rules.pattern.source,\n }),\n }\n : rest.rules?.pattern,\n minLength:\n typeof rest.rules?.minLength === \"number\"\n ? {\n value: rest.rules.minLength,\n message: stringFormatter.format(\"validation.minLength\", {\n number: rest.rules.minLength,\n }),\n }\n : rest.rules?.minLength,\n maxLength:\n typeof rest.rules?.maxLength === \"number\"\n ? {\n value: rest.rules.maxLength,\n message: stringFormatter.format(\"validation.maxLength\", {\n number: rest.rules.maxLength,\n }),\n }\n : rest.rules?.maxLength,\n },\n });\n const formContext = useFormContext<T>();\n\n useUpdateFormDefaultValue(props, formContext.form);\n\n /**\n * We don't use controller.field.value here, because it doesn't update when\n * the form value is updated outside of this field (e.g. when setting values\n * with form.setValue or resetting the form), and the Field unmounts in\n * between. This is generally a feature of React Hook Form, but this breaks\n * dynamic forms where fields are conditionally rendered.\n *\n * By using formContext.form.watch(name), we ensure that the field value is\n * always in sync with the form state. See:\n * https://react-hook-form.com/api/usecontroller/controller/\n */\n const value =\n useWatch({\n control: formContext.form.control,\n name,\n }) ?? controller.field.value;\n\n const isFieldInvalid = controller.fieldState.invalid;\n\n const fieldProps = {\n ...controller.field,\n value,\n name,\n form: formContext.id,\n isRequired: !!rest.rules?.required,\n isReadOnly: formContext.isReadOnly,\n validationBehavior: \"aria\" as const,\n defaultValue,\n isInvalid: isFieldInvalid,\n children: dynamic((p) => {\n return (\n <>\n {p.children}\n <FieldErrorView>\n {controller.fieldState.error?.message}\n </FieldErrorView>\n </>\n );\n }),\n };\n\n const propsContext: PropsContext = {\n Autocomplete: {\n SearchField: fieldProps,\n TextField: fieldProps,\n },\n SearchField: fieldProps,\n TextField: fieldProps,\n TextArea: fieldProps,\n MarkdownEditor: fieldProps,\n CodeEditor: fieldProps,\n Checkbox: {\n ...fieldProps,\n isSelected: value,\n },\n CheckboxGroup: {\n ...fieldProps,\n },\n CheckboxButton: {\n ...fieldProps,\n isSelected: value,\n },\n FileField: fieldProps,\n FileDropZone: fieldProps,\n NumberField: fieldProps,\n RadioGroup: fieldProps,\n Switch: {\n ...fieldProps,\n isSelected: value,\n },\n Slider: fieldProps,\n PasswordCreationField: fieldProps,\n DatePicker: fieldProps,\n DateRangePicker: fieldProps,\n TimeField: fieldProps,\n SegmentedControl: fieldProps,\n Select: {\n ...fieldProps,\n selectedKey: value,\n },\n ComboBox: {\n ...fieldProps,\n selectedKey: value,\n },\n Rating: fieldProps,\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[\n controller.fieldState,\n controller.field,\n value,\n formContext.isReadOnly,\n ]}\n >\n {children}\n </PropsContextProvider>\n );\n}\n\nexport const typedField = <T extends FieldValues>(\n ignoredForm: UseFormReturn<T> | UseFormReturn<T>[\"control\"],\n): typeof Field<T> => Field;\n\nexport default Field;\n"],"names":[],"mappings":";;;;;;;;;;;AAsBO,SAAS,MAA6B,KAAA,EAAsB;AACjE,EAAA,MAAM,EAAE,QAAA,EAAU,IAAA,EAAM,YAAA,EAAc,GAAG,MAAK,GAAI,KAAA;AAElD,EAAA,MAAM,eAAA,GAAkB,2BAAA;AAAA,IACtB,OAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,aAAa,aAAA,CAAc;AAAA,IAC/B,GAAG,KAAA;AAAA,IACH,KAAA,EAAO;AAAA,MACL,GAAG,KAAA,CAAM,KAAA;AAAA,MACT,GAAA,EACE,OAAO,IAAA,CAAK,KAAA,EAAO,QAAQ,QAAA,GACvB;AAAA,QACE,KAAA,EAAO,KAAK,KAAA,CAAM,GAAA;AAAA,QAClB,OAAA,EAAS,eAAA,CAAgB,MA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 +1 @@
1
- {"version":3,"file":"Form.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import { FormContextProvider } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport { useComponentDefaults } from \"@/components/ComponentDefaultsProvider\";\nimport { type OverlayController, useModalController } from \"@/lib/controller\";\nimport {\n type BaseSyntheticEvent,\n type ComponentProps,\n type FC,\n type PropsWithChildren,\n type Ref,\n type SubmitEventHandler,\n useId,\n useMemo,\n useRef,\n} from \"react\";\nimport type {\n FieldValues,\n Path,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { useFormRootErrorController } from \"../FormRootError/useFormRootErrorController\";\nimport { FormRootError } from \"../../lib/FormRootError\";\nimport { useFormSettings } from \"../FormSettingsProvider/FormSettingsProvider\";\nimport {\n useFormSubmitController,\n type WithFormSubmitControllerProps,\n} from \"@/integrations/react-hook-form/components/Form/hooks/useFormSubmitController\";\nimport { useHotkeySubmit } from \"@/integrations/react-hook-form/components/Form/hooks/useHotkeySubmit\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\nexport type AfterFormSubmitCallback = (...unknownArgs: unknown[]) => unknown;\n\nexport interface FormAutoResetOptions {\n onAfterModalClose?: boolean;\n}\n\ntype FormComponentType = FC<\n PropsWithChildren<{\n id: string;\n onSubmit?: SubmitEventHandler | FormOnSubmitHandler<never>;\n ref?: Ref<HTMLFormElement>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends\n Omit<ComponentProps<\"form\">, \"onSubmit\">,\n PropsWithChildren,\n WithFormSubmitControllerProps {\n form: UseFormReturn<F>;\n onSubmit: FormOnSubmitHandler<F>;\n formComponent?: FC<Omit<FormComponentType, \"ref\">>;\n isReadOnly?: boolean;\n autoReset?: FormAutoResetOptions | boolean;\n}\n\nconst DefaultFormComponent: FormComponentType = (p) => <form {...p} />;\n\n/**\n * Runs `operation` while closing the surrounding Modal is allowed without a\n * confirmation, and drops that permission again as soon as the operation has\n * settled. Scoping it to the operation is what keeps a submit that only\n * advances a wizard step from disarming the confirmation for good (#2775).\n */\nconst runWithGrantedModalClose = (\n modalController: OverlayController,\n operation: () => unknown,\n): unknown => {\n const releaseGrant = modalController.grantCloseWithoutConfirmation();\n\n let result: unknown;\n try {\n result = operation();\n } catch (error) {\n releaseGrant();\n throw error;\n }\n\n if (result instanceof Promise) {\n return result.finally(releaseGrant);\n }\n releaseGrant();\n return result;\n};\n\nexport function Form<F extends FieldValues>(props: FormProps<F>) {\n const {\n form,\n children,\n onSubmit: onSubmitProp,\n formComponent = DefaultFormComponent,\n isReadOnly,\n ref,\n id: idProp,\n autoReset = true,\n submitController: submitControllerFromProps,\n ...formProps\n } = props;\n\n const newFormId = useId();\n const formId = idProp ?? newFormId;\n const FormComponent = useMemo(() => formComponent, [formId]);\n const afterSubmitCallback = useRef<AfterFormSubmitCallback>(undefined);\n const { isDirty } = form.formState;\n const rootErrorController = useFormRootErrorController();\n\n const defaultSubmitController = useFormSubmitController();\n const submitController = submitControllerFromProps\n ? submitControllerFromProps.submit.extend(defaultSubmitController)\n : defaultSubmitController;\n\n const autoResetOptions =\n typeof autoReset === \"boolean\"\n ? { onAfterModalClose: autoReset }\n : autoReset;\n\n const { confirmModalCloseOnUnsavedChanges } = useComponentDefaults(\"Form\");\n\n const modalController = useModalController();\n modalController.useUpdateOptions({\n // A dirty Form contributes one close confirmation source to the surrounding\n // Modal; sources are combined, so a clean Form does not overrule a\n // `<Modal confirmOnClose>`. The Modal renders the confirmation dialog.\n // An application that switched the default off contributes nothing at all.\n confirmOnClose: confirmModalCloseOnUnsavedChanges ? isDirty : undefined,\n });\n modalController.useOnClosed(() => {\n if (autoResetOptions?.onAfterModalClose) {\n form.reset();\n }\n });\n\n const { submitInterceptor } = useFormSettings();\n const onSubmit = submitInterceptor\n ? (values: F) => submitInterceptor<F>(onSubmitProp, values, { form })\n : onSubmitProp;\n\n const handleSubmitResult = (result: unknown) => {\n if (typeof result === \"function\") {\n afterSubmitCallback.current = result as AfterFormSubmitCallback;\n }\n const rootError = form.getFieldState(\"root\" as Path<F>)?.error;\n if (rootError && !rootErrorController.errorComponentMounted) {\n throw new FormRootError(rootError);\n }\n };\n\n const handleSubmit = (e?: BaseSyntheticEvent | F) => {\n const formEvent =\n e && \"nativeEvent\" in e ? (e as BaseSyntheticEvent) : undefined;\n formEvent?.stopPropagation();\n\n return form.handleSubmit((values, event) =>\n runWithGrantedModalClose(modalController, () => {\n const submitResult = onSubmit(values, event);\n if (submitResult instanceof Promise) {\n return submitResult.then(handleSubmitResult);\n }\n handleSubmitResult(submitResult);\n }),\n )(formEvent);\n };\n submitController.submit.set(handleSubmit);\n\n const onAfterSuccessFeedback = () => {\n const callback = afterSubmitCallback.current;\n if (!callback) {\n return;\n }\n // The callback runs after the submit itself has finished (and after\n // SubmitButton's success feedback), so it needs its own permission to close\n // the Modal.\n runWithGrantedModalClose(modalController, callback);\n };\n\n const refWithHotkeySubmit = useHotkeySubmit({\n ref,\n submitController,\n });\n\n return (\n <RhfFormContextProvider {...form}>\n <FormContextProvider\n form={form as UseFormReturn}\n isReadOnly={isReadOnly}\n id={formId}\n onAfterSuccessFeedback={onAfterSuccessFeedback}\n rootErrorController={rootErrorController}\n >\n <FormComponent\n {...formProps}\n ref={refWithHotkeySubmit}\n id={formId}\n onSubmit={handleSubmit}\n >\n {children}\n </FormComponent>\n </FormContextProvider>\n </RhfFormContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],"mappings":";;;;;;;;;;;;AA0DA,MAAM,uBAA0C,CAAC,CAAA,qBAAM,GAAA,CAAC,MAAA,EAAA,EAAM,GAAG,CAAA,EAAG,CAAA;AAQpE,MAAM,wBAAA,GAA2B,CAC/B,eAAA,EACA,SAAA,KACY;AACZ,EAAA,MAAM,YAAA,GAAe,gBAAgB,6BAAA,EAA8B;AAEnE,EAAA,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,KAAK,CAAA;AAC3C,QAAA,IAAI,wBAAwB,OAAA,EAAS;AACnC,UAAA,OAAO,YAAA,CAAa,KAAK,kBAAkB,CAAA;AAAA,QAC7C;AACA,QAAA,kBAAA,CAAmB,YAAY,CAAA;AAAA,MACjC,CAAC;AAAA,MACD,SAAS,CAAA;AAAA,EACb,CAAA;AACA,EAAA,gBAAA,CAAiB,MAAA,CAAO,IAAI,YAAY,CAAA;AAExC,EAAA,MAAM,yBAAyB,MAAM;AACnC,IAAA,MAAM,WAAW,mBAAA,CAAoB,OAAA;AACrC,IAAA,IAAI,CAAC,QAAA,EAAU;AACb,MAAA;AAAA,IACF;AAIA,IAAA,wBAAA,CAAyB,iBAAiB,QAAQ,CAAA;AAAA,EACpD,CAAA;AAEA,EAAA,MAAM,sBAAsB,eAAA,CAAgB;AAAA,IAC1C,GAAA;AAAA,IACA;AAAA,GACD,CAAA;AAED,EAAA,uBACE,GAAA,CAACA,YAAA,EAAA,EAAwB,GAAG,IAAA,EAC1B,QAAA,kBAAA,GAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,UAAA;AAAA,MACA,EAAA,EAAI,MAAA;AAAA,MACJ,sBAAA;AAAA,MACA,mBAAA;AAAA,MAEA,QAAA,kBAAA,GAAA;AAAA,QAAC,aAAA;AAAA,QAAA;AAAA,UACE,GAAG,SAAA;AAAA,UACJ,GAAA,EAAK,mBAAA;AAAA,UACL,EAAA,EAAI,MAAA;AAAA,UACJ,QAAA,EAAU,YAAA;AAAA,UAET;AAAA;AAAA;AACH;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Form.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import { FormContextProvider } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport { useComponentDefaults } from \"@/components/ComponentDefaultsProvider\";\nimport { type OverlayController, useModalController } from \"@/lib/controller\";\nimport {\n type BaseSyntheticEvent,\n type ComponentProps,\n type FC,\n type PropsWithChildren,\n type Ref,\n type SubmitEventHandler,\n useId,\n useMemo,\n useRef,\n} from \"react\";\nimport type {\n FieldValues,\n Path,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { useFormRootErrorController } from \"../FormRootError/useFormRootErrorController\";\nimport { FormRootError } from \"../../lib/FormRootError\";\nimport { useFormSettings } from \"../FormSettingsProvider/FormSettingsProvider\";\nimport {\n useFormSubmitController,\n type WithFormSubmitControllerProps,\n} from \"@/integrations/react-hook-form/components/Form/hooks/useFormSubmitController\";\nimport { useHotkeySubmit } from \"@/integrations/react-hook-form/components/Form/hooks/useHotkeySubmit\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\nexport type AfterFormSubmitCallback = (...unknownArgs: unknown[]) => unknown;\n\nexport interface FormAutoResetOptions {\n /**\n * Whether the form is reset to its default values after the surrounding modal\n * has closed.\n *\n * @default true\n */\n onAfterModalClose?: boolean;\n}\n\ntype FormComponentType = FC<\n PropsWithChildren<{\n id: string;\n onSubmit?: SubmitEventHandler | FormOnSubmitHandler<never>;\n ref?: Ref<HTMLFormElement>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends\n Omit<ComponentProps<\"form\">, \"onSubmit\">,\n PropsWithChildren,\n WithFormSubmitControllerProps {\n /** The react-hook-form instance returned by `useForm()`. */\n form: UseFormReturn<F>;\n /**\n * Called with the validated form values when the form is submitted. Returning\n * a promise keeps the submit button pending until it settles.\n */\n onSubmit: FormOnSubmitHandler<F>;\n /**\n * The component rendered as the form element. Use it to render the form with\n * a routers form component. Defaults to a plain `<form />`.\n */\n formComponent?: FC<Omit<FormComponentType, \"ref\">>;\n /**\n * Whether all fields of the form can be read but not edited.\n *\n * @default false\n */\n isReadOnly?: boolean;\n /**\n * When the form is reset to its default values. `true` resets it after the\n * surrounding modal has closed, `false` never resets it.\n *\n * @default true\n */\n autoReset?: FormAutoResetOptions | boolean;\n}\n\nconst DefaultFormComponent: FormComponentType = (p) => <form {...p} />;\n\n/**\n * Runs `operation` while closing the surrounding Modal is allowed without a\n * confirmation, and drops that permission again as soon as the operation has\n * settled. Scoping it to the operation is what keeps a submit that only\n * advances a wizard step from disarming the confirmation for good (#2775).\n */\nconst runWithGrantedModalClose = (\n modalController: OverlayController,\n operation: () => unknown,\n): unknown => {\n const releaseGrant = modalController.grantCloseWithoutConfirmation();\n\n let result: unknown;\n try {\n result = operation();\n } catch (error) {\n releaseGrant();\n throw error;\n }\n\n if (result instanceof Promise) {\n return result.finally(releaseGrant);\n }\n releaseGrant();\n return result;\n};\n\nexport function Form<F extends FieldValues>(props: FormProps<F>) {\n const {\n form,\n children,\n onSubmit: onSubmitProp,\n formComponent = DefaultFormComponent,\n isReadOnly,\n ref,\n id: idProp,\n autoReset = true,\n submitController: submitControllerFromProps,\n ...formProps\n } = props;\n\n const newFormId = useId();\n const formId = idProp ?? newFormId;\n const FormComponent = useMemo(() => formComponent, [formId]);\n const afterSubmitCallback = useRef<AfterFormSubmitCallback>(undefined);\n const { isDirty } = form.formState;\n const rootErrorController = useFormRootErrorController();\n\n const defaultSubmitController = useFormSubmitController();\n const submitController = submitControllerFromProps\n ? submitControllerFromProps.submit.extend(defaultSubmitController)\n : defaultSubmitController;\n\n const autoResetOptions =\n typeof autoReset === \"boolean\"\n ? { onAfterModalClose: autoReset }\n : autoReset;\n\n const { confirmModalCloseOnUnsavedChanges } = useComponentDefaults(\"Form\");\n\n const modalController = useModalController();\n modalController.useUpdateOptions({\n // A dirty Form contributes one close confirmation source to the surrounding\n // Modal; sources are combined, so a clean Form does not overrule a\n // `<Modal confirmOnClose>`. The Modal renders the confirmation dialog.\n // An application that switched the default off contributes nothing at all.\n confirmOnClose: confirmModalCloseOnUnsavedChanges ? isDirty : undefined,\n });\n modalController.useOnClosed(() => {\n if (autoResetOptions?.onAfterModalClose) {\n form.reset();\n }\n });\n\n const { submitInterceptor } = useFormSettings();\n const onSubmit = submitInterceptor\n ? (values: F) => submitInterceptor<F>(onSubmitProp, values, { form })\n : onSubmitProp;\n\n const handleSubmitResult = (result: unknown) => {\n if (typeof result === \"function\") {\n afterSubmitCallback.current = result as AfterFormSubmitCallback;\n }\n const rootError = form.getFieldState(\"root\" as Path<F>)?.error;\n if (rootError && !rootErrorController.errorComponentMounted) {\n throw new FormRootError(rootError);\n }\n };\n\n const handleSubmit = (e?: BaseSyntheticEvent | F) => {\n const formEvent =\n e && \"nativeEvent\" in e ? (e as BaseSyntheticEvent) : undefined;\n formEvent?.stopPropagation();\n\n return form.handleSubmit((values, event) =>\n runWithGrantedModalClose(modalController, () => {\n const submitResult = onSubmit(values, event);\n if (submitResult instanceof Promise) {\n return submitResult.then(handleSubmitResult);\n }\n handleSubmitResult(submitResult);\n }),\n )(formEvent);\n };\n submitController.submit.set(handleSubmit);\n\n const onAfterSuccessFeedback = () => {\n const callback = afterSubmitCallback.current;\n if (!callback) {\n return;\n }\n // The callback runs after the submit itself has finished (and after\n // SubmitButton's success feedback), so it needs its own permission to close\n // the Modal.\n runWithGrantedModalClose(modalController, callback);\n };\n\n const refWithHotkeySubmit = useHotkeySubmit({\n ref,\n submitController,\n });\n\n return (\n <RhfFormContextProvider {...form}>\n <FormContextProvider\n form={form as UseFormReturn}\n isReadOnly={isReadOnly}\n id={formId}\n onAfterSuccessFeedback={onAfterSuccessFeedback}\n rootErrorController={rootErrorController}\n >\n <FormComponent\n {...formProps}\n ref={refWithHotkeySubmit}\n id={formId}\n onSubmit={handleSubmit}\n >\n {children}\n </FormComponent>\n </FormContextProvider>\n </RhfFormContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],"mappings":";;;;;;;;;;;;AAoFA,MAAM,uBAA0C,CAAC,CAAA,qBAAM,GAAA,CAAC,MAAA,EAAA,EAAM,GAAG,CAAA,EAAG,CAAA;AAQpE,MAAM,wBAAA,GAA2B,CAC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A,KAChC,wBAAA,CAAyB,iBAAiB,MAAM;AAC9C,QAAA,MAAM,YAAA,GAAe,QAAA,CAAS,MAAA,EAAQ,KAAK,CAAA;AAC3C,QAAA,IAAI,wBAAwB,OAAA,EAAS;AACnC,UAAA,OAAO,YAAA,CAAa,KAAK,kBAAkB,CAAA;AAAA,QAC7C;AACA,QAAA,kBAAA,CAAmB,YAAY,CAAA;AAAA,MACjC,CAAC;AAAA,MACD,SAAS,CAAA;AAAA,EACb,CAAA;AACA,EAAA,gBAAA,CAAiB,MAAA,CAAO,IAAI,YAAY,CAAA;AAExC,EAAA,MAAM,yBAAyB,MAAM;AACnC,IAAA,MAAM,WAAW,mBAAA,CAAoB,OAAA;AACrC,IAAA,IAAI,CAAC,QAAA,EAAU;AACb,MAAA;AAAA,IACF;AAIA,IAAA,wBAAA,CAAyB,iBAAiB,QAAQ,CAAA;AAAA,EACpD,CAAA;AAEA,EAAA,MAAM,sBAAsB,eAAA,CAAgB;AAAA,IAC1C,GAAA;AAAA,IACA;AAAA,GACD,CAAA;AAED,EAAA,uBACE,GAAA,CAACA,YAAA,EAAA,EAAwB,GAAG,IAAA,EAC1B,QAAA,kBAAA,GAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,UAAA;AAAA,MACA,EAAA,EAAI,MAAA;AAAA,MACJ,sBAAA;AAAA,MACA,mBAAA;AAAA,MAEA,QAAA,kBAAA,GAAA;AAAA,QAAC,aAAA;AAAA,QAAA;AAAA,UACE,GAAG,SAAA;AAAA,UACJ,GAAA,EAAK,mBAAA;AAAA,UACL,EAAA,EAAI,MAAA;AAAA,UACJ,QAAA,EAAU,YAAA;AAAA,UAET;AAAA;AAAA;AACH;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFormSubmitController.mjs","sources":["../../../../../../../../../../src/integrations/react-hook-form/components/Form/hooks/useFormSubmitController.ts"],"sourcesContent":["import { useRef } from \"react\";\n\nexport type FormSubmitController = ReturnType<typeof useFormSubmitController>;\n\nexport interface WithFormSubmitControllerProps {\n submitController?: FormSubmitController;\n}\n\nexport const useFormSubmitController = () => {\n const submitHandler = useRef<() => Promise<void> | void>(async () => {\n /* empty */\n });\n\n const fn = async () => {\n await submitHandler.current();\n };\n\n const formSubmitControllerReturn = {\n submit: fn,\n };\n\n fn.set = (newSubmitHandler: () => Promise<void> | void) => {\n submitHandler.current = newSubmitHandler;\n };\n\n fn.extend = (submitController: FormSubmitController) => {\n const previous = submitHandler.current;\n\n submitHandler.current = async () => {\n await previous();\n await submitController.submit();\n };\n\n return formSubmitControllerReturn;\n };\n\n return formSubmitControllerReturn;\n};\n"],"names":[],"mappings":";;AAQO,MAAM,0BAA0B,MAAM;AAC3C,EAAA,MAAM,aAAA,GAAgB,OAAmC,YAAY;AAAA,EAErE,CAAC,CAAA;AAED,EAAA,MAAM,KAAK,YAAY;AACrB,IAAA,MAAM,cAAc,OAAA,EAAQ;AAAA,EAC9B,CAAA;AAEA,EAAA,MAAM,0BAAA,GAA6B;AAAA,IACjC,MAAA,EAAQ;AAAA,GACV;AAEA,EAAA,EAAA,CAAG,GAAA,GAAM,CAAC,gBAAA,KAAiD;AACzD,IAAA,aAAA,CAAc,OAAA,GAAU,gBAAA;AAAA,EAC1B,CAAA;AAEA,EAAA,EAAA,CAAG,MAAA,GAAS,CAAC,gBAAA,KAA2C;AACtD,IAAA,MAAM,WAAW,aAAA,CAAc,OAAA;AAE/B,IAAA,aAAA,CAAc,UAAU,YAAY;AAClC,MAAA,MAAM,QAAA,EAAS;AACf,MAAA,MAAM,iBAAiB,MAAA,EAAO;AAAA,IAChC,CAAA;AAEA,IAAA,OAAO,0BAAA;AAAA,EACT,CAAA;AAEA,EAAA,OAAO,0BAAA;AACT;;;;"}
1
+ {"version":3,"file":"useFormSubmitController.mjs","sources":["../../../../../../../../../../src/integrations/react-hook-form/components/Form/hooks/useFormSubmitController.ts"],"sourcesContent":["import { useRef } from \"react\";\n\nexport type FormSubmitController = ReturnType<typeof useFormSubmitController>;\n\nexport interface WithFormSubmitControllerProps {\n /** A controller to submit the form from outside of it. */\n submitController?: FormSubmitController;\n}\n\nexport const useFormSubmitController = () => {\n const submitHandler = useRef<() => Promise<void> | void>(async () => {\n /* empty */\n });\n\n const fn = async () => {\n await submitHandler.current();\n };\n\n const formSubmitControllerReturn = {\n submit: fn,\n };\n\n fn.set = (newSubmitHandler: () => Promise<void> | void) => {\n submitHandler.current = newSubmitHandler;\n };\n\n fn.extend = (submitController: FormSubmitController) => {\n const previous = submitHandler.current;\n\n submitHandler.current = async () => {\n await previous();\n await submitController.submit();\n };\n\n return formSubmitControllerReturn;\n };\n\n return formSubmitControllerReturn;\n};\n"],"names":[],"mappings":";;AASO,MAAM,0BAA0B,MAAM;AAC3C,EAAA,MAAM,aAAA,GAAgB,OAAmC,YAAY;AAAA,EAErE,CAAC,CAAA;AAED,EAAA,MAAM,KAAK,YAAY;AACrB,IAAA,MAAM,cAAc,OAAA,EAAQ;AAAA,EAC9B,CAAA;AAEA,EAAA,MAAM,0BAAA,GAA6B;AAAA,IACjC,MAAA,EAAQ;AAAA,GACV;AAEA,EAAA,EAAA,CAAG,GAAA,GAAM,CAAC,gBAAA,KAAiD;AACzD,IAAA,aAAA,CAAc,OAAA,GAAU,gBAAA;AAAA,EAC1B,CAAA;AAEA,EAAA,EAAA,CAAG,MAAA,GAAS,CAAC,gBAAA,KAA2C;AACtD,IAAA,MAAM,WAAW,aAAA,CAAc,OAAA;AAE/B,IAAA,aAAA,CAAc,UAAU,YAAY;AAClC,MAAA,MAAM,QAAA,EAAS;AACf,MAAA,MAAM,iBAAiB,MAAA,EAAO;AAAA,IAChC,CAAA;AAEA,IAAA,OAAO,0BAAA;AAAA,EACT,CAAA;AAEA,EAAA,OAAO,0BAAA;AACT;;;;"}
@@ -2,7 +2,6 @@
2
2
  /* */
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import { Action } from '../../../../components/Action/Action.mjs';
5
- import '../../../../lib/propsContext/propsContext.mjs';
6
5
  import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
7
6
  import { useFormContext } from '../FormContextProvider/FormContextProvider.mjs';
8
7
 
@@ -1 +1 @@
1
- {"version":3,"file":"FormResetAction.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormAction/FormResetAction.tsx"],"sourcesContent":["import Action, { type ActionProps } from \"@/components/Action\";\nimport { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider\";\nimport { PropsContextProvider, type PropsContext } from \"@/lib/propsContext\";\nimport type { FC, PropsWithChildren } from \"react\";\n\ntype SupportedActionProps = Pick<ActionProps, \"showFeedback\">;\n\nexport const FormResetAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n\n const { form, isReadOnly, id } = useFormContext();\n\n const propsContext: PropsContext = {\n Button: {\n isReadOnly,\n form: id,\n color: \"secondary\",\n variant: \"soft\",\n type: \"button\",\n },\n };\n\n return (\n <Action onAction={() => form.reset()} {...actionProps}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[isReadOnly, id]}\n >\n {children}\n </PropsContextProvider>\n </Action>\n );\n};\n"],"names":[],"mappings":";;;;;;AAOO,MAAM,eAAA,GAA+D,CAC1E,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,WAAA,EAAY,GAAI,KAAA;AAErC,EAAA,MAAM,EAAE,IAAA,EAAM,UAAA,EAAY,EAAA,KAAO,cAAA,EAAe;AAEhD,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,MAAA,EAAQ;AAAA,MACN,UAAA;AAAA,MACA,IAAA,EAAM,EAAA;AAAA,MACN,KAAA,EAAO,WAAA;AAAA,MACP,OAAA,EAAS,MAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,UAAO,QAAA,EAAU,MAAM,KAAK,KAAA,EAAM,EAAI,GAAG,WAAA,EACxC,QAAA,kBAAA,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,YAAA;AAAA,MACP,YAAA,EAAc,CAAC,UAAA,EAAY,EAAE,CAAA;AAAA,MAE5B;AAAA;AAAA,GACH,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"FormResetAction.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormAction/FormResetAction.tsx"],"sourcesContent":["import Action, { type ActionProps } from \"@/components/Action\";\nimport { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider\";\nimport { PropsContextProvider, type PropsContext } from \"@/lib/propsContext\";\nimport type { FC, PropsWithChildren } from \"react\";\n\ntype SupportedActionProps = Pick<ActionProps, \"showFeedback\">;\n\nexport const FormResetAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n\n const { form, isReadOnly, id } = useFormContext();\n\n const propsContext: PropsContext = {\n Button: {\n isReadOnly,\n form: id,\n color: \"secondary\",\n variant: \"soft\",\n type: \"button\",\n },\n };\n\n return (\n <Action onAction={() => form.reset()} {...actionProps}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[isReadOnly, id]}\n >\n {children}\n </PropsContextProvider>\n </Action>\n );\n};\n"],"names":[],"mappings":";;;;;AAOO,MAAM,eAAA,GAA+D,CAC1E,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,WAAA,EAAY,GAAI,KAAA;AAErC,EAAA,MAAM,EAAE,IAAA,EAAM,UAAA,EAAY,EAAA,KAAO,cAAA,EAAe;AAEhD,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,MAAA,EAAQ;AAAA,MACN,UAAA;AAAA,MACA,IAAA,EAAM,EAAA;AAAA,MACN,KAAA,EAAO,WAAA;AAAA,MACP,OAAA,EAAS,MAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,UAAO,QAAA,EAAU,MAAM,KAAK,KAAA,EAAM,EAAI,GAAG,WAAA,EACxC,QAAA,kBAAA,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,YAAA;AAAA,MACP,YAAA,EAAc,CAAC,UAAA,EAAY,EAAE,CAAA;AAAA,MAE5B;AAAA;AAAA,GACH,EACF,CAAA;AAEJ;;;;"}
@@ -4,7 +4,6 @@ import { jsx } from 'react/jsx-runtime';
4
4
  import { Action } from '../../../../components/Action/Action.mjs';
5
5
  import { ActionBatch } from '../../../../components/Action/ActionBatch.mjs';
6
6
  import { useFormSubmitAction } from '../FormContextProvider/useFormSubmitAction.mjs';
7
- import '../../../../lib/propsContext/propsContext.mjs';
8
7
  import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
9
8
  import { useFormContext } from '../FormContextProvider/FormContextProvider.mjs';
10
9
 
@@ -1 +1 @@
1
- {"version":3,"file":"FormSubmitAction.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormAction/FormSubmitAction.tsx"],"sourcesContent":["import Action, { ActionBatch, type ActionProps } from \"@/components/Action\";\nimport { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider\";\nimport { useFormSubmitAction } from \"@/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction\";\nimport { PropsContextProvider, type PropsContext } from \"@/lib/propsContext\";\nimport type { FC, PropsWithChildren } from \"react\";\n\nconst InnerFormSubmitAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n const { form } = useFormContext();\n const formSubmitAction = useFormSubmitAction(form.formState, actionProps);\n return (\n <Action actionModel={formSubmitAction} {...actionProps}>\n {children}\n </Action>\n );\n};\n\ntype SupportedActionProps = Pick<ActionProps, \"showFeedback\">;\n\nexport const FormSubmitAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n\n const { onAfterSuccessFeedback, isReadOnly, id } = useFormContext();\n\n const propsContext: PropsContext = {\n Button: {\n isReadOnly,\n type: \"submit\",\n form: id,\n },\n };\n\n const innerSubmitAction = (\n <InnerFormSubmitAction {...actionProps}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[isReadOnly, id]}\n >\n {children}\n </PropsContextProvider>\n </InnerFormSubmitAction>\n );\n\n if (onAfterSuccessFeedback) {\n return (\n <Action onAction={onAfterSuccessFeedback}>\n <ActionBatch>{innerSubmitAction}</ActionBatch>\n </Action>\n );\n }\n\n return innerSubmitAction;\n};\n\nexport default FormSubmitAction;\n"],"names":[],"mappings":";;;;;;;;AAMA,MAAM,qBAAA,GAAqE,CACzE,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,WAAA,EAAY,GAAI,KAAA;AACrC,EAAA,MAAM,EAAE,IAAA,EAAK,GAAI,cAAA,EAAe;AAChC,EAAA,MAAM,gBAAA,GAAmB,mBAAA,CAAoB,IAAA,CAAK,SAAA,EAAW,WAAW,CAAA;AACxE,EAAA,2BACG,MAAA,EAAA,EAAO,WAAA,EAAa,gBAAA,EAAmB,GAAG,aACxC,QAAA,EACH,CAAA;AAEJ,CAAA;AAIO,MAAM,gBAAA,GAAgE,CAC3E,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,WAAA,EAAY,GAAI,KAAA;AAErC,EAAA,MAAM,EAAE,sBAAA,EAAwB,UAAA,EAAY,EAAA,KAAO,cAAA,EAAe;AAElE,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,MAAA,EAAQ;AAAA,MACN,UAAA;AAAA,MACA,IAAA,EAAM,QAAA;AAAA,MACN,IAAA,EAAM;AAAA;AACR,GACF;AAEA,EAAA,MAAM,iBAAA,mBACJ,GAAA,CAAC,qBAAA,EAAA,EAAuB,GAAG,WAAA,EACzB,QAAA,kBAAA,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,YAAA;AAAA,MACP,YAAA,EAAc,CAAC,UAAA,EAAY,EAAE,CAAA;AAAA,MAE5B;AAAA;AAAA,GACH,EACF,CAAA;AAGF,EAAA,IAAI,sBAAA,EAAwB;AAC1B,IAAA,2BACG,MAAA,EAAA,EAAO,QAAA,EAAU,wBAChB,QAAA,kBAAA,GAAA,CAAC,WAAA,EAAA,EAAa,6BAAkB,CAAA,EAClC,CAAA;AAAA,EAEJ;AAEA,EAAA,OAAO,iBAAA;AACT;;;;"}
1
+ {"version":3,"file":"FormSubmitAction.mjs","sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormAction/FormSubmitAction.tsx"],"sourcesContent":["import Action, { ActionBatch, type ActionProps } from \"@/components/Action\";\nimport { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider\";\nimport { useFormSubmitAction } from \"@/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction\";\nimport { PropsContextProvider, type PropsContext } from \"@/lib/propsContext\";\nimport type { FC, PropsWithChildren } from \"react\";\n\nconst InnerFormSubmitAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n const { form } = useFormContext();\n const formSubmitAction = useFormSubmitAction(form.formState, actionProps);\n return (\n <Action actionModel={formSubmitAction} {...actionProps}>\n {children}\n </Action>\n );\n};\n\ntype SupportedActionProps = Pick<ActionProps, \"showFeedback\">;\n\nexport const FormSubmitAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n\n const { onAfterSuccessFeedback, isReadOnly, id } = useFormContext();\n\n const propsContext: PropsContext = {\n Button: {\n isReadOnly,\n type: \"submit\",\n form: id,\n },\n };\n\n const innerSubmitAction = (\n <InnerFormSubmitAction {...actionProps}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[isReadOnly, id]}\n >\n {children}\n </PropsContextProvider>\n </InnerFormSubmitAction>\n );\n\n if (onAfterSuccessFeedback) {\n return (\n <Action onAction={onAfterSuccessFeedback}>\n <ActionBatch>{innerSubmitAction}</ActionBatch>\n </Action>\n );\n }\n\n return innerSubmitAction;\n};\n\nexport default FormSubmitAction;\n"],"names":[],"mappings":";;;;;;;AAMA,MAAM,qBAAA,GAAqE,CACzE,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,WAAA,EAAY,GAAI,KAAA;AACrC,EAAA,MAAM,EAAE,IAAA,EAAK,GAAI,cAAA,EAAe;AAChC,EAAA,MAAM,gBAAA,GAAmB,mBAAA,CAAoB,IAAA,CAAK,SAAA,EAAW,WAAW,CAAA;AACxE,EAAA,2BACG,MAAA,EAAA,EAAO,WAAA,EAAa,gBAAA,EAAmB,GAAG,aACxC,QAAA,EACH,CAAA;AAEJ,CAAA;AAIO,MAAM,gBAAA,GAAgE,CAC3E,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,WAAA,EAAY,GAAI,KAAA;AAErC,EAAA,MAAM,EAAE,sBAAA,EAAwB,UAAA,EAAY,EAAA,KAAO,cAAA,EAAe;AAElE,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,MAAA,EAAQ;AAAA,MACN,UAAA;AAAA,MACA,IAAA,EAAM,QAAA;AAAA,MACN,IAAA,EAAM;AAAA;AACR,GACF;AAEA,EAAA,MAAM,iBAAA,mBACJ,GAAA,CAAC,qBAAA,EAAA,EAAuB,GAAG,WAAA,EACzB,QAAA,kBAAA,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,YAAA;AAAA,MACP,YAAA,EAAc,CAAC,UAAA,EAAY,EAAE,CAAA;AAAA,MAE5B;AAAA;AAAA,GACH,EACF,CAAA;AAGF,EAAA,IAAI,sBAAA,EAAwB;AAC1B,IAAA,2BACG,MAAA,EAAA,EAAO,QAAA,EAAU,wBAChB,QAAA,kBAAA,GAAA,CAAC,WAAA,EAAA,EAAa,6BAAkB,CAAA,EAClC,CAAA;AAAA,EAEJ;AAEA,EAAA,OAAO,iBAAA;AACT;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"flowComponent.mjs","sources":["../../../../../../../src/lib/componentFactory/flowComponent.tsx"],"sourcesContent":["import type {\n FlowComponentName,\n FlowComponentProps as FlowComponentPropsOfName,\n} from \"@/components/propTypes\";\nimport type {\n ComponentProps,\n ComponentType,\n FunctionComponent,\n ReactElement,\n ReactNode,\n RefAttributes,\n} from \"react\";\nimport { cloneElement, memo } from \"react\";\nimport type { PropsWithTunnel } from \"@/lib/types/props\";\nimport SlotContextProvider from \"@/lib/slotContext/SlotContextProvider\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport { useComponentPropsContext } from \"@/lib/propsContext/propsContext\";\nimport { ComponentPropsContextProvider } from \"@/components/ComponentPropsContextProvider\";\nimport { ClearPropsContext } from \"@/components/ClearPropsContext\";\nimport ClearPropsContextView from \"@/views/ClearPropsContextView\";\nimport { UiComponentTunnelProvider } from \"@/components/UiComponentTunnel/UiComponentTunnelProvider\";\nimport { UiComponentTunnelEntry } from \"@/components/UiComponentTunnel/UiComponentTunnelEntry\";\nimport {\n useReportComponentUsage,\n ViewCompositionReset,\n} from \"@/components/ComponentUsageProvider\";\n\ntype RefType<T> = T extends RefAttributes<infer R> ? R : undefined;\n\nexport interface FlowComponentProps<R = HTMLDivElement>\n extends PropsWithTunnel, RefAttributes<R> {\n wrapWith?: ReactElement;\n}\n\nexport type FlowComponentImplementationProps<C extends FlowComponentName> =\n Omit<FlowComponentPropsOfName<C>, keyof FlowComponentProps> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>;\n\ntype FlowComponentImplementationType<C extends FlowComponentName> =\n ComponentType<FlowComponentImplementationProps<C>>;\n\ntype FlowComponentType<C extends FlowComponentName> = FunctionComponent<\n FlowComponentPropsOfName<C> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>\n>;\n\nexport type FlowComponentProvisionType = \"provider\" | \"ui\" | \"layout\";\n\ninterface Options {\n type?: FlowComponentProvisionType;\n isRemoteComponent?: boolean;\n}\n\nexport function flowComponent<C extends FlowComponentName>(\n componentName: C,\n ImplementationComponentType: FlowComponentImplementationType<C>,\n options: Options = {},\n): FlowComponentType<C> {\n type Props = FlowComponentPropsOfName<C> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>;\n\n const { type = \"ui\", isRemoteComponent = false } = options;\n\n const MemoizedImplementationComponentType = memo(ImplementationComponentType);\n\n function Component(props: Props) {\n const isViewComposition = useReportComponentUsage(componentName);\n\n const { tunnel, wrapWith, ...propsWithContext } = useProps(\n componentName,\n props as FlowComponentPropsOfName<C>,\n ) as FlowComponentProps<RefType<FlowComponentPropsOfName<C>>>;\n\n const implementationTypeProps = propsWithContext as ComponentProps<\n typeof ImplementationComponentType\n >;\n\n const componentProps = useComponentPropsContext(componentName);\n\n ImplementationComponentType.displayName = `FlowComponentImpl(${componentName})`;\n\n let element: ReactNode = (\n <MemoizedImplementationComponentType {...implementationTypeProps} />\n );\n\n if (type === \"ui\" || type === \"layout\") {\n element = (\n <UiComponentTunnelProvider component={componentName}>\n {element}\n </UiComponentTunnelProvider>\n );\n }\n\n element = (\n <ComponentPropsContextProvider componentProps={componentProps}>\n {element}\n </ComponentPropsContextProvider>\n );\n\n if (type === \"ui\") {\n /**\n * Protect the inside of UI components for accidental prop changes through\n * the Props Context.\n */\n if (isRemoteComponent) {\n element = <ClearPropsContext>{element}</ClearPropsContext>;\n } else {\n /**\n * In case of a UI component that does not have a remote counterpart\n * (like the Modal component), the <ClearPropsContext> must be\n * additionally applied on the host side by using the\n * <ClearPropsContextView>.\n *\n * This prevents Props Contexts created by parent components on the host\n * side affecting the children of this UI component.\n */\n element = (\n <ClearPropsContext>\n <ClearPropsContextView>{element}</ClearPropsContextView>\n </ClearPropsContext>\n );\n }\n }\n\n if (\"slot\" in props && !!props.slot && typeof props.slot === \"string\") {\n element = (\n <SlotContextProvider slot={props.slot} component={componentName}>\n {element}\n </SlotContextProvider>\n );\n }\n\n if (wrapWith) {\n element = cloneElement(wrapWith, undefined, element);\n }\n\n if (tunnel) {\n element = (\n <UiComponentTunnelEntry id={tunnel.id} component={tunnel.component}>\n {element}\n </UiComponentTunnelEntry>\n );\n }\n\n if (isViewComposition) {\n element = <ViewCompositionReset>{element}</ViewCompositionReset>;\n }\n\n return element;\n }\n\n Component.displayName = `FlowComponent(${componentName})`;\n return memo(Component);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAqDO,SAAS,aAAA,CACd,aAAA,EACA,2BAAA,EACA,OAAA,GAAmB,EAAC,EACE;AAItB,EAAA,MAAM,EAAE,IAAA,GAAO,IAAA,EAAM,iBAAA,GAAoB,OAAM,GAAI,OAAA;AAEnD,EAAA,MAAM,mCAAA,GAAsC,KAAK,2BAA2B,CAAA;AAE5E,EAAA,SAAS,UAAU,KAAA,EAAc;AAC/B,IAAA,MAAM,iBAAA,GAAoB,wBAAwB,aAAa,CAAA;AAE/D,IAAA,MAAM,EAAE,MAAA,EAAQ,QAAA,EAAU,GAAG,kBAAiB,GAAI,QAAA;AAAA,MAChD,aAAA;AAAA,MACA;AAAA,KACF;AAEA,IAAA,MAAM,uBAAA,GAA0B,gBAAA;AAIhC,IAAA,MAAM,cAAA,GAAiB,yBAAyB,aAAa,CAAA;AAE7D,IAAA,2BAAA,CAA4B,WAAA,GAAc,qBAAqB,aAAa,CAAA,CAAA,CAAA;AAE5E,IAAA,IAAI,OAAA,mBACF,GAAA,CAAC,mCAAA,EAAA,EAAqC,GAAG,uBAAA,EAAyB,CAAA;AAGpE,IAAA,IAAI,IAAA,KAAS,IAAA,IAAQ,IAAA,KAAS,QAAA,EAAU;AACtC,MAAA,OAAA,mBACE,GAAA,CAAC,yBAAA,EAAA,EAA0B,SAAA,EAAW,aAAA,EACnC,QAAA,EAAA,OAAA,EACH,CAAA;AAAA,IAEJ;AAEA,IAAA,OAAA,mBACE,GAAA,CAAC,6BAAA,EAAA,EAA8B,cAAA,EAC5B,QAAA,EAAA,OAAA,EACH,CAAA;AAGF,IAAA,IAAI,SAAS,IAAA,EAAM;AAKjB,MAAA,IAAI,iBAAA,EAAmB;AACrB,QAAA,OAAA,mBAAU,GAAA,CAAC,qBAAmB,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,MACxC,CAAA,MAAO;AAUL,QAAA,OAAA,mBACE,GAAA,CAAC,iBAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,qBAAA,EAAA,EAAuB,mBAAQ,CAAA,EAClC,CAAA;AAAA,MAEJ;AAAA,IACF;AAEA,IAAA,IAAI,MAAA,IAAU,SAAS,CAAC,CAAC,MAAM,IAAA,IAAQ,OAAO,KAAA,CAAM,IAAA,KAAS,QAAA,EAAU;AACrE,MAAA,OAAA,uBACG,mBAAA,EAAA,EAAoB,IAAA,EAAM,MAAM,IAAA,EAAM,SAAA,EAAW,eAC/C,QAAA,EAAA,OAAA,EACH,CAAA;AAAA,IAEJ;AAEA,IAAA,IAAI,QAAA,EAAU;AACZ,MAAA,OAAA,GAAU,YAAA,CAAa,QAAA,EAAU,MAAA,EAAW,OAAO,CAAA;AAAA,IACrD;AAEA,IAAA,IAAI,MAAA,EAAQ;AACV,MAAA,OAAA,mBACE,GAAA,CAAC,0BAAuB,EAAA,EAAI,MAAA,CAAO,IAAI,SAAA,EAAW,MAAA,CAAO,WACtD,QAAA,EAAA,OAAA,EACH,CAAA;AAAA,IAEJ;AAEA,IAAA,IAAI,iBAAA,EAAmB;AACrB,MAAA,OAAA,mBAAU,GAAA,CAAC,wBAAsB,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,IAC3C;AAEA,IAAA,OAAO,OAAA;AAAA,EACT;AAEA,EAAA,SAAA,CAAU,WAAA,GAAc,iBAAiB,aAAa,CAAA,CAAA,CAAA;AACtD,EAAA,OAAO,KAAK,SAAS,CAAA;AACvB;;;;"}
1
+ {"version":3,"file":"flowComponent.mjs","sources":["../../../../../../../src/lib/componentFactory/flowComponent.tsx"],"sourcesContent":["import type {\n FlowComponentName,\n FlowComponentProps as FlowComponentPropsOfName,\n} from \"@/components/propTypes\";\nimport type {\n ComponentProps,\n ComponentType,\n FunctionComponent,\n ReactElement,\n ReactNode,\n RefAttributes,\n} from \"react\";\nimport { cloneElement, memo } from \"react\";\nimport type { PropsWithTunnel } from \"@/lib/types/props\";\nimport SlotContextProvider from \"@/lib/slotContext/SlotContextProvider\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport { useComponentPropsContext } from \"@/lib/propsContext/propsContext\";\nimport { ComponentPropsContextProvider } from \"@/components/ComponentPropsContextProvider\";\nimport { ClearPropsContext } from \"@/components/ClearPropsContext\";\nimport ClearPropsContextView from \"@/views/ClearPropsContextView\";\nimport { UiComponentTunnelProvider } from \"@/components/UiComponentTunnel/UiComponentTunnelProvider\";\nimport { UiComponentTunnelEntry } from \"@/components/UiComponentTunnel/UiComponentTunnelEntry\";\nimport {\n useReportComponentUsage,\n ViewCompositionReset,\n} from \"@/components/ComponentUsageProvider\";\n\ntype RefType<T> = T extends RefAttributes<infer R> ? R : undefined;\n\nexport interface FlowComponentProps<R = HTMLDivElement>\n extends PropsWithTunnel, RefAttributes<R> {\n /**\n * A React element the component is wrapped with. The element is cloned and\n * receives the component as its only child — useful to render the component\n * inside a link, a tooltip trigger or any other wrapper without changing the\n * surrounding markup.\n */\n wrapWith?: ReactElement;\n}\n\nexport type FlowComponentImplementationProps<C extends FlowComponentName> =\n Omit<FlowComponentPropsOfName<C>, keyof FlowComponentProps> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>;\n\ntype FlowComponentImplementationType<C extends FlowComponentName> =\n ComponentType<FlowComponentImplementationProps<C>>;\n\ntype FlowComponentType<C extends FlowComponentName> = FunctionComponent<\n FlowComponentPropsOfName<C> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>\n>;\n\nexport type FlowComponentProvisionType = \"provider\" | \"ui\" | \"layout\";\n\ninterface Options {\n type?: FlowComponentProvisionType;\n isRemoteComponent?: boolean;\n}\n\nexport function flowComponent<C extends FlowComponentName>(\n componentName: C,\n ImplementationComponentType: FlowComponentImplementationType<C>,\n options: Options = {},\n): FlowComponentType<C> {\n type Props = FlowComponentPropsOfName<C> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>;\n\n const { type = \"ui\", isRemoteComponent = false } = options;\n\n const MemoizedImplementationComponentType = memo(ImplementationComponentType);\n\n function Component(props: Props) {\n const isViewComposition = useReportComponentUsage(componentName);\n\n const { tunnel, wrapWith, ...propsWithContext } = useProps(\n componentName,\n props as FlowComponentPropsOfName<C>,\n ) as FlowComponentProps<RefType<FlowComponentPropsOfName<C>>>;\n\n const implementationTypeProps = propsWithContext as ComponentProps<\n typeof ImplementationComponentType\n >;\n\n const componentProps = useComponentPropsContext(componentName);\n\n ImplementationComponentType.displayName = `FlowComponentImpl(${componentName})`;\n\n let element: ReactNode = (\n <MemoizedImplementationComponentType {...implementationTypeProps} />\n );\n\n if (type === \"ui\" || type === \"layout\") {\n element = (\n <UiComponentTunnelProvider component={componentName}>\n {element}\n </UiComponentTunnelProvider>\n );\n }\n\n element = (\n <ComponentPropsContextProvider componentProps={componentProps}>\n {element}\n </ComponentPropsContextProvider>\n );\n\n if (type === \"ui\") {\n /**\n * Protect the inside of UI components for accidental prop changes through\n * the Props Context.\n */\n if (isRemoteComponent) {\n element = <ClearPropsContext>{element}</ClearPropsContext>;\n } else {\n /**\n * In case of a UI component that does not have a remote counterpart\n * (like the Modal component), the <ClearPropsContext> must be\n * additionally applied on the host side by using the\n * <ClearPropsContextView>.\n *\n * This prevents Props Contexts created by parent components on the host\n * side affecting the children of this UI component.\n */\n element = (\n <ClearPropsContext>\n <ClearPropsContextView>{element}</ClearPropsContextView>\n </ClearPropsContext>\n );\n }\n }\n\n if (\"slot\" in props && !!props.slot && typeof props.slot === \"string\") {\n element = (\n <SlotContextProvider slot={props.slot} component={componentName}>\n {element}\n </SlotContextProvider>\n );\n }\n\n if (wrapWith) {\n element = cloneElement(wrapWith, undefined, element);\n }\n\n if (tunnel) {\n element = (\n <UiComponentTunnelEntry id={tunnel.id} component={tunnel.component}>\n {element}\n </UiComponentTunnelEntry>\n );\n }\n\n if (isViewComposition) {\n element = <ViewCompositionReset>{element}</ViewCompositionReset>;\n }\n\n return element;\n }\n\n Component.displayName = `FlowComponent(${componentName})`;\n return memo(Component);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AA2DO,SAAS,aAAA,CACd,aAAA,EACA,2BAAA,EACA,OAAA,GAAmB,EAAC,EACE;AAItB,EAAA,MAAM,EAAE,IAAA,GAAO,IAAA,EAAM,iBAAA,GAAoB,OAAM,GAAI,OAAA;AAEnD,EAAA,MAAM,mCAAA,GAAsC,KAAK,2BAA2B,CAAA;AAE5E,EAAA,SAAS,UAAU,KAAA,EAAc;AAC/B,IAAA,MAAM,iBAAA,GAAoB,wBAAwB,aAAa,CAAA;AAE/D,IAAA,MAAM,EAAE,MAAA,EAAQ,QAAA,EAAU,GAAG,kBAAiB,GAAI,QAAA;AAAA,MAChD,aAAA;AAAA,MACA;AAAA,KACF;AAEA,IAAA,MAAM,uBAAA,GAA0B,gBAAA;AAIhC,IAAA,MAAM,cAAA,GAAiB,yBAAyB,aAAa,CAAA;AAE7D,IAAA,2BAAA,CAA4B,WAAA,GAAc,qBAAqB,aAAa,CAAA,CAAA,CAAA;AAE5E,IAAA,IAAI,OAAA,mBACF,GAAA,CAAC,mCAAA,EAAA,EAAqC,GAAG,uBAAA,EAAyB,CAAA;AAGpE,IAAA,IAAI,IAAA,KAAS,IAAA,IAAQ,IAAA,KAAS,QAAA,EAAU;AACtC,MAAA,OAAA,mBACE,GAAA,CAAC,yBAAA,EAAA,EAA0B,SAAA,EAAW,aAAA,EACnC,QAAA,EAAA,OAAA,EACH,CAAA;AAAA,IAEJ;AAEA,IAAA,OAAA,mBACE,GAAA,CAAC,6BAAA,EAAA,EAA8B,cAAA,EAC5B,QAAA,EAAA,OAAA,EACH,CAAA;AAGF,IAAA,IAAI,SAAS,IAAA,EAAM;AAKjB,MAAA,IAAI,iBAAA,EAAmB;AACrB,QAAA,OAAA,mBAAU,GAAA,CAAC,qBAAmB,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,MACxC,CAAA,MAAO;AAUL,QAAA,OAAA,mBACE,GAAA,CAAC,iBAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,qBAAA,EAAA,EAAuB,mBAAQ,CAAA,EAClC,CAAA;AAAA,MAEJ;AAAA,IACF;AAEA,IAAA,IAAI,MAAA,IAAU,SAAS,CAAC,CAAC,MAAM,IAAA,IAAQ,OAAO,KAAA,CAAM,IAAA,KAAS,QAAA,EAAU;AACrE,MAAA,OAAA,uBACG,mBAAA,EAAA,EAAoB,IAAA,EAAM,MAAM,IAAA,EAAM,SAAA,EAAW,eAC/C,QAAA,EAAA,OAAA,EACH,CAAA;AAAA,IAEJ;AAEA,IAAA,IAAI,QAAA,EAAU;AACZ,MAAA,OAAA,GAAU,YAAA,CAAa,QAAA,EAAU,MAAA,EAAW,OAAO,CAAA;AAAA,IACrD;AAEA,IAAA,IAAI,MAAA,EAAQ;AACV,MAAA,OAAA,mBACE,GAAA,CAAC,0BAAuB,EAAA,EAAI,MAAA,CAAO,IAAI,SAAA,EAAW,MAAA,CAAO,WACtD,QAAA,EAAA,OAAA,EACH,CAAA;AAAA,IAEJ;AAEA,IAAA,IAAI,iBAAA,EAAmB;AACrB,MAAA,OAAA,mBAAU,GAAA,CAAC,wBAAsB,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,IAC3C;AAEA,IAAA,OAAO,OAAA;AAAA,EACT;AAEA,EAAA,SAAA,CAAU,WAAA,GAAc,iBAAiB,aAAa,CAAA,CAAA,CAAA;AACtD,EAAA,OAAO,KAAK,SAAS,CAAA;AACvB;;;;"}
@@ -1,7 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
3
  import 'react';
4
- import '../../propsContext/propsContext.mjs';
5
4
  import 'remeda';
6
5
  import '@react-aria/utils';
7
6
  import 'dot-prop';
@@ -1 +1 @@
1
- {"version":3,"file":"useModalController.mjs","sources":["../../../../../../../../src/lib/controller/overlay/useModalController.ts"],"sourcesContent":["import { useOverlayController } from \"@/lib/hooks\";\n\ntype UseModalControllerArgs = Parameters<typeof useOverlayController>;\n\nexport const useModalController = (options?: UseModalControllerArgs[1]) =>\n useOverlayController(\"Modal\", options);\n"],"names":[],"mappings":";;;;;;;AAIO,MAAM,kBAAA,GAAqB,CAAC,OAAA,KACjC,oBAAA,CAAqB,SAAS,OAAO;;;;"}
1
+ {"version":3,"file":"useModalController.mjs","sources":["../../../../../../../../src/lib/controller/overlay/useModalController.ts"],"sourcesContent":["import { useOverlayController } from \"@/lib/hooks\";\n\ntype UseModalControllerArgs = Parameters<typeof useOverlayController>;\n\nexport const useModalController = (options?: UseModalControllerArgs[1]) =>\n useOverlayController(\"Modal\", options);\n"],"names":[],"mappings":";;;;;;AAIO,MAAM,kBAAA,GAAqB,CAAC,OAAA,KACjC,oBAAA,CAAqB,SAAS,OAAO;;;;"}
@@ -1,7 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
3
  import { useId } from 'react';
4
- import '../propsContext/propsContext.mjs';
5
4
  import formFieldStyles from '../../components/FormField/FormField.module.scss.mjs';
6
5
  import { useFieldError } from './useFieldError.mjs';
7
6
  import clsx from 'clsx';
@@ -1 +1 @@
1
- {"version":3,"file":"useFieldComponent.mjs","sources":["../../../../../../../src/lib/hooks/useFieldComponent.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, useId } from \"react\";\nimport { type PropsContext } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { useFieldError } from \"@/lib/hooks/useFieldError\";\nimport clsx, { type ClassValue } from \"clsx\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\ninterface FieldComponentProps {\n className?: ClassValue;\n isRequired?: boolean;\n isDisabled?: boolean;\n isInvalid?: boolean;\n \"aria-describedby\"?: string;\n}\n\nexport interface UseFieldComponent {\n FieldErrorCaptureContext: FC<PropsWithChildren>;\n FieldErrorView: FC;\n fieldPropsContext: PropsContext;\n fieldProps: {\n \"aria-describedby\"?: string;\n className?: ReturnType<typeof clsx>;\n };\n}\n\nexport const useFieldComponent = (\n props: FieldComponentProps,\n component: FlowComponentName,\n): UseFieldComponent => {\n const fieldErrorId = useId();\n const { FieldErrorView, FieldErrorCaptureContext } = useFieldError({\n fieldErrorId,\n component,\n });\n\n // setting up the props context for all components that\n // are part of a form control\n const fieldPropsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n optional: !props.isRequired,\n isDisabled: !!props.isDisabled,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n },\n };\n\n return {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps: {\n \"aria-describedby\": props.isInvalid\n ? fieldErrorId\n : props[\"aria-describedby\"],\n className: clsx(formFieldStyles.formField),\n },\n } as const;\n};\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,iBAAA,GAAoB,CAC/B,KAAA,EACA,SAAA,KACsB;AACtB,EAAA,MAAM,eAAe,KAAA,EAAM;AAC3B,EAAA,MAAM,EAAE,cAAA,EAAgB,wBAAA,EAAyB,GAAI,aAAA,CAAc;AAAA,IACjE,YAAA;AAAA,IACA;AAAA,GACD,CAAA;AAID,EAAA,MAAM,iBAAA,GAAkC;AAAA,IACtC,KAAA,EAAO;AAAA,MACL,WAAW,eAAA,CAAgB,KAAA;AAAA,MAC3B,QAAA,EAAU,CAAC,KAAA,CAAM,UAAA;AAAA,MACjB,UAAA,EAAY,CAAC,CAAC,KAAA,CAAM;AAAA,KACtB;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,WAAW,eAAA,CAAgB;AAAA;AAC7B,GACF;AAEA,EAAA,OAAO;AAAA,IACL,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,kBAAA,EAAoB,KAAA,CAAM,SAAA,GACtB,YAAA,GACA,MAAM,kBAAkB,CAAA;AAAA,MAC5B,SAAA,EAAW,IAAA,CAAK,eAAA,CAAgB,SAAS;AAAA;AAC3C,GACF;AACF;;;;"}
1
+ {"version":3,"file":"useFieldComponent.mjs","sources":["../../../../../../../src/lib/hooks/useFieldComponent.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, useId } from \"react\";\nimport { type PropsContext } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { useFieldError } from \"@/lib/hooks/useFieldError\";\nimport clsx, { type ClassValue } from \"clsx\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\ninterface FieldComponentProps {\n className?: ClassValue;\n isRequired?: boolean;\n isDisabled?: boolean;\n isInvalid?: boolean;\n \"aria-describedby\"?: string;\n}\n\nexport interface UseFieldComponent {\n FieldErrorCaptureContext: FC<PropsWithChildren>;\n FieldErrorView: FC;\n fieldPropsContext: PropsContext;\n fieldProps: {\n \"aria-describedby\"?: string;\n className?: ReturnType<typeof clsx>;\n };\n}\n\nexport const useFieldComponent = (\n props: FieldComponentProps,\n component: FlowComponentName,\n): UseFieldComponent => {\n const fieldErrorId = useId();\n const { FieldErrorView, FieldErrorCaptureContext } = useFieldError({\n fieldErrorId,\n component,\n });\n\n // setting up the props context for all components that\n // are part of a form control\n const fieldPropsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n optional: !props.isRequired,\n isDisabled: !!props.isDisabled,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n },\n };\n\n return {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps: {\n \"aria-describedby\": props.isInvalid\n ? fieldErrorId\n : props[\"aria-describedby\"],\n className: clsx(formFieldStyles.formField),\n },\n } as const;\n};\n"],"names":[],"mappings":";;;;;AAyBO,MAAM,iBAAA,GAAoB,CAC/B,KAAA,EACA,SAAA,KACsB;AACtB,EAAA,MAAM,eAAe,KAAA,EAAM;AAC3B,EAAA,MAAM,EAAE,cAAA,EAAgB,wBAAA,EAAyB,GAAI,aAAA,CAAc;AAAA,IACjE,YAAA;AAAA,IACA;AAAA,GACD,CAAA;AAID,EAAA,MAAM,iBAAA,GAAkC;AAAA,IACtC,KAAA,EAAO;AAAA,MACL,WAAW,eAAA,CAAgB,KAAA;AAAA,MAC3B,QAAA,EAAU,CAAC,KAAA,CAAM,UAAA;AAAA,MACjB,UAAA,EAAY,CAAC,CAAC,KAAA,CAAM;AAAA,KACtB;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,WAAW,eAAA,CAAgB;AAAA;AAC7B,GACF;AAEA,EAAA,OAAO;AAAA,IACL,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,kBAAA,EAAoB,KAAA,CAAM,SAAA,GACtB,YAAA,GACA,MAAM,kBAAkB,CAAA;AAAA,MAC5B,SAAA,EAAW,IAAA,CAAK,eAAA,CAAgB,SAAS;AAAA;AAC3C,GACF;AACF;;;;"}
@@ -2,7 +2,6 @@
2
2
  /* */
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import React, { useMemo } from 'react';
5
- import '../propsContext/propsContext.mjs';
6
5
  import { PropsContextProvider } from '../propsContext/components/PropsContextProvider.mjs';
7
6
  import formFieldStyles from '../../components/FormField/FormField.module.scss.mjs';
8
7
  import { ClearPropsContext } from '../propsContext/components/ClearPropsContext.mjs';