@mittwald/flow-react-components 0.2.0-alpha.805 → 0.2.0-alpha.807

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 (242) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/MIGRATION.md +101 -0
  3. package/dist/assets/doc-properties.json +4221 -3854
  4. package/dist/js/default.mjs +2 -1
  5. package/dist/js/default.mjs.map +1 -1
  6. package/dist/js/flr-universal.mjs +10 -8
  7. package/dist/js/flr-universal.mjs.map +1 -1
  8. package/dist/js/packages/components/src/components/Accordion/Accordion.mjs +72 -62
  9. package/dist/js/packages/components/src/components/Accordion/Accordion.mjs.map +1 -1
  10. package/dist/js/packages/components/src/components/Action/models/ActionStateContext.mjs +1 -1
  11. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs +1 -2
  12. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
  13. package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs +13 -4
  14. package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
  15. package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs +16 -3
  16. package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
  17. package/dist/js/packages/components/src/components/CartesianChart/components/Area/Area.mjs +2 -0
  18. package/dist/js/packages/components/src/components/CartesianChart/components/Area/Area.mjs.map +1 -1
  19. package/dist/js/packages/components/src/components/CartesianChart/components/ChartLegend/ChartLegend.mjs.map +1 -1
  20. package/dist/js/packages/components/src/components/CartesianChart/components/ChartLegend/LegendContent.mjs +3 -1
  21. package/dist/js/packages/components/src/components/CartesianChart/components/ChartLegend/LegendContent.mjs.map +1 -1
  22. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/ChartTooltip.mjs +6 -6
  23. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/ChartTooltip.mjs.map +1 -1
  24. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipContent.mjs +1 -1
  25. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipContent.mjs.map +1 -1
  26. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipLegendItem.mjs +5 -5
  27. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipLegendItem.mjs.map +1 -1
  28. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.mjs +7 -2
  29. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.mjs.map +1 -1
  30. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/types.mjs +16 -0
  31. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/types.mjs.map +1 -0
  32. package/dist/js/packages/components/src/components/CartesianChart/components/Line/Line.mjs.map +1 -1
  33. package/dist/js/packages/components/src/components/CartesianChart/components/XAxis/XAxis.mjs.map +1 -1
  34. package/dist/js/packages/components/src/components/CartesianChart/components/XAxis/types.mjs +1 -1
  35. package/dist/js/packages/components/src/components/CartesianChart/components/XAxis/types.mjs.map +1 -1
  36. package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs.map +1 -1
  37. package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/types.mjs.map +1 -1
  38. package/dist/js/packages/components/src/components/CartesianChart/types.mjs +8 -0
  39. package/dist/js/packages/components/src/components/CartesianChart/types.mjs.map +1 -0
  40. package/dist/js/packages/components/src/components/Chat/Chat.mjs +37 -21
  41. package/dist/js/packages/components/src/components/Chat/Chat.mjs.map +1 -1
  42. package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs +1 -1
  43. package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs.map +1 -1
  44. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs +1 -1
  45. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
  46. package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs +24 -12
  47. package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
  48. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs +1 -2
  49. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs.map +1 -1
  50. package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs +9 -6
  51. package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
  52. package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs +1 -1
  53. package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs.map +1 -1
  54. package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs +1 -1
  55. package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs.map +1 -1
  56. package/dist/js/packages/components/src/components/FileCard/FileCard.mjs +13 -7
  57. package/dist/js/packages/components/src/components/FileCard/FileCard.mjs.map +1 -1
  58. package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs +1 -1
  59. package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
  60. package/dist/js/packages/components/src/components/FileField/FileField.mjs +1 -1
  61. package/dist/js/packages/components/src/components/FileField/FileField.mjs.map +1 -1
  62. package/dist/js/packages/components/src/components/Heading/Heading.mjs +18 -18
  63. package/dist/js/packages/components/src/components/Heading/Heading.mjs.map +1 -1
  64. package/dist/js/packages/components/src/components/Label/Label.mjs +19 -10
  65. package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
  66. package/dist/js/packages/components/src/components/LightBox/LightBox.mjs +8 -5
  67. package/dist/js/packages/components/src/components/LightBox/LightBox.mjs.map +1 -1
  68. package/dist/js/packages/components/src/components/List/List.mjs +12 -6
  69. package/dist/js/packages/components/src/components/List/List.mjs.map +1 -1
  70. package/dist/js/packages/components/src/components/List/components/Header/Header.mjs +2 -2
  71. package/dist/js/packages/components/src/components/List/components/Header/Header.mjs.map +1 -1
  72. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs +3 -5
  73. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs.map +1 -1
  74. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs +5 -8
  75. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs.map +1 -1
  76. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs +6 -9
  77. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs.map +1 -1
  78. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenus.mjs +9 -12
  79. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenus.mjs.map +1 -1
  80. package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingMenuItem.mjs +9 -12
  81. package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingMenuItem.mjs.map +1 -1
  82. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs +6 -7
  83. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs.map +1 -1
  84. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs +6 -9
  85. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs.map +1 -1
  86. package/dist/js/packages/components/src/components/List/components/Header/lib.mjs +9 -12
  87. package/dist/js/packages/components/src/components/List/components/Header/lib.mjs.map +1 -1
  88. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs +4 -1
  89. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs.map +1 -1
  90. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs +1 -1
  91. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs.map +1 -1
  92. package/dist/js/packages/components/src/components/List/components/Items/components/Item/hooks/useGridItemProps.mjs +9 -12
  93. package/dist/js/packages/components/src/components/List/components/Items/components/Item/hooks/useGridItemProps.mjs.map +1 -1
  94. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs +84 -51
  95. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
  96. package/dist/js/packages/components/src/components/List/components/Table/Table.mjs +9 -12
  97. package/dist/js/packages/components/src/components/List/components/Table/Table.mjs.map +1 -1
  98. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs +2 -3
  99. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
  100. package/dist/js/packages/components/src/components/Navigation/Navigation.mjs +8 -5
  101. package/dist/js/packages/components/src/components/Navigation/Navigation.mjs.map +1 -1
  102. package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs +15 -21
  103. package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
  104. package/dist/js/packages/components/src/components/NumberField/NumberField.mjs +1 -1
  105. package/dist/js/packages/components/src/components/NumberField/NumberField.mjs.map +1 -1
  106. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs +21 -9
  107. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
  108. package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs +1 -1
  109. package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs.map +1 -1
  110. package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs +16 -10
  111. package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs.map +1 -1
  112. package/dist/js/packages/components/src/components/Rating/Rating.mjs +1 -1
  113. package/dist/js/packages/components/src/components/Rating/Rating.mjs.map +1 -1
  114. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs +11 -8
  115. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs.map +1 -1
  116. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs +82 -48
  117. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
  118. package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs +17 -8
  119. package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  120. package/dist/js/packages/components/src/components/Select/Select.mjs +11 -8
  121. package/dist/js/packages/components/src/components/Select/Select.mjs.map +1 -1
  122. package/dist/js/packages/components/src/components/Slider/Slider.mjs +9 -6
  123. package/dist/js/packages/components/src/components/Slider/Slider.mjs.map +1 -1
  124. package/dist/js/packages/components/src/components/Switch/Switch.mjs +1 -1
  125. package/dist/js/packages/components/src/components/Switch/Switch.mjs.map +1 -1
  126. package/dist/js/packages/components/src/components/Tabs/Tabs.mjs +4 -4
  127. package/dist/js/packages/components/src/components/Tabs/Tabs.mjs.map +1 -1
  128. package/dist/js/packages/components/src/components/Tabs/components/Tab/Tab.mjs +2 -2
  129. package/dist/js/packages/components/src/components/Tabs/components/Tab/Tab.mjs.map +1 -1
  130. package/dist/js/packages/components/src/components/Tabs/components/TabList/TabList.mjs +4 -4
  131. package/dist/js/packages/components/src/components/Tabs/components/TabList/TabList.mjs.map +1 -1
  132. package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.mjs +4 -5
  133. package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.mjs.map +1 -1
  134. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs +1 -1
  135. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs.map +1 -1
  136. package/dist/js/packages/components/src/components/TextField/TextField.mjs +16 -7
  137. package/dist/js/packages/components/src/components/TextField/TextField.mjs.map +1 -1
  138. package/dist/js/packages/components/src/components/TimeField/TimeField.mjs +1 -1
  139. package/dist/js/packages/components/src/components/TimeField/TimeField.mjs.map +1 -1
  140. package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelEntry.mjs +19 -0
  141. package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelEntry.mjs.map +1 -0
  142. package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelExit.mjs +19 -0
  143. package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelExit.mjs.map +1 -0
  144. package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelProvider.mjs +13 -0
  145. package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelProvider.mjs.map +1 -0
  146. package/dist/js/packages/components/src/components/UiComponentTunnel/lib.mjs +7 -0
  147. package/dist/js/packages/components/src/components/UiComponentTunnel/lib.mjs.map +1 -0
  148. package/dist/js/packages/components/src/components/propTypes/index.mjs +4 -0
  149. package/dist/js/packages/components/src/components/propTypes/index.mjs.map +1 -1
  150. package/dist/js/packages/components/src/lib/componentFactory/flowComponent.mjs +8 -4
  151. package/dist/js/packages/components/src/lib/componentFactory/flowComponent.mjs.map +1 -1
  152. package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs +4 -2
  153. package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs.map +1 -1
  154. package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs +6 -6
  155. package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs.map +1 -1
  156. package/dist/js/packages/components/src/lib/types/props.mjs.map +1 -1
  157. package/dist/types/components/Accordion/Accordion.d.ts.map +1 -1
  158. package/dist/types/components/ActionGroup/ActionGroup.d.ts.map +1 -1
  159. package/dist/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  160. package/dist/types/components/CartesianChart/CartesianChart.d.ts +6 -8
  161. package/dist/types/components/CartesianChart/CartesianChart.d.ts.map +1 -1
  162. package/dist/types/components/CartesianChart/components/Area/Area.d.ts +9 -4
  163. package/dist/types/components/CartesianChart/components/Area/Area.d.ts.map +1 -1
  164. package/dist/types/components/CartesianChart/components/ChartLegend/ChartLegend.d.ts +1 -1
  165. package/dist/types/components/CartesianChart/components/ChartLegend/ChartLegend.d.ts.map +1 -1
  166. package/dist/types/components/CartesianChart/components/ChartLegend/LegendContent.d.ts.map +1 -1
  167. package/dist/types/components/CartesianChart/components/ChartTooltip/ChartTooltip.d.ts +5 -25
  168. package/dist/types/components/CartesianChart/components/ChartTooltip/ChartTooltip.d.ts.map +1 -1
  169. package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipContent.d.ts +2 -2
  170. package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipContent.d.ts.map +1 -1
  171. package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.d.ts +2 -2
  172. package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.d.ts.map +1 -1
  173. package/dist/types/components/CartesianChart/components/ChartTooltip/index.d.ts +1 -0
  174. package/dist/types/components/CartesianChart/components/ChartTooltip/index.d.ts.map +1 -1
  175. package/dist/types/components/CartesianChart/components/ChartTooltip/types.d.ts +26 -0
  176. package/dist/types/components/CartesianChart/components/ChartTooltip/types.d.ts.map +1 -0
  177. package/dist/types/components/CartesianChart/components/Line/Line.d.ts +3 -3
  178. package/dist/types/components/CartesianChart/components/Line/Line.d.ts.map +1 -1
  179. package/dist/types/components/CartesianChart/components/XAxis/XAxis.d.ts +3 -3
  180. package/dist/types/components/CartesianChart/components/XAxis/XAxis.d.ts.map +1 -1
  181. package/dist/types/components/CartesianChart/components/XAxis/types.d.ts +2 -2
  182. package/dist/types/components/CartesianChart/components/XAxis/types.d.ts.map +1 -1
  183. package/dist/types/components/CartesianChart/components/YAxis/YAxis.d.ts +2 -2
  184. package/dist/types/components/CartesianChart/components/YAxis/YAxis.d.ts.map +1 -1
  185. package/dist/types/components/CartesianChart/components/YAxis/types.d.ts +2 -2
  186. package/dist/types/components/CartesianChart/components/YAxis/types.d.ts.map +1 -1
  187. package/dist/types/components/CartesianChart/stories/Default.stories.d.ts.map +1 -1
  188. package/dist/types/components/CartesianChart/typedCartesianChart.test-types.d.ts +2 -0
  189. package/dist/types/components/CartesianChart/typedCartesianChart.test-types.d.ts.map +1 -0
  190. package/dist/types/components/CartesianChart/types.d.ts +11 -0
  191. package/dist/types/components/CartesianChart/types.d.ts.map +1 -0
  192. package/dist/types/components/Chat/Chat.d.ts.map +1 -1
  193. package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
  194. package/dist/types/components/CodeEditor/CodeEditor.d.ts +1 -2
  195. package/dist/types/components/CodeEditor/CodeEditor.d.ts.map +1 -1
  196. package/dist/types/components/ComboBox/ComboBox.d.ts.map +1 -1
  197. package/dist/types/components/FileCard/FileCard.d.ts.map +1 -1
  198. package/dist/types/components/Heading/Heading.d.ts +0 -1
  199. package/dist/types/components/Heading/Heading.d.ts.map +1 -1
  200. package/dist/types/components/Heading/index.d.ts +1 -0
  201. package/dist/types/components/Heading/index.d.ts.map +1 -1
  202. package/dist/types/components/Label/Label.d.ts.map +1 -1
  203. package/dist/types/components/LightBox/LightBox.d.ts.map +1 -1
  204. package/dist/types/components/List/List.d.ts.map +1 -1
  205. package/dist/types/components/List/components/Items/components/Item/components/AccordionButton.d.ts.map +1 -1
  206. package/dist/types/components/List/components/ListItemView/ListItemView.d.ts +11 -1
  207. package/dist/types/components/List/components/ListItemView/ListItemView.d.ts.map +1 -1
  208. package/dist/types/components/List/typedList.d.ts +18 -8
  209. package/dist/types/components/List/typedList.d.ts.map +1 -1
  210. package/dist/types/components/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
  211. package/dist/types/components/Navigation/Navigation.d.ts.map +1 -1
  212. package/dist/types/components/Navigation/components/NavigationGroup/NavigationGroup.d.ts.map +1 -1
  213. package/dist/types/components/Navigation/stories/Default.stories.d.ts.map +1 -1
  214. package/dist/types/components/PasswordCreationField/PasswordCreationField.d.ts.map +1 -1
  215. package/dist/types/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  216. package/dist/types/components/Rating/Rating.d.ts +2 -2
  217. package/dist/types/components/Rating/Rating.d.ts.map +1 -1
  218. package/dist/types/components/SearchField/SearchField.d.ts.map +1 -1
  219. package/dist/types/components/Section/components/SectionHeader/SectionHeader.d.ts.map +1 -1
  220. package/dist/types/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  221. package/dist/types/components/Select/Select.d.ts.map +1 -1
  222. package/dist/types/components/Slider/Slider.d.ts.map +1 -1
  223. package/dist/types/components/Tabs/Tabs.d.ts.map +1 -1
  224. package/dist/types/components/Tabs/components/TabTitle/TabTitle.d.ts.map +1 -1
  225. package/dist/types/components/TextField/TextField.d.ts.map +1 -1
  226. package/dist/types/components/UiComponentTunnel/UiComponentTunnelEntry.d.ts +8 -0
  227. package/dist/types/components/UiComponentTunnel/UiComponentTunnelEntry.d.ts.map +1 -0
  228. package/dist/types/components/UiComponentTunnel/UiComponentTunnelExit.d.ts +8 -0
  229. package/dist/types/components/UiComponentTunnel/UiComponentTunnelExit.d.ts.map +1 -0
  230. package/dist/types/components/UiComponentTunnel/UiComponentTunnelProvider.d.ts +7 -0
  231. package/dist/types/components/UiComponentTunnel/UiComponentTunnelProvider.d.ts.map +1 -0
  232. package/dist/types/components/UiComponentTunnel/lib.d.ts +3 -0
  233. package/dist/types/components/UiComponentTunnel/lib.d.ts.map +1 -0
  234. package/dist/types/components/propTypes/index.d.ts +8 -1
  235. package/dist/types/components/propTypes/index.d.ts.map +1 -1
  236. package/dist/types/lib/componentFactory/flowComponent.d.ts.map +1 -1
  237. package/dist/types/lib/hooks/useFieldComponent.d.ts +2 -1
  238. package/dist/types/lib/hooks/useFieldComponent.d.ts.map +1 -1
  239. package/dist/types/lib/hooks/useFieldError.d.ts +6 -1
  240. package/dist/types/lib/hooks/useFieldError.d.ts.map +1 -1
  241. package/dist/types/lib/types/props.d.ts.map +1 -1
  242. package/package.json +6 -6
