@mittwald/flow-react-components 0.2.0-alpha.481 → 0.2.0-alpha.483

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 (550) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/assets/doc-properties.json +2953 -3043
  3. package/dist/css/all.css +1 -1
  4. package/dist/js/components/src/components/AccentBox/AccentBox.mjs +11 -6
  5. package/dist/js/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
  6. package/dist/js/components/src/components/Accordion/Accordion.mjs +17 -25
  7. package/dist/js/components/src/components/Accordion/Accordion.mjs.map +1 -1
  8. package/dist/js/components/src/components/Action/Action.mjs +46 -38
  9. package/dist/js/components/src/components/Action/Action.mjs.map +1 -1
  10. package/dist/js/components/src/components/ActionGroup/ActionGroup.mjs +3 -5
  11. package/dist/js/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
  12. package/dist/js/components/src/components/Alert/Alert.mjs +3 -4
  13. package/dist/js/components/src/components/Alert/Alert.mjs.map +1 -1
  14. package/dist/js/components/src/components/AlertBadge/AlertBadge.mjs +3 -5
  15. package/dist/js/components/src/components/AlertBadge/AlertBadge.mjs.map +1 -1
  16. package/dist/js/components/src/components/AlertIcon/AlertIcon.mjs +1 -2
  17. package/dist/js/components/src/components/AlertIcon/AlertIcon.mjs.map +1 -1
  18. package/dist/js/components/src/components/Align/Align.mjs +3 -3
  19. package/dist/js/components/src/components/Align/Align.mjs.map +1 -1
  20. package/dist/js/components/src/components/Autocomplete/Autocomplete.mjs +2 -3
  21. package/dist/js/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
  22. package/dist/js/components/src/components/Avatar/Avatar.mjs +3 -4
  23. package/dist/js/components/src/components/Avatar/Avatar.mjs.map +1 -1
  24. package/dist/js/components/src/components/AvatarStack/AvatarStack.mjs +2 -3
  25. package/dist/js/components/src/components/AvatarStack/AvatarStack.mjs.map +1 -1
  26. package/dist/js/components/src/components/Badge/Badge.mjs +3 -3
  27. package/dist/js/components/src/components/Badge/Badge.mjs.map +1 -1
  28. package/dist/js/components/src/components/BigNumber/BigNumber.mjs +2 -4
  29. package/dist/js/components/src/components/BigNumber/BigNumber.mjs.map +1 -1
  30. package/dist/js/components/src/components/Breadcrumb/Breadcrumb.mjs +1 -3
  31. package/dist/js/components/src/components/Breadcrumb/Breadcrumb.mjs.map +1 -1
  32. package/dist/js/components/src/components/BrowserOnly/BrowserOnly.mjs +3 -2
  33. package/dist/js/components/src/components/BrowserOnly/BrowserOnly.mjs.map +1 -1
  34. package/dist/js/components/src/components/Button/Button.mjs +6 -6
  35. package/dist/js/components/src/components/Button/Button.mjs.map +1 -1
  36. package/dist/js/components/src/components/Chat/Chat.mjs +3 -5
  37. package/dist/js/components/src/components/Chat/Chat.mjs.map +1 -1
  38. package/dist/js/components/src/components/Checkbox/Checkbox.mjs +2 -3
  39. package/dist/js/components/src/components/Checkbox/Checkbox.mjs.map +1 -1
  40. package/dist/js/components/src/components/CheckboxButton/CheckboxButton.mjs +2 -5
  41. package/dist/js/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
  42. package/dist/js/components/src/components/CheckboxGroup/CheckboxGroup.mjs +1 -3
  43. package/dist/js/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
  44. package/dist/js/components/src/components/ColumnLayout/ColumnLayout.mjs +2 -12
  45. package/dist/js/components/src/components/ColumnLayout/ColumnLayout.mjs.map +1 -1
  46. package/dist/js/components/src/components/ComboBox/ComboBox.mjs +1 -1
  47. package/dist/js/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
  48. package/dist/js/components/src/components/Content/Content.mjs +2 -11
  49. package/dist/js/components/src/components/Content/Content.mjs.map +1 -1
  50. package/dist/js/components/src/components/ContextMenu/ContextMenu.mjs +13 -21
  51. package/dist/js/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
  52. package/dist/js/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs +2 -4
  53. package/dist/js/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs.map +1 -1
  54. package/dist/js/components/src/components/ContextMenu/components/ContextMenuTrigger/ContextMenuTrigger.mjs +2 -1
  55. package/dist/js/components/src/components/ContextMenu/components/ContextMenuTrigger/ContextMenuTrigger.mjs.map +1 -1
  56. package/dist/js/components/src/components/ContextualHelp/ContextualHelp.mjs +2 -3
  57. package/dist/js/components/src/components/ContextualHelp/ContextualHelp.mjs.map +1 -1
  58. package/dist/js/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs +6 -5
  59. package/dist/js/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs.map +1 -1
  60. package/dist/js/components/src/components/CopyButton/CopyButton.mjs +3 -4
  61. package/dist/js/components/src/components/CopyButton/CopyButton.mjs.map +1 -1
  62. package/dist/js/components/src/components/CountryOptions/CountryOptions.mjs +13 -19
  63. package/dist/js/components/src/components/CountryOptions/CountryOptions.mjs.map +1 -1
  64. package/dist/js/components/src/components/DatePicker/DatePicker.mjs +3 -3
  65. package/dist/js/components/src/components/DatePicker/DatePicker.mjs.map +1 -1
  66. package/dist/js/components/src/components/DateRangePicker/DateRangePicker.mjs +2 -3
  67. package/dist/js/components/src/components/DateRangePicker/DateRangePicker.mjs.map +1 -1
  68. package/dist/js/components/src/components/FieldDescription/FieldDescription.mjs +1 -3
  69. package/dist/js/components/src/components/FieldDescription/FieldDescription.mjs.map +1 -1
  70. package/dist/js/components/src/components/FieldError/FieldError.mjs +3 -4
  71. package/dist/js/components/src/components/FieldError/FieldError.mjs.map +1 -1
  72. package/dist/js/components/src/components/FileCard/FileCard.mjs +2 -4
  73. package/dist/js/components/src/components/FileCard/FileCard.mjs.map +1 -1
  74. package/dist/js/components/src/components/FileCardList/FileCardList.mjs +1 -3
  75. package/dist/js/components/src/components/FileCardList/FileCardList.mjs.map +1 -1
  76. package/dist/js/components/src/components/FileDropZone/FileDropZone.mjs +2 -3
  77. package/dist/js/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
  78. package/dist/js/components/src/components/FileField/FileField.mjs +1 -3
  79. package/dist/js/components/src/components/FileField/FileField.mjs.map +1 -1
  80. package/dist/js/components/src/components/FileField/components/FileInput.mjs +2 -3
  81. package/dist/js/components/src/components/FileField/components/FileInput.mjs.map +1 -1
  82. package/dist/js/components/src/components/HeaderNavigation/HeaderNavigation.mjs +2 -4
  83. package/dist/js/components/src/components/HeaderNavigation/HeaderNavigation.mjs.map +1 -1
  84. package/dist/js/components/src/components/Heading/Heading.mjs +3 -5
  85. package/dist/js/components/src/components/Heading/Heading.mjs.map +1 -1
  86. package/dist/js/components/src/components/Icon/Icon.mjs +1 -3
  87. package/dist/js/components/src/components/Icon/Icon.mjs.map +1 -1
  88. package/dist/js/components/src/components/IllustratedMessage/IllustratedMessage.mjs +1 -3
  89. package/dist/js/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map +1 -1
  90. package/dist/js/components/src/components/Image/Image.mjs +2 -3
  91. package/dist/js/components/src/components/Image/Image.mjs.map +1 -1
  92. package/dist/js/components/src/components/Initials/Initials.mjs +2 -3
  93. package/dist/js/components/src/components/Initials/Initials.mjs.map +1 -1
  94. package/dist/js/components/src/components/InlineCode/InlineCode.mjs +1 -3
  95. package/dist/js/components/src/components/InlineCode/InlineCode.mjs.map +1 -1
  96. package/dist/js/components/src/components/Label/Label.mjs +1 -2
  97. package/dist/js/components/src/components/Label/Label.mjs.map +1 -1
  98. package/dist/js/components/src/components/LabeledValue/LabeledValue.mjs +2 -4
  99. package/dist/js/components/src/components/LabeledValue/LabeledValue.mjs.map +1 -1
  100. package/dist/js/components/src/components/LayoutCard/LayoutCard.mjs +1 -3
  101. package/dist/js/components/src/components/LayoutCard/LayoutCard.mjs.map +1 -1
  102. package/dist/js/components/src/components/LightBox/LightBox.mjs +2 -2
  103. package/dist/js/components/src/components/Link/Link.mjs +3 -4
  104. package/dist/js/components/src/components/Link/Link.mjs.map +1 -1
  105. package/dist/js/components/src/components/List/List.mjs +1 -3
  106. package/dist/js/components/src/components/List/List.mjs.map +1 -1
  107. package/dist/js/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs +8 -1
  108. package/dist/js/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs.map +1 -1
  109. package/dist/js/components/src/components/List/components/Header/components/Filters/CombinedFilterMenu.mjs +6 -7
  110. package/dist/js/components/src/components/List/components/Header/components/Filters/CombinedFilterMenu.mjs.map +1 -1
  111. package/dist/js/components/src/components/List/components/Header/components/Filters/FilterMenu.mjs +4 -7
  112. package/dist/js/components/src/components/List/components/Header/components/Filters/FilterMenu.mjs.map +1 -1
  113. package/dist/js/components/src/components/List/components/Header/components/Filters/FilterMenuList.mjs +2 -1
  114. package/dist/js/components/src/components/List/components/Header/components/Filters/FilterMenuList.mjs.map +1 -1
  115. package/dist/js/components/src/components/List/components/Header/components/SearchField/SearchField.mjs +2 -1
  116. package/dist/js/components/src/components/List/components/Header/components/SearchField/SearchField.mjs.map +1 -1
  117. package/dist/js/components/src/components/List/components/Header/components/Settings/SettingsMenu.mjs +4 -7
  118. package/dist/js/components/src/components/List/components/Header/components/Settings/SettingsMenu.mjs.map +1 -1
  119. package/dist/js/components/src/components/List/components/Header/components/Settings/SortingMenu.mjs +5 -8
  120. package/dist/js/components/src/components/List/components/Header/components/Settings/SortingMenu.mjs.map +1 -1
  121. package/dist/js/components/src/components/List/components/Header/components/Settings/SortingMenuItem.mjs +2 -1
  122. package/dist/js/components/src/components/List/components/Header/components/Settings/SortingMenuItem.mjs.map +1 -1
  123. package/dist/js/components/src/components/List/components/Header/components/Settings/ViewModeMenu.mjs +6 -7
  124. package/dist/js/components/src/components/List/components/Header/components/Settings/ViewModeMenu.mjs.map +1 -1
  125. package/dist/js/components/src/components/List/components/Header/components/Settings/ViewModeMenuItem.mjs +2 -1
  126. package/dist/js/components/src/components/List/components/Header/components/Settings/ViewModeMenuItem.mjs.map +1 -1
  127. package/dist/js/components/src/components/List/components/Header/lib.mjs +2 -1
  128. package/dist/js/components/src/components/List/components/Header/lib.mjs.map +1 -1
  129. package/dist/js/components/src/components/List/components/Items/Items.mjs +2 -1
  130. package/dist/js/components/src/components/List/components/Items/Items.mjs.map +1 -1
  131. package/dist/js/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs +3 -0
  132. package/dist/js/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs.map +1 -1
  133. package/dist/js/components/src/components/List/components/Items/components/Item/hooks/useGridItemProps.mjs +3 -3
  134. package/dist/js/components/src/components/List/components/Items/components/Item/hooks/useGridItemProps.mjs.map +1 -1
  135. package/dist/js/components/src/components/List/components/ListItemView/ListItemView.mjs +7 -7
  136. package/dist/js/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
  137. package/dist/js/components/src/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.mjs +13 -19
  138. package/dist/js/components/src/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.mjs.map +1 -1
  139. package/dist/js/components/src/components/List/components/Table/Table.mjs +2 -1
  140. package/dist/js/components/src/components/List/components/Table/Table.mjs.map +1 -1
  141. package/dist/js/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs +5 -4
  142. package/dist/js/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
  143. package/dist/js/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs +2 -2
  144. package/dist/js/components/src/components/Message/Message.mjs +3 -2
  145. package/dist/js/components/src/components/Message/Message.mjs.map +1 -1
  146. package/dist/js/components/src/components/MessageThread/MessageThread.mjs +2 -4
  147. package/dist/js/components/src/components/MessageThread/MessageThread.mjs.map +1 -1
  148. package/dist/js/components/src/components/Modal/Modal.mjs +76 -79
  149. package/dist/js/components/src/components/Modal/Modal.mjs.map +1 -1
  150. package/dist/js/components/src/components/Navigation/Navigation.mjs +28 -19
  151. package/dist/js/components/src/components/Navigation/Navigation.mjs.map +1 -1
  152. package/dist/js/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs +9 -7
  153. package/dist/js/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
  154. package/dist/js/components/src/components/Notification/Notification.mjs +2 -2
  155. package/dist/js/components/src/components/Notification/Notification.mjs.map +1 -1
  156. package/dist/js/components/src/components/NumberField/NumberField.mjs +4 -5
  157. package/dist/js/components/src/components/NumberField/NumberField.mjs.map +1 -1
  158. package/dist/js/components/src/components/Options/Options.mjs +2 -1
  159. package/dist/js/components/src/components/Options/Options.mjs.map +1 -1
  160. package/dist/js/components/src/components/Overlay/Overlay.mjs +4 -3
  161. package/dist/js/components/src/components/Overlay/Overlay.mjs.map +1 -1
  162. package/dist/js/components/src/components/OverlayTrigger/OverlayTrigger.mjs +3 -4
  163. package/dist/js/components/src/components/OverlayTrigger/OverlayTrigger.mjs.map +1 -1
  164. package/dist/js/components/src/components/OverlayTrigger/components/MenuTrigger/MenuTrigger.mjs +4 -2
  165. package/dist/js/components/src/components/OverlayTrigger/components/MenuTrigger/MenuTrigger.mjs.map +1 -1
  166. package/dist/js/components/src/components/PasswordCreationField/PasswordCreationField.mjs +86 -82
  167. package/dist/js/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
  168. package/dist/js/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs +1 -2
  169. package/dist/js/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs.map +1 -1
  170. package/dist/js/components/src/components/Popover/Popover.mjs +3 -2
  171. package/dist/js/components/src/components/Popover/Popover.mjs.map +1 -1
  172. package/dist/js/components/src/components/Popover/components/PopoverTrigger/PopoverTrigger.mjs +16 -12
  173. package/dist/js/components/src/components/Popover/components/PopoverTrigger/PopoverTrigger.mjs.map +1 -1
  174. package/dist/js/components/src/components/ProgressBar/ProgressBar.mjs +1 -3
  175. package/dist/js/components/src/components/ProgressBar/ProgressBar.mjs.map +1 -1
  176. package/dist/js/components/src/components/RadioGroup/RadioGroup.mjs +18 -28
  177. package/dist/js/components/src/components/RadioGroup/RadioGroup.mjs.map +1 -1
  178. package/dist/js/components/src/components/RadioGroup/components/Radio/Radio.mjs +3 -4
  179. package/dist/js/components/src/components/RadioGroup/components/Radio/Radio.mjs.map +1 -1
  180. package/dist/js/components/src/components/RadioGroup/components/RadioButton/RadioButton.mjs +2 -5
  181. package/dist/js/components/src/components/RadioGroup/components/RadioButton/RadioButton.mjs.map +1 -1
  182. package/dist/js/components/src/components/SearchField/SearchField.mjs +5 -6
  183. package/dist/js/components/src/components/SearchField/SearchField.mjs.map +1 -1
  184. package/dist/js/components/src/components/Section/Section.mjs +4 -5
  185. package/dist/js/components/src/components/Section/Section.mjs.map +1 -1
  186. package/dist/js/components/src/components/Section/components/SectionHeader/SectionHeader.mjs +1 -9
  187. package/dist/js/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
  188. package/dist/js/components/src/components/SegmentedControl/SegmentedControl.mjs +7 -17
  189. package/dist/js/components/src/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  190. package/dist/js/components/src/components/SegmentedControl/components/Segment/Segment.mjs +4 -5
  191. package/dist/js/components/src/components/SegmentedControl/components/Segment/Segment.mjs.map +1 -1
  192. package/dist/js/components/src/components/Select/Select.mjs +3 -3
  193. package/dist/js/components/src/components/Select/Select.mjs.map +1 -1
  194. package/dist/js/components/src/components/Slider/Slider.mjs +3 -3
  195. package/dist/js/components/src/components/Slider/Slider.mjs.map +1 -1
  196. package/dist/js/components/src/components/Switch/Switch.mjs +3 -4
  197. package/dist/js/components/src/components/Switch/Switch.mjs.map +1 -1
  198. package/dist/js/components/src/components/Table/components/TableColumn/TableColumn.mjs +1 -2
  199. package/dist/js/components/src/components/Table/components/TableColumn/TableColumn.mjs.map +1 -1
  200. package/dist/js/components/src/components/Tabs/components/Tab/Tab.mjs +1 -2
  201. package/dist/js/components/src/components/Tabs/components/Tab/Tab.mjs.map +1 -1
  202. package/dist/js/components/src/components/Tabs/components/TabList/TabList.mjs +4 -4
  203. package/dist/js/components/src/components/Tabs/components/TabList/TabList.mjs.map +1 -1
  204. package/dist/js/components/src/components/Text/Text.mjs +2 -12
  205. package/dist/js/components/src/components/Text/Text.mjs.map +1 -1
  206. package/dist/js/components/src/components/TextArea/TextArea.mjs +1 -2
  207. package/dist/js/components/src/components/TextArea/TextArea.mjs.map +1 -1
  208. package/dist/js/components/src/components/TextField/TextField.mjs +1 -2
  209. package/dist/js/components/src/components/TextField/TextField.mjs.map +1 -1
  210. package/dist/js/components/src/components/TextFieldBase/TextFieldBase.mjs +4 -5
  211. package/dist/js/components/src/components/TextFieldBase/TextFieldBase.mjs.map +1 -1
  212. package/dist/js/components/src/components/TimeField/TimeField.mjs +1 -3
  213. package/dist/js/components/src/components/TimeField/TimeField.mjs.map +1 -1
  214. package/dist/js/components/src/components/Tooltip/Tooltip.mjs +4 -4
  215. package/dist/js/components/src/components/Tooltip/Tooltip.mjs.map +1 -1
  216. package/dist/js/components/src/components/TunnelEntry/TunnelEntry.mjs.map +1 -1
  217. package/dist/js/components/src/components/propTypes/index.mjs +0 -1
  218. package/dist/js/components/src/components/propTypes/index.mjs.map +1 -1
  219. package/dist/js/components/src/integrations/react-hook-form/components/Field/Field.mjs +3 -5
  220. package/dist/js/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
  221. package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs +32 -36
  222. package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
  223. package/dist/js/components/src/lib/componentFactory/flowComponent.mjs +28 -1
  224. package/dist/js/components/src/lib/componentFactory/flowComponent.mjs.map +1 -1
  225. package/dist/js/components/src/lib/hooks/useProps.mjs +28 -19
  226. package/dist/js/components/src/lib/hooks/useProps.mjs.map +1 -1
  227. package/dist/js/components/src/lib/propsContext/components/ClearPropsContext.mjs +21 -0
  228. package/dist/js/components/src/lib/propsContext/components/ClearPropsContext.mjs.map +1 -0
  229. package/dist/js/components/src/lib/propsContext/components/ComponentPropsContextProvider.mjs +13 -0
  230. package/dist/js/components/src/lib/propsContext/components/ComponentPropsContextProvider.mjs.map +1 -0
  231. package/dist/js/components/src/lib/propsContext/components/PropsContextProvider.mjs +33 -0
  232. package/dist/js/components/src/lib/propsContext/components/PropsContextProvider.mjs.map +1 -0
  233. package/dist/js/components/src/lib/propsContext/dynamicProps/dynamic.mjs +3 -1
  234. package/dist/js/components/src/lib/propsContext/dynamicProps/dynamic.mjs.map +1 -1
  235. package/dist/js/components/src/lib/propsContext/dynamicProps/lib.mjs +10 -0
  236. package/dist/js/components/src/lib/propsContext/dynamicProps/lib.mjs.map +1 -0
  237. package/dist/js/components/src/lib/propsContext/dynamicProps/resolveDynamicProps.mjs +3 -2
  238. package/dist/js/components/src/lib/propsContext/dynamicProps/resolveDynamicProps.mjs.map +1 -1
  239. package/dist/js/components/src/lib/propsContext/dynamicProps/types.mjs +6 -0
  240. package/dist/js/components/src/lib/propsContext/dynamicProps/types.mjs.map +1 -0
  241. package/dist/js/components/src/lib/propsContext/inherit/PropsContextLevelProvider.mjs +17 -0
  242. package/dist/js/components/src/lib/propsContext/inherit/PropsContextLevelProvider.mjs.map +1 -0
  243. package/dist/js/components/src/lib/propsContext/inherit/lib.mjs +30 -0
  244. package/dist/js/components/src/lib/propsContext/inherit/lib.mjs.map +1 -0
  245. package/dist/js/components/src/lib/propsContext/inherit/propsContextLevel.mjs +13 -0
  246. package/dist/js/components/src/lib/propsContext/inherit/propsContextLevel.mjs.map +1 -0
  247. package/dist/js/components/src/lib/propsContext/inherit/types.mjs +6 -0
  248. package/dist/js/components/src/lib/propsContext/inherit/types.mjs.map +1 -0
  249. package/dist/js/components/src/lib/propsContext/mergePropsContext.mjs +41 -13
  250. package/dist/js/components/src/lib/propsContext/mergePropsContext.mjs.map +1 -1
  251. package/dist/js/components/src/lib/propsContext/nestedPropsContext/lib.mjs +22 -0
  252. package/dist/js/components/src/lib/propsContext/nestedPropsContext/lib.mjs.map +1 -0
  253. package/dist/js/components/src/lib/propsContext/nestedPropsContext/types.mjs +6 -0
  254. package/dist/js/components/src/lib/propsContext/nestedPropsContext/types.mjs.map +1 -0
  255. package/dist/js/components/src/lib/propsContext/propsContext.mjs +3 -2
  256. package/dist/js/components/src/lib/propsContext/propsContext.mjs.map +1 -1
  257. package/dist/js/components/src/views/ClearPropsContextView.mjs +14 -0
  258. package/dist/js/components/src/views/ClearPropsContextView.mjs.map +1 -0
  259. package/dist/js/components/src/views/ComponentPropsContextProviderView.mjs +14 -0
  260. package/dist/js/components/src/views/ComponentPropsContextProviderView.mjs.map +1 -0
  261. package/dist/js/components/src/views/ContextMenuView.mjs +18 -0
  262. package/dist/js/components/src/views/ContextMenuView.mjs.map +1 -0
  263. package/dist/js/components/src/views/DialogTriggerView.mjs +2 -1
  264. package/dist/js/components/src/views/DialogTriggerView.mjs.map +1 -1
  265. package/dist/js/components/src/views/ItemsGridListItemView.mjs +2 -1
  266. package/dist/js/components/src/views/ItemsGridListItemView.mjs.map +1 -1
  267. package/dist/js/components/src/views/ItemsGridListView.mjs +1 -0
  268. package/dist/js/components/src/views/ItemsGridListView.mjs.map +1 -1
  269. package/dist/js/components/src/views/ListEmptyViewView.mjs +1 -0
  270. package/dist/js/components/src/views/ListEmptyViewView.mjs.map +1 -1
  271. package/dist/js/components/src/views/ListItemViewContentView.mjs +2 -1
  272. package/dist/js/components/src/views/ListItemViewContentView.mjs.map +1 -1
  273. package/dist/js/components/src/views/MenuTriggerView.mjs +2 -1
  274. package/dist/js/components/src/views/MenuTriggerView.mjs.map +1 -1
  275. package/dist/js/components/src/views/OptionView.mjs +14 -0
  276. package/dist/js/components/src/views/OptionView.mjs.map +1 -0
  277. package/dist/js/components/src/views/OverlayContentView.mjs +7 -0
  278. package/dist/js/components/src/views/OverlayContentView.mjs.map +1 -1
  279. package/dist/js/components/src/views/TableBodyView.mjs +2 -1
  280. package/dist/js/components/src/views/TableBodyView.mjs.map +1 -1
  281. package/dist/js/components/src/views/TableCellView.mjs +2 -1
  282. package/dist/js/components/src/views/TableCellView.mjs.map +1 -1
  283. package/dist/js/components/src/views/TableHeaderView.mjs +2 -1
  284. package/dist/js/components/src/views/TableHeaderView.mjs.map +1 -1
  285. package/dist/js/components/src/views/TableRowView.mjs +2 -1
  286. package/dist/js/components/src/views/TableRowView.mjs.map +1 -1
  287. package/dist/js/components/src/views/TableView.mjs +2 -1
  288. package/dist/js/components/src/views/TableView.mjs.map +1 -1
  289. package/dist/js/components/src/views/TooltipTriggerView.mjs +7 -0
  290. package/dist/js/components/src/views/TooltipTriggerView.mjs.map +1 -1
  291. package/dist/js/default.mjs +11 -11
  292. package/dist/js/flr-universal.mjs +7 -6
  293. package/dist/js/flr-universal.mjs.map +1 -1
  294. package/dist/js/internal.mjs +1 -3
  295. package/dist/js/internal.mjs.map +1 -1
  296. package/dist/types/components/AccentBox/AccentBox.d.ts.map +1 -1
  297. package/dist/types/components/Accordion/Accordion.d.ts.map +1 -1
  298. package/dist/types/components/Action/Action.d.ts.map +1 -1
  299. package/dist/types/components/ActionGroup/ActionGroup.d.ts +2 -2
  300. package/dist/types/components/ActionGroup/ActionGroup.d.ts.map +1 -1
  301. package/dist/types/components/Alert/Alert.d.ts +1 -4
  302. package/dist/types/components/Alert/Alert.d.ts.map +1 -1
  303. package/dist/types/components/AlertBadge/AlertBadge.d.ts +3 -6
  304. package/dist/types/components/AlertBadge/AlertBadge.d.ts.map +1 -1
  305. package/dist/types/components/AlertIcon/AlertIcon.d.ts +1 -4
  306. package/dist/types/components/AlertIcon/AlertIcon.d.ts.map +1 -1
  307. package/dist/types/components/Align/Align.d.ts +3 -6
  308. package/dist/types/components/Align/Align.d.ts.map +1 -1
  309. package/dist/types/components/Avatar/Avatar.d.ts +1 -4
  310. package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
  311. package/dist/types/components/Badge/Badge.d.ts +3 -6
  312. package/dist/types/components/Badge/Badge.d.ts.map +1 -1
  313. package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +1 -4
  314. package/dist/types/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  315. package/dist/types/components/Button/Button.d.ts +3 -6
  316. package/dist/types/components/Button/Button.d.ts.map +1 -1
  317. package/dist/types/components/Checkbox/Checkbox.d.ts +1 -4
  318. package/dist/types/components/Checkbox/Checkbox.d.ts.map +1 -1
  319. package/dist/types/components/CheckboxButton/CheckboxButton.d.ts +2 -6
  320. package/dist/types/components/CheckboxButton/CheckboxButton.d.ts.map +1 -1
  321. package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts +1 -4
  322. package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
  323. package/dist/types/components/ClearPropsContext/ClearPropsContext.d.ts +1 -4
  324. package/dist/types/components/ClearPropsContext/ClearPropsContext.d.ts.map +1 -1
  325. package/dist/types/components/ClearPropsContext/index.d.ts +2 -3
  326. package/dist/types/components/ClearPropsContext/index.d.ts.map +1 -1
  327. package/dist/types/components/ClearPropsContext/view.d.ts +8 -0
  328. package/dist/types/components/ClearPropsContext/view.d.ts.map +1 -0
  329. package/dist/types/components/ColumnLayout/ColumnLayout.d.ts +3 -6
  330. package/dist/types/components/ColumnLayout/ColumnLayout.d.ts.map +1 -1
  331. package/dist/types/components/ComboBox/ComboBox.d.ts +1 -4
  332. package/dist/types/components/ComboBox/ComboBox.d.ts.map +1 -1
  333. package/dist/types/components/ComponentPropsContextProvider/ComponentPropsContextProvider.d.ts +2 -0
  334. package/dist/types/components/ComponentPropsContextProvider/ComponentPropsContextProvider.d.ts.map +1 -0
  335. package/dist/types/components/ComponentPropsContextProvider/index.d.ts +3 -0
  336. package/dist/types/components/ComponentPropsContextProvider/index.d.ts.map +1 -0
  337. package/dist/types/components/ComponentPropsContextProvider/view.d.ts +8 -0
  338. package/dist/types/components/ComponentPropsContextProvider/view.d.ts.map +1 -0
  339. package/dist/types/components/Content/Content.d.ts +3 -6
  340. package/dist/types/components/Content/Content.d.ts.map +1 -1
  341. package/dist/types/components/ContextMenu/ContextMenu.d.ts +1 -4
  342. package/dist/types/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  343. package/dist/types/components/ContextMenu/components/ContextMenuTrigger/ContextMenuTrigger.d.ts.map +1 -1
  344. package/dist/types/components/ContextualHelp/ContextualHelp.d.ts +2 -6
  345. package/dist/types/components/ContextualHelp/ContextualHelp.d.ts.map +1 -1
  346. package/dist/types/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.d.ts.map +1 -1
  347. package/dist/types/components/CopyButton/CopyButton.d.ts +1 -4
  348. package/dist/types/components/CopyButton/CopyButton.d.ts.map +1 -1
  349. package/dist/types/components/CountryOptions/CountryOptions.d.ts +2 -3
  350. package/dist/types/components/CountryOptions/CountryOptions.d.ts.map +1 -1
  351. package/dist/types/components/CountryOptions/index.d.ts +0 -1
  352. package/dist/types/components/CountryOptions/index.d.ts.map +1 -1
  353. package/dist/types/components/DatePicker/DatePicker.d.ts +3 -6
  354. package/dist/types/components/DatePicker/DatePicker.d.ts.map +1 -1
  355. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +3 -6
  356. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  357. package/dist/types/components/FieldDescription/FieldDescription.d.ts +2 -6
  358. package/dist/types/components/FieldDescription/FieldDescription.d.ts.map +1 -1
  359. package/dist/types/components/FieldError/FieldError.d.ts +3 -6
  360. package/dist/types/components/FieldError/FieldError.d.ts.map +1 -1
  361. package/dist/types/components/FileCard/FileCard.d.ts +1 -2
  362. package/dist/types/components/FileCard/FileCard.d.ts.map +1 -1
  363. package/dist/types/components/FileCardList/FileCardList.d.ts +2 -6
  364. package/dist/types/components/FileCardList/FileCardList.d.ts.map +1 -1
  365. package/dist/types/components/FileDropZone/FileDropZone.d.ts.map +1 -1
  366. package/dist/types/components/FileField/FileField.d.ts +1 -4
  367. package/dist/types/components/FileField/FileField.d.ts.map +1 -1
  368. package/dist/types/components/HeaderNavigation/HeaderNavigation.d.ts +1 -4
  369. package/dist/types/components/HeaderNavigation/HeaderNavigation.d.ts.map +1 -1
  370. package/dist/types/components/Heading/Heading.d.ts +2 -6
  371. package/dist/types/components/Heading/Heading.d.ts.map +1 -1
  372. package/dist/types/components/Icon/Icon.d.ts +1 -4
  373. package/dist/types/components/Icon/Icon.d.ts.map +1 -1
  374. package/dist/types/components/IllustratedMessage/IllustratedMessage.d.ts +1 -4
  375. package/dist/types/components/IllustratedMessage/IllustratedMessage.d.ts.map +1 -1
  376. package/dist/types/components/Image/Image.d.ts +1 -4
  377. package/dist/types/components/Image/Image.d.ts.map +1 -1
  378. package/dist/types/components/Initials/Initials.d.ts +1 -4
  379. package/dist/types/components/Initials/Initials.d.ts.map +1 -1
  380. package/dist/types/components/InlineCode/InlineCode.d.ts +1 -4
  381. package/dist/types/components/InlineCode/InlineCode.d.ts.map +1 -1
  382. package/dist/types/components/Label/Label.d.ts +1 -4
  383. package/dist/types/components/Label/Label.d.ts.map +1 -1
  384. package/dist/types/components/LabeledValue/LabeledValue.d.ts +1 -4
  385. package/dist/types/components/LabeledValue/LabeledValue.d.ts.map +1 -1
  386. package/dist/types/components/LayoutCard/LayoutCard.d.ts +3 -6
  387. package/dist/types/components/LayoutCard/LayoutCard.d.ts.map +1 -1
  388. package/dist/types/components/Link/Link.d.ts +1 -4
  389. package/dist/types/components/Link/Link.d.ts.map +1 -1
  390. package/dist/types/components/List/components/Header/components/Filters/CombinedFilterMenu.d.ts.map +1 -1
  391. package/dist/types/components/List/components/Header/components/Filters/FilterMenu.d.ts.map +1 -1
  392. package/dist/types/components/List/components/Header/components/Settings/SettingsMenu.d.ts.map +1 -1
  393. package/dist/types/components/List/components/Header/components/Settings/ViewModeMenu.d.ts.map +1 -1
  394. package/dist/types/components/List/components/Items/components/Item/components/AccordionButton.d.ts.map +1 -1
  395. package/dist/types/components/List/components/Items/components/Item/hooks/useGridItemProps.d.ts +3 -3
  396. package/dist/types/components/List/components/Items/components/Item/hooks/useGridItemProps.d.ts.map +1 -1
  397. package/dist/types/components/List/components/ListItemView/ListItemView.d.ts.map +1 -1
  398. package/dist/types/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.d.ts.map +1 -1
  399. package/dist/types/components/List/stories/ListItem.stories.d.ts +1 -0
  400. package/dist/types/components/List/stories/ListItem.stories.d.ts.map +1 -1
  401. package/dist/types/components/Message/Message.d.ts +3 -6
  402. package/dist/types/components/Message/Message.d.ts.map +1 -1
  403. package/dist/types/components/MessageThread/MessageThread.d.ts +5 -8
  404. package/dist/types/components/MessageThread/MessageThread.d.ts.map +1 -1
  405. package/dist/types/components/Modal/Modal.d.ts +2 -2
  406. package/dist/types/components/Modal/Modal.d.ts.map +1 -1
  407. package/dist/types/components/Navigation/Navigation.d.ts +2 -2
  408. package/dist/types/components/Navigation/Navigation.d.ts.map +1 -1
  409. package/dist/types/components/Navigation/components/NavigationGroup/NavigationGroup.d.ts +2 -2
  410. package/dist/types/components/Navigation/components/NavigationGroup/NavigationGroup.d.ts.map +1 -1
  411. package/dist/types/components/Notification/Notification.d.ts +1 -4
  412. package/dist/types/components/Notification/Notification.d.ts.map +1 -1
  413. package/dist/types/components/NumberField/NumberField.d.ts +1 -4
  414. package/dist/types/components/NumberField/NumberField.d.ts.map +1 -1
  415. package/dist/types/components/Overlay/Overlay.d.ts.map +1 -1
  416. package/dist/types/components/OverlayTrigger/OverlayTrigger.d.ts.map +1 -1
  417. package/dist/types/components/OverlayTrigger/components/MenuTrigger/MenuTrigger.d.ts.map +1 -1
  418. package/dist/types/components/PasswordCreationField/PasswordCreationField.d.ts +3 -6
  419. package/dist/types/components/PasswordCreationField/PasswordCreationField.d.ts.map +1 -1
  420. package/dist/types/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.d.ts +1 -2
  421. package/dist/types/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.d.ts.map +1 -1
  422. package/dist/types/components/Popover/Popover.d.ts.map +1 -1
  423. package/dist/types/components/Popover/components/PopoverTrigger/PopoverTrigger.d.ts.map +1 -1
  424. package/dist/types/components/ProgressBar/ProgressBar.d.ts +3 -6
  425. package/dist/types/components/ProgressBar/ProgressBar.d.ts.map +1 -1
  426. package/dist/types/components/RadioGroup/RadioGroup.d.ts +2 -2
  427. package/dist/types/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  428. package/dist/types/components/RadioGroup/components/Radio/Radio.d.ts +3 -6
  429. package/dist/types/components/RadioGroup/components/Radio/Radio.d.ts.map +1 -1
  430. package/dist/types/components/RadioGroup/components/RadioButton/RadioButton.d.ts +2 -6
  431. package/dist/types/components/RadioGroup/components/RadioButton/RadioButton.d.ts.map +1 -1
  432. package/dist/types/components/SearchField/SearchField.d.ts +3 -6
  433. package/dist/types/components/SearchField/SearchField.d.ts.map +1 -1
  434. package/dist/types/components/Section/Section.d.ts +2 -2
  435. package/dist/types/components/Section/Section.d.ts.map +1 -1
  436. package/dist/types/components/Section/components/SectionHeader/SectionHeader.d.ts.map +1 -1
  437. package/dist/types/components/Section/stories/Default.stories.d.ts.map +1 -1
  438. package/dist/types/components/SegmentedControl/SegmentedControl.d.ts +2 -2
  439. package/dist/types/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  440. package/dist/types/components/SegmentedControl/components/Segment/Segment.d.ts +3 -6
  441. package/dist/types/components/SegmentedControl/components/Segment/Segment.d.ts.map +1 -1
  442. package/dist/types/components/Select/Select.d.ts +1 -4
  443. package/dist/types/components/Select/Select.d.ts.map +1 -1
  444. package/dist/types/components/Slider/Slider.d.ts +3 -6
  445. package/dist/types/components/Slider/Slider.d.ts.map +1 -1
  446. package/dist/types/components/Switch/Switch.d.ts +3 -6
  447. package/dist/types/components/Switch/Switch.d.ts.map +1 -1
  448. package/dist/types/components/Tabs/components/Tab/Tab.d.ts +1 -4
  449. package/dist/types/components/Tabs/components/Tab/Tab.d.ts.map +1 -1
  450. package/dist/types/components/Text/Text.d.ts +1 -4
  451. package/dist/types/components/Text/Text.d.ts.map +1 -1
  452. package/dist/types/components/TextArea/TextArea.d.ts +1 -4
  453. package/dist/types/components/TextArea/TextArea.d.ts.map +1 -1
  454. package/dist/types/components/TextField/TextField.d.ts +1 -4
  455. package/dist/types/components/TextField/TextField.d.ts.map +1 -1
  456. package/dist/types/components/TextFieldBase/TextFieldBase.d.ts.map +1 -1
  457. package/dist/types/components/TimeField/TimeField.d.ts +3 -6
  458. package/dist/types/components/TimeField/TimeField.d.ts.map +1 -1
  459. package/dist/types/components/Tooltip/Tooltip.d.ts.map +1 -1
  460. package/dist/types/components/TunnelEntry/TunnelEntry.d.ts +1 -4
  461. package/dist/types/components/TunnelEntry/TunnelEntry.d.ts.map +1 -1
  462. package/dist/types/components/propTypes/index.d.ts +1 -2
  463. package/dist/types/components/propTypes/index.d.ts.map +1 -1
  464. package/dist/types/components/public.d.ts +3 -1
  465. package/dist/types/components/public.d.ts.map +1 -1
  466. package/dist/types/index/flr-universal.d.ts +1 -1
  467. package/dist/types/index/flr-universal.d.ts.map +1 -1
  468. package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts.map +1 -1
  469. package/dist/types/lib/componentFactory/flowComponent.d.ts +6 -1
  470. package/dist/types/lib/componentFactory/flowComponent.d.ts.map +1 -1
  471. package/dist/types/lib/hooks/useProps.d.ts.map +1 -1
  472. package/dist/types/lib/propsContext/components/ClearPropsContext.d.ts +6 -0
  473. package/dist/types/lib/propsContext/components/ClearPropsContext.d.ts.map +1 -0
  474. package/dist/types/lib/propsContext/components/ComponentPropsContextProvider.d.ts +13 -0
  475. package/dist/types/lib/propsContext/components/ComponentPropsContextProvider.d.ts.map +1 -0
  476. package/dist/types/lib/propsContext/{PropsContextProvider.d.ts → components/PropsContextProvider.d.ts} +4 -2
  477. package/dist/types/lib/propsContext/components/PropsContextProvider.d.ts.map +1 -0
  478. package/dist/types/lib/propsContext/dynamicProps/dynamic.d.ts +2 -2
  479. package/dist/types/lib/propsContext/dynamicProps/dynamic.d.ts.map +1 -1
  480. package/dist/types/lib/propsContext/dynamicProps/{isDynamicProp.d.ts → lib.d.ts} +1 -1
  481. package/dist/types/lib/propsContext/dynamicProps/lib.d.ts.map +1 -0
  482. package/dist/types/lib/propsContext/dynamicProps/resolveDynamicProps.d.ts.map +1 -1
  483. package/dist/types/lib/propsContext/dynamicProps/types.d.ts +3 -1
  484. package/dist/types/lib/propsContext/dynamicProps/types.d.ts.map +1 -1
  485. package/dist/types/lib/propsContext/index.d.ts +1 -2
  486. package/dist/types/lib/propsContext/index.d.ts.map +1 -1
  487. package/dist/types/lib/propsContext/inherit/PropsContextLevelProvider.d.ts +7 -0
  488. package/dist/types/lib/propsContext/inherit/PropsContextLevelProvider.d.ts.map +1 -0
  489. package/dist/types/lib/propsContext/inherit/lib.d.ts +6 -0
  490. package/dist/types/lib/propsContext/inherit/lib.d.ts.map +1 -0
  491. package/dist/types/lib/propsContext/inherit/propsContextLevel.d.ts +4 -0
  492. package/dist/types/lib/propsContext/inherit/propsContextLevel.d.ts.map +1 -0
  493. package/dist/types/lib/propsContext/inherit/types.d.ts +6 -0
  494. package/dist/types/lib/propsContext/inherit/types.d.ts.map +1 -0
  495. package/dist/types/lib/propsContext/mergePropsContext.d.ts +1 -1
  496. package/dist/types/lib/propsContext/mergePropsContext.d.ts.map +1 -1
  497. package/dist/types/lib/propsContext/nestedPropsContext/lib.d.ts +7 -0
  498. package/dist/types/lib/propsContext/nestedPropsContext/lib.d.ts.map +1 -0
  499. package/dist/types/lib/propsContext/nestedPropsContext/types.d.ts +3 -0
  500. package/dist/types/lib/propsContext/nestedPropsContext/types.d.ts.map +1 -0
  501. package/dist/types/lib/propsContext/propsContext.d.ts +6 -160
  502. package/dist/types/lib/propsContext/propsContext.d.ts.map +1 -1
  503. package/dist/types/lib/propsContext/types.d.ts +3 -1
  504. package/dist/types/lib/propsContext/types.d.ts.map +1 -1
  505. package/dist/types/lib/tokens/getCategoricalColorByIndex.d.ts +1 -1
  506. package/dist/types/views/ClearPropsContextView.d.ts +5 -0
  507. package/dist/types/views/ClearPropsContextView.d.ts.map +1 -0
  508. package/dist/types/views/ComponentPropsContextProviderView.d.ts +5 -0
  509. package/dist/types/views/ComponentPropsContextProviderView.d.ts.map +1 -0
  510. package/package.json +5 -5
  511. package/dist/js/components/src/components/ClearPropsContext/ClearPropsContext.mjs +0 -13
  512. package/dist/js/components/src/components/ClearPropsContext/ClearPropsContext.mjs.map +0 -1
  513. package/dist/js/components/src/components/ClearPropsContext/components/ClearPropsContextContent.mjs +0 -12
  514. package/dist/js/components/src/components/ClearPropsContext/components/ClearPropsContextContent.mjs.map +0 -1
  515. package/dist/js/components/src/lib/propsContext/PropsContextProvider.mjs +0 -32
  516. package/dist/js/components/src/lib/propsContext/PropsContextProvider.mjs.map +0 -1
  517. package/dist/js/components/src/lib/propsContext/dynamicProps/isDynamicProp.mjs +0 -8
  518. package/dist/js/components/src/lib/propsContext/dynamicProps/isDynamicProp.mjs.map +0 -1
  519. package/dist/js/components/src/lib/propsContext/nestedPropsContext/isPropsWithChildren.mjs +0 -8
  520. package/dist/js/components/src/lib/propsContext/nestedPropsContext/isPropsWithChildren.mjs.map +0 -1
  521. package/dist/js/components/src/lib/propsContext/nestedPropsContext/pickPropsContext.mjs +0 -9
  522. package/dist/js/components/src/lib/propsContext/nestedPropsContext/pickPropsContext.mjs.map +0 -1
  523. package/dist/js/components/src/lib/propsContext/nestedPropsContext/wrapChildrenWithNestedPropsContext.mjs +0 -28
  524. package/dist/js/components/src/lib/propsContext/nestedPropsContext/wrapChildrenWithNestedPropsContext.mjs.map +0 -1
  525. package/dist/js/components/src/views/ClearPropsContextContentView.mjs +0 -14
  526. package/dist/js/components/src/views/ClearPropsContextContentView.mjs.map +0 -1
  527. package/dist/types/components/ClearPropsContext/ClearPropsContext.test.d.ts +0 -2
  528. package/dist/types/components/ClearPropsContext/ClearPropsContext.test.d.ts.map +0 -1
  529. package/dist/types/components/ClearPropsContext/components/ClearPropsContextContent.d.ts +0 -6
  530. package/dist/types/components/ClearPropsContext/components/ClearPropsContextContent.d.ts.map +0 -1
  531. package/dist/types/components/ClearPropsContext/components/index.d.ts +0 -3
  532. package/dist/types/components/ClearPropsContext/components/index.d.ts.map +0 -1
  533. package/dist/types/components/ClearPropsContext/components/view.d.ts +0 -8
  534. package/dist/types/components/ClearPropsContext/components/view.d.ts.map +0 -1
  535. package/dist/types/components/CountryOptions/view.d.ts +0 -8
  536. package/dist/types/components/CountryOptions/view.d.ts.map +0 -1
  537. package/dist/types/lib/propsContext/PropsContextProvider.d.ts.map +0 -1
  538. package/dist/types/lib/propsContext/dynamicProps/isDynamicProp.d.ts.map +0 -1
  539. package/dist/types/lib/propsContext/nestedPropsContext/isPropsWithChildren.d.ts +0 -3
  540. package/dist/types/lib/propsContext/nestedPropsContext/isPropsWithChildren.d.ts.map +0 -1
  541. package/dist/types/lib/propsContext/nestedPropsContext/pickPropsContext.d.ts +0 -4
  542. package/dist/types/lib/propsContext/nestedPropsContext/pickPropsContext.d.ts.map +0 -1
  543. package/dist/types/lib/propsContext/nestedPropsContext/pickPropsContext.test.d.ts +0 -2
  544. package/dist/types/lib/propsContext/nestedPropsContext/pickPropsContext.test.d.ts.map +0 -1
  545. package/dist/types/lib/propsContext/nestedPropsContext/wrapChildrenWithNestedPropsContext.d.ts +0 -6
  546. package/dist/types/lib/propsContext/nestedPropsContext/wrapChildrenWithNestedPropsContext.d.ts.map +0 -1
  547. package/dist/types/views/ClearPropsContextContentView.d.ts +0 -5
  548. package/dist/types/views/ClearPropsContextContentView.d.ts.map +0 -1
  549. package/dist/types/views/CountryOptionsView.d.ts +0 -5
  550. package/dist/types/views/CountryOptionsView.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Text.mjs","sources":["../../../../../../src/components/Text/Text.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithElementType } from \"@/lib/types/props\";\nimport invariant from \"invariant\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { EmulatedBoldText } from \"@/components/EmulatedBoldText\";\nimport { Wrap } from \"@/components/Wrap\";\nimport clsx from \"clsx\";\nimport styles from \"./Text.module.scss\";\nimport ClearPropsContext from \"@/components/ClearPropsContext/ClearPropsContext\";\n\nexport interface TextProps\n extends PropsWithChildren,\n Omit<Aria.TextProps, \"children\" | \"elementType\">,\n PropsWithElementType<\"span\" | \"div\" | \"p\">,\n FlowComponentProps {\n /* Whether the elements width should match the width it would have with mold text. */\n emulateBoldWidth?: boolean;\n /* The color of the text. */\n color?: \"light\" | \"dark\";\n /* The alignment of the text. @default \"start\" */\n align?: \"start\" | \"end\" | \"center\";\n /* The text-wrap property of the text. @default undefined */\n wrap?: \"wrap\" | \"balance\" | \"pretty\";\n /* The white-space property of the text. @default undefined */\n whiteSpace?: React.CSSProperties[\"whiteSpace\"];\n /* The word-break property of the text. @default undefined */\n wordBreak?: React.CSSProperties[\"wordBreak\"];\n}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const Text = flowComponent(\"Text\", (props) => {\n const {\n children,\n className,\n elementType = \"span\",\n emulateBoldWidth,\n ref,\n color,\n align = \"start\",\n wrap,\n style: styleFromProps,\n whiteSpace,\n wordBreak,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.text,\n color && styles[color],\n align && styles[`align-${align}`],\n wrap && styles[`wrap-${wrap}`],\n className,\n );\n\n const textProps = { ...rest, className: rootClassName };\n\n const propsContext: PropsContext = {\n Link: {\n inline: true,\n },\n Icon: { className: styles.icon },\n };\n\n const style = { whiteSpace, wordBreak, ...styleFromProps };\n\n const childrenElement = (\n <PropsContextProvider props={propsContext}>\n <Wrap if={emulateBoldWidth}>\n <EmulatedBoldText>{children}</EmulatedBoldText>\n </Wrap>\n </PropsContextProvider>\n );\n\n if (!props.slot) {\n const Element = elementType;\n return (\n <Element style={style} {...textProps} ref={ref}>\n {childrenElement}\n </Element>\n );\n }\n\n invariant(\n typeof elementType === \"string\",\n \"'elementType' in Text component must be of type string\",\n );\n\n return (\n <ClearPropsContext>\n <Aria.Text\n style={style}\n {...textProps}\n elementType={elementType}\n ref={ref}\n >\n {childrenElement}\n </Aria.Text>\n </ClearPropsContext>\n );\n});\n\nexport default Text;\n"],"names":[],"mappings":";;;;;;;;;;;;;AAsCO,MAAM,IAAO,GAAA,aAAA,CAAc,MAAQ,EAAA,CAAC,KAAU,KAAA;AACnD,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAc,GAAA,MAAA;AAAA,IACd,gBAAA;AAAA,IACA,GAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAQ,GAAA,OAAA;AAAA,IACR,IAAA;AAAA,IACA,KAAO,EAAA,cAAA;AAAA,IACP,UAAA;AAAA,IACA,SAAA;AAAA,IACA,GAAG;AAAA,GACD,GAAA,KAAA;AAEJ,EAAA,MAAM,aAAgB,GAAA,IAAA;AAAA,IACpB,MAAO,CAAA,IAAA;AAAA,IACP,KAAA,IAAS,OAAO,KAAK,CAAA;AAAA,IACrB,KAAS,IAAA,MAAA,CAAO,CAAS,MAAA,EAAA,KAAK,CAAE,CAAA,CAAA;AAAA,IAChC,IAAQ,IAAA,MAAA,CAAO,CAAQ,KAAA,EAAA,IAAI,CAAE,CAAA,CAAA;AAAA,IAC7B;AAAA,GACF;AAEA,EAAA,MAAM,SAAY,GAAA,EAAE,GAAG,IAAA,EAAM,WAAW,aAAc,EAAA;AAEtD,EAAA,MAAM,YAA6B,GAAA;AAAA,IACjC,IAAM,EAAA;AAAA,MACJ,MAAQ,EAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,EAAE,SAAW,EAAA,MAAA,CAAO,IAAK;AAAA,GACjC;AAEA,EAAA,MAAM,KAAQ,GAAA,EAAE,UAAY,EAAA,SAAA,EAAW,GAAG,cAAe,EAAA;AAEzD,EAAA,MAAM,eACJ,mBAAA,GAAA,CAAC,oBAAqB,EAAA,EAAA,KAAA,EAAO,YAC3B,EAAA,QAAA,kBAAA,GAAA,CAAC,IAAK,EAAA,EAAA,EAAA,EAAI,gBACR,EAAA,QAAA,kBAAA,GAAA,CAAC,gBAAkB,EAAA,EAAA,QAAA,EAAS,GAC9B,CACF,EAAA,CAAA;AAGF,EAAI,IAAA,CAAC,MAAM,IAAM,EAAA;AACf,IAAA,MAAM,OAAU,GAAA,WAAA;AAChB,IAAA,2BACG,OAAQ,EAAA,EAAA,KAAA,EAAe,GAAG,SAAA,EAAW,KACnC,QACH,EAAA,eAAA,EAAA,CAAA;AAAA;AAIJ,EAAA,SAAA;AAAA,IACE,OAAO,WAAgB,KAAA,QAAA;AAAA,IACvB;AAAA,GACF;AAEA,EAAA,2BACG,iBACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,IAAK,CAAA,IAAA;AAAA,IAAL;AAAA,MACC,KAAA;AAAA,MACC,GAAG,SAAA;AAAA,MACJ,WAAA;AAAA,MACA,GAAA;AAAA,MAEC,QAAA,EAAA;AAAA;AAAA,GAEL,EAAA,CAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"Text.mjs","sources":["../../../../../../src/components/Text/Text.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithElementType } from \"@/lib/types/props\";\nimport invariant from \"invariant\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { EmulatedBoldText } from \"@/components/EmulatedBoldText\";\nimport { Wrap } from \"@/components/Wrap\";\nimport clsx from \"clsx\";\nimport styles from \"./Text.module.scss\";\n\nexport interface TextProps\n extends PropsWithChildren,\n Omit<Aria.TextProps, \"children\" | \"elementType\">,\n PropsWithElementType<\"span\" | \"div\" | \"p\">,\n FlowComponentProps {\n /* Whether the elements width should match the width it would have with mold text. */\n emulateBoldWidth?: boolean;\n /* The color of the text. */\n color?: \"light\" | \"dark\";\n /* The alignment of the text. @default \"start\" */\n align?: \"start\" | \"end\" | \"center\";\n /* The text-wrap property of the text. @default undefined */\n wrap?: \"wrap\" | \"balance\" | \"pretty\";\n /* The white-space property of the text. @default undefined */\n whiteSpace?: React.CSSProperties[\"whiteSpace\"];\n /* The word-break property of the text. @default undefined */\n wordBreak?: React.CSSProperties[\"wordBreak\"];\n}\n\n/** @flr-generate all */\nexport const Text = flowComponent(\"Text\", (props) => {\n const {\n children,\n className,\n elementType = \"span\",\n emulateBoldWidth,\n ref,\n color,\n align = \"start\",\n wrap,\n style: styleFromProps,\n whiteSpace,\n wordBreak,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.text,\n color && styles[color],\n align && styles[`align-${align}`],\n wrap && styles[`wrap-${wrap}`],\n className,\n );\n\n const textProps = { ...rest, className: rootClassName };\n\n const propsContext: PropsContext = {\n Link: {\n inline: true,\n },\n Icon: { className: styles.icon },\n };\n\n const style = { whiteSpace, wordBreak, ...styleFromProps };\n\n const childrenElement = (\n <PropsContextProvider props={propsContext}>\n <Wrap if={emulateBoldWidth}>\n <EmulatedBoldText>{children}</EmulatedBoldText>\n </Wrap>\n </PropsContextProvider>\n );\n\n if (!props.slot) {\n const Element = elementType;\n return (\n <Element style={style} {...textProps} ref={ref}>\n {childrenElement}\n </Element>\n );\n }\n\n invariant(\n typeof elementType === \"string\",\n \"'elementType' in Text component must be of type string\",\n );\n\n return (\n <Aria.Text style={style} {...textProps} elementType={elementType} ref={ref}>\n {childrenElement}\n </Aria.Text>\n );\n});\n\nexport default Text;\n"],"names":[],"mappings":";;;;;;;;;;;;AAkCO,MAAM,IAAO,GAAA,aAAA,CAAc,MAAQ,EAAA,CAAC,KAAU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OAAQ,EAAA,EAAA,KAAA,EAAe,GAAG,SAAA,EAAW,KACnC,QACH,EAAA,eAAA,EAAA,CAAA;AAAA;AAIJ,EAAA,SAAA;AAAA,IACE,OAAO,WAAgB,KAAA,QAAA;AAAA,IACvB;AAAA,GACF;AAEA,EACE,uBAAA,GAAA,CAAC,KAAK,IAAL,EAAA,EAAU,OAAe,GAAG,SAAA,EAAW,WAA0B,EAAA,GAAA,EAC/D,QACH,EAAA,eAAA,EAAA,CAAA;AAEJ,CAAC;;;;"}
