@mittwald/flow-react-components 1.5.0-next.4 → 1.5.0-next.41

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 (560) hide show
  1. package/AGENTS.md +31 -11
  2. package/USAGE.md +7 -0
  3. package/dist/assets/component-index.json +1 -1
  4. package/dist/assets/doc-properties.json +1 -1
  5. package/dist/css/all-layered.css +1 -1
  6. package/dist/css/all.css +1 -1
  7. package/dist/js/_virtual/_23.locale.mjs +2 -2
  8. package/dist/js/_virtual/_32.locale.mjs +3 -9
  9. package/dist/js/_virtual/_33.locale.mjs +5 -7
  10. package/dist/js/_virtual/_34.locale.mjs +7 -13
  11. package/dist/js/_virtual/_35.locale.mjs +23 -0
  12. package/dist/js/default.mjs +3 -2
  13. package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
  14. package/dist/js/packages/components/src/components/Accordion/Accordion.mjs.map +1 -1
  15. package/dist/js/packages/components/src/components/Accordion/Accordion.module.mjs.map +1 -1
  16. package/dist/js/packages/components/src/components/Action/lib/ariaLive.mjs.map +1 -1
  17. package/dist/js/packages/components/src/components/Action/models/ActionState.mjs.map +1 -1
  18. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
  19. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.module.mjs.map +1 -1
  20. package/dist/js/packages/components/src/components/Alert/Alert.mjs +3 -1
  21. package/dist/js/packages/components/src/components/Alert/Alert.mjs.map +1 -1
  22. package/dist/js/packages/components/src/components/Alert/Alert.module.mjs +4 -2
  23. package/dist/js/packages/components/src/components/Alert/Alert.module.mjs.map +1 -1
  24. package/dist/js/packages/components/src/components/AlertBadge/AlertBadge.mjs +7 -4
  25. package/dist/js/packages/components/src/components/AlertBadge/AlertBadge.mjs.map +1 -1
  26. package/dist/js/packages/components/src/components/AlertBadge/AlertBadge.module.mjs +6 -2
  27. package/dist/js/packages/components/src/components/AlertBadge/AlertBadge.module.mjs.map +1 -1
  28. package/dist/js/packages/components/src/components/AlertIcon/AlertIcon.mjs +10 -0
  29. package/dist/js/packages/components/src/components/AlertIcon/AlertIcon.mjs.map +1 -1
  30. package/dist/js/packages/components/src/components/AlertText/AlertText.mjs +9 -2
  31. package/dist/js/packages/components/src/components/AlertText/AlertText.mjs.map +1 -1
  32. package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs +14 -7
  33. package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
  34. package/dist/js/packages/components/src/components/Avatar/Avatar.mjs +11 -2
  35. package/dist/js/packages/components/src/components/Avatar/Avatar.mjs.map +1 -1
  36. package/dist/js/packages/components/src/components/Avatar/Avatar.module.mjs +6 -2
  37. package/dist/js/packages/components/src/components/Avatar/Avatar.module.mjs.map +1 -1
  38. package/dist/js/packages/components/src/components/AvatarStack/AvatarStack.mjs +1 -1
  39. package/dist/js/packages/components/src/components/AvatarStack/AvatarStack.mjs.map +1 -1
  40. package/dist/js/packages/components/src/components/Badge/Badge.mjs +6 -3
  41. package/dist/js/packages/components/src/components/Badge/Badge.mjs.map +1 -1
  42. package/dist/js/packages/components/src/components/Badge/Badge.module.mjs +6 -2
  43. package/dist/js/packages/components/src/components/Badge/Badge.module.mjs.map +1 -1
  44. package/dist/js/packages/components/src/components/BigNumber/BigNumber.mjs.map +1 -1
  45. package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.mjs +3 -1
  46. package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.mjs.map +1 -1
  47. package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.module.mjs +3 -1
  48. package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.module.mjs.map +1 -1
  49. package/dist/js/packages/components/src/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.mjs.map +1 -1
  50. package/dist/js/packages/components/src/components/Button/Button.mjs +14 -18
  51. package/dist/js/packages/components/src/components/Button/Button.mjs.map +1 -1
  52. package/dist/js/packages/components/src/components/Button/Button.module.mjs +6 -2
  53. package/dist/js/packages/components/src/components/Button/Button.module.mjs.map +1 -1
  54. package/dist/js/packages/components/src/components/Calendar/Calendar.mjs.map +1 -1
  55. package/dist/js/packages/components/src/components/Calendar/components/CalendarHeader/CalendarHeader.mjs.map +1 -1
  56. package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/RangeCalendar.mjs.map +1 -1
  57. package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/helpers/useCalendarDateRangePresets.mjs.map +1 -1
  58. package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
  59. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/ChartTooltip.mjs.map +1 -1
  60. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipLegendItem.mjs.map +1 -1
  61. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.mjs.map +1 -1
  62. package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs +5 -1
  63. package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs.map +1 -1
  64. package/dist/js/packages/components/src/components/Chat/Chat.mjs.map +1 -1
  65. package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs +3 -3
  66. package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs.map +1 -1
  67. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs +3 -3
  68. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
  69. package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs +3 -3
  70. package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
  71. package/dist/js/packages/components/src/components/CoachMark/CoachMark.mjs.map +1 -1
  72. package/dist/js/packages/components/src/components/CodeBlock/CodeBlock.mjs.map +1 -1
  73. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs +35 -16
  74. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs.map +1 -1
  75. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.module.mjs.map +1 -1
  76. package/dist/js/packages/components/src/components/CodeEditor/hooks/useCodeEditorExtensions.mjs +2 -2
  77. package/dist/js/packages/components/src/components/CodeEditor/hooks/useCodeEditorExtensions.mjs.map +1 -1
  78. package/dist/js/packages/components/src/components/CodeEditor/languages/dotEnv/index.mjs.map +1 -1
  79. package/dist/js/packages/components/src/components/CodeEditor/languages/index.mjs +2 -1
  80. package/dist/js/packages/components/src/components/CodeEditor/languages/index.mjs.map +1 -1
  81. package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs.map +1 -1
  82. package/dist/js/packages/components/src/components/Color/Color.mjs.map +1 -1
  83. package/dist/js/packages/components/src/components/ColumnLayout/ColumnLayout.mjs.map +1 -1
  84. package/dist/js/packages/components/src/components/Combine/Combine.mjs +1 -0
  85. package/dist/js/packages/components/src/components/Combine/Combine.mjs.map +1 -1
  86. package/dist/js/packages/components/src/components/Combine/Combine.module.mjs +4 -2
  87. package/dist/js/packages/components/src/components/Combine/Combine.module.mjs.map +1 -1
  88. package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs +3 -3
  89. package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
  90. package/dist/js/packages/components/src/components/Content/Content.mjs +2 -1
  91. package/dist/js/packages/components/src/components/Content/Content.mjs.map +1 -1
  92. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs +5 -1
  93. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
  94. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs.map +1 -1
  95. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.mjs.map +1 -1
  96. package/dist/js/packages/components/src/components/ContextualHelp/ContextualHelp.mjs.map +1 -1
  97. package/dist/js/packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs.map +1 -1
  98. package/dist/js/packages/components/src/components/CopyButton/CopyButton.mjs.map +1 -1
  99. package/dist/js/packages/components/src/components/CounterBadge/CounterBadge.mjs +4 -1
  100. package/dist/js/packages/components/src/components/CounterBadge/CounterBadge.mjs.map +1 -1
  101. package/dist/js/packages/components/src/components/CounterBadge/CounterBadge.module.mjs +8 -2
  102. package/dist/js/packages/components/src/components/CounterBadge/CounterBadge.module.mjs.map +1 -1
  103. package/dist/js/packages/components/src/components/CountryOptions/CountryOptions.mjs.map +1 -1
  104. package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs +6 -5
  105. package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs.map +1 -1
  106. package/dist/js/packages/components/src/components/DatePicker/components/DateInput/DateInput.mjs.map +1 -1
  107. package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs +4 -3
  108. package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs.map +1 -1
  109. package/dist/js/packages/components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.mjs.map +1 -1
  110. package/dist/js/packages/components/src/components/DonutChart/DonutChart.mjs.map +1 -1
  111. package/dist/js/packages/components/src/components/DonutChart/components/Donut.mjs.map +1 -1
  112. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs.map +1 -1
  113. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartLegend.mjs.map +1 -1
  114. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartValue.mjs +1 -1
  115. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartValue.mjs.map +1 -1
  116. package/dist/js/packages/components/src/components/EmulatedBoldText/EmulatedBoldText.mjs.map +1 -1
  117. package/dist/js/packages/components/src/components/FieldDescription/FieldDescription.mjs.map +1 -1
  118. package/dist/js/packages/components/src/components/FieldError/FieldError.mjs +40 -31
  119. package/dist/js/packages/components/src/components/FieldError/FieldError.mjs.map +1 -1
  120. package/dist/js/packages/components/src/components/FileCard/FileCard.mjs.map +1 -1
  121. package/dist/js/packages/components/src/components/FileCard/components/Avatar/Avatar.mjs.map +1 -1
  122. package/dist/js/packages/components/src/components/FileCard/components/DeleteButton/DeleteButton.mjs.map +1 -1
  123. package/dist/js/packages/components/src/components/FileCard/components/FileSizeText/FileSizeText.mjs.map +1 -1
  124. package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs +8 -6
  125. package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
  126. package/dist/js/packages/components/src/components/FileField/FileField.mjs +3 -3
  127. package/dist/js/packages/components/src/components/FileField/FileField.mjs.map +1 -1
  128. package/dist/js/packages/components/src/components/FileField/components/FileInput.mjs.map +1 -1
  129. package/dist/js/packages/components/src/components/Flex/Flex.mjs.map +1 -1
  130. package/dist/js/packages/components/src/components/Header/Header.mjs.map +1 -1
  131. package/dist/js/packages/components/src/components/HeaderNavigation/HeaderNavigation.mjs.map +1 -1
  132. package/dist/js/packages/components/src/components/Heading/Heading.mjs +8 -1
  133. package/dist/js/packages/components/src/components/Heading/Heading.mjs.map +1 -1
  134. package/dist/js/packages/components/src/components/Icon/Icon.mjs +9 -0
  135. package/dist/js/packages/components/src/components/Icon/Icon.mjs.map +1 -1
  136. package/dist/js/packages/components/src/components/Icon/Icon.module.mjs +6 -2
  137. package/dist/js/packages/components/src/components/Icon/Icon.module.mjs.map +1 -1
  138. package/dist/js/packages/components/src/components/Icon/components/icons/IconAI.mjs.map +1 -1
  139. package/dist/js/packages/components/src/components/Icon/components/icons/IconAIHosting.mjs.map +1 -1
  140. package/dist/js/packages/components/src/components/Icon/components/icons/IconAnalytics.mjs.map +1 -1
  141. package/dist/js/packages/components/src/components/Icon/components/icons/IconApp.mjs.map +1 -1
  142. package/dist/js/packages/components/src/components/Icon/components/icons/IconAscending.mjs.map +1 -1
  143. package/dist/js/packages/components/src/components/Icon/components/icons/IconAttachment.mjs.map +1 -1
  144. package/dist/js/packages/components/src/components/Icon/components/icons/IconAutoresponder.mjs.map +1 -1
  145. package/dist/js/packages/components/src/components/Icon/components/icons/IconBackLink.mjs.map +1 -1
  146. package/dist/js/packages/components/src/components/Icon/components/icons/IconBackup.mjs.map +1 -1
  147. package/dist/js/packages/components/src/components/Icon/components/icons/IconBold.mjs.map +1 -1
  148. package/dist/js/packages/components/src/components/Icon/components/icons/IconCamera.mjs.map +1 -1
  149. package/dist/js/packages/components/src/components/Icon/components/icons/IconCertificate.mjs.map +1 -1
  150. package/dist/js/packages/components/src/components/Icon/components/icons/IconChangelog.mjs.map +1 -1
  151. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheck.mjs.map +1 -1
  152. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxChecked.mjs.map +1 -1
  153. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxEmpty.mjs.map +1 -1
  154. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxIndeterminate.mjs.map +1 -1
  155. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronDown.mjs.map +1 -1
  156. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronLeft.mjs.map +1 -1
  157. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronRight.mjs.map +1 -1
  158. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronUp.mjs.map +1 -1
  159. package/dist/js/packages/components/src/components/Icon/components/icons/IconClose.mjs.map +1 -1
  160. package/dist/js/packages/components/src/components/Icon/components/icons/IconCode.mjs.map +1 -1
  161. package/dist/js/packages/components/src/components/Icon/components/icons/IconContainer.mjs.map +1 -1
  162. package/dist/js/packages/components/src/components/Icon/components/icons/IconContextMenu.mjs.map +1 -1
  163. package/dist/js/packages/components/src/components/Icon/components/icons/IconContextMenuVertical.mjs.map +1 -1
  164. package/dist/js/packages/components/src/components/Icon/components/icons/IconContract.mjs.map +1 -1
  165. package/dist/js/packages/components/src/components/Icon/components/icons/IconContractPartner.mjs.map +1 -1
  166. package/dist/js/packages/components/src/components/Icon/components/icons/IconContributor.mjs.map +1 -1
  167. package/dist/js/packages/components/src/components/Icon/components/icons/IconCopy.mjs.map +1 -1
  168. package/dist/js/packages/components/src/components/Icon/components/icons/IconCronjob.mjs.map +1 -1
  169. package/dist/js/packages/components/src/components/Icon/components/icons/IconCustomer.mjs.map +1 -1
  170. package/dist/js/packages/components/src/components/Icon/components/icons/IconDanger.mjs.map +1 -1
  171. package/dist/js/packages/components/src/components/Icon/components/icons/IconDashboard.mjs.map +1 -1
  172. package/dist/js/packages/components/src/components/Icon/components/icons/IconDatabase.mjs.map +1 -1
  173. package/dist/js/packages/components/src/components/Icon/components/icons/IconDate.mjs.map +1 -1
  174. package/dist/js/packages/components/src/components/Icon/components/icons/IconDelete.mjs.map +1 -1
  175. package/dist/js/packages/components/src/components/Icon/components/icons/IconDeliveryBox.mjs.map +1 -1
  176. package/dist/js/packages/components/src/components/Icon/components/icons/IconDescending.mjs.map +1 -1
  177. package/dist/js/packages/components/src/components/Icon/components/icons/IconDesktop.mjs.map +1 -1
  178. package/dist/js/packages/components/src/components/Icon/components/icons/IconDirectory.mjs.map +1 -1
  179. package/dist/js/packages/components/src/components/Icon/components/icons/IconDnsSubZone.mjs.map +1 -1
  180. package/dist/js/packages/components/src/components/Icon/components/icons/IconDnsZone.mjs.map +1 -1
  181. package/dist/js/packages/components/src/components/Icon/components/icons/IconDomain.mjs.map +1 -1
  182. package/dist/js/packages/components/src/components/Icon/components/icons/IconDownload.mjs.map +1 -1
  183. package/dist/js/packages/components/src/components/Icon/components/icons/IconEdit.mjs.map +1 -1
  184. package/dist/js/packages/components/src/components/Icon/components/icons/IconEmail.mjs.map +1 -1
  185. package/dist/js/packages/components/src/components/Icon/components/icons/IconEmailArchive.mjs.map +1 -1
  186. package/dist/js/packages/components/src/components/Icon/components/icons/IconExtension.mjs.map +1 -1
  187. package/dist/js/packages/components/src/components/Icon/components/icons/IconExternalLink.mjs.map +1 -1
  188. package/dist/js/packages/components/src/components/Icon/components/icons/IconFailed.mjs.map +1 -1
  189. package/dist/js/packages/components/src/components/Icon/components/icons/IconFeedback.mjs.map +1 -1
  190. package/dist/js/packages/components/src/components/Icon/components/icons/IconFile.mjs.map +1 -1
  191. package/dist/js/packages/components/src/components/Icon/components/icons/IconFilter.mjs.map +1 -1
  192. package/dist/js/packages/components/src/components/Icon/components/icons/IconForwardAddress.mjs.map +1 -1
  193. package/dist/js/packages/components/src/components/Icon/components/icons/IconForwardLink.mjs.map +1 -1
  194. package/dist/js/packages/components/src/components/Icon/components/icons/IconHide.mjs.map +1 -1
  195. package/dist/js/packages/components/src/components/Icon/components/icons/IconHome.mjs.map +1 -1
  196. package/dist/js/packages/components/src/components/Icon/components/icons/IconImage.mjs.map +1 -1
  197. package/dist/js/packages/components/src/components/Icon/components/icons/IconInfo.mjs.map +1 -1
  198. package/dist/js/packages/components/src/components/Icon/components/icons/IconInvite.mjs.map +1 -1
  199. package/dist/js/packages/components/src/components/Icon/components/icons/IconInvoice.mjs.map +1 -1
  200. package/dist/js/packages/components/src/components/Icon/components/icons/IconItalic.mjs.map +1 -1
  201. package/dist/js/packages/components/src/components/Icon/components/icons/IconKnowledgeHint.mjs.map +1 -1
  202. package/dist/js/packages/components/src/components/Icon/components/icons/IconLanguage.mjs.map +1 -1
  203. package/dist/js/packages/components/src/components/Icon/components/icons/IconLeadFyndr.mjs.map +1 -1
  204. package/dist/js/packages/components/src/components/Icon/components/icons/IconLink.mjs.map +1 -1
  205. package/dist/js/packages/components/src/components/Icon/components/icons/IconLock.mjs.map +1 -1
  206. package/dist/js/packages/components/src/components/Icon/components/icons/IconLockOpen.mjs.map +1 -1
  207. package/dist/js/packages/components/src/components/Icon/components/icons/IconLogout.mjs.map +1 -1
  208. package/dist/js/packages/components/src/components/Icon/components/icons/IconMainUser.mjs.map +1 -1
  209. package/dist/js/packages/components/src/components/Icon/components/icons/IconMarketplace.mjs.map +1 -1
  210. package/dist/js/packages/components/src/components/Icon/components/icons/IconMaximize.mjs.map +1 -1
  211. package/dist/js/packages/components/src/components/Icon/components/icons/IconMember.mjs.map +1 -1
  212. package/dist/js/packages/components/src/components/Icon/components/icons/IconMenu.mjs.map +1 -1
  213. package/dist/js/packages/components/src/components/Icon/components/icons/IconMinimize.mjs.map +1 -1
  214. package/dist/js/packages/components/src/components/Icon/components/icons/IconMinus.mjs.map +1 -1
  215. package/dist/js/packages/components/src/components/Icon/components/icons/IconMittwald.mjs.map +1 -1
  216. package/dist/js/packages/components/src/components/Icon/components/icons/IconMobile.mjs.map +1 -1
  217. package/dist/js/packages/components/src/components/Icon/components/icons/IconMonitoring.mjs.map +1 -1
  218. package/dist/js/packages/components/src/components/Icon/components/icons/IconMove.mjs.map +1 -1
  219. package/dist/js/packages/components/src/components/Icon/components/icons/IconNewsletter.mjs.map +1 -1
  220. package/dist/js/packages/components/src/components/Icon/components/icons/IconNotification.mjs.map +1 -1
  221. package/dist/js/packages/components/src/components/Icon/components/icons/IconNumber.mjs.map +1 -1
  222. package/dist/js/packages/components/src/components/Icon/components/icons/IconOrder.mjs.map +1 -1
  223. package/dist/js/packages/components/src/components/Icon/components/icons/IconOrderedList.mjs.map +1 -1
  224. package/dist/js/packages/components/src/components/Icon/components/icons/IconPassword.mjs.map +1 -1
  225. package/dist/js/packages/components/src/components/Icon/components/icons/IconPath.mjs.map +1 -1
  226. package/dist/js/packages/components/src/components/Icon/components/icons/IconPause.mjs.map +1 -1
  227. package/dist/js/packages/components/src/components/Icon/components/icons/IconPayment.mjs.map +1 -1
  228. package/dist/js/packages/components/src/components/Icon/components/icons/IconPending.mjs.map +1 -1
  229. package/dist/js/packages/components/src/components/Icon/components/icons/IconPicture.mjs.map +1 -1
  230. package/dist/js/packages/components/src/components/Icon/components/icons/IconPlus.mjs.map +1 -1
  231. package/dist/js/packages/components/src/components/Icon/components/icons/IconProject.mjs.map +1 -1
  232. package/dist/js/packages/components/src/components/Icon/components/icons/IconQuote.mjs.map +1 -1
  233. package/dist/js/packages/components/src/components/Icon/components/icons/IconRadioOff.mjs.map +1 -1
  234. package/dist/js/packages/components/src/components/Icon/components/icons/IconRadioOn.mjs.map +1 -1
  235. package/dist/js/packages/components/src/components/Icon/components/icons/IconRedo.mjs.map +1 -1
  236. package/dist/js/packages/components/src/components/Icon/components/icons/IconRefresh.mjs.map +1 -1
  237. package/dist/js/packages/components/src/components/Icon/components/icons/IconRegistry.mjs.map +1 -1
  238. package/dist/js/packages/components/src/components/Icon/components/icons/IconSave.mjs.map +1 -1
  239. package/dist/js/packages/components/src/components/Icon/components/icons/IconSearch.mjs.map +1 -1
  240. package/dist/js/packages/components/src/components/Icon/components/icons/IconSecurity.mjs.map +1 -1
  241. package/dist/js/packages/components/src/components/Icon/components/icons/IconSend.mjs.map +1 -1
  242. package/dist/js/packages/components/src/components/Icon/components/icons/IconServer.mjs.map +1 -1
  243. package/dist/js/packages/components/src/components/Icon/components/icons/IconSettings.mjs.map +1 -1
  244. package/dist/js/packages/components/src/components/Icon/components/icons/IconShare.mjs.map +1 -1
  245. package/dist/js/packages/components/src/components/Icon/components/icons/IconShow.mjs.map +1 -1
  246. package/dist/js/packages/components/src/components/Icon/components/icons/IconSorting.mjs.map +1 -1
  247. package/dist/js/packages/components/src/components/Icon/components/icons/IconSsh.mjs.map +1 -1
  248. package/dist/js/packages/components/src/components/Icon/components/icons/IconSshKey.mjs.map +1 -1
  249. package/dist/js/packages/components/src/components/Icon/components/icons/IconSshSftp.mjs.map +1 -1
  250. package/dist/js/packages/components/src/components/Icon/components/icons/IconStack.mjs.map +1 -1
  251. package/dist/js/packages/components/src/components/Icon/components/icons/IconStar.mjs.map +1 -1
  252. package/dist/js/packages/components/src/components/Icon/components/icons/IconStarFilled.mjs.map +1 -1
  253. package/dist/js/packages/components/src/components/Icon/components/icons/IconStart.mjs.map +1 -1
  254. package/dist/js/packages/components/src/components/Icon/components/icons/IconStrikeThrough.mjs.map +1 -1
  255. package/dist/js/packages/components/src/components/Icon/components/icons/IconSubdomain.mjs.map +1 -1
  256. package/dist/js/packages/components/src/components/Icon/components/icons/IconSucceeded.mjs.map +1 -1
  257. package/dist/js/packages/components/src/components/Icon/components/icons/IconSuccess.mjs.map +1 -1
  258. package/dist/js/packages/components/src/components/Icon/components/icons/IconSupport.mjs.map +1 -1
  259. package/dist/js/packages/components/src/components/Icon/components/icons/IconTerminate.mjs.map +1 -1
  260. package/dist/js/packages/components/src/components/Icon/components/icons/IconTicket.mjs.map +1 -1
  261. package/dist/js/packages/components/src/components/Icon/components/icons/IconTime.mjs.map +1 -1
  262. package/dist/js/packages/components/src/components/Icon/components/icons/IconUnavailable.mjs.map +1 -1
  263. package/dist/js/packages/components/src/components/Icon/components/icons/IconUndo.mjs.map +1 -1
  264. package/dist/js/packages/components/src/components/Icon/components/icons/IconUnorderedList.mjs.map +1 -1
  265. package/dist/js/packages/components/src/components/Icon/components/icons/IconUpload.mjs.map +1 -1
  266. package/dist/js/packages/components/src/components/Icon/components/icons/IconUser.mjs.map +1 -1
  267. package/dist/js/packages/components/src/components/Icon/components/icons/IconVhost.mjs.map +1 -1
  268. package/dist/js/packages/components/src/components/Icon/components/icons/IconView.mjs.map +1 -1
  269. package/dist/js/packages/components/src/components/Icon/components/icons/IconVolume.mjs.map +1 -1
  270. package/dist/js/packages/components/src/components/Icon/components/icons/IconWarning.mjs.map +1 -1
  271. package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map +1 -1
  272. package/dist/js/packages/components/src/components/Image/Image.mjs +23 -0
  273. package/dist/js/packages/components/src/components/Image/Image.mjs.map +1 -1
  274. package/dist/js/packages/components/src/components/Image/Image.module.mjs +6 -2
  275. package/dist/js/packages/components/src/components/Image/Image.module.mjs.map +1 -1
  276. package/dist/js/packages/components/src/components/ImageCropper/ImageCropper.mjs.map +1 -1
  277. package/dist/js/packages/components/src/components/Initials/Initials.mjs +4 -1
  278. package/dist/js/packages/components/src/components/Initials/Initials.mjs.map +1 -1
  279. package/dist/js/packages/components/src/components/Initials/Initials.module.mjs +8 -2
  280. package/dist/js/packages/components/src/components/Initials/Initials.module.mjs.map +1 -1
  281. package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs.map +1 -1
  282. package/dist/js/packages/components/src/components/InlineCode/InlineCode.mjs +8 -1
  283. package/dist/js/packages/components/src/components/InlineCode/InlineCode.mjs.map +1 -1
  284. package/dist/js/packages/components/src/components/Kbd/Kbd.mjs.map +1 -1
  285. package/dist/js/packages/components/src/components/Label/Label.mjs +9 -2
  286. package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
  287. package/dist/js/packages/components/src/components/LabeledValue/LabeledValue.mjs.map +1 -1
  288. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs +2 -1
  289. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs.map +1 -1
  290. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.module.mjs +3 -1
  291. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.module.mjs.map +1 -1
  292. package/dist/js/packages/components/src/components/Legend/Legend.mjs.map +1 -1
  293. package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs +5 -2
  294. package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs.map +1 -1
  295. package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.module.mjs +6 -2
  296. package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.module.mjs.map +1 -1
  297. package/dist/js/packages/components/src/components/LightBox/LightBox.mjs.map +1 -1
  298. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/Controls.mjs.map +1 -1
  299. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/LightBoxGallery.mjs.map +1 -1
  300. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/LightBoxGallery.module.mjs.map +1 -1
  301. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGalleryItem/LightBoxGalleryItem.mjs.map +1 -1
  302. package/dist/js/packages/components/src/components/Link/Link.mjs +34 -14
  303. package/dist/js/packages/components/src/components/Link/Link.mjs.map +1 -1
  304. package/dist/js/packages/components/src/components/Link/components/LinkIcon/LinkIcon.mjs.map +1 -1
  305. package/dist/js/packages/components/src/components/List/List.mjs.map +1 -1
  306. package/dist/js/packages/components/src/components/List/components/DataLoader/DataLoaderSuspense.mjs.map +1 -1
  307. package/dist/js/packages/components/src/components/List/components/EmptySearchResultView/EmptySearchResultView.mjs.map +1 -1
  308. package/dist/js/packages/components/src/components/List/components/EmptyView/EmptyView.mjs.map +1 -1
  309. package/dist/js/packages/components/src/components/List/components/Footer/Footer.mjs.map +1 -1
  310. package/dist/js/packages/components/src/components/List/components/Footer/components/PaginationInfos/PaginationInfos.mjs.map +1 -1
  311. package/dist/js/packages/components/src/components/List/components/Footer/components/ShowNextBatchButton/ShowNextBatchButton.mjs.map +1 -1
  312. package/dist/js/packages/components/src/components/List/components/Header/Header.mjs.map +1 -1
  313. package/dist/js/packages/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs.map +1 -1
  314. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs.map +1 -1
  315. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionCheckboxGroup.mjs.map +1 -1
  316. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionDateRange.mjs.map +1 -1
  317. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionRadioGroup.mjs.map +1 -1
  318. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs.map +1 -1
  319. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs.map +1 -1
  320. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/DateRangeFilterPopover.mjs.map +1 -1
  321. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenu.mjs.map +1 -1
  322. package/dist/js/packages/components/src/components/List/components/Header/components/SearchField/SearchField.mjs.map +1 -1
  323. package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.mjs.map +1 -1
  324. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs.map +1 -1
  325. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs.map +1 -1
  326. package/dist/js/packages/components/src/components/List/components/Items/Items.mjs.map +1 -1
  327. package/dist/js/packages/components/src/components/List/components/Items/components/Item/Item.mjs.map +1 -1
  328. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs.map +1 -1
  329. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs.map +1 -1
  330. package/dist/js/packages/components/src/components/List/components/Items/views/GridListItem/GridListItem.mjs.map +1 -1
  331. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
  332. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.module.mjs.map +1 -1
  333. package/dist/js/packages/components/src/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.mjs.map +1 -1
  334. package/dist/js/packages/components/src/components/List/components/ListSummary/ListSummary.mjs.map +1 -1
  335. package/dist/js/packages/components/src/components/List/components/Table/Table.mjs.map +1 -1
  336. package/dist/js/packages/components/src/components/List/components/Table/components/TableBodyLoadingView.mjs.map +1 -1
  337. package/dist/js/packages/components/src/components/List/components/Table/components/TableRowSkeletonView.mjs.map +1 -1
  338. package/dist/js/packages/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
  339. package/dist/js/packages/components/src/components/List/model/filter/dateRangeFilterFn.mjs +2 -2
  340. package/dist/js/packages/components/src/components/List/model/filter/dateRangeFilterFn.mjs.map +1 -1
  341. package/dist/js/packages/components/src/components/List/views/EmptyView/EmptyView.mjs.map +1 -1
  342. package/dist/js/packages/components/src/components/List/views/EmptyViewContainer/EmptyViewContainer.mjs.map +1 -1
  343. package/dist/js/packages/components/src/components/LoadingSpinner/LoadingSpinner.mjs +7 -0
  344. package/dist/js/packages/components/src/components/LoadingSpinner/LoadingSpinner.mjs.map +1 -1
  345. package/dist/js/packages/components/src/components/Markdown/Markdown.mjs.map +1 -1
  346. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
  347. package/dist/js/packages/components/src/components/MarkdownEditor/components/AttachmentButton.mjs.map +1 -1
  348. package/dist/js/packages/components/src/components/MarkdownEditor/components/ModeButton.mjs.map +1 -1
  349. package/dist/js/packages/components/src/components/MarkdownEditor/components/Toolbar.mjs.map +1 -1
  350. package/dist/js/packages/components/src/components/MarkdownEditor/components/ToolbarButton.mjs.map +1 -1
  351. package/dist/js/packages/components/src/components/MarkdownEditor/lib/useFileUpload.mjs.map +1 -1
  352. package/dist/js/packages/components/src/components/MenuItem/MenuItem.mjs.map +1 -1
  353. package/dist/js/packages/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs.map +1 -1
  354. package/dist/js/packages/components/src/components/Message/Message.mjs +2 -1
  355. package/dist/js/packages/components/src/components/Message/Message.mjs.map +1 -1
  356. package/dist/js/packages/components/src/components/MessageThread/MessageThread.mjs.map +1 -1
  357. package/dist/js/packages/components/src/components/MessageThread/components/MessageSeparator/MessageSeparator.mjs.map +1 -1
  358. package/dist/js/packages/components/src/components/Modal/Modal.mjs.map +1 -1
  359. package/dist/js/packages/components/src/components/Modal/Modal.module.mjs.map +1 -1
  360. package/dist/js/packages/components/src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.mjs.map +1 -1
  361. package/dist/js/packages/components/src/components/Navigation/Navigation.mjs +8 -1
  362. package/dist/js/packages/components/src/components/Navigation/Navigation.mjs.map +1 -1
  363. package/dist/js/packages/components/src/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit.mjs.map +1 -1
  364. package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
  365. package/dist/js/packages/components/src/components/Notification/Notification.mjs +19 -11
  366. package/dist/js/packages/components/src/components/Notification/Notification.mjs.map +1 -1
  367. package/dist/js/packages/components/src/components/Notification/Notification.module.mjs +4 -2
  368. package/dist/js/packages/components/src/components/Notification/Notification.module.mjs.map +1 -1
  369. package/dist/js/packages/components/src/components/NotificationProvider/NotificationContainer/NotificationContainer.mjs.map +1 -1
  370. package/dist/js/packages/components/src/components/NumberField/NumberField.mjs +17 -7
  371. package/dist/js/packages/components/src/components/NumberField/NumberField.mjs.map +1 -1
  372. package/dist/js/packages/components/src/components/NumberField/NumberField.module.mjs +9 -1
  373. package/dist/js/packages/components/src/components/NumberField/NumberField.module.mjs.map +1 -1
  374. package/dist/js/packages/components/src/components/NumberField/components/NumberFieldUnit.mjs +36 -0
  375. package/dist/js/packages/components/src/components/NumberField/components/NumberFieldUnit.mjs.map +1 -0
  376. package/dist/js/packages/components/src/components/Option/Option.mjs.map +1 -1
  377. package/dist/js/packages/components/src/components/Options/Options.mjs.map +1 -1
  378. package/dist/js/packages/components/src/components/Overlay/Overlay.mjs.map +1 -1
  379. package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs +6 -1
  380. package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs.map +1 -1
  381. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs +42 -19
  382. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
  383. package/dist/js/packages/components/src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.mjs +2 -2
  384. package/dist/js/packages/components/src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.mjs.map +1 -1
  385. package/dist/js/packages/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs.map +1 -1
  386. package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs.map +1 -1
  387. package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.mjs.map +1 -1
  388. package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry.mjs.map +1 -1
  389. package/dist/js/packages/components/src/components/PasswordCreationField/lib/ariaAnnounce.mjs.map +1 -1
  390. package/dist/js/packages/components/src/components/PasswordCreationField/lib/usePolicyValidationResult.mjs +12 -0
  391. package/dist/js/packages/components/src/components/PasswordCreationField/lib/usePolicyValidationResult.mjs.map +1 -1
  392. package/dist/js/packages/components/src/components/Popover/Popover.mjs.map +1 -1
  393. package/dist/js/packages/components/src/components/Popover/components/NonModalPopoverContent/NonModalPopoverContent.mjs.map +1 -1
  394. package/dist/js/packages/components/src/components/Popover/components/PopoverContent/PopoverContent.mjs.map +1 -1
  395. package/dist/js/packages/components/src/components/Popover/components/PopoverTip/PopoverTip.mjs.map +1 -1
  396. package/dist/js/packages/components/src/components/Popover/viewportPadding.mjs.map +1 -1
  397. package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.mjs +4 -1
  398. package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.mjs.map +1 -1
  399. package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.module.mjs +6 -2
  400. package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.module.mjs.map +1 -1
  401. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs +2 -0
  402. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs.map +1 -1
  403. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarLegend.mjs.map +1 -1
  404. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarValue.mjs.map +1 -1
  405. package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs +3 -2
  406. package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs.map +1 -1
  407. package/dist/js/packages/components/src/components/RadioGroup/components/Radio/Radio.mjs.map +1 -1
  408. package/dist/js/packages/components/src/components/RadioGroup/components/RadioButton/RadioButton.mjs.map +1 -1
  409. package/dist/js/packages/components/src/components/Rating/Rating.mjs +8 -4
  410. package/dist/js/packages/components/src/components/Rating/Rating.mjs.map +1 -1
  411. package/dist/js/packages/components/src/components/Rating/Rating.module.mjs +6 -2
  412. package/dist/js/packages/components/src/components/Rating/Rating.module.mjs.map +1 -1
  413. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/EmptySegment.mjs.map +1 -1
  414. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/FilledSegment.mjs.map +1 -1
  415. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingSegment.mjs.map +1 -1
  416. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs +3 -3
  417. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs.map +1 -1
  418. package/dist/js/packages/components/src/components/Section/Section.mjs.map +1 -1
  419. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
  420. package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs +3 -2
  421. package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  422. package/dist/js/packages/components/src/components/SegmentedControl/components/Segment/Segment.mjs.map +1 -1
  423. package/dist/js/packages/components/src/components/Select/Select.mjs +3 -3
  424. package/dist/js/packages/components/src/components/Select/Select.mjs.map +1 -1
  425. package/dist/js/packages/components/src/components/Separator/Separator.mjs.map +1 -1
  426. package/dist/js/packages/components/src/components/Skeleton/Skeleton.mjs.map +1 -1
  427. package/dist/js/packages/components/src/components/Skeleton/Skeleton.module.mjs +3 -3
  428. package/dist/js/packages/components/src/components/Skeleton/Skeleton.module.mjs.map +1 -1
  429. package/dist/js/packages/components/src/components/SkeletonMode/SkeletonMode.mjs +35 -0
  430. package/dist/js/packages/components/src/components/SkeletonMode/SkeletonMode.mjs.map +1 -0
  431. package/dist/js/packages/components/src/components/SkeletonMode/components/SkeletonIconSurface/SkeletonIconSurface.mjs +24 -0
  432. package/dist/js/packages/components/src/components/SkeletonMode/components/SkeletonIconSurface/SkeletonIconSurface.mjs.map +1 -0
  433. package/dist/js/packages/components/src/components/SkeletonMode/components/SkeletonIconSurface/SkeletonIconSurface.module.mjs +13 -0
  434. package/dist/js/packages/components/src/components/SkeletonMode/components/SkeletonIconSurface/SkeletonIconSurface.module.mjs.map +1 -0
  435. package/dist/js/packages/components/src/components/SkeletonMode/components/SkeletonRawText/SkeletonRawText.mjs +25 -0
  436. package/dist/js/packages/components/src/components/SkeletonMode/components/SkeletonRawText/SkeletonRawText.mjs.map +1 -0
  437. package/dist/js/packages/components/src/components/SkeletonMode/components/SkeletonTextContent/SkeletonTextContent.mjs +29 -0
  438. package/dist/js/packages/components/src/components/SkeletonMode/components/SkeletonTextContent/SkeletonTextContent.mjs.map +1 -0
  439. package/dist/js/packages/components/src/components/SkeletonMode/components/SkeletonTextContent/SkeletonTextContent.module.mjs +13 -0
  440. package/dist/js/packages/components/src/components/SkeletonMode/components/SkeletonTextContent/SkeletonTextContent.module.mjs.map +1 -0
  441. package/dist/js/packages/components/src/components/SkeletonMode/lib/hasContent.mjs +11 -0
  442. package/dist/js/packages/components/src/components/SkeletonMode/lib/hasContent.mjs.map +1 -0
  443. package/dist/js/packages/components/src/components/SkeletonMode/lib/isTextChild.mjs +19 -0
  444. package/dist/js/packages/components/src/components/SkeletonMode/lib/isTextChild.mjs.map +1 -0
  445. package/dist/js/packages/components/src/components/SkeletonMode/skeletonModeContext.mjs +27 -0
  446. package/dist/js/packages/components/src/components/SkeletonMode/skeletonModeContext.mjs.map +1 -0
  447. package/dist/js/packages/components/src/components/SkeletonText/SkeletonText.mjs.map +1 -1
  448. package/dist/js/packages/components/src/components/SkeletonText/SkeletonText.module.mjs +3 -3
  449. package/dist/js/packages/components/src/components/SkeletonText/SkeletonText.module.mjs.map +1 -1
  450. package/dist/js/packages/components/src/components/Slider/Slider.mjs +4 -3
  451. package/dist/js/packages/components/src/components/Slider/Slider.mjs.map +1 -1
  452. package/dist/js/packages/components/src/components/Switch/Switch.mjs +3 -2
  453. package/dist/js/packages/components/src/components/Switch/Switch.mjs.map +1 -1
  454. package/dist/js/packages/components/src/components/TabNavigation/TabNavigation.mjs +3 -0
  455. package/dist/js/packages/components/src/components/TabNavigation/TabNavigation.mjs.map +1 -1
  456. package/dist/js/packages/components/src/components/TabNavigation/components/LinkContent/LinkContent.mjs.map +1 -1
  457. package/dist/js/packages/components/src/components/Table/Table.mjs.map +1 -1
  458. package/dist/js/packages/components/src/components/Table/components/TableBody/TableBody.mjs.map +1 -1
  459. package/dist/js/packages/components/src/components/Table/components/TableCell/TableCell.mjs.map +1 -1
  460. package/dist/js/packages/components/src/components/Table/components/TableColumn/TableColumn.mjs.map +1 -1
  461. package/dist/js/packages/components/src/components/Table/components/TableHeader/TableHeader.mjs.map +1 -1
  462. package/dist/js/packages/components/src/components/Table/components/TableRow/TableRow.mjs.map +1 -1
  463. package/dist/js/packages/components/src/components/Tabs/Tabs.mjs.map +1 -1
  464. package/dist/js/packages/components/src/components/Tabs/components/FallbackTab/FallbackTab.mjs +1 -1
  465. package/dist/js/packages/components/src/components/Tabs/components/FallbackTab/FallbackTab.mjs.map +1 -1
  466. package/dist/js/packages/components/src/components/Tabs/components/Tab/Tab.mjs.map +1 -1
  467. package/dist/js/packages/components/src/components/Tabs/components/TabList/TabList.mjs +5 -1
  468. package/dist/js/packages/components/src/components/Tabs/components/TabList/TabList.mjs.map +1 -1
  469. package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.mjs +3 -1
  470. package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.mjs.map +1 -1
  471. package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.module.mjs +3 -1
  472. package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.module.mjs.map +1 -1
  473. package/dist/js/packages/components/src/components/Text/Text.mjs +9 -2
  474. package/dist/js/packages/components/src/components/Text/Text.mjs.map +1 -1
  475. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs +3 -3
  476. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs.map +1 -1
  477. package/dist/js/packages/components/src/components/TextField/TextField.mjs +4 -4
  478. package/dist/js/packages/components/src/components/TextField/TextField.mjs.map +1 -1
  479. package/dist/js/packages/components/src/components/TimeField/TimeField.mjs +5 -3
  480. package/dist/js/packages/components/src/components/TimeField/TimeField.mjs.map +1 -1
  481. package/dist/js/packages/components/src/components/Tooltip/Tooltip.mjs.map +1 -1
  482. package/dist/js/packages/components/src/components/Truncate/Truncate.mjs.map +1 -1
  483. package/dist/js/packages/components/src/components/TunnelEntry/TunnelEntry.mjs.map +1 -1
  484. package/dist/js/packages/components/src/integrations/nextjs/components/RouterProvider/RouterProvider.mjs.map +1 -1
  485. package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs +1 -1
  486. package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
  487. package/dist/js/packages/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
  488. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormAction.mjs.map +1 -1
  489. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs +6 -3
  490. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs.map +1 -1
  491. package/dist/js/packages/components/src/lib/hooks/fieldErrorRenderedContext.mjs +16 -0
  492. package/dist/js/packages/components/src/lib/hooks/fieldErrorRenderedContext.mjs.map +1 -0
  493. package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs +8 -7
  494. package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs.map +1 -1
  495. package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs +34 -21
  496. package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs.map +1 -1
  497. package/dist/js/packages/components/src/lib/propsContext/nestedPropsContext/types.mjs.map +1 -1
  498. package/dist/js/packages/components/src/lib/propsContext/overlayTriggerTunnel.mjs.map +1 -1
  499. package/dist/js/packages/components/src/lib/react/cloneElement.mjs.map +1 -1
  500. package/dist/js/packages/components/src/lib/react/components/Render/Render.mjs.map +1 -1
  501. package/dist/js/packages/components/src/lib/react/getPropsMerger.mjs.map +1 -1
  502. package/dist/js/packages/components/src/lib/theming/hooks/useDesignTokens.mjs.map +1 -1
  503. package/dist/js/packages/components/src/lib/tokens/CategoricalColors.mjs.map +1 -1
  504. package/dist/js/packages/components/src/lib/tokens/isCategoricalColor.mjs.map +1 -1
  505. package/dist/js/packages/components/src/lib/types/props.mjs.map +1 -1
  506. package/dist/js/packages/components/src/status/component-status.mjs +4 -0
  507. package/dist/js/packages/components/src/status/component-status.mjs.map +1 -1
  508. package/dist/js/packages/components/src/status/componentStatus.mjs.map +1 -1
  509. package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs +16 -0
  510. package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs.map +1 -1
  511. package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs +16 -0
  512. package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs.map +1 -1
  513. package/dist/types/components/ActionGroup/ActionGroup.d.ts +3 -2
  514. package/dist/types/components/Button/Button.d.ts +7 -1
  515. package/dist/types/components/Button/stories/lib.d.ts +1 -1
  516. package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipLegendItem.d.ts +3 -1
  517. package/dist/types/components/CartesianChart/components/YAxis/YAxis.d.ts +7 -0
  518. package/dist/types/components/CodeEditor/CodeEditor.d.ts +12 -2
  519. package/dist/types/components/CodeEditor/hooks/useCodeEditorExtensions.d.ts +32 -1
  520. package/dist/types/components/CodeEditor/languages/all.d.ts +1 -1
  521. package/dist/types/components/CodeEditor/languages/index.d.ts +1 -0
  522. package/dist/types/components/FileField/FileField.d.ts +1 -1
  523. package/dist/types/components/Link/Link.d.ts +5 -1
  524. package/dist/types/components/List/components/DataLoader/DataLoader.d.ts +1 -1
  525. package/dist/types/components/List/components/Items/components/Item/Item.d.ts +1 -1
  526. package/dist/types/components/List/components/Items/components/Item/hooks/useGridItemProps.d.ts +1 -1
  527. package/dist/types/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.d.ts +1 -1
  528. package/dist/types/components/Modal/components/ModalTrigger/ModalTrigger.d.ts +1 -5
  529. package/dist/types/components/NumberField/NumberField.d.ts +5 -0
  530. package/dist/types/components/NumberField/components/NumberFieldUnit.d.ts +13 -0
  531. package/dist/types/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.d.ts +5 -0
  532. package/dist/types/components/SkeletonMode/SkeletonMode.d.ts +16 -0
  533. package/dist/types/components/SkeletonMode/components/SkeletonIconSurface/SkeletonIconSurface.d.ts +10 -0
  534. package/dist/types/components/SkeletonMode/components/SkeletonIconSurface/index.d.ts +2 -0
  535. package/dist/types/components/SkeletonMode/components/SkeletonRawText/SkeletonRawText.d.ts +8 -0
  536. package/dist/types/components/SkeletonMode/components/SkeletonRawText/index.d.ts +2 -0
  537. package/dist/types/components/SkeletonMode/components/SkeletonTextContent/SkeletonTextContent.d.ts +12 -0
  538. package/dist/types/components/SkeletonMode/components/SkeletonTextContent/index.d.ts +2 -0
  539. package/dist/types/components/SkeletonMode/index.d.ts +3 -0
  540. package/dist/types/components/SkeletonMode/lib/hasContent.d.ts +3 -0
  541. package/dist/types/components/SkeletonMode/lib/isTextChild.d.ts +8 -0
  542. package/dist/types/components/SkeletonMode/skeletonModeContext.d.ts +16 -0
  543. package/dist/types/components/SkeletonMode/view.d.ts +7 -0
  544. package/dist/types/components/public.d.ts +1 -0
  545. package/dist/types/integrations/react-hook-form/components/Field/Field.d.ts +1 -1
  546. package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts +1 -1
  547. package/dist/types/integrations/react-hook-form/components/FormContextProvider/FormContextProvider.d.ts +1 -1
  548. package/dist/types/integrations/react-hook-form/components/FormRootError/FormRootError.d.ts +12 -2
  549. package/dist/types/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.d.ts +1 -1
  550. package/dist/types/lib/dev/parkPointer.d.ts +1 -0
  551. package/dist/types/lib/hooks/fieldErrorRenderedContext.d.ts +1 -0
  552. package/dist/types/lib/hooks/useFieldComponent.d.ts +15 -4
  553. package/dist/types/lib/hooks/useFieldError.d.ts +7 -1
  554. package/dist/types/lib/propsContext/nestedPropsContext/types.d.ts +3 -0
  555. package/dist/types/lib/propsContext/overlayTriggerTunnel.d.ts +2 -2
  556. package/dist/types/lib/theming/hooks/useDesignTokens.d.ts +12 -0
  557. package/dist/types/lib/types/props.d.ts +14 -0
  558. package/dist/types/status/component-status.json.d.ts +4 -0
  559. package/dist/types/views/SkeletonModeView.d.ts +4 -0
  560. package/package.json +13 -10
