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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/dist/assets/component-index.json +1 -1
  2. package/dist/assets/doc-properties.json +1 -1
  3. package/dist/css/all-layered.css +1 -1
  4. package/dist/css/all.css +1 -1
  5. package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
  6. package/dist/js/packages/components/src/components/Accordion/Accordion.mjs.map +1 -1
  7. package/dist/js/packages/components/src/components/Action/lib/ariaLive.mjs.map +1 -1
  8. package/dist/js/packages/components/src/components/Action/models/ActionState.mjs.map +1 -1
  9. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
  10. package/dist/js/packages/components/src/components/Alert/Alert.mjs.map +1 -1
  11. package/dist/js/packages/components/src/components/AlertBadge/AlertBadge.mjs.map +1 -1
  12. package/dist/js/packages/components/src/components/AlertIcon/AlertIcon.mjs.map +1 -1
  13. package/dist/js/packages/components/src/components/AlertText/AlertText.mjs.map +1 -1
  14. package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
  15. package/dist/js/packages/components/src/components/Avatar/Avatar.mjs.map +1 -1
  16. package/dist/js/packages/components/src/components/AvatarStack/AvatarStack.mjs.map +1 -1
  17. package/dist/js/packages/components/src/components/Badge/Badge.mjs.map +1 -1
  18. package/dist/js/packages/components/src/components/BigNumber/BigNumber.mjs.map +1 -1
  19. package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.mjs.map +1 -1
  20. package/dist/js/packages/components/src/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.mjs.map +1 -1
  21. package/dist/js/packages/components/src/components/Button/Button.mjs.map +1 -1
  22. package/dist/js/packages/components/src/components/Calendar/Calendar.mjs.map +1 -1
  23. package/dist/js/packages/components/src/components/Calendar/components/CalendarHeader/CalendarHeader.mjs.map +1 -1
  24. package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/RangeCalendar.mjs.map +1 -1
  25. package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/helpers/useCalendarDateRangePresets.mjs.map +1 -1
  26. package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
  27. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/ChartTooltip.mjs.map +1 -1
  28. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.mjs.map +1 -1
  29. package/dist/js/packages/components/src/components/Chat/Chat.mjs.map +1 -1
  30. package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs.map +1 -1
  31. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
  32. package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
  33. package/dist/js/packages/components/src/components/CoachMark/CoachMark.mjs.map +1 -1
  34. package/dist/js/packages/components/src/components/CodeBlock/CodeBlock.mjs.map +1 -1
  35. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs.map +1 -1
  36. package/dist/js/packages/components/src/components/CodeEditor/languages/dotEnv/index.mjs.map +1 -1
  37. package/dist/js/packages/components/src/components/CodeEditor/languages/index.mjs.map +1 -1
  38. package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs.map +1 -1
  39. package/dist/js/packages/components/src/components/Color/Color.mjs.map +1 -1
  40. package/dist/js/packages/components/src/components/ColumnLayout/ColumnLayout.mjs.map +1 -1
  41. package/dist/js/packages/components/src/components/Combine/Combine.mjs.map +1 -1
  42. package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
  43. package/dist/js/packages/components/src/components/Content/Content.mjs.map +1 -1
  44. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
  45. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs.map +1 -1
  46. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.mjs.map +1 -1
  47. package/dist/js/packages/components/src/components/ContextualHelp/ContextualHelp.mjs.map +1 -1
  48. package/dist/js/packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs.map +1 -1
  49. package/dist/js/packages/components/src/components/CopyButton/CopyButton.mjs.map +1 -1
  50. package/dist/js/packages/components/src/components/CounterBadge/CounterBadge.mjs.map +1 -1
  51. package/dist/js/packages/components/src/components/CountryOptions/CountryOptions.mjs.map +1 -1
  52. package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs.map +1 -1
  53. package/dist/js/packages/components/src/components/DatePicker/components/DateInput/DateInput.mjs.map +1 -1
  54. package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs.map +1 -1
  55. package/dist/js/packages/components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.mjs.map +1 -1
  56. package/dist/js/packages/components/src/components/DonutChart/DonutChart.mjs.map +1 -1
  57. package/dist/js/packages/components/src/components/DonutChart/components/Donut.mjs.map +1 -1
  58. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs.map +1 -1
  59. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartLegend.mjs.map +1 -1
  60. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartValue.mjs.map +1 -1
  61. package/dist/js/packages/components/src/components/EmulatedBoldText/EmulatedBoldText.mjs.map +1 -1
  62. package/dist/js/packages/components/src/components/FieldDescription/FieldDescription.mjs.map +1 -1
  63. package/dist/js/packages/components/src/components/FieldError/FieldError.mjs.map +1 -1
  64. package/dist/js/packages/components/src/components/FileCard/FileCard.mjs.map +1 -1
  65. package/dist/js/packages/components/src/components/FileCard/components/Avatar/Avatar.mjs.map +1 -1
  66. package/dist/js/packages/components/src/components/FileCard/components/DeleteButton/DeleteButton.mjs.map +1 -1
  67. package/dist/js/packages/components/src/components/FileCard/components/FileSizeText/FileSizeText.mjs.map +1 -1
  68. package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
  69. package/dist/js/packages/components/src/components/FileField/FileField.mjs.map +1 -1
  70. package/dist/js/packages/components/src/components/FileField/components/FileInput.mjs.map +1 -1
  71. package/dist/js/packages/components/src/components/Flex/Flex.mjs.map +1 -1
  72. package/dist/js/packages/components/src/components/Header/Header.mjs.map +1 -1
  73. package/dist/js/packages/components/src/components/HeaderNavigation/HeaderNavigation.mjs.map +1 -1
  74. package/dist/js/packages/components/src/components/Heading/Heading.mjs.map +1 -1
  75. package/dist/js/packages/components/src/components/Icon/Icon.mjs.map +1 -1
  76. package/dist/js/packages/components/src/components/Icon/components/icons/IconAI.mjs.map +1 -1
  77. package/dist/js/packages/components/src/components/Icon/components/icons/IconAIHosting.mjs.map +1 -1
  78. package/dist/js/packages/components/src/components/Icon/components/icons/IconAnalytics.mjs.map +1 -1
  79. package/dist/js/packages/components/src/components/Icon/components/icons/IconApp.mjs.map +1 -1
  80. package/dist/js/packages/components/src/components/Icon/components/icons/IconAscending.mjs.map +1 -1
  81. package/dist/js/packages/components/src/components/Icon/components/icons/IconAttachment.mjs.map +1 -1
  82. package/dist/js/packages/components/src/components/Icon/components/icons/IconAutoresponder.mjs.map +1 -1
  83. package/dist/js/packages/components/src/components/Icon/components/icons/IconBackLink.mjs.map +1 -1
  84. package/dist/js/packages/components/src/components/Icon/components/icons/IconBackup.mjs.map +1 -1
  85. package/dist/js/packages/components/src/components/Icon/components/icons/IconBold.mjs.map +1 -1
  86. package/dist/js/packages/components/src/components/Icon/components/icons/IconCamera.mjs.map +1 -1
  87. package/dist/js/packages/components/src/components/Icon/components/icons/IconCertificate.mjs.map +1 -1
  88. package/dist/js/packages/components/src/components/Icon/components/icons/IconChangelog.mjs.map +1 -1
  89. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheck.mjs.map +1 -1
  90. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxChecked.mjs.map +1 -1
  91. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxEmpty.mjs.map +1 -1
  92. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxIndeterminate.mjs.map +1 -1
  93. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronDown.mjs.map +1 -1
  94. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronLeft.mjs.map +1 -1
  95. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronRight.mjs.map +1 -1
  96. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronUp.mjs.map +1 -1
  97. package/dist/js/packages/components/src/components/Icon/components/icons/IconClose.mjs.map +1 -1
  98. package/dist/js/packages/components/src/components/Icon/components/icons/IconCode.mjs.map +1 -1
  99. package/dist/js/packages/components/src/components/Icon/components/icons/IconContainer.mjs.map +1 -1
  100. package/dist/js/packages/components/src/components/Icon/components/icons/IconContextMenu.mjs.map +1 -1
  101. package/dist/js/packages/components/src/components/Icon/components/icons/IconContextMenuVertical.mjs.map +1 -1
  102. package/dist/js/packages/components/src/components/Icon/components/icons/IconContract.mjs.map +1 -1
  103. package/dist/js/packages/components/src/components/Icon/components/icons/IconContractPartner.mjs.map +1 -1
  104. package/dist/js/packages/components/src/components/Icon/components/icons/IconContributor.mjs.map +1 -1
  105. package/dist/js/packages/components/src/components/Icon/components/icons/IconCopy.mjs.map +1 -1
  106. package/dist/js/packages/components/src/components/Icon/components/icons/IconCronjob.mjs.map +1 -1
  107. package/dist/js/packages/components/src/components/Icon/components/icons/IconCustomer.mjs.map +1 -1
  108. package/dist/js/packages/components/src/components/Icon/components/icons/IconDanger.mjs.map +1 -1
  109. package/dist/js/packages/components/src/components/Icon/components/icons/IconDashboard.mjs.map +1 -1
  110. package/dist/js/packages/components/src/components/Icon/components/icons/IconDatabase.mjs.map +1 -1
  111. package/dist/js/packages/components/src/components/Icon/components/icons/IconDate.mjs.map +1 -1
  112. package/dist/js/packages/components/src/components/Icon/components/icons/IconDelete.mjs.map +1 -1
  113. package/dist/js/packages/components/src/components/Icon/components/icons/IconDeliveryBox.mjs.map +1 -1
  114. package/dist/js/packages/components/src/components/Icon/components/icons/IconDescending.mjs.map +1 -1
  115. package/dist/js/packages/components/src/components/Icon/components/icons/IconDesktop.mjs.map +1 -1
  116. package/dist/js/packages/components/src/components/Icon/components/icons/IconDirectory.mjs.map +1 -1
  117. package/dist/js/packages/components/src/components/Icon/components/icons/IconDnsSubZone.mjs.map +1 -1
  118. package/dist/js/packages/components/src/components/Icon/components/icons/IconDnsZone.mjs.map +1 -1
  119. package/dist/js/packages/components/src/components/Icon/components/icons/IconDomain.mjs.map +1 -1
  120. package/dist/js/packages/components/src/components/Icon/components/icons/IconDownload.mjs.map +1 -1
  121. package/dist/js/packages/components/src/components/Icon/components/icons/IconEdit.mjs.map +1 -1
  122. package/dist/js/packages/components/src/components/Icon/components/icons/IconEmail.mjs.map +1 -1
  123. package/dist/js/packages/components/src/components/Icon/components/icons/IconEmailArchive.mjs.map +1 -1
  124. package/dist/js/packages/components/src/components/Icon/components/icons/IconExtension.mjs.map +1 -1
  125. package/dist/js/packages/components/src/components/Icon/components/icons/IconExternalLink.mjs.map +1 -1
  126. package/dist/js/packages/components/src/components/Icon/components/icons/IconFailed.mjs.map +1 -1
  127. package/dist/js/packages/components/src/components/Icon/components/icons/IconFeedback.mjs.map +1 -1
  128. package/dist/js/packages/components/src/components/Icon/components/icons/IconFile.mjs.map +1 -1
  129. package/dist/js/packages/components/src/components/Icon/components/icons/IconFilter.mjs.map +1 -1
  130. package/dist/js/packages/components/src/components/Icon/components/icons/IconForwardAddress.mjs.map +1 -1
  131. package/dist/js/packages/components/src/components/Icon/components/icons/IconForwardLink.mjs.map +1 -1
  132. package/dist/js/packages/components/src/components/Icon/components/icons/IconHide.mjs.map +1 -1
  133. package/dist/js/packages/components/src/components/Icon/components/icons/IconHome.mjs.map +1 -1
  134. package/dist/js/packages/components/src/components/Icon/components/icons/IconImage.mjs.map +1 -1
  135. package/dist/js/packages/components/src/components/Icon/components/icons/IconInfo.mjs.map +1 -1
  136. package/dist/js/packages/components/src/components/Icon/components/icons/IconInvite.mjs.map +1 -1
  137. package/dist/js/packages/components/src/components/Icon/components/icons/IconInvoice.mjs.map +1 -1
  138. package/dist/js/packages/components/src/components/Icon/components/icons/IconItalic.mjs.map +1 -1
  139. package/dist/js/packages/components/src/components/Icon/components/icons/IconKnowledgeHint.mjs.map +1 -1
  140. package/dist/js/packages/components/src/components/Icon/components/icons/IconLanguage.mjs.map +1 -1
  141. package/dist/js/packages/components/src/components/Icon/components/icons/IconLeadFyndr.mjs.map +1 -1
  142. package/dist/js/packages/components/src/components/Icon/components/icons/IconLink.mjs.map +1 -1
  143. package/dist/js/packages/components/src/components/Icon/components/icons/IconLock.mjs.map +1 -1
  144. package/dist/js/packages/components/src/components/Icon/components/icons/IconLockOpen.mjs.map +1 -1
  145. package/dist/js/packages/components/src/components/Icon/components/icons/IconLogout.mjs.map +1 -1
  146. package/dist/js/packages/components/src/components/Icon/components/icons/IconMainUser.mjs.map +1 -1
  147. package/dist/js/packages/components/src/components/Icon/components/icons/IconMarketplace.mjs.map +1 -1
  148. package/dist/js/packages/components/src/components/Icon/components/icons/IconMaximize.mjs.map +1 -1
  149. package/dist/js/packages/components/src/components/Icon/components/icons/IconMember.mjs.map +1 -1
  150. package/dist/js/packages/components/src/components/Icon/components/icons/IconMenu.mjs.map +1 -1
  151. package/dist/js/packages/components/src/components/Icon/components/icons/IconMinimize.mjs.map +1 -1
  152. package/dist/js/packages/components/src/components/Icon/components/icons/IconMinus.mjs.map +1 -1
  153. package/dist/js/packages/components/src/components/Icon/components/icons/IconMittwald.mjs.map +1 -1
  154. package/dist/js/packages/components/src/components/Icon/components/icons/IconMobile.mjs.map +1 -1
  155. package/dist/js/packages/components/src/components/Icon/components/icons/IconMonitoring.mjs.map +1 -1
  156. package/dist/js/packages/components/src/components/Icon/components/icons/IconMove.mjs.map +1 -1
  157. package/dist/js/packages/components/src/components/Icon/components/icons/IconNewsletter.mjs.map +1 -1
  158. package/dist/js/packages/components/src/components/Icon/components/icons/IconNotification.mjs.map +1 -1
  159. package/dist/js/packages/components/src/components/Icon/components/icons/IconNumber.mjs.map +1 -1
  160. package/dist/js/packages/components/src/components/Icon/components/icons/IconOrder.mjs.map +1 -1
  161. package/dist/js/packages/components/src/components/Icon/components/icons/IconOrderedList.mjs.map +1 -1
  162. package/dist/js/packages/components/src/components/Icon/components/icons/IconPassword.mjs.map +1 -1
  163. package/dist/js/packages/components/src/components/Icon/components/icons/IconPath.mjs.map +1 -1
  164. package/dist/js/packages/components/src/components/Icon/components/icons/IconPause.mjs.map +1 -1
  165. package/dist/js/packages/components/src/components/Icon/components/icons/IconPayment.mjs.map +1 -1
  166. package/dist/js/packages/components/src/components/Icon/components/icons/IconPending.mjs.map +1 -1
  167. package/dist/js/packages/components/src/components/Icon/components/icons/IconPicture.mjs.map +1 -1
  168. package/dist/js/packages/components/src/components/Icon/components/icons/IconPlus.mjs.map +1 -1
  169. package/dist/js/packages/components/src/components/Icon/components/icons/IconProject.mjs.map +1 -1
  170. package/dist/js/packages/components/src/components/Icon/components/icons/IconQuote.mjs.map +1 -1
  171. package/dist/js/packages/components/src/components/Icon/components/icons/IconRadioOff.mjs.map +1 -1
  172. package/dist/js/packages/components/src/components/Icon/components/icons/IconRadioOn.mjs.map +1 -1
  173. package/dist/js/packages/components/src/components/Icon/components/icons/IconRedo.mjs.map +1 -1
  174. package/dist/js/packages/components/src/components/Icon/components/icons/IconRefresh.mjs.map +1 -1
  175. package/dist/js/packages/components/src/components/Icon/components/icons/IconRegistry.mjs.map +1 -1
  176. package/dist/js/packages/components/src/components/Icon/components/icons/IconSave.mjs.map +1 -1
  177. package/dist/js/packages/components/src/components/Icon/components/icons/IconSearch.mjs.map +1 -1
  178. package/dist/js/packages/components/src/components/Icon/components/icons/IconSecurity.mjs.map +1 -1
  179. package/dist/js/packages/components/src/components/Icon/components/icons/IconSend.mjs.map +1 -1
  180. package/dist/js/packages/components/src/components/Icon/components/icons/IconServer.mjs.map +1 -1
  181. package/dist/js/packages/components/src/components/Icon/components/icons/IconSettings.mjs.map +1 -1
  182. package/dist/js/packages/components/src/components/Icon/components/icons/IconShare.mjs.map +1 -1
  183. package/dist/js/packages/components/src/components/Icon/components/icons/IconShow.mjs.map +1 -1
  184. package/dist/js/packages/components/src/components/Icon/components/icons/IconSorting.mjs.map +1 -1
  185. package/dist/js/packages/components/src/components/Icon/components/icons/IconSsh.mjs.map +1 -1
  186. package/dist/js/packages/components/src/components/Icon/components/icons/IconSshKey.mjs.map +1 -1
  187. package/dist/js/packages/components/src/components/Icon/components/icons/IconSshSftp.mjs.map +1 -1
  188. package/dist/js/packages/components/src/components/Icon/components/icons/IconStack.mjs.map +1 -1
  189. package/dist/js/packages/components/src/components/Icon/components/icons/IconStar.mjs.map +1 -1
  190. package/dist/js/packages/components/src/components/Icon/components/icons/IconStarFilled.mjs.map +1 -1
  191. package/dist/js/packages/components/src/components/Icon/components/icons/IconStart.mjs.map +1 -1
  192. package/dist/js/packages/components/src/components/Icon/components/icons/IconStrikeThrough.mjs.map +1 -1
  193. package/dist/js/packages/components/src/components/Icon/components/icons/IconSubdomain.mjs.map +1 -1
  194. package/dist/js/packages/components/src/components/Icon/components/icons/IconSucceeded.mjs.map +1 -1
  195. package/dist/js/packages/components/src/components/Icon/components/icons/IconSuccess.mjs.map +1 -1
  196. package/dist/js/packages/components/src/components/Icon/components/icons/IconSupport.mjs.map +1 -1
  197. package/dist/js/packages/components/src/components/Icon/components/icons/IconTerminate.mjs.map +1 -1
  198. package/dist/js/packages/components/src/components/Icon/components/icons/IconTicket.mjs.map +1 -1
  199. package/dist/js/packages/components/src/components/Icon/components/icons/IconTime.mjs.map +1 -1
  200. package/dist/js/packages/components/src/components/Icon/components/icons/IconUnavailable.mjs.map +1 -1
  201. package/dist/js/packages/components/src/components/Icon/components/icons/IconUndo.mjs.map +1 -1
  202. package/dist/js/packages/components/src/components/Icon/components/icons/IconUnorderedList.mjs.map +1 -1
  203. package/dist/js/packages/components/src/components/Icon/components/icons/IconUpload.mjs.map +1 -1
  204. package/dist/js/packages/components/src/components/Icon/components/icons/IconUser.mjs.map +1 -1
  205. package/dist/js/packages/components/src/components/Icon/components/icons/IconVhost.mjs.map +1 -1
  206. package/dist/js/packages/components/src/components/Icon/components/icons/IconView.mjs.map +1 -1
  207. package/dist/js/packages/components/src/components/Icon/components/icons/IconVolume.mjs.map +1 -1
  208. package/dist/js/packages/components/src/components/Icon/components/icons/IconWarning.mjs.map +1 -1
  209. package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map +1 -1
  210. package/dist/js/packages/components/src/components/Image/Image.mjs.map +1 -1
  211. package/dist/js/packages/components/src/components/ImageCropper/ImageCropper.mjs.map +1 -1
  212. package/dist/js/packages/components/src/components/Initials/Initials.mjs.map +1 -1
  213. package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs.map +1 -1
  214. package/dist/js/packages/components/src/components/InlineCode/InlineCode.mjs.map +1 -1
  215. package/dist/js/packages/components/src/components/Kbd/Kbd.mjs.map +1 -1
  216. package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
  217. package/dist/js/packages/components/src/components/LabeledValue/LabeledValue.mjs.map +1 -1
  218. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs +2 -1
  219. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs.map +1 -1
  220. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.module.mjs +3 -1
  221. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.module.mjs.map +1 -1
  222. package/dist/js/packages/components/src/components/Legend/Legend.mjs.map +1 -1
  223. package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs.map +1 -1
  224. package/dist/js/packages/components/src/components/LightBox/LightBox.mjs.map +1 -1
  225. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/Controls.mjs.map +1 -1
  226. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/LightBoxGallery.mjs.map +1 -1
  227. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGalleryItem/LightBoxGalleryItem.mjs.map +1 -1
  228. package/dist/js/packages/components/src/components/Link/Link.mjs.map +1 -1
  229. package/dist/js/packages/components/src/components/Link/components/LinkIcon/LinkIcon.mjs.map +1 -1
  230. package/dist/js/packages/components/src/components/List/List.mjs.map +1 -1
  231. package/dist/js/packages/components/src/components/List/components/DataLoader/DataLoaderSuspense.mjs.map +1 -1
  232. package/dist/js/packages/components/src/components/List/components/EmptySearchResultView/EmptySearchResultView.mjs.map +1 -1
  233. package/dist/js/packages/components/src/components/List/components/EmptyView/EmptyView.mjs.map +1 -1
  234. package/dist/js/packages/components/src/components/List/components/Footer/Footer.mjs.map +1 -1
  235. package/dist/js/packages/components/src/components/List/components/Footer/components/PaginationInfos/PaginationInfos.mjs.map +1 -1
  236. package/dist/js/packages/components/src/components/List/components/Footer/components/ShowNextBatchButton/ShowNextBatchButton.mjs.map +1 -1
  237. package/dist/js/packages/components/src/components/List/components/Header/Header.mjs.map +1 -1
  238. package/dist/js/packages/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs.map +1 -1
  239. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs.map +1 -1
  240. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionCheckboxGroup.mjs.map +1 -1
  241. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionDateRange.mjs.map +1 -1
  242. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionRadioGroup.mjs.map +1 -1
  243. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs.map +1 -1
  244. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs.map +1 -1
  245. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/DateRangeFilterPopover.mjs.map +1 -1
  246. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenu.mjs.map +1 -1
  247. package/dist/js/packages/components/src/components/List/components/Header/components/SearchField/SearchField.mjs.map +1 -1
  248. package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.mjs.map +1 -1
  249. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs.map +1 -1
  250. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs.map +1 -1
  251. package/dist/js/packages/components/src/components/List/components/Items/Items.mjs.map +1 -1
  252. package/dist/js/packages/components/src/components/List/components/Items/components/Item/Item.mjs.map +1 -1
  253. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs.map +1 -1
  254. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs.map +1 -1
  255. package/dist/js/packages/components/src/components/List/components/Items/views/GridListItem/GridListItem.mjs.map +1 -1
  256. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
  257. package/dist/js/packages/components/src/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.mjs.map +1 -1
  258. package/dist/js/packages/components/src/components/List/components/ListSummary/ListSummary.mjs.map +1 -1
  259. package/dist/js/packages/components/src/components/List/components/Table/Table.mjs.map +1 -1
  260. package/dist/js/packages/components/src/components/List/components/Table/components/TableBodyLoadingView.mjs.map +1 -1
  261. package/dist/js/packages/components/src/components/List/components/Table/components/TableRowSkeletonView.mjs.map +1 -1
  262. package/dist/js/packages/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
  263. package/dist/js/packages/components/src/components/List/views/EmptyView/EmptyView.mjs.map +1 -1
  264. package/dist/js/packages/components/src/components/List/views/EmptyViewContainer/EmptyViewContainer.mjs.map +1 -1
  265. package/dist/js/packages/components/src/components/LoadingSpinner/LoadingSpinner.mjs.map +1 -1
  266. package/dist/js/packages/components/src/components/Markdown/Markdown.mjs.map +1 -1
  267. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
  268. package/dist/js/packages/components/src/components/MarkdownEditor/components/AttachmentButton.mjs.map +1 -1
  269. package/dist/js/packages/components/src/components/MarkdownEditor/components/ModeButton.mjs.map +1 -1
  270. package/dist/js/packages/components/src/components/MarkdownEditor/components/Toolbar.mjs.map +1 -1
  271. package/dist/js/packages/components/src/components/MarkdownEditor/components/ToolbarButton.mjs.map +1 -1
  272. package/dist/js/packages/components/src/components/MarkdownEditor/lib/useFileUpload.mjs.map +1 -1
  273. package/dist/js/packages/components/src/components/MenuItem/MenuItem.mjs.map +1 -1
  274. package/dist/js/packages/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs.map +1 -1
  275. package/dist/js/packages/components/src/components/Message/Message.mjs.map +1 -1
  276. package/dist/js/packages/components/src/components/MessageThread/MessageThread.mjs.map +1 -1
  277. package/dist/js/packages/components/src/components/MessageThread/components/MessageSeparator/MessageSeparator.mjs.map +1 -1
  278. package/dist/js/packages/components/src/components/Modal/Modal.mjs.map +1 -1
  279. package/dist/js/packages/components/src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.mjs.map +1 -1
  280. package/dist/js/packages/components/src/components/Navigation/Navigation.mjs.map +1 -1
  281. package/dist/js/packages/components/src/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit.mjs.map +1 -1
  282. package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
  283. package/dist/js/packages/components/src/components/Notification/Notification.mjs.map +1 -1
  284. package/dist/js/packages/components/src/components/NotificationProvider/NotificationContainer/NotificationContainer.mjs.map +1 -1
  285. package/dist/js/packages/components/src/components/NumberField/NumberField.mjs.map +1 -1
  286. package/dist/js/packages/components/src/components/Option/Option.mjs.map +1 -1
  287. package/dist/js/packages/components/src/components/Options/Options.mjs.map +1 -1
  288. package/dist/js/packages/components/src/components/Overlay/Overlay.mjs.map +1 -1
  289. package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs.map +1 -1
  290. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
  291. package/dist/js/packages/components/src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.mjs.map +1 -1
  292. package/dist/js/packages/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs.map +1 -1
  293. package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs.map +1 -1
  294. package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.mjs.map +1 -1
  295. package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry.mjs.map +1 -1
  296. package/dist/js/packages/components/src/components/PasswordCreationField/lib/ariaAnnounce.mjs.map +1 -1
  297. package/dist/js/packages/components/src/components/Popover/Popover.mjs.map +1 -1
  298. package/dist/js/packages/components/src/components/Popover/components/NonModalPopoverContent/NonModalPopoverContent.mjs.map +1 -1
  299. package/dist/js/packages/components/src/components/Popover/components/PopoverContent/PopoverContent.mjs.map +1 -1
  300. package/dist/js/packages/components/src/components/Popover/components/PopoverTip/PopoverTip.mjs.map +1 -1
  301. package/dist/js/packages/components/src/components/Popover/viewportPadding.mjs.map +1 -1
  302. package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.mjs.map +1 -1
  303. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs.map +1 -1
  304. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarLegend.mjs.map +1 -1
  305. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarValue.mjs.map +1 -1
  306. package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs.map +1 -1
  307. package/dist/js/packages/components/src/components/RadioGroup/components/Radio/Radio.mjs.map +1 -1
  308. package/dist/js/packages/components/src/components/RadioGroup/components/RadioButton/RadioButton.mjs.map +1 -1
  309. package/dist/js/packages/components/src/components/Rating/Rating.mjs.map +1 -1
  310. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/EmptySegment.mjs.map +1 -1
  311. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/FilledSegment.mjs.map +1 -1
  312. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingSegment.mjs.map +1 -1
  313. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs.map +1 -1
  314. package/dist/js/packages/components/src/components/Section/Section.mjs.map +1 -1
  315. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
  316. package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  317. package/dist/js/packages/components/src/components/SegmentedControl/components/Segment/Segment.mjs.map +1 -1
  318. package/dist/js/packages/components/src/components/Select/Select.mjs.map +1 -1
  319. package/dist/js/packages/components/src/components/Separator/Separator.mjs.map +1 -1
  320. package/dist/js/packages/components/src/components/Skeleton/Skeleton.mjs.map +1 -1
  321. package/dist/js/packages/components/src/components/SkeletonText/SkeletonText.mjs.map +1 -1
  322. package/dist/js/packages/components/src/components/Slider/Slider.mjs.map +1 -1
  323. package/dist/js/packages/components/src/components/Switch/Switch.mjs.map +1 -1
  324. package/dist/js/packages/components/src/components/TabNavigation/TabNavigation.mjs.map +1 -1
  325. package/dist/js/packages/components/src/components/TabNavigation/components/LinkContent/LinkContent.mjs.map +1 -1
  326. package/dist/js/packages/components/src/components/Table/Table.mjs.map +1 -1
  327. package/dist/js/packages/components/src/components/Table/components/TableBody/TableBody.mjs.map +1 -1
  328. package/dist/js/packages/components/src/components/Table/components/TableCell/TableCell.mjs.map +1 -1
  329. package/dist/js/packages/components/src/components/Table/components/TableColumn/TableColumn.mjs.map +1 -1
  330. package/dist/js/packages/components/src/components/Table/components/TableHeader/TableHeader.mjs.map +1 -1
  331. package/dist/js/packages/components/src/components/Table/components/TableRow/TableRow.mjs.map +1 -1
  332. package/dist/js/packages/components/src/components/Tabs/Tabs.mjs.map +1 -1
  333. package/dist/js/packages/components/src/components/Tabs/components/FallbackTab/FallbackTab.mjs.map +1 -1
  334. package/dist/js/packages/components/src/components/Tabs/components/Tab/Tab.mjs.map +1 -1
  335. package/dist/js/packages/components/src/components/Tabs/components/TabList/TabList.mjs.map +1 -1
  336. package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.mjs.map +1 -1
  337. package/dist/js/packages/components/src/components/Text/Text.mjs.map +1 -1
  338. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs.map +1 -1
  339. package/dist/js/packages/components/src/components/TextField/TextField.mjs.map +1 -1
  340. package/dist/js/packages/components/src/components/TimeField/TimeField.mjs.map +1 -1
  341. package/dist/js/packages/components/src/components/Tooltip/Tooltip.mjs.map +1 -1
  342. package/dist/js/packages/components/src/components/Truncate/Truncate.mjs.map +1 -1
  343. package/dist/js/packages/components/src/components/TunnelEntry/TunnelEntry.mjs.map +1 -1
  344. package/dist/js/packages/components/src/integrations/nextjs/components/RouterProvider/RouterProvider.mjs.map +1 -1
  345. package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
  346. package/dist/js/packages/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
  347. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormAction.mjs.map +1 -1
  348. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs.map +1 -1
  349. package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs.map +1 -1
  350. package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs.map +1 -1
  351. package/dist/js/packages/components/src/lib/react/cloneElement.mjs.map +1 -1
  352. package/dist/js/packages/components/src/lib/react/components/Render/Render.mjs.map +1 -1
  353. package/dist/js/packages/components/src/lib/react/getPropsMerger.mjs.map +1 -1
  354. package/dist/js/packages/components/src/lib/theming/hooks/useDesignTokens.mjs.map +1 -1
  355. package/dist/js/packages/components/src/lib/tokens/CategoricalColors.mjs.map +1 -1
  356. package/dist/js/packages/components/src/lib/tokens/isCategoricalColor.mjs.map +1 -1
  357. package/dist/js/packages/components/src/status/componentStatus.mjs.map +1 -1
  358. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"AccentBox.mjs","names":[],"sources":["../../../../../../../src/components/AccentBox/AccentBox.tsx"],"sourcesContent":["import type { CSSProperties, PropsWithChildren } from \"react\";\nimport type {\n AlphaColor,\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./AccentBox.module.scss\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\nconst accentBoxBackgroundColors = [\n \"neutral\",\n \"blue\",\n \"violet\",\n \"teal\",\n \"lilac\",\n \"green\",\n \"navy\",\n \"gradient\",\n] as const;\n\ntype AccentBoxBackgroundColor = (typeof accentBoxBackgroundColors)[number];\ntype AccentBoxWithCustomBackgroundColor =\n AccentBoxBackgroundColor | (string & {});\n\nfunction isFlowColor(\n something: unknown,\n): something is AccentBoxBackgroundColor {\n const anyAccentBoxBackgroundColors =\n accentBoxBackgroundColors as readonly string[];\n return (\n typeof something === \"string\" &&\n anyAccentBoxBackgroundColors.includes(something)\n );\n}\n\nexport interface AccentBoxProps\n extends\n PropsWithChildren,\n PropsWithElementType<\"div\" | \"section\" | \"article\">,\n PropsWithClassName,\n FlowComponentProps {\n /** The background color of the accent box. @default \"neutral\" */\n backgroundColor?: AccentBoxWithCustomBackgroundColor;\n /** The content color of the accent box. @default \"default\" */\n color?: \"default\" | AlphaColor;\n /** The background image of the accent box. */\n backgroundImage?: string;\n /** The aspect ratio of the accent box. */\n aspectRatio?: CSSProperties[\"aspectRatio\"];\n}\n\n/**\n * @flr-generate all\n * @flowStatus beta\n */\nexport const AccentBox = flowComponent(\"AccentBox\", (props) => {\n const {\n color: colorFromProps,\n backgroundColor = \"neutral\",\n backgroundImage,\n children,\n elementType = \"div\",\n className,\n style: styleFromProps,\n aspectRatio,\n } = props;\n\n const defaultColor =\n (colorFromProps as unknown as string) === \"gradient\" ||\n backgroundColor === \"gradient\"\n ? \"dark\"\n : \"default\";\n\n const color = colorFromProps ?? defaultColor;\n\n const isAFlowColor = isFlowColor(backgroundColor);\n\n // backwards compatibility\n const backgroundColorFromColor =\n (colorFromProps as unknown as string) === \"neutral\" ||\n (colorFromProps as unknown as string) === \"gradient\" ||\n (colorFromProps as unknown as string) === \"green\"\n ? (colorFromProps as unknown as AccentBoxBackgroundColor)\n : undefined;\n\n const style = {\n backgroundColor: isAFlowColor ? undefined : backgroundColor,\n backgroundImage: backgroundImage ? `url(${backgroundImage})` : undefined,\n aspectRatio,\n ...styleFromProps,\n };\n\n const rootClassName = clsx(\n styles.accentBox,\n backgroundColorFromColor\n ? styles[backgroundColorFromColor]\n : isAFlowColor\n ? styles[backgroundColor]\n : undefined,\n className,\n );\n\n const Element = elementType;\n\n const contentColor = color === \"default\" ? undefined : color;\n\n const propsContext: PropsContext = {\n Link: {\n color: contentColor,\n },\n Text: {\n color: contentColor,\n },\n Heading: {\n color: contentColor,\n },\n Icon: {\n className: styles.icon,\n },\n };\n\n return (\n <Element className={rootClassName} style={style}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Element>\n );\n});\n\nexport default AccentBox;\n"],"mappings":";;;;;;;;AAcA,IAAM,4BAA4B;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAMA,SAAS,YACP,WACuC;CAGvC,OACE,OAAO,cAAc,YACrB,0BAA6B,SAAS,SAAS;AAEnD;;;;;AAsBA,IAAa,YAAY,cAAc,cAAc,UAAU;CAC7D,MAAM,EACJ,OAAO,gBACP,kBAAkB,WAClB,iBACA,UACA,cAAc,OACd,WACA,OAAO,gBACP,gBACE;CAQJ,MAAM,QAAQ,mBALX,mBAAyC,cAC1C,oBAAoB,aAChB,SACA;CAIN,MAAM,eAAe,YAAY,eAAe;CAGhD,MAAM,2BACH,mBAAyC,aACzC,mBAAyC,cACzC,mBAAyC,UACrC,iBACD,KAAA;CAEN,MAAM,QAAQ;EACZ,iBAAiB,eAAe,KAAA,IAAY;EAC5C,iBAAiB,kBAAkB,OAAO,gBAAgB,KAAK,KAAA;EAC/D;EACA,GAAG;CACL;CAEA,MAAM,gBAAgB,KACpB,yBAAO,WACP,2BACI,yBAAO,4BACP,eACE,yBAAO,mBACP,KAAA,GACN,SACF;CAEA,MAAM,UAAU;CAEhB,MAAM,eAAe,UAAU,YAAY,KAAA,IAAY;CAEvD,MAAM,eAA6B;EACjC,MAAM,EACJ,OAAO,aACT;EACA,MAAM,EACJ,OAAO,aACT;EACA,SAAS,EACP,OAAO,aACT;EACA,MAAM,EACJ,WAAW,yBAAO,KACpB;CACF;CAEA,OACE,oBAAC,SAAD;EAAS,WAAW;EAAsB;EACxC,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA;CACf,CAAA;AAEb,CAAC"}
