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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (433) hide show
  1. package/AGENTS.md +21 -10
  2. package/USAGE.md +7 -0
  3. package/dist/assets/component-index.json +1 -1
  4. package/dist/assets/doc-properties.json +1 -1
  5. package/dist/css/all-layered.css +1 -1
  6. package/dist/css/all.css +1 -1
  7. package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
  8. package/dist/js/packages/components/src/components/Accordion/Accordion.mjs.map +1 -1
  9. package/dist/js/packages/components/src/components/Accordion/Accordion.module.mjs.map +1 -1
  10. package/dist/js/packages/components/src/components/Action/lib/ariaLive.mjs.map +1 -1
  11. package/dist/js/packages/components/src/components/Action/models/ActionState.mjs.map +1 -1
  12. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
  13. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.module.mjs.map +1 -1
  14. package/dist/js/packages/components/src/components/Alert/Alert.mjs.map +1 -1
  15. package/dist/js/packages/components/src/components/AlertBadge/AlertBadge.mjs.map +1 -1
  16. package/dist/js/packages/components/src/components/AlertIcon/AlertIcon.mjs.map +1 -1
  17. package/dist/js/packages/components/src/components/AlertText/AlertText.mjs.map +1 -1
  18. package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs +14 -7
  19. package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
  20. package/dist/js/packages/components/src/components/Avatar/Avatar.mjs.map +1 -1
  21. package/dist/js/packages/components/src/components/AvatarStack/AvatarStack.mjs.map +1 -1
  22. package/dist/js/packages/components/src/components/Badge/Badge.mjs.map +1 -1
  23. package/dist/js/packages/components/src/components/BigNumber/BigNumber.mjs.map +1 -1
  24. package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.mjs.map +1 -1
  25. package/dist/js/packages/components/src/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.mjs.map +1 -1
  26. package/dist/js/packages/components/src/components/Button/Button.mjs +5 -17
  27. package/dist/js/packages/components/src/components/Button/Button.mjs.map +1 -1
  28. package/dist/js/packages/components/src/components/Button/Button.module.mjs.map +1 -1
  29. package/dist/js/packages/components/src/components/Calendar/Calendar.mjs.map +1 -1
  30. package/dist/js/packages/components/src/components/Calendar/components/CalendarHeader/CalendarHeader.mjs.map +1 -1
  31. package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/RangeCalendar.mjs.map +1 -1
  32. package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/helpers/useCalendarDateRangePresets.mjs.map +1 -1
  33. package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
  34. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/ChartTooltip.mjs.map +1 -1
  35. package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.mjs.map +1 -1
  36. package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs +5 -1
  37. package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs.map +1 -1
  38. package/dist/js/packages/components/src/components/Chat/Chat.mjs.map +1 -1
  39. package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs +3 -3
  40. package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs.map +1 -1
  41. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs +3 -3
  42. package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
  43. package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs +3 -3
  44. package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
  45. package/dist/js/packages/components/src/components/CoachMark/CoachMark.mjs.map +1 -1
  46. package/dist/js/packages/components/src/components/CodeBlock/CodeBlock.mjs.map +1 -1
  47. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs +35 -16
  48. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs.map +1 -1
  49. package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.module.mjs.map +1 -1
  50. package/dist/js/packages/components/src/components/CodeEditor/languages/dotEnv/index.mjs.map +1 -1
  51. package/dist/js/packages/components/src/components/CodeEditor/languages/index.mjs.map +1 -1
  52. package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs.map +1 -1
  53. package/dist/js/packages/components/src/components/Color/Color.mjs.map +1 -1
  54. package/dist/js/packages/components/src/components/ColumnLayout/ColumnLayout.mjs.map +1 -1
  55. package/dist/js/packages/components/src/components/Combine/Combine.mjs +1 -0
  56. package/dist/js/packages/components/src/components/Combine/Combine.mjs.map +1 -1
  57. package/dist/js/packages/components/src/components/Combine/Combine.module.mjs +4 -2
  58. package/dist/js/packages/components/src/components/Combine/Combine.module.mjs.map +1 -1
  59. package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs +3 -3
  60. package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
  61. package/dist/js/packages/components/src/components/Content/Content.mjs.map +1 -1
  62. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs +5 -1
  63. package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
  64. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs.map +1 -1
  65. package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.mjs.map +1 -1
  66. package/dist/js/packages/components/src/components/ContextualHelp/ContextualHelp.mjs.map +1 -1
  67. package/dist/js/packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs.map +1 -1
  68. package/dist/js/packages/components/src/components/CopyButton/CopyButton.mjs.map +1 -1
  69. package/dist/js/packages/components/src/components/CounterBadge/CounterBadge.mjs.map +1 -1
  70. package/dist/js/packages/components/src/components/CountryOptions/CountryOptions.mjs.map +1 -1
  71. package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs +6 -5
  72. package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs.map +1 -1
  73. package/dist/js/packages/components/src/components/DatePicker/components/DateInput/DateInput.mjs.map +1 -1
  74. package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs +4 -3
  75. package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs.map +1 -1
  76. package/dist/js/packages/components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.mjs.map +1 -1
  77. package/dist/js/packages/components/src/components/DonutChart/DonutChart.mjs.map +1 -1
  78. package/dist/js/packages/components/src/components/DonutChart/components/Donut.mjs.map +1 -1
  79. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs.map +1 -1
  80. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartLegend.mjs.map +1 -1
  81. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartValue.mjs.map +1 -1
  82. package/dist/js/packages/components/src/components/EmulatedBoldText/EmulatedBoldText.mjs.map +1 -1
  83. package/dist/js/packages/components/src/components/FieldDescription/FieldDescription.mjs.map +1 -1
  84. package/dist/js/packages/components/src/components/FieldError/FieldError.mjs +40 -31
  85. package/dist/js/packages/components/src/components/FieldError/FieldError.mjs.map +1 -1
  86. package/dist/js/packages/components/src/components/FileCard/FileCard.mjs.map +1 -1
  87. package/dist/js/packages/components/src/components/FileCard/components/Avatar/Avatar.mjs.map +1 -1
  88. package/dist/js/packages/components/src/components/FileCard/components/DeleteButton/DeleteButton.mjs.map +1 -1
  89. package/dist/js/packages/components/src/components/FileCard/components/FileSizeText/FileSizeText.mjs.map +1 -1
  90. package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs +8 -6
  91. package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
  92. package/dist/js/packages/components/src/components/FileField/FileField.mjs +3 -3
  93. package/dist/js/packages/components/src/components/FileField/FileField.mjs.map +1 -1
  94. package/dist/js/packages/components/src/components/FileField/components/FileInput.mjs.map +1 -1
  95. package/dist/js/packages/components/src/components/Flex/Flex.mjs +5 -5
  96. package/dist/js/packages/components/src/components/Flex/Flex.mjs.map +1 -1
  97. package/dist/js/packages/components/src/components/Header/Header.mjs.map +1 -1
  98. package/dist/js/packages/components/src/components/HeaderNavigation/HeaderNavigation.mjs.map +1 -1
  99. package/dist/js/packages/components/src/components/Heading/Heading.mjs.map +1 -1
  100. package/dist/js/packages/components/src/components/Icon/Icon.mjs.map +1 -1
  101. package/dist/js/packages/components/src/components/Icon/components/icons/IconAI.mjs.map +1 -1
  102. package/dist/js/packages/components/src/components/Icon/components/icons/IconAIHosting.mjs.map +1 -1
  103. package/dist/js/packages/components/src/components/Icon/components/icons/IconAnalytics.mjs.map +1 -1
  104. package/dist/js/packages/components/src/components/Icon/components/icons/IconApp.mjs.map +1 -1
  105. package/dist/js/packages/components/src/components/Icon/components/icons/IconAscending.mjs.map +1 -1
  106. package/dist/js/packages/components/src/components/Icon/components/icons/IconAttachment.mjs.map +1 -1
  107. package/dist/js/packages/components/src/components/Icon/components/icons/IconAutoresponder.mjs.map +1 -1
  108. package/dist/js/packages/components/src/components/Icon/components/icons/IconBackLink.mjs.map +1 -1
  109. package/dist/js/packages/components/src/components/Icon/components/icons/IconBackup.mjs.map +1 -1
  110. package/dist/js/packages/components/src/components/Icon/components/icons/IconBold.mjs.map +1 -1
  111. package/dist/js/packages/components/src/components/Icon/components/icons/IconCamera.mjs.map +1 -1
  112. package/dist/js/packages/components/src/components/Icon/components/icons/IconCertificate.mjs.map +1 -1
  113. package/dist/js/packages/components/src/components/Icon/components/icons/IconChangelog.mjs.map +1 -1
  114. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheck.mjs.map +1 -1
  115. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxChecked.mjs.map +1 -1
  116. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxEmpty.mjs.map +1 -1
  117. package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxIndeterminate.mjs.map +1 -1
  118. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronDown.mjs.map +1 -1
  119. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronLeft.mjs.map +1 -1
  120. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronRight.mjs.map +1 -1
  121. package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronUp.mjs.map +1 -1
  122. package/dist/js/packages/components/src/components/Icon/components/icons/IconClose.mjs.map +1 -1
  123. package/dist/js/packages/components/src/components/Icon/components/icons/IconCode.mjs.map +1 -1
  124. package/dist/js/packages/components/src/components/Icon/components/icons/IconContainer.mjs.map +1 -1
  125. package/dist/js/packages/components/src/components/Icon/components/icons/IconContextMenu.mjs.map +1 -1
  126. package/dist/js/packages/components/src/components/Icon/components/icons/IconContextMenuVertical.mjs.map +1 -1
  127. package/dist/js/packages/components/src/components/Icon/components/icons/IconContract.mjs.map +1 -1
  128. package/dist/js/packages/components/src/components/Icon/components/icons/IconContractPartner.mjs.map +1 -1
  129. package/dist/js/packages/components/src/components/Icon/components/icons/IconContributor.mjs.map +1 -1
  130. package/dist/js/packages/components/src/components/Icon/components/icons/IconCopy.mjs.map +1 -1
  131. package/dist/js/packages/components/src/components/Icon/components/icons/IconCronjob.mjs.map +1 -1
  132. package/dist/js/packages/components/src/components/Icon/components/icons/IconCustomer.mjs.map +1 -1
  133. package/dist/js/packages/components/src/components/Icon/components/icons/IconDanger.mjs.map +1 -1
  134. package/dist/js/packages/components/src/components/Icon/components/icons/IconDashboard.mjs.map +1 -1
  135. package/dist/js/packages/components/src/components/Icon/components/icons/IconDatabase.mjs.map +1 -1
  136. package/dist/js/packages/components/src/components/Icon/components/icons/IconDate.mjs.map +1 -1
  137. package/dist/js/packages/components/src/components/Icon/components/icons/IconDelete.mjs.map +1 -1
  138. package/dist/js/packages/components/src/components/Icon/components/icons/IconDeliveryBox.mjs.map +1 -1
  139. package/dist/js/packages/components/src/components/Icon/components/icons/IconDescending.mjs.map +1 -1
  140. package/dist/js/packages/components/src/components/Icon/components/icons/IconDesktop.mjs.map +1 -1
  141. package/dist/js/packages/components/src/components/Icon/components/icons/IconDirectory.mjs.map +1 -1
  142. package/dist/js/packages/components/src/components/Icon/components/icons/IconDnsSubZone.mjs.map +1 -1
  143. package/dist/js/packages/components/src/components/Icon/components/icons/IconDnsZone.mjs.map +1 -1
  144. package/dist/js/packages/components/src/components/Icon/components/icons/IconDomain.mjs.map +1 -1
  145. package/dist/js/packages/components/src/components/Icon/components/icons/IconDownload.mjs.map +1 -1
  146. package/dist/js/packages/components/src/components/Icon/components/icons/IconEdit.mjs.map +1 -1
  147. package/dist/js/packages/components/src/components/Icon/components/icons/IconEmail.mjs.map +1 -1
  148. package/dist/js/packages/components/src/components/Icon/components/icons/IconEmailArchive.mjs.map +1 -1
  149. package/dist/js/packages/components/src/components/Icon/components/icons/IconExtension.mjs.map +1 -1
  150. package/dist/js/packages/components/src/components/Icon/components/icons/IconExternalLink.mjs.map +1 -1
  151. package/dist/js/packages/components/src/components/Icon/components/icons/IconFailed.mjs.map +1 -1
  152. package/dist/js/packages/components/src/components/Icon/components/icons/IconFeedback.mjs.map +1 -1
  153. package/dist/js/packages/components/src/components/Icon/components/icons/IconFile.mjs.map +1 -1
  154. package/dist/js/packages/components/src/components/Icon/components/icons/IconFilter.mjs.map +1 -1
  155. package/dist/js/packages/components/src/components/Icon/components/icons/IconForwardAddress.mjs.map +1 -1
  156. package/dist/js/packages/components/src/components/Icon/components/icons/IconForwardLink.mjs.map +1 -1
  157. package/dist/js/packages/components/src/components/Icon/components/icons/IconHide.mjs.map +1 -1
  158. package/dist/js/packages/components/src/components/Icon/components/icons/IconHome.mjs.map +1 -1
  159. package/dist/js/packages/components/src/components/Icon/components/icons/IconImage.mjs.map +1 -1
  160. package/dist/js/packages/components/src/components/Icon/components/icons/IconInfo.mjs.map +1 -1
  161. package/dist/js/packages/components/src/components/Icon/components/icons/IconInvite.mjs.map +1 -1
  162. package/dist/js/packages/components/src/components/Icon/components/icons/IconInvoice.mjs.map +1 -1
  163. package/dist/js/packages/components/src/components/Icon/components/icons/IconItalic.mjs.map +1 -1
  164. package/dist/js/packages/components/src/components/Icon/components/icons/IconKnowledgeHint.mjs.map +1 -1
  165. package/dist/js/packages/components/src/components/Icon/components/icons/IconLanguage.mjs.map +1 -1
  166. package/dist/js/packages/components/src/components/Icon/components/icons/IconLeadFyndr.mjs.map +1 -1
  167. package/dist/js/packages/components/src/components/Icon/components/icons/IconLink.mjs.map +1 -1
  168. package/dist/js/packages/components/src/components/Icon/components/icons/IconLock.mjs.map +1 -1
  169. package/dist/js/packages/components/src/components/Icon/components/icons/IconLockOpen.mjs.map +1 -1
  170. package/dist/js/packages/components/src/components/Icon/components/icons/IconLogout.mjs.map +1 -1
  171. package/dist/js/packages/components/src/components/Icon/components/icons/IconMainUser.mjs.map +1 -1
  172. package/dist/js/packages/components/src/components/Icon/components/icons/IconMarketplace.mjs.map +1 -1
  173. package/dist/js/packages/components/src/components/Icon/components/icons/IconMaximize.mjs.map +1 -1
  174. package/dist/js/packages/components/src/components/Icon/components/icons/IconMember.mjs.map +1 -1
  175. package/dist/js/packages/components/src/components/Icon/components/icons/IconMenu.mjs.map +1 -1
  176. package/dist/js/packages/components/src/components/Icon/components/icons/IconMinimize.mjs.map +1 -1
  177. package/dist/js/packages/components/src/components/Icon/components/icons/IconMinus.mjs.map +1 -1
  178. package/dist/js/packages/components/src/components/Icon/components/icons/IconMittwald.mjs.map +1 -1
  179. package/dist/js/packages/components/src/components/Icon/components/icons/IconMobile.mjs.map +1 -1
  180. package/dist/js/packages/components/src/components/Icon/components/icons/IconMonitoring.mjs.map +1 -1
  181. package/dist/js/packages/components/src/components/Icon/components/icons/IconMove.mjs.map +1 -1
  182. package/dist/js/packages/components/src/components/Icon/components/icons/IconNewsletter.mjs.map +1 -1
  183. package/dist/js/packages/components/src/components/Icon/components/icons/IconNotification.mjs.map +1 -1
  184. package/dist/js/packages/components/src/components/Icon/components/icons/IconNumber.mjs.map +1 -1
  185. package/dist/js/packages/components/src/components/Icon/components/icons/IconOrder.mjs.map +1 -1
  186. package/dist/js/packages/components/src/components/Icon/components/icons/IconOrderedList.mjs.map +1 -1
  187. package/dist/js/packages/components/src/components/Icon/components/icons/IconPassword.mjs.map +1 -1
  188. package/dist/js/packages/components/src/components/Icon/components/icons/IconPath.mjs.map +1 -1
  189. package/dist/js/packages/components/src/components/Icon/components/icons/IconPause.mjs.map +1 -1
  190. package/dist/js/packages/components/src/components/Icon/components/icons/IconPayment.mjs.map +1 -1
  191. package/dist/js/packages/components/src/components/Icon/components/icons/IconPending.mjs.map +1 -1
  192. package/dist/js/packages/components/src/components/Icon/components/icons/IconPicture.mjs.map +1 -1
  193. package/dist/js/packages/components/src/components/Icon/components/icons/IconPlus.mjs.map +1 -1
  194. package/dist/js/packages/components/src/components/Icon/components/icons/IconProject.mjs.map +1 -1
  195. package/dist/js/packages/components/src/components/Icon/components/icons/IconQuote.mjs.map +1 -1
  196. package/dist/js/packages/components/src/components/Icon/components/icons/IconRadioOff.mjs.map +1 -1
  197. package/dist/js/packages/components/src/components/Icon/components/icons/IconRadioOn.mjs.map +1 -1
  198. package/dist/js/packages/components/src/components/Icon/components/icons/IconRedo.mjs.map +1 -1
  199. package/dist/js/packages/components/src/components/Icon/components/icons/IconRefresh.mjs.map +1 -1
  200. package/dist/js/packages/components/src/components/Icon/components/icons/IconRegistry.mjs.map +1 -1
  201. package/dist/js/packages/components/src/components/Icon/components/icons/IconSave.mjs.map +1 -1
  202. package/dist/js/packages/components/src/components/Icon/components/icons/IconSearch.mjs.map +1 -1
  203. package/dist/js/packages/components/src/components/Icon/components/icons/IconSecurity.mjs.map +1 -1
  204. package/dist/js/packages/components/src/components/Icon/components/icons/IconSend.mjs.map +1 -1
  205. package/dist/js/packages/components/src/components/Icon/components/icons/IconServer.mjs.map +1 -1
  206. package/dist/js/packages/components/src/components/Icon/components/icons/IconSettings.mjs.map +1 -1
  207. package/dist/js/packages/components/src/components/Icon/components/icons/IconShare.mjs.map +1 -1
  208. package/dist/js/packages/components/src/components/Icon/components/icons/IconShow.mjs.map +1 -1
  209. package/dist/js/packages/components/src/components/Icon/components/icons/IconSorting.mjs.map +1 -1
  210. package/dist/js/packages/components/src/components/Icon/components/icons/IconSsh.mjs.map +1 -1
  211. package/dist/js/packages/components/src/components/Icon/components/icons/IconSshKey.mjs.map +1 -1
  212. package/dist/js/packages/components/src/components/Icon/components/icons/IconSshSftp.mjs.map +1 -1
  213. package/dist/js/packages/components/src/components/Icon/components/icons/IconStack.mjs.map +1 -1
  214. package/dist/js/packages/components/src/components/Icon/components/icons/IconStar.mjs.map +1 -1
  215. package/dist/js/packages/components/src/components/Icon/components/icons/IconStarFilled.mjs.map +1 -1
  216. package/dist/js/packages/components/src/components/Icon/components/icons/IconStart.mjs.map +1 -1
  217. package/dist/js/packages/components/src/components/Icon/components/icons/IconStrikeThrough.mjs.map +1 -1
  218. package/dist/js/packages/components/src/components/Icon/components/icons/IconSubdomain.mjs.map +1 -1
  219. package/dist/js/packages/components/src/components/Icon/components/icons/IconSucceeded.mjs.map +1 -1
  220. package/dist/js/packages/components/src/components/Icon/components/icons/IconSuccess.mjs.map +1 -1
  221. package/dist/js/packages/components/src/components/Icon/components/icons/IconSupport.mjs.map +1 -1
  222. package/dist/js/packages/components/src/components/Icon/components/icons/IconTerminate.mjs.map +1 -1
  223. package/dist/js/packages/components/src/components/Icon/components/icons/IconTicket.mjs.map +1 -1
  224. package/dist/js/packages/components/src/components/Icon/components/icons/IconTime.mjs.map +1 -1
  225. package/dist/js/packages/components/src/components/Icon/components/icons/IconUnavailable.mjs.map +1 -1
  226. package/dist/js/packages/components/src/components/Icon/components/icons/IconUndo.mjs.map +1 -1
  227. package/dist/js/packages/components/src/components/Icon/components/icons/IconUnorderedList.mjs.map +1 -1
  228. package/dist/js/packages/components/src/components/Icon/components/icons/IconUpload.mjs.map +1 -1
  229. package/dist/js/packages/components/src/components/Icon/components/icons/IconUser.mjs.map +1 -1
  230. package/dist/js/packages/components/src/components/Icon/components/icons/IconVhost.mjs.map +1 -1
  231. package/dist/js/packages/components/src/components/Icon/components/icons/IconView.mjs.map +1 -1
  232. package/dist/js/packages/components/src/components/Icon/components/icons/IconVolume.mjs.map +1 -1
  233. package/dist/js/packages/components/src/components/Icon/components/icons/IconWarning.mjs.map +1 -1
  234. package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map +1 -1
  235. package/dist/js/packages/components/src/components/Image/Image.mjs.map +1 -1
  236. package/dist/js/packages/components/src/components/ImageCropper/ImageCropper.mjs.map +1 -1
  237. package/dist/js/packages/components/src/components/Initials/Initials.mjs.map +1 -1
  238. package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs.map +1 -1
  239. package/dist/js/packages/components/src/components/InlineCode/InlineCode.mjs.map +1 -1
  240. package/dist/js/packages/components/src/components/Kbd/Kbd.mjs.map +1 -1
  241. package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
  242. package/dist/js/packages/components/src/components/LabeledValue/LabeledValue.mjs.map +1 -1
  243. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs +2 -1
  244. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs.map +1 -1
  245. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.module.mjs +3 -1
  246. package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.module.mjs.map +1 -1
  247. package/dist/js/packages/components/src/components/Legend/Legend.mjs.map +1 -1
  248. package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs.map +1 -1
  249. package/dist/js/packages/components/src/components/LightBox/LightBox.mjs.map +1 -1
  250. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/Controls.mjs.map +1 -1
  251. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/LightBoxGallery.mjs.map +1 -1
  252. package/dist/js/packages/components/src/components/LightBox/components/LightBoxGalleryItem/LightBoxGalleryItem.mjs.map +1 -1
  253. package/dist/js/packages/components/src/components/Link/Link.mjs.map +1 -1
  254. package/dist/js/packages/components/src/components/Link/components/LinkIcon/LinkIcon.mjs.map +1 -1
  255. package/dist/js/packages/components/src/components/List/List.mjs.map +1 -1
  256. package/dist/js/packages/components/src/components/List/components/DataLoader/DataLoaderSuspense.mjs.map +1 -1
  257. package/dist/js/packages/components/src/components/List/components/EmptySearchResultView/EmptySearchResultView.mjs.map +1 -1
  258. package/dist/js/packages/components/src/components/List/components/EmptyView/EmptyView.mjs.map +1 -1
  259. package/dist/js/packages/components/src/components/List/components/Footer/Footer.mjs.map +1 -1
  260. package/dist/js/packages/components/src/components/List/components/Footer/components/PaginationInfos/PaginationInfos.mjs.map +1 -1
  261. package/dist/js/packages/components/src/components/List/components/Footer/components/ShowNextBatchButton/ShowNextBatchButton.mjs.map +1 -1
  262. package/dist/js/packages/components/src/components/List/components/Header/Header.mjs.map +1 -1
  263. package/dist/js/packages/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs.map +1 -1
  264. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs.map +1 -1
  265. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionCheckboxGroup.mjs.map +1 -1
  266. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionDateRange.mjs.map +1 -1
  267. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionRadioGroup.mjs.map +1 -1
  268. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs.map +1 -1
  269. package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs.map +1 -1
  270. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/DateRangeFilterPopover.mjs.map +1 -1
  271. package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenu.mjs.map +1 -1
  272. package/dist/js/packages/components/src/components/List/components/Header/components/SearchField/SearchField.mjs.map +1 -1
  273. package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.mjs.map +1 -1
  274. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs.map +1 -1
  275. package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs.map +1 -1
  276. package/dist/js/packages/components/src/components/List/components/Items/Items.mjs.map +1 -1
  277. package/dist/js/packages/components/src/components/List/components/Items/components/Item/Item.mjs.map +1 -1
  278. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs.map +1 -1
  279. package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs.map +1 -1
  280. package/dist/js/packages/components/src/components/List/components/Items/views/GridListItem/GridListItem.mjs.map +1 -1
  281. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
  282. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.module.mjs.map +1 -1
  283. package/dist/js/packages/components/src/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.mjs.map +1 -1
  284. package/dist/js/packages/components/src/components/List/components/ListSummary/ListSummary.mjs.map +1 -1
  285. package/dist/js/packages/components/src/components/List/components/Table/Table.mjs.map +1 -1
  286. package/dist/js/packages/components/src/components/List/components/Table/components/TableBodyLoadingView.mjs.map +1 -1
  287. package/dist/js/packages/components/src/components/List/components/Table/components/TableRowSkeletonView.mjs.map +1 -1
  288. package/dist/js/packages/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
  289. package/dist/js/packages/components/src/components/List/model/filter/dateRangeFilterFn.mjs +2 -2
  290. package/dist/js/packages/components/src/components/List/model/filter/dateRangeFilterFn.mjs.map +1 -1
  291. package/dist/js/packages/components/src/components/List/views/EmptyView/EmptyView.mjs.map +1 -1
  292. package/dist/js/packages/components/src/components/List/views/EmptyViewContainer/EmptyViewContainer.mjs.map +1 -1
  293. package/dist/js/packages/components/src/components/LoadingSpinner/LoadingSpinner.mjs.map +1 -1
  294. package/dist/js/packages/components/src/components/Markdown/Markdown.mjs.map +1 -1
  295. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
  296. package/dist/js/packages/components/src/components/MarkdownEditor/components/AttachmentButton.mjs.map +1 -1
  297. package/dist/js/packages/components/src/components/MarkdownEditor/components/ModeButton.mjs.map +1 -1
  298. package/dist/js/packages/components/src/components/MarkdownEditor/components/Toolbar.mjs.map +1 -1
  299. package/dist/js/packages/components/src/components/MarkdownEditor/components/ToolbarButton.mjs.map +1 -1
  300. package/dist/js/packages/components/src/components/MarkdownEditor/lib/useFileUpload.mjs.map +1 -1
  301. package/dist/js/packages/components/src/components/MenuItem/MenuItem.mjs.map +1 -1
  302. package/dist/js/packages/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs.map +1 -1
  303. package/dist/js/packages/components/src/components/Message/Message.mjs.map +1 -1
  304. package/dist/js/packages/components/src/components/MessageThread/MessageThread.mjs.map +1 -1
  305. package/dist/js/packages/components/src/components/MessageThread/components/MessageSeparator/MessageSeparator.mjs.map +1 -1
  306. package/dist/js/packages/components/src/components/Modal/Modal.mjs.map +1 -1
  307. package/dist/js/packages/components/src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.mjs.map +1 -1
  308. package/dist/js/packages/components/src/components/Navigation/Navigation.mjs.map +1 -1
  309. package/dist/js/packages/components/src/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit.mjs.map +1 -1
  310. package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
  311. package/dist/js/packages/components/src/components/Notification/Notification.mjs.map +1 -1
  312. package/dist/js/packages/components/src/components/NotificationProvider/NotificationContainer/NotificationContainer.mjs.map +1 -1
  313. package/dist/js/packages/components/src/components/NumberField/NumberField.mjs +3 -2
  314. package/dist/js/packages/components/src/components/NumberField/NumberField.mjs.map +1 -1
  315. package/dist/js/packages/components/src/components/Option/Option.mjs.map +1 -1
  316. package/dist/js/packages/components/src/components/Options/Options.mjs.map +1 -1
  317. package/dist/js/packages/components/src/components/Overlay/Overlay.mjs.map +1 -1
  318. package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs +6 -1
  319. package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs.map +1 -1
  320. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs +42 -19
  321. package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
  322. package/dist/js/packages/components/src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.mjs +2 -2
  323. package/dist/js/packages/components/src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.mjs.map +1 -1
  324. package/dist/js/packages/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs.map +1 -1
  325. package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs.map +1 -1
  326. package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.mjs.map +1 -1
  327. package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry.mjs.map +1 -1
  328. package/dist/js/packages/components/src/components/PasswordCreationField/lib/ariaAnnounce.mjs.map +1 -1
  329. package/dist/js/packages/components/src/components/PasswordCreationField/lib/usePolicyValidationResult.mjs +12 -0
  330. package/dist/js/packages/components/src/components/PasswordCreationField/lib/usePolicyValidationResult.mjs.map +1 -1
  331. package/dist/js/packages/components/src/components/Popover/Popover.mjs.map +1 -1
  332. package/dist/js/packages/components/src/components/Popover/components/NonModalPopoverContent/NonModalPopoverContent.mjs.map +1 -1
  333. package/dist/js/packages/components/src/components/Popover/components/PopoverContent/PopoverContent.mjs.map +1 -1
  334. package/dist/js/packages/components/src/components/Popover/components/PopoverTip/PopoverTip.mjs.map +1 -1
  335. package/dist/js/packages/components/src/components/Popover/viewportPadding.mjs.map +1 -1
  336. package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.mjs.map +1 -1
  337. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs.map +1 -1
  338. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarLegend.mjs.map +1 -1
  339. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarValue.mjs.map +1 -1
  340. package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs +3 -2
  341. package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs.map +1 -1
  342. package/dist/js/packages/components/src/components/RadioGroup/components/Radio/Radio.mjs.map +1 -1
  343. package/dist/js/packages/components/src/components/RadioGroup/components/RadioButton/RadioButton.mjs.map +1 -1
  344. package/dist/js/packages/components/src/components/Rating/Rating.mjs +3 -2
  345. package/dist/js/packages/components/src/components/Rating/Rating.mjs.map +1 -1
  346. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/EmptySegment.mjs.map +1 -1
  347. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/FilledSegment.mjs.map +1 -1
  348. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingSegment.mjs.map +1 -1
  349. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs +3 -3
  350. package/dist/js/packages/components/src/components/SearchField/SearchField.mjs.map +1 -1
  351. package/dist/js/packages/components/src/components/Section/Section.mjs.map +1 -1
  352. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
  353. package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs +3 -2
  354. package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  355. package/dist/js/packages/components/src/components/SegmentedControl/components/Segment/Segment.mjs.map +1 -1
  356. package/dist/js/packages/components/src/components/Select/Select.mjs +3 -3
  357. package/dist/js/packages/components/src/components/Select/Select.mjs.map +1 -1
  358. package/dist/js/packages/components/src/components/Separator/Separator.mjs.map +1 -1
  359. package/dist/js/packages/components/src/components/Skeleton/Skeleton.mjs.map +1 -1
  360. package/dist/js/packages/components/src/components/SkeletonText/SkeletonText.mjs.map +1 -1
  361. package/dist/js/packages/components/src/components/Slider/Slider.mjs +4 -3
  362. package/dist/js/packages/components/src/components/Slider/Slider.mjs.map +1 -1
  363. package/dist/js/packages/components/src/components/Switch/Switch.mjs +3 -2
  364. package/dist/js/packages/components/src/components/Switch/Switch.mjs.map +1 -1
  365. package/dist/js/packages/components/src/components/TabNavigation/TabNavigation.mjs.map +1 -1
  366. package/dist/js/packages/components/src/components/TabNavigation/components/LinkContent/LinkContent.mjs.map +1 -1
  367. package/dist/js/packages/components/src/components/Table/Table.mjs.map +1 -1
  368. package/dist/js/packages/components/src/components/Table/components/TableBody/TableBody.mjs.map +1 -1
  369. package/dist/js/packages/components/src/components/Table/components/TableCell/TableCell.mjs.map +1 -1
  370. package/dist/js/packages/components/src/components/Table/components/TableColumn/TableColumn.mjs.map +1 -1
  371. package/dist/js/packages/components/src/components/Table/components/TableHeader/TableHeader.mjs.map +1 -1
  372. package/dist/js/packages/components/src/components/Table/components/TableRow/TableRow.mjs.map +1 -1
  373. package/dist/js/packages/components/src/components/Tabs/Tabs.mjs.map +1 -1
  374. package/dist/js/packages/components/src/components/Tabs/components/FallbackTab/FallbackTab.mjs.map +1 -1
  375. package/dist/js/packages/components/src/components/Tabs/components/Tab/Tab.mjs.map +1 -1
  376. package/dist/js/packages/components/src/components/Tabs/components/TabList/TabList.mjs.map +1 -1
  377. package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.mjs.map +1 -1
  378. package/dist/js/packages/components/src/components/Text/Text.mjs.map +1 -1
  379. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs +3 -3
  380. package/dist/js/packages/components/src/components/TextArea/TextArea.mjs.map +1 -1
  381. package/dist/js/packages/components/src/components/TextField/TextField.mjs +3 -3
  382. package/dist/js/packages/components/src/components/TextField/TextField.mjs.map +1 -1
  383. package/dist/js/packages/components/src/components/TimeField/TimeField.mjs +5 -3
  384. package/dist/js/packages/components/src/components/TimeField/TimeField.mjs.map +1 -1
  385. package/dist/js/packages/components/src/components/Tooltip/Tooltip.mjs.map +1 -1
  386. package/dist/js/packages/components/src/components/Truncate/Truncate.mjs.map +1 -1
  387. package/dist/js/packages/components/src/components/TunnelEntry/TunnelEntry.mjs.map +1 -1
  388. package/dist/js/packages/components/src/integrations/nextjs/components/RouterProvider/RouterProvider.mjs.map +1 -1
  389. package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
  390. package/dist/js/packages/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
  391. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormAction.mjs.map +1 -1
  392. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs +6 -3
  393. package/dist/js/packages/components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs.map +1 -1
  394. package/dist/js/packages/components/src/lib/hooks/fieldErrorRenderedContext.mjs +16 -0
  395. package/dist/js/packages/components/src/lib/hooks/fieldErrorRenderedContext.mjs.map +1 -0
  396. package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs +8 -7
  397. package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs.map +1 -1
  398. package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs +34 -21
  399. package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs.map +1 -1
  400. package/dist/js/packages/components/src/lib/react/cloneElement.mjs.map +1 -1
  401. package/dist/js/packages/components/src/lib/react/components/Render/Render.mjs.map +1 -1
  402. package/dist/js/packages/components/src/lib/react/getPropsMerger.mjs.map +1 -1
  403. package/dist/js/packages/components/src/lib/theming/hooks/useDesignTokens.mjs.map +1 -1
  404. package/dist/js/packages/components/src/lib/tokens/CategoricalColors.mjs.map +1 -1
  405. package/dist/js/packages/components/src/lib/tokens/isCategoricalColor.mjs.map +1 -1
  406. package/dist/js/packages/components/src/status/componentStatus.mjs.map +1 -1
  407. package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs +16 -0
  408. package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs.map +1 -1
  409. package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs +16 -0
  410. package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs.map +1 -1
  411. package/dist/types/components/ActionGroup/ActionGroup.d.ts +3 -2
  412. package/dist/types/components/Button/Button.d.ts +7 -1
  413. package/dist/types/components/Button/stories/lib.d.ts +1 -1
  414. package/dist/types/components/CartesianChart/components/YAxis/YAxis.d.ts +7 -0
  415. package/dist/types/components/CodeEditor/CodeEditor.d.ts +7 -0
  416. package/dist/types/components/FileField/FileField.d.ts +1 -1
  417. package/dist/types/components/Flex/Flex.d.ts +4 -0
  418. package/dist/types/components/Link/Link.d.ts +5 -1
  419. package/dist/types/components/List/components/DataLoader/DataLoader.d.ts +1 -1
  420. package/dist/types/components/List/components/Items/components/Item/Item.d.ts +1 -1
  421. package/dist/types/components/List/components/Items/components/Item/hooks/useGridItemProps.d.ts +1 -1
  422. package/dist/types/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.d.ts +1 -1
  423. package/dist/types/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.d.ts +5 -0
  424. package/dist/types/integrations/react-hook-form/components/Field/Field.d.ts +1 -1
  425. package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts +1 -1
  426. package/dist/types/integrations/react-hook-form/components/FormContextProvider/FormContextProvider.d.ts +1 -1
  427. package/dist/types/integrations/react-hook-form/components/FormRootError/FormRootError.d.ts +12 -2
  428. package/dist/types/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.d.ts +1 -1
  429. package/dist/types/lib/hooks/fieldErrorRenderedContext.d.ts +1 -0
  430. package/dist/types/lib/hooks/useFieldComponent.d.ts +15 -4
  431. package/dist/types/lib/hooks/useFieldError.d.ts +7 -1
  432. package/dist/types/lib/theming/hooks/useDesignTokens.d.ts +12 -0
  433. package/package.json +13 -10
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditor.mjs","names":[],"sources":["../../../../../../../src/components/CodeEditor/CodeEditor.tsx"],"sourcesContent":["import type { ReactCodeMirrorProps } from \"@uiw/react-codemirror\";\nimport CodeMirror, { EditorView } from \"@uiw/react-codemirror\";\nimport { useId } from \"react\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport styles from \"./CodeEditor.module.scss\";\nimport { type CodeEditorLanguage } from \"@/components/CodeEditor/languages\";\nimport { useMakeFocusable } from \"@/lib/hooks/dom/useMakeFocusable\";\nimport { useObjectRef } from \"react-aria\";\nimport { defaultLightTheme } from \"@/components/CodeEditor/themes/defaultEditorTheme\";\nimport {\n type CodeEditorSetup,\n useCodeEditorExtensions,\n} from \"@/components/CodeEditor/hooks/useCodeEditorExtensions\";\nimport { CopyButton } from \"@/components/CopyButton\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface CodeEditorProps\n extends\n Omit<ReactCodeMirrorProps, \"theme\" | \"lang\" | \"basicSetup\" | \"readOnly\">,\n CodeEditorSetup,\n FlowComponentProps {\n /** The initial code of an uncontrolled editor. */\n defaultValue?: string;\n /**\n * Whether the code can be read but not edited.\n *\n * @default false\n */\n isReadOnly?: boolean;\n /**\n * Whether the editor is displayed as invalid.\n *\n * @default false\n */\n isInvalid?: boolean;\n /** The elements class name. */\n className?: string;\n /** The language the code is highlighted as. */\n language?: CodeEditorLanguage;\n /**\n * Whether a button to copy the code to the clipboard is shown.\n *\n * @default true\n */\n copyable?: boolean;\n /**\n * Whether the field must be filled in. Only marks the editor as required for\n * assistive technology — the editor does not validate itself.\n *\n * @default false\n */\n isRequired?: boolean;\n /**\n * @internal Set by `<Field />` on every form field. The editor has no\n * react-aria validation to forward it to and drops it.\n */\n validationBehavior?: unknown;\n}\n\n/**\n * @flr-generate all\n * @flowStatus new\n */\nexport const CodeEditor = flowComponent(\"CodeEditor\", (props) => {\n const {\n ref,\n children,\n className,\n language,\n extensions,\n isReadOnly,\n isInvalid,\n isRequired,\n validationBehavior: _ignoredValidationBehavior,\n value,\n showLineNumbers = true,\n showCodeFolding = true,\n showCodeIndentationMakers = true,\n showLinterMarkers = true,\n showActiveLineMarker = true,\n copyable = true,\n height,\n minHeight,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...rest\n } = useControlledHostValueProps(props, \"\");\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"CodeEditor\");\n\n const rootClassName = clsx(\n fieldProps.className,\n styles.codeEditor,\n className,\n );\n\n const labelId = useId();\n const descriptionId = useId();\n\n /**\n * The label and the field description are declared as children of the code\n * editor, but must be rendered outside of the editor itself. They are\n * tunneled out of the editor – just like the field error. Their ids are the\n * ones the editor references.\n */\n const propsContext: PropsContext = {\n ...fieldPropsContext,\n Label: {\n ...fieldPropsContext.Label,\n id: labelId,\n tunnel: { id: \"label\", component: \"CodeEditor\" },\n },\n FieldDescription: {\n ...fieldPropsContext.FieldDescription,\n id: descriptionId,\n tunnel: { id: \"fieldDescription\", component: \"CodeEditor\" },\n },\n };\n\n const enabledExtensions = useCodeEditorExtensions(language, extensions, {\n showLineNumbers: showLineNumbers,\n showCodeIndentationMakers: showCodeIndentationMakers,\n showCodeFolding: showCodeFolding,\n showLinterMarkers: showLinterMarkers,\n });\n\n /**\n * The editable element of CodeMirror is the `.cm-content` element – not the\n * root element the props are applied to. Its ARIA attributes are set through\n * the content attributes facet.\n *\n * The label reference only resolves when a label is given. Without one, an\n * `aria-label` names the editor instead – the name computation skips\n * references that point at nothing.\n */\n const labelledBy = [ariaLabelledBy, labelId].filter(Boolean).join(\" \");\n\n const describedBy =\n [descriptionId, fieldProps[\"aria-describedby\"]].filter(Boolean).join(\" \") ||\n undefined;\n\n const contentAttributes = EditorView.contentAttributes.of({\n \"aria-labelledby\": labelledBy,\n ...(ariaLabel ? { \"aria-label\": ariaLabel } : {}),\n ...(describedBy ? { \"aria-describedby\": describedBy } : {}),\n ...(isRequired ? { \"aria-required\": \"true\" } : {}),\n ...(isInvalid ? { \"aria-invalid\": \"true\" } : {}),\n });\n\n const localRef = useObjectRef(ref);\n\n useMakeFocusable(localRef);\n\n return (\n <div className={rootClassName}>\n <PropsContextProvider props={propsContext}>\n <UiComponentTunnelExit id=\"label\" component=\"CodeEditor\" />\n <FieldErrorCaptureContext>\n <CodeMirror\n {...rest}\n value={value}\n basicSetup={{\n highlightActiveLine: showActiveLineMarker,\n highlightActiveLineGutter: showActiveLineMarker,\n autocompletion: false,\n lineNumbers: false,\n foldGutter: false,\n highlightSelectionMatches: false,\n }}\n theme={defaultLightTheme}\n data-invalid={isInvalid || undefined}\n readOnly={isReadOnly}\n className={clsx(styles.codeMirror, isReadOnly && styles.readonly)}\n ref={(codeMirrorRef) => {\n if (codeMirrorRef?.editor) {\n localRef.current = codeMirrorRef.editor;\n }\n }}\n extensions={[...enabledExtensions, contentAttributes]}\n height={height ?? minHeight}\n >\n {copyable && (\n <CopyButton\n className={styles.copyButton}\n size=\"s\"\n variant=\"soft\"\n text={value}\n />\n )}\n {children}\n </CodeMirror>\n </FieldErrorCaptureContext>\n <UiComponentTunnelExit id=\"fieldDescription\" component=\"CodeEditor\" />\n <FieldErrorView />\n </PropsContextProvider>\n </div>\n );\n});\n\nexport default CodeEditor;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsEA,IAAa,aAAa,cAAc,eAAe,UAAU;CAC/D,MAAM,EACJ,KACA,UACA,WACA,UACA,YACA,YACA,WACA,YACA,oBAAoB,4BACpB,OACA,kBAAkB,MAClB,kBAAkB,MAClB,4BAA4B,MAC5B,oBAAoB,MACpB,uBAAuB,MACvB,WAAW,MACX,QACA,WACA,cAAc,WACd,mBAAmB,gBACnB,GAAG,SACD,4BAA4B,OAAO,EAAE;CAEzC,MAAM,EACJ,gBACA,0BACA,YACA,sBACE,kBAAkB,OAAO,YAAY;CAEzC,MAAM,gBAAgB,KACpB,WAAW,WACX,0BAAO,YACP,SACF;CAEA,MAAM,UAAU,MAAM;CACtB,MAAM,gBAAgB,MAAM;;;;;;;CAQ5B,MAAM,eAA6B;EACjC,GAAG;EACH,OAAO;GACL,GAAG,kBAAkB;GACrB,IAAI;GACJ,QAAQ;IAAE,IAAI;IAAS,WAAW;GAAa;EACjD;EACA,kBAAkB;GAChB,GAAG,kBAAkB;GACrB,IAAI;GACJ,QAAQ;IAAE,IAAI;IAAoB,WAAW;GAAa;EAC5D;CACF;CAEA,MAAM,oBAAoB,wBAAwB,UAAU,YAAY;EACrD;EACU;EACV;EACE;CACrB,CAAC;;;;;;;;;;CAWD,MAAM,aAAa,CAAC,gBAAgB,OAAO,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CAErE,MAAM,cACJ,CAAC,eAAe,WAAW,mBAAmB,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KACxE,KAAA;CAEF,MAAM,oBAAoB,WAAW,kBAAkB,GAAG;EACxD,mBAAmB;EACnB,GAAI,YAAY,EAAE,cAAc,UAAU,IAAI,CAAC;EAC/C,GAAI,cAAc,EAAE,oBAAoB,YAAY,IAAI,CAAC;EACzD,GAAI,aAAa,EAAE,iBAAiB,OAAO,IAAI,CAAC;EAChD,GAAI,YAAY,EAAE,gBAAgB,OAAO,IAAI,CAAC;CAChD,CAAC;CAED,MAAM,WAAW,aAAa,GAAG;CAEjC,iBAAiB,QAAQ;CAEzB,OACE,oBAAC,OAAD;EAAK,WAAW;EACd,UAAA,qBAAC,sBAAD;GAAsB,OAAO;GAA7B,UAAA;IACE,oBAAC,uBAAD;KAAuB,IAAG;KAAQ,WAAU;IAAc,CAAA;IAC1D,oBAAC,0BAAD,EAAA,UACE,qBAAC,YAAD;KACE,GAAI;KACG;KACP,YAAY;MACV,qBAAqB;MACrB,2BAA2B;MAC3B,gBAAgB;MAChB,aAAa;MACb,YAAY;MACZ,2BAA2B;KAC7B;KACA,OAAO;KACP,gBAAc,aAAa,KAAA;KAC3B,UAAU;KACV,WAAW,KAAK,0BAAO,YAAY,cAAc,0BAAO,QAAQ;KAChE,MAAM,kBAAkB;MACtB,IAAI,eAAe,QACjB,SAAS,UAAU,cAAc;KAErC;KACA,YAAY,CAAC,GAAG,mBAAmB,iBAAiB;KACpD,QAAQ,UAAU;KArBpB,UAAA,CAuBG,YACC,oBAAC,YAAD;MACE,WAAW,0BAAO;MAClB,MAAK;MACL,SAAQ;MACR,MAAM;KACP,CAAA,GAEF,QACS;IACY,CAAA,EAAA,CAAA;IAC1B,oBAAC,uBAAD;KAAuB,IAAG;KAAmB,WAAU;IAAc,CAAA;IACrE,oBAAC,gBAAD,CAAiB,CAAA;GACG;;CACnB,CAAA;AAET,CAAC"}
1
+ {"version":3,"file":"CodeEditor.mjs","names":["styles"],"sources":["../../../../../../../src/components/CodeEditor/CodeEditor.tsx"],"sourcesContent":["import type { ReactCodeMirrorProps } from \"@uiw/react-codemirror\";\nimport CodeMirror, { EditorView } from \"@uiw/react-codemirror\";\nimport { useCallback, useId, useState } from \"react\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { joinIds, useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport styles from \"./CodeEditor.module.scss\";\nimport { type CodeEditorLanguage } from \"@/components/CodeEditor/languages\";\nimport { useMakeFocusable } from \"@/lib/hooks/dom/useMakeFocusable\";\nimport { useObjectRef } from \"react-aria\";\nimport { defaultLightTheme } from \"@/components/CodeEditor/themes/defaultEditorTheme\";\nimport {\n type CodeEditorSetup,\n useCodeEditorExtensions,\n} from \"@/components/CodeEditor/hooks/useCodeEditorExtensions\";\nimport { CopyButton } from \"@/components/CopyButton\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface CodeEditorProps\n extends\n Omit<ReactCodeMirrorProps, \"theme\" | \"lang\" | \"basicSetup\" | \"readOnly\">,\n CodeEditorSetup,\n FlowComponentProps {\n /** The initial code of an uncontrolled editor. */\n defaultValue?: string;\n /**\n * Whether the code can be read but not edited.\n *\n * @default false\n */\n isReadOnly?: boolean;\n /**\n * Whether the editor is disabled. The code can neither be edited, focused nor\n * copied.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Whether the editor is displayed as invalid.\n *\n * @default false\n */\n isInvalid?: boolean;\n /** The elements class name. */\n className?: string;\n /** The language the code is highlighted as. */\n language?: CodeEditorLanguage;\n /**\n * Whether a button to copy the code to the clipboard is shown.\n *\n * @default true\n */\n copyable?: boolean;\n /**\n * Whether the field must be filled in. Only marks the editor as required for\n * assistive technology — the editor does not validate itself.\n *\n * @default false\n */\n isRequired?: boolean;\n /**\n * @internal Set by `<Field />` on every form field. The editor has no\n * react-aria validation to forward it to and drops it.\n */\n validationBehavior?: unknown;\n}\n\n/**\n * @flr-generate all\n * @flowStatus new\n */\nexport const CodeEditor = flowComponent(\"CodeEditor\", (props) => {\n const {\n ref,\n children,\n className,\n language,\n extensions,\n isReadOnly,\n isDisabled,\n isInvalid,\n isRequired,\n validationBehavior: _ignoredValidationBehavior,\n value,\n showLineNumbers = true,\n showCodeFolding = true,\n showCodeIndentationMakers = true,\n showLinterMarkers = true,\n showActiveLineMarker = true,\n copyable = true,\n height,\n minHeight,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...rest\n } = useControlledHostValueProps(props, \"\");\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n wrapperProps,\n controlProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"CodeEditor\");\n\n const rootClassName = clsx(\n wrapperProps.className,\n styles.codeEditor,\n className,\n );\n\n const labelId = useId();\n const descriptionId = useId();\n\n /**\n * Both are optional. Their refs tell whether they are rendered, so the editor\n * never references an element that does not exist – a dangling id fails HTML\n * validators and a11y checks. The callbacks are stable: a new one per render\n * would detach and re-attach on every render.\n */\n const [hasLabel, setHasLabel] = useState(false);\n const [hasDescription, setHasDescription] = useState(false);\n const labelRef = useCallback((element: Element | null) => {\n setHasLabel(!!element);\n }, []);\n const descriptionRef = useCallback((element: Element | null) => {\n setHasDescription(!!element);\n }, []);\n\n /**\n * The label and the field description are declared as children of the code\n * editor, but must be rendered outside of the editor itself. They are\n * tunneled out of the editor – just like the field error. Their ids are the\n * ones the editor references.\n */\n const propsContext: PropsContext = {\n ...fieldPropsContext,\n Label: {\n ...fieldPropsContext.Label,\n id: labelId,\n ref: labelRef,\n tunnel: { id: \"label\", component: \"CodeEditor\" },\n },\n FieldDescription: {\n ...fieldPropsContext.FieldDescription,\n id: descriptionId,\n ref: descriptionRef,\n tunnel: { id: \"fieldDescription\", component: \"CodeEditor\" },\n },\n };\n\n const enabledExtensions = useCodeEditorExtensions(language, extensions, {\n showLineNumbers: showLineNumbers,\n showCodeIndentationMakers: showCodeIndentationMakers,\n showCodeFolding: showCodeFolding,\n showLinterMarkers: showLinterMarkers,\n });\n\n /**\n * The editable element of CodeMirror is the `.cm-content` element – not the\n * root element the props are applied to. Its ARIA attributes are set through\n * the content attributes facet.\n *\n * Without a label, an `aria-label` names the editor instead.\n */\n const labelledBy = joinIds(ariaLabelledBy, hasLabel && labelId);\n const describedBy = joinIds(\n hasDescription && descriptionId,\n controlProps[\"aria-describedby\"],\n );\n\n const contentAttributes = EditorView.contentAttributes.of({\n ...(labelledBy ? { \"aria-labelledby\": labelledBy } : {}),\n ...(ariaLabel ? { \"aria-label\": ariaLabel } : {}),\n ...(describedBy ? { \"aria-describedby\": describedBy } : {}),\n ...(isRequired ? { \"aria-required\": \"true\" } : {}),\n ...(isInvalid ? { \"aria-invalid\": \"true\" } : {}),\n ...(isDisabled ? { \"aria-disabled\": \"true\" } : {}),\n });\n\n const localRef = useObjectRef(ref);\n\n useMakeFocusable(localRef);\n\n return (\n <div className={rootClassName} data-disabled={isDisabled || undefined}>\n <PropsContextProvider props={propsContext}>\n <UiComponentTunnelExit id=\"label\" component=\"CodeEditor\" />\n <FieldErrorCaptureContext>\n <CodeMirror\n {...rest}\n value={value}\n basicSetup={{\n highlightActiveLine: showActiveLineMarker && !isDisabled,\n highlightActiveLineGutter: showActiveLineMarker && !isDisabled,\n autocompletion: false,\n lineNumbers: false,\n foldGutter: false,\n highlightSelectionMatches: false,\n }}\n theme={defaultLightTheme}\n data-invalid={isInvalid || undefined}\n data-disabled={isDisabled || undefined}\n readOnly={isReadOnly || isDisabled}\n editable={!isDisabled}\n className={clsx(styles.codeMirror, isReadOnly && styles.readonly)}\n ref={(codeMirrorRef) => {\n if (codeMirrorRef?.editor) {\n localRef.current = codeMirrorRef.editor;\n }\n }}\n extensions={[...enabledExtensions, contentAttributes]}\n height={height ?? minHeight}\n >\n {copyable && (\n <CopyButton\n className={styles.copyButton}\n size=\"s\"\n variant=\"soft\"\n text={value}\n isDisabled={isDisabled}\n />\n )}\n {children}\n </CodeMirror>\n </FieldErrorCaptureContext>\n <UiComponentTunnelExit id=\"fieldDescription\" component=\"CodeEditor\" />\n <FieldErrorView />\n </PropsContextProvider>\n </div>\n );\n});\n\nexport default CodeEditor;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6EA,IAAa,aAAa,cAAc,eAAe,UAAU;CAC/D,MAAM,EACJ,KACA,UACA,WACA,UACA,YACA,YACA,YACA,WACA,YACA,oBAAoB,4BACpB,OACA,kBAAkB,MAClB,kBAAkB,MAClB,4BAA4B,MAC5B,oBAAoB,MACpB,uBAAuB,MACvB,WAAW,MACX,QACA,WACA,cAAc,WACd,mBAAmB,gBACnB,GAAG,SACD,4BAA4B,OAAO,EAAE;CAEzC,MAAM,EACJ,gBACA,0BACA,cACA,cACA,sBACE,kBAAkB,OAAO,YAAY;CAEzC,MAAM,gBAAgB,KACpB,aAAa,WACbA,0BAAO,YACP,SACF;CAEA,MAAM,UAAU,MAAM;CACtB,MAAM,gBAAgB,MAAM;;;;;;;CAQ5B,MAAM,CAAC,UAAU,eAAe,SAAS,KAAK;CAC9C,MAAM,CAAC,gBAAgB,qBAAqB,SAAS,KAAK;CAC1D,MAAM,WAAW,aAAa,YAA4B;EACxD,YAAY,CAAC,CAAC,OAAO;CACvB,GAAG,CAAC,CAAC;CACL,MAAM,iBAAiB,aAAa,YAA4B;EAC9D,kBAAkB,CAAC,CAAC,OAAO;CAC7B,GAAG,CAAC,CAAC;;;;;;;CAQL,MAAM,eAA6B;EACjC,GAAG;EACH,OAAO;GACL,GAAG,kBAAkB;GACrB,IAAI;GACJ,KAAK;GACL,QAAQ;IAAE,IAAI;IAAS,WAAW;GAAa;EACjD;EACA,kBAAkB;GAChB,GAAG,kBAAkB;GACrB,IAAI;GACJ,KAAK;GACL,QAAQ;IAAE,IAAI;IAAoB,WAAW;GAAa;EAC5D;CACF;CAEA,MAAM,oBAAoB,wBAAwB,UAAU,YAAY;EACrD;EACU;EACV;EACE;CACrB,CAAC;;;;;;;;CASD,MAAM,aAAa,QAAQ,gBAAgB,YAAY,OAAO;CAC9D,MAAM,cAAc,QAClB,kBAAkB,eAClB,aAAa,mBACf;CAEA,MAAM,oBAAoB,WAAW,kBAAkB,GAAG;EACxD,GAAI,aAAa,EAAE,mBAAmB,WAAW,IAAI,CAAC;EACtD,GAAI,YAAY,EAAE,cAAc,UAAU,IAAI,CAAC;EAC/C,GAAI,cAAc,EAAE,oBAAoB,YAAY,IAAI,CAAC;EACzD,GAAI,aAAa,EAAE,iBAAiB,OAAO,IAAI,CAAC;EAChD,GAAI,YAAY,EAAE,gBAAgB,OAAO,IAAI,CAAC;EAC9C,GAAI,aAAa,EAAE,iBAAiB,OAAO,IAAI,CAAC;CAClD,CAAC;CAED,MAAM,WAAW,aAAa,GAAG;CAEjC,iBAAiB,QAAQ;CAEzB,OACE,oBAAC,OAAD;EAAK,WAAW;EAAe,iBAAe,cAAc,KAAA;EAC1D,UAAA,qBAAC,sBAAD;GAAsB,OAAO;GAA7B,UAAA;IACE,oBAAC,uBAAD;KAAuB,IAAG;KAAQ,WAAU;IAAc,CAAA;IAC1D,oBAAC,0BAAD,EAAA,UACE,qBAAC,YAAD;KACE,GAAI;KACG;KACP,YAAY;MACV,qBAAqB,wBAAwB,CAAC;MAC9C,2BAA2B,wBAAwB,CAAC;MACpD,gBAAgB;MAChB,aAAa;MACb,YAAY;MACZ,2BAA2B;KAC7B;KACA,OAAO;KACP,gBAAc,aAAa,KAAA;KAC3B,iBAAe,cAAc,KAAA;KAC7B,UAAU,cAAc;KACxB,UAAU,CAAC;KACX,WAAW,KAAKA,0BAAO,YAAY,cAAcA,0BAAO,QAAQ;KAChE,MAAM,kBAAkB;MACtB,IAAI,eAAe,QACjB,SAAS,UAAU,cAAc;KAErC;KACA,YAAY,CAAC,GAAG,mBAAmB,iBAAiB;KACpD,QAAQ,UAAU;KAvBpB,UAAA,CAyBG,YACC,oBAAC,YAAD;MACE,WAAWA,0BAAO;MAClB,MAAK;MACL,SAAQ;MACR,MAAM;MACM;KACb,CAAA,GAEF,QACS;IACY,CAAA,EAAA,CAAA;IAC1B,oBAAC,uBAAD;KAAuB,IAAG;KAAmB,WAAU;IAAc,CAAA;IACrE,oBAAC,gBAAD,CAAiB,CAAA;GACG;;CACnB,CAAA;AAET,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditor.module.mjs","names":[],"sources":["../../../../../../../src/components/CodeEditor/CodeEditor.module.scss"],"sourcesContent":["@use \"@/styles/mixins/formControl\";\n@use \"@/styles/mixins/scrollbar\";\n\n.codeEditor {\n outline: none;\n isolation: isolate;\n\n .codeMirror {\n @include formControl.formControl();\n\n position: relative;\n order: 2;\n\n /*\n * The inline padding is applied by the lines and the gutter instead, so\n * that the highlight of the active line spans the full editor width.\n */\n padding-inline: unset;\n\n /* the vertical padding applied by the form control mixin */\n --editor-padding: calc(\n var(--form-control--padding-y) - var(--form-control--border-width)\n );\n\n min-height: calc(var(--form-control--padding-y) * 2 + var(--line-height-m));\n\n &:hover {\n background-color: var(--form-control--background-color--default);\n }\n\n &.readonly {\n border-color: var(--form-control--border-color--default);\n }\n\n .copyButton {\n position: absolute;\n inset-block-start: var(--editor-padding);\n inset-inline-end: var(--form-control--padding-x);\n z-index: 1;\n }\n }\n}\n\n/*\n * CodeMirror ships its theme as unlayered `<style>` elements that it injects\n * into the document at runtime, outside of Flow's build. Unlayered CSS beats\n * layered CSS regardless of specificity, so these overrides only apply in the\n * layered stylesheet variant if they leave the cascade layer as well.\n */\n@layer flow.unlayered {\n .codeEditor .codeMirror {\n /*\n * The gutter needs an opaque background – the content scrolls underneath\n * it – but it must follow the background of the editor, which changes with\n * its state (invalid, disabled, …). Inheriting it down from the editor\n * beats the background the CodeMirror theme applies, which only serves as\n * a fallback.\n */\n & :global(.cm-editor),\n & :global(.cm-scroller),\n & :global(.cm-gutters) {\n background-color: inherit;\n }\n\n & :global(.cm-editor) {\n outline: none;\n\n & :global(.cm-scroller) {\n @include scrollbar.scrollbar;\n }\n\n & :global(.cm-lineNumbers .cm-gutterElement) {\n min-width: var(--code-editor--gutter-element-min-width);\n }\n\n & :global(.cm-foldGutter) {\n min-width: var(--code-editor--gutter-element-min-width);\n text-align: center;\n }\n\n & :global(.cm-panels) {\n display: none;\n }\n\n /* the block padding is applied by the editor itself */\n & :global(.cm-content) {\n padding-block: unset;\n }\n\n & :global(.cm-line) {\n padding-inline: var(--form-control--padding-x);\n }\n\n /*\n * The elements of the first gutter carry the inline start padding, so\n * that the highlight of the active line reaches the editor border.\n */\n & :global(.cm-gutters > .cm-gutter:first-child .cm-gutterElement) {\n padding-inline-start: var(--form-control--padding-x);\n }\n\n & :global(.cm-activeLineGutter),\n & :global(.cm-activeLine) {\n background-color: color-mix(\n in srgb,\n var(--form-control--background-color--hover) 65%,\n transparent\n );\n }\n }\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"CodeEditor.module.mjs","names":[],"sources":["../../../../../../../src/components/CodeEditor/CodeEditor.module.scss"],"sourcesContent":["@use \"@/styles/mixins/formControl\";\n@use \"@/styles/mixins/scrollbar\";\n\n.codeEditor {\n outline: none;\n isolation: isolate;\n\n .codeMirror {\n @include formControl.formControl();\n\n position: relative;\n order: 2;\n\n /*\n * The inline padding is applied by the lines and the gutter instead, so\n * that the highlight of the active line spans the full editor width.\n */\n padding-inline: unset;\n\n /* the vertical padding applied by the form control mixin */\n --editor-padding: calc(\n var(--form-control--padding-y) - var(--form-control--border-width)\n );\n\n min-height: calc(var(--form-control--padding-y) * 2 + var(--line-height-m));\n\n &:hover {\n background-color: var(--form-control--background-color--default);\n }\n\n &.readonly {\n border-color: var(--form-control--border-color--default);\n }\n\n &[data-disabled] {\n --code-editor--gutter-separator-color: var(\n --form-control--border-color--disabled\n );\n --code-editor--indentation-marker-color: var(\n --form-control--border-color--disabled\n );\n\n background-color: var(--form-control--background-color--disabled);\n }\n\n .copyButton {\n position: absolute;\n inset-block-start: var(--editor-padding);\n inset-inline-end: var(--form-control--padding-x);\n z-index: 1;\n }\n }\n}\n\n/*\n * CodeMirror ships its theme as unlayered `<style>` elements that it injects\n * into the document at runtime, outside of Flow's build. Unlayered CSS beats\n * layered CSS regardless of specificity, so these overrides only apply in the\n * layered stylesheet variant if they leave the cascade layer as well.\n */\n@layer flow.unlayered {\n .codeEditor .codeMirror {\n /*\n * The gutter needs an opaque background – the content scrolls underneath\n * it – but it must follow the background of the editor, which changes with\n * its state (invalid, disabled, …). Inheriting it down from the editor\n * beats the background the CodeMirror theme applies, which only serves as\n * a fallback.\n */\n & :global(.cm-editor),\n & :global(.cm-scroller),\n & :global(.cm-gutters) {\n background-color: inherit;\n }\n\n /* The same goes for the text color of the code and the line numbers. */\n & :global(.cm-editor),\n & :global(.cm-gutters) {\n color: inherit;\n }\n\n /* Syntax highlighting would make disabled code look editable. */\n &[data-disabled] :global(.cm-content *) {\n color: inherit;\n }\n\n & :global(.cm-editor) {\n outline: none;\n\n & :global(.cm-scroller) {\n @include scrollbar.scrollbar;\n }\n\n & :global(.cm-lineNumbers .cm-gutterElement) {\n min-width: var(--code-editor--gutter-element-min-width);\n }\n\n & :global(.cm-foldGutter) {\n min-width: var(--code-editor--gutter-element-min-width);\n text-align: center;\n }\n\n & :global(.cm-panels) {\n display: none;\n }\n\n /* the block padding is applied by the editor itself */\n & :global(.cm-content) {\n padding-block: unset;\n }\n\n & :global(.cm-line) {\n padding-inline: var(--form-control--padding-x);\n }\n\n /*\n * The elements of the first gutter carry the inline start padding, so\n * that the highlight of the active line reaches the editor border.\n */\n & :global(.cm-gutters > .cm-gutter:first-child .cm-gutterElement) {\n padding-inline-start: var(--form-control--padding-x);\n }\n\n & :global(.cm-activeLineGutter),\n & :global(.cm-activeLine) {\n background-color: color-mix(\n in srgb,\n var(--form-control--background-color--hover) 65%,\n transparent\n );\n }\n }\n }\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../../../src/components/CodeEditor/languages/dotEnv/index.tsx"],"sourcesContent":["import {\n HighlightStyle,\n LanguageSupport,\n LRLanguage,\n syntaxHighlighting,\n syntaxTree,\n} from \"@codemirror/language\";\nimport type { Diagnostic } from \"@codemirror/lint\";\nimport { linter } from \"@codemirror/lint\";\nimport { styleTags, tags as t } from \"@lezer/highlight\";\nimport * as dotEnvGrammar from \"./dotEnv.grammar\";\nimport type { LanguageContainer } from \"@/components/CodeEditor/languages\";\n\nconst definedStyle = HighlightStyle.define([\n { tag: t.variableName, fontWeight: \"bold\" },\n { tag: t.lineComment, fontStyle: \"italic\" },\n]);\n\nconst envHighlighting = styleTags({\n Identifier: t.variableName,\n Equal: t.operator,\n SQString: t.string,\n DQString: t.string,\n BareValueToken: t.string,\n Comment: t.lineComment,\n Hash: t.lineComment,\n});\n\nconst lrLanguage = LRLanguage.define({\n parser: dotEnvGrammar.parser.configure({\n props: [envHighlighting],\n }),\n languageData: {\n commentTokens: { line: \"#\" },\n },\n});\n\nexport const validator = (input: string) => {\n let isValid = true;\n lrLanguage.parser.parse(input).iterate({\n enter: (node) => {\n if (node.type.isError) {\n isValid = false;\n }\n },\n });\n\n return isValid;\n};\n\nconst language: LanguageContainer = [\n () => syntaxHighlighting(definedStyle),\n () => new LanguageSupport(lrLanguage),\n () =>\n linter((view) => {\n const diagnostics: Diagnostic[] = [];\n const doc = view.state.doc;\n const seenIdentifiers = new Set<string>();\n\n const errorNodes: { from: number; to: number }[] = [];\n\n syntaxTree(view.state).iterate({\n enter: (node) => {\n const from = node.from;\n const to = node.to;\n\n if (node.type.isError) {\n errorNodes.push({ from, to });\n }\n\n if (node.name === \"Identifier\") {\n const identifier = doc.sliceString(from, to);\n\n if (seenIdentifiers.has(identifier)) {\n diagnostics.push({\n from,\n to: from + identifier.length,\n severity: \"error\",\n message: `Duplicate key \"${identifier}\" found.`,\n });\n }\n seenIdentifiers.add(identifier);\n\n if (identifier !== identifier.toUpperCase()) {\n diagnostics.push({\n from,\n to,\n severity: \"warning\",\n message:\n \"Variable names are usually uppercase (e.g. DATABASE_URL)\",\n });\n }\n }\n },\n });\n\n if (errorNodes.length) {\n const lastError = errorNodes[errorNodes.length - 1];\n const docText = doc.toString();\n const docEnd = doc.length;\n\n const isLastErrorAtEOF =\n lastError?.from === docEnd && lastError?.to === docEnd;\n\n const hasNoFinalNewline = !docText.endsWith(\"\\n\");\n\n if (isLastErrorAtEOF && hasNoFinalNewline) {\n diagnostics.push({\n from: docEnd,\n to: docEnd,\n severity: \"error\",\n message: \"Must end with a newline.\",\n });\n } else {\n errorNodes.forEach((node) =>\n diagnostics.push({\n from: node.from,\n to: node.to,\n severity: \"error\",\n message:\n \"Syntax error: Unexpected character or malformed assignment\",\n }),\n );\n }\n }\n\n return diagnostics;\n }),\n];\n\nexport default language;\n"],"mappings":";;;;;;AAaA,IAAM,eAAe,eAAe,OAAO,CACzC;CAAE,KAAK,KAAE;CAAc,YAAY;AAAO,GAC1C;CAAE,KAAK,KAAE;CAAa,WAAW;AAAS,CAC5C,CAAC;AAED,IAAM,kBAAkB,UAAU;CAChC,YAAY,KAAE;CACd,OAAO,KAAE;CACT,UAAU,KAAE;CACZ,UAAU,KAAE;CACZ,gBAAgB,KAAE;CAClB,SAAS,KAAE;CACX,MAAM,KAAE;AACV,CAAC;AAED,IAAM,aAAa,WAAW,OAAO;CACnC,QAAA,OAA6B,UAAU,EACrC,OAAO,CAAC,eAAe,EACzB,CAAC;CACD,cAAc,EACZ,eAAe,EAAE,MAAM,IAAI,EAC7B;AACF,CAAC;AAeD,IAAM,WAA8B;OAC5B,mBAAmB,YAAY;OAC/B,IAAI,gBAAgB,UAAU;OAElC,QAAQ,SAAS;EACf,MAAM,cAA4B,CAAC;EACnC,MAAM,MAAM,KAAK,MAAM;EACvB,MAAM,kCAAkB,IAAI,IAAY;EAExC,MAAM,aAA6C,CAAC;EAEpD,WAAW,KAAK,KAAK,CAAC,CAAC,QAAQ,EAC7B,QAAQ,SAAS;GACf,MAAM,OAAO,KAAK;GAClB,MAAM,KAAK,KAAK;GAEhB,IAAI,KAAK,KAAK,SACZ,WAAW,KAAK;IAAE;IAAM;GAAG,CAAC;GAG9B,IAAI,KAAK,SAAS,cAAc;IAC9B,MAAM,aAAa,IAAI,YAAY,MAAM,EAAE;IAE3C,IAAI,gBAAgB,IAAI,UAAU,GAChC,YAAY,KAAK;KACf;KACA,IAAI,OAAO,WAAW;KACtB,UAAU;KACV,SAAS,kBAAkB,WAAW;IACxC,CAAC;IAEH,gBAAgB,IAAI,UAAU;IAE9B,IAAI,eAAe,WAAW,YAAY,GACxC,YAAY,KAAK;KACf;KACA;KACA,UAAU;KACV,SACE;IACJ,CAAC;GAEL;EACF,EACF,CAAC;EAED,IAAI,WAAW,QAAQ;GACrB,MAAM,YAAY,WAAW,WAAW,SAAS;GACjD,MAAM,UAAU,IAAI,SAAS;GAC7B,MAAM,SAAS,IAAI;GAEnB,MAAM,mBACJ,WAAW,SAAS,UAAU,WAAW,OAAO;GAElD,MAAM,oBAAoB,CAAC,QAAQ,SAAS,IAAI;GAEhD,IAAI,oBAAoB,mBACtB,YAAY,KAAK;IACf,MAAM;IACN,IAAI;IACJ,UAAU;IACV,SAAS;GACX,CAAC;QAED,WAAW,SAAS,SAClB,YAAY,KAAK;IACf,MAAM,KAAK;IACX,IAAI,KAAK;IACT,UAAU;IACV,SACE;GACJ,CAAC,CACH;EAEJ;EAEA,OAAO;CACT,CAAC;AACL"}
1
+ {"version":3,"file":"index.mjs","names":["t"],"sources":["../../../../../../../../../src/components/CodeEditor/languages/dotEnv/index.tsx"],"sourcesContent":["import {\n HighlightStyle,\n LanguageSupport,\n LRLanguage,\n syntaxHighlighting,\n syntaxTree,\n} from \"@codemirror/language\";\nimport type { Diagnostic } from \"@codemirror/lint\";\nimport { linter } from \"@codemirror/lint\";\nimport { styleTags, tags as t } from \"@lezer/highlight\";\nimport * as dotEnvGrammar from \"./dotEnv.grammar\";\nimport type { LanguageContainer } from \"@/components/CodeEditor/languages\";\n\nconst definedStyle = HighlightStyle.define([\n { tag: t.variableName, fontWeight: \"bold\" },\n { tag: t.lineComment, fontStyle: \"italic\" },\n]);\n\nconst envHighlighting = styleTags({\n Identifier: t.variableName,\n Equal: t.operator,\n SQString: t.string,\n DQString: t.string,\n BareValueToken: t.string,\n Comment: t.lineComment,\n Hash: t.lineComment,\n});\n\nconst lrLanguage = LRLanguage.define({\n parser: dotEnvGrammar.parser.configure({\n props: [envHighlighting],\n }),\n languageData: {\n commentTokens: { line: \"#\" },\n },\n});\n\nexport const validator = (input: string) => {\n let isValid = true;\n lrLanguage.parser.parse(input).iterate({\n enter: (node) => {\n if (node.type.isError) {\n isValid = false;\n }\n },\n });\n\n return isValid;\n};\n\nconst language: LanguageContainer = [\n () => syntaxHighlighting(definedStyle),\n () => new LanguageSupport(lrLanguage),\n () =>\n linter((view) => {\n const diagnostics: Diagnostic[] = [];\n const doc = view.state.doc;\n const seenIdentifiers = new Set<string>();\n\n const errorNodes: { from: number; to: number }[] = [];\n\n syntaxTree(view.state).iterate({\n enter: (node) => {\n const from = node.from;\n const to = node.to;\n\n if (node.type.isError) {\n errorNodes.push({ from, to });\n }\n\n if (node.name === \"Identifier\") {\n const identifier = doc.sliceString(from, to);\n\n if (seenIdentifiers.has(identifier)) {\n diagnostics.push({\n from,\n to: from + identifier.length,\n severity: \"error\",\n message: `Duplicate key \"${identifier}\" found.`,\n });\n }\n seenIdentifiers.add(identifier);\n\n if (identifier !== identifier.toUpperCase()) {\n diagnostics.push({\n from,\n to,\n severity: \"warning\",\n message:\n \"Variable names are usually uppercase (e.g. DATABASE_URL)\",\n });\n }\n }\n },\n });\n\n if (errorNodes.length) {\n const lastError = errorNodes[errorNodes.length - 1];\n const docText = doc.toString();\n const docEnd = doc.length;\n\n const isLastErrorAtEOF =\n lastError?.from === docEnd && lastError?.to === docEnd;\n\n const hasNoFinalNewline = !docText.endsWith(\"\\n\");\n\n if (isLastErrorAtEOF && hasNoFinalNewline) {\n diagnostics.push({\n from: docEnd,\n to: docEnd,\n severity: \"error\",\n message: \"Must end with a newline.\",\n });\n } else {\n errorNodes.forEach((node) =>\n diagnostics.push({\n from: node.from,\n to: node.to,\n severity: \"error\",\n message:\n \"Syntax error: Unexpected character or malformed assignment\",\n }),\n );\n }\n }\n\n return diagnostics;\n }),\n];\n\nexport default language;\n"],"mappings":";;;;;;AAaA,IAAM,eAAe,eAAe,OAAO,CACzC;CAAE,KAAKA,KAAE;CAAc,YAAY;AAAO,GAC1C;CAAE,KAAKA,KAAE;CAAa,WAAW;AAAS,CAC5C,CAAC;AAED,IAAM,kBAAkB,UAAU;CAChC,YAAYA,KAAE;CACd,OAAOA,KAAE;CACT,UAAUA,KAAE;CACZ,UAAUA,KAAE;CACZ,gBAAgBA,KAAE;CAClB,SAASA,KAAE;CACX,MAAMA,KAAE;AACV,CAAC;AAED,IAAM,aAAa,WAAW,OAAO;CACnC,QAAA,OAA6B,UAAU,EACrC,OAAO,CAAC,eAAe,EACzB,CAAC;CACD,cAAc,EACZ,eAAe,EAAE,MAAM,IAAI,EAC7B;AACF,CAAC;AAeD,IAAM,WAA8B;OAC5B,mBAAmB,YAAY;OAC/B,IAAI,gBAAgB,UAAU;OAElC,QAAQ,SAAS;EACf,MAAM,cAA4B,CAAC;EACnC,MAAM,MAAM,KAAK,MAAM;EACvB,MAAM,kCAAkB,IAAI,IAAY;EAExC,MAAM,aAA6C,CAAC;EAEpD,WAAW,KAAK,KAAK,CAAC,CAAC,QAAQ,EAC7B,QAAQ,SAAS;GACf,MAAM,OAAO,KAAK;GAClB,MAAM,KAAK,KAAK;GAEhB,IAAI,KAAK,KAAK,SACZ,WAAW,KAAK;IAAE;IAAM;GAAG,CAAC;GAG9B,IAAI,KAAK,SAAS,cAAc;IAC9B,MAAM,aAAa,IAAI,YAAY,MAAM,EAAE;IAE3C,IAAI,gBAAgB,IAAI,UAAU,GAChC,YAAY,KAAK;KACf;KACA,IAAI,OAAO,WAAW;KACtB,UAAU;KACV,SAAS,kBAAkB,WAAW;IACxC,CAAC;IAEH,gBAAgB,IAAI,UAAU;IAE9B,IAAI,eAAe,WAAW,YAAY,GACxC,YAAY,KAAK;KACf;KACA;KACA,UAAU;KACV,SACE;IACJ,CAAC;GAEL;EACF,EACF,CAAC;EAED,IAAI,WAAW,QAAQ;GACrB,MAAM,YAAY,WAAW,WAAW,SAAS;GACjD,MAAM,UAAU,IAAI,SAAS;GAC7B,MAAM,SAAS,IAAI;GAEnB,MAAM,mBACJ,WAAW,SAAS,UAAU,WAAW,OAAO;GAElD,MAAM,oBAAoB,CAAC,QAAQ,SAAS,IAAI;GAEhD,IAAI,oBAAoB,mBACtB,YAAY,KAAK;IACf,MAAM;IACN,IAAI;IACJ,UAAU;IACV,SAAS;GACX,CAAC;QAED,WAAW,SAAS,SAClB,YAAY,KAAK;IACf,MAAM,KAAK;IACX,IAAI,KAAK;IACT,UAAU;IACV,SACE;GACJ,CAAC,CACH;EAEJ;EAEA,OAAO;CACT,CAAC;AACL"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../../src/components/CodeEditor/languages/index.ts"],"sourcesContent":["import { langs, type LanguageName } from \"@uiw/codemirror-extensions-langs\";\nimport {\n type LanguageSupport,\n type StreamLanguage,\n} from \"@codemirror/language\";\nimport type { linter } from \"@codemirror/lint\";\nimport type { Extension } from \"@uiw/react-codemirror\";\nimport DotEnvLanguage from \"@/components/CodeEditor/languages/dotEnv\";\nimport type { ALL_LANGUAGES } from \"@/components/CodeEditor/languages/all\";\n\nexport type CodeEditorLanguage = (typeof ALL_LANGUAGES)[number];\n\nexport type LanguageFactory = Record<\n CodeEditorLanguage,\n (() =>\n | StreamLanguage<unknown>\n | LanguageSupport\n | Extension\n | ReturnType<typeof linter>)[]\n>;\n\nexport type LanguageContainer = [\n () => Extension,\n () => LanguageSupport,\n () => ReturnType<typeof linter>,\n];\n\nconst supportedCodeEditorLanguages: LanguageFactory = {} as never;\nObject.keys(langs).forEach((key) => {\n const languageKey = key as CodeEditorLanguage;\n supportedCodeEditorLanguages[languageKey] = [\n langs[languageKey as LanguageName],\n ];\n});\n\nsupportedCodeEditorLanguages.dotEnv = DotEnvLanguage;\n\nexport default supportedCodeEditorLanguages;\n"],"mappings":";;;;;AA2BA,IAAM,+BAAgD,CAAC;AACvD,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,QAAQ;CAClC,MAAM,cAAc;CACpB,6BAA6B,eAAe,CAC1C,MAAM,YACR;AACF,CAAC;AAED,6BAA6B,SAAS"}
1
+ {"version":3,"file":"index.mjs","names":["DotEnvLanguage"],"sources":["../../../../../../../../src/components/CodeEditor/languages/index.ts"],"sourcesContent":["import { langs, type LanguageName } from \"@uiw/codemirror-extensions-langs\";\nimport {\n type LanguageSupport,\n type StreamLanguage,\n} from \"@codemirror/language\";\nimport type { linter } from \"@codemirror/lint\";\nimport type { Extension } from \"@uiw/react-codemirror\";\nimport DotEnvLanguage from \"@/components/CodeEditor/languages/dotEnv\";\nimport type { ALL_LANGUAGES } from \"@/components/CodeEditor/languages/all\";\n\nexport type CodeEditorLanguage = (typeof ALL_LANGUAGES)[number];\n\nexport type LanguageFactory = Record<\n CodeEditorLanguage,\n (() =>\n | StreamLanguage<unknown>\n | LanguageSupport\n | Extension\n | ReturnType<typeof linter>)[]\n>;\n\nexport type LanguageContainer = [\n () => Extension,\n () => LanguageSupport,\n () => ReturnType<typeof linter>,\n];\n\nconst supportedCodeEditorLanguages: LanguageFactory = {} as never;\nObject.keys(langs).forEach((key) => {\n const languageKey = key as CodeEditorLanguage;\n supportedCodeEditorLanguages[languageKey] = [\n langs[languageKey as LanguageName],\n ];\n});\n\nsupportedCodeEditorLanguages.dotEnv = DotEnvLanguage;\n\nexport default supportedCodeEditorLanguages;\n"],"mappings":";;;;;AA2BA,IAAM,+BAAgD,CAAC;AACvD,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,QAAQ;CAClC,MAAM,cAAc;CACpB,6BAA6B,eAAe,CAC1C,MAAM,YACR;AACF,CAAC;AAED,6BAA6B,SAASA"}
@@ -1 +1 @@
1
- {"version":3,"file":"defaultEditorTheme.mjs","names":[],"sources":["../../../../../../../../src/components/CodeEditor/themes/defaultEditorTheme.ts"],"sourcesContent":["import { githubLightInit } from \"@uiw/codemirror-theme-github\";\nimport { tags as t } from \"@lezer/highlight\";\n\nexport const defaultLightTheme = githubLightInit({\n theme: \"light\",\n settings: {\n fontSize: \"var(--code-editor--font-size)\",\n fontFamily: \"var(--code-editor--font-family)\",\n foreground: \"var(--form-control--content-color--default)\",\n background: \"transparent\",\n gutterBackground: \"var(--form-control--background-color--default)\",\n gutterForeground: \"var(--form-control--content-color--default)\",\n gutterBorder: \"var(--code-editor--gutter-separator-color)\",\n },\n styles: [\n { tag: t.keyword, color: \"var(--color--code-syntax--keyword)\" },\n {\n tag: [t.typeName, t.className, t.tagName],\n color: \"var(--color--code-syntax--type)\",\n },\n { tag: t.variableName, color: \"var(--color--code-syntax--variable)\" },\n {\n tag: [t.propertyName, t.attributeName],\n color: \"var(--color--code-syntax--property)\",\n },\n { tag: [t.string, t.regexp], color: \"var(--color--code-syntax--string)\" },\n { tag: t.number, color: \"var(--color--code-syntax--number)\" },\n { tag: t.comment, color: \"var(--color--code-syntax--comment)\" },\n {\n tag: [t.function(t.variableName), t.function(t.propertyName)],\n color: \"var(--color--code-syntax--function)\",\n },\n {\n tag: [t.operator, t.typeOperator],\n color: \"var(--color--code-syntax--operator)\",\n },\n { tag: t.invalid, color: \"var(--color--code-syntax--invalid)\" },\n ],\n});\n"],"mappings":";;;;;AAGA,IAAa,oBAAoB,gBAAgB;CAC/C,OAAO;CACP,UAAU;EACR,UAAU;EACV,YAAY;EACZ,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB,kBAAkB;EAClB,cAAc;CAChB;CACA,QAAQ;EACN;GAAE,KAAK,KAAE;GAAS,OAAO;EAAqC;EAC9D;GACE,KAAK;IAAC,KAAE;IAAU,KAAE;IAAW,KAAE;GAAO;GACxC,OAAO;EACT;EACA;GAAE,KAAK,KAAE;GAAc,OAAO;EAAsC;EACpE;GACE,KAAK,CAAC,KAAE,cAAc,KAAE,aAAa;GACrC,OAAO;EACT;EACA;GAAE,KAAK,CAAC,KAAE,QAAQ,KAAE,MAAM;GAAG,OAAO;EAAoC;EACxE;GAAE,KAAK,KAAE;GAAQ,OAAO;EAAoC;EAC5D;GAAE,KAAK,KAAE;GAAS,OAAO;EAAqC;EAC9D;GACE,KAAK,CAAC,KAAE,SAAS,KAAE,YAAY,GAAG,KAAE,SAAS,KAAE,YAAY,CAAC;GAC5D,OAAO;EACT;EACA;GACE,KAAK,CAAC,KAAE,UAAU,KAAE,YAAY;GAChC,OAAO;EACT;EACA;GAAE,KAAK,KAAE;GAAS,OAAO;EAAqC;CAChE;AACF,CAAC"}
1
+ {"version":3,"file":"defaultEditorTheme.mjs","names":["t"],"sources":["../../../../../../../../src/components/CodeEditor/themes/defaultEditorTheme.ts"],"sourcesContent":["import { githubLightInit } from \"@uiw/codemirror-theme-github\";\nimport { tags as t } from \"@lezer/highlight\";\n\nexport const defaultLightTheme = githubLightInit({\n theme: \"light\",\n settings: {\n fontSize: \"var(--code-editor--font-size)\",\n fontFamily: \"var(--code-editor--font-family)\",\n foreground: \"var(--form-control--content-color--default)\",\n background: \"transparent\",\n gutterBackground: \"var(--form-control--background-color--default)\",\n gutterForeground: \"var(--form-control--content-color--default)\",\n gutterBorder: \"var(--code-editor--gutter-separator-color)\",\n },\n styles: [\n { tag: t.keyword, color: \"var(--color--code-syntax--keyword)\" },\n {\n tag: [t.typeName, t.className, t.tagName],\n color: \"var(--color--code-syntax--type)\",\n },\n { tag: t.variableName, color: \"var(--color--code-syntax--variable)\" },\n {\n tag: [t.propertyName, t.attributeName],\n color: \"var(--color--code-syntax--property)\",\n },\n { tag: [t.string, t.regexp], color: \"var(--color--code-syntax--string)\" },\n { tag: t.number, color: \"var(--color--code-syntax--number)\" },\n { tag: t.comment, color: \"var(--color--code-syntax--comment)\" },\n {\n tag: [t.function(t.variableName), t.function(t.propertyName)],\n color: \"var(--color--code-syntax--function)\",\n },\n {\n tag: [t.operator, t.typeOperator],\n color: \"var(--color--code-syntax--operator)\",\n },\n { tag: t.invalid, color: \"var(--color--code-syntax--invalid)\" },\n ],\n});\n"],"mappings":";;;;;AAGA,IAAa,oBAAoB,gBAAgB;CAC/C,OAAO;CACP,UAAU;EACR,UAAU;EACV,YAAY;EACZ,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB,kBAAkB;EAClB,cAAc;CAChB;CACA,QAAQ;EACN;GAAE,KAAKA,KAAE;GAAS,OAAO;EAAqC;EAC9D;GACE,KAAK;IAACA,KAAE;IAAUA,KAAE;IAAWA,KAAE;GAAO;GACxC,OAAO;EACT;EACA;GAAE,KAAKA,KAAE;GAAc,OAAO;EAAsC;EACpE;GACE,KAAK,CAACA,KAAE,cAAcA,KAAE,aAAa;GACrC,OAAO;EACT;EACA;GAAE,KAAK,CAACA,KAAE,QAAQA,KAAE,MAAM;GAAG,OAAO;EAAoC;EACxE;GAAE,KAAKA,KAAE;GAAQ,OAAO;EAAoC;EAC5D;GAAE,KAAKA,KAAE;GAAS,OAAO;EAAqC;EAC9D;GACE,KAAK,CAACA,KAAE,SAASA,KAAE,YAAY,GAAGA,KAAE,SAASA,KAAE,YAAY,CAAC;GAC5D,OAAO;EACT;EACA;GACE,KAAK,CAACA,KAAE,UAAUA,KAAE,YAAY;GAChC,OAAO;EACT;EACA;GAAE,KAAKA,KAAE;GAAS,OAAO;EAAqC;CAChE;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Color.mjs","names":[],"sources":["../../../../../../../src/components/Color/Color.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./Color.module.scss\";\nimport {\n alphaColors,\n type PropsWithClassName,\n statusTypes,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\n\nconst flowColors = [\n \"blue\",\n \"violet\",\n \"teal\",\n \"lilac\",\n ...statusTypes,\n ...alphaColors,\n] as const;\n\ntype FlowColor = (typeof flowColors)[number];\ntype FlowWithCustomColor = FlowColor | (string & {});\n\nfunction isFlowColor(something: unknown): something is FlowColor {\n const anyFlowColors = flowColors as readonly string[];\n return typeof something === \"string\" && anyFlowColors.includes(something);\n}\n\nexport interface ColorProps extends PropsWithChildren, PropsWithClassName {\n /** The color of the element. @default \"blue\" */\n color?: FlowWithCustomColor;\n}\n\n/** @flr-generate all */\nexport const Color: FC<ColorProps> = (props) => {\n const { children, className, color = \"blue\" } = props;\n\n const isAFlowColor = isFlowColor(color);\n const rootClassName = clsx(isAFlowColor && styles[color], className);\n const style = !isAFlowColor ? { color } : undefined;\n\n return (\n <span className={rootClassName} style={style}>\n {children}\n </span>\n );\n};\n\nexport default Color;\n"],"mappings":";;;;;;;AASA,IAAM,aAAa;CACjB;CACA;CACA;CACA;CACA,GAAG;CACH,GAAG;AACL;AAKA,SAAS,YAAY,WAA4C;CAE/D,OAAO,OAAO,cAAc,YAAY,WAAc,SAAS,SAAS;AAC1E;;AAQA,IAAa,SAAyB,UAAU;CAC9C,MAAM,EAAE,UAAU,WAAW,QAAQ,WAAW;CAEhD,MAAM,eAAe,YAAY,KAAK;CACtC,MAAM,gBAAgB,KAAK,gBAAgB,qBAAO,QAAQ,SAAS;CAGnE,OACE,oBAAC,QAAD;EAAM,WAAW;EAAsB,OAH3B,CAAC,eAAe,EAAE,MAAM,IAAI,KAAA;EAIrC;CACG,CAAA;AAEV"}
1
+ {"version":3,"file":"Color.mjs","names":["anyFlowColors","styles"],"sources":["../../../../../../../src/components/Color/Color.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./Color.module.scss\";\nimport {\n alphaColors,\n type PropsWithClassName,\n statusTypes,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\n\nconst flowColors = [\n \"blue\",\n \"violet\",\n \"teal\",\n \"lilac\",\n ...statusTypes,\n ...alphaColors,\n] as const;\n\ntype FlowColor = (typeof flowColors)[number];\ntype FlowWithCustomColor = FlowColor | (string & {});\n\nfunction isFlowColor(something: unknown): something is FlowColor {\n const anyFlowColors = flowColors as readonly string[];\n return typeof something === \"string\" && anyFlowColors.includes(something);\n}\n\nexport interface ColorProps extends PropsWithChildren, PropsWithClassName {\n /** The color of the element. @default \"blue\" */\n color?: FlowWithCustomColor;\n}\n\n/** @flr-generate all */\nexport const Color: FC<ColorProps> = (props) => {\n const { children, className, color = \"blue\" } = props;\n\n const isAFlowColor = isFlowColor(color);\n const rootClassName = clsx(isAFlowColor && styles[color], className);\n const style = !isAFlowColor ? { color } : undefined;\n\n return (\n <span className={rootClassName} style={style}>\n {children}\n </span>\n );\n};\n\nexport default Color;\n"],"mappings":";;;;;;;AASA,IAAM,aAAa;CACjB;CACA;CACA;CACA;CACA,GAAG;CACH,GAAG;AACL;AAKA,SAAS,YAAY,WAA4C;CAE/D,OAAO,OAAO,cAAc,YAAYA,WAAc,SAAS,SAAS;AAC1E;;AAQA,IAAa,SAAyB,UAAU;CAC9C,MAAM,EAAE,UAAU,WAAW,QAAQ,WAAW;CAEhD,MAAM,eAAe,YAAY,KAAK;CACtC,MAAM,gBAAgB,KAAK,gBAAgBC,qBAAO,QAAQ,SAAS;CAGnE,OACE,oBAAC,QAAD;EAAM,WAAW;EAAsB,OAH3B,CAAC,eAAe,EAAE,MAAM,IAAI,KAAA;EAIrC;CACG,CAAA;AAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnLayout.mjs","names":[],"sources":["../../../../../../../src/components/ColumnLayout/ColumnLayout.tsx"],"sourcesContent":["import type { CSSProperties, PropsWithChildren } from \"react\";\nimport styles from \"./ColumnLayout.module.scss\";\nimport { styleClassname } from \"@/lib/scss/selectors\";\nimport { getColumns } from \"./lib/getColumns\";\nimport clsx from \"clsx\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\n\ntype GapSize = \"s\" | \"m\" | \"l\" | \"xl\";\n\nexport interface ColumnLayoutProps<\n T extends keyof HTMLElementTagNameMap = \"div\" | \"ul\",\n>\n extends\n PropsWithChildren,\n PropsWithElementType<T>,\n PropsWithClassName,\n FlowComponentProps<HTMLElementTagNameMap[T]> {\n /** Column layout for container size s. */\n s?: (number | null)[];\n /** Column layout for container size m. */\n m?: (number | null)[];\n /** Column layout for container size l. */\n l?: (number | null)[];\n /**\n * Size of the row and column gap between the content blocks inside the column\n * layout.\n *\n * @default \"m\"\n */\n gap?: GapSize;\n /** Size of the row gap between the content blocks inside the column layout. */\n rowGap?: GapSize;\n /** Size of the column gap between the content blocks inside the column layout. */\n columnGap?: GapSize;\n}\n\n/** @flr-generate all */\nexport const ColumnLayout = flowComponent(\n \"ColumnLayout\",\n (props) => {\n const {\n children,\n className,\n s,\n m,\n l,\n gap = \"m\",\n rowGap = gap,\n columnGap = gap,\n elementType = \"div\",\n \"aria-label\": ariaLabel,\n ref,\n style: styleFromProps,\n } = props;\n\n let elementClassName: string = styles.columnLayout;\n\n s?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(\n elementClassName,\n styleClassname(styles, `hide-s-${i + 1}`),\n );\n }\n });\n m?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(\n elementClassName,\n styleClassname(styles, `hide-m-${i + 1}`),\n );\n }\n });\n l?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(\n elementClassName,\n styleClassname(styles, `hide-l-${i + 1}`),\n );\n }\n });\n\n const columnsS = getColumns(s ?? [1]);\n const columnsM = m ? getColumns(m) : s ? columnsS : getColumns([1, 1]);\n const columnsL = l\n ? getColumns(l)\n : m || s\n ? columnsM\n : getColumns([1, 1, 1]);\n\n const style: CSSProperties = {\n ...styleFromProps,\n \"--column-layout--columns-s\": columnsS,\n \"--column-layout--columns-m\": columnsM,\n \"--column-layout--columns-l\": columnsL,\n \"--column-layout--row-gap\": `var(--column-layout--gap--${rowGap})`,\n \"--column-layout--column-gap\": `var(--column-layout--gap--${columnGap})`,\n };\n\n const rootClassName = clsx(styles.columnLayoutContainer, className);\n\n const Element = elementType;\n\n const propsContext: PropsContext = {\n Section: {\n hideSeparator: true,\n },\n };\n\n return (\n <div className={rootClassName} style={style}>\n <Element\n ref={ref as never}\n aria-label={ariaLabel}\n className={elementClassName}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Element>\n </div>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default ColumnLayout;\n"],"mappings":";;;;;;;;;;;AA8CA,IAAa,eAAe,cAC1B,iBACC,UAAU;CACT,MAAM,EACJ,UACA,WACA,GACA,GACA,GACA,MAAM,KACN,SAAS,KACT,YAAY,KACZ,cAAc,OACd,cAAc,WACd,KACA,OAAO,mBACL;CAEJ,IAAI,mBAA2B,4BAAO;CAEtC,GAAG,KAAK,GAAG,MAAM;EACf,IAAI,MAAM,MACR,mBAAmB,KACjB,kBACA,eAAe,6BAAQ,UAAU,IAAI,GAAG,CAC1C;CAEJ,CAAC;CACD,GAAG,KAAK,GAAG,MAAM;EACf,IAAI,MAAM,MACR,mBAAmB,KACjB,kBACA,eAAe,6BAAQ,UAAU,IAAI,GAAG,CAC1C;CAEJ,CAAC;CACD,GAAG,KAAK,GAAG,MAAM;EACf,IAAI,MAAM,MACR,mBAAmB,KACjB,kBACA,eAAe,6BAAQ,UAAU,IAAI,GAAG,CAC1C;CAEJ,CAAC;CAED,MAAM,WAAW,WAAW,KAAK,CAAC,CAAC,CAAC;CACpC,MAAM,WAAW,IAAI,WAAW,CAAC,IAAI,IAAI,WAAW,WAAW,CAAC,GAAG,CAAC,CAAC;CACrE,MAAM,WAAW,IACb,WAAW,CAAC,IACZ,KAAK,IACH,WACA,WAAW;EAAC;EAAG;EAAG;CAAC,CAAC;CAE1B,MAAM,QAAuB;EAC3B,GAAG;EACH,8BAA8B;EAC9B,8BAA8B;EAC9B,8BAA8B;EAC9B,4BAA4B,6BAA6B,OAAO;EAChE,+BAA+B,6BAA6B,UAAU;CACxE;CAEA,MAAM,gBAAgB,KAAK,4BAAO,uBAAuB,SAAS;CAUlE,OACE,oBAAC,OAAD;EAAK,WAAW;EAAsB;EACpC,UAAA,oBAAC,aAAD;GACO;GACL,cAAY;GACZ,WAAW;GAEX,UAAA,oBAAC,sBAAD;IAAsB,OAAO,EAZjC,SAAS,EACP,eAAe,KACjB,EAUiC;IAC1B;GACmB,CAAA;EACf,CAAA;CACN,CAAA;AAET,GACA,EACE,MAAM,SACR,CACF"}
1
+ {"version":3,"file":"ColumnLayout.mjs","names":["styles","Element"],"sources":["../../../../../../../src/components/ColumnLayout/ColumnLayout.tsx"],"sourcesContent":["import type { CSSProperties, PropsWithChildren } from \"react\";\nimport styles from \"./ColumnLayout.module.scss\";\nimport { styleClassname } from \"@/lib/scss/selectors\";\nimport { getColumns } from \"./lib/getColumns\";\nimport clsx from \"clsx\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\n\ntype GapSize = \"s\" | \"m\" | \"l\" | \"xl\";\n\nexport interface ColumnLayoutProps<\n T extends keyof HTMLElementTagNameMap = \"div\" | \"ul\",\n>\n extends\n PropsWithChildren,\n PropsWithElementType<T>,\n PropsWithClassName,\n FlowComponentProps<HTMLElementTagNameMap[T]> {\n /** Column layout for container size s. */\n s?: (number | null)[];\n /** Column layout for container size m. */\n m?: (number | null)[];\n /** Column layout for container size l. */\n l?: (number | null)[];\n /**\n * Size of the row and column gap between the content blocks inside the column\n * layout.\n *\n * @default \"m\"\n */\n gap?: GapSize;\n /** Size of the row gap between the content blocks inside the column layout. */\n rowGap?: GapSize;\n /** Size of the column gap between the content blocks inside the column layout. */\n columnGap?: GapSize;\n}\n\n/** @flr-generate all */\nexport const ColumnLayout = flowComponent(\n \"ColumnLayout\",\n (props) => {\n const {\n children,\n className,\n s,\n m,\n l,\n gap = \"m\",\n rowGap = gap,\n columnGap = gap,\n elementType = \"div\",\n \"aria-label\": ariaLabel,\n ref,\n style: styleFromProps,\n } = props;\n\n let elementClassName: string = styles.columnLayout;\n\n s?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(\n elementClassName,\n styleClassname(styles, `hide-s-${i + 1}`),\n );\n }\n });\n m?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(\n elementClassName,\n styleClassname(styles, `hide-m-${i + 1}`),\n );\n }\n });\n l?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(\n elementClassName,\n styleClassname(styles, `hide-l-${i + 1}`),\n );\n }\n });\n\n const columnsS = getColumns(s ?? [1]);\n const columnsM = m ? getColumns(m) : s ? columnsS : getColumns([1, 1]);\n const columnsL = l\n ? getColumns(l)\n : m || s\n ? columnsM\n : getColumns([1, 1, 1]);\n\n const style: CSSProperties = {\n ...styleFromProps,\n \"--column-layout--columns-s\": columnsS,\n \"--column-layout--columns-m\": columnsM,\n \"--column-layout--columns-l\": columnsL,\n \"--column-layout--row-gap\": `var(--column-layout--gap--${rowGap})`,\n \"--column-layout--column-gap\": `var(--column-layout--gap--${columnGap})`,\n };\n\n const rootClassName = clsx(styles.columnLayoutContainer, className);\n\n const Element = elementType;\n\n const propsContext: PropsContext = {\n Section: {\n hideSeparator: true,\n },\n };\n\n return (\n <div className={rootClassName} style={style}>\n <Element\n ref={ref as never}\n aria-label={ariaLabel}\n className={elementClassName}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Element>\n </div>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default ColumnLayout;\n"],"mappings":";;;;;;;;;;;AA8CA,IAAa,eAAe,cAC1B,iBACC,UAAU;CACT,MAAM,EACJ,UACA,WACA,GACA,GACA,GACA,MAAM,KACN,SAAS,KACT,YAAY,KACZ,cAAc,OACd,cAAc,WACd,KACA,OAAO,mBACL;CAEJ,IAAI,mBAA2BA,4BAAO;CAEtC,GAAG,KAAK,GAAG,MAAM;EACf,IAAI,MAAM,MACR,mBAAmB,KACjB,kBACA,eAAeA,6BAAQ,UAAU,IAAI,GAAG,CAC1C;CAEJ,CAAC;CACD,GAAG,KAAK,GAAG,MAAM;EACf,IAAI,MAAM,MACR,mBAAmB,KACjB,kBACA,eAAeA,6BAAQ,UAAU,IAAI,GAAG,CAC1C;CAEJ,CAAC;CACD,GAAG,KAAK,GAAG,MAAM;EACf,IAAI,MAAM,MACR,mBAAmB,KACjB,kBACA,eAAeA,6BAAQ,UAAU,IAAI,GAAG,CAC1C;CAEJ,CAAC;CAED,MAAM,WAAW,WAAW,KAAK,CAAC,CAAC,CAAC;CACpC,MAAM,WAAW,IAAI,WAAW,CAAC,IAAI,IAAI,WAAW,WAAW,CAAC,GAAG,CAAC,CAAC;CACrE,MAAM,WAAW,IACb,WAAW,CAAC,IACZ,KAAK,IACH,WACA,WAAW;EAAC;EAAG;EAAG;CAAC,CAAC;CAE1B,MAAM,QAAuB;EAC3B,GAAG;EACH,8BAA8B;EAC9B,8BAA8B;EAC9B,8BAA8B;EAC9B,4BAA4B,6BAA6B,OAAO;EAChE,+BAA+B,6BAA6B,UAAU;CACxE;CAEA,MAAM,gBAAgB,KAAKA,4BAAO,uBAAuB,SAAS;CAUlE,OACE,oBAAC,OAAD;EAAK,WAAW;EAAsB;EACpC,UAAA,oBAACC,aAAD;GACO;GACL,cAAY;GACZ,WAAW;GAEX,UAAA,oBAAC,sBAAD;IAAsB,OAAO,EAZjC,SAAS,EACP,eAAe,KACjB,EAUiC;IAC1B;GACmB,CAAA;EACf,CAAA;CACN,CAAA;AAET,GACA,EACE,MAAM,SACR,CACF"}
@@ -29,6 +29,7 @@ var CombineImplementation = (props) => {
29
29
  className: Combine_module_default.icon,
30
30
  color: "neutral"
31
31
  },
