@mittwald/flow-react-components 1.5.0-next.23 → 1.5.0-next.25

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 (358) hide show
  1. package/dist/assets/component-index.json +1 -1
  2. package/dist/assets/doc-properties.json +1 -1
  3. package/dist/css/all-layered.css +1 -1
  4. package/dist/css/all.css +1 -1
  5. package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
  6. package/dist/js/packages/components/src/components/Accordion/Accordion.mjs.map +1 -1
  7. package/dist/js/packages/components/src/components/Action/lib/ariaLive.mjs.map +1 -1
  8. package/dist/js/packages/components/src/components/Action/models/ActionState.mjs.map +1 -1
  9. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
  10. package/dist/js/packages/components/src/components/Alert/Alert.mjs.map +1 -1
  11. package/dist/js/packages/components/src/components/AlertBadge/AlertBadge.mjs.map +1 -1
  12. package/dist/js/packages/components/src/components/AlertIcon/AlertIcon.mjs.map +1 -1
  13. package/dist/js/packages/components/src/components/AlertText/AlertText.mjs.map +1 -1
  14. package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
  15. package/dist/js/packages/components/src/components/Avatar/Avatar.mjs.map +1 -1
  16. package/dist/js/packages/components/src/components/AvatarStack/AvatarStack.mjs.map +1 -1
  17. package/dist/js/packages/components/src/components/Badge/Badge.mjs.map +1 -1
  18. package/dist/js/packages/components/src/components/BigNumber/BigNumber.mjs.map +1 -1
  19. package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.mjs.map +1 -1
  20. package/dist/js/packages/components/src/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.mjs.map +1 -1
  21. package/dist/js/packages/components/src/components/Button/Button.mjs.map +1 -1
  22. package/dist/js/packages/components/src/components/Calendar/Calendar.mjs.map +1 -1
  23. package/dist/js/packages/components/src/components/Calendar/components/CalendarHeader/CalendarHeader.mjs.map +1 -1
  24. package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/RangeCalendar.mjs.map +1 -1
  25. package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/helpers/useCalendarDateRangePresets.mjs.map +1 -1
  26. package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
  27. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/ChartTooltip.mjs.map +1 -1
  28. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.mjs.map +1 -1
  29. package/dist/js/packages/components/src/components/Chat/Chat.mjs.map +1 -1
  30. package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs.map +1 -1
  31. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
  32. package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
  33. package/dist/js/packages/components/src/components/CoachMark/CoachMark.mjs.map +1 -1
  34. package/dist/js/packages/components/src/components/CodeBlock/CodeBlock.mjs.map +1 -1
  35. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs.map +1 -1
  36. package/dist/js/packages/components/src/components/CodeEditor/languages/dotEnv/index.mjs.map +1 -1
  37. package/dist/js/packages/components/src/components/CodeEditor/languages/index.mjs.map +1 -1
  38. package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs.map +1 -1
  39. package/dist/js/packages/components/src/components/Color/Color.mjs.map +1 -1
  40. package/dist/js/packages/components/src/components/ColumnLayout/ColumnLayout.mjs.map +1 -1
  41. package/dist/js/packages/components/src/components/Combine/Combine.mjs.map +1 -1
  42. package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
  43. package/dist/js/packages/components/src/components/Content/Content.mjs.map +1 -1
  44. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
  45. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs.map +1 -1
  46. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.mjs.map +1 -1
  47. package/dist/js/packages/components/src/components/ContextualHelp/ContextualHelp.mjs.map +1 -1
  48. package/dist/js/packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs.map +1 -1
  49. package/dist/js/packages/components/src/components/CopyButton/CopyButton.mjs.map +1 -1
  50. package/dist/js/packages/components/src/components/CounterBadge/CounterBadge.mjs.map +1 -1
  51. package/dist/js/packages/components/src/components/CountryOptions/CountryOptions.mjs.map +1 -1
  52. package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs.map +1 -1
  53. package/dist/js/packages/components/src/components/DatePicker/components/DateInput/DateInput.mjs.map +1 -1
  54. package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs.map +1 -1
  55. package/dist/js/packages/components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.mjs.map +1 -1
  56. package/dist/js/packages/components/src/components/DonutChart/DonutChart.mjs.map +1 -1
  57. package/dist/js/packages/components/src/components/DonutChart/components/Donut.mjs.map +1 -1
  58. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs.map +1 -1
  59. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartLegend.mjs.map +1 -1
  60. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartValue.mjs.map +1 -1
  61. package/dist/js/packages/components/src/components/EmulatedBoldText/EmulatedBoldText.mjs.map +1 -1
  62. package/dist/js/packages/components/src/components/FieldDescription/FieldDescription.mjs.map +1 -1
  63. package/dist/js/packages/components/src/components/FieldError/FieldError.mjs.map +1 -1
  64. package/dist/js/packages/components/src/components/FileCard/FileCard.mjs.map +1 -1
  65. package/dist/js/packages/components/src/components/FileCard/components/Avatar/Avatar.mjs.map +1 -1
  66. package/dist/js/packages/components/src/components/FileCard/components/DeleteButton/DeleteButton.mjs.map +1 -1
  67. package/dist/js/packages/components/src/components/FileCard/components/FileSizeText/FileSizeText.mjs.map +1 -1
  68. package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
  69. package/dist/js/packages/components/src/components/FileField/FileField.mjs.map +1 -1
  70. package/dist/js/packages/components/src/components/FileField/components/FileInput.mjs.map +1 -1
  71. package/dist/js/packages/components/src/components/Flex/Flex.mjs.map +1 -1
  72. package/dist/js/packages/components/src/components/Header/Header.mjs.map +1 -1
  73. package/dist/js/packages/components/src/components/HeaderNavigation/HeaderNavigation.mjs.map +1 -1
  74. package/dist/js/packages/components/src/components/Heading/Heading.mjs.map +1 -1
  75. package/dist/js/packages/components/src/components/Icon/Icon.mjs.map +1 -1
  76. package/dist/js/packages/components/src/components/Icon/components/icons/IconAI.mjs.map +1 -1
  77. package/dist/js/packages/components/src/components/Icon/components/icons/IconAIHosting.mjs.map +1 -1
  78. package/dist/js/packages/components/src/components/Icon/components/icons/IconAnalytics.mjs.map +1 -1
  79. package/dist/js/packages/components/src/components/Icon/components/icons/IconApp.mjs.map +1 -1
  80. package/dist/js/packages/components/src/components/Icon/components/icons/IconAscending.mjs.map +1 -1
  81. package/dist/js/packages/components/src/components/Icon/components/icons/IconAttachment.mjs.map +1 -1
  82. package/dist/js/packages/components/src/components/Icon/components/icons/IconAutoresponder.mjs.map +1 -1
  83. package/dist/js/packages/components/src/components/Icon/components/icons/IconBackLink.mjs.map +1 -1
  84. package/dist/js/packages/components/src/components/Icon/components/icons/IconBackup.mjs.map +1 -1
  85. package/dist/js/packages/components/src/components/Icon/components/icons/IconBold.mjs.map +1 -1
  86. package/dist/js/packages/components/src/components/Icon/components/icons/IconCamera.mjs.map +1 -1
  87. package/dist/js/packages/components/src/components/Icon/components/icons/IconCertificate.mjs.map +1 -1
  88. package/dist/js/packages/components/src/components/Icon/components/icons/IconChangelog.mjs.map +1 -1
  89. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheck.mjs.map +1 -1
  90. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxChecked.mjs.map +1 -1
  91. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxEmpty.mjs.map +1 -1
  92. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxIndeterminate.mjs.map +1 -1
  93. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronDown.mjs.map +1 -1
  94. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronLeft.mjs.map +1 -1
  95. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronRight.mjs.map +1 -1
  96. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronUp.mjs.map +1 -1
  97. package/dist/js/packages/components/src/components/Icon/components/icons/IconClose.mjs.map +1 -1
  98. package/dist/js/packages/components/src/components/Icon/components/icons/IconCode.mjs.map +1 -1
  99. package/dist/js/packages/components/src/components/Icon/components/icons/IconContainer.mjs.map +1 -1
  100. package/dist/js/packages/components/src/components/Icon/components/icons/IconContextMenu.mjs.map +1 -1
  101. package/dist/js/packages/components/src/components/Icon/components/icons/IconContextMenuVertical.mjs.map +1 -1
  102. package/dist/js/packages/components/src/components/Icon/components/icons/IconContract.mjs.map +1 -1
  103. package/dist/js/packages/components/src/components/Icon/components/icons/IconContractPartner.mjs.map +1 -1
  104. package/dist/js/packages/components/src/components/Icon/components/icons/IconContributor.mjs.map +1 -1
  105. package/dist/js/packages/components/src/components/Icon/components/icons/IconCopy.mjs.map +1 -1
  106. package/dist/js/packages/components/src/components/Icon/components/icons/IconCronjob.mjs.map +1 -1
  107. package/dist/js/packages/components/src/components/Icon/components/icons/IconCustomer.mjs.map +1 -1
  108. package/dist/js/packages/components/src/components/Icon/components/icons/IconDanger.mjs.map +1 -1
  109. package/dist/js/packages/components/src/components/Icon/components/icons/IconDashboard.mjs.map +1 -1
  110. package/dist/js/packages/components/src/components/Icon/components/icons/IconDatabase.mjs.map +1 -1
  111. package/dist/js/packages/components/src/components/Icon/components/icons/IconDate.mjs.map +1 -1
  112. package/dist/js/packages/components/src/components/Icon/components/icons/IconDelete.mjs.map +1 -1
  113. package/dist/js/packages/components/src/components/Icon/components/icons/IconDeliveryBox.mjs.map +1 -1
  114. package/dist/js/packages/components/src/components/Icon/components/icons/IconDescending.mjs.map +1 -1
  115. package/dist/js/packages/components/src/components/Icon/components/icons/IconDesktop.mjs.map +1 -1
  116. package/dist/js/packages/components/src/components/Icon/components/icons/IconDirectory.mjs.map +1 -1
  117. package/dist/js/packages/components/src/components/Icon/components/icons/IconDnsSubZone.mjs.map +1 -1
  118. package/dist/js/packages/components/src/components/Icon/components/icons/IconDnsZone.mjs.map +1 -1
  119. package/dist/js/packages/components/src/components/Icon/components/icons/IconDomain.mjs.map +1 -1
  120. package/dist/js/packages/components/src/components/Icon/components/icons/IconDownload.mjs.map +1 -1
  121. package/dist/js/packages/components/src/components/Icon/components/icons/IconEdit.mjs.map +1 -1
  122. package/dist/js/packages/components/src/components/Icon/components/icons/IconEmail.mjs.map +1 -1
  123. package/dist/js/packages/components/src/components/Icon/components/icons/IconEmailArchive.mjs.map +1 -1
  124. package/dist/js/packages/components/src/components/Icon/components/icons/IconExtension.mjs.map +1 -1
  125. package/dist/js/packages/components/src/components/Icon/components/icons/IconExternalLink.mjs.map +1 -1
  126. package/dist/js/packages/components/src/components/Icon/components/icons/IconFailed.mjs.map +1 -1
  127. package/dist/js/packages/components/src/components/Icon/components/icons/IconFeedback.mjs.map +1 -1
  128. package/dist/js/packages/components/src/components/Icon/components/icons/IconFile.mjs.map +1 -1
  129. package/dist/js/packages/components/src/components/Icon/components/icons/IconFilter.mjs.map +1 -1
  130. package/dist/js/packages/components/src/components/Icon/components/icons/IconForwardAddress.mjs.map +1 -1
  131. package/dist/js/packages/components/src/components/Icon/components/icons/IconForwardLink.mjs.map +1 -1
  132. package/dist/js/packages/components/src/components/Icon/components/icons/IconHide.mjs.map +1 -1
  133. package/dist/js/packages/components/src/components/Icon/components/icons/IconHome.mjs.map +1 -1
  134. package/dist/js/packages/components/src/components/Icon/components/icons/IconImage.mjs.map +1 -1
  135. package/dist/js/packages/components/src/components/Icon/components/icons/IconInfo.mjs.map +1 -1
  136. package/dist/js/packages/components/src/components/Icon/components/icons/IconInvite.mjs.map +1 -1
  137. package/dist/js/packages/components/src/components/Icon/components/icons/IconInvoice.mjs.map +1 -1
  138. package/dist/js/packages/components/src/components/Icon/components/icons/IconItalic.mjs.map +1 -1
  139. package/dist/js/packages/components/src/components/Icon/components/icons/IconKnowledgeHint.mjs.map +1 -1
  140. package/dist/js/packages/components/src/components/Icon/components/icons/IconLanguage.mjs.map +1 -1
  141. package/dist/js/packages/components/src/components/Icon/components/icons/IconLeadFyndr.mjs.map +1 -1
  142. package/dist/js/packages/components/src/components/Icon/components/icons/IconLink.mjs.map +1 -1
  143. package/dist/js/packages/components/src/components/Icon/components/icons/IconLock.mjs.map +1 -1
  144. package/dist/js/packages/components/src/components/Icon/components/icons/IconLockOpen.mjs.map +1 -1
  145. package/dist/js/packages/components/src/components/Icon/components/icons/IconLogout.mjs.map +1 -1
  146. package/dist/js/packages/components/src/components/Icon/components/icons/IconMainUser.mjs.map +1 -1
  147. package/dist/js/packages/components/src/components/Icon/components/icons/IconMarketplace.mjs.map +1 -1
  148. package/dist/js/packages/components/src/components/Icon/components/icons/IconMaximize.mjs.map +1 -1
  149. package/dist/js/packages/components/src/components/Icon/components/icons/IconMember.mjs.map +1 -1
  150. package/dist/js/packages/components/src/components/Icon/components/icons/IconMenu.mjs.map +1 -1
  151. package/dist/js/packages/components/src/components/Icon/components/icons/IconMinimize.mjs.map +1 -1
  152. package/dist/js/packages/components/src/components/Icon/components/icons/IconMinus.mjs.map +1 -1
  153. package/dist/js/packages/components/src/components/Icon/components/icons/IconMittwald.mjs.map +1 -1
  154. package/dist/js/packages/components/src/components/Icon/components/icons/IconMobile.mjs.map +1 -1
  155. package/dist/js/packages/components/src/components/Icon/components/icons/IconMonitoring.mjs.map +1 -1
  156. package/dist/js/packages/components/src/components/Icon/components/icons/IconMove.mjs.map +1 -1
  157. package/dist/js/packages/components/src/components/Icon/components/icons/IconNewsletter.mjs.map +1 -1
  158. package/dist/js/packages/components/src/components/Icon/components/icons/IconNotification.mjs.map +1 -1
  159. package/dist/js/packages/components/src/components/Icon/components/icons/IconNumber.mjs.map +1 -1
  160. package/dist/js/packages/components/src/components/Icon/components/icons/IconOrder.mjs.map +1 -1
  161. package/dist/js/packages/components/src/components/Icon/components/icons/IconOrderedList.mjs.map +1 -1
  162. package/dist/js/packages/components/src/components/Icon/components/icons/IconPassword.mjs.map +1 -1
  163. package/dist/js/packages/components/src/components/Icon/components/icons/IconPath.mjs.map +1 -1
  164. package/dist/js/packages/components/src/components/Icon/components/icons/IconPause.mjs.map +1 -1
  165. package/dist/js/packages/components/src/components/Icon/components/icons/IconPayment.mjs.map +1 -1
  166. package/dist/js/packages/components/src/components/Icon/components/icons/IconPending.mjs.map +1 -1
  167. package/dist/js/packages/components/src/components/Icon/components/icons/IconPicture.mjs.map +1 -1
  168. package/dist/js/packages/components/src/components/Icon/components/icons/IconPlus.mjs.map +1 -1
  169. package/dist/js/packages/components/src/components/Icon/components/icons/IconProject.mjs.map +1 -1
  170. package/dist/js/packages/components/src/components/Icon/components/icons/IconQuote.mjs.map +1 -1
  171. package/dist/js/packages/components/src/components/Icon/components/icons/IconRadioOff.mjs.map +1 -1
  172. package/dist/js/packages/components/src/components/Icon/components/icons/IconRadioOn.mjs.map +1 -1
  173. package/dist/js/packages/components/src/components/Icon/components/icons/IconRedo.mjs.map +1 -1
  174. package/dist/js/packages/components/src/components/Icon/components/icons/IconRefresh.mjs.map +1 -1
  175. package/dist/js/packages/components/src/components/Icon/components/icons/IconRegistry.mjs.map +1 -1
  176. package/dist/js/packages/components/src/components/Icon/components/icons/IconSave.mjs.map +1 -1
  177. package/dist/js/packages/components/src/components/Icon/components/icons/IconSearch.mjs.map +1 -1
  178. package/dist/js/packages/components/src/components/Icon/components/icons/IconSecurity.mjs.map +1 -1
  179. package/dist/js/packages/components/src/components/Icon/components/icons/IconSend.mjs.map +1 -1
  180. package/dist/js/packages/components/src/components/Icon/components/icons/IconServer.mjs.map +1 -1
  181. package/dist/js/packages/components/src/components/Icon/components/icons/IconSettings.mjs.map +1 -1
  182. package/dist/js/packages/components/src/components/Icon/components/icons/IconShare.mjs.map +1 -1
  183. package/dist/js/packages/components/src/components/Icon/components/icons/IconShow.mjs.map +1 -1
  184. package/dist/js/packages/components/src/components/Icon/components/icons/IconSorting.mjs.map +1 -1
  185. package/dist/js/packages/components/src/components/Icon/components/icons/IconSsh.mjs.map +1 -1
  186. package/dist/js/packages/components/src/components/Icon/components/icons/IconSshKey.mjs.map +1 -1
  187. package/dist/js/packages/components/src/components/Icon/components/icons/IconSshSftp.mjs.map +1 -1
  188. package/dist/js/packages/components/src/components/Icon/components/icons/IconStack.mjs.map +1 -1
  189. package/dist/js/packages/components/src/components/Icon/components/icons/IconStar.mjs.map +1 -1
  190. package/dist/js/packages/components/src/components/Icon/components/icons/IconStarFilled.mjs.map +1 -1
  191. package/dist/js/packages/components/src/components/Icon/components/icons/IconStart.mjs.map +1 -1
  192. package/dist/js/packages/components/src/components/Icon/components/icons/IconStrikeThrough.mjs.map +1 -1
  193. package/dist/js/packages/components/src/components/Icon/components/icons/IconSubdomain.mjs.map +1 -1
  194. package/dist/js/packages/components/src/components/Icon/components/icons/IconSucceeded.mjs.map +1 -1
  195. package/dist/js/packages/components/src/components/Icon/components/icons/IconSuccess.mjs.map +1 -1
  196. package/dist/js/packages/components/src/components/Icon/components/icons/IconSupport.mjs.map +1 -1
  197. package/dist/js/packages/components/src/components/Icon/components/icons/IconTerminate.mjs.map +1 -1
  198. package/dist/js/packages/components/src/components/Icon/components/icons/IconTicket.mjs.map +1 -1
  199. package/dist/js/packages/components/src/components/Icon/components/icons/IconTime.mjs.map +1 -1
  200. package/dist/js/packages/components/src/components/Icon/components/icons/IconUnavailable.mjs.map +1 -1
  201. package/dist/js/packages/components/src/components/Icon/components/icons/IconUndo.mjs.map +1 -1
  202. package/dist/js/packages/components/src/components/Icon/components/icons/IconUnorderedList.mjs.map +1 -1
  203. package/dist/js/packages/components/src/components/Icon/components/icons/IconUpload.mjs.map +1 -1
  204. package/dist/js/packages/components/src/components/Icon/components/icons/IconUser.mjs.map +1 -1
  205. package/dist/js/packages/components/src/components/Icon/components/icons/IconVhost.mjs.map +1 -1
  206. package/dist/js/packages/components/src/components/Icon/components/icons/IconView.mjs.map +1 -1
  207. package/dist/js/packages/components/src/components/Icon/components/icons/IconVolume.mjs.map +1 -1
  208. package/dist/js/packages/components/src/components/Icon/components/icons/IconWarning.mjs.map +1 -1
  209. package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map +1 -1
  210. package/dist/js/packages/components/src/components/Image/Image.mjs.map +1 -1
  211. package/dist/js/packages/components/src/components/ImageCropper/ImageCropper.mjs.map +1 -1
  212. package/dist/js/packages/components/src/components/Initials/Initials.mjs.map +1 -1
  213. package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs.map +1 -1
  214. package/dist/js/packages/components/src/components/InlineCode/InlineCode.mjs.map +1 -1
  215. package/dist/js/packages/components/src/components/Kbd/Kbd.mjs.map +1 -1
  216. package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
  217. package/dist/js/packages/components/src/components/LabeledValue/LabeledValue.mjs.map +1 -1
  218. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs +2 -1
  219. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs.map +1 -1
  220. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.module.mjs +3 -1
  221. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.module.mjs.map +1 -1
  222. package/dist/js/packages/components/src/components/Legend/Legend.mjs.map +1 -1
  223. package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs.map +1 -1
  224. package/dist/js/packages/components/src/components/LightBox/LightBox.mjs.map +1 -1
  225. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/Controls.mjs.map +1 -1
  226. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/LightBoxGallery.mjs.map +1 -1
  227. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGalleryItem/LightBoxGalleryItem.mjs.map +1 -1
  228. package/dist/js/packages/components/src/components/Link/Link.mjs.map +1 -1
  229. package/dist/js/packages/components/src/components/Link/components/LinkIcon/LinkIcon.mjs.map +1 -1
  230. package/dist/js/packages/components/src/components/List/List.mjs.map +1 -1
  231. package/dist/js/packages/components/src/components/List/components/DataLoader/DataLoaderSuspense.mjs.map +1 -1
  232. package/dist/js/packages/components/src/components/List/components/EmptySearchResultView/EmptySearchResultView.mjs.map +1 -1
  233. package/dist/js/packages/components/src/components/List/components/EmptyView/EmptyView.mjs.map +1 -1
  234. package/dist/js/packages/components/src/components/List/components/Footer/Footer.mjs.map +1 -1
  235. package/dist/js/packages/components/src/components/List/components/Footer/components/PaginationInfos/PaginationInfos.mjs.map +1 -1
  236. package/dist/js/packages/components/src/components/List/components/Footer/components/ShowNextBatchButton/ShowNextBatchButton.mjs.map +1 -1
  237. package/dist/js/packages/components/src/components/List/components/Header/Header.mjs.map +1 -1
  238. package/dist/js/packages/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs.map +1 -1
  239. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs.map +1 -1
  240. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionCheckboxGroup.mjs.map +1 -1
  241. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionDateRange.mjs.map +1 -1
  242. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionRadioGroup.mjs.map +1 -1
  243. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs.map +1 -1
  244. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs.map +1 -1
  245. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/DateRangeFilterPopover.mjs.map +1 -1
  246. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenu.mjs.map +1 -1
  247. package/dist/js/packages/components/src/components/List/components/Header/components/SearchField/SearchField.mjs.map +1 -1
  248. package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.mjs.map +1 -1
  249. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs.map +1 -1
  250. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs.map +1 -1
  251. package/dist/js/packages/components/src/components/List/components/Items/Items.mjs.map +1 -1
  252. package/dist/js/packages/components/src/components/List/components/Items/components/Item/Item.mjs.map +1 -1
  253. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs.map +1 -1
  254. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs.map +1 -1
  255. package/dist/js/packages/components/src/components/List/components/Items/views/GridListItem/GridListItem.mjs.map +1 -1
  256. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
  257. package/dist/js/packages/components/src/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.mjs.map +1 -1
  258. package/dist/js/packages/components/src/components/List/components/ListSummary/ListSummary.mjs.map +1 -1
  259. package/dist/js/packages/components/src/components/List/components/Table/Table.mjs.map +1 -1
  260. package/dist/js/packages/components/src/components/List/components/Table/components/TableBodyLoadingView.mjs.map +1 -1
  261. package/dist/js/packages/components/src/components/List/components/Table/components/TableRowSkeletonView.mjs.map +1 -1
  262. package/dist/js/packages/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
  263. package/dist/js/packages/components/src/components/List/views/EmptyView/EmptyView.mjs.map +1 -1
  264. package/dist/js/packages/components/src/components/List/views/EmptyViewContainer/EmptyViewContainer.mjs.map +1 -1
  265. package/dist/js/packages/components/src/components/LoadingSpinner/LoadingSpinner.mjs.map +1 -1
  266. package/dist/js/packages/components/src/components/Markdown/Markdown.mjs.map +1 -1
  267. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
  268. package/dist/js/packages/components/src/components/MarkdownEditor/components/AttachmentButton.mjs.map +1 -1
  269. package/dist/js/packages/components/src/components/MarkdownEditor/components/ModeButton.mjs.map +1 -1
  270. package/dist/js/packages/components/src/components/MarkdownEditor/components/Toolbar.mjs.map +1 -1
  271. package/dist/js/packages/components/src/components/MarkdownEditor/components/ToolbarButton.mjs.map +1 -1
  272. package/dist/js/packages/components/src/components/MarkdownEditor/lib/useFileUpload.mjs.map +1 -1
  273. package/dist/js/packages/components/src/components/MenuItem/MenuItem.mjs.map +1 -1
  274. package/dist/js/packages/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs.map +1 -1
  275. package/dist/js/packages/components/src/components/Message/Message.mjs.map +1 -1
  276. package/dist/js/packages/components/src/components/MessageThread/MessageThread.mjs.map +1 -1
  277. package/dist/js/packages/components/src/components/MessageThread/components/MessageSeparator/MessageSeparator.mjs.map +1 -1
  278. package/dist/js/packages/components/src/components/Modal/Modal.mjs.map +1 -1
  279. package/dist/js/packages/components/src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.mjs.map +1 -1
  280. package/dist/js/packages/components/src/components/Navigation/Navigation.mjs.map +1 -1
  281. package/dist/js/packages/components/src/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit.mjs.map +1 -1
  282. package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
  283. package/dist/js/packages/components/src/components/Notification/Notification.mjs.map +1 -1
  284. package/dist/js/packages/components/src/components/NotificationProvider/NotificationContainer/NotificationContainer.mjs.map +1 -1
  285. package/dist/js/packages/components/src/components/NumberField/NumberField.mjs.map +1 -1
  286. package/dist/js/packages/components/src/components/Option/Option.mjs.map +1 -1
  287. package/dist/js/packages/components/src/components/Options/Options.mjs.map +1 -1
  288. package/dist/js/packages/components/src/components/Overlay/Overlay.mjs.map +1 -1
  289. package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs.map +1 -1
  290. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
  291. package/dist/js/packages/components/src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.mjs.map +1 -1
  292. package/dist/js/packages/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs.map +1 -1
  293. package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs.map +1 -1
  294. package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.mjs.map +1 -1
  295. package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry.mjs.map +1 -1
  296. package/dist/js/packages/components/src/components/PasswordCreationField/lib/ariaAnnounce.mjs.map +1 -1
  297. package/dist/js/packages/components/src/components/Popover/Popover.mjs.map +1 -1
  298. package/dist/js/packages/components/src/components/Popover/components/NonModalPopoverContent/NonModalPopoverContent.mjs.map +1 -1
  299. package/dist/js/packages/components/src/components/Popover/components/PopoverContent/PopoverContent.mjs.map +1 -1
  300. package/dist/js/packages/components/src/components/Popover/components/PopoverTip/PopoverTip.mjs.map +1 -1
  301. package/dist/js/packages/components/src/components/Popover/viewportPadding.mjs.map +1 -1
  302. package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.mjs.map +1 -1
  303. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs.map +1 -1
  304. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarLegend.mjs.map +1 -1
  305. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarValue.mjs.map +1 -1
  306. package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs.map +1 -1
  307. package/dist/js/packages/components/src/components/RadioGroup/components/Radio/Radio.mjs.map +1 -1
  308. package/dist/js/packages/components/src/components/RadioGroup/components/RadioButton/RadioButton.mjs.map +1 -1
  309. package/dist/js/packages/components/src/components/Rating/Rating.mjs.map +1 -1
  310. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/EmptySegment.mjs.map +1 -1
  311. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/FilledSegment.mjs.map +1 -1
  312. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingSegment.mjs.map +1 -1
  313. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs.map +1 -1
  314. package/dist/js/packages/components/src/components/Section/Section.mjs.map +1 -1
  315. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
  316. package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  317. package/dist/js/packages/components/src/components/SegmentedControl/components/Segment/Segment.mjs.map +1 -1
  318. package/dist/js/packages/components/src/components/Select/Select.mjs.map +1 -1
  319. package/dist/js/packages/components/src/components/Separator/Separator.mjs.map +1 -1
  320. package/dist/js/packages/components/src/components/Skeleton/Skeleton.mjs.map +1 -1
  321. package/dist/js/packages/components/src/components/SkeletonText/SkeletonText.mjs.map +1 -1
  322. package/dist/js/packages/components/src/components/Slider/Slider.mjs.map +1 -1
  323. package/dist/js/packages/components/src/components/Switch/Switch.mjs.map +1 -1
  324. package/dist/js/packages/components/src/components/TabNavigation/TabNavigation.mjs.map +1 -1
  325. package/dist/js/packages/components/src/components/TabNavigation/components/LinkContent/LinkContent.mjs.map +1 -1
  326. package/dist/js/packages/components/src/components/Table/Table.mjs.map +1 -1
  327. package/dist/js/packages/components/src/components/Table/components/TableBody/TableBody.mjs.map +1 -1
  328. package/dist/js/packages/components/src/components/Table/components/TableCell/TableCell.mjs.map +1 -1
  329. package/dist/js/packages/components/src/components/Table/components/TableColumn/TableColumn.mjs.map +1 -1
  330. package/dist/js/packages/components/src/components/Table/components/TableHeader/TableHeader.mjs.map +1 -1
  331. package/dist/js/packages/components/src/components/Table/components/TableRow/TableRow.mjs.map +1 -1
  332. package/dist/js/packages/components/src/components/Tabs/Tabs.mjs.map +1 -1
  333. package/dist/js/packages/components/src/components/Tabs/components/FallbackTab/FallbackTab.mjs.map +1 -1
  334. package/dist/js/packages/components/src/components/Tabs/components/Tab/Tab.mjs.map +1 -1
  335. package/dist/js/packages/components/src/components/Tabs/components/TabList/TabList.mjs.map +1 -1
  336. package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.mjs.map +1 -1
  337. package/dist/js/packages/components/src/components/Text/Text.mjs.map +1 -1
  338. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs.map +1 -1
  339. package/dist/js/packages/components/src/components/TextField/TextField.mjs.map +1 -1
  340. package/dist/js/packages/components/src/components/TimeField/TimeField.mjs.map +1 -1
  341. package/dist/js/packages/components/src/components/Tooltip/Tooltip.mjs.map +1 -1
  342. package/dist/js/packages/components/src/components/Truncate/Truncate.mjs.map +1 -1
  343. package/dist/js/packages/components/src/components/TunnelEntry/TunnelEntry.mjs.map +1 -1
  344. package/dist/js/packages/components/src/integrations/nextjs/components/RouterProvider/RouterProvider.mjs.map +1 -1
  345. package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
  346. package/dist/js/packages/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
  347. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormAction.mjs.map +1 -1
  348. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs.map +1 -1
  349. package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs.map +1 -1
  350. package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs.map +1 -1
  351. package/dist/js/packages/components/src/lib/react/cloneElement.mjs.map +1 -1
  352. package/dist/js/packages/components/src/lib/react/components/Render/Render.mjs.map +1 -1
  353. package/dist/js/packages/components/src/lib/react/getPropsMerger.mjs.map +1 -1
  354. package/dist/js/packages/components/src/lib/theming/hooks/useDesignTokens.mjs.map +1 -1
  355. package/dist/js/packages/components/src/lib/tokens/CategoricalColors.mjs.map +1 -1
  356. package/dist/js/packages/components/src/lib/tokens/isCategoricalColor.mjs.map +1 -1
  357. package/dist/js/packages/components/src/status/componentStatus.mjs.map +1 -1
  358. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.mjs","names":[],"sources":["../../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport styles from \"./TextArea.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport {\n type PropsWithChildren,\n useEffect,\n useLayoutEffect,\n useState,\n} from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\n\nexport interface TextAreaProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\" | \"aria-hidden\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n /** Allows the user to manually resize the textArea horizontally. */\n allowResize?: boolean | \"horizontal\" | \"vertical\";\n /** @deprecated Use `allowResize` instead. */\n allowHorizontalResize?: boolean;\n /** @deprecated Use `allowResize` instead. */\n allowVerticalResize?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const warnDeprecation = useWarnDeprecation();\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowVerticalResize,\n allowHorizontalResize,\n showCharacterCount,\n className,\n onChange,\n isReadOnly,\n value,\n ...rest\n } = useControlledHostValueProps(props, \"\");\n\n if (allowHorizontalResize !== undefined) {\n warnDeprecation(\n \"The 'allowHorizontalResize' prop is deprecated and will be removed in a future release. Use 'allowResize' instead.\",\n );\n }\n if (allowVerticalResize !== undefined) {\n warnDeprecation(\n \"The 'allowVerticalResize' prop is deprecated and will be removed in a future release. Use 'allowResize' instead.\",\n );\n }\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n wrapperProps,\n controlProps,\n } = useFieldComponent(props, \"TextArea\");\n\n let { allowResize } = props;\n if (allowVerticalResize) {\n allowResize = \"vertical\";\n } else if (allowHorizontalResize) {\n allowResize = \"horizontal\";\n }\n\n const rootClassName = clsx(wrapperProps.className, className);\n\n const inputClassName = clsx(\n styles.input,\n typeof allowResize === \"boolean\" && allowResize ? styles.resize : null,\n allowResize === \"horizontal\"\n ? styles.horizontalResize\n : allowResize === \"vertical\"\n ? styles.verticalResize\n : null,\n );\n\n const handleChange = (v: string) => {\n if (isReadOnly) {\n return;\n }\n\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales, \"TextArea\");\n\n // Derived, so that a value the field never saw typed is counted as well.\n const charactersCountDescription = translation.format(\"characters\", {\n count: value.length,\n maxCount: props.maxLength ?? 0,\n });\n\n const localRef = useObjectRef(ref);\n\n const [resized, setResized] = useState(false);\n\n const autoResizable = rows !== autoResizeMaxRows;\n\n const verticallyResizable =\n allowResize && (!autoResizable || (autoResizable && resized));\n\n useEffect(() => {\n const textarea = localRef.current;\n if (!textarea) return;\n\n const startHeight = textarea.offsetHeight;\n let tracking = false;\n\n const handleMouseDown = () => {\n tracking = true;\n };\n\n const handleMouseMove = () => {\n if (!tracking || resized) return;\n\n const currentHeight = textarea.offsetHeight;\n\n if (currentHeight !== startHeight) {\n setResized(true);\n tracking = false;\n }\n };\n\n const handleMouseUp = () => {\n tracking = false;\n };\n\n window.addEventListener(\"mousedown\", handleMouseDown);\n window.addEventListener(\"mousemove\", handleMouseMove);\n window.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n window.removeEventListener(\"mousedown\", handleMouseDown);\n window.removeEventListener(\"mousemove\", handleMouseMove);\n window.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [resized]);\n\n /*\n * The height depends on the rendered content, so it cannot be a style. It is\n * synced to the value instead of to the `change` event, because a value the\n * field never saw typed — an initial value, or a draft loaded into a\n * controlled field — has to resize it just the same.\n */\n useLayoutEffect(() => {\n const textArea = localRef.current;\n if (!textArea || !autoResizable || verticallyResizable) {\n return;\n }\n // https://stackoverflow.com/a/60795884\n textArea.style.height = \"0px\";\n // + 2 to add border height\n textArea.style.height = `${textArea.scrollHeight + 2}px`;\n }, [value, autoResizable, verticallyResizable]);\n\n return (\n <Aria.TextField\n {...rest}\n {...controlProps}\n value={value}\n className={rootClassName}\n onChange={handleChange}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n <Aria.TextArea\n rows={rows}\n {...(isReadOnly ? { \"data-readonly\": true } : {})}\n aria-readonly={isReadOnly}\n aria-hidden={props[\"aria-hidden\"]}\n placeholder={placeholder}\n className={inputClassName}\n ref={localRef}\n style={{\n \"--text-area--rows\": rows,\n \"--text-area--max-rows\": verticallyResizable\n ? undefined\n : autoResizeMaxRows,\n }}\n />\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextArea;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyCA,IAAa,WAAW,cAAc,aAAa,UAAU;CAC3D,MAAM,kBAAkB,mBAAmB;CAC3C,MAAM,EACJ,UACA,aACA,OA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AAa,eAAe;EACpD,OAAO,iBAAiB,WAAW,aAAa;EAEhD,aAAa;GACX,OAAO,oBAAoB,aAAa,eAAe;GACvD,OAAO,oBAAoB,aAAa,eAAe;GACvD,OAAO,oBAAoB,WAAW,aAAa;EACrD;CACF,GAAG,CAAC,OAAO,CAAC;CAQZ,sBAAsB;EACpB,MAAM,WAAW,SAAS;EAC1B,IAAI,CAAC,YAAY,CAAC,iBAAiB,qBACjC;EAGF,SAAS,MAAM,SAAS;EAExB,SAAS,MAAM,SAAS,GAAG,SAAS,eAAe,EAAE;CACvD,GAAG;EAAC;EAAO;EAAe;CAAmB,CAAC;CAE9C,OACE,oBAAC,KAAK,WAAN;EACE,GAAI;EACJ,GAAI;EACG;EACP,WAAW;EACX,UAAU;EAEV,UAAA,qBAAC,sBAAD;GAAsB,OAAO;GAA7B,UAAA;IACE,oBAAC,0BAAD,EAA2B,SAAmC,CAAA;IAC9D,oBAAC,KAAK,UAAN;KACQ;KACN,GAAK,aAAa,EAAE,iBAAiB,KAAK,IAAI,CAAC;KAC/C,iBAAe;KACf,eAAa,MAAM;KACN;KACb,WAAW;KACX,KAAK;KACL,OAAO;MACL,qBAAqB;MACrB,yBAAyB,sBACrB,KAAA,IACA;KACN;IACD,CAAA;IACA,sBACC,oBAAC,kBAAD,EAAA,UAAmB,2BAA6C,CAAA;IAElE,oBAAC,gBAAD,CAAiB,CAAA;GACG;;CACR,CAAA;AAEpB,CAAC"}
