@mittwald/flow-react-components 1.5.0-next.3 → 1.5.0-next.30

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 (433) hide show
  1. package/AGENTS.md +21 -10
  2. package/USAGE.md +7 -0
  3. package/dist/assets/component-index.json +1 -1
  4. package/dist/assets/doc-properties.json +1 -1
  5. package/dist/css/all-layered.css +1 -1
  6. package/dist/css/all.css +1 -1
  7. package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
  8. package/dist/js/packages/components/src/components/Accordion/Accordion.mjs.map +1 -1
  9. package/dist/js/packages/components/src/components/Accordion/Accordion.module.mjs.map +1 -1
  10. package/dist/js/packages/components/src/components/Action/lib/ariaLive.mjs.map +1 -1
  11. package/dist/js/packages/components/src/components/Action/models/ActionState.mjs.map +1 -1
  12. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
  13. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.module.mjs.map +1 -1
  14. package/dist/js/packages/components/src/components/Alert/Alert.mjs.map +1 -1
  15. package/dist/js/packages/components/src/components/AlertBadge/AlertBadge.mjs.map +1 -1
  16. package/dist/js/packages/components/src/components/AlertIcon/AlertIcon.mjs.map +1 -1
  17. package/dist/js/packages/components/src/components/AlertText/AlertText.mjs.map +1 -1
  18. package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs +14 -7
  19. package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
  20. package/dist/js/packages/components/src/components/Avatar/Avatar.mjs.map +1 -1
  21. package/dist/js/packages/components/src/components/AvatarStack/AvatarStack.mjs.map +1 -1
  22. package/dist/js/packages/components/src/components/Badge/Badge.mjs.map +1 -1
  23. package/dist/js/packages/components/src/components/BigNumber/BigNumber.mjs.map +1 -1
  24. package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.mjs.map +1 -1
  25. package/dist/js/packages/components/src/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.mjs.map +1 -1
  26. package/dist/js/packages/components/src/components/Button/Button.mjs +5 -17
  27. package/dist/js/packages/components/src/components/Button/Button.mjs.map +1 -1
  28. package/dist/js/packages/components/src/components/Button/Button.module.mjs.map +1 -1
  29. package/dist/js/packages/components/src/components/Calendar/Calendar.mjs.map +1 -1
  30. package/dist/js/packages/components/src/components/Calendar/components/CalendarHeader/CalendarHeader.mjs.map +1 -1
  31. package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/RangeCalendar.mjs.map +1 -1
  32. package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/helpers/useCalendarDateRangePresets.mjs.map +1 -1
  33. package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
  34. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/ChartTooltip.mjs.map +1 -1
  35. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.mjs.map +1 -1
  36. package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs +5 -1
  37. package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs.map +1 -1
  38. package/dist/js/packages/components/src/components/Chat/Chat.mjs.map +1 -1
  39. package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs +3 -3
  40. package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs.map +1 -1
  41. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs +3 -3
  42. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
  43. package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs +3 -3
  44. package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
  45. package/dist/js/packages/components/src/components/CoachMark/CoachMark.mjs.map +1 -1
  46. package/dist/js/packages/components/src/components/CodeBlock/CodeBlock.mjs.map +1 -1
  47. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs +35 -16
  48. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs.map +1 -1
  49. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.module.mjs.map +1 -1
  50. package/dist/js/packages/components/src/components/CodeEditor/languages/dotEnv/index.mjs.map +1 -1
  51. package/dist/js/packages/components/src/components/CodeEditor/languages/index.mjs.map +1 -1
  52. package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs.map +1 -1
  53. package/dist/js/packages/components/src/components/Color/Color.mjs.map +1 -1
  54. package/dist/js/packages/components/src/components/ColumnLayout/ColumnLayout.mjs.map +1 -1
  55. package/dist/js/packages/components/src/components/Combine/Combine.mjs +1 -0
  56. package/dist/js/packages/components/src/components/Combine/Combine.mjs.map +1 -1
  57. package/dist/js/packages/components/src/components/Combine/Combine.module.mjs +4 -2
  58. package/dist/js/packages/components/src/components/Combine/Combine.module.mjs.map +1 -1
  59. package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs +3 -3
  60. package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
  61. package/dist/js/packages/components/src/components/Content/Content.mjs.map +1 -1
  62. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs +5 -1
  63. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
  64. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs.map +1 -1
  65. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.mjs.map +1 -1
  66. package/dist/js/packages/components/src/components/ContextualHelp/ContextualHelp.mjs.map +1 -1
  67. package/dist/js/packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs.map +1 -1
  68. package/dist/js/packages/components/src/components/CopyButton/CopyButton.mjs.map +1 -1
  69. package/dist/js/packages/components/src/components/CounterBadge/CounterBadge.mjs.map +1 -1
  70. package/dist/js/packages/components/src/components/CountryOptions/CountryOptions.mjs.map +1 -1
  71. package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs +6 -5
  72. package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs.map +1 -1
  73. package/dist/js/packages/components/src/components/DatePicker/components/DateInput/DateInput.mjs.map +1 -1
  74. package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs +4 -3
  75. package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs.map +1 -1
  76. package/dist/js/packages/components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.mjs.map +1 -1
  77. package/dist/js/packages/components/src/components/DonutChart/DonutChart.mjs.map +1 -1
  78. package/dist/js/packages/components/src/components/DonutChart/components/Donut.mjs.map +1 -1
  79. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs.map +1 -1
  80. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartLegend.mjs.map +1 -1
  81. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartValue.mjs.map +1 -1
  82. package/dist/js/packages/components/src/components/EmulatedBoldText/EmulatedBoldText.mjs.map +1 -1
  83. package/dist/js/packages/components/src/components/FieldDescription/FieldDescription.mjs.map +1 -1
  84. package/dist/js/packages/components/src/components/FieldError/FieldError.mjs +40 -31
  85. package/dist/js/packages/components/src/components/FieldError/FieldError.mjs.map +1 -1
  86. package/dist/js/packages/components/src/components/FileCard/FileCard.mjs.map +1 -1
  87. package/dist/js/packages/components/src/components/FileCard/components/Avatar/Avatar.mjs.map +1 -1
  88. package/dist/js/packages/components/src/components/FileCard/components/DeleteButton/DeleteButton.mjs.map +1 -1
  89. package/dist/js/packages/components/src/components/FileCard/components/FileSizeText/FileSizeText.mjs.map +1 -1
  90. package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs +8 -6
  91. package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
  92. package/dist/js/packages/components/src/components/FileField/FileField.mjs +3 -3
  93. package/dist/js/packages/components/src/components/FileField/FileField.mjs.map +1 -1
  94. package/dist/js/packages/components/src/components/FileField/components/FileInput.mjs.map +1 -1
  95. package/dist/js/packages/components/src/components/Flex/Flex.mjs +5 -5
  96. package/dist/js/packages/components/src/components/Flex/Flex.mjs.map +1 -1
  97. package/dist/js/packages/components/src/components/Header/Header.mjs.map +1 -1
  98. package/dist/js/packages/components/src/components/HeaderNavigation/HeaderNavigation.mjs.map +1 -1
  99. package/dist/js/packages/components/src/components/Heading/Heading.mjs.map +1 -1
  100. package/dist/js/packages/components/src/components/Icon/Icon.mjs.map +1 -1
  101. package/dist/js/packages/components/src/components/Icon/components/icons/IconAI.mjs.map +1 -1
  102. package/dist/js/packages/components/src/components/Icon/components/icons/IconAIHosting.mjs.map +1 -1
  103. package/dist/js/packages/components/src/components/Icon/components/icons/IconAnalytics.mjs.map +1 -1
  104. package/dist/js/packages/components/src/components/Icon/components/icons/IconApp.mjs.map +1 -1
  105. package/dist/js/packages/components/src/components/Icon/components/icons/IconAscending.mjs.map +1 -1
  106. package/dist/js/packages/components/src/components/Icon/components/icons/IconAttachment.mjs.map +1 -1
  107. package/dist/js/packages/components/src/components/Icon/components/icons/IconAutoresponder.mjs.map +1 -1
  108. package/dist/js/packages/components/src/components/Icon/components/icons/IconBackLink.mjs.map +1 -1
  109. package/dist/js/packages/components/src/components/Icon/components/icons/IconBackup.mjs.map +1 -1
  110. package/dist/js/packages/components/src/components/Icon/components/icons/IconBold.mjs.map +1 -1
  111. package/dist/js/packages/components/src/components/Icon/components/icons/IconCamera.mjs.map +1 -1
  112. package/dist/js/packages/components/src/components/Icon/components/icons/IconCertificate.mjs.map +1 -1
  113. package/dist/js/packages/components/src/components/Icon/components/icons/IconChangelog.mjs.map +1 -1
  114. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheck.mjs.map +1 -1
  115. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxChecked.mjs.map +1 -1
  116. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxEmpty.mjs.map +1 -1
  117. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxIndeterminate.mjs.map +1 -1
  118. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronDown.mjs.map +1 -1
  119. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronLeft.mjs.map +1 -1
  120. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronRight.mjs.map +1 -1
  121. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronUp.mjs.map +1 -1
  122. package/dist/js/packages/components/src/components/Icon/components/icons/IconClose.mjs.map +1 -1
  123. package/dist/js/packages/components/src/components/Icon/components/icons/IconCode.mjs.map +1 -1
  124. package/dist/js/packages/components/src/components/Icon/components/icons/IconContainer.mjs.map +1 -1
  125. package/dist/js/packages/components/src/components/Icon/components/icons/IconContextMenu.mjs.map +1 -1
  126. package/dist/js/packages/components/src/components/Icon/components/icons/IconContextMenuVertical.mjs.map +1 -1
  127. package/dist/js/packages/components/src/components/Icon/components/icons/IconContract.mjs.map +1 -1
  128. package/dist/js/packages/components/src/components/Icon/components/icons/IconContractPartner.mjs.map +1 -1
  129. package/dist/js/packages/components/src/components/Icon/components/icons/IconContributor.mjs.map +1 -1
  130. package/dist/js/packages/components/src/components/Icon/components/icons/IconCopy.mjs.map +1 -1
  131. package/dist/js/packages/components/src/components/Icon/components/icons/IconCronjob.mjs.map +1 -1
  132. package/dist/js/packages/components/src/components/Icon/components/icons/IconCustomer.mjs.map +1 -1
  133. package/dist/js/packages/components/src/components/Icon/components/icons/IconDanger.mjs.map +1 -1
  134. package/dist/js/packages/components/src/components/Icon/components/icons/IconDashboard.mjs.map +1 -1
  135. package/dist/js/packages/components/src/components/Icon/components/icons/IconDatabase.mjs.map +1 -1
  136. package/dist/js/packages/components/src/components/Icon/components/icons/IconDate.mjs.map +1 -1
  137. package/dist/js/packages/components/src/components/Icon/components/icons/IconDelete.mjs.map +1 -1
  138. package/dist/js/packages/components/src/components/Icon/components/icons/IconDeliveryBox.mjs.map +1 -1
  139. package/dist/js/packages/components/src/components/Icon/components/icons/IconDescending.mjs.map +1 -1
  140. package/dist/js/packages/components/src/components/Icon/components/icons/IconDesktop.mjs.map +1 -1
  141. package/dist/js/packages/components/src/components/Icon/components/icons/IconDirectory.mjs.map +1 -1
  142. package/dist/js/packages/components/src/components/Icon/components/icons/IconDnsSubZone.mjs.map +1 -1
  143. package/dist/js/packages/components/src/components/Icon/components/icons/IconDnsZone.mjs.map +1 -1
  144. package/dist/js/packages/components/src/components/Icon/components/icons/IconDomain.mjs.map +1 -1
  145. package/dist/js/packages/components/src/components/Icon/components/icons/IconDownload.mjs.map +1 -1
  146. package/dist/js/packages/components/src/components/Icon/components/icons/IconEdit.mjs.map +1 -1
  147. package/dist/js/packages/components/src/components/Icon/components/icons/IconEmail.mjs.map +1 -1
  148. package/dist/js/packages/components/src/components/Icon/components/icons/IconEmailArchive.mjs.map +1 -1
  149. package/dist/js/packages/components/src/components/Icon/components/icons/IconExtension.mjs.map +1 -1
  150. package/dist/js/packages/components/src/components/Icon/components/icons/IconExternalLink.mjs.map +1 -1
  151. package/dist/js/packages/components/src/components/Icon/components/icons/IconFailed.mjs.map +1 -1
  152. package/dist/js/packages/components/src/components/Icon/components/icons/IconFeedback.mjs.map +1 -1
  153. package/dist/js/packages/components/src/components/Icon/components/icons/IconFile.mjs.map +1 -1
  154. package/dist/js/packages/components/src/components/Icon/components/icons/IconFilter.mjs.map +1 -1
  155. package/dist/js/packages/components/src/components/Icon/components/icons/IconForwardAddress.mjs.map +1 -1
  156. package/dist/js/packages/components/src/components/Icon/components/icons/IconForwardLink.mjs.map +1 -1
  157. package/dist/js/packages/components/src/components/Icon/components/icons/IconHide.mjs.map +1 -1
  158. package/dist/js/packages/components/src/components/Icon/components/icons/IconHome.mjs.map +1 -1
  159. package/dist/js/packages/components/src/components/Icon/components/icons/IconImage.mjs.map +1 -1
  160. package/dist/js/packages/components/src/components/Icon/components/icons/IconInfo.mjs.map +1 -1
  161. package/dist/js/packages/components/src/components/Icon/components/icons/IconInvite.mjs.map +1 -1
  162. package/dist/js/packages/components/src/components/Icon/components/icons/IconInvoice.mjs.map +1 -1
  163. package/dist/js/packages/components/src/components/Icon/components/icons/IconItalic.mjs.map +1 -1
  164. package/dist/js/packages/components/src/components/Icon/components/icons/IconKnowledgeHint.mjs.map +1 -1
  165. package/dist/js/packages/components/src/components/Icon/components/icons/IconLanguage.mjs.map +1 -1
  166. package/dist/js/packages/components/src/components/Icon/components/icons/IconLeadFyndr.mjs.map +1 -1
  167. package/dist/js/packages/components/src/components/Icon/components/icons/IconLink.mjs.map +1 -1
  168. package/dist/js/packages/components/src/components/Icon/components/icons/IconLock.mjs.map +1 -1
  169. package/dist/js/packages/components/src/components/Icon/components/icons/IconLockOpen.mjs.map +1 -1
  170. package/dist/js/packages/components/src/components/Icon/components/icons/IconLogout.mjs.map +1 -1
  171. package/dist/js/packages/components/src/components/Icon/components/icons/IconMainUser.mjs.map +1 -1
  172. package/dist/js/packages/components/src/components/Icon/components/icons/IconMarketplace.mjs.map +1 -1
  173. package/dist/js/packages/components/src/components/Icon/components/icons/IconMaximize.mjs.map +1 -1
  174. package/dist/js/packages/components/src/components/Icon/components/icons/IconMember.mjs.map +1 -1
  175. package/dist/js/packages/components/src/components/Icon/components/icons/IconMenu.mjs.map +1 -1
  176. package/dist/js/packages/components/src/components/Icon/components/icons/IconMinimize.mjs.map +1 -1
  177. package/dist/js/packages/components/src/components/Icon/components/icons/IconMinus.mjs.map +1 -1
  178. package/dist/js/packages/components/src/components/Icon/components/icons/IconMittwald.mjs.map +1 -1
  179. package/dist/js/packages/components/src/components/Icon/components/icons/IconMobile.mjs.map +1 -1
  180. package/dist/js/packages/components/src/components/Icon/components/icons/IconMonitoring.mjs.map +1 -1
  181. package/dist/js/packages/components/src/components/Icon/components/icons/IconMove.mjs.map +1 -1
  182. package/dist/js/packages/components/src/components/Icon/components/icons/IconNewsletter.mjs.map +1 -1
  183. package/dist/js/packages/components/src/components/Icon/components/icons/IconNotification.mjs.map +1 -1
  184. package/dist/js/packages/components/src/components/Icon/components/icons/IconNumber.mjs.map +1 -1
  185. package/dist/js/packages/components/src/components/Icon/components/icons/IconOrder.mjs.map +1 -1
  186. package/dist/js/packages/components/src/components/Icon/components/icons/IconOrderedList.mjs.map +1 -1
  187. package/dist/js/packages/components/src/components/Icon/components/icons/IconPassword.mjs.map +1 -1
  188. package/dist/js/packages/components/src/components/Icon/components/icons/IconPath.mjs.map +1 -1
  189. package/dist/js/packages/components/src/components/Icon/components/icons/IconPause.mjs.map +1 -1
  190. package/dist/js/packages/components/src/components/Icon/components/icons/IconPayment.mjs.map +1 -1
  191. package/dist/js/packages/components/src/components/Icon/components/icons/IconPending.mjs.map +1 -1
  192. package/dist/js/packages/components/src/components/Icon/components/icons/IconPicture.mjs.map +1 -1
  193. package/dist/js/packages/components/src/components/Icon/components/icons/IconPlus.mjs.map +1 -1
  194. package/dist/js/packages/components/src/components/Icon/components/icons/IconProject.mjs.map +1 -1
  195. package/dist/js/packages/components/src/components/Icon/components/icons/IconQuote.mjs.map +1 -1
  196. package/dist/js/packages/components/src/components/Icon/components/icons/IconRadioOff.mjs.map +1 -1
  197. package/dist/js/packages/components/src/components/Icon/components/icons/IconRadioOn.mjs.map +1 -1
  198. package/dist/js/packages/components/src/components/Icon/components/icons/IconRedo.mjs.map +1 -1
  199. package/dist/js/packages/components/src/components/Icon/components/icons/IconRefresh.mjs.map +1 -1
  200. package/dist/js/packages/components/src/components/Icon/components/icons/IconRegistry.mjs.map +1 -1
  201. package/dist/js/packages/components/src/components/Icon/components/icons/IconSave.mjs.map +1 -1
  202. package/dist/js/packages/components/src/components/Icon/components/icons/IconSearch.mjs.map +1 -1
  203. package/dist/js/packages/components/src/components/Icon/components/icons/IconSecurity.mjs.map +1 -1
  204. package/dist/js/packages/components/src/components/Icon/components/icons/IconSend.mjs.map +1 -1
  205. package/dist/js/packages/components/src/components/Icon/components/icons/IconServer.mjs.map +1 -1
  206. package/dist/js/packages/components/src/components/Icon/components/icons/IconSettings.mjs.map +1 -1
  207. package/dist/js/packages/components/src/components/Icon/components/icons/IconShare.mjs.map +1 -1
  208. package/dist/js/packages/components/src/components/Icon/components/icons/IconShow.mjs.map +1 -1
  209. package/dist/js/packages/components/src/components/Icon/components/icons/IconSorting.mjs.map +1 -1
  210. package/dist/js/packages/components/src/components/Icon/components/icons/IconSsh.mjs.map +1 -1
  211. package/dist/js/packages/components/src/components/Icon/components/icons/IconSshKey.mjs.map +1 -1
  212. package/dist/js/packages/components/src/components/Icon/components/icons/IconSshSftp.mjs.map +1 -1
  213. package/dist/js/packages/components/src/components/Icon/components/icons/IconStack.mjs.map +1 -1
  214. package/dist/js/packages/components/src/components/Icon/components/icons/IconStar.mjs.map +1 -1
  215. package/dist/js/packages/components/src/components/Icon/components/icons/IconStarFilled.mjs.map +1 -1
  216. package/dist/js/packages/components/src/components/Icon/components/icons/IconStart.mjs.map +1 -1
  217. package/dist/js/packages/components/src/components/Icon/components/icons/IconStrikeThrough.mjs.map +1 -1
  218. package/dist/js/packages/components/src/components/Icon/components/icons/IconSubdomain.mjs.map +1 -1
  219. package/dist/js/packages/components/src/components/Icon/components/icons/IconSucceeded.mjs.map +1 -1
  220. package/dist/js/packages/components/src/components/Icon/components/icons/IconSuccess.mjs.map +1 -1
  221. package/dist/js/packages/components/src/components/Icon/components/icons/IconSupport.mjs.map +1 -1
  222. package/dist/js/packages/components/src/components/Icon/components/icons/IconTerminate.mjs.map +1 -1
  223. package/dist/js/packages/components/src/components/Icon/components/icons/IconTicket.mjs.map +1 -1
  224. package/dist/js/packages/components/src/components/Icon/components/icons/IconTime.mjs.map +1 -1
  225. package/dist/js/packages/components/src/components/Icon/components/icons/IconUnavailable.mjs.map +1 -1
  226. package/dist/js/packages/components/src/components/Icon/components/icons/IconUndo.mjs.map +1 -1
  227. package/dist/js/packages/components/src/components/Icon/components/icons/IconUnorderedList.mjs.map +1 -1
  228. package/dist/js/packages/components/src/components/Icon/components/icons/IconUpload.mjs.map +1 -1
  229. package/dist/js/packages/components/src/components/Icon/components/icons/IconUser.mjs.map +1 -1
  230. package/dist/js/packages/components/src/components/Icon/components/icons/IconVhost.mjs.map +1 -1
  231. package/dist/js/packages/components/src/components/Icon/components/icons/IconView.mjs.map +1 -1
  232. package/dist/js/packages/components/src/components/Icon/components/icons/IconVolume.mjs.map +1 -1
  233. package/dist/js/packages/components/src/components/Icon/components/icons/IconWarning.mjs.map +1 -1
  234. package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map +1 -1
  235. package/dist/js/packages/components/src/components/Image/Image.mjs.map +1 -1
  236. package/dist/js/packages/components/src/components/ImageCropper/ImageCropper.mjs.map +1 -1
  237. package/dist/js/packages/components/src/components/Initials/Initials.mjs.map +1 -1
  238. package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs.map +1 -1
  239. package/dist/js/packages/components/src/components/InlineCode/InlineCode.mjs.map +1 -1
  240. package/dist/js/packages/components/src/components/Kbd/Kbd.mjs.map +1 -1
  241. package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
  242. package/dist/js/packages/components/src/components/LabeledValue/LabeledValue.mjs.map +1 -1
  243. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs +2 -1
  244. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs.map +1 -1
  245. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.module.mjs +3 -1
  246. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.module.mjs.map +1 -1
  247. package/dist/js/packages/components/src/components/Legend/Legend.mjs.map +1 -1
  248. package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs.map +1 -1
  249. package/dist/js/packages/components/src/components/LightBox/LightBox.mjs.map +1 -1
  250. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/Controls.mjs.map +1 -1
  251. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/LightBoxGallery.mjs.map +1 -1
  252. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGalleryItem/LightBoxGalleryItem.mjs.map +1 -1
  253. package/dist/js/packages/components/src/components/Link/Link.mjs.map +1 -1
  254. package/dist/js/packages/components/src/components/Link/components/LinkIcon/LinkIcon.mjs.map +1 -1
  255. package/dist/js/packages/components/src/components/List/List.mjs.map +1 -1
  256. package/dist/js/packages/components/src/components/List/components/DataLoader/DataLoaderSuspense.mjs.map +1 -1
  257. package/dist/js/packages/components/src/components/List/components/EmptySearchResultView/EmptySearchResultView.mjs.map +1 -1
  258. package/dist/js/packages/components/src/components/List/components/EmptyView/EmptyView.mjs.map +1 -1
  259. package/dist/js/packages/components/src/components/List/components/Footer/Footer.mjs.map +1 -1
  260. package/dist/js/packages/components/src/components/List/components/Footer/components/PaginationInfos/PaginationInfos.mjs.map +1 -1
  261. package/dist/js/packages/components/src/components/List/components/Footer/components/ShowNextBatchButton/ShowNextBatchButton.mjs.map +1 -1
  262. package/dist/js/packages/components/src/components/List/components/Header/Header.mjs.map +1 -1
  263. package/dist/js/packages/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs.map +1 -1
  264. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs.map +1 -1
  265. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionCheckboxGroup.mjs.map +1 -1
  266. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionDateRange.mjs.map +1 -1
  267. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionRadioGroup.mjs.map +1 -1
  268. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs.map +1 -1
  269. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs.map +1 -1
  270. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/DateRangeFilterPopover.mjs.map +1 -1
  271. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenu.mjs.map +1 -1
  272. package/dist/js/packages/components/src/components/List/components/Header/components/SearchField/SearchField.mjs.map +1 -1
  273. package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.mjs.map +1 -1
  274. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs.map +1 -1
  275. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs.map +1 -1
  276. package/dist/js/packages/components/src/components/List/components/Items/Items.mjs.map +1 -1
  277. package/dist/js/packages/components/src/components/List/components/Items/components/Item/Item.mjs.map +1 -1
  278. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs.map +1 -1
  279. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs.map +1 -1
  280. package/dist/js/packages/components/src/components/List/components/Items/views/GridListItem/GridListItem.mjs.map +1 -1
  281. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
  282. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.module.mjs.map +1 -1
  283. package/dist/js/packages/components/src/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.mjs.map +1 -1
  284. package/dist/js/packages/components/src/components/List/components/ListSummary/ListSummary.mjs.map +1 -1
  285. package/dist/js/packages/components/src/components/List/components/Table/Table.mjs.map +1 -1
  286. package/dist/js/packages/components/src/components/List/components/Table/components/TableBodyLoadingView.mjs.map +1 -1
  287. package/dist/js/packages/components/src/components/List/components/Table/components/TableRowSkeletonView.mjs.map +1 -1
  288. package/dist/js/packages/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
  289. package/dist/js/packages/components/src/components/List/model/filter/dateRangeFilterFn.mjs +2 -2
  290. package/dist/js/packages/components/src/components/List/model/filter/dateRangeFilterFn.mjs.map +1 -1
  291. package/dist/js/packages/components/src/components/List/views/EmptyView/EmptyView.mjs.map +1 -1
  292. package/dist/js/packages/components/src/components/List/views/EmptyViewContainer/EmptyViewContainer.mjs.map +1 -1
  293. package/dist/js/packages/components/src/components/LoadingSpinner/LoadingSpinner.mjs.map +1 -1
  294. package/dist/js/packages/components/src/components/Markdown/Markdown.mjs.map +1 -1
  295. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
  296. package/dist/js/packages/components/src/components/MarkdownEditor/components/AttachmentButton.mjs.map +1 -1
  297. package/dist/js/packages/components/src/components/MarkdownEditor/components/ModeButton.mjs.map +1 -1
  298. package/dist/js/packages/components/src/components/MarkdownEditor/components/Toolbar.mjs.map +1 -1
  299. package/dist/js/packages/components/src/components/MarkdownEditor/components/ToolbarButton.mjs.map +1 -1
  300. package/dist/js/packages/components/src/components/MarkdownEditor/lib/useFileUpload.mjs.map +1 -1
  301. package/dist/js/packages/components/src/components/MenuItem/MenuItem.mjs.map +1 -1
  302. package/dist/js/packages/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs.map +1 -1
  303. package/dist/js/packages/components/src/components/Message/Message.mjs.map +1 -1
  304. package/dist/js/packages/components/src/components/MessageThread/MessageThread.mjs.map +1 -1
  305. package/dist/js/packages/components/src/components/MessageThread/components/MessageSeparator/MessageSeparator.mjs.map +1 -1
  306. package/dist/js/packages/components/src/components/Modal/Modal.mjs.map +1 -1
  307. package/dist/js/packages/components/src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.mjs.map +1 -1
  308. package/dist/js/packages/components/src/components/Navigation/Navigation.mjs.map +1 -1
  309. package/dist/js/packages/components/src/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit.mjs.map +1 -1
  310. package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
  311. package/dist/js/packages/components/src/components/Notification/Notification.mjs.map +1 -1
  312. package/dist/js/packages/components/src/components/NotificationProvider/NotificationContainer/NotificationContainer.mjs.map +1 -1
  313. package/dist/js/packages/components/src/components/NumberField/NumberField.mjs +3 -2
  314. package/dist/js/packages/components/src/components/NumberField/NumberField.mjs.map +1 -1
  315. package/dist/js/packages/components/src/components/Option/Option.mjs.map +1 -1
  316. package/dist/js/packages/components/src/components/Options/Options.mjs.map +1 -1
  317. package/dist/js/packages/components/src/components/Overlay/Overlay.mjs.map +1 -1
  318. package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs +6 -1
  319. package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs.map +1 -1
  320. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs +42 -19
  321. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
  322. package/dist/js/packages/components/src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.mjs +2 -2
  323. package/dist/js/packages/components/src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.mjs.map +1 -1
  324. package/dist/js/packages/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs.map +1 -1
  325. package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs.map +1 -1
  326. package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.mjs.map +1 -1
  327. package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry.mjs.map +1 -1
  328. package/dist/js/packages/components/src/components/PasswordCreationField/lib/ariaAnnounce.mjs.map +1 -1
  329. package/dist/js/packages/components/src/components/PasswordCreationField/lib/usePolicyValidationResult.mjs +12 -0
  330. package/dist/js/packages/components/src/components/PasswordCreationField/lib/usePolicyValidationResult.mjs.map +1 -1
  331. package/dist/js/packages/components/src/components/Popover/Popover.mjs.map +1 -1
  332. package/dist/js/packages/components/src/components/Popover/components/NonModalPopoverContent/NonModalPopoverContent.mjs.map +1 -1
  333. package/dist/js/packages/components/src/components/Popover/components/PopoverContent/PopoverContent.mjs.map +1 -1
  334. package/dist/js/packages/components/src/components/Popover/components/PopoverTip/PopoverTip.mjs.map +1 -1
  335. package/dist/js/packages/components/src/components/Popover/viewportPadding.mjs.map +1 -1
  336. package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.mjs.map +1 -1
  337. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs.map +1 -1
  338. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarLegend.mjs.map +1 -1
  339. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarValue.mjs.map +1 -1
  340. package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs +3 -2
  341. package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs.map +1 -1
  342. package/dist/js/packages/components/src/components/RadioGroup/components/Radio/Radio.mjs.map +1 -1
  343. package/dist/js/packages/components/src/components/RadioGroup/components/RadioButton/RadioButton.mjs.map +1 -1
  344. package/dist/js/packages/components/src/components/Rating/Rating.mjs +3 -2
  345. package/dist/js/packages/components/src/components/Rating/Rating.mjs.map +1 -1
  346. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/EmptySegment.mjs.map +1 -1
  347. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/FilledSegment.mjs.map +1 -1
  348. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingSegment.mjs.map +1 -1
  349. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs +3 -3
  350. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs.map +1 -1
  351. package/dist/js/packages/components/src/components/Section/Section.mjs.map +1 -1
  352. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
  353. package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs +3 -2
  354. package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  355. package/dist/js/packages/components/src/components/SegmentedControl/components/Segment/Segment.mjs.map +1 -1
  356. package/dist/js/packages/components/src/components/Select/Select.mjs +3 -3
  357. package/dist/js/packages/components/src/components/Select/Select.mjs.map +1 -1
  358. package/dist/js/packages/components/src/components/Separator/Separator.mjs.map +1 -1
  359. package/dist/js/packages/components/src/components/Skeleton/Skeleton.mjs.map +1 -1
  360. package/dist/js/packages/components/src/components/SkeletonText/SkeletonText.mjs.map +1 -1
  361. package/dist/js/packages/components/src/components/Slider/Slider.mjs +4 -3
  362. package/dist/js/packages/components/src/components/Slider/Slider.mjs.map +1 -1
  363. package/dist/js/packages/components/src/components/Switch/Switch.mjs +3 -2
  364. package/dist/js/packages/components/src/components/Switch/Switch.mjs.map +1 -1
  365. package/dist/js/packages/components/src/components/TabNavigation/TabNavigation.mjs.map +1 -1
  366. package/dist/js/packages/components/src/components/TabNavigation/components/LinkContent/LinkContent.mjs.map +1 -1
  367. package/dist/js/packages/components/src/components/Table/Table.mjs.map +1 -1
  368. package/dist/js/packages/components/src/components/Table/components/TableBody/TableBody.mjs.map +1 -1
  369. package/dist/js/packages/components/src/components/Table/components/TableCell/TableCell.mjs.map +1 -1
  370. package/dist/js/packages/components/src/components/Table/components/TableColumn/TableColumn.mjs.map +1 -1
  371. package/dist/js/packages/components/src/components/Table/components/TableHeader/TableHeader.mjs.map +1 -1
  372. package/dist/js/packages/components/src/components/Table/components/TableRow/TableRow.mjs.map +1 -1
  373. package/dist/js/packages/components/src/components/Tabs/Tabs.mjs.map +1 -1
  374. package/dist/js/packages/components/src/components/Tabs/components/FallbackTab/FallbackTab.mjs.map +1 -1
  375. package/dist/js/packages/components/src/components/Tabs/components/Tab/Tab.mjs.map +1 -1
  376. package/dist/js/packages/components/src/components/Tabs/components/TabList/TabList.mjs.map +1 -1
  377. package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.mjs.map +1 -1
  378. package/dist/js/packages/components/src/components/Text/Text.mjs.map +1 -1
  379. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs +3 -3
  380. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs.map +1 -1
  381. package/dist/js/packages/components/src/components/TextField/TextField.mjs +3 -3
  382. package/dist/js/packages/components/src/components/TextField/TextField.mjs.map +1 -1
  383. package/dist/js/packages/components/src/components/TimeField/TimeField.mjs +5 -3
  384. package/dist/js/packages/components/src/components/TimeField/TimeField.mjs.map +1 -1
  385. package/dist/js/packages/components/src/components/Tooltip/Tooltip.mjs.map +1 -1
  386. package/dist/js/packages/components/src/components/Truncate/Truncate.mjs.map +1 -1
  387. package/dist/js/packages/components/src/components/TunnelEntry/TunnelEntry.mjs.map +1 -1
  388. package/dist/js/packages/components/src/integrations/nextjs/components/RouterProvider/RouterProvider.mjs.map +1 -1
  389. package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
  390. package/dist/js/packages/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
  391. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormAction.mjs.map +1 -1
  392. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs +6 -3
  393. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs.map +1 -1
  394. package/dist/js/packages/components/src/lib/hooks/fieldErrorRenderedContext.mjs +16 -0
  395. package/dist/js/packages/components/src/lib/hooks/fieldErrorRenderedContext.mjs.map +1 -0
  396. package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs +8 -7
  397. package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs.map +1 -1
  398. package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs +34 -21
  399. package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs.map +1 -1
  400. package/dist/js/packages/components/src/lib/react/cloneElement.mjs.map +1 -1
  401. package/dist/js/packages/components/src/lib/react/components/Render/Render.mjs.map +1 -1
  402. package/dist/js/packages/components/src/lib/react/getPropsMerger.mjs.map +1 -1
  403. package/dist/js/packages/components/src/lib/theming/hooks/useDesignTokens.mjs.map +1 -1
  404. package/dist/js/packages/components/src/lib/tokens/CategoricalColors.mjs.map +1 -1
  405. package/dist/js/packages/components/src/lib/tokens/isCategoricalColor.mjs.map +1 -1
  406. package/dist/js/packages/components/src/status/componentStatus.mjs.map +1 -1
  407. package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs +16 -0
  408. package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs.map +1 -1
  409. package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs +16 -0
  410. package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs.map +1 -1
  411. package/dist/types/components/ActionGroup/ActionGroup.d.ts +3 -2
  412. package/dist/types/components/Button/Button.d.ts +7 -1
  413. package/dist/types/components/Button/stories/lib.d.ts +1 -1
  414. package/dist/types/components/CartesianChart/components/YAxis/YAxis.d.ts +7 -0
  415. package/dist/types/components/CodeEditor/CodeEditor.d.ts +7 -0
  416. package/dist/types/components/FileField/FileField.d.ts +1 -1
  417. package/dist/types/components/Flex/Flex.d.ts +4 -0
  418. package/dist/types/components/Link/Link.d.ts +5 -1
  419. package/dist/types/components/List/components/DataLoader/DataLoader.d.ts +1 -1
  420. package/dist/types/components/List/components/Items/components/Item/Item.d.ts +1 -1
  421. package/dist/types/components/List/components/Items/components/Item/hooks/useGridItemProps.d.ts +1 -1
  422. package/dist/types/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.d.ts +1 -1
  423. package/dist/types/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.d.ts +5 -0
  424. package/dist/types/integrations/react-hook-form/components/Field/Field.d.ts +1 -1
  425. package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts +1 -1
  426. package/dist/types/integrations/react-hook-form/components/FormContextProvider/FormContextProvider.d.ts +1 -1
  427. package/dist/types/integrations/react-hook-form/components/FormRootError/FormRootError.d.ts +12 -2
  428. package/dist/types/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.d.ts +1 -1
  429. package/dist/types/lib/hooks/fieldErrorRenderedContext.d.ts +1 -0
  430. package/dist/types/lib/hooks/useFieldComponent.d.ts +15 -4
  431. package/dist/types/lib/hooks/useFieldError.d.ts +7 -1
  432. package/dist/types/lib/theming/hooks/useDesignTokens.d.ts +12 -0
  433. package/package.json +13 -10
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangePicker.mjs","names":[],"sources":["../../../../../../../src/components/DateRangePicker/DateRangePicker.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport clsx from \"clsx\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport * as Aria from \"react-aria-components\";\nimport { Popover } from \"@/components/Popover\";\nimport { type DateRangePresets, RangeCalendar } from \"@/components/Calendar\";\nimport { DateRangeInput } from \"./components/DateRangeInput\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport type { RangeValue } from \"react-aria\";\nimport type { DateValue } from \"@internationalized/date\";\nimport styles from \"./DateRangePicker.module.scss\";\n\nexport interface DateRangePickerProps<T extends Aria.DateValue = Aria.DateValue>\n extends\n PropsWithChildren<Omit<Aria.DateRangePickerProps<T>, \"children\" | \"ref\">>,\n FlowComponentProps<HTMLSpanElement> {\n /**\n * Whether the calendar offers presets to pick a range with one click. Pass an\n * array to replace the built-in presets with your own.\n *\n * @default false\n */\n withDatePickerPresets?: boolean | DateRangePresets;\n}\n\n/** @flr-generate all */\nexport const DateRangePicker = flowComponent(\"DateRangePicker\", (props) => {\n // `null` is what react-aria's date range picker state uses for \"no range\"\n const {\n children,\n className,\n onChange,\n ref,\n withDatePickerPresets = false,\n ...rest\n } = useControlledHostValueProps(props, null);\n\n const popoverController = useOverlayController(\"Popover\");\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"DateRangePicker\");\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const onDatePickerChange = (value: RangeValue<DateValue> | null) => {\n if (onChange) {\n onChange(value);\n }\n popoverController.close();\n };\n\n return (\n <Aria.DateRangePicker\n {...rest}\n className={rootClassName}\n onOpenChange={(v) => popoverController.setOpen(v)}\n isOpen={popoverController.isOpen}\n onChange={onDatePickerChange}\n >\n <FieldErrorCaptureContext>\n <DateRangeInput isDisabled={props.isDisabled} ref={ref} />\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n </PropsContextProvider>\n <Popover\n placement=\"bottom end\"\n isDialogContent\n controller={popoverController}\n >\n <RangeCalendar\n withDatePickerPresets={withDatePickerPresets}\n className={styles.calendar}\n />\n </Popover>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </Aria.DateRangePicker>\n );\n});\n\nexport default DateRangePicker;\n"],"mappings":";;;;;;;;;;;;;;;;AAgCA,IAAa,kBAAkB,cAAc,oBAAoB,UAAU;CAEzE,MAAM,EACJ,UACA,WACA,UACA,KACA,wBAAwB,OACxB,GAAG,SACD,4BAA4B,OAAO,IAAI;CAE3C,MAAM,oBAAoB,qBAAqB,SAAS;CACxD,MAAM,EACJ,gBACA,0BACA,YACA,sBACE,kBAAkB,OAAO,iBAAiB;CAE9C,MAAM,gBAAgB,KAAK,WAAW,WAAW,SAAS;CAE1D,MAAM,sBAAsB,UAAwC;EAClE,IAAI,UACF,SAAS,KAAK;EAEhB,kBAAkB,MAAM;CAC1B;CAEA,OACE,qBAAC,KAAK,iBAAN;EACE,GAAI;EACJ,WAAW;EACX,eAAe,MAAM,kBAAkB,QAAQ,CAAC;EAChD,QAAQ,kBAAkB;EAC1B,UAAU;EALZ,UAAA,CAOE,qBAAC,0BAAD,EAAA,UAAA;GACE,oBAAC,gBAAD;IAAgB,YAAY,MAAM;IAAiB;GAAM,CAAA;GACzD,oBAAC,sBAAD;IAAsB,OAAO;IAC1B;GACmB,CAAA;GACtB,oBAAC,SAAD;IACE,WAAU;IACV,iBAAA;IACA,YAAY;IAEZ,UAAA,oBAAC,eAAD;KACyB;KACvB,WAAW,+BAAO;IACnB,CAAA;GACM,CAAA;EACe,EAAA,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACG;;AAE1B,CAAC"}
1
+ {"version":3,"file":"DateRangePicker.mjs","names":["styles"],"sources":["../../../../../../../src/components/DateRangePicker/DateRangePicker.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport clsx from \"clsx\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport * as Aria from \"react-aria-components\";\nimport { Popover } from \"@/components/Popover\";\nimport { type DateRangePresets, RangeCalendar } from \"@/components/Calendar\";\nimport { DateRangeInput } from \"./components/DateRangeInput\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport type { RangeValue } from \"react-aria\";\nimport type { DateValue } from \"@internationalized/date\";\nimport styles from \"./DateRangePicker.module.scss\";\n\nexport interface DateRangePickerProps<T extends Aria.DateValue = Aria.DateValue>\n extends\n PropsWithChildren<Omit<Aria.DateRangePickerProps<T>, \"children\" | \"ref\">>,\n FlowComponentProps<HTMLSpanElement> {\n /**\n * Whether the calendar offers presets to pick a range with one click. Pass an\n * array to replace the built-in presets with your own.\n *\n * @default false\n */\n withDatePickerPresets?: boolean | DateRangePresets;\n}\n\n/** @flr-generate all */\nexport const DateRangePicker = flowComponent(\"DateRangePicker\", (props) => {\n // `null` is what react-aria's date range picker state uses for \"no range\"\n const {\n children,\n className,\n onChange,\n ref,\n withDatePickerPresets = false,\n ...rest\n } = useControlledHostValueProps(props, null);\n\n const popoverController = useOverlayController(\"Popover\", {\n reuseControllerFromContext: false,\n });\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n wrapperProps,\n controlProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"DateRangePicker\");\n\n const rootClassName = clsx(wrapperProps.className, className);\n\n const onDatePickerChange = (value: RangeValue<DateValue> | null) => {\n if (onChange) {\n onChange(value);\n }\n popoverController.close();\n };\n\n return (\n <Aria.DateRangePicker\n {...rest}\n aria-describedby={controlProps[\"aria-describedby\"]}\n className={rootClassName}\n onOpenChange={(v) => popoverController.setOpen(v)}\n isOpen={popoverController.isOpen}\n onChange={onDatePickerChange}\n >\n <FieldErrorCaptureContext>\n <DateRangeInput isDisabled={props.isDisabled} ref={ref} />\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n </PropsContextProvider>\n <Popover\n placement=\"bottom end\"\n isDialogContent\n controller={popoverController}\n >\n <RangeCalendar\n withDatePickerPresets={withDatePickerPresets}\n className={styles.calendar}\n />\n </Popover>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </Aria.DateRangePicker>\n );\n});\n\nexport default DateRangePicker;\n"],"mappings":";;;;;;;;;;;;;;;;AAgCA,IAAa,kBAAkB,cAAc,oBAAoB,UAAU;CAEzE,MAAM,EACJ,UACA,WACA,UACA,KACA,wBAAwB,OACxB,GAAG,SACD,4BAA4B,OAAO,IAAI;CAE3C,MAAM,oBAAoB,qBAAqB,WAAW,EACxD,4BAA4B,MAC9B,CAAC;CACD,MAAM,EACJ,gBACA,0BACA,cACA,cACA,sBACE,kBAAkB,OAAO,iBAAiB;CAE9C,MAAM,gBAAgB,KAAK,aAAa,WAAW,SAAS;CAE5D,MAAM,sBAAsB,UAAwC;EAClE,IAAI,UACF,SAAS,KAAK;EAEhB,kBAAkB,MAAM;CAC1B;CAEA,OACE,qBAAC,KAAK,iBAAN;EACE,GAAI;EACJ,oBAAkB,aAAa;EAC/B,WAAW;EACX,eAAe,MAAM,kBAAkB,QAAQ,CAAC;EAChD,QAAQ,kBAAkB;EAC1B,UAAU;EANZ,UAAA,CAQE,qBAAC,0BAAD,EAAA,UAAA;GACE,oBAAC,gBAAD;IAAgB,YAAY,MAAM;IAAiB;GAAM,CAAA;GACzD,oBAAC,sBAAD;IAAsB,OAAO;IAC1B;GACmB,CAAA;GACtB,oBAAC,SAAD;IACE,WAAU;IACV,iBAAA;IACA,YAAY;IAEZ,UAAA,oBAAC,eAAD;KACyB;KACvB,WAAWA,+BAAO;IACnB,CAAA;GACM,CAAA;EACe,EAAA,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACG;;AAE1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangeInput.mjs","names":[],"sources":["../../../../../../../../../src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport type React from \"react\";\nimport styles from \"./DateRangeInput.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport { Button } from \"@/components/Button\";\nimport { IconDate } from \"@/components/Icon/components/icons\";\nimport DateInput from \"@/components/DateInput\";\n\nexport interface DateInputProps {\n isDisabled?: boolean;\n ref?: React.Ref<HTMLSpanElement>;\n}\n\nexport const DateRangeInput: FC<DateInputProps> = (props) => {\n const { isDisabled, ref } = props;\n\n return (\n <Aria.Group className={styles.dateRangeInput}>\n <div className={styles.inputs}>\n <DateInput slot=\"start\" ref={ref} />\n <span aria-hidden=\"true\">–</span>\n <DateInput slot=\"end\" />\n </div>\n <Button variant=\"plain\" color=\"secondary\" isDisabled={isDisabled}>\n <IconDate />\n </Button>\n </Aria.Group>\n );\n};\n\nexport default DateRangeInput;\n"],"mappings":";;;;;;;;;AAaA,IAAa,kBAAsC,UAAU;CAC3D,MAAM,EAAE,YAAY,QAAQ;CAE5B,OACE,qBAAC,KAAK,OAAN;EAAY,WAAW,8BAAO;EAA9B,UAAA,CACE,qBAAC,OAAD;GAAK,WAAW,8BAAO;GAAvB,UAAA;IACE,oBAAC,WAAD;KAAW,MAAK;KAAa;IAAM,CAAA;IACnC,oBAAC,QAAD;KAAM,eAAY;KAAO,UAAA;IAAO,CAAA;IAChC,oBAAC,WAAD,EAAW,MAAK,MAAO,CAAA;GACpB;EACL,CAAA,GAAA,oBAAC,QAAD;GAAQ,SAAQ;GAAQ,OAAM;GAAwB;GACpD,UAAA,oBAAC,UAAD,CAAW,CAAA;EACL,CAAA,CACE;;AAEhB"}
1
+ {"version":3,"file":"DateRangeInput.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport type React from \"react\";\nimport styles from \"./DateRangeInput.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport { Button } from \"@/components/Button\";\nimport { IconDate } from \"@/components/Icon/components/icons\";\nimport DateInput from \"@/components/DateInput\";\n\nexport interface DateInputProps {\n isDisabled?: boolean;\n ref?: React.Ref<HTMLSpanElement>;\n}\n\nexport const DateRangeInput: FC<DateInputProps> = (props) => {\n const { isDisabled, ref } = props;\n\n return (\n <Aria.Group className={styles.dateRangeInput}>\n <div className={styles.inputs}>\n <DateInput slot=\"start\" ref={ref} />\n <span aria-hidden=\"true\">–</span>\n <DateInput slot=\"end\" />\n </div>\n <Button variant=\"plain\" color=\"secondary\" isDisabled={isDisabled}>\n <IconDate />\n </Button>\n </Aria.Group>\n );\n};\n\nexport default DateRangeInput;\n"],"mappings":";;;;;;;;;AAaA,IAAa,kBAAsC,UAAU;CAC3D,MAAM,EAAE,YAAY,QAAQ;CAE5B,OACE,qBAAC,KAAK,OAAN;EAAY,WAAWA,8BAAO;EAA9B,UAAA,CACE,qBAAC,OAAD;GAAK,WAAWA,8BAAO;GAAvB,UAAA;IACE,oBAAC,WAAD;KAAW,MAAK;KAAa;IAAM,CAAA;IACnC,oBAAC,QAAD;KAAM,eAAY;KAAO,UAAA;IAAO,CAAA;IAChC,oBAAC,WAAD,EAAW,MAAK,MAAO,CAAA;GACpB;EACL,CAAA,GAAA,oBAAC,QAAD;GAAQ,SAAQ;GAAQ,OAAM;GAAwB;GACpD,UAAA,oBAAC,UAAD,CAAW,CAAA;EACL,CAAA,CACE;;AAEhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChart.mjs","names":[],"sources":["../../../../../../../src/components/DonutChart/DonutChart.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"./DonutChart.module.scss\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport { DonutChartValue } from \"@/components/DonutChart/components/DonutChartValue\";\nimport { Donut } from \"@/components/DonutChart/components/Donut\";\nimport { Wrap } from \"@/components/Wrap\";\nimport { DonutChartLegend } from \"@/components/DonutChart/components/DonutChartLegend\";\nimport type { Status } from \"@/lib/types/props\";\n\nexport interface DonutChartSegment {\n value: number;\n title: string;\n color?: CategoricalWithCustomColor;\n valueText?: string;\n}\n\nexport interface DonutChartProps\n extends\n Omit<Aria.ProgressBarProps, \"children\" | \"valueLabel\">,\n PropsWithChildren {\n /** The status the donut chart is colored by. */\n status?: Exclude<Status, \"unavailable\">;\n /** The size variant of the donut chart. @default \"m\" */\n size?: \"m\" | \"l\";\n /** Divides the fill of the donut chart into segments */\n segments?: DonutChartSegment[];\n /**\n * Whether the legend component is shown when segments are used. @default:\n * true\n */\n showLegend?: boolean;\n /** The position of the legend. @default \"right\" */\n legendPosition?: \"top\" | \"left\" | \"bottom\" | \"right\";\n}\n\n/** @flr-generate all */\nexport const DonutChart: FC<DonutChartProps> = (props) => {\n const {\n size = \"m\",\n status = \"info\",\n className,\n value,\n segments,\n maxValue,\n formatOptions,\n showLegend = true,\n legendPosition = \"right\",\n children,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.donutChart,\n size === \"l\" && styles[\"size-l\"],\n styles[status],\n className,\n );\n\n const segmentsTotalValue = segments\n ? segments.map((s) => s.value).reduce((a, b) => a + b, 0)\n : undefined;\n\n return (\n <Wrap if={showLegend && segments}>\n <div className={clsx(styles.donutChartContainer, styles[legendPosition])}>\n <Aria.ProgressBar\n className={rootClassName}\n value={segmentsTotalValue ?? value}\n {...rest}\n >\n <Donut\n value={segmentsTotalValue ?? value}\n segments={segments}\n size={size}\n maxValue={maxValue}\n />\n <DonutChartValue\n value={segmentsTotalValue ?? value}\n formatOptions={formatOptions}\n >\n {children}\n </DonutChartValue>\n </Aria.ProgressBar>\n\n {showLegend && segments && (\n <DonutChartLegend\n showLegend={showLegend}\n segments={segments}\n formatOptions={formatOptions}\n />\n )}\n </div>\n </Wrap>\n );\n};\n\nexport default DonutChart;\n"],"mappings":";;;;;;;;;;;;AAsCA,IAAa,cAAmC,UAAU;CACxD,MAAM,EACJ,OAAO,KACP,SAAS,QACT,WACA,OACA,UACA,UACA,eACA,aAAa,MACb,iBAAiB,SACjB,UACA,GAAG,SACD;CAEJ,MAAM,gBAAgB,KACpB,0BAAO,YACP,SAAS,OAAO,0BAAO,WACvB,0BAAO,SACP,SACF;CAEA,MAAM,qBAAqB,WACvB,SAAS,KAAK,MAAM,EAAE,KAAK,CAAC,CAAC,QAAQ,GAAG,MAAM,IAAI,GAAG,CAAC,IACtD,KAAA;CAEJ,OACE,oBAAC,MAAD;EAAM,IAAI,cAAc;EACtB,UAAA,qBAAC,OAAD;GAAK,WAAW,KAAK,0BAAO,qBAAqB,0BAAO,eAAe;GAAvE,UAAA,CACE,qBAAC,KAAK,aAAN;IACE,WAAW;IACX,OAAO,sBAAsB;IAC7B,GAAI;IAHN,UAAA,CAKE,oBAAC,OAAD;KACE,OAAO,sBAAsB;KACnB;KACJ;KACI;IACX,CAAA,GACD,oBAAC,iBAAD;KACE,OAAO,sBAAsB;KACd;KAEd;IACc,CAAA,CACD;GAEjB,CAAA,GAAA,cAAc,YACb,oBAAC,kBAAD;IACc;IACF;IACK;GAChB,CAAA,CAEA;;CACD,CAAA;AAEV"}
1
+ {"version":3,"file":"DonutChart.mjs","names":["styles"],"sources":["../../../../../../../src/components/DonutChart/DonutChart.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"./DonutChart.module.scss\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport { DonutChartValue } from \"@/components/DonutChart/components/DonutChartValue\";\nimport { Donut } from \"@/components/DonutChart/components/Donut\";\nimport { Wrap } from \"@/components/Wrap\";\nimport { DonutChartLegend } from \"@/components/DonutChart/components/DonutChartLegend\";\nimport type { Status } from \"@/lib/types/props\";\n\nexport interface DonutChartSegment {\n value: number;\n title: string;\n color?: CategoricalWithCustomColor;\n valueText?: string;\n}\n\nexport interface DonutChartProps\n extends\n Omit<Aria.ProgressBarProps, \"children\" | \"valueLabel\">,\n PropsWithChildren {\n /** The status the donut chart is colored by. */\n status?: Exclude<Status, \"unavailable\">;\n /** The size variant of the donut chart. @default \"m\" */\n size?: \"m\" | \"l\";\n /** Divides the fill of the donut chart into segments */\n segments?: DonutChartSegment[];\n /**\n * Whether the legend component is shown when segments are used. @default:\n * true\n */\n showLegend?: boolean;\n /** The position of the legend. @default \"right\" */\n legendPosition?: \"top\" | \"left\" | \"bottom\" | \"right\";\n}\n\n/** @flr-generate all */\nexport const DonutChart: FC<DonutChartProps> = (props) => {\n const {\n size = \"m\",\n status = \"info\",\n className,\n value,\n segments,\n maxValue,\n formatOptions,\n showLegend = true,\n legendPosition = \"right\",\n children,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.donutChart,\n size === \"l\" && styles[\"size-l\"],\n styles[status],\n className,\n );\n\n const segmentsTotalValue = segments\n ? segments.map((s) => s.value).reduce((a, b) => a + b, 0)\n : undefined;\n\n return (\n <Wrap if={showLegend && segments}>\n <div className={clsx(styles.donutChartContainer, styles[legendPosition])}>\n <Aria.ProgressBar\n className={rootClassName}\n value={segmentsTotalValue ?? value}\n {...rest}\n >\n <Donut\n value={segmentsTotalValue ?? value}\n segments={segments}\n size={size}\n maxValue={maxValue}\n />\n <DonutChartValue\n value={segmentsTotalValue ?? value}\n formatOptions={formatOptions}\n >\n {children}\n </DonutChartValue>\n </Aria.ProgressBar>\n\n {showLegend && segments && (\n <DonutChartLegend\n showLegend={showLegend}\n segments={segments}\n formatOptions={formatOptions}\n />\n )}\n </div>\n </Wrap>\n );\n};\n\nexport default DonutChart;\n"],"mappings":";;;;;;;;;;;;AAsCA,IAAa,cAAmC,UAAU;CACxD,MAAM,EACJ,OAAO,KACP,SAAS,QACT,WACA,OACA,UACA,UACA,eACA,aAAa,MACb,iBAAiB,SACjB,UACA,GAAG,SACD;CAEJ,MAAM,gBAAgB,KACpBA,0BAAO,YACP,SAAS,OAAOA,0BAAO,WACvBA,0BAAO,SACP,SACF;CAEA,MAAM,qBAAqB,WACvB,SAAS,KAAK,MAAM,EAAE,KAAK,CAAC,CAAC,QAAQ,GAAG,MAAM,IAAI,GAAG,CAAC,IACtD,KAAA;CAEJ,OACE,oBAAC,MAAD;EAAM,IAAI,cAAc;EACtB,UAAA,qBAAC,OAAD;GAAK,WAAW,KAAKA,0BAAO,qBAAqBA,0BAAO,eAAe;GAAvE,UAAA,CACE,qBAAC,KAAK,aAAN;IACE,WAAW;IACX,OAAO,sBAAsB;IAC7B,GAAI;IAHN,UAAA,CAKE,oBAAC,OAAD;KACE,OAAO,sBAAsB;KACnB;KACJ;KACI;IACX,CAAA,GACD,oBAAC,iBAAD;KACE,OAAO,sBAAsB;KACd;KAEd;IACc,CAAA,CACD;GAEjB,CAAA,GAAA,cAAc,YACb,oBAAC,kBAAD;IACc;IACF;IACK;GAChB,CAAA,CAEA;;CACD,CAAA;AAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"Donut.mjs","names":[],"sources":["../../../../../../../../src/components/DonutChart/components/Donut.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport styles from \"@/components/DonutChart/DonutChart.module.scss\";\nimport { DonutChartFill } from \"@/components/DonutChart/components/DonutChartFill\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\n\ninterface Props extends Pick<\n DonutChartProps,\n \"segments\" | \"size\" | \"maxValue\"\n> {\n value?: number;\n}\n\nexport const Donut: FC<Props> = (props) => {\n const { value = 0, segments, size, maxValue: maxValueFromProps } = props;\n\n const strokeWidth = 0.5;\n const fillWidth = size === \"m\" ? 8 : 12;\n const center = fillWidth * 4;\n const radius = center - fillWidth / 2;\n const maxValue = maxValueFromProps ?? 100;\n\n return (\n <>\n <svg\n width={center * 4}\n height={center * 4}\n viewBox={`0 0 ${center * 2} ${center * 2}`}\n fill=\"none\"\n strokeWidth={fillWidth}\n >\n <circle\n className={styles.background}\n cx={center}\n cy={center}\n r={radius}\n strokeWidth={fillWidth}\n />\n <circle\n className={styles.border}\n cx={center}\n cy={center}\n r={center - strokeWidth / 2}\n strokeWidth={strokeWidth}\n />\n <circle\n className={styles.border}\n cx={center}\n cy={center}\n r={center - fillWidth + strokeWidth / 2}\n strokeWidth={strokeWidth}\n />\n\n <DonutChartFill\n radius={radius}\n center={center}\n value={value < maxValue ? value : maxValue}\n segments={segments}\n maxValue={maxValue}\n />\n </svg>\n </>\n );\n};\n"],"mappings":";;;;;;AAYA,IAAa,SAAoB,UAAU;CACzC,MAAM,EAAE,QAAQ,GAAG,UAAU,MAAM,UAAU,sBAAsB;CAEnE,MAAM,cAAc;CACpB,MAAM,YAAY,SAAS,MAAM,IAAI;CACrC,MAAM,SAAS,YAAY;CAC3B,MAAM,SAAS,SAAS,YAAY;CACpC,MAAM,WAAW,qBAAqB;CAEtC,OACE,oBAAA,UAAA,EAAA,UACE,qBAAC,OAAD;EACE,OAAO,SAAS;EAChB,QAAQ,SAAS;EACjB,SAAS,OAAO,SAAS,EAAE,GAAG,SAAS;EACvC,MAAK;EACL,aAAa;EALf,UAAA;GAOE,oBAAC,UAAD;IACE,WAAW,0BAAO;IAClB,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,aAAa;GACd,CAAA;GACD,oBAAC,UAAD;IACE,WAAW,0BAAO;IAClB,IAAI;IACJ,IAAI;IACJ,GAAG,SAAS,cAAc;IACb;GACd,CAAA;GACD,oBAAC,UAAD;IACE,WAAW,0BAAO;IAClB,IAAI;IACJ,IAAI;IACJ,GAAG,SAAS,YAAY,cAAc;IACzB;GACd,CAAA;GAED,oBAAC,gBAAD;IACU;IACA;IACR,OAAO,QAAQ,WAAW,QAAQ;IACxB;IACA;GACX,CAAA;EACE;CACL,CAAA,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"Donut.mjs","names":["_Fragment","styles"],"sources":["../../../../../../../../src/components/DonutChart/components/Donut.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport styles from \"@/components/DonutChart/DonutChart.module.scss\";\nimport { DonutChartFill } from \"@/components/DonutChart/components/DonutChartFill\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\n\ninterface Props extends Pick<\n DonutChartProps,\n \"segments\" | \"size\" | \"maxValue\"\n> {\n value?: number;\n}\n\nexport const Donut: FC<Props> = (props) => {\n const { value = 0, segments, size, maxValue: maxValueFromProps } = props;\n\n const strokeWidth = 0.5;\n const fillWidth = size === \"m\" ? 8 : 12;\n const center = fillWidth * 4;\n const radius = center - fillWidth / 2;\n const maxValue = maxValueFromProps ?? 100;\n\n return (\n <>\n <svg\n width={center * 4}\n height={center * 4}\n viewBox={`0 0 ${center * 2} ${center * 2}`}\n fill=\"none\"\n strokeWidth={fillWidth}\n >\n <circle\n className={styles.background}\n cx={center}\n cy={center}\n r={radius}\n strokeWidth={fillWidth}\n />\n <circle\n className={styles.border}\n cx={center}\n cy={center}\n r={center - strokeWidth / 2}\n strokeWidth={strokeWidth}\n />\n <circle\n className={styles.border}\n cx={center}\n cy={center}\n r={center - fillWidth + strokeWidth / 2}\n strokeWidth={strokeWidth}\n />\n\n <DonutChartFill\n radius={radius}\n center={center}\n value={value < maxValue ? value : maxValue}\n segments={segments}\n maxValue={maxValue}\n />\n </svg>\n </>\n );\n};\n"],"mappings":";;;;;;AAYA,IAAa,SAAoB,UAAU;CACzC,MAAM,EAAE,QAAQ,GAAG,UAAU,MAAM,UAAU,sBAAsB;CAEnE,MAAM,cAAc;CACpB,MAAM,YAAY,SAAS,MAAM,IAAI;CACrC,MAAM,SAAS,YAAY;CAC3B,MAAM,SAAS,SAAS,YAAY;CACpC,MAAM,WAAW,qBAAqB;CAEtC,OACE,oBAAAA,UAAA,EAAA,UACE,qBAAC,OAAD;EACE,OAAO,SAAS;EAChB,QAAQ,SAAS;EACjB,SAAS,OAAO,SAAS,EAAE,GAAG,SAAS;EACvC,MAAK;EACL,aAAa;EALf,UAAA;GAOE,oBAAC,UAAD;IACE,WAAWC,0BAAO;IAClB,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,aAAa;GACd,CAAA;GACD,oBAAC,UAAD;IACE,WAAWA,0BAAO;IAClB,IAAI;IACJ,IAAI;IACJ,GAAG,SAAS,cAAc;IACb;GACd,CAAA;GACD,oBAAC,UAAD;IACE,WAAWA,0BAAO;IAClB,IAAI;IACJ,IAAI;IACJ,GAAG,SAAS,YAAY,cAAc;IACzB;GACd,CAAA;GAED,oBAAC,gBAAD;IACU;IACA;IACR,OAAO,QAAQ,WAAW,QAAQ;IACxB;IACA;GACX,CAAA;EACE;CACL,CAAA,EAAA,CAAA;AAEN"}
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChartFill.mjs","names":[],"sources":["../../../../../../../../src/components/DonutChart/components/DonutChartFill.tsx"],"sourcesContent":["import type { CSSProperties, FC } from \"react\";\nimport styles from \"@/components/DonutChart/DonutChart.module.scss\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\nimport { getCategoricalColorByIndex } from \"@/lib/tokens/getCategoricalColorByIndex\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\n\ninterface Props extends Pick<DonutChartProps, \"segments\"> {\n center: number;\n value?: number;\n radius: number;\n maxValue: number;\n}\n\n/**\n * `pathLength=\"100\"` measures the stroke in percent, so the stylesheet draws\n * and rotates each circle from its share and its offset alone – and the load-in\n * keyframes can grow every segment out of 12 o'clock.\n */\nconst fillStyle = (percent: number, offsetPercent: number): CSSProperties => ({\n \"--donut-chart--percent\": percent,\n \"--donut-chart--offset\": offsetPercent,\n});\n\nexport const DonutChartFill: FC<Props> = (props) => {\n const { center, value = 0, radius, segments, maxValue } = props;\n\n const percent = (100 / maxValue) * value;\n\n if (!segments) {\n return (\n <circle\n className={styles.fill}\n cx={center}\n cy={center}\n r={radius}\n pathLength={100}\n style={fillStyle(percent, 0)}\n />\n );\n }\n\n let offsetPercent = 0;\n\n return segments.map((s, i) => {\n const segmentPercent = (100 / maxValue) * s.value;\n\n const currentOffsetPercent = offsetPercent;\n\n offsetPercent = offsetPercent + segmentPercent;\n\n const color =\n !s.color || isCategoricalColor(s.color)\n ? `var(--color--categorical--${s.color ?? getCategoricalColorByIndex(i)})`\n : s.color;\n\n // Index keys: a segment added after mount animates alone out of 12 o'clock,\n // over the segments already there.\n return (\n <circle\n key={i}\n className={styles.segment}\n cx={center}\n cy={center}\n r={radius}\n pathLength={100}\n stroke={color}\n style={fillStyle(segmentPercent, currentOffsetPercent)}\n />\n );\n });\n};\n"],"mappings":";;;;;;;;;;;;AAkBA,IAAM,aAAa,SAAiB,mBAA0C;CAC5E,0BAA0B;CAC1B,yBAAyB;AAC3B;AAEA,IAAa,kBAA6B,UAAU;CAClD,MAAM,EAAE,QAAQ,QAAQ,GAAG,QAAQ,UAAU,aAAa;CAE1D,MAAM,UAAW,MAAM,WAAY;CAEnC,IAAI,CAAC,UACH,OACE,oBAAC,UAAD;EACE,WAAW,0BAAO;EAClB,IAAI;EACJ,IAAI;EACJ,GAAG;EACH,YAAY;EACZ,OAAO,UAAU,SAAS,CAAC;CAC5B,CAAA;CAIL,IAAI,gBAAgB;CAEpB,OAAO,SAAS,KAAK,GAAG,MAAM;EAC5B,MAAM,iBAAkB,MAAM,WAAY,EAAE;EAE5C,MAAM,uBAAuB;EAE7B,gBAAgB,gBAAgB;EAEhC,MAAM,QACJ,CAAC,EAAE,SAAS,mBAAmB,EAAE,KAAK,IAClC,6BAA6B,EAAE,SAAS,2BAA2B,CAAC,EAAE,KACtE,EAAE;EAIR,OACE,oBAAC,UAAD;GAEE,WAAW,0BAAO;GAClB,IAAI;GACJ,IAAI;GACJ,GAAG;GACH,YAAY;GACZ,QAAQ;GACR,OAAO,UAAU,gBAAgB,oBAAoB;EACtD,GARM,CAQN;CAEL,CAAC;AACH"}
1
+ {"version":3,"file":"DonutChartFill.mjs","names":["styles"],"sources":["../../../../../../../../src/components/DonutChart/components/DonutChartFill.tsx"],"sourcesContent":["import type { CSSProperties, FC } from \"react\";\nimport styles from \"@/components/DonutChart/DonutChart.module.scss\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\nimport { getCategoricalColorByIndex } from \"@/lib/tokens/getCategoricalColorByIndex\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\n\ninterface Props extends Pick<DonutChartProps, \"segments\"> {\n center: number;\n value?: number;\n radius: number;\n maxValue: number;\n}\n\n/**\n * `pathLength=\"100\"` measures the stroke in percent, so the stylesheet draws\n * and rotates each circle from its share and its offset alone – and the load-in\n * keyframes can grow every segment out of 12 o'clock.\n */\nconst fillStyle = (percent: number, offsetPercent: number): CSSProperties => ({\n \"--donut-chart--percent\": percent,\n \"--donut-chart--offset\": offsetPercent,\n});\n\nexport const DonutChartFill: FC<Props> = (props) => {\n const { center, value = 0, radius, segments, maxValue } = props;\n\n const percent = (100 / maxValue) * value;\n\n if (!segments) {\n return (\n <circle\n className={styles.fill}\n cx={center}\n cy={center}\n r={radius}\n pathLength={100}\n style={fillStyle(percent, 0)}\n />\n );\n }\n\n let offsetPercent = 0;\n\n return segments.map((s, i) => {\n const segmentPercent = (100 / maxValue) * s.value;\n\n const currentOffsetPercent = offsetPercent;\n\n offsetPercent = offsetPercent + segmentPercent;\n\n const color =\n !s.color || isCategoricalColor(s.color)\n ? `var(--color--categorical--${s.color ?? getCategoricalColorByIndex(i)})`\n : s.color;\n\n // Index keys: a segment added after mount animates alone out of 12 o'clock,\n // over the segments already there.\n return (\n <circle\n key={i}\n className={styles.segment}\n cx={center}\n cy={center}\n r={radius}\n pathLength={100}\n stroke={color}\n style={fillStyle(segmentPercent, currentOffsetPercent)}\n />\n );\n });\n};\n"],"mappings":";;;;;;;;;;;;AAkBA,IAAM,aAAa,SAAiB,mBAA0C;CAC5E,0BAA0B;CAC1B,yBAAyB;AAC3B;AAEA,IAAa,kBAA6B,UAAU;CAClD,MAAM,EAAE,QAAQ,QAAQ,GAAG,QAAQ,UAAU,aAAa;CAE1D,MAAM,UAAW,MAAM,WAAY;CAEnC,IAAI,CAAC,UACH,OACE,oBAAC,UAAD;EACE,WAAWA,0BAAO;EAClB,IAAI;EACJ,IAAI;EACJ,GAAG;EACH,YAAY;EACZ,OAAO,UAAU,SAAS,CAAC;CAC5B,CAAA;CAIL,IAAI,gBAAgB;CAEpB,OAAO,SAAS,KAAK,GAAG,MAAM;EAC5B,MAAM,iBAAkB,MAAM,WAAY,EAAE;EAE5C,MAAM,uBAAuB;EAE7B,gBAAgB,gBAAgB;EAEhC,MAAM,QACJ,CAAC,EAAE,SAAS,mBAAmB,EAAE,KAAK,IAClC,6BAA6B,EAAE,SAAS,2BAA2B,CAAC,EAAE,KACtE,EAAE;EAIR,OACE,oBAAC,UAAD;GAEE,WAAWA,0BAAO;GAClB,IAAI;GACJ,IAAI;GACJ,GAAG;GACH,YAAY;GACZ,QAAQ;GACR,OAAO,UAAU,gBAAgB,oBAAoB;EACtD,GARM,CAQN;CAEL,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChartLegend.mjs","names":[],"sources":["../../../../../../../../src/components/DonutChart/components/DonutChartLegend.tsx"],"sourcesContent":["import styles from \"../DonutChart.module.scss\";\nimport { type FC } from \"react\";\nimport { useNumberFormatter } from \"react-aria\";\nimport { Legend, LegendItem } from \"@/components/Legend\";\nimport { getCategoricalColorByIndex } from \"@/lib/tokens/getCategoricalColorByIndex\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\n\ntype Props = Pick<DonutChartProps, \"segments\" | \"showLegend\" | \"formatOptions\">;\n\nexport const DonutChartLegend: FC<Props> = (props) => {\n const { segments, showLegend, formatOptions } = props;\n\n const formatter = useNumberFormatter(formatOptions);\n\n if (!segments || !showLegend) {\n return null;\n }\n\n return (\n <Legend className={styles.legend}>\n {segments.map((s, i) => {\n const formattedValue = formatOptions\n ? formatter.format(s.value)\n : `${s.value} %`;\n\n return (\n <LegendItem\n key={s.title}\n color={s.color ?? getCategoricalColorByIndex(i)}\n >{`${s.title} (${s.valueText ?? formattedValue})`}</LegendItem>\n );\n })}\n </Legend>\n );\n};\n"],"mappings":";;;;;;;;;;AASA,IAAa,oBAA+B,UAAU;CACpD,MAAM,EAAE,UAAU,YAAY,kBAAkB;CAEhD,MAAM,YAAY,mBAAmB,aAAa;CAElD,IAAI,CAAC,YAAY,CAAC,YAChB,OAAO;CAGT,OACE,oBAAC,QAAD;EAAQ,WAAW,0BAAO;EACvB,UAAA,SAAS,KAAK,GAAG,MAAM;GACtB,MAAM,iBAAiB,gBACnB,UAAU,OAAO,EAAE,KAAK,IACxB,GAAG,EAAE,MAAM;GAEf,OACE,oBAAC,YAAD;IAEE,OAAO,EAAE,SAAS,2BAA2B,CAAC;IAC9C,UAAA,GAAG,EAAE,MAAM,IAAI,EAAE,aAAa,eAAe;GAAe,GAFvD,EAAE,KAEqD;EAElE,CAAC;CACK,CAAA;AAEZ"}
1
+ {"version":3,"file":"DonutChartLegend.mjs","names":["styles"],"sources":["../../../../../../../../src/components/DonutChart/components/DonutChartLegend.tsx"],"sourcesContent":["import styles from \"../DonutChart.module.scss\";\nimport { type FC } from \"react\";\nimport { useNumberFormatter } from \"react-aria\";\nimport { Legend, LegendItem } from \"@/components/Legend\";\nimport { getCategoricalColorByIndex } from \"@/lib/tokens/getCategoricalColorByIndex\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\n\ntype Props = Pick<DonutChartProps, \"segments\" | \"showLegend\" | \"formatOptions\">;\n\nexport const DonutChartLegend: FC<Props> = (props) => {\n const { segments, showLegend, formatOptions } = props;\n\n const formatter = useNumberFormatter(formatOptions);\n\n if (!segments || !showLegend) {\n return null;\n }\n\n return (\n <Legend className={styles.legend}>\n {segments.map((s, i) => {\n const formattedValue = formatOptions\n ? formatter.format(s.value)\n : `${s.value} %`;\n\n return (\n <LegendItem\n key={s.title}\n color={s.color ?? getCategoricalColorByIndex(i)}\n >{`${s.title} (${s.valueText ?? formattedValue})`}</LegendItem>\n );\n })}\n </Legend>\n );\n};\n"],"mappings":";;;;;;;;;;AASA,IAAa,oBAA+B,UAAU;CACpD,MAAM,EAAE,UAAU,YAAY,kBAAkB;CAEhD,MAAM,YAAY,mBAAmB,aAAa;CAElD,IAAI,CAAC,YAAY,CAAC,YAChB,OAAO;CAGT,OACE,oBAAC,QAAD;EAAQ,WAAWA,0BAAO;EACvB,UAAA,SAAS,KAAK,GAAG,MAAM;GACtB,MAAM,iBAAiB,gBACnB,UAAU,OAAO,EAAE,KAAK,IACxB,GAAG,EAAE,MAAM;GAEf,OACE,oBAAC,YAAD;IAEE,OAAO,EAAE,SAAS,2BAA2B,CAAC;IAC9C,UAAA,GAAG,EAAE,MAAM,IAAI,EAAE,aAAa,eAAe;GAAe,GAFvD,EAAE,KAEqD;EAElE,CAAC;CACK,CAAA;AAEZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChartValue.mjs","names":[],"sources":["../../../../../../../../src/components/DonutChart/components/DonutChartValue.tsx"],"sourcesContent":["import styles from \"../DonutChart.module.scss\";\nimport { Children, type FC } from \"react\";\nimport { useNumberFormatter } from \"react-aria\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\n\ninterface Props extends Pick<DonutChartProps, \"formatOptions\" | \"children\"> {\n value?: number;\n}\n\nexport const DonutChartValue: FC<Props> = (props) => {\n const { value = 0, formatOptions, children } = props;\n\n const formatter = useNumberFormatter(formatOptions);\n\n if (Children.count(children) > 0) {\n return <span className={styles.value}>{children}</span>;\n }\n\n const formattedValue = formatOptions ? formatter.format(value) : `${value} %`;\n\n return (\n <span className={styles.value}>\n <strong>{formattedValue}</strong>\n </span>\n );\n};\n"],"mappings":";;;;;;;AASA,IAAa,mBAA8B,UAAU;CACnD,MAAM,EAAE,QAAQ,GAAG,eAAe,aAAa;CAE/C,MAAM,YAAY,mBAAmB,aAAa;CAElD,IAAI,SAAS,MAAM,QAAQ,IAAI,GAC7B,OAAO,oBAAC,QAAD;EAAM,WAAW,0BAAO;EAAQ;CAAe,CAAA;CAGxD,MAAM,iBAAiB,gBAAgB,UAAU,OAAO,KAAK,IAAI,GAAG,MAAM;CAE1E,OACE,oBAAC,QAAD;EAAM,WAAW,0BAAO;EACtB,UAAA,oBAAC,UAAD,EAAA,UAAS,eAAuB,CAAA;CAC5B,CAAA;AAEV"}
1
+ {"version":3,"file":"DonutChartValue.mjs","names":["styles"],"sources":["../../../../../../../../src/components/DonutChart/components/DonutChartValue.tsx"],"sourcesContent":["import styles from \"../DonutChart.module.scss\";\nimport { Children, type FC } from \"react\";\nimport { useNumberFormatter } from \"react-aria\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\n\ninterface Props extends Pick<DonutChartProps, \"formatOptions\" | \"children\"> {\n value?: number;\n}\n\nexport const DonutChartValue: FC<Props> = (props) => {\n const { value = 0, formatOptions, children } = props;\n\n const formatter = useNumberFormatter(formatOptions);\n\n if (Children.count(children) > 0) {\n return <span className={styles.value}>{children}</span>;\n }\n\n const formattedValue = formatOptions ? formatter.format(value) : `${value} %`;\n\n return (\n <span className={styles.value}>\n <strong>{formattedValue}</strong>\n </span>\n );\n};\n"],"mappings":";;;;;;;AASA,IAAa,mBAA8B,UAAU;CACnD,MAAM,EAAE,QAAQ,GAAG,eAAe,aAAa;CAE/C,MAAM,YAAY,mBAAmB,aAAa;CAElD,IAAI,SAAS,MAAM,QAAQ,IAAI,GAC7B,OAAO,oBAAC,QAAD;EAAM,WAAWA,0BAAO;EAAQ;CAAe,CAAA;CAGxD,MAAM,iBAAiB,gBAAgB,UAAU,OAAO,KAAK,IAAI,GAAG,MAAM;CAE1E,OACE,oBAAC,QAAD;EAAM,WAAWA,0BAAO;EACtB,UAAA,oBAAC,UAAD,EAAA,UAAS,eAAuB,CAAA;CAC5B,CAAA;AAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"EmulatedBoldText.mjs","names":[],"sources":["../../../../../../../src/components/EmulatedBoldText/EmulatedBoldText.tsx"],"sourcesContent":["import type { ComponentProps, FC, PropsWithChildren } from \"react\";\nimport styles from \"./EmulatedBoldText.module.scss\";\nimport clsx from \"clsx\";\n\nexport type EmulatedBoldTextProps = PropsWithChildren<ComponentProps<\"span\">>;\n\nexport const EmulatedBoldText: FC<EmulatedBoldTextProps> = (props) => {\n const { children, className, ...rest } = props;\n\n const rootClassName = clsx(styles.emulatedBoldText, className);\n\n return (\n <span className={rootClassName} {...rest}>\n {children}\n <span aria-hidden=\"true\" className={styles.boldText}>\n {children}\n </span>\n </span>\n );\n};\n\nexport default EmulatedBoldText;\n"],"mappings":";;;;;;AAMA,IAAa,oBAA+C,UAAU;CACpE,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;CAEzC,MAAM,gBAAgB,KAAK,gCAAO,kBAAkB,SAAS;CAE7D,OACE,qBAAC,QAAD;EAAM,WAAW;EAAe,GAAI;EAApC,UAAA,CACG,UACD,oBAAC,QAAD;GAAM,eAAY;GAAO,WAAW,gCAAO;GACxC;EACG,CAAA,CACF;;AAEV"}
1
+ {"version":3,"file":"EmulatedBoldText.mjs","names":["styles"],"sources":["../../../../../../../src/components/EmulatedBoldText/EmulatedBoldText.tsx"],"sourcesContent":["import type { ComponentProps, FC, PropsWithChildren } from \"react\";\nimport styles from \"./EmulatedBoldText.module.scss\";\nimport clsx from \"clsx\";\n\nexport type EmulatedBoldTextProps = PropsWithChildren<ComponentProps<\"span\">>;\n\nexport const EmulatedBoldText: FC<EmulatedBoldTextProps> = (props) => {\n const { children, className, ...rest } = props;\n\n const rootClassName = clsx(styles.emulatedBoldText, className);\n\n return (\n <span className={rootClassName} {...rest}>\n {children}\n <span aria-hidden=\"true\" className={styles.boldText}>\n {children}\n </span>\n </span>\n );\n};\n\nexport default EmulatedBoldText;\n"],"mappings":";;;;;;AAMA,IAAa,oBAA+C,UAAU;CACpE,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;CAEzC,MAAM,gBAAgB,KAAKA,gCAAO,kBAAkB,SAAS;CAE7D,OACE,qBAAC,QAAD;EAAM,WAAW;EAAe,GAAI;EAApC,UAAA,CACG,UACD,oBAAC,QAAD;GAAM,eAAY;GAAO,WAAWA,gCAAO;GACxC;EACG,CAAA,CACF;;AAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"FieldDescription.mjs","names":[],"sources":["../../../../../../../src/components/FieldDescription/FieldDescription.tsx"],"sourcesContent":["import styles from \"./FieldDescription.module.scss\";\nimport clsx from \"clsx\";\nimport type { TextProps } from \"@/components/Text\";\nimport { Text } from \"@/components/Text\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface FieldDescriptionProps extends TextProps, FlowComponentProps {}\n\n/** @flr-generate all */\nexport const FieldDescription = flowComponent(\"FieldDescription\", (props) => {\n const { children, className, ref, ...rest } = props;\n\n const rootClassName = clsx(styles.fieldDescription, className);\n\n return (\n <Text slot=\"description\" {...rest} className={rootClassName} ref={ref}>\n {children}\n </Text>\n );\n});\n\nexport default FieldDescription;\n"],"mappings":";;;;;;;;;AAUA,IAAa,mBAAmB,cAAc,qBAAqB,UAAU;CAC3E,MAAM,EAAE,UAAU,WAAW,KAAK,GAAG,SAAS;CAE9C,MAAM,gBAAgB,KAAK,gCAAO,kBAAkB,SAAS;CAE7D,OACE,oBAAC,MAAD;EAAM,MAAK;EAAc,GAAI;EAAM,WAAW;EAAoB;EAC/D;CACG,CAAA;AAEV,CAAC"}
1
+ {"version":3,"file":"FieldDescription.mjs","names":["styles"],"sources":["../../../../../../../src/components/FieldDescription/FieldDescription.tsx"],"sourcesContent":["import styles from \"./FieldDescription.module.scss\";\nimport clsx from \"clsx\";\nimport type { TextProps } from \"@/components/Text\";\nimport { Text } from \"@/components/Text\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface FieldDescriptionProps extends TextProps, FlowComponentProps {}\n\n/** @flr-generate all */\nexport const FieldDescription = flowComponent(\"FieldDescription\", (props) => {\n const { children, className, ref, ...rest } = props;\n\n const rootClassName = clsx(styles.fieldDescription, className);\n\n return (\n <Text slot=\"description\" {...rest} className={rootClassName} ref={ref}>\n {children}\n </Text>\n );\n});\n\nexport default FieldDescription;\n"],"mappings":";;;;;;;;;AAUA,IAAa,mBAAmB,cAAc,qBAAqB,UAAU;CAC3E,MAAM,EAAE,UAAU,WAAW,KAAK,GAAG,SAAS;CAE9C,MAAM,gBAAgB,KAAKA,gCAAO,kBAAkB,SAAS;CAE7D,OACE,oBAAC,MAAD;EAAM,MAAK;EAAc,GAAI;EAAM,WAAW;EAAoB;EAC/D;CACG,CAAA;AAEV,CAAC"}
@@ -3,52 +3,61 @@
3
3
  import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