@@ -4,7 +4,6 @@ import { jsx } from 'react/jsx-runtime';
4
4
  import * as Aria from 'react-aria-components';
5
5
  import { TextFieldBase } from '../TextFieldBase/TextFieldBase.mjs';
6
6
  import styles from './TextArea.module.scss.mjs';
7
- import { ClearPropsContext } from '../ClearPropsContext/ClearPropsContext.mjs';
8
7
  import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
9
8
  import { useObjectRef } from '@react-aria/utils';
10
9
  import { ReactAriaControlledValueFix } from '../../lib/react/ReactAriaControlledValueFix.mjs';
@@ -50,7 +49,7 @@ const TextArea = flowComponent("TextArea", (props) => {
50
49
  )
51
50
  }
52
51
  );
53
- return /* @__PURE__ */ jsx(ClearPropsContext, { children: /* @__PURE__ */ jsx(TextFieldBase, { ...rest, input, children }) });
52
+ return /* @__PURE__ */ jsx(TextFieldBase, { ...rest, input, children });
54
53
  });
55
54
 
56
55
  export { TextArea, TextArea as default };
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.mjs","sources":["../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { TextFieldBaseProps } from \"@/components/TextFieldBase\";\nimport { TextFieldBase } from \"@/components/TextFieldBase\";\nimport styles from \"./TextArea.module.scss\";\nimport ClearPropsContext from \"@/components/ClearPropsContext/ClearPropsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { ReactAriaControlledValueFix } from \"@/lib/react/ReactAriaControlledValueFix\";\n\nexport interface TextAreaProps\n extends Omit<TextFieldBaseProps, \"input\" | \"ref\">,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n ...rest\n } = props;\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 updateHeight = () => {\n if (localRef.current && rows !== autoResizeMaxRows) {\n // https://stackoverflow.com/a/60795884\n localRef.current.style.height = \"0px\";\n const scrollHeight = localRef.current.scrollHeight;\n localRef.current.style.height = scrollHeight + \"px\";\n }\n };\n\n const input = (\n <ReactAriaControlledValueFix\n inputContext={Aria.TextAreaContext}\n props={props}\n >\n <Aria.TextArea\n rows={rows}\n placeholder={placeholder}\n className={styles.textArea}\n ref={localRef}\n onChange={updateHeight}\n style={{\n minHeight: getHeight(rows),\n maxHeight: getHeight(autoResizeMaxRows),\n }}\n />\n </ReactAriaControlledValueFix>\n );\n\n return (\n <ClearPropsContext>\n <TextFieldBase {...rest} input={input}>\n {children}\n </TextFieldBase>\n </ClearPropsContext>\n );\n});\n\nexport default TextArea;\n"],"names":["rows"],"mappings":";;;;;;;;;AAyBO,MAAM,QAAW,GAAA,aAAA,CAAc,UAAY,EAAA,CAAC,KAAU,KAAA;AAC3D,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,WAAA;AAAA,IACA,IAAO,GAAA,CAAA;AAAA,IACP,iBAAoB,GAAA,IAAA;AAAA,IACpB,GAAA;AAAA,IACA,GAAG;AAAA,GACD,GAAA,KAAA;AAEJ,EAAM,MAAA,QAAA,GAAW,aAAa,GAAG,CAAA;AAEjC,EAAM,MAAA,SAAA,GAAY,CAACA,KAAiB,KAAA;AAClC,IAAA,OAAO,gCAAgCA,KAAI,CAAA,wCAAA,CAAA;AAAA,GAC7C;AAEA,EAAA,MAAM,eAAe,MAAM;AACzB,IAAI,IAAA,QAAA,CAAS,OAAW,IAAA,IAAA,KAAS,iBAAmB,EAAA;AAElD,MAAS,QAAA,CAAA,OAAA,CAAQ,MAAM,MAAS,GAAA,KAAA;AAChC,MAAM,MAAA,YAAA,GAAe,SAAS,OAAQ,CAAA,YAAA;AACtC,MAAS,QAAA,CAAA,OAAA,CAAQ,KAAM,CAAA,MAAA,GAAS,YAAe,GAAA,IAAA;AAAA;AACjD,GACF;AAEA,EAAA,MAAM,KACJ,mBAAA,GAAA;AAAA,IAAC,2BAAA;AAAA,IAAA;AAAA,MACC,cAAc,IAAK,CAAA,eAAA;AAAA,MACnB,KAAA;AAAA,MAEA,QAAA,kBAAA,GAAA;AAAA,QAAC,IAAK,CAAA,QAAA;AAAA,QAAL;AAAA,UACC,IAAA;AAAA,UACA,WAAA;AAAA,UACA,WAAW,MAAO,CAAA,QAAA;AAAA,UAClB,GAAK,EAAA,QAAA;AAAA,UACL,QAAU,EAAA,YAAA;AAAA,UACV,KAAO,EAAA;AAAA,YACL,SAAA,EAAW,UAAU,IAAI,CAAA;AAAA,YACzB,SAAA,EAAW,UAAU,iBAAiB;AAAA;AACxC;AAAA;AACF;AAAA,GACF;AAGF,EACE,uBAAA,GAAA,CAAC,qBACC,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAe,GAAG,IAAM,EAAA,KAAA,EACtB,UACH,CACF,EAAA,CAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"TextArea.mjs","sources":["../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { TextFieldBaseProps } from \"@/components/TextFieldBase\";\nimport { TextFieldBase } from \"@/components/TextFieldBase\";\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 { ReactAriaControlledValueFix } from \"@/lib/react/ReactAriaControlledValueFix\";\n\nexport interface TextAreaProps\n extends Omit<TextFieldBaseProps, \"input\" | \"ref\">,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\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 ...rest\n } = props;\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 updateHeight = () => {\n if (localRef.current && rows !== autoResizeMaxRows) {\n // https://stackoverflow.com/a/60795884\n localRef.current.style.height = \"0px\";\n const scrollHeight = localRef.current.scrollHeight;\n localRef.current.style.height = scrollHeight + \"px\";\n }\n };\n\n const input = (\n <ReactAriaControlledValueFix\n inputContext={Aria.TextAreaContext}\n props={props}\n >\n <Aria.TextArea\n rows={rows}\n placeholder={placeholder}\n className={styles.textArea}\n ref={localRef}\n onChange={updateHeight}\n style={{\n minHeight: getHeight(rows),\n maxHeight: getHeight(autoResizeMaxRows),\n }}\n />\n </ReactAriaControlledValueFix>\n );\n\n return (\n <TextFieldBase {...rest} input={input}>\n {children}\n </TextFieldBase>\n );\n});\n\nexport default TextArea;\n"],"names":["rows"],"mappings":";;;;;;;;AAqBO,MAAM,QAAW,GAAA,aAAA,CAAc,UAAY,EAAA,CAAC,KAAU,KAAA;AAC3D,EAAM,MAAA;AAAA,IACJ,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4
  import * as Aria from 'react-aria-components';