1
+ {"version":3,"file":"AccentBox.mjs","names":["anyAccentBoxBackgroundColors","styles"],"sources":["../../../../../../../src/components/AccentBox/AccentBox.tsx"],"sourcesContent":["import type { CSSProperties, PropsWithChildren } from \"react\";\nimport type {\n AlphaColor,\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./AccentBox.module.scss\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\nconst accentBoxBackgroundColors = [\n \"neutral\",\n \"blue\",\n \"violet\",\n \"teal\",\n \"lilac\",\n \"green\",\n \"navy\",\n \"gradient\",\n] as const;\n\ntype AccentBoxBackgroundColor = (typeof accentBoxBackgroundColors)[number];\ntype AccentBoxWithCustomBackgroundColor =\n AccentBoxBackgroundColor | (string & {});\n\nfunction isFlowColor(\n something: unknown,\n): something is AccentBoxBackgroundColor {\n const anyAccentBoxBackgroundColors =\n accentBoxBackgroundColors as readonly string[];\n return (\n typeof something === \"string\" &&\n anyAccentBoxBackgroundColors.includes(something)\n );\n}\n\nexport interface AccentBoxProps\n extends\n PropsWithChildren,\n PropsWithElementType<\"div\" | \"section\" | \"article\">,\n PropsWithClassName,\n FlowComponentProps {\n /** The background color of the accent box. @default \"neutral\" */\n backgroundColor?: AccentBoxWithCustomBackgroundColor;\n /** The content color of the accent box. @default \"default\" */\n color?: \"default\" | AlphaColor;\n /** The background image of the accent box. */\n backgroundImage?: string;\n /** The aspect ratio of the accent box. */\n aspectRatio?: CSSProperties[\"aspectRatio\"];\n}\n\n/**\n * @flr-generate all\n * @flowStatus beta\n */\nexport const AccentBox = flowComponent(\"AccentBox\", (props) => {\n const {\n color: colorFromProps,\n backgroundColor = \"neutral\",\n backgroundImage,\n children,\n elementType = \"div\",\n className,\n style: styleFromProps,\n aspectRatio,\n } = props;\n\n const defaultColor =\n (colorFromProps as unknown as string) === \"gradient\" ||\n backgroundColor === \"gradient\"\n ? \"dark\"\n : \"default\";\n\n const color = colorFromProps ?? defaultColor;\n\n const isAFlowColor = isFlowColor(backgroundColor);\n\n // backwards compatibility\n const backgroundColorFromColor =\n (colorFromProps as unknown as string) === \"neutral\" ||\n (colorFromProps as unknown as string) === \"gradient\" ||\n (colorFromProps as unknown as string) === \"green\"\n ? (colorFromProps as unknown as AccentBoxBackgroundColor)\n : undefined;\n\n const style = {\n backgroundColor: isAFlowColor ? undefined : backgroundColor,\n backgroundImage: backgroundImage ? `url(${backgroundImage})` : undefined,\n aspectRatio,\n ...styleFromProps,\n };\n\n const rootClassName = clsx(\n styles.accentBox,\n backgroundColorFromColor\n ? styles[backgroundColorFromColor]\n : isAFlowColor\n ? styles[backgroundColor]\n : undefined,\n className,\n );\n\n const Element = elementType;\n\n const contentColor = color === \"default\" ? undefined : color;\n\n const propsContext: PropsContext = {\n Link: {\n color: contentColor,\n },\n Text: {\n color: contentColor,\n },\n Heading: {\n color: contentColor,\n },\n Icon: {\n className: styles.icon,\n },\n };\n\n return (\n <Element className={rootClassName} style={style}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Element>\n );\n});\n\nexport default AccentBox;\n"],"mappings":";;;;;;;;AAcA,IAAM,4BAA4B;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAMA,SAAS,YACP,WACuC;CAGvC,OACE,OAAO,cAAc,YACrBA,0BAA6B,SAAS,SAAS;AAEnD;;;;;AAsBA,IAAa,YAAY,cAAc,cAAc,UAAU;CAC7D,MAAM,EACJ,OAAO,gBACP,kBAAkB,WAClB,iBACA,UACA,cAAc,OACd,WACA,OAAO,gBACP,gBACE;CAQJ,MAAM,QAAQ,mBALX,mBAAyC,cAC1C,oBAAoB,aAChB,SACA;CAIN,MAAM,eAAe,YAAY,eAAe;CAGhD,MAAM,2BACH,mBAAyC,aACzC,mBAAyC,cACzC,mBAAyC,UACrC,iBACD,KAAA;CAEN,MAAM,QAAQ;EACZ,iBAAiB,eAAe,KAAA,IAAY;EAC5C,iBAAiB,kBAAkB,OAAO,gBAAgB,KAAK,KAAA;EAC/D;EACA,GAAG;CACL;CAEA,MAAM,gBAAgB,KACpBC,yBAAO,WACP,2BACIA,yBAAO,4BACP,eACEA,yBAAO,mBACP,KAAA,GACN,SACF;CAEA,MAAM,UAAU;CAEhB,MAAM,eAAe,UAAU,YAAY,KAAA,IAAY;CAEvD,MAAM,eAA6B;EACjC,MAAM,EACJ,OAAO,aACT;EACA,MAAM,EACJ,OAAO,aACT;EACA,SAAS,EACP,OAAO,aACT;EACA,MAAM,EACJ,WAAWA,yBAAO,KACpB;CACF;CAEA,OACE,oBAAC,SAAD;EAAS,WAAW;EAAsB;EACxC,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA;CACf,CAAA;AAEb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.mjs","names":[],"sources":["../../../../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import type { ComponentProps, FC, PropsWithChildren, ReactNode } from \"react\";\nimport { useCallback, useId, useState } from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./Accordion.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { IconChevronDown } from \"@/components/Icon/components/icons\";\nimport { Activity } from \"@/components/Activity\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface AccordionProps extends PropsWithChildren<\n ComponentProps<\"div\">\n> {\n /** Whether the accordion should be initially expanded. */\n defaultExpanded?: boolean;\n /** The visual variant of the accordion. @default \"default\" */\n variant?: \"default\" | \"outline\";\n}\n\ninterface HeaderButtonProps extends PropsWithChildren {\n id: string;\n contentId: string;\n isExpanded: boolean;\n onToggle: () => void;\n}\n\n/*\n * Declared here and not inside the accordion: a component defined in a render\n * body gets a new identity on every render, so React unmounts and remounts it —\n * and the toggle loses the focus it just received on its own press.\n */\nconst HeaderButton: FC<HeaderButtonProps> = (props) => {\n const { children, id, contentId, isExpanded, onToggle } = props;\n\n return (\n <Button\n tunnel={null}\n unstyled\n id={id}\n aria-expanded={isExpanded}\n className={styles.headerButton}\n onPress={onToggle}\n aria-controls={contentId}\n >\n {children}\n <IconChevronDown className={styles.chevron} />\n </Button>\n );\n};\n\n/**\n * @flr-generate all\n * @flowStatus beta\n */\nexport const Accordion: FC<AccordionProps> = flowComponent(\n \"Accordion\",\n (props) => {\n const {\n children,\n className,\n defaultExpanded = false,\n variant = \"default\",\n ...rest\n } = props;\n const [expanded, setExpanded] = useState(defaultExpanded);\n\n const rootClassName = clsx(\n styles.accordion,\n expanded && styles.expanded,\n variant === \"outline\" && styles.outline,\n className,\n );\n\n const headerId = useId();\n\n const contentId = useId();\n\n const toggle = useCallback(() => setExpanded((expanded) => !expanded), []);\n\n const renderHeaderButton = (children: ReactNode) => (\n <HeaderButton\n id={headerId}\n contentId={contentId}\n isExpanded={expanded}\n onToggle={toggle}\n >\n {children}\n </HeaderButton>\n );\n\n const propsContext: PropsContext = {\n Content: {\n className: styles.contentInner,\n tunnel: {\n id: \"content\",\n component: \"Accordion\",\n },\n },\n Heading: {\n className: styles.header,\n level: 4,\n size: \"xs\",\n children: dynamic((props) => renderHeaderButton(props.children)),\n Button: { size: \"m\" },\n },\n Label: {\n className: styles.header,\n /*\n * A <label> names the first labelable element below it — here the\n * toggle, whose own text is the label's only content. The name\n * computation walks into the label, meets the button it started from\n * and stops, so the toggle ends up with an empty name. A <span> names\n * nothing and the name comes from the toggle's content again.\n */\n elementType: \"span\",\n children: dynamic((props) => renderHeaderButton(props.children)),\n },\n };\n\n return (\n <div {...rest} className={rootClassName}>\n {/*\n * The props context is memoized, and the header button takes `expanded`\n * from it – without the dependency the toggle keeps announcing the\n * state it was first rendered with.\n */}\n <PropsContextProvider dependencies={[expanded]} props={propsContext}>\n {children}\n <div\n aria-labelledby={headerId}\n id={contentId}\n role=\"region\"\n hidden={!expanded}\n className={styles.content}\n >\n <Activity isActive={expanded} inactiveDelay={1000}>\n <UiComponentTunnelExit id=\"content\" component=\"Accordion\" />\n </Activity>\n </div>\n </PropsContextProvider>\n </div>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default Accordion;\n"],"mappings":";;;;;;;;;;;;;;AAiCA,IAAM,gBAAuC,UAAU;CACrD,MAAM,EAAE,UAAU,IAAI,WAAW,YAAY,aAAa;CAE1D,OACE,qBAAC,QAAD;EACE,QAAQ;EACR,UAAA;EACI;EACJ,iBAAe;EACf,WAAW,yBAAO;EAClB,SAAS;EACT,iBAAe;EAPjB,UAAA,CASG,UACD,oBAAC,iBAAD,EAAiB,WAAW,yBAAO,QAAU,CAAA,CACvC;;AAEZ;;;;;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],"sources":["../../../../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import type { ComponentProps, FC, PropsWithChildren, ReactNode } from \"react\";\nimport { useCallback, useId, useState } from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./Accordion.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { IconChevronDown } from \"@/components/Icon/components/icons\";\nimport { Activity } from \"@/components/Activity\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface AccordionProps extends PropsWithChildren<\n ComponentProps<\"div\">\n> {\n /** Whether the accordion should be initially expanded. */\n defaultExpanded?: boolean;\n /** The visual variant of the accordion. @default \"default\" */\n variant?: \"default\" | \"outline\";\n}\n\ninterface HeaderButtonProps extends PropsWithChildren {\n id: string;\n contentId: string;\n isExpanded: boolean;\n onToggle: () => void;\n}\n\n/*\n * Declared here and not inside the accordion: a component defined in a render\n * body gets a new identity on every render, so React unmounts and remounts it —\n * and the toggle loses the focus it just received on its own press.\n */\nconst HeaderButton: FC<HeaderButtonProps> = (props) => {\n const { children, id, contentId, isExpanded, onToggle } = props;\n\n return (\n <Button\n tunnel={null}\n unstyled\n id={id}\n aria-expanded={isExpanded}\n className={styles.headerButton}\n onPress={onToggle}\n aria-controls={contentId}\n >\n {children}\n <IconChevronDown className={styles.chevron} />\n </Button>\n );\n};\n\n/**\n * @flr-generate all\n * @flowStatus beta\n */\nexport const Accordion: FC<AccordionProps> = flowComponent(\n \"Accordion\",\n (props) => {\n const {\n children,\n className,\n defaultExpanded = false,\n variant = \"default\",\n ...rest\n } = props;\n const [expanded, setExpanded] = useState(defaultExpanded);\n\n const rootClassName = clsx(\n styles.accordion,\n expanded && styles.expanded,\n variant === \"outline\" && styles.outline,\n className,\n );\n\n const headerId = useId();\n\n const contentId = useId();\n\n const toggle = useCallback(() => setExpanded((expanded) => !expanded), []);\n\n const renderHeaderButton = (children: ReactNode) => (\n <HeaderButton\n id={headerId}\n contentId={contentId}\n isExpanded={expanded}\n onToggle={toggle}\n >\n {children}\n </HeaderButton>\n );\n\n const propsContext: PropsContext = {\n Content: {\n className: styles.contentInner,\n tunnel: {\n id: \"content\",\n component: \"Accordion\",\n },\n },\n Heading: {\n className: styles.header,\n level: 4,\n size: \"xs\",\n children: dynamic((props) => renderHeaderButton(props.children)),\n Button: { size: \"m\" },\n },\n Label: {\n className: styles.header,\n /*\n * A <label> names the first labelable element below it — here the\n * toggle, whose own text is the label's only content. The name\n * computation walks into the label, meets the button it started from\n * and stops, so the toggle ends up with an empty name. A <span> names\n * nothing and the name comes from the toggle's content again.\n */\n elementType: \"span\",\n children: dynamic((props) => renderHeaderButton(props.children)),\n },\n };\n\n return (\n <div {...rest} className={rootClassName}>\n {/*\n * The props context is memoized, and the header button takes `expanded`\n * from it – without the dependency the toggle keeps announcing the\n * state it was first rendered with.\n */}\n <PropsContextProvider dependencies={[expanded]} props={propsContext}>\n {children}\n <div\n aria-labelledby={headerId}\n id={contentId}\n role=\"region\"\n hidden={!expanded}\n className={styles.content}\n >\n <Activity isActive={expanded} inactiveDelay={1000}>\n <UiComponentTunnelExit id=\"content\" component=\"Accordion\" />\n </Activity>\n </div>\n </PropsContextProvider>\n </div>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default Accordion;\n"],"mappings":";;;;;;;;;;;;;;AAiCA,IAAM,gBAAuC,UAAU;CACrD,MAAM,EAAE,UAAU,IAAI,WAAW,YAAY,aAAa;CAE1D,OACE,qBAAC,QAAD;EACE,QAAQ;EACR,UAAA;EACI;EACJ,iBAAe;EACf,WAAWA,yBAAO;EAClB,SAAS;EACT,iBAAe;EAPjB,UAAA,CASG,UACD,oBAAC,iBAAD,EAAiB,WAAWA,yBAAO,QAAU,CAAA,CACvC;;AAEZ;;;;;AAMA,IAAa,YAAgC,cAC3C,cACC,U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../../../src/components/Action/lib/ariaLive.ts"],"sourcesContent":["import { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"../locales/*.locale.json\";\nimport { useEffect } from \"react\";\nimport type { ActionStateValue } from \"@/components/Action/models/ActionState\";\nimport { announce } from \"@react-aria/live-announcer\";\n\ninterface Options {\n isPendingText?: string;\n isSucceededText?: string;\n isFailedText?: string;\n}\n\nexport const useAriaAnnounceActionState = (\n actionState: ActionStateValue,\n options: Options = {},\n): void => {\n const formatter = useLocalizedStringFormatter(locales, \"AriaAnnounce\");\n\n const {\n isPendingText = formatter.format(\"action.isPending\"),\n isSucceededText = formatter.format(\"action.isSucceeded\"),\n isFailedText = formatter.format(\"action.isFailed\"),\n } = options;\n\n useEffect(() => {\n if (actionState === \"isPending\") {\n announce(isPendingText, \"polite\");\n } else if (actionState === \"isSucceeded\") {\n announce(isSucceededText, \"polite\");\n } else if (actionState === \"isFailed\") {\n announce(isFailedText, \"polite\");\n }\n }, [actionState]);\n};\n\nexport const useAriaAnnounceSuspense = () => {\n const formatter = useLocalizedStringFormatter(locales, \"AriaAnnounce\");\n\n useEffect(() => {\n const timeout = setTimeout(() => {\n const isPendingText = formatter.format(\"suspense.isPending\");\n announce(isPendingText, \"polite\");\n }, 750);\n\n return () => {\n clearTimeout(timeout);\n };\n }, []);\n};\n"],"mappings":";;;;;;;AAYA,IAAa,8BACX,aACA,UAAmB,CAAC,MACX;CACT,MAAM,YAAY,4BAA4B,kBAAS,cAAc;CAErE,MAAM,EACJ,gBAAgB,UAAU,OAAO,kBAAkB,GACnD,kBAAkB,UAAU,OAAO,oBAAoB,GACvD,eAAe,UAAU,OAAO,iBAAiB,MAC/C;CAEJ,gBAAgB;EACd,IAAI,gBAAgB,aAClB,SAAS,eAAe,QAAQ;OAC3B,IAAI,gBAAgB,eACzB,SAAS,iBAAiB,QAAQ;OAC7B,IAAI,gBAAgB,YACzB,SAAS,cAAc,QAAQ;CAEnC,GAAG,CAAC,WAAW,CAAC;AAClB;AAEA,IAAa,gCAAgC;CAC3C,MAAM,YAAY,4BAA4B,kBAAS,cAAc;CAErE,gBAAgB;EACd,MAAM,UAAU,iBAAiB;GAC/B,MAAM,gBAAgB,UAAU,OAAO,oBAAoB;GAC3D,SAAS,eAAe,QAAQ;EAClC,GAAG,GAAG;EAEN,aAAa;GACX,aAAa,OAAO;EACtB;CACF,GAAG,CAAC,CAAC;AACP"}
1
+ {"version":3,"file":"ariaLive.mjs","names":["locales"],"sources":["../../../../../../../../src/components/Action/lib/ariaLive.ts"],"sourcesContent":["import { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"../locales/*.locale.json\";\nimport { useEffect } from \"react\";\nimport type { ActionStateValue } from \"@/components/Action/models/ActionState\";\nimport { announce } from \"@react-aria/live-announcer\";\n\ninterface Options {\n isPendingText?: string;\n isSucceededText?: string;\n isFailedText?: string;\n}\n\nexport const useAriaAnnounceActionState = (\n actionState: ActionStateValue,\n options: Options = {},\n): void => {\n const formatter = useLocalizedStringFormatter(locales, \"AriaAnnounce\");\n\n const {\n isPendingText = formatter.format(\"action.isPending\"),\n isSucceededText = formatter.format(\"action.isSucceeded\"),\n isFailedText = formatter.format(\"action.isFailed\"),\n } = options;\n\n useEffect(() => {\n if (actionState === \"isPending\") {\n announce(isPendingText, \"polite\");\n } else if (actionState === \"isSucceeded\") {\n announce(isSucceededText, \"polite\");\n } else if (actionState === \"isFailed\") {\n announce(isFailedText, \"polite\");\n }\n }, [actionState]);\n};\n\nexport const useAriaAnnounceSuspense = () => {\n const formatter = useLocalizedStringFormatter(locales, \"AriaAnnounce\");\n\n useEffect(() => {\n const timeout = setTimeout(() => {\n const isPendingText = formatter.format(\"suspense.isPending\");\n announce(isPendingText, \"polite\");\n }, 750);\n\n return () => {\n clearTimeout(timeout);\n };\n }, []);\n};\n"],"mappings":";;;;;;;AAYA,IAAa,8BACX,aACA,UAAmB,CAAC,MACX;CACT,MAAM,YAAY,4BAA4BA,kBAAS,cAAc;CAErE,MAAM,EACJ,gBAAgB,UAAU,OAAO,kBAAkB,GACnD,kBAAkB,UAAU,OAAO,oBAAoB,GACvD,eAAe,UAAU,OAAO,iBAAiB,MAC/C;CAEJ,gBAAgB;EACd,IAAI,gBAAgB,aAClB,SAAS,eAAe,QAAQ;OAC3B,IAAI,gBAAgB,eACzB,SAAS,iBAAiB,QAAQ;OAC7B,IAAI,gBAAgB,YACzB,SAAS,cAAc,QAAQ;CAEnC,GAAG,CAAC,WAAW,CAAC;AAClB;AAEA,IAAa,gCAAgC;CAC3C,MAAM,YAAY,4BAA4BA,kBAAS,cAAc;CAErE,gBAAgB;EACd,MAAM,UAAU,iBAAiB;GAC/B,MAAM,gBAAgB,UAAU,OAAO,oBAAoB;GAC3D,SAAS,eAAe,QAAQ;EAClC,GAAG,GAAG;EAEN,aAAa;GACX,aAAa,OAAO;EACtB;CACF,GAAG,CAAC,CAAC;AACP"}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionState.mjs","names":[],"sources":["../../../../../../../../src/components/Action/models/ActionState.ts"],"sourcesContent":["import {\n action as mobxAction,\n computed,\n makeObservable,\n observable,\n} from \"mobx\";\nimport useSelector from \"@/lib/mobx/useSelector\";\nimport { sleep } from \"@/lib/promises/sleep\";\nimport { useStatic } from \"@/lib/hooks/useStatic\";\n\nexport type ActionStateValue =\n \"isIdle\" | \"isSucceeded\" | \"isPending\" | \"isExecuting\" | \"isFailed\";\n\nexport const duration = {\n pending: 1000,\n succeeded: 800,\n failed: 2000,\n};\n\nexport class ActionState {\n private showFeedback?: boolean;\n public state: ActionStateValue = \"isIdle\";\n private setPendingTimeout: number | undefined;\n public error: unknown;\n private isAsync = false;\n\n public constructor() {\n makeObservable(this, {\n state: observable,\n updateState: mobxAction,\n isBusy: computed,\n });\n }\n\n public static useNew(): ActionState {\n return useStatic(() => new ActionState());\n }\n\n public updateState(newState: ActionStateValue): void {\n this.state = newState;\n }\n\n public useValue(): ActionStateValue {\n return useSelector(() => this.state, [this]);\n }\n\n public useIsBusy(): boolean {\n return useSelector(() => this.isBusy, [this]);\n }\n\n public get isBusy(): boolean {\n return this.state !== \"isIdle\";\n }\n\n public onAsyncStart(): void {\n this.clearPendingTimeout();\n this.isAsync = true;\n this.updateState(\"isExecuting\");\n this.setPendingTimeout = window.setTimeout(\n () => this.startPending(),\n duration.pending,\n );\n }\n\n public async onSucceeded(): Promise<void> {\n await this.onDone();\n }\n\n public async onFailed(error?: unknown): Promise<void> {\n this.error = error ?? new Error(\"Unknown error\");\n await this.onDone();\n }\n\n public withFeedback(feedback?: boolean): ActionState {\n this.showFeedback = feedback;\n return this;\n }\n\n private async startFailedFeedback(): Promise<void> {\n this.updateState(\"isFailed\");\n await sleep(duration.failed);\n this.resetAfterDone();\n }\n\n private async startSucceededFeedback(): Promise<void> {\n this.updateState(\"isSucceeded\");\n await sleep(duration.succeeded);\n this.resetAfterDone();\n }\n\n private resetAfterDone(): void {\n this.updateState(\"isIdle\");\n this.isAsync = false;\n this.error = undefined;\n }\n\n private clearPendingTimeout(): void {\n if (this.setPendingTimeout) {\n window.clearTimeout(this.setPendingTimeout);\n }\n }\n\n private onDone(): Promise<void> | void {\n this.clearPendingTimeout();\n if (this.error) {\n return this.startFailedFeedback();\n } else if (\n this.showFeedback !== false &&\n (this.showFeedback || this.isAsync)\n ) {\n return this.startSucceededFeedback();\n } else {\n this.resetAfterDone();\n }\n }\n\n private startPending(): void {\n this.updateState(\"isPending\");\n }\n}\n"],"mappings":";;;;;;;AAaA,IAAa,WAAW;CACtB,SAAS;CACT,WAAW;CACX,QAAQ;AACV;AAEA,IAAa,cAAb,MAAa,YAAY;CACvB;CACA,QAAiC;CACjC;CACA;CACA,UAAkB;CAElB,cAAqB;EACnB,eAAe,MAAM;GACnB,OAAO;GACP,aAAa;GACb,QAAQ;EACV,CAAC;CACH;CAEA,OAAc,SAAsB;EAClC,OAAO,gBAAgB,IAAI,YAAY,CAAC;CAC1C;CAEA,YAAmB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/components/Action/models/ActionState.ts"],"sourcesContent":["import {\n action as mobxAction,\n computed,\n makeObservable,\n observable,\n} from \"mobx\";\nimport useSelector from \"@/lib/mobx/useSelector\";\nimport { sleep } from \"@/lib/promises/sleep\";\nimport { useStatic } from \"@/lib/hooks/useStatic\";\n\nexport type ActionStateValue =\n \"isIdle\" | \"isSucceeded\" | \"isPending\" | \"isExecuting\" | \"isFailed\";\n\nexport const duration = {\n pending: 1000,\n succeeded: 800,\n failed: 2000,\n};\n\nexport class ActionState {\n private showFeedback?: boolean;\n public state: ActionStateValue = \"isIdle\";\n private setPendingTimeout: number | undefined;\n public error: unknown;\n private isAsync = false;\n\n public constructor() {\n makeObservable(this, {\n state: observable,\n updateState: mobxAction,\n isBusy: computed,\n });\n }\n\n public static useNew(): ActionState {\n return useStatic(() => new ActionState());\n }\n\n public updateState(newState: ActionStateValue): void {\n this.state = newState;\n }\n\n public useValue(): ActionStateValue {\n return useSelector(() => this.state, [this]);\n }\n\n public useIsBusy(): boolean {\n return useSelector(() => this.isBusy, [this]);\n }\n\n public get isBusy(): boolean {\n return this.state !== \"isIdle\";\n }\n\n public onAsyncStart(): void {\n this.clearPendingTimeout();\n this.isAsync = true;\n this.updateState(\"isExecuting\");\n this.setPendingTimeout = window.setTimeout(\n () => this.startPending(),\n duration.pending,\n );\n }\n\n public async onSucceeded(): Promise<void> {\n await this.onDone();\n }\n\n public async onFailed(error?: unknown): Promise<void> {\n this.error = error ?? new Error(\"Unknown error\");\n await this.onDone();\n }\n\n public withFeedback(feedback?: boolean): ActionState {\n this.showFeedback = feedback;\n return this;\n }\n\n private async startFailedFeedback(): Promise<void> {\n this.updateState(\"isFailed\");\n await sleep(duration.failed);\n this.resetAfterDone();\n }\n\n private async startSucceededFeedback(): Promise<void> {\n this.updateState(\"isSucceeded\");\n await sleep(duration.succeeded);\n this.resetAfterDone();\n }\n\n private resetAfterDone(): void {\n this.updateState(\"isIdle\");\n this.isAsync = false;\n this.error = undefined;\n }\n\n private clearPendingTimeout(): void {\n if (this.setPendingTimeout) {\n window.clearTimeout(this.setPendingTimeout);\n }\n }\n\n private onDone(): Promise<void> | void {\n this.clearPendingTimeout();\n if (this.error) {\n return this.startFailedFeedback();\n } else if (\n this.showFeedback !== false &&\n (this.showFeedback || this.isAsync)\n ) {\n return this.startSucceededFeedback();\n } else {\n this.resetAfterDone();\n }\n }\n\n private startPending(): void {\n this.updateState(\"isPending\");\n }\n}\n"],"mappings":";;;;;;;AAaA,IAAa,WAAW;CACtB,SAAS;CACT,WAAW;CACX,QAAQ;AACV;AAEA,IAAa,cAAb,MAAa,YAAY;CACvB;CACA,QAAiC;CACjC;CACA;CACA,UAAkB;CAElB,cAAqB;EACnB,eAAe,MAAM;GACnB,OAAO;GACP,aAAaA;GACb,QAAQ;EACV,CAAC;CACH;CAEA,OAAc,SAAsB;EAClC,OAAO,gBAAgB,IAAI,YAAY,CAAC;CAC1C;CAEA,YAAmB,UAAkC;EACnD,KAAK,QAAQ;CACf;CAEA,WAAoC;EAClC,OAAO,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC;CAC7C;CAEA,YAA4B;EAC1B,OAAO,kBAAkB,KAAK,QAAQ,CAAC,IAAI,CAAC;CAC9C;CAEA,IAAW,SAAkB;EAC3B,OAAO,KAAK,UAAU;CACxB;CAEA,eAA4B;EAC1B,KAAK,oBAAoB;EACzB,KAAK,UAAU;EACf,KAAK,YAAY,aAAa;EAC9B,KAAK,oBAAoB,OAAO,iBACxB,KAAK,aAAa,GACxB,SAAS,OACX;CACF;CAEA,MAAa,cAA6B;EACxC,MAAM,KAAK,OAAO;CACpB;CAEA,MAAa,SAAS,OAAgC;EACpD,KAAK,QAAQ,yBAAS,IAAI,MAAM,eAAe;EAC/C,MAAM,KAAK,OAAO;CACpB;CAEA,aAAoB,UAAiC;EACnD,KAAK,eAAe;EACpB,OAAO;CACT;CAEA,MAAc,sBAAqC;EACjD,KAAK,YAAY,UAAU;EAC3B,MAAM,MAAM,SAAS,MAAM;EAC3B,KAAK,eAAe;CACtB;CAEA,MAAc,yBAAwC;EACpD,KAAK,YAAY,aAAa;EAC9B,MAAM,MAAM,SAAS,SAAS;EAC9B,KAAK,eAAe;CACtB;CAEA,iBAA+B;EAC7B,KAAK,YAAY,QAAQ;EACzB,KAAK,UAAU;EACf,KAAK,QAAQ,KAAA;CACf;CAEA,sBAAoC;EAClC,IAAI,KAAK,mBACP,OAAO,aAAa,KAAK,iBAAiB;CAE9C;CAEA,SAAuC;EACrC,KAAK,oBAAoB;EACzB,IAAI,KAAK,OACP,OAAO,KAAK,oBAAoB;OAC3B,IACL,KAAK,iBAAiB,UACrB,KAAK,gBAAgB,KAAK,UAE3B,OAAO,KAAK,uBAAuB;OAEnC,KAAK,eAAe;CAExB;CAEA,eAA6B;EAC3B,KAAK,YAAY,WAAW;CAC9B;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionGroup.mjs","names":[],"sources":["../../../../../../../src/components/ActionGroup/ActionGroup.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./ActionGroup.module.scss\";\nimport { styleClassname } from \"@/lib/scss/selectors\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { ActionStateContextProvider } from \"@/components/Action/models/ActionStateContext\";\nimport { getActionGroupSlot } from \"@/components/ActionGroup/lib/getActionGroupSlot\";\nimport type { ButtonProps } from \"@/components/Button\";\n\nexport interface ActionGroupProps\n extends\n PropsWithChildren,\n FlowComponentProps<HTMLDivElement>,\n PropsWithClassName {\n /** The spacing between the buttons inside the action group. @default \"s\" */\n spacing?: \"s\" | \"m\";\n /** The size of the buttons and links inside the action group. @default \"m\" */\n size?: ButtonProps[\"size\"];\n /**\n * When set, the buttons are not sorted into the slots `primary`, `secondary`\n * and `abort` but stay in source order. Use it when the actions have no such\n * hierarchy, e.g. a row of equal actions or icon buttons. @default false\n */\n preserveOrder?: boolean;\n}\n\n/** @flr-generate all */\nexport const ActionGroup = flowComponent(\n \"ActionGroup\",\n (props) => {\n const {\n children,\n className,\n ref,\n spacing = \"s\",\n size,\n preserveOrder = false,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.actionGroup,\n styles[spacing],\n !preserveOrder && styles.sorted,\n className,\n );\n\n const propsContext: PropsContext = preserveOrder\n ? {\n Button: { size },\n Switch: {\n labelPosition: \"leading\",\n },\n Link: { size },\n }\n : {\n Button: {\n size,\n slot: dynamic((props) => getActionGroupSlot(props)),\n className: dynamic((props) => {\n const slot = getActionGroupSlot(props);\n return clsx(props.className, styleClassname(styles, slot));\n }),\n },\n Switch: {\n labelPosition: \"leading\",\n className: dynamic((props) => {\n return clsx(\n props.className,\n props.slot && styleClassname(styles, props.slot),\n );\n }),\n },\n Link: {\n size,\n className: dynamic((props) => {\n return clsx(\n props.className,\n props.slot && styleClassname(styles, props.slot),\n );\n }),\n },\n };\n\n return (\n <ActionStateContextProvider>\n <PropsContextProvider\n props={propsContext}\n dependencies={[preserveOrder, size]}\n >\n <div {...rest} className={rootClassName} ref={ref} role=\"group\">\n {children}\n </div>\n </PropsContextProvider>\n </ActionStateContextProvider>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default ActionGroup;\n"],"mappings":";;;;;;;;;;;;;AA+BA,IAAa,cAAc,cACzB,gBACC,UAAU;CACT,MAAM,EACJ,UACA,WACA,KACA,UAAU,KACV,MACA,gBAAgB,OAChB,GAAG,SACD;CAEJ,MAAM,gBAAgB,KACpB,2BAAO,aACP,2BAAO,UACP,CAAC,iBAAiB,2BAAO,QACzB,SACF;CAEA,MAAM,eAA6B,gBAC/B;EACE,QAAQ,EAAE,KAAK;EACf,QAAQ,EACN,eAAe,UACjB;EACA,MAAM,EAAE,KAAK;CACf,IACA;EACE,QAAQ;GACN;GACA,MAAM,SAAS,UAAU,mBAAmB,KAAK,CAAC;GAClD,WAAW,SAAS,UAAU;IAC5B,MAAM,OAAO,mBAAmB,KAAK;IACrC,OAAO,KAAK,MAAM,WAAW,eAAe,4BAAQ,IAAI,CAAC;GAC3D,CAAC;EACH;EACA,QAAQ;GACN,eAAe;GACf,WAAW,SAAS,UAAU;IAC5B,OAAO,KACL,MAAM,WACN,MAAM,QAAQ,eAAe,4BAAQ,MAAM,IAAI,CACjD;GACF,CAAC;EACH;EACA,MAAM;GACJ;GACA,WAAW,SAAS,UAAU;IAC5B,OAAO,KACL,MAAM,WACN,MAAM,QAAQ,eAAe,4BAAQ,MAAM,IAAI,CACjD;GACF,CAAC;EACH;CACF;CAEJ,OACE,oBAAC,4BAAD,EAAA,UACE,oBAAC,sBAAD;EACE,OAAO;EACP,cAAc,CAAC,eAAe,IAAI;EAElC,UAAA,oBAAC,OAAD;GAAK,GAAI;GAAM,WAAW;GAAoB;GAAK,MAAK;GACrD;EACE,CAAA;CACe,CAAA,EACI,CAAA;AAEhC,GACA,EACE,MAAM,SACR,CACF"}
1
+ {"version":3,"file":"ActionGroup.mjs","names":["styles"],"sources":["../../../../../../../src/components/ActionGroup/ActionGroup.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./ActionGroup.module.scss\";\nimport { styleClassname } from \"@/lib/scss/selectors\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { ActionStateContextProvider } from \"@/components/Action/models/ActionStateContext\";\nimport { getActionGroupSlot } from \"@/components/ActionGroup/lib/getActionGroupSlot\";\nimport type { ButtonProps } from \"@/components/Button\";\n\nexport interface ActionGroupProps\n extends\n PropsWithChildren,\n FlowComponentProps<HTMLDivElement>,\n PropsWithClassName {\n /** The spacing between the buttons inside the action group. @default \"s\" */\n spacing?: \"s\" | \"m\";\n /** The size of the buttons and links inside the action group. @default \"m\" */\n size?: ButtonProps[\"size\"];\n /**\n * When set, the buttons are not sorted into the slots `primary`, `secondary`\n * and `abort` but stay in source order. Use it when the actions have no such\n * hierarchy, e.g. a row of equal actions or icon buttons. @default false\n */\n preserveOrder?: boolean;\n}\n\n/** @flr-generate all */\nexport const ActionGroup = flowComponent(\n \"ActionGroup\",\n (props) => {\n const {\n children,\n className,\n ref,\n spacing = \"s\",\n size,\n preserveOrder = false,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.actionGroup,\n styles[spacing],\n !preserveOrder && styles.sorted,\n className,\n );\n\n const propsContext: PropsContext = preserveOrder\n ? {\n Button: { size },\n Switch: {\n labelPosition: \"leading\",\n },\n Link: { size },\n }\n : {\n Button: {\n size,\n slot: dynamic((props) => getActionGroupSlot(props)),\n className: dynamic((props) => {\n const slot = getActionGroupSlot(props);\n return clsx(props.className, styleClassname(styles, slot));\n }),\n },\n Switch: {\n labelPosition: \"leading\",\n className: dynamic((props) => {\n return clsx(\n props.className,\n props.slot && styleClassname(styles, props.slot),\n );\n }),\n },\n Link: {\n size,\n className: dynamic((props) => {\n return clsx(\n props.className,\n props.slot && styleClassname(styles, props.slot),\n );\n }),\n },\n };\n\n return (\n <ActionStateContextProvider>\n <PropsContextProvider\n props={propsContext}\n dependencies={[preserveOrder, size]}\n >\n <div {...rest} className={rootClassName} ref={ref} role=\"group\">\n {children}\n </div>\n </PropsContextProvider>\n </ActionStateContextProvider>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default ActionGroup;\n"],"mappings":";;;;;;;;;;;;;AA+BA,IAAa,cAAc,cACzB,gBACC,UAAU;CACT,MAAM,EACJ,UACA,WACA,KACA,UAAU,KACV,MACA,gBAAgB,OAChB,GAAG,SACD;CAEJ,MAAM,gBAAgB,KACpBA,2BAAO,aACPA,2BAAO,UACP,CAAC,iBAAiBA,2BAAO,QACzB,SACF;CAEA,MAAM,eAA6B,gBAC/B;EACE,QAAQ,EAAE,KAAK;EACf,QAAQ,EACN,eAAe,UACjB;EACA,MAAM,EAAE,KAAK;CACf,IACA;EACE,QAAQ;GACN;GACA,MAAM,SAAS,UAAU,mBAAmB,KAAK,CAAC;GAClD,WAAW,SAAS,UAAU;IAC5B,MAAM,OAAO,mBAAmB,KAAK;IACrC,OAAO,KAAK,MAAM,WAAW,eAAeA,4BAAQ,IAAI,CAAC;GAC3D,CAAC;EACH;EACA,QAAQ;GACN,eAAe;GACf,WAAW,SAAS,UAAU;IAC5B,OAAO,KACL,MAAM,WACN,MAAM,QAAQ,eAAeA,4BAAQ,MAAM,IAAI,CACjD;GACF,CAAC;EACH;EACA,MAAM;GACJ;GACA,WAAW,SAAS,UAAU;IAC5B,OAAO,KACL,MAAM,WACN,MAAM,QAAQ,eAAeA,4BAAQ,MAAM,IAAI,CACjD;GACF,CAAC;EACH;CACF;CAEJ,OACE,oBAAC,4BAAD,EAAA,UACE,oBAAC,sBAAD;EACE,OAAO;EACP,cAAc,CAAC,eAAe,IAAI;EAElC,UAAA,oBAAC,OAAD;GAAK,GAAI;GAAM,WAAW;GAAoB;GAAK,MAAK;GACrD;EACE,CAAA;CACe,CAAA,EACI,CAAA;AAEhC,GACA,EACE,MAAM,SACR,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.mjs","names":[],"sources":["../../../../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import { AlertIcon } from \"@/components/AlertIcon\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithStatus } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport type { ComponentProps, PropsWithChildren } from \"react\";\nimport styles from \"./Alert.module.scss\";\n\nexport interface AlertProps\n extends\n PropsWithChildren<ComponentProps<\"aside\">>,\n PropsWithStatus,\n FlowComponentProps<HTMLElement> {}\n\n/** @flr-generate all */\nexport const Alert = flowComponent(\"Alert\", (props) => {\n const { children, className, status = \"info\", ref, ...rest } = props;\n\n const rootClassName = clsx(styles.alert, styles[status], className);\n\n const propsContext: PropsContext = {\n Heading: {\n className: styles.heading,\n level: 3,\n size: \"s\",\n children: dynamic((props) => (\n <>\n <AlertIcon status={status} className={styles.icon} />\n {props.children}\n </>\n )),\n },\n Content: {\n className: styles.content,\n Button: {\n size: \"s\",\n },\n ActionGroup: {\n preserveOrder: true,\n size: \"s\",\n },\n },\n };\n\n return (\n <aside {...rest} className={rootClassName} ref={ref}>\n <PropsContextProvider props={propsContext} dependencies={[status]}>\n {children}\n </PropsContextProvider>\n </aside>\n );\n});\n\nexport default Alert;\n"],"mappings":";;;;;;;;;;;AAiBA,IAAa,QAAQ,cAAc,UAAU,UAAU;CACrD,MAAM,EAAE,UAAU,WAAW,SAAS,QAAQ,KAAK,GAAG,SAAS;CAE/D,MAAM,gBAAgB,KAAK,qBAAO,OAAO,qBAAO,SAAS,SAAS;CAElE,MAAM,eAA6B;EACjC,SAAS;GACP,WAAW,qBAAO;GAClB,OAAO;GACP,MAAM;GACN,UAAU,SAAS,UACjB,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,WAAD;IAAmB;IAAQ,WAAW,qBAAO;GAAO,CAAA,GACnD,MAAM,QACP,EAAA,CAAA,CACH;EACH;EACA,SAAS;GACP,WAAW,qBAAO;GAClB,QAAQ,EACN,MAAM,IACR;GACA,aAAa;IACX,eAAe;IACf,MAAM;GACR;EACF;CACF;CAEA,OACE,oBAAC,SAAD;EAAO,GAAI;EAAM,WAAW;EAAoB;EAC9C,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAAc,cAAc,CAAC,MAAM;GAC7D;EACmB,CAAA;CACjB,CAAA;AAEX,CAAC"}
1
+ {"version":3,"file":"Alert.mjs","names":["styles","_Fragment"],"sources":["../../../../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import { AlertIcon } from \"@/components/AlertIcon\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithStatus } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport type { ComponentProps, PropsWithChildren } from \"react\";\nimport styles from \"./Alert.module.scss\";\n\nexport interface AlertProps\n extends\n PropsWithChildren<ComponentProps<\"aside\">>,\n PropsWithStatus,\n FlowComponentProps<HTMLElement> {}\n\n/** @flr-generate all */\nexport const Alert = flowComponent(\"Alert\", (props) => {\n const { children, className, status = \"info\", ref, ...rest } = props;\n\n const rootClassName = clsx(styles.alert, styles[status], className);\n\n const propsContext: PropsContext = {\n Heading: {\n className: styles.heading,\n level: 3,\n size: \"s\",\n children: dynamic((props) => (\n <>\n <AlertIcon status={status} className={styles.icon} />\n {props.children}\n </>\n )),\n },\n Content: {\n className: styles.content,\n Button: {\n size: \"s\",\n },\n ActionGroup: {\n preserveOrder: true,\n size: \"s\",\n },\n },\n };\n\n return (\n <aside {...rest} className={rootClassName} ref={ref}>\n <PropsContextProvider props={propsContext} dependencies={[status]}>\n {children}\n </PropsContextProvider>\n </aside>\n );\n});\n\nexport default Alert;\n"],"mappings":";;;;;;;;;;;AAiBA,IAAa,QAAQ,cAAc,UAAU,UAAU;CACrD,MAAM,EAAE,UAAU,WAAW,SAAS,QAAQ,KAAK,GAAG,SAAS;CAE/D,MAAM,gBAAgB,KAAKA,qBAAO,OAAOA,qBAAO,SAAS,SAAS;CAElE,MAAM,eAA6B;EACjC,SAAS;GACP,WAAWA,qBAAO;GAClB,OAAO;GACP,MAAM;GACN,UAAU,SAAS,UACjB,qBAAAC,UAAA,EAAA,UAAA,CACE,oBAAC,WAAD;IAAmB;IAAQ,WAAWD,qBAAO;GAAO,CAAA,GACnD,MAAM,QACP,EAAA,CAAA,CACH;EACH;EACA,SAAS;GACP,WAAWA,qBAAO;GAClB,QAAQ,EACN,MAAM,IACR;GACA,aAAa;IACX,eAAe;IACf,MAAM;GACR;EACF;CACF;CAEA,OACE,oBAAC,SAAD;EAAO,GAAI;EAAM,WAAW;EAAoB;EAC9C,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAAc,cAAc,CAAC,MAAM;GAC7D;EACmB,CAAA;CACjB,CAAA;AAEX,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AlertBadge.mjs","names":[],"sources":["../../../../../../../src/components/AlertBadge/AlertBadge.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./AlertBadge.module.scss\";\nimport clsx from \"clsx\";\nimport { AlertIcon } from \"@/components/AlertIcon\";\nimport { Text } from \"@/components/Text\";\nimport type { PropsWithStatus, PropsWithClassName } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface AlertBadgeProps\n extends\n PropsWithChildren,\n PropsWithStatus,\n FlowComponentProps,\n PropsWithClassName {}\n\n/** @flr-generate all */\nexport const AlertBadge = flowComponent(\"AlertBadge\", (props) => {\n const { children, className, status = \"info\", ref, ...rest } = props;\n\n const rootClassName = clsx(styles.alertBadge, styles[status], className);\n\n return (\n <div className={rootClassName} {...rest} ref={ref}>\n <AlertIcon size=\"s\" status={status} />\n <Text className={styles.text}>{children}</Text>\n </div>\n );\n});\n\nexport default AlertBadge;\n"],"mappings":";;;;;;;;;;AAiBA,IAAa,aAAa,cAAc,eAAe,UAAU;CAC/D,MAAM,EAAE,UAAU,WAAW,SAAS,QAAQ,KAAK,GAAG,SAAS;CAE/D,MAAM,gBAAgB,KAAK,0BAAO,YAAY,0BAAO,SAAS,SAAS;CAEvE,OACE,qBAAC,OAAD;EAAK,WAAW;EAAe,GAAI;EAAW;EAA9C,UAAA,CACE,oBAAC,WAAD;GAAW,MAAK;GAAY;EAAS,CAAA,GACrC,oBAAC,MAAD;GAAM,WAAW,0BAAO;GAAO;EAAe,CAAA,CAC3C;;AAET,CAAC"}
1
+ {"version":3,"file":"AlertBadge.mjs","names":["styles"],"sources":["../../../../../../../src/components/AlertBadge/AlertBadge.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./AlertBadge.module.scss\";\nimport clsx from \"clsx\";\nimport { AlertIcon } from \"@/components/AlertIcon\";\nimport { Text } from \"@/components/Text\";\nimport type { PropsWithStatus, PropsWithClassName } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface AlertBadgeProps\n extends\n PropsWithChildren,\n PropsWithStatus,\n FlowComponentProps,\n PropsWithClassName {}\n\n/** @flr-generate all */\nexport const AlertBadge = flowComponent(\"AlertBadge\", (props) => {\n const { children, className, status = \"info\", ref, ...rest } = props;\n\n const rootClassName = clsx(styles.alertBadge, styles[status], className);\n\n return (\n <div className={rootClassName} {...rest} ref={ref}>\n <AlertIcon size=\"s\" status={status} />\n <Text className={styles.text}>{children}</Text>\n </div>\n );\n});\n\nexport default AlertBadge;\n"],"mappings":";;;;;;;;;;AAiBA,IAAa,aAAa,cAAc,eAAe,UAAU;CAC/D,MAAM,EAAE,UAAU,WAAW,SAAS,QAAQ,KAAK,GAAG,SAAS;CAE/D,MAAM,gBAAgB,KAAKA,0BAAO,YAAYA,0BAAO,SAAS,SAAS;CAEvE,OACE,qBAAC,OAAD;EAAK,WAAW;EAAe,GAAI;EAAW;EAA9C,UAAA,CACE,oBAAC,WAAD;GAAW,MAAK;GAAY;EAAS,CAAA,GACrC,oBAAC,MAAD;GAAM,WAAWA,0BAAO;GAAO;EAAe,CAAA,CAC3C;;AAET,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AlertIcon.mjs","names":[],"sources":["../../../../../../../src/components/AlertIcon/AlertIcon.tsx"],"sourcesContent":["import type { ComponentType, FC } from \"react\";\nimport {\n IconDanger,\n IconInfo,\n IconSuccess,\n IconUnavailable,\n IconWarning,\n} from \"@/components/Icon/components/icons\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport type { PropsWithStatus, Status } from \"@/lib/types/props\";\nimport type { IconProps } from \"@/components/Icon\";\n\nexport type AlertIconProps = Omit<IconProps, \"status\"> & PropsWithStatus;\n\nconst icons: Record<Status, ComponentType> = {\n danger: IconDanger,\n info: IconInfo,\n success: IconSuccess,\n warning: IconWarning,\n unavailable: IconUnavailable,\n};\n\n/** @flr-generate all */\nexport const AlertIcon: FC<AlertIconProps> = (props) => {\n const { status = \"info\", ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"AlertIcon\");\n\n const Icon = icons[status];\n\n const iconProps: IconProps = {\n color: status,\n \"aria-label\": stringFormatter.format(`status.${status}`),\n ...rest,\n };\n\n return <Icon {...iconProps} />;\n};\n\nexport default AlertIcon;\n"],"mappings":";;;;;;;;;;;AAeA,IAAM,QAAuC;CAC3C,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;CACT,aAAa;AACf;;AAGA,IAAa,aAAiC,UAAU;CACtD,MAAM,EAAE,SAAS,QAAQ,GAAG,SAAS;CAErC,MAAM,kBAAkB,4BAA4B,kBAAS,WAAW;CAExE,MAAM,OAAO,MAAM;CAEnB,MAAM,YAAuB;EAC3B,OAAO;EACP,cAAc,gBAAgB,OAAO,UAAU,QAAQ;EACvD,GAAG;CACL;CAEA,OAAO,oBAAC,MAAD,EAAM,GAAI,UAAY,CAAA;AAC/B"}
1
+ {"version":3,"file":"AlertIcon.mjs","names":["locales"],"sources":["../../../../../../../src/components/AlertIcon/AlertIcon.tsx"],"sourcesContent":["import type { ComponentType, FC } from \"react\";\nimport {\n IconDanger,\n IconInfo,\n IconSuccess,\n IconUnavailable,\n IconWarning,\n} from \"@/components/Icon/components/icons\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport type { PropsWithStatus, Status } from \"@/lib/types/props\";\nimport type { IconProps } from \"@/components/Icon\";\n\nexport type AlertIconProps = Omit<IconProps, \"status\"> & PropsWithStatus;\n\nconst icons: Record<Status, ComponentType> = {\n danger: IconDanger,\n info: IconInfo,\n success: IconSuccess,\n warning: IconWarning,\n unavailable: IconUnavailable,\n};\n\n/** @flr-generate all */\nexport const AlertIcon: FC<AlertIconProps> = (props) => {\n const { status = \"info\", ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"AlertIcon\");\n\n const Icon = icons[status];\n\n const iconProps: IconProps = {\n color: status,\n \"aria-label\": stringFormatter.format(`status.${status}`),\n ...rest,\n };\n\n return <Icon {...iconProps} />;\n};\n\nexport default AlertIcon;\n"],"mappings":";;;;;;;;;;;AAeA,IAAM,QAAuC;CAC3C,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;CACT,aAAa;AACf;;AAGA,IAAa,aAAiC,UAAU;CACtD,MAAM,EAAE,SAAS,QAAQ,GAAG,SAAS;CAErC,MAAM,kBAAkB,4BAA4BA,kBAAS,WAAW;CAExE,MAAM,OAAO,MAAM;CAEnB,MAAM,YAAuB;EAC3B,OAAO;EACP,cAAc,gBAAgB,OAAO,UAAU,QAAQ;EACvD,GAAG;CACL;CAEA,OAAO,oBAAC,MAAD,EAAM,GAAI,UAAY,CAAA;AAC/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"AlertText.mjs","names":[],"sources":["../../../../../../../src/components/AlertText/AlertText.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type { PropsWithClassName, PropsWithStatus } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./AlertText.module.scss\";\nimport { AlertIcon } from \"@/components/AlertIcon\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\n\nexport interface AlertTextProps\n extends\n PropsWithClassName,\n PropsWithChildren,\n FlowComponentProps,\n PropsWithStatus {}\n\n/** @flr-generate all */\nexport const AlertText = flowComponent(\"AlertText\", (props) => {\n const { className, children, status = \"info\" } = props;\n\n const rootClassName = clsx(styles.alertText, styles[status], className);\n\n return (\n <span className={rootClassName}>\n <PropsContextProvider props={{ Icon: { size: \"s\" } }}>\n <AlertIcon status={status} className={styles.icon} />\n </PropsContextProvider>\n\n <>{children}</>\n </span>\n );\n});\n\nexport default AlertText;\n"],"mappings":";;;;;;;;;;AAmBA,IAAa,YAAY,cAAc,cAAc,UAAU;CAC7D,MAAM,EAAE,WAAW,UAAU,SAAS,WAAW;CAEjD,MAAM,gBAAgB,KAAK,yBAAO,WAAW,yBAAO,SAAS,SAAS;CAEtE,OACE,qBAAC,QAAD;EAAM,WAAW;EAAjB,UAAA,CACE,oBAAC,sBAAD;GAAsB,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE;GACjD,UAAA,oBAAC,WAAD;IAAmB;IAAQ,WAAW,yBAAO;GAAO,CAAA;EAChC,CAAA,GAEtB,oBAAA,UAAA,EAAG,SAAW,CAAA,CACV;;AAEV,CAAC"}
1
+ {"version":3,"file":"AlertText.mjs","names":["styles","_Fragment"],"sources":["../../../../../../../src/components/AlertText/AlertText.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type { PropsWithClassName, PropsWithStatus } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./AlertText.module.scss\";\nimport { AlertIcon } from \"@/components/AlertIcon\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\n\nexport interface AlertTextProps\n extends\n PropsWithClassName,\n PropsWithChildren,\n FlowComponentProps,\n PropsWithStatus {}\n\n/** @flr-generate all */\nexport const AlertText = flowComponent(\"AlertText\", (props) => {\n const { className, children, status = \"info\" } = props;\n\n const rootClassName = clsx(styles.alertText, styles[status], className);\n\n return (\n <span className={rootClassName}>\n <PropsContextProvider props={{ Icon: { size: \"s\" } }}>\n <AlertIcon status={status} className={styles.icon} />\n </PropsContextProvider>\n\n <>{children}</>\n </span>\n );\n});\n\nexport default AlertText;\n"],"mappings":";;;;;;;;;;AAmBA,IAAa,YAAY,cAAc,cAAc,UAAU;CAC7D,MAAM,EAAE,WAAW,UAAU,SAAS,WAAW;CAEjD,MAAM,gBAAgB,KAAKA,yBAAO,WAAWA,yBAAO,SAAS,SAAS;CAEtE,OACE,qBAAC,QAAD;EAAM,WAAW;EAAjB,UAAA,CACE,oBAAC,sBAAD;GAAsB,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE;GACjD,UAAA,oBAAC,WAAD;IAAmB;IAAQ,WAAWA,yBAAO;GAAO,CAAA;EAChC,CAAA,GAEtB,oBAAAC,UAAA,EAAG,SAAW,CAAA,CACV;;AAEV,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Autocomplete.mjs","names":[],"sources":["../../../../../../../src/components/Autocomplete/Autocomplete.tsx"],"sourcesContent":["import { getOptionsTunnelProps } from \"@/components/Option/optionsTunnel\";\nimport { useRef, type PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport * as Aria from \"react-aria-components\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport Options from \"@/components/Options\";\nimport locales from \"./locales/*.locale.json\";\nimport Text from \"@/components/Text\";\nimport styles from \"./Autocomplete.module.scss\";\nimport {\n UNSAFE_PortalProvider,\n useFocusWithin,\n useLocalizedStringFormatter,\n useObjectRef,\n} from \"react-aria\";\nimport { joinIds, useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { isFocused } from \"@/lib/form/isFocused\";\nimport { emitElementValueChange } from \"@/lib/react/emitElementValueChange\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport clsx from \"clsx\";\n\nexport interface AutocompleteProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n FlowComponentProps<HTMLInputElement>,\n Omit<\n Aria.AutocompleteProps,\n \"children\" | \"onInputChange\" | \"inputValue\" | \"defaultInputValue\" | \"ref\"\n > {}\n\n/** @flr-generate all */\nexport const Autocomplete = flowComponent(\"Autocomplete\", (props) => {\n const { children, className, ref, ...rest } = props;\n\n const inputRef = useObjectRef(ref);\n\n const { contains } = Aria.useFilter({ sensitivity: \"base\" });\n const stringFormatter = useLocalizedStringFormatter(locales);\n const container = useRef(null);\n\n const optionsOverlayController = useOverlayController(\"Popover\", {\n reuseControllerFromContext: false,\n });\n\n const focusWithin = useFocusWithin({\n onBlurWithin: () => optionsOverlayController.close(),\n });\n\n const renderEmptyState = () => (\n <Text className={styles.empty}>\n {stringFormatter.format(\"autocomplete.empty\")}\n </Text>\n );\n\n const handleInputChange = (value: string) => {\n if (value === \"\") {\n optionsOverlayController.close();\n } else if (isFocused(inputRef.current)) {\n optionsOverlayController.open();\n }\n };\n\n const handleOptionAction = (key: Aria.Key) => {\n const value = String(key);\n if (inputRef.current) {\n emitElementValueChange(inputRef.current, value);\n }\n optionsOverlayController.close();\n };\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n wrapperProps,\n controlProps,\n } = useFieldComponent(props, \"Autocomplete\");\n\n const inputProps: SearchFieldProps & TextFieldProps = {\n onKeyDown: (e) => {\n if (e.key === \"Enter\" && optionsOverlayController.isOpen) {\n e.preventDefault();\n }\n },\n ref: inputRef,\n onChange: handleInputChange,\n };\n\n const errorDescribedBy = controlProps[\"aria-describedby\"];\n\n const rootClassName = clsx(\n styles.autocomplete,\n wrapperProps.className,\n className,\n );\n\n const propsContext: PropsContext = {\n // Merged, not replaced: a field's own `aria-describedby` must not unlink\n // the Autocomplete's error.\n SearchField: {\n ...inputProps,\n \"aria-describedby\": dynamic((p) =>\n joinIds(errorDescribedBy, p[\"aria-describedby\"]),\n ),\n },\n TextField: {\n ...inputProps,\n \"aria-describedby\": dynamic((p) =>\n joinIds(errorDescribedBy, p[\"aria-describedby\"]),\n ),\n },\n Option: {\n tunnel: getOptionsTunnelProps(\"Autocomplete\"),\n },\n Popover: {\n className: styles.popover,\n },\n ...fieldPropsContext,\n };\n\n return (\n <div className={rootClassName}>\n <FieldErrorCaptureContext>\n <PropsContextProvider\n props={propsContext}\n dependencies={[optionsOverlayController, errorDescribedBy]}\n >\n <div {...focusWithin.focusWithinProps} ref={container}>\n <UNSAFE_PortalProvider getContainer={() => container.current}>\n <Aria.Autocomplete\n filter={contains}\n disableAutoFocusFirst\n {...rest}\n >\n {children}\n <Options\n onAction={handleOptionAction}\n triggerRef={container}\n controller={optionsOverlayController}\n renderEmptyState={renderEmptyState}\n isNonModal\n placement=\"bottom start\"\n >\n <UiComponentTunnelExit\n id=\"options\"\n component=\"Autocomplete\"\n />\n </Options>\n </Aria.Autocomplete>\n </UNSAFE_PortalProvider>\n </div>\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </div>\n );\n});\n\nexport default Autocomplete;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2CA,IAAa,eAAe,cAAc,iBAAiB,UAAU;CACnE,MAAM,EAAE,UAAU,WAAW,KAAK,GAAG,SAAS;CAE9C,MAAM,WAAW,aAAa,GAAG;CAEjC,MAAM,EAAE,aAAa,KAAK,UAAU,EAAE,aAAa,OAAO,CAAC;CAC3D,MAAM,kBAAkB,4BAA4B,gBAAO;CAC3D,MAAM,Y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oBAAC,OAAD;IAAK,GAAI,YAAY;IAAkB,KAAK;IAC1C,UAAA,oBAAC,uBAAD;KAAuB,oBAAoB,UAAU;KACnD,UAAA,qBAAC,KAAK,cAAN;MACE,QAAQ;MACR,uBAAA;MACA,GAAI;MAHN,UAAA,CAKG,UACD,oBAAC,SAAD;OACE,UAAU;OACV,YAAY;OACZ,YAAY;OACM;OAClB,YAAA;OACA,WAAU;OAEV,UAAA,oBAAC,uBAAD;QACE,IAAG;QACH,WAAU;OACX,CAAA;MACM,CAAA,CACQ;;IACE,CAAA;GACpB,CAAA;EACe,CAAA,EACE,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACd;;AAET,CAAC"}
1
+ {"version":3,"file":"Autocomplete.mjs","names":["locales","styles"],"sources":["../../../../../../../src/components/Autocomplete/Autocomplete.tsx"],"sourcesContent":["import { getOptionsTunnelProps } from \"@/components/Option/optionsTunnel\";\nimport { useRef, type PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport * as Aria from \"react-aria-components\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport Options from \"@/components/Options\";\nimport locales from \"./locales/*.locale.json\";\nimport Text from \"@/components/Text\";\nimport styles from \"./Autocomplete.module.scss\";\nimport {\n UNSAFE_PortalProvider,\n useFocusWithin,\n useLocalizedStringFormatter,\n useObjectRef,\n} from \"react-aria\";\nimport { joinIds, useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { isFocused } from \"@/lib/form/isFocused\";\nimport { emitElementValueChange } from \"@/lib/react/emitElementValueChange\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport clsx from \"clsx\";\n\nexport interface AutocompleteProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n FlowComponentProps<HTMLInputElement>,\n Omit<\n Aria.AutocompleteProps,\n \"children\" | \"onInputChange\" | \"inputValue\" | \"defaultInputValue\" | \"ref\"\n > {}\n\n/** @flr-generate all */\nexport const Autocomplete = flowComponent(\"Autocomplete\", (props) => {\n const { children, className, ref, ...rest } = props;\n\n const inputRef = useObjectRef(ref);\n\n const { contains } = Aria.useFilter({ sensitivity: \"base\" });\n const stringFormatter = useLocalizedStringFormatter(locales);\n const container = useRef(null);\n\n const optionsOverlayController = useOverlayController(\"Popover\", {\n reuseControllerFromContext: false,\n });\n\n const focusWithin = useFocusWithin({\n onBlurWithin: () => optionsOverlayController.close(),\n });\n\n const renderEmptyState = () => (\n <Text className={styles.empty}>\n {stringFormatter.format(\"autocomplete.empty\")}\n </Text>\n );\n\n const handleInputChange = (value: string) => {\n if (value === \"\") {\n optionsOverlayController.close();\n } else if (isFocused(inputRef.current)) {\n optionsOverlayController.open();\n }\n };\n\n const handleOptionAction = (key: Aria.Key) => {\n const value = String(key);\n if (inputRef.current) {\n emitElementValueChange(inputRef.current, value);\n }\n optionsOverlayController.close();\n };\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n wrapperProps,\n controlProps,\n } = useFieldComponent(props, \"Autocomplete\");\n\n const inputProps: SearchFieldProps & TextFieldProps = {\n onKeyDown: (e) => {\n if (e.key === \"Enter\" && optionsOverlayController.isOpen) {\n e.preventDefault();\n }\n },\n ref: inputRef,\n onChange: handleInputChange,\n };\n\n const errorDescribedBy = controlProps[\"aria-describedby\"];\n\n const rootClassName = clsx(\n styles.autocomplete,\n wrapperProps.className,\n className,\n );\n\n const propsContext: PropsContext = {\n // Merged, not replaced: a field's own `aria-describedby` must not unlink\n // the Autocomplete's error.\n SearchField: {\n ...inputProps,\n \"aria-describedby\": dynamic((p) =>\n joinIds(errorDescribedBy, p[\"aria-describedby\"]),\n ),\n },\n TextField: {\n ...inputProps,\n \"aria-describedby\": dynamic((p) =>\n joinIds(errorDescribedBy, p[\"aria-describedby\"]),\n ),\n },\n Option: {\n tunnel: getOptionsTunnelProps(\"Autocomplete\"),\n },\n Popover: {\n className: styles.popover,\n },\n ...fieldPropsContext,\n };\n\n return (\n <div className={rootClassName}>\n <FieldErrorCaptureContext>\n <PropsContextProvider\n props={propsContext}\n dependencies={[optionsOverlayController, errorDescribedBy]}\n >\n <div {...focusWithin.focusWithinProps} ref={container}>\n <UNSAFE_PortalProvider getContainer={() => container.current}>\n <Aria.Autocomplete\n filter={contains}\n disableAutoFocusFirst\n {...rest}\n >\n {children}\n <Options\n onAction={handleOptionAction}\n triggerRef={container}\n controller={optionsOverlayController}\n renderEmptyState={renderEmptyState}\n isNonModal\n placement=\"bottom start\"\n >\n <UiComponentTunnelExit\n id=\"options\"\n component=\"Autocomplete\"\n />\n </Options>\n </Aria.Autocomplete>\n </UNSAFE_PortalProvider>\n </div>\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </div>\n );\n});\n\nexport default Autocomplete;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2CA,IAAa,eAAe,cAAc,iBAAiB,UAAU;CACnE,MAAM,EAAE,UAAU,WAAW,KAAK,GAAG,SAAS;CAE9C,MAAM,WAAW,aAAa,GAAG;CAEjC,MAAM,EAAE,aAAa,KAAK,UAAU,EAAE,aAAa,OAAO,CAAC;CAC3D,MAAM,kBAAkB,4BAA4BA,gBAAO;CAC3D,MAAM,YAAY,OAAO,IAAI;CAE7B,MAAM,2BAA2B,qBAAqB,WAAW,EAC/D,4BAA4B,MAC9B,CAAC;CAED,MAAM,cAAc,eAAe,EACjC,oBAAoB,yBAAyB,MAAM,EACrD,CAAC;CAED,MAAM,yBACJ,oBAAC,MAAD;EAAM,WAAWC,4BAAO;EACrB,UAAA,gBAAgB,OAAO,oBAAoB;CACxC,CAAA;CAGR,MAAM,qBAAqB,UAAkB;EAC3C,IAA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AAD;QACE,IAAG;QACH,WAAU;OACX,CAAA;MACM,CAAA,CACQ;;IACE,CAAA;GACpB,CAAA;EACe,CAAA,EACE,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACd;;AAET,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.mjs","names":[],"sources":["../../../../../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Avatar.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName, Status } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { AlertIcon } from \"@/components/AlertIcon\";\nimport type { avatarColors } from \"@/components/Avatar/avatarColors\";\n\nexport type AvatarColors = (typeof avatarColors)[number];\n\nexport interface AvatarProps\n extends PropsWithChildren, PropsWithClassName, FlowComponentProps {\n /** The size of the avatar. @default \"m\" */\n size?: \"xs\" | \"s\" | \"m\" | \"l\";\n /** The color of icons and initials inside the avatar. */\n color?: AvatarColors;\n /**\n * Adds status icon and color to the avatar. May only be used if the status is\n * explained by an element (like text or label) nearby.\n */\n status?: Status;\n /**\n * A descriptive label that assistive technology announces for the avatar\n * (e.g. the name of the represented person or entity). When set, the avatar\n * is exposed as a single image with this label. When omitted, the avatar is\n * treated as purely decorative and hidden from assistive technology.\n */\n label?: string;\n}\n\n/** @flr-generate all */\nexport const Avatar = flowComponent(\"Avatar\", (props) => {\n const { children, className, color, size = \"m\", status, label, ref } = props;\n\n const rootClassName = clsx(\n styles.avatar,\n styles[`size-${size}`],\n !status && styles[color ?? \"blue\"],\n status && styles[status],\n className,\n );\n\n const useDynamicColor = color === undefined && status === undefined;\n\n const propsContext: PropsContext = {\n Initials: {\n className: styles.initials,\n useDynamicColor,\n \"aria-hidden\": true,\n },\n Icon: {\n className: styles.icon,\n },\n Image: {\n \"aria-hidden\": true,\n },\n };\n\n const isMeaningful = label !== undefined;\n const isDecorative = !isMeaningful && !status;\n\n return (\n <div\n className={rootClassName}\n role={isMeaningful ? \"img\" : undefined}\n aria-label={label}\n aria-hidden={isDecorative || undefined}\n ref={ref}\n >\n <PropsContextProvider props={propsContext}>\n {!status && children}\n {status && <AlertIcon className={styles.icon} status={status} />}\n </PropsContextProvider>\n </div>\n );\n});\n\nexport default Avatar;\n"],"mappings":";;;;;;;;;;AAkCA,IAAa,SAAS,cAAc,WAAW,UAAU;CACvD,MAAM,EAAE,UAAU,WAAW,OAAO,OAAO,KAAK,QAAQ,OAAO,QAAQ;CAEvE,MAAM,gBAAgB,KACpB,sBAAO,QACP,sBAAO,QAAQ,SACf,CAAC,UAAU,sBAAO,SAAS,SAC3B,UAAU,sBAAO,SACjB,SACF;CAEA,MAAM,kBAAkB,UAAU,KAAA,KAAa,WAAW,KAAA;CAE1D,MAAM,eAA6B;EACjC,UAAU;GACR,WAAW,sBAAO;GAClB;GACA,eAAe;EACjB;EACA,MAAM,EACJ,WAAW,sBAAO,KACpB;EACA,OAAO,EACL,eAAe,KACjB;CACF;CAEA,MAAM,eAAe,UAAU,KAAA;CAG/B,OACE,oBAAC,OAAD;EACE,WAAW;EACX,MAAM,eAAe,QAAQ,KAAA;EAC7B,cAAY;EACZ,eAPiB,CAAC,gBAAgB,CAAC,UAON,KAAA;EACxB;EAEL,UAAA,qBAAC,sBAAD;GAAsB,OAAO;GAA7B,UAAA,CACG,CAAC,UAAU,UACX,UAAU,oBAAC,WAAD;IAAW,WAAW,sBAAO;IAAc;GAAS,CAAA,CAC3C;;CACnB,CAAA;AAET,CAAC"}
1
+ {"version":3,"file":"Avatar.mjs","names":["styles"],"sources":["../../../../../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Avatar.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName, Status } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { AlertIcon } from \"@/components/AlertIcon\";\nimport type { avatarColors } from \"@/components/Avatar/avatarColors\";\n\nexport type AvatarColors = (typeof avatarColors)[number];\n\nexport interface AvatarProps\n extends PropsWithChildren, PropsWithClassName, FlowComponentProps {\n /** The size of the avatar. @default \"m\" */\n size?: \"xs\" | \"s\" | \"m\" | \"l\";\n /** The color of icons and initials inside the avatar. */\n color?: AvatarColors;\n /**\n * Adds status icon and color to the avatar. May only be used if the status is\n * explained by an element (like text or label) nearby.\n */\n status?: Status;\n /**\n * A descriptive label that assistive technology announces for the avatar\n * (e.g. the name of the represented person or entity). When set, the avatar\n * is exposed as a single image with this label. When omitted, the avatar is\n * treated as purely decorative and hidden from assistive technology.\n */\n label?: string;\n}\n\n/** @flr-generate all */\nexport const Avatar = flowComponent(\"Avatar\", (props) => {\n const { children, className, color, size = \"m\", status, label, ref } = props;\n\n const rootClassName = clsx(\n styles.avatar,\n styles[`size-${size}`],\n !status && styles[color ?? \"blue\"],\n status && styles[status],\n className,\n );\n\n const useDynamicColor = color === undefined && status === undefined;\n\n const propsContext: PropsContext = {\n Initials: {\n className: styles.initials,\n useDynamicColor,\n \"aria-hidden\": true,\n },\n Icon: {\n className: styles.icon,\n },\n Image: {\n \"aria-hidden\": true,\n },\n };\n\n const isMeaningful = label !== undefined;\n const isDecorative = !isMeaningful && !status;\n\n return (\n <div\n className={rootClassName}\n role={isMeaningful ? \"img\" : undefined}\n aria-label={label}\n aria-hidden={isDecorative || undefined}\n ref={ref}\n >\n <PropsContextProvider props={propsContext}>\n {!status && children}\n {status && <AlertIcon className={styles.icon} status={status} />}\n </PropsContextProvider>\n </div>\n );\n});\n\nexport default Avatar;\n"],"mappings":";;;;;;;;;;AAkCA,IAAa,SAAS,cAAc,WAAW,UAAU;CACvD,MAAM,EAAE,UAAU,WAAW,OAAO,OAAO,KAAK,QAAQ,OAAO,QAAQ;CAEvE,MAAM,gBAAgB,KACpBA,sBAAO,QACPA,sBAAO,QAAQ,SACf,CAAC,UAAUA,sBAAO,SAAS,SAC3B,UAAUA,sBAAO,SACjB,SACF;CAEA,MAAM,kBAAkB,UAAU,KAAA,KAAa,WAAW,KAAA;CAE1D,MAAM,eAA6B;EACjC,UAAU;GACR,WAAWA,sBAAO;GAClB;GACA,eAAe;EACjB;EACA,MAAM,EACJ,WAAWA,sBAAO,KACpB;EACA,OAAO,EACL,eAAe,KACjB;CACF;CAEA,MAAM,eAAe,UAAU,KAAA;CAG/B,OACE,oBAAC,OAAD;EACE,WAAW;EACX,MAAM,eAAe,QAAQ,KAAA;EAC7B,cAAY;EACZ,eAPiB,CAAC,gBAAgB,CAAC,UAON,KAAA;EACxB;EAEL,UAAA,qBAAC,sBAAD;GAAsB,OAAO;GAA7B,UAAA,CACG,CAAC,UAAU,UACX,UAAU,oBAAC,WAAD;IAAW,WAAWA,sBAAO;IAAc;GAAS,CAAA,CAC3C;;CACnB,CAAA;AAET,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarStack.mjs","names":[],"sources":["../../../../../../../src/components/AvatarStack/AvatarStack.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { Children } from \"react\";\nimport clsx from \"clsx\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport styles from \"./AvatarStack.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { Avatar } from \"@/components/Avatar\";\nimport { Wrap } from \"@/components/Wrap\";\n\nexport interface AvatarStackProps\n extends PropsWithClassName, PropsWithChildren {\n /**\n * The total count of items, as avatars should only be displayed for the first\n * view\n */\n totalCount?: number;\n /** The onPress action of the additional items count element */\n onCountPress?: () => void;\n /** The size of the avatars inside the stack. @default \"m\" */\n size?: \"xs\" | \"s\" | \"m\" | \"l\";\n}\n\n/** @flr-generate all */\nexport const AvatarStack: FC<AvatarStackProps> = (props) => {\n const {\n className,\n children,\n totalCount = 0,\n size = \"m\",\n onCountPress,\n } = props;\n\n const avatarCount = Children.count(children);\n\n const additionalItemsCount = totalCount - avatarCount;\n\n const rootClassName = clsx(\n styles.avatarStack,\n styles[`size-${size}`],\n className,\n );\n\n const propsContext: PropsContext = {\n Avatar: { className: styles.avatar, size },\n Button: {\n className: styles.avatar,\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <div className={rootClassName}>\n {children}\n {additionalItemsCount > 0 && (\n <Wrap if={onCountPress}>\n <Button onPress={onCountPress}>\n <Avatar size={size}>+{additionalItemsCount}</Avatar>\n </Button>\n </Wrap>\n )}\n </div>\n </PropsContextProvider>\n );\n};\n\nexport default AvatarStack;\n"],"mappings":";;;;;;;;;;;;AAyBA,IAAa,eAAqC,UAAU;CAC1D,MAAM,EACJ,WACA,UACA,aAAa,GACb,OAAO,KACP,iBACE;CAIJ,MAAM,uBAAuB,aAFT,SAAS,MAAM,QAEO;CAE1C,MAAM,gBAAgB,KACpB,2BAAO,aACP,2BAAO,QAAQ,SACf,SACF;CAEA,MAAM,eAA6B;EACjC,QAAQ;GAAE,WAAW,2BAAO;GAAQ;EAAK;EACzC,QAAQ,EACN,WAAW,2BAAO,OACpB;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,qBAAC,OAAD;GAAK,WAAW;GAAhB,UAAA,CACG,UACA,uBAAuB,KACtB,oBAAC,MAAD;IAAM,IAAI;IACR,UAAA,oBAAC,QAAD;KAAQ,SAAS;KACf,UAAA,qBAAC,QAAD;MAAc;MAAd,UAAA,CAAoB,KAAE,oBAA6B;;IAC7C,CAAA;GACJ,CAAA,CAEL;;CACe,CAAA;AAE1B"}
1
+ {"version":3,"file":"AvatarStack.mjs","names":["styles"],"sources":["../../../../../../../src/components/AvatarStack/AvatarStack.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { Children } from \"react\";\nimport clsx from \"clsx\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport styles from \"./AvatarStack.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { Avatar } from \"@/components/Avatar\";\nimport { Wrap } from \"@/components/Wrap\";\n\nexport interface AvatarStackProps\n extends PropsWithClassName, PropsWithChildren {\n /**\n * The total count of items, as avatars should only be displayed for the first\n * view\n */\n totalCount?: number;\n /** The onPress action of the additional items count element */\n onCountPress?: () => void;\n /** The size of the avatars inside the stack. @default \"m\" */\n size?: \"xs\" | \"s\" | \"m\" | \"l\";\n}\n\n/** @flr-generate all */\nexport const AvatarStack: FC<AvatarStackProps> = (props) => {\n const {\n className,\n children,\n totalCount = 0,\n size = \"m\",\n onCountPress,\n } = props;\n\n const avatarCount = Children.count(children);\n\n const additionalItemsCount = totalCount - avatarCount;\n\n const rootClassName = clsx(\n styles.avatarStack,\n styles[`size-${size}`],\n className,\n );\n\n const propsContext: PropsContext = {\n Avatar: { className: styles.avatar, size },\n Button: {\n className: styles.avatar,\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <div className={rootClassName}>\n {children}\n {additionalItemsCount > 0 && (\n <Wrap if={onCountPress}>\n <Button onPress={onCountPress}>\n <Avatar size={size}>+{additionalItemsCount}</Avatar>\n </Button>\n </Wrap>\n )}\n </div>\n </PropsContextProvider>\n );\n};\n\nexport default AvatarStack;\n"],"mappings":";;;;;;;;;;;;AAyBA,IAAa,eAAqC,UAAU;CAC1D,MAAM,EACJ,WACA,UACA,aAAa,GACb,OAAO,KACP,iBACE;CAIJ,MAAM,uBAAuB,aAFT,SAAS,MAAM,QAEO;CAE1C,MAAM,gBAAgB,KACpBA,2BAAO,aACPA,2BAAO,QAAQ,SACf,SACF;CAEA,MAAM,eAA6B;EACjC,QAAQ;GAAE,WAAWA,2BAAO;GAAQ;EAAK;EACzC,QAAQ,EACN,WAAWA,2BAAO,OACpB;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,qBAAC,OAAD;GAAK,WAAW;GAAhB,UAAA,CACG,UACA,uBAAuB,KACtB,oBAAC,MAAD;IAAM,IAAI;IACR,UAAA,oBAAC,QAAD;KAAQ,SAAS;KACf,UAAA,qBAAC,QAAD;MAAc;MAAd,UAAA,CAAoB,KAAE,oBAA6B;;IAC7C,CAAA;GACJ,CAAA,CAEL;;CACe,CAAA;AAE1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.mjs","names":[],"sources":["../../../../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Badge.module.scss\";\nimport clsx from \"clsx\";\nimport {\n alphaColors,\n isAlphaColor,\n type PropsWithClassName,\n} from \"@/lib/types/props\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PressEvent } from \"@react-types/shared\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport { ContextualHelpButton } from \"@/components/Badge/components/ContextualHelpButton\";\nimport locales from \"./locales/*.locale.json\";\n\nexport const badgeColors = [\n \"neutral\",\n \"blue\",\n \"navy\",\n \"violet\",\n \"teal\",\n \"lilac\",\n \"green\",\n \"orange\",\n \"red\",\n ...alphaColors,\n] as const;\nexport type BadgeColors = (typeof badgeColors)[number];\n\nexport interface BadgeProps\n extends PropsWithChildren, FlowComponentProps, PropsWithClassName {\n /** Handler that is called when the badge is pressed. */\n onPress?: (e: PressEvent) => void;\n /** Handler that is called when the badges close icon is pressed. */\n onClose?: (e: PressEvent) => void;\n /** The color of the badge. @default \"neutral\" */\n color?: BadgeColors;\n /** Whether the badge is disabled. */\n isDisabled?: boolean;\n}\n\nconst contextualHelpTunnel = {\n id: \"contextualHelp\",\n component: \"Badge\",\n} as const;\n\n/** @flr-generate all */\nexport const Badge = flowComponent(\"Badge\", (props) => {\n const {\n children,\n className,\n color = \"neutral\",\n ref,\n onPress,\n onClose,\n isDisabled,\n ...rest\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Badge\");\n\n const rootClassName = clsx(\n styles.badge,\n styles[color],\n isDisabled && styles.disabled,\n className,\n );\n\n const buttonColor = isAlphaColor(color) ? color : \"dark\";\n\n const propsContext: PropsContext = {\n Label: {\n elementType: \"span\",\n className: styles.scope,\n unstyled: true,\n },\n Text: {\n elementType: \"span\",\n className: styles.value,\n },\n Button: {\n Label: {\n elementType: \"span\",\n className: styles.scope,\n unstyled: true,\n },\n Text: {\n elementType: \"span\",\n className: styles.value,\n },\n },\n ContextualHelp: {\n tunnel: contextualHelpTunnel,\n wrapWith: (\n <ContextualHelpButton\n className={styles.action}\n color={buttonColor}\n isDisabled={isDisabled}\n />\n ),\n },\n // A trigger the consumer wrote brings its own button. It goes to the same\n // place, styled like the one the badge supplies.\n ContextualHelpTrigger: {\n tunnel: contextualHelpTunnel,\n Button: {\n className: styles.action,\n color: buttonColor,\n variant: \"plain\",\n size: \"s\",\n isDisabled,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <div className={rootClassName} {...rest} ref={ref}>\n {!onPress && <div className={styles.content}>{children}</div>}\n {onPress && (\n <Button\n isDisabled={isDisabled}\n unstyled\n className={styles.button}\n onPress={onPress}\n >\n {children}\n </Button>\n )}\n\n <UiComponentTunnelExit id={contextualHelpTunnel.id} component=\"Badge\" />\n\n {onClose && (\n <Button\n className={styles.close}\n size=\"s\"\n color={buttonColor}\n variant=\"plain\"\n onPress={onClose}\n isDisabled={isDisabled}\n aria-label={stringFormatter.format(\"remove\")}\n >\n <IconClose />\n </Button>\n )}\n </div>\n </PropsContextProvider>\n );\n});\n\nexport default Badge;\n"],"mappings":";;;;;;;;;;;;;;AAmB2B,CAUzB,GAAG,WACL;AAeA,IAAM,uBAAuB;CAC3B,IAAI;CACJ,WAAW;AACb;;AAGA,IAAa,QAAQ,cAAc,UAAU,UAAU;CACrD,MAAM,EACJ,UACA,WACA,QAAQ,WACR,KACA,SACA,SACA,YACA,GAAG,SACD;CAEJ,MAAM,kBAAkB,4BAA4B,kBAAS,OAAO;CAEpE,MAAM,gBAAgB,KACpB,qBAAO,OACP,qBAAO,QACP,cAAc,qBAAO,UACrB,SACF;CAEA,MAAM,cAAc,aAAa,KAAK,IAAI,QAAQ;CAElD,MAAM,eAA6B;EACjC,OAAO;GACL,aAAa;GACb,WAAW,qBAAO;GAClB,UAAU;EACZ;EACA,MAAM;GACJ,aAAa;GACb,WAAW,qBAAO;EACpB;EACA,QAAQ;GACN,OAAO;IACL,aAAa;IACb,WAAW,qBAAO;IAClB,UAAU;GACZ;GACA,MAAM;IACJ,aAAa;IACb,WAAW,qBAAO;GACpB;EACF;EACA,gBAAgB;GACd,QAAQ;GACR,UACE,oBAAC,sBAAD;IACE,WAAW,qBAAO;IAClB,OAAO;IACK;GACb,CAAA;EAEL;EAGA,uBAAuB;GACrB,QAAQ;GACR,QAAQ;IACN,WAAW,qBAAO;IAClB,OAAO;IACP,SAAS;IACT,MAAM;IACN;GACF;EACF;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,qBAAC,OAAD;GAAK,WAAW;GAAe,GAAI;GAAW;GAA9C,UAAA;IACG,CAAC,WAAW,oBAAC,OAAD;KAAK,WAAW,qBAAO;KAAU;IAAc,CAAA;IAC3D,WACC,oBAAC,QAAD;KACc;KACZ,UAAA;KACA,WAAW,qBAAO;KACT;KAER;IACK,CAAA;IAGV,oBAAC,uBAAD;KAAuB,IAAI,qBAAqB;KAAI,WAAU;IAAS,CAAA;IAEtE,WACC,oBAAC,QAAD;KACE,WAAW,qBAAO;KAClB,MAAK;KACL,OAAO;KACP,SAAQ;KACR,SAAS;KACG;KACZ,cAAY,gBAAgB,OAAO,QAAQ;KAE3C,UAAA,oBAAC,WAAD,CAAY,CAAA;IACN,CAAA;GAEP;;CACe,CAAA;AAE1B,CAAC"}
1
+ {"version":3,"file":"Badge.mjs","names":["locales","styles"],"sources":["../../../../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Badge.module.scss\";\nimport clsx from \"clsx\";\nimport {\n alphaColors,\n isAlphaColor,\n type PropsWithClassName,\n} from \"@/lib/types/props\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PressEvent } from \"@react-types/shared\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport { ContextualHelpButton } from \"@/components/Badge/components/ContextualHelpButton\";\nimport locales from \"./locales/*.locale.json\";\n\nexport const badgeColors = [\n \"neutral\",\n \"blue\",\n \"navy\",\n \"violet\",\n \"teal\",\n \"lilac\",\n \"green\",\n \"orange\",\n \"red\",\n ...alphaColors,\n] as const;\nexport type BadgeColors = (typeof badgeColors)[number];\n\nexport interface BadgeProps\n extends PropsWithChildren, FlowComponentProps, PropsWithClassName {\n /** Handler that is called when the badge is pressed. */\n onPress?: (e: PressEvent) => void;\n /** Handler that is called when the badges close icon is pressed. */\n onClose?: (e: PressEvent) => void;\n /** The color of the badge. @default \"neutral\" */\n color?: BadgeColors;\n /** Whether the badge is disabled. */\n isDisabled?: boolean;\n}\n\nconst contextualHelpTunnel = {\n id: \"contextualHelp\",\n component: \"Badge\",\n} as const;\n\n/** @flr-generate all */\nexport const Badge = flowComponent(\"Badge\", (props) => {\n const {\n children,\n className,\n color = \"neutral\",\n ref,\n onPress,\n onClose,\n isDisabled,\n ...rest\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Badge\");\n\n const rootClassName = clsx(\n styles.badge,\n styles[color],\n isDisabled && styles.disabled,\n className,\n );\n\n const buttonColor = isAlphaColor(color) ? color : \"dark\";\n\n const propsContext: PropsContext = {\n Label: {\n elementType: \"span\",\n className: styles.scope,\n unstyled: true,\n },\n Text: {\n elementType: \"span\",\n className: styles.value,\n },\n Button: {\n Label: {\n elementType: \"span\",\n className: styles.scope,\n unstyled: true,\n },\n Text: {\n elementType: \"span\",\n className: styles.value,\n },\n },\n ContextualHelp: {\n tunnel: contextualHelpTunnel,\n wrapWith: (\n <ContextualHelpButton\n className={styles.action}\n color={buttonColor}\n isDisabled={isDisabled}\n />\n ),\n },\n // A trigger the consumer wrote brings its own button. It goes to the same\n // place, styled like the one the badge supplies.\n ContextualHelpTrigger: {\n tunnel: contextualHelpTunnel,\n Button: {\n className: styles.action,\n color: buttonColor,\n variant: \"plain\",\n size: \"s\",\n isDisabled,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <div className={rootClassName} {...rest} ref={ref}>\n {!onPress && <div className={styles.content}>{children}</div>}\n {onPress && (\n <Button\n isDisabled={isDisabled}\n unstyled\n className={styles.button}\n onPress={onPress}\n >\n {children}\n </Button>\n )}\n\n <UiComponentTunnelExit id={contextualHelpTunnel.id} component=\"Badge\" />\n\n {onClose && (\n <Button\n className={styles.close}\n size=\"s\"\n color={buttonColor}\n variant=\"plain\"\n onPress={onClose}\n isDisabled={isDisabled}\n aria-label={stringFormatter.format(\"remove\")}\n >\n <IconClose />\n </Button>\n )}\n </div>\n </PropsContextProvider>\n );\n});\n\nexport default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KACL,OAAO;KACP,SAAQ;KACR,SAAS;KACG;KACZ,cAAY,gBAAgB,OAAO,QAAQ;KAE3C,UAAA,oBAAC,WAAD,CAAY,CAAA;IACN,CAAA;GAEP;;CACe,CAAA;AAE1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BigNumber.mjs","names":[],"sources":["../../../../../../../src/components/BigNumber/BigNumber.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./BigNumber.module.scss\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\nexport type BigNumberProps = PropsWithChildren & PropsWithClassName;\n\n/** @flr-generate all */\nexport const BigNumber: FC<BigNumberProps> = (props) => {\n const { children, className } = props;\n\n const rootClassName = clsx(styles.bigNumber, className);\n\n const propsContext: PropsContext = {\n Text: {\n className: styles.text,\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <span className={rootClassName}>{children}</span>\n </PropsContextProvider>\n );\n};\n\nexport default BigNumber;\n"],"mappings":";;;;;;;;AASA,IAAa,aAAiC,UAAU;CACtD,MAAM,EAAE,UAAU,cAAc;CAEhC,MAAM,gBAAgB,KAAK,yBAAO,WAAW,SAAS;CAEtD,MAAM,eAA6B,EACjC,MAAM,EACJ,WAAW,yBAAO,KACpB,EACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,oBAAC,QAAD;GAAM,WAAW;GAAgB;EAAe,CAAA;CAC5B,CAAA;AAE1B"}
1
+ {"version":3,"file":"BigNumber.mjs","names":["styles"],"sources":["../../../../../../../src/components/BigNumber/BigNumber.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./BigNumber.module.scss\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\nexport type BigNumberProps = PropsWithChildren & PropsWithClassName;\n\n/** @flr-generate all */\nexport const BigNumber: FC<BigNumberProps> = (props) => {\n const { children, className } = props;\n\n const rootClassName = clsx(styles.bigNumber, className);\n\n const propsContext: PropsContext = {\n Text: {\n className: styles.text,\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <span className={rootClassName}>{children}</span>\n </PropsContextProvider>\n );\n};\n\nexport default BigNumber;\n"],"mappings":";;;;;;;;AASA,IAAa,aAAiC,UAAU;CACtD,MAAM,EAAE,UAAU,cAAc;CAEhC,MAAM,gBAAgB,KAAKA,yBAAO,WAAW,SAAS;CAEtD,MAAM,eAA6B,EACjC,MAAM,EACJ,WAAWA,yBAAO,KACpB,EACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,oBAAC,QAAD;GAAM,WAAW;GAAgB;EAAe,CAAA;CAC5B,CAAA;AAE1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.mjs","names":[],"sources":["../../../../../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./Breadcrumb.module.scss\";\nimport clsx from \"clsx\";\nimport type { BreadcrumbItemProps } from \"./components/BreadcrumbItem\";\nimport { BreadcrumbItem } from \"./components/BreadcrumbItem\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { type AlphaColor, isAlphaColor } from \"@/lib/types/props\";\n\nexport interface BreadcrumbProps\n extends\n Omit<Aria.BreadcrumbsProps<BreadcrumbItemProps>, \"children\">,\n PropsWithChildren {\n /** The color of the breadcrumb. @default \"default\" */\n color?: \"default\" | AlphaColor;\n /** The size of the element. @default \"m\" */\n size?: \"s\" | \"m\";\n}\n\n/** @flr-generate all */\nexport const Breadcrumb: FC<BreadcrumbProps> = (props) => {\n const { children, className, color = \"default\", size = \"m\", ...rest } = props;\n\n const rootClassName = clsx(\n styles.breadcrumb,\n isAlphaColor(color) && styles[color],\n size === \"s\" && styles[\"size-s\"],\n className,\n );\n\n const propsContext: PropsContext = {\n Link: {\n unstyled: true,\n className: styles.link,\n wrapWith: <BreadcrumbItem />,\n },\n };\n\n return (\n <Aria.Breadcrumbs {...rest} className={rootClassName}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Aria.Breadcrumbs>\n );\n};\n\nexport default Breadcrumb;\n"],"mappings":";;;;;;;;;;;AAqBA,IAAa,cAAmC,UAAU;CACxD,MAAM,EAAE,UAAU,WAAW,QAAQ,WAAW,OAAO,KAAK,GAAG,SAAS;CAExE,MAAM,gBAAgB,KACpB,0BAAO,YACP,aAAa,KAAK,KAAK,0BAAO,QAC9B,SAAS,OAAO,0BAAO,WACvB,SACF;CAEA,MAAM,eAA6B,EACjC,MAAM;EACJ,UAAU;EACV,WAAW,0BAAO;EAClB,UAAU,oBAAC,gBAAD,CAAiB,CAAA;CAC7B,EACF;CAEA,OACE,oBAAC,KAAK,aAAN;EAAkB,GAAI;EAAM,WAAW;EACrC,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA;CACN,CAAA;AAEtB"}
1
+ {"version":3,"file":"Breadcrumb.mjs","names":["styles"],"sources":["../../../../../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./Breadcrumb.module.scss\";\nimport clsx from \"clsx\";\nimport type { BreadcrumbItemProps } from \"./components/BreadcrumbItem\";\nimport { BreadcrumbItem } from \"./components/BreadcrumbItem\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { type AlphaColor, isAlphaColor } from \"@/lib/types/props\";\n\nexport interface BreadcrumbProps\n extends\n Omit<Aria.BreadcrumbsProps<BreadcrumbItemProps>, \"children\">,\n PropsWithChildren {\n /** The color of the breadcrumb. @default \"default\" */\n color?: \"default\" | AlphaColor;\n /** The size of the element. @default \"m\" */\n size?: \"s\" | \"m\";\n}\n\n/** @flr-generate all */\nexport const Breadcrumb: FC<BreadcrumbProps> = (props) => {\n const { children, className, color = \"default\", size = \"m\", ...rest } = props;\n\n const rootClassName = clsx(\n styles.breadcrumb,\n isAlphaColor(color) && styles[color],\n size === \"s\" && styles[\"size-s\"],\n className,\n );\n\n const propsContext: PropsContext = {\n Link: {\n unstyled: true,\n className: styles.link,\n wrapWith: <BreadcrumbItem />,\n },\n };\n\n return (\n <Aria.Breadcrumbs {...rest} className={rootClassName}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Aria.Breadcrumbs>\n );\n};\n\nexport default Breadcrumb;\n"],"mappings":";;;;;;;;;;;AAqBA,IAAa,cAAmC,UAAU;CACxD,MAAM,EAAE,UAAU,WAAW,QAAQ,WAAW,OAAO,KAAK,GAAG,SAAS;CAExE,MAAM,gBAAgB,KACpBA,0BAAO,YACP,aAAa,KAAK,KAAKA,0BAAO,QAC9B,SAAS,OAAOA,0BAAO,WACvB,SACF;CAEA,MAAM,eAA6B,EACjC,MAAM;EACJ,UAAU;EACV,WAAWA,0BAAO;EAClB,UAAU,oBAAC,gBAAD,CAAiB,CAAA;CAC7B,EACF;CAEA,OACE,oBAAC,KAAK,aAAN;EAAkB,GAAI;EAAM,WAAW;EACrC,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA;CACN,CAAA;AAEtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"BreadcrumbItem.mjs","names":[],"sources":["../../../../../../../../../src/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"../../Breadcrumb.module.scss\";\nimport clsx from \"clsx\";\nimport { IconChevronRight } from \"@/components/Icon/components/icons\";\n\nexport type BreadcrumbItemProps = PropsWithChildren;\n\nexport const BreadcrumbItem: FC<BreadcrumbItemProps> = (props) => {\n const { children } = props;\n\n const rootClassName = clsx(styles.breadcrumbItem);\n\n return (\n <Aria.Breadcrumb className={rootClassName}>\n {children}\n <IconChevronRight size=\"s\" className={styles.icon} />\n </Aria.Breadcrumb>\n );\n};\n\nexport default BreadcrumbItem;\n"],"mappings":";;;;;;;;AAQA,IAAa,kBAA2C,UAAU;CAChE,MAAM,EAAE,aAAa;CAErB,MAAM,gBAAgB,KAAK,0BAAO,cAAc;CAEhD,OACE,qBAAC,KAAK,YAAN;EAAiB,WAAW;EAA5B,UAAA,CACG,UACD,oBAAC,kBAAD;GAAkB,MAAK;GAAI,WAAW,0BAAO;EAAO,CAAA,CACrC;;AAErB"}
1
+ {"version":3,"file":"BreadcrumbItem.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"../../Breadcrumb.module.scss\";\nimport clsx from \"clsx\";\nimport { IconChevronRight } from \"@/components/Icon/components/icons\";\n\nexport type BreadcrumbItemProps = PropsWithChildren;\n\nexport const BreadcrumbItem: FC<BreadcrumbItemProps> = (props) => {\n const { children } = props;\n\n const rootClassName = clsx(styles.breadcrumbItem);\n\n return (\n <Aria.Breadcrumb className={rootClassName}>\n {children}\n <IconChevronRight size=\"s\" className={styles.icon} />\n </Aria.Breadcrumb>\n );\n};\n\nexport default BreadcrumbItem;\n"],"mappings":";;;;;;;;AAQA,IAAa,kBAA2C,UAAU;CAChE,MAAM,EAAE,aAAa;CAErB,MAAM,gBAAgB,KAAKA,0BAAO,cAAc;CAEhD,OACE,qBAAC,KAAK,YAAN;EAAiB,WAAW;EAA5B,UAAA,CACG,UACD,oBAAC,kBAAD;GAAkB,MAAK;GAAI,WAAWA,0BAAO;EAAO,CAAA,CACrC;;AAErB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.mjs","names":[],"sources":["../../../../../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Button.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { IconFailed, IconSucceeded } from \"@/components/Icon/components/icons\";\nimport { Wrap } from \"@/components/Wrap\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport LoadingSpinner from \"@/components/LoadingSpinner/LoadingSpinner\";\nimport { useAriaAnnounceActionState } from \"@/components/Action/lib/ariaLive\";\nimport { containsTextChild } from \"@/lib/react/remote\";\nimport type { AlphaColor } from \"@/lib/types/props\";\nimport { filterDOMProps } from \"@react-aria/utils\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\n\nexport interface ButtonProps\n extends\n PropsWithChildren<Aria.ButtonProps>,\n FlowComponentProps<HTMLButtonElement> {\n /**\n * Slot for button placement in action groups: `primary` (at the end),\n * `secondary` (before the primary action) or `abort` (at the start). Without\n * a slot, an action group places the colors primary, success and danger in\n * `primary` and every other color in `abort`. A secondary-colored button that\n * does not abort therefore needs `slot=\"secondary\"`.\n */\n slot?: string;\n /**\n * The color of the button.\n *\n * @default \"primary\"\n * @deprecatedValues accent\n */\n color?:\n \"primary\" | \"success\" | \"secondary\" | \"danger\" | AlphaColor | \"accent\";\n /** The visual variant of the button. @default \"solid\" */\n variant?: \"plain\" | \"solid\" | \"soft\" | \"outline\";\n /** The size of the button. @default \"m\" */\n size?: \"m\" | \"s\";\n /** Disables button but keeps it focusable. */\n \"aria-disabled\"?: boolean;\n /** Whether the button is in a pending state. */\n isPending?: boolean;\n /** Whether the button is in a succeeded state. */\n isSucceeded?: boolean;\n /** Whether the button is in a failed state. */\n isFailed?: boolean;\n /** Whether the button is in a read only state. */\n isReadOnly?: boolean;\n /** @internal */\n unstyled?: boolean;\n /** @internal */\n ariaSlot?: string | null;\n /** @internal */\n elementType?: \"button\" | \"span\";\n}\n\nconst isMuted = (props: ButtonProps) =>\n !!(\n props.isPending ||\n props.isSucceeded ||\n props.isFailed ||\n props[\"aria-disabled\"] ||\n props.isReadOnly\n );\n\nconst disablePendingProps = (props: ButtonProps) => {\n if (isMuted(props)) {\n props = { ...props };\n\n const mutedActionHandler = (e: unknown) => {\n if (e && typeof e === \"object\") {\n // stopPropagation is the default behavior in React Aria\n const isReactAriaEvent =\n \"continuePropagation\" in e &&\n typeof e.continuePropagation === \"function\";\n\n if (\n !isReactAriaEvent &&\n \"stopPropagation\" in e &&\n typeof e.stopPropagation === \"function\"\n ) {\n e.stopPropagation();\n }\n if (\"preventDefault\" in e && typeof e.preventDefault === \"function\") {\n e.preventDefault();\n }\n }\n\n return false;\n };\n\n props.onClick = mutedActionHandler;\n props.onPress = mutedActionHandler;\n props.onPressStart = mutedActionHandler;\n props.onPressEnd = mutedActionHandler;\n props.onPressChange = mutedActionHandler;\n props.onPressUp = mutedActionHandler;\n props.onKeyDown = mutedActionHandler;\n props.onKeyUp = mutedActionHandler;\n }\n\n return props;\n};\n\n/** @flr-generate all */\nexport const Button = flowComponent(\"Button\", (props) => {\n const muted = isMuted(props);\n props = disablePendingProps(props);\n\n const warnDeprecation = useWarnDeprecation();\n\n const {\n color: colorFromProps = \"primary\",\n variant = \"solid\",\n children,\n className,\n size = \"m\",\n isPending,\n isSucceeded,\n isFailed,\n \"aria-disabled\": ariaDisabled,\n ref,\n slot: ignoredSlotProp,\n ariaSlot: slot,\n unstyled,\n isReadOnly,\n elementType,\n ...restProps\n } = props;\n\n if (colorFromProps === \"accent\") {\n warnDeprecation(\n \"The color 'accent' is deprecated and will be removed in a future release. Use 'success' instead.\",\n );\n }\n\n const color = colorFromProps === \"accent\" ? \"success\" : colorFromProps;\n\n /**\n * A string child renders no element the CSS could match, so the button itself\n * carries the marker. An explicit `Text` child is matched by `:has(.text)`.\n */\n const hasText = containsTextChild(children);\n\n const rootClassName = unstyled\n ? className\n : clsx(\n styles.button,\n isPending && styles.isPending,\n isSucceeded && styles.isSucceeded,\n isFailed && styles.isFailed,\n size === \"s\" && styles[\"size-s\"],\n styles[color],\n styles[variant],\n ariaDisabled && styles.ariaDisabled,\n hasText && styles.hasText,\n className,\n );\n\n useAriaAnnounceActionState(\n isPending\n ? \"isPending\"\n : isSucceeded\n ? \"isSucceeded\"\n : isFailed\n ? \"isFailed\"\n : \"isIdle\",\n );\n\n const propsContext: PropsContext = {\n Icon: {\n className: styles.icon,\n \"aria-hidden\": true,\n size,\n },\n Text: {\n className: styles.text,\n },\n Avatar: {\n className: styles.avatar,\n },\n CounterBadge: {\n className: styles.counterBadge,\n },\n Image: {\n className: styles.image,\n },\n };\n\n const stateIcon = isSucceeded ? (\n <IconSucceeded size={size} className={styles.stateIcon} color=\"success\" />\n ) : isFailed ? (\n <IconFailed size={size} className={styles.stateIcon} color=\"danger\" />\n ) : isPending ? (\n <LoadingSpinner size={size} className={styles.stateIcon} />\n ) : undefined;\n\n const content = (\n <>\n <PropsContextProvider props={propsContext}>\n <Wrap if={!unstyled}>\n <span className={styles.content}>{children}</span>\n </Wrap>\n </PropsContextProvider>\n {stateIcon}\n </>\n );\n\n if (elementType === \"span\") {\n const spanProps = filterDOMProps(restProps, { global: true });\n\n return (\n <span\n {...spanProps}\n data-disabled={restProps.isDisabled || undefined}\n className={\n typeof rootClassName === \"string\" ? rootClassName : undefined\n }\n >\n {content}\n </span>\n );\n }\n\n return (\n <Aria.Button\n className={rootClassName}\n ref={ref}\n slot={slot}\n {...(isReadOnly === true ? { \"data-readonly\": true } : {})}\n {...restProps}\n aria-disabled={muted || undefined}\n >\n {content}\n </Aria.Button>\n );\n});\n\nexport default Button;\n"],"mappings":";;;;;;;;;;;;;;;;;AA2DA,IAAM,WAAW,UACf,CAAC,EACC,MAAM,aACN,MAAM,eACN,MAAM,YACN,MAAM,oBACN,MAAM;AA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B,eAAe;GACf;EACF;EACA,MAAM,EACJ,WAAW,sBAAO,KACpB;EACA,QAAQ,EACN,WAAW,sBAAO,OACpB;EACA,cAAc,EACZ,WAAW,sBAAO,aACpB;EACA,OAAO,EACL,WAAW,sBAAO,MACpB;CACF;CAEA,MAAM,YAAY,cAChB,oBAAC,eAAD;EAAqB;EAAM,WAAW,sBAAO;EAAW,OAAM;CAAW,CAAA,IACvE,WACF,oBAAC,YAAD;EAAkB;EAAM,WAAW,sBAAO;EAAW,OAAM;CAAU,CAAA,IACnE,YACF,oBAAC,gBAAD;EAAsB;EAAM,WAAW,sBAAO;CAAY,CAAA,IACxD,KAAA;CAEJ,MAAM,UACJ,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,oBAAC,MAAD;GAAM,IAAI,CAAC;GACT,UAAA,oBAAC,QAAD;IAAM,WAAW,sBAAO;IAAU;GAAe,CAAA;EAC7C,CAAA;CACc,CAAA,GACrB,SACD,EAAA,CAAA;CAGJ,IAAI,gBAAgB,QAAQ;EAC1B,MAAM,YAAY,eAAe,WAAW,EAAE,QAAQ,KAAK,CAAC;EAE5D,OACE,oBAAC,QAAD;GACE,GAAI;GACJ,iBAAe,UAAU,cAAc,KAAA;GACvC,WACE,OAAO,kBAAkB,WAAW,gBAAgB,KAAA;GAGrD,UAAA;EACG,CAAA;CAEV;CAEA,OACE,oBAAC,KAAK,QAAN;EACE,WAAW;EACN;EACC;EACN,GAAK,eAAe,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;EACxD,GAAI;EACJ,iBAAe,SAAS,KAAA;EAEvB,UAAA;CACU,CAAA;AAEjB,CAAC"}
1
+ {"version":3,"file":"Button.mjs","names":["styles","_Fragment"],"sources":["../../../../../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Button.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { IconFailed, IconSucceeded } from \"@/components/Icon/components/icons\";\nimport { Wrap } from \"@/components/Wrap\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport LoadingSpinner from \"@/components/LoadingSpinner/LoadingSpinner\";\nimport { useAriaAnnounceActionState } from \"@/components/Action/lib/ariaLive\";\nimport { containsTextChild } from \"@/lib/react/remote\";\nimport type { AlphaColor } from \"@/lib/types/props\";\nimport { filterDOMProps } from \"@react-aria/utils\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\n\nexport interface ButtonProps\n extends\n PropsWithChildren<Aria.ButtonProps>,\n FlowComponentProps<HTMLButtonElement> {\n /**\n * Slot for button placement in action groups: `primary` (at the end),\n * `secondary` (before the primary action) or `abort` (at the start). Without\n * a slot, an action group places the colors primary, success and danger in\n * `primary` and every other color in `abort`. A secondary-colored button that\n * does not abort therefore needs `slot=\"secondary\"`.\n */\n slot?: string;\n /**\n * The color of the button.\n *\n * @default \"primary\"\n * @deprecatedValues accent\n */\n color?:\n \"primary\" | \"success\" | \"secondary\" | \"danger\" | AlphaColor | \"accent\";\n /** The visual variant of the button. @default \"solid\" */\n variant?: \"plain\" | \"solid\" | \"soft\" | \"outline\";\n /** The size of the button. @default \"m\" */\n size?: \"m\" | \"s\";\n /** Disables button but keeps it focusable. */\n \"aria-disabled\"?: boolean;\n /** Whether the button is in a pending state. */\n isPending?: boolean;\n /** Whether the button is in a succeeded state. */\n isSucceeded?: boolean;\n /** Whether the button is in a failed state. */\n isFailed?: boolean;\n /** Whether the button is in a read only state. */\n isReadOnly?: boolean;\n /** @internal */\n unstyled?: boolean;\n /** @internal */\n ariaSlot?: string | null;\n /** @internal */\n elementType?: \"button\" | \"span\";\n}\n\nconst isMuted = (props: ButtonProps) =>\n !!(\n props.isPending ||\n props.isSucceeded ||\n props.isFailed ||\n props[\"aria-disabled\"] ||\n props.isReadOnly\n );\n\nconst disablePendingProps = (props: ButtonProps) => {\n if (isMuted(props)) {\n props = { ...props };\n\n const mutedActionHandler = (e: unknown) => {\n if (e && typeof e === \"object\") {\n // stopPropagation is the default behavior in React Aria\n const isReactAriaEvent =\n \"continuePropagation\" in e &&\n typeof e.continuePropagation === \"function\";\n\n if (\n !isReactAriaEvent &&\n \"stopPropagation\" in e &&\n typeof e.stopPropagation === \"function\"\n ) {\n e.stopPropagation();\n }\n if (\"preventDefault\" in e && typeof e.preventDefault === \"function\") {\n e.preventDefault();\n }\n }\n\n return false;\n };\n\n props.onClick = mutedActionHandler;\n props.onPress = mutedActionHandler;\n props.onPressStart = mutedActionHandler;\n props.onPressEnd = mutedActionHandler;\n props.onPressChange = mutedActionHandler;\n props.onPressUp = mutedActionHandler;\n props.onKeyDown = mutedActionHandler;\n props.onKeyUp = mutedActionHandler;\n }\n\n return props;\n};\n\n/** @flr-generate all */\nexport const Button = flowComponent(\"Button\", (props) => {\n const muted = isMuted(props);\n props = disablePendingProps(props);\n\n const warnDeprecation = useWarnDeprecation();\n\n const {\n color: colorFromProps = \"primary\",\n variant = \"solid\",\n children,\n className,\n size = \"m\",\n isPending,\n isSucceeded,\n isFailed,\n \"aria-disabled\": ariaDisabled,\n ref,\n slot: ignoredSlotProp,\n ariaSlot: slot,\n unstyled,\n isReadOnly,\n elementType,\n ...restProps\n } = props;\n\n if (colorFromProps === \"accent\") {\n warnDeprecation(\n \"The color 'accent' is deprecated and will be removed in a future release. Use 'success' instead.\",\n );\n }\n\n const color = colorFromProps === \"accent\" ? \"success\" : colorFromProps;\n\n /**\n * A string child renders no element the CSS could match, so the button itself\n * carries the marker. An explicit `Text` child is matched by `:has(.text)`.\n */\n const hasText = containsTextChild(children);\n\n const rootClassName = unstyled\n ? className\n : clsx(\n styles.button,\n isPending && styles.isPending,\n isSucceeded && styles.isSucceeded,\n isFailed && styles.isFailed,\n size === \"s\" && styles[\"size-s\"],\n styles[color],\n styles[variant],\n ariaDisabled && styles.ariaDisabled,\n hasText && styles.hasText,\n className,\n );\n\n useAriaAnnounceActionState(\n isPending\n ? \"isPending\"\n : isSucceeded\n ? \"isSucceeded\"\n : isFailed\n ? \"isFailed\"\n : \"isIdle\",\n );\n\n const propsContext: PropsContext = {\n Icon: {\n className: styles.icon,\n \"aria-hidden\": true,\n size,\n },\n Text: {\n className: styles.text,\n },\n Avatar: {\n className: styles.avatar,\n },\n CounterBadge: {\n className: styles.counterBadge,\n },\n Image: {\n className: styles.image,\n },\n };\n\n const stateIcon = isSucceeded ? (\n <IconSucceeded size={size} className={styles.stateIcon} color=\"success\" />\n ) : isFailed ? (\n <IconFailed size={size} className={styles.stateIcon} color=\"danger\" />\n ) : isPending ? (\n <LoadingSpinner size={size} className={styles.stateIcon} />\n ) : undefined;\n\n const content = (\n <>\n <PropsContextProvider props={propsContext}>\n <Wrap if={!unstyled}>\n <span className={styles.content}>{children}</span>\n </Wrap>\n </PropsContextProvider>\n {stateIcon}\n </>\n );\n\n if (elementType === \"span\") {\n const spanProps = filterDOMProps(restProps, { global: true });\n\n return (\n <span\n {...spanProps}\n data-disabled={restProps.isDisabled || undefined}\n className={\n typeof rootClassName === \"string\" ? rootClassName : undefined\n }\n >\n {content}\n </span>\n );\n }\n\n return (\n <Aria.Button\n className={rootClassName}\n ref={ref}\n slot={slot}\n {...(isReadOnly === true ? { \"data-readonly\": true } : {})}\n {...restProps}\n aria-disabled={muted || undefined}\n >\n {content}\n </Aria.Button>\n );\n});\n\nexport default Button;\n"],"mappings":";;;;;;;;;;;;;;;;;AA2DA,IAAM,WAAW,UACf,CAAC,EACC,MAAM,aACN,MAAM,eACN,MAAM,YACN,MAAM,oBACN,MAAM;AAGV,IAAM,uBAAuB,UAAuB;CAClD,IAAI,QAAQ,KAAK,GAAG;EAClB,QAAQ,EAAE,GAAG,MAAM;EAEnB,MAAM,sBAAsB,MAAe;GACzC,IAAI,KAAK,OAAO,MAAM,UAAU;IA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ACL,WAAWA,sBAAO,MACpB;CACF;CAEA,MAAM,YAAY,cAChB,oBAAC,eAAD;EAAqB;EAAM,WAAWA,sBAAO;EAAW,OAAM;CAAW,CAAA,IACvE,WACF,oBAAC,YAAD;EAAkB;EAAM,WAAWA,sBAAO;EAAW,OAAM;CAAU,CAAA,IACnE,YACF,oBAAC,gBAAD;EAAsB;EAAM,WAAWA,sBAAO;CAAY,CAAA,IACxD,KAAA;CAEJ,MAAM,UACJ,qBAAAC,UAAA,EAAA,UAAA,CACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,oBAAC,MAAD;GAAM,IAAI,CAAC;GACT,UAAA,oBAAC,QAAD;IAAM,WAAWD,sBAAO;IAAU;GAAe,CAAA;EAC7C,CAAA;CACc,CAAA,GACrB,SACD,EAAA,CAAA;CAGJ,IAAI,gBAAgB,QAAQ;EAC1B,MAAM,YAAY,eAAe,WAAW,EAAE,QAAQ,KAAK,CAAC;EAE5D,OACE,oBAAC,QAAD;GACE,GAAI;GACJ,iBAAe,UAAU,cAAc,KAAA;GACvC,WACE,OAAO,kBAAkB,WAAW,gBAAgB,KAAA;GAGrD,UAAA;EACG,CAAA;CAEV;CAEA,OACE,oBAAC,KAAK,QAAN;EACE,WAAW;EACN;EACC;EACN,GAAK,eAAe,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;EACxD,GAAI;EACJ,iBAAe,SAAS,KAAA;EAEvB,UAAA;CACU,CAAA;AAEjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.mjs","names":[],"sources":["../../../../../../../src/components/Calendar/Calendar.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"@/components/Calendar/Calendar.module.scss\";\nimport CalendarHeader from \"./components/CalendarHeader\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\n\nexport const Calendar: FC<PropsWithClassName> = (props) => {\n const { className } = props;\n\n const rootClassName = clsx(styles.calendar, className);\n\n return (\n <Aria.Calendar className={rootClassName}>\n <CalendarHeader />\n <Aria.CalendarGrid weekdayStyle=\"short\">\n {(date) => <Aria.CalendarCell date={date} />}\n </Aria.CalendarGrid>\n </Aria.Calendar>\n );\n};\n\nexport default Calendar;\n"],"mappings":";;;;;;;;AAOA,IAAa,YAAoC,UAAU;CACzD,MAAM,EAAE,cAAc;CAEtB,MAAM,gBAAgB,KAAK,wBAAO,UAAU,SAAS;CAErD,OACE,qBAAC,KAAK,UAAN;EAAe,WAAW;EAA1B,UAAA,CACE,oBAAC,gBAAD,CAAiB,CAAA,GACjB,oBAAC,KAAK,cAAN;GAAmB,cAAa;GAC5B,WAAA,SAAS,oBAAC,KAAK,cAAN,EAAyB,KAAO,CAAA;EAC1B,CAAA,CACN;;AAEnB"}
1
+ {"version":3,"file":"Calendar.mjs","names":["styles"],"sources":["../../../../../../../src/components/Calendar/Calendar.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"@/components/Calendar/Calendar.module.scss\";\nimport CalendarHeader from \"./components/CalendarHeader\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\n\nexport const Calendar: FC<PropsWithClassName> = (props) => {\n const { className } = props;\n\n const rootClassName = clsx(styles.calendar, className);\n\n return (\n <Aria.Calendar className={rootClassName}>\n <CalendarHeader />\n <Aria.CalendarGrid weekdayStyle=\"short\">\n {(date) => <Aria.CalendarCell date={date} />}\n </Aria.CalendarGrid>\n </Aria.Calendar>\n );\n};\n\nexport default Calendar;\n"],"mappings":";;;;;;;;AAOA,IAAa,YAAoC,UAAU;CACzD,MAAM,EAAE,cAAc;CAEtB,MAAM,gBAAgB,KAAKA,wBAAO,UAAU,SAAS;CAErD,OACE,qBAAC,KAAK,UAAN;EAAe,WAAW;EAA1B,UAAA,CACE,oBAAC,gBAAD,CAAiB,CAAA,GACjB,oBAAC,KAAK,cAAN;GAAmB,cAAa;GAC5B,WAAA,SAAS,oBAAC,KAAK,cAAN,EAAyB,KAAO,CAAA;EAC1B,CAAA,CACN;;AAEnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarHeader.mjs","names":[],"sources":["../../../../../../../../../src/components/Calendar/components/CalendarHeader/CalendarHeader.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { Button } from \"@/components/Button\";\nimport * as Aria from \"react-aria-components\";\nimport {\n IconChevronLeft,\n IconChevronRight,\n} from \"@/components/Icon/components/icons\";\nimport styles from \"../../Calendar.module.scss\";\n\nexport const CalendarHeader: FC = () => {\n return (\n <header className={styles.calendarHeader}>\n <Button ariaSlot=\"previous\" variant=\"plain\" color=\"secondary\">\n <IconChevronLeft />\n </Button>\n <Aria.Heading />\n <Button ariaSlot=\"next\" variant=\"plain\" color=\"secondary\">\n <IconChevronRight />\n </Button>\n </header>\n );\n};\n\nexport default CalendarHeader;\n"],"mappings":";;;;;;;;;AASA,IAAa,uBAA2B;CACtC,OACE,qBAAC,UAAD;EAAQ,WAAW,wBAAO;EAA1B,UAAA;GACE,oBAAC,QAAD;IAAQ,UAAS;IAAW,SAAQ;IAAQ,OAAM;IAChD,UAAA,oBAAC,iBAAD,CAAkB,CAAA;GACZ,CAAA;GACR,oBAAC,KAAK,SAAN,CAAe,CAAA;GACf,oBAAC,QAAD;IAAQ,UAAS;IAAO,SAAQ;IAAQ,OAAM;IAC5C,UAAA,oBAAC,kBAAD,CAAmB,CAAA;GACb,CAAA;EACF;;AAEZ"}
1
+ {"version":3,"file":"CalendarHeader.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/Calendar/components/CalendarHeader/CalendarHeader.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { Button } from \"@/components/Button\";\nimport * as Aria from \"react-aria-components\";\nimport {\n IconChevronLeft,\n IconChevronRight,\n} from \"@/components/Icon/components/icons\";\nimport styles from \"../../Calendar.module.scss\";\n\nexport const CalendarHeader: FC = () => {\n return (\n <header className={styles.calendarHeader}>\n <Button ariaSlot=\"previous\" variant=\"plain\" color=\"secondary\">\n <IconChevronLeft />\n </Button>\n <Aria.Heading />\n <Button ariaSlot=\"next\" variant=\"plain\" color=\"secondary\">\n <IconChevronRight />\n </Button>\n </header>\n );\n};\n\nexport default CalendarHeader;\n"],"mappings":";;;;;;;;;AASA,IAAa,uBAA2B;CACtC,OACE,qBAAC,UAAD;EAAQ,WAAWA,wBAAO;EAA1B,UAAA;GACE,oBAAC,QAAD;IAAQ,UAAS;IAAW,SAAQ;IAAQ,OAAM;IAChD,UAAA,oBAAC,iBAAD,CAAkB,CAAA;GACZ,CAAA;GACR,oBAAC,KAAK,SAAN,CAAe,CAAA;GACf,oBAAC,QAAD;IAAQ,UAAS;IAAO,SAAQ;IAAQ,OAAM;IAC5C,UAAA,oBAAC,kBAAD,CAAmB,CAAA;GACb,CAAA;EACF;;AAEZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"RangeCalendar.mjs","names":[],"sources":["../../../../../../../../../src/components/Calendar/components/RangeCalendar/RangeCalendar.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"@/components/Calendar/Calendar.module.scss\";\nimport CalendarHeader from \"../CalendarHeader\";\nimport clsx from \"clsx\";\nimport { MenuItem } from \"@/components/MenuItem\";\nimport { useCalendarDateRangePresets } from \"@/components/Calendar/components/RangeCalendar/helpers/useCalendarDateRangePresets\";\nimport { Separator } from \"@/components/Separator\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\n\nexport type RangeCalendarProps = Omit<\n Aria.RangeCalendarProps<Aria.DateValue>,\n \"children\"\n> &\n Pick<DateRangePickerProps, \"withDatePickerPresets\">;\n\n/** @internal */\nconst InnerRangeCalendar: FC<RangeCalendarProps> = ({\n withDatePickerPresets,\n}) => {\n const dateRangeHelper = useCalendarDateRangePresets(withDatePickerPresets);\n\n const predefinedDateHelperItems = dateRangeHelper.map((present) => {\n return (\n <MenuItem\n key={present.label}\n isDisabled={present.disabled}\n onPress={present.onPress}\n aria-label={present.label}\n >\n {present.label}\n </MenuItem>\n );\n });\n\n return (\n <div className={styles.container}>\n {withDatePickerPresets && (\n <>\n <Aria.Menu className={styles.presetMenu}>\n {predefinedDateHelperItems}\n </Aria.Menu>\n <Separator\n orientation=\"vertical\"\n className={styles.presetSeparator}\n />\n </>\n )}\n <div>\n <CalendarHeader />\n <Aria.CalendarGrid>\n {(date) => <Aria.CalendarCell date={date} />}\n </Aria.CalendarGrid>\n </div>\n </div>\n );\n};\n\n/** @flr-generate all */\nexport const RangeCalendar: FC<RangeCalendarProps> = (props) => {\n const { className, withDatePickerPresets, ...rest } = props;\n const rootClassName = clsx(styles.calendar, styles.range, className);\n\n return (\n <Aria.RangeCalendar {...rest} className={rootClassName}>\n <InnerRangeCalendar withDatePickerPresets={withDatePickerPresets} />\n </Aria.RangeCalendar>\n );\n};\n\nexport default RangeCalendar;\n"],"mappings":";;;;;;;;;;;;;AAiBA,IAAM,sBAA8C,EAClD,4BACI;CAGJ,MAAM,4BAFkB,4BAA4B,qBAElB,CAAA,CAAgB,KAAK,YAAY;EACjE,OACE,oBAAC,UAAD;GAEE,YAAY,QAAQ;GACpB,SAAS,QAAQ;GACjB,cAAY,QAAQ;GAEnB,UAAA,QAAQ;EACD,GANH,QAAQ,KAML;CAEd,CAAC;CAED,OACE,qBAAC,OAAD;EAAK,WAAW,wBAAO;EAAvB,UAAA,CACG,yBACC,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,KAAK,MAAN;GAAW,WAAW,wBAAO;GAC1B,UAAA;EACQ,CAAA,GACX,oBAAC,WAAD;GACE,aAAY;GACZ,WAAW,wBAAO;EACnB,CAAA,CACD,EAAA,CAAA,GAEJ,qBAAC,OAAD,EAAA,UAAA,CACE,oBAAC,gBAAD,CAAiB,CAAA,GACjB,oBAAC,KAAK,cAAN,EAAA,WACI,SAAS,oBAAC,KAAK,cAAN,EAAyB,KAAO,CAAA,EAC1B,CAAA,CAChB,EAAA,CAAA,CACF;;AAET;;AAGA,IAAa,iBAAyC,UAAU;CAC9D,MAAM,EAAE,WAAW,uBAAuB,GAAG,SAAS;CACtD,MAAM,gBAAgB,KAAK,wBAAO,UAAU,wBAAO,OAAO,SAAS;CAEnE,OACE,oBAAC,KAAK,eAAN;EAAoB,GAAI;EAAM,WAAW;EACvC,UAAA,oBAAC,oBAAD,EAA2C,sBAAwB,CAAA;CACjD,CAAA;AAExB"}
1
+ {"version":3,"file":"RangeCalendar.mjs","names":["styles","_Fragment"],"sources":["../../../../../../../../../src/components/Calendar/components/RangeCalendar/RangeCalendar.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"@/components/Calendar/Calendar.module.scss\";\nimport CalendarHeader from \"../CalendarHeader\";\nimport clsx from \"clsx\";\nimport { MenuItem } from \"@/components/MenuItem\";\nimport { useCalendarDateRangePresets } from \"@/components/Calendar/components/RangeCalendar/helpers/useCalendarDateRangePresets\";\nimport { Separator } from \"@/components/Separator\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\n\nexport type RangeCalendarProps = Omit<\n Aria.RangeCalendarProps<Aria.DateValue>,\n \"children\"\n> &\n Pick<DateRangePickerProps, \"withDatePickerPresets\">;\n\n/** @internal */\nconst InnerRangeCalendar: FC<RangeCalendarProps> = ({\n withDatePickerPresets,\n}) => {\n const dateRangeHelper = useCalendarDateRangePresets(withDatePickerPresets);\n\n const predefinedDateHelperItems = dateRangeHelper.map((present) => {\n return (\n <MenuItem\n key={present.label}\n isDisabled={present.disabled}\n onPress={present.onPress}\n aria-label={present.label}\n >\n {present.label}\n </MenuItem>\n );\n });\n\n return (\n <div className={styles.container}>\n {withDatePickerPresets && (\n <>\n <Aria.Menu className={styles.presetMenu}>\n {predefinedDateHelperItems}\n </Aria.Menu>\n <Separator\n orientation=\"vertical\"\n className={styles.presetSeparator}\n />\n </>\n )}\n <div>\n <CalendarHeader />\n <Aria.CalendarGrid>\n {(date) => <Aria.CalendarCell date={date} />}\n </Aria.CalendarGrid>\n </div>\n </div>\n );\n};\n\n/** @flr-generate all */\nexport const RangeCalendar: FC<RangeCalendarProps> = (props) => {\n const { className, withDatePickerPresets, ...rest } = props;\n const rootClassName = clsx(styles.calendar, styles.range, className);\n\n return (\n <Aria.RangeCalendar {...rest} className={rootClassName}>\n <InnerRangeCalendar withDatePickerPresets={withDatePickerPresets} />\n </Aria.RangeCalendar>\n );\n};\n\nexport default RangeCalendar;\n"],"mappings":";;;;;;;;;;;;;AAiBA,IAAM,sBAA8C,EAClD,4BACI;CAGJ,MAAM,4BAFkB,4BAA4B,qBAElB,CAAA,CAAgB,KAAK,YAAY;EACjE,OACE,oBAAC,UAAD;GAEE,YAAY,QAAQ;GACpB,SAAS,QAAQ;GACjB,cAAY,QAAQ;GAEnB,UAAA,QAAQ;EACD,GANH,QAAQ,KAML;CAEd,CAAC;CAED,OACE,qBAAC,OAAD;EAAK,WAAWA,wBAAO;EAAvB,UAAA,CACG,yBACC,qBAAAC,YAAA,EAAA,UAAA,CACE,oBAAC,KAAK,MAAN;GAAW,WAAWD,wBAAO;GAC1B,UAAA;EACQ,CAAA,GACX,oBAAC,WAAD;GACE,aAAY;GACZ,WAAWA,wBAAO;EACnB,CAAA,CACD,EAAA,CAAA,GAEJ,qBAAC,OAAD,EAAA,UAAA,CACE,oBAAC,gBAAD,CAAiB,CAAA,GACjB,oBAAC,KAAK,cAAN,EAAA,WACI,SAAS,oBAAC,KAAK,cAAN,EAAyB,KAAO,CAAA,EAC1B,CAAA,CAChB,EAAA,CAAA,CACF;;AAET;;AAGA,IAAa,iBAAyC,UAAU;CAC9D,MAAM,EAAE,WAAW,uBAAuB,GAAG,SAAS;CACtD,MAAM,gBAAgB,KAAKA,wBAAO,UAAUA,wBAAO,OAAO,SAAS;CAEnE,OACE,oBAAC,KAAK,eAAN;EAAoB,GAAI;EAAM,WAAW;EACvC,UAAA,oBAAC,oBAAD,EAA2C,sBAAwB,CAAA;CACjD,CAAA;AAExB"}
@@ -1 +1 @@
1
- {"version":3,"file":"useCalendarDateRangePresets.mjs","names":[],"sources":["../../../../../../../../../../src/components/Calendar/components/RangeCalendar/helpers/useCalendarDateRangePresets.ts"],"sourcesContent":["import { DateTime } from \"luxon\";\nimport { CalendarDate, toCalendarDate } from \"@internationalized/date\";\nimport { useContext, useMemo } from \"react\";\nimport { RangeCalendarStateContext } from \"react-aria-components\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport locales from \"../../../locales/*.locale.json\";\nimport invariant from \"invariant\";\n\nexport interface DateRangePresetItem {\n start: CalendarDate;\n end: CalendarDate;\n label: string;\n}\n\nexport type DateRangePresets = DateRangePresetItem[];\n\ninterface CalendarDateRangePresetItem extends DateRangePresetItem {\n onPress: () => void;\n disabled: boolean;\n}\n\nconst clampCalendarDate = (\n date: CalendarDate,\n minDate?: CalendarDate,\n maxDate?: CalendarDate,\n) => {\n if (minDate && date.compare(minDate) < 0) {\n return minDate;\n }\n\n if (maxDate && date.compare(maxDate) > 0) {\n return maxDate;\n }\n\n return date;\n};\n\nconst clampCalendarDateRange = (\n startDate: CalendarDate,\n endDate: CalendarDate,\n minDate?: CalendarDate,\n maxDate?: CalendarDate,\n) => {\n const clampedStart = clampCalendarDate(startDate, minDate, maxDate);\n const clampedEnd = clampCalendarDate(endDate, minDate, maxDate);\n\n return {\n start: clampedStart,\n end: clampedEnd,\n invalid: clampedStart.compare(clampedEnd) > 0,\n };\n};\n\n/** @internal * */\nexport const useCalendarDateRangePresets = (\n customPresets?: DateRangePresets | boolean,\n): CalendarDateRangePresetItem[] => {\n const now = DateTime.local();\n const state = useContext(RangeCalendarStateContext);\n const stringFormatter = useLocalizedStringFormatter(locales, \"Calendar\");\n\n invariant(!!state, \"Could not find RangeCalendarStateContext.\");\n\n const minDate = state.minValue ? toCalendarDate(state.minValue) : undefined;\n const maxDate = state.maxValue ? toCalendarDate(state.maxValue) : undefined;\n\n const isValidRange = (range: { start: CalendarDate; end: CalendarDate }) =>\n !state.isInvalid(range.start) && !state.isInvalid(range.end);\n\n const possibleRanges = useMemo<DateRangePresets>(() => {\n if (typeof customPresets !== \"boolean\") {\n return customPresets ?? [];\n }\n\n const todayDate = new CalendarDate(now.year, now.month, now.day);\n const yesterdayLuxon = now.minus({ days: 1 });\n const yesterdayDate = new CalendarDate(\n yesterdayLuxon.year,\n yesterdayLuxon.month,\n yesterdayLuxon.day,\n );\n\n const thisWeekStart = now.startOf(\"week\");\n const thisWeekEnd = now.endOf(\"week\");\n const lastWeekLuxon = now.minus({ week: 1 });\n const lastWeekStart = lastWeekLuxon.startOf(\"week\");\n const lastWeekEnd = lastWeekLuxon.endOf(\"week\");\n\n const thisMonthStart = now.startOf(\"month\");\n const thisMonthEnd = now.endOf(\"month\");\n const lastMonthLuxon = now.minus({ month: 1 });\n const lastMonthStart = lastMonthLuxon.startOf(\"month\");\n const lastMonthEnd = lastMonthLuxon.endOf(\"month\");\n\n const thisYearStart = now.startOf(\"year\");\n const thisYearEnd = now.endOf(\"year\");\n const lastYearLuxon = now.minus({ year: 1 });\n const lastYearStart = lastYearLuxon.startOf(\"year\");\n const lastYearEnd = lastYearLuxon.endOf(\"year\");\n\n return [\n {\n label: stringFormatter.format(\"preset.today\"),\n start: todayDate,\n end: todayDate,\n },\n {\n label: stringFormatter.format(\"preset.yesterday\"),\n start: yesterdayDate,\n end: yesterdayDate,\n },\n {\n label: stringFormatter.format(\"preset.thisWeek\"),\n start: new CalendarDate(\n thisWeekStart.year,\n thisWeekStart.month,\n thisWeekStart.day,\n ),\n end: new CalendarDate(\n thisWeekEnd.year,\n thisWeekEnd.month,\n thisWeekEnd.day,\n ),\n },\n {\n label: stringFormatter.format(\"preset.lastWeek\"),\n start: new CalendarDate(\n lastWeekStart.year,\n lastWeekStart.month,\n lastWeekStart.day,\n ),\n end: new CalendarDate(\n lastWeekEnd.year,\n lastWeekEnd.month,\n lastWeekEnd.day,\n ),\n },\n {\n label: stringFormatter.format(\"preset.thisMonth\"),\n start: new CalendarDate(\n thisMonthStart.year,\n thisMonthStart.month,\n thisMonthStart.day,\n ),\n end: new CalendarDate(\n thisMonthEnd.year,\n thisMonthEnd.month,\n thisMonthEnd.day,\n ),\n },\n {\n label: stringFormatter.format(\"preset.lastMonth\"),\n start: new CalendarDate(\n lastMonthStart.year,\n lastMonthStart.month,\n lastMonthStart.day,\n ),\n end: new CalendarDate(\n lastMonthEnd.year,\n lastMonthEnd.month,\n lastMonthEnd.day,\n ),\n },\n {\n label: stringFormatter.format(\"preset.thisYear\"),\n start: new CalendarDate(\n thisYearStart.year,\n thisYearStart.month,\n thisYearStart.day,\n ),\n end: new CalendarDate(\n thisYearEnd.year,\n thisYearEnd.month,\n thisYearEnd.day,\n ),\n },\n {\n label: stringFormatter.format(\"preset.lastYear\"),\n start: new CalendarDate(\n lastYearStart.year,\n lastYearStart.month,\n lastYearStart.day,\n ),\n end: new CalendarDate(\n lastYearEnd.year,\n lastYearEnd.month,\n lastYearEnd.day,\n ),\n },\n ];\n }, [now, customPresets, stringFormatter]);\n\n return possibleRanges.map((range) => {\n if (\n (minDate && range.end.compare(minDate) < 0) ||\n (maxDate && range.start.compare(maxDate) > 0)\n ) {\n return {\n ...range,\n disabled: true,\n onPress: () => {\n // void\n },\n };\n }\n\n const { start, end, invalid } = clampCalendarDateRange(\n range.start,\n range.end,\n minDate,\n maxDate,\n );\n\n const presetDisabled = invalid || !isValidRange({ start, end });\n\n return {\n ...range,\n start,\n end,\n disabled: presetDisabled,\n onPress: () => {\n if (!presetDisabled) {\n state.setValue({ start, end });\n }\n },\n };\n });\n};\n"],"mappings":";;;;;;;;;;AAqBA,IAAM,qBACJ,MACA,SACA,YACG;CACH,IAAI,WAAW,KAAK,QAAQ,OAAO,IAAI,GACrC,OAAO;CAGT,IAAI,WAAW,KAAK,QAAQ,OAAO,IAAI,GACrC,OAAO;CAGT,OAAO;AACT;AAEA,IAAM,0BACJ,WACA,SACA,SACA,YACG;CACH,MAAM,eAAe,kBAAkB,WAAW,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IAAI,aACP,YAAY,MACZ,YAAY,OACZ,YAAY,GACd;GACF;EACF;CACF,GAAG;EAAC;EAAK;EAAe;CAAe,CAEhC,CAAA,CAAe,KAAK,UAAU;EACnC,IACG,WAAW,MAAM,IAAI,QAAQ,OAAO,IAAI,KACxC,WAAW,MAAM,MAAM,QAAQ,OAAO,IAAI,GAE3C,OAAO;GACL,GAAG;GACH,UAAU;GACV,eAAe,CAEf;EACF;EAGF,MAAM,EAAE,OAAO,KAAK,YAAY,uBAC9B,MAAM,OACN,MAAM,KACN,SACA,OACF;EAEA,MAAM,iBAAiB,WAAW,CAAC,aAAa;GAAE;GAAO;EAAI,CAAC;EAE9D,OAAO;GACL,GAAG;GACH;GACA;GACA,UAAU;GACV,eAAe;IACb,IAAI,CAAC,gBACH,MAAM,SAAS;KAAE;KAAO;IAAI,CAAC;GAEjC;EACF;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"useCalendarDateRangePresets.mjs","names":["locales"],"sources":["../../../../../../../../../../src/components/Calendar/components/RangeCalendar/helpers/useCalendarDateRangePresets.ts"],"sourcesContent":["import { DateTime } from \"luxon\";\nimport { CalendarDate, toCalendarDate } from \"@internationalized/date\";\nimport { useContext, useMemo } from \"react\";\nimport { RangeCalendarStateContext } from \"react-aria-components\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport locales from \"../../../locales/*.locale.json\";\nimport invariant from \"invariant\";\n\nexport interface DateRangePresetItem {\n start: CalendarDate;\n end: CalendarDate;\n label: string;\n}\n\nexport type DateRangePresets = DateRangePresetItem[];\n\ninterface CalendarDateRangePresetItem extends DateRangePresetItem {\n onPress: () => void;\n disabled: boolean;\n}\n\nconst clampCalendarDate = (\n date: CalendarDate,\n minDate?: CalendarDate,\n maxDate?: CalendarDate,\n) => {\n if (minDate && date.compare(minDate) < 0) {\n return minDate;\n }\n\n if (maxDate && date.compare(maxDate) > 0) {\n return maxDate;\n }\n\n return date;\n};\n\nconst clampCalendarDateRange = (\n startDate: CalendarDate,\n endDate: CalendarDate,\n minDate?: CalendarDate,\n maxDate?: CalendarDate,\n) => {\n const clampedStart = clampCalendarDate(startDate, minDate, maxDate);\n const clampedEnd = clampCalendarDate(endDate, minDate, maxDate);\n\n return {\n start: clampedStart,\n end: clampedEnd,\n invalid: clampedStart.compare(clampedEnd) > 0,\n };\n};\n\n/** @internal * */\nexport const useCalendarDateRangePresets = (\n customPresets?: DateRangePresets | boolean,\n): CalendarDateRangePresetItem[] => {\n const now = DateTime.local();\n const state = useContext(RangeCalendarStateContext);\n const stringFormatter = useLocalizedStringFormatter(locales, \"Calendar\");\n\n invariant(!!state, \"Could not find RangeCalendarStateContext.\");\n\n const minDate = state.minValue ? toCalendarDate(state.minValue) : undefined;\n const maxDate = state.maxValue ? toCalendarDate(state.maxValue) : undefined;\n\n const isValidRange = (range: { start: CalendarDate; end: CalendarDate }) =>\n !state.isInvalid(range.start) && !state.isInvalid(range.end);\n\n const possibleRanges = useMemo<DateRangePresets>(() => {\n if (typeof customPresets !== \"boolean\") {\n return customPresets ?? [];\n }\n\n const todayDate = new CalendarDate(now.year, now.month, now.day);\n const yesterdayLuxon = now.minus({ days: 1 });\n const yesterdayDate = new CalendarDate(\n yesterdayLuxon.year,\n yesterdayLuxon.month,\n yesterdayLuxon.day,\n );\n\n const thisWeekStart = now.startOf(\"week\");\n const thisWeekEnd = now.endOf(\"week\");\n const lastWeekLuxon = now.minus({ week: 1 });\n const lastWeekStart = lastWeekLuxon.startOf(\"week\");\n const lastWeekEnd = lastWeekLuxon.endOf(\"week\");\n\n const thisMonthStart = now.startOf(\"month\");\n const thisMonthEnd = now.endOf(\"month\");\n const lastMonthLuxon = now.minus({ month: 1 });\n const lastMonthStart = lastMonthLuxon.startOf(\"month\");\n const lastMonthEnd = lastMonthLuxon.endOf(\"month\");\n\n const thisYearStart = now.startOf(\"year\");\n const thisYearEnd = now.endOf(\"year\");\n const lastYearLuxon = now.minus({ year: 1 });\n const lastYearStart = lastYearLuxon.startOf(\"year\");\n const lastYearEnd = lastYearLuxon.endOf(\"year\");\n\n return [\n {\n label: stringFormatter.format(\"preset.today\"),\n start: todayDate,\n end: todayDate,\n },\n {\n label: stringFormatter.format(\"preset.yesterday\"),\n start: yesterdayDate,\n end: yesterdayDate,\n },\n {\n label: stringFormatter.format(\"preset.thisWeek\"),\n start: new CalendarDate(\n thisWeekStart.year,\n thisWeekStart.month,\n thisWeekStart.day,\n ),\n end: new CalendarDate(\n thisWeekEnd.year,\n thisWeekEnd.month,\n thisWeekEnd.day,\n ),\n },\n {\n label: stringFormatter.format(\"preset.lastWeek\"),\n start: new CalendarDate(\n lastWeekStart.year,\n lastWeekStart.month,\n lastWeekStart.day,\n ),\n end: new CalendarDate(\n lastWeekEnd.year,\n lastWeekEnd.month,\n lastWeekEnd.day,\n ),\n },\n {\n label: stringFormatter.format(\"preset.thisMonth\"),\n start: new CalendarDate(\n thisMonthStart.year,\n thisMonthStart.month,\n thisMonthStart.day,\n ),\n end: new CalendarDate(\n thisMonthEnd.year,\n thisMonthEnd.month,\n thisMonthEnd.day,\n ),\n },\n {\n label: stringFormatter.format(\"preset.lastMonth\"),\n start: new CalendarDate(\n lastMonthStart.year,\n lastMonthStart.month,\n lastMonthStart.day,\n ),\n end: new CalendarDate(\n lastMonthEnd.year,\n lastMonthEnd.month,\n lastMonthEnd.day,\n ),\n },\n {\n label: stringFormatter.format(\"preset.thisYear\"),\n start: new CalendarDate(\n thisYearStart.year,\n thisYearStart.month,\n thisYearStart.day,\n ),\n end: new CalendarDate(\n thisYearEnd.year,\n thisYearEnd.month,\n thisYearEnd.day,\n ),\n },\n {\n label: stringFormatter.format(\"preset.lastYear\"),\n start: new CalendarDate(\n lastYearStart.year,\n lastYearStart.month,\n lastYearStart.day,\n ),\n end: new CalendarDate(\n lastYearEnd.year,\n lastYearEnd.month,\n lastYearEnd.day,\n ),\n },\n ];\n }, [now, customPresets, stringFormatter]);\n\n return possibleRanges.map((range) => {\n if (\n (minDate && range.end.compare(minDate) < 0) ||\n (maxDate && range.start.compare(maxDate) > 0)\n ) {\n return {\n ...range,\n disabled: true,\n onPress: () => {\n // void\n },\n };\n }\n\n const { start, end, invalid } = clampCalendarDateRange(\n range.start,\n range.end,\n minDate,\n maxDate,\n );\n\n const presetDisabled = invalid || !isValidRange({ start, end });\n\n return {\n ...range,\n start,\n end,\n disabled: presetDisabled,\n onPress: () => {\n if (!presetDisabled) {\n state.setValue({ start, end });\n }\n },\n };\n });\n};\n"],"mappings":";;;;;;;;;;AAqBA,IAAM,qBACJ,MACA,SACA,YACG;CACH,IAAI,WAAW,KAAK,QAAQ,OAAO,IAAI,GACrC,OAAO;CAGT,IAAI,WAAW,KAAK,QAAQ,OAAO,IAAI,GACrC,OAAO;CAGT,OAAO;AACT;AAEA,IAAM,0BACJ,WACA,SACA,SACA,YACG;CACH,MAAM,eAAe,kBAAkB,WAAW,SAAS,OAAO;CAClE,MAAM,aAAa,kBAAkB,SAAS,SAAS,OAAO;CAE9D,OAAO;EACL,OAAO;EACP,KAAK;EACL,SAAS,aAAa,QAAQ,UAAU,IAAI;CAC9C;AACF;;AAGA,IAAa,+BACX,kBACkC;CAClC,MAAM,MAAM,SAAS,MAAM;CAC3B,MAAM,QAAQ,WAAW,yBAAyB;CAClD,MAAM,kBAAkB,4BAA4BA,kBAAS,UAAU;CAEvE,UAAU,CAAC,CAAC,OAAO,2CAA2C;CAE9D,MAAM,UAAU,MAAM,WAAW,eAAe,MAAM,QAAQ,IAAI,KAAA;CAClE,MAAM,UAAU,MAAM,WAAW,eAAe,MAAM,QAAQ,IAAI,KAAA;CAElE,MAAM,gBAAgB,UACpB,CAAC,MAAM,UAAU,MAAM,KAAK,KAAK,CAAC,MAAM,UAAU,MAAM,GAAG;CA6H7D,OA3HuB,cAAgC;EACrD,IAAI,OAAO,kBAAkB,WAC3B,OAAO,iBAAiB,CAAC;EAG3B,MAAM,YAAY,IAAI,aAAa,IAAI,MAAM,IAAI,OAAO,IAAI,GAAG;EAC/D,MAAM,iB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BAAkB;IAChD,OAAO,IAAI,aACT,eAAe,MACf,eAAe,OACf,eAAe,GACjB;IACA,KAAK,IAAI,aACP,aAAa,MACb,aAAa,OACb,aAAa,GACf;GACF;GACA;IACE,OAAO,gBAAgB,OAAO,kBAAkB;IAChD,OAAO,IAAI,aACT,eAAe,MACf,eAAe,OACf,eAAe,GACjB;IACA,KAAK,IAAI,aACP,aAAa,MACb,aAAa,OACb,aAAa,GACf;GACF;GACA;IACE,OAAO,gBAAgB,OAAO,iBAAiB;IAC/C,OAAO,IAAI,aACT,cAAc,MACd,cAAc,OACd,cAAc,GAChB;IACA,KAAK,IAAI,aACP,YAAY,MACZ,YAAY,OACZ,YAAY,GACd;GACF;GACA;IACE,OAAO,gBAAgB,OAAO,iBAAiB;IAC/C,OAAO,IAAI,aACT,cAAc,MACd,cAAc,OACd,cAAc,GAChB;IACA,KAAK,IAAI,aACP,YAAY,MACZ,YAAY,OACZ,YAAY,GACd;GACF;EACF;CACF,GAAG;EAAC;EAAK;EAAe;CAAe,CAEhC,CAAA,CAAe,KAAK,UAAU;EACnC,IACG,WAAW,MAAM,IAAI,QAAQ,OAAO,IAAI,KACxC,WAAW,MAAM,MAAM,QAAQ,OAAO,IAAI,GAE3C,OAAO;GACL,GAAG;GACH,UAAU;GACV,eAAe,CAEf;EACF;EAGF,MAAM,EAAE,OAAO,KAAK,YAAY,uBAC9B,MAAM,OACN,MAAM,KACN,SACA,OACF;EAEA,MAAM,iBAAiB,WAAW,CAAC,aAAa;GAAE;GAAO;EAAI,CAAC;EAE9D,OAAO;GACL,GAAG;GACH;GACA;GACA,UAAU;GACV,eAAe;IACb,IAAI,CAAC,gBACH,MAAM,SAAS;KAAE;KAAO;IAAI,CAAC;GAEjC;EACF;CACF,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"CartesianChart.mjs","names":[],"sources":["../../../../../../../src/components/CartesianChart/CartesianChart.tsx"],"sourcesContent":["import { ComposedChart, ResponsiveContainer } from \"recharts\";\nimport {\n type ComponentProps,\n type ComponentType,\n type FC,\n isValidElement,\n type PropsWithChildren,\n type ReactNode,\n useId,\n useMemo,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./CartesianChart.module.scss\";\nimport { useChartClipRect } from \"@/components/CartesianChart/hooks/useChartClipRect\";\nimport DivView from \"@/views/DivView\";\nimport Wrap from \"@/components/Wrap\";\nimport type {\n CartesianChartLayout,\n ChartDataValue,\n DataKeyProp,\n} from \"@/components/CartesianChart/types\";\nimport { CartesianChartContextProvider } from \"@/components/CartesianChart/context\";\nimport { TypedArea } from \"@/components/CartesianChart/components/Area\";\nimport { TypedBar } from \"@/components/CartesianChart/components/Bar\";\nimport { TypedXAxis } from \"@/components/CartesianChart/components/XAxis\";\nimport { TypedYAxis } from \"@/components/CartesianChart/components/YAxis\";\nimport { TypedChartGrid } from \"@/components/CartesianChart/components/ChartGrid\";\nimport { TypedChartLegend } from \"@/components/CartesianChart/components/ChartLegend\";\nimport { TypedChartTooltip } from \"@/components/CartesianChart/components/ChartTooltip\";\nimport { TypedLine } from \"@/components/CartesianChart/components/Line\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\n\n/** @deprecated Use a ReactNode instead */\nexport interface CartesianChartEmptyViewProps {\n data?: ComponentProps<typeof ComposedChart>[\"data\"];\n}\n\nexport interface CartesianChartProps<TData = ChartDataValue>\n extends\n Pick<\n ComponentProps<typeof ComposedChart>,\n \"className\" | \"syncId\" | \"syncMethod\"\n >,\n PropsWithChildren {\n /** The data points rendered by the chart. */\n data?: TData[];\n\n /** The height of the chart. */\n height?: string;\n\n /**\n * The orientation of the axes and graphical items. `\"horizontal\"` puts the\n * category axis on the x-axis — bars grow upwards. `\"vertical\"` puts it on\n * the y-axis — bars grow to the side. `XAxis` and `YAxis` follow the layout\n * on their own; only the `dataKey` moves to whichever axis is the categorical\n * one.\n *\n * @default \"horizontal\"\n */\n layout?: CartesianChartLayout;\n\n /** View that is provided when data is empty/undefined */\n emptyView?: ReactNode;\n\n /**\n * Allow the height controlling container to set flex-grow: 1. Can only be\n * used in combination with `height`\n */\n flexGrow?: boolean;\n}\n\n/** @flr-generate all */\nexport const CartesianChart: FC<CartesianChartProps> = (props) => {\n const {\n children,\n data,\n className,\n height,\n flexGrow,\n emptyView,\n layout = \"horizontal\",\n ...rest\n } = props;\n const warnDeprecation = useWarnDeprecation();\n\n const { viewDimensions, ref: containerRef } = useChartClipRect();\n\n const showEmptyView = !!((!data || data.length === 0) && emptyView);\n const rootClassName = clsx(\n styles.cartesianChart,\n showEmptyView && styles.emptyView,\n className,\n );\n const usesDeprecatedEmptyView = !!emptyView && !isValidElement(emptyView);\n\n if (usesDeprecatedEmptyView) {\n warnDeprecation(\n \"CartesianChart: emptyView as a non-element is deprecated and will be removed in a future release. Please provide an element as emptyView.\",\n );\n }\n\n const emptyElement = useMemo(() => {\n if (isValidElement(emptyView)) {\n return emptyView;\n }\n\n if (!emptyView) {\n return;\n }\n\n return null;\n }, [emptyView]);\n\n const chartId = useId().replaceAll(/[^\\w-]/g, \"\");\n const contextValue = useMemo(\n () => ({ layout, stackIdPrefix: `${chartId}-` }),\n [layout, chartId],\n );\n\n return (\n <CartesianChartContextProvider value={contextValue}>\n <Wrap if={height}>\n <div style={{ height, flex: flexGrow ? 1 : undefined }}>\n <ResponsiveContainer\n initialDimension={{\n // fix warning on initial render\n width: 1,\n height: 1,\n }}\n width={height ? undefined : \"100%\"}\n aspect={height ? undefined : 3}\n ref={containerRef}\n >\n <ComposedChart\n data={data}\n className={rootClassName}\n layout={layout}\n {...rest}\n >\n {children}\n {showEmptyView && viewDimensions && (\n <foreignObject {...viewDimensions}>\n <DivView className={styles.emptyViewContainer}>\n {emptyElement}\n </DivView>\n </foreignObject>\n )}\n </ComposedChart>\n </ResponsiveContainer>\n </div>\n </Wrap>\n </CartesianChartContextProvider>\n );\n};\n\nexport const typedCartesianChart = <\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n TData extends ChartDataValue<any> = ChartDataValue<any>,\n XAxisDataKey extends DataKeyProp<TData> = DataKeyProp<TData>,\n>() => ({\n Chart: CartesianChart as ComponentType<CartesianChartProps<TData>>,\n Area: TypedArea<TData>(),\n Bar: TypedBar<TData>(),\n XAxis: TypedXAxis<TData, XAxisDataKey>(),\n YAxis: TypedYAxis<TData>(),\n Grid: TypedChartGrid(),\n Legend: TypedChartLegend(),\n Tooltip: TypedChartTooltip<TData, XAxisDataKey>(),\n Line: TypedLine<TData>(),\n});\n\nexport default CartesianChart;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAwEA,IAAa,kBAA2C,UAAU;CAChE,MAAM,EACJ,UACA,MACA,WACA,QACA,UACA,WACA,SAAS,cACT,GAAG,SACD;CACJ,MAAM,kBAAkB,mBAAmB;CAE3C,MAAM,EAAE,gBAAgB,KAAK,iBAAiB,iBAAiB;CAE/D,MAAM,gBAAgB,CAAC,GAAG,CAAC,QAAQ,KAAK,WAAW,MAAM;CACzD,MAAM,gBAAgB,KACpB,8BAAO,gBACP,iBAAiB,8BAAO,WACxB,SACF;CAGA,IAFgC,CAAC,CAAC,aAAa,CAAC,eAAe,SAAS,GAGtE,gBACE,2IACF;CAGF,MAAM,eAAe,cAAc;EACjC,IAAI,eAAe,SAAS,GAC1B,OAAO;EAGT,IAAI,CAAC,WACH;EAGF,OAAO;CACT,GAAG,CAAC,SAAS,CAAC;CAEd,MAAM,UAAU,MAAM,CAAC,CAAC,WAAW,WAAW,EAAE;CAChD,MAAM,eAAe,eACZ;EAAE;EAAQ,eAAe,GAAG,QAAQ;CAAG,IAC9C,CAAC,QAAQ,OAAO,CAClB;CAEA,OACE,oBAAC,+BAAD;EAA+B,OAAO;EACpC,UAAA,oBAAC,MAAD;GAAM,IAAI;GACR,UAAA,oBAAC,OAAD;IAAK,OAAO;KAAE;KAAQ,MAAM,WAAW,IAAI,KAAA;IAAU;IACnD,UAAA,oBAAC,qBAAD;KACE,kBAAkB;MAEhB,OAAO;MACP,QAAQ;KACV;KACA,OAAO,SAAS,KAAA,IAAY;KAC5B,QAAQ,SAAS,KAAA,IAAY;KAC7B,KAAK;KAEL,UAAA,qBAAC,eAAD;MACQ;MACN,WAAW;MACH;MACR,GAAI;MAJN,UAAA,CAMG,UACA,iBAAiB,kBAChB,oBAAC,iBAAD;OAAe,GAAI;OACjB,UAAA,oBAAC,SAAD;QAAS,WAAW,8BAAO;QACxB,UAAA;OACM,CAAA;MACI,CAAA,CAEJ;;IACI,CAAA;GAClB,CAAA;EACD,CAAA;CACuB,CAAA;AAEnC;AAEA,IAAa,6BAIL;CACN,OAAO;CACP,MAAM,UAAiB;CACvB,KAAK,SAAgB;CACrB,OAAO,WAAgC;CACvC,OAAO,WAAkB;CACzB,MAAM,eAAe;CACrB,QAAQ,iBAAiB;CACzB,SAAS,kBAAuC;CAChD,MAAM,UAAiB;AACzB"}
1
+ {"version":3,"file":"CartesianChart.mjs","names":["styles"],"sources":["../../../../../../../src/components/CartesianChart/CartesianChart.tsx"],"sourcesContent":["import { ComposedChart, ResponsiveContainer } from \"recharts\";\nimport {\n type ComponentProps,\n type ComponentType,\n type FC,\n isValidElement,\n type PropsWithChildren,\n type ReactNode,\n useId,\n useMemo,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./CartesianChart.module.scss\";\nimport { useChartClipRect } from \"@/components/CartesianChart/hooks/useChartClipRect\";\nimport DivView from \"@/views/DivView\";\nimport Wrap from \"@/components/Wrap\";\nimport type {\n CartesianChartLayout,\n ChartDataValue,\n DataKeyProp,\n} from \"@/components/CartesianChart/types\";\nimport { CartesianChartContextProvider } from \"@/components/CartesianChart/context\";\nimport { TypedArea } from \"@/components/CartesianChart/components/Area\";\nimport { TypedBar } from \"@/components/CartesianChart/components/Bar\";\nimport { TypedXAxis } from \"@/components/CartesianChart/components/XAxis\";\nimport { TypedYAxis } from \"@/components/CartesianChart/components/YAxis\";\nimport { TypedChartGrid } from \"@/components/CartesianChart/components/ChartGrid\";\nimport { TypedChartLegend } from \"@/components/CartesianChart/components/ChartLegend\";\nimport { TypedChartTooltip } from \"@/components/CartesianChart/components/ChartTooltip\";\nimport { TypedLine } from \"@/components/CartesianChart/components/Line\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\n\n/** @deprecated Use a ReactNode instead */\nexport interface CartesianChartEmptyViewProps {\n data?: ComponentProps<typeof ComposedChart>[\"data\"];\n}\n\nexport interface CartesianChartProps<TData = ChartDataValue>\n extends\n Pick<\n ComponentProps<typeof ComposedChart>,\n \"className\" | \"syncId\" | \"syncMethod\"\n >,\n PropsWithChildren {\n /** The data points rendered by the chart. */\n data?: TData[];\n\n /** The height of the chart. */\n height?: string;\n\n /**\n * The orientation of the axes and graphical items. `\"horizontal\"` puts the\n * category axis on the x-axis — bars grow upwards. `\"vertical\"` puts it on\n * the y-axis — bars grow to the side. `XAxis` and `YAxis` follow the layout\n * on their own; only the `dataKey` moves to whichever axis is the categorical\n * one.\n *\n * @default \"horizontal\"\n */\n layout?: CartesianChartLayout;\n\n /** View that is provided when data is empty/undefined */\n emptyView?: ReactNode;\n\n /**\n * Allow the height controlling container to set flex-grow: 1. Can only be\n * used in combination with `height`\n */\n flexGrow?: boolean;\n}\n\n/** @flr-generate all */\nexport const CartesianChart: FC<CartesianChartProps> = (props) => {\n const {\n children,\n data,\n className,\n height,\n flexGrow,\n emptyView,\n layout = \"horizontal\",\n ...rest\n } = props;\n const warnDeprecation = useWarnDeprecation();\n\n const { viewDimensions, ref: containerRef } = useChartClipRect();\n\n const showEmptyView = !!((!data || data.length === 0) && emptyView);\n const rootClassName = clsx(\n styles.cartesianChart,\n showEmptyView && styles.emptyView,\n className,\n );\n const usesDeprecatedEmptyView = !!emptyView && !isValidElement(emptyView);\n\n if (usesDeprecatedEmptyView) {\n warnDeprecation(\n \"CartesianChart: emptyView as a non-element is deprecated and will be removed in a future release. Please provide an element as emptyView.\",\n );\n }\n\n const emptyElement = useMemo(() => {\n if (isValidElement(emptyView)) {\n return emptyView;\n }\n\n if (!emptyView) {\n return;\n }\n\n return null;\n }, [emptyView]);\n\n const chartId = useId().replaceAll(/[^\\w-]/g, \"\");\n const contextValue = useMemo(\n () => ({ layout, stackIdPrefix: `${chartId}-` }),\n [layout, chartId],\n );\n\n return (\n <CartesianChartContextProvider value={contextValue}>\n <Wrap if={height}>\n <div style={{ height, flex: flexGrow ? 1 : undefined }}>\n <ResponsiveContainer\n initialDimension={{\n // fix warning on initial render\n width: 1,\n height: 1,\n }}\n width={height ? undefined : \"100%\"}\n aspect={height ? undefined : 3}\n ref={containerRef}\n >\n <ComposedChart\n data={data}\n className={rootClassName}\n layout={layout}\n {...rest}\n >\n {children}\n {showEmptyView && viewDimensions && (\n <foreignObject {...viewDimensions}>\n <DivView className={styles.emptyViewContainer}>\n {emptyElement}\n </DivView>\n </foreignObject>\n )}\n </ComposedChart>\n </ResponsiveContainer>\n </div>\n </Wrap>\n </CartesianChartContextProvider>\n );\n};\n\nexport const typedCartesianChart = <\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n TData extends ChartDataValue<any> = ChartDataValue<any>,\n XAxisDataKey extends DataKeyProp<TData> = DataKeyProp<TData>,\n>() => ({\n Chart: CartesianChart as ComponentType<CartesianChartProps<TData>>,\n Area: TypedArea<TData>(),\n Bar: TypedBar<TData>(),\n XAxis: TypedXAxis<TData, XAxisDataKey>(),\n YAxis: TypedYAxis<TData>(),\n Grid: TypedChartGrid(),\n Legend: TypedChartLegend(),\n Tooltip: TypedChartTooltip<TData, XAxisDataKey>(),\n Line: TypedLine<TData>(),\n});\n\nexport default CartesianChart;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAwEA,IAAa,kBAA2C,UAAU;CAChE,MAAM,EACJ,UACA,MACA,WACA,QACA,UACA,WACA,SAAS,cACT,GAAG,SACD;CACJ,MAAM,kBAAkB,mBAAmB;CAE3C,MAAM,EAAE,gBAAgB,KAAK,iBAAiB,iBAAiB;CAE/D,MAAM,gBAAgB,CAAC,GAAG,CAAC,QAAQ,KAAK,W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":["../../../../../../../../../src/components/CartesianChart/components/ChartTooltip/ChartTooltip.tsx"],"sourcesContent":["import { type FC, Suspense } from \"react\";\nimport { Tooltip, type TooltipProps } from \"recharts\";\nimport type {\n NameType,\n ValueType,\n} from \"recharts/types/component/DefaultTooltipContent\";\nimport { TooltipContent } from \"@/components/CartesianChart/components/ChartTooltip/TooltipContent\";\nimport clsx from \"clsx\";\nimport styles from \"./ChartTooltip.module.scss\";\nimport LoadingSpinnerView from \"@/views/LoadingSpinnerView\";\nimport type { ChartDataValue } from \"@/components/CartesianChart/types\";\nimport type { WithTooltipFormatters } from \"@/components/CartesianChart/components/ChartTooltip/types\";\n\nexport { TypedChartTooltip } from \"./types\";\n\nexport interface ChartTooltipProps<\n TData extends ChartDataValue = ChartDataValue,\n XAxisDataKey extends keyof TData = keyof TData,\n>\n extends\n Pick<\n TooltipProps<ValueType, NameType>,\n \"wrapperClassName\" | \"allowEscapeViewBox\"\n >,\n WithTooltipFormatters<TData, XAxisDataKey> {\n /** Show progress bar for stacked areas @default \"true\" */\n showProgressBar?: boolean;\n}\n\n/** @flr-generate all */\nexport const ChartTooltip: FC<ChartTooltipProps> = (props) => {\n const {\n headingFormatter,\n formatter,\n showProgressBar = true,\n ...rest\n } = props;\n\n return (\n <Tooltip\n {...rest}\n cursor={false}\n content={(props) => {\n if (!props.active || !props.payload || props.payload.length === 0) {\n return null;\n }\n\n const className = clsx(props.wrapperClassName, styles.chartTooltip);\n return (\n <div className={className}>\n <Suspense fallback={<LoadingSpinnerView />}>\n <TooltipContent\n {...props}\n headingFormatter={headingFormatter}\n formatter={formatter}\n showProgressBar={showProgressBar}\n />\n </Suspense>\n </div>\n );\n }}\n />\n );\n};\n\nexport default ChartTooltip;\n"],"mappings":";;;;;;;;;;;;AA8BA,IAAa,gBAAuC,UAAU;CAC5D,MAAM,EACJ,kBACA,WACA,kBAAkB,MAClB,GAAG,SACD;CAEJ,OACE,oBAAC,SAAD;EACE,GAAI;EACJ,QAAQ;EACR,UAAU,UAAU;GAClB,IAAI,CAAC,MAAM,UAAU,CAAC,MAAM,WAAW,MAAM,QAAQ,WAAW,GAC9D,OAAO;GAGT,MAAM,YAAY,KAAK,MAAM,kBAAkB,4BAAO,YAAY;GAClE,OACE,oBAAC,OAAD;IAAgB;IACd,UAAA,oBAAC,UAAD;KAAU,UAAU,oBAAC,oBAAD,CAAqB,CAAA;KACvC,UAAA,oBAAC,gBAAD;MACE,GAAI;MACc;MACP;MACM;KAClB,CAAA;IACO,CAAA;GACP,CAAA;EAET;CACD,CAAA;AAEL"}
1
+ {"version":3,"file":"ChartTooltip.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/CartesianChart/components/ChartTooltip/ChartTooltip.tsx"],"sourcesContent":["import { type FC, Suspense } from \"react\";\nimport { Tooltip, type TooltipProps } from \"recharts\";\nimport type {\n NameType,\n ValueType,\n} from \"recharts/types/component/DefaultTooltipContent\";\nimport { TooltipContent } from \"@/components/CartesianChart/components/ChartTooltip/TooltipContent\";\nimport clsx from \"clsx\";\nimport styles from \"./ChartTooltip.module.scss\";\nimport LoadingSpinnerView from \"@/views/LoadingSpinnerView\";\nimport type { ChartDataValue } from \"@/components/CartesianChart/types\";\nimport type { WithTooltipFormatters } from \"@/components/CartesianChart/components/ChartTooltip/types\";\n\nexport { TypedChartTooltip } from \"./types\";\n\nexport interface ChartTooltipProps<\n TData extends ChartDataValue = ChartDataValue,\n XAxisDataKey extends keyof TData = keyof TData,\n>\n extends\n Pick<\n TooltipProps<ValueType, NameType>,\n \"wrapperClassName\" | \"allowEscapeViewBox\"\n >,\n WithTooltipFormatters<TData, XAxisDataKey> {\n /** Show progress bar for stacked areas @default \"true\" */\n showProgressBar?: boolean;\n}\n\n/** @flr-generate all */\nexport const ChartTooltip: FC<ChartTooltipProps> = (props) => {\n const {\n headingFormatter,\n formatter,\n showProgressBar = true,\n ...rest\n } = props;\n\n return (\n <Tooltip\n {...rest}\n cursor={false}\n content={(props) => {\n if (!props.active || !props.payload || props.payload.length === 0) {\n return null;\n }\n\n const className = clsx(props.wrapperClassName, styles.chartTooltip);\n return (\n <div className={className}>\n <Suspense fallback={<LoadingSpinnerView />}>\n <TooltipContent\n {...props}\n headingFormatter={headingFormatter}\n formatter={formatter}\n showProgressBar={showProgressBar}\n />\n </Suspense>\n </div>\n );\n }}\n />\n );\n};\n\nexport default ChartTooltip;\n"],"mappings":";;;;;;;;;;;;AA8BA,IAAa,gBAAuC,UAAU;CAC5D,MAAM,EACJ,kBACA,WACA,kBAAkB,MAClB,GAAG,SACD;CAEJ,OACE,oBAAC,SAAD;EACE,GAAI;EACJ,QAAQ;EACR,UAAU,UAAU;GAClB,IAAI,CAAC,MAAM,UAAU,CAAC,MAAM,WAAW,MAAM,QAAQ,WAAW,GAC9D,OAAO;GAGT,MAAM,YAAY,KAAK,MAAM,kBAAkBA,4BAAO,YAAY;GAClE,OACE,oBAAC,OAAD;IAAgB;IACd,UAAA,oBAAC,UAAD;KAAU,UAAU,oBAAC,oBAAD,CAAqB,CAAA;KACvC,UAAA,oBAAC,gBAAD;MACE,GAAI;MACc;MACP;MACM;KAClB,CAAA;IACO,CAAA;GACP,CAAA;EAET;CACD,CAAA;AAEL"}
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipProgressBar.mjs","names":[],"sources":["../../../../../../../../../src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { ProgressBar } from \"@/components/ProgressBar\";\nimport { Label } from \"@/components/Label\";\nimport type { TooltipPayloadItem } from \"@/components/CartesianChart/components/ChartTooltip/TooltipLegendItem\";\nimport locales from \"../../locales/*.locale.json\";\nimport styles from \"./ChartTooltip.module.scss\";\nimport type { WithTooltipFormatters } from \"@/components/CartesianChart\";\nimport { usePromise } from \"@mittwald/react-use-promise\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport type { ChartDataValue } from \"@/components/CartesianChart/types\";\n\ninterface TooltipProgressBarProps<\n TData extends ChartDataValue = ChartDataValue,\n TTooltipLabelValue extends keyof TData = keyof TData,\n> extends Pick<\n WithTooltipFormatters<TData, TTooltipLabelValue>,\n \"progressBarFormatter\"\n> {\n items: TooltipPayloadItem[];\n}\n\nexport const TooltipProgressBar: FC<TooltipProgressBarProps> = (props) => {\n const { items, progressBarFormatter } = props;\n\n const areaItems = items.filter(\n (item) => item.fill !== \"none\" && item.graphicalItemId.includes(\"area\"),\n );\n\n const stringFormatter = useLocalizedStringFormatter(\n locales,\n \"CartesianChart\",\n );\n\n const unit = areaItems[0]?.unit;\n\n const segments = areaItems.map((i) => ({\n title: i.dataKey as string,\n value: i.value as number,\n color: i.fill,\n }));\n\n const total = areaItems.reduce((sum, segment) => {\n if (typeof segment.value === \"number\") {\n return sum + segment.value;\n }\n\n return sum;\n }, 0);\n\n const formattedLabel = usePromise(\n (value, unit, formatter) =>\n formatter ? formatter(value, unit) : `${value}${unit ? unit : \"\"}`,\n [total, unit, progressBarFormatter] as const,\n );\n\n if (areaItems.length < 2) {\n return null;\n }\n\n return (\n <ProgressBar\n className={styles.progressBar}\n showLegend={false}\n segments={segments}\n valueLabel={formattedLabel}\n maxValue={unit === \"%\" ? undefined : total}\n >\n <Label>{stringFormatter.format(\"tooltip.progressBar.total\")}</Label>\n </ProgressBar>\n );\n};\n"],"mappings":";;;;;;;;;;AAqBA,IAAa,sBAAmD,UAAU;CACxE,MAAM,EAAE,OAAO,yBAAyB;CAExC,MAAM,YAAY,MAAM,QACrB,SAAS,KAAK,SAAS,UAAU,KAAK,gBAAgB,SAAS,MAAM,CACxE;CAEA,MAAM,kBAAkB,4BACtB,kBACA,gBACF;CAEA,MAAM,OAAO,UAAU,EAAE,EAAE;CAE3B,MAAM,WAAW,UAAU,KAAK,OAAO;EACrC,OAAO,EAAE;EACT,OAAO,EAAE;EACT,OAAO,EAAE;CACX,EAAE;CAEF,MAAM,QAAQ,UAAU,QAAQ,KAAK,YAAY;EAC/C,IAAI,OAAO,QAAQ,UAAU,UAC3B,OAAO,MAAM,QAAQ;EAGvB,OAAO;CACT,GAAG,CAAC;CAEJ,MAAM,iBAAiB,YACpB,OAAO,MAAM,cACZ,YAAY,UAAU,OAAO,IAAI,IAAI,GAAG,QAAQ,OAAO,OAAO,MAChE;EAAC;EAAO;EAAM;CAAoB,CACpC;CAEA,IAAI,UAAU,SAAS,GACrB,OAAO;CAGT,OACE,oBAAC,aAAD;EACE,WAAW,4BAAO;EAClB,YAAY;EACF;EACV,YAAY;EACZ,UAAU,SAAS,MAAM,KAAA,IAAY;EAErC,UAAA,oBAAC,OAAD,EAAA,UAAQ,gBAAgB,OAAO,2BAA2B,EAAS,CAAA;CACxD,CAAA;AAEjB"}
1
+ {"version":3,"file":"TooltipProgressBar.mjs","names":["locales","styles"],"sources":["../../../../../../../../../src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { ProgressBar } from \"@/components/ProgressBar\";\nimport { Label } from \"@/components/Label\";\nimport type { TooltipPayloadItem } from \"@/components/CartesianChart/components/ChartTooltip/TooltipLegendItem\";\nimport locales from \"../../locales/*.locale.json\";\nimport styles from \"./ChartTooltip.module.scss\";\nimport type { WithTooltipFormatters } from \"@/components/CartesianChart\";\nimport { usePromise } from \"@mittwald/react-use-promise\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport type { ChartDataValue } from \"@/components/CartesianChart/types\";\n\ninterface TooltipProgressBarProps<\n TData extends ChartDataValue = ChartDataValue,\n TTooltipLabelValue extends keyof TData = keyof TData,\n> extends Pick<\n WithTooltipFormatters<TData, TTooltipLabelValue>,\n \"progressBarFormatter\"\n> {\n items: TooltipPayloadItem[];\n}\n\nexport const TooltipProgressBar: FC<TooltipProgressBarProps> = (props) => {\n const { items, progressBarFormatter } = props;\n\n const areaItems = items.filter(\n (item) => item.fill !== \"none\" && item.graphicalItemId.includes(\"area\"),\n );\n\n const stringFormatter = useLocalizedStringFormatter(\n locales,\n \"CartesianChart\",\n );\n\n const unit = areaItems[0]?.unit;\n\n const segments = areaItems.map((i) => ({\n title: i.dataKey as string,\n value: i.value as number,\n color: i.fill,\n }));\n\n const total = areaItems.reduce((sum, segment) => {\n if (typeof segment.value === \"number\") {\n return sum + segment.value;\n }\n\n return sum;\n }, 0);\n\n const formattedLabel = usePromise(\n (value, unit, formatter) =>\n formatter ? formatter(value, unit) : `${value}${unit ? unit : \"\"}`,\n [total, unit, progressBarFormatter] as const,\n );\n\n if (areaItems.length < 2) {\n return null;\n }\n\n return (\n <ProgressBar\n className={styles.progressBar}\n showLegend={false}\n segments={segments}\n valueLabel={formattedLabel}\n maxValue={unit === \"%\" ? undefined : total}\n >\n <Label>{stringFormatter.format(\"tooltip.progressBar.total\")}</Label>\n </ProgressBar>\n );\n};\n"],"mappings":";;;;;;;;;;AAqBA,IAAa,sBAAmD,UAAU;CACxE,MAAM,EAAE,OAAO,yBAAyB;CAExC,MAAM,YAAY,MAAM,QACrB,SAAS,KAAK,SAAS,UAAU,KAAK,gBAAgB,SAAS,MAAM,CACxE;CAEA,MAAM,kBAAkB,4BACtBA,kBACA,gBACF;CAEA,MAAM,OAAO,UAAU,EAAE,EAAE;CAE3B,MAAM,WAAW,UAAU,KAAK,OAAO;EACrC,OAAO,EAAE;EACT,OAAO,EAAE;EACT,OAAO,EAAE;CACX,EAAE;CAEF,MAAM,QAAQ,UAAU,QAAQ,KAAK,YAAY;EAC/C,IAAI,OAAO,QAAQ,UAAU,UAC3B,OAAO,MAAM,QAAQ;EAGvB,OAAO;CACT,GAAG,CAAC;CAEJ,MAAM,iBAAiB,YACpB,OAAO,MAAM,cACZ,YAAY,UAAU,OAAO,IAAI,IAAI,GAAG,QAAQ,OAAO,OAAO,MAChE;EAAC;EAAO;EAAM;CAAoB,CACpC;CAEA,IAAI,UAAU,SAAS,GACrB,OAAO;CAGT,OACE,oBAAC,aAAD;EACE,WAAWC,4BAAO;EAClB,YAAY;EACF;EACV,YAAY;EACZ,UAAU,SAAS,MAAM,KAAA,IAAY;EAErC,UAAA,oBAAC,OAAD,EAAA,UAAQ,gBAAgB,OAAO,2BAA2B,EAAS,CAAA;CACxD,CAAA;AAEjB"}