4
4
  import { Alert } from "../Alert/Alert.mjs";
5
5
  import { AlertText } from "../AlertText/AlertText.mjs";
6
+ import { FieldErrorRenderedContext } from "../../lib/hooks/fieldErrorRenderedContext.mjs";
6
7
  import { Heading } from "../Heading/Heading.mjs";
7
8
  import FieldError_module_default from "./FieldError.module.mjs";
8
9
  import clsx from "clsx";
9
- import React, { useContext, useMemo } from "react";
10
+ import React, { useContext, useLayoutEffect } from "react";
10
11
  import { jsx } from "react/jsx-runtime";
11
12
  import * as Aria from "react-aria-components";
12
13
  import { FieldErrorContext, TextContext } from "react-aria-components";
14
+ import { useObjectRef } from "react-aria";
13
15
  //#region src/components/FieldError/FieldError.tsx
14
16
  /** @flr-generate all */
15
17
  var FieldError = flowComponent("FieldError", (props) => {
16
18
  const { children, className, ref, renderAlert, ...rest } = props;
17
19
  const rootClassName = clsx(FieldError_module_default.fieldError, className);
18
- const fieldErrorFromAriaContext = useContext(FieldErrorContext);
19
- const isInvalidFromChildren = React.Children.count(children) >= 1;
20
- const mergedErrorState = useMemo(() => {
21
- const errors = fieldErrorFromAriaContext?.validationErrors ?? [];
22
- if (isInvalidFromChildren) errors.push(children);
23
- const isInvalid = !!(isInvalidFromChildren || fieldErrorFromAriaContext?.isInvalid);
24
- const lastError = errors.length >= 1 ? errors[errors.length - 1] : void 0;
25
- return {
26
- isInvalid,
27
- validationDetails: {
28
- valid: !isInvalid,
29
- badInput: false,
30
- customError: isInvalid,
31
- patternMismatch: false,
32
- rangeOverflow: false,
33
- rangeUnderflow: false,
34
- stepMismatch: false,
35
- tooLong: false,
36
- tooShort: false,
37
- valueMissing: false,
38
- typeMismatch: false,
39
- ...fieldErrorFromAriaContext?.validationDetails
40
- },
41
- ...fieldErrorFromAriaContext,
42
- validationErrors: lastError ? [lastError] : []
43
- };
44
- }, [fieldErrorFromAriaContext, children]);
45
- if (!mergedErrorState.isInvalid) return;
20
+ const fieldValidation = useContext(FieldErrorContext);
21
+ const reportRendered = useContext(FieldErrorRenderedContext);
22
+ const hasChildren = React.Children.count(children) >= 1;
23
+ const isInvalid = fieldValidation ? fieldValidation.isInvalid : hasChildren;
24
+ const message = hasChildren ? children : fieldValidation?.validationErrors.at(-1);
25
+ const errorState = {
26
+ isInvalid,
27
+ validationDetails: fieldValidation?.validationDetails ?? {
28
+ badInput: false,
29
+ customError: isInvalid,
30
+ patternMismatch: false,
31
+ rangeOverflow: false,
32
+ rangeUnderflow: false,
33
+ stepMismatch: false,
34
+ tooLong: false,
35
+ tooShort: false,
36
+ typeMismatch: false,
37
+ valid: !isInvalid,
38
+ valueMissing: false
39
+ },
40
+ validationErrors: message ? [message] : []
41
+ };
42
+ const localRef = useObjectRef(ref);
43
+ useLayoutEffect(() => {
44
+ const element = localRef.current;
45
+ if (!reportRendered || !isInvalid || !element?.isConnected || !element.id) return;
46
+ reportRendered(element.id);
47
+ return () => reportRendered(void 0);
48
+ }, [
49
+ reportRendered,
50
+ isInvalid,
51
+ rest.id,
52
+ localRef
53
+ ]);
54
+ if (!isInvalid) return;
46
55
  return /* @__PURE__ */ jsx(Aria.Provider, {
47
56
  values: [[TextContext, { slot: void 0 }]],
48
57
  children: /* @__PURE__ */ jsx(FieldErrorContext, {
49
- value: mergedErrorState,
58
+ value: errorState,
50
59
  children: /* @__PURE__ */ jsx(Aria.FieldError, {
51
- ref,
60
+ ref: localRef,
52
61
  ...rest,
53
62
  className: rootClassName,
54
63
  children: ({ validationErrors }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"FieldError.mjs","names":[],"sources":["../../../../../../../src/components/FieldError/FieldError.tsx"],"sourcesContent":["import React, {\n type PropsWithChildren,\n type ReactNode,\n useContext,\n useMemo,\n} from \"react\";\nimport styles from \"./FieldError.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport { FieldErrorContext, TextContext } from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { AlertText } from \"@/components/AlertText\";\nimport { Alert } from \"@/components/Alert\";\nimport { Heading } from \"@/components/Heading\";\n\nexport interface FieldErrorProps\n extends\n PropsWithChildren<Omit<Aria.FieldErrorProps, \"children\">>,\n FlowComponentProps {\n /** @internal */\n renderAlert?: boolean;\n}\n\n/** @flr-generate all */\nexport const FieldError = flowComponent(\"FieldError\", (props) => {\n const { children, className, ref, renderAlert, ...rest } = props;\n\n const rootClassName = clsx(styles.fieldError, className);\n const fieldErrorFromAriaContext = useContext(FieldErrorContext);\n const isInvalidFromChildren = React.Children.count(children) >= 1;\n\n const mergedErrorState = useMemo(() => {\n const errors: (string | ReactNode)[] =\n fieldErrorFromAriaContext?.validationErrors ?? [];\n\n if (isInvalidFromChildren) {\n errors.push(children);\n }\n\n const isInvalid = !!(\n isInvalidFromChildren || fieldErrorFromAriaContext?.isInvalid\n );\n const lastError =\n errors.length >= 1 ? errors[errors.length - 1] : undefined;\n\n return {\n isInvalid: isInvalid,\n validationDetails: {\n valid: !isInvalid,\n badInput: false,\n customError: isInvalid,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n valueMissing: false,\n typeMismatch: false,\n ...fieldErrorFromAriaContext?.validationDetails,\n },\n ...fieldErrorFromAriaContext,\n validationErrors: lastError ? [lastError] : [],\n };\n }, [fieldErrorFromAriaContext, children]);\n\n if (!mergedErrorState.isInvalid) {\n return undefined;\n }\n\n return (\n <Aria.Provider values={[[TextContext, { slot: undefined }]]}>\n <FieldErrorContext value={mergedErrorState as never}>\n <Aria.FieldError ref={ref} {...rest} className={rootClassName}>\n {({ validationErrors }) => {\n return renderAlert ? (\n <Alert status=\"danger\">\n <Heading>{validationErrors}</Heading>\n </Alert>\n ) : (\n <AlertText status=\"danger\">{validationErrors}</AlertText>\n );\n }}\n </Aria.FieldError>\n </FieldErrorContext>\n </Aria.Provider>\n );\n});\n\nexport default FieldError;\n"],"mappings":";;;;;;;;;;;;;;AAyBA,IAAa,aAAa,cAAc,eAAe,UAAU;CAC/D,MAAM,EAAE,UAAU,WAAW,KAAK,aAAa,GAAG,SAAS;CAE3D,MAAM,gBAAgB,KAAK,0BAAO,YAAY,SAAS;CACvD,MAAM,4BAA4B,WAAW,iBAAiB;CAC9D,MAAM,wBAAwB,MAAM,SAAS,MAAM,QAAQ,KAAK;CAEhE,MAAM,mBAAmB,cAAc;EACrC,MAAM,SACJ,2BAA2B,oBAAoB,CAAC;EAElD,IAAI,uBACF,OAAO,KAAK,QAAQ;EAGtB,MAAM,YAAY,CAAC,EACjB,yBAAyB,2BAA2B;EAEtD,MAAM,YACJ,OAAO,UAAU,IAAI,OAAO,OAAO,SAAS,KAAK,KAAA;EAEnD,OAAO;GACM;GACX,mBAAmB;IACjB,OAAO,CAAC;IACR,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,SAAS;IACT,UAAU;IACV,cAAc;IACd,cAAc;IACd,GAAG,2BAA2B;GAChC;GACA,GAAG;GACH,kBAAkB,YAAY,CAAC,SAAS,IAAI,CAAC;EAC/C;CACF,GAAG,CAAC,2BAA2B,QAAQ,CAAC;CAExC,IAAI,CAAC,iBAAiB,WACpB;CAGF,OACE,oBAAC,KAAK,UAAN;EAAe,QAAQ,CAAC,CAAC,aAAa,EAAE,MAAM,KAAA,EAAU,CAAC,CAAC;EACxD,UAAA,oBAAC,mBAAD;GAAmB,OAAO;GACxB,UAAA,oBAAC,KAAK,YAAN;IAAsB;IAAK,GAAI;IAAM,WAAW;IAC5C,WAAA,EAAE,uBAAuB;KACzB,OAAO,cACL,oBAAC,OAAD;MAAO,QAAO;MACZ,UAAA,oBAAC,SAAD,EAAA,UAAU,iBAA0B,CAAA;KAC/B,CAAA,IAEP,oBAAC,WAAD;MAAW,QAAO;MAAU,UAAA;KAA4B,CAAA;IAE5D;GACe,CAAA;EACA,CAAA;CACN,CAAA;AAEnB,CAAC"}
1
+ {"version":3,"file":"FieldError.mjs","names":["styles"],"sources":["../../../../../../../src/components/FieldError/FieldError.tsx"],"sourcesContent":["import React, {\n type PropsWithChildren,\n useContext,\n useLayoutEffect,\n} from \"react\";\nimport styles from \"./FieldError.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport { FieldErrorContext, TextContext } from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { AlertText } from \"@/components/AlertText\";\nimport { Alert } from \"@/components/Alert\";\nimport { Heading } from \"@/components/Heading\";\nimport { FieldErrorRenderedContext } from \"@/lib/hooks/fieldErrorRenderedContext\";\nimport { useObjectRef } from \"react-aria\";\n\nexport interface FieldErrorProps\n extends\n PropsWithChildren<Omit<Aria.FieldErrorProps, \"children\">>,\n FlowComponentProps {\n /** @internal */\n renderAlert?: boolean;\n}\n\n/** @flr-generate all */\nexport const FieldError = flowComponent(\"FieldError\", (props) => {\n const { children, className, ref, renderAlert, ...rest } = props;\n\n const rootClassName = clsx(styles.fieldError, className);\n const fieldValidation = useContext(FieldErrorContext);\n const reportRendered = useContext(FieldErrorRenderedContext);\n const hasChildren = React.Children.count(children) >= 1;\n\n // Inside a field the field decides whether there is an error – children only\n // provide its message. Without a field, children are the error.\n const isInvalid = fieldValidation ? fieldValidation.isInvalid : hasChildren;\n\n // Never mutate the context's errors: for a valid field react-aria hands out\n // one module-level array shared by every field of the page.\n const message = hasChildren\n ? children\n : fieldValidation?.validationErrors.at(-1);\n\n const errorState = {\n isInvalid,\n validationDetails: fieldValidation?.validationDetails ?? {\n badInput: false,\n customError: isInvalid,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: !isInvalid,\n valueMissing: false,\n },\n validationErrors: message ? [message] : [],\n };\n\n // Report what is actually in the document: inside a collection (`Select`,\n // `ComboBox`) react-aria renders the children a second time into a hidden\n // collection document, where no field context exists and no id resolves.\n const localRef = useObjectRef(ref);\n useLayoutEffect(() => {\n const element = localRef.current;\n if (!reportRendered || !isInvalid || !element?.isConnected || !element.id) {\n return;\n }\n reportRendered(element.id);\n return () => reportRendered(undefined);\n }, [reportRendered, isInvalid, rest.id, localRef]);\n\n if (!isInvalid) {\n return undefined;\n }\n\n return (\n <Aria.Provider values={[[TextContext, { slot: undefined }]]}>\n <FieldErrorContext value={errorState as never}>\n <Aria.FieldError ref={localRef} {...rest} className={rootClassName}>\n {({ validationErrors }) => {\n return renderAlert ? (\n <Alert status=\"danger\">\n <Heading>{validationErrors}</Heading>\n </Alert>\n ) : (\n <AlertText status=\"danger\">{validationErrors}</AlertText>\n );\n }}\n </Aria.FieldError>\n </FieldErrorContext>\n </Aria.Provider>\n );\n});\n\nexport default FieldError;\n"],"mappings":";;;;;;;;;;;;;;;;AA0BA,IAAa,aAAa,cAAc,eAAe,UAAU;CAC/D,MAAM,EAAE,UAAU,WAAW,KAAK,aAAa,GAAG,SAAS;CAE3D,MAAM,gBAAgB,KAAKA,0BAAO,YAAY,SAAS;CACvD,MAAM,kBAAkB,WAAW,iBAAiB;CACpD,MAAM,iBAAiB,WAAW,yBAAyB;CAC3D,MAAM,cAAc,MAAM,SAAS,MAAM,QAAQ,KAAK;CAItD,MAAM,YAAY,kBAAkB,gBAAgB,YAAY;CAIhE,MAAM,UAAU,cACZ,WACA,iBAAiB,iBAAiB,GAAG,EAAE;CAE3C,MAAM,aAAa;EACjB;EACA,mBAAmB,iBAAiB,qBAAqB;GACvD,UAAU;GACV,aAAa;GACb,iBAAiB;GACjB,eAAe;GACf,gBAAgB;GAChB,cAAc;GACd,SAAS;GACT,UAAU;GACV,cAAc;GACd,OAAO,CAAC;GACR,cAAc;EAChB;EACA,kBAAkB,UAAU,CAAC,OAAO,IAAI,CAAC;CAC3C;CAKA,MAAM,WAAW,aAAa,GAAG;CACjC,sBAAsB;EACpB,MAAM,UAAU,SAAS;EACzB,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,SAAS,eAAe,CAAC,QAAQ,IACrE;EAEF,eAAe,QAAQ,EAAE;EACzB,aAAa,eAAe,KAAA,CAAS;CACvC,GAAG;EAAC;EAAgB;EAAW,KAAK;EAAI;CAAQ,CAAC;CAEjD,IAAI,CAAC,WACH;CAGF,OACE,oBAAC,KAAK,UAAN;EAAe,QAAQ,CAAC,CAAC,aAAa,EAAE,MAAM,KAAA,EAAU,CAAC,CAAC;EACxD,UAAA,oBAAC,mBAAD;GAAmB,OAAO;GACxB,UAAA,oBAAC,KAAK,YAAN;IAAiB,KAAK;IAAU,GAAI;IAAM,WAAW;IACjD,WAAA,EAAE,uBAAuB;KACzB,OAAO,cACL,oBAAC,OAAD;MAAO,QAAO;MACZ,UAAA,oBAAC,SAAD,EAAA,UAAU,iBAA0B,CAAA;KAC/B,CAAA,IAEP,oBAAC,WAAD;MAAW,QAAO;MAAU,UAAA;KAA4B,CAAA;IAE5D;GACe,CAAA;EACA,CAAA;CACN,CAAA;AAEnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileCard.mjs","names":[],"sources":["../../../../../../../src/components/FileCard/FileCard.tsx"],"sourcesContent":["import { Avatar } from \"./components/Avatar\";\nimport { Text } from \"@/components/Text\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport styles from \"./FileCard.module.scss\";\nimport clsx from \"clsx\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { FileSizeText } from \"@/components/FileCard/components/FileSizeText\";\nimport { Link, type LinkProps } from \"@/components/Link\";\nimport Wrap from \"@/components/Wrap\";\nimport { DeleteButton } from \"@/components/FileCard/components/DeleteButton\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { OptionsButton } from \"@/components/List/components/Items/components/Item/components/OptionsButton\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface FileCardProps\n extends\n FlowComponentProps<HTMLDivElement | HTMLLIElement>,\n PropsWithClassName,\n PropsWithElementType<\"div\" | \"li\">,\n Pick<LinkProps, \"onPress\" | \"href\" | \"target\" | \"download\"> {\n /** The name of the file. */\n name?: string;\n /** The type of the file. */\n type?: string;\n /** Handler that is called when the file cards delete button is clicked. */\n onDelete?: () => void;\n /** The size of the file in bytes. */\n sizeInBytes?: number;\n /** The source of an image file. */\n imageSrc?: string;\n /** Whether the file card is in a failed state. */\n isFailed?: boolean;\n}\n\n/** @flr-generate all */\nexport const FileCard = flowComponent(\"FileCard\", (props) => {\n const {\n ref,\n onDelete,\n type,\n sizeInBytes,\n name,\n className,\n elementType = \"div\",\n onPress,\n href,\n target,\n download,\n imageSrc,\n children,\n isFailed,\n } = props;\n\n const rootClassName = clsx(\n styles.fileCard,\n isFailed && styles[\"failed\"],\n className,\n );\n\n const propsContext: PropsContext = {\n ContextMenu: {\n wrapWith: <OptionsButton />,\n placement: \"bottom right\",\n },\n Text: {\n elementType: \"span\",\n className: styles.subTitle,\n tunnel: {\n id: \"subTitle\",\n component: \"FileCard\",\n },\n },\n ProgressBar: {\n size: \"s\",\n tunnel: {\n id: \"progressBar\",\n component: \"FileCard\",\n },\n },\n Button: { variant: \"plain\", color: \"secondary\" },\n };\n\n const Element = elementType;\n\n return (\n <PropsContextProvider props={propsContext}>\n <Element ref={ref as never} className={rootClassName}>\n <Wrap if={(href || onPress) && !isFailed}>\n <Link\n className={styles.link}\n unstyled\n href={href}\n onPress={onPress}\n target={target}\n download={download}\n >\n <Avatar type={type} imageSrc={imageSrc} isFailed={isFailed} />\n\n <span className={styles.text}>\n {name && (\n <Text className={styles.title}>\n <strong>{name}</strong>\n </Text>\n )}\n {sizeInBytes && <FileSizeText sizeInBytes={sizeInBytes} />}\n <UiComponentTunnelExit id=\"subTitle\" component=\"FileCard\" />\n <UiComponentTunnelExit id=\"progressBar\" component=\"FileCard\" />\n </span>\n </Link>\n </Wrap>\n {children}\n {onDelete && <DeleteButton onDelete={onDelete} />}\n </Element>\n </PropsContextProvider>\n );\n});\n\nexport default FileCard;\n"],"mappings":";;;;;;;;;;;;;;;;;AAyCA,IAAa,WAAW,cAAc,aAAa,UAAU;CAC3D,MAAM,EACJ,KACA,UACA,MACA,aACA,MACA,WACA,cAAc,OACd,SACA,MACA,QACA,UACA,UACA,UACA,aACE;CAEJ,MAAM,gBAAgB,KACpB,wBAAO,UACP,YAAY,wBAAO,WACnB,SACF;CAEA,MAAM,eAA6B;EACjC,aAAa;GACX,UAAU,oBAAC,eAAD,CAAgB,CAAA;GAC1B,WAAW;EACb;EACA,MAAM;GACJ,aAAa;GACb,WAAW,wBAAO;GAClB,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;EACF;EACA,aAAa;GACX,MAAM;GACN,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;EACF;EACA,QAAQ;GAAE,SAAS;GAAS,OAAO;EAAY;CACjD;CAIA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,qBAAC,aAAD;GAAc;GAAc,WAAW;GAAvC,UAAA;IACE,oBAAC,MAAD;KAAM,KAAK,QAAQ,YAAY,CAAC;KAC9B,UAAA,qBAAC,MAAD;MACE,WAAW,wBAAO;MAClB,UAAA;MACM;MACG;MACD;MACE;MANZ,UAAA,CAQE,oBAAC,QAAD;OAAc;OAAgB;OAAoB;MAAW,CAAA,GAE7D,qBAAC,QAAD;OAAM,WAAW,wBAAO;OAAxB,UAAA;QACG,QACC,oBAAC,MAAD;SAAM,WAAW,wBAAO;SACtB,UAAA,oBAAC,UAAD,EAAA,UAAS,KAAa,CAAA;QAClB,CAAA;QAEP,eAAe,oBAAC,cAAD,EAA2B,YAAc,CAAA;QACzD,oBAAC,uBAAD;SAAuB,IAAG;SAAW,WAAU;QAAY,CAAA;QAC3D,oBAAC,uBAAD;SAAuB,IAAG;SAAc,WAAU;QAAY,CAAA;OAC1D;MACF,CAAA,CAAA;;IACF,CAAA;IACL;IACA,YAAY,oBAAC,cAAD,EAAwB,SAAW,CAAA;GACzC;;CACW,CAAA;AAE1B,CAAC"}
1
+ {"version":3,"file":"FileCard.mjs","names":["styles","Element"],"sources":["../../../../../../../src/components/FileCard/FileCard.tsx"],"sourcesContent":["import { Avatar } from \"./components/Avatar\";\nimport { Text } from \"@/components/Text\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport styles from \"./FileCard.module.scss\";\nimport clsx from \"clsx\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { FileSizeText } from \"@/components/FileCard/components/FileSizeText\";\nimport { Link, type LinkProps } from \"@/components/Link\";\nimport Wrap from \"@/components/Wrap\";\nimport { DeleteButton } from \"@/components/FileCard/components/DeleteButton\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { OptionsButton } from \"@/components/List/components/Items/components/Item/components/OptionsButton\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface FileCardProps\n extends\n FlowComponentProps<HTMLDivElement | HTMLLIElement>,\n PropsWithClassName,\n PropsWithElementType<\"div\" | \"li\">,\n Pick<LinkProps, \"onPress\" | \"href\" | \"target\" | \"download\"> {\n /** The name of the file. */\n name?: string;\n /** The type of the file. */\n type?: string;\n /** Handler that is called when the file cards delete button is clicked. */\n onDelete?: () => void;\n /** The size of the file in bytes. */\n sizeInBytes?: number;\n /** The source of an image file. */\n imageSrc?: string;\n /** Whether the file card is in a failed state. */\n isFailed?: boolean;\n}\n\n/** @flr-generate all */\nexport const FileCard = flowComponent(\"FileCard\", (props) => {\n const {\n ref,\n onDelete,\n type,\n sizeInBytes,\n name,\n className,\n elementType = \"div\",\n onPress,\n href,\n target,\n download,\n imageSrc,\n children,\n isFailed,\n } = props;\n\n const rootClassName = clsx(\n styles.fileCard,\n isFailed && styles[\"failed\"],\n className,\n );\n\n const propsContext: PropsContext = {\n ContextMenu: {\n wrapWith: <OptionsButton />,\n placement: \"bottom right\",\n },\n Text: {\n elementType: \"span\",\n className: styles.subTitle,\n tunnel: {\n id: \"subTitle\",\n component: \"FileCard\",\n },\n },\n ProgressBar: {\n size: \"s\",\n tunnel: {\n id: \"progressBar\",\n component: \"FileCard\",\n },\n },\n Button: { variant: \"plain\", color: \"secondary\" },\n };\n\n const Element = elementType;\n\n return (\n <PropsContextProvider props={propsContext}>\n <Element ref={ref as never} className={rootClassName}>\n <Wrap if={(href || onPress) && !isFailed}>\n <Link\n className={styles.link}\n unstyled\n href={href}\n onPress={onPress}\n target={target}\n download={download}\n >\n <Avatar type={type} imageSrc={imageSrc} isFailed={isFailed} />\n\n <span className={styles.text}>\n {name && (\n <Text className={styles.title}>\n <strong>{name}</strong>\n </Text>\n )}\n {sizeInBytes && <FileSizeText sizeInBytes={sizeInBytes} />}\n <UiComponentTunnelExit id=\"subTitle\" component=\"FileCard\" />\n <UiComponentTunnelExit id=\"progressBar\" component=\"FileCard\" />\n </span>\n </Link>\n </Wrap>\n {children}\n {onDelete && <DeleteButton onDelete={onDelete} />}\n </Element>\n </PropsContextProvider>\n );\n});\n\nexport default FileCard;\n"],"mappings":";;;;;;;;;;;;;;;;;AAyCA,IAAa,WAAW,cAAc,aAAa,UAAU;CAC3D,MAAM,EACJ,KACA,UACA,MACA,aACA,MACA,WACA,cAAc,OACd,SACA,MACA,QACA,UACA,UACA,UACA,aACE;CAEJ,MAAM,gBAAgB,KACpBA,wBAAO,UACP,YAAYA,wBAAO,WACnB,SACF;CAEA,MAAM,eAA6B;EACjC,aAAa;GACX,UAAU,oBAAC,eAAD,CAAgB,CAAA;GAC1B,WAAW;EACb;EACA,MAAM;GACJ,aAAa;GACb,WAAWA,wBAAO;GAClB,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;EACF;EACA,aAAa;GACX,MAAM;GACN,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;EACF;EACA,QAAQ;GAAE,SAAS;GAAS,OAAO;EAAY;CACjD;CAIA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,qBAACC,aAAD;GAAc;GAAc,WAAW;GAAvC,UAAA;IACE,oBAAC,MAAD;KAAM,KAAK,QAAQ,YAAY,CAAC;KAC9B,UAAA,qBAAC,MAAD;MACE,WAAWD,wBAAO;MAClB,UAAA;MACM;MACG;MACD;MACE;MANZ,UAAA,CAQE,oBAAC,QAAD;OAAc;OAAgB;OAAoB;MAAW,CAAA,GAE7D,qBAAC,QAAD;OAAM,WAAWA,wBAAO;OAAxB,UAAA;QACG,QACC,oBAAC,MAAD;SAAM,WAAWA,wBAAO;SACtB,UAAA,oBAAC,UAAD,EAAA,UAAS,KAAa,CAAA;QAClB,CAAA;QAEP,eAAe,oBAAC,cAAD,EAA2B,YAAc,CAAA;QACzD,oBAAC,uBAAD;SAAuB,IAAG;SAAW,WAAU;QAAY,CAAA;QAC3D,oBAAC,uBAAD;SAAuB,IAAG;SAAc,WAAU;QAAY,CAAA;OAC1D;MACF,CAAA,CAAA;;IACF,CAAA;IACL;IACA,YAAY,oBAAC,cAAD,EAAwB,SAAW,CAAA;GACzC;;CACW,CAAA;AAE1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.mjs","names":[],"sources":["../../../../../../../../../src/components/FileCard/components/Avatar/Avatar.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { IconFile, IconImage } from \"@/components/Icon/components/icons\";\nimport { Avatar as AvatarComponent } from \"@/components/Avatar\";\nimport { Image } from \"@/components/Image\";\n\ninterface Props {\n type?: string;\n imageSrc?: string;\n isFailed?: boolean;\n}\n\nexport const Avatar: FC<Props> = (props) => {\n const { type, imageSrc, isFailed } = props;\n\n if (isFailed) {\n return <AvatarComponent status=\"danger\" />;\n }\n\n if (imageSrc) {\n return (\n <AvatarComponent>\n <Image src={imageSrc} />\n </AvatarComponent>\n );\n }\n\n return (\n <AvatarComponent color=\"blue\">\n {type?.startsWith(\"image\") ? <IconImage /> : <IconFile />}\n </AvatarComponent>\n );\n};\nexport default Avatar;\n"],"mappings":";;;;;;;;AAWA,IAAa,UAAqB,UAAU;CAC1C,MAAM,EAAE,MAAM,UAAU,aAAa;CAErC,IAAI,UACF,OAAO,oBAAC,UAAD,EAAiB,QAAO,SAAU,CAAA;CAG3C,IAAI,UACF,OACE,oBAAC,UAAD,EAAA,UACE,oBAAC,OAAD,EAAO,KAAK,SAAW,CAAA,EACR,CAAA;CAIrB,OACE,oBAAC,UAAD;EAAiB,OAAM;EACpB,UAAA,MAAM,WAAW,OAAO,IAAI,oBAAC,WAAD,CAAY,CAAA,IAAI,oBAAC,UAAD,CAAW,CAAA;CACzC,CAAA;AAErB"}
1
+ {"version":3,"file":"Avatar.mjs","names":["AvatarComponent"],"sources":["../../../../../../../../../src/components/FileCard/components/Avatar/Avatar.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { IconFile, IconImage } from \"@/components/Icon/components/icons\";\nimport { Avatar as AvatarComponent } from \"@/components/Avatar\";\nimport { Image } from \"@/components/Image\";\n\ninterface Props {\n type?: string;\n imageSrc?: string;\n isFailed?: boolean;\n}\n\nexport const Avatar: FC<Props> = (props) => {\n const { type, imageSrc, isFailed } = props;\n\n if (isFailed) {\n return <AvatarComponent status=\"danger\" />;\n }\n\n if (imageSrc) {\n return (\n <AvatarComponent>\n <Image src={imageSrc} />\n </AvatarComponent>\n );\n }\n\n return (\n <AvatarComponent color=\"blue\">\n {type?.startsWith(\"image\") ? <IconImage /> : <IconFile />}\n </AvatarComponent>\n );\n};\nexport default Avatar;\n"],"mappings":";;;;;;;;AAWA,IAAa,UAAqB,UAAU;CAC1C,MAAM,EAAE,MAAM,UAAU,aAAa;CAErC,IAAI,UACF,OAAO,oBAACA,UAAD,EAAiB,QAAO,SAAU,CAAA;CAG3C,IAAI,UACF,OACE,oBAACA,UAAD,EAAA,UACE,oBAAC,OAAD,EAAO,KAAK,SAAW,CAAA,EACR,CAAA;CAIrB,OACE,oBAACA,UAAD;EAAiB,OAAM;EACpB,UAAA,MAAM,WAAW,OAAO,IAAI,oBAAC,WAAD,CAAY,CAAA,IAAI,oBAAC,UAAD,CAAW,CAAA;CACzC,CAAA;AAErB"}
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteButton.mjs","names":[],"sources":["../../../../../../../../../src/components/FileCard/components/DeleteButton/DeleteButton.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport locales from \"../../locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\n\ninterface Props {\n onDelete: () => void;\n}\n\nexport const DeleteButton: FC<Props> = (props) => {\n const { onDelete } = props;\n const stringFormatter = useLocalizedStringFormatter(locales, \"FileCard\");\n\n return (\n <Button\n aria-label={stringFormatter.format(`delete`)}\n variant=\"plain\"\n color=\"secondary\"\n onPress={onDelete}\n >\n <IconClose />\n </Button>\n );\n};\n\nexport default DeleteButton;\n"],"mappings":";;;;;;;;AAUA,IAAa,gBAA2B,UAAU;CAChD,MAAM,EAAE,aAAa;CACrB,MAAM,kBAAkB,4BAA4B,kBAAS,UAAU;CAEvE,OACE,oBAAC,QAAD;EACE,cAAY,gBAAgB,OAAO,QAAQ;EAC3C,SAAQ;EACR,OAAM;EACN,SAAS;EAET,UAAA,oBAAC,WAAD,CAAY,CAAA;CACN,CAAA;AAEZ"}
1
+ {"version":3,"file":"DeleteButton.mjs","names":["locales"],"sources":["../../../../../../../../../src/components/FileCard/components/DeleteButton/DeleteButton.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport locales from \"../../locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\n\ninterface Props {\n onDelete: () => void;\n}\n\nexport const DeleteButton: FC<Props> = (props) => {\n const { onDelete } = props;\n const stringFormatter = useLocalizedStringFormatter(locales, \"FileCard\");\n\n return (\n <Button\n aria-label={stringFormatter.format(`delete`)}\n variant=\"plain\"\n color=\"secondary\"\n onPress={onDelete}\n >\n <IconClose />\n </Button>\n );\n};\n\nexport default DeleteButton;\n"],"mappings":";;;;;;;;AAUA,IAAa,gBAA2B,UAAU;CAChD,MAAM,EAAE,aAAa;CACrB,MAAM,kBAAkB,4BAA4BA,kBAAS,UAAU;CAEvE,OACE,oBAAC,QAAD;EACE,cAAY,gBAAgB,OAAO,QAAQ;EAC3C,SAAQ;EACR,OAAM;EACN,SAAS;EAET,UAAA,oBAAC,WAAD,CAAY,CAAA;CACN,CAAA;AAEZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileSizeText.mjs","names":[],"sources":["../../../../../../../../../src/components/FileCard/components/FileSizeText/FileSizeText.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { Text } from \"@/components/Text\";\nimport styles from \"@/components/FileCard/FileCard.module.scss\";\n\ninterface Props {\n sizeInBytes: number;\n}\n\nexport const FileSizeText: FC<Props> = (props) => {\n const { sizeInBytes } = props;\n\n return (\n <Text className={styles.subTitle}>\n {new Intl.NumberFormat(\"en-US\", {\n notation: \"compact\",\n style: \"unit\",\n unit: \"byte\",\n unitDisplay: \"narrow\",\n }).format(sizeInBytes)}\n </Text>\n );\n};\n\nexport default FileSizeText;\n"],"mappings":";;;;;;AAQA,IAAa,gBAA2B,UAAU;CAChD,MAAM,EAAE,gBAAgB;CAExB,OACE,oBAAC,MAAD;EAAM,WAAW,wBAAO;EACrB,UAAA,IAAI,KAAK,aAAa,SAAS;GAC9B,UAAU;GACV,OAAO;GACP,MAAM;GACN,aAAa;EACf,CAAC,CAAC,CAAC,OAAO,WAAW;CACjB,CAAA;AAEV"}
1
+ {"version":3,"file":"FileSizeText.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/FileCard/components/FileSizeText/FileSizeText.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { Text } from \"@/components/Text\";\nimport styles from \"@/components/FileCard/FileCard.module.scss\";\n\ninterface Props {\n sizeInBytes: number;\n}\n\nexport const FileSizeText: FC<Props> = (props) => {\n const { sizeInBytes } = props;\n\n return (\n <Text className={styles.subTitle}>\n {new Intl.NumberFormat(\"en-US\", {\n notation: \"compact\",\n style: \"unit\",\n unit: \"byte\",\n unitDisplay: \"narrow\",\n }).format(sizeInBytes)}\n </Text>\n );\n};\n\nexport default FileSizeText;\n"],"mappings":";;;;;;AAQA,IAAa,gBAA2B,UAAU;CAChD,MAAM,EAAE,gBAAgB;CAExB,OACE,oBAAC,MAAD;EAAM,WAAWA,wBAAO;EACrB,UAAA,IAAI,KAAK,aAAa,SAAS;GAC9B,UAAU;GACV,OAAO;GACP,MAAM;GACN,aAAa;EACf,CAAC,CAAC,CAAC,OAAO,WAAW;CACjB,CAAA;AAEV"}
@@ -14,7 +14,7 @@ import * as Aria from "react-aria-components";
14
14
  /** @flr-generate all */
15
15
  var FileDropZone = flowComponent("FileDropZone", (props) => {
16
16
  const { multiple, accept, className, onChange: onChangeDropZone, children, name, isDisabled, isReadOnly } = props;
17
- const { FieldErrorView, FieldErrorCaptureContext, fieldProps, fieldPropsContext } = useFieldComponent(props, "FileDropZone");
17
+ const { FieldErrorView, FieldErrorCaptureContext, wrapperProps, controlProps, fieldPropsContext } = useFieldComponent(props, "FileDropZone");
18
18
  const fileFieldRef = useRef(null);
19
19
  const rootClassName = clsx(FileDropZone_module_default.fileDropZone, isDisabled && FileDropZone_module_default.disabled, className);
20
20
  const propsContext = {
@@ -31,7 +31,8 @@ var FileDropZone = flowComponent("FileDropZone", (props) => {
31
31
  color: "dark"
32
32
  },
33
33
  isDisabled,
34
- isReadOnly
34
+ isReadOnly,
35
+ "aria-describedby": controlProps["aria-describedby"]
35
36
  },
36
37
  Heading: { className: FileDropZone_module_default.heading },
37
38
  Icon: { className: FileDropZone_module_default.icon },
@@ -49,9 +50,10 @@ var FileDropZone = flowComponent("FileDropZone", (props) => {
49
50
  }
50
51
  };
51
52
  return /* @__PURE__ */ jsxs("div", {
52
- ...fieldProps,
53
- children: [/* @__PURE__ */ jsx(FieldErrorCaptureContext, { children: /* @__PURE__ */ jsx(PropsContextProvider, {
53
+ className: wrapperProps.className,
54
+ children: [/* @__PURE__ */ jsx(PropsContextProvider, {
54
55
  props: propsContext,
56
+ dependencies: [controlProps["aria-describedby"]],
55
57
  children: /* @__PURE__ */ jsx(Aria.DropZone, {
56
58
  className: rootClassName,
57
59
  onDrop: onDropHandler,
@@ -59,10 +61,10 @@ var FileDropZone = flowComponent("FileDropZone", (props) => {
59
61
  "data-readonly": isReadOnly,
60
62
  children: /* @__PURE__ */ jsx(IllustratedMessage, {
61
63
  color: "dark",
62
- children
64
+ children: /* @__PURE__ */ jsx(FieldErrorCaptureContext, { children })
63
65
  })
64
66
  })
65
- }) }), /* @__PURE__ */ jsx(FieldErrorView, {})]
67
+ }), /* @__PURE__ */ jsx(FieldErrorView, {})]
66
68
  });
67
69
  });
68
70
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"FileDropZone.mjs","names":[],"sources":["../../../../../../../src/components/FileDropZone/FileDropZone.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, useRef } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport { IllustratedMessage } from \"@/components/IllustratedMessage\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport styles from \"./FileDropZone.module.scss\";\nimport clsx from \"clsx\";\nimport type { FileInputOnChangeHandler } from \"@/components/FileField/components/FileInput\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { DropEvent, FocusableElement } from \"@react-types/shared\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { getAcceptedFiles } from \"@/lib/files/acceptedFiles\";\n\nexport interface FileDropZoneProps\n extends\n PropsWithClassName,\n FlowComponentProps<FocusableElement>,\n PropsWithChildren,\n Pick<Aria.InputProps, \"accept\" | \"multiple\" | \"name\">,\n Pick<Aria.DropZoneProps, \"isDisabled\"> {\n /** Called with the dropped or selected files whenever the selection changes. */\n onChange?: FileInputOnChangeHandler;\n /** Whether the component is read only. */\n isReadOnly?: boolean;\n}\n\n/** @flr-generate all */\nexport const FileDropZone: FC<FileDropZoneProps> = flowComponent(\n \"FileDropZone\",\n (props) => {\n const {\n multiple,\n accept,\n className,\n onChange: onChangeDropZone,\n children,\n name,\n isDisabled,\n isReadOnly,\n } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"FileDropZone\");\n\n const fileFieldRef = useRef<HTMLInputElement>(null);\n const rootClassName = clsx(\n styles.fileDropZone,\n isDisabled && styles.disabled,\n className,\n );\n\n const propsContext: PropsContext = {\n ...fieldPropsContext,\n IllustratedMessage: {\n FileField: {\n name,\n onChange: onChangeDropZone,\n ref: fileFieldRef,\n accept: accept,\n multiple: multiple,\n Button: { variant: \"outline\", color: \"dark\" },\n isDisabled,\n isReadOnly,\n },\n Heading: {\n className: styles.heading,\n },\n Icon: { className: styles.icon },\n Text: { className: styles.text },\n },\n };\n\n const onDropHandler = async (event: DropEvent) => {\n if (isReadOnly) {\n return;\n }\n\n const files = await getAcceptedFiles(event.items, accept);\n\n if (files.length > 0) {\n const fileTransfer = new DataTransfer();\n for (const file of multiple ? files : [files[0]]) {\n if (file) {\n fileTransfer.items.add(file);\n }\n }\n\n onChangeDropZone?.(fileTransfer.files);\n if (fileFieldRef.current) {\n fileFieldRef.current.files = fileTransfer.files;\n }\n }\n };\n\n return (\n <div {...fieldProps}>\n <FieldErrorCaptureContext>\n <PropsContextProvider props={propsContext}>\n <Aria.DropZone\n className={rootClassName}\n onDrop={onDropHandler}\n isDisabled={isDisabled}\n data-readonly={isReadOnly}\n >\n <IllustratedMessage color=\"dark\">{children}</IllustratedMessage>\n </Aria.DropZone>\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </div>\n );\n },\n);\n\nexport default FileDropZone;\n"],"mappings":";;;;;;;;;;;;;;AA+BA,IAAa,eAAsC,cACjD,iBACC,UAAU;CACT,MAAM,EACJ,UACA,QACA,WACA,UAAU,kBACV,UACA,MACA,YACA,eACE;CAEJ,MAAM,EACJ,gBACA,0BACA,YACA,sBACE,kBAAkB,OAAO,cAAc;CAE3C,MAAM,eAAe,OAAyB,IAAI;CAClD,MAAM,gBAAgB,KACpB,4BAAO,cACP,cAAc,4BAAO,UACrB,SACF;CAEA,MAAM,eAA6B;EACjC,GAAG;EACH,oBAAoB;GAClB,WAAW;IACT;IACA,UAAU;IACV,KAAK;IACG;IACE;IACV,QAAQ;KAAE,SAAS;KAAW,OAAO;IAAO;IAC5C;IACA;GACF;GACA,SAAS,EACP,WAAW,4BAAO,QACpB;GACA,MAAM,EAAE,WAAW,4BAAO,KAAK;GAC/B,MAAM,EAAE,WAAW,4BAAO,KAAK;EACjC;CACF;CAEA,MAAM,gBAAgB,OAAO,UAAqB;EAChD,IAAI,YACF;EAGF,MAAM,QAAQ,MAAM,iBAAiB,MAAM,OAAO,MAAM;EAExD,IAAI,MAAM,SAAS,GAAG;GACpB,MAAM,eAAe,IAAI,aAAa;GACtC,KAAK,MAAM,QAAQ,WAAW,QAAQ,CAAC,MAAM,EAAE,GAC7C,IAAI,MACF,aAAa,MAAM,IAAI,IAAI;GAI/B,mBAAmB,aAAa,KAAK;GACrC,IAAI,aAAa,SACf,aAAa,QAAQ,QAAQ,aAAa;EAE9C;CACF;CAEA,OACE,qBAAC,OAAD;EAAK,GAAI;EAAT,UAAA,CACE,oBAAC,0BAAD,EAAA,UACE,oBAAC,sBAAD;GAAsB,OAAO;GAC3B,UAAA,oBAAC,KAAK,UAAN;IACE,WAAW;IACX,QAAQ;IACI;IACZ,iBAAe;IAEf,UAAA,oBAAC,oBAAD;KAAoB,OAAM;KAAQ;IAA6B,CAAA;GAClD,CAAA;EACK,CAAA,EACE,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACd;;AAET,CACF"}
1
+ {"version":3,"file":"FileDropZone.mjs","names":["styles"],"sources":["../../../../../../../src/components/FileDropZone/FileDropZone.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, useRef } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport { IllustratedMessage } from \"@/components/IllustratedMessage\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport styles from \"./FileDropZone.module.scss\";\nimport clsx from \"clsx\";\nimport type { FileInputOnChangeHandler } from \"@/components/FileField/components/FileInput\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { DropEvent, FocusableElement } from \"@react-types/shared\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { getAcceptedFiles } from \"@/lib/files/acceptedFiles\";\n\nexport interface FileDropZoneProps\n extends\n PropsWithClassName,\n FlowComponentProps<FocusableElement>,\n PropsWithChildren,\n Pick<Aria.InputProps, \"accept\" | \"multiple\" | \"name\">,\n Pick<Aria.DropZoneProps, \"isDisabled\"> {\n /** Called with the dropped or selected files whenever the selection changes. */\n onChange?: FileInputOnChangeHandler;\n /** Whether the component is read only. */\n isReadOnly?: boolean;\n}\n\n/** @flr-generate all */\nexport const FileDropZone: FC<FileDropZoneProps> = flowComponent(\n \"FileDropZone\",\n (props) => {\n const {\n multiple,\n accept,\n className,\n onChange: onChangeDropZone,\n children,\n name,\n isDisabled,\n isReadOnly,\n } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n wrapperProps,\n controlProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"FileDropZone\");\n\n const fileFieldRef = useRef<HTMLInputElement>(null);\n const rootClassName = clsx(\n styles.fileDropZone,\n isDisabled && styles.disabled,\n className,\n );\n\n const propsContext: PropsContext = {\n ...fieldPropsContext,\n IllustratedMessage: {\n FileField: {\n name,\n onChange: onChangeDropZone,\n ref: fileFieldRef,\n accept: accept,\n multiple: multiple,\n Button: { variant: \"outline\", color: \"dark\" },\n isDisabled,\n isReadOnly,\n \"aria-describedby\": controlProps[\"aria-describedby\"],\n },\n Heading: {\n className: styles.heading,\n },\n Icon: { className: styles.icon },\n Text: { className: styles.text },\n },\n };\n\n const onDropHandler = async (event: DropEvent) => {\n if (isReadOnly) {\n return;\n }\n\n const files = await getAcceptedFiles(event.items, accept);\n\n if (files.length > 0) {\n const fileTransfer = new DataTransfer();\n for (const file of multiple ? files : [files[0]]) {\n if (file) {\n fileTransfer.items.add(file);\n }\n }\n\n onChangeDropZone?.(fileTransfer.files);\n if (fileFieldRef.current) {\n fileFieldRef.current.files = fileTransfer.files;\n }\n }\n };\n\n return (\n <div className={wrapperProps.className}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[controlProps[\"aria-describedby\"]]}\n >\n <Aria.DropZone\n className={rootClassName}\n onDrop={onDropHandler}\n isDisabled={isDisabled}\n data-readonly={isReadOnly}\n >\n <IllustratedMessage color=\"dark\">\n {/* Inside: IllustratedMessage clears the props context it gets. */}\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n </IllustratedMessage>\n </Aria.DropZone>\n </PropsContextProvider>\n <FieldErrorView />\n </div>\n );\n },\n);\n\nexport default FileDropZone;\n"],"mappings":";;;;;;;;;;;;;;AA+BA,IAAa,eAAsC,cACjD,iBACC,UAAU;CACT,MAAM,EACJ,UACA,QACA,WACA,UAAU,kBACV,UACA,MACA,YACA,eACE;CAEJ,MAAM,EACJ,gBACA,0BACA,cACA,cACA,sBACE,kBAAkB,OAAO,cAAc;CAE3C,MAAM,eAAe,OAAyB,IAAI;CAClD,MAAM,gBAAgB,KACpBA,4BAAO,cACP,cAAcA,4BAAO,UACrB,SACF;CAEA,MAAM,eAA6B;EACjC,GAAG;EACH,oBAAoB;GAClB,WAAW;IACT;IACA,UAAU;IACV,KAAK;IACG;IACE;IACV,QAAQ;KAAE,SAAS;KAAW,OAAO;IAAO;IAC5C;IACA;IACA,oBAAoB,aAAa;GACnC;GACA,SAAS,EACP,WAAWA,4BAAO,QACpB;GACA,MAAM,EAAE,WAAWA,4BAAO,KAAK;GAC/B,MAAM,EAAE,WAAWA,4BAAO,KAAK;EACjC;CACF;CAEA,MAAM,gBAAgB,OAAO,UAAqB;EAChD,IAAI,YACF;EAGF,MAAM,QAAQ,MAAM,iBAAiB,MAAM,OAAO,MAAM;EAExD,IAAI,MAAM,SAAS,GAAG;GACpB,MAAM,eAAe,IAAI,aAAa;GACtC,KAAK,MAAM,QAAQ,WAAW,QAAQ,CAAC,MAAM,EAAE,GAC7C,IAAI,MACF,aAAa,MAAM,IAAI,IAAI;GAI/B,mBAAmB,aAAa,KAAK;GACrC,IAAI,aAAa,SACf,aAAa,QAAQ,QAAQ,aAAa;EAE9C;CACF;CAEA,OACE,qBAAC,OAAD;EAAK,WAAW,aAAa;EAA7B,UAAA,CACE,oBAAC,sBAAD;GACE,OAAO;GACP,cAAc,CAAC,aAAa,mBAAmB;GAE/C,UAAA,oBAAC,KAAK,UAAN;IACE,WAAW;IACX,QAAQ;IACI;IACZ,iBAAe;IAEf,UAAA,oBAAC,oBAAD;KAAoB,OAAM;KAExB,UAAA,oBAAC,0BAAD,EAA2B,SAAmC,CAAA;IAC5C,CAAA;GACP,CAAA;EACK,CAAA,GACtB,oBAAC,gBAAD,CAAiB,CAAA,CACd;;AAET,CACF"}
@@ -15,7 +15,7 @@ import { useFormValidationState } from "@react-stately/form";
15
15
  /** @flr-generate all */
16
16
  var FileField = flowComponent("FileField", (props) => {
17
17
  const { children, ref, isRequired, isInvalid, isDisabled, validationBehavior, onChange, isReadOnly, ...restInputProps } = props;
18
- const { FieldErrorView, FieldErrorCaptureContext, fieldProps, fieldPropsContext } = useFieldComponent(props, "FileField");
18
+ const { FieldErrorView, FieldErrorCaptureContext, wrapperProps, controlProps, fieldPropsContext } = useFieldComponent(props, "FileField");
19
19
  const inputRef = useObjectRef(ref);
20
20
  const formValidationState = useFormValidationState({
21
21
  value: void 0,
@@ -25,6 +25,7 @@ var FileField = flowComponent("FileField", (props) => {
25
25
  useFormValidation({ validationBehavior }, formValidationState, inputRef);
26
26
  const inputProps = {
27
27
  ...restInputProps,
28
+ "aria-describedby": controlProps["aria-describedby"],
28
29
  "aria-invalid": formValidationState.displayValidation.isInvalid,
29
30
  value: void 0
30
31
  };
@@ -32,8 +33,7 @@ var FileField = flowComponent("FileField", (props) => {
32
33
  if (fileList && onChange) onChange(fileList);
33
34
  };
34
35
  return /* @__PURE__ */ jsx("div", {
35
- ...fieldProps,
36
- className: clsx(fieldProps.className, FileField_module_default.fileField),
36
+ className: clsx(wrapperProps.className, FileField_module_default.fileField),
37
37
  children: /* @__PURE__ */ jsxs(FieldErrorContext.Provider, {
38
38
  value: formValidationState.displayValidation,
39
39
  children: [/* @__PURE__ */ jsx(FieldErrorCaptureContext, { children: /* @__PURE__ */ jsx(PropsContextProvider, {
@@ -1 +1 @@
1
- {"version":3,"file":"FileField.mjs","names":[],"sources":["../../../../../../../src/components/FileField/FileField.tsx"],"sourcesContent":["import { useFormValidation } from \"@react-aria/form\";\nimport { useFormValidationState } from \"@react-stately/form\";\nimport type { PropsWithChildren } from \"react\";\nimport type * as Aria from \"react-aria-components\";\nimport { FieldErrorContext } from \"react-aria-components\";\nimport type { FileInputOnChangeHandler } from \"@/components/FileField/components/FileInput\";\nimport { FileInput } from \"@/components/FileField/components/FileInput\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./FileField.module.scss\";\nimport clsx from \"clsx\";\n\nexport interface FileFieldProps\n extends\n PropsWithChildren,\n FlowComponentProps<HTMLInputElement>,\n Pick<Aria.InputProps, \"accept\" | \"multiple\" | \"name\">,\n Pick<\n Aria.TextFieldProps,\n \"isRequired\" | \"isInvalid\" | \"validationBehavior\" | \"isDisabled\"\n > {\n /** Handler that is called when the file input changes. */\n onChange?: FileInputOnChangeHandler;\n /** Whether the component is read only. */\n isReadOnly?: boolean;\n}\n\n/** @flr-generate all */\nexport const FileField = flowComponent(\"FileField\", (props) => {\n const {\n children,\n ref,\n isRequired,\n isInvalid,\n isDisabled,\n validationBehavior,\n onChange,\n isReadOnly,\n ...restInputProps\n } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"FileField\");\n\n const inputRef = useObjectRef(ref);\n\n const formValidationState = useFormValidationState({\n value: undefined,\n validationBehavior,\n isInvalid,\n });\n\n useFormValidation({ validationBehavior }, formValidationState, inputRef);\n\n const inputProps = {\n ...restInputProps,\n \"aria-invalid\": formValidationState.displayValidation.isInvalid,\n value: undefined,\n };\n\n const handleChange: FileInputOnChangeHandler = (fileList) => {\n if (fileList && onChange) {\n onChange(fileList);\n }\n };\n\n return (\n <div\n {...fieldProps}\n className={clsx(fieldProps.className, styles.fileField)}\n >\n <FieldErrorContext.Provider value={formValidationState.displayValidation}>\n <FieldErrorCaptureContext>\n <PropsContextProvider props={fieldPropsContext}>\n <div\n data-readonly={isReadOnly}\n data-required={!!isRequired || undefined}\n data-invalid={\n formValidationState.displayValidation.isInvalid || undefined\n }\n >\n <FileInput\n ref={inputRef}\n isReadOnly={isReadOnly}\n onChange={isReadOnly ? undefined : handleChange}\n isDisabled={isDisabled}\n {...inputProps}\n >\n {children}\n </FileInput>\n </div>\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </FieldErrorContext.Provider>\n </div>\n );\n});\nexport default FileField;\n"],"mappings":";;;;;;;;;;;;;;;AA+BA,IAAa,YAAY,cAAc,cAAc,UAAU;CAC7D,MAAM,EACJ,UACA,KACA,YACA,WACA,YACA,oBACA,UACA,YACA,GAAG,mBACD;CAEJ,MAAM,EACJ,gBACA,0BACA,YACA,sBACE,kBAAkB,OAAO,WAAW;CAExC,MAAM,WAAW,aAAa,GAAG;CAEjC,MAAM,sBAAsB,uBAAuB;EACjD,OAAO,KAAA;EACP;EACA;CACF,CAAC;CAED,kBAAkB,EAAE,mBAAmB,GAAG,qBAAqB,QAAQ;CAEvE,MAAM,aAAa;EACjB,GAAG;EACH,gBAAgB,oBAAoB,kBAAkB;EACtD,OAAO,KAAA;CACT;CAEA,MAAM,gBAA0C,aAAa;EAC3D,IAAI,YAAY,UACd,SAAS,QAAQ;CAErB;CAEA,OACE,oBAAC,OAAD;EACE,GAAI;EACJ,WAAW,KAAK,WAAW,WAAW,yBAAO,SAAS;EAEtD,UAAA,qBAAC,kBAAkB,UAAnB;GAA4B,OAAO,oBAAoB;GAAvD,UAAA,CACE,oBAAC,0BAAD,EAAA,UACE,oBAAC,sBAAD;IAAsB,OAAO;IAC3B,UAAA,oBAAC,OAAD;KACE,iBAAe;KACf,iBAAe,CAAC,CAAC,cAAc,KAAA;KAC/B,gBACE,oBAAoB,kBAAkB,aAAa,KAAA;KAGrD,UAAA,oBAAC,WAAD;MACE,KAAK;MACO;MACZ,UAAU,aAAa,KAAA,IAAY;MACvB;MACZ,GAAI;MAEH;KACQ,CAAA;IACR,CAAA;GACe,CAAA,EACE,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACS;;CACzB,CAAA;AAET,CAAC"}
1
+ {"version":3,"file":"FileField.mjs","names":["styles"],"sources":["../../../../../../../src/components/FileField/FileField.tsx"],"sourcesContent":["import { useFormValidation } from \"@react-aria/form\";\nimport { useFormValidationState } from \"@react-stately/form\";\nimport type { PropsWithChildren } from \"react\";\nimport type * as Aria from \"react-aria-components\";\nimport { FieldErrorContext } from \"react-aria-components\";\nimport type { FileInputOnChangeHandler } from \"@/components/FileField/components/FileInput\";\nimport { FileInput } from \"@/components/FileField/components/FileInput\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./FileField.module.scss\";\nimport clsx from \"clsx\";\n\nexport interface FileFieldProps\n extends\n PropsWithChildren,\n FlowComponentProps<HTMLInputElement>,\n Pick<Aria.InputProps, \"accept\" | \"multiple\" | \"name\" | \"aria-describedby\">,\n Pick<\n Aria.TextFieldProps,\n \"isRequired\" | \"isInvalid\" | \"validationBehavior\" | \"isDisabled\"\n > {\n /** Handler that is called when the file input changes. */\n onChange?: FileInputOnChangeHandler;\n /** Whether the component is read only. */\n isReadOnly?: boolean;\n}\n\n/** @flr-generate all */\nexport const FileField = flowComponent(\"FileField\", (props) => {\n const {\n children,\n ref,\n isRequired,\n isInvalid,\n isDisabled,\n validationBehavior,\n onChange,\n isReadOnly,\n ...restInputProps\n } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n wrapperProps,\n controlProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"FileField\");\n\n const inputRef = useObjectRef(ref);\n\n const formValidationState = useFormValidationState({\n value: undefined,\n validationBehavior,\n isInvalid,\n });\n\n useFormValidation({ validationBehavior }, formValidationState, inputRef);\n\n const inputProps = {\n ...restInputProps,\n \"aria-describedby\": controlProps[\"aria-describedby\"],\n \"aria-invalid\": formValidationState.displayValidation.isInvalid,\n value: undefined,\n };\n\n const handleChange: FileInputOnChangeHandler = (fileList) => {\n if (fileList && onChange) {\n onChange(fileList);\n }\n };\n\n return (\n <div className={clsx(wrapperProps.className, styles.fileField)}>\n <FieldErrorContext.Provider value={formValidationState.displayValidation}>\n <FieldErrorCaptureContext>\n <PropsContextProvider props={fieldPropsContext}>\n <div\n data-readonly={isReadOnly}\n data-required={!!isRequired || undefined}\n data-invalid={\n formValidationState.displayValidation.isInvalid || undefined\n }\n >\n <FileInput\n ref={inputRef}\n isReadOnly={isReadOnly}\n onChange={isReadOnly ? undefined : handleChange}\n isDisabled={isDisabled}\n {...inputProps}\n >\n {children}\n </FileInput>\n </div>\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </FieldErrorContext.Provider>\n </div>\n );\n});\nexport default FileField;\n"],"mappings":";;;;;;;;;;;;;;;AA+BA,IAAa,YAAY,cAAc,cAAc,UAAU;CAC7D,MAAM,EACJ,UACA,KACA,YACA,WACA,YACA,oBACA,UACA,YACA,GAAG,mBACD;CAEJ,MAAM,EACJ,gBACA,0BACA,cACA,cACA,sBACE,kBAAkB,OAAO,WAAW;CAExC,MAAM,WAAW,aAAa,GAAG;CAEjC,MAAM,sBAAsB,uBAAuB;EACjD,OAAO,KAAA;EACP;EACA;CACF,CAAC;CAED,kBAAkB,EAAE,mBAAmB,GAAG,qBAAqB,QAAQ;CAEvE,MAAM,aAAa;EACjB,GAAG;EACH,oBAAoB,aAAa;EACjC,gBAAgB,oBAAoB,kBAAkB;EACtD,OAAO,KAAA;CACT;CAEA,MAAM,gBAA0C,aAAa;EAC3D,IAAI,YAAY,UACd,SAAS,QAAQ;CAErB;CAEA,OACE,oBAAC,OAAD;EAAK,WAAW,KAAK,aAAa,WAAWA,yBAAO,SAAS;EAC3D,UAAA,qBAAC,kBAAkB,UAAnB;GAA4B,OAAO,oBAAoB;GAAvD,UAAA,CACE,oBAAC,0BAAD,EAAA,UACE,oBAAC,sBAAD;IAAsB,OAAO;IAC3B,UAAA,oBAAC,OAAD;KACE,iBAAe;KACf,iBAAe,CAAC,CAAC,cAAc,KAAA;KAC/B,gBACE,oBAAoB,kBAAkB,aAAa,KAAA;KAGrD,UAAA,oBAAC,WAAD;MACE,KAAK;MACO;MACZ,UAAU,aAAa,KAAA,IAAY;MACvB;MACZ,GAAI;MAEH;KACQ,CAAA;IACR,CAAA;GACe,CAAA,EACE,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACS;;CACzB,CAAA;AAET,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.mjs","names":[],"sources":["../../../../../../../../src/components/FileField/components/FileInput.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, Ref } from \"react\";\nimport { type ChangeEvent } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport styles from \"./FileInput.module.scss\";\nimport { useVisuallyHidden } from \"react-aria\";\n\nexport type FileInputOnChangeHandler = (files: FileList | null) => void;\n\n/** @internal */\nexport interface FileInputProps extends PropsWithChildren {\n onChange?: FileInputOnChangeHandler;\n isDisabled?: boolean;\n ref?: Ref<HTMLInputElement>;\n isReadOnly?: boolean;\n}\n\n/** @internal */\nexport const FileInput: FC<FileInputProps> = (props) => {\n const { children, isDisabled, onChange, isReadOnly, ref, ...restInputProps } =\n props;\n const inputRef = useObjectRef(ref);\n const { visuallyHiddenProps } = useVisuallyHidden();\n\n const handlePress = () => {\n if (inputRef.current?.value) {\n inputRef.current.value = \"\";\n onChange?.(null);\n }\n inputRef.current?.click();\n };\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n onChange?.(event.target.files);\n };\n\n const propsContext: PropsContext = {\n Button: {\n onPress: handlePress,\n className: styles.trigger,\n isDisabled,\n isReadOnly,\n },\n FieldDescription: { className: styles.fieldDescription },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n {children}\n <Aria.Input\n {...restInputProps}\n {...visuallyHiddenProps}\n type=\"file\"\n ref={inputRef}\n onChange={handleChange}\n onClick={(event) => event.stopPropagation()}\n />\n </PropsContextProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;AAoBA,IAAa,aAAiC,UAAU;CACtD,MAAM,EAAE,UAAU,YAAY,UAAU,YAAY,KAAK,GAAG,mBAC1D;CACF,MAAM,WAAW,aAAa,GAAG;CACjC,MAAM,EAAE,wBAAwB,kBAAkB;CAElD,MAAM,oBAAoB;EACxB,IAAI,SAAS,SAAS,OAAO;GAC3B,SAAS,QAAQ,QAAQ;GACzB,WAAW,IAAI;EACjB;EACA,SAAS,SAAS,MAAM;CAC1B;CAEA,MAAM,gBAAgB,UAAyC;EAC7D,WAAW,MAAM,OAAO,KAAK;CAC/B;CAEA,MAAM,eAA6B;EACjC,QAAQ;GACN,SAAS;GACT,WAAW,yBAAO;GAClB;GACA;EACF;EACA,kBAAkB,EAAE,WAAW,yBAAO,iBAAiB;CACzD;CAEA,OACE,qBAAC,sBAAD;EAAsB,OAAO;EAA7B,UAAA,CACG,UACD,oBAAC,KAAK,OAAN;GACE,GAAI;GACJ,GAAI;GACJ,MAAK;GACL,KAAK;GACL,UAAU;GACV,UAAU,UAAU,MAAM,gBAAgB;EAC3C,CAAA,CACmB;;AAE1B"}
1
+ {"version":3,"file":"FileInput.mjs","names":["styles"],"sources":["../../../../../../../../src/components/FileField/components/FileInput.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, Ref } from \"react\";\nimport { type ChangeEvent } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport styles from \"./FileInput.module.scss\";\nimport { useVisuallyHidden } from \"react-aria\";\n\nexport type FileInputOnChangeHandler = (files: FileList | null) => void;\n\n/** @internal */\nexport interface FileInputProps extends PropsWithChildren {\n onChange?: FileInputOnChangeHandler;\n isDisabled?: boolean;\n ref?: Ref<HTMLInputElement>;\n isReadOnly?: boolean;\n}\n\n/** @internal */\nexport const FileInput: FC<FileInputProps> = (props) => {\n const { children, isDisabled, onChange, isReadOnly, ref, ...restInputProps } =\n props;\n const inputRef = useObjectRef(ref);\n const { visuallyHiddenProps } = useVisuallyHidden();\n\n const handlePress = () => {\n if (inputRef.current?.value) {\n inputRef.current.value = \"\";\n onChange?.(null);\n }\n inputRef.current?.click();\n };\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n onChange?.(event.target.files);\n };\n\n const propsContext: PropsContext = {\n Button: {\n onPress: handlePress,\n className: styles.trigger,\n isDisabled,\n isReadOnly,\n },\n FieldDescription: { className: styles.fieldDescription },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n {children}\n <Aria.Input\n {...restInputProps}\n {...visuallyHiddenProps}\n type=\"file\"\n ref={inputRef}\n onChange={handleChange}\n onClick={(event) => event.stopPropagation()}\n />\n </PropsContextProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;AAoBA,IAAa,aAAiC,UAAU;CACtD,MAAM,EAAE,UAAU,YAAY,UAAU,YAAY,KAAK,GAAG,mBAC1D;CACF,MAAM,WAAW,aAAa,GAAG;CACjC,MAAM,EAAE,wBAAwB,kBAAkB;CAElD,MAAM,oBAAoB;EACxB,IAAI,SAAS,SAAS,OAAO;GAC3B,SAAS,QAAQ,QAAQ;GACzB,WAAW,IAAI;EACjB;EACA,SAAS,SAAS,MAAM;CAC1B;CAEA,MAAM,gBAAgB,UAAyC;EAC7D,WAAW,MAAM,OAAO,KAAK;CAC/B;CAEA,MAAM,eAA6B;EACjC,QAAQ;GACN,SAAS;GACT,WAAWA,yBAAO;GAClB;GACA;EACF;EACA,kBAAkB,EAAE,WAAWA,yBAAO,iBAAiB;CACzD;CAEA,OACE,qBAAC,sBAAD;EAAsB,OAAO;EAA7B,UAAA,CACG,UACD,oBAAC,KAAK,OAAN;GACE,GAAI;GACJ,GAAI;GACJ,MAAK;GACL,KAAK;GACL,UAAU;GACV,UAAU,UAAU,MAAM,gBAAgB;EAC3C,CAAA,CACmB;;AAE1B"}
@@ -7,13 +7,13 @@ import { jsx } from "react/jsx-runtime";
7
7
  var sizeVariable = (size) => size && `var(--size-px--${size})`;
8
8
  /** @flr-generate all */
9
9
  var Flex = (props) => {
10
- const { children, className, direction = "row", align, justify, gap, columnGap, rowGap, grow, wrap = "nowrap", padding, paddingTop, paddingBottom, paddingLeft, paddingRight, elementType = "div", ...restProps } = props;
10
+ const { children, className, direction = "row", align, justify, gap, columnGap, rowGap, grow, wrap = "nowrap", padding, paddingBlock, paddingInline, paddingTop, paddingBottom, paddingLeft, paddingRight, elementType = "div", ...restProps } = props;
11
11
  const columnGapSize = columnGap ?? gap;
12
12
  const rowGapSize = rowGap ?? gap;
13
- const paddingTopSize = paddingTop ?? padding;
14
- const paddingBottomSize = paddingBottom ?? padding;
15
- const paddingLeftSize = paddingLeft ?? padding;
16
- const paddingRightSize = paddingRight ?? padding;
13
+ const paddingTopSize = paddingTop ?? paddingBlock ?? padding;
14
+ const paddingBottomSize = paddingBottom ?? paddingBlock ?? padding;
15
+ const paddingLeftSize = paddingLeft ?? paddingInline ?? padding;
16
+ const paddingRightSize = paddingRight ?? paddingInline ?? padding;
17
17
  const rootClassName = clsx(Flex_module_default.flex, align && Flex_module_default.align, justify && Flex_module_default.justify, grow && Flex_module_default.grow, columnGapSize && Flex_module_default["column-gap"], rowGapSize && Flex_module_default["row-gap"], paddingTopSize && Flex_module_default["padding-top"], paddingBottomSize && Flex_module_default["padding-bottom"], paddingLeftSize && Flex_module_default["padding-left"], paddingRightSize && Flex_module_default["padding-right"], className);
18
18
  const style = {
19
19
  "--flex--direction": direction,
@@ -1 +1 @@
1
- {"version":3,"file":"Flex.mjs","names":[],"sources":["../../../../../../../src/components/Flex/Flex.tsx"],"sourcesContent":["import type { CSSProperties, FC, PropsWithChildren } from \"react\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./Flex.module.scss\";\n\nexport interface FlexProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n PropsWithElementType<\n | \"div\"\n | \"aside\"\n | \"ul\"\n | \"li\"\n | \"ol\"\n | \"section\"\n | \"main\"\n | \"span\"\n | \"p\"\n | \"footer\"\n | \"header\"\n > {\n /** The flexDirection value of the element. @default \"row\" */\n direction?: CSSProperties[\"flexDirection\"];\n /** The alignItems value of the element. @default \"start\" */\n align?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"baseline\";\n /** The justifyContent value of the element. @default \"start\" */\n justify?: CSSProperties[\"justifyContent\"];\n /** The gap size of the element. */\n gap?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The columnGap size of the element. */\n columnGap?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The rowGap size of the element. */\n rowGap?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** Whether the element should grow. */\n grow?: boolean;\n /** The flexWrap value of the element. @default \"nowrap\" */\n wrap?: CSSProperties[\"flexWrap\"];\n /** The padding of the element. */\n padding?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The padding top of the element. */\n paddingTop?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The padding bottom of the element. */\n paddingBottom?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The padding left of the element. */\n paddingLeft?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The padding right of the element. */\n paddingRight?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n}\n\ntype FlexSize = \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n\nconst sizeVariable = (size: FlexSize | undefined) =>\n size && `var(--size-px--${size})`;\n\n/** @flr-generate all */\nexport const Flex: FC<FlexProps> = (props) => {\n const {\n children,\n className,\n direction = \"row\",\n align,\n justify,\n gap,\n columnGap,\n rowGap,\n grow,\n wrap = \"nowrap\",\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n elementType = \"div\",\n ...restProps\n } = props;\n\n const columnGapSize = columnGap ?? gap;\n const rowGapSize = rowGap ?? gap;\n const paddingTopSize = paddingTop ?? padding;\n const paddingBottomSize = paddingBottom ?? padding;\n const paddingLeftSize = paddingLeft ?? padding;\n const paddingRightSize = paddingRight ?? padding;\n\n const rootClassName = clsx(\n styles.flex,\n align && styles.align,\n justify && styles.justify,\n grow && styles.grow,\n columnGapSize && styles[\"column-gap\"],\n rowGapSize && styles[\"row-gap\"],\n paddingTopSize && styles[\"padding-top\"],\n paddingBottomSize && styles[\"padding-bottom\"],\n paddingLeftSize && styles[\"padding-left\"],\n paddingRightSize && styles[\"padding-right\"],\n className,\n );\n\n const style: CSSProperties = {\n \"--flex--direction\": direction,\n \"--flex--wrap\": wrap,\n \"--flex--align\":\n align === \"end\" ? \"flex-end\" : align === \"start\" ? \"flex-start\" : align,\n \"--flex--justify\": justify,\n \"--flex--column-gap\": sizeVariable(columnGapSize),\n \"--flex--row-gap\": sizeVariable(rowGapSize),\n \"--flex--padding-top\": sizeVariable(paddingTopSize),\n \"--flex--padding-bottom\": sizeVariable(paddingBottomSize),\n \"--flex--padding-left\": sizeVariable(paddingLeftSize),\n \"--flex--padding-right\": sizeVariable(paddingRightSize),\n };\n\n const Element = elementType;\n\n return (\n <Element {...restProps} className={rootClassName} style={style}>\n {children}\n </Element>\n );\n};\nexport default Flex;\n"],"mappings":";;;;;;AAuDA,IAAM,gBAAgB,SACpB,QAAQ,kBAAkB,KAAK;;AAGjC,IAAa,QAAuB,UAAU;CAC5C,MAAM,EACJ,UACA,WACA,YAAY,OACZ,OACA,SACA,KACA,WACA,QACA,MACA,OAAO,UACP,SACA,YACA,eACA,aACA,cACA,cAAc,OACd,GAAG,cACD;CAEJ,MAAM,gBAAgB,aAAa;CACnC,MAAM,aAAa,UAAU;CAC7B,MAAM,iBAAiB,cAAc;CACrC,MAAM,oBAAoB,iBAAiB;CAC3C,MAAM,kBAAkB,eAAe;CACvC,MAAM,mBAAmB,gBAAgB;CAEzC,MAAM,gBAAgB,KACpB,oBAAO,MACP,SAAS,oBAAO,OAChB,WAAW,oBAAO,SAClB,QAAQ,oBAAO,MACf,iBAAiB,oBAAO,eACxB,cAAc,oBAAO,YACrB,kBAAkB,oBAAO,gBACzB,qBAAqB,oBAAO,mBAC5B,mBAAmB,oBAAO,iBAC1B,oBAAoB,oBAAO,kBAC3B,SACF;CAEA,MAAM,QAAuB;EAC3B,qBAAqB;EACrB,gBAAgB;EAChB,iBACE,UAAU,QAAQ,aAAa,UAAU,UAAU,eAAe;EACpE,mBAAmB;EACnB,sBAAsB,aAAa,aAAa;EAChD,mBAAmB,aAAa,UAAU;EAC1C,uBAAuB,aAAa,cAAc;EAClD,0BAA0B,aAAa,iBAAiB;EACxD,wBAAwB,aAAa,eAAe;EACpD,yBAAyB,aAAa,gBAAgB;CACxD;CAIA,OACE,oBAAC,aAAD;EAAS,GAAI;EAAW,WAAW;EAAsB;EACtD;CACM,CAAA;AAEb"}
1
+ {"version":3,"file":"Flex.mjs","names":["styles","Element"],"sources":["../../../../../../../src/components/Flex/Flex.tsx"],"sourcesContent":["import type { CSSProperties, FC, PropsWithChildren } from \"react\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./Flex.module.scss\";\n\nexport interface FlexProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n PropsWithElementType<\n | \"div\"\n | \"aside\"\n | \"ul\"\n | \"li\"\n | \"ol\"\n | \"section\"\n | \"main\"\n | \"span\"\n | \"p\"\n | \"footer\"\n | \"header\"\n > {\n /** The flexDirection value of the element. @default \"row\" */\n direction?: CSSProperties[\"flexDirection\"];\n /** The alignItems value of the element. @default \"start\" */\n align?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"baseline\";\n /** The justifyContent value of the element. @default \"start\" */\n justify?: CSSProperties[\"justifyContent\"];\n /** The gap size of the element. */\n gap?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The columnGap size of the element. */\n columnGap?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The rowGap size of the element. */\n rowGap?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** Whether the element should grow. */\n grow?: boolean;\n /** The flexWrap value of the element. @default \"nowrap\" */\n wrap?: CSSProperties[\"flexWrap\"];\n /** The padding of the element. */\n padding?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The padding top and bottom of the element. Takes precedence over `padding`. */\n paddingBlock?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The padding left and right of the element. Takes precedence over `padding`. */\n paddingInline?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The padding top of the element. */\n paddingTop?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The padding bottom of the element. */\n paddingBottom?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The padding left of the element. */\n paddingLeft?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n /** The padding right of the element. */\n paddingRight?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n}\n\ntype FlexSize = \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n\nconst sizeVariable = (size: FlexSize | undefined) =>\n size && `var(--size-px--${size})`;\n\n/** @flr-generate all */\nexport const Flex: FC<FlexProps> = (props) => {\n const {\n children,\n className,\n direction = \"row\",\n align,\n justify,\n gap,\n columnGap,\n rowGap,\n grow,\n wrap = \"nowrap\",\n padding,\n paddingBlock,\n paddingInline,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n elementType = \"div\",\n ...restProps\n } = props;\n\n const columnGapSize = columnGap ?? gap;\n const rowGapSize = rowGap ?? gap;\n const paddingTopSize = paddingTop ?? paddingBlock ?? padding;\n const paddingBottomSize = paddingBottom ?? paddingBlock ?? padding;\n const paddingLeftSize = paddingLeft ?? paddingInline ?? padding;\n const paddingRightSize = paddingRight ?? paddingInline ?? padding;\n\n const rootClassName = clsx(\n styles.flex,\n align && styles.align,\n justify && styles.justify,\n grow && styles.grow,\n columnGapSize && styles[\"column-gap\"],\n rowGapSize && styles[\"row-gap\"],\n paddingTopSize && styles[\"padding-top\"],\n paddingBottomSize && styles[\"padding-bottom\"],\n paddingLeftSize && styles[\"padding-left\"],\n paddingRightSize && styles[\"padding-right\"],\n className,\n );\n\n const style: CSSProperties = {\n \"--flex--direction\": direction,\n \"--flex--wrap\": wrap,\n \"--flex--align\":\n align === \"end\" ? \"flex-end\" : align === \"start\" ? \"flex-start\" : align,\n \"--flex--justify\": justify,\n \"--flex--column-gap\": sizeVariable(columnGapSize),\n \"--flex--row-gap\": sizeVariable(rowGapSize),\n \"--flex--padding-top\": sizeVariable(paddingTopSize),\n \"--flex--padding-bottom\": sizeVariable(paddingBottomSize),\n \"--flex--padding-left\": sizeVariable(paddingLeftSize),\n \"--flex--padding-right\": sizeVariable(paddingRightSize),\n };\n\n const Element = elementType;\n\n return (\n <Element {...restProps} className={rootClassName} style={style}>\n {children}\n </Element>\n );\n};\nexport default Flex;\n"],"mappings":";;;;;;AA2DA,IAAM,gBAAgB,SACpB,QAAQ,kBAAkB,KAAK;;AAGjC,IAAa,QAAuB,UAAU;CAC5C,MAAM,EACJ,UACA,WACA,YAAY,OACZ,OACA,SACA,KACA,WACA,QACA,MACA,OAAO,UACP,SACA,cACA,eACA,YACA,eACA,aACA,cACA,cAAc,OACd,GAAG,cACD;CAEJ,MAAM,gBAAgB,aAAa;CACnC,MAAM,aAAa,UAAU;CAC7B,MAAM,iBAAiB,cAAc,gBAAgB;CACrD,MAAM,oBAAoB,iBAAiB,gBAAgB;CAC3D,MAAM,kBAAkB,eAAe,iBAAiB;CACxD,MAAM,mBAAmB,gBAAgB,iBAAiB;CAE1D,MAAM,gBAAgB,KACpBA,oBAAO,MACP,SAASA,oBAAO,OAChB,WAAWA,oBAAO,SAClB,QAAQA,oBAAO,MACf,iBAAiBA,oBAAO,eACxB,cAAcA,oBAAO,YACrB,kBAAkBA,oBAAO,gBACzB,qBAAqBA,oBAAO,mBAC5B,mBAAmBA,oBAAO,iBAC1B,oBAAoBA,oBAAO,kBAC3B,SACF;CAEA,MAAM,QAAuB;EAC3B,qBAAqB;EACrB,gBAAgB;EAChB,iBACE,UAAU,QAAQ,aAAa,UAAU,UAAU,eAAe;EACpE,mBAAmB;EACnB,sBAAsB,aAAa,aAAa;EAChD,mBAAmB,aAAa,UAAU;EAC1C,uBAAuB,aAAa,cAAc;EAClD,0BAA0B,aAAa,iBAAiB;EACxD,wBAAwB,aAAa,eAAe;EACpD,yBAAyB,aAAa,gBAAgB;CACxD;CAIA,OACE,oBAACC,aAAD;EAAS,GAAI;EAAW,WAAW;EAAsB;EACtD;CACM,CAAA;AAEb"}
@@ -1 +1 @@
1
- {"version":3,"file":"Header.mjs","names":[],"sources":["../../../../../../../src/components/Header/Header.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type { PropsWithElementType } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport SectionHeader from \"@/components/Section/components/SectionHeader/SectionHeader\";\n\nexport interface HeaderProps\n extends\n PropsWithChildren,\n PropsWithElementType<\"div\" | \"header\" | \"span\">,\n FlowComponentProps<HTMLDivElement | HTMLHeadElement | HTMLSpanElement> {\n /** @internal */\n renderSectionHeader?: boolean;\n}\n\n/** @flr-generate all */\nexport const Header = flowComponent(\n \"Header\",\n (props) => {\n const {\n children,\n ref,\n elementType = \"header\",\n renderSectionHeader,\n className,\n ...rest\n } = props;\n\n if (renderSectionHeader) {\n return (\n <SectionHeader ref={ref as never} className={className}>\n {children}\n </SectionHeader>\n );\n }\n\n const Element = elementType;\n\n return (\n <Element {...rest} className={className} ref={ref as never}>\n {children}\n </Element>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default Header;\n"],"mappings":";;;;;;;AAgBA,IAAa,SAAS,cACpB,WACC,UAAU;CACT,MAAM,EACJ,UACA,KACA,cAAc,UACd,qBACA,WACA,GAAG,SACD;CAEJ,IAAI,qBACF,OACE,oBAAC,eAAD;EAAoB;EAAyB;EAC1C;CACY,CAAA;CAMnB,OACE,oBAAC,aAAD;EAAS,GAAI;EAAiB;EAAgB;EAC3C;CACM,CAAA;AAEb,GACA,EACE,MAAM,SACR,CACF"}
1
+ {"version":3,"file":"Header.mjs","names":["Element"],"sources":["../../../../../../../src/components/Header/Header.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type { PropsWithElementType } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport SectionHeader from \"@/components/Section/components/SectionHeader/SectionHeader\";\n\nexport interface HeaderProps\n extends\n PropsWithChildren,\n PropsWithElementType<\"div\" | \"header\" | \"span\">,\n FlowComponentProps<HTMLDivElement | HTMLHeadElement | HTMLSpanElement> {\n /** @internal */\n renderSectionHeader?: boolean;\n}\n\n/** @flr-generate all */\nexport const Header = flowComponent(\n \"Header\",\n (props) => {\n const {\n children,\n ref,\n elementType = \"header\",\n renderSectionHeader,\n className,\n ...rest\n } = props;\n\n if (renderSectionHeader) {\n return (\n <SectionHeader ref={ref as never} className={className}>\n {children}\n </SectionHeader>\n );\n }\n\n const Element = elementType;\n\n return (\n <Element {...rest} className={className} ref={ref as never}>\n {children}\n </Element>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default Header;\n"],"mappings":";;;;;;;AAgBA,IAAa,SAAS,cACpB,WACC,UAAU;CACT,MAAM,EACJ,UACA,KACA,cAAc,UACd,qBACA,WACA,GAAG,SACD;CAEJ,IAAI,qBACF,OACE,oBAAC,eAAD;EAAoB;EAAyB;EAC1C;CACY,CAAA;CAMnB,OACE,oBAACA,aAAD;EAAS,GAAI;EAAiB;EAAgB;EAC3C;CACM,CAAA;AAEb,GACA,EACE,MAAM,SACR,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderNavigation.mjs","names":[],"sources":["../../../../../../../src/components/HeaderNavigation/HeaderNavigation.tsx"],"sourcesContent":["import type { ComponentProps, FC, PropsWithChildren } from \"react\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport styles from \"./HeaderNavigation.module.scss\";\nimport {\n type AlphaColor,\n isAlphaColor,\n type PropsWithClassName,\n} from \"@/lib/types/props\";\nimport { Text } from \"@/components/Text\";\n\nexport interface HeaderNavigationProps\n extends PropsWithChildren<ComponentProps<\"nav\">>, PropsWithClassName {\n /** The color of the header navigation. @default \"default\" */\n color?: \"default\" | AlphaColor;\n}\n\n/** @flr-generate all */\nexport const HeaderNavigation: FC<HeaderNavigationProps> = (props) => {\n const { children, className, color = \"default\", ...rest } = props;\n\n const rootClassName = clsx(\n styles.headerNavigation,\n isAlphaColor(color) && styles[color],\n className,\n );\n\n const propsContext: PropsContext = {\n Link: {\n wrapWith: <li className={styles.item} />,\n className: styles.link,\n unstyled: true,\n children: dynamic((props) => (\n <Text emulateBoldWidth>{props.children}</Text>\n )),\n },\n Button: {\n className: styles.button,\n color: isAlphaColor(color) ? color : \"secondary\",\n variant: \"plain\",\n wrapWith: <li className={styles.item} />,\n },\n };\n\n return (\n <nav className={rootClassName} role=\"navigation\" {...rest}>\n <ul className={styles.list}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </ul>\n </nav>\n );\n};\n\nexport default HeaderNavigation;\n"],"mappings":";;;;;;;;;;;AAsBA,IAAa,oBAA+C,UAAU;CACpE,MAAM,EAAE,UAAU,WAAW,QAAQ,WAAW,GAAG,SAAS;CAE5D,MAAM,gBAAgB,KACpB,gCAAO,kBACP,aAAa,KAAK,KAAK,gCAAO,QAC9B,SACF;CAEA,MAAM,eAA6B;EACjC,MAAM;GACJ,UAAU,oBAAC,MAAD,EAAI,WAAW,gCAAO,KAAO,CAAA;GACvC,WAAW,gCAAO;GAClB,UAAU;GACV,UAAU,SAAS,UACjB,oBAAC,MAAD;IAAM,kBAAA;IAAkB,UAAA,MAAM;GAAe,CAAA,CAC9C;EACH;EACA,QAAQ;GACN,WAAW,gCAAO;GAClB,OAAO,aAAa,KAAK,IAAI,QAAQ;GACrC,SAAS;GACT,UAAU,oBAAC,MAAD,EAAI,WAAW,gCAAO,KAAO,CAAA;EACzC;CACF;CAEA,OACE,oBAAC,OAAD;EAAK,WAAW;EAAe,MAAK;EAAa,GAAI;EACnD,UAAA,oBAAC,MAAD;GAAI,WAAW,gCAAO;GACpB,UAAA,oBAAC,sBAAD;IAAsB,OAAO;IAC1B;GACmB,CAAA;EACpB,CAAA;CACD,CAAA;AAET"}
1
+ {"version":3,"file":"HeaderNavigation.mjs","names":["styles"],"sources":["../../../../../../../src/components/HeaderNavigation/HeaderNavigation.tsx"],"sourcesContent":["import type { ComponentProps, FC, PropsWithChildren } from \"react\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport styles from \"./HeaderNavigation.module.scss\";\nimport {\n type AlphaColor,\n isAlphaColor,\n type PropsWithClassName,\n} from \"@/lib/types/props\";\nimport { Text } from \"@/components/Text\";\n\nexport interface HeaderNavigationProps\n extends PropsWithChildren<ComponentProps<\"nav\">>, PropsWithClassName {\n /** The color of the header navigation. @default \"default\" */\n color?: \"default\" | AlphaColor;\n}\n\n/** @flr-generate all */\nexport const HeaderNavigation: FC<HeaderNavigationProps> = (props) => {\n const { children, className, color = \"default\", ...rest } = props;\n\n const rootClassName = clsx(\n styles.headerNavigation,\n isAlphaColor(color) && styles[color],\n className,\n );\n\n const propsContext: PropsContext = {\n Link: {\n wrapWith: <li className={styles.item} />,\n className: styles.link,\n unstyled: true,\n children: dynamic((props) => (\n <Text emulateBoldWidth>{props.children}</Text>\n )),\n },\n Button: {\n className: styles.button,\n color: isAlphaColor(color) ? color : \"secondary\",\n variant: \"plain\",\n wrapWith: <li className={styles.item} />,\n },\n };\n\n return (\n <nav className={rootClassName} role=\"navigation\" {...rest}>\n <ul className={styles.list}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </ul>\n </nav>\n );\n};\n\nexport default HeaderNavigation;\n"],"mappings":";;;;;;;;;;;AAsBA,IAAa,oBAA+C,UAAU;CACpE,MAAM,EAAE,UAAU,WAAW,QAAQ,WAAW,GAAG,SAAS;CAE5D,MAAM,gBAAgB,KACpBA,gCAAO,kBACP,aAAa,KAAK,KAAKA,gCAAO,QAC9B,SACF;CAEA,MAAM,eAA6B;EACjC,MAAM;GACJ,UAAU,oBAAC,MAAD,EAAI,WAAWA,gCAAO,KAAO,CAAA;GACvC,WAAWA,gCAAO;GAClB,UAAU;GACV,UAAU,SAAS,UACjB,oBAAC,MAAD;IAAM,kBAAA;IAAkB,UAAA,MAAM;GAAe,CAAA,CAC9C;EACH;EACA,QAAQ;GACN,WAAWA,gCAAO;GAClB,OAAO,aAAa,KAAK,IAAI,QAAQ;GACrC,SAAS;GACT,UAAU,oBAAC,MAAD,EAAI,WAAWA,gCAAO,KAAO,CAAA;EACzC;CACF;CAEA,OACE,oBAAC,OAAD;EAAK,WAAW;EAAe,MAAK;EAAa,GAAI;EACnD,UAAA,oBAAC,MAAD;GAAI,WAAWA,gCAAO;GACpB,UAAA,oBAAC,sBAAD;IAAsB,OAAO;IAC1B;GACmB,CAAA;EACpB,CAAA;CACD,CAAA;AAET"}