5
5
  import { TextFieldBase } from '../TextFieldBase/TextFieldBase.mjs';
6
6
  import styles from './TextField.module.scss.mjs';
7
- import { ClearPropsContext } from '../ClearPropsContext/ClearPropsContext.mjs';
8
7
  import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
9
8
  import { ReactAriaControlledValueFix } from '../../lib/react/ReactAriaControlledValueFix.mjs';
10
9
 
@@ -19,7 +18,7 @@ const TextField = flowComponent("TextField", (props) => {
19
18
  ref
20
19
  }
21
20
  ) });
22
- return /* @__PURE__ */ jsx(ClearPropsContext, { children: /* @__PURE__ */ jsx(TextFieldBase, { ...rest, input, children }) });
21
+ return /* @__PURE__ */ jsx(TextFieldBase, { ...rest, input, children });
23
22
  });
24
23
 
25
24
  export { TextField, TextField as default };
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.mjs","sources":["../../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport {\n TextFieldBase,\n type TextFieldBaseProps,\n} from \"@/components/TextFieldBase\";\nimport styles from \"./TextField.module.scss\";\nimport ClearPropsContext from \"@/components/ClearPropsContext/ClearPropsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { ReactAriaControlledValueFix } from \"@/lib/react/ReactAriaControlledValueFix\";\n\nexport interface TextFieldProps\n extends Omit<TextFieldBaseProps, \"input\" | \"className\">,\n Pick<Aria.InputProps, \"placeholder\" | \"form\">,\n PropsWithClassName,\n FlowComponentProps<HTMLInputElement> {}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const TextField = flowComponent(\"TextField\", (props) => {\n const { children, placeholder, ref, form, ...rest } = props;\n\n const input = (\n <ReactAriaControlledValueFix inputContext={Aria.InputContext} props={props}>\n <Aria.Input\n form={form}\n placeholder={placeholder}\n className={styles.textField}\n ref={ref}\n />\n </ReactAriaControlledValueFix>\n );\n\n return (\n <ClearPropsContext>\n <TextFieldBase {...rest} input={input}>\n {children}\n </TextFieldBase>\n </ClearPropsContext>\n );\n});\n\nexport default TextField;\n"],"names":[],"mappings":";;;;;;;;AAsBO,MAAM,SAAY,GAAA,aAAA,CAAc,WAAa,EAAA,CAAC,KAAU,KAAA;AAC7D,EAAA,MAAM,EAAE,QAAU,EAAA,WAAA,EAAa,KAAK,IAAM,EAAA,GAAG,MAAS,GAAA,KAAA;AAEtD,EAAA,MAAM,wBACH,GAAA,CAAA,2BAAA,EAAA,EAA4B,YAAc,EAAA,IAAA,CAAK,cAAc,KAC5D,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,IAAK,CAAA,KAAA;AAAA,IAAL;AAAA,MACC,IAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAW,MAAO,CAAA,SAAA;AAAA,MAClB;AAAA;AAAA,GAEJ,EAAA,CAAA;AAGF,EACE,uBAAA,GAAA,CAAC,qBACC,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAe,GAAG,IAAM,EAAA,KAAA,EACtB,UACH,CACF,EAAA,CAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"TextField.mjs","sources":["../../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport {\n TextFieldBase,\n type TextFieldBaseProps,\n} from \"@/components/TextFieldBase\";\nimport styles from \"./TextField.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { ReactAriaControlledValueFix } from \"@/lib/react/ReactAriaControlledValueFix\";\n\nexport interface TextFieldProps\n extends Omit<TextFieldBaseProps, \"input\" | \"className\">,\n Pick<Aria.InputProps, \"placeholder\" | \"form\">,\n PropsWithClassName,\n FlowComponentProps<HTMLInputElement> {}\n\n/** @flr-generate all */\nexport const TextField = flowComponent(\"TextField\", (props) => {\n const { children, placeholder, ref, form, ...rest } = props;\n\n const input = (\n <ReactAriaControlledValueFix inputContext={Aria.InputContext} props={props}>\n <Aria.Input\n form={form}\n placeholder={placeholder}\n className={styles.textField}\n ref={ref}\n />\n </ReactAriaControlledValueFix>\n );\n\n return (\n <TextFieldBase {...rest} input={input}>\n {children}\n </TextFieldBase>\n );\n});\n\nexport default TextField;\n"],"names":[],"mappings":";;;;;;;AAkBO,MAAM,SAAY,GAAA,aAAA,CAAc,WAAa,EAAA,CAAC,KAAU,KAAA;AAC7D,EAAA,MAAM,EAAE,QAAU,EAAA,WAAA,EAAa,KAAK,IAAM,EAAA,GAAG,MAAS,GAAA,KAAA;AAEtD,EAAA,MAAM,wBACH,GAAA,CAAA,2BAAA,EAAA,EAA4B,YAAc,EAAA,IAAA,CAAK,cAAc,KAC5D,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,IAAK,CAAA,KAAA;AAAA,IAAL;AAAA,MACC,IAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAW,MAAO,CAAA,SAAA;AAAA,MAClB;AAAA;AAAA,GAEJ,EAAA,CAAA;AAGF,EAAA,uBACG,GAAA,CAAA,aAAA,EAAA,EAAe,GAAG,IAAA,EAAM,OACtB,QACH,EAAA,CAAA;AAEJ,CAAC;;;;"}
@@ -1,13 +1,12 @@
1
1
  "use client"