@@ -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\";\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 {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowVerticalResize,\n allowHorizontalResize,\n showCharacterCount,\n className,\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 {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\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 (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 aria-hidden={props[\"aria-hidden\"]}\n placeholder={placeholder}\n className={inputClassName}\n ref={localRef}\n onChange={updateHeight}\n style={{\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":";;;;;;;;;;;;;;;AAmCO,MAAM,QAAA,GAAW,aAAA,CAAc,UAAA,EAAY,CAAC,KAAA,KAAU;AAC3D,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,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;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,GAAI,kBAAkB,KAAK,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AA,IAAiB,CAAC,mBAAA,EAAqB;AAE7D,MAAA,QAAA,CAAS,OAAA,CAAQ,MAAM,MAAA,GAAS,KAAA;AAChC,MAAA,MAAM,YAAA,GAAe,SAAS,OAAA,CAAQ,YAAA;AAEtC,MAAA,QAAA,CAAS,OAAA,CAAQ,KAAA,CAAM,MAAA,GAAS,YAAA,GAAe,CAAA,GAAI,IAAA;AAAA,IACrD;AAAA,EACF,CAAA;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA,CAAK,SAAA;AAAA,IAAL;AAAA,MACE,GAAG,IAAA;AAAA,MACH,GAAG,UAAA;AAAA,MACJ,SAAA,EAAW,aAAA;AAAA,MACX,QAAA,EAAU,YAAA;AAAA,MAEV,QAAA,kBAAA,IAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,iBAAA,EAC3B,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,4BAA0B,QAAA,EAAS,CAAA;AAAA,wBACpC,GAAA;AAAA,UAAC,IAAA,CAAK,QAAA;AAAA,UAAL;AAAA,YACC,IAAA;AAAA,YACA,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,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;;;;"}
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\";\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 {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowVerticalResize,\n allowHorizontalResize,\n showCharacterCount,\n className,\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 {\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 (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 aria-hidden={props[\"aria-hidden\"]}\n placeholder={placeholder}\n className={inputClassName}\n ref={localRef}\n onChange={updateHeight}\n style={{\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":";;;;;;;;;;;;;;;AAmCO,MAAM,QAAA,GAAW,aAAA,CAAc,UAAA,EAAY,CAAC,KAAA,KAAU;AAC3D,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,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;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;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YAAA,GAAe,SAAS,OAAA,CAAQ,YAAA;AAEtC,MAAA,QAAA,CAAS,OAAA,CAAQ,KAAA,CAAM,MAAA,GAAS,YAAA,GAAe,CAAA,GAAI,IAAA;AAAA,IACrD;AAAA,EACF,CAAA;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA,CAAK,SAAA;AAAA,IAAL;AAAA,MACE,GAAG,IAAA;AAAA,MACH,GAAG,UAAA;AAAA,MACJ,SAAA,EAAW,aAAA;AAAA,MACX,QAAA,EAAU,YAAA;AAAA,MAEV,QAAA,kBAAA,IAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,iBAAA,EAC3B,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,4BAA0B,QAAA,EAAS,CAAA;AAAA,wBACpC,GAAA;AAAA,UAAC,IAAA,CAAK,QAAA;AAAA,UAAL;AAAA,YACC,IAAA;AAAA,YACA,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,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;;;;"}
@@ -19,9 +19,9 @@ import '../../views/IconView.mjs';
19
19
  import { IconHide } from '../Icon/components/icons/IconHide.mjs';
20
20
  import { IconShow } from '../Icon/components/icons/IconShow.mjs';
21
21
  import clsx from 'clsx';
22
- import { TunnelProvider, TunnelExit } from '@mittwald/react-tunnel';
23
22
  import '../TranslationProvider/TranslationProvider.mjs';