1
+ {"version":3,"file":"TextArea.mjs","names":["styles","locales"],"sources":["../../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport styles from \"./TextArea.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport {\n type PropsWithChildren,\n useEffect,\n useLayoutEffect,\n useState,\n} from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\n\nexport interface TextAreaProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\" | \"aria-hidden\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n /** Allows the user to manually resize the textArea horizontally. */\n allowResize?: boolean | \"horizontal\" | \"vertical\";\n /** @deprecated Use `allowResize` instead. */\n allowHorizontalResize?: boolean;\n /** @deprecated Use `allowResize` instead. */\n allowVerticalResize?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const warnDeprecation = useWarnDeprecation();\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowVerticalResize,\n allowHorizontalResize,\n showCharacterCount,\n className,\n onChange,\n isReadOnly,\n value,\n ...rest\n } = useControlledHostValueProps(props, \"\");\n\n if (allowHorizontalResize !== undefined) {\n warnDeprecation(\n \"The 'allowHorizontalResize' prop is deprecated and will be removed in a future release. Use 'allowResize' instead.\",\n );\n }\n if (allowVerticalResize !== undefined) {\n warnDeprecation(\n \"The 'allowVerticalResize' prop is deprecated and will be removed in a future release. Use 'allowResize' instead.\",\n );\n }\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n wrapperProps,\n controlProps,\n } = useFieldComponent(props, \"TextArea\");\n\n let { allowResize } = props;\n if (allowVerticalResize) {\n allowResize = \"vertical\";\n } else if (allowHorizontalResize) {\n allowResize = \"horizontal\";\n }\n\n const rootClassName = clsx(wrapperProps.className, className);\n\n const inputClassName = clsx(\n styles.input,\n typeof allowResize === \"boolean\" && allowResize ? styles.resize : null,\n allowResize === \"horizontal\"\n ? styles.horizontalResize\n : allowResize === \"vertical\"\n ? styles.verticalResize\n : null,\n );\n\n const handleChange = (v: string) => {\n if (isReadOnly) {\n return;\n }\n\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales, \"TextArea\");\n\n // Derived, so that a value the field never saw typed is counted as well.\n const charactersCountDescription = translation.format(\"characters\", {\n count: value.length,\n maxCount: props.maxLength ?? 0,\n });\n\n const localRef = useObjectRef(ref);\n\n const [resized, setResized] = useState(false);\n\n const autoResizable = rows !== autoResizeMaxRows;\n\n const verticallyResizable =\n allowResize && (!autoResizable || (autoResizable && resized));\n\n useEffect(() => {\n const textarea = localRef.current;\n if (!textarea) return;\n\n const startHeight = textarea.offsetHeight;\n let tracking = false;\n\n const handleMouseDown = () => {\n tracking = true;\n };\n\n const handleMouseMove = () => {\n if (!tracking || resized) return;\n\n const currentHeight = textarea.offsetHeight;\n\n if (currentHeight !== startHeight) {\n setResized(true);\n tracking = false;\n }\n };\n\n const handleMouseUp = () => {\n tracking = false;\n };\n\n window.addEventListener(\"mousedown\", handleMouseDown);\n window.addEventListener(\"mousemove\", handleMouseMove);\n window.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n window.removeEventListener(\"mousedown\", handleMouseDown);\n window.removeEventListener(\"mousemove\", handleMouseMove);\n window.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [resized]);\n\n /*\n * The height depends on the rendered content, so it cannot be a style. It is\n * synced to the value instead of to the `change` event, because a value the\n * field never saw typed — an initial value, or a draft loaded into a\n * controlled field — has to resize it just the same.\n */\n useLayoutEffect(() => {\n const textArea = localRef.current;\n if (!textArea || !autoResizable || verticallyResizable) {\n return;\n }\n // https://stackoverflow.com/a/60795884\n textArea.style.height = \"0px\";\n // + 2 to add border height\n textArea.style.height = `${textArea.scrollHeight + 2}px`;\n }, [value, autoResizable, verticallyResizable]);\n\n return (\n <Aria.TextField\n {...rest}\n {...controlProps}\n value={value}\n className={rootClassName}\n onChange={handleChange}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n <Aria.TextArea\n rows={rows}\n {...(isReadOnly ? { \"data-readonly\": true } : {})}\n aria-readonly={isReadOnly}\n aria-hidden={props[\"aria-hidden\"]}\n placeholder={placeholder}\n className={inputClassName}\n ref={localRef}\n style={{\n \"--text-area--rows\": rows,\n \"--text-area--max-rows\": verticallyResizable\n ? undefined\n : autoResizeMaxRows,\n }}\n />\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextArea;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyCA,IAAa,WAAW,cAAc,aAAa,UAAU;CAC3D,MAAM,kBAAkB,mBAAmB;CAC3C,MAAM,EACJ,UACA,aACA,OAAO,GACP,oBAAoB,MACpB,KACA,qBACA,uBACA,oBACA,WACA,UACA,YACA,OACA,GAAG,SACD,4BAA4B,OAAO,EAAE;CAEzC,IAAI,0BAA0B,KAAA,GAC5B,gBACE,oHACF;CAEF,IAAI,wBAAwB,KAAA,GAC1B,gBACE,kHACF;CAGF,MAAM,EACJ,gBACA,0BACA,mBACA,cACA,iBACE,kBAAkB,OAAO,UAAU;CAEvC,IAAI,EAAE,gBAAgB;CACtB,IAAI,qBACF,cAAc;MACT,IAAI,uBACT,cAAc;CAGhB,MAAM,gBAAgB,KAAK,aAAa,WAAW,SAAS;CAE5D,MAAM,iBAAiB,KACrBA,wBAAO,OACP,OAAO,gBAAgB,aAAa,cAAcA,wBAAO,SAAS,MAClE,gBAAgB,eACZA,wBAAO,mBACP,gBAAgB,aACdA,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B,OAAO;GAA7B,UAAA;IACE,oBAAC,0BAAD,EAA2B,SAAmC,CAAA;IAC9D,oBAAC,KAAK,UAAN;KACQ;KACN,GAAK,aAAa,EAAE,iBAAiB,KAAK,IAAI,CAAC;KAC/C,iBAAe;KACf,eAAa,MAAM;KACN;KACb,WAAW;KACX,KAAK;KACL,OAAO;MACL,qBAAqB;MACrB,yBAAyB,sBACrB,KAAA,IACA;KACN;IACD,CAAA;IACA,sBACC,oBAAC,kBAAD,EAAA,UAAmB,2BAA6C,CAAA;IAElE,oBAAC,gBAAD,CAAiB,CAAA;GACG;;CACR,CAAA;AAEpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.mjs","names":[],"sources":["../../../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { type PropsWithChildren, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./TextField.module.scss\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport locales from \"./locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface TextFieldProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.InputProps, \"placeholder\">,\n FlowComponentProps<HTMLInputElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextField = flowComponent(\"TextField\", (props) => {\n const {\n className,\n showCharacterCount,\n form,\n placeholder,\n ref,\n type: typeFromProps,\n children,\n onChange,\n ...rest\n } = useControlledHostValueProps(props, \"\");\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const [type, setType] = useState(typeFromProps);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n wrapperProps,\n controlProps,\n } = useFieldComponent(props, \"TextField\");\n\n const rootClassName = clsx(wrapperProps.className, className);\n\n const propsContext: PropsContext = {\n Button: {\n className: styles.button,\n variant: \"plain\",\n color: \"secondary\",\n tunnel: {\n id: \"button\",\n component: \"TextField\",\n },\n },\n CopyButton: {\n className: styles.button,\n tunnel: {\n id: \"button\",\n component: \"TextField\",\n },\n },\n ...fieldPropsContext,\n };\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales, \"TextField\");\n\n const charactersCountDescription = translation.format(\"characters\", {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n });\n\n return (\n <Aria.TextField\n {...rest}\n {...controlProps}\n className={rootClassName}\n onChange={handleChange}\n type={type}\n >\n <PropsContextProvider props={propsContext}>\n <FieldErrorCaptureContext>\n {children}\n <div className={styles.inputContainer}>\n <Aria.Input\n form={form}\n placeholder={placeholder}\n className={styles.input}\n ref={ref}\n />\n <UiComponentTunnelExit id=\"button\" component=\"TextField\" />\n {typeFromProps === \"password\" && (\n <Button\n color=\"secondary\"\n variant=\"plain\"\n className={styles.button}\n onPress={() =>\n setType(type === \"password\" ? \"text\" : \"password\")\n }\n aria-label={translation.format(\n `password.${type === \"password\" ? \"show\" : \"hide\"}`,\n )}\n >\n {type === \"password\" ? <IconShow /> : <IconHide />}\n </Button>\n )}\n </div>\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.TextField>\n );\n});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,QAAD;OACE,OAAM;OACN,SAAQ;OACR,WAAW,yBAAO;OAClB,eACE,QAAQ,SAAS,aAAa,SAAS,UAAU;OAEnD,cAAY,YAAY,OACtB,YAAY,SAAS,aAAa,SAAS,QAC7C;OAEC,UAAA,SAAS,aAAa,oBAAC,UAAD,CAAW,CAAA,IAAI,oBAAC,UAAD,CAAW,CAAA;MAC3C,CAAA;KAEP;;IACJ,sBACC,oBAAC,kBAAD,EAAA,UAAmB,2BAA6C,CAAA;GAE1C,EAAA,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACG;;CACR,CAAA;AAEpB,CAAC"}
1
+ {"version":3,"file":"TextField.mjs","names":["styles","locales"],"sources":["../../../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { type PropsWithChildren, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./TextField.module.scss\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport locales from \"./locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface TextFieldProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.InputProps, \"placeholder\">,\n FlowComponentProps<HTMLInputElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextField = flowComponent(\"TextField\", (props) => {\n const {\n className,\n showCharacterCount,\n form,\n placeholder,\n ref,\n type: typeFromProps,\n children,\n onChange,\n ...rest\n } = useControlledHostValueProps(props, \"\");\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const [type, setType] = useState(typeFromProps);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n wrapperProps,\n controlProps,\n } = useFieldComponent(props, \"TextField\");\n\n const rootClassName = clsx(wrapperProps.className, className);\n\n const propsContext: PropsContext = {\n Button: {\n className: styles.button,\n variant: \"plain\",\n color: \"secondary\",\n tunnel: {\n id: \"button\",\n component: \"TextField\",\n },\n },\n CopyButton: {\n className: styles.button,\n tunnel: {\n id: \"button\",\n component: \"TextField\",\n },\n },\n ...fieldPropsContext,\n };\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales, \"TextField\");\n\n const charactersCountDescription = translation.format(\"characters\", {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n });\n\n return (\n <Aria.TextField\n {...rest}\n {...controlProps}\n className={rootClassName}\n onChange={handleChange}\n type={type}\n >\n <PropsContextProvider props={propsContext}>\n <FieldErrorCaptureContext>\n {children}\n <div className={styles.inputContainer}>\n <Aria.Input\n form={form}\n placeholder={placeholder}\n className={styles.input}\n ref={ref}\n />\n <UiComponentTunnelExit id=\"button\" component=\"TextField\" />\n {typeFromProps === \"password\" && (\n <Button\n color=\"secondary\"\n variant=\"plain\"\n className={styles.button}\n onPress={() =>\n setType(type === \"password\" ? \"text\" : \"password\")\n }\n aria-label={translation.format(\n `password.${type === \"password\" ? \"show\" : \"hide\"}`,\n )}\n >\n {type === \"password\" ? <IconShow /> : <IconHide />}\n </Button>\n )}\n </div>\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.TextField>\n );\n});\n\nexport default T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AD;OACE,OAAM;OACN,SAAQ;OACR,WAAWA,yBAAO;OAClB,eACE,QAAQ,SAAS,aAAa,SAAS,UAAU;OAEnD,cAAY,YAAY,OACtB,YAAY,SAAS,aAAa,SAAS,QAC7C;OAEC,UAAA,SAAS,aAAa,oBAAC,UAAD,CAAW,CAAA,IAAI,oBAAC,UAAD,CAAW,CAAA;MAC3C,CAAA;KAEP;;IACJ,sBACC,oBAAC,kBAAD,EAAA,UAAmB,2BAA6C,CAAA;GAE1C,EAAA,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACG;;CACR,CAAA;AAEpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TimeField.mjs","names":[],"sources":["../../../../../../../src/components/TimeField/TimeField.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport styles from \"./TimeField.module.scss\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport DateInput from \"@/components/DateInput\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\n\nexport interface TimeFieldProps<T extends Aria.TimeValue = Aria.TimeValue>\n extends\n PropsWithChildren<Omit<Aria.TimeFieldProps<T>, \"children\">>,\n FlowComponentProps<HTMLSpanElement> {}\n\n/** @flr-generate all */\nexport const TimeField = flowComponent(\"TimeField\", (props) => {\n // `null` is what react-aria's time field state uses for \"no time\"\n const { children, ref, ...rest } = useControlledHostValueProps(props, null);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n wrapperProps,\n controlProps,\n } = useFieldComponent(props, \"TimeField\");\n\n return (\n <Aria.TimeField\n hourCycle={24}\n {...rest}\n {...wrapperProps}\n {...controlProps}\n >\n <FieldErrorCaptureContext>\n <DateInput className={styles.dateInput} ref={ref} />\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </Aria.TimeField>\n );\n});\n\nexport default TimeField;\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAa,YAAY,cAAc,cAAc,UAAU;CAE7D,MAAM,EAAE,UAAU,KAAK,GAAG,SAAS,4BAA4B,OAAO,IAAI;CAE1E,MAAM,EACJ,gBACA,0BACA,mBACA,cACA,iBACE,kBAAkB,OAAO,WAAW;CAExC,OACE,qBAAC,KAAK,WAAN;EACE,WAAW;EACX,GAAI;EACJ,GAAI;EACJ,GAAI;EAJN,UAAA,CAME,qBAAC,0BAAD,EAAA,UAAA,CACE,oBAAC,WAAD;GAAW,WAAW,yBAAO;GAAgB;EAAM,CAAA,GACnD,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA,CACE,EAAA,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACH;;AAEpB,CAAC"}
1
+ {"version":3,"file":"TimeField.mjs","names":["styles"],"sources":["../../../../../../../src/components/TimeField/TimeField.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport styles from \"./TimeField.module.scss\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport DateInput from \"@/components/DateInput\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\n\nexport interface TimeFieldProps<T extends Aria.TimeValue = Aria.TimeValue>\n extends\n PropsWithChildren<Omit<Aria.TimeFieldProps<T>, \"children\">>,\n FlowComponentProps<HTMLSpanElement> {}\n\n/** @flr-generate all */\nexport const TimeField = flowComponent(\"TimeField\", (props) => {\n // `null` is what react-aria's time field state uses for \"no time\"\n const { children, ref, ...rest } = useControlledHostValueProps(props, null);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n wrapperProps,\n controlProps,\n } = useFieldComponent(props, \"TimeField\");\n\n return (\n <Aria.TimeField\n hourCycle={24}\n {...rest}\n {...wrapperProps}\n {...controlProps}\n >\n <FieldErrorCaptureContext>\n <DateInput className={styles.dateInput} ref={ref} />\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </Aria.TimeField>\n );\n});\n\nexport default TimeField;\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAa,YAAY,cAAc,cAAc,UAAU;CAE7D,MAAM,EAAE,UAAU,KAAK,GAAG,SAAS,4BAA4B,OAAO,IAAI;CAE1E,MAAM,EACJ,gBACA,0BACA,mBACA,cACA,iBACE,kBAAkB,OAAO,WAAW;CAExC,OACE,qBAAC,KAAK,WAAN;EACE,WAAW;EACX,GAAI;EACJ,GAAI;EACJ,GAAI;EAJN,UAAA,CAME,qBAAC,0BAAD,EAAA,UAAA,CACE,oBAAC,WAAD;GAAW,WAAWA,yBAAO;GAAgB;EAAM,CAAA,GACnD,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA,CACE,EAAA,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACH;;AAEpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.mjs","names":[],"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 { ClearPropsContext } from \"@/components/ClearPropsContext\";\nimport { useIsActivityActive } from \"@/components/Activity/context\";\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 isActivityActive = useIsActivityActive();\n\n const rootClassName = clsx(styles.tooltip, className);\n\n if (!isActivityActive) {\n return null;\n }\n\n return (\n <ClearPropsContext>\n <Aria.Tooltip {...rest} className={rootClassName}>\n <Aria.OverlayArrow className={styles.tip}>\n <svg className={styles.tipIcon} 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 </ClearPropsContext>\n );\n};\n\nexport default Tooltip;\n"],"mappings":";;;;;;;;;;AAYA,IAAa,WAA6B,UAAU;CAClD,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;CAEzC,MAAM,mBAAmB,oBAAoB;CAE7C,MAAM,gBAAgB,KAAK,uBAAO,SAAS,SAAS;CAEpD,IAAI,CAAC,kBACH,OAAO;CAGT,OACE,oBAAC,mBAAD,EAAA,UACE,qBAAC,KAAK,SAAN;EAAc,GAAI;EAAM,WAAW;EAAnC,UAAA,CACE,oBAAC,KAAK,cAAN;GAAmB,WAAW,uBAAO;GACnC,UAAA,oBAAC,OAAD;IAAK,WAAW,uBAAO;IAAS,SAAQ;IACtC,UAAA,oBAAC,QAAD,EAAM,GAAE,iBAAkB,CAAA;GACvB,CAAA;EACY,CAAA,GAClB,QACW;CACG,CAAA,EAAA,CAAA;AAEvB"}
1
+ {"version":3,"file":"Tooltip.mjs","names":["styles"],"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 { ClearPropsContext } from \"@/components/ClearPropsContext\";\nimport { useIsActivityActive } from \"@/components/Activity/context\";\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 isActivityActive = useIsActivityActive();\n\n const rootClassName = clsx(styles.tooltip, className);\n\n if (!isActivityActive) {\n return null;\n }\n\n return (\n <ClearPropsContext>\n <Aria.Tooltip {...rest} className={rootClassName}>\n <Aria.OverlayArrow className={styles.tip}>\n <svg className={styles.tipIcon} 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 </ClearPropsContext>\n );\n};\n\nexport default Tooltip;\n"],"mappings":";;;;;;;;;;AAYA,IAAa,WAA6B,UAAU;CAClD,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;CAEzC,MAAM,mBAAmB,oBAAoB;CAE7C,MAAM,gBAAgB,KAAKA,uBAAO,SAAS,SAAS;CAEpD,IAAI,CAAC,kBACH,OAAO;CAGT,OACE,oBAAC,mBAAD,EAAA,UACE,qBAAC,KAAK,SAAN;EAAc,GAAI;EAAM,WAAW;EAAnC,UAAA,CACE,oBAAC,KAAK,cAAN;GAAmB,WAAWA,uBAAO;GACnC,UAAA,oBAAC,OAAD;IAAK,WAAWA,uBAAO;IAAS,SAAQ;IACtC,UAAA,oBAAC,QAAD,EAAM,GAAE,iBAAkB,CAAA;GACvB,CAAA;EACY,CAAA,GAClB,QACW;CACG,CAAA,EAAA,CAAA;AAEvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Truncate.mjs","names":[],"sources":["../../../../../../../src/components/Truncate/Truncate.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./Truncate.module.scss\";\nimport type { TruncateProps as ReactTruncateProps } from \"react-truncate-inside\";\nimport ReactTruncate from \"react-truncate-inside\";\nimport { extractTextFromFirstChild } from \"@/lib/react/remote\";\nimport { useIsSSR } from \"react-aria\";\n\nexport interface TruncateProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Omit<ReactTruncateProps, \"text\" | \"width\"> {\n /**\n * The `title` attribute of the elements root, which browsers show as a native\n * tooltip on hover. It is not derived from the children — pass the full text\n * to make it readable while truncated.\n */\n title?: string;\n}\n\n/** @flr-generate all */\nexport const Truncate: FC<TruncateProps> = (props) => {\n const { children, className, title, offset, ellipsis } = props;\n\n const rootClassName = clsx(styles.truncate, className);\n\n const isSsr = useIsSSR();\n\n if (!isSsr && (offset || ellipsis)) {\n const text = extractTextFromFirstChild(children) ?? \"\";\n\n return (\n <span title={title} className={rootClassName}>\n <ReactTruncate offset={offset} ellipsis={ellipsis} text={text} />\n </span>\n );\n }\n\n return (\n <span title={title} className={clsx(rootClassName, styles.ellipsis)}>\n {children}\n </span>\n );\n};\n\nexport default Truncate;\n"],"mappings":";;;;;;;;;;AAuBA,IAAa,YAA+B,UAAU;CACpD,MAAM,EAAE,UAAU,WAAW,OAAO,QAAQ,aAAa;CAEzD,MAAM,gBAAgB,KAAK,wBAAO,UAAU,SAAS;CAIrD,IAAI,CAFU,SAET,MAAU,UAAU,WAAW;EAClC,MAAM,OAAO,0BAA0B,QAAQ,KAAK;EAEpD,OACE,oBAAC,QAAD;GAAa;GAAO,WAAW;GAC7B,UAAA,oBAAC,eAAD;IAAuB;IAAkB;IAAgB;GAAO,CAAA;EAC5D,CAAA;CAEV;CAEA,OACE,oBAAC,QAAD;EAAa;EAAO,WAAW,KAAK,eAAe,wBAAO,QAAQ;EAC/D;CACG,CAAA;AAEV"}
1
+ {"version":3,"file":"Truncate.mjs","names":["styles"],"sources":["../../../../../../../src/components/Truncate/Truncate.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./Truncate.module.scss\";\nimport type { TruncateProps as ReactTruncateProps } from \"react-truncate-inside\";\nimport ReactTruncate from \"react-truncate-inside\";\nimport { extractTextFromFirstChild } from \"@/lib/react/remote\";\nimport { useIsSSR } from \"react-aria\";\n\nexport interface TruncateProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Omit<ReactTruncateProps, \"text\" | \"width\"> {\n /**\n * The `title` attribute of the elements root, which browsers show as a native\n * tooltip on hover. It is not derived from the children — pass the full text\n * to make it readable while truncated.\n */\n title?: string;\n}\n\n/** @flr-generate all */\nexport const Truncate: FC<TruncateProps> = (props) => {\n const { children, className, title, offset, ellipsis } = props;\n\n const rootClassName = clsx(styles.truncate, className);\n\n const isSsr = useIsSSR();\n\n if (!isSsr && (offset || ellipsis)) {\n const text = extractTextFromFirstChild(children) ?? \"\";\n\n return (\n <span title={title} className={rootClassName}>\n <ReactTruncate offset={offset} ellipsis={ellipsis} text={text} />\n </span>\n );\n }\n\n return (\n <span title={title} className={clsx(rootClassName, styles.ellipsis)}>\n {children}\n </span>\n );\n};\n\nexport default Truncate;\n"],"mappings":";;;;;;;;;;AAuBA,IAAa,YAA+B,UAAU;CACpD,MAAM,EAAE,UAAU,WAAW,OAAO,QAAQ,aAAa;CAEzD,MAAM,gBAAgB,KAAKA,wBAAO,UAAU,SAAS;CAIrD,IAAI,CAFU,SAET,MAAU,UAAU,WAAW;EAClC,MAAM,OAAO,0BAA0B,QAAQ,KAAK;EAEpD,OACE,oBAAC,QAAD;GAAa;GAAO,WAAW;GAC7B,UAAA,oBAAC,eAAD;IAAuB;IAAkB;IAAgB;GAAO,CAAA;EAC5D,CAAA;CAEV;CAEA,OACE,oBAAC,QAAD;EAAa;EAAO,WAAW,KAAK,eAAeA,wBAAO,QAAQ;EAC/D;CACG,CAAA;AAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"TunnelEntry.mjs","names":[],"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-ignore-props providerId\n */\nexport const TunnelEntry: FC<TunnelEntryProps> = (props) => (\n <ReactTunnelEntry {...props} />\n);\n\nexport default TunnelEntry;\n"],"mappings":";;;;;;;;;AAUA,IAAa,iBAAqC,UAChD,oBAAC,aAAD,EAAkB,GAAI,MAAQ,CAAA"}
1
+ {"version":3,"file":"TunnelEntry.mjs","names":["TunnelEntry","ReactTunnelEntry"],"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-ignore-props providerId\n */\nexport const TunnelEntry: FC<TunnelEntryProps> = (props) => (\n <ReactTunnelEntry {...props} />\n);\n\nexport default TunnelEntry;\n"],"mappings":";;;;;;;;;AAUA,IAAaA,iBAAqC,UAChD,oBAACC,aAAD,EAAkB,GAAI,MAAQ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"RouterProvider.mjs","names":[],"sources":["../../../../../../../../../src/integrations/nextjs/components/RouterProvider/RouterProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { RouterProvider as BaseRouterProvider } from \"react-aria-components\";\nimport { useRouter } from \"next/navigation\";\nimport { addBasePath } from \"next/dist/client/add-base-path\";\n\nexport const RouterProvider: FC<PropsWithChildren> = (props) => {\n const router = useRouter();\n return (\n <BaseRouterProvider navigate={router.push} useHref={addBasePath}>\n {props.children}\n </BaseRouterProvider>\n );\n};\n\nexport default RouterProvider;\n"],"mappings":";;;;;;;AAKA,IAAa,oBAAyC,UAAU;CAC9D,MAAM,SAAS,UAAU;CACzB,OACE,oBAAC,gBAAD;EAAoB,UAAU,OAAO;EAAM,SAAS;EACjD,UAAA,MAAM;CACW,CAAA;AAExB"}
1
+ {"version":3,"file":"RouterProvider.mjs","names":["RouterProvider","BaseRouterProvider"],"sources":["../../../../../../../../../src/integrations/nextjs/components/RouterProvider/RouterProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { RouterProvider as BaseRouterProvider } from \"react-aria-components\";\nimport { useRouter } from \"next/navigation\";\nimport { addBasePath } from \"next/dist/client/add-base-path\";\n\nexport const RouterProvider: FC<PropsWithChildren> = (props) => {\n const router = useRouter();\n return (\n <BaseRouterProvider navigate={router.push} useHref={addBasePath}>\n {props.children}\n </BaseRouterProvider>\n );\n};\n\nexport default RouterProvider;\n"],"mappings":";;;;;;;AAKA,IAAaA,oBAAyC,UAAU;CAC9D,MAAM,SAAS,UAAU;CACzB,OACE,oBAACC,gBAAD;EAAoB,UAAU,OAAO;EAAM,SAAS;EACjD,UAAA,MAAM;CACW,CAAA;AAExB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Field.mjs","names":[],"sources":["../../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { type PropsWithChildren } from \"react\";\nimport {\n type ControllerProps,\n type FieldValues,\n useController,\n type UseFormReturn,\n useWatch,\n} from \"react-hook-form\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useUpdateFormDefaultValue } from \"@/integrations/react-hook-form/components/Field/hooks/useUpdateFormDefaultValue\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">, PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(\n locales,\n \"ReactHookForm.Field\",\n );\n\n const controller = useController({\n ...props,\n rules: {\n ...props.rules,\n min:\n typeof rest.rules?.min === \"number\"\n ? {\n value: rest.rules.min,\n message: stringFormatter.format(\"validation.min\", {\n number: rest.rules.min,\n }),\n }\n : rest.rules?.min,\n max:\n typeof rest.rules?.max === \"number\"\n ? {\n value: rest.rules.max,\n message: stringFormatter.format(\"validation.max\", {\n number: rest.rules.max,\n }),\n }\n : rest.rules?.max,\n required:\n typeof rest.rules?.required === \"boolean\"\n ? stringFormatter.format(\"validation.required\")\n : rest.rules?.required,\n pattern:\n rest.rules?.pattern instanceof RegExp\n ? {\n value: rest.rules.pattern,\n message: stringFormatter.format(\"validation.pattern\", {\n pattern: rest.rules.pattern.source,\n }),\n }\n : rest.rules?.pattern,\n minLength:\n typeof rest.rules?.minLength === \"number\"\n ? {\n value: rest.rules.minLength,\n message: stringFormatter.format(\"validation.minLength\", {\n number: rest.rules.minLength,\n }),\n }\n : rest.rules?.minLength,\n maxLength:\n typeof rest.rules?.maxLength === \"number\"\n ? {\n value: rest.rules.maxLength,\n message: stringFormatter.format(\"validation.maxLength\", {\n number: rest.rules.maxLength,\n }),\n }\n : rest.rules?.maxLength,\n },\n });\n const formContext = useFormContext<T>();\n\n useUpdateFormDefaultValue(props, formContext.form);\n\n /**\n * We don't use controller.field.value here, because it doesn't update when\n * the form value is updated outside of this field (e.g. when setting values\n * with form.setValue or resetting the form), and the Field unmounts in\n * between. This is generally a feature of React Hook Form, but this breaks\n * dynamic forms where fields are conditionally rendered.\n *\n * By using formContext.form.watch(name), we ensure that the field value is\n * always in sync with the form state. See:\n * https://react-hook-form.com/api/usecontroller/controller/\n */\n const value =\n useWatch({\n control: formContext.form.control,\n name,\n }) ?? controller.field.value;\n\n const isFieldInvalid = controller.fieldState.invalid;\n\n const fieldProps = {\n ...controller.field,\n value,\n name,\n form: formContext.id,\n isRequired: !!rest.rules?.required,\n isReadOnly: formContext.isReadOnly,\n validationBehavior: \"aria\" as const,\n defaultValue,\n isInvalid: isFieldInvalid,\n children: dynamic((p) => {\n return (\n <>\n {p.children}\n <FieldErrorView>\n {controller.fieldState.error?.message}\n </FieldErrorView>\n </>\n );\n }),\n };\n\n const propsContext: PropsContext = {\n Autocomplete: {\n SearchField: fieldProps,\n TextField: fieldProps,\n },\n SearchField: fieldProps,\n TextField: fieldProps,\n TextArea: fieldProps,\n MarkdownEditor: fieldProps,\n CodeEditor: fieldProps,\n Checkbox: {\n ...fieldProps,\n isSelected: value,\n },\n CheckboxGroup: {\n ...fieldProps,\n },\n CheckboxButton: {\n ...fieldProps,\n isSelected: value,\n },\n FileField: fieldProps,\n FileDropZone: fieldProps,\n NumberField: fieldProps,\n RadioGroup: fieldProps,\n Switch: {\n ...fieldProps,\n isSelected: value,\n },\n Slider: fieldProps,\n PasswordCreationField: fieldProps,\n DatePicker: fieldProps,\n DateRangePicker: fieldProps,\n TimeField: fieldProps,\n SegmentedControl: fieldProps,\n Select: {\n ...fieldProps,\n selectedKey: value,\n },\n ComboBox: {\n ...fieldProps,\n selectedKey: value,\n },\n Rating: fieldProps,\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[\n controller.fieldState,\n controller.field,\n value,\n formContext.isReadOnly,\n ]}\n >\n {children}\n </PropsContextProvider>\n );\n}\n\nexport const typedField = <T extends FieldValues>(\n ignoredForm: UseFormReturn<T> | UseFormReturn<T>[\"control\"],\n): typeof Field<T> => Field;\n\nexport default Field;\n"],"mappings":";;;;;;;;;;;;;AAsBA,SAAgB,MAA6B,OAAsB;CACjE,MAAM,EAAE,UAAU,MAAM,cAAc,GAAG,SAAS;CAElD,MAAM,kBAAkB,4BACtB,kBACA,qBACF;CAEA,MAAM,aAAa,cAAc;EAC/B,GAAG;EACH,OAAO;GACL,GAAG,MAAM;GACT,KACE,OAAO,KAAK,OAAO,QAAQ,WACvB;IACE,OAAO,KAAK,MAAM;IAClB,SAAS,gBAAgB,OAAO,kBAAkB,EAChD,QAAQ,KAAK,MAAM,IACrB,CAAC;GACH,IACA,KAAK,OAAO;GAClB,KACE,OAAO,KAAK,OAAO,QAAQ,WACvB;IACE,OAAO,KAAK,MAAM;IAClB,SAAS,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Aa;EACb,WAAW;EACX,UAAU;EACV,gBAAgB;EAChB,YAAY;EACZ,UAAU;GACR,GAAG;GACH,YAAY;EACd;EACA,eAAe,EACb,GAAG,WACL;EACA,gBAAgB;GACd,GAAG;GACH,YAAY;EACd;EACA,WAAW;EACX,cAAc;EACd,aAAa;EACb,YAAY;EACZ,QAAQ;GACN,GAAG;GACH,YAAY;EACd;EACA,QAAQ;EACR,uBAAuB;EACvB,YAAY;EACZ,iBAAiB;EACjB,WAAW;EACX,kBAAkB;EAClB,QAAQ;GACN,GAAG;GACH,aAAa;EACf;EACA,UAAU;GACR,GAAG;GACH,aAAa;EACf;EACA,QAAQ;CACV;CAEA,OACE,oBAAC,sBAAD;EACE,OAAO;EACP,cAAc;GACZ,WAAW;GACX,WAAW;GACX;GACA,YAAY;EACd;EAEC;CACmB,CAAA;AAE1B;AAEA,IAAa,cACX,gBACoB"}
1
+ {"version":3,"file":"Field.mjs","names":["locales","_Fragment"],"sources":["../../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { type PropsWithChildren } from \"react\";\nimport {\n type ControllerProps,\n type FieldValues,\n useController,\n type UseFormReturn,\n useWatch,\n} from \"react-hook-form\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useUpdateFormDefaultValue } from \"@/integrations/react-hook-form/components/Field/hooks/useUpdateFormDefaultValue\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">, PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(\n locales,\n \"ReactHookForm.Field\",\n );\n\n const controller = useController({\n ...props,\n rules: {\n ...props.rules,\n min:\n typeof rest.rules?.min === \"number\"\n ? {\n value: rest.rules.min,\n message: stringFormatter.format(\"validation.min\", {\n number: rest.rules.min,\n }),\n }\n : rest.rules?.min,\n max:\n typeof rest.rules?.max === \"number\"\n ? {\n value: rest.rules.max,\n message: stringFormatter.format(\"validation.max\", {\n number: rest.rules.max,\n }),\n }\n : rest.rules?.max,\n required:\n typeof rest.rules?.required === \"boolean\"\n ? stringFormatter.format(\"validation.required\")\n : rest.rules?.required,\n pattern:\n rest.rules?.pattern instanceof RegExp\n ? {\n value: rest.rules.pattern,\n message: stringFormatter.format(\"validation.pattern\", {\n pattern: rest.rules.pattern.source,\n }),\n }\n : rest.rules?.pattern,\n minLength:\n typeof rest.rules?.minLength === \"number\"\n ? {\n value: rest.rules.minLength,\n message: stringFormatter.format(\"validation.minLength\", {\n number: rest.rules.minLength,\n }),\n }\n : rest.rules?.minLength,\n maxLength:\n typeof rest.rules?.maxLength === \"number\"\n ? {\n value: rest.rules.maxLength,\n message: stringFormatter.format(\"validation.maxLength\", {\n number: rest.rules.maxLength,\n }),\n }\n : rest.rules?.maxLength,\n },\n });\n const formContext = useFormContext<T>();\n\n useUpdateFormDefaultValue(props, formContext.form);\n\n /**\n * We don't use controller.field.value here, because it doesn't update when\n * the form value is updated outside of this field (e.g. when setting values\n * with form.setValue or resetting the form), and the Field unmounts in\n * between. This is generally a feature of React Hook Form, but this breaks\n * dynamic forms where fields are conditionally rendered.\n *\n * By using formContext.form.watch(name), we ensure that the field value is\n * always in sync with the form state. See:\n * https://react-hook-form.com/api/usecontroller/controller/\n */\n const value =\n useWatch({\n control: formContext.form.control,\n name,\n }) ?? controller.field.value;\n\n const isFieldInvalid = controller.fieldState.invalid;\n\n const fieldProps = {\n ...controller.field,\n value,\n name,\n form: formContext.id,\n isRequired: !!rest.rules?.required,\n isReadOnly: formContext.isReadOnly,\n validationBehavior: \"aria\" as const,\n defaultValue,\n isInvalid: isFieldInvalid,\n children: dynamic((p) => {\n return (\n <>\n {p.children}\n <FieldErrorView>\n {controller.fieldState.error?.message}\n </FieldErrorView>\n </>\n );\n }),\n };\n\n const propsContext: PropsContext = {\n Autocomplete: {\n SearchField: fieldProps,\n TextField: fieldProps,\n },\n SearchField: fieldProps,\n TextField: fieldProps,\n TextArea: fieldProps,\n MarkdownEditor: fieldProps,\n CodeEditor: fieldProps,\n Checkbox: {\n ...fieldProps,\n isSelected: value,\n },\n CheckboxGroup: {\n ...fieldProps,\n },\n CheckboxButton: {\n ...fieldProps,\n isSelected: value,\n },\n FileField: fieldProps,\n FileDropZone: fieldProps,\n NumberField: fieldProps,\n RadioGroup: fieldProps,\n Switch: {\n ...fieldProps,\n isSelected: value,\n },\n Slider: fieldProps,\n PasswordCreationField: fieldProps,\n DatePicker: fieldProps,\n DateRangePicker: fieldProps,\n TimeField: fieldProps,\n SegmentedControl: fieldProps,\n Select: {\n ...fieldProps,\n selectedKey: value,\n },\n ComboBox: {\n ...fieldProps,\n selectedKey: value,\n },\n Rating: fieldProps,\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[\n controller.fieldState,\n controller.field,\n value,\n formContext.isReadOnly,\n ]}\n >\n {children}\n </PropsContextProvider>\n );\n}\n\nexport const typedField = <T extends FieldValues>(\n ignoredForm: UseFormReturn<T> | UseFormReturn<T>[\"control\"],\n): typeof Field<T> => Field;\n\nexport default Field;\n"],"mappings":";;;;;;;;;;;;;AAsBA,SAAgB,MAA6B,OAAsB;CACjE,MAAM,EAAE,UAAU,MAAM,cAAc,GAAG,SAAS;CAElD,MAAM,kBAAkB,4BACtBA,kBACA,qBACF;CAEA,MAAM,aAAa,cAAc;EAC/B,GAAG;EACH,OAAO;GACL,GAAG,MAAM;GACT,KACE,OAAO,KAAK,OAAO,QAAQ,WACvB;IACE,OAAO,KAAK,MAAM;IAClB,SAAS,gBAAgB,OAAO,kBAAkB,EAChD,QAAQ,KAAK,MAAM,IACrB,CAAC;GAC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B,EAAA,CAAA;EAEN,CAAC;CACH;CAEA,MAAM,eAA6B;EACjC,cAAc;GACZ,aAAa;GACb,WAAW;EACb;EACA,aAAa;EACb,WAAW;EACX,UAAU;EACV,gBAAgB;EAChB,YAAY;EACZ,UAAU;GACR,GAAG;GACH,YAAY;EACd;EACA,eAAe,EACb,GAAG,WACL;EACA,gBAAgB;GACd,GAAG;GACH,YAAY;EACd;EACA,WAAW;EACX,cAAc;EACd,aAAa;EACb,YAAY;EACZ,QAAQ;GACN,GAAG;GACH,YAAY;EACd;EACA,QAAQ;EACR,uBAAuB;EACvB,YAAY;EACZ,iBAAiB;EACjB,WAAW;EACX,kBAAkB;EAClB,QAAQ;GACN,GAAG;GACH,aAAa;EACf;EACA,UAAU;GACR,GAAG;GACH,aAAa;EACf;EACA,QAAQ;CACV;CAEA,OACE,oBAAC,sBAAD;EACE,OAAO;EACP,cAAc;GACZ,WAAW;GACX,WAAW;GACX;GACA,YAAY;EACd;EAEC;CACmB,CAAA;AAE1B;AAEA,IAAa,cACX,gBACoB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Form.mjs","names":[],"sources":["../../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import { FormContextProvider } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport { useComponentDefaults } from \"@/components/ComponentDefaultsProvider\";\nimport { type OverlayController, useModalController } from \"@/lib/controller\";\nimport {\n type BaseSyntheticEvent,\n type ComponentProps,\n type FC,\n type PropsWithChildren,\n type Ref,\n type SubmitEventHandler,\n useId,\n useMemo,\n useRef,\n} from \"react\";\nimport type {\n FieldValues,\n Path,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { useFormRootErrorController } from \"../FormRootError/useFormRootErrorController\";\nimport { FormRootError } from \"../../lib/FormRootError\";\nimport { useFormSettings } from \"../FormSettingsProvider/FormSettingsProvider\";\nimport {\n useFormSubmitController,\n type WithFormSubmitControllerProps,\n} from \"@/integrations/react-hook-form/components/Form/hooks/useFormSubmitController\";\nimport { useHotkeySubmit } from \"@/integrations/react-hook-form/components/Form/hooks/useHotkeySubmit\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\nexport type AfterFormSubmitCallback = (...unknownArgs: unknown[]) => unknown;\n\nexport interface FormAutoResetOptions {\n /**\n * Whether the form is reset to its default values after the surrounding modal\n * has closed.\n *\n * @default true\n */\n onAfterModalClose?: boolean;\n}\n\ntype FormComponentType = FC<\n PropsWithChildren<{\n id: string;\n onSubmit?: SubmitEventHandler | FormOnSubmitHandler<never>;\n ref?: Ref<HTMLFormElement>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends\n Omit<ComponentProps<\"form\">, \"onSubmit\">,\n PropsWithChildren,\n WithFormSubmitControllerProps {\n /** The react-hook-form instance returned by `useForm()`. */\n form: UseFormReturn<F>;\n /**\n * Called with the validated form values when the form is submitted. Returning\n * a promise keeps the submit button pending until it settles.\n */\n onSubmit: FormOnSubmitHandler<F>;\n /**\n * The component rendered as the form element. Use it to render the form with\n * a routers form component. Defaults to a plain `<form />`.\n */\n formComponent?: FC<Omit<FormComponentType, \"ref\">>;\n /**\n * Whether all fields of the form can be read but not edited.\n *\n * @default false\n */\n isReadOnly?: boolean;\n /**\n * When the form is reset to its default values. `true` resets it after the\n * surrounding modal has closed, `false` never resets it.\n *\n * @default true\n */\n autoReset?: FormAutoResetOptions | boolean;\n /**\n * Whether closing the surrounding modal must be confirmed while the form has\n * unsaved changes. Overrides `Form.confirmModalCloseOnUnsavedChanges` of the\n * `ComponentDefaultsProvider`.\n *\n * @default true\n */\n confirmModalCloseOnUnsavedChanges?: boolean;\n}\n\nconst DefaultFormComponent: FormComponentType = (p) => <form {...p} />;\n\n/**\n * Runs `operation` while closing the surrounding Modal is allowed without a\n * confirmation, and drops that permission again as soon as the operation has\n * settled. Scoping it to the operation is what keeps a submit that only\n * advances a wizard step from disarming the confirmation for good (#2775).\n */\nconst runWithGrantedModalClose = (\n modalController: OverlayController,\n operation: () => unknown,\n): unknown => {\n const releaseGrant = modalController.grantCloseWithoutConfirmation();\n\n let result: unknown;\n try {\n result = operation();\n } catch (error) {\n releaseGrant();\n throw error;\n }\n\n if (result instanceof Promise) {\n return result.finally(releaseGrant);\n }\n releaseGrant();\n return result;\n};\n\nexport function Form<F extends FieldValues>(props: FormProps<F>) {\n const {\n form,\n children,\n onSubmit: onSubmitProp,\n formComponent = DefaultFormComponent,\n isReadOnly,\n ref,\n id: idProp,\n autoReset = true,\n confirmModalCloseOnUnsavedChanges: confirmModalCloseOnUnsavedChangesProp,\n submitController: submitControllerFromProps,\n ...formProps\n } = props;\n\n const newFormId = useId();\n const formId = idProp ?? newFormId;\n const FormComponent = useMemo(() => formComponent, [formId]);\n const afterSubmitCallback = useRef<AfterFormSubmitCallback>(undefined);\n const { isDirty } = form.formState;\n const rootErrorController = useFormRootErrorController();\n\n const defaultSubmitController = useFormSubmitController();\n const submitController = submitControllerFromProps\n ? submitControllerFromProps.submit.extend(defaultSubmitController)\n : defaultSubmitController;\n\n const autoResetOptions =\n typeof autoReset === \"boolean\"\n ? { onAfterModalClose: autoReset }\n : autoReset;\n\n const defaults = useComponentDefaults(\"Form\");\n const confirmModalCloseOnUnsavedChanges =\n confirmModalCloseOnUnsavedChangesProp ??\n defaults.confirmModalCloseOnUnsavedChanges;\n\n const modalController = useModalController();\n modalController.useUpdateOptions({\n // A dirty Form contributes one close confirmation source to the surrounding\n // Modal; sources are combined, so a clean Form does not overrule a\n // `<Modal confirmOnClose>`. The Modal renders the confirmation dialog.\n // A Form that switched it off contributes nothing at all.\n confirmOnClose: confirmModalCloseOnUnsavedChanges ? isDirty : undefined,\n });\n modalController.useOnClosed(() => {\n if (autoResetOptions?.onAfterModalClose) {\n form.reset();\n }\n });\n\n const { submitInterceptor } = useFormSettings();\n const onSubmit = submitInterceptor\n ? (values: F) => submitInterceptor<F>(onSubmitProp, values, { form })\n : onSubmitProp;\n\n const handleSubmitResult = (result: unknown) => {\n if (typeof result === \"function\") {\n afterSubmitCallback.current = result as AfterFormSubmitCallback;\n }\n const rootError = form.getFieldState(\"root\" as Path<F>)?.error;\n if (rootError && !rootErrorController.errorComponentMounted) {\n throw new FormRootError(rootError);\n }\n };\n\n const handleSubmit = async (e?: BaseSyntheticEvent | F): Promise<void> => {\n const formEvent =\n e && \"nativeEvent\" in e ? (e as BaseSyntheticEvent) : undefined;\n formEvent?.stopPropagation();\n\n // react-hook-form's submit handler resolves with an unknown value; the\n // submit controller only awaits it, so drop the result.\n await form.handleSubmit((values, event) =>\n runWithGrantedModalClose(modalController, () => {\n const submitResult = onSubmit(values, event);\n if (submitResult instanceof Promise) {\n return submitResult.then(handleSubmitResult);\n }\n handleSubmitResult(submitResult);\n }),\n )(formEvent);\n };\n submitController.submit.set(handleSubmit);\n\n const onAfterSuccessFeedback = () => {\n const callback = afterSubmitCallback.current;\n if (!callback) {\n return;\n }\n // The callback runs after the submit itself has finished (and after\n // SubmitButton's success feedback), so it needs its own permission to close\n // the Modal.\n runWithGrantedModalClose(modalController, callback);\n };\n\n const refWithHotkeySubmit = useHotkeySubmit({\n ref,\n submitController,\n });\n\n return (\n <RhfFormContextProvider {...form}>\n <FormContextProvider\n form={form as UseFormReturn}\n isReadOnly={isReadOnly}\n id={formId}\n onAfterSuccessFeedback={onAfterSuccessFeedback}\n rootErrorController={rootErrorController}\n >\n <FormComponent\n {...formProps}\n ref={refWithHotkeySubmit}\n id={formId}\n onSubmit={handleSubmit}\n >\n {children}\n </FormComponent>\n </FormContextProvider>\n </RhfFormContextProvider>\n );\n}\n\nexport default Form;\n"],"mappings":";;;;;;;;;;;;;;AA4FA,IAAM,wBAA2C,MAAM,oBAAC,QAAD,EAAM,GAAI,EAAI,CAAA;;;;;;;AAQrE,IAAM,4BACJ,iBACA,cACY;CACZ,MAAM,eAAe,gBAAgB,8BAA8B;CAEnE,IAAI;CACJ,IAA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,MAA8C;EACxE,MAAM,YACJ,KAAK,iBAAiB,IAAK,IAA2B,KAAA;EACxD,WAAW,gBAAgB;EAI3B,MAAM,KAAK,cAAc,QAAQ,UAC/B,yBAAyB,uBAAuB;GAC9C,MAAM,eAAe,SAAS,QAAQ,KAAK;GAC3C,IAAI,wBAAwB,SAC1B,OAAO,aAAa,KAAK,kBAAkB;GAE7C,mBAAmB,YAAY;EACjC,CAAC,CACH,CAAC,CAAC,SAAS;CACb;CACA,iBAAiB,OAAO,IAAI,YAAY;CAExC,MAAM,+BAA+B;EACnC,MAAM,WAAW,oBAAoB;EACrC,IAAI,CAAC,UACH;EAKF,yBAAyB,iBAAiB,QAAQ;CACpD;CAEA,MAAM,sBAAsB,gBAAgB;EAC1C;EACA;CACF,CAAC;CAED,OACE,oBAAC,cAAD;EAAwB,GAAI;EAC1B,UAAA,oBAAC,qBAAD;GACQ;GACM;GACZ,IAAI;GACoB;GACH;GAErB,UAAA,oBAAC,eAAD;IACE,GAAI;IACJ,KAAK;IACL,IAAI;IACJ,UAAU;IAET;GACY,CAAA;EACI,CAAA;CACC,CAAA;AAE5B"}
1
+ {"version":3,"file":"Form.mjs","names":["RhfFormContextProvider"],"sources":["../../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import { FormContextProvider } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport { useComponentDefaults } from \"@/components/ComponentDefaultsProvider\";\nimport { type OverlayController, useModalController } from \"@/lib/controller\";\nimport {\n type BaseSyntheticEvent,\n type ComponentProps,\n type FC,\n type PropsWithChildren,\n type Ref,\n type SubmitEventHandler,\n useId,\n useMemo,\n useRef,\n} from \"react\";\nimport type {\n FieldValues,\n Path,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { useFormRootErrorController } from \"../FormRootError/useFormRootErrorController\";\nimport { FormRootError } from \"../../lib/FormRootError\";\nimport { useFormSettings } from \"../FormSettingsProvider/FormSettingsProvider\";\nimport {\n useFormSubmitController,\n type WithFormSubmitControllerProps,\n} from \"@/integrations/react-hook-form/components/Form/hooks/useFormSubmitController\";\nimport { useHotkeySubmit } from \"@/integrations/react-hook-form/components/Form/hooks/useHotkeySubmit\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\nexport type AfterFormSubmitCallback = (...unknownArgs: unknown[]) => unknown;\n\nexport interface FormAutoResetOptions {\n /**\n * Whether the form is reset to its default values after the surrounding modal\n * has closed.\n *\n * @default true\n */\n onAfterModalClose?: boolean;\n}\n\ntype FormComponentType = FC<\n PropsWithChildren<{\n id: string;\n onSubmit?: SubmitEventHandler | FormOnSubmitHandler<never>;\n ref?: Ref<HTMLFormElement>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends\n Omit<ComponentProps<\"form\">, \"onSubmit\">,\n PropsWithChildren,\n WithFormSubmitControllerProps {\n /** The react-hook-form instance returned by `useForm()`. */\n form: UseFormReturn<F>;\n /**\n * Called with the validated form values when the form is submitted. Returning\n * a promise keeps the submit button pending until it settles.\n */\n onSubmit: FormOnSubmitHandler<F>;\n /**\n * The component rendered as the form element. Use it to render the form with\n * a routers form component. Defaults to a plain `<form />`.\n */\n formComponent?: FC<Omit<FormComponentType, \"ref\">>;\n /**\n * Whether all fields of the form can be read but not edited.\n *\n * @default false\n */\n isReadOnly?: boolean;\n /**\n * When the form is reset to its default values. `true` resets it after the\n * surrounding modal has closed, `false` never resets it.\n *\n * @default true\n */\n autoReset?: FormAutoResetOptions | boolean;\n /**\n * Whether closing the surrounding modal must be confirmed while the form has\n * unsaved changes. Overrides `Form.confirmModalCloseOnUnsavedChanges` of the\n * `ComponentDefaultsProvider`.\n *\n * @default true\n */\n confirmModalCloseOnUnsavedChanges?: boolean;\n}\n\nconst DefaultFormComponent: FormComponentType = (p) => <form {...p} />;\n\n/**\n * Runs `operation` while closing the surrounding Modal is allowed without a\n * confirmation, and drops that permission again as soon as the operation has\n * settled. Scoping it to the operation is what keeps a submit that only\n * advances a wizard step from disarming the confirmation for good (#2775).\n */\nconst runWithGrantedModalClose = (\n modalController: OverlayController,\n operation: () => unknown,\n): unknown => {\n const releaseGrant = modalController.grantCloseWithoutConfirmation();\n\n let result: unknown;\n try {\n result = operation();\n } catch (error) {\n releaseGrant();\n throw error;\n }\n\n if (result instanceof Promise) {\n return result.finally(releaseGrant);\n }\n releaseGrant();\n return result;\n};\n\nexport function Form<F extends FieldValues>(props: FormProps<F>) {\n const {\n form,\n children,\n onSubmit: onSubmitProp,\n formComponent = DefaultFormComponent,\n isReadOnly,\n ref,\n id: idProp,\n autoReset = true,\n confirmModalCloseOnUnsavedChanges: confirmModalCloseOnUnsavedChangesProp,\n submitController: submitControllerFromProps,\n ...formProps\n } = props;\n\n const newFormId = useId();\n const formId = idProp ?? newFormId;\n const FormComponent = useMemo(() => formComponent, [formId]);\n const afterSubmitCallback = useRef<AfterFormSubmitCallback>(undefined);\n const { isDirty } = form.formState;\n const rootErrorController = useFormRootErrorController();\n\n const defaultSubmitController = useFormSubmitController();\n const submitController = submitControllerFromProps\n ? submitControllerFromProps.submit.extend(defaultSubmitController)\n : defaultSubmitController;\n\n const autoResetOptions =\n typeof autoReset === \"boolean\"\n ? { onAfterModalClose: autoReset }\n : autoReset;\n\n const defaults = useComponentDefaults(\"Form\");\n const confirmModalCloseOnUnsavedChanges =\n confirmModalCloseOnUnsavedChangesProp ??\n defaults.confirmModalCloseOnUnsavedChanges;\n\n const modalController = useModalController();\n modalController.useUpdateOptions({\n // A dirty Form contributes one close confirmation source to the surrounding\n // Modal; sources are combined, so a clean Form does not overrule a\n // `<Modal confirmOnClose>`. The Modal renders the confirmation dialog.\n // A Form that switched it off contributes nothing at all.\n confirmOnClose: confirmModalCloseOnUnsavedChanges ? isDirty : undefined,\n });\n modalController.useOnClosed(() => {\n if (autoResetOptions?.onAfterModalClose) {\n form.reset();\n }\n });\n\n const { submitInterceptor } = useFormSettings();\n const onSubmit = submitInterceptor\n ? (values: F) => submitInterceptor<F>(onSubmitProp, values, { form })\n : onSubmitProp;\n\n const handleSubmitResult = (result: unknown) => {\n if (typeof result === \"function\") {\n afterSubmitCallback.current = result as AfterFormSubmitCallback;\n }\n const rootError = form.getFieldState(\"root\" as Path<F>)?.error;\n if (rootError && !rootErrorController.errorComponentMounted) {\n throw new FormRootError(rootError);\n }\n };\n\n const handleSubmit = async (e?: BaseSyntheticEvent | F): Promise<void> => {\n const formEvent =\n e && \"nativeEvent\" in e ? (e as BaseSyntheticEvent) : undefined;\n formEvent?.stopPropagation();\n\n // react-hook-form's submit handler resolves with an unknown value; the\n // submit controller only awaits it, so drop the result.\n await form.handleSubmit((values, event) =>\n runWithGrantedModalClose(modalController, () => {\n const submitResult = onSubmit(values, event);\n if (submitResult instanceof Promise) {\n return submitResult.then(handleSubmitResult);\n }\n handleSubmitResult(submitResult);\n }),\n )(formEvent);\n };\n submitController.submit.set(handleSubmit);\n\n const onAfterSuccessFeedback = () => {\n const callback = afterSubmitCallback.current;\n if (!callback) {\n return;\n }\n // The callback runs after the submit itself has finished (and after\n // SubmitButton's success feedback), so it needs its own permission to close\n // the Modal.\n runWithGrantedModalClose(modalController, callback);\n };\n\n const refWithHotkeySubmit = useHotkeySubmit({\n ref,\n submitController,\n });\n\n return (\n <RhfFormContextProvider {...form}>\n <FormContextProvider\n form={form as UseFormReturn}\n isReadOnly={isReadOnly}\n id={formId}\n onAfterSuccessFeedback={onAfterSuccessFeedback}\n rootErrorController={rootErrorController}\n >\n <FormComponent\n {...formProps}\n ref={refWithHotkeySubmit}\n id={formId}\n onSubmit={handleSubmit}\n >\n {children}\n </FormComponent>\n </FormContextProvider>\n </RhfFormContextProvider>\n );\n}\n\nexport default Form;\n"],"mappings":";;;;;;;;;;;;;;AA4FA,IAAM,wBAA2C,MAAM,oBAAC,QAAD,EAAM,GAAI,EAAI,CAAA;;;;;;;AAQrE,IAAM,4BACJ,iBACA,cACY;CACZ,MAA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,IAAI,cAAc,SAAS;CAErC;CAEA,MAAM,eAAe,OAAO,MAA8C;EACxE,MAAM,YACJ,KAAK,iBAAiB,IAAK,IAA2B,KAAA;EACxD,WAAW,gBAAgB;EAI3B,MAAM,KAAK,cAAc,QAAQ,UAC/B,yBAAyB,uBAAuB;GAC9C,MAAM,eAAe,SAAS,QAAQ,KAAK;GAC3C,IAAI,wBAAwB,SAC1B,OAAO,aAAa,KAAK,kBAAkB;GAE7C,mBAAmB,YAAY;EACjC,CAAC,CACH,CAAC,CAAC,SAAS;CACb;CACA,iBAAiB,OAAO,IAAI,YAAY;CAExC,MAAM,+BAA+B;EACnC,MAAM,WAAW,oBAAoB;EACrC,IAAI,CAAC,UACH;EAKF,yBAAyB,iBAAiB,QAAQ;CACpD;CAEA,MAAM,sBAAsB,gBAAgB;EAC1C;EACA;CACF,CAAC;CAED,OACE,oBAACA,cAAD;EAAwB,GAAI;EAC1B,UAAA,oBAAC,qBAAD;GACQ;GACM;GACZ,IAAI;GACoB;GACH;GAErB,UAAA,oBAAC,eAAD;IACE,GAAI;IACJ,KAAK;IACL,IAAI;IACJ,UAAU;IAET;GACY,CAAA;EACI,CAAA;CACC,CAAA;AAE5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormAction.mjs","names":[],"sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormAction/FormAction.tsx"],"sourcesContent":["import type { ActionProps } from \"@/components/Action/types\";\nimport { FormResetAction } from \"@/integrations/react-hook-form/components/FormAction/FormResetAction\";\nimport FormSubmitAction from \"@/integrations/react-hook-form/components/FormAction/FormSubmitAction\";\nimport type { FC, PropsWithChildren } from \"react\";\n\ntype SupportedActionProps = Pick<ActionProps, \"showFeedback\">;\n\nexport interface FormActionProps\n extends PropsWithChildren, SupportedActionProps {\n reset?: boolean;\n submit?: boolean;\n}\n\nexport const FormAction: FC<FormActionProps> = (props) => {\n const { children, reset, submit, ...actionProps } = props;\n\n if (submit) {\n return <FormSubmitAction {...actionProps}>{children}</FormSubmitAction>;\n }\n\n if (reset) {\n return <FormResetAction {...actionProps}>{children}</FormResetAction>;\n }\n\n return <>{children}</>;\n};\n\nexport default FormAction;\n"],"mappings":";;;;;;AAaA,IAAa,cAAmC,UAAU;CACxD,MAAM,EAAE,UAAU,OAAO,QAAQ,GAAG,gBAAgB;CAEpD,IAAI,QACF,OAAO,oBAAC,kBAAD;EAAkB,GAAI;EAAc;CAA2B,CAAA;CAGxE,IAAI,OACF,OAAO,oBAAC,iBAAD;EAAiB,GAAI;EAAc;CAA0B,CAAA;CAGtE,OAAO,oBAAA,UAAA,EAAG,SAAW,CAAA;AACvB"}
1
+ {"version":3,"file":"FormAction.mjs","names":["_Fragment"],"sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormAction/FormAction.tsx"],"sourcesContent":["import type { ActionProps } from \"@/components/Action/types\";\nimport { FormResetAction } from \"@/integrations/react-hook-form/components/FormAction/FormResetAction\";\nimport FormSubmitAction from \"@/integrations/react-hook-form/components/FormAction/FormSubmitAction\";\nimport type { FC, PropsWithChildren } from \"react\";\n\ntype SupportedActionProps = Pick<ActionProps, \"showFeedback\">;\n\nexport interface FormActionProps\n extends PropsWithChildren, SupportedActionProps {\n reset?: boolean;\n submit?: boolean;\n}\n\nexport const FormAction: FC<FormActionProps> = (props) => {\n const { children, reset, submit, ...actionProps } = props;\n\n if (submit) {\n return <FormSubmitAction {...actionProps}>{children}</FormSubmitAction>;\n }\n\n if (reset) {\n return <FormResetAction {...actionProps}>{children}</FormResetAction>;\n }\n\n return <>{children}</>;\n};\n\nexport default FormAction;\n"],"mappings":";;;;;;AAaA,IAAa,cAAmC,UAAU;CACxD,MAAM,EAAE,UAAU,OAAO,QAAQ,GAAG,gBAAgB;CAEpD,IAAI,QACF,OAAO,oBAAC,kBAAD;EAAkB,GAAI;EAAc;CAA2B,CAAA;CAGxE,IAAI,OACF,OAAO,oBAAC,iBAAD;EAAiB,GAAI;EAAc;CAA0B,CAAA;CAGtE,OAAO,oBAAAA,UAAA,EAAG,SAAW,CAAA;AACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormRootError.mjs","names":[],"sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormRootError/FormRootError.tsx"],"sourcesContent":["import type { FC, ReactNode } from \"react\";\nimport type { FieldErrors } from \"react-hook-form\";\nimport { useFormContext } from \"../FormContextProvider\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useMountedFormRootErrorComponent } from \"./useMountedFormRootErrorComponent\";\n\nexport type FormRootErrorValue = NonNullable<FieldErrors[\"root\"]>;\n\nexport interface FormRootErrorProps {\n /**\n * Custom content shown instead of the default alert. Rendered only while a\n * root error is set. A function receives the root error, e.g. to pick the\n * content by its `type`.\n */\n children?: ReactNode | ((error: FormRootErrorValue) => ReactNode);\n}\n\n/** @flowStatus new */\nexport const FormRootError: FC<FormRootErrorProps> = (props) => {\n const { children } = props;\n const form = useFormContext().form;\n useMountedFormRootErrorComponent();\n const error = form.formState.errors.root;\n\n if (children === undefined) {\n return <FieldErrorView renderAlert>{error?.message}</FieldErrorView>;\n }\n\n if (!error) {\n return null;\n }\n\n return <>{typeof children === \"function\" ? children(error) : children}</>;\n};\n\nexport default FormRootError;\n"],"mappings":";;;;;;;;AAkBA,IAAa,iBAAyC,UAAU;CAC9D,MAAM,EAAE,aAAa;CACrB,MAAM,OAAO,eAAe,CAAC,CAAC;CAC9B,iCAAiC;CACjC,MAAM,QAAQ,KAAK,UAAU,OAAO;CAEpC,IAAI,aAAa,KAAA,GACf,OAAO,oBAAC,gBAAD;EAAgB,aAAA;EAAa,UAAA,OAAO;CAAwB,CAAA;CAGrE,IAAI,CAAC,OACH,OAAO;CAGT,OAAO,oBAAA,UAAA,EAAA,UAAG,OAAO,aAAa,aAAa,SAAS,KAAK,IAAI,SAAW,CAAA;AAC1E"}
1
+ {"version":3,"file":"FormRootError.mjs","names":["_Fragment"],"sources":["../../../../../../../../../src/integrations/react-hook-form/components/FormRootError/FormRootError.tsx"],"sourcesContent":["import type { FC, ReactNode } from \"react\";\nimport type { FieldErrors } from \"react-hook-form\";\nimport { useFormContext } from \"../FormContextProvider\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useMountedFormRootErrorComponent } from \"./useMountedFormRootErrorComponent\";\n\nexport type FormRootErrorValue = NonNullable<FieldErrors[\"root\"]>;\n\nexport interface FormRootErrorProps {\n /**\n * Custom content shown instead of the default alert. Rendered only while a\n * root error is set. A function receives the root error, e.g. to pick the\n * content by its `type`.\n */\n children?: ReactNode | ((error: FormRootErrorValue) => ReactNode);\n}\n\n/** @flowStatus new */\nexport const FormRootError: FC<FormRootErrorProps> = (props) => {\n const { children } = props;\n const form = useFormContext().form;\n useMountedFormRootErrorComponent();\n const error = form.formState.errors.root;\n\n if (children === undefined) {\n return <FieldErrorView renderAlert>{error?.message}</FieldErrorView>;\n }\n\n if (!error) {\n return null;\n }\n\n return <>{typeof children === \"function\" ? children(error) : children}</>;\n};\n\nexport default FormRootError;\n"],"mappings":";;;;;;;;AAkBA,IAAa,iBAAyC,UAAU;CAC9D,MAAM,EAAE,aAAa;CACrB,MAAM,OAAO,eAAe,CAAC,CAAC;CAC9B,iCAAiC;CACjC,MAAM,QAAQ,KAAK,UAAU,OAAO;CAEpC,IAAI,aAAa,KAAA,GACf,OAAO,oBAAC,gBAAD;EAAgB,aAAA;EAAa,UAAA,OAAO;CAAwB,CAAA;CAGrE,IAAI,CAAC,OACH,OAAO;CAGT,OAAO,oBAAAA,UAAA,EAAA,UAAG,OAAO,aAAa,aAAa,SAAS,KAAK,IAAI,SAAW,CAAA;AAC1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFieldComponent.mjs","names":[],"sources":["../../../../../../../src/lib/hooks/useFieldComponent.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, useId } from \"react\";\nimport { type PropsContext } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { useFieldError } from \"@/lib/hooks/useFieldError\";\nimport { type ClassValue } from \"clsx\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\ninterface FieldComponentProps {\n className?: ClassValue;\n isRequired?: boolean;\n isDisabled?: boolean;\n \"aria-describedby\"?: string;\n}\n\nexport interface UseFieldComponent {\n FieldErrorCaptureContext: FC<PropsWithChildren>;\n FieldErrorView: FC;\n fieldPropsContext: PropsContext;\n /** For the field's outer element. */\n wrapperProps: {\n className: string;\n };\n /**\n * For what assistive technology lands on — the input, or the group of a\n * grouped control. Where the react-aria root forwards `aria-describedby` to\n * its input itself, spread it on the root together with `wrapperProps`.\n * Spread it after `rest`: it already contains the consumer's\n * `aria-describedby`, which `rest` would otherwise put back alone.\n */\n controlProps: {\n \"aria-describedby\"?: string;\n };\n /** The id of the error while one is rendered, without the consumer's ids. */\n renderedFieldErrorId?: string;\n}\n\n/** Joins id references, dropping empty ones. @internal */\nexport const joinIds = (...ids: (string | false | null | undefined)[]) =>\n ids.filter(Boolean).join(\" \") || undefined;\n\nexport const useFieldComponent = (\n props: FieldComponentProps,\n component: FlowComponentName,\n): UseFieldComponent => {\n const fieldErrorId = useId();\n const { FieldErrorView, FieldErrorCaptureContext, renderedFieldErrorId } =\n useFieldError({\n fieldErrorId,\n component,\n });\n\n // setting up the props context for all components that\n // are part of a form control\n const fieldPropsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n optional: !props.isRequired,\n isDisabled: !!props.isDisabled,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n },\n };\n\n return {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n wrapperProps: {\n className: formFieldStyles.formField,\n },\n controlProps: {\n // Reference the error only while it is rendered – an id that points to\n // nothing fails HTML validators and a11y checks.\n \"aria-describedby\": joinIds(\n renderedFieldErrorId,\n props[\"aria-describedby\"],\n ),\n },\n renderedFieldErrorId,\n } as const;\n};\n"],"mappings":";;;;;;;;AAqCA,IAAa,WAAW,GAAG,QACzB,IAAI,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA;AAEnC,IAAa,qBACX,OACA,cACsB;CACtB,MAAM,eAAe,MAAM;CAC3B,MAAM,EAAE,gBAAgB,0BAA0B,yBAChD,cAAc;EACZ;EACA;CACF,CAAC;CAeH,OAAO;EACL;EACA;EACA,mBAAA;GAbA,OAAO;IACL,WAAW,yBAAgB;IAC3B,UAAU,CAAC,MAAM;IACjB,YAAY,CAAC,CAAC,MAAM;GACtB;GACA,kBAAkB,EAChB,WAAW,yBAAgB,iBAC7B;EAMA;EACA,cAAc,EACZ,WAAW,yBAAgB,UAC7B;EACA,cAAc,EAGZ,oBAAoB,QAClB,sBACA,MAAM,mBACR,EACF;EACA;CACF;AACF"}
1
+ {"version":3,"file":"useFieldComponent.mjs","names":["formFieldStyles"],"sources":["../../../../../../../src/lib/hooks/useFieldComponent.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, useId } from \"react\";\nimport { type PropsContext } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { useFieldError } from \"@/lib/hooks/useFieldError\";\nimport { type ClassValue } from \"clsx\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\ninterface FieldComponentProps {\n className?: ClassValue;\n isRequired?: boolean;\n isDisabled?: boolean;\n \"aria-describedby\"?: string;\n}\n\nexport interface UseFieldComponent {\n FieldErrorCaptureContext: FC<PropsWithChildren>;\n FieldErrorView: FC;\n fieldPropsContext: PropsContext;\n /** For the field's outer element. */\n wrapperProps: {\n className: string;\n };\n /**\n * For what assistive technology lands on — the input, or the group of a\n * grouped control. Where the react-aria root forwards `aria-describedby` to\n * its input itself, spread it on the root together with `wrapperProps`.\n * Spread it after `rest`: it already contains the consumer's\n * `aria-describedby`, which `rest` would otherwise put back alone.\n */\n controlProps: {\n \"aria-describedby\"?: string;\n };\n /** The id of the error while one is rendered, without the consumer's ids. */\n renderedFieldErrorId?: string;\n}\n\n/** Joins id references, dropping empty ones. @internal */\nexport const joinIds = (...ids: (string | false | null | undefined)[]) =>\n ids.filter(Boolean).join(\" \") || undefined;\n\nexport const useFieldComponent = (\n props: FieldComponentProps,\n component: FlowComponentName,\n): UseFieldComponent => {\n const fieldErrorId = useId();\n const { FieldErrorView, FieldErrorCaptureContext, renderedFieldErrorId } =\n useFieldError({\n fieldErrorId,\n component,\n });\n\n // setting up the props context for all components that\n // are part of a form control\n const fieldPropsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n optional: !props.isRequired,\n isDisabled: !!props.isDisabled,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n },\n };\n\n return {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n wrapperProps: {\n className: formFieldStyles.formField,\n },\n controlProps: {\n // Reference the error only while it is rendered – an id that points to\n // nothing fails HTML validators and a11y checks.\n \"aria-describedby\": joinIds(\n renderedFieldErrorId,\n props[\"aria-describedby\"],\n ),\n },\n renderedFieldErrorId,\n } as const;\n};\n"],"mappings":";;;;;;;;AAqCA,IAAa,WAAW,GAAG,QACzB,IAAI,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA;AAEnC,IAAa,qBACX,OACA,cACsB;CACtB,MAAM,eAAe,MAAM;CAC3B,MAAM,EAAE,gBAAgB,0BAA0B,yBAChD,cAAc;EACZ;EACA;CACF,CAAC;CAeH,OAAO;EACL;EACA;EACA,mBAAA;GAbA,OAAO;IACL,WAAWA,yBAAgB;IAC3B,UAAU,CAAC,MAAM;IACjB,YAAY,CAAC,CAAC,MAAM;GACtB;GACA,kBAAkB,EAChB,WAAWA,yBAAgB,iBAC7B;EAMA;EACA,cAAc,EACZ,WAAWA,yBAAgB,UAC7B;EACA,cAAc,EAGZ,oBAAoB,QAClB,sBACA,MAAM,mBACR,EACF;EACA;CACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFieldError.mjs","names":[],"sources":["../../../../../../../src/lib/hooks/useFieldError.tsx"],"sourcesContent":["import React, {\n type FC,\n type PropsWithChildren,\n useMemo,\n useState,\n} from \"react\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport ClearPropsContext from \"@/lib/propsContext/components/ClearPropsContext\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\nimport { FieldErrorRenderedContext } from \"@/lib/hooks/fieldErrorRenderedContext\";\n\nexport interface UseFieldErrorOptions {\n fieldErrorId: string;\n tunnelId?: string;\n component: FlowComponentName;\n}\n\nexport const useFieldError = (options: UseFieldErrorOptions) => {\n const fieldErrorProps = useProps(\"FieldError\", {});\n const currentTunnelId = fieldErrorProps.tunnel?.id;\n const tunnelId =\n options.tunnelId ?? currentTunnelId ?? `${options.fieldErrorId}.fieldError`;\n\n const fieldErrorCapturePropsContext: PropsContext = {\n FieldError: {\n id: options.fieldErrorId,\n tunnel: { id: tunnelId, component: options.component },\n className: formFieldStyles.fieldError,\n },\n };\n\n const [renderedFieldErrorId, setRenderedFieldErrorId] = useState<string>();\n\n const FieldErrorCaptureContext: FC<PropsWithChildren> = useMemo(\n () => (props) => {\n return (\n <PropsContextProvider\n props={fieldErrorCapturePropsContext}\n dependencies={[tunnelId]}\n >\n {props.children}\n </PropsContextProvider>\n );\n },\n [tunnelId],\n );\n\n // Keep the component identity stable: a new one per render makes React\n // remount the error on every render of the field (each keystroke).\n const FieldErrorView: FC = useMemo(\n () => () => {\n if (currentTunnelId) {\n return null;\n }\n\n return (\n <FieldErrorRenderedContext value={setRenderedFieldErrorId}>\n <UiComponentTunnelExit id={tunnelId} component={options.component}>\n {(children) => {\n const childrenArray = React.Children.toArray(children);\n return <ClearPropsContext>{childrenArray[0]}</ClearPropsContext>;\n }}\n </UiComponentTunnelExit>\n </FieldErrorRenderedContext>\n );\n },\n [currentTunnelId, tunnelId, options.component],\n );\n\n return {\n FieldErrorCaptureContext,\n FieldErrorView,\n /**\n * The id of the error while one is rendered for this field. A nested field\n * (a `Checkbox` inside a `CheckboxButton`) renders its error at the outer\n * one, so only the outer field ever gets an id here.\n */\n renderedFieldErrorId,\n } as const;\n};\n"],"mappings":";;;;;;;;;;;AAoBA,IAAa,iBAAiB,YAAkC;CAE9D,MAAM,kBADkB,SAAS,cAAc,CAAC,CACxB,CAAA,CAAgB,QAAQ;CAChD,MAAM,WACJ,QAAQ,YAAY,mBAAmB,GAAG,QAAQ,aAAa;CAEjE,MAAM,gCAA8C,EAClD,YAAY;EACV,IAAI,QAAQ;EACZ,QAAQ;GAAE,IAAI;GAAU,WAAW,QAAQ;EAAU;EACrD,WAAW,yBAAgB;CAC7B,EACF;CAEA,MAAM,CAAC,sBAAsB,2BAA2B,SAAiB;CAsCzE,OAAO;EACL,0BArCsD,eAC/C,UAAU;GACf,OACE,oBAAC,sBAAD;IACE,OAAO;IACP,cAAc,CAAC,QAAQ;IAEtB,UAAA,MAAM;GACa,CAAA;EAE1B,GACA,CAAC,QAAQ,CA0BT;EACA,gBAtByB,oBACb;GACV,IAAI,iBACF,OAAO;GAGT,OACE,oBAAC,2BAAD;IAA2B,OAAO;IAChC,UAAA,oBAAC,uBAAD;KAAuB,IAAI;KAAU,WAAW,QAAQ;KACpD,WAAA,aAAa;MACb,MAAM,gBAAgB,MAAM,SAAS,QAAQ,QAAQ;MACrD,OAAO,oBAAC,mBAAD,EAAA,UAAoB,cAAc,GAAsB,CAAA;KACjE;IACqB,CAAA;GACE,CAAA;EAE/B,GACA;GAAC;GAAiB;GAAU,QAAQ;EAAS,CAK7C;;;;;;EAMA;CACF;AACF"}
1
+ {"version":3,"file":"useFieldError.mjs","names":["formFieldStyles"],"sources":["../../../../../../../src/lib/hooks/useFieldError.tsx"],"sourcesContent":["import React, {\n type FC,\n type PropsWithChildren,\n useMemo,\n useState,\n} from \"react\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport ClearPropsContext from \"@/lib/propsContext/components/ClearPropsContext\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\nimport { FieldErrorRenderedContext } from \"@/lib/hooks/fieldErrorRenderedContext\";\n\nexport interface UseFieldErrorOptions {\n fieldErrorId: string;\n tunnelId?: string;\n component: FlowComponentName;\n}\n\nexport const useFieldError = (options: UseFieldErrorOptions) => {\n const fieldErrorProps = useProps(\"FieldError\", {});\n const currentTunnelId = fieldErrorProps.tunnel?.id;\n const tunnelId =\n options.tunnelId ?? currentTunnelId ?? `${options.fieldErrorId}.fieldError`;\n\n const fieldErrorCapturePropsContext: PropsContext = {\n FieldError: {\n id: options.fieldErrorId,\n tunnel: { id: tunnelId, component: options.component },\n className: formFieldStyles.fieldError,\n },\n };\n\n const [renderedFieldErrorId, setRenderedFieldErrorId] = useState<string>();\n\n const FieldErrorCaptureContext: FC<PropsWithChildren> = useMemo(\n () => (props) => {\n return (\n <PropsContextProvider\n props={fieldErrorCapturePropsContext}\n dependencies={[tunnelId]}\n >\n {props.children}\n </PropsContextProvider>\n );\n },\n [tunnelId],\n );\n\n // Keep the component identity stable: a new one per render makes React\n // remount the error on every render of the field (each keystroke).\n const FieldErrorView: FC = useMemo(\n () => () => {\n if (currentTunnelId) {\n return null;\n }\n\n return (\n <FieldErrorRenderedContext value={setRenderedFieldErrorId}>\n <UiComponentTunnelExit id={tunnelId} component={options.component}>\n {(children) => {\n const childrenArray = React.Children.toArray(children);\n return <ClearPropsContext>{childrenArray[0]}</ClearPropsContext>;\n }}\n </UiComponentTunnelExit>\n </FieldErrorRenderedContext>\n );\n },\n [currentTunnelId, tunnelId, options.component],\n );\n\n return {\n FieldErrorCaptureContext,\n FieldErrorView,\n /**\n * The id of the error while one is rendered for this field. A nested field\n * (a `Checkbox` inside a `CheckboxButton`) renders its error at the outer\n * one, so only the outer field ever gets an id here.\n */\n renderedFieldErrorId,\n } as const;\n};\n"],"mappings":";;;;;;;;;;;AAoBA,IAAa,iBAAiB,YAAkC;CAE9D,MAAM,kBADkB,SAAS,cAAc,CAAC,CACxB,CAAA,CAAgB,QAAQ;CAChD,MAAM,WACJ,QAAQ,YAAY,mBAAmB,GAAG,QAAQ,aAAa;CAEjE,MAAM,gCAA8C,EAClD,YAAY;EACV,IAAI,QAAQ;EACZ,QAAQ;GAAE,IAAI;GAAU,WAAW,QAAQ;EAAU;EACrD,WAAWA,yBAAgB;CAC7B,EACF;CAEA,MAAM,CAAC,sBAAsB,2BAA2B,SAAiB;CAsCzE,OAAO;EACL,0BArCsD,eAC/C,UAAU;GACf,OACE,oBAAC,sBAAD;IACE,OAAO;IACP,cAAc,CAAC,QAAQ;IAEtB,UAAA,MAAM;GACa,CAAA;EAE1B,GACA,CAAC,QAAQ,CA0BT;EACA,gBAtByB,oBACb;GACV,IAAI,iBACF,OAAO;GAGT,OACE,oBAAC,2BAAD;IAA2B,OAAO;IAChC,UAAA,oBAAC,uBAAD;KAAuB,IAAI;KAAU,WAAW,QAAQ;KACpD,WAAA,aAAa;MACb,MAAM,gBAAgB,MAAM,SAAS,QAAQ,QAAQ;MACrD,OAAO,oBAAC,mBAAD,EAAA,UAAoB,cAAc,GAAsB,CAAA;KACjE;IACqB,CAAA;GACE,CAAA;EAE/B,GACA;GAAC;GAAiB;GAAU,QAAQ;EAAS,CAK7C;;;;;;EAMA;CACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"cloneElement.mjs","names":[],"sources":["../../../../../../../src/lib/react/cloneElement.ts"],"sourcesContent":["import { isRemoteComponentRendererProps } from \"@/lib/react/remote\";\nimport type { Attributes, ReactElement } from \"react\";\nimport React from \"react\";\n\nexport const cloneElement = <P>(\n element: ReactElement<P>,\n props?: Partial<P> & Attributes,\n) => {\n const existingProps = element.props;\n if (isRemoteComponentRendererProps(existingProps)) {\n Object.assign(existingProps.element.properties, props);\n }\n return React.cloneElement(element, props);\n};\n"],"mappings":";;;;;AAIA,IAAa,kBACX,SACA,UACG;CACH,MAAM,gBAAgB,QAAQ;CAC9B,IAAI,+BAA+B,aAAa,GAC9C,OAAO,OAAO,cAAc,QAAQ,YAAY,KAAK;CAEvD,OAAO,MAAM,aAAa,SAAS,KAAK;AAC1C"}
1
+ {"version":3,"file":"cloneElement.mjs","names":["cloneElement"],"sources":["../../../../../../../src/lib/react/cloneElement.ts"],"sourcesContent":["import { isRemoteComponentRendererProps } from \"@/lib/react/remote\";\nimport type { Attributes, ReactElement } from \"react\";\nimport React from \"react\";\n\nexport const cloneElement = <P>(\n element: ReactElement<P>,\n props?: Partial<P> & Attributes,\n) => {\n const existingProps = element.props;\n if (isRemoteComponentRendererProps(existingProps)) {\n Object.assign(existingProps.element.properties, props);\n }\n return React.cloneElement(element, props);\n};\n"],"mappings":";;;;;AAIA,IAAaA,kBACX,SACA,UACG;CACH,MAAM,gBAAgB,QAAQ;CAC9B,IAAI,+BAA+B,aAAa,GAC9C,OAAO,OAAO,cAAc,QAAQ,YAAY,KAAK;CAEvD,OAAO,MAAM,aAAa,SAAS,KAAK;AAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Render.mjs","names":[],"sources":["../../../../../../../../../src/lib/react/components/Render/Render.tsx"],"sourcesContent":["import type { FC, ReactNode } from \"react\";\n\nexport const Render: FC<{ children: () => ReactNode | void }> = (props) => (\n <>{props.children() ?? null}</>\n);\n"],"mappings":";;;;AAEA,IAAa,UAAoD,UAC/D,oBAAA,UAAA,EAAA,UAAG,MAAM,SAAS,KAAK,KAAO,CAAA"}
1
+ {"version":3,"file":"Render.mjs","names":["_Fragment"],"sources":["../../../../../../../../../src/lib/react/components/Render/Render.tsx"],"sourcesContent":["import type { FC, ReactNode } from \"react\";\n\nexport const Render: FC<{ children: () => ReactNode | void }> = (props) => (\n <>{props.children() ?? null}</>\n);\n"],"mappings":";;;;AAEA,IAAa,UAAoD,UAC/D,oBAAAA,UAAA,EAAA,UAAG,MAAM,SAAS,KAAK,KAAO,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPropsMerger.mjs","names":[],"sources":["../../../../../../../src/lib/react/getPropsMerger.ts"],"sourcesContent":["import { mergeRefs as mergeRefsFn } from \"@react-aria/utils\";\nimport { mergeProps as ariaMergeProps } from \"@react-aria/utils\";\nimport { isObjectType, sortBy } from \"remeda\";\nimport { setProperty } from \"dot-prop\";\nimport type { Ref } from \"react\";\nimport { getNestingLevel } from \"@/lib/propsContext/nestedPropsContext/lib\";\n\ninterface MergePropsOptions {\n mergeClassNames?: boolean;\n mergeEventHandler?: boolean;\n mergeRefs?: boolean;\n}\n\nexport const getPropsMerger =\n (options: MergePropsOptions = {}): typeof ariaMergeProps =>\n (...propsList) => {\n const {\n mergeClassNames = true,\n mergeEventHandler = true,\n mergeRefs = true,\n } = options;\n\n const sortedByLevel = sortBy(\n propsList,\n getNestingLevel,\n ) as typeof propsList;\n\n const mergedProps = ariaMergeProps(...sortedByLevel);\n\n if (isObjectType(mergedProps)) {\n if (!mergeClassNames) {\n // \"Unmerge\" className\n for (const props of sortedByLevel) {\n if (\n isObjectType(props) &&\n \"className\" in mergedProps &&\n \"className\" in props\n ) {\n mergedProps.className = props.className;\n }\n }\n }\n\n if (!mergeEventHandler) {\n // \"Unmerge\" eventHandler\n for (const props of sortedByLevel) {\n if (isObjectType(props)) {\n for (const [propName, propValue] of Object.entries(props)) {\n const isEventHandlerProp = /^on[A-Z]/.test(propName);\n if (isEventHandlerProp) {\n setProperty(mergedProps, propName, propValue);\n }\n }\n }\n }\n }\n\n if (mergeRefs) {\n const refProps = Object.keys(mergedProps).filter(\n (p) => p === \"ref\" || p.endsWith(\"Ref\"),\n );\n\n for (const refProp of refProps) {\n const collectedRefObjects = sortedByLevel\n .map((p) => (isObjectType(p) && refProp in p ? p[refProp] : null))\n // A ref nobody supplied contributes nothing. `undefined` used to\n // survive this filter and merge into a callback ref — harmless for\n // a ref the component attaches, fatal for one it reads instead\n // (`anchorRef`, `triggerRef`): nothing ever calls the callback, so\n // `.current` stays empty and the element is never found. Writing\n // `anchorRef={condition ? ref : undefined}` was enough to hit it.\n .filter((r): r is Ref<unknown> => r != null);\n\n setProperty(\n mergedProps,\n refProp,\n collectedRefObjects.length > 0\n ? mergeRefsFn(...collectedRefObjects)\n : undefined,\n );\n }\n }\n }\n\n return mergedProps;\n };\n"],"mappings":";;;;;;;AAaA,IAAa,kBACV,UAA6B,CAAC,OAC9B,GAAG,cAAc;CAChB,MAAM,EACJ,kBAAkB,MAClB,oBAAoB,MACpB,WAAA,cAAY,SACV;CAEJ,MAAM,gBAAgB,OACpB,WACA,eACF;CAEA,MAAM,cAAc,WAAe,GAAG,aAAa;CAEnD,IAAI,aAAa,WAAW,GAAG;EAC7B,IAAI,CAAC,iBAEE;QAAA,MAAM,SAAS,eAClB,IACE,aAAa,KAAK,KAClB,eAAe,eACf,eAAe,OAEf,YAAY,YAAY,MAAM;EAAA;EAKpC,IAAI,CAAC,mBAEE;QAAA,MAAM,SAAS,eAClB,IAAI,aAAa,KAAK,GACf;SAAA,MAAM,CAAC,UAAU,cAAc,OAAO,QAAQ,KAAK,GAEtD,IAD2B,WAAW,KAAK,QACvC,GACF,YAAY,aAAa,UAAU,SAAS;GAAA;EAEhD;EAKN,IAAI,aAAW;GACb,MAAM,WAAW,OAAO,KAAK,WAAW,CAAC,CAAC,QACvC,MAAM,MAAM,SAAS,EAAE,SAAS,KAAK,CACxC;GAEA,KAAK,MAAM,WAAW,UAAU;IAC9B,MAAM,sBAAsB,cACzB,KAAK,MAAO,aAAa,CAAC,KAAK,WAAW,IAAI,EAAE,WAAW,IAAK,CAAC,CAOjE,QAAQ,MAAyB,KAAK,IAAI;IAE7C,YACE,aACA,SACA,oBAAoB,SAAS,IACzB,UAAY,GAAG,mBAAmB,IAClC,KAAA,CACN;GACF;EACF;CACF;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"getPropsMerger.mjs","names":["ariaMergeProps","mergeRefs","mergeRefsFn"],"sources":["../../../../../../../src/lib/react/getPropsMerger.ts"],"sourcesContent":["import { mergeRefs as mergeRefsFn } from \"@react-aria/utils\";\nimport { mergeProps as ariaMergeProps } from \"@react-aria/utils\";\nimport { isObjectType, sortBy } from \"remeda\";\nimport { setProperty } from \"dot-prop\";\nimport type { Ref } from \"react\";\nimport { getNestingLevel } from \"@/lib/propsContext/nestedPropsContext/lib\";\n\ninterface MergePropsOptions {\n mergeClassNames?: boolean;\n mergeEventHandler?: boolean;\n mergeRefs?: boolean;\n}\n\nexport const getPropsMerger =\n (options: MergePropsOptions = {}): typeof ariaMergeProps =>\n (...propsList) => {\n const {\n mergeClassNames = true,\n mergeEventHandler = true,\n mergeRefs = true,\n } = options;\n\n const sortedByLevel = sortBy(\n propsList,\n getNestingLevel,\n ) as typeof propsList;\n\n const mergedProps = ariaMergeProps(...sortedByLevel);\n\n if (isObjectType(mergedProps)) {\n if (!mergeClassNames) {\n // \"Unmerge\" className\n for (const props of sortedByLevel) {\n if (\n isObjectType(props) &&\n \"className\" in mergedProps &&\n \"className\" in props\n ) {\n mergedProps.className = props.className;\n }\n }\n }\n\n if (!mergeEventHandler) {\n // \"Unmerge\" eventHandler\n for (const props of sortedByLevel) {\n if (isObjectType(props)) {\n for (const [propName, propValue] of Object.entries(props)) {\n const isEventHandlerProp = /^on[A-Z]/.test(propName);\n if (isEventHandlerProp) {\n setProperty(mergedProps, propName, propValue);\n }\n }\n }\n }\n }\n\n if (mergeRefs) {\n const refProps = Object.keys(mergedProps).filter(\n (p) => p === \"ref\" || p.endsWith(\"Ref\"),\n );\n\n for (const refProp of refProps) {\n const collectedRefObjects = sortedByLevel\n .map((p) => (isObjectType(p) && refProp in p ? p[refProp] : null))\n // A ref nobody supplied contributes nothing. `undefined` used to\n // survive this filter and merge into a callback ref — harmless for\n // a ref the component attaches, fatal for one it reads instead\n // (`anchorRef`, `triggerRef`): nothing ever calls the callback, so\n // `.current` stays empty and the element is never found. Writing\n // `anchorRef={condition ? ref : undefined}` was enough to hit it.\n .filter((r): r is Ref<unknown> => r != null);\n\n setProperty(\n mergedProps,\n refProp,\n collectedRefObjects.length > 0\n ? mergeRefsFn(...collectedRefObjects)\n : undefined,\n );\n }\n }\n }\n\n return mergedProps;\n };\n"],"mappings":";;;;;;;AAaA,IAAa,kBACV,UAA6B,CAAC,OAC9B,GAAG,cAAc;CAChB,MAAM,EACJ,kBAAkB,MAClB,oBAAoB,MACpB,WAAA,cAAY,SACV;CAEJ,MAAM,gBAAgB,OACpB,WACA,eACF;CAEA,MAAM,cAAcA,WAAe,GAAG,aAAa;CAEnD,IAAI,aAAa,WAAW,GAAG;EAC7B,IAAI,CAAC,iBAEE;QAAA,MAAM,SAAS,eAClB,IACE,aAAa,KAAK,KAClB,eAAe,eACf,eAAe,OAEf,YAAY,YAAY,MAAM;EAAA;EAKpC,IAAI,CAAC,mBAEE;QAAA,MAAM,SAAS,eAClB,IAAI,aAAa,KAAK,GACf;SAAA,MAAM,CAAC,UAAU,cAAc,OAAO,QAAQ,KAAK,GAEtD,IAD2B,WAAW,KAAK,QACvC,GACF,YAAY,aAAa,UAAU,SAAS;GAAA;EAEhD;EAKN,IAAIC,aAAW;GACb,MAAM,WAAW,OAAO,KAAK,WAAW,CAAC,CAAC,QACvC,MAAM,MAAM,SAAS,EAAE,SAAS,KAAK,CACxC;GAEA,KAAK,MAAM,WAAW,UAAU;IAC9B,MAAM,sBAAsB,cACzB,KAAK,MAAO,aAAa,CAAC,KAAK,WAAW,IAAI,EAAE,WAAW,IAAK,CAAC,CAOjE,QAAQ,MAAyB,KAAK,IAAI;IAE7C,YACE,aACA,SACA,oBAAoB,SAAS,IACzBC,UAAY,GAAG,mBAAmB,IAClC,KAAA,CACN;GACF;EACF;CACF;CAEA,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDesignTokens.mjs","names":[],"sources":["../../../../../../../../src/lib/theming/hooks/useDesignTokens.ts"],"sourcesContent":["import lightTokens from \"@mittwald/flow-design-tokens/json-runtime/all-light.json\";\nimport darkTokens from \"@mittwald/flow-design-tokens/json-runtime/all-dark.json\";\nimport { useResolvedTheme } from \"./useResolvedTheme\";\n\nexport const useDesignTokens = () => {\n const theme = useResolvedTheme();\n return theme === \"light\" ? lightTokens : darkTokens;\n};\n"],"mappings":";;;;;;AAIA,IAAa,wBAAwB;CAEnC,OADc,iBACP,MAAU,UAAU,oBAAc;AAC3C"}
1
+ {"version":3,"file":"useDesignTokens.mjs","names":["lightTokens","darkTokens"],"sources":["../../../../../../../../src/lib/theming/hooks/useDesignTokens.ts"],"sourcesContent":["import lightTokens from \"@mittwald/flow-design-tokens/json-runtime/all-light.json\";\nimport darkTokens from \"@mittwald/flow-design-tokens/json-runtime/all-dark.json\";\nimport { useResolvedTheme } from \"./useResolvedTheme\";\n\nexport const useDesignTokens = () => {\n const theme = useResolvedTheme();\n return theme === \"light\" ? lightTokens : darkTokens;\n};\n"],"mappings":";;;;;;AAIA,IAAa,wBAAwB;CAEnC,OADc,iBACP,MAAU,UAAUA,oBAAcC;AAC3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"CategoricalColors.mjs","names":[],"sources":["../../../../../../../src/lib/tokens/CategoricalColors.ts"],"sourcesContent":["import tokens from \"@mittwald/flow-design-tokens/json-runtime/all-light.json\";\n\nexport const categoricalColors = Object.keys(\n tokens.color.categorical,\n) as (keyof typeof tokens.color.categorical)[];\n\nexport type CategoricalColor = (typeof categoricalColors)[number];\nexport type CategoricalWithCustomColor = CategoricalColor | (string & {});\n"],"mappings":";;;;AAEA,IAAa,oBAAoB,OAAO,KACtC,kBAAO,MAAM,WACf"}
1
+ {"version":3,"file":"CategoricalColors.mjs","names":["tokens"],"sources":["../../../../../../../src/lib/tokens/CategoricalColors.ts"],"sourcesContent":["import tokens from \"@mittwald/flow-design-tokens/json-runtime/all-light.json\";\n\nexport const categoricalColors = Object.keys(\n tokens.color.categorical,\n) as (keyof typeof tokens.color.categorical)[];\n\nexport type CategoricalColor = (typeof categoricalColors)[number];\nexport type CategoricalWithCustomColor = CategoricalColor | (string & {});\n"],"mappings":";;;;AAEA,IAAa,oBAAoB,OAAO,KACtCA,kBAAO,MAAM,WACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"isCategoricalColor.mjs","names":[],"sources":["../../../../../../../src/lib/tokens/isCategoricalColor.ts"],"sourcesContent":["import {\n type CategoricalColor,\n categoricalColors,\n} from \"@/lib/tokens/CategoricalColors\";\n\nexport function isCategoricalColor(\n something: unknown,\n): something is CategoricalColor {\n const anyCategoricalColors = categoricalColors as readonly string[];\n return (\n typeof something === \"string\" && anyCategoricalColors.includes(something)\n );\n}\n"],"mappings":";;;;AAKA,SAAgB,mBACd,WAC+B;CAE/B,OACE,OAAO,cAAc,YAAY,kBAAqB,SAAS,SAAS;AAE5E"}
1
+ {"version":3,"file":"isCategoricalColor.mjs","names":["anyCategoricalColors"],"sources":["../../../../../../../src/lib/tokens/isCategoricalColor.ts"],"sourcesContent":["import {\n type CategoricalColor,\n categoricalColors,\n} from \"@/lib/tokens/CategoricalColors\";\n\nexport function isCategoricalColor(\n something: unknown,\n): something is CategoricalColor {\n const anyCategoricalColors = categoricalColors as readonly string[];\n return (\n typeof something === \"string\" && anyCategoricalColors.includes(something)\n );\n}\n"],"mappings":";;;;AAKA,SAAgB,mBACd,WAC+B;CAE/B,OACE,OAAO,cAAc,YAAYA,kBAAqB,SAAS,SAAS;AAE5E"}
@@ -1 +1 @@
1
- {"version":3,"file":"componentStatus.mjs","names":[],"sources":["../../../../../../src/status/componentStatus.ts"],"sourcesContent":["// This file is auto-generated by dev/status-registry/generateStatusRegistry.ts.\n// Do not edit it by hand — regenerate with `pnpm nx build:status-registry components`.\nimport componentStatus from \"./component-status.json\";\nimport type { FlowComponentStatus, FlowComponentStatusRegistry } from \"./types\";\n\nexport const flowComponentStatus =\n componentStatus as FlowComponentStatusRegistry;\n\n/**\n * The component-bearing public export entries — generated from\n * `STATUS_EXPORT_ENTRIES` (dev/status-registry/exportEntries.ts).\n */\nexport type FlowExportEntry =\n | \".\"\n | \"flr-universal\"\n | \"nextjs\"\n | \"react-hook-form\"\n | \"mittwald-password-tools-js\";\n\nconst PACKAGE_NAME = \"@mittwald/flow-react-components\";\n\n/**\n * The public import specifier for an export entry (mirrors specifierOf in\n * exportEntries.ts).\n */\nconst specifierOf = (entry: FlowExportEntry): string =>\n entry === \".\" ? PACKAGE_NAME : `${PACKAGE_NAME}/${entry}`;\n\n/**\n * Looks up a component's lifecycle status on a given public export surface.\n * `entry` defaults to the main `.` surface. Returns `undefined` when the\n * component has no derivable status on that surface (consumers fail silently).\n */\nexport const getFlowComponentStatus = (\n name: string,\n entry: FlowExportEntry = \".\",\n): FlowComponentStatus | undefined =>\n flowComponentStatus[`${specifierOf(entry)}#${name}`];\n"],"mappings":";;;;AAKA,IAAa,sBACX;AAaF,IAAM,eAAe;;;;;AAMrB,IAAM,eAAe,UACnB,UAAU,MAAM,eAAe,GAAG,aAAa,GAAG;;;;;;AAOpD,IAAa,0BACX,MACA,QAAyB,QAEzB,oBAAoB,GAAG,YAAY,KAAK,EAAE,GAAG"}
1
+ {"version":3,"file":"componentStatus.mjs","names":["componentStatus"],"sources":["../../../../../../src/status/componentStatus.ts"],"sourcesContent":["// This file is auto-generated by dev/status-registry/generateStatusRegistry.ts.\n// Do not edit it by hand — regenerate with `pnpm nx build:status-registry components`.\nimport componentStatus from \"./component-status.json\";\nimport type { FlowComponentStatus, FlowComponentStatusRegistry } from \"./types\";\n\nexport const flowComponentStatus =\n componentStatus as FlowComponentStatusRegistry;\n\n/**\n * The component-bearing public export entries — generated from\n * `STATUS_EXPORT_ENTRIES` (dev/status-registry/exportEntries.ts).\n */\nexport type FlowExportEntry =\n | \".\"\n | \"flr-universal\"\n | \"nextjs\"\n | \"react-hook-form\"\n | \"mittwald-password-tools-js\";\n\nconst PACKAGE_NAME = \"@mittwald/flow-react-components\";\n\n/**\n * The public import specifier for an export entry (mirrors specifierOf in\n * exportEntries.ts).\n */\nconst specifierOf = (entry: FlowExportEntry): string =>\n entry === \".\" ? PACKAGE_NAME : `${PACKAGE_NAME}/${entry}`;\n\n/**\n * Looks up a component's lifecycle status on a given public export surface.\n * `entry` defaults to the main `.` surface. Returns `undefined` when the\n * component has no derivable status on that surface (consumers fail silently).\n */\nexport const getFlowComponentStatus = (\n name: string,\n entry: FlowExportEntry = \".\",\n): FlowComponentStatus | undefined =>\n flowComponentStatus[`${specifierOf(entry)}#${name}`];\n"],"mappings":";;;;AAKA,IAAa,sBACXA;AAaF,IAAM,eAAe;;;;;AAMrB,IAAM,eAAe,UACnB,UAAU,MAAM,eAAe,GAAG,aAAa,GAAG;;;;;;AAOpD,IAAa,0BACX,MACA,QAAyB,QAEzB,oBAAoB,GAAG,YAAY,KAAK,EAAE,GAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "1.5.0-next.23",
3
+ "version": "1.5.0-next.25",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://flow.mittwald.de",
@@ -84,9 +84,9 @@
84
84
  "@internationalized/string-compiler": "^3.4.1",
85
85
  "@lezer/common": "^1.5.2",
86
86
  "@lezer/highlight": "^1.2.3",
87
- "@mittwald/flow-icons": "^1.5.0-next.23",
87
+ "@mittwald/flow-icons": "^1.5.0-next.25",
88
88
  "@mittwald/password-tools-js": "^3.0.0",
89
- "@mittwald/react-tunnel": "^1.5.0-next.23",
89
+ "@mittwald/react-tunnel": "^1.5.0-next.25",
90
90
  "@mittwald/react-use-promise": "^4.2.2",
91
91
  "@react-aria/form": "^3.2.1",
92
92
  "@react-aria/i18n": "^3.13.1",
@@ -139,12 +139,12 @@
139
139
  "@internationalized/date": "^3.12.3",
140
140
  "@lezer/generator": "^1.8.0",
141
141
  "@lezer/lr": "^1.4.10",
142
- "@mittwald/flow-core": "1.5.0-next.23",
143
- "@mittwald/flow-design-tokens": "1.5.0-next.23",
144
- "@mittwald/flow-icons-base": "1.5.0-next.23",
142
+ "@mittwald/flow-core": "1.5.0-next.25",
143
+ "@mittwald/flow-design-tokens": "1.5.0-next.25",
144
+ "@mittwald/flow-icons-base": "1.5.0-next.25",
145
145
  "@mittwald/react-use-promise": "^4.2.2",
146
146
  "@mittwald/remote-dom-react": "1.2.2-mittwald.10",
147
- "@mittwald/typescript-config": "1.5.0-next.23",
147
+ "@mittwald/typescript-config": "1.5.0-next.25",
148
148
  "@nx/storybook": "^22.7.6",
149
149
  "@storybook/addon-a11y": "^10.5.10",
150
150
  "@storybook/addon-actions": "^9.0.8",
@@ -196,7 +196,7 @@
196
196
  },
197
197
  "peerDependencies": {
198
198
  "@internationalized/date": "^3.12.2",
199
- "@mittwald/flow-icons-pro": "1.5.0-next.23",
199
+ "@mittwald/flow-icons-pro": "1.5.0-next.25",
200
200
  "@mittwald/react-use-promise": "^4.2.2",
201
201
  "next": "^16.2.3",
202
202
  "react": "^19.2.0",
@@ -220,5 +220,5 @@
220
220
  "browserslist": [
221
221
  "baseline widely available"
222
222
  ],
223
- "gitHead": "f716c3c00feb3589a23e3e9f9bf802c420ecfca3"
223
+ "gitHead": "9c478d1c37c2221ab0323bcdadd9fa3eeecd57cf"
224
224
  }