2
2
  /* */
3
- import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import { useState } from 'react';
5
5
  import * as Aria from 'react-aria-components';
6
6
  import formFieldStyles from '../FormField/FormField.module.scss.mjs';
7
7
  import clsx from 'clsx';
8
- import { ClearPropsContext } from '../ClearPropsContext/ClearPropsContext.mjs';
9
8
  import '../../lib/propsContext/propsContext.mjs';
10
- import { PropsContextProvider } from '../../lib/propsContext/PropsContextProvider.mjs';
9
+ import { PropsContextProvider } from '../../lib/propsContext/components/PropsContextProvider.mjs';
11
10
  import { FieldError } from '../FieldError/FieldError.mjs';
12
11
  import { FieldDescription } from '../FieldDescription/FieldDescription.mjs';
13
12
  import locales from '../../../../_virtual/_.locale.json@444629885187f8ca5450a1c8b14fb45c.mjs';
@@ -50,7 +49,7 @@ const TextFieldBase = (props) => {
50
49
  const propsWithOptionalStringValue = "value" in props ? {
51
50
  value: props.value ?? ""
52
51
  } : {};
53
- return /* @__PURE__ */ jsx(ClearPropsContext, { children: /* @__PURE__ */ jsxs(
52
+ return /* @__PURE__ */ jsxs(
54
53
  Aria.TextField,
55
54
  {
56
55
  ref,
@@ -65,7 +64,7 @@ const TextFieldBase = (props) => {
65
64
  /* @__PURE__ */ jsx(FieldError, { className: formFieldStyles.fieldError })
66
65
  ]
67
66
  }
68
- ) });
67
+ );
69
68
  };