24
23
  import { useLocalizedStringFormatter } from '../TranslationProvider/useLocalizedStringFormatter.mjs';
24
+ import { UiComponentTunnelExit } from '../UiComponentTunnel/UiComponentTunnelExit.mjs';
25
25
 
26
26
  const TextField = flowComponent("TextField", (props) => {
27
27
  const {
@@ -44,16 +44,25 @@ const TextField = flowComponent("TextField", (props) => {
44
44
  FieldErrorCaptureContext,
45
45
  fieldPropsContext,
46
46
  fieldProps
47
- } = useFieldComponent(props);
47
+ } = useFieldComponent(props, "TextField");
48
48
  const rootClassName = clsx(fieldProps.className, className);
49
49
  const propsContext = {
50
50
  Button: {
51
51
  className: styles.button,
52
52
  variant: "plain",
53
53
  color: "secondary",
54
- tunnelId: "button"
54
+ tunnel: {
55
+ id: "button",
56
+ component: "TextField"
57
+ }
58
+ },
59
+ CopyButton: {
60
+ className: styles.button,
61
+ tunnel: {
62
+ id: "button",
63
+ component: "TextField"
64
+ }
55
65
  },
56
- CopyButton: { className: styles.button, tunnelId: "button" },
57
66
  ...fieldPropsContext
58
67
  };
59
68
  const handleChange = (v) => {
@@ -77,7 +86,7 @@ const TextField = flowComponent("TextField", (props) => {
77
86
  className: rootClassName,
78
87
  onChange: handleChange,
79
88
  type,
80
- children: /* @__PURE__ */ jsx(TunnelProvider, { children: /* @__PURE__ */ jsxs(PropsContextProvider, { props: propsContext, children: [
89
+ children: /* @__PURE__ */ jsxs(PropsContextProvider, { props: propsContext, children: [
81
90
  /* @__PURE__ */ jsxs(FieldErrorCaptureContext, { children: [
82
91
  children,
83
92
  /* @__PURE__ */ jsxs("div", { className: styles.inputContainer, children: [
@@ -90,7 +99,7 @@ const TextField = flowComponent("TextField", (props) => {
90
99
  ref
91
100
  }
92
101
  ),
93
- /* @__PURE__ */ jsx(TunnelExit, { id: "button" }),
102
+ /* @__PURE__ */ jsx(UiComponentTunnelExit, { id: "button", component: "TextField" }),
94
103
  typeFromProps === "password" && /* @__PURE__ */ jsx(
95
104
  Button,
96
105
  {
@@ -108,7 +117,7 @@ const TextField = flowComponent("TextField", (props) => {
108
117
  showCharacterCount && /* @__PURE__ */ jsx(FieldDescription, { children: charactersCountDescription })
109
118
  ] }),
110
119
  /* @__PURE__ */ jsx(FieldErrorView, {})
111
- ] }) })
120
+ ] })
112
121
  }
113
122
  );
114
123
  });
@@ -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 { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\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);\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 tunnelId: \"button\",\n },\n CopyButton: { className: styles.button, tunnelId: \"button\" },\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 <TunnelProvider>\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 <TunnelExit id=\"button\" />\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 </TunnelProvider>\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,IAC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EJ,CAAA;AAAA,UACC,kBAAA,oBACC,GAAA,CAAC,gBAAA,EAAA,EAAkB,QAAA,EAAA,0BAAA,EAA2B;AAAA,SAAA,EAElD,CAAA;AAAA,4BACC,cAAA,EAAA,EAAe;AAAA,OAAA,EAClB,CAAA,EACF;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
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 \"../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;A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AAA,SAAA,EAAY,IAAA,KAAS,UAAA,GAAa,MAAA,GAAS,MAAM,CAAA;AAAA,iBACnD;AAAA,gBAEC,mBAAS,UAAA,mBAAa,GAAA,CAAC,QAAA,EAAA,EAAS,CAAA,uBAAM,QAAA,EAAA,EAAS;AAAA;AAAA;AAClD,WAAA,EAEJ,CAAA;AAAA,UACC,kBAAA,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;;;;"}
@@ -17,7 +17,7 @@ const TimeField = flowComponent("TimeField", (props) => {
17
17
  FieldErrorCaptureContext,
18
18
  fieldPropsContext,
19
19
  fieldProps
20
- } = useFieldComponent(props);
20
+ } = useFieldComponent(props, "TimeField");
21
21
  return /* @__PURE__ */ jsxs(Aria.TimeField, { hourCycle: 24, ...rest, ...fieldProps, children: [
22
22
  /* @__PURE__ */ jsxs(FieldErrorCaptureContext, { children: [
23
23
  /* @__PURE__ */ jsx(DateInput, { className: styles.dateInput, ref }),
@@ -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);\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,kBAAkB,KAAK,CAAA;AAE3B,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;;;;"}
@@ -0,0 +1,19 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { TunnelEntry } from '@mittwald/react-tunnel';
5
+ import { getTunnelProviderId } from './lib.mjs';
6
+
7
+ const UiComponentTunnelEntry = (props) => {
8
+ const { component, ...tunnelEntryProps } = props;
9
+ return /* @__PURE__ */ jsx(
10
+ TunnelEntry,
11
+ {
12
+ ...tunnelEntryProps,
13
+ providerId: getTunnelProviderId(component)
14
+ }
15
+ );
16
+ };
17
+
18
+ export { UiComponentTunnelEntry };
19
+ //# sourceMappingURL=UiComponentTunnelEntry.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UiComponentTunnelEntry.mjs","sources":["../../../../../../../src/components/UiComponentTunnel/UiComponentTunnelEntry.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { TunnelEntry, type TunnelEntryProps } from \"@mittwald/react-tunnel\";\nimport { getTunnelProviderId } from \"./lib\";\nimport type { FlowComponentName } from \"../propTypes\";\n\nexport type UiComponentTunnelEntryProps = Omit<\n TunnelEntryProps,\n \"providerId\"\n> & {\n component: FlowComponentName;\n};\n\nexport const UiComponentTunnelEntry: FC<UiComponentTunnelEntryProps> = (\n props,\n) => {\n const { component, ...tunnelEntryProps } = props;\n return (\n <TunnelEntry\n {...tunnelEntryProps}\n providerId={getTunnelProviderId(component)}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAYO,MAAM,sBAAA,GAA0D,CACrE,KAAA,KACG;AACH,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,gBAAA,EAAiB,GAAI,KAAA;AAC3C,EAAA,uBACE,GAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACE,GAAG,gBAAA;AAAA,MACJ,UAAA,EAAY,oBAAoB,SAAS;AAAA;AAAA,GAC3C;AAEJ;;;;"}
@@ -0,0 +1,19 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { TunnelExit } from '@mittwald/react-tunnel';
5
+ import { getTunnelProviderId } from './lib.mjs';
6
+
7
+ const UiComponentTunnelExit = (props) => {
8
+ const { component, ...tunnelExitProps } = props;
9
+ return /* @__PURE__ */ jsx(
10
+ TunnelExit,
11
+ {
12
+ ...tunnelExitProps,
13
+ providerId: getTunnelProviderId(component)
14
+ }
15
+ );
16
+ };
17
+
18
+ export { UiComponentTunnelExit };
19
+ //# sourceMappingURL=UiComponentTunnelExit.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UiComponentTunnelExit.mjs","sources":["../../../../../../../src/components/UiComponentTunnel/UiComponentTunnelExit.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { TunnelExit, type TunnelExitProps } from \"@mittwald/react-tunnel\";\nimport { getTunnelProviderId } from \"./lib\";\nimport type { FlowComponentName } from \"../propTypes\";\n\nexport type UiComponentTunnelExitProps = Omit<TunnelExitProps, \"providerId\"> & {\n component: FlowComponentName;\n};\n\nexport const UiComponentTunnelExit: FC<UiComponentTunnelExitProps> = (\n props,\n) => {\n const { component, ...tunnelExitProps } = props;\n return (\n <TunnelExit\n {...tunnelExitProps}\n providerId={getTunnelProviderId(component)}\n />\n );\n};\n"],"names":[],"mappings":";;;;AASO,MAAM,qBAAA,GAAwD,CACnE,KAAA,KACG;AACH,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,eAAA,EAAgB,GAAI,KAAA;AAC1C,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACE,GAAG,eAAA;AAAA,MACJ,UAAA,EAAY,oBAAoB,SAAS;AAAA;AAAA,GAC3C;AAEJ;;;;"}
@@ -0,0 +1,13 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { TunnelProvider } from '@mittwald/react-tunnel';
5
+ import { getTunnelProviderId } from './lib.mjs';
6
+
7
+ const UiComponentTunnelProvider = (props) => {
8
+ const { children, component } = props;
9
+ return /* @__PURE__ */ jsx(TunnelProvider, { id: getTunnelProviderId(component), children });
10
+ };
11
+
12
+ export { UiComponentTunnelProvider };
13
+ //# sourceMappingURL=UiComponentTunnelProvider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UiComponentTunnelProvider.mjs","sources":["../../../../../../../src/components/UiComponentTunnel/UiComponentTunnelProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { TunnelProvider } from \"@mittwald/react-tunnel\";\nimport { getTunnelProviderId } from \"./lib\";\nimport type { FlowComponentName } from \"../propTypes\";\n\nexport interface UiComponentTunnelProviderProps extends PropsWithChildren {\n component: FlowComponentName;\n}\n\nexport const UiComponentTunnelProvider: FC<UiComponentTunnelProviderProps> = (\n props,\n) => {\n const { children, component } = props;\n\n return (\n <TunnelProvider id={getTunnelProviderId(component)}>\n {children}\n </TunnelProvider>\n );\n};\n"],"names":[],"mappings":";;;;AASO,MAAM,yBAAA,GAAgE,CAC3E,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,KAAA;AAEhC,EAAA,2BACG,cAAA,EAAA,EAAe,EAAA,EAAI,mBAAA,CAAoB,SAAS,GAC9C,QAAA,EACH,CAAA;AAEJ;;;;"}
@@ -0,0 +1,7 @@
1
+ "use client"
2
+ /* */
3
+ const tunnelProviderPrefix = "@mittwald/flow/tunnel/";
4
+ const getTunnelProviderId = (componentName) => `${tunnelProviderPrefix}${componentName}`;
5
+
6
+ export { getTunnelProviderId };
7
+ //# sourceMappingURL=lib.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lib.mjs","sources":["../../../../../../../src/components/UiComponentTunnel/lib.ts"],"sourcesContent":["import type { FlowComponentName } from \"../propTypes\";\n\nconst tunnelProviderPrefix = \"@mittwald/flow/tunnel/\";\n\nexport const getTunnelProviderId = (componentName: FlowComponentName) =>\n `${tunnelProviderPrefix}${componentName}`;\n"],"names":[],"mappings":"AAEA,MAAM,oBAAA,GAAuB,wBAAA;AAEtB,MAAM,sBAAsB,CAAC,aAAA,KAClC,CAAA,EAAG,oBAAoB,GAAG,aAAa,CAAA;;;;"}
@@ -2,6 +2,7 @@ const propsContextSupportingComponentsMap = {
2
2
  AccentBox: true,
3
3
  Action: true,
4
4
  ActionGroup: true,
5
+ Accordion: true,
5
6
  Avatar: true,
6
7
  Autocomplete: true,
7
8
  Alert: true,
@@ -12,6 +13,7 @@ const propsContextSupportingComponentsMap = {
12
13
  Badge: true,
13
14
  Button: true,
14
15
  CodeEditor: true,
16
+ Chat: true,
15
17
  Checkbox: true,
16
18
  CheckboxButton: true,
17
19
  CheckboxGroup: true,
@@ -46,6 +48,7 @@ const propsContextSupportingComponentsMap = {
46
48
  LightBox: true,
47
49
  Link: true,
48
50
  List: true,
51
+ ListItemView: true,
49
52
  ListSummary: true,
50
53
  MarkdownEditor: true,
51
54
  MenuItem: true,
@@ -68,6 +71,7 @@ const propsContextSupportingComponentsMap = {
68
71
  Rating: true,
69
72
  SearchField: true,
70
73
  Section: true,
74
+ SectionHeader: true,
71
75
  Segment: true,
72
76
  SegmentedControl: true,
73
77
  Select: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../../src/components/propTypes/index.ts"],"sourcesContent":["import type { TextProps } from \"@/components/Text\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport type { IconProps } from \"@/components/Icon\";\nimport type { LabelProps } from \"@/components/Label\";\nimport type { ContentProps } from \"@/components/Content\";\nimport type { LayoutCardProps } from \"@/components/LayoutCard\";\nimport type { LinkProps } from \"@/components/Link\";\nimport type { LightBoxProps } from \"@/components/LightBox\";\nimport type { FieldErrorProps } from \"@/components/FieldError\";\nimport type { FieldDescriptionProps } from \"@/components/FieldDescription\";\nimport type { AlertProps } from \"@/components/Alert\";\nimport type { HeadingProps } from \"@/components/Heading\";\nimport type { InitialsProps } from \"@/components/Initials\";\nimport type { ImageProps } from \"@/components/Image\";\nimport type { CopyButtonProps } from \"@/components/CopyButton\";\nimport type { HeaderProps } from \"@/components/Header/\";\nimport type { SwitchProps } from \"@/components/Switch\";\nimport type { AlertBadgeProps } from \"@/components/AlertBadge\";\nimport type { ActionGroupProps } from \"@/components/ActionGroup\";\nimport type { AvatarProps } from \"@/components/Avatar\";\nimport type { ActionProps } from \"@/components/Action\";\nimport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n MenuItemProps,\n} from \"@/components/ContextMenu\";\nimport type { SelectProps } from \"@/components/Select\";\nimport type {\n RadioButtonProps,\n RadioGroupProps,\n RadioProps,\n} from \"@/components/RadioGroup\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport type { NumberFieldProps } from \"@/components/NumberField\";\nimport type { TextAreaProps } from \"@/components/TextArea\";\nimport type { CheckboxGroupProps } from \"@/components/CheckboxGroup\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport type { CheckboxButtonProps } from \"@/components/CheckboxButton\";\nimport type { TabsProps } from \"@/components/Tabs\";\nimport type { ModalProps } from \"@/components/Modal\";\nimport type { SectionProps } from \"@/components/Section\";\nimport type { SliderProps } from \"@/components/Slider\";\nimport type { CounterBadgeProps } from \"@/components/CounterBadge\";\nimport type { FlowComponentName } from \"@/components/propTypes/types\";\nimport type {\n ContextualHelpProps,\n ContextualHelpTriggerProps,\n} from \"@/components/ContextualHelp\";\nimport type { PopoverProps, PopoverTriggerProps } from \"@/components/Popover\";\nimport type { ContextMenuSectionProps } from \"@/components/ContextMenu/components/ContextMenuSection\";\nimport type { ListProps } from \"@/components/List\";\nimport type { PasswordCreationFieldProps } from \"@/components/PasswordCreationField\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { BadgeProps } from \"@/components/Badge\";\nimport type { DatePickerProps } from \"@/components/DatePicker\";\nimport type * as Aria from \"react-aria-components\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\nimport type { TimeFieldProps } from \"@/components/TimeField\";\nimport type { AlertIconProps } from \"@/components/AlertIcon\";\nimport type { ListSummaryProps } from \"@/components/List/components/ListSummary/ListSummary\";\nimport type { SegmentedControlProps } from \"@/components/SegmentedControl\";\nimport type { SegmentProps } from \"@/components/SegmentedControl/components/Segment\";\nimport type { FileCardProps } from \"@/components/FileCard\";\nimport type { FileFieldProps } from \"@/components/FileField\";\nimport type { AlignProps } from \"@/components/Align\";\nimport type { CountryOptionsProps } from \"src/components/CountryOptions\";\nimport type { ComboBoxProps } from \"@/components/ComboBox\";\nimport type { OptionProps } from \"@/components/Option\";\nimport type { MessageProps } from \"@/components/Message\";\nimport type { MessageThreadProps } from \"@/components/MessageThread\";\nimport type { FileCardListProps } from \"@/components/FileCardList\";\nimport type { AccentBoxProps } from \"@/components/AccentBox\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport type { MenuTriggerProps } from \"@/components/OverlayTrigger\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport type { FileDropZoneProps } from \"@/components/FileDropZone\";\nimport type { NavigationProps } from \"@/components/Navigation\";\nimport type { NavigationGroupProps } from \"@/components/Navigation/components/NavigationGroup\";\nimport type { AutocompleteProps } from \"@/components/Autocomplete/Autocomplete\";\nimport type { OptionsProps } from \"@/components/Options/Options\";\nimport type { MarkdownEditorProps } from \"@/components/MarkdownEditor\";\nimport type { AlertTextProps } from \"@/components/AlertText\";\nimport type { IllustratedMessageProps } from \"@/components/IllustratedMessage\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport type { CodeEditorProps } from \"@/components/CodeEditor\";\nimport type { KbdProps } from \"@/components/Kbd/Kbd\";\n\nexport * from \"./types\";\n\nexport interface FlowComponentPropsTypes {\n AccentBox: AccentBoxProps;\n Action: ActionProps;\n ActionGroup: ActionGroupProps;\n Alert: AlertProps;\n AlertBadge: AlertBadgeProps;\n AlertIcon: AlertIconProps;\n AlertText: AlertTextProps;\n Align: AlignProps;\n Avatar: AvatarProps;\n Autocomplete: AutocompleteProps;\n Badge: BadgeProps;\n Button: ButtonProps;\n CodeEditor: CodeEditorProps;\n Checkbox: CheckboxProps;\n CheckboxButton: CheckboxButtonProps;\n CheckboxGroup: CheckboxGroupProps;\n ColumnLayout: ColumnLayoutProps;\n ComboBox: ComboBoxProps;\n Content: ContentProps;\n ContextMenu: ContextMenuProps;\n ContextMenuSection: ContextMenuSectionProps;\n ContextMenuTrigger: ContextMenuTriggerProps;\n ContextualHelp: ContextualHelpProps;\n ContextualHelpTrigger: ContextualHelpTriggerProps;\n CopyButton: CopyButtonProps;\n CounterBadge: CounterBadgeProps;\n CountryOptions: CountryOptionsProps;\n DatePicker: DatePickerProps<Aria.DateValue>;\n DateRangePicker: DateRangePickerProps<Aria.DateValue>;\n FieldDescription: FieldDescriptionProps;\n FieldError: FieldErrorProps;\n FileCard: FileCardProps;\n FileCardList: FileCardListProps;\n FileField: FileFieldProps;\n FileDropZone: FileDropZoneProps;\n Header: HeaderProps;\n Heading: HeadingProps;\n Icon: IconProps;\n IllustratedMessage: IllustratedMessageProps;\n Image: ImageProps;\n Initials: InitialsProps;\n Label: LabelProps;\n LayoutCard: LayoutCardProps;\n LightBox: LightBoxProps;\n Link: LinkProps;\n List: ListProps<never>;\n ListSummary: ListSummaryProps;\n MarkdownEditor: MarkdownEditorProps;\n MenuItem: MenuItemProps;\n MenuTrigger: MenuTriggerProps;\n Message: MessageProps;\n MessageThread: MessageThreadProps;\n Modal: ModalProps;\n Navigation: NavigationProps;\n NavigationGroup: NavigationGroupProps;\n NumberField: NumberFieldProps;\n Option: OptionProps;\n Options: OptionsProps;\n Popover: PopoverProps;\n PopoverTrigger: PopoverTriggerProps;\n PasswordCreationField: PasswordCreationFieldProps;\n ProgressBar: ProgressBarProps;\n Radio: RadioProps;\n RadioButton: RadioButtonProps;\n RadioGroup: RadioGroupProps;\n Rating: RatingProps;\n SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\n Kbd: KbdProps;\n Slider: SliderProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n TabTitle: TabsProps;\n Text: TextProps;\n TextArea: TextAreaProps;\n TextField: TextFieldProps;\n TimeField: TimeFieldProps;\n}\n\nconst propsContextSupportingComponentsMap: Record<\n keyof FlowComponentPropsTypes,\n true\n> = {\n AccentBox: true,\n Action: true,\n ActionGroup: true,\n Avatar: true,\n Autocomplete: true,\n Alert: true,\n AlertBadge: true,\n AlertIcon: true,\n AlertText: true,\n Align: true,\n Badge: true,\n Button: true,\n CodeEditor: true,\n Checkbox: true,\n CheckboxButton: true,\n CheckboxGroup: true,\n ColumnLayout: true,\n ComboBox: true,\n Content: true,\n ContextMenu: true,\n ContextMenuSection: true,\n ContextMenuTrigger: true,\n ContextualHelp: true,\n ContextualHelpTrigger: true,\n CopyButton: true,\n CounterBadge: true,\n CountryOptions: true,\n DatePicker: true,\n DateRangePicker: true,\n FieldDescription: true,\n FieldError: true,\n FileCard: true,\n FileCardList: true,\n FileField: true,\n FileDropZone: true,\n Header: true,\n Heading: true,\n Icon: true,\n IllustratedMessage: true,\n Image: true,\n Initials: true,\n Kbd: true,\n Label: true,\n LayoutCard: true,\n LightBox: true,\n Link: true,\n List: true,\n ListSummary: true,\n MarkdownEditor: true,\n MenuItem: true,\n MenuTrigger: true,\n Message: true,\n MessageThread: true,\n Modal: true,\n Navigation: true,\n NavigationGroup: true,\n NumberField: true,\n Radio: true,\n Option: true,\n Options: true,\n Popover: true,\n PopoverTrigger: true,\n PasswordCreationField: true,\n ProgressBar: true,\n RadioButton: true,\n RadioGroup: true,\n Rating: true,\n SearchField: true,\n Section: true,\n Segment: true,\n SegmentedControl: true,\n Select: true,\n Slider: true,\n Switch: true,\n Tabs: true,\n TabTitle: true,\n TestComponent: true,\n Text: true,\n TextArea: true,\n TextField: true,\n TimeField: true,\n};\n\nexport const propsContextS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AAA;AAAA,EACX,SAAA,EAAW;AACb,CAAA;AAEO,MAAM,mCAAmC,MAAA,CAAO,IAAA;AAAA,EACrD;AACF;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../../src/components/propTypes/index.ts"],"sourcesContent":["import type { TextProps } from \"@/components/Text\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport type { IconProps } from \"@/components/Icon\";\nimport type { LabelProps } from \"@/components/Label\";\nimport type { ContentProps } from \"@/components/Content\";\nimport type { LayoutCardProps } from \"@/components/LayoutCard\";\nimport type { LinkProps } from \"@/components/Link\";\nimport type { LightBoxProps } from \"@/components/LightBox\";\nimport type { FieldErrorProps } from \"@/components/FieldError\";\nimport type { FieldDescriptionProps } from \"@/components/FieldDescription\";\nimport type { AlertProps } from \"@/components/Alert\";\nimport type { HeadingProps } from \"@/components/Heading\";\nimport type { InitialsProps } from \"@/components/Initials\";\nimport type { ImageProps } from \"@/components/Image\";\nimport type { CopyButtonProps } from \"@/components/CopyButton\";\nimport type { HeaderProps } from \"@/components/Header/\";\nimport type { SwitchProps } from \"@/components/Switch\";\nimport type { AlertBadgeProps } from \"@/components/AlertBadge\";\nimport type { ActionGroupProps } from \"@/components/ActionGroup\";\nimport type { AvatarProps } from \"@/components/Avatar\";\nimport type { ActionProps } from \"@/components/Action\";\nimport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n MenuItemProps,\n} from \"@/components/ContextMenu\";\nimport type { SelectProps } from \"@/components/Select\";\nimport type {\n RadioButtonProps,\n RadioGroupProps,\n RadioProps,\n} from \"@/components/RadioGroup\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport type { NumberFieldProps } from \"@/components/NumberField\";\nimport type { TextAreaProps } from \"@/components/TextArea\";\nimport type { CheckboxGroupProps } from \"@/components/CheckboxGroup\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport type { CheckboxButtonProps } from \"@/components/CheckboxButton\";\nimport type { TabsProps } from \"@/components/Tabs\";\nimport type { ModalProps } from \"@/components/Modal\";\nimport type { SectionProps } from \"@/components/Section\";\nimport type { SliderProps } from \"@/components/Slider\";\nimport type { CounterBadgeProps } from \"@/components/CounterBadge\";\nimport type { FlowComponentName } from \"@/components/propTypes/types\";\nimport type {\n ContextualHelpProps,\n ContextualHelpTriggerProps,\n} from \"@/components/ContextualHelp\";\nimport type { PopoverProps, PopoverTriggerProps } from \"@/components/Popover\";\nimport type { ContextMenuSectionProps } from \"@/components/ContextMenu/components/ContextMenuSection\";\nimport type { ListItemViewContentProps, ListProps } from \"@/components/List\";\nimport type { PasswordCreationFieldProps } from \"@/components/PasswordCreationField\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { BadgeProps } from \"@/components/Badge\";\nimport type { DatePickerProps } from \"@/components/DatePicker\";\nimport type * as Aria from \"react-aria-components\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\nimport type { TimeFieldProps } from \"@/components/TimeField\";\nimport type { AlertIconProps } from \"@/components/AlertIcon\";\nimport type { ListSummaryProps } from \"@/components/List/components/ListSummary/ListSummary\";\nimport type { SegmentedControlProps } from \"@/components/SegmentedControl\";\nimport type { SegmentProps } from \"@/components/SegmentedControl/components/Segment\";\nimport type { FileCardProps } from \"@/components/FileCard\";\nimport type { FileFieldProps } from \"@/components/FileField\";\nimport type { AlignProps } from \"@/components/Align\";\nimport type { CountryOptionsProps } from \"src/components/CountryOptions\";\nimport type { ComboBoxProps } from \"@/components/ComboBox\";\nimport type { OptionProps } from \"@/components/Option\";\nimport type { MessageProps } from \"@/components/Message\";\nimport type { MessageThreadProps } from \"@/components/MessageThread\";\nimport type { FileCardListProps } from \"@/components/FileCardList\";\nimport type { AccentBoxProps } from \"@/components/AccentBox\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport type { MenuTriggerProps } from \"@/components/OverlayTrigger\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport type { FileDropZoneProps } from \"@/components/FileDropZone\";\nimport type { NavigationProps } from \"@/components/Navigation\";\nimport type { NavigationGroupProps } from \"@/components/Navigation/components/NavigationGroup\";\nimport type { AutocompleteProps } from \"@/components/Autocomplete/Autocomplete\";\nimport type { OptionsProps } from \"@/components/Options/Options\";\nimport type { MarkdownEditorProps } from \"@/components/MarkdownEditor\";\nimport type { AlertTextProps } from \"@/components/AlertText\";\nimport type { IllustratedMessageProps } from \"@/components/IllustratedMessage\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport type { CodeEditorProps } from \"@/components/CodeEditor\";\nimport type { KbdProps } from \"@/components/Kbd/Kbd\";\nimport type { AccordionProps } from \"@/components/Accordion\";\nimport type { ChatProps } from \"../Chat\";\nimport type { SectionHeaderProps } from \"../Section/components/SectionHeader/SectionHeader\";\n\nexport * from \"./types\";\n\nexport interface FlowComponentPropsTypes {\n AccentBox: AccentBoxProps;\n Action: ActionProps;\n ActionGroup: ActionGroupProps;\n Accordion: AccordionProps;\n Alert: AlertProps;\n AlertBadge: AlertBadgeProps;\n AlertIcon: AlertIconProps;\n AlertText: AlertTextProps;\n Align: AlignProps;\n Avatar: AvatarProps;\n Autocomplete: AutocompleteProps;\n Badge: BadgeProps;\n Button: ButtonProps;\n CodeEditor: CodeEditorProps;\n Chat: ChatProps;\n Checkbox: CheckboxProps;\n CheckboxButton: CheckboxButtonProps;\n CheckboxGroup: CheckboxGroupProps;\n ColumnLayout: ColumnLayoutProps;\n ComboBox: ComboBoxProps;\n Content: ContentProps;\n ContextMenu: ContextMenuProps;\n ContextMenuSection: ContextMenuSectionProps;\n ContextMenuTrigger: ContextMenuTriggerProps;\n ContextualHelp: ContextualHelpProps;\n ContextualHelpTrigger: ContextualHelpTriggerProps;\n CopyButton: CopyButtonProps;\n CounterBadge: CounterBadgeProps;\n CountryOptions: CountryOptionsProps;\n DatePicker: DatePickerProps<Aria.DateValue>;\n DateRangePicker: DateRangePickerProps<Aria.DateValue>;\n FieldDescription: FieldDescriptionProps;\n FieldError: FieldErrorProps;\n FileCard: FileCardProps;\n FileCardList: FileCardListProps;\n FileField: FileFieldProps;\n FileDropZone: FileDropZoneProps;\n Header: HeaderProps;\n Heading: HeadingProps;\n Icon: IconProps;\n IllustratedMessage: IllustratedMessageProps;\n Image: ImageProps;\n Initials: InitialsProps;\n Label: LabelProps;\n LayoutCard: LayoutCardProps;\n LightBox: LightBoxProps;\n Link: LinkProps;\n List: ListProps<never>;\n ListItemView: ListItemViewContentProps;\n ListSummary: ListSummaryProps;\n MarkdownEditor: MarkdownEditorProps;\n MenuItem: MenuItemProps;\n MenuTrigger: MenuTriggerProps;\n Message: MessageProps;\n MessageThread: MessageThreadProps;\n Modal: ModalProps;\n Navigation: NavigationProps;\n NavigationGroup: NavigationGroupProps;\n NumberField: NumberFieldProps;\n Option: OptionProps;\n Options: OptionsProps;\n Popover: PopoverProps;\n PopoverTrigger: PopoverTriggerProps;\n PasswordCreationField: PasswordCreationFieldProps;\n ProgressBar: ProgressBarProps;\n Radio: RadioProps;\n RadioButton: RadioButtonProps;\n RadioGroup: RadioGroupProps;\n Rating: RatingProps;\n SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\n Kbd: KbdProps;\n SectionHeader: SectionHeaderProps;\n Slider: SliderProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n TabTitle: TabsProps;\n Text: TextProps;\n TextArea: TextAreaProps;\n TextField: TextFieldProps;\n TimeField: TimeFieldProps;\n}\n\nconst propsContextSupportingComponentsMap: Record<\n keyof FlowComponentPropsTypes,\n true\n> = {\n AccentBox: true,\n Action: true,\n ActionGroup: true,\n Accordion: true,\n Avatar: true,\n Autocomplete: true,\n Alert: true,\n AlertBadge: true,\n AlertIcon: true,\n AlertText: true,\n Align: true,\n Badge: true,\n Button: true,\n CodeEditor: true,\n Chat: true,\n Checkbox: true,\n CheckboxButton: true,\n CheckboxGroup: true,\n ColumnLayout: true,\n ComboBox: true,\n Content: true,\n ContextMenu: true,\n ContextMenuSection: true,\n ContextMenuTrigger: true,\n ContextualHelp: true,\n ContextualHelpTrigger: true,\n CopyButton: true,\n CounterBadge: true,\n CountryOptions: true,\n DatePicker: true,\n DateRangePicker: true,\n FieldDescription: true,\n FieldError: true,\n FileCard: true,\n FileCardList: true,\n FileField: true,\n FileDropZone: true,\n Header: true,\n Heading: true,\n Icon: true,\n IllustratedMessage: true,\n Image: true,\n Initials: true,\n Kbd: true,\n Label: true,\n LayoutCard: true,\n LightBox: true,\n Link: true,\n List: true,\n ListItemView: true,\n ListSummary: true,\n MarkdownEditor: true,\n MenuItem: true,\n MenuTrigger: true,\n Message: true,\n MessageThread: true,\n Modal: true,\n Navigation: true,\n NavigationGroup: true,\n NumberField: true,\n Radio: true,\n Option: true,\n Options: true,\n Popover: true,\n PopoverTrigger: true,\n PasswordCreationField: true,\n ProgressBar: true,\n RadioButton: true,\n RadioGroup: true,\n Rating: true,\n SearchField: true,\n Section: true,\n SectionHeader: true,\n Segment: true,\n SegmentedControl: true,\n Select: true,\n Slider: true,\n Switch: true,\n Tabs: true,\n TabTitle: true,\n TestComponent: true,\n Text: true,\n TextArea: true,\n TextField: true,\n TimeField: true,\n};\n\nexport const propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"names":[],"mappings":"AAmLA,MAAM,mCAAA,GAGF;AAAA,EACF,SAAA,EAAW,IAAA;AAAA,EACX,MAAA,EAAQ,IAAA;AAAA,EACR,WAAA,EAAa,IAAA;AAAA,EACb,SAAA,EAAW,IAAA;AAAA,EACX,MAAA,EAAQ,IAAA;AAAA,EACR,YAAA,EAAc,IAAA;AAAA,EACd,KAAA,EAAO,IAAA;AAAA,EACP,UAAA,EAAY,IAAA;AAAA,EACZ,SAAA,EAAW,IAAA;AAAA,EACX,SAAA,EAAW,IAAA;AAAA,EACX,KAAA,EAAO,IAAA;AAAA,EACP,KAAA,EAAO,IAAA;AAAA,EACP,MAAA,EAAQ,IAAA;AAAA,EACR,UAAA,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;AAAA,EACT,aAAA,EAAe,IAAA;AAAA,EACf,KAAA,EAAO,IAAA;AAAA,EACP,UAAA,EAAY,IAAA;AAAA,EACZ,eAAA,EAAiB,IAAA;AAAA,EACjB,WAAA,EAAa,IAAA;AAAA,EACb,KAAA,EAAO,IAAA;AAAA,EACP,MAAA,EAAQ,IAAA;AAAA,EACR,OAAA,EAAS,IAAA;AAAA,EACT,OAAA,EAAS,IAAA;AAAA,EACT,cAAA,EAAgB,IAAA;AAAA,EAChB,qBAAA,EAAuB,IAAA;AAAA,EACvB,WAAA,EAAa,IAAA;AAAA,EACb,WAAA,EAAa,IAAA;AAAA,EACb,UAAA,EAAY,IAAA;AAAA,EACZ,MAAA,EAAQ,IAAA;AAAA,EACR,WAAA,EAAa,IAAA;AAAA,EACb,OAAA,EAAS,IAAA;AAAA,EACT,aAAA,EAAe,IAAA;AAAA,EACf,OAAA,EAAS,IAAA;AAAA,EACT,gBAAA,EAAkB,IAAA;AAAA,EAClB,MAAA,EAAQ,IAAA;AAAA,EACR,MAAA,EAAQ,IAAA;AAAA,EACR,MAAA,EAAQ,IAAA;AAAA,EACR,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,IAAA;AAAA,EACV,aAAA,EAAe,IAAA;AAAA,EACf,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,IAAA;AAAA,EACV,SAAA,EAAW,IAAA;AAAA,EACX,SAAA,EAAW;AACb,CAAA;AAEO,MAAM,mCAAmC,MAAA,CAAO,IAAA;AAAA,EACrD;AACF;;;;"}
@@ -2,19 +2,20 @@
2
2
  /* */
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import { memo, cloneElement } from 'react';
5
- import { TunnelEntry } from '@mittwald/react-tunnel';
6
5
  import { SlotContextProvider } from '../slotContext/SlotContextProvider.mjs';
7
6
  import { useProps } from '../hooks/useProps.mjs';
8
7
  import { useComponentPropsContext } from '../propsContext/propsContext.mjs';
9
8
  import { ComponentPropsContextProvider } from '../propsContext/components/ComponentPropsContextProvider.mjs';
10
9
  import { ClearPropsContext } from '../propsContext/components/ClearPropsContext.mjs';
11
10
  import ClearPropsContextView from '../../views/ClearPropsContextView.mjs';
11
+ import { UiComponentTunnelProvider } from '../../components/UiComponentTunnel/UiComponentTunnelProvider.mjs';
12
+ import { UiComponentTunnelEntry } from '../../components/UiComponentTunnel/UiComponentTunnelEntry.mjs';
12
13
 
13
14
  function flowComponent(componentName, ImplementationComponentType, options = {}) {
14
15
  const { type = "ui", isRemoteComponent = false } = options;
15
16
  const MemoizedImplementationComponentType = memo(ImplementationComponentType);
16
17
  function Component(props) {
17
- const { tunnelId, wrapWith, ...propsWithContext } = useProps(
18
+ const { tunnel, wrapWith, ...propsWithContext } = useProps(
18
19
  componentName,
19
20
  props
20
21
  );
@@ -22,6 +23,9 @@ function flowComponent(componentName, ImplementationComponentType, options = {})
22
23
  const componentProps = useComponentPropsContext(componentName);
23
24
  ImplementationComponentType.displayName = `FlowComponentImpl(${componentName})`;
24
25
  let element = /* @__PURE__ */ jsx(MemoizedImplementationComponentType, { ...implementationTypeProps });
26
+ if (type === "ui" || type === "layout") {
27
+ element = /* @__PURE__ */ jsx(UiComponentTunnelProvider, { component: componentName, children: element });
28
+ }
25
29
  element = /* @__PURE__ */ jsx(ComponentPropsContextProvider, { componentProps, children: element });
26
30
  if (type === "ui") {
27
31
  if (isRemoteComponent) {
@@ -36,8 +40,8 @@ function flowComponent(componentName, ImplementationComponentType, options = {})
36
40
  if (wrapWith) {
37
41
  element = cloneElement(wrapWith, void 0, element);
38
42
  }
39
- if (tunnelId) {
40
- element = /* @__PURE__ */ jsx(TunnelEntry, { id: tunnelId, children: element });
43
+ if (tunnel) {
44
+ element = /* @__PURE__ */ jsx(UiComponentTunnelEntry, { id: tunnel.id, component: tunnel.component, children: element });
41
45
  }
42
46
  return element;
43
47
  }
@@ -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 { TunnelEntry } from \"@mittwald/react-tunnel\";\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\";\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 { tunnelId, 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 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 (tunnelId) {\n element = <TunnelEntry id={tunnelId}>{element}</TunnelEntry>;\n }\n return element;\n }\n\n Component.displayName = `FlowComponent(${componentName})`;\n return memo(Component);\n}\n"],"names":[],"mappings":";;;;;;;;;;AAgDO,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,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AAU,GAAA,CAAC,WAAA,EAAA,EAAY,EAAA,EAAI,QAAA,EAAW,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,IAChD;AACA,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\";\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 { 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 return element;\n }\n\n Component.displayName = `FlowComponent(${componentName})`;\n return memo(Component);\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAiDO,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,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,OAAO,OAAA;AAAA,EACT;AAEA,EAAA,SAAA,CAAU,WAAA,GAAc,iBAAiB,aAAa,CAAA,CAAA,CAAA;AACtD,EAAA,OAAO,KAAK,SAAS,CAAA;AACvB;;;;"}
@@ -6,8 +6,10 @@ import formFieldStyles from '../../components/FormField/FormField.module.scss.mj
6
6
  import { useFieldError } from './useFieldError.mjs';
7
7
  import clsx from 'clsx';
8
8
 
9
- const useFieldComponent = (props) => {
10
- const { FieldErrorView, FieldErrorCaptureContext } = useFieldError();
9
+ const useFieldComponent = (props, component) => {
10
+ const { FieldErrorView, FieldErrorCaptureContext } = useFieldError({
11
+ component
12
+ });
11
13
  const fieldPropsContext = {
12
14
  Label: {
13
15
  className: formFieldStyles.label,
@@ -1 +1 @@
1
- {"version":3,"file":"useFieldComponent.mjs","sources":["../../../../../../../src/lib/hooks/useFieldComponent.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } 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\";\n\ninterface FieldComponentProps {\n className?: ClassValue;\n isRequired?: boolean;\n isDisabled?: boolean;\n}\n\nexport interface UseFieldComponent {\n FieldErrorCaptureContext: FC<PropsWithChildren>;\n FieldErrorView: FC;\n fieldPropsContext: PropsContext;\n fieldProps: {\n className?: ReturnType<typeof clsx>;\n };\n}\n\nexport const useFieldComponent = (\n props: FieldComponentProps,\n): UseFieldComponent => {\n const { FieldErrorView, FieldErrorCaptureContext } = useFieldError();\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 className: clsx(formFieldStyles.formField),\n },\n } as const;\n};\n"],"names":[],"mappings":";;;;;;AAqBO,MAAM,iBAAA,GAAoB,CAC/B,KAAA,KACsB;AACtB,EAAA,MAAM,EAAE,cAAA,EAAgB,wBAAA,EAAyB,GAAI,aAAA,EAAc;AAInE,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,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, PropsWithChildren } 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}\n\nexport interface UseFieldComponent {\n FieldErrorCaptureContext: FC<PropsWithChildren>;\n FieldErrorView: FC;\n fieldPropsContext: PropsContext;\n fieldProps: {\n className?: ReturnType<typeof clsx>;\n };\n}\n\nexport const useFieldComponent = (\n props: FieldComponentProps,\n component: FlowComponentName,\n): UseFieldComponent => {\n const { FieldErrorView, FieldErrorCaptureContext } = useFieldError({\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 className: clsx(formFieldStyles.formField),\n },\n } as const;\n};\n"],"names":[],"mappings":";;;;;;AAsBO,MAAM,iBAAA,GAAoB,CAC/B,KAAA,EACA,SAAA,KACsB;AACtB,EAAA,MAAM,EAAE,cAAA,EAAgB,wBAAA,EAAyB,GAAI,aAAA,CAAc;AAAA,IACjE;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,SAAA,EAAW,IAAA,CAAK,eAAA,CAAgB,SAAS;AAAA;AAC3C,GACF;AACF;;;;"}
@@ -5,17 +5,17 @@ import React, { useId, useMemo } from 'react';
5
5
  import '../propsContext/propsContext.mjs';
6
6
  import { PropsContextProvider } from '../propsContext/components/PropsContextProvider.mjs';
7
7
  import formFieldStyles from '../../components/FormField/FormField.module.scss.mjs';
8
- import { TunnelExit } from '@mittwald/react-tunnel';
9
8
  import { ClearPropsContext } from '../propsContext/components/ClearPropsContext.mjs';
10
9
  import { useProps } from './useProps.mjs';
10
+ import { UiComponentTunnelExit } from '../../components/UiComponentTunnel/UiComponentTunnelExit.mjs';
11
11
 
12
- const useFieldError = (tunnelIdFromProps) => {
12
+ const useFieldError = (options) => {
13
13
  const id = useId();
14
- const currentTunnelId = useProps("FieldError", {}).tunnelId;
15
- const tunnelId = currentTunnelId ?? `${id}.fieldError`;
14
+ const currentTunnelId = useProps("FieldError", {}).tunnel?.id;
15
+ const tunnelId = options.tunnelId ?? currentTunnelId ?? `${id}.fieldError`;
16
16
  const fieldErrorCapturePropsContext = {
17
17
  FieldError: {
18
- tunnelId,
18
+ tunnel: { id: tunnelId, component: options.component },
19
19
  className: formFieldStyles.fieldError
20
20
  }
21
21
  };
@@ -36,7 +36,7 @@ const useFieldError = (tunnelIdFromProps) => {
36
36
  if (currentTunnelId) {
37
37
  return null;
38
38
  }
39
- return /* @__PURE__ */ jsx(TunnelExit, { id: tunnelId, children: (children) => {
39
+ return /* @__PURE__ */ jsx(UiComponentTunnelExit, { id: tunnelId, component: options.component, children: (children) => {
40
40
  const childrenArray = React.Children.toArray(children);
41
41
  return /* @__PURE__ */ jsx(ClearPropsContext, { children: childrenArray[0] });
42
42
  } });
@@ -1 +1 @@
1
- {"version":3,"file":"useFieldError.mjs","sources":["../../../../../../../src/lib/hooks/useFieldError.tsx"],"sourcesContent":["import React, { type FC, type PropsWithChildren, useId, useMemo } from \"react\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { TunnelExit } from \"@mittwald/react-tunnel\";\nimport ClearPropsContext from \"@/lib/propsContext/components/ClearPropsContext\";\nimport { useProps } from \"@/lib/hooks/useProps\";\n\nexport const useFieldError = (tunnelIdFromProps?: string) => {\n const id = useId();\n const currentTunnelId = useProps(\"FieldError\", {}).tunnelId;\n const tunnelId = tunnelIdFromProps ?? currentTunnelId ?? `${id}.fieldError`;\n\n const fieldErrorCapturePropsContext: PropsContext = {\n FieldError: {\n tunnelId,\n className: formFieldStyles.fieldError,\n },\n };\n\n const FieldErrorCaptureContext: FC<PropsWithChildren> = useMemo(\n () => (props) => {\n return (\n <PropsContextProvider\n props={fieldErrorCapturePropsContext}\n dependencies={[tunnelId]}\n >\n {props.children}\n </PropsContextProvider>\n );\n },\n [tunnelId],\n );\n\n const FieldErrorView = () => {\n if (currentTunnelId) {\n return null;\n }\n\n return (\n <TunnelExit id={tunnelId}>\n {(children) => {\n const childrenArray = React.Children.toArray(children);\n return <ClearPropsContext>{childrenArray[0]}</ClearPropsContext>;\n }}\n </TunnelExit>\n );\n };\n\n return {\n FieldErrorCaptureContext,\n FieldErrorView,\n } as const;\n};\n"],"names":[],"mappings":";;;;;;;;;AAOO,MAAM,aAAA,GAAgB,CAAC,iBAAA,KAA+B;AAC3D,EAAA,MAAM,KAAK,KAAA,EAAM;AACjB,EAAA,MAAM,eAAA,GAAkB,QAAA,CAAS,YAAA,EAAc,EAAE,CAAA,CAAE,QAAA;AACnD,EAAA,MAAM,QAAA,GAAgC,eAAA,IAAmB,CAAA,EAAG,EAAE,CAAA,WAAA,CAAA;AAE9D,EAAA,MAAM,6BAAA,GAA8C;AAAA,IAClD,UAAA,EAAY;AAAA,MACV,QAAA;AAAA,MACA,WAAW,eAAA,CAAgB;AAAA;AAC7B,GACF;AAEA,EAAA,MAAM,wBAAA,GAAkD,OAAA;AAAA,IACtD,MAAM,CAAC,KAAA,KAAU;AACf,MAAA,uBACE,GAAA;AAAA,QAAC,oBAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAO,6BAAA;AAAA,UACP,YAAA,EAAc,CAAC,QAAQ,CAAA;AAAA,UAEtB,QAAA,EAAA,KAAA,CAAM;AAAA;AAAA,OACT;AAAA,IAEJ,CAAA;AAAA,IACA,CAAC,QAAQ;AAAA,GACX;AAEA,EAAA,MAAM,iBAAiB,MAAM;AAC3B,IAAA,IAAI,eAAA,EAAiB;AACnB,MAAA,OAAO,IAAA;AAAA,IACT;AAEA,IAAA,uBACE,GAAA,CAAC,UAAA,EAAA,EAAW,EAAA,EAAI,QAAA,EACb,WAAC,QAAA,KAAa;AACb,MAAA,MAAM,aAAA,GAAgB,KAAA,CAAM,QAAA,CAAS,OAAA,CAAQ,QAAQ,CAAA;AACrD,MAAA,uBAAO,GAAA,CAAC,iBAAA,EAAA,EAAmB,QAAA,EAAA,aAAA,CAAc,CAAC,CAAA,EAAE,CAAA;AAAA,IAC9C,CAAA,EACF,CAAA;AAAA,EAEJ,CAAA;AAEA,EAAA,OAAO;AAAA,IACL,wBAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"useFieldError.mjs","sources":["../../../../../../../src/lib/hooks/useFieldError.tsx"],"sourcesContent":["import React, { type FC, type PropsWithChildren, useId, useMemo } from \"react\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport ClearPropsContext from \"@/lib/propsContext/components/ClearPropsContext\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\nexport interface UseFieldErrorOptions {\n tunnelId?: string;\n component: FlowComponentName;\n}\n\nexport const useFieldError = (options: UseFieldErrorOptions) => {\n const id = useId();\n const currentTunnelId = useProps(\"FieldError\", {}).tunnel?.id;\n const tunnelId = options.tunnelId ?? currentTunnelId ?? `${id}.fieldError`;\n\n const fieldErrorCapturePropsContext: PropsContext = {\n FieldError: {\n tunnel: { id: tunnelId, component: options.component },\n className: formFieldStyles.fieldError,\n },\n };\n\n const FieldErrorCaptureContext: FC<PropsWithChildren> = useMemo(\n () => (props) => {\n return (\n <PropsContextProvider\n props={fieldErrorCapturePropsContext}\n dependencies={[tunnelId]}\n >\n {props.children}\n </PropsContextProvider>\n );\n },\n [tunnelId],\n );\n\n const FieldErrorView = () => {\n if (currentTunnelId) {\n return null;\n }\n\n return (\n <UiComponentTunnelExit id={tunnelId} component={options.component}>\n {(children) => {\n const childrenArray = React.Children.toArray(children);\n return <ClearPropsContext>{childrenArray[0]}</ClearPropsContext>;\n }}\n </UiComponentTunnelExit>\n );\n };\n\n return {\n FieldErrorCaptureContext,\n FieldErrorView,\n } as const;\n};\n"],"names":[],"mappings":";;;;;;;;;AAaO,MAAM,aAAA,GAAgB,CAAC,OAAA,KAAkC;AAC9D,EAAA,MAAM,KAAK,KAAA,EAAM;AACjB,EAAA,MAAM,kBAAkB,QAAA,CAAS,YAAA,EAAc,EAAE,EAAE,MAAA,EAAQ,EAAA;AAC3D,EAAA,MAAM,QAAA,GAAW,OAAA,CAAQ,QAAA,IAAY,eAAA,IAAmB,GAAG,EAAE,CAAA,WAAA,CAAA;AAE7D,EAAA,MAAM,6BAAA,GAA8C;AAAA,IAClD,UAAA,EAAY;AAAA,MACV,QAAQ,EAAE,EAAA,EAAI,QAAA,EAAU,SAAA,EAAW,QAAQ,SAAA,EAAU;AAAA,MACrD,WAAW,eAAA,CAAgB;AAAA;AAC7B,GACF;AAEA,EAAA,MAAM,wBAAA,GAAkD,OAAA;AAAA,IACtD,MAAM,CAAC,KAAA,KAAU;AACf,MAAA,uBACE,GAAA;AAAA,QAAC,oBAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAO,6BAAA;AAAA,UACP,YAAA,EAAc,CAAC,QAAQ,CAAA;AAAA,UAEtB,QAAA,EAAA,KAAA,CAAM;AAAA;AAAA,OACT;AAAA,IAEJ,CAAA;AAAA,IACA,CAAC,QAAQ;AAAA,GACX;AAEA,EAAA,MAAM,iBAAiB,MAAM;AAC3B,IAAA,IAAI,eAAA,EAAiB;AACnB,MAAA,OAAO,IAAA;AAAA,IACT;AAEA,IAAA,uBACE,GAAA,CAAC,yBAAsB,EAAA,EAAI,QAAA,EAAU,WAAW,OAAA,CAAQ,SAAA,EACrD,WAAC,QAAA,KAAa;AACb,MAAA,MAAM,aAAA,GAAgB,KAAA,CAAM,QAAA,CAAS,OAAA,CAAQ,QAAQ,CAAA;AACrD,MAAA,uBAAO,GAAA,CAAC,iBAAA,EAAA,EAAmB,QAAA,EAAA,aAAA,CAAc,CAAC,CAAA,EAAE,CAAA;AAAA,IAC9C,CAAA,EACF,CAAA;AAAA,EAEJ,CAAA;AAEA,EAAA,OAAO;AAAA,IACL,wBAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"props.mjs","sources":["../../../../../../../src/lib/types/props.ts"],"sourcesContent":["import type { ExoticComponent, HTMLAttributes } from \"react\";\n\nexport const statusTypes = [\n \"info\",\n \"success\",\n \"warning\",\n \"danger\",\n \"unavailable\",\n] as const;\n\nexport type Status = (typeof statusTypes)[number];\n\nexport type PropsWithStatus<T extends Status = Status, P = unknown> = P & {\n /** The elements status */\n status?: T;\n};\n\nexport interface PropsWithTunnel {\n /** @internal */\n tunnelId?: string | null;\n}\n\nexport interface PropsWithClassName {\n /** The elements class name. */\n className?: string;\n}\n\nexport type PropsWithElementType<\n T extends keyof HTMLElementTagNameMap = never,\n> = HTMLAttributes<HTMLElement> & {\n elementType?: T | ExoticComponent;\n};\n\nexport type ContainerBreakpointSize = \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n\nexport interface PropsWithContainerBreakpointSize {\n containerBreakpointSize?: ContainerBreakpointSize;\n}\n\nexport const alphaColors = [\n \"dark\",\n \"light\",\n \"dark-static\",\n \"light-static\",\n] as const;\n\nexport type AlphaColor = (typeof alphaColors)[number];\n\nexport function isAlphaColor(color: string): color is AlphaColor {\n return alphaColors.includes(color as AlphaColor);\n}\n"],"names":[],"mappings":"AAEO,MAAM,WAAA,GAAc;AAAA,EACzB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF;AA+BO,MAAM,WAAA,GAAc;AAAA,EACzB,MAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF;AAIO,SAAS,aAAa,KAAA,EAAoC;AAC/D,EAAA,OAAO,WAAA,CAAY,SAAS,KAAmB,CAAA;AACjD;;;;"}
1
+ {"version":3,"file":"props.mjs","sources":["../../../../../../../src/lib/types/props.ts"],"sourcesContent":["import type { FlowComponentName } from \"@/components/propTypes\";\nimport type { ExoticComponent, HTMLAttributes } from \"react\";\n\nexport const statusTypes = [\n \"info\",\n \"success\",\n \"warning\",\n \"danger\",\n \"unavailable\",\n] as const;\n\nexport type Status = (typeof statusTypes)[number];\n\nexport type PropsWithStatus<T extends Status = Status, P = unknown> = P & {\n /** The elements status */\n status?: T;\n};\n\nexport interface PropsWithTunnel {\n /** @internal */\n tunnel?: {\n id: string;\n component: FlowComponentName;\n } | null;\n}\n\nexport interface PropsWithClassName {\n /** The elements class name. */\n className?: string;\n}\n\nexport type PropsWithElementType<\n T extends keyof HTMLElementTagNameMap = never,\n> = HTMLAttributes<HTMLElement> & {\n elementType?: T | ExoticComponent;\n};\n\nexport type ContainerBreakpointSize = \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n\nexport interface PropsWithContainerBreakpointSize {\n containerBreakpointSize?: ContainerBreakpointSize;\n}\n\nexport const alphaColors = [\n \"dark\",\n \"light\",\n \"dark-static\",\n \"light-static\",\n] as const;\n\nexport type AlphaColor = (typeof alphaColors)[number];\n\nexport function isAlphaColor(color: string): color is AlphaColor {\n return alphaColors.includes(color as AlphaColor);\n}\n"],"names":[],"mappings":"AAGO,MAAM,WAAA,GAAc;AAAA,EACzB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF;AAkCO,MAAM,WAAA,GAAc;AAAA,EACzB,MAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF;AAIO,SAAS,aAAa,KAAA,EAAoC;AAC/D,EAAA,OAAO,WAAA,CAAY,SAAS,KAAmB,CAAA;AACjD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAW9E,MAAM,WAAW,cAAe,SAAQ,iBAAiB,CACvD,cAAc,CAAC,KAAK,CAAC,CACtB;IACC,0DAA0D;IAC1D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED,wBAAwB;AACxB,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAuExC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAY9E,MAAM,WAAW,cAAe,SAAQ,iBAAiB,CACvD,cAAc,CAAC,KAAK,CAAC,CACtB;IACC,0DAA0D;IAC1D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED,wBAAwB;AACxB,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA8ExC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionGroup/ActionGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,MAAM,WAAW,gBACf,SACE,iBAAiB,EACjB,kBAAkB,CAAC,cAAc,CAAC,EAClC,kBAAkB;IACpB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CACrB;AAED,wBAAwB;AACxB,eAAO,MAAM,WAAW,qGAkDvB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ActionGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionGroup/ActionGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAI5D,MAAM,WAAW,gBACf,SACE,iBAAiB,EACjB,kBAAkB,CAAC,cAAc,CAAC,EAClC,kBAAkB;IACpB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CACrB;AAED,wBAAwB;AACxB,eAAO,MAAM,WAAW,qGAgDvB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAkB9C,MAAM,WAAW,iBACf,SACE,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,CAAC,gBAAgB,CAAC,EACpC,IAAI,CACF,IAAI,CAAC,iBAAiB,EACtB,UAAU,GAAG,eAAe,GAAG,YAAY,GAAG,mBAAmB,GAAG,KAAK,CAC1E;CAAG;AAER,wBAAwB;AACxB,eAAO,MAAM,YAAY,wGAqGvB,CAAC;AAEH,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAkB9C,MAAM,WAAW,iBACf,SACE,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,CAAC,gBAAgB,CAAC,EACpC,IAAI,CACF,IAAI,CAAC,iBAAiB,EACtB,UAAU,GAAG,eAAe,GAAG,YAAY,GAAG,mBAAmB,GAAG,KAAK,CAC1E;CAAG;AAER,wBAAwB;AACxB,eAAO,MAAM,YAAY,wGA2GvB,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -1,12 +1,10 @@
1
1
  import { ComposedChart } from 'recharts';
2
2
  import { default as React, ComponentProps, ComponentType, FC, PropsWithChildren, ReactNode } from 'react';
3
+ import { ChartDataValue, DataKeyProp } from './types';
3
4
  /** @deprecated Use a ReactNode instead */
4
5
  export interface CartesianChartEmptyViewProps {
5
6
  data?: ComponentProps<typeof ComposedChart>["data"];
6
7
  }
7
- export type ChartDataValue = Record<string, unknown>;
8
- export type DataKey<TData> = keyof TData | (() => keyof TData) | number;
9
- export type DataKeyValue<TData, TDataKey extends DataKey<TData>> = TDataKey extends keyof TData ? TData[TDataKey] : TDataKey extends () => infer K ? K extends keyof TData ? TData[K] : TData[keyof TData] : TData[keyof TData];
10
8
  export interface CartesianChartProps<TData = ChartDataValue> extends Pick<ComponentProps<typeof ComposedChart>, "className" | "syncId" | "syncMethod">, PropsWithChildren {
11
9
  data?: TData[];
12
10
  height?: string;
@@ -20,14 +18,14 @@ export interface CartesianChartProps<TData = ChartDataValue> extends Pick<Compon
20
18
  }
21
19
  /** @flr-generate all */
22
20
  export declare const CartesianChart: FC<CartesianChartProps>;
23
- export declare const typedCartesianChart: <TData = ChartDataValue>() => {
21
+ export declare const typedCartesianChart: <TData extends ChartDataValue<any> = ChartDataValue<any>, XAxisDataKey extends DataKeyProp<TData> = DataKeyProp<TData>>() => {
24
22
  Chart: ComponentType<CartesianChartProps<TData>>;
25
- Area: React.ComponentType<import('./components/Area').AreaProps<TData>>;
26
- XAxis: <const TProp extends DataKey<TData>, TMatcherValue = DataKeyValue<TData, TProp>>(props: import('./components/XAxis').XAxisProps<TData, TProp, TMatcherValue>) => ReactNode;
27
- YAxis: <const TProp extends DataKey<TData>, TMatcherValue_1 = DataKeyValue<TData, TProp>>(props: import('./components/YAxis').YAxisProps<TData, TProp, TMatcherValue_1>) => ReactNode;
23
+ Area: React.ComponentType<import('./components/Area').AreaPropsByDataKeyProp<TData>>;
24
+ XAxis: <const TProp extends XAxisDataKey, XAxisDataKeyValue = import('./types').DataKeyValue<TData, TProp>>(props: import('./components/XAxis').XAxisProps<TData, TProp, XAxisDataKeyValue>) => ReactNode;
25
+ YAxis: <const TProp extends keyof TData, TMatcherValue = import('./types').DataKeyValue<TData, TProp>>(props: import('./components/YAxis').YAxisProps<TData, TProp, TMatcherValue>) => ReactNode;
28
26
  Grid: React.ComponentType<import('./components/ChartGrid').ChartGridProps>;
29
27
  Legend: React.ComponentType<import('./components/ChartLegend').ChartLegendProps>;
30
- Tooltip: React.ComponentType<import('./components/ChartTooltip').ChartTooltipProps<TData>>;
28
+ Tooltip: React.ComponentType<import('./components/ChartTooltip').ChartTooltipProps<TData, XAxisDataKey>>;
31
29
  Line: React.ComponentType<import('./components/Line').LineProps<TData>>;
32
30
  };
33
31
  export default CartesianChart;