32
+ Kbd: { className: Combine_module_default.kbd },
32
33
  ContextualHelpTrigger: { Button: {
33
34
  className: Combine_module_default.contextualHelpTriggerButton,
34
35
  color: "secondary"
@@ -1 +1 @@
1
- {"version":3,"file":"Combine.mjs","names":[],"sources":["../../../../../../../src/components/Combine/Combine.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./Combine.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface CombineProps\n extends PropsWithChildren, PropsWithClassName, FlowComponentProps {}\n\n/**\n * The arrangement itself, shared with the deprecated `Align` alias so both\n * names render the exact same output.\n */\nexport const CombineImplementation: FC<CombineProps> = (props) => {\n const { children, className } = props;\n\n const rootClassName = clsx(styles.combine, className);\n\n const propsContext: PropsContext = {\n Text: { className: styles.text },\n Button: { className: styles.button },\n Avatar: { className: styles.avatar, size: \"m\" },\n CopyButton: { size: \"s\", className: styles.copyButton },\n Icon: { size: \"s\", className: styles.icon, color: \"neutral\" },\n ContextualHelpTrigger: {\n Button: {\n className: styles.contextualHelpTriggerButton,\n color: \"secondary\",\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <div className={rootClassName}>{children}</div>\n </PropsContextProvider>\n );\n};\n\n/**\n * @flowStatus new\n * @flr-generate all\n */\nexport const Combine = flowComponent(\"Combine\", CombineImplementation, {\n type: \"layout\",\n});\n\nexport default Combine;\n"],"mappings":";;;;;;;;;;;;AAgBA,IAAa,yBAA2C,UAAU;CAChE,MAAM,EAAE,UAAU,cAAc;CAEhC,MAAM,gBAAgB,KAAK,uBAAO,SAAS,SAAS;CAEpD,MAAM,eAA6B;EACjC,MAAM,EAAE,WAAW,uBAAO,KAAK;EAC/B,QAAQ,EAAE,WAAW,uBAAO,OAAO;EACnC,QAAQ;GAAE,WAAW,uBAAO;GAAQ,MAAM;EAAI;EAC9C,YAAY;GAAE,MAAM;GAAK,WAAW,uBAAO;EAAW;EACtD,MAAM;GAAE,MAAM;GAAK,WAAW,uBAAO;GAAM,OAAO;EAAU;EAC5D,uBAAuB,EACrB,QAAQ;GACN,WAAW,uBAAO;GAClB,OAAO;EACT,EACF;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,oBAAC,OAAD;GAAK,WAAW;GAAgB;EAAc,CAAA;CAC1B,CAAA;AAE1B;;;;;AAMA,IAAa,UAAU,cAAc,WAAW,uBAAuB,EACrE,MAAM,SACR,CAAC"}
1
+ {"version":3,"file":"Combine.mjs","names":["styles"],"sources":["../../../../../../../src/components/Combine/Combine.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./Combine.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface CombineProps\n extends PropsWithChildren, PropsWithClassName, FlowComponentProps {}\n\n/**\n * The arrangement itself, shared with the deprecated `Align` alias so both\n * names render the exact same output.\n */\nexport const CombineImplementation: FC<CombineProps> = (props) => {\n const { children, className } = props;\n\n const rootClassName = clsx(styles.combine, className);\n\n const propsContext: PropsContext = {\n Text: { className: styles.text },\n Button: { className: styles.button },\n Avatar: { className: styles.avatar, size: \"m\" },\n CopyButton: { size: \"s\", className: styles.copyButton },\n Icon: { size: \"s\", className: styles.icon, color: \"neutral\" },\n Kbd: { className: styles.kbd },\n ContextualHelpTrigger: {\n Button: {\n className: styles.contextualHelpTriggerButton,\n color: \"secondary\",\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <div className={rootClassName}>{children}</div>\n </PropsContextProvider>\n );\n};\n\n/**\n * @flowStatus new\n * @flr-generate all\n */\nexport const Combine = flowComponent(\"Combine\", CombineImplementation, {\n type: \"layout\",\n});\n\nexport default Combine;\n"],"mappings":";;;;;;;;;;;;AAgBA,IAAa,yBAA2C,UAAU;CAChE,MAAM,EAAE,UAAU,cAAc;CAEhC,MAAM,gBAAgB,KAAKA,uBAAO,SAAS,SAAS;CAEpD,MAAM,eAA6B;EACjC,MAAM,EAAE,WAAWA,uBAAO,KAAK;EAC/B,QAAQ,EAAE,WAAWA,uBAAO,OAAO;EACnC,QAAQ;GAAE,WAAWA,uBAAO;GAAQ,MAAM;EAAI;EAC9C,YAAY;GAAE,MAAM;GAAK,WAAWA,uBAAO;EAAW;EACtD,MAAM;GAAE,MAAM;GAAK,WAAWA,uBAAO;GAAM,OAAO;EAAU;EAC5D,KAAK,EAAE,WAAWA,uBAAO,IAAI;EAC7B,uBAAuB,EACrB,QAAQ;GACN,WAAWA,uBAAO;GAClB,OAAO;EACT,EACF;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,oBAAC,OAAD;GAAK,WAAW;GAAgB;EAAc,CAAA;CAC1B,CAAA;AAE1B;;;;;AAMA,IAAa,UAAU,cAAc,WAAW,uBAAuB,EACrE,MAAM,SACR,CAAC"}
@@ -8,6 +8,7 @@ var button = "flow--combine--button";
8
8
  var contextualHelpTriggerButton = "flow--combine--contextual-help-trigger-button";
9
9
  var copyButton = "flow--combine--copy-button";
10
10
  var icon = "flow--combine--icon";
11
+ var kbd = "flow--combine--kbd";
11
12
  var Combine_module_default = {
12
13
  combine,
13
14
  avatar,
@@ -15,9 +16,10 @@ var Combine_module_default = {
15
16
  button,
16
17
  contextualHelpTriggerButton,
17
18
  copyButton,
18
- icon
19
+ icon,
20
+ kbd
19
21
  };
20
22
  //#endregion
21
- export { avatar, button, combine, contextualHelpTriggerButton, copyButton, Combine_module_default as default, icon, text };
23
+ export { avatar, button, combine, contextualHelpTriggerButton, copyButton, Combine_module_default as default, icon, kbd, text };
22
24
 
23
25
  //# sourceMappingURL=Combine.module.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Combine.module.mjs","names":[],"sources":["../../../../../../../src/components/Combine/Combine.module.scss"],"sourcesContent":[".combine {\n &:has(.avatar):has(.text) {\n display: flex;\n gap: var(--combine--avatar-text--spacing);\n height: fit-content;\n\n --first-two-lines-height: calc(var(--line-height-s) * 2);\n\n min-height: var(--first-two-lines-height);\n\n .text {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n align-self: center;\n font-size: var(--font-size-text--s);\n }\n\n .avatar {\n margin-top: calc(\n (var(--first-two-lines-height) - var(--avatar--size--m)) / 2\n );\n }\n }\n\n &:has(:global(.flow--form-field)):has(.button) {\n display: flex;\n align-items: flex-start;\n column-gap: var(--combine--input-button--spacing);\n\n :global(.flow--form-field) {\n flex-grow: 1;\n }\n\n // `<label>` is also the root element react-aria renders for Checkbox and\n // Switch, so `Label`'s class would not match the same set of children.\n // stylelint-disable-next-line selector-max-type -- see above\n &:has(label) {\n .button {\n margin-top: calc(var(--line-height-s) + var(--form-control--spacing-y));\n }\n }\n }\n\n &:has(.text):has(.contextualHelpTriggerButton),\n &:has(.text):has(.copyButton) {\n display: inline-flex;\n align-items: center;\n column-gap: var(--combine--text-button--spacing);\n }\n\n &:has(> .text):has(> .icon) {\n display: inline-flex;\n align-items: center;\n column-gap: var(--combine--icon-text--spacing);\n }\n}\n\n@media (max-width: 550px) {\n .combine:has(:global(.flow--form-field)):has(.button) {\n flex-direction: column;\n row-gap: var(--section--spacing);\n align-items: stretch;\n\n .button {\n width: 100%;\n }\n\n // stylelint-disable-next-line selector-max-type -- see the `:has(label)` above\n &:has(label) {\n .button {\n margin-top: 0;\n }\n }\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"Combine.module.mjs","names":[],"sources":["../../../../../../../src/components/Combine/Combine.module.scss"],"sourcesContent":[".combine {\n &:has(.avatar):has(.text) {\n display: flex;\n gap: var(--combine--avatar-text--spacing);\n height: fit-content;\n\n --first-two-lines-height: calc(var(--line-height-s) * 2);\n\n min-height: var(--first-two-lines-height);\n\n .text {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n align-self: center;\n font-size: var(--font-size-text--s);\n }\n\n .avatar {\n margin-top: calc(\n (var(--first-two-lines-height) - var(--avatar--size--m)) / 2\n );\n }\n }\n\n &:has(:global(.flow--form-field)):has(.button) {\n display: flex;\n align-items: flex-start;\n column-gap: var(--combine--input-button--spacing);\n\n :global(.flow--form-field) {\n flex-grow: 1;\n }\n\n // `<label>` is also the root element react-aria renders for Checkbox and\n // Switch, so `Label`'s class would not match the same set of children.\n // stylelint-disable-next-line selector-max-type -- see above\n &:has(label) {\n .button {\n margin-top: calc(var(--line-height-s) + var(--form-control--spacing-y));\n }\n }\n }\n\n &:has(.text):has(.contextualHelpTriggerButton),\n &:has(.text):has(.copyButton) {\n display: inline-flex;\n align-items: center;\n column-gap: var(--combine--text-button--spacing);\n }\n\n &:has(> .text):has(> .icon) {\n display: inline-flex;\n align-items: center;\n column-gap: var(--combine--icon-text--spacing);\n }\n\n // Margins instead of a gap: keys sit closer to each other than to the text,\n // e.g. \"↑ ↓ Select\" in one Combine.\n &:has(> .kbd) {\n display: inline-flex;\n align-items: center;\n\n > .kbd + .kbd {\n margin-inline-start: var(--combine--kbd-kbd--spacing);\n }\n\n > .kbd + .text,\n > .text + .kbd {\n margin-inline-start: var(--combine--kbd-text--spacing);\n }\n }\n}\n\n@media (max-width: 550px) {\n .combine:has(:global(.flow--form-field)):has(.button) {\n flex-direction: column;\n row-gap: var(--section--spacing);\n align-items: stretch;\n\n .button {\n width: 100%;\n }\n\n // stylelint-disable-next-line selector-max-type -- see the `:has(label)` above\n &:has(label) {\n .button {\n margin-top: 0;\n }\n }\n }\n}\n"],"mappings":""}
@@ -20,9 +20,9 @@ import * as Aria from "react-aria-components";
20
20
  /** @flr-generate all */
21
21
  var ComboBox = flowComponent("ComboBox", (props) => {
22
22
  const { children, className, menuTrigger = "focus", onChange, onSelectionChange, placeholder, ref, renderEmptyState, ...rest } = props;
23
- const { FieldErrorView, FieldErrorCaptureContext, fieldProps, fieldPropsContext } = useFieldComponent(props, "ComboBox");
23
+ const { FieldErrorView, FieldErrorCaptureContext, wrapperProps, controlProps, fieldPropsContext } = useFieldComponent(props, "ComboBox");
24
24
  const stringFormatter = useLocalizedStringFormatter(__locale_default, "ComboBox");
25
- const rootClassName = clsx(fieldProps.className, ComboBox_module_default.comboBox, className);
25
+ const rootClassName = clsx(wrapperProps.className, ComboBox_module_default.comboBox, className);
26
26
  const propsContext = {
27
27
  Option: { tunnel: getOptionsTunnelProps("ComboBox") },
28
28
  ...fieldPropsContext
@@ -34,10 +34,10 @@ var ComboBox = flowComponent("ComboBox", (props) => {
34
34
  };
35
35
  const controller = useOverlayController("ComboBox", { reuseControllerFromContext: false });
36
36
  return /* @__PURE__ */ jsx(Aria.ComboBox, {
37
- ...fieldProps,
38
37
  menuTrigger,
39
38
  className: rootClassName,
40
39
  ...rest,
40
+ ...controlProps,
41
41
  onSelectionChange: handleSelectionChange,
42
42
  onOpenChange: (isOpen) => {
43
43
  controller.setOpen(isOpen);
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.mjs","names":[],"sources":["../../../../../../../src/components/ComboBox/ComboBox.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport type { Key } from \"react-aria-components\";\nimport * as Aria from \"react-aria-components\";\nimport { Button } from \"@/components/Button\";\nimport { IconChevronDown } from \"@/components/Icon/components/icons\";\nimport { Options } from \"@/components/Options\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport styles from \"./ComboBox.module.scss\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { getOptionsTunnelProps } from \"@/components/Option/optionsTunnel\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport type { OptionsProps } from \"@/components/Options/Options\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface ComboBoxProps\n extends\n Omit<Aria.ComboBoxProps<never>, \"children\" | \"onChange\">,\n Pick<Aria.InputProps, \"placeholder\">,\n Pick<OptionsProps, \"renderEmptyState\">,\n PropsWithChildren,\n FlowComponentProps<HTMLInputElement> {\n /** Called with the key of the selected option whenever the selection changes. */\n onChange?: (value: string) => void;\n}\n\n/** @flr-generate all */\nexport const ComboBox = flowComponent(\"ComboBox\", (props) => {\n const {\n children,\n className,\n menuTrigger = \"focus\",\n onChange,\n onSelectionChange,\n placeholder,\n ref,\n renderEmptyState,\n ...rest\n } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"ComboBox\");\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"ComboBox\");\n\n const rootClassName = clsx(fieldProps.className, styles.comboBox, className);\n\n const propsContext: PropsContext = {\n Option: {\n tunnel: getOptionsTunnelProps(\"ComboBox\"),\n },\n ...fieldPropsContext,\n };\n\n const handleSelectionChange = (key: Key | null) => {\n if (key === null) {\n return;\n }\n onChange?.(String(key));\n onSelectionChange?.(key);\n };\n\n const controller = useOverlayController(\"ComboBox\", {\n reuseControllerFromContext: false,\n });\n\n return (\n <Aria.ComboBox\n {...fieldProps}\n menuTrigger={menuTrigger}\n className={rootClassName}\n {...rest}\n onSelectionChange={handleSelectionChange}\n onOpenChange={(isOpen) => {\n controller.setOpen(isOpen);\n }}\n >\n <PropsContextProvider props={propsContext}>\n <FieldErrorCaptureContext>\n <div className={styles.input}>\n <Aria.Input placeholder={placeholder} ref={ref} />\n <Button\n className={styles.toggle}\n aria-label={stringFormatter.format(\"showOptions\")}\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconChevronDown />\n </Button>\n </div>\n\n {children}\n\n <Options\n controller={controller}\n onOpenChange={() => {\n // cut-off to avoid double controller state changes\n }}\n renderEmptyState={renderEmptyState}\n >\n <UiComponentTunnelExit id=\"options\" component=\"ComboBox\" />\n </Options>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.ComboBox>\n );\n});\n\nexport default ComboBox;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgCA,IAAa,WAAW,cAAc,aAAa,UAAU;CAC3D,MAAM,EACJ,UACA,WACA,cAAc,SACd,UACA,mBACA,aACA,KACA,kBACA,GAAG,SACD;CAEJ,MAAM,EACJ,gBACA,0BACA,YACA,sBACE,kBAAkB,OAAO,UAAU;CAEvC,MAAM,kBAAkB,4BAA4B,kBAAS,UAAU;CAEvE,MAAM,gBAAgB,KAAK,WAAW,WAAW,wBAAO,UAAU,SAAS;CAE3E,MAAM,eAA6B;EACjC,QAAQ,EACN,QAAQ,sBAAsB,UAAU,EAC1C;EACA,GAAG;CACL;CAEA,MAAM,yBAAyB,QAAoB;EACjD,IAAI,QAAQ,MACV;EAEF,WAAW,OAAO,GAAG,CAAC;EACtB,oBAAoB,GAAG;CACzB;CAEA,MAAM,aAAa,qBAAqB,YAAY,EAClD,4BAA4B,MAC9B,CAAC;CAED,OACE,oBAAC,KAAK,UAAN;EACE,GAAI;EACS;EACb,WAAW;EACX,GAAI;EACJ,mBAAmB;EACnB,eAAe,WAAW;GACxB,WAAW,QAAQ,MAAM;EAC3B;EAEA,UAAA,qBAAC,sBAAD;GAAsB,OAAO;GAA7B,UAAA,CACE,qBAAC,0BAAD,EAAA,UAAA;IACE,qBAAC,OAAD;KAAK,WAAW,wBAAO;KAAvB,UAAA,CACE,oBAAC,KAAK,OAAN;MAAyB;MAAkB;KAAM,CAAA,GACjD,oBAAC,QAAD;MACE,WAAW,wBAAO;MAClB,cAAY,gBAAgB,OAAO,aAAa;MAChD,SAAQ;MACR,OAAM;MAEN,UAAA,oBAAC,iBAAD,CAAkB,CAAA;KACZ,CAAA,CACL;;IAEJ;IAED,oBAAC,SAAD;KACc;KACZ,oBAAoB,CAEpB;KACkB;KAElB,UAAA,oBAAC,uBAAD;MAAuB,IAAG;MAAU,WAAU;KAAY,CAAA;IACnD,CAAA;GACe,EAAA,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACG;;CACT,CAAA;AAEnB,CAAC"}
1
+ {"version":3,"file":"ComboBox.mjs","names":["locales","styles"],"sources":["../../../../../../../src/components/ComboBox/ComboBox.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport type { Key } from \"react-aria-components\";\nimport * as Aria from \"react-aria-components\";\nimport { Button } from \"@/components/Button\";\nimport { IconChevronDown } from \"@/components/Icon/components/icons\";\nimport { Options } from \"@/components/Options\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport styles from \"./ComboBox.module.scss\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { getOptionsTunnelProps } from \"@/components/Option/optionsTunnel\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport type { OptionsProps } from \"@/components/Options/Options\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface ComboBoxProps\n extends\n Omit<Aria.ComboBoxProps<never>, \"children\" | \"onChange\">,\n Pick<Aria.InputProps, \"placeholder\">,\n Pick<OptionsProps, \"renderEmptyState\">,\n PropsWithChildren,\n FlowComponentProps<HTMLInputElement> {\n /** Called with the key of the selected option whenever the selection changes. */\n onChange?: (value: string) => void;\n}\n\n/** @flr-generate all */\nexport const ComboBox = flowComponent(\"ComboBox\", (props) => {\n const {\n children,\n className,\n menuTrigger = \"focus\",\n onChange,\n onSelectionChange,\n placeholder,\n ref,\n renderEmptyState,\n ...rest\n } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n wrapperProps,\n controlProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"ComboBox\");\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"ComboBox\");\n\n const rootClassName = clsx(\n wrapperProps.className,\n styles.comboBox,\n className,\n );\n\n const propsContext: PropsContext = {\n Option: {\n tunnel: getOptionsTunnelProps(\"ComboBox\"),\n },\n ...fieldPropsContext,\n };\n\n const handleSelectionChange = (key: Key | null) => {\n if (key === null) {\n return;\n }\n onChange?.(String(key));\n onSelectionChange?.(key);\n };\n\n const controller = useOverlayController(\"ComboBox\", {\n reuseControllerFromContext: false,\n });\n\n return (\n <Aria.ComboBox\n menuTrigger={menuTrigger}\n className={rootClassName}\n {...rest}\n {...controlProps}\n onSelectionChange={handleSelectionChange}\n onOpenChange={(isOpen) => {\n controller.setOpen(isOpen);\n }}\n >\n <PropsContextProvider props={propsContext}>\n <FieldErrorCaptureContext>\n <div className={styles.input}>\n <Aria.Input placeholder={placeholder} ref={ref} />\n <Button\n className={styles.toggle}\n aria-label={stringFormatter.format(\"showOptions\")}\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconChevronDown />\n </Button>\n </div>\n\n {children}\n\n <Options\n controller={controller}\n onOpenChange={() => {\n // cut-off to avoid double controller state changes\n }}\n renderEmptyState={renderEmptyState}\n >\n <UiComponentTunnelExit id=\"options\" component=\"ComboBox\" />\n </Options>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.ComboBox>\n );\n});\n\nexport default ComboBox;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgCA,IAAa,WAAW,cAAc,aAAa,UAAU;CAC3D,MAAM,EACJ,UACA,WACA,cAAc,SACd,UACA,mBACA,aACA,KACA,kBACA,GAAG,SACD;CAEJ,MAAM,EACJ,gBACA,0BACA,cACA,cACA,sBACE,kBAAkB,OAAO,UAAU;CAEvC,MAAM,kBAAkB,4BAA4BA,kBAAS,UAAU;CAEvE,MAAM,gBAAgB,KACpB,aAAa,WACbC,wBAAO,UACP,SACF;CAEA,MAAM,eAA6B;EACjC,QAAQ,EACN,QAAQ,sBAAsB,UAAU,EAC1C;EACA,GAAG;CACL;CAEA,MAAM,yBAAyB,QAAoB;EACjD,IAAI,QAAQ,MACV;EAEF,WAAW,OAAO,GAAG,CAAC;EACtB,oBAAoB,GAAG;CACzB;CAEA,MAAM,aAAa,qBAAqB,YAAY,EAClD,4BAA4B,MAC9B,CAAC;CAED,OACE,oBAAC,KAAK,UAAN;EACe;EACb,WAAW;EACX,GAAI;EACJ,GAAI;EACJ,mBAAmB;EACnB,eAAe,WAAW;GACxB,WAAW,QAAQ,MAAM;EAC3B;EAEA,UAAA,qBAAC,sBAAD;GAAsB,OAAO;GAA7B,UAAA,CACE,qBAAC,0BAAD,EAAA,UAAA;IACE,qBAAC,OAAD;KAAK,WAAWA,wBAAO;KAAvB,UAAA,CACE,oBAAC,KAAK,OAAN;MAAyB;MAAkB;KAAM,CAAA,GACjD,oBAAC,QAAD;MACE,WAAWA,wBAAO;MAClB,cAAY,gBAAgB,OAAO,aAAa;MAChD,SAAQ;MACR,OAAM;MAEN,UAAA,oBAAC,iBAAD,CAAkB,CAAA;KACZ,CAAA,CACL;;IAEJ;IAED,oBAAC,SAAD;KACc;KACZ,oBAAoB,CAEpB;KACkB;KAElB,UAAA,oBAAC,uBAAD;MAAuB,IAAG;MAAU,WAAU;KAAY,CAAA;IACnD,CAAA;GACe,EAAA,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACG;;CACT,CAAA;AAEnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Content.mjs","names":[],"sources":["../../../../../../../src/components/Content/Content.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type { PropsWithElementType } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface ContentProps\n extends\n PropsWithChildren,\n PropsWithElementType<\"div\" | \"section\" | \"span\">,\n FlowComponentProps {\n /** @internal */\n slot?: string;\n}\n\n/** @flr-generate all */\nexport const Content = flowComponent(\"Content\", (props) => {\n const { children, elementType = \"div\", ref, ...rest } = props;\n\n const Element = elementType;\n\n return (\n <Element ref={ref} {...rest}>\n {children}\n </Element>\n );\n});\n\nexport default Content;\n"],"mappings":";;;;;;AAeA,IAAa,UAAU,cAAc,YAAY,UAAU;CACzD,MAAM,EAAE,UAAU,cAAc,OAAO,KAAK,GAAG,SAAS;CAIxD,OACE,oBAAC,aAAD;EAAc;EAAK,GAAI;EACpB;CACM,CAAA;AAEb,CAAC"}
1
+ {"version":3,"file":"Content.mjs","names":["Element"],"sources":["../../../../../../../src/components/Content/Content.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type { PropsWithElementType } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface ContentProps\n extends\n PropsWithChildren,\n PropsWithElementType<\"div\" | \"section\" | \"span\">,\n FlowComponentProps {\n /** @internal */\n slot?: string;\n}\n\n/** @flr-generate all */\nexport const Content = flowComponent(\"Content\", (props) => {\n const { children, elementType = \"div\", ref, ...rest } = props;\n\n const Element = elementType;\n\n return (\n <Element ref={ref} {...rest}>\n {children}\n </Element>\n );\n});\n\nexport default Content;\n"],"mappings":";;;;;;AAeA,IAAa,UAAU,cAAc,YAAY,UAAU;CACzD,MAAM,EAAE,UAAU,cAAc,OAAO,KAAK,GAAG,SAAS;CAIxD,OACE,oBAACA,aAAD;EAAc;EAAK,GAAI;EACpB;CACM,CAAA;AAEb,CAAC"}
@@ -15,7 +15,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
15
15
  //#region src/components/ContextMenu/ContextMenu.tsx
16
16
  /** @flr-generate all */
17
17
  var ContextMenu = flowComponent("ContextMenu", (props) => {
18
- const { children, onAction, selectionMode, selectedKeys, defaultSelectedKeys, disabledKeys, onSelectionChange, renderEmptyState, showSelectAll, ref, controller: overlayControllerFromProps, ...rest } = props;
18
+ const { children, onAction, selectionMode, selectedKeys, defaultSelectedKeys, disabledKeys, onSelectionChange, renderEmptyState, showSelectAll, ref, controller: overlayControllerFromProps, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-details": ariaDetails, ...rest } = props;
19
19
  const overlayControllerFromContext = useOverlayController("ContextMenu", { reuseControllerFromContext: true });
20
20
  const overlayController = overlayControllerFromProps ?? overlayControllerFromContext;
21
21
  const selectionVariant = getMenuItemSelectionVariant(selectionMode);
@@ -50,6 +50,10 @@ var ContextMenu = flowComponent("ContextMenu", (props) => {
50
50
  disabledKeys,
51
51
  onSelectionChange,
52
52
  renderEmptyState,
53
+ "aria-label": ariaLabel,
54
+ "aria-labelledby": ariaLabelledBy,
55
+ "aria-describedby": ariaDescribedBy,
56
+ "aria-details": ariaDetails,
53
57
  ref,
54
58
  children: [selectAll, /* @__PURE__ */ jsx(PropsContextProvider, {
55
59
  props: propsContext,
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.mjs","names":[],"sources":["../../../../../../../src/components/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import { Action } from \"@/components/Action\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n closesOnSelect,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\nimport { Popover, type PopoverProps } from \"@/components/Popover/Popover\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport { OverlayContextProvider } from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport ContextMenuContentView from \"@/views/ContextMenuContentView\";\nimport type * as Aria from \"react-aria-components\";\nimport styles from \"./ContextMenu.module.scss\";\nimport { OverlayContentSuspendWatcher } from \"@/lib/controller/overlay/OverlayContentSuspendWatcher\";\nimport { ContextMenuSelectAll } from \"@/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll\";\n\nexport interface ContextMenuProps\n extends\n Omit<PopoverProps, \"withTip\" | \"modality\">,\n Pick<\n Aria.MenuProps<MenuItemProps>,\n | \"onAction\"\n | \"selectedKeys\"\n | \"defaultSelectedKeys\"\n | \"onSelectionChange\"\n | \"disabledKeys\"\n | \"renderEmptyState\"\n >,\n FlowComponentProps {\n /** The type of selection that is allowed in the context menu. */\n selectionMode?: ContextMenuSelectionMode;\n /** Sets the context menu to a fixed width. */\n width?: string | number;\n /**\n * Adds a first entry that selects or deselects all items at once. Only\n * applies to `selectionMode=\"multiple\"`.\n */\n showSelectAll?: boolean;\n}\n\n/** @flr-generate all */\nexport const ContextMenu = flowComponent(\"ContextMenu\", (props) => {\n const {\n children,\n onAction,\n selectionMode,\n selectedKeys,\n defaultSelectedKeys,\n disabledKeys,\n onSelectionChange,\n renderEmptyState,\n showSelectAll,\n ref,\n controller: overlayControllerFromProps,\n ...rest\n } = props;\n\n const overlayControllerFromContext = useOverlayController(\"ContextMenu\", {\n reuseControllerFromContext: true,\n });\n\n const overlayController =\n overlayControllerFromProps ?? overlayControllerFromContext;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const selectAll = showSelectAll && selectionMode === \"multiple\" && (\n <ContextMenuSelectAll />\n );\n\n const propsContext: PropsContext = {\n MenuItem: {\n selectionVariant,\n Avatar: {\n size: \"l\",\n },\n },\n\n Section: {\n MenuItem: {\n Avatar: {\n size: \"l\",\n },\n },\n renderContextMenuSection: true,\n },\n\n ContextMenuSection: {\n MenuItem: {\n Avatar: {\n size: \"l\",\n },\n },\n },\n };\n\n return (\n <OverlayContentSuspendWatcher overlayController={overlayController}>\n <Popover\n {...rest}\n className={styles.popover}\n controller={overlayController}\n isDialogContent={false}\n >\n <OverlayContextProvider\n type=\"ContextMenu\"\n controller={overlayController}\n >\n <ContextMenuContentView\n className={styles.contextMenu}\n onAction={onAction}\n selectionMode={getAriaSelectionMode(selectionMode)}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n disabledKeys={disabledKeys}\n onSelectionChange={onSelectionChange}\n renderEmptyState={renderEmptyState}\n ref={ref}\n >\n {selectAll}\n <PropsContextProvider props={propsContext}>\n <Action closeOverlay={closesOnSelect(selectionMode)}>\n {children}\n </Action>\n </PropsContextProvider>\n </ContextMenuContentView>\n </OverlayContextProvider>\n </Popover>\n </OverlayContentSuspendWatcher>\n );\n});\n\nexport default ContextMenu;\n"],"mappings":";;;;;;;;;;;;;;;;AA8CA,IAAa,cAAc,cAAc,gBAAgB,UAAU;CACjE,MAAM,EACJ,UACA,UACA,eACA,cACA,qBACA,cACA,mBACA,kBACA,eACA,KACA,YAAY,4BACZ,GAAG,SACD;CAEJ,MAAM,+BAA+B,qBAAqB,eAAe,EACvE,4BAA4B,KAC9B,CAAC;CAED,MAAM,oBACJ,8BAA8B;CAEhC,MAAM,mBAAmB,4BAA4B,aAAa;CAElE,MAAM,YAAY,iBAAiB,kBAAkB,cACnD,oBAAC,sBAAD,CAAuB,CAAA;CAGzB,MAAM,eAA6B;EACjC,UAAU;GACR;GACA,QAAQ,EACN,MAAM,IACR;EACF;EAEA,SAAS;GACP,UAAU,EACR,QAAQ,EACN,MAAM,IACR,EACF;GACA,0BAA0B;EAC5B;EAEA,oBAAoB,EAClB,UAAU,EACR,QAAQ,EACN,MAAM,IACR,EACF,EACF;CACF;CAEA,OACE,oBAAC,8BAAD;EAAiD;EAC/C,UAAA,oBAAC,SAAD;GACE,GAAI;GACJ,WAAW,2BAAO;GAClB,YAAY;GACZ,iBAAiB;GAEjB,UAAA,oBAAC,wBAAD;IACE,MAAK;IACL,YAAY;IAEZ,UAAA,qBAAC,wBAAD;KACE,WAAW,2BAAO;KACR;KACV,eAAe,qBAAqB,aAAa;KACnC;KACO;KACP;KACK;KACD;KACb;KATP,UAAA,CAWG,WACD,oBAAC,sBAAD;MAAsB,OAAO;MAC3B,UAAA,oBAAC,QAAD;OAAQ,cAAc,eAAe,aAAa;OAC/C;MACK,CAAA;KACY,CAAA,CACA;;GACF,CAAA;EACjB,CAAA;CACmB,CAAA;AAElC,CAAC"}
1
+ {"version":3,"file":"ContextMenu.mjs","names":["styles"],"sources":["../../../../../../../src/components/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import { Action } from \"@/components/Action\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n closesOnSelect,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\nimport { Popover, type PopoverProps } from \"@/components/Popover/Popover\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport { OverlayContextProvider } from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport ContextMenuContentView from \"@/views/ContextMenuContentView\";\nimport type * as Aria from \"react-aria-components\";\nimport styles from \"./ContextMenu.module.scss\";\nimport { OverlayContentSuspendWatcher } from \"@/lib/controller/overlay/OverlayContentSuspendWatcher\";\nimport { ContextMenuSelectAll } from \"@/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll\";\n\nexport interface ContextMenuProps\n extends\n Omit<PopoverProps, \"withTip\" | \"modality\">,\n Pick<\n Aria.MenuProps<MenuItemProps>,\n | \"onAction\"\n | \"selectedKeys\"\n | \"defaultSelectedKeys\"\n | \"onSelectionChange\"\n | \"disabledKeys\"\n | \"renderEmptyState\"\n >,\n FlowComponentProps {\n /** The type of selection that is allowed in the context menu. */\n selectionMode?: ContextMenuSelectionMode;\n /** Sets the context menu to a fixed width. */\n width?: string | number;\n /**\n * Adds a first entry that selects or deselects all items at once. Only\n * applies to `selectionMode=\"multiple\"`.\n */\n showSelectAll?: boolean;\n}\n\n/** @flr-generate all */\nexport const ContextMenu = flowComponent(\"ContextMenu\", (props) => {\n const {\n children,\n onAction,\n selectionMode,\n selectedKeys,\n defaultSelectedKeys,\n disabledKeys,\n onSelectionChange,\n renderEmptyState,\n showSelectAll,\n ref,\n controller: overlayControllerFromProps,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-details\": ariaDetails,\n ...rest\n } = props;\n\n const overlayControllerFromContext = useOverlayController(\"ContextMenu\", {\n reuseControllerFromContext: true,\n });\n\n const overlayController =\n overlayControllerFromProps ?? overlayControllerFromContext;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const selectAll = showSelectAll && selectionMode === \"multiple\" && (\n <ContextMenuSelectAll />\n );\n\n const propsContext: PropsContext = {\n MenuItem: {\n selectionVariant,\n Avatar: {\n size: \"l\",\n },\n },\n\n Section: {\n MenuItem: {\n Avatar: {\n size: \"l\",\n },\n },\n renderContextMenuSection: true,\n },\n\n ContextMenuSection: {\n MenuItem: {\n Avatar: {\n size: \"l\",\n },\n },\n },\n };\n\n return (\n <OverlayContentSuspendWatcher overlayController={overlayController}>\n <Popover\n {...rest}\n className={styles.popover}\n controller={overlayController}\n isDialogContent={false}\n >\n <OverlayContextProvider\n type=\"ContextMenu\"\n controller={overlayController}\n >\n <ContextMenuContentView\n className={styles.contextMenu}\n onAction={onAction}\n selectionMode={getAriaSelectionMode(selectionMode)}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n disabledKeys={disabledKeys}\n onSelectionChange={onSelectionChange}\n renderEmptyState={renderEmptyState}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedBy}\n aria-details={ariaDetails}\n ref={ref}\n >\n {selectAll}\n <PropsContextProvider props={propsContext}>\n <Action closeOverlay={closesOnSelect(selectionMode)}>\n {children}\n </Action>\n </PropsContextProvider>\n </ContextMenuContentView>\n </OverlayContextProvider>\n </Popover>\n </OverlayContentSuspendWatcher>\n );\n});\n\nexport default ContextMenu;\n"],"mappings":";;;;;;;;;;;;;;;;AA8CA,IAAa,cAAc,cAAc,gBAAgB,UAAU;CACjE,MAAM,EACJ,UACA,UACA,eACA,cACA,qBACA,cACA,mBACA,kBACA,eACA,KACA,YAAY,4BACZ,cAAc,WACd,mBAAmB,gBACnB,oBAAoB,iBACpB,gBAAgB,aAChB,GAAG,SACD;CAEJ,MAAM,+BAA+B,qBAAqB,eAAe,EACvE,4BAA4B,KAC9B,CAAC;CAED,MAAM,oBACJ,8BAA8B;CAEhC,MAAM,mBAAmB,4BAA4B,aAAa;CAElE,MAAM,YAAY,iBAAiB,kBAAkB,cACnD,oBAAC,sBAAD,CAAuB,CAAA;CAGzB,MAAM,eAA6B;EACjC,UAAU;GACR;GACA,QAAQ,EACN,MAAM,IACR;EACF;EAEA,SAAS;GACP,UAAU,EACR,QAAQ,EACN,MAAM,IACR,EACF;GACA,0BAA0B;EAC5B;EAEA,oBAAoB,EAClB,UAAU,EACR,QAAQ,EACN,MAAM,IACR,EACF,EACF;CACF;CAEA,OACE,oBAAC,8BAAD;EAAiD;EAC/C,UAAA,oBAAC,SAAD;GACE,GAAI;GACJ,WAAWA,2BAAO;GAClB,YAAY;GACZ,iBAAiB;GAEjB,UAAA,oBAAC,wBAAD;IACE,MAAK;IACL,YAAY;IAEZ,UAAA,qBAAC,wBAAD;KACE,WAAWA,2BAAO;KACR;KACV,eAAe,qBAAqB,aAAa;KACnC;KACO;KACP;KACK;KACD;KAClB,cAAY;KACZ,mBAAiB;KACjB,oBAAkB;KAClB,gBAAc;KACT;KAbP,UAAA,CAeG,WACD,oBAAC,sBAAD;MAAsB,OAAO;MAC3B,UAAA,oBAAC,QAAD;OAAQ,cAAc,eAAe,aAAa;OAC/C;MACK,CAAA;KACY,CAAA,CACA;;GACF,CAAA;EACjB,CAAA;CACmB,CAAA;AAElC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuSection.mjs","names":[],"sources":["../../../../../../../../../src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { PropsWithChildren } from \"react\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport styles from \"../../ContextMenu.module.scss\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n closesOnSelect,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport { Action } from \"@/components/Action\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\n\nexport type ContextMenuSectionProps = PropsWithChildren &\n FlowComponentProps &\n Pick<\n Aria.MenuSectionProps<MenuItemProps>,\n \"defaultSelectedKeys\" | \"selectedKeys\"\n > & {\n selectionMode?: ContextMenuSelectionMode;\n };\n\n/** @flr-generate all */\nexport const ContextMenuSection = flowComponent(\n \"ContextMenuSection\",\n (props) => {\n const { children, selectionMode, ref, ...rest } = props;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const propsContext: PropsContext = {\n Heading: {\n level: 5,\n wrapWith: <Aria.Header />,\n },\n MenuItem: {\n selectionVariant,\n },\n };\n\n return (\n <Aria.MenuSection\n ref={ref}\n {...rest}\n selectionMode={getAriaSelectionMode(selectionMode)}\n className={styles.section}\n >\n <PropsContextProvider props={propsContext}>\n <Action skip>\n <Action closeOverlay={closesOnSelect(selectionMode)}>\n {children}\n </Action>\n </Action>\n </PropsContextProvider>\n </Aria.MenuSection>\n );\n },\n { type: \"layout\" },\n);\n\nexport default ContextMenuSection;\n"],"mappings":";;;;;;;;;;;AA0BA,IAAa,qBAAqB,cAChC,uBACC,UAAU;CACT,MAAM,EAAE,UAAU,eAAe,KAAK,GAAG,SAAS;CAElD,MAAM,mBAAmB,4BAA4B,aAAa;CAElE,MAAM,eAA6B;EACjC,SAAS;GACP,OAAO;GACP,UAAU,oBAAC,KAAK,QAAN,CAAc,CAAA;EAC1B;EACA,UAAU,EACR,iBACF;CACF;CAEA,OACE,oBAAC,KAAK,aAAN;EACO;EACL,GAAI;EACJ,eAAe,qBAAqB,aAAa;EACjD,WAAW,2BAAO;EAElB,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC3B,UAAA,oBAAC,QAAD;IAAQ,MAAA;IACN,UAAA,oBAAC,QAAD;KAAQ,cAAc,eAAe,aAAa;KAC/C;IACK,CAAA;GACF,CAAA;EACY,CAAA;CACN,CAAA;AAEtB,GACA,EAAE,MAAM,SAAS,CACnB"}
1
+ {"version":3,"file":"ContextMenuSection.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { PropsWithChildren } from \"react\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport styles from \"../../ContextMenu.module.scss\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n closesOnSelect,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport { Action } from \"@/components/Action\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\n\nexport type ContextMenuSectionProps = PropsWithChildren &\n FlowComponentProps &\n Pick<\n Aria.MenuSectionProps<MenuItemProps>,\n \"defaultSelectedKeys\" | \"selectedKeys\"\n > & {\n selectionMode?: ContextMenuSelectionMode;\n };\n\n/** @flr-generate all */\nexport const ContextMenuSection = flowComponent(\n \"ContextMenuSection\",\n (props) => {\n const { children, selectionMode, ref, ...rest } = props;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const propsContext: PropsContext = {\n Heading: {\n level: 5,\n wrapWith: <Aria.Header />,\n },\n MenuItem: {\n selectionVariant,\n },\n };\n\n return (\n <Aria.MenuSection\n ref={ref}\n {...rest}\n selectionMode={getAriaSelectionMode(selectionMode)}\n className={styles.section}\n >\n <PropsContextProvider props={propsContext}>\n <Action skip>\n <Action closeOverlay={closesOnSelect(selectionMode)}>\n {children}\n </Action>\n </Action>\n </PropsContextProvider>\n </Aria.MenuSection>\n );\n },\n { type: \"layout\" },\n);\n\nexport default ContextMenuSection;\n"],"mappings":";;;;;;;;;;;AA0BA,IAAa,qBAAqB,cAChC,uBACC,UAAU;CACT,MAAM,EAAE,UAAU,eAAe,KAAK,GAAG,SAAS;CAElD,MAAM,mBAAmB,4BAA4B,aAAa;CAElE,MAAM,eAA6B;EACjC,SAAS;GACP,OAAO;GACP,UAAU,oBAAC,KAAK,QAAN,CAAc,CAAA;EAC1B;EACA,UAAU,EACR,iBACF;CACF;CAEA,OACE,oBAAC,KAAK,aAAN;EACO;EACL,GAAI;EACJ,eAAe,qBAAqB,aAAa;EACjD,WAAWA,2BAAO;EAElB,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC3B,UAAA,oBAAC,QAAD;IAAQ,MAAA;IACN,UAAA,oBAAC,QAAD;KAAQ,cAAc,eAAe,aAAa;KAC/C;IACK,CAAA;GACF,CAAA;EACY,CAAA;CACN,CAAA;AAEtB,GACA,EAAE,MAAM,SAAS,CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuSelectAll.mjs","names":[],"sources":["../../../../../../../../../src/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport { useContext, useRef, type FC } from \"react\";\nimport type { Key, Node } from \"@react-types/shared\";\nimport type { TreeState } from \"react-stately\";\nimport { MenuItemContent } from \"@/components/MenuItem/components/MenuItemContent/MenuItemContent\";\nimport menuItemStyles from \"@/components/MenuItem/MenuItem.module.scss\";\nimport { Text } from \"@/components/Text\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"../../locales/*.locale.json\";\nimport styles from \"../../ContextMenu.module.scss\";\n\nconst selectAllSectionId = \"flow--context-menu--select-all\";\n\n/**\n * Keys that share the menu's selection: enabled items at the top level and in\n * sections without a selection mode of their own.\n */\nconst getSelectableKeys = (state: TreeState<unknown>): Key[] => {\n const keys: Key[] = [];\n\n const collect = (nodes: Iterable<Node<unknown>>) => {\n for (const node of nodes) {\n if (node.type === \"item\") {\n if (!state.selectionManager.isDisabled(node.key)) {\n keys.push(node.key);\n }\n } else if (\n node.type === \"section\" &&\n node.key !== selectAllSectionId &&\n node.props?.selectionMode === undefined\n ) {\n collect(state.collection.getChildren?.(node.key) ?? node.childNodes);\n }\n }\n };\n\n collect(state.collection);\n return keys;\n};\n\ninterface SelectAll {\n isEverySelected: boolean;\n toggle: () => void;\n}\n\n/**\n * Rendered by the visible menu item. The collection renders the item's element\n * a second time outside the menu, where `MenuStateContext` is missing.\n */\nconst SelectAllMenuItemContent: FC<\n Aria.MenuItemRenderProps & { selectAll: { current?: SelectAll } }\n> = (props) => {\n const { selectAll, ...renderProps } = props;\n const state = useContext(Aria.MenuStateContext);\n const formatter = useLocalizedStringFormatter(locales, \"ContextMenu\");\n\n const selectionManager = state?.selectionManager;\n const keys = state ? getSelectableKeys(state) : [];\n const selectedCount = keys.filter((key) =>\n selectionManager?.isSelected(key),\n ).length;\n const isEverySelected = keys.length > 0 && selectedCount === keys.length;\n const isIndeterminate = selectedCount > 0 && !isEverySelected;\n\n selectAll.current = {\n isEverySelected,\n toggle: () => {\n if (!selectionManager) {\n return;\n }\n const keySet = new Set(keys);\n const otherSelectedKeys = [...selectionManager.selectedKeys].filter(\n (key) => !keySet.has(key),\n );\n selectionManager.setSelectedKeys(\n isEverySelected ? otherSelectedKeys : [...otherSelectedKeys, ...keys],\n );\n },\n };\n\n return (\n <MenuItemContent\n {...renderProps}\n selectionMode=\"multiple\"\n isSelected={isEverySelected}\n isIndeterminate={isIndeterminate}\n >\n <Text>\n {formatter.format(isEverySelected ? \"deselectAll\" : \"selectAll\")}\n </Text>\n </MenuItemContent>\n );\n};\n\nconst SelectAllMenuItem: FC = () => {\n const selectAll = useRef<SelectAll>(undefined);\n const formatter = useLocalizedStringFormatter(locales, \"ContextMenu\");\n\n return (\n <Aria.MenuItem\n id={`${selectAllSectionId}--item`}\n textValue={formatter.format(\"selectAll\")}\n shouldCloseOnSelect={false}\n onAction={() => selectAll.current?.toggle()}\n className={menuItemStyles.menuItem}\n >\n {(renderProps) => (\n <SelectAllMenuItemContent {...renderProps} selectAll={selectAll} />\n )}\n </Aria.MenuItem>\n );\n};\n\n/**\n * The entry lives in a section without selection, so pressing it runs its\n * action only and sets the whole selection in one change.\n */\nexport const ContextMenuSelectAll: FC = () => (\n <Aria.MenuSection\n id={selectAllSectionId}\n selectionMode=\"none\"\n className={styles.selectAll}\n >\n <SelectAllMenuItem />\n </Aria.MenuSection>\n);\n\nexport default ContextMenuSelectAll;\n"],"mappings":";;;;;;;;;;;;AAWA,IAAM,qBAAqB;;;;;AAM3B,IAAM,qBAAqB,UAAqC;CAC9D,MAAM,OAAc,CAAC;CAErB,MAAM,WAAW,UAAmC;EAClD,KAAK,MAAM,QAAQ,OACjB,IAAI,KAAK,SAAS,QACZ;OAAA,CAAC,MAAM,iBAAiB,WAAW,KAAK,GAAG,GAC7C,KAAK,KAAK,KAAK,GAAG;EAAA,OAEf,IACL,KAAK,SAAS,aACd,KAAK,QAAQ,sBACb,KAAK,OAAO,kBAAkB,KAAA,GAE9B,QAAQ,MAAM,WAAW,cAAc,KAAK,GAAG,KAAK,KAAK,UAAU;CAGzE;CAEA,QAAQ,MAAM,UAAU;CACxB,OAAO;AACT;;;;;AAWA,IAAM,4BAED,UAAU;CACb,MAAM,EAAE,WAAW,GAAG,gBAAgB;CACtC,MAAM,QAAQ,WAAW,KAAK,gBAAgB;CAC9C,MAAM,YAAY,4BAA4B,kBAAS,aAAa;CAEpE,MAAM,mBAAmB,OAAO;CAChC,MAAM,OAAO,QAAQ,kBAAkB,KAAK,IAAI,CAAC;CACjD,MAAM,gBAAgB,KAAK,QAAQ,QACjC,kBAAkB,WAAW,GAAG,CAClC,CAAC,CAAC;CACF,MAAM,kBAAkB,KAAK,SAAS,KAAK,kBAAkB,KAAK;CAClE,MAAM,kBAAkB,gBAAgB,KAAK,CAAC;CAE9C,UAAU,UAAU;EAClB;EACA,cAAc;GACZ,IAAI,CAAC,kBACH;GAEF,MAAM,SAAS,IAAI,IAAI,IAAI;GAC3B,MAAM,oBAAoB,CAAC,GAAG,iBAAiB,YAAY,CAAC,CAAC,QAC1D,QAAQ,CAAC,OAAO,IAAI,GAAG,CAC1B;GACA,iBAAiB,gBACf,kBAAkB,oBAAoB,CAAC,GAAG,mBAAmB,GAAG,IAAI,CACtE;EACF;CACF;CAEA,OACE,oBAAC,iBAAD;EACE,GAAI;EACJ,eAAc;EACd,YAAY;EACK;EAEjB,UAAA,oBAAC,MAAD,EAAA,UACG,UAAU,OAAO,kBAAkB,gBAAgB,WAAW,EAC3D,CAAA;CACS,CAAA;AAErB;AAEA,IAAM,0BAA8B;CAClC,MAAM,YAAY,OAAkB,KAAA,CAAS;CAC7C,MAAM,YAAY,4BAA4B,kBAAS,aAAa;CAEpE,OACE,oBAAC,KAAK,UAAN;EACE,IAAI,GAAG,mBAAmB;EAC1B,WAAW,UAAU,OAAO,WAAW;EACvC,qBAAqB;EACrB,gBAAgB,UAAU,SAAS,OAAO;EAC1C,WAAW,wBAAe;EAExB,WAAA,gBACA,oBAAC,0BAAD;GAA0B,GAAI;GAAwB;EAAY,CAAA;CAEvD,CAAA;AAEnB;;;;;AAMA,IAAa,6BACX,oBAAC,KAAK,aAAN;CACE,IAAI;CACJ,eAAc;CACd,WAAW,2BAAO;CAElB,UAAA,oBAAC,mBAAD,CAAoB,CAAA;AACJ,CAAA"}
1
+ {"version":3,"file":"ContextMenuSelectAll.mjs","names":["locales","menuItemStyles","styles"],"sources":["../../../../../../../../../src/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport { useContext, useRef, type FC } from \"react\";\nimport type { Key, Node } from \"@react-types/shared\";\nimport type { TreeState } from \"react-stately\";\nimport { MenuItemContent } from \"@/components/MenuItem/components/MenuItemContent/MenuItemContent\";\nimport menuItemStyles from \"@/components/MenuItem/MenuItem.module.scss\";\nimport { Text } from \"@/components/Text\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"../../locales/*.locale.json\";\nimport styles from \"../../ContextMenu.module.scss\";\n\nconst selectAllSectionId = \"flow--context-menu--select-all\";\n\n/**\n * Keys that share the menu's selection: enabled items at the top level and in\n * sections without a selection mode of their own.\n */\nconst getSelectableKeys = (state: TreeState<unknown>): Key[] => {\n const keys: Key[] = [];\n\n const collect = (nodes: Iterable<Node<unknown>>) => {\n for (const node of nodes) {\n if (node.type === \"item\") {\n if (!state.selectionManager.isDisabled(node.key)) {\n keys.push(node.key);\n }\n } else if (\n node.type === \"section\" &&\n node.key !== selectAllSectionId &&\n node.props?.selectionMode === undefined\n ) {\n collect(state.collection.getChildren?.(node.key) ?? node.childNodes);\n }\n }\n };\n\n collect(state.collection);\n return keys;\n};\n\ninterface SelectAll {\n isEverySelected: boolean;\n toggle: () => void;\n}\n\n/**\n * Rendered by the visible menu item. The collection renders the item's element\n * a second time outside the menu, where `MenuStateContext` is missing.\n */\nconst SelectAllMenuItemContent: FC<\n Aria.MenuItemRenderProps & { selectAll: { current?: SelectAll } }\n> = (props) => {\n const { selectAll, ...renderProps } = props;\n const state = useContext(Aria.MenuStateContext);\n const formatter = useLocalizedStringFormatter(locales, \"ContextMenu\");\n\n const selectionManager = state?.selectionManager;\n const keys = state ? getSelectableKeys(state) : [];\n const selectedCount = keys.filter((key) =>\n selectionManager?.isSelected(key),\n ).length;\n const isEverySelected = keys.length > 0 && selectedCount === keys.length;\n const isIndeterminate = selectedCount > 0 && !isEverySelected;\n\n selectAll.current = {\n isEverySelected,\n toggle: () => {\n if (!selectionManager) {\n return;\n }\n const keySet = new Set(keys);\n const otherSelectedKeys = [...selectionManager.selectedKeys].filter(\n (key) => !keySet.has(key),\n );\n selectionManager.setSelectedKeys(\n isEverySelected ? otherSelectedKeys : [...otherSelectedKeys, ...keys],\n );\n },\n };\n\n return (\n <MenuItemContent\n {...renderProps}\n selectionMode=\"multiple\"\n isSelected={isEverySelected}\n isIndeterminate={isIndeterminate}\n >\n <Text>\n {formatter.format(isEverySelected ? \"deselectAll\" : \"selectAll\")}\n </Text>\n </MenuItemContent>\n );\n};\n\nconst SelectAllMenuItem: FC = () => {\n const selectAll = useRef<SelectAll>(undefined);\n const formatter = useLocalizedStringFormatter(locales, \"ContextMenu\");\n\n return (\n <Aria.MenuItem\n id={`${selectAllSectionId}--item`}\n textValue={formatter.format(\"selectAll\")}\n shouldCloseOnSelect={false}\n onAction={() => selectAll.current?.toggle()}\n className={menuItemStyles.menuItem}\n >\n {(renderProps) => (\n <SelectAllMenuItemContent {...renderProps} selectAll={selectAll} />\n )}\n </Aria.MenuItem>\n );\n};\n\n/**\n * The entry lives in a section without selection, so pressing it runs its\n * action only and sets the whole selection in one change.\n */\nexport const ContextMenuSelectAll: FC = () => (\n <Aria.MenuSection\n id={selectAllSectionId}\n selectionMode=\"none\"\n className={styles.selectAll}\n >\n <SelectAllMenuItem />\n </Aria.MenuSection>\n);\n\nexport default ContextMenuSelectAll;\n"],"mappings":";;;;;;;;;;;;AAWA,IAAM,qBAAqB;;;;;AAM3B,IAAM,qBAAqB,UAAqC;CAC9D,MAAM,OAAc,CAAC;CAErB,MAAM,WAAW,UAAmC;EAClD,KAAK,MAAM,QAAQ,OACjB,IAAI,KAAK,SAAS,QACZ;OAAA,CAAC,MAAM,iBAAiB,WAAW,KAAK,GAAG,GAC7C,KAAK,KAAK,KAAK,GAAG;EAAA,OAEf,IACL,KAAK,SAAS,aACd,KAAK,QAAQ,sBACb,KAAK,OAAO,kBAAkB,KAAA,GAE9B,QAAQ,MAAM,WAAW,cAAc,KAAK,GAAG,KAAK,KAAK,UAAU;CAGzE;CAEA,QAAQ,MAAM,UAAU;CACxB,OAAO;AACT;;;;;AAWA,IAAM,4BAED,UAAU;CACb,MAAM,EAAE,WAAW,GAAG,gBAAgB;CACtC,MAAM,QAAQ,WAAW,KAAK,gBAAgB;CAC9C,MAAM,YAAY,4BAA4BA,kBAAS,aAAa;CAEpE,MAAM,mBAAmB,OAAO;CAChC,MAAM,OAAO,QAAQ,kBAAkB,KAAK,IAAI,CAAC;CACjD,MAAM,gBAAgB,KAAK,QAAQ,QACjC,kBAAkB,WAAW,GAAG,CAClC,CAAC,CAAC;CACF,MAAM,kBAAkB,KAAK,SAAS,KAAK,kBAAkB,KAAK;CAClE,MAAM,kBAAkB,gBAAgB,KAAK,CAAC;CAE9C,UAAU,UAAU;EAClB;EACA,cAAc;GACZ,IAAI,CAAC,kBACH;GAEF,MAAM,SAAS,IAAI,IAAI,IAAI;GAC3B,MAAM,oBAAoB,CAAC,GAAG,iBAAiB,YAAY,CAAC,CAAC,QAC1D,QAAQ,CAAC,OAAO,IAAI,GAAG,CAC1B;GACA,iBAAiB,gBACf,kBAAkB,oBAAoB,CAAC,GAAG,mBAAmB,GAAG,IAAI,CACtE;EACF;CACF;CAEA,OACE,oBAAC,iBAAD;EACE,GAAI;EACJ,eAAc;EACd,YAAY;EACK;EAEjB,UAAA,oBAAC,MAAD,EAAA,UACG,UAAU,OAAO,kBAAkB,gBAAgB,WAAW,EAC3D,CAAA;CACS,CAAA;AAErB;AAEA,IAAM,0BAA8B;CAClC,MAAM,YAAY,OAAkB,KAAA,CAAS;CAC7C,MAAM,YAAY,4BAA4BA,kBAAS,aAAa;CAEpE,OACE,oBAAC,KAAK,UAAN;EACE,IAAI,GAAG,mBAAmB;EAC1B,WAAW,UAAU,OAAO,WAAW;EACvC,qBAAqB;EACrB,gBAAgB,UAAU,SAAS,OAAO;EAC1C,WAAWC,wBAAe;EAExB,WAAA,gBACA,oBAAC,0BAAD;GAA0B,GAAI;GAAwB;EAAY,CAAA;CAEvD,CAAA;AAEnB;;;;;AAMA,IAAa,6BACX,oBAAC,KAAK,aAAN;CACE,IAAI;CACJ,eAAc;CACd,WAAWC,2BAAO;CAElB,UAAA,oBAAC,mBAAD,CAAoB,CAAA;AACJ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextualHelp.mjs","names":[],"sources":["../../../../../../../src/components/ContextualHelp/ContextualHelp.tsx"],"sourcesContent":["import type { PopoverProps } from \"@/components/Popover/Popover\";\nimport { Popover } from \"@/components/Popover/Popover\";\nimport styles from \"./ContextualHelp.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useOverlayController } from \"@/lib/controller\";\n\nexport type ContextualHelpProps = Omit<PopoverProps, \"withTip\" | \"modality\">;\n\n/** @flr-generate all */\nexport const ContextualHelp = flowComponent(\"ContextualHelp\", (props) => {\n const {\n children,\n controller: controllerFromProps,\n ref: ignoredRef,\n ...rest\n } = props;\n\n const controllerFromContext = useOverlayController(\"ContextualHelp\", {\n reuseControllerFromContext: true,\n });\n\n const controller = controllerFromProps ?? controllerFromContext;\n\n const propsContext: PropsContext = {\n // A contextual help holds a single, simple explanation — it does not need\n // its own heading structure. A heading is rendered as a bold text label\n // instead of an actual heading element.\n Heading: {\n level: 5,\n elementType: \"span\",\n },\n };\n\n return (\n <Popover withTip {...rest} controller={controller}>\n <PropsContextProvider props={propsContext}>\n <div className={styles.contextualHelp}>{children}</div>\n </PropsContextProvider>\n </Popover>\n );\n});\n\nexport default ContextualHelp;\n"],"mappings":";;;;;;;;;;AAWA,IAAa,iBAAiB,cAAc,mBAAmB,UAAU;CACvE,MAAM,EACJ,UACA,YAAY,qBACZ,KAAK,YACL,GAAG,SACD;CAEJ,MAAM,wBAAwB,qBAAqB,kBAAkB,EACnE,4BAA4B,KAC9B,CAAC;CAED,MAAM,aAAa,uBAAuB;CAE1C,MAAM,eAA6B,EAIjC,SAAS;EACP,OAAO;EACP,aAAa;CACf,EACF;CAEA,OACE,oBAAC,SAAD;EAAS,SAAA;EAAQ,GAAI;EAAkB;EACrC,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC3B,UAAA,oBAAC,OAAD;IAAK,WAAW,8BAAO;IAAiB;GAAc,CAAA;EAClC,CAAA;CACf,CAAA;AAEb,CAAC"}
1
+ {"version":3,"file":"ContextualHelp.mjs","names":["styles"],"sources":["../../../../../../../src/components/ContextualHelp/ContextualHelp.tsx"],"sourcesContent":["import type { PopoverProps } from \"@/components/Popover/Popover\";\nimport { Popover } from \"@/components/Popover/Popover\";\nimport styles from \"./ContextualHelp.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useOverlayController } from \"@/lib/controller\";\n\nexport type ContextualHelpProps = Omit<PopoverProps, \"withTip\" | \"modality\">;\n\n/** @flr-generate all */\nexport const ContextualHelp = flowComponent(\"ContextualHelp\", (props) => {\n const {\n children,\n controller: controllerFromProps,\n ref: ignoredRef,\n ...rest\n } = props;\n\n const controllerFromContext = useOverlayController(\"ContextualHelp\", {\n reuseControllerFromContext: true,\n });\n\n const controller = controllerFromProps ?? controllerFromContext;\n\n const propsContext: PropsContext = {\n // A contextual help holds a single, simple explanation — it does not need\n // its own heading structure. A heading is rendered as a bold text label\n // instead of an actual heading element.\n Heading: {\n level: 5,\n elementType: \"span\",\n },\n };\n\n return (\n <Popover withTip {...rest} controller={controller}>\n <PropsContextProvider props={propsContext}>\n <div className={styles.contextualHelp}>{children}</div>\n </PropsContextProvider>\n </Popover>\n );\n});\n\nexport default ContextualHelp;\n"],"mappings":";;;;;;;;;;AAWA,IAAa,iBAAiB,cAAc,mBAAmB,UAAU;CACvE,MAAM,EACJ,UACA,YAAY,qBACZ,KAAK,YACL,GAAG,SACD;CAEJ,MAAM,wBAAwB,qBAAqB,kBAAkB,EACnE,4BAA4B,KAC9B,CAAC;CAED,MAAM,aAAa,uBAAuB;CAE1C,MAAM,eAA6B,EAIjC,SAAS;EACP,OAAO;EACP,aAAa;CACf,EACF;CAEA,OACE,oBAAC,SAAD;EAAS,SAAA;EAAQ,GAAI;EAAkB;EACrC,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC3B,UAAA,oBAAC,OAAD;IAAK,WAAWA,8BAAO;IAAiB;GAAc,CAAA;EAClC,CAAA;CACf,CAAA;AAEb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextualHelpTrigger.mjs","names":[],"sources":["../../../../../../../../../src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { OverlayTriggerProps } from \"@/components/OverlayTrigger\";\nimport { OverlayTrigger } from \"@/components/OverlayTrigger\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport { IconInfo } from \"@/components/Icon/components/icons\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface ContextualHelpTriggerProps extends OverlayTriggerProps {\n /**\n * The subject the contextual help is about — not a complete accessibility\n * label. It is inserted into the localized template \"More information about\n * {subject}\", which becomes the accessibility label of the trigger.\n */\n subject?: string;\n /**\n * A complete accessibility label for the trigger, replacing the label built\n * from `subject`. Prefer `subject`, which stays localized — reach for this\n * only when the template does not fit.\n */\n \"aria-label\"?: string;\n}\n\n/** @flr-generate all */\nexport const ContextualHelpTrigger = flowComponent(\n \"ContextualHelpTrigger\",\n (props) => {\n const {\n children,\n subject,\n \"aria-label\": ariaLabelFromProps,\n ...triggerProps\n } = props;\n const stringFormatter = useLocalizedStringFormatter(\n locales,\n \"ContextualHelpTrigger\",\n );\n\n const ariaLabel =\n ariaLabelFromProps ??\n (subject === undefined\n ? stringFormatter.format(\"moreInformation\")\n : stringFormatter.format(\"moreInformationAbout\", { subject }));\n\n const propsContext: PropsContext = {\n Button: {\n \"aria-label\": ariaLabel,\n children: <IconInfo />,\n size: \"s\",\n variant: \"plain\",\n ariaSlot: null,\n },\n };\n\n return (\n <OverlayTrigger\n overlayType=\"ContextualHelp\"\n {...triggerProps}\n component={Aria.DialogTrigger}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </OverlayTrigger>\n );\n },\n { type: \"provider\" },\n);\n\nexport default ContextualHelpTrigger;\n"],"mappings":";;;;;;;;;;;;AA0BA,IAAa,wBAAwB,cACnC,0BACC,UAAU;CACT,MAAM,EACJ,UACA,SACA,cAAc,oBACd,GAAG,iBACD;CACJ,MAAM,kBAAkB,4BACtB,kBACA,uBACF;CAQA,MAAM,eAA6B,EACjC,QAAQ;EACN,cAPF,uBACC,YAAY,KAAA,IACT,gBAAgB,OAAO,iBAAiB,IACxC,gBAAgB,OAAO,wBAAwB,EAAE,QAAQ,CAAC;EAK5D,UAAU,oBAAC,UAAD,CAAW,CAAA;EACrB,MAAM;EACN,SAAS;EACT,UAAU;CACZ,EACF;CAEA,OACE,oBAAC,gBAAD;EACE,aAAY;EACZ,GAAI;EACJ,WAAW,KAAK;EAEhB,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA;CACR,CAAA;AAEpB,GACA,EAAE,MAAM,WAAW,CACrB"}
1
+ {"version":3,"file":"ContextualHelpTrigger.mjs","names":["locales"],"sources":["../../../../../../../../../src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { OverlayTriggerProps } from \"@/components/OverlayTrigger\";\nimport { OverlayTrigger } from \"@/components/OverlayTrigger\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport { IconInfo } from \"@/components/Icon/components/icons\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface ContextualHelpTriggerProps extends OverlayTriggerProps {\n /**\n * The subject the contextual help is about — not a complete accessibility\n * label. It is inserted into the localized template \"More information about\n * {subject}\", which becomes the accessibility label of the trigger.\n */\n subject?: string;\n /**\n * A complete accessibility label for the trigger, replacing the label built\n * from `subject`. Prefer `subject`, which stays localized — reach for this\n * only when the template does not fit.\n */\n \"aria-label\"?: string;\n}\n\n/** @flr-generate all */\nexport const ContextualHelpTrigger = flowComponent(\n \"ContextualHelpTrigger\",\n (props) => {\n const {\n children,\n subject,\n \"aria-label\": ariaLabelFromProps,\n ...triggerProps\n } = props;\n const stringFormatter = useLocalizedStringFormatter(\n locales,\n \"ContextualHelpTrigger\",\n );\n\n const ariaLabel =\n ariaLabelFromProps ??\n (subject === undefined\n ? stringFormatter.format(\"moreInformation\")\n : stringFormatter.format(\"moreInformationAbout\", { subject }));\n\n const propsContext: PropsContext = {\n Button: {\n \"aria-label\": ariaLabel,\n children: <IconInfo />,\n size: \"s\",\n variant: \"plain\",\n ariaSlot: null,\n },\n };\n\n return (\n <OverlayTrigger\n overlayType=\"ContextualHelp\"\n {...triggerProps}\n component={Aria.DialogTrigger}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </OverlayTrigger>\n );\n },\n { type: \"provider\" },\n);\n\nexport default ContextualHelpTrigger;\n"],"mappings":";;;;;;;;;;;;AA0BA,IAAa,wBAAwB,cACnC,0BACC,UAAU;CACT,MAAM,EACJ,UACA,SACA,cAAc,oBACd,GAAG,iBACD;CACJ,MAAM,kBAAkB,4BACtBA,kBACA,uBACF;CAQA,MAAM,eAA6B,EACjC,QAAQ;EACN,cAPF,uBACC,YAAY,KAAA,IACT,gBAAgB,OAAO,iBAAiB,IACxC,gBAAgB,OAAO,wBAAwB,EAAE,QAAQ,CAAC;EAK5D,UAAU,oBAAC,UAAD,CAAW,CAAA;EACrB,MAAM;EACN,SAAS;EACT,UAAU;CACZ,EACF;CAEA,OACE,oBAAC,gBAAD;EACE,aAAY;EACZ,GAAI;EACJ,WAAW,KAAK;EAEhB,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA;CACR,CAAA;AAEpB,GACA,EAAE,MAAM,WAAW,CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"CopyButton.mjs","names":[],"sources":["../../../../../../../src/components/CopyButton/CopyButton.tsx"],"sourcesContent":["import copy from \"copy-to-clipboard\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport { Button } from \"@/components/Button\";\nimport { IconCopy } from \"@/components/Icon/components/icons\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport { Tooltip, TooltipTrigger } from \"@/components/Tooltip\";\nimport { onlyText } from \"react-children-utilities\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Action } from \"@/components/Action\";\n\nexport interface CopyButtonProps\n extends\n Omit<ButtonProps, \"onPress\" | \"aria-label\" | \"render\">,\n FlowComponentProps<HTMLButtonElement> {\n /** The text to copy. */\n text?: string;\n /**\n * Called with the copied text once it has been written to the clipboard. Not\n * called when copying fails.\n */\n onCopy?: (text: string) => void;\n}\n\n/** @flr-generate all */\nexport const CopyButton = flowComponent(\"CopyButton\", (props) => {\n const {\n text = \"\",\n ref,\n variant = \"plain\",\n color = \"secondary\",\n onCopy,\n ...buttonProps\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"CopyButton\");\n\n const tooltip = stringFormatter.format(\"copy\");\n\n const copyValue = async () => {\n const copiedText = onlyText(text);\n if (await copy(copiedText)) {\n onCopy?.(copiedText);\n }\n };\n\n return (\n <TooltipTrigger>\n <Action onAction={copyValue} showFeedback>\n <Button\n aria-label={tooltip}\n {...buttonProps}\n ref={ref}\n variant={variant}\n color={color}\n >\n <IconCopy />\n </Button>\n </Action>\n <Tooltip>{tooltip}</Tooltip>\n </TooltipTrigger>\n );\n});\n\nexport default CopyButton;\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,IAAa,aAAa,cAAc,eAAe,UAAU;CAC/D,MAAM,EACJ,OAAO,IACP,KACA,UAAU,SACV,QAAQ,aACR,QACA,GAAG,gBACD;CAIJ,MAAM,UAFkB,4BAA4B,kBAAS,YAE7C,CAAA,CAAgB,OAAO,MAAM;CAE7C,MAAM,YAAY,YAAY;EAC5B,MAAM,aAAa,SAAS,IAAI;EAChC,IAAI,MAAM,KAAK,UAAU,GACvB,SAAS,UAAU;CAEvB;CAEA,OACE,qBAAC,gBAAD,EAAA,UAAA,CACE,oBAAC,QAAD;EAAQ,UAAU;EAAW,cAAA;EAC3B,UAAA,oBAAC,QAAD;GACE,cAAY;GACZ,GAAI;GACC;GACI;GACF;GAEP,UAAA,oBAAC,UAAD,CAAW,CAAA;EACL,CAAA;CACF,CAAA,GACR,oBAAC,SAAD,EAAA,UAAU,QAAiB,CAAA,CACb,EAAA,CAAA;AAEpB,CAAC"}
1
+ {"version":3,"file":"CopyButton.mjs","names":["locales"],"sources":["../../../../../../../src/components/CopyButton/CopyButton.tsx"],"sourcesContent":["import copy from \"copy-to-clipboard\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport { Button } from \"@/components/Button\";\nimport { IconCopy } from \"@/components/Icon/components/icons\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport { Tooltip, TooltipTrigger } from \"@/components/Tooltip\";\nimport { onlyText } from \"react-children-utilities\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Action } from \"@/components/Action\";\n\nexport interface CopyButtonProps\n extends\n Omit<ButtonProps, \"onPress\" | \"aria-label\" | \"render\">,\n FlowComponentProps<HTMLButtonElement> {\n /** The text to copy. */\n text?: string;\n /**\n * Called with the copied text once it has been written to the clipboard. Not\n * called when copying fails.\n */\n onCopy?: (text: string) => void;\n}\n\n/** @flr-generate all */\nexport const CopyButton = flowComponent(\"CopyButton\", (props) => {\n const {\n text = \"\",\n ref,\n variant = \"plain\",\n color = \"secondary\",\n onCopy,\n ...buttonProps\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"CopyButton\");\n\n const tooltip = stringFormatter.format(\"copy\");\n\n const copyValue = async () => {\n const copiedText = onlyText(text);\n if (await copy(copiedText)) {\n onCopy?.(copiedText);\n }\n };\n\n return (\n <TooltipTrigger>\n <Action onAction={copyValue} showFeedback>\n <Button\n aria-label={tooltip}\n {...buttonProps}\n ref={ref}\n variant={variant}\n color={color}\n >\n <IconCopy />\n </Button>\n </Action>\n <Tooltip>{tooltip}</Tooltip>\n </TooltipTrigger>\n );\n});\n\nexport default CopyButton;\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,IAAa,aAAa,cAAc,eAAe,UAAU;CAC/D,MAAM,EACJ,OAAO,IACP,KACA,UAAU,SACV,QAAQ,aACR,QACA,GAAG,gBACD;CAIJ,MAAM,UAFkB,4BAA4BA,kBAAS,YAE7C,CAAA,CAAgB,OAAO,MAAM;CAE7C,MAAM,YAAY,YAAY;EAC5B,MAAM,aAAa,SAAS,IAAI;EAChC,IAAI,MAAM,KAAK,UAAU,GACvB,SAAS,UAAU;CAEvB;CAEA,OACE,qBAAC,gBAAD,EAAA,UAAA,CACE,oBAAC,QAAD;EAAQ,UAAU;EAAW,cAAA;EAC3B,UAAA,oBAAC,QAAD;GACE,cAAY;GACZ,GAAI;GACC;GACI;GACF;GAEP,UAAA,oBAAC,UAAD,CAAW,CAAA;EACL,CAAA;CACF,CAAA,GACR,oBAAC,SAAD,EAAA,UAAU,QAAiB,CAAA,CACb,EAAA,CAAA;AAEpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CounterBadge.mjs","names":[],"sources":["../../../../../../../src/components/CounterBadge/CounterBadge.tsx"],"sourcesContent":["import type { PropsWithElementType } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./CounterBadge.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface CounterBadgeProps\n extends PropsWithElementType<\"span\">, FlowComponentProps {\n /** The number displayed inside the badge. */\n count?: number;\n}\n\n/** @flr-generate all */\nexport const CounterBadge = flowComponent(\"CounterBadge\", (props) => {\n const { className, count, ref, ...rest } = props;\n\n const rootClassName = clsx(styles.counterBadge, className);\n\n return (\n <span className={rootClassName} {...rest} aria-hidden ref={ref}>\n {count && count > 99 ? \"99+\" : count}\n </span>\n );\n});\n\nexport default CounterBadge;\n"],"mappings":";;;;;;;;AAaA,IAAa,eAAe,cAAc,iBAAiB,UAAU;CACnE,MAAM,EAAE,WAAW,OAAO,KAAK,GAAG,SAAS;CAE3C,MAAM,gBAAgB,KAAK,4BAAO,cAAc,SAAS;CAEzD,OACE,oBAAC,QAAD;EAAM,WAAW;EAAe,GAAI;EAAM,eAAA;EAAiB;EACxD,UAAA,SAAS,QAAQ,KAAK,QAAQ;CAC3B,CAAA;AAEV,CAAC"}
1
+ {"version":3,"file":"CounterBadge.mjs","names":["styles"],"sources":["../../../../../../../src/components/CounterBadge/CounterBadge.tsx"],"sourcesContent":["import type { PropsWithElementType } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./CounterBadge.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface CounterBadgeProps\n extends PropsWithElementType<\"span\">, FlowComponentProps {\n /** The number displayed inside the badge. */\n count?: number;\n}\n\n/** @flr-generate all */\nexport const CounterBadge = flowComponent(\"CounterBadge\", (props) => {\n const { className, count, ref, ...rest } = props;\n\n const rootClassName = clsx(styles.counterBadge, className);\n\n return (\n <span className={rootClassName} {...rest} aria-hidden ref={ref}>\n {count && count > 99 ? \"99+\" : count}\n </span>\n );\n});\n\nexport default CounterBadge;\n"],"mappings":";;;;;;;;AAaA,IAAa,eAAe,cAAc,iBAAiB,UAAU;CACnE,MAAM,EAAE,WAAW,OAAO,KAAK,GAAG,SAAS;CAE3C,MAAM,gBAAgB,KAAKA,4BAAO,cAAc,SAAS;CAEzD,OACE,oBAAC,QAAD;EAAM,WAAW;EAAe,GAAI;EAAM,eAAA;EAAiB;EACxD,UAAA,SAAS,QAAQ,KAAK,QAAQ;CAC3B,CAAA;AAEV,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CountryOptions.mjs","names":[],"sources":["../../../../../../../src/components/CountryOptions/CountryOptions.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { useMemo } from \"react\";\nimport type { ListBoxProps } from \"react-aria-components\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport locales from \"./locales/*.locale.json\";\nimport { all, type CountryData } from \"country-codes-list\";\nimport OptionView from \"@/views/OptionView\";\nimport { uniqueBy } from \"remeda\";\n\nexport type Country = CountryData & {\n name: string;\n code: string;\n};\n\nexport type CountryFilterFn = (country: Country) => boolean;\nexport type CountrySortFn = (left: Country, right: Country) => number;\n\nexport interface CountryOptionsProps<T = object>\n extends\n PropsWithChildren<Omit<ListBoxProps<T>, \"children\">>,\n FlowComponentProps {\n filterBy?: CountryFilterFn;\n sortBy?: CountrySortFn;\n}\n\nconst defaultSortBy: CountrySortFn = (left, right) =>\n left.name.localeCompare(right.name);\nconst defaultFilterBy: CountryFilterFn = () => true;\n\n// see https://github.com/Synergy-Shock/country-codes-list/issues/37\nconst uniqueCountries = uniqueBy(all(), (c) => c.countryCode);\n\nexport const CountryOptions: FC<CountryOptionsProps> = (props) => {\n const { filterBy = defaultFilterBy, sortBy = defaultSortBy } = props;\n const stringFormatter = useLocalizedStringFormatter(\n locales,\n \"CountryOptions\",\n );\n\n return useMemo(() => {\n return uniqueCountries\n .map((countryData) => ({\n ...countryData,\n code: countryData.countryCode,\n name: stringFormatter.format(`countryCode.${countryData.countryCode}`),\n }))\n .filter(filterBy)\n .sort(sortBy)\n .map((country) => (\n <OptionView\n key={country.countryNameEn}\n value={country.countryCode}\n textValue={country.name}\n >\n {country.name}\n </OptionView>\n ));\n }, [stringFormatter]);\n};\n\nexport default CountryOptions;\n"],"mappings":";;;;;;;;;;AA0BA,IAAM,iBAAgC,MAAM,UAC1C,KAAK,KAAK,cAAc,MAAM,IAAI;AACpC,IAAM,wBAAyC;AAG/C,IAAM,kBAAkB,SAAS,IAAI,IAAI,MAAM,EAAE,WAAW;AAE5D,IAAa,kBAA2C,UAAU;CAChE,MAAM,EAAE,WAAW,iBAAiB,SAAS,kBAAkB;CAC/D,MAAM,kBAAkB,4BACtB,kBACA,gBACF;CAEA,OAAO,cAAc;EACnB,OAAO,gBACJ,KAAK,iBAAiB;GACrB,GAAG;GACH,MAAM,YAAY;GAClB,MAAM,gBAAgB,OAAO,eAAe,YAAY,aAAa;EACvE,EAAE,CAAC,CACF,OAAO,QAAQ,CAAC,CAChB,KAAK,MAAM,CAAC,CACZ,KAAK,YACJ,oBAAC,YAAD;GAEE,OAAO,QAAQ;GACf,WAAW,QAAQ;GAElB,UAAA,QAAQ;EACC,GALL,QAAQ,aAKH,CACb;CACL,GAAG,CAAC,eAAe,CAAC;AACtB"}
1
+ {"version":3,"file":"CountryOptions.mjs","names":["locales"],"sources":["../../../../../../../src/components/CountryOptions/CountryOptions.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { useMemo } from \"react\";\nimport type { ListBoxProps } from \"react-aria-components\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport locales from \"./locales/*.locale.json\";\nimport { all, type CountryData } from \"country-codes-list\";\nimport OptionView from \"@/views/OptionView\";\nimport { uniqueBy } from \"remeda\";\n\nexport type Country = CountryData & {\n name: string;\n code: string;\n};\n\nexport type CountryFilterFn = (country: Country) => boolean;\nexport type CountrySortFn = (left: Country, right: Country) => number;\n\nexport interface CountryOptionsProps<T = object>\n extends\n PropsWithChildren<Omit<ListBoxProps<T>, \"children\">>,\n FlowComponentProps {\n filterBy?: CountryFilterFn;\n sortBy?: CountrySortFn;\n}\n\nconst defaultSortBy: CountrySortFn = (left, right) =>\n left.name.localeCompare(right.name);\nconst defaultFilterBy: CountryFilterFn = () => true;\n\n// see https://github.com/Synergy-Shock/country-codes-list/issues/37\nconst uniqueCountries = uniqueBy(all(), (c) => c.countryCode);\n\nexport const CountryOptions: FC<CountryOptionsProps> = (props) => {\n const { filterBy = defaultFilterBy, sortBy = defaultSortBy } = props;\n const stringFormatter = useLocalizedStringFormatter(\n locales,\n \"CountryOptions\",\n );\n\n return useMemo(() => {\n return uniqueCountries\n .map((countryData) => ({\n ...countryData,\n code: countryData.countryCode,\n name: stringFormatter.format(`countryCode.${countryData.countryCode}`),\n }))\n .filter(filterBy)\n .sort(sortBy)\n .map((country) => (\n <OptionView\n key={country.countryNameEn}\n value={country.countryCode}\n textValue={country.name}\n >\n {country.name}\n </OptionView>\n ));\n }, [stringFormatter]);\n};\n\nexport default CountryOptions;\n"],"mappings":";;;;;;;;;;AA0BA,IAAM,iBAAgC,MAAM,UAC1C,KAAK,KAAK,cAAc,MAAM,IAAI;AACpC,IAAM,wBAAyC;AAG/C,IAAM,kBAAkB,SAAS,IAAI,IAAI,MAAM,EAAE,WAAW;AAE5D,IAAa,kBAA2C,UAAU;CAChE,MAAM,EAAE,WAAW,iBAAiB,SAAS,kBAAkB;CAC/D,MAAM,kBAAkB,4BACtBA,kBACA,gBACF;CAEA,OAAO,cAAc;EACnB,OAAO,gBACJ,KAAK,iBAAiB;GACrB,GAAG;GACH,MAAM,YAAY;GAClB,MAAM,gBAAgB,OAAO,eAAe,YAAY,aAAa;EACvE,EAAE,CAAC,CACF,OAAO,QAAQ,CAAC,CAChB,KAAK,MAAM,CAAC,CACZ,KAAK,YACJ,oBAAC,YAAD;GAEE,OAAO,QAAQ;GACf,WAAW,QAAQ;GAElB,UAAA,QAAQ;EACC,GALL,QAAQ,aAKH,CACb;CACL,GAAG,CAAC,eAAe,CAAC;AACtB"}
@@ -5,6 +5,7 @@ import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
5
5
  import { useOverlayController } from "../../lib/controller/overlay/useOverlayController.mjs";
6
6
  import { Popover } from "../Popover/Popover.mjs";
7
7
  import { useFieldComponent } from "../../lib/hooks/useFieldComponent.mjs";
8
+ import { useControlledHostValueProps } from "../../lib/remote/useControlledHostValueProps.mjs";
8
9
  import { DateInput } from "./components/DateInput/DateInput.mjs";
9
10
  import { Calendar } from "../Calendar/Calendar.mjs";
10
11
  import DatePicker_module_default from "./DatePicker.module.mjs";
@@ -15,13 +16,13 @@ import * as Aria from "react-aria-components";
15
16
  //#region src/components/DatePicker/DatePicker.tsx
16
17
  /** @flr-generate all */
17
18
  var DatePicker = flowComponent("DatePicker", (props) => {
18
- const { children, className, onChange, ref, ...rest } = props;
19
- const popoverController = useOverlayController("Popover");
20
- const { FieldErrorView, FieldErrorCaptureContext, fieldProps, fieldPropsContext } = useFieldComponent(props, "DatePicker");
21
- const rootClassName = clsx(fieldProps.className, className);
19
+ const { children, className, onChange, ref, ...rest } = useControlledHostValueProps(props, null);
20
+ const popoverController = useOverlayController("Popover", { reuseControllerFromContext: false });
21
+ const { FieldErrorView, FieldErrorCaptureContext, wrapperProps, controlProps, fieldPropsContext } = useFieldComponent(props, "DatePicker");
22
+ const rootClassName = clsx(wrapperProps.className, className);
22
23
  return /* @__PURE__ */ jsxs(Aria.DatePicker, {
23
24
  ...rest,
24
- ...fieldProps,
25
+ ...controlProps,
25
26
  className: rootClassName,
26
27
  onOpenChange: (v) => popoverController.setOpen(v),
27
28
  isOpen: popoverController.isOpen,
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.mjs","names":[],"sources":["../../../../../../../src/components/DatePicker/DatePicker.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport clsx from \"clsx\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport * as Aria from \"react-aria-components\";\nimport { DateInput } from \"./components/DateInput\";\nimport { Popover } from \"@/components/Popover/Popover\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { Calendar } from \"@/components/Calendar\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./DatePicker.module.scss\";\n\nexport interface DatePickerProps<T extends Aria.DateValue = Aria.DateValue>\n extends\n PropsWithChildren<Omit<Aria.DatePickerProps<T>, \"children\" | \"ref\">>,\n FlowComponentProps<HTMLSpanElement> {}\n\n/** @flr-generate all */\nexport const DatePicker = flowComponent(\"DatePicker\", (props) => {\n const { children, className, onChange, ref, ...rest } = props;\n\n const popoverController = useOverlayController(\"Popover\");\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"DatePicker\");\n\n const rootClassName = clsx(fieldProps.className, className);\n\n return (\n <Aria.DatePicker\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onOpenChange={(v) => popoverController.setOpen(v)}\n isOpen={popoverController.isOpen}\n onChange={(value) => {\n if (onChange) {\n onChange(value);\n }\n popoverController.close();\n }}\n >\n <FieldErrorCaptureContext>\n <DateInput isDisabled={props.isDisabled} ref={ref} />\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n </PropsContextProvider>\n <Popover\n placement=\"bottom end\"\n isDialogContent\n controller={popoverController}\n >\n <Calendar className={styles.calendar} />\n </Popover>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </Aria.DatePicker>\n );\n});\n\nexport default DatePicker;\n"],"mappings":";;;;;;;;;;;;;;;;AAqBA,IAAa,aAAa,cAAc,eAAe,UAAU;CAC/D,MAAM,EAAE,UAAU,WAAW,UAAU,KAAK,GAAG,SAAS;CAExD,MAAM,oBAAoB,qBAAqB,SAAS;CACxD,MAAM,EACJ,gBACA,0BACA,YACA,sBACE,kBAAkB,OAAO,YAAY;CAEzC,MAAM,gBAAgB,KAAK,WAAW,WAAW,SAAS;CAE1D,OACE,qBAAC,KAAK,YAAN;EACE,GAAI;EACJ,GAAI;EACJ,WAAW;EACX,eAAe,MAAM,kBAAkB,QAAQ,CAAC;EAChD,QAAQ,kBAAkB;EAC1B,WAAW,UAAU;GACnB,IAAI,UACF,SAAS,KAAK;GAEhB,kBAAkB,MAAM;EAC1B;EAXF,UAAA,CAaE,qBAAC,0BAAD,EAAA,UAAA;GACE,oBAAC,WAAD;IAAW,YAAY,MAAM;IAAiB;GAAM,CAAA;GACpD,oBAAC,sBAAD;IAAsB,OAAO;IAC1B;GACmB,CAAA;GACtB,oBAAC,SAAD;IACE,WAAU;IACV,iBAAA;IACA,YAAY;IAEZ,UAAA,oBAAC,UAAD,EAAU,WAAW,0BAAO,SAAW,CAAA;GAChC,CAAA;EACe,EAAA,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACF;;AAErB,CAAC"}
1
+ {"version":3,"file":"DatePicker.mjs","names":["styles"],"sources":["../../../../../../../src/components/DatePicker/DatePicker.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport clsx from \"clsx\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport * as Aria from \"react-aria-components\";\nimport { DateInput } from \"./components/DateInput\";\nimport { Popover } from \"@/components/Popover/Popover\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { Calendar } from \"@/components/Calendar\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./DatePicker.module.scss\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\n\nexport interface DatePickerProps<T extends Aria.DateValue = Aria.DateValue>\n extends\n PropsWithChildren<Omit<Aria.DatePickerProps<T>, \"children\" | \"ref\">>,\n FlowComponentProps<HTMLSpanElement> {}\n\n/** @flr-generate all */\nexport const DatePicker = flowComponent(\"DatePicker\", (props) => {\n // `null` is what react-aria's date picker state uses for \"no date\"\n const { children, className, onChange, ref, ...rest } =\n useControlledHostValueProps(props, null);\n\n const popoverController = useOverlayController(\"Popover\", {\n reuseControllerFromContext: false,\n });\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n wrapperProps,\n controlProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"DatePicker\");\n\n const rootClassName = clsx(wrapperProps.className, className);\n\n return (\n <Aria.DatePicker\n {...rest}\n {...controlProps}\n className={rootClassName}\n onOpenChange={(v) => popoverController.setOpen(v)}\n isOpen={popoverController.isOpen}\n onChange={(value) => {\n if (onChange) {\n onChange(value);\n }\n popoverController.close();\n }}\n >\n <FieldErrorCaptureContext>\n <DateInput isDisabled={props.isDisabled} ref={ref} />\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n </PropsContextProvider>\n <Popover\n placement=\"bottom end\"\n isDialogContent\n controller={popoverController}\n >\n <Calendar className={styles.calendar} />\n </Popover>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </Aria.DatePicker>\n );\n});\n\nexport default DatePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;AAsBA,IAAa,aAAa,cAAc,eAAe,UAAU;CAE/D,MAAM,EAAE,UAAU,WAAW,UAAU,KAAK,GAAG,SAC7C,4BAA4B,OAAO,IAAI;CAEzC,MAAM,oBAAoB,qBAAqB,WAAW,EACxD,4BAA4B,MAC9B,CAAC;CACD,MAAM,EACJ,gBACA,0BACA,cACA,cACA,sBACE,kBAAkB,OAAO,YAAY;CAEzC,MAAM,gBAAgB,KAAK,aAAa,WAAW,SAAS;CAE5D,OACE,qBAAC,KAAK,YAAN;EACE,GAAI;EACJ,GAAI;EACJ,WAAW;EACX,eAAe,MAAM,kBAAkB,QAAQ,CAAC;EAChD,QAAQ,kBAAkB;EAC1B,WAAW,UAAU;GACnB,IAAI,UACF,SAAS,KAAK;GAEhB,kBAAkB,MAAM;EAC1B;EAXF,UAAA,CAaE,qBAAC,0BAAD,EAAA,UAAA;GACE,oBAAC,WAAD;IAAW,YAAY,MAAM;IAAiB;GAAM,CAAA;GACpD,oBAAC,sBAAD;IAAsB,OAAO;IAC1B;GACmB,CAAA;GACtB,oBAAC,SAAD;IACE,WAAU;IACV,iBAAA;IACA,YAAY;IAEZ,UAAA,oBAAC,UAAD,EAAU,WAAWA,0BAAO,SAAW,CAAA;GAChC,CAAA;EACe,EAAA,CAAA,GAC1B,oBAAC,gBAAD,CAAiB,CAAA,CACF;;AAErB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DateInput.mjs","names":[],"sources":["../../../../../../../../../src/components/DatePicker/components/DateInput/DateInput.tsx"],"sourcesContent":["import { type FC, type Ref } from \"react\";\nimport styles from \"./DateInput.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport { Button } from \"@/components/Button\";\nimport { IconDate } from \"@/components/Icon/components/icons\";\nimport Input from \"@/components/DateInput\";\n\nexport interface DateInputProps {\n isDisabled?: boolean;\n ref?: Ref<HTMLSpanElement>;\n}\n\nexport const DateInput: FC<DateInputProps> = (props) => {\n const { isDisabled, ref } = props;\n\n return (\n <Aria.Group className={styles.dateInput}>\n <Input ref={ref} />\n <Button variant=\"plain\" color=\"secondary\" isDisabled={isDisabled}>\n <IconDate />\n </Button>\n </Aria.Group>\n );\n};\n\nexport default DateInput;\n"],"mappings":";;;;;;;;;;AAYA,IAAa,aAAiC,UAAU;CACtD,MAAM,EAAE,YAAY,QAAQ;CAE5B,OACE,qBAAC,KAAK,OAAN;EAAY,WAAW,yBAAO;EAA9B,UAAA,CACE,oBAAC,aAAD,EAAY,IAAM,CAAA,GAClB,oBAAC,QAAD;GAAQ,SAAQ;GAAQ,OAAM;GAAwB;GACpD,UAAA,oBAAC,UAAD,CAAW,CAAA;EACL,CAAA,CACE;;AAEhB"}
1
+ {"version":3,"file":"DateInput.mjs","names":["styles","Input"],"sources":["../../../../../../../../../src/components/DatePicker/components/DateInput/DateInput.tsx"],"sourcesContent":["import { type FC, type Ref } from \"react\";\nimport styles from \"./DateInput.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport { Button } from \"@/components/Button\";\nimport { IconDate } from \"@/components/Icon/components/icons\";\nimport Input from \"@/components/DateInput\";\n\nexport interface DateInputProps {\n isDisabled?: boolean;\n ref?: Ref<HTMLSpanElement>;\n}\n\nexport const DateInput: FC<DateInputProps> = (props) => {\n const { isDisabled, ref } = props;\n\n return (\n <Aria.Group className={styles.dateInput}>\n <Input ref={ref} />\n <Button variant=\"plain\" color=\"secondary\" isDisabled={isDisabled}>\n <IconDate />\n </Button>\n </Aria.Group>\n );\n};\n\nexport default DateInput;\n"],"mappings":";;;;;;;;;;AAYA,IAAa,aAAiC,UAAU;CACtD,MAAM,EAAE,YAAY,QAAQ;CAE5B,OACE,qBAAC,KAAK,OAAN;EAAY,WAAWA,yBAAO;EAA9B,UAAA,CACE,oBAACC,aAAD,EAAY,IAAM,CAAA,GAClB,oBAAC,QAAD;GAAQ,SAAQ;GAAQ,OAAM;GAAwB;GACpD,UAAA,oBAAC,UAAD,CAAW,CAAA;EACL,CAAA,CACE;;AAEhB"}
@@ -16,15 +16,16 @@ import * as Aria from "react-aria-components";
16
16
  /** @flr-generate all */
17
17
  var DateRangePicker = flowComponent("DateRangePicker", (props) => {
18
18
  const { children, className, onChange, ref, withDatePickerPresets = false, ...rest } = useControlledHostValueProps(props, null);
19
- const popoverController = useOverlayController("Popover");
20
- const { FieldErrorView, FieldErrorCaptureContext, fieldProps, fieldPropsContext } = useFieldComponent(props, "DateRangePicker");
21
- const rootClassName = clsx(fieldProps.className, className);
19
+ const popoverController = useOverlayController("Popover", { reuseControllerFromContext: false });
20
+ const { FieldErrorView, FieldErrorCaptureContext, wrapperProps, controlProps, fieldPropsContext } = useFieldComponent(props, "DateRangePicker");
21
+ const rootClassName = clsx(wrapperProps.className, className);
22
22
  const onDatePickerChange = (value) => {
23
23
  if (onChange) onChange(value);
24
24
  popoverController.close();
25
25
  };
26
26
  return /* @__PURE__ */ jsxs(Aria.DateRangePicker, {
27
27
  ...rest,
28
+ "aria-describedby": controlProps["aria-describedby"],
28
29
  className: rootClassName,
29
30
  onOpenChange: (v) => popoverController.setOpen(v),
30
31
  isOpen: popoverController.isOpen,