70
69
 
71
70
  export { TextFieldBase, TextFieldBase as default };
@@ -1 +1 @@
1
- {"version":3,"file":"TextFieldBase.mjs","sources":["../../../../../../src/components/TextFieldBase/TextFieldBase.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, type ReactNode } from \"react\";\nimport { useState } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"../FormField/FormField.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport ClearPropsContext from \"@/components/ClearPropsContext/ClearPropsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { FieldError } from \"@/components/FieldError\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface TextFieldBaseProps\n extends PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<FlowComponentProps<HTMLInputElement>, \"ref\"> {\n /** The input element */\n input: ReactNode;\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n}\n\nexport const TextFieldBase: FC<TextFieldBaseProps> = (props) => {\n const { children, className, input, showCharacterCount, ref, ...rest } =\n props;\n\n const [charactersCount, setCharactersCount] = useState(\n props.value?.length ?? 0,\n );\n\n const rootClassName = clsx(styles.formField, className);\n\n const translation = useLocalizedStringFormatter(locales);\n\n const propsContext: PropsContext = {\n Label: {\n className: styles.label,\n optional: !props.isRequired,\n },\n FieldDescription: {\n className: styles.fieldDescription,\n },\n FieldError: {\n className: styles.customFieldError,\n },\n };\n\n const handleOnChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (props.onChange) {\n props.onChange(v);\n }\n };\n\n const charactersCountDescription = translation.format(\n \"textFieldBase.characters\",\n {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n },\n );\n\n /** Prevent weird reset behavior when value is 'undefined' */\n const propsWithOptionalStringValue =\n \"value\" in props\n ? {\n value: props.value ?? \"\",\n }\n : {};\n\n return (\n <ClearPropsContext>\n <Aria.TextField\n ref={ref}\n {...rest}\n className={rootClassName}\n onChange={handleOnChange}\n {...propsWithOptionalStringValue}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n {input}\n {showCharacterCount && (\n <FieldDescription className={styles.fieldDescription}>\n {charactersCountDescription}\n </FieldDescription>\n )}\n <FieldError className={styles.fieldError} />\n </Aria.TextField>\n </ClearPropsContext>\n );\n};\n\nexport default TextFieldBase;\n"],"names":["styles"],"mappings":";;;;;;;;;;;;;AAuBa,MAAA,aAAA,GAAwC,CAAC,KAAU,KAAA;AAC9D,EAAM,MAAA,EAAE,UAAU,SAAW,EAAA,KAAA,EAAO,oBAAoB,GAAK,EAAA,GAAG,MAC9D,GAAA,KAAA;AAEF,EAAM,MAAA,CAAC,eAAiB,EAAA,kBAAkB,CAAI,GAAA,QAAA;AAAA,IAC5C,KAAA,CAAM,OAAO,MAAU,IAAA;AAAA,GACzB;AAEA,EAAA,MAAM,aAAgB,GAAA,IAAA,CAAKA,eAAO,CAAA,SAAA,EAAW,SAAS,CAAA;AAEtD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AW,EAAAA,eAAA,CAAO,kBACjC,QACH,EAAA,0BAAA,EAAA,CAAA;AAAA,wBAED,GAAA,CAAA,UAAA,EAAA,EAAW,SAAW,EAAAA,eAAA,CAAO,UAAY,EAAA;AAAA;AAAA;AAAA,GAE9C,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"TextFieldBase.mjs","sources":["../../../../../../src/components/TextFieldBase/TextFieldBase.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, type ReactNode } from \"react\";\nimport { useState } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"../FormField/FormField.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { FieldError } from \"@/components/FieldError\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface TextFieldBaseProps\n extends PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<FlowComponentProps<HTMLInputElement>, \"ref\"> {\n /** The input element */\n input: ReactNode;\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n}\n\nexport const TextFieldBase: FC<TextFieldBaseProps> = (props) => {\n const { children, className, input, showCharacterCount, ref, ...rest } =\n props;\n\n const [charactersCount, setCharactersCount] = useState(\n props.value?.length ?? 0,\n );\n\n const rootClassName = clsx(styles.formField, className);\n\n const translation = useLocalizedStringFormatter(locales);\n\n const propsContext: PropsContext = {\n Label: {\n className: styles.label,\n optional: !props.isRequired,\n },\n FieldDescription: {\n className: styles.fieldDescription,\n },\n FieldError: {\n className: styles.customFieldError,\n },\n };\n\n const handleOnChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (props.onChange) {\n props.onChange(v);\n }\n };\n\n const charactersCountDescription = translation.format(\n \"textFieldBase.characters\",\n {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n },\n );\n\n /** Prevent weird reset behavior when value is 'undefined' */\n const propsWithOptionalStringValue =\n \"value\" in props\n ? {\n value: props.value ?? \"\",\n }\n : {};\n\n return (\n <Aria.TextField\n ref={ref}\n {...rest}\n className={rootClassName}\n onChange={handleOnChange}\n {...propsWithOptionalStringValue}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n {input}\n {showCharacterCount && (\n <FieldDescription className={styles.fieldDescription}>\n {charactersCountDescription}\n </FieldDescription>\n )}\n <FieldError className={styles.fieldError} />\n </Aria.TextField>\n );\n};\n\nexport default TextFieldBase;\n"],"names":["styles"],"mappings":";;;;;;;;;;;;AAsBa,MAAA,aAAA,GAAwC,CAAC,KAAU,KAAA;AAC9D,EAAM,MAAA,EAAE,UAAU,SAAW,EAAA,KAAA,EAAO,oBAAoB,GAAK,EAAA,GAAG,MAC9D,GAAA,KAAA;AAEF,EAAM,MAAA,CAAC,eAAiB,EAAA,kBAAkB,CAAI,GAAA,QAAA;AAAA,IAC5C,KAAA,CAAM,OAAO,MAAU,IAAA;AAAA,GACzB;AAEA,EAAA,MAAM,aAAgB,GAAA,IAAA,CAAKA,eAAO,CAAA,SAAA,EAAW,SAAS,CAAA;AAEtD,EAAM,MAAA,WAAA,GAAc,4BAA4B,OAAO,CAAA;AAEvD,EAAA,MAAM,YAA6B,GAAA;AAAA,IACjC,KAAO,EAAA;AAAA,MACL,WAAWA,eAAO,CAAA,KAAA;AAAA,MAClB,QAAA,EAAU,CAAC,KAAM,CAAA;AAAA,KACnB;AAAA,IACA,gBAAkB,EAAA;AAAA,MAChB,WAAWA,eAAO,CAAA;AAAA,KACpB;AAAA,IACA,UAAY,EAAA;AAAA,MACV,WAAWA,eAAO,CAAA;AAAA;AACpB,GACF;AAEA,EAAM,MAAA,cAAA,GAAiB,CAAC,CAAc,KAAA;AACpC,IAAA,IAAI,kBAAoB,EAAA;AACtB,MAAA,kBAAA,CAAmB,EAAE,MAAM,CAAA;AAAA;AAE7B,IAAA,IAAI,MAAM,QAAU,EAAA;AAClB,MAAA,KAAA,CAAM,SAAS,CAAC,CAAA;AAAA;AAClB,GACF;AAEA,EAAA,MAAM,6BAA6B,WAAY,CAAA,MAAA;AAAA,IAC7C,0BAAA;AAAA,IACA;AAAA,MACE,KAAO,EAAA,eAAA;AAAA,MACP,QAAA,EAAU,MAAM,SAAa,IAAA;AAAA;AAC/B,GACF;AAGA,EAAM,MAAA,4BAAA,GACJ,WAAW,KACP,GAAA;AAAA,IACE,KAAA,EAAO,MAAM,KAAS,IAAA;AAAA,MAExB,EAAC;AAEP,EACE,uBAAA,IAAA;AAAA,IAAC,IAAK,CAAA,SAAA;AAAA,IAAL;AAAA,MACC,GAAA;AAAA,MACC,GAAG,IAAA;AAAA,MACJ,SAAW,EAAA,aAAA;AAAA,MACX,QAAU,EAAA,cAAA;AAAA,MACT,GAAG,4BAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAC,GAAA,CAAA,oBAAA,EAAA,EAAqB,KAAO,EAAA,YAAA,EAC1B,QACH,EAAA,CAAA;AAAA,QACC,KAAA;AAAA,QACA,sCACE,GAAA,CAAA,gBAAA,EAAA,EAAiB,SAAW,EAAAA,eAAA,CAAO,kBACjC,QACH,EAAA,0BAAA,EAAA,CAAA;AAAA,wBAED,GAAA,CAAA,UAAA,EAAA,EAAW,SAAW,EAAAA,eAAA,CAAO,UAAY,EAAA;AAAA;AAAA;AAAA,GAC5C;AAEJ;;;;"}
@@ -1,12 +1,10 @@
1
1
  "use client"
2
2
  /* */
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
- import 'react';
5
4
  import * as Aria from 'react-aria-components';
6
5
  import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
7
6
  import '../../lib/propsContext/propsContext.mjs';
8
- import '../../lib/viewComponentContext/viewComponentContext.mjs';
9
- import { PropsContextProvider } from '../../lib/propsContext/PropsContextProvider.mjs';
7
+ import { PropsContextProvider } from '../../lib/propsContext/components/PropsContextProvider.mjs';
10
8
  import formFieldStyles from '../FormField/FormField.module.scss.mjs';
11
9
  import { FieldError } from '../FieldError/FieldError.mjs';
12
10
  import clsx from 'clsx';