@@ -11,20 +11,24 @@ import FormField_module_default from "../FormField/FormField.module.mjs";
11
11
  import { useFieldComponent } from "../../lib/hooks/useFieldComponent.mjs";
12
12
  import { useControlledHostValueProps } from "../../lib/remote/useControlledHostValueProps.mjs";
13
13
  import NumberField_module_default from "./NumberField.module.mjs";
14
+ import { NumberFieldUnit } from "./components/NumberFieldUnit.mjs";
14
15
  import clsx from "clsx";
15
- import "react";
16
+ import { useId } from "react";
16
17
  import { jsx, jsxs } from "react/jsx-runtime";
17
18
  import * as Aria from "react-aria-components";
18
19
  //#region src/components/NumberField/NumberField.tsx
19
20
  /** @flr-generate all */
20
21
  var NumberField = flowComponent("NumberField", (props) => {
21
- const { children, className, isWheelDisabled = true, ref, ...rest } = useControlledHostValueProps(props, NaN);
22
- const { FieldErrorView, FieldErrorCaptureContext, fieldProps, fieldPropsContext } = useFieldComponent(props, "NumberField");
22
+ const { children, className, isWheelDisabled = true, ref, unit, "aria-labelledby": ariaLabelledBy, ...rest } = useControlledHostValueProps(props, NaN);
23
+ const unitId = useId();
24
+ const { FieldErrorView, FieldErrorCaptureContext, wrapperProps, controlProps, fieldPropsContext } = useFieldComponent(props, "NumberField");
23
25
  const rootClassName = clsx(FormField_module_default.formField, className);
24
26
  return /* @__PURE__ */ jsxs(Aria.NumberField, {
25
27
  ...rest,
26
28
  isWheelDisabled,
27
- className: clsx(rootClassName, fieldProps.className),
29
+ "aria-labelledby": unit ? [ariaLabelledBy, unitId].filter(Boolean).join(" ") : ariaLabelledBy,
30
+ "aria-describedby": controlProps["aria-describedby"],
31
+ className: clsx(rootClassName, wrapperProps.className),
28
32
  children: [/* @__PURE__ */ jsxs(PropsContextProvider, {
29
33
  props: fieldPropsContext,
30
34
  children: [/* @__PURE__ */ jsx(FieldErrorCaptureContext, { children }), /* @__PURE__ */ jsx(FieldErrorView, {})]
@@ -39,9 +43,15 @@ var NumberField = flowComponent("NumberField", (props) => {
39
43
  color: "secondary",
40
44
  children: [/* @__PURE__ */ jsx(IconChevronDown, {}), /* @__PURE__ */ jsx(IconMinus, { className: NumberField_module_default.coarsePointerIcon })]
41
45
  }),
42
- /* @__PURE__ */ jsx(Aria.Input, {
43
- className: NumberField_module_default.input,
44
- ref
46
+ /* @__PURE__ */ jsxs("div", {
47
+ className: NumberField_module_default.inputContainer,
48
+ children: [/* @__PURE__ */ jsx(Aria.Input, {
49
+ className: NumberField_module_default.input,
50
+ ref
51
+ }), unit && /* @__PURE__ */ jsx(NumberFieldUnit, {
52
+ id: unitId,
53
+ unit
54
+ })]
45
55
  }),
46
56
  /* @__PURE__ */ jsxs(Button, {
47
57
  ariaSlot: "increment",
@@ -1 +1 @@
1
- {"version":3,"file":"NumberField.mjs","names":[],"sources":["../../../../../../../src/components/NumberField/NumberField.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport styles from \"./NumberField.module.scss\";\nimport clsx from \"clsx\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport {\n IconChevronDown,\n IconChevronUp,\n IconMinus,\n IconPlus,\n} from \"@/components/Icon/components/icons\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\n\nexport interface NumberFieldProps\n extends\n PropsWithChildren<Omit<Aria.NumberFieldProps, \"children\">>,\n FlowComponentProps<HTMLInputElement> {}\n\n/** @flr-generate all */\nexport const NumberField = flowComponent(\"NumberField\", (props) => {\n // `NaN` is what react-aria's number field state uses for \"no number\"\n const {\n children,\n className,\n isWheelDisabled = true,\n ref,\n ...rest\n } = useControlledHostValueProps(props, NaN);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"NumberField\");\n\n const rootClassName = clsx(formFieldStyles.formField, className);\n\n return (\n <Aria.NumberField\n {...rest}\n isWheelDisabled={isWheelDisabled}\n className={clsx(rootClassName, fieldProps.className)}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n <Aria.Group className={styles.group}>\n <Button\n ariaSlot=\"decrement\"\n className={styles.decrementButton}\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconChevronDown />\n <IconMinus className={styles.coarsePointerIcon} />\n </Button>\n <Aria.Input className={styles.input} ref={ref} />\n <Button\n ariaSlot=\"increment\"\n className={styles.incrementButton}\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconChevronUp />\n <IconPlus className={styles.coarsePointerIcon} />\n </Button>\n </Aria.Group>\n </Aria.NumberField>\n );\n});\n\nexport default NumberField;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAwBA,IAAa,cAAc,cAAc,gBAAgB,UAAU;CAEjE,MAAM,EACJ,UACA,WACA,kBAAkB,MAClB,KACA,GAAG,SACD,4BAA4B,OAAO,GAAG;CAE1C,MAAM,EACJ,gBACA,0BACA,YACA,sBACE,kBAAkB,OAAO,aAAa;CAE1C,MAAM,gBAAgB,KAAK,yBAAgB,WAAW,SAAS;CAE/D,OACE,qBAAC,KAAK,aAAN;EACE,GAAI;EACa;EACjB,WAAW,KAAK,eAAe,WAAW,SAAS;EAHrD,UAAA,CAKE,qBAAC,sBAAD;GAAsB,OAAO;GAA7B,UAAA,CACE,oBAAC,0BAAD,EAA2B,SAAmC,CAAA,GAC9D,oBAAC,gBAAD,CAAiB,CAAA,CACG;EACtB,CAAA,GAAA,qBAAC,KAAK,OAAN;GAAY,WAAW,2BAAO;GAA9B,UAAA;IACE,qBAAC,QAAD;KACE,UAAS;KACT,WAAW,2BAAO;KAClB,MAAK;KACL,SAAQ;KACR,OAAM;KALR,UAAA,CAOE,oBAAC,iBAAD,CAAkB,CAAA,GAClB,oBAAC,WAAD,EAAW,WAAW,2BAAO,kBAAoB,CAAA,CAC3C;;IACR,oBAAC,KAAK,OAAN;KAAY,WAAW,2BAAO;KAAY;IAAM,CAAA;IAChD,qBAAC,QAAD;KACE,UAAS;KACT,WAAW,2BAAO;KAClB,MAAK;KACL,SAAQ;KACR,OAAM;KALR,UAAA,CAOE,oBAAC,eAAD,CAAgB,CAAA,GAChB,oBAAC,UAAD,EAAU,WAAW,2BAAO,kBAAoB,CAAA,CAC1C;;GACE;EACI,CAAA,CAAA;;AAEtB,CAAC"}
1
+ {"version":3,"file":"NumberField.mjs","names":["formFieldStyles","styles"],"sources":["../../../../../../../src/components/NumberField/NumberField.tsx"],"sourcesContent":["import { type PropsWithChildren, useId } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport styles from \"./NumberField.module.scss\";\nimport clsx from \"clsx\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport {\n IconChevronDown,\n IconChevronUp,\n IconMinus,\n IconPlus,\n} from \"@/components/Icon/components/icons\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { NumberFieldUnit } from \"./components/NumberFieldUnit\";\n\nexport interface NumberFieldProps\n extends\n PropsWithChildren<Omit<Aria.NumberFieldProps, \"children\">>,\n FlowComponentProps<HTMLInputElement> {\n /**\n * A unit displayed after the number, for units `Intl.NumberFormat` does not\n * support (e.g. \"MiB\"). For supported units, use `formatOptions` instead.\n */\n unit?: string;\n}\n\n/** @flr-generate all */\nexport const NumberField = flowComponent(\"NumberField\", (props) => {\n // `NaN` is what react-aria's number field state uses for \"no number\"\n const {\n children,\n className,\n isWheelDisabled = true,\n ref,\n unit,\n \"aria-labelledby\": ariaLabelledBy,\n ...rest\n } = useControlledHostValueProps(props, NaN);\n\n const unitId = useId();\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n wrapperProps,\n controlProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"NumberField\");\n\n const rootClassName = clsx(formFieldStyles.formField, className);\n\n return (\n <Aria.NumberField\n {...rest}\n isWheelDisabled={isWheelDisabled}\n aria-labelledby={\n unit\n ? [ariaLabelledBy, unitId].filter(Boolean).join(\" \")\n : ariaLabelledBy\n }\n aria-describedby={controlProps[\"aria-describedby\"]}\n className={clsx(rootClassName, wrapperProps.className)}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n <Aria.Group className={styles.group}>\n <Button\n ariaSlot=\"decrement\"\n className={styles.decrementButton}\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconChevronDown />\n <IconMinus className={styles.coarsePointerIcon} />\n </Button>\n <div className={styles.inputContainer}>\n <Aria.Input className={styles.input} ref={ref} />\n {unit && <NumberFieldUnit id={unitId} unit={unit} />}\n </div>\n <Button\n ariaSlot=\"increment\"\n className={styles.incrementButton}\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconChevronUp />\n <IconPlus className={styles.coarsePointerIcon} />\n </Button>\n </Aria.Group>\n </Aria.NumberField>\n );\n});\n\nexport default NumberField;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+BA,IAAa,cAAc,cAAc,gBAAgB,UAAU;CAEjE,MAAM,EACJ,UACA,WACA,kBAAkB,MAClB,KACA,MACA,mBAAmB,gBACnB,GAAG,SACD,4BAA4B,OAAO,GAAG;CAE1C,MAAM,SAAS,MAAM;CAErB,MAAM,EACJ,gBACA,0BACA,cACA,cACA,sBACE,kBAAkB,OAAO,aAAa;CAE1C,MAAM,gBAAgB,KAAKA,yBAAgB,WAAW,SAAS;CAE/D,OACE,qBAAC,KAAK,aAAN;EACE,GAAI;EACa;EACjB,mBACE,OACI,CAAC,gBAAgB,MAAM,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,IACjD;EAEN,oBAAkB,aAAa;EAC/B,WAAW,KAAK,eAAe,aAAa,SAAS;EATvD,UAAA,CAWE,qBAAC,sBAAD;GAAsB,OAAO;GAA7B,UAAA,CACE,oBAAC,0BAAD,EAA2B,SAAmC,CAAA,GAC9D,oBAAC,gBAAD,CAAiB,CAAA,CACG;EACtB,CAAA,GAAA,qBAAC,KAAK,OAAN;GAAY,WAAWC,2BAAO;GAA9B,UAAA;IACE,qBAAC,QAAD;KACE,UAAS;KACT,WAAWA,2BAAO;KAClB,MAAK;KACL,SAAQ;KACR,OAAM;KALR,UAAA,CAOE,oBAAC,iBAAD,CAAkB,CAAA,GAClB,oBAAC,WAAD,EAAW,WAAWA,2BAAO,kBAAoB,CAAA,CAC3C;;IACR,qBAAC,OAAD;KAAK,WAAWA,2BAAO;KAAvB,UAAA,CACE,oBAAC,KAAK,OAAN;MAAY,WAAWA,2BAAO;MAAY;KAAM,CAAA,GAC/C,QAAQ,oBAAC,iBAAD;MAAiB,IAAI;MAAc;KAAO,CAAA,CAChD;;IACL,qBAAC,QAAD;KACE,UAAS;KACT,WAAWA,2BAAO;KAClB,MAAK;KACL,SAAQ;KACR,OAAM;KALR,UAAA,CAOE,oBAAC,eAAD,CAAgB,CAAA,GAChB,oBAAC,UAAD,EAAU,WAAWA,2BAAO,kBAAoB,CAAA,CAC1C;;GACE;EACI,CAAA,CAAA;;AAEtB,CAAC"}
@@ -2,20 +2,28 @@
2
2
  /* */
3
3
  //#region src/components/NumberField/NumberField.module.scss
4
4
  var group = "flow--number-field--group";
5
+ var inputContainer = "flow--number-field--input-container";
5
6
  var input = "flow--number-field--input";
7
+ var unitOverlay = "flow--number-field--unit-overlay";
6
8
  var readonly = "flow--number-field--readonly";
9
+ var unitClip = "flow--number-field--unit-clip";
10
+ var unitSpacer = "flow--number-field--unit-spacer";
7
11
  var decrementButton = "flow--number-field--decrement-button";
8
12
  var incrementButton = "flow--number-field--increment-button";
9
13
  var coarsePointerIcon = "flow--number-field--coarse-pointer-icon";
10
14
  var NumberField_module_default = {
11
15
  group,
16
+ inputContainer,
12
17
  input,
18
+ unitOverlay,
13
19
  readonly,
20
+ unitClip,
21
+ unitSpacer,
14
22
  decrementButton,
15
23
  incrementButton,
16
24
  coarsePointerIcon
17
25
  };
18
26
  //#endregion
19
- export { coarsePointerIcon, decrementButton, NumberField_module_default as default, group, incrementButton, input, readonly };
27
+ export { coarsePointerIcon, decrementButton, NumberField_module_default as default, group, incrementButton, input, inputContainer, readonly, unitClip, unitOverlay, unitSpacer };
20
28
 
21
29
  //# sourceMappingURL=NumberField.module.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NumberField.module.mjs","names":[],"sources":["../../../../../../../src/components/NumberField/NumberField.module.scss"],"sourcesContent":["@use \"@/styles/mixins/formControl\";\n\n.group {\n order: 2;\n display: grid;\n grid-template-columns: 1fr max-content;\n grid-template-areas:\n \"input increment\"\n \"input decrement\";\n\n .input {\n grid-area: input;\n\n @include formControl.formControl();\n }\n\n .decrementButton {\n grid-area: decrement;\n }\n\n .incrementButton {\n grid-area: increment;\n }\n\n .decrementButton,\n .incrementButton {\n border-width: var(--form-control--border-width);\n border-color: var(--form-control--border-color--default);\n border-style: solid;\n }\n\n &[aria-invalid] {\n .decrementButton,\n .incrementButton {\n border-color: var(--form-control--border-color--invalid);\n }\n }\n\n &[data-focus-within] {\n .decrementButton,\n .incrementButton {\n border-color: var(--form-control--border-color--focused);\n }\n }\n\n &[aria-disabled=\"true\"] {\n .decrementButton,\n .incrementButton {\n border-color: var(--form-control--border-color--disabled);\n }\n }\n\n &:has(.input:read-only):not([aria-disabled=\"true\"]) {\n .decrementButton,\n .incrementButton {\n border-color: var(--form-control--border-color--default);\n }\n }\n}\n\n@media (pointer: fine) {\n .group {\n .input {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n .incrementButton,\n .decrementButton {\n border-inline-start: none;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n padding-block: 0;\n\n .coarsePointerIcon {\n display: none;\n }\n }\n\n .decrementButton {\n border-start-end-radius: 0;\n }\n\n .incrementButton {\n border-block-end: none;\n border-end-end-radius: 0;\n }\n }\n}\n\n@media (pointer: coarse) {\n .group {\n grid-template-columns: auto 1fr auto;\n grid-template-areas: \"decrement input increment\";\n max-width: 100%;\n\n .input {\n border-radius: 0;\n min-width: 0;\n }\n\n .decrementButton,\n .incrementButton {\n padding-inline: var(--button--padding-icon-only);\n\n .coarsePointerIcon {\n width: var(--icon--size--m);\n height: var(--icon--size--m);\n }\n\n // Hides every icon the stepper buttons render except the coarse-pointer\n // one — Button's own pending/success/failure icons included, and those\n // share no class with the chevrons.\n // stylelint-disable-next-line selector-max-type -- see above\n svg:not(.coarsePointerIcon) {\n display: none;\n }\n }\n\n .decrementButton {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n border-inline-end: none;\n }\n\n .incrementButton {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n border-inline-start: none;\n }\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"NumberField.module.mjs","names":[],"sources":["../../../../../../../src/components/NumberField/NumberField.module.scss"],"sourcesContent":["@use \"@/styles/mixins/formControl\";\n\n.group {\n order: 2;\n display: grid;\n grid-template-columns: 1fr max-content;\n grid-template-areas:\n \"input increment\"\n \"input decrement\";\n\n .inputContainer {\n grid-area: input;\n display: grid;\n // Without it the column takes the input's intrinsic width\n grid-template-columns: minmax(0, 1fr);\n min-width: 0;\n }\n\n .input,\n .unitOverlay {\n grid-area: 1 / 1;\n }\n\n .input {\n @include formControl.formControl();\n }\n\n // Mirrors the input's box so the text lines up with the input text\n .unitOverlay {\n @include formControl.formBorder();\n @include formControl.formOutline();\n\n // Grid items paint in `order`; formControl moves the input to 2\n order: 2;\n border-color: transparent;\n color: var(--form-control--content-color--default);\n white-space: pre;\n pointer-events: none;\n contain: inline-size;\n\n &[data-empty] {\n visibility: hidden;\n }\n }\n\n // The input clips its text at the content box, `overflow` clips at the\n // padding box — so the overlay keeps the padding and clips one level deeper\n .unitClip {\n display: block;\n overflow: hidden;\n }\n\n .unitSpacer {\n visibility: hidden;\n }\n\n &[aria-disabled=\"true\"] .unitOverlay {\n color: var(--form-control--content-color--disabled);\n }\n\n .decrementButton {\n grid-area: decrement;\n }\n\n .incrementButton {\n grid-area: increment;\n }\n\n .decrementButton,\n .incrementButton {\n border-width: var(--form-control--border-width);\n border-color: var(--form-control--border-color--default);\n border-style: solid;\n }\n\n &[aria-invalid] {\n .decrementButton,\n .incrementButton {\n border-color: var(--form-control--border-color--invalid);\n }\n }\n\n &[data-focus-within] {\n .decrementButton,\n .incrementButton {\n border-color: var(--form-control--border-color--focused);\n }\n }\n\n &[aria-disabled=\"true\"] {\n .decrementButton,\n .incrementButton {\n border-color: var(--form-control--border-color--disabled);\n }\n }\n\n &:has(.input:read-only):not([aria-disabled=\"true\"]) {\n .decrementButton,\n .incrementButton {\n border-color: var(--form-control--border-color--default);\n }\n }\n}\n\n@media (pointer: fine) {\n .group {\n .input {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n .incrementButton,\n .decrementButton {\n border-inline-start: none;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n padding-block: 0;\n\n .coarsePointerIcon {\n display: none;\n }\n }\n\n .decrementButton {\n border-start-end-radius: 0;\n }\n\n .incrementButton {\n border-block-end: none;\n border-end-end-radius: 0;\n }\n }\n}\n\n@media (pointer: coarse) {\n .group {\n grid-template-columns: auto 1fr auto;\n grid-template-areas: \"decrement input increment\";\n max-width: 100%;\n\n .input {\n border-radius: 0;\n min-width: 0;\n }\n\n .decrementButton,\n .incrementButton {\n padding-inline: var(--button--padding-icon-only);\n\n .coarsePointerIcon {\n width: var(--icon--size--m);\n height: var(--icon--size--m);\n }\n\n // Hides every icon the stepper buttons render except the coarse-pointer\n // one — Button's own pending/success/failure icons included, and those\n // share no class with the chevrons.\n // stylelint-disable-next-line selector-max-type -- see above\n svg:not(.coarsePointerIcon) {\n display: none;\n }\n }\n\n .decrementButton {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n border-inline-end: none;\n }\n\n .incrementButton {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n border-inline-start: none;\n }\n }\n}\n"],"mappings":""}
@@ -0,0 +1,36 @@
1
+ "use client"
2
+ /* */
3
+ import NumberField_module_default from "../NumberField.module.mjs";
4
+ import { useContext } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import * as Aria from "react-aria-components";
7
+ //#region src/components/NumberField/components/NumberFieldUnit.tsx
8
+ /**
9
+ * React-aria cannot parse a unit `Intl.NumberFormat` does not know, so the unit
10
+ * is drawn over the input instead of being part of its value. An invisible copy
11
+ * of the input text pushes it right behind the number. The input's name
12
+ * references the unit, like a unit written into the label.
13
+ */
14
+ var NumberFieldUnit = (props) => {
15
+ const { id, unit } = props;
16
+ const inputValue = useContext(Aria.NumberFieldStateContext)?.inputValue;
17
+ return /* @__PURE__ */ jsx("span", {
18
+ className: NumberField_module_default.unitOverlay,
19
+ "data-empty": !inputValue || void 0,
20
+ "aria-hidden": true,
21
+ children: /* @__PURE__ */ jsxs("span", {
22
+ className: NumberField_module_default.unitClip,
23
+ children: [/* @__PURE__ */ jsxs("span", {
24
+ className: NumberField_module_default.unitSpacer,
25
+ children: [inputValue, " "]
26
+ }), /* @__PURE__ */ jsx("span", {
27
+ id,
28
+ children: unit
29
+ })]
30
+ })
31
+ });
32
+ };
33
+ //#endregion
34
+ export { NumberFieldUnit };
35
+
36
+ //# sourceMappingURL=NumberFieldUnit.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberFieldUnit.mjs","names":["styles"],"sources":["../../../../../../../../src/components/NumberField/components/NumberFieldUnit.tsx"],"sourcesContent":["import { type FC, useContext } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"../NumberField.module.scss\";\n\ninterface Props {\n id: string;\n unit: string;\n}\n\n/**\n * React-aria cannot parse a unit `Intl.NumberFormat` does not know, so the unit\n * is drawn over the input instead of being part of its value. An invisible copy\n * of the input text pushes it right behind the number. The input's name\n * references the unit, like a unit written into the label.\n */\nexport const NumberFieldUnit: FC<Props> = (props) => {\n const { id, unit } = props;\n const inputValue = useContext(Aria.NumberFieldStateContext)?.inputValue;\n\n return (\n <span\n className={styles.unitOverlay}\n data-empty={!inputValue || undefined}\n aria-hidden\n >\n <span className={styles.unitClip}>\n <span className={styles.unitSpacer}>{inputValue} </span>\n <span id={id}>{unit}</span>\n </span>\n </span>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAeA,IAAa,mBAA8B,UAAU;CACnD,MAAM,EAAE,IAAI,SAAS;CACrB,MAAM,aAAa,WAAW,KAAK,uBAAuB,CAAC,EAAE;CAE7D,OACE,oBAAC,QAAD;EACE,WAAWA,2BAAO;EAClB,cAAY,CAAC,cAAc,KAAA;EAC3B,eAAA;EAEA,UAAA,qBAAC,QAAD;GAAM,WAAWA,2BAAO;GAAxB,UAAA,CACE,qBAAC,QAAD;IAAM,WAAWA,2BAAO;IAAxB,UAAA,CAAqC,YAAW,GAAO;GACvD,CAAA,GAAA,oBAAC,QAAD;IAAU;IAAK,UAAA;GAAW,CAAA,CACtB;;CACF,CAAA;AAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"Option.mjs","names":[],"sources":["../../../../../../../src/components/Option/Option.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport { Children, useEffect, useRef } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"./Option.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { extractTextFromChildren } from \"@/lib/react/remote\";\nimport { IconCheck } from \"@/components/Icon/components/icons\";\n\nexport interface OptionProps\n extends\n Omit<Aria.ListBoxItemProps, \"children\" | \"value\" | \"id\">,\n PropsWithChildren,\n FlowComponentProps {\n /**\n * The value this option contributes to the field's selection, and the key\n * `defaultValue` / `value` of the surrounding field target.\n *\n * Defaults to `textValue`, which itself defaults to the text among the\n * option's children — element children such as a `Badge` do not contribute,\n * so `<Option>Millennium Falcon <Badge>Latest</Badge></Option>` is\n * `\"Millennium Falcon\"`. Pass it explicitly when the value must not follow\n * the display text, or when the children carry no text at all.\n */\n value?: string | number;\n}\n\n/**\n * The key an option contributes to its collection: an explicit `value`, else\n * the `textValue`, else the text among the children. Shared with the props\n * context that routes options through a field's tunnel, so both derive the same\n * identity for one option.\n */\nexport const getOptionValue = (\n props: Pick<OptionProps, \"value\" | \"textValue\" | \"children\">,\n): string | number | undefined =>\n props.value ?? props.textValue ?? extractTextFromChildren(props.children);\n\n/** @flr-generate all */\nexport const Option = flowComponent(\"Option\", (props) => {\n const {\n className,\n children,\n textValue = extractTextFromChildren(children),\n // Derived through `getOptionValue` below; destructured only to keep it out\n // of the props spread onto the react-aria item.\n value: valueIgnored,\n ref,\n ...rest\n } = props;\n\n const value = getOptionValue(props);\n\n useWarnMissingValue(value === undefined);\n\n const rootClassName = clsx(styles.option, className);\n const hasChildren = Children.count(children) >= 1;\n\n return (\n <Aria.ListBoxItem\n className={rootClassName}\n ref={ref}\n id={value}\n {...rest}\n textValue={textValue}\n >\n <span className={styles.content}>\n {hasChildren ? children : textValue}\n </span>\n <IconCheck aria-hidden className={styles.checkMark} />\n </Aria.ListBoxItem>\n );\n});\n\n/*\n * Without an `id`, react-aria gives the item a key off a render-order counter\n * (`react-aria-1`). That key is what the field reports as its selected value\n * and what `defaultValue` has to match, so an option without a `value` silently\n * submits a meaningless string and cannot be preselected — and the key shifts\n * when unrelated markup around it changes. react-aria warns about the missing\n * `textValue` in this situation but says nothing about the key, which is the\n * expensive half (#3028).\n *\n * Warn in an effect rather than during render, so a double render in StrictMode\n * does not log twice; the ref keeps it to once per option.\n */\nconst useWarnMissingValue = (isMissing: boolean): void => {\n const hasWarned = useRef(false);\n\n useEffect(() => {\n if (!isMissing || hasWarned.current) {\n return;\n }\n\n hasWarned.current = true;\n console.error(\n \"An <Option> has no 'value' and none could be inferred from its children, so it falls back to a generated, render-order-dependent key. Pass a 'value' to give the option a stable key.\",\n );\n }, [isMissing]);\n};\n\nexport default Option;\n"],"mappings":";;;;;;;;;;;;;;;;;AAkCA,IAAa,kBACX,UAEA,MAAM,SAAS,MAAM,aAAa,wBAAwB,MAAM,QAAQ;;AAG1E,IAAa,SAAS,cAAc,WAAW,UAAU;CACvD,MAAM,EACJ,WACA,UACA,YAAY,wBAAwB,QAAQ,GAG5C,OAAO,cACP,KACA,GAAG,SACD;CAEJ,MAAM,QAAQ,eAAe,KAAK;CAElC,oBAAoB,UAAU,KAAA,CAAS;CAEvC,MAAM,gBAAgB,KAAK,sBAAO,QAAQ,SAAS;CACnD,MAAM,cAAc,SAAS,MAAM,QAAQ,KAAK;CAEhD,OACE,qBAAC,KAAK,aAAN;EACE,WAAW;EACN;EACL,IAAI;EACJ,GAAI;EACO;EALb,UAAA,CAOE,oBAAC,QAAD;GAAM,WAAW,sBAAO;GACrB,UAAA,cAAc,WAAW;EACtB,CAAA,GACN,oBAAC,WAAD;GAAW,eAAA;GAAY,WAAW,sBAAO;EAAY,CAAA,CACrC;;AAEtB,CAAC;AAcD,IAAM,uBAAuB,cAA6B;CACxD,MAAM,YAAY,OAAO,KAAK;CAE9B,gBAAgB;EACd,IAAI,CAAC,aAAa,UAAU,SAC1B;EAGF,UAAU,UAAU;EACpB,QAAQ,MACN,uLACF;CACF,GAAG,CAAC,SAAS,CAAC;AAChB"}
1
+ {"version":3,"file":"Option.mjs","names":["styles"],"sources":["../../../../../../../src/components/Option/Option.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport { Children, useEffect, useRef } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"./Option.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { extractTextFromChildren } from \"@/lib/react/remote\";\nimport { IconCheck } from \"@/components/Icon/components/icons\";\n\nexport interface OptionProps\n extends\n Omit<Aria.ListBoxItemProps, \"children\" | \"value\" | \"id\">,\n PropsWithChildren,\n FlowComponentProps {\n /**\n * The value this option contributes to the field's selection, and the key\n * `defaultValue` / `value` of the surrounding field target.\n *\n * Defaults to `textValue`, which itself defaults to the text among the\n * option's children — element children such as a `Badge` do not contribute,\n * so `<Option>Millennium Falcon <Badge>Latest</Badge></Option>` is\n * `\"Millennium Falcon\"`. Pass it explicitly when the value must not follow\n * the display text, or when the children carry no text at all.\n */\n value?: string | number;\n}\n\n/**\n * The key an option contributes to its collection: an explicit `value`, else\n * the `textValue`, else the text among the children. Shared with the props\n * context that routes options through a field's tunnel, so both derive the same\n * identity for one option.\n */\nexport const getOptionValue = (\n props: Pick<OptionProps, \"value\" | \"textValue\" | \"children\">,\n): string | number | undefined =>\n props.value ?? props.textValue ?? extractTextFromChildren(props.children);\n\n/** @flr-generate all */\nexport const Option = flowComponent(\"Option\", (props) => {\n const {\n className,\n children,\n textValue = extractTextFromChildren(children),\n // Derived through `getOptionValue` below; destructured only to keep it out\n // of the props spread onto the react-aria item.\n value: valueIgnored,\n ref,\n ...rest\n } = props;\n\n const value = getOptionValue(props);\n\n useWarnMissingValue(value === undefined);\n\n const rootClassName = clsx(styles.option, className);\n const hasChildren = Children.count(children) >= 1;\n\n return (\n <Aria.ListBoxItem\n className={rootClassName}\n ref={ref}\n id={value}\n {...rest}\n textValue={textValue}\n >\n <span className={styles.content}>\n {hasChildren ? children : textValue}\n </span>\n <IconCheck aria-hidden className={styles.checkMark} />\n </Aria.ListBoxItem>\n );\n});\n\n/*\n * Without an `id`, react-aria gives the item a key off a render-order counter\n * (`react-aria-1`). That key is what the field reports as its selected value\n * and what `defaultValue` has to match, so an option without a `value` silently\n * submits a meaningless string and cannot be preselected — and the key shifts\n * when unrelated markup around it changes. react-aria warns about the missing\n * `textValue` in this situation but says nothing about the key, which is the\n * expensive half (#3028).\n *\n * Warn in an effect rather than during render, so a double render in StrictMode\n * does not log twice; the ref keeps it to once per option.\n */\nconst useWarnMissingValue = (isMissing: boolean): void => {\n const hasWarned = useRef(false);\n\n useEffect(() => {\n if (!isMissing || hasWarned.current) {\n return;\n }\n\n hasWarned.current = true;\n console.error(\n \"An <Option> has no 'value' and none could be inferred from its children, so it falls back to a generated, render-order-dependent key. Pass a 'value' to give the option a stable key.\",\n );\n }, [isMissing]);\n};\n\nexport default Option;\n"],"mappings":";;;;;;;;;;;;;;;;;AAkCA,IAAa,kBACX,UAEA,MAAM,SAAS,MAAM,aAAa,wBAAwB,MAAM,QAAQ;;AAG1E,IAAa,SAAS,cAAc,WAAW,UAAU;CACvD,MAAM,EACJ,WACA,UACA,YAAY,wBAAwB,QAAQ,GAG5C,OAAO,cACP,KACA,GAAG,SACD;CAEJ,MAAM,QAAQ,eAAe,KAAK;CAElC,oBAAoB,UAAU,KAAA,CAAS;CAEvC,MAAM,gBAAgB,KAAKA,sBAAO,QAAQ,SAAS;CACnD,MAAM,cAAc,SAAS,MAAM,QAAQ,KAAK;CAEhD,OACE,qBAAC,KAAK,aAAN;EACE,WAAW;EACN;EACL,IAAI;EACJ,GAAI;EACO;EALb,UAAA,CAOE,oBAAC,QAAD;GAAM,WAAWA,sBAAO;GACrB,UAAA,cAAc,WAAW;EACtB,CAAA,GACN,oBAAC,WAAD;GAAW,eAAA;GAAY,WAAWA,sBAAO;EAAY,CAAA,CACrC;;AAEtB,CAAC;AAcD,IAAM,uBAAuB,cAA6B;CACxD,MAAM,YAAY,OAAO,KAAK;CAE9B,gBAAgB;EACd,IAAI,CAAC,aAAa,UAAU,SAC1B;EAGF,UAAU,UAAU;EACpB,QAAQ,MACN,uLACF;CACF,GAAG,CAAC,SAAS,CAAC;AAChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Options.mjs","names":[],"sources":["../../../../../../../src/components/Options/Options.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport { Popover, type PopoverProps } from \"@/components/Popover/Popover\";\nimport clsx from \"clsx\";\nimport styles from \"./Options.module.scss\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport type { OptionProps } from \"@/components/Option\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface OptionsProps\n extends\n Pick<Aria.ListBoxProps<OptionProps>, \"renderEmptyState\" | \"onAction\">,\n PopoverProps {\n controller: OverlayController;\n}\n\nexport const Options: FC<OptionsProps> = flowComponent(\"Options\", (props) => {\n const {\n className,\n children,\n controller,\n renderEmptyState,\n onAction,\n ...restPopoverProps\n } = props;\n\n const rootClassName = clsx(styles.options, className);\n\n return (\n <Popover\n className={styles.popover}\n controller={controller}\n maxHeight={324}\n {...restPopoverProps}\n >\n <Aria.ListBox\n onAction={onAction}\n className={rootClassName}\n renderEmptyState={renderEmptyState}\n >\n {children}\n </Aria.ListBox>\n </Popover>\n );\n});\n\nexport default Options;\n"],"mappings":";;;;;;;;;;AAgBA,IAAa,UAA4B,cAAc,YAAY,UAAU;CAC3E,MAAM,EACJ,WACA,UACA,YACA,kBACA,UACA,GAAG,qBACD;CAEJ,MAAM,gBAAgB,KAAK,uBAAO,SAAS,SAAS;CAEpD,OACE,oBAAC,SAAD;EACE,WAAW,uBAAO;EACN;EACZ,WAAW;EACX,GAAI;EAEJ,UAAA,oBAAC,KAAK,SAAN;GACY;GACV,WAAW;GACO;GAEjB;EACW,CAAA;CACP,CAAA;AAEb,CAAC"}
1
+ {"version":3,"file":"Options.mjs","names":["styles"],"sources":["../../../../../../../src/components/Options/Options.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport { Popover, type PopoverProps } from \"@/components/Popover/Popover\";\nimport clsx from \"clsx\";\nimport styles from \"./Options.module.scss\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport type { OptionProps } from \"@/components/Option\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface OptionsProps\n extends\n Pick<Aria.ListBoxProps<OptionProps>, \"renderEmptyState\" | \"onAction\">,\n PopoverProps {\n controller: OverlayController;\n}\n\nexport const Options: FC<OptionsProps> = flowComponent(\"Options\", (props) => {\n const {\n className,\n children,\n controller,\n renderEmptyState,\n onAction,\n ...restPopoverProps\n } = props;\n\n const rootClassName = clsx(styles.options, className);\n\n return (\n <Popover\n className={styles.popover}\n controller={controller}\n maxHeight={324}\n {...restPopoverProps}\n >\n <Aria.ListBox\n onAction={onAction}\n className={rootClassName}\n renderEmptyState={renderEmptyState}\n >\n {children}\n </Aria.ListBox>\n </Popover>\n );\n});\n\nexport default Options;\n"],"mappings":";;;;;;;;;;AAgBA,IAAa,UAA4B,cAAc,YAAY,UAAU;CAC3E,MAAM,EACJ,WACA,UACA,YACA,kBACA,UACA,GAAG,qBACD;CAEJ,MAAM,gBAAgB,KAAKA,uBAAO,SAAS,SAAS;CAEpD,OACE,oBAAC,SAAD;EACE,WAAWA,uBAAO;EACN;EACZ,WAAW;EACX,GAAI;EAEJ,UAAA,oBAAC,KAAK,SAAN;GACY;GACV,WAAW;GACO;GAEjB;EACW,CAAA;CACP,CAAA;AAEb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Overlay.mjs","names":[],"sources":["../../../../../../../src/components/Overlay/Overlay.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, Ref } from \"react\";\nimport styles from \"./Overlay.module.scss\";\nimport clsx from \"clsx\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport OverlayContextProvider from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport OverlayContentView from \"@/views/OverlayContentView\";\nimport type {\n OverlayCloseHandler,\n OverlayOpenHandler,\n OverlayOpenStateHandler,\n} from \"@/lib/controller/overlay/OverlayController\";\nimport type * as Aria from \"react-aria-components\";\n\nexport interface OverlayProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Pick<Aria.DialogProps, \"aria-labelledby\"> {\n ref?: Ref<HTMLDivElement>;\n /** The controller to control the overlay state. */\n controller?: OverlayController;\n /** Whether the overlay can be closed by clicking outside of it. */\n isDismissable?: boolean;\n /** Whether the overlay is a modal or a light box. */\n overlayType?: \"Modal\" | \"LightBox\";\n /** Whether the overlay is open. Use it to control the overlay state. */\n isOpen?: boolean;\n /**\n * Whether the overlay is open initially. Use it for an uncontrolled overlay.\n *\n * @default false\n */\n isDefaultOpen?: boolean;\n /** Called when the overlay is opened. */\n onOpen?: OverlayOpenHandler;\n /** Called when the overlay is closed. */\n onClose?: OverlayCloseHandler;\n /** Called with the new open state whenever the overlay is opened or closed. */\n onOpenChange?: OverlayOpenStateHandler;\n /** Whether closing the overlay must be confirmed. */\n confirmOnClose?: boolean;\n}\n\nexport const Overlay: FC<OverlayProps> = (props) => {\n const {\n controller: controllerFromProps,\n children,\n isDismissable = true,\n className,\n overlayType = \"Modal\",\n isDefaultOpen,\n isOpen: isOpenFromProps,\n ref,\n \"aria-labelledby\": ariaLabelledBy,\n ...controllerOptions\n } = props;\n\n const controllerFromContext = useOverlayController(overlayType, {\n reuseControllerFromContext: true,\n isDefaultOpen,\n });\n\n const controller = controllerFromProps ?? controllerFromContext;\n controller.useUpdateOptions(controllerOptions);\n\n const isOpen = isOpenFromProps ?? controller.useIsOpen();\n\n const rootClassName = clsx(styles.overlay, className);\n\n return (\n <OverlayContentView\n onOpenChange={controller.setOpen}\n isOpen={isOpen}\n ref={ref}\n isDismissable={isDismissable}\n className={rootClassName}\n aria-labelledby={ariaLabelledBy}\n >\n <OverlayContextProvider type=\"Modal\" controller={controller}>\n {children}\n </OverlayContextProvider>\n </OverlayContentView>\n );\n};\n\nexport default Overlay;\n"],"mappings":";;;;;;;;;AA6CA,IAAa,WAA6B,UAAU;CAClD,MAAM,EACJ,YAAY,qBACZ,UACA,gBAAgB,MAChB,WACA,cAAc,SACd,eACA,QAAQ,iBACR,KACA,mBAAmB,gBACnB,GAAG,sBACD;CAEJ,MAAM,wBAAwB,qBAAqB,aAAa;EAC9D,4BAA4B;EAC5B;CACF,CAAC;CAED,MAAM,aAAa,uBAAuB;CAC1C,WAAW,iBAAiB,iBAAiB;CAE7C,MAAM,SAAS,mBAAmB,WAAW,UAAU;CAEvD,MAAM,gBAAgB,KAAK,uBAAO,SAAS,SAAS;CAEpD,OACE,oBAAC,oBAAD;EACE,cAAc,WAAW;EACjB;EACH;EACU;EACf,WAAW;EACX,mBAAiB;EAEjB,UAAA,oBAAC,wBAAD;GAAwB,MAAK;GAAoB;GAC9C;EACqB,CAAA;CACN,CAAA;AAExB"}
1
+ {"version":3,"file":"Overlay.mjs","names":["styles"],"sources":["../../../../../../../src/components/Overlay/Overlay.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, Ref } from \"react\";\nimport styles from \"./Overlay.module.scss\";\nimport clsx from \"clsx\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport OverlayContextProvider from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport OverlayContentView from \"@/views/OverlayContentView\";\nimport type {\n OverlayCloseHandler,\n OverlayOpenHandler,\n OverlayOpenStateHandler,\n} from \"@/lib/controller/overlay/OverlayController\";\nimport type * as Aria from \"react-aria-components\";\n\nexport interface OverlayProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Pick<Aria.DialogProps, \"aria-labelledby\"> {\n ref?: Ref<HTMLDivElement>;\n /** The controller to control the overlay state. */\n controller?: OverlayController;\n /** Whether the overlay can be closed by clicking outside of it. */\n isDismissable?: boolean;\n /** Whether the overlay is a modal or a light box. */\n overlayType?: \"Modal\" | \"LightBox\";\n /** Whether the overlay is open. Use it to control the overlay state. */\n isOpen?: boolean;\n /**\n * Whether the overlay is open initially. Use it for an uncontrolled overlay.\n *\n * @default false\n */\n isDefaultOpen?: boolean;\n /** Called when the overlay is opened. */\n onOpen?: OverlayOpenHandler;\n /** Called when the overlay is closed. */\n onClose?: OverlayCloseHandler;\n /** Called with the new open state whenever the overlay is opened or closed. */\n onOpenChange?: OverlayOpenStateHandler;\n /** Whether closing the overlay must be confirmed. */\n confirmOnClose?: boolean;\n}\n\nexport const Overlay: FC<OverlayProps> = (props) => {\n const {\n controller: controllerFromProps,\n children,\n isDismissable = true,\n className,\n overlayType = \"Modal\",\n isDefaultOpen,\n isOpen: isOpenFromProps,\n ref,\n \"aria-labelledby\": ariaLabelledBy,\n ...controllerOptions\n } = props;\n\n const controllerFromContext = useOverlayController(overlayType, {\n reuseControllerFromContext: true,\n isDefaultOpen,\n });\n\n const controller = controllerFromProps ?? controllerFromContext;\n controller.useUpdateOptions(controllerOptions);\n\n const isOpen = isOpenFromProps ?? controller.useIsOpen();\n\n const rootClassName = clsx(styles.overlay, className);\n\n return (\n <OverlayContentView\n onOpenChange={controller.setOpen}\n isOpen={isOpen}\n ref={ref}\n isDismissable={isDismissable}\n className={rootClassName}\n aria-labelledby={ariaLabelledBy}\n >\n <OverlayContextProvider type=\"Modal\" controller={controller}>\n {children}\n </OverlayContextProvider>\n </OverlayContentView>\n );\n};\n\nexport default Overlay;\n"],"mappings":";;;;;;;;;AA6CA,IAAa,WAA6B,UAAU;CAClD,MAAM,EACJ,YAAY,qBACZ,UACA,gBAAgB,MAChB,WACA,cAAc,SACd,eACA,QAAQ,iBACR,KACA,mBAAmB,gBACnB,GAAG,sBACD;CAEJ,MAAM,wBAAwB,qBAAqB,aAAa;EAC9D,4BAA4B;EAC5B;CACF,CAAC;CAED,MAAM,aAAa,uBAAuB;CAC1C,WAAW,iBAAiB,iBAAiB;CAE7C,MAAM,SAAS,mBAAmB,WAAW,UAAU;CAEvD,MAAM,gBAAgB,KAAKA,uBAAO,SAAS,SAAS;CAEpD,OACE,oBAAC,oBAAD;EACE,cAAc,WAAW;EACjB;EACH;EACU;EACf,WAAW;EACX,mBAAiB;EAEjB,UAAA,oBAAC,wBAAD;GAAwB,MAAK;GAAoB;GAC9C;EACqB,CAAA;CACN,CAAA;AAExB"}
@@ -17,9 +17,14 @@ var overlayContainerAttribute = "data-flow-overlays";
17
17
  * blurs a focused field inside it (#3268). The same heuristic also spares
18
18
  * custom elements and shadow hosts the page itself appends, which then render
19
19
  * above open overlays.
20
+ *
21
+ * Hidden nodes don't count either: react-aria appends a `display: none`
22
+ * description node whenever a DatePicker's value changes, and moving the
23
+ * container for it on every keystroke resets the segment being typed into.
20
24
  */
25
+ var isHiddenNode = (node) => node instanceof HTMLElement && (node.hidden === true || node.style.display === "none");
21
26
  var isCoveredByPageContent = (container) => {
22
- for (let node = container.nextElementSibling; node; node = node.nextElementSibling) if (!isBrowserExtensionNode(node)) return true;
27
+ for (let node = container.nextElementSibling; node; node = node.nextElementSibling) if (!isBrowserExtensionNode(node) && !isHiddenNode(node)) return true;
23
28
  return false;
24
29
  };
25
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayContent.mjs","names":[],"sources":["../../../../../../../../src/components/Overlay/components/OverlayContent.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport { type FC, type PropsWithChildren, type Ref, Suspense } from \"react\";\nimport { UNSAFE_PortalProvider } from \"react-aria\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { OverlaySuspenseFallback } from \"@/components/Overlay/components/OverlaySuspenseFallback\";\nimport styles from \"../Overlay.module.scss\";\nimport DivView from \"@/views/DivView\";\nimport {\n isBrowserExtensionNode,\n useKeepBrowserExtensionsInteractive,\n} from \"@/lib/hooks/dom/useKeepBrowserExtensionsInteractive\";\nimport { useIsActivityActive } from \"@/components/Activity/context\";\n\nconst overlayContainerAttribute = \"data-flow-overlays\";\n\n/**\n * Nodes a browser extension appends (e.g. 1Password's inline menu) don't count\n * as covering: they belong on top anyway, and moving the container for them\n * blurs a focused field inside it (#3268). The same heuristic also spares\n * custom elements and shadow hosts the page itself appends, which then render\n * above open overlays.\n */\nconst isCoveredByPageContent = (container: HTMLElement): boolean => {\n for (\n let node = container.nextElementSibling;\n node;\n node = node.nextElementSibling\n ) {\n if (!isBrowserExtensionNode(node)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Only the container moves, never the nodes appended after it: those are\n * foreign, and moving them costs state we cannot restore (an iframe reloads).\n * The container's own state we can. Moving a node blurs the focused element\n * inside it and resets every scroll container inside to the top. `moveBefore`\n * keeps the focus (and, in Chromium, the scroll positions); the rest is\n * restored afterwards.\n */\nconst moveToEnd = (container: HTMLElement): void => {\n const body = document.body;\n const focused = document.activeElement;\n const scrolled = Array.from(container.querySelectorAll<HTMLElement>(\"*\"))\n .filter((element) => element.scrollTop !== 0 || element.scrollLeft !== 0)\n .map(\n (element) => [element, element.scrollTop, element.scrollLeft] as const,\n );\n\n if (typeof body.moveBefore === \"function\") {\n body.moveBefore(container, null);\n } else {\n body.append(container);\n }\n\n for (const [element, scrollTop, scrollLeft] of scrolled) {\n element.scrollTop = scrollTop;\n element.scrollLeft = scrollLeft;\n }\n if (\n focused instanceof HTMLElement &&\n container.contains(focused) &&\n document.activeElement !== focused\n ) {\n focused.focus({ preventScroll: true });\n }\n};\n\n/**\n * Render overlays into a dedicated container instead of `document.body`.\n *\n * React Aria `FocusScope` relies on nearby sibling nodes (sentinels + overlay).\n * Browser extensions (e.g. password managers) inject/reorder `body` children,\n * which can separate those nodes. Then focus scope detection breaks and may\n * cause recursive focus restoration.\n *\n * Keep the overlay container as the last child of body.\n *\n * React Aria normally portals overlays directly into body, so they are appended\n * last and render on top.\n *\n * If we create one persistent container only once, anything appended to body\n * later (toasts, third-party widgets, remounted app root) can render above open\n * overlays. Then overlays can appear behind page content, and the backdrop blur\n * no longer covers the page.\n */\nconst getOverlayContainer = (): HTMLElement | null => {\n if (typeof document === \"undefined\") {\n return null;\n }\n\n const existingContainer = document.querySelector<HTMLElement>(\n `body > [${overlayContainerAttribute}]`,\n );\n\n if (existingContainer) {\n if (isCoveredByPageContent(existingContainer)) {\n moveToEnd(existingContainer);\n }\n return existingContainer;\n }\n\n const container = document.createElement(\"div\");\n container.setAttribute(overlayContainerAttribute, \"\");\n document.body.append(container);\n\n return container;\n};\n\nexport interface OverlayContentProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Pick<Aria.DialogProps, \"aria-labelledby\"> {\n ref?: Ref<HTMLDivElement>;\n onOpenChange: (isOpen: boolean) => void;\n isDismissable?: boolean;\n isOpen?: boolean;\n}\n\n/** @flr-generate all */\nexport const OverlayContent: FC<OverlayContentProps> = (props) => {\n const {\n children,\n className,\n \"aria-labelledby\": ariaLabelledBy,\n ...restProps\n } = props;\n\n const isActivityActive = useIsActivityActive();\n\n useKeepBrowserExtensionsInteractive(restProps.isOpen ?? false);\n\n const Fallback = () => {\n return (\n <DivView className={styles.suspense}>\n <OverlaySuspenseFallback {...restProps} />\n </DivView>\n );\n };\n\n if (!isActivityActive) {\n return null;\n }\n\n return (\n <UNSAFE_PortalProvider getContainer={getOverlayContainer}>\n <Aria.ModalOverlay {...restProps} className={className}>\n {/* The centering viewport between the backdrop and react-aria's modal\n wrapper. Classed so Modal/OffCanvas/LightBox can position it\n without selecting a bare `div`. */}\n <DivView className={styles.viewport}>\n <Aria.Modal>\n <Suspense fallback={<Fallback />}>\n <Aria.Dialog aria-labelledby={ariaLabelledBy}>\n {children}\n </Aria.Dialog>\n </Suspense>\n </Aria.Modal>\n </DivView>\n </Aria.ModalOverlay>\n </UNSAFE_PortalProvider>\n );\n};\n\nexport default OverlayContent;\n"],"mappings":";;;;;;;;;;;;AAaA,IAAM,4BAA4B;;;;;;;;AASlC,IAAM,0BAA0B,cAAoC;CAClE,KACE,IAAI,OAAO,UAAU,oBACrB,MACA,OAAO,KAAK,oBAEZ,IAAI,CAAC,uBAAuB,IAAI,GAC9B,OAAO;CAGX,OAAO;AACT;;;;;;;;;AAUA,IAAM,aAAa,cAAiC;CAClD,MAAM,OAAO,SAAS;CACtB,MAAM,UAAU,SAAS;CACzB,MAAM,WAAW,MAAM,KAAK,UAAU,iBAA8B,GAAG,CAAC,CAAC,CACtE,QAAQ,YAAY,QAAQ,cAAc,KAAK,QAAQ,eAAe,CAAC,CAAC,CACxE,KACE,YAAY;EAAC;EAAS,QAAQ;EAAW,QAAQ;CAAU,CAC9D;CAEF,IAAI,OAAO,KAAK,eAAe,YAC7B,KAAK,WAAW,WAAW,IAAI;MAE/B,KAAK,OAAO,SAAS;CAGvB,KAAK,MAAM,CAAC,SAAS,WAAW,eAAe,UAAU;EACvD,QAAQ,YAAY;EACpB,QAAQ,aAAa;CACvB;CACA,IACE,mBAAmB,eACnB,UAAU,SAAS,OAAO,KAC1B,SAAS,kBAAkB,SAE3B,QAAQ,MAAM,EAAE,eAAe,KAAK,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;AAoBA,IAAM,4BAAgD;CACpD,IAAI,OAAO,aAAa,aACtB,OAAO;CAGT,MAAM,oBAAoB,SAAS,cACjC,WAAW,0BAA0B,EACvC;CAEA,IAAI,mBAAmB;EACrB,IAAI,uBAAuB,iBAAiB,GAC1C,UAAU,iBAAiB;EAE7B,OAAO;CACT;CAEA,MAAM,YAAY,SAAS,cAAc,KAAK;CAC9C,UAAU,aAAa,2BAA2B,EAAE;CACpD,SAAS,KAAK,OAAO,SAAS;CAE9B,OAAO;AACT;;AAcA,IAAa,kBAA2C,UAAU;CAChE,MAAM,EACJ,UACA,WACA,mBAAmB,gBACnB,GAAG,cACD;CAEJ,MAAM,mBAAmB,oBAAoB;CAE7C,oCAAoC,UAAU,UAAU,KAAK;CAE7D,MAAM,iBAAiB;EACrB,OACE,oBAAC,SAAD;GAAS,WAAW,uBAAO;GACzB,UAAA,oBAAC,yBAAD,EAAyB,GAAI,UAAY,CAAA;EAClC,CAAA;CAEb;CAEA,IAAI,CAAC,kBACH,OAAO;CAGT,OACE,oBAAC,uBAAD;EAAuB,cAAc;EACnC,UAAA,oBAAC,KAAK,cAAN;GAAmB,GAAI;GAAsB;GAI3C,UAAA,oBAAC,SAAD;IAAS,WAAW,uBAAO;IACzB,UAAA,oBAAC,KAAK,OAAN,EAAA,UACE,oBAAC,UAAD;KAAU,UAAU,oBAAC,UAAD,CAAW,CAAA;KAC7B,UAAA,oBAAC,KAAK,QAAN;MAAa,mBAAiB;MAC3B;KACU,CAAA;IACL,CAAA,EACA,CAAA;GACL,CAAA;EACQ,CAAA;CACE,CAAA;AAE3B"}
1
+ {"version":3,"file":"OverlayContent.mjs","names":["styles"],"sources":["../../../../../../../../src/components/Overlay/components/OverlayContent.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport { type FC, type PropsWithChildren, type Ref, Suspense } from \"react\";\nimport { UNSAFE_PortalProvider } from \"react-aria\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { OverlaySuspenseFallback } from \"@/components/Overlay/components/OverlaySuspenseFallback\";\nimport styles from \"../Overlay.module.scss\";\nimport DivView from \"@/views/DivView\";\nimport {\n isBrowserExtensionNode,\n useKeepBrowserExtensionsInteractive,\n} from \"@/lib/hooks/dom/useKeepBrowserExtensionsInteractive\";\nimport { useIsActivityActive } from \"@/components/Activity/context\";\n\nconst overlayContainerAttribute = \"data-flow-overlays\";\n\n/**\n * Nodes a browser extension appends (e.g. 1Password's inline menu) don't count\n * as covering: they belong on top anyway, and moving the container for them\n * blurs a focused field inside it (#3268). The same heuristic also spares\n * custom elements and shadow hosts the page itself appends, which then render\n * above open overlays.\n *\n * Hidden nodes don't count either: react-aria appends a `display: none`\n * description node whenever a DatePicker's value changes, and moving the\n * container for it on every keystroke resets the segment being typed into.\n */\nconst isHiddenNode = (node: Element): boolean =>\n node instanceof HTMLElement &&\n (node.hidden === true || node.style.display === \"none\");\n\nconst isCoveredByPageContent = (container: HTMLElement): boolean => {\n for (\n let node = container.nextElementSibling;\n node;\n node = node.nextElementSibling\n ) {\n if (!isBrowserExtensionNode(node) && !isHiddenNode(node)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Only the container moves, never the nodes appended after it: those are\n * foreign, and moving them costs state we cannot restore (an iframe reloads).\n * The container's own state we can. Moving a node blurs the focused element\n * inside it and resets every scroll container inside to the top. `moveBefore`\n * keeps the focus (and, in Chromium, the scroll positions); the rest is\n * restored afterwards.\n */\nconst moveToEnd = (container: HTMLElement): void => {\n const body = document.body;\n const focused = document.activeElement;\n const scrolled = Array.from(container.querySelectorAll<HTMLElement>(\"*\"))\n .filter((element) => element.scrollTop !== 0 || element.scrollLeft !== 0)\n .map(\n (element) => [element, element.scrollTop, element.scrollLeft] as const,\n );\n\n if (typeof body.moveBefore === \"function\") {\n body.moveBefore(container, null);\n } else {\n body.append(container);\n }\n\n for (const [element, scrollTop, scrollLeft] of scrolled) {\n element.scrollTop = scrollTop;\n element.scrollLeft = scrollLeft;\n }\n if (\n focused instanceof HTMLElement &&\n container.contains(focused) &&\n document.activeElement !== focused\n ) {\n focused.focus({ preventScroll: true });\n }\n};\n\n/**\n * Render overlays into a dedicated container instead of `document.body`.\n *\n * React Aria `FocusScope` relies on nearby sibling nodes (sentinels + overlay).\n * Browser extensions (e.g. password managers) inject/reorder `body` children,\n * which can separate those nodes. Then focus scope detection breaks and may\n * cause recursive focus restoration.\n *\n * Keep the overlay container as the last child of body.\n *\n * React Aria normally portals overlays directly into body, so they are appended\n * last and render on top.\n *\n * If we create one persistent container only once, anything appended to body\n * later (toasts, third-party widgets, remounted app root) can render above open\n * overlays. Then overlays can appear behind page content, and the backdrop blur\n * no longer covers the page.\n */\nconst getOverlayContainer = (): HTMLElement | null => {\n if (typeof document === \"undefined\") {\n return null;\n }\n\n const existingContainer = document.querySelector<HTMLElement>(\n `body > [${overlayContainerAttribute}]`,\n );\n\n if (existingContainer) {\n if (isCoveredByPageContent(existingContainer)) {\n moveToEnd(existingContainer);\n }\n return existingContainer;\n }\n\n const container = document.createElement(\"div\");\n container.setAttribute(overlayContainerAttribute, \"\");\n document.body.append(container);\n\n return container;\n};\n\nexport interface OverlayContentProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Pick<Aria.DialogProps, \"aria-labelledby\"> {\n ref?: Ref<HTMLDivElement>;\n onOpenChange: (isOpen: boolean) => void;\n isDismissable?: boolean;\n isOpen?: boolean;\n}\n\n/** @flr-generate all */\nexport const OverlayContent: FC<OverlayContentProps> = (props) => {\n const {\n children,\n className,\n \"aria-labelledby\": ariaLabelledBy,\n ...restProps\n } = props;\n\n const isActivityActive = useIsActivityActive();\n\n useKeepBrowserExtensionsInteractive(restProps.isOpen ?? false);\n\n const Fallback = () => {\n return (\n <DivView className={styles.suspense}>\n <OverlaySuspenseFallback {...restProps} />\n </DivView>\n );\n };\n\n if (!isActivityActive) {\n return null;\n }\n\n return (\n <UNSAFE_PortalProvider getContainer={getOverlayContainer}>\n <Aria.ModalOverlay {...restProps} className={className}>\n {/* The centering viewport between the backdrop and react-aria's modal\n wrapper. Classed so Modal/OffCanvas/LightBox can position it\n without selecting a bare `div`. */}\n <DivView className={styles.viewport}>\n <Aria.Modal>\n <Suspense fallback={<Fallback />}>\n <Aria.Dialog aria-labelledby={ariaLabelledBy}>\n {children}\n </Aria.Dialog>\n </Suspense>\n </Aria.Modal>\n </DivView>\n </Aria.ModalOverlay>\n </UNSAFE_PortalProvider>\n );\n};\n\nexport default OverlayContent;\n"],"mappings":";;;;;;;;;;;;AAaA,IAAM,4BAA4B;;;;;;;;;;;;AAalC,IAAM,gBAAgB,SACpB,gBAAgB,gBACf,KAAK,WAAW,QAAQ,KAAK,MAAM,YAAY;AAElD,IAAM,0BAA0B,cAAoC;CAClE,KACE,IAAI,OAAO,UAAU,oBACrB,MACA,OAAO,KAAK,oBAEZ,IAAI,CAAC,uBAAuB,IAAI,KAAK,CAAC,aAAa,IAAI,GACrD,OAAO;CAGX,OAAO;AACT;;;;;;;;;AAUA,IAAM,aAAa,cAAiC;CAClD,MAAM,OAAO,SAAS;CACtB,MAAM,UAAU,SAAS;CACzB,MAAM,WAAW,MAAM,KAAK,UAAU,iBAA8B,GAAG,CAAC,CAAC,CACtE,QAAQ,YAAY,QAAQ,cAAc,KAAK,QAAQ,eAAe,CAAC,CAAC,CACxE,KACE,YAAY;EAAC;EAAS,QAAQ;EAAW,QAAQ;CAAU,CAC9D;CAEF,IAAI,OAAO,KAAK,eAAe,YAC7B,KAAK,WAAW,WAAW,IAAI;MAE/B,KAAK,OAAO,SAAS;CAGvB,KAAK,MAAM,CAAC,SAAS,WAAW,eAAe,UAAU;EACvD,QAAQ,YAAY;EACpB,QAAQ,aAAa;CACvB;CACA,IACE,mBAAmB,eACnB,UAAU,SAAS,OAAO,KAC1B,SAAS,kBAAkB,SAE3B,QAAQ,MAAM,EAAE,eAAe,KAAK,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;AAoBA,IAAM,4BAAgD;CACpD,IAAI,OAAO,aAAa,aACtB,OAAO;CAGT,MAAM,oBAAoB,SAAS,cACjC,WAAW,0BAA0B,EACvC;CAEA,IAAI,mBAAmB;EACrB,IAAI,uBAAuB,iBAAiB,GAC1C,UAAU,iBAAiB;EAE7B,OAAO;CACT;CAEA,MAAM,YAAY,SAAS,cAAc,KAAK;CAC9C,UAAU,aAAa,2BAA2B,EAAE;CACpD,SAAS,KAAK,OAAO,SAAS;CAE9B,OAAO;AACT;;AAcA,IAAa,kBAA2C,UAAU;CAChE,MAAM,EACJ,UACA,WACA,mBAAmB,gBACnB,GAAG,cACD;CAEJ,MAAM,mBAAmB,oBAAoB;CAE7C,oCAAoC,UAAU,UAAU,KAAK;CAE7D,MAAM,iBAAiB;EACrB,OACE,oBAAC,SAAD;GAAS,WAAWA,uBAAO;GACzB,UAAA,oBAAC,yBAAD,EAAyB,GAAI,UAAY,CAAA;EAClC,CAAA;CAEb;CAEA,IAAI,CAAC,kBACH,OAAO;CAGT,OACE,oBAAC,uBAAD;EAAuB,cAAc;EACnC,UAAA,oBAAC,KAAK,cAAN;GAAmB,GAAI;GAAsB;GAI3C,UAAA,oBAAC,SAAD;IAAS,WAAWA,uBAAO;IACzB,UAAA,oBAAC,KAAK,OAAN,EAAA,UACE,oBAAC,UAAD;KAAU,UAAU,oBAAC,UAAD,CAAW,CAAA;KAC7B,UAAA,oBAAC,KAAK,QAAN;MAAa,mBAAiB;MAC3B;KACU,CAAA;IACL,CAAA,EACA,CAAA;GACL,CAAA;EACQ,CAAA;CACE,CAAA;AAE3B"}
@@ -5,7 +5,7 @@ import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
5
5
  import dynamic from "../../lib/propsContext/dynamicProps/dynamic.mjs";
6
6
  import { useLocalizedStringFormatter } from "../TranslationProvider/useLocalizedStringFormatter.mjs";
7
7
  import { UiComponentTunnelExit } from "../UiComponentTunnel/UiComponentTunnelExit.mjs";
8
- import { useFieldComponent } from "../../lib/hooks/useFieldComponent.mjs";
8
+ import { joinIds, useFieldComponent } from "../../lib/hooks/useFieldComponent.mjs";
9
9
  import { useControlledHostValueProps } from "../../lib/remote/useControlledHostValueProps.mjs";
10
10
  import { FieldDescription } from "../FieldDescription/FieldDescription.mjs";
11
11
  import { FieldError } from "../FieldError/FieldError.mjs";
@@ -23,7 +23,7 @@ import { PasswordGenerateButton } from "./components/PasswordGenerateButton/Pass
23
23
  import { usePolicyValidationResult } from "./lib/usePolicyValidationResult.mjs";
24
24
  import { useAriaAnnouncePasswordVisibility, useAriaAnnounceValidationState } from "./lib/ariaAnnounce.mjs";
25
25
  import clsx from "clsx";
26
- import { useMemo, useRef, useState } from "react";
26
+ import { useCallback, useId, useMemo, useRef, useState } from "react";
27
27
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
28
28
  import * as Aria from "react-aria-components";
29
29
  //#region src/components/PasswordCreationField/PasswordCreationField.tsx
@@ -44,7 +44,7 @@ var PasswordCreationField = flowComponent("PasswordCreationField", (props) => {
44
44
  };
45
45
  const [policyValidationResult, setPolicyValidationResult] = useState(initialPolicyValidationState);
46
46
  const loadingRef = useRef(null);
47
- usePolicyValidationResult(validationPolicy, value ?? "", () => {
47
+ const { rememberValidationResult } = usePolicyValidationResult(validationPolicy, value ?? "", () => {
48
48
  if (isEmptyValue) return;
49
49
  loadingRef.current = setTimeout(() => {
50
50
  setPolicyValidationResult((r) => ({
@@ -77,10 +77,23 @@ var PasswordCreationField = flowComponent("PasswordCreationField", (props) => {
77
77
  const isValidFromValidationResult = !isEmptyValue && stateFromValidationResult?.isValid;
78
78
  const isInvalidFromValidationResult = !isEmptyValue && stateFromValidationResult?.isValid === false;
79
79
  const isInvalid = invalidFromProps || isInvalidFromValidationResult;
80
- const { FieldErrorView, FieldErrorCaptureContext, fieldProps, fieldPropsContext } = useFieldComponent({
81
- ...props,
82
- isInvalid
83
- }, "PasswordCreationField");
80
+ const { FieldErrorView, FieldErrorCaptureContext, wrapperProps, controlProps, fieldPropsContext, renderedFieldErrorId } = useFieldComponent(props, "PasswordCreationField");
81
+ /**
82
+ * The result for a valid password appears after the asynchronous policy
83
+ * validation. react-aria resolves its description slot only when the
84
+ * field's validity changes, so a result that appears while the field stays
85
+ * valid (a generated password) was never linked. It gets its own id
86
+ * instead, referenced only while it is rendered.
87
+ *
88
+ * A shown error replaces it: the FormField styles hide descriptions next to
89
+ * an error, and a hidden description would still be announced.
90
+ */
91
+ const resultDescriptionId = useId();
92
+ const [isResultDescriptionRendered, setIsResultDescriptionRendered] = useState(false);
93
+ const resultDescriptionRef = useCallback((element) => {
94
+ setIsResultDescriptionRendered(!!element);
95
+ }, []);
96
+ const describedBy = joinIds(isResultDescriptionRendered && resultDescriptionId, controlProps["aria-describedby"]);
84
97
  useAriaAnnounceValidationState(latestValidationErrorText, !isEmptyValue && policyValidationResult.isValid !== "indeterminate");
85
98
  useAriaAnnouncePasswordVisibility(isPasswordRevealed);
86
99
  const setOptimisticPolicyValidationResult = (state = {}) => {
@@ -92,14 +105,16 @@ var PasswordCreationField = flowComponent("PasswordCreationField", (props) => {
92
105
  };
93
106
  const onPasswordGenerateHandler = async () => {
94
107
  const generatedPassword = await generatePassword(validationPolicy);
95
- setOptimisticPolicyValidationResult({
96
- ...initialPolicyValidationState,
97
- isValid: true,
98
- ruleResults: policyValidationResult.ruleResults.map((r) => ({
99
- ...r,
100
- isValid: true
101
- }))
102
- });
108
+ /**
109
+ * The generator returns only passwords the policy accepts, so the rating
110
+ * is set with the password instead of after the typing debounce. It is
111
+ * the policy's own result: a guessed one (full strength) was overturned
112
+ * by the real rating, e.g. to "meets the minimum requirements". Cached,
113
+ * so the debounced validation of this password does not rate it again.
114
+ */
115
+ const generatedPasswordResult = await validationPolicy.validate(generatedPassword);
116
+ rememberValidationResult(generatedPassword, generatedPasswordResult);
117
+ setPolicyValidationResult(generatedPasswordResult);
103
118
  setIsPasswordRevealed(true);
104
119
  onChange(generatedPassword);
105
120
  };
@@ -155,12 +170,12 @@ var PasswordCreationField = flowComponent("PasswordCreationField", (props) => {
155
170
  };
156
171
  return /* @__PURE__ */ jsxs(Aria.TextField, {
157
172
  ...rest,
158
- ...fieldProps,
173
+ "aria-describedby": describedBy,
159
174
  value,
160
175
  type: isPasswordRevealed ? "text" : "password",
161
176
  onChange,
162
177
  onPaste: onPasswordPasteHandler,
163
- className: clsx(className, fieldProps.className),
178
+ className: clsx(className, wrapperProps.className),
164
179
  isDisabled,
165
180
  isInvalid,
166
181
  isRequired,
@@ -199,11 +214,19 @@ var PasswordCreationField = flowComponent("PasswordCreationField", (props) => {
199
214
  isEmptyValue,
200
215
  isLoading: policyValidationResult.isValid === "indeterminate",
201
216
  policyValidationResult,
202
- validationResultState: stateFromValidationResult
217
+ validationResultState: stateFromValidationResult,
218
+ isInvalid: invalidFromProps
203
219
  }, value)
204
220
  ]
205
221
  }),
206
- isValidFromValidationResult && /* @__PURE__ */ jsx(FieldDescription, { children: latestValidationErrorText })
222
+ isValidFromValidationResult && !renderedFieldErrorId && /* @__PURE__ */ jsx(Aria.TextContext.Provider, {
223
+ value: null,
224
+ children: /* @__PURE__ */ jsx(FieldDescription, {
225
+ id: resultDescriptionId,
226
+ ref: resultDescriptionRef,
227
+ children: latestValidationErrorText
228
+ })
229
+ })
207
230
  ]
208
231
  })] }), /* @__PURE__ */ jsx(FieldErrorView, {})]
209
232
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordCreationField.mjs","names":[],"sources":["../../../../../../../src/components/PasswordCreationField/PasswordCreationField.tsx"],"sourcesContent":["import {\n type PropsWithChildren,\n useState,\n type ClipboardEvent,\n useMemo,\n useRef,\n} from \"react\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport styles from \"./PasswordCreationField.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport { type ActionFn } from \"@/components/Action\";\nimport getStateFromLatestPolicyValidationResult from \"@/components/PasswordCreationField/lib/getStateFromLatestPolicyValidationResult\";\nimport locales from \"./locales/*.locale.json\";\nimport generateValidationTranslation from \"@/components/PasswordCreationField/lib/generateValidationTranslation\";\nimport FieldDescription from \"@/components/FieldDescription\";\nimport ComplexityIndicator from \"@/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator\";\nimport { generatePassword } from \"@/components/PasswordCreationField/worker/generatePassword\";\nimport TogglePasswordVisibilityButton from \"@/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton\";\nimport { ValidationResultButton } from \"@/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton\";\nimport { PasswordGenerateButton } from \"@/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton\";\nimport type {\n PolicyValidationResult,\n PolicyGenericDeclaration,\n RuleValidationResult,\n} from \"@/integrations/@mittwald/password-tools-js\";\nimport {\n defaultPasswordCreationPolicy,\n Policy,\n} from \"@/integrations/@mittwald/password-tools-js\";\nimport { usePolicyValidationResult } from \"@/components/PasswordCreationField/lib/usePolicyValidationResult\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { FieldError } from \"@/components/FieldError\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport {\n useAriaAnnouncePasswordVisibility,\n useAriaAnnounceValidationState,\n} from \"@/components/PasswordCreationField/lib/ariaAnnounce\";\n\nexport interface PasswordCreationFieldProps\n extends\n PropsWithChildren<\n Omit<Aria.TextFieldProps, \"children\" | \"value\" | \"defaultValue\"> &\n Partial<Pick<Aria.FieldErrorRenderProps, \"validationErrors\">>\n >,\n FlowComponentProps<HTMLInputElement> {\n /** The password of a controlled field. */\n value?: string;\n /** Called with the password and its validity whenever the password changes. */\n onValidationResult?: (result: { password: string; isValid: boolean }) => void;\n /** The initial password of an uncontrolled field. */\n defaultValue?: string;\n /** The placeholder shown while the field is empty. */\n placeholder?: string;\n /**\n * The policy the password is validated against.\n *\n * @default defaultPasswordCreationPolicy\n */\n validationPolicy?: PolicyGenericDeclaration;\n}\n\nexport interface ResolvedPolicyValidationResult extends Omit<\n PolicyValidationResult,\n \"isValid\"\n> {\n isValid: boolean | \"indeterminate\";\n ruleResults: RuleValidationResult[];\n}\n\n/** @flr-generate all */\nexport const PasswordCreationField = flowComponent(\n \"PasswordCreationField\",\n (props) => {\n const {\n children,\n className,\n ref,\n isDisabled,\n onValidationResult,\n isInvalid: invalidFromProps,\n validationPolicy:\n validationPolicyFromProps = defaultPasswordCreationPolicy,\n isRequired,\n value,\n onChange,\n ...rest\n } = useControlledHostValueProps(props, \"\");\n\n const translate = useLocalizedStringFormatter(\n locales,\n \"PasswordCreationField\",\n );\n\n const validationPolicy = useMemo(\n () => Policy.fromDeclaration(validationPolicyFromProps),\n [validationPolicyFromProps],\n );\n\n const [isPasswordRevealed, setIsPasswordRevealed] = useState(false);\n const initialPolicyValidationState: ResolvedPolicyValidationResult = {\n isValid: \"indeterminate\",\n complexity: {\n min: validationPolicy.minComplexity,\n actual: 4,\n warning: null,\n },\n ruleResults: [],\n };\n\n const [policyValidationResult, setPolicyValidationResult] = useState(\n initialPolicyValidationState,\n );\n\n const loadingRef = useRef<ReturnType<typeof setTimeout>>(null);\n usePolicyValidationResult(\n validationPolicy,\n value ?? \"\",\n () => {\n if (isEmptyValue) {\n return;\n }\n\n loadingRef.current = setTimeout(() => {\n setPolicyValidationResult((r) => ({\n ...r,\n isValid: \"indeterminate\",\n }));\n }, 150);\n },\n ({ password, isValid, results }) => {\n if (loadingRef.current) {\n clearTimeout(loadingRef.current);\n }\n\n if (isEmptyValue) {\n setPolicyValidationResult(() => ({\n ...results,\n isValid: true,\n }));\n return;\n }\n\n setPolicyValidationResult(() => results);\n onValidationResult?.({ password, isValid });\n },\n );\n\n const isEmptyValue = !value;\n const stateFromValidationResult = getStateFromLatestPolicyValidationResult(\n isEmptyValue,\n policyValidationResult,\n );\n let latestValidationErrorText = undefined;\n if (stateFromValidationResult) {\n const [translationKey, translationValues] = generateValidationTranslation(\n stateFromValidationResult,\n );\n latestValidationErrorText = translate.format(\n translationKey,\n translationValues,\n );\n }\n\n const isValidFromValidationResult =\n !isEmptyValue && stateFromValidationResult?.isValid;\n\n const isInvalidFromValidationResult =\n !isEmptyValue && stateFromValidationResult?.isValid === false;\n const isInvalid = invalidFromProps || isInvalidFromValidationResult;\n\n // The field derives its invalid state from the policy validation, so the\n // hook has to see that state — not just the `isInvalid` prop — to describe\n // the input with the field error.\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent({ ...props, isInvalid }, \"PasswordCreationField\");\n\n useAriaAnnounceValidationState(\n latestValidationErrorText,\n !isEmptyValue && policyValidationResult.isValid !== \"indeterminate\",\n );\n useAriaAnnouncePasswordVisibility(isPasswordRevealed);\n\n const setOptimisticPolicyValidationResult = (\n state: Partial<ResolvedPolicyValidationResult> = {},\n ) => {\n setPolicyValidationResult((currentState) => ({\n ...currentState,\n isValid: true,\n ...state,\n }));\n };\n\n const onPasswordGenerateHandler: ActionFn = async () => {\n const generatedPassword = await generatePassword(validationPolicy);\n setOptimisticPolicyValidationResult({\n ...initialPolicyValidationState,\n isValid: true,\n ruleResults: policyValidationResult.ruleResults.map((r) => ({\n ...r,\n isValid: true,\n })),\n });\n setIsPasswordRevealed(true);\n onChange(generatedPassword);\n };\n\n const onPasswordPasteHandler = (event: ClipboardEvent) => {\n const pastedValue = event.clipboardData?.getData(\"text\");\n if (typeof pastedValue === \"string\" && pastedValue !== value) {\n setOptimisticPolicyValidationResult({\n isValid: \"indeterminate\",\n });\n }\n };\n\n const togglePasswordVisibilityHandler = () => {\n setIsPasswordRevealed((old) => !old);\n };\n\n const propsContext: PropsContext = {\n ...fieldPropsContext,\n Button: {\n tunnel: {\n id: \"button\",\n component: \"PasswordCreationField\",\n },\n size: \"m\",\n variant: \"plain\",\n color: \"secondary\",\n isDisabled: isDisabled,\n className: styles.button,\n },\n CopyButton: {\n tunnel: {\n id: \"button\",\n component: \"PasswordCreationField\",\n },\n size: \"m\",\n variant: \"plain\",\n color: \"secondary\",\n isDisabled: isDisabled,\n className: styles.button,\n text: value,\n },\n Label: {\n ...fieldPropsContext.Label,\n children: dynamic((localProps) => {\n return (\n <>\n {localProps.children}\n <PasswordGenerateButton\n isDisabled={isDisabled}\n onGeneratePasswordAction={onPasswordGenerateHandler}\n />\n <ValidationResultButton\n isEmptyValue={isEmptyValue}\n isDisabled={isDisabled}\n policyValidationResult={policyValidationResult}\n />\n </>\n );\n }),\n },\n };\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n value={value}\n type={isPasswordRevealed ? \"text\" : \"password\"}\n onChange={onChange}\n onPaste={onPasswordPasteHandler}\n className={clsx(className, fieldProps.className)}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n >\n <FieldErrorCaptureContext>\n {latestValidationErrorText && (\n <FieldError>{latestValidationErrorText}</FieldError>\n )}\n <PropsContextProvider\n props={propsContext}\n dependencies={[\n isDisabled,\n isRequired,\n value,\n policyValidationResult,\n isEmptyValue,\n ]}\n >\n {children}\n <Aria.Group\n isDisabled={isDisabled}\n className={clsx(styles.inputGroup)}\n >\n <Aria.Input ref={ref} className={styles.input} />\n <Aria.Group className={styles.buttonContainer}>\n <TogglePasswordVisibilityButton\n className={styles.button}\n isVisible={isPasswordRevealed}\n isDisabled={isDisabled}\n onPress={togglePasswordVisibilityHandler}\n />\n <UiComponentTunnelExit\n id=\"button\"\n component=\"PasswordCreationField\"\n />\n </Aria.Group>\n <ComplexityIndicator\n key={value}\n isEmptyValue={isEmptyValue}\n isLoading={policyValidationResult.isValid === \"indeterminate\"}\n policyValidationResult={policyValidationResult}\n validationResultState={stateFromValidationResult}\n />\n </Aria.Group>\n {isValidFromValidationResult && (\n <FieldDescription>{latestValidationErrorText}</FieldDescription>\n )}\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </Aria.TextField>\n );\n },\n);\n\nexport default PasswordCreationField;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiFA,IAAa,wBAAwB,cACnC,0BACC,UAAU;CACT,MAAM,EACJ,UACA,WACA,KACA,YACA,oBACA,WAAW,kBACX,kBACE,4BAA4B,+BAC9B,YACA,OACA,UACA,GAAG,SACD,4BAA4B,OAAO,EAAE;CAEzC,MAAM,YAAY,4BAChB,kBACA,uBACF;CAEA,MAAM,mBAAmB,cACjB,OAAO,gBAAgB,yBAAyB,GACtD,CAAC,yBAAyB,CAC5B;CAEA,MAAM,CAAC,oBAAoB,yBAAyB,SAAS,KAAK;CAClE,MAAM,+BAA+D;EACnE,SAAS;EACT,YAAY;GACV,KAAK,iBAAiB;GACtB,QAAQ;GACR,SAAS;EACX;EACA,aAAa,CAAC;CAChB;CAEA,MAAM,CAAC,wBAAwB,6BAA6B,SAC1D,4BACF;CAEA,MAAM,aAAa,OAAsC,IAAI;CAC7D,0BACE,kBACA,SAAS,UACH;EACJ,IAAI,cACF;EAGF,WAAW,UAAU,iBAAiB;GACpC,2BAA2B,OAAO;IAChC,GAAG;IACH,SAAS;GACX,EAAE;EACJ,GAAG,GAAG;CACR,IACC,EAAE,UAAU,SAAS,cAAc;EAClC,IAAI,WAAW,SACb,aAAa,WAAW,OAAO;EAGjC,IAAI,cAAc;GAChB,iCAAiC;IAC/B,GAAG;IACH,SAAS;GACX,EAAE;GACF;EACF;EAEA,gCAAgC,OAAO;EACvC,qBAAqB;GAAE;GAAU;EAAQ,CAAC;CAC5C,CACF;CAEA,MAAM,eAAe,CAAC;CACtB,MAAM,4BAA4B,yCAChC,cACA,sBACF;CACA,IAAI,4BAA4B,KAAA;CAChC,IAAI,2BAA2B;EAC7B,MAAM,CAAC,gBAAgB,qBAAqB,8BAC1C,yBACF;EACA,4BAA4B,UAAU,OACpC,gBACA,iBACF;CACF;CAEA,MAAM,8BACJ,CAAC,gBAAgB,2BAA2B;CAE9C,MAAM,gCACJ,CAAC,gBAAgB,2BAA2B,YAAY;CAC1D,MAAM,YAAY,oBAAoB;CAKtC,MAAM,EACJ,gBACA,0BACA,YACA,sBACE,kBAAkB;EAAE,GAAG;EAAO;CAAU,GAAG,uBAAuB;CAEtE,+BACE,2BACA,CAAC,gBAAgB,uBAAuB,YAAY,eACtD;CACA,kCAAkC,kBAAkB;CAEpD,MAAM,uCACJ,QAAiD,CAAC,MAC/C;EACH,2BAA2B,kBAAkB;GAC3C,GAAG;GACH,SAAS;GACT,GAAG;EACL,EAAE;CACJ;CAEA,MAAM,4BAAsC,YAAY;EACtD,MAAM,oBAAoB,MAAM,iBAAiB,gBAAgB;EACjE,oCAAoC;GAClC,GAAG;GACH,SAAS;GACT,aAAa,uBAAuB,YAAY,KAAK,OAAO;IAC1D,GAAG;IACH,SAAS;GACX,EAAE;EACJ,CAAC;EACD,sBAAsB,IAAI;EAC1B,SAAS,iBAAiB;CAC5B;CAEA,MAAM,0BAA0B,UAA0B;EACxD,MAAM,cAAc,MAAM,eAAe,QAAQ,MAAM;EACvD,IAAI,OAAO,gBAAgB,YAAY,gBAAgB,OACrD,oCAAoC,EAClC,SAAS,gBACX,CAAC;CAEL;CAEA,MAAM,wCAAwC;EAC5C,uBAAuB,QAAQ,CAAC,GAAG;CACrC;CAEA,MAAM,eAA6B;EACjC,GAAG;EACH,QAAQ;GACN,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,MAAM;GACN,SAAS;GACT,OAAO;GACK;GACZ,WAAW,qCAAO;EACpB;EACA,YAAY;GACV,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,MAAM;GACN,SAAS;GACT,OAAO;GACK;GACZ,WAAW,qCAAO;GAClB,MAAM;EACR;EACA,OAAO;GACL,GAAG,kBAAkB;GACrB,UAAU,SAAS,eAAe;IAChC,OACE,qBAAA,YAAA,EAAA,UAAA;KACG,WAAW;KACZ,oBAAC,wBAAD;MACc;MACZ,0BAA0B;KAC3B,CAAA;KACD,oBAAC,wBAAD;MACgB;MACF;MACY;KACzB,CAAA;IACD,EAAA,CAAA;GAEN,CAAC;EACH;CACF;CAEA,OACE,qBAAC,KAAK,WAAN;EACE,GAAI;EACJ,GAAI;EACG;EACP,MAAM,qBAAqB,SAAS;EAC1B;EACV,SAAS;EACT,WAAW,KAAK,WAAW,WAAW,SAAS;EACnC;EACD;EACC;EAVd,UAAA,CAYE,qBAAC,0BAAD,EAAA,UAAA,CACG,6BACC,oBAAC,YAAD,EAAA,UAAa,0BAAsC,CAAA,GAErD,qBAAC,sBAAD;GACE,OAAO;GACP,cAAc;IACZ;IACA;IACA;IACA;IACA;GACF;GARF,UAAA;IAUG;IACD,qBAAC,KAAK,OAAN;KACc;KACZ,WAAW,KAAK,qCAAO,UAAU;KAFnC,UAAA;MAIE,oBAAC,KAAK,OAAN;OAAiB;OAAK,WAAW,qCAAO;MAAQ,CAAA;MAChD,qBAAC,KAAK,OAAN;OAAY,WAAW,qCAAO;OAA9B,UAAA,CACE,oBAAC,gCAAD;QACE,WAAW,qCAAO;QAClB,WAAW;QACC;QACZ,SAAS;OACV,CAAA,GACD,oBAAC,uBAAD;QACE,IAAG;QACH,WAAU;OACX,CAAA,CACS;;MACZ,oBAAC,qBAAD;OAEgB;OACd,WAAW,uBAAuB,YAAY;OACtB;OACxB,uBAAuB;MACxB,GALM,KAKN;KACS;;IACX,+BACC,oBAAC,kBAAD,EAAA,UAAmB,0BAA4C,CAAA;GAE7C;EACE,CAAA,CAAA,EAAA,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACH;;AAEpB,CACF"}
1
+ {"version":3,"file":"PasswordCreationField.mjs","names":["locales","styles","_Fragment"],"sources":["../../../../../../../src/components/PasswordCreationField/PasswordCreationField.tsx"],"sourcesContent":["import {\n type PropsWithChildren,\n useState,\n type ClipboardEvent,\n useCallback,\n useId,\n useMemo,\n useRef,\n} from \"react\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport styles from \"./PasswordCreationField.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport { type ActionFn } from \"@/components/Action\";\nimport getStateFromLatestPolicyValidationResult from \"@/components/PasswordCreationField/lib/getStateFromLatestPolicyValidationResult\";\nimport locales from \"./locales/*.locale.json\";\nimport generateValidationTranslation from \"@/components/PasswordCreationField/lib/generateValidationTranslation\";\nimport FieldDescription from \"@/components/FieldDescription\";\nimport ComplexityIndicator from \"@/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator\";\nimport { generatePassword } from \"@/components/PasswordCreationField/worker/generatePassword\";\nimport TogglePasswordVisibilityButton from \"@/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton\";\nimport { ValidationResultButton } from \"@/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton\";\nimport { PasswordGenerateButton } from \"@/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton\";\nimport type {\n PolicyValidationResult,\n PolicyGenericDeclaration,\n RuleValidationResult,\n} from \"@/integrations/@mittwald/password-tools-js\";\nimport {\n defaultPasswordCreationPolicy,\n Policy,\n} from \"@/integrations/@mittwald/password-tools-js\";\nimport { usePolicyValidationResult } from \"@/components/PasswordCreationField/lib/usePolicyValidationResult\";\nimport { joinIds, useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { FieldError } from \"@/components/FieldError\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport {\n useAriaAnnouncePasswordVisibility,\n useAriaAnnounceValidationState,\n} from \"@/components/PasswordCreationField/lib/ariaAnnounce\";\n\nexport interface PasswordCreationFieldProps\n extends\n PropsWithChildren<\n Omit<Aria.TextFieldProps, \"children\" | \"value\" | \"defaultValue\"> &\n Partial<Pick<Aria.FieldErrorRenderProps, \"validationErrors\">>\n >,\n FlowComponentProps<HTMLInputElement> {\n /** The password of a controlled field. */\n value?: string;\n /** Called with the password and its validity whenever the password changes. */\n onValidationResult?: (result: { password: string; isValid: boolean }) => void;\n /** The initial password of an uncontrolled field. */\n defaultValue?: string;\n /** The placeholder shown while the field is empty. */\n placeholder?: string;\n /**\n * The policy the password is validated against.\n *\n * @default defaultPasswordCreationPolicy\n */\n validationPolicy?: PolicyGenericDeclaration;\n}\n\nexport interface ResolvedPolicyValidationResult extends Omit<\n PolicyValidationResult,\n \"isValid\"\n> {\n isValid: boolean | \"indeterminate\";\n ruleResults: RuleValidationResult[];\n}\n\n/** @flr-generate all */\nexport const PasswordCreationField = flowComponent(\n \"PasswordCreationField\",\n (props) => {\n const {\n children,\n className,\n ref,\n isDisabled,\n onValidationResult,\n isInvalid: invalidFromProps,\n validationPolicy:\n validationPolicyFromProps = defaultPasswordCreationPolicy,\n isRequired,\n value,\n onChange,\n ...rest\n } = useControlledHostValueProps(props, \"\");\n\n const translate = useLocalizedStringFormatter(\n locales,\n \"PasswordCreationField\",\n );\n\n const validationPolicy = useMemo(\n () => Policy.fromDeclaration(validationPolicyFromProps),\n [validationPolicyFromProps],\n );\n\n const [isPasswordRevealed, setIsPasswordRevealed] = useState(false);\n const initialPolicyValidationState: ResolvedPolicyValidationResult = {\n isValid: \"indeterminate\",\n complexity: {\n min: validationPolicy.minComplexity,\n actual: 4,\n warning: null,\n },\n ruleResults: [],\n };\n\n const [policyValidationResult, setPolicyValidationResult] = useState(\n initialPolicyValidationState,\n );\n\n const loadingRef = useRef<ReturnType<typeof setTimeout>>(null);\n const { rememberValidationResult } = usePolicyValidationResult(\n validationPolicy,\n value ?? \"\",\n () => {\n if (isEmptyValue) {\n return;\n }\n\n loadingRef.current = setTimeout(() => {\n setPolicyValidationResult((r) => ({\n ...r,\n isValid: \"indeterminate\",\n }));\n }, 150);\n },\n ({ password, isValid, results }) => {\n if (loadingRef.current) {\n clearTimeout(loadingRef.current);\n }\n\n if (isEmptyValue) {\n setPolicyValidationResult(() => ({\n ...results,\n isValid: true,\n }));\n return;\n }\n\n setPolicyValidationResult(() => results);\n onValidationResult?.({ password, isValid });\n },\n );\n\n const isEmptyValue = !value;\n const stateFromValidationResult = getStateFromLatestPolicyValidationResult(\n isEmptyValue,\n policyValidationResult,\n );\n let latestValidationErrorText = undefined;\n if (stateFromValidationResult) {\n const [translationKey, translationValues] = generateValidationTranslation(\n stateFromValidationResult,\n );\n latestValidationErrorText = translate.format(\n translationKey,\n translationValues,\n );\n }\n\n const isValidFromValidationResult =\n !isEmptyValue && stateFromValidationResult?.isValid;\n\n const isInvalidFromValidationResult =\n !isEmptyValue && stateFromValidationResult?.isValid === false;\n const isInvalid = invalidFromProps || isInvalidFromValidationResult;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n wrapperProps,\n controlProps,\n fieldPropsContext,\n renderedFieldErrorId,\n } = useFieldComponent(props, \"PasswordCreationField\");\n\n /**\n * The result for a valid password appears after the asynchronous policy\n * validation. react-aria resolves its description slot only when the\n * field's validity changes, so a result that appears while the field stays\n * valid (a generated password) was never linked. It gets its own id\n * instead, referenced only while it is rendered.\n *\n * A shown error replaces it: the FormField styles hide descriptions next to\n * an error, and a hidden description would still be announced.\n */\n const resultDescriptionId = useId();\n const [isResultDescriptionRendered, setIsResultDescriptionRendered] =\n useState(false);\n const resultDescriptionRef = useCallback((element: Element | null) => {\n setIsResultDescriptionRendered(!!element);\n }, []);\n const describedBy = joinIds(\n isResultDescriptionRendered && resultDescriptionId,\n controlProps[\"aria-describedby\"],\n );\n\n useAriaAnnounceValidationState(\n latestValidationErrorText,\n !isEmptyValue && policyValidationResult.isValid !== \"indeterminate\",\n );\n useAriaAnnouncePasswordVisibility(isPasswordRevealed);\n\n const setOptimisticPolicyValidationResult = (\n state: Partial<ResolvedPolicyValidationResult> = {},\n ) => {\n setPolicyValidationResult((currentState) => ({\n ...currentState,\n isValid: true,\n ...state,\n }));\n };\n\n const onPasswordGenerateHandler: ActionFn = async () => {\n const generatedPassword = await generatePassword(validationPolicy);\n /**\n * The generator returns only passwords the policy accepts, so the rating\n * is set with the password instead of after the typing debounce. It is\n * the policy's own result: a guessed one (full strength) was overturned\n * by the real rating, e.g. to \"meets the minimum requirements\". Cached,\n * so the debounced validation of this password does not rate it again.\n */\n const generatedPasswordResult =\n await validationPolicy.validate(generatedPassword);\n rememberValidationResult(generatedPassword, generatedPasswordResult);\n setPolicyValidationResult(generatedPasswordResult);\n setIsPasswordRevealed(true);\n onChange(generatedPassword);\n };\n\n const onPasswordPasteHandler = (event: ClipboardEvent) => {\n const pastedValue = event.clipboardData?.getData(\"text\");\n if (typeof pastedValue === \"string\" && pastedValue !== value) {\n setOptimisticPolicyValidationResult({\n isValid: \"indeterminate\",\n });\n }\n };\n\n const togglePasswordVisibilityHandler = () => {\n setIsPasswordRevealed((old) => !old);\n };\n\n const propsContext: PropsContext = {\n ...fieldPropsContext,\n Button: {\n tunnel: {\n id: \"button\",\n component: \"PasswordCreationField\",\n },\n size: \"m\",\n variant: \"plain\",\n color: \"secondary\",\n isDisabled: isDisabled,\n className: styles.button,\n },\n CopyButton: {\n tunnel: {\n id: \"button\",\n component: \"PasswordCreationField\",\n },\n size: \"m\",\n variant: \"plain\",\n color: \"secondary\",\n isDisabled: isDisabled,\n className: styles.button,\n text: value,\n },\n Label: {\n ...fieldPropsContext.Label,\n children: dynamic((localProps) => {\n return (\n <>\n {localProps.children}\n <PasswordGenerateButton\n isDisabled={isDisabled}\n onGeneratePasswordAction={onPasswordGenerateHandler}\n />\n <ValidationResultButton\n isEmptyValue={isEmptyValue}\n isDisabled={isDisabled}\n policyValidationResult={policyValidationResult}\n />\n </>\n );\n }),\n },\n };\n\n return (\n <Aria.TextField\n {...rest}\n aria-describedby={describedBy}\n value={value}\n type={isPasswordRevealed ? \"text\" : \"password\"}\n onChange={onChange}\n onPaste={onPasswordPasteHandler}\n className={clsx(className, wrapperProps.className)}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n >\n <FieldErrorCaptureContext>\n {latestValidationErrorText && (\n <FieldError>{latestValidationErrorText}</FieldError>\n )}\n <PropsContextProvider\n props={propsContext}\n dependencies={[\n isDisabled,\n isRequired,\n value,\n policyValidationResult,\n isEmptyValue,\n ]}\n >\n {children}\n <Aria.Group\n isDisabled={isDisabled}\n className={clsx(styles.inputGroup)}\n >\n <Aria.Input ref={ref} className={styles.input} />\n <Aria.Group className={styles.buttonContainer}>\n <TogglePasswordVisibilityButton\n className={styles.button}\n isVisible={isPasswordRevealed}\n isDisabled={isDisabled}\n onPress={togglePasswordVisibilityHandler}\n />\n <UiComponentTunnelExit\n id=\"button\"\n component=\"PasswordCreationField\"\n />\n </Aria.Group>\n <ComplexityIndicator\n key={value}\n isEmptyValue={isEmptyValue}\n isLoading={policyValidationResult.isValid === \"indeterminate\"}\n policyValidationResult={policyValidationResult}\n validationResultState={stateFromValidationResult}\n isInvalid={invalidFromProps}\n />\n </Aria.Group>\n {isValidFromValidationResult && !renderedFieldErrorId && (\n // Out of react-aria's description slot, which would set its own\n // id – see `resultDescriptionId`.\n <Aria.TextContext.Provider value={null}>\n <FieldDescription\n id={resultDescriptionId}\n ref={resultDescriptionRef}\n >\n {latestValidationErrorText}\n </FieldDescription>\n </Aria.TextContext.Provider>\n )}\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </Aria.TextField>\n );\n },\n);\n\nexport default PasswordCreationField;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,IAAa,wBAAwB,cACnC,0BACC,UAAU;CACT,MAAM,EACJ,UACA,WACA,KACA,YACA,oBACA,WAAW,kBACX,kBACE,4BAA4B,+BAC9B,YACA,OACA,UACA,GAAG,SACD,4BAA4B,OAAO,EAAE;CAEzC,MAAM,YAAY,4BAChBA,kBACA,uBACF;CAEA,MAAM,mBAAmB,cACjB,OAAO,gBAAgB,yBAAyB,GACtD,CAAC,yBAAyB,CAC5B;CAEA,MAAM,CAAC,oBAAoB,yBAAyB,SAAS,KAAK;CAClE,MAAM,+BAA+D;EACnE,SAAS;EACT,YAAY;GACV,KAAK,iBAAiB;GACtB,QAAQ;GACR,SAAS;EACX;EACA,aAAa,CAAC;CAChB;CAEA,MAAM,CAAC,wBAAwB,6BAA6B,SAC1D,4BACF;CAEA,MAAM,aAAa,OAAsC,IAAI;CAC7D,MAAM,EAAE,6BAA6B,0BACnC,kBACA,SAAS,UACH;EACJ,IAAI,cACF;EAGF,WAAW,UAAU,iBAAiB;GACpC,2BAA2B,OAAO;IAChC,GAAG;IACH,SAAS;GACX,EAAE;EACJ,GAAG,GAAG;CACR,IACC,EAAE,UAAU,SAAS,cAAc;EAClC,IAAI,WAAW,SACb,aAAa,WAAW,OAAO;EAGjC,IAAI,cAAc;GAChB,iCAAiC;IAC/B,GAAG;IACH,SAAS;GACX,EAAE;GACF;EACF;EAEA,gCAAgC,OAAO;EACvC,qBAAqB;GAAE;GAAU;EAAQ,CAAC;CAC5C,CACF;CAEA,MAAM,eAAe,CAAC;CACtB,MAAM,4BAA4B,yCAChC,cACA,sBACF;CACA,IAAI,4BAA4B,KAAA;CAChC,IAAI,2BAA2B;EAC7B,MAAM,CAAC,gBAAgB,qBAAqB,8BAC1C,yBACF;EACA,4BAA4B,UAAU,OACpC,gBACA,iBACF;CACF;CAEA,MAAM,8BACJ,CAAC,gBAAgB,2BAA2B;CAE9C,MAAM,gCACJ,CAAC,gBAAgB,2BAA2B,YAAY;CAC1D,MAAM,YAAY,oBAAoB;CAEtC,MAAM,EACJ,gBACA,0BACA,cACA,cACA,mBACA,yBACE,kBAAkB,OAAO,uBAAuB;;;;;;;;;;;CAYpD,MAAM,sBAAsB,MAAM;CAClC,MAAM,CAAC,6BAA6B,kCAClC,SAAS,KAAK;CAChB,MAAM,uBAAuB,aAAa,YAA4B;EACpE,+BAA+B,CAAC,CAAC,OAAO;CAC1C,GAAG,CAAC,CAAC;CACL,MAAM,cAAc,QAClB,+BAA+B,qBAC/B,aAAa,mBACf;CAEA,+BACE,2BACA,CAAC,gBAAgB,uBAAuB,YAAY,eACtD;CACA,kCAAkC,kBAAkB;CAEpD,MAAM,uCACJ,QAAiD,CAAC,MAC/C;EACH,2BAA2B,kBAAkB;GAC3C,GAAG;GACH,SAAS;GACT,GAAG;EACL,EAAE;CACJ;CAEA,MAAM,4BAAsC,YAAY;EACtD,MAAM,oBAAoB,MAAM,iBAAiB,gBAAgB;;;;;;;;EAQjE,MAAM,0BACJ,MAAM,iBAAiB,SAAS,iBAAiB;EACnD,yBAAyB,mBAAmB,uBAAuB;EACnE,0BAA0B,uBAAuB;EACjD,sBAAsB,IAAI;EAC1B,SAAS,iBAAiB;CAC5B;CAEA,MAAM,0BAA0B,UAA0B;EACxD,MAAM,cAAc,MAAM,eAAe,QAAQ,MAAM;EACvD,IAAI,OAAO,gBAAgB,YAAY,gBAAgB,OACrD,oCAAoC,EAClC,SAAS,gBACX,CAAC;CAEL;CAEA,MAAM,wCAAwC;EAC5C,uBAAuB,QAAQ,CAAC,GAAG;CACrC;CAEA,MAAM,eAA6B;EACjC,GAAG;EACH,QAAQ;GACN,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,MAAM;GACN,SAAS;GACT,OAAO;GACK;GACZ,WAAWC,qCAAO;EACpB;EACA,YAAY;GACV,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,MAAM;GACN,SAAS;GACT,OAAO;GACK;GACZ,WAAWA,qCAAO;GAClB,MAAM;EACR;EACA,OAAO;GACL,GAAG,kBAAkB;GACrB,UAAU,SAAS,eAAe;IAChC,OACE,qBAAAC,YAAA,EAAA,UAAA;KACG,WAAW;KACZ,oBAAC,wBAAD;MACc;MACZ,0BAA0B;KAC3B,CAAA;KACD,oBAAC,wBAAD;MACgB;MACF;MACY;KACzB,CAAA;IACD,EAAA,CAAA;GAEN,CAAC;EACH;CACF;CAEA,OACE,qBAAC,KAAK,WAAN;EACE,GAAI;EACJ,oBAAkB;EACX;EACP,MAAM,qBAAqB,SAAS;EAC1B;EACV,SAAS;EACT,WAAW,KAAK,WAAW,aAAa,SAAS;EACrC;EACD;EACC;EAVd,UAAA,CAYE,qBAAC,0BAAD,EAAA,UAAA,CACG,6BACC,oBAAC,YAAD,EAAA,UAAa,0BAAsC,CAAA,GAErD,qBAAC,sBAAD;GACE,OAAO;GACP,cAAc;IACZ;IACA;IACA;IACA;IACA;GACF;GARF,UAAA;IAUG;IACD,qBAAC,KAAK,OAAN;KACc;KACZ,WAAW,KAAKD,qCAAO,UAAU;KAFnC,UAAA;MAIE,oBAAC,KAAK,OAAN;OAAiB;OAAK,WAAWA,qCAAO;MAAQ,CAAA;MAChD,qBAAC,KAAK,OAAN;OAAY,WAAWA,qCAAO;OAA9B,UAAA,CACE,oBAAC,gCAAD;QACE,WAAWA,qCAAO;QAClB,WAAW;QACC;QACZ,SAAS;OACV,CAAA,GACD,oBAAC,uBAAD;QACE,IAAG;QACH,WAAU;OACX,CAAA,CACS;;MACZ,oBAAC,qBAAD;OAEgB;OACd,WAAW,uBAAuB,YAAY;OACtB;OACxB,uBAAuB;OACvB,WAAW;MACZ,GANM,KAMN;KACS;;IACX,+BAA+B,CAAC,wBAG/B,oBAAC,KAAK,YAAY,UAAlB;KAA2B,OAAO;KAChC,UAAA,oBAAC,kBAAD;MACE,IAAI;MACJ,KAAK;MAEJ,UAAA;KACe,CAAA;IACO,CAAA;GAET;EACE,CAAA,CAAA,EAAA,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACH;;AAEpB,CACF"}
@@ -7,7 +7,7 @@ import { jsx } from "react/jsx-runtime";
7
7
  //#region src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.tsx
8
8
  /** @internal */
9
9
  var ComplexityIndicator = (props) => {
10
- const { policyValidationResult, validationResultState, isLoading, isEmptyValue } = props;
10
+ const { policyValidationResult, validationResultState, isLoading, isEmptyValue, isInvalid } = props;
11
11
  let complexityVisible;
12
12
  let status;
13
13
  const complexityScore = policyValidationResult?.complexity;
@@ -22,7 +22,7 @@ var ComplexityIndicator = (props) => {
22
22
  status = "success";
23
23
  } else {
24
24
  complexityVisible = true;
25
- status = getStatusFromPolicyValidationResult(validationResultState?.isValid ?? policyValidationResult.isValid, policyValidationResult);
25
+ status = isInvalid ? "danger" : getStatusFromPolicyValidationResult(validationResultState?.isValid ?? policyValidationResult.isValid, policyValidationResult);
26
26
  }
27
27
  const complexityFulfilled = totalFulfilledPercentage === 100;
28
28
  const percentageClassName = clsx(ComplexityIndicator_module_default.bar, !isEmptyValue && status !== "unavailable" && ComplexityIndicator_module_default[`bar-background-status-${status}`], {
@@ -1 +1 @@
1
- {"version":3,"file":"ComplexityIndicator.mjs","names":[],"sources":["../../../../../../../../../src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport styles from \"./ComplexityIndicator.module.scss\";\nimport { getStatusFromPolicyValidationResult } from \"@/components/PasswordCreationField/lib/getStatusFromPolicyValidationResult\";\nimport clsx from \"clsx\";\nimport type { ResolvedPolicyValidationResult } from \"@/components/PasswordCreationField/PasswordCreationField\";\nimport { type Status } from \"@/lib/types/props\";\nimport type { StateFromLatestPolicyValidationResult } from \"@/components/PasswordCreationField/lib/getStateFromLatestPolicyValidationResult\";\n\nexport type ComplexityStatus = Exclude<Status, \"info\"> | \"indeterminate\";\n\nexport interface ComplexityIndicatorProps {\n isLoading: boolean;\n isEmptyValue: boolean;\n validationResultState: StateFromLatestPolicyValidationResult;\n policyValidationResult: ResolvedPolicyValidationResult;\n}\n\n/** @internal */\nexport const ComplexityIndicator: FC<ComplexityIndicatorProps> = (props) => {\n const {\n policyValidationResult,\n validationResultState,\n isLoading,\n isEmptyValue,\n } = props;\n\n let complexityVisible;\n let status: ComplexityStatus;\n\n const complexityScore = policyValidationResult?.complexity;\n const rulesResults = policyValidationResult?.ruleResults ?? [];\n\n const complexityFulfilledPercentage = complexityScore\n ? Math.min(\n (100 / (complexityScore.min + 1)) * (complexityScore.actual + 1),\n 100,\n )\n : 0;\n\n const validRules = rulesResults.filter((r) => r.isValid).length;\n const rulesFulfilledPercentage =\n rulesResults.length > 0 ? (validRules / rulesResults.length) * 100 : 0;\n\n let totalFulfilledPercentage = Math.round(\n complexityFulfilledPercentage * 0.8 + rulesFulfilledPercentage * 0.2,\n );\n\n if (isEmptyValue) {\n complexityVisible = false;\n totalFulfilledPercentage = 0;\n status = \"success\";\n } else {\n complexityVisible = true;\n status = getStatusFromPolicyValidationResult(\n validationResultState?.isValid ?? policyValidationResult.isValid,\n policyValidationResult,\n );\n }\n\n const complexityFulfilled = totalFulfilledPercentage === 100;\n\n const percentageClassName = clsx(\n styles.bar,\n !isEmptyValue &&\n status !== \"unavailable\" &&\n styles[`bar-background-status-${status}`],\n {\n [styles.loading as string]: isLoading,\n [styles.running as string]: !complexityFulfilled,\n },\n );\n\n return (\n <div\n aria-hidden={true}\n data-container=\"complexity\"\n data-complexity-visible={complexityVisible}\n data-complexity-status={status}\n data-complexity-percentage={totalFulfilledPercentage}\n className={clsx(styles.complexityIndicator, {\n [styles.hide as string]: !complexityVisible,\n })}\n >\n <div\n style={{\n \"--complexity-indicator--percentage\": totalFulfilledPercentage,\n }}\n className={percentageClassName}\n />\n </div>\n );\n};\n\nexport default ComplexityIndicator;\n"],"mappings":";;;;;;;;AAkBA,IAAa,uBAAqD,UAAU;CAC1E,MAAM,EACJ,wBACA,uBACA,WACA,iBACE;CAEJ,IAAI;CACJ,IAAI;CAEJ,MAAM,kBAAkB,wBAAwB;CAChD,MAAM,eAAe,wBAAwB,eAAe,CAAC;CAE7D,MAAM,gCAAgC,kBAClC,KAAK,IACF,OAAO,gBAAgB,MAAM,MAAO,gBAAgB,SAAS,IAC9D,GACF,IACA;CAEJ,MAAM,aAAa,aAAa,QAAQ,MAAM,EAAE,OAAO,CAAC,CAAC;CACzD,MAAM,2BACJ,aAAa,SAAS,IAAK,aAAa,aAAa,SAAU,MAAM;CAEvE,IAAI,2BAA2B,KAAK,MAClC,gCAAgC,KAAM,2BAA2B,EACnE;CAEA,IAAI,cAAc;EAChB,oBAAoB;EACpB,2BAA2B;EAC3B,SAAS;CACX,OAAO;EACL,oBAAoB;EACpB,SAAS,oCACP,uBAAuB,WAAW,uBAAuB,SACzD,sBACF;CACF;CAEA,MAAM,sBAAsB,6BAA6B;CAEzD,MAAM,sBAAsB,KAC1B,mCAAO,KACP,CAAC,gBACC,WAAW,iBACX,mCAAO,yBAAyB,WAClC;GACG,mCAAO,UAAoB;GAC3B,mCAAO,UAAoB,CAAC;CAC/B,CACF;CAEA,OACE,oBAAC,OAAD;EACE,eAAa;EACb,kBAAe;EACf,2BAAyB;EACzB,0BAAwB;EACxB,8BAA4B;EAC5B,WAAW,KAAK,mCAAO,qBAAqB,GACzC,mCAAO,OAAiB,CAAC,kBAC5B,CAAC;EAED,UAAA,oBAAC,OAAD;GACE,OAAO,EACL,sCAAsC,yBACxC;GACA,WAAW;EACZ,CAAA;CACE,CAAA;AAET"}
1
+ {"version":3,"file":"ComplexityIndicator.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport styles from \"./ComplexityIndicator.module.scss\";\nimport { getStatusFromPolicyValidationResult } from \"@/components/PasswordCreationField/lib/getStatusFromPolicyValidationResult\";\nimport clsx from \"clsx\";\nimport type { ResolvedPolicyValidationResult } from \"@/components/PasswordCreationField/PasswordCreationField\";\nimport { type Status } from \"@/lib/types/props\";\nimport type { StateFromLatestPolicyValidationResult } from \"@/components/PasswordCreationField/lib/getStateFromLatestPolicyValidationResult\";\n\nexport type ComplexityStatus = Exclude<Status, \"info\"> | \"indeterminate\";\n\nexport interface ComplexityIndicatorProps {\n isLoading: boolean;\n isEmptyValue: boolean;\n validationResultState: StateFromLatestPolicyValidationResult;\n policyValidationResult: ResolvedPolicyValidationResult;\n /**\n * The field is invalid for a reason outside the policy, e.g. a server error.\n * The bar then shows danger like the field, not the password's strength.\n */\n isInvalid?: boolean;\n}\n\n/** @internal */\nexport const ComplexityIndicator: FC<ComplexityIndicatorProps> = (props) => {\n const {\n policyValidationResult,\n validationResultState,\n isLoading,\n isEmptyValue,\n isInvalid,\n } = props;\n\n let complexityVisible;\n let status: ComplexityStatus;\n\n const complexityScore = policyValidationResult?.complexity;\n const rulesResults = policyValidationResult?.ruleResults ?? [];\n\n const complexityFulfilledPercentage = complexityScore\n ? Math.min(\n (100 / (complexityScore.min + 1)) * (complexityScore.actual + 1),\n 100,\n )\n : 0;\n\n const validRules = rulesResults.filter((r) => r.isValid).length;\n const rulesFulfilledPercentage =\n rulesResults.length > 0 ? (validRules / rulesResults.length) * 100 : 0;\n\n let totalFulfilledPercentage = Math.round(\n complexityFulfilledPercentage * 0.8 + rulesFulfilledPercentage * 0.2,\n );\n\n if (isEmptyValue) {\n complexityVisible = false;\n totalFulfilledPercentage = 0;\n status = \"success\";\n } else {\n complexityVisible = true;\n status = isInvalid\n ? \"danger\"\n : getStatusFromPolicyValidationResult(\n validationResultState?.isValid ?? policyValidationResult.isValid,\n policyValidationResult,\n );\n }\n\n const complexityFulfilled = totalFulfilledPercentage === 100;\n\n const percentageClassName = clsx(\n styles.bar,\n !isEmptyValue &&\n status !== \"unavailable\" &&\n styles[`bar-background-status-${status}`],\n {\n [styles.loading as string]: isLoading,\n [styles.running as string]: !complexityFulfilled,\n },\n );\n\n return (\n <div\n aria-hidden={true}\n data-container=\"complexity\"\n data-complexity-visible={complexityVisible}\n data-complexity-status={status}\n data-complexity-percentage={totalFulfilledPercentage}\n className={clsx(styles.complexityIndicator, {\n [styles.hide as string]: !complexityVisible,\n })}\n >\n <div\n style={{\n \"--complexity-indicator--percentage\": totalFulfilledPercentage,\n }}\n className={percentageClassName}\n />\n </div>\n );\n};\n\nexport default ComplexityIndicator;\n"],"mappings":";;;;;;;;AAuBA,IAAa,uBAAqD,UAAU;CAC1E,MAAM,EACJ,wBACA,uBACA,WACA,cACA,cACE;CAEJ,IAAI;CACJ,IAAI;CAEJ,MAAM,kBAAkB,wBAAwB;CAChD,MAAM,eAAe,wBAAwB,eAAe,CAAC;CAE7D,MAAM,gCAAgC,kBAClC,KAAK,IACF,OAAO,gBAAgB,MAAM,MAAO,gBAAgB,SAAS,IAC9D,GACF,IACA;CAEJ,MAAM,aAAa,aAAa,QAAQ,MAAM,EAAE,OAAO,CAAC,CAAC;CACzD,MAAM,2BACJ,aAAa,SAAS,IAAK,aAAa,aAAa,SAAU,MAAM;CAEvE,IAAI,2BAA2B,KAAK,MAClC,gCAAgC,KAAM,2BAA2B,EACnE;CAEA,IAAI,cAAc;EAChB,oBAAoB;EACpB,2BAA2B;EAC3B,SAAS;CACX,OAAO;EACL,oBAAoB;EACpB,SAAS,YACL,WACA,oCACE,uBAAuB,WAAW,uBAAuB,SACzD,sBACF;CACN;CAEA,MAAM,sBAAsB,6BAA6B;CAEzD,MAAM,sBAAsB,KAC1BA,mCAAO,KACP,CAAC,gBACC,WAAW,iBACXA,mCAAO,yBAAyB,WAClC;GACGA,mCAAO,UAAoB;GAC3BA,mCAAO,UAAoB,CAAC;CAC/B,CACF;CAEA,OACE,oBAAC,OAAD;EACE,eAAa;EACb,kBAAe;EACf,2BAAyB;EACzB,0BAAwB;EACxB,8BAA4B;EAC5B,WAAW,KAAKA,mCAAO,qBAAqB,GACzCA,mCAAO,OAAiB,CAAC,kBAC5B,CAAC;EAED,UAAA,oBAAC,OAAD;GACE,OAAO,EACL,sCAAsC,yBACxC;GACA,WAAW;EACZ,CAAA;CACE,CAAA;AAET"}
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordGenerateButton.mjs","names":[],"sources":["../../../../../../../../../src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./../../locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { Action, type ActionFn } from \"@/components/Action\";\n\ninterface Props {\n isDisabled?: boolean;\n onGeneratePasswordAction?: ActionFn;\n}\n\n/** @internal */\nexport const PasswordGenerateButton: FC<Props> = (props) => {\n const { isDisabled, onGeneratePasswordAction } = props;\n const translate = useLocalizedStringFormatter(\n locales,\n \"PasswordCreationField\",\n );\n\n return (\n <Action onAction={onGeneratePasswordAction} showFeedback={false}>\n <Button\n data-component=\"generatePassword\"\n isDisabled={isDisabled}\n variant=\"plain\"\n color=\"secondary\"\n // The button sits in the label, where \"Generate\" alone does not say\n // what is generated.\n aria-label={translate.format(\"button.generate.label\")}\n >\n {translate.format(\"button.generate\")}\n </Button>\n </Action>\n );\n};\n"],"mappings":";;;;;;;;;;AAYA,IAAa,0BAAqC,UAAU;CAC1D,MAAM,EAAE,YAAY,6BAA6B;CACjD,MAAM,YAAY,4BAChB,kBACA,uBACF;CAEA,OACE,oBAAC,QAAD;EAAQ,UAAU;EAA0B,cAAc;EACxD,UAAA,oBAAC,QAAD;GACE,kBAAe;GACH;GACZ,SAAQ;GACR,OAAM;GAGN,cAAY,UAAU,OAAO,uBAAuB;GAEnD,UAAA,UAAU,OAAO,iBAAiB;EAC7B,CAAA;CACF,CAAA;AAEZ"}
1
+ {"version":3,"file":"PasswordGenerateButton.mjs","names":["locales"],"sources":["../../../../../../../../../src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./../../locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { Action, type ActionFn } from \"@/components/Action\";\n\ninterface Props {\n isDisabled?: boolean;\n onGeneratePasswordAction?: ActionFn;\n}\n\n/** @internal */\nexport const PasswordGenerateButton: FC<Props> = (props) => {\n const { isDisabled, onGeneratePasswordAction } = props;\n const translate = useLocalizedStringFormatter(\n locales,\n \"PasswordCreationField\",\n );\n\n return (\n <Action onAction={onGeneratePasswordAction} showFeedback={false}>\n <Button\n data-component=\"generatePassword\"\n isDisabled={isDisabled}\n variant=\"plain\"\n color=\"secondary\"\n // The button sits in the label, where \"Generate\" alone does not say\n // what is generated.\n aria-label={translate.format(\"button.generate.label\")}\n >\n {translate.format(\"button.generate\")}\n </Button>\n </Action>\n );\n};\n"],"mappings":";;;;;;;;;;AAYA,IAAa,0BAAqC,UAAU;CAC1D,MAAM,EAAE,YAAY,6BAA6B;CACjD,MAAM,YAAY,4BAChBA,kBACA,uBACF;CAEA,OACE,oBAAC,QAAD;EAAQ,UAAU;EAA0B,cAAc;EACxD,UAAA,oBAAC,QAAD;GACE,kBAAe;GACH;GACZ,SAAQ;GACR,OAAM;GAGN,cAAY,UAAU,OAAO,uBAAuB;GAEnD,UAAA,UAAU,OAAO,iBAAiB;EAC7B,CAAA;CACF,CAAA;AAEZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"TogglePasswordVisibilityButton.mjs","names":[],"sources":["../../../../../../../../../src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport { Tooltip, TooltipTrigger } from \"@/components/Tooltip\";\nimport Button from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport { Action, type ActionFn } from \"@/components/Action\";\nimport locales from \"./../../locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\n\ninterface Props extends PropsWithClassName {\n isDisabled?: boolean;\n isVisible: boolean;\n onPress: ActionFn;\n}\n\n/** @internal */\nexport const TogglePasswordVisibilityButton: FC<Props> = ({\n isVisible,\n isDisabled = false,\n onPress,\n className,\n}) => {\n const translate = useLocalizedStringFormatter(\n locales,\n \"PasswordCreationField\",\n );\n\n const icon = isVisible ? <IconHide /> : <IconShow />;\n const tooltipText = translate.format(\n \"button.generate.tooltip.\" + (isVisible ? \"hide\" : \"show\"),\n );\n\n return (\n <Action onAction={onPress}>\n <TooltipTrigger>\n <Button\n className={className}\n size=\"m\"\n tunnel={null}\n variant=\"plain\"\n color=\"secondary\"\n isDisabled={isDisabled}\n data-component=\"toggleRevealPassword\"\n aria-label={tooltipText}\n >\n {icon}\n <Tooltip>{tooltipText}</Tooltip>\n </Button>\n </TooltipTrigger>\n </Action>\n );\n};\n\nexport default TogglePasswordVisibilityButton;\n"],"mappings":";;;;;;;;;;;;;;AAgBA,IAAa,kCAA6C,EACxD,WACA,aAAa,OACb,SACA,gBACI;CACJ,MAAM,YAAY,4BAChB,kBACA,uBACF;CAEA,MAAM,OAAO,YAAY,oBAAC,UAAD,CAAW,CAAA,IAAI,oBAAC,UAAD,CAAW,CAAA;CACnD,MAAM,cAAc,UAAU,OAC5B,8BAA8B,YAAY,SAAS,OACrD;CAEA,OACE,oBAAC,QAAD;EAAQ,UAAU;EAChB,UAAA,oBAAC,gBAAD,EAAA,UACE,qBAAC,QAAD;GACa;GACX,MAAK;GACL,QAAQ;GACR,SAAQ;GACR,OAAM;GACM;GACZ,kBAAe;GACf,cAAY;GARd,UAAA,CAUG,MACD,oBAAC,SAAD,EAAA,UAAU,YAAqB,CAAA,CACzB;EACM,CAAA,EAAA,CAAA;CACV,CAAA;AAEZ"}
1
+ {"version":3,"file":"TogglePasswordVisibilityButton.mjs","names":["locales"],"sources":["../../../../../../../../../src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport { Tooltip, TooltipTrigger } from \"@/components/Tooltip\";\nimport Button from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport { Action, type ActionFn } from \"@/components/Action\";\nimport locales from \"./../../locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\n\ninterface Props extends PropsWithClassName {\n isDisabled?: boolean;\n isVisible: boolean;\n onPress: ActionFn;\n}\n\n/** @internal */\nexport const TogglePasswordVisibilityButton: FC<Props> = ({\n isVisible,\n isDisabled = false,\n onPress,\n className,\n}) => {\n const translate = useLocalizedStringFormatter(\n locales,\n \"PasswordCreationField\",\n );\n\n const icon = isVisible ? <IconHide /> : <IconShow />;\n const tooltipText = translate.format(\n \"button.generate.tooltip.\" + (isVisible ? \"hide\" : \"show\"),\n );\n\n return (\n <Action onAction={onPress}>\n <TooltipTrigger>\n <Button\n className={className}\n size=\"m\"\n tunnel={null}\n variant=\"plain\"\n color=\"secondary\"\n isDisabled={isDisabled}\n data-component=\"toggleRevealPassword\"\n aria-label={tooltipText}\n >\n {icon}\n <Tooltip>{tooltipText}</Tooltip>\n </Button>\n </TooltipTrigger>\n </Action>\n );\n};\n\nexport default TogglePasswordVisibilityButton;\n"],"mappings":";;;;;;;;;;;;;;AAgBA,IAAa,kCAA6C,EACxD,WACA,aAAa,OACb,SACA,gBACI;CACJ,MAAM,YAAY,4BAChBA,kBACA,uBACF;CAEA,MAAM,OAAO,YAAY,oBAAC,UAAD,CAAW,CAAA,IAAI,oBAAC,UAAD,CAAW,CAAA;CACnD,MAAM,cAAc,UAAU,OAC5B,8BAA8B,YAAY,SAAS,OACrD;CAEA,OACE,oBAAC,QAAD;EAAQ,UAAU;EAChB,UAAA,oBAAC,gBAAD,EAAA,UACE,qBAAC,QAAD;GACa;GACX,MAAK;GACL,QAAQ;GACR,SAAQ;GACR,OAAM;GACM;GACZ,kBAAe;GACf,cAAY;GARd,UAAA,CAUG,MACD,oBAAC,SAAD,EAAA,UAAU,YAAqB,CAAA,CACzB;EACM,CAAA,EAAA,CAAA;CACV,CAAA;AAEZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationResultButton.mjs","names":[],"sources":["../../../../../../../../../src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.tsx"],"sourcesContent":["import { type FC, useId } from \"react\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\n\nimport locales from \"./../../locales/*.locale.json\";\nimport type { ResolvedPolicyValidationResult } from \"@/components/PasswordCreationField/PasswordCreationField\";\nimport ValidationResultEntry from \"@/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry\";\nimport { Button } from \"@/components/Button\";\nimport {\n ContextualHelp,\n ContextualHelpTrigger,\n} from \"@/components/ContextualHelp\";\nimport { Heading } from \"@/components/Heading\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport styles from \"./ValidationResultButton.module.scss\";\n\ninterface Props extends PropsWithClassName {\n policyValidationResult?: ResolvedPolicyValidationResult;\n isDisabled?: boolean;\n isEmptyValue: boolean;\n}\n\n/** @internal */\nexport const ValidationResultButton: FC<Props> = (props) => {\n const { policyValidationResult, isDisabled, isEmptyValue, className } = props;\n\n const translate = useLocalizedStringFormatter(\n locales,\n \"PasswordCreationField\",\n );\n const headingId = useId();\n\n let validationResults = policyValidationResult?.ruleResults?.filter((r) => {\n return isEmptyValue ? !r.isValid : true;\n });\n if (validationResults && validationResults.length === 0 && isEmptyValue) {\n // if we have no rules to show on first info - just list them all\n validationResults = policyValidationResult?.ruleResults;\n }\n\n const validationResultComponents =\n validationResults?.map((result, index) => {\n return (\n <ValidationResultEntry\n key={`${result.identifier}-${index}`}\n result={result}\n />\n );\n }) ?? [];\n\n return (\n <ContextualHelpTrigger\n subject={translate.format(\"password.requirements.subject\")}\n >\n <Button\n data-component=\"showPasswordRules\"\n isDisabled={isDisabled}\n className={className}\n />\n <ContextualHelp>\n <Heading id={headingId}>\n {translate.format(\"password.requirements.heading\")}\n </Heading>\n {/* A list, so a screen reader announces the requirements as one unit\n with their number — and each rule with its status. */}\n <ul aria-labelledby={headingId} className={styles.validationResultList}>\n {validationResultComponents.length === 0 ? (\n <ValidationResultEntry\n result={{ isValid: true }}\n unspecifiedRules\n />\n ) : (\n validationResultComponents\n )}\n </ul>\n </ContextualHelp>\n </ContextualHelpTrigger>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAsBA,IAAa,0BAAqC,UAAU;CAC1D,MAAM,EAAE,wBAAwB,YAAY,cAAc,cAAc;CAExE,MAAM,YAAY,4BAChB,kBACA,uBACF;CACA,MAAM,YAAY,MAAM;CAExB,IAAI,oBAAoB,wBAAwB,aAAa,QAAQ,MAAM;EACzE,OAAO,eAAe,CAAC,EAAE,UAAU;CACrC,CAAC;CACD,IAAI,qBAAqB,kBAAkB,WAAW,KAAK,cAEzD,oBAAoB,wBAAwB;CAG9C,MAAM,6BACJ,mBAAmB,KAAK,QAAQ,UAAU;EACxC,OACE,oBAAC,uBAAD,EAEU,OACT,GAFM,GAAG,OAAO,WAAW,GAAG,OAE9B;CAEL,CAAC,KAAK,CAAC;CAET,OACE,qBAAC,uBAAD;EACE,SAAS,UAAU,OAAO,+BAA+B;EAD3D,UAAA,CAGE,oBAAC,QAAD;GACE,kBAAe;GACH;GACD;EACZ,CAAA,GACD,qBAAC,gBAAD,EAAA,UAAA,CACE,oBAAC,SAAD;GAAS,IAAI;GACV,UAAA,UAAU,OAAO,+BAA+B;EAC1C,CAAA,GAGT,oBAAC,MAAD;GAAI,mBAAiB;GAAW,WAAW,sCAAO;GAC/C,UAAA,2BAA2B,WAAW,IACrC,oBAAC,uBAAD;IACE,QAAQ,EAAE,SAAS,KAAK;IACxB,kBAAA;GACD,CAAA,IAED;EAEA,CAAA,CACU,EAAA,CAAA,CACK;;AAE3B"}
1
+ {"version":3,"file":"ValidationResultButton.mjs","names":["locales","styles"],"sources":["../../../../../../../../../src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.tsx"],"sourcesContent":["import { type FC, useId } from \"react\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\n\nimport locales from \"./../../locales/*.locale.json\";\nimport type { ResolvedPolicyValidationResult } from \"@/components/PasswordCreationField/PasswordCreationField\";\nimport ValidationResultEntry from \"@/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry\";\nimport { Button } from \"@/components/Button\";\nimport {\n ContextualHelp,\n ContextualHelpTrigger,\n} from \"@/components/ContextualHelp\";\nimport { Heading } from \"@/components/Heading\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport styles from \"./ValidationResultButton.module.scss\";\n\ninterface Props extends PropsWithClassName {\n policyValidationResult?: ResolvedPolicyValidationResult;\n isDisabled?: boolean;\n isEmptyValue: boolean;\n}\n\n/** @internal */\nexport const ValidationResultButton: FC<Props> = (props) => {\n const { policyValidationResult, isDisabled, isEmptyValue, className } = props;\n\n const translate = useLocalizedStringFormatter(\n locales,\n \"PasswordCreationField\",\n );\n const headingId = useId();\n\n let validationResults = policyValidationResult?.ruleResults?.filter((r) => {\n return isEmptyValue ? !r.isValid : true;\n });\n if (validationResults && validationResults.length === 0 && isEmptyValue) {\n // if we have no rules to show on first info - just list them all\n validationResults = policyValidationResult?.ruleResults;\n }\n\n const validationResultComponents =\n validationResults?.map((result, index) => {\n return (\n <ValidationResultEntry\n key={`${result.identifier}-${index}`}\n result={result}\n />\n );\n }) ?? [];\n\n return (\n <ContextualHelpTrigger\n subject={translate.format(\"password.requirements.subject\")}\n >\n <Button\n data-component=\"showPasswordRules\"\n isDisabled={isDisabled}\n className={className}\n />\n <ContextualHelp>\n <Heading id={headingId}>\n {translate.format(\"password.requirements.heading\")}\n </Heading>\n {/* A list, so a screen reader announces the requirements as one unit\n with their number — and each rule with its status. */}\n <ul aria-labelledby={headingId} className={styles.validationResultList}>\n {validationResultComponents.length === 0 ? (\n <ValidationResultEntry\n result={{ isValid: true }}\n unspecifiedRules\n />\n ) : (\n validationResultComponents\n )}\n </ul>\n </ContextualHelp>\n </ContextualHelpTrigger>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAsBA,IAAa,0BAAqC,UAAU;CAC1D,MAAM,EAAE,wBAAwB,YAAY,cAAc,cAAc;CAExE,MAAM,YAAY,4BAChBA,kBACA,uBACF;CACA,MAAM,YAAY,MAAM;CAExB,IAAI,oBAAoB,wBAAwB,aAAa,QAAQ,MAAM;EACzE,OAAO,eAAe,CAAC,EAAE,UAAU;CACrC,CAAC;CACD,IAAI,qBAAqB,kBAAkB,WAAW,KAAK,cAEzD,oBAAoB,wBAAwB;CAG9C,MAAM,6BACJ,mBAAmB,KAAK,QAAQ,UAAU;EACxC,OACE,oBAAC,uBAAD,EAEU,OACT,GAFM,GAAG,OAAO,WAAW,GAAG,OAE9B;CAEL,CAAC,KAAK,CAAC;CAET,OACE,qBAAC,uBAAD;EACE,SAAS,UAAU,OAAO,+BAA+B;EAD3D,UAAA,CAGE,oBAAC,QAAD;GACE,kBAAe;GACH;GACD;EACZ,CAAA,GACD,qBAAC,gBAAD,EAAA,UAAA,CACE,oBAAC,SAAD;GAAS,IAAI;GACV,UAAA,UAAU,OAAO,+BAA+B;EAC1C,CAAA,GAGT,oBAAC,MAAD;GAAI,mBAAiB;GAAW,WAAWC,sCAAO;GAC/C,UAAA,2BAA2B,WAAW,IACrC,oBAAC,uBAAD;IACE,QAAQ,EAAE,SAAS,KAAK;IACxB,kBAAA;GACD,CAAA,IAED;EAEA,CAAA,CACU,EAAA,CAAA,CACK;;AAE3B"}