@@ -1 +1 @@
1
- {"version":3,"file":"TimeField.mjs","sources":["../../../../../../src/components/TimeField/TimeField.tsx"],"sourcesContent":["import type { PropsWithChildren, ReactNode } from \"react\";\nimport React from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { FieldError } from \"@/components/FieldError\";\nimport clsx from \"clsx\";\nimport styles from \"./TimeField.module.scss\";\n\nexport interface TimeFieldProps<T extends Aria.TimeValue = Aria.TimeValue>\n extends PropsWithChildren<Omit<Aria.TimeFieldProps<T>, \"children\">>,\n FlowComponentProps<HTMLInputElement> {\n /** An error message to be displayed below the field */\n errorMessage?: ReactNode;\n}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const TimeField = flowComponent(\"TimeField\", (props) => {\n const { children, errorMessage, className, ref, ...rest } = props;\n\n const rootClassName = clsx(formFieldStyles.formField, className);\n\n const propsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n optional: !props.isRequired,\n isDisabled: rest.isDisabled,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n },\n FieldError: {\n className: formFieldStyles.customFieldError,\n },\n };\n\n return (\n <Aria.TimeField\n ref={ref}\n hourCycle={24}\n className={rootClassName}\n {...rest}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n <FieldError className={formFieldStyles.fieldError}>\n {errorMessage}\n </FieldError>\n <Aria.DateInput className={styles.dateInput}>\n {(segment) => <Aria.DateSegment segment={segment} />}\n </Aria.DateInput>\n </Aria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{"version":3,"file":"TimeField.mjs","sources":["../../../../../../src/components/TimeField/TimeField.tsx"],"sourcesContent":["import type { PropsWithChildren, ReactNode } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { FieldError } from \"@/components/FieldError\";\nimport clsx from \"clsx\";\nimport styles from \"./TimeField.module.scss\";\n\nexport interface TimeFieldProps<T extends Aria.TimeValue = Aria.TimeValue>\n extends PropsWithChildren<Omit<Aria.TimeFieldProps<T>, \"children\">>,\n FlowComponentProps<HTMLInputElement> {\n /** An error message to be displayed below the field */\n errorMessage?: ReactNode;\n}\n\n/** @flr-generate all */\nexport const TimeField = flowComponent(\"TimeField\", (props) => {\n const { children, errorMessage, className, ref, ...rest } = props;\n\n const rootClassName = clsx(formFieldStyles.formField, className);\n\n const propsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n optional: !props.isRequired,\n isDisabled: rest.isDisabled,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n },\n FieldError: {\n className: formFieldStyles.customFieldError,\n },\n };\n\n return (\n <Aria.TimeField\n ref={ref}\n hourCycle={24}\n className={rootClassName}\n {...rest}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n <FieldError className={formFieldStyles.fieldError}>\n {errorMessage}\n </FieldError>\n <Aria.DateInput className={styles.dateInput}>\n {(segment) => <Aria.DateSegment segment={segment} />}\n </Aria.DateInput>\n </Aria.TimeField>\n );\n});\n\nexport default TimeField;\n"],"names":[],"mappings":";;;;;;;;;;AAqBO,MAAM,SAAY,GAAA,aAAA,CAAc,WAAa,EAAA,CAAC,KAAU,KAAA;AAC7D,EAAA,MAAM,EAAE,QAAU,EAAA,YAAA,EAAc,WAAW,GAAK,EAAA,GAAG,MAAS,GAAA,KAAA;AAE5D,EAAA,MAAM,aAAgB,GAAA,IAAA,CAAK,eAAgB,CAAA,SAAA,EAAW,SAAS,CAAA;AAE/D,EAAA,MAAM,YAA6B,GAAA;AAAA,IACjC,KAAO,EAAA;AAAA,MACL,WAAW,eAAgB,CAAA,KAAA;AAAA,MAC3B,QAAA,EAAU,CAAC,KAAM,CAAA,UAAA;AAAA,MACjB,YAAY,IAAK,CAAA;AAAA,KACnB;AAAA,IACA,gBAAkB,EAAA;AAAA,MAChB,WAAW,eAAgB,CAAA;AAAA,KAC7B;AAAA,IACA,UAAY,EAAA;AAAA,MACV,WAAW,eAAgB,CAAA;AAAA;AAC7B,GACF;AAEA,EACE,uBAAA,IAAA;AAAA,IAAC,IAAK,CAAA,SAAA;AAAA,IAAL;AAAA,MACC,GAAA;AAAA,MACA,SAAW,EAAA,EAAA;AAAA,MACX,SAAW,EAAA,aAAA;AAAA,MACV,GAAG,IAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAC,GAAA,CAAA,oBAAA,EAAA,EAAqB,KAAO,EAAA,YAAA,EAC1B,QACH,EAAA,CAAA;AAAA,wBACC,GAAA,CAAA,UAAA,EAAA,EAAW,SAAW,EAAA,eAAA,CAAgB,YACpC,QACH,EAAA,YAAA,EAAA,CAAA;AAAA,wBACC,GAAA,CAAA,IAAA,CAAK,SAAL,EAAA,EAAe,WAAW,MAAO,CAAA,SAAA,EAC/B,QAAC,EAAA,CAAA,OAAA,qBAAa,GAAA,CAAA,IAAA,CAAK,WAAL,EAAA,EAAiB,SAAkB,CACpD,EAAA;AAAA;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
@@ -1,18 +1,18 @@
1
1
  "use client"
2
2
  /* */
3
- import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import * as Aria from 'react-aria-components';
5
- import 'react';
6
5
  import styles from './Tooltip.module.scss.mjs';
7
6
  import clsx from 'clsx';
7
+ import ClearPropsContextView from '../../views/ClearPropsContextView.mjs';
8
8
 
9
9
  const Tooltip = (props) => {
10
10
  const { children, className, ...rest } = props;
11
11
  const rootClassName = clsx(styles.tooltip, className);
12
- return /* @__PURE__ */ jsxs(Aria.Tooltip, { ...rest, className: rootClassName, children: [
12
+ return /* @__PURE__ */ jsx(ClearPropsContextView, { children: /* @__PURE__ */ jsxs(Aria.Tooltip, { ...rest, className: rootClassName, children: [
13
13
  /* @__PURE__ */ jsx(Aria.OverlayArrow, { className: styles.tip, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx("path", { d: "M0 0 L4 4 L8 0" }) }) }),
14
14
  children
15
- ] });
15
+ ] }) });
16
16
  };
17
17
 
18
18
  export { Tooltip, Tooltip as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.mjs","sources":["../../../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { FC, PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport styles from \"./Tooltip.module.scss\";\nimport clsx from \"clsx\";\n\nexport type TooltipProps = PropsWithChildren<\n Omit<Aria.TooltipProps, \"children\">\n>;\n\n/** @flr-generate all */\nexport const Tooltip: FC<TooltipProps> = (props) => {\n const { children, className, ...rest } = props;\n\n const rootClassName = clsx(styles.tooltip, className);\n\n return (\n <Aria.Tooltip {...rest} className={rootClassName}>\n <Aria.OverlayArrow className={styles.tip}>\n <svg viewBox=\"0 0 8 8\">\n <path d=\"M0 0 L4 4 L8 0\" />\n </svg>\n </Aria.OverlayArrow>\n {children}\n </Aria.Tooltip>\n );\n};\n\nexport default Tooltip;\n"],"names":[],"mappings":";;;;;;AAWa,MAAA,OAAA,GAA4B,CAAC,KAAU,KAAA;AAClD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAW,EAAA,GAAG,MAAS,GAAA,KAAA;AAEzC,EAAA,MAAM,aAAgB,GAAA,IAAA,CAAK,MAAO,CAAA,OAAA,EAAS,SAAS,CAAA;AAEpD,EAAA,4BACG,IAAK,CAAA,OAAA,EAAL,EAAc,GAAG,IAAA,EAAM,WAAW,aACjC,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,IAAK,CAAA,YAAA,EAAL,EAAkB,SAAA,EAAW,OAAO,GACnC,EAAA,QAAA,kBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,OAAA,EAAQ,WACX,QAAC,kBAAA,GAAA,CAAA,MAAA,EAAA,EAAK,CAAE,EAAA,gBAAA,EAAiB,GAC3B,CACF,EAAA,CAAA;AAAA,IACC;AAAA,GACH,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Tooltip.mjs","sources":["../../../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./Tooltip.module.scss\";\nimport clsx from \"clsx\";\nimport ClearPropsContextView from \"@/views/ClearPropsContextView\";\n\nexport type TooltipProps = PropsWithChildren<\n Omit<Aria.TooltipProps, \"children\">\n>;\n\n/** @flr-generate all */\nexport const Tooltip: FC<TooltipProps> = (props) => {\n const { children, className, ...rest } = props;\n\n const rootClassName = clsx(styles.tooltip, className);\n\n return (\n <ClearPropsContextView>\n <Aria.Tooltip {...rest} className={rootClassName}>\n <Aria.OverlayArrow className={styles.tip}>\n <svg viewBox=\"0 0 8 8\">\n <path d=\"M0 0 L4 4 L8 0\" />\n </svg>\n </Aria.OverlayArrow>\n {children}\n </Aria.Tooltip>\n </ClearPropsContextView>\n );\n};\n\nexport default Tooltip;\n"],"names":[],"mappings":";;;;;;AAWa,MAAA,OAAA,GAA4B,CAAC,KAAU,KAAA;AAClD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAW,EAAA,GAAG,MAAS,GAAA,KAAA;AAEzC,EAAA,MAAM,aAAgB,GAAA,IAAA,CAAK,MAAO,CAAA,OAAA,EAAS,SAAS,CAAA;AAEpD,EACE,uBAAA,GAAA,CAAC,yBACC,QAAC,kBAAA,IAAA,CAAA,IAAA,CAAK,SAAL,EAAc,GAAG,IAAM,EAAA,SAAA,EAAW,aACjC,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,IAAK,CAAA,YAAA,EAAL,EAAkB,SAAA,EAAW,OAAO,GACnC,EAAA,QAAA,kBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,OAAA,EAAQ,WACX,QAAC,kBAAA,GAAA,CAAA,MAAA,EAAA,EAAK,CAAE,EAAA,gBAAA,EAAiB,GAC3B,CACF,EAAA,CAAA;AAAA,IACC;AAAA,GAAA,EACH,CACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TunnelEntry.mjs","sources":["../../../../../../src/components/TunnelEntry/TunnelEntry.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { TunnelEntry as ReactTunnelEntry } from \"@mittwald/react-tunnel\";\nimport type { TunnelEntryProps } from \"@mittwald/react-tunnel\";\n\nexport type { TunnelEntryProps } from \"@mittwald/react-tunnel\";\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const TunnelEntry: FC<TunnelEntryProps> = (props) => (\n <ReactTunnelEntry {...props} />\n);\n\nexport default TunnelEntry;\n"],"names":["ReactTunnelEntry"],"mappings":";;;AAUO,MAAM,cAAoC,CAAC,KAAA,qBAC/C,GAAA,CAAAA,aAAA,EAAA,EAAkB,GAAG,KAAO,EAAA;;;;"}
1
+ {"version":3,"file":"TunnelEntry.mjs","sources":["../../../../../../src/components/TunnelEntry/TunnelEntry.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { TunnelEntry as ReactTunnelEntry } from \"@mittwald/react-tunnel\";\nimport type { TunnelEntryProps } from \"@mittwald/react-tunnel\";\n\nexport type { TunnelEntryProps } from \"@mittwald/react-tunnel\";\n\n/** @flr-generate all */\nexport const TunnelEntry: FC<TunnelEntryProps> = (props) => (\n <ReactTunnelEntry {...props} />\n);\n\nexport default TunnelEntry;\n"],"names":["ReactTunnelEntry"],"mappings":";;;AAOO,MAAM,cAAoC,CAAC,KAAA,qBAC/C,GAAA,CAAAA,aAAA,EAAA,EAAkB,GAAG,KAAO,EAAA;;;;"}
@@ -49,7 +49,6 @@ const propsContextSupportingComponentsMap = {
49
49
  Message: true,
50
50
  MessageThread: true,
51
51
  Modal: true,
52
- ModalTrigger: true,
53
52
  Navigation: true,
54
53
  NavigationGroup: true,
55
54
  NumberField: 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, ModalTriggerProps } 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\";\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 Align: AlignProps;\n Avatar: AvatarProps;\n Autocomplete: AutocompleteProps;\n Badge: BadgeProps;\n Button: ButtonProps;\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 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 ModalTrigger: ModalTriggerProps;\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 SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\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 Align: true,\n Badge: true,\n Button: 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 Image: true,\n Initials: 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 ModalTrigger: 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 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 propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"names":[],"mappings":"AAmKA,MAAM,mCAGF,GAAA;AAAA,EACF,SAAW,EAAA,IAAA;AAAA,EACX,MAAQ,EAAA,IAAA;AAAA,EACR,WAAa,EAAA,IAAA;AAAA,EACb,MAAQ,EAAA,IAAA;AAAA,EACR,YAAc,EAAA,IAAA;AAAA,EACd,KAAO,EAAA,IAAA;AAAA,EACP,UAAY,EAAA,IAAA;AAAA,EACZ,SAAW,EAAA,IAAA;AAAA,EACX,KAAO,EAAA,IAAA;AAAA,EACP,KAAO,EAAA,IAAA;AAAA,EACP,MAAQ,EAAA,IAAA;AAAA,EACR,QAAU,EAAA,IAAA;AAAA,EACV,cAAgB,EAAA,IAAA;AAAA,EAChB,aAAe,EAAA,IAAA;AAAA,EACf,YAAc,EAAA,IAAA;AAAA,EACd,QAAU,EAAA,IAAA;AAAA,EACV,OAAS,EAAA,IAAA;AAAA,EACT,WAAa,EAAA,IAAA;AAAA,EACb,kBAAoB,EAAA,IAAA;AAAA,EACpB,kBAAoB,EAAA,IAAA;AAAA,EACpB,cAAgB,EAAA,IAAA;AAAA,EAChB,qBAAuB,EAAA,IAAA;AAAA,EACvB,UAAY,EAAA,IAAA;AAAA,EACZ,YAAc,EAA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AAS,EAAA,IAAA;AAAA,EACT,gBAAkB,EAAA,IAAA;AAAA,EAClB,MAAQ,EAAA,IAAA;AAAA,EACR,MAAQ,EAAA,IAAA;AAAA,EACR,MAAQ,EAAA,IAAA;AAAA,EACR,IAAM,EAAA,IAAA;AAAA,EACN,QAAU,EAAA,IAAA;AAAA,EACV,aAAe,EAAA,IAAA;AAAA,EACf,IAAM,EAAA,IAAA;AAAA,EACN,QAAU,EAAA,IAAA;AAAA,EACV,SAAW,EAAA,IAAA;AAAA,EACX,SAAW,EAAA;AACb,CAAA;AAEO,MAAM,mCAAmC,MAAO,CAAA,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 { 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\";\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 Align: AlignProps;\n Avatar: AvatarProps;\n Autocomplete: AutocompleteProps;\n Badge: BadgeProps;\n Button: ButtonProps;\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 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 SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\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 Align: true,\n Badge: true,\n Button: 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 Image: true,\n Initials: 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 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 propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"names":[],"mappings":"AAkKA,MAAM,mCAGF,GAAA;AAAA,EACF,SAAW,EAAA,IAAA;AAAA,EACX,MAAQ,EAAA,IAAA;AAAA,EACR,WAAa,EAAA,IAAA;AAAA,EACb,MAAQ,EAAA,IAAA;AAAA,EACR,YAAc,EAAA,IAAA;AAAA,EACd,KAAO,EAAA,IAAA;AAAA,EACP,UAAY,EAAA,IAAA;AAAA,EACZ,SAAW,EAAA,IAAA;AAAA,EACX,KAAO,EAAA,IAAA;AAAA,EACP,KAAO,EAAA,IAAA;AAAA,EACP,MAAQ,EAAA,IAAA;AAAA,EACR,QAAU,EAAA,IAAA;AAAA,EACV,cAAgB,EAAA,IAAA;AAAA,EAChB,aAAe,EAAA,IAAA;AAAA,EACf,YAAc,EAAA,IAAA;AAAA,EACd,QAAU,EAAA,IAAA;AAAA,EACV,OAAS,EAAA,IAAA;AAAA,EACT,WAAa,EAAA,IAAA;AAAA,EACb,kBAAoB,EAAA,IAAA;AAAA,EACpB,kBAAoB,EAAA,IAAA;AAAA,EACpB,cAAgB,EAAA,IAAA;AAAA,EAChB,qBAAuB,EAAA,IAAA;AAAA,E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AA;AAAA,EACT,OAAS,EAAA,IAAA;AAAA,EACT,gBAAkB,EAAA,IAAA;AAAA,EAClB,MAAQ,EAAA,IAAA;AAAA,EACR,MAAQ,EAAA,IAAA;AAAA,EACR,MAAQ,EAAA,IAAA;AAAA,EACR,IAAM,EAAA,IAAA;AAAA,EACN,QAAU,EAAA,IAAA;AAAA,EACV,aAAe,EAAA,IAAA;AAAA,EACf,IAAM,EAAA,IAAA;AAAA,EACN,QAAU,EAAA,IAAA;AAAA,EACV,SAAW,EAAA,IAAA;AAAA,EACX,SAAW,EAAA;AACb,CAAA;AAEO,MAAM,mCAAmC,MAAO,CAAA,IAAA;AAAA,EACrD;AACF;;;;"}
@@ -2,11 +2,9 @@
2
2
  /* */
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  import { useFormContext } from '../context/formContext.mjs';
5
- import '../../../../lib/propsContext/propsContext.mjs';
6
- import 'react';
7
- import '../../../../lib/viewComponentContext/viewComponentContext.mjs';
8
5
  import { dynamic } from '../../../../lib/propsContext/dynamicProps/dynamic.mjs';
9
- import { PropsContextProvider } from '../../../../lib/propsContext/PropsContextProvider.mjs';
6
+ import '../../../../lib/propsContext/propsContext.mjs';
7
+ import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
10
8
  import { useController } from 'react-hook-form';
11
9
  import FieldErrorView from '../../../../views/FieldErrorView.mjs';
12
10
  import { useLocalizedStringFormatter } from 'react-aria';
@@ -36,6 +34,7 @@ function Field(props) {
36
34
  const formContext = useFormContext();
37
35
  const value = formContext.form.watch(name) ?? controller.field.value;
38
36
  const fieldProps = {
37
+ ____inherit: true,
39
38
  ...controller.field,
40
39
  value,
41
40
  name,
@@ -95,7 +94,6 @@ function Field(props) {
95
94
  return /* @__PURE__ */ jsx(
96
95
  PropsContextProvider,
97
96
  {
98
- mergeInParentContext: true,
99
97
  props: propsContext,
100
98
  dependencies: [controller.fieldState, controller.field, value],
101
99
  children
@@ -1 +1 @@
1
- {"version":3,"file":"Field.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithChildren } from \"react\";\nimport {\n type ControllerProps,\n type FieldValues,\n useController,\n type UseFormReturn,\n} from \"react-hook-form\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">,\n PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const controller = useController({\n ...props,\n rules: {\n ...props.rules,\n minLength:\n typeof rest.rules?.minLength === \"number\"\n ? {\n value: rest.rules.minLength,\n message: stringFormatter.format(\"minLength\", {\n number: rest.rules.minLength,\n }),\n }\n : rest.rules?.minLength,\n maxLength:\n typeof rest.rules?.maxLength === \"number\"\n ? {\n value: rest.rules.maxLength,\n message: stringFormatter.format(\"maxLength\", {\n number: rest.rules.maxLength,\n }),\n }\n : rest.rules?.maxLength,\n },\n });\n const formContext = useFormContext<T>();\n /**\n * We don't use controller.field.value here, because it doesn't update when\n * the form value is updated outside of this field (e.g. when setting values\n * with form.setValue or resetting the form), and the Field unmounts in\n * between. This is generally a feature of React Hook Form, but this breaks\n * dynamic forms where fields are conditionally rendered.\n *\n * By using formContext.form.watch(name), we ensure that the field value is\n * always in sync with the form state. See:\n * https://react-hook-form.com/api/usecontroller/controller/\n */\n const value = formContext.form.watch(name) ?? controller.field.value;\n\n const fieldProps = {\n ...controller.field,\n value,\n name,\n form: formContext.id,\n isRequired: !!rest.rules?.required,\n validationBehavior: \"aria\" as const,\n defaultValue,\n isInvalid: controller.fieldState.invalid,\n children: dynamic((p) => {\n if (controller.fieldState.invalid) {\n return (\n <>\n {p.children}\n <FieldErrorView>\n {controller.fieldState.error?.message}\n </FieldErrorView>\n </>\n );\n }\n\n return p.children;\n }),\n };\n\n const { value: ignoredValue, ...fieldPropsWithoutValue } = fieldProps;\n\n const propsContext: PropsContext = {\n SearchField: fieldProps,\n TextField: fieldProps,\n TextArea: fieldProps,\n MarkdownEditor: fieldProps,\n Checkbox: {\n ...fieldProps,\n isSelected: value,\n },\n CheckboxGroup: fieldProps,\n CheckboxButton: {\n ...fieldProps,\n isSelected: value,\n },\n FileField: fieldProps,\n FileDropZone: fieldProps,\n NumberField: fieldProps,\n RadioGroup: fieldProps,\n Switch: {\n ...fieldProps,\n isSelected: value,\n },\n Slider: fieldProps,\n PasswordCreationField: fieldProps,\n DatePicker: fieldProps,\n DateRangePicker: fieldProps,\n TimeField: fieldProps,\n SegmentedControl: fieldProps,\n Select: {\n ...fieldProps,\n selectedKey: value,\n },\n ComboBox: {\n ...fieldPropsWithoutValue,\n selectedKey: value,\n },\n };\n\n return (\n <PropsContextProvider\n mergeInParentContext\n props={propsContext}\n dependencies={[controller.fieldState, controller.field, value]}\n >\n {children}\n </PropsContextProvider>\n );\n}\n\nexport const typedField = <T extends FieldValues>(\n ignoredForm: UseFormReturn<T> | UseFormReturn<T>[\"control\"],\n): typeof Field<T> => Field;\n\nexport default Field;\n"],"names":[],"mappings":";;;;;;;;;;;;AAkBO,SAAS,MAA6B,KAAsB,EAAA;AACjE,EAAA,MAAM,EAAE,QAAU,EAAA,IAAA,EAAM,YAAc,EAAA,GAAG,MAAS,GAAA,KAAA;AAElD,EAAM,MAAA,eAAA,GAAkB,4BAA4B,OAAO,CAAA;AAE3D,EAAA,MAAM,aAAa,aAAc,CAAA;AAAA,IAC/B,GAAG,KAAA;AAAA,IACH,KAAO,EAAA;AAAA,MACL,GAAG,KAAM,CAAA,KAAA;AAAA,MACT,SACE,EAAA,OAAO,IAAK,CAAA,KAAA,E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AAA,CAAW,OAAO,KAAK,CAAA;AAAA,MAE5D;AAAA;AAAA,GACH;AAEJ;AAEa,MAAA,UAAA,GAAa,CACxB,WACoB,KAAA;;;;"}
1
+ {"version":3,"file":"Field.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithChildren } from \"react\";\nimport {\n type ControllerProps,\n type FieldValues,\n useController,\n type UseFormReturn,\n} from \"react-hook-form\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">,\n PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const controller = useController({\n ...props,\n rules: {\n ...props.rules,\n minLength:\n typeof rest.rules?.minLength === \"number\"\n ? {\n value: rest.rules.minLength,\n message: stringFormatter.format(\"minLength\", {\n number: rest.rules.minLength,\n }),\n }\n : rest.rules?.minLength,\n maxLength:\n typeof rest.rules?.maxLength === \"number\"\n ? {\n value: rest.rules.maxLength,\n message: stringFormatter.format(\"maxLength\", {\n number: rest.rules.maxLength,\n }),\n }\n : rest.rules?.maxLength,\n },\n });\n const formContext = useFormContext<T>();\n /**\n * We don't use controller.field.value here, because it doesn't update when\n * the form value is updated outside of this field (e.g. when setting values\n * with form.setValue or resetting the form), and the Field unmounts in\n * between. This is generally a feature of React Hook Form, but this breaks\n * dynamic forms where fields are conditionally rendered.\n *\n * By using formContext.form.watch(name), we ensure that the field value is\n * always in sync with the form state. See:\n * https://react-hook-form.com/api/usecontroller/controller/\n */\n const value = formContext.form.watch(name) ?? controller.field.value;\n\n const fieldProps = {\n ____inherit: true,\n ...controller.field,\n value,\n name,\n form: formContext.id,\n isRequired: !!rest.rules?.required,\n validationBehavior: \"aria\" as const,\n defaultValue,\n isInvalid: controller.fieldState.invalid,\n children: dynamic((p) => {\n if (controller.fieldState.invalid) {\n return (\n <>\n {p.children}\n <FieldErrorView>\n {controller.fieldState.error?.message}\n </FieldErrorView>\n </>\n );\n }\n\n return p.children;\n }),\n };\n\n const { value: ignoredValue, ...fieldPropsWithoutValue } = fieldProps;\n\n const propsContext: PropsContext = {\n SearchField: fieldProps,\n TextField: fieldProps,\n TextArea: fieldProps,\n MarkdownEditor: fieldProps,\n Checkbox: {\n ...fieldProps,\n isSelected: value,\n },\n CheckboxGroup: fieldProps,\n CheckboxButton: {\n ...fieldProps,\n isSelected: value,\n },\n FileField: fieldProps,\n FileDropZone: fieldProps,\n NumberField: fieldProps,\n RadioGroup: fieldProps,\n Switch: {\n ...fieldProps,\n isSelected: value,\n },\n Slider: fieldProps,\n PasswordCreationField: fieldProps,\n DatePicker: fieldProps,\n DateRangePicker: fieldProps,\n TimeField: fieldProps,\n SegmentedControl: fieldProps,\n Select: {\n ...fieldProps,\n selectedKey: value,\n },\n ComboBox: {\n ...fieldPropsWithoutValue,\n selectedKey: value,\n },\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[controller.fieldState, controller.field, value]}\n >\n {children}\n </PropsContextProvider>\n );\n}\n\nexport const typedField = <T extends FieldValues>(\n ignoredForm: UseFormReturn<T> | UseFormReturn<T>[\"control\"],\n): typeof Field<T> => Field;\n\nexport default Field;\n"],"names":[],"mappings":";;;;;;;;;;AAkBO,SAAS,MAA6B,KAAsB,EAAA;AACjE,EAAA,MAAM,EAAE,QAAU,EAAA,IAAA,EAAM,YAAc,EAAA,GAAG,MAAS,GAAA,KAAA;AAElD,EAAM,MAAA,eAAA,GAAkB,4BAA4B,OAAO,CAAA;AAE3D,EAAA,MAAM,aAAa,aAAc,CAAA;AAAA,IAC/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,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,YAAA;AAAA,MACP,cAAc,CAAC,UAAA,CAAW,UAAY,EAAA,UAAA,CAAW,OAAO,KAAK,CAAA;AAAA,MAE5D;AAAA;AAAA,GACH;AAEJ;AAEa,MAAA,UAAA,GAAa,CACxB,WACoB,KAAA;;;;"}
@@ -5,8 +5,7 @@ import { FormContextProvider } from '../context/formContext.mjs';
5
5
  import { useId, useMemo } from 'react';
6
6
  import { FormProvider } from 'react-hook-form';
7
7
  import '../../../../lib/propsContext/propsContext.mjs';
8
- import '../../../../lib/viewComponentContext/viewComponentContext.mjs';
9
- import { PropsContextProvider } from '../../../../lib/propsContext/PropsContextProvider.mjs';
8
+ import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
10
9
  import { Action } from '../../../../components/Action/Action.mjs';
11
10
  import { useRegisterActionStateContext } from './lib/useRegisterActionStateContext.mjs';
12
11
 
@@ -37,44 +36,41 @@ function Form(props) {
37
36
  return result;
38
37
  })(formEvent);
39
38
  };
39
+ const readonlyPropsContext = {
40
+ isReadOnly: true
41
+ };
40
42
  const propsContext = {
41
- SearchField: { isReadOnly: true },
42
- TextField: { isReadOnly: true },
43
- TextArea: { isReadOnly: true },
44
- MarkdownEditor: { isReadOnly: true },
45
- Checkbox: { isReadOnly: true },
46
- CheckboxGroup: { isReadOnly: true },
47
- CheckboxButton: { isReadOnly: true },
48
- FileField: { isReadOnly: true },
49
- FileDropZone: { isReadOnly: true },
50
- NumberField: { isReadOnly: true },
51
- RadioGroup: { isReadOnly: true },
52
- Switch: { isReadOnly: true },
53
- Slider: { isReadOnly: true },
54
- PasswordCreationField: { isReadOnly: true },
55
- DatePicker: { isReadOnly: true },
56
- DateRangePicker: { isReadOnly: true },
57
- TimeField: { isReadOnly: true },
58
- SegmentedControl: { isReadOnly: true },
59
- Select: { isReadOnly: true },
60
- ComboBox: { isReadOnly: true }
43
+ SearchField: readonlyPropsContext,
44
+ TextField: readonlyPropsContext,
45
+ TextArea: readonlyPropsContext,
46
+ MarkdownEditor: readonlyPropsContext,
47
+ Checkbox: readonlyPropsContext,
48
+ CheckboxGroup: readonlyPropsContext,
49
+ CheckboxButton: readonlyPropsContext,
50
+ FileField: readonlyPropsContext,
51
+ FileDropZone: readonlyPropsContext,
52
+ NumberField: readonlyPropsContext,
53
+ RadioGroup: readonlyPropsContext,
54
+ Switch: readonlyPropsContext,
55
+ Slider: readonlyPropsContext,
56
+ PasswordCreationField: readonlyPropsContext,
57
+ DatePicker: readonlyPropsContext,
58
+ DateRangePicker: readonlyPropsContext,
59
+ TimeField: readonlyPropsContext,
60
+ SegmentedControl: readonlyPropsContext,
61
+ Select: readonlyPropsContext,
62
+ ComboBox: readonlyPropsContext,
63
+ Button: readonlyPropsContext
61
64
  };
62
- return /* @__PURE__ */ jsx(
63
- PropsContextProvider,
65
+ return /* @__PURE__ */ jsx(PropsContextProvider, { props: isReadOnly ? propsContext : {}, children: /* @__PURE__ */ jsx(FormProvider, { ...form, children: /* @__PURE__ */ jsx(FormContextProvider, { value: { form, id: formId }, children: /* @__PURE__ */ jsx(Action, { actionModel: action, children: /* @__PURE__ */ jsx(
66
+ FormViewComponent,
64
67
  {
65
- props: isReadOnly ? propsContext : {},
66
- mergeInParentContext: true,
67
- children: /* @__PURE__ */ jsx(FormProvider, { ...form, children: /* @__PURE__ */ jsx(FormContextProvider, { value: { form, id: formId }, children: /* @__PURE__ */ jsx(Action, { actionModel: action, children: /* @__PURE__ */ jsx(
68
- FormViewComponent,
69
- {
70
- ...formProps,
71
- id: formId,
72
- onSubmit: handleOnSubmit,
73
- children
74
- }
75
- ) }) }) })
68
+ ...formProps,
69
+ id: formId,
70
+ onSubmit: handleOnSubmit,
71
+ children
76
72
  }
77
- );
73
+ ) }) }) }) });
78
74
  }
79
75
 
80
76
  export { Form, Form as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Form.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import { FormContextProvider } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport {\n type ComponentProps,\n type ComponentType,\n type FormEvent,\n type FormEventHandler,\n type PropsWithChildren,\n useId,\n useMemo,\n} from \"react\";\nimport type {\n FieldValues,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Action } from \"@/components/Action\";\nimport { useRegisterActionStateContext } from \"@/integrations/react-hook-form/components/Form/lib/useRegisterActionStateContext\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\ntype FormComponentType = ComponentType<\n PropsWithChildren<{\n id: string;\n onSubmit?: FormEventHandler | FormOnSubmitHandler<never>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends Omit<ComponentProps<\"form\">, \"onSubmit\">,\n PropsWithChildren {\n form: UseFormReturn<F>;\n onSubmit: FormOnSubmitHandler<F>;\n formComponent?: FormComponentType;\n isReadOnly?: boolean;\n}\n\nconst DefaultFormComponent: FormComponentType = (p) => <form {...p} />;\n\nexport function Form<F extends FieldValues>(props: FormProps<F>) {\n const {\n form,\n children,\n onSubmit,\n formComponent: FormView = DefaultFormComponent,\n isReadOnly,\n ...formProps\n } = props;\n\n const formId = useId();\n const FormViewComponent = useMemo(() => FormView, [formId]);\n const { action, registerSubmitResult } = useRegisterActionStateContext(form);\n\n const handleOnSubmit = (e?: FormEvent<HTMLFormElement> | F) => {\n const { isSubmitting, isValidating } = form.control._formState;\n const formEvent =\n e && \"nativeEvent\" in e ? (e as FormEvent<HTMLFormElement>) : undefined;\n\n formEvent?.stopPropagation();\n\n if (isSubmitting || isValidating) {\n formEvent?.preventDefault();\n return;\n }\n\n form.handleSubmit((values) => {\n const result = onSubmit(values, formEvent);\n registerSubmitResult(result);\n return result;\n })(formEvent);\n };\n\n const propsContext: PropsContext = {\n SearchField: { isReadOnly: true },\n TextField: { isReadOnly: true },\n TextArea: { isReadOnly: true },\n MarkdownEditor: { isReadOnly: true },\n Checkbox: { isReadOnly: true },\n CheckboxGroup: { isReadOnly: true },\n CheckboxButton: { isReadOnly: true },\n FileField: { isReadOnly: true },\n FileDropZone: { isReadOnly: true },\n NumberField: { isReadOnly: true },\n RadioGroup: { isReadOnly: true },\n Switch: { isReadOnly: true },\n Slider: { isReadOnly: true },\n PasswordCreationField: { isReadOnly: true },\n DatePicker: { isReadOnly: true },\n DateRangePicker: { isReadOnly: true },\n TimeField: { isReadOnly: true },\n SegmentedControl: { isReadOnly: true },\n Select: { isReadOnly: true },\n ComboBox: { isReadOnly: true },\n };\n\n return (\n <PropsContextProvider\n props={isReadOnly ? propsContext : {}}\n mergeInParentContext\n >\n <RhfFormContextProvider {...form}>\n <FormContextProvider value={{ form, id: formId }}>\n <Action actionModel={action}>\n <FormViewComponent\n {...formProps}\n id={formId}\n onSubmit={handleOnSubmit}\n >\n {children}\n </FormViewComponent>\n </Action>\n </FormContextProvider>\n </RhfFormContextProvider>\n </PropsContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],"mappings":";;;;;;;;;;AAsCA,MAAM,uBAA0C,CAAC,CAAA,qBAAO,GAAA,CAAA,MAAA,EAAA,EAAM,GAAG,CAAG,EAAA,CAAA;AAE7D,SAAS,KAA4B,KAAqB,EAAA;AAC/D,EAAM,MAAA;AAAA,IACJ,IAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,eAAe,QAAW,GAAA,oBAAA;AAAA,IAC1B,UAAA;AAAA,IACA,GAAG;AAAA,GACD,GAAA,KAAA;AAEJ,EAAA,MAAM,SAAS,KAAM,EAAA;AACrB,EAAA,MAAM,oBAAoB,OAAQ,CAAA,MAAM,QAAU,EAAA,CAAC,MAAM,CAAC,CAAA;AAC1D,EAAA,MAAM,EAAE,MAAA,EAAQ,oBAAqB,EAAA,GAAI,8BAA8B,I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C/B,MAAA,EAAQ,EAAE,UAAA,EAAY,IAAK,EAAA;AAAA,IAC3B,MAAA,EAAQ,EAAE,UAAA,EAAY,IAAK,EAAA;AAAA,IAC3B,qBAAA,EAAuB,EAAE,UAAA,EAAY,IAAK,EAAA;AAAA,IAC1C,UAAA,EAAY,EAAE,UAAA,EAAY,IAAK,EAAA;AAAA,IAC/B,eAAA,EAAiB,EAAE,UAAA,EAAY,IAAK,EAAA;AAAA,IACpC,SAAA,EAAW,EAAE,UAAA,EAAY,IAAK,EAAA;AAAA,IAC9B,gBAAA,EAAkB,EAAE,UAAA,EAAY,IAAK,EAAA;AAAA,IACrC,MAAA,EAAQ,EAAE,UAAA,EAAY,IAAK,EAAA;AAAA,IAC3B,QAAA,EAAU,EAAE,UAAA,EAAY,IAAK;AAAA,GAC/B;AAEA,EACE,uBAAA,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,UAAa,GAAA,YAAA,GAAe,EAAC;AAAA,MACpC,oBAAoB,EAAA,IAAA;AAAA,MAEpB,QAAC,kBAAA,GAAA,CAAAA,YAAA,EAAA,EAAwB,GAAG,IAAA,EAC1B,8BAAC,mBAAoB,EAAA,EAAA,KAAA,EAAO,EAAE,IAAA,EAAM,IAAI,MAAO,EAAA,EAC7C,QAAC,kBAAA,GAAA,CAAA,MAAA,EAAA,EAAO,aAAa,MACnB,EAAA,QAAA,kBAAA,GAAA;AAAA,QAAC,iBAAA;AAAA,QAAA;AAAA,UACE,GAAG,SAAA;AAAA,UACJ,EAAI,EAAA,MAAA;AAAA,UACJ,QAAU,EAAA,cAAA;AAAA,UAET;AAAA;AAAA,OACH,EACF,GACF,CACF,EAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"Form.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import { FormContextProvider } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport {\n type ComponentProps,\n type ComponentType,\n type FormEvent,\n type FormEventHandler,\n type PropsWithChildren,\n useId,\n useMemo,\n} from \"react\";\nimport type {\n FieldValues,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Action } from \"@/components/Action\";\nimport { useRegisterActionStateContext } from \"@/integrations/react-hook-form/components/Form/lib/useRegisterActionStateContext\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\ntype FormComponentType = ComponentType<\n PropsWithChildren<{\n id: string;\n onSubmit?: FormEventHandler | FormOnSubmitHandler<never>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends Omit<ComponentProps<\"form\">, \"onSubmit\">,\n PropsWithChildren {\n form: UseFormReturn<F>;\n onSubmit: FormOnSubmitHandler<F>;\n formComponent?: FormComponentType;\n isReadOnly?: boolean;\n}\n\nconst DefaultFormComponent: FormComponentType = (p) => <form {...p} />;\n\nexport function Form<F extends FieldValues>(props: FormProps<F>) {\n const {\n form,\n children,\n onSubmit,\n formComponent: FormView = DefaultFormComponent,\n isReadOnly,\n ...formProps\n } = props;\n\n const formId = useId();\n const FormViewComponent = useMemo(() => FormView, [formId]);\n const { action, registerSubmitResult } = useRegisterActionStateContext(form);\n\n const handleOnSubmit = (e?: FormEvent<HTMLFormElement> | F) => {\n const { isSubmitting, isValidating } = form.control._formState;\n const formEvent =\n e && \"nativeEvent\" in e ? (e as FormEvent<HTMLFormElement>) : undefined;\n\n formEvent?.stopPropagation();\n\n if (isSubmitting || isValidating) {\n formEvent?.preventDefault();\n return;\n }\n\n form.handleSubmit((values) => {\n const result = onSubmit(values, formEvent);\n registerSubmitResult(result);\n return result;\n })(formEvent);\n };\n\n const readonlyPropsContext = {\n isReadOnly: true,\n } as const;\n\n const propsContext: PropsContext = {\n SearchField: readonlyPropsContext,\n TextField: readonlyPropsContext,\n TextArea: readonlyPropsContext,\n MarkdownEditor: readonlyPropsContext,\n Checkbox: readonlyPropsContext,\n CheckboxGroup: readonlyPropsContext,\n CheckboxButton: readonlyPropsContext,\n FileField: readonlyPropsContext,\n FileDropZone: readonlyPropsContext,\n NumberField: readonlyPropsContext,\n RadioGroup: readonlyPropsContext,\n Switch: readonlyPropsContext,\n Slider: readonlyPropsContext,\n PasswordCreationField: readonlyPropsContext,\n DatePicker: readonlyPropsContext,\n DateRangePicker: readonlyPropsContext,\n TimeField: readonlyPropsContext,\n SegmentedControl: readonlyPropsContext,\n Select: readonlyPropsContext,\n ComboBox: readonlyPropsContext,\n Button: readonlyPropsContext,\n };\n\n return (\n <PropsContextProvider props={isReadOnly ? propsContext : {}}>\n <RhfFormContextProvider {...form}>\n <FormContextProvider value={{ form, id: formId }}>\n <Action actionModel={action}>\n <FormViewComponent\n {...formProps}\n id={formId}\n onSubmit={handleOnSubmit}\n >\n {children}\n </FormViewComponent>\n </Action>\n </FormContextProvider>\n </RhfFormContextProvider>\n </PropsContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],"mappings":";;;;;;;;;AAsCA,MAAM,uBAA0C,CAAC,CAAA,qBAAO,GAAA,CAAA,MAAA,EAAA,EAAM,GAAG,CAAG,EAAA,CAAA;AAE7D,SAAS,KAA4B,KAAqB,EAAA;AAC/D,EAAM,MAAA;AAAA,IACJ,IAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,eAAe,QAAW,GAAA,oBAAA;AAAA,IAC1B,UAAA;AAAA,IACA,GAAG;AAAA,GACD,GAAA,KAAA;AAEJ,EAAA,MAAM,SAAS,KAAM,EAAA;AACrB,EAAA,MAAM,oBAAoB,OAAQ,CAAA,MAAM,QAAU,EAAA,CAAC,MAAM,CAAC,CAAA;AAC1D,EAAA,MAAM,EAAE,MAAA,EAAQ,oBAAqB,EAAA,GAAI,8BAA8B,IAAI,CAAA;AAE3E,EAAM,MAAA,cAAA,GAAiB,CAAC,CAAuC,K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ACR,QAAU,EAAA,oBAAA;AAAA,IACV,MAAQ,EAAA;AAAA,GACV;AAEA,EACE,uBAAA,GAAA,CAAC,wBAAqB,KAAO,EAAA,UAAA,GAAa,eAAe,EAAC,EACxD,QAAC,kBAAA,GAAA,CAAAA,YAAA,EAAA,EAAwB,GAAG,IAAA,EAC1B,8BAAC,mBAAoB,EAAA,EAAA,KAAA,EAAO,EAAE,IAAM,EAAA,EAAA,EAAI,QACtC,EAAA,QAAA,kBAAA,GAAA,CAAC,MAAO,EAAA,EAAA,WAAA,EAAa,MACnB,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACE,GAAG,SAAA;AAAA,MACJ,EAAI,EAAA,MAAA;AAAA,MACJ,QAAU,EAAA,cAAA;AAAA,MAET;AAAA;AAAA,GACH,EACF,CACF,EAAA,CAAA,EACF,CACF,EAAA,CAAA;AAEJ;;;;"}
@@ -6,8 +6,14 @@ import { TunnelEntry } from '@mittwald/react-tunnel';
6
6
  import { SlotContextProvider } from '../slotContext/SlotContextProvider.mjs';
7
7
  import { useProps } from '../hooks/useProps.mjs';
8
8
  import { mergeRefs } from '@react-aria/utils';
9
+ import { useComponentPropsContext } from '../propsContext/propsContext.mjs';
10
+ import { increaseNestingLevel } from '../propsContext/nestedPropsContext/lib.mjs';
11
+ import ComponentPropsContextProviderView from '../../views/ComponentPropsContextProviderView.mjs';
12
+ import { ComponentPropsContextProvider } from '../propsContext/components/ComponentPropsContextProvider.mjs';
9
13
 
10
- function flowComponent(componentName, ImplementationComponentType) {
14
+ function flowComponent(componentName, ImplementationComponentType, options = {}) {
15
+ const { type = "ui", isRemoteComponent = false } = options;
16
+ const propsContextLevelMode = type === "ui" ? "increment" : "keep";
11
17
  function Component(propsFromArgument) {
12
18
  const { ref: refFromProps = null, ...props } = propsFromArgument;
13
19
  const {
@@ -20,6 +26,8 @@ function flowComponent(componentName, ImplementationComponentType) {
20
26
  props
21
27
  );
22
28
  const implementationTypeProps = propsWithContext;
29
+ const componentProps = useComponentPropsContext(componentName) ?? {};
30
+ increaseNestingLevel(componentProps);
23
31
  const mergedRef = mergeRefs(refFromProps, refFromContext);
24
32
  const propsWithRef = {
25
33
  ...implementationTypeProps,
@@ -27,6 +35,25 @@ function flowComponent(componentName, ImplementationComponentType) {
27
35
  };
28
36
  ImplementationComponentType.displayName = `FlowComponentImpl(${componentName})`;
29
37
  let element = /* @__PURE__ */ jsx(ImplementationComponentType, { ...propsWithRef });
38
+ if (isRemoteComponent) {
39
+ element = /* @__PURE__ */ jsx(
40
+ ComponentPropsContextProvider,
41
+ {
42
+ componentProps,
43
+ levelModel: propsContextLevelMode,
44
+ children: element
45
+ }
46
+ );
47
+ } else {
48
+ element = /* @__PURE__ */ jsx(
49
+ ComponentPropsContextProviderView,
50
+ {
51
+ componentProps,
52
+ levelModel: propsContextLevelMode,
53
+ children: element
54
+ }
55
+ );
56
+ }
30
57
  if ("slot" in props && !!props.slot && typeof props.slot === "string") {
31
58
  element = /* @__PURE__ */ jsx(SlotContextProvider, { slot: props.slot, component: componentName, children: element });
32
59
  }
@@ -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 ReactElement,\n ReactNode,\n RefAttributes,\n FunctionComponent,\n} from \"react\";\nimport { cloneElement } 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 { mergeRefs } from \"@react-aria/utils\";\n\ntype RefType<T> = T extends RefAttributes<infer R> ? R : undefined;\n\nexport interface FlowComponentProps<R = HTMLDivElement>\n extends PropsWithTunnel,\n RefAttributes<R> {\n wrapWith?: ReactElement;\n}\n\ntype FlowComponentImplementationProps<C extends FlowComponentName> = Omit<\n FlowComponentPropsOfName<C>,\n keyof FlowComponentProps\n> &\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 function flowComponent<C extends FlowComponentName>(\n componentName: C,\n ImplementationComponentType: FlowComponentImplementationType<C>,\n): FlowComponentType<C> {\n type Props = FlowComponentPropsOfName<C> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>;\n\n function Component(propsFromArgument: Props) {\n const { ref: refFromProps = null, ...props } = propsFromArgument;\n\n const {\n ref: refFromContext = null,\n tunnelId,\n wrapWith,\n ...propsWithContext\n } = 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 mergedRef = mergeRefs(refFromProps, refFromContext);\n const propsWithRef = {\n ...implementationTypeProps,\n ref: mergedRef,\n };\n\n ImplementationComponentType.displayName = `FlowComponentImpl(${componentName})`;\n\n let element: ReactNode = <ImplementationComponentType {...propsWithRef} />;\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\n return element;\n }\n\n Component.displayName = `FlowComponent(${componentName})`;\n return Component;\n}\n"],"names":[],"mappings":";;;;;;;AAyCgB,SAAA,aAAA,CACd,eACA,2BACsB,EAAA;AAItB,EAAA,SAAS,UAAU,i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O,OAAA,SAAA;AACT;;;;"}
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 ReactElement,\n ReactNode,\n RefAttributes,\n FunctionComponent,\n} from \"react\";\nimport { cloneElement } 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 { mergeRefs } from \"@react-aria/utils\";\nimport { useComponentPropsContext } from \"@/lib/propsContext/propsContext\";\nimport { increaseNestingLevel } from \"@/lib/propsContext/nestedPropsContext/lib\";\nimport ComponentPropsContextProviderView from \"@/views/ComponentPropsContextProviderView\";\nimport { ComponentPropsContextProvider } from \"@/components/ComponentPropsContextProvider\";\nimport type { PropsContextLevelMode } from \"@/lib/propsContext/inherit/types\";\n\ntype RefType<T> = T extends RefAttributes<infer R> ? R : undefined;\n\nexport interface FlowComponentProps<R = HTMLDivElement>\n extends PropsWithTunnel,\n RefAttributes<R> {\n wrapWith?: ReactElement;\n}\n\ntype FlowComponentImplementationProps<C extends FlowComponentName> = Omit<\n FlowComponentPropsOfName<C>,\n keyof FlowComponentProps\n> &\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\ntype FlowComponentProvisionType = \"provider\" | \"ui\";\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 propsContextLevelMode: PropsContextLevelMode =\n type === \"ui\" ? \"increment\" : \"keep\";\n\n function Component(propsFromArgument: Props) {\n const { ref: refFromProps = null, ...props } = propsFromArgument;\n\n const {\n ref: refFromContext = null,\n tunnelId,\n wrapWith,\n ...propsWithContext\n } = 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 increaseNestingLevel(componentProps);\n\n const mergedRef = mergeRefs(refFromProps, refFromContext);\n const propsWithRef = {\n ...implementationTypeProps,\n ref: mergedRef,\n };\n\n ImplementationComponentType.displayName = `FlowComponentImpl(${componentName})`;\n\n let element: ReactNode = <ImplementationComponentType {...propsWithRef} />;\n\n if (isRemoteComponent) {\n element = (\n <ComponentPropsContextProvider\n componentProps={componentProps}\n levelModel={propsContextLevelMode}\n >\n {element}\n </ComponentPropsContextProvider>\n );\n } else {\n /**\n * In case of a Flow component that does not have a remote counterpart\n * (like the List component), the ComponentPropsContext must be applied on\n * the host side, so that nesting and inheritance is working correctly.\n */\n element = (\n <ComponentPropsContextProviderView\n componentProps={componentProps}\n levelModel={propsContextLevelMode}\n >\n {element}\n </ComponentPropsContextProviderView>\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\n return element;\n }\n\n Component.displayName = `F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