twenty-ui 2.47.0 → 2.49.0

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 (336) hide show
  1. package/README.md +27 -2
  2. package/dist/{AllIcons-DrlkKKQf.cjs → AllIcons-Cyd7721G.cjs} +1 -1
  3. package/dist/{AllIcons-G3nKeM41.js → AllIcons-D132B8_i.js} +1 -1
  4. package/dist/Avatar-C6WxBgjS.cjs +1 -0
  5. package/dist/{Avatar-D-QA0RE5.js → Avatar-ifVlxbx_.js} +18 -17
  6. package/dist/{Button-Cs07psdD.js → Button-DIw804CX.js} +1 -1
  7. package/dist/{Button-COxEKIHL.cjs → Button-DTm1WDzp.cjs} +1 -1
  8. package/dist/Dropdown-1OAJvS1f.js +1000 -0
  9. package/dist/Dropdown-Bl4OXCf9.cjs +1 -0
  10. package/dist/{ListItem-CXu35dzp.js → ListItem-DizNUBT8.js} +4 -4
  11. package/dist/{ListItem-q6DHGlev.cjs → ListItem-DwBb-I1D.cjs} +1 -1
  12. package/dist/ListItem.module-BJ9Ttjrc.js +34 -0
  13. package/dist/ListItem.module-CO4u2oeF.cjs +1 -0
  14. package/dist/OverflowingTextWithTooltip-BmUROIah.js +90 -0
  15. package/dist/OverflowingTextWithTooltip-Z2daM0_x.cjs +1 -0
  16. package/dist/{ProgressBar-D_3Gia0E.js → ProgressBar-B3xACTV2.js} +1 -1
  17. package/dist/{ProgressBar-oF1qVHFx.cjs → ProgressBar-OpSMnDBz.cjs} +1 -1
  18. package/dist/{Radio-BMoQHDe7.js → Radio-BEAztmPu.js} +1 -1
  19. package/dist/{Radio-D_YUizSv.cjs → Radio-Dx6b4SYZ.cjs} +1 -1
  20. package/dist/ResizeHandle-B1MuHTNA.cjs +1 -0
  21. package/dist/{ResizeHandle-Bjg4R0c-.js → ResizeHandle-B30OYZxS.js} +57 -55
  22. package/dist/Shortcut-Bp9iDdQg.js +73 -0
  23. package/dist/Shortcut-N8TELGPI.cjs +1 -0
  24. package/dist/TabsTabContent-Co27Y2TU.cjs +1 -0
  25. package/dist/TabsTabContent-DVcObDp6.js +39 -0
  26. package/dist/{TintedIconTile-4BGa8g8n.js → TintedIconTile-B1XDtGrF.js} +1 -1
  27. package/dist/{TintedIconTile-CU2hCerq.cjs → TintedIconTile-DO1XJXCQ.cjs} +1 -1
  28. package/dist/Tooltip-Bg9Uk01p.cjs +1 -0
  29. package/dist/Tooltip-cLCgtFBF.js +124 -0
  30. package/dist/components/__stories__/reading-direction/DirectionalLayoutExample.d.ts +3 -1
  31. package/dist/components/code-editor/CodeEditor/CodeEditor.d.ts +1 -1
  32. package/dist/components/code-editor/CodeEditor/__stories__/ControlledCodeEditor.d.ts +2 -0
  33. package/dist/components/code-editor/CodeEditor/__stories__/ModelCodeEditor.d.ts +2 -0
  34. package/dist/components/code-editor/CodeEditor/__stories__/ResizableCodeEditor.d.ts +2 -0
  35. package/dist/components/code-editor/CodeEditor/__stories__/ThemedCodeEditor.d.ts +2 -0
  36. package/dist/components/code-editor/CodeEditor/__stories__/UnmountingCodeEditor.d.ts +2 -0
  37. package/dist/components/code-editor/CodeEditor/__stories__/waitForCodeEditorContent.d.ts +4 -1
  38. package/dist/components/code-editor/CodeEditor/internal/CodeEditorAutoHeightEffect.d.ts +9 -0
  39. package/dist/components/code-editor/CodeEditor/internal/CodeEditorLifecycleEffect.d.ts +11 -0
  40. package/dist/components/code-editor/CodeEditor/internal/CodeEditorLoaderConfigurationEffect.d.ts +7 -0
  41. package/dist/components/code-editor/CodeEditor/internal/CodeEditorMarkersEffect.d.ts +10 -0
  42. package/dist/components/code-editor/CodeEditor/internal/CodeEditorResizableHeightEffect.d.ts +11 -0
  43. package/dist/components/code-editor/CodeEditor/internal/CodeEditorThemeEffect.d.ts +10 -0
  44. package/dist/components/code-editor/CodeEditor/internal/constants/CodeEditorDefaultHeight.d.ts +1 -0
  45. package/dist/components/code-editor/CodeEditor/internal/types/ResizedCodeEditorHeight.d.ts +4 -0
  46. package/dist/components/code-editor/CodeEditor/internal/useCodeEditorHeight.d.ts +13 -0
  47. package/dist/components/code-editor/CodeEditor/internal/utils/defineCodeEditorDefaultTheme.d.ts +7 -0
  48. package/dist/components/code-editor/CodeEditor/internal/utils/getBaseCodeEditorTheme.d.ts +4 -1
  49. package/dist/components/code-editor/CodeEditor/internal/utils/getBoundedCodeEditorHeight.d.ts +1 -0
  50. package/dist/components/code-editor/CodeEditor/internal/utils/getCurrentCodeEditorHeight.d.ts +7 -0
  51. package/dist/components/code-editor/CodeEditor/internal/utils/getResizableCodeEditorHeight.d.ts +5 -0
  52. package/dist/components/code-editor/CodeEditor/types/CodeEditorProps.d.ts +4 -2
  53. package/dist/components/code-editor.cjs +1 -1
  54. package/dist/components/code-editor.mjs +268 -155
  55. package/dist/components/data-display.cjs +1 -1
  56. package/dist/components/data-display.mjs +2 -2
  57. package/dist/components/feedback/Toast/internal/components/ToastCountdownEffect.d.ts +4 -3
  58. package/dist/components/feedback/Toast/internal/components/ToastProviderLifecycleEffect.d.ts +3 -0
  59. package/dist/components/feedback/Toast/internal/constants/DefaultToastDuration.d.ts +1 -0
  60. package/dist/components/feedback/Toast/internal/contexts/ToastContext.d.ts +60 -1
  61. package/dist/components/feedback/Toast/internal/contexts/ToastTimingContext.d.ts +12 -2
  62. package/dist/components/feedback/Toast/internal/hooks/useToastContext.d.ts +60 -1
  63. package/dist/components/feedback/Toast/internal/hooks/useToastCountdown.d.ts +26 -0
  64. package/dist/components/feedback/Toast/internal/stores/createToastStore.d.ts +60 -1
  65. package/dist/components/feedback/Toast/internal/utils/assertValidToastLimit.d.ts +1 -0
  66. package/dist/components/feedback/Toast/internal/utils/completeToastExit.d.ts +3 -2
  67. package/dist/components/feedback/Toast/internal/utils/createToastCountdownStore.d.ts +22 -0
  68. package/dist/components/feedback/Toast/internal/utils/createToastLifecycle.d.ts +62 -0
  69. package/dist/components/feedback/Toast/internal/utils/dismissToasts.d.ts +3 -2
  70. package/dist/components/feedback/Toast/internal/utils/updateToastLimit.d.ts +5 -0
  71. package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleControls.d.ts +7 -0
  72. package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleExample.d.ts +2 -0
  73. package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleExampleProps.d.ts +7 -0
  74. package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleTimingOverrideExample.d.ts +9 -0
  75. package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleUnrelatedNotificationActions.d.ts +5 -0
  76. package/dist/components/feedback/Toaster/__stories__/ToasterPortalExample.d.ts +5 -0
  77. package/dist/components/feedback/Toaster/__stories__/ToasterProviderLayoutReplayEffect.d.ts +4 -0
  78. package/dist/components/feedback/Toaster/__stories__/ToasterProviderPassiveReplayEffect.d.ts +4 -0
  79. package/dist/components/feedback/Toaster/__stories__/ToasterProviderReplayExample.d.ts +6 -0
  80. package/dist/components/feedback/Toaster/__stories__/ToasterProviderSuspenseExample.d.ts +4 -0
  81. package/dist/components/feedback/Toaster/__stories__/ToasterProviderSuspension.d.ts +5 -0
  82. package/dist/components/feedback/Toaster/internal/ToasterItemExitEffect.d.ts +2 -1
  83. package/dist/components/feedback.cjs +1 -1
  84. package/dist/components/feedback.mjs +1 -1
  85. package/dist/components/input/CountrySelect/CountrySelect.d.ts +5 -2
  86. package/dist/components/input/CountrySelect/__stories__/CountrySelectPartsExample.d.ts +11 -0
  87. package/dist/components/input/CountrySelect/internal/CountrySelectComponent.d.ts +2 -0
  88. package/dist/components/input/CountrySelect/internal/CountrySelectContext.d.ts +2 -0
  89. package/dist/components/input/CountrySelect/internal/CountrySelectContextValue.d.ts +11 -0
  90. package/dist/components/input/CountrySelect/internal/CountrySelectDropdown.d.ts +4 -0
  91. package/dist/components/input/CountrySelect/internal/CountrySelectOptions.d.ts +2 -11
  92. package/dist/components/input/CountrySelect/internal/CountrySelectOptionsContent.d.ts +2 -0
  93. package/dist/components/input/CountrySelect/internal/CountrySelectRoot.d.ts +2 -0
  94. package/dist/components/input/CountrySelect/internal/CountrySelectTrigger.d.ts +2 -0
  95. package/dist/components/input/CountrySelect/internal/NO_COUNTRY_SELECTION_VALUE.d.ts +1 -0
  96. package/dist/components/input/CountrySelect/internal/PreparedCountryChoice.d.ts +5 -0
  97. package/dist/components/input/CountrySelect/internal/getCountrySelectionValue.d.ts +1 -0
  98. package/dist/components/input/CountrySelect/internal/useCountrySelectContextOrThrow.d.ts +1 -0
  99. package/dist/components/input/CountrySelect/types/CountryChoice.d.ts +1 -0
  100. package/dist/components/input/CountrySelect/types/CountrySelectOptionsProps.d.ts +10 -0
  101. package/dist/components/input/CountrySelect/types/CountrySelectOptionsState.d.ts +4 -0
  102. package/dist/components/input/CountrySelect/types/CountrySelectProps.d.ts +7 -13
  103. package/dist/components/input/CountrySelect/types/CountrySelectRootProps.d.ts +12 -0
  104. package/dist/components/input/CountrySelect/types/CountrySelectTriggerProps.d.ts +6 -0
  105. package/dist/components/input/CurrencyPicker/CurrencyPicker.d.ts +4 -3
  106. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerChangingDefaultExample.d.ts +5 -0
  107. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledExample.d.ts +5 -0
  108. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledSearchExample.d.ts +5 -0
  109. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerExample.d.ts +3 -4
  110. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerListLabelExample.d.ts +1 -0
  111. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerRootStateExample.d.ts +1 -0
  112. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerContext.d.ts +11 -0
  113. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerOptions.d.ts +1 -1
  114. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerRoot.d.ts +2 -0
  115. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerShorthand.d.ts +2 -0
  116. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerTrigger.d.ts +1 -1
  117. package/dist/components/input/CurrencyPicker/internal/PreparedCurrencyPickerOption.d.ts +7 -0
  118. package/dist/components/input/CurrencyPicker/internal/getCurrencyPickerSearchText.d.ts +2 -0
  119. package/dist/components/input/CurrencyPicker/internal/useCurrencyPickerContextOrThrow.d.ts +7 -0
  120. package/dist/components/input/CurrencyPicker/types/CurrencyPickerChangeEventDetails.d.ts +2 -0
  121. package/dist/components/input/CurrencyPicker/types/CurrencyPickerOption.d.ts +1 -0
  122. package/dist/components/input/CurrencyPicker/types/CurrencyPickerOptionsProps.d.ts +6 -5
  123. package/dist/components/input/CurrencyPicker/types/CurrencyPickerProps.d.ts +10 -0
  124. package/dist/components/input/CurrencyPicker/types/CurrencyPickerRootProps.d.ts +17 -0
  125. package/dist/components/input/CurrencyPicker/types/CurrencyPickerState.d.ts +6 -0
  126. package/dist/components/input/CurrencyPicker/types/CurrencyPickerTriggerProps.d.ts +3 -2
  127. package/dist/components/input/IconButton/__stories__/IconButtonExample.d.ts +7 -0
  128. package/dist/components/input/PhoneCountryPicker/PhoneCountryPicker.d.ts +5 -3
  129. package/dist/components/input/PhoneCountryPicker/__stories__/PhoneCountryPickerExample.d.ts +7 -3
  130. package/dist/components/input/PhoneCountryPicker/__stories__/testDisabledPhoneCountryPicker.d.ts +5 -0
  131. package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryCallingCodeDirection.d.ts +3 -0
  132. package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryNullSelection.d.ts +5 -0
  133. package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountrySelection.d.ts +5 -0
  134. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerContext.d.ts +9 -0
  135. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerOptions.d.ts +1 -1
  136. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerRoot.d.ts +2 -0
  137. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerTrigger.d.ts +1 -1
  138. package/dist/components/input/PhoneCountryPicker/internal/PreparedPhoneCountryOption.d.ts +5 -0
  139. package/dist/components/input/PhoneCountryPicker/internal/getPhoneCountryOptionTooltipLabel.d.ts +2 -0
  140. package/dist/components/input/PhoneCountryPicker/internal/matchesPhoneCountrySearch.d.ts +6 -0
  141. package/dist/components/input/PhoneCountryPicker/internal/usePhoneCountryPickerContextOrThrow.d.ts +7 -0
  142. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryOption.d.ts +1 -0
  143. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerOptionsProps.d.ts +4 -5
  144. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerProps.d.ts +10 -0
  145. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerRootProps.d.ts +12 -0
  146. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerTriggerProps.d.ts +1 -3
  147. package/dist/components/input/SearchInput/SearchInput.d.ts +1 -1
  148. package/dist/components/input/SearchInput/types/SearchInputProps.d.ts +2 -3
  149. package/dist/components/input/SegmentedControl/SegmentedControl.d.ts +1 -1
  150. package/dist/components/input/SegmentedControl/types/SegmentedControlProps.d.ts +2 -0
  151. package/dist/components/input/SegmentedControl/types/SegmentedControlSize.d.ts +1 -0
  152. package/dist/components/input/index.d.ts +11 -0
  153. package/dist/components/input.cjs +1 -1
  154. package/dist/components/input.mjs +13 -13
  155. package/dist/components/layout/OverflowingList/OverflowingList.d.ts +1 -1
  156. package/dist/components/layout/OverflowingList/__stories__/OverflowingListActionsExample.d.ts +7 -0
  157. package/dist/components/layout/OverflowingList/__stories__/OverflowingListCanceledCloseExample.d.ts +1 -0
  158. package/dist/components/layout/OverflowingList/__stories__/OverflowingListControlledExample.d.ts +1 -0
  159. package/dist/components/layout/OverflowingList/__stories__/OverflowingListControlledStateExample.d.ts +1 -0
  160. package/dist/components/layout/OverflowingList/__stories__/OverflowingListDisabledTriggerFocusExample.d.ts +1 -0
  161. package/dist/components/layout/OverflowingList/__stories__/OverflowingListEventBlockingExample.d.ts +7 -0
  162. package/dist/components/layout/OverflowingList/__stories__/OverflowingListFocusExample.d.ts +1 -0
  163. package/dist/components/layout/OverflowingList/__stories__/OverflowingListInstanceCleanupExample.d.ts +1 -0
  164. package/dist/components/layout/OverflowingList/__stories__/OverflowingListStateExample.d.ts +1 -0
  165. package/dist/components/layout/OverflowingList/__stories__/OverflowingListTriggerRefExample.d.ts +1 -0
  166. package/dist/components/layout/OverflowingList/internal/OverflowingListItem.d.ts +8 -2
  167. package/dist/components/layout/OverflowingList/internal/OverflowingListItemFocusEffect.d.ts +8 -0
  168. package/dist/components/layout/OverflowingList/internal/OverflowingListLayoutEffect.d.ts +16 -0
  169. package/dist/components/layout/OverflowingList/internal/OverflowingListPopupTarget.d.ts +10 -0
  170. package/dist/components/layout/OverflowingList/internal/focusOverflowingListFallback.d.ts +8 -0
  171. package/dist/components/layout/OverflowingList/internal/measureItemWidths.d.ts +1 -2
  172. package/dist/components/layout/OverflowingList/internal/measureOverflowingListLayout.d.ts +9 -0
  173. package/dist/components/layout/OverflowingList/internal/types/OverflowingListLayout.d.ts +4 -0
  174. package/dist/components/layout/OverflowingList/internal/useFocusedElementUnmountRef.d.ts +1 -1
  175. package/dist/components/layout/OverflowingList/internal/useOverflowingListFocus.d.ts +30 -0
  176. package/dist/components/layout/OverflowingList/internal/useOverflowingListLayout.d.ts +6 -6
  177. package/dist/components/layout/OverflowingList/types/OverflowingListProps.d.ts +7 -2
  178. package/dist/components/layout.cjs +1 -1
  179. package/dist/components/layout.mjs +1 -1
  180. package/dist/components/navigation/Dropdown/Dropdown.d.ts +5 -4
  181. package/dist/components/navigation/Dropdown/__stories__/DropdownIconGridExample.d.ts +3 -0
  182. package/dist/components/navigation/Dropdown/__stories__/DropdownSelectionGroupsExample.d.ts +1 -0
  183. package/dist/components/navigation/Dropdown/internal/DropdownActionItem.d.ts +1 -1
  184. package/dist/components/navigation/Dropdown/internal/DropdownContent.d.ts +1 -1
  185. package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +12 -6
  186. package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +1 -1
  187. package/dist/components/navigation/Dropdown/internal/DropdownOptionItemOwner.d.ts +7 -0
  188. package/dist/components/navigation/Dropdown/internal/DropdownRowFocus.d.ts +5 -0
  189. package/dist/components/navigation/Dropdown/internal/DropdownRowsEffect.d.ts +5 -0
  190. package/dist/components/navigation/Dropdown/internal/DropdownSelectionContext.d.ts +2 -0
  191. package/dist/components/navigation/Dropdown/internal/DropdownSelectionContextValue.d.ts +9 -0
  192. package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroup.d.ts +2 -0
  193. package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroupEffect.d.ts +11 -0
  194. package/dist/components/navigation/Dropdown/internal/DropdownSubmenuTrigger.d.ts +1 -1
  195. package/dist/components/navigation/Dropdown/internal/createDropdownSelectionEventDetails.d.ts +5 -0
  196. package/dist/components/navigation/Dropdown/internal/dropdownItemActivation.d.ts +11 -0
  197. package/dist/components/navigation/Dropdown/internal/getDropdownItemExplicitId.d.ts +5 -0
  198. package/dist/components/navigation/Dropdown/internal/getDropdownOptionItemRole.d.ts +9 -0
  199. package/dist/components/navigation/Dropdown/internal/getDropdownRows.d.ts +1 -0
  200. package/dist/components/navigation/Dropdown/internal/getDropdownSearch.d.ts +1 -0
  201. package/dist/components/navigation/Dropdown/internal/getDropdownSelectionGroupState.d.ts +6 -0
  202. package/dist/components/navigation/Dropdown/internal/getDropdownTabStopRowId.d.ts +4 -0
  203. package/dist/components/navigation/Dropdown/internal/getTrailingFocusGuard.d.ts +1 -0
  204. package/dist/components/navigation/Dropdown/internal/isDropdownDismissPrevented.d.ts +2 -1
  205. package/dist/components/navigation/Dropdown/internal/isDropdownOptionItemSelected.d.ts +6 -0
  206. package/dist/components/navigation/Dropdown/internal/isDropdownRow.d.ts +4 -0
  207. package/dist/components/navigation/Dropdown/internal/isEnabledDropdownItem.d.ts +4 -0
  208. package/dist/components/navigation/Dropdown/internal/useDropdownItemFocus.d.ts +0 -1
  209. package/dist/components/navigation/Dropdown/internal/useDropdownKeyboardNavigation.d.ts +1 -6
  210. package/dist/components/navigation/Dropdown/internal/useDropdownSelections.d.ts +12 -0
  211. package/dist/components/navigation/Dropdown/types/DropdownOptionItemProps.d.ts +7 -2
  212. package/dist/components/navigation/Dropdown/types/DropdownOptionItemSelectEventDetails.d.ts +2 -0
  213. package/dist/components/navigation/Dropdown/types/DropdownOptionItemState.d.ts +5 -0
  214. package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupChangeEventDetails.d.ts +7 -0
  215. package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupProps.d.ts +21 -0
  216. package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupState.d.ts +7 -0
  217. package/dist/components/navigation/index.d.ts +5 -0
  218. package/dist/components/navigation.cjs +1 -1
  219. package/dist/components/navigation.mjs +2 -2
  220. package/dist/components/settings.cjs +1 -1
  221. package/dist/components/settings.mjs +1 -1
  222. package/dist/components.cjs +1 -1
  223. package/dist/components.mjs +22 -22
  224. package/dist/data-display-BSKGlijb.cjs +1 -0
  225. package/dist/{data-display-DU3G8ZyI.js → data-display-BtXCGOGw.js} +82 -81
  226. package/dist/data-display-DtXIhJ4B.js +184 -0
  227. package/dist/data-display-XV3ht1rC.cjs +2 -0
  228. package/dist/doNotTranslate-BSVT8Xyd.js +4 -0
  229. package/dist/doNotTranslate-CHE7WmRS.cjs +1 -0
  230. package/dist/feedback-Cs-38OH4.cjs +1 -0
  231. package/dist/feedback-DTyVVcTb.js +665 -0
  232. package/dist/icon/components/TablerIcons.d.ts +1 -1
  233. package/dist/icon/constants/TwentyIconDictionary.d.ts +7 -7
  234. package/dist/icon/index.d.ts +1 -1
  235. package/dist/{icon-JuDK6Wxr.cjs → icon-BNcdwwdl.cjs} +1 -1
  236. package/dist/{icon-BdXwnJA6.js → icon-CUE-QGQK.js} +129 -128
  237. package/dist/icon.cjs +1 -1
  238. package/dist/icon.mjs +77 -76
  239. package/dist/index.cjs +1 -1
  240. package/dist/index.mjs +222 -220
  241. package/dist/{input-Bnu5kNjg.cjs → input-B_rBplmn.cjs} +1 -1
  242. package/dist/input-BrjD91wv.js +785 -0
  243. package/dist/input-ChlFcqIS.cjs +1 -0
  244. package/dist/{input-vl6yK36n.js → input-D1oyk0tD.js} +4 -4
  245. package/dist/layout-CthYckvl.cjs +1 -0
  246. package/dist/layout-DQcjBu08.js +439 -0
  247. package/dist/{navigation-itBinyPi.js → navigation-B6nka3bW.js} +127 -130
  248. package/dist/navigation-CIVYqPc5.js +132 -0
  249. package/dist/navigation-CflGBYv-.cjs +1 -0
  250. package/dist/navigation-DoInK0Sp.cjs +1 -0
  251. package/dist/preventDismissingClickActivation-AaqHBLnW.js +45 -0
  252. package/dist/preventDismissingClickActivation-CIhWvKCu.cjs +1 -0
  253. package/dist/primitives/data-display.cjs +1 -1
  254. package/dist/primitives/data-display.mjs +2 -2
  255. package/dist/primitives/feedback.cjs +1 -1
  256. package/dist/primitives/feedback.mjs +1 -1
  257. package/dist/primitives/input/Radio/__stories__/RadioCardContent.d.ts +8 -0
  258. package/dist/primitives/input.cjs +1 -1
  259. package/dist/primitives/input.mjs +3 -3
  260. package/dist/primitives/layout/ResizeHandle/__stories__/ResizableNotesExample.d.ts +2 -0
  261. package/dist/primitives/layout.cjs +1 -1
  262. package/dist/primitives/layout.mjs +1 -1
  263. package/dist/primitives/navigation.cjs +1 -1
  264. package/dist/primitives/navigation.mjs +2 -2
  265. package/dist/primitives/surfaces/Tooltip/Tooltip.d.ts +1 -1
  266. package/dist/primitives/surfaces/Tooltip/internal/TooltipPopup.d.ts +1 -1
  267. package/dist/primitives/surfaces/Tooltip/types/TooltipPopupProps.d.ts +2 -0
  268. package/dist/primitives/surfaces.cjs +1 -1
  269. package/dist/primitives/surfaces.mjs +2 -2
  270. package/dist/primitives/typography/OverflowingTextWithTooltip/OverflowingTextTooltipModeProvider.d.ts +6 -0
  271. package/dist/primitives/typography/OverflowingTextWithTooltip/internal/OverflowingTextTooltipModeContext.d.ts +2 -0
  272. package/dist/primitives/typography/OverflowingTextWithTooltip/internal/isElementOverflowing.d.ts +1 -0
  273. package/dist/primitives/typography/OverflowingTextWithTooltip/types/OverflowingTextTooltipMode.d.ts +1 -0
  274. package/dist/primitives/typography/Shortcut/Shortcut.d.ts +1 -1
  275. package/dist/primitives/typography/Shortcut/internal/getShortcutPresentation.d.ts +1 -1
  276. package/dist/primitives/typography/Shortcut/types/ShortcutFormatOptions.d.ts +1 -0
  277. package/dist/primitives/typography/index.d.ts +2 -0
  278. package/dist/primitives/typography.cjs +1 -1
  279. package/dist/primitives/typography.mjs +10 -9
  280. package/dist/primitives.cjs +1 -1
  281. package/dist/primitives.mjs +37 -36
  282. package/dist/{settings-CC-2gcAx.js → settings-BgVuLpg9.js} +1 -1
  283. package/dist/{settings-BiSAY2oN.cjs → settings-CPXhrmbK.cjs} +1 -1
  284. package/dist/style.css +1 -1
  285. package/dist/surfaces-0rL5DoHt.cjs +1 -0
  286. package/dist/{surfaces-DZ2A-Nb9.js → surfaces-BLsR5ka0.js} +54 -54
  287. package/dist/testing/GroupedCatalog.d.ts +14 -0
  288. package/dist/testing/index.d.ts +1 -0
  289. package/dist/testing.cjs +1 -1
  290. package/dist/testing.mjs +96 -66
  291. package/dist/typography-DT2eKLvd.js +11 -0
  292. package/dist/typography-bKeSMuJd.cjs +1 -0
  293. package/dist/useIsMobile-Byp9AIq-.cjs +1 -0
  294. package/dist/useIsMobile-D1ImfQnE.js +38 -0
  295. package/dist/utilities/internal/doNotTranslate.d.ts +1 -0
  296. package/dist/utilities-BKCMZyqZ.js +53 -0
  297. package/dist/utilities-xZh8D2gd.cjs +1 -0
  298. package/dist/utilities.cjs +1 -1
  299. package/dist/utilities.mjs +3 -3
  300. package/package.json +3 -3
  301. package/dist/Avatar-CQhIEazb.cjs +0 -1
  302. package/dist/Dropdown-BBUGkQQV.cjs +0 -1
  303. package/dist/Dropdown-CScN_olN.js +0 -784
  304. package/dist/ListItem.module-Ar-vZ7Qu.js +0 -34
  305. package/dist/ListItem.module-B8NeDH1P.cjs +0 -1
  306. package/dist/OverflowingTextWithTooltip-Be2-wCcZ.js +0 -88
  307. package/dist/OverflowingTextWithTooltip-BlufG-6n.cjs +0 -1
  308. package/dist/ResizeHandle-CNlQ4TEE.cjs +0 -1
  309. package/dist/Shortcut-DKfB0kej.js +0 -71
  310. package/dist/Shortcut-ZuZ-KYSk.cjs +0 -1
  311. package/dist/TabsTabContent-DZUNi_iE.cjs +0 -1
  312. package/dist/TabsTabContent-s6J5bZ3R.js +0 -39
  313. package/dist/Tooltip-BMkznyoi.js +0 -120
  314. package/dist/Tooltip-JOYVeSsf.cjs +0 -1
  315. package/dist/components/navigation/Dropdown/internal/DropdownSearchTargetEffect.d.ts +0 -5
  316. package/dist/data-display-BMV-nC-9.js +0 -181
  317. package/dist/data-display-BkujQe5v.cjs +0 -1
  318. package/dist/data-display-DjhAHvj1.cjs +0 -2
  319. package/dist/feedback-B5x8tmnG.cjs +0 -1
  320. package/dist/feedback-DhilJ_fX.js +0 -509
  321. package/dist/input-BEKjAOjS.cjs +0 -1
  322. package/dist/input-BUgnp6eA.js +0 -559
  323. package/dist/layout-BKHabkTu.js +0 -267
  324. package/dist/layout-wuIu4rJ3.cjs +0 -1
  325. package/dist/navigation-B1hPNYv2.cjs +0 -1
  326. package/dist/navigation-Dg46Wr5m.js +0 -131
  327. package/dist/navigation-WsiYsmaq.cjs +0 -1
  328. package/dist/preventDismissingClickActivation-CzWqpjiX.js +0 -44
  329. package/dist/preventDismissingClickActivation-DZxTSLV3.cjs +0 -1
  330. package/dist/surfaces-vyAhk2Gw.cjs +0 -1
  331. package/dist/typography-8DF9mq2w.cjs +0 -1
  332. package/dist/typography-DmY7-GzQ.js +0 -5
  333. package/dist/useIsMobile-DxOPI2_E.cjs +0 -1
  334. package/dist/useIsMobile-nrufFzMb.js +0 -37
  335. package/dist/utilities-BeLfNQ0Q.cjs +0 -1
  336. package/dist/utilities-CEi9I09B.js +0 -52
@@ -1 +0,0 @@
1
- const y=require("./theme-1XkFz8Qu.cjs"),u=require("./isDefined-DS2Q42p5.cjs"),ae=require("./mergeClassNames-D4lshrT6.cjs"),D=require("./Button-COxEKIHL.cjs"),S=require("./ProgressBar-oF1qVHFx.cjs"),g=require("./isRenderableSlot-Guryb6Nf.cjs"),ce=require("./useProvidedTextDirection-PVaoQCLH.cjs"),ue=require("./OverflowingTextWithTooltip-BlufG-6n.cjs"),le=require("./Separator-UJVlrTzw.cjs");let W=require("@base-ui/react/use-render"),q=require("@sniptt/guards"),P=require("clsx"),d=require("react"),s=require("react/jsx-runtime"),K=require("@base-ui/utils/store"),de=require("react-dom"),h=require("@tabler/icons-react");var ve="_action_3r2bm_1",_e={action:ve},me=({className:e,...t})=>(0,s.jsx)(D.Button,{...t,size:"sm",variant:"ghost",className:ae.mergeClassNames(_e.action,e)}),fe="_container_1ix4w_1",pe="_containerFullWidth_1ix4w_40",Te="_header_1ix4w_44",xe="_iconContainer_1ix4w_53",he="_title_1ix4w_63",ge="_descriptionWrapper_1ix4w_75",be="_descriptionWrapperWithIcon_1ix4w_82",Ce="_descriptionWrapperWithAction_1ix4w_86",je="_description_1ix4w_75",we="_footer_1ix4w_99",Ne="_closeButton_1ix4w_106",m={container:fe,containerFullWidth:pe,header:Te,iconContainer:xe,title:he,descriptionWrapper:ge,descriptionWrapperWithIcon:be,descriptionWrapperWithAction:Ce,description:je,footer:we,closeButton:Ne},Pe=({status:e="info",variant:t="soft",color:r=S.FEEDBACK_STATUS_COLORS[e],title:o,description:n,fullWidth:i=!1,icon:a=(0,s.jsx)(h.IconHelp,{size:y.themeCssVariables.icon.size.md,"aria-hidden":"true"}),action:c,closeLabel:l="Close",onDismiss:v,className:T,render:f,ref:N,..._})=>{const b=g.isRenderableSlot(a),C=g.isRenderableSlot(c);return(0,W.useRender)({render:f,ref:N,state:{status:e,variant:t,color:r},props:{..._,className:(0,P.clsx)(m.container,i&&m.containerFullWidth,T),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:m.header,children:[b&&(0,s.jsx)("div",{className:m.iconContainer,children:a}),(0,s.jsx)("div",{className:m.title,children:o}),u.isDefined(v)&&(0,s.jsx)(D.Button,{type:"button",startIcon:(0,s.jsx)(h.IconX,{"aria-hidden":"true"}),className:m.closeButton,variant:"ghost",size:"sm","aria-label":l,onClick:()=>v()})]}),g.isRenderableSlot(n)&&(0,s.jsx)("div",{className:(0,P.clsx)(m.descriptionWrapper,b&&m.descriptionWrapperWithIcon,C&&m.descriptionWrapperWithAction),children:(0,s.jsx)("div",{className:m.description,children:n})}),C&&(0,s.jsx)("div",{className:m.footer,children:c})]})}})},qe=Object.assign(Pe,{Action:me}),Ie="_banner_17vm4_1",Ae="_embedded_17vm4_6",De="_bannerContent_17vm4_10",Se="_icon_17vm4_18",Re="_bannerText_17vm4_28",Be="_compact_17vm4_33",j={banner:Ie,embedded:Ae,bannerContent:De,icon:Se,bannerText:Re,compact:Be},Ee=({children:e,layout:t="standard",variant:r="soft",embedded:o=!1,icon:n=(0,s.jsx)(h.IconInfoCircle,{"aria-hidden":"true"}),className:i,...a})=>{const c=t==="compact",l=!c&&(0,q.isString)(e);return(0,s.jsx)(S.Banner,{...a,className:(0,P.clsx)(j.banner,c&&j.compact,o&&j.embedded,i),variant:r,"data-layout":t,children:(0,s.jsxs)("div",{className:j.bannerContent,children:[g.isRenderableSlot(n)&&(0,s.jsx)("span",{className:j.icon,children:n}),(0,s.jsx)("div",{className:j.bannerText,children:l?(0,s.jsx)(ue.OverflowingTextWithTooltip,{isFocusable:!0,text:(0,s.jsx)(s.Fragment,{children:e}),tooltipContent:e}):e})]})})},ye=Object.assign(Ee,{Action:S.Banner.Action}),I=e=>e.status==="visible",X=({store:e,toastsToClose:t,nextToasts:r=e.state.toasts})=>{const o=r.map(i=>t.includes(i)?{...i,status:"closing"}:i),n=e.state.mountedToasterCount>0;e.set("toasts",n?o:o.filter(I));for(const i of t)i.notification.onClose?.()},V=(0,d.createContext)(void 0),w=()=>{const e=(0,d.useContext)(V);if(!u.isDefined(e))throw new Error("Toast components must be used within a ToastProvider.");return e},G=()=>{const e=w();return{closeToast:r=>{const o=e.state.toasts.filter(n=>I(n)&&(!u.isDefined(r)||n.notification.id===r));(0,q.isNonEmptyArray)(o)&&X({store:e,toastsToClose:o})}}},U=0,We=()=>{const e=w();return{enqueueToast:(0,d.useMemo)(()=>{function t(r){if(!u.isDefined(r))return;const{dedupeKey:o,...n}=r,{toasts:i,limit:a}=e.state,c=i.filter(I),l=u.isDefined(o)?c.find(f=>f.dedupeKey===o):void 0;if(u.isDefined(l))return l.notification.id;U+=1;const v=`toast-${U}`,T=Math.max(0,c.length-a+1);return X({store:e,toastsToClose:c.slice(0,T),nextToasts:[...i,{notification:{...n,id:v},dedupeKey:o,status:"visible"}]}),v}return t},[e])}},Fe=({store:e,id:t,...r})=>{const o=e.state.toasts.find(a=>a.notification.id===t&&I(a)),n=Object.keys(r);if(!u.isDefined(o)||!(0,q.isNonEmptyArray)(n))return;const i=n.includes("duration")||u.isDefined(o.notification.progress)&&n.includes("progress")&&!u.isDefined(r.progress);e.set("toasts",e.state.toasts.map(a=>a===o?{...a,notification:{...a.notification,...r,id:t},...i?{durationRevision:(a.durationRevision??0)+1}:{}}:a))},Oe=()=>{const e=w();return{updateToast:(0,d.useCallback)(t=>Fe({store:e,...t}),[e])}},ke=()=>{const{closeToast:e}=G(),{enqueueToast:t}=We(),{updateToast:r}=Oe();return{enqueueToast:t,closeToast:e,updateToast:r}},Me="_root_181ka_1",$e="_progress_181ka_19",ze="_header_181ka_30",Le="_message_181ka_40",Ue="_icon_181ka_45",He="_actions_181ka_50",Ke="_description_181ka_56",Xe="_footer_181ka_65",Ve="_footerAction_181ka_69",Ge="_closeButton_181ka_76",p={root:Me,progress:$e,header:ze,message:Le,icon:Ue,actions:He,description:Ke,footer:Xe,footerAction:Ve,closeButton:Ge},J=(0,d.createContext)({durationRevision:0,isActive:!0}),Je=({clock:e,duration:t,progress:r,isPaused:o,onClose:n})=>{const{durationRevision:i,isActive:a}=(0,d.useContext)(J),c=u.isDefined(r);return(0,d.useLayoutEffect)(()=>{e.update({duration:t,durationRevision:i,isPaused:o,isProgress:c,isActive:a,onClose:n})},[e,t,i,o,c,a,n]),(0,d.useLayoutEffect)(()=>()=>e.stop(),[e]),null},Qe=({element:e,isFocused:t,onFocusChange:r})=>((0,d.useLayoutEffect)(()=>{if(!t||!u.isDefined(e))return;const o=()=>{e.contains(e.ownerDocument.activeElement)||r(!1)};o();const n=new MutationObserver(o);return n.observe(e,{childList:!0,subtree:!0}),()=>n.disconnect()},[e,t,r]),null),Q=e=>Number.isFinite(e)&&e>0,Ye="_countdown_1vuo8_1",Ze="_toastCountdown_1vuo8_1",et={countdown:Ye,toastCountdown:Ze},tt=({progress:e,duration:t,remainingDuration:r,revision:o,isPaused:n,barColor:i})=>u.isDefined(e)?(0,s.jsx)(S.ProgressBar,{value:e,barColor:i}):Q(t)?(0,s.jsx)("div",{className:et.countdown,"data-paused":n||void 0,style:{"--toast-countdown-color":i,"--toast-countdown-width":`${r/t*100}%`,"--toast-countdown-duration":`${r}ms`}},o):null,st=2**31-1,rt=({onChange:e})=>{let t,r=0,o,n,i=0,a=!1;const c=()=>{u.isDefined(o)&&(r=Math.max(0,r-(performance.now()-o)),o=void 0),clearTimeout(n),n=void 0},l=()=>{u.isDefined(t)&&(i+=1,e({duration:t.duration,remainingDuration:r,revision:i,isPaused:t.isPaused||!t.isActive}))},v=()=>{a||(c(),a=!0,r=0,l(),t?.onClose?.())},T=()=>u.isDefined(t)&&t.isActive&&!t.isPaused&&!t.isProgress&&Q(t.duration)&&!a,f=()=>{T()&&(o=performance.now(),n=setTimeout(()=>{if(c(),r>0){f();return}v()},Math.min(r,st)))};return{update:_=>{const b=!u.isDefined(t)||_.duration!==t.duration||_.durationRevision!==t.durationRevision||t.isProgress&&!_.isProgress,C=b||_.isProgress!==t?.isProgress||_.isPaused!==t?.isPaused||_.isActive!==t?.isActive,R=!u.isDefined(o)&&T();if(!C&&!R){t=_;return}c(),t=_,!a&&(b&&(r=Math.max(0,_.duration)),l(),f())},close:v,stop:c}},ot=({duration:e,isPaused:t})=>{const[r,o]=(0,d.useState)({duration:e,remainingDuration:e,revision:0,isPaused:t}),[n]=(0,d.useState)(()=>rt({onChange:o}));return{countdown:r,clock:n}},nt={neutral:h.IconAlertTriangle,error:h.IconAlertTriangle,success:h.IconSquareRoundedCheck,info:h.IconInfoCircle,warning:h.IconAlertTriangle},Y=({children:e,description:t,icon:r,iconLabel:o,action:n,progress:i,duration:a=6e3,onCancel:c,onClose:l,cancelLabel:v="Cancel",closeLabel:T="Close",status:f="neutral",role:N="status",className:_,onMouseEnter:b,onMouseLeave:C,onFocus:R,onBlur:Z,render:ee,ref:te,...se})=>{const F=y.useTheme(),[re,O]=(0,d.useState)(!1),[k,B]=(0,d.useState)(!1),[oe,ne]=(0,d.useState)(null),M=re||k,{countdown:A,clock:$}=ot({duration:a,isPaused:M}),ie=nt[f],z=F.snackBar[f==="neutral"?"default":f],L=(0,q.isUndefined)(r)?(0,s.jsx)(ie,{"aria-label":o,"aria-hidden":!u.isDefined(o),color:z.color,size:F.icon.size.md}):r;return(0,s.jsxs)(s.Fragment,{children:[(0,W.useRender)({render:ee,ref:[te??null,ne],props:{role:N,"aria-live":N==="alert"?"assertive":"polite",...se,className:(0,P.clsx)(p.root,_),onMouseEnter:x=>{O(!0),b?.(x)},onMouseLeave:x=>{O(!1),C?.(x)},onFocus:x=>{B(!0),R?.(x)},onBlur:x=>{x.currentTarget.contains(x.relatedTarget)||B(!1),Z?.(x)},children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:p.progress,"aria-hidden":!0,children:(0,s.jsx)(tt,{barColor:z.backgroundColor,progress:i,duration:A.duration,remainingDuration:A.remainingDuration,revision:A.revision,isPaused:A.isPaused})}),(0,s.jsxs)("div",{className:p.header,children:[g.isRenderableSlot(L)&&(0,s.jsx)("div",{className:p.icon,children:L}),(0,s.jsx)("div",{className:p.message,children:e}),(0,s.jsxs)("div",{className:p.actions,children:[u.isDefined(c)&&g.isRenderableSlot(v)&&(0,s.jsx)(D.Button,{onClick:c,size:"sm",variant:"ghost",style:{fontWeight:"var(--t-font-weight-regular)"},children:v}),u.isDefined(l)&&(0,s.jsx)(D.Button,{title:T,"aria-label":T,startIcon:(0,s.jsx)(h.IconX,{}),className:p.closeButton,variant:"ghost",size:"sm",onClick:$.close})]})]}),g.isRenderableSlot(t)&&(0,s.jsx)("div",{className:p.description,children:t}),g.isRenderableSlot(n)&&(0,s.jsxs)("div",{className:p.footer,children:[(0,s.jsx)(le.Separator,{}),(0,s.jsx)("div",{className:p.footerAction,children:n})]})]})}}),(0,s.jsx)(Qe,{element:oe,isFocused:k,onFocusChange:B}),(0,s.jsx)(Je,{clock:$,duration:a,progress:i,isPaused:M,onClose:l})]})},it=(e=3)=>{if(!(0,q.isPositiveInteger)(e))throw new Error("Toast limit must be a positive integer.");return new K.Store({toasts:[],limit:e,mountedToasterCount:0})},at=({children:e,limit:t=3})=>{const[r]=(0,d.useState)(()=>it(t));return(0,s.jsx)(V.Provider,{value:r,children:e})},ct="_root_1q2cc_1",ut="_item_1q2cc_20",lt="_itemContent_1q2cc_47",E={root:ct,item:ut,itemContent:lt},dt=()=>(0,K.useStore)(w(),e=>e.toasts),H=({store:e,toast:t})=>{const{toasts:r}=e.state;t.status==="closing"&&r.includes(t)&&e.set("toasts",r.filter(o=>o!==t))},vt=({elementRef:e,toastEntry:t})=>{const r=w();return(0,d.useLayoutEffect)(()=>{if(t.status==="visible")return;const o=e.current?.getAnimations?.()??[];if(o.length===0){H({store:r,toast:t});return}let n=!1;return Promise.allSettled(o.map(i=>i.finished)).then(()=>{n||H({store:r,toast:t})}),()=>{n=!0}},[e,t,r]),(0,s.jsx)(s.Fragment,{})},_t=({toastEntry:e,getToastProps:t,onClose:r})=>{const{notification:o,status:n,durationRevision:i=0}=e,{id:a,...c}=o,l=(0,d.useRef)(null);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:l,className:E.item,"data-exiting":n==="closing"||void 0,inert:n==="closing",children:(0,s.jsx)("div",{className:E.itemContent,children:(0,s.jsx)(J.Provider,{value:{durationRevision:i,isActive:n==="visible"},children:(0,s.jsx)(Y,{...c,...t?.(o),id:a,onClose:()=>r(a)})})})}),(0,s.jsx)(vt,{elementRef:l,toastEntry:e})]})},mt=({getToastProps:e})=>{const t=dt(),{closeToast:r}=G();return t.map(o=>(0,s.jsx)(_t,{toastEntry:o,getToastProps:e,onClose:r},o.notification.id))},ft=()=>{const e=w();return(0,d.useLayoutEffect)(()=>(e.set("mountedToasterCount",e.state.mountedToasterCount+1),()=>{e.set("mountedToasterCount",e.state.mountedToasterCount-1),!(e.state.mountedToasterCount>0)&&e.set("toasts",e.state.toasts.filter(I))}),[e]),null},pt=({container:e,getToastProps:t,className:r,render:o,ref:n,...i})=>{const a=y.useThemeContainer(),c=ce.useProvidedTextDirection(),l=e===void 0?a??(typeof document>"u"?null:document.body):e,v=(0,W.useRender)({render:o,ref:n,props:{role:"region",dir:c,"aria-label":"Notifications",...i,className:(0,P.clsx)(E.root,r),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ft,{}),(0,s.jsx)(mt,{getToastProps:t})]})}});return u.isDefined(l)?(0,de.createPortal)(v,l):null};Object.defineProperty(exports,"Callout",{enumerable:!0,get:function(){return qe}});Object.defineProperty(exports,"InlineBanner",{enumerable:!0,get:function(){return ye}});Object.defineProperty(exports,"Toast",{enumerable:!0,get:function(){return Y}});Object.defineProperty(exports,"ToastProvider",{enumerable:!0,get:function(){return at}});Object.defineProperty(exports,"Toaster",{enumerable:!0,get:function(){return pt}});Object.defineProperty(exports,"useToast",{enumerable:!0,get:function(){return ke}});
@@ -1,509 +0,0 @@
1
- import { t as u } from "./isDefined-fMi6eQ4r.js";
2
- import { Ta as L, hc as lt, hl as V, la as mt, nt as F } from "./icon-BdXwnJA6.js";
3
- import { a as vt, r as _t, t as ft } from "./theme-B2EaXhye.js";
4
- import { t as pt } from "./mergeClassNames-ClFMR1v0.js";
5
- import { t as B } from "./Button-Cs07psdD.js";
6
- import { n as X, r as ht, t as Tt } from "./ProgressBar-D_3Gia0E.js";
7
- import { t as C } from "./isRenderableSlot-DT_depzM.js";
8
- import { t as Ct } from "./useProvidedTextDirection-Dk8LBQeF.js";
9
- import { t as gt } from "./OverflowingTextWithTooltip-Be2-wCcZ.js";
10
- import { t as wt } from "./Separator-0LzwPfOn.js";
11
- import { useRender as O } from "@base-ui/react/use-render";
12
- import { isNonEmptyArray as G, isPositiveInteger as bt, isString as Nt, isUndefined as xt } from "@sniptt/guards";
13
- import { clsx as P } from "clsx";
14
- import { createContext as J, useCallback as At, useContext as Q, useLayoutEffect as W, useMemo as It, useRef as Pt, useState as x } from "react";
15
- import { Fragment as w, jsx as a, jsxs as p } from "react/jsx-runtime";
16
- import { Store as Wt, useStore as kt } from "@base-ui/utils/store";
17
- import { createPortal as Et } from "react-dom";
18
- var Bt = "_action_3r2bm_1", Rt = { action: Bt }, St = ({ className: t, ...e }) => /* @__PURE__ */ a(B, {
19
- ...e,
20
- size: "sm",
21
- variant: "ghost",
22
- className: pt(Rt.action, t)
23
- }), Ft = "_container_1ix4w_1", Mt = "_containerFullWidth_1ix4w_40", Ot = "_header_1ix4w_44", $t = "_iconContainer_1ix4w_53", yt = "_title_1ix4w_63", qt = "_descriptionWrapper_1ix4w_75", zt = "_descriptionWrapperWithIcon_1ix4w_82", Dt = "_descriptionWrapperWithAction_1ix4w_86", Ut = "_description_1ix4w_75", jt = "_footer_1ix4w_99", Ht = "_closeButton_1ix4w_106", v = {
24
- container: Ft,
25
- containerFullWidth: Mt,
26
- header: Ot,
27
- iconContainer: $t,
28
- title: yt,
29
- descriptionWrapper: qt,
30
- descriptionWrapperWithIcon: zt,
31
- descriptionWrapperWithAction: Dt,
32
- description: Ut,
33
- footer: jt,
34
- closeButton: Ht
35
- }, Kt = ({ status: t = "info", variant: e = "soft", color: o = ht[t], title: s, description: r, fullWidth: n = !1, icon: i = /* @__PURE__ */ a(mt, {
36
- size: vt.icon.size.md,
37
- "aria-hidden": "true"
38
- }), action: c, closeLabel: d = "Close", onDismiss: l, className: h, render: _, ref: I, ...m }) => {
39
- const g = C(i), b = C(c);
40
- return O({
41
- render: _,
42
- ref: I,
43
- state: {
44
- status: t,
45
- variant: e,
46
- color: o
47
- },
48
- props: {
49
- ...m,
50
- className: P(v.container, n && v.containerFullWidth, h),
51
- children: /* @__PURE__ */ p(w, { children: [
52
- /* @__PURE__ */ p("div", {
53
- className: v.header,
54
- children: [
55
- g && /* @__PURE__ */ a("div", {
56
- className: v.iconContainer,
57
- children: i
58
- }),
59
- /* @__PURE__ */ a("div", {
60
- className: v.title,
61
- children: s
62
- }),
63
- u(l) && /* @__PURE__ */ a(B, {
64
- type: "button",
65
- startIcon: /* @__PURE__ */ a(V, { "aria-hidden": "true" }),
66
- className: v.closeButton,
67
- variant: "ghost",
68
- size: "sm",
69
- "aria-label": d,
70
- onClick: () => l()
71
- })
72
- ]
73
- }),
74
- C(r) && /* @__PURE__ */ a("div", {
75
- className: P(v.descriptionWrapper, g && v.descriptionWrapperWithIcon, b && v.descriptionWrapperWithAction),
76
- children: /* @__PURE__ */ a("div", {
77
- className: v.description,
78
- children: r
79
- })
80
- }),
81
- b && /* @__PURE__ */ a("div", {
82
- className: v.footer,
83
- children: c
84
- })
85
- ] })
86
- }
87
- });
88
- }, Ge = Object.assign(Kt, { Action: St }), Lt = "_banner_17vm4_1", Vt = "_embedded_17vm4_6", Xt = "_bannerContent_17vm4_10", Gt = "_icon_17vm4_18", Jt = "_bannerText_17vm4_28", Qt = "_compact_17vm4_33", N = {
89
- banner: Lt,
90
- embedded: Vt,
91
- bannerContent: Xt,
92
- icon: Gt,
93
- bannerText: Jt,
94
- compact: Qt
95
- }, Yt = ({ children: t, layout: e = "standard", variant: o = "soft", embedded: s = !1, icon: r = /* @__PURE__ */ a(L, { "aria-hidden": "true" }), className: n, ...i }) => {
96
- const c = e === "compact", d = !c && Nt(t);
97
- return /* @__PURE__ */ a(X, {
98
- ...i,
99
- className: P(N.banner, c && N.compact, s && N.embedded, n),
100
- variant: o,
101
- "data-layout": e,
102
- children: /* @__PURE__ */ p("div", {
103
- className: N.bannerContent,
104
- children: [C(r) && /* @__PURE__ */ a("span", {
105
- className: N.icon,
106
- children: r
107
- }), /* @__PURE__ */ a("div", {
108
- className: N.bannerText,
109
- children: d ? /* @__PURE__ */ a(gt, {
110
- isFocusable: !0,
111
- text: /* @__PURE__ */ a(w, { children: t }),
112
- tooltipContent: t
113
- }) : t
114
- })]
115
- })
116
- });
117
- }, Je = Object.assign(Yt, { Action: X.Action }), k = (t) => t.status === "visible", Y = ({ store: t, toastsToClose: e, nextToasts: o = t.state.toasts }) => {
118
- const s = o.map((n) => e.includes(n) ? {
119
- ...n,
120
- status: "closing"
121
- } : n), r = t.state.mountedToasterCount > 0;
122
- t.set("toasts", r ? s : s.filter(k));
123
- for (const n of e) n.notification.onClose?.();
124
- }, Z = J(void 0), A = () => {
125
- const t = Q(Z);
126
- if (!u(t)) throw new Error("Toast components must be used within a ToastProvider.");
127
- return t;
128
- }, tt = () => {
129
- const t = A();
130
- return { closeToast: (o) => {
131
- const s = t.state.toasts.filter((r) => k(r) && (!u(o) || r.notification.id === o));
132
- G(s) && Y({
133
- store: t,
134
- toastsToClose: s
135
- });
136
- } };
137
- }, H = 0, Zt = () => {
138
- const t = A();
139
- return { enqueueToast: It(() => {
140
- function e(o) {
141
- if (!u(o)) return;
142
- const { dedupeKey: s, ...r } = o, { toasts: n, limit: i } = t.state, c = n.filter(k), d = u(s) ? c.find((_) => _.dedupeKey === s) : void 0;
143
- if (u(d)) return d.notification.id;
144
- H += 1;
145
- const l = `toast-${H}`, h = Math.max(0, c.length - i + 1);
146
- return Y({
147
- store: t,
148
- toastsToClose: c.slice(0, h),
149
- nextToasts: [...n, {
150
- notification: {
151
- ...r,
152
- id: l
153
- },
154
- dedupeKey: s,
155
- status: "visible"
156
- }]
157
- }), l;
158
- }
159
- return e;
160
- }, [t]) };
161
- }, te = ({ store: t, id: e, ...o }) => {
162
- const s = t.state.toasts.find((i) => i.notification.id === e && k(i)), r = Object.keys(o);
163
- if (!u(s) || !G(r)) return;
164
- const n = r.includes("duration") || u(s.notification.progress) && r.includes("progress") && !u(o.progress);
165
- t.set("toasts", t.state.toasts.map((i) => i === s ? {
166
- ...i,
167
- notification: {
168
- ...i.notification,
169
- ...o,
170
- id: e
171
- },
172
- ...n ? { durationRevision: (i.durationRevision ?? 0) + 1 } : {}
173
- } : i));
174
- }, ee = () => {
175
- const t = A();
176
- return { updateToast: At((e) => te({
177
- store: t,
178
- ...e
179
- }), [t]) };
180
- }, Qe = () => {
181
- const { closeToast: t } = tt(), { enqueueToast: e } = Zt(), { updateToast: o } = ee();
182
- return {
183
- enqueueToast: e,
184
- closeToast: t,
185
- updateToast: o
186
- };
187
- }, oe = "_root_181ka_1", se = "_progress_181ka_19", re = "_header_181ka_30", ae = "_message_181ka_40", ne = "_icon_181ka_45", ie = "_actions_181ka_50", ce = "_description_181ka_56", ue = "_footer_181ka_65", de = "_footerAction_181ka_69", le = "_closeButton_181ka_76", f = {
188
- root: oe,
189
- progress: se,
190
- header: re,
191
- message: ae,
192
- icon: ne,
193
- actions: ie,
194
- description: ce,
195
- footer: ue,
196
- footerAction: de,
197
- closeButton: le
198
- }, et = J({
199
- durationRevision: 0,
200
- isActive: !0
201
- }), me = ({ clock: t, duration: e, progress: o, isPaused: s, onClose: r }) => {
202
- const { durationRevision: n, isActive: i } = Q(et), c = u(o);
203
- return W(() => {
204
- t.update({
205
- duration: e,
206
- durationRevision: n,
207
- isPaused: s,
208
- isProgress: c,
209
- isActive: i,
210
- onClose: r
211
- });
212
- }, [
213
- t,
214
- e,
215
- n,
216
- s,
217
- c,
218
- i,
219
- r
220
- ]), W(() => () => t.stop(), [t]), null;
221
- }, ve = ({ element: t, isFocused: e, onFocusChange: o }) => (W(() => {
222
- if (!e || !u(t)) return;
223
- const s = () => {
224
- t.contains(t.ownerDocument.activeElement) || o(!1);
225
- };
226
- s();
227
- const r = new MutationObserver(s);
228
- return r.observe(t, {
229
- childList: !0,
230
- subtree: !0
231
- }), () => r.disconnect();
232
- }, [
233
- t,
234
- e,
235
- o
236
- ]), null), ot = (t) => Number.isFinite(t) && t > 0, _e = "_countdown_1vuo8_1", fe = "_toastCountdown_1vuo8_1", pe = {
237
- countdown: _e,
238
- toastCountdown: fe
239
- }, he = ({ progress: t, duration: e, remainingDuration: o, revision: s, isPaused: r, barColor: n }) => u(t) ? /* @__PURE__ */ a(Tt, {
240
- value: t,
241
- barColor: n
242
- }) : ot(e) ? /* @__PURE__ */ a("div", {
243
- className: pe.countdown,
244
- "data-paused": r || void 0,
245
- style: {
246
- "--toast-countdown-color": n,
247
- "--toast-countdown-width": `${o / e * 100}%`,
248
- "--toast-countdown-duration": `${o}ms`
249
- }
250
- }, s) : null, Te = 2 ** 31 - 1, Ce = ({ onChange: t }) => {
251
- let e, o = 0, s, r, n = 0, i = !1;
252
- const c = () => {
253
- u(s) && (o = Math.max(0, o - (performance.now() - s)), s = void 0), clearTimeout(r), r = void 0;
254
- }, d = () => {
255
- u(e) && (n += 1, t({
256
- duration: e.duration,
257
- remainingDuration: o,
258
- revision: n,
259
- isPaused: e.isPaused || !e.isActive
260
- }));
261
- }, l = () => {
262
- i || (c(), i = !0, o = 0, d(), e?.onClose?.());
263
- }, h = () => u(e) && e.isActive && !e.isPaused && !e.isProgress && ot(e.duration) && !i, _ = () => {
264
- h() && (s = performance.now(), r = setTimeout(() => {
265
- if (c(), o > 0) {
266
- _();
267
- return;
268
- }
269
- l();
270
- }, Math.min(o, Te)));
271
- };
272
- return {
273
- update: (m) => {
274
- const g = !u(e) || m.duration !== e.duration || m.durationRevision !== e.durationRevision || e.isProgress && !m.isProgress, b = g || m.isProgress !== e?.isProgress || m.isPaused !== e?.isPaused || m.isActive !== e?.isActive, R = !u(s) && h();
275
- if (!b && !R) {
276
- e = m;
277
- return;
278
- }
279
- c(), e = m, !i && (g && (o = Math.max(0, m.duration)), d(), _());
280
- },
281
- close: l,
282
- stop: c
283
- };
284
- }, ge = ({ duration: t, isPaused: e }) => {
285
- const [o, s] = x({
286
- duration: t,
287
- remainingDuration: t,
288
- revision: 0,
289
- isPaused: e
290
- }), [r] = x(() => Ce({ onChange: s }));
291
- return {
292
- countdown: o,
293
- clock: r
294
- };
295
- }, we = {
296
- neutral: F,
297
- error: F,
298
- success: lt,
299
- info: L,
300
- warning: F
301
- }, be = ({ children: t, description: e, icon: o, iconLabel: s, action: r, progress: n, duration: i = 6e3, onCancel: c, onClose: d, cancelLabel: l = "Cancel", closeLabel: h = "Close", status: _ = "neutral", role: I = "status", className: m, onMouseEnter: g, onMouseLeave: b, onFocus: R, onBlur: st, render: rt, ref: at, ...nt }) => {
302
- const $ = _t(), [it, y] = x(!1), [q, S] = x(!1), [ct, ut] = x(null), z = it || q, { countdown: E, clock: D } = ge({
303
- duration: i,
304
- isPaused: z
305
- }), dt = we[_], U = $.snackBar[_ === "neutral" ? "default" : _], j = xt(o) ? /* @__PURE__ */ a(dt, {
306
- "aria-label": s,
307
- "aria-hidden": !u(s),
308
- color: U.color,
309
- size: $.icon.size.md
310
- }) : o;
311
- return /* @__PURE__ */ p(w, { children: [
312
- O({
313
- render: rt,
314
- ref: [at ?? null, ut],
315
- props: {
316
- role: I,
317
- "aria-live": I === "alert" ? "assertive" : "polite",
318
- ...nt,
319
- className: P(f.root, m),
320
- onMouseEnter: (T) => {
321
- y(!0), g?.(T);
322
- },
323
- onMouseLeave: (T) => {
324
- y(!1), b?.(T);
325
- },
326
- onFocus: (T) => {
327
- S(!0), R?.(T);
328
- },
329
- onBlur: (T) => {
330
- T.currentTarget.contains(T.relatedTarget) || S(!1), st?.(T);
331
- },
332
- children: /* @__PURE__ */ p(w, { children: [
333
- /* @__PURE__ */ a("div", {
334
- className: f.progress,
335
- "aria-hidden": !0,
336
- children: /* @__PURE__ */ a(he, {
337
- barColor: U.backgroundColor,
338
- progress: n,
339
- duration: E.duration,
340
- remainingDuration: E.remainingDuration,
341
- revision: E.revision,
342
- isPaused: E.isPaused
343
- })
344
- }),
345
- /* @__PURE__ */ p("div", {
346
- className: f.header,
347
- children: [
348
- C(j) && /* @__PURE__ */ a("div", {
349
- className: f.icon,
350
- children: j
351
- }),
352
- /* @__PURE__ */ a("div", {
353
- className: f.message,
354
- children: t
355
- }),
356
- /* @__PURE__ */ p("div", {
357
- className: f.actions,
358
- children: [u(c) && C(l) && /* @__PURE__ */ a(B, {
359
- onClick: c,
360
- size: "sm",
361
- variant: "ghost",
362
- style: { fontWeight: "var(--t-font-weight-regular)" },
363
- children: l
364
- }), u(d) && /* @__PURE__ */ a(B, {
365
- title: h,
366
- "aria-label": h,
367
- startIcon: /* @__PURE__ */ a(V, {}),
368
- className: f.closeButton,
369
- variant: "ghost",
370
- size: "sm",
371
- onClick: D.close
372
- })]
373
- })
374
- ]
375
- }),
376
- C(e) && /* @__PURE__ */ a("div", {
377
- className: f.description,
378
- children: e
379
- }),
380
- C(r) && /* @__PURE__ */ p("div", {
381
- className: f.footer,
382
- children: [/* @__PURE__ */ a(wt, {}), /* @__PURE__ */ a("div", {
383
- className: f.footerAction,
384
- children: r
385
- })]
386
- })
387
- ] })
388
- }
389
- }),
390
- /* @__PURE__ */ a(ve, {
391
- element: ct,
392
- isFocused: q,
393
- onFocusChange: S
394
- }),
395
- /* @__PURE__ */ a(me, {
396
- clock: D,
397
- duration: i,
398
- progress: n,
399
- isPaused: z,
400
- onClose: d
401
- })
402
- ] });
403
- }, Ne = (t = 3) => {
404
- if (!bt(t)) throw new Error("Toast limit must be a positive integer.");
405
- return new Wt({
406
- toasts: [],
407
- limit: t,
408
- mountedToasterCount: 0
409
- });
410
- }, Ye = ({ children: t, limit: e = 3 }) => {
411
- const [o] = x(() => Ne(e));
412
- return /* @__PURE__ */ a(Z.Provider, {
413
- value: o,
414
- children: t
415
- });
416
- }, xe = "_root_1q2cc_1", Ae = "_item_1q2cc_20", Ie = "_itemContent_1q2cc_47", M = {
417
- root: xe,
418
- item: Ae,
419
- itemContent: Ie
420
- }, Pe = () => kt(A(), (t) => t.toasts), K = ({ store: t, toast: e }) => {
421
- const { toasts: o } = t.state;
422
- e.status === "closing" && o.includes(e) && t.set("toasts", o.filter((s) => s !== e));
423
- }, We = ({ elementRef: t, toastEntry: e }) => {
424
- const o = A();
425
- return W(() => {
426
- if (e.status === "visible") return;
427
- const s = t.current?.getAnimations?.() ?? [];
428
- if (s.length === 0) {
429
- K({
430
- store: o,
431
- toast: e
432
- });
433
- return;
434
- }
435
- let r = !1;
436
- return Promise.allSettled(s.map((n) => n.finished)).then(() => {
437
- r || K({
438
- store: o,
439
- toast: e
440
- });
441
- }), () => {
442
- r = !0;
443
- };
444
- }, [
445
- t,
446
- e,
447
- o
448
- ]), /* @__PURE__ */ a(w, {});
449
- }, ke = ({ toastEntry: t, getToastProps: e, onClose: o }) => {
450
- const { notification: s, status: r, durationRevision: n = 0 } = t, { id: i, ...c } = s, d = Pt(null);
451
- return /* @__PURE__ */ p(w, { children: [/* @__PURE__ */ a("div", {
452
- ref: d,
453
- className: M.item,
454
- "data-exiting": r === "closing" || void 0,
455
- inert: r === "closing",
456
- children: /* @__PURE__ */ a("div", {
457
- className: M.itemContent,
458
- children: /* @__PURE__ */ a(et.Provider, {
459
- value: {
460
- durationRevision: n,
461
- isActive: r === "visible"
462
- },
463
- children: /* @__PURE__ */ a(be, {
464
- ...c,
465
- ...e?.(s),
466
- id: i,
467
- onClose: () => o(i)
468
- })
469
- })
470
- })
471
- }), /* @__PURE__ */ a(We, {
472
- elementRef: d,
473
- toastEntry: t
474
- })] });
475
- }, Ee = ({ getToastProps: t }) => {
476
- const e = Pe(), { closeToast: o } = tt();
477
- return e.map((s) => /* @__PURE__ */ a(ke, {
478
- toastEntry: s,
479
- getToastProps: t,
480
- onClose: o
481
- }, s.notification.id));
482
- }, Be = () => {
483
- const t = A();
484
- return W(() => (t.set("mountedToasterCount", t.state.mountedToasterCount + 1), () => {
485
- t.set("mountedToasterCount", t.state.mountedToasterCount - 1), !(t.state.mountedToasterCount > 0) && t.set("toasts", t.state.toasts.filter(k));
486
- }), [t]), null;
487
- }, Ze = ({ container: t, getToastProps: e, className: o, render: s, ref: r, ...n }) => {
488
- const i = ft(), c = Ct(), d = t === void 0 ? i ?? (typeof document > "u" ? null : document.body) : t, l = O({
489
- render: s,
490
- ref: r,
491
- props: {
492
- role: "region",
493
- dir: c,
494
- "aria-label": "Notifications",
495
- ...n,
496
- className: P(M.root, o),
497
- children: /* @__PURE__ */ p(w, { children: [/* @__PURE__ */ a(Be, {}), /* @__PURE__ */ a(Ee, { getToastProps: e })] })
498
- }
499
- });
500
- return u(d) ? Et(l, d) : null;
501
- };
502
- export {
503
- Je as a,
504
- Qe as i,
505
- Ye as n,
506
- Ge as o,
507
- be as r,
508
- Ze as t
509
- };
@@ -1 +0,0 @@
1
- const be=require("./theme-1XkFz8Qu.cjs"),S=require("./isDefined-DS2Q42p5.cjs"),F=require("./mergeClassNames-D4lshrT6.cjs"),J=require("./preventDismissingClickActivation-DZxTSLV3.cjs"),I=require("./Button-COxEKIHL.cjs"),le=require("./isRenderableSlot-Guryb6Nf.cjs"),ce=require("./OverflowingTextWithTooltip-BlufG-6n.cjs"),m=require("./Dropdown-BBUGkQQV.cjs"),Y=require("./Input-DvL77rvu.cjs"),D=require("./Radio-D_YUizSv.cjs");let ge=require("@base-ui/react/use-render"),d=require("@sniptt/guards"),Z=require("clsx"),x=require("react"),e=require("react/jsx-runtime"),ye=require("@base-ui/utils/useMergedRefs"),Ne=require("@base-ui/utils/useStableCallback"),Se=require("@base-ui/utils/useControlled"),Ce=require("@base-ui/utils/useValueAsRef"),pe=require("@base-ui/utils/formatNumber"),Ie=require("@base-ui/react/radio-group"),j=require("@tabler/icons-react");var De="_root_1x3d7_1",we="_label_1x3d7_6",Oe="_flag_1x3d7_14",Q={root:De,label:we,flag:Oe},Ee=({disabled:r,open:t,onOpenChange:n})=>{const a=(0,Ne.useStableCallback)(n);return(0,x.useEffect)(()=>{!r||!t||a(!1)},[r,t,a]),null},Te=({countries:r,value:t,onValueChange:n,searchLabel:a,noCountryLabel:i,noResultsLabel:s})=>{const[u,c]=(0,x.useState)(""),l=J.normalizeSearchText(u.trim()),h=(0,d.isNonEmptyString)(l),g=r.filter(b=>J.normalizeSearchText(b.label).includes(l)),o=J.normalizeSearchText(i).includes(l),_=o||(0,d.isNonEmptyArray)(g),v=o&&(0,e.jsx)(m.Dropdown.OptionItem,{selected:!(0,d.isNonEmptyString)(t),startIcon:(0,e.jsx)("span",{className:Q.flag,"aria-hidden":"true",children:(0,e.jsx)(j.IconCircleOff,{})}),onSelect:()=>n(""),children:i});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(m.Dropdown.Search,{value:u,onValueChange:c,placeholder:a,"aria-label":a}),_&&(0,e.jsx)(m.Dropdown.Separator,{}),_&&(0,e.jsxs)(m.Dropdown.Section,{scrollable:!0,children:[!h&&v,g.map(b=>(0,e.jsx)(m.Dropdown.OptionItem,{selected:b.value===t,startIcon:(0,e.jsx)("span",{className:Q.flag,"aria-hidden":"true",children:b.flag}),onSelect:()=>n(b.value),children:b.label},b.value)),h&&v]}),!_&&(0,e.jsx)(m.Dropdown.Empty,{children:s})]})},Pe=({ariaLabelledBy:r,ariaLabel:t,visibleLabelId:n})=>{if((0,d.isNonEmptyString)(r))return r;if(!(0,d.isNonEmptyString)(t))return n},H=r=>r.preventBaseUIHandler?.(),qe=({countries:r,value:t,onValueChange:n,label:a,searchLabel:i="Search",noCountryLabel:s="No country",noResultsLabel:u="No results",open:c,onOpenChange:l,popupProps:h,disabled:g=!1,className:o,style:_,render:v,onClick:b,onMouseDown:w,onPointerDown:P,onKeyDown:p,onKeyUp:M,id:k,"aria-label":q,"aria-labelledby":O,"aria-describedby":$,...C})=>{const N=(0,x.useId)(),V=k??N,ee=`${N}-label`,G=`${N}-value`,L=(0,d.isNonEmptyString)(a),E=(0,d.isNonEmptyString)(q)?q:void 0,z=Pe({ariaLabelledBy:O,ariaLabel:E,visibleLabelId:L?ee:void 0}),R=[$,S.isDefined(z)||S.isDefined(E)?G:void 0].filter(d.isNonEmptyString),[ae,se]=(0,x.useState)(!1),f=g||!(0,d.isNonEmptyArray)(r),W=c??ae,B=!f&&W,[U,re]=(0,x.useState)(B),[de,he]=(0,x.useState)(0);U!==B&&(re(B),B&&he(de+1));const ie=r.find(y=>y.value===t),ve=ie?.label??s,fe=S.isDefined(ie)?ie.flag:(0,e.jsx)(j.IconCircleOff,{}),oe=y=>({...y,disabled:f}),xe=F.mergeClassNames((0,Z.clsx)(Y.Input_module_default.input,Y.Input_module_default.md,D.Select_module_default.trigger),o),me=y=>{y&&f||(se(y),l?.(y))};return(0,e.jsxs)("div",{className:Q.root,children:[(0,e.jsx)(Ee,{disabled:f,open:W,onOpenChange:me}),L&&(0,e.jsx)("label",{id:ee,className:Q.label,htmlFor:V,children:a}),(0,e.jsxs)(m.Dropdown.Root,{type:"picker",open:B,onOpenChange:me,children:[(0,e.jsxs)(m.Dropdown.Trigger,{...C,id:V,"aria-label":E,"aria-labelledby":z,"aria-describedby":(0,d.isNonEmptyArray)(R)?R.join(" "):void 0,"aria-disabled":f||void 0,"data-disabled":f?"":void 0,onClick:f?H:b,onMouseDown:f?H:w,onPointerDown:f?H:P,onKeyDown:f?H:p,onKeyUp:f?H:M,className:y=>xe(oe(y)),style:(0,d.isFunction)(_)?y=>_(oe(y)):_,render:(0,d.isFunction)(v)?(y,je)=>v(y,oe(je)):v,children:[(0,e.jsx)("span",{className:Q.flag,"aria-hidden":"true",children:fe}),(0,e.jsx)("span",{className:D.Select_module_default.value,id:G,children:(0,e.jsx)(ce.OverflowingTextWithTooltip,{text:ve})}),(0,e.jsx)("span",{className:D.Select_module_default.icon,"aria-hidden":"true",children:(0,e.jsx)(j.IconChevronDown,{})})]}),(0,e.jsx)(m.Dropdown.Content,{...h,"aria-label":E,"aria-labelledby":z,children:(0,e.jsx)(Te,{countries:r,value:t,onValueChange:n,searchLabel:i,noCountryLabel:s,noResultsLabel:u},de)})]})]})},Re="_trigger_gi29o_1",Be="_chevron_gi29o_35",Fe="_options_gi29o_40",ke="_emptyStatus_gi29o_46",ne={trigger:Re,chevron:Be,options:Fe,emptyStatus:ke},_e=({code:r,name:t})=>`${t} (${r})`,ze=({currencies:r,value:t,onValueChange:n,disabled:a=!1,searchLabel:i="Search",emptyLabel:s="No results",className:u,render:c,ref:l,...h})=>{const[g,o]=(0,x.useState)(""),_=g.trim().toLowerCase(),v=r.filter(p=>_e(p).toLowerCase().includes(_)),b=(0,d.isNonEmptyArray)(v),w=v.find(({code:p})=>p===t),P=S.isDefined(w)?[w,...v.filter(({code:p})=>p!==t)]:v;return(0,ge.useRender)({render:c,ref:l,props:{...h,className:(0,Z.clsx)(ne.options,u),children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(m.Dropdown.Search,{value:g,placeholder:i,"aria-label":i,onValueChange:o,disabled:a}),(0,e.jsx)(m.Dropdown.Separator,{}),b&&(0,e.jsx)(m.Dropdown.Section,{scrollable:!0,children:P.map(p=>(0,e.jsx)(m.Dropdown.OptionItem,{selected:p.code===t,disabled:a||p.disabled,onSelect:()=>n(p.code),children:(0,e.jsx)(ce.OverflowingTextWithTooltip,{text:_e(p)})},p.code))}),(0,e.jsx)(m.Dropdown.Empty,{className:ne.emptyStatus,children:b?null:s})]})}})},Ae=({value:r,className:t,...n})=>(0,e.jsxs)(m.Dropdown.Trigger,{...n,className:F.mergeClassNames(ne.trigger,t),children:[r,(0,e.jsx)(j.IconChevronDown,{"aria-hidden":"true",className:ne.chevron})]}),Me={Trigger:Ae,Options:ze},$e="_root_u3myi_1",Ve="_preview_u3myi_6",Ge="_image_u3myi_35",Le="_fileInput_u3myi_48",We="_content_u3myi_58",Ue="_actions_u3myi_67",He="_helperText_u3myi_73",Ke="_errorMessage_u3myi_78",T={root:$e,preview:Ve,image:Ge,fileInput:Le,content:We,actions:Ue,helperText:He,errorMessage:Ke},Xe=({src:r})=>{const t=be.useTheme(),[n,a]=(0,x.useState)(!1);return!(0,d.isNonEmptyString)(r)||n?(0,e.jsx)(j.IconPhotoUp,{size:t.icon.size.lg,"aria-hidden":!0}):(0,e.jsx)("img",{className:T.image,src:r,alt:"",onError:()=>a(!0)})},Je="image/*",Qe=({src:r,onFileSelect:t,onRemove:n,onAbort:a,disabled:i=!1,isUploading:s=!1,helperText:u,errorMessage:c,uploadLabel:l="Upload",removeLabel:h="Remove",abortLabel:g="Abort",accept:o=Je,inputRef:_,onChange:v,"aria-describedby":b,className:w,style:P,dir:p,render:M,ref:k,...q})=>{const O=(0,x.useRef)(null),$=(0,ye.useMergedRefs)(O,_),C=(0,x.useId)(),N=`${C}-helper`,V=`${C}-error`,ee=(0,d.isNonEmptyString)(r),G=(0,d.isNonEmptyString)(u),L=(0,d.isNonEmptyString)(c),E=i||!S.isDefined(t),z=i||!ee||!S.isDefined(n),R=E||s,ae=z||s,se=s&&S.isDefined(a),f=[b,G&&N,L&&V].filter(d.isNonEmptyString).join(" ")||void 0,W=()=>{R||O.current?.click()},B=U=>{const re=U.currentTarget.files?.[0];try{v?.(U)}finally{U.currentTarget.value=""}R||!S.isDefined(re)||t?.(re)};return(0,ge.useRender)({render:M,ref:k,props:{className:(0,Z.clsx)(T.root,w),style:P,dir:p,"aria-busy":s||q["aria-busy"],children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{className:T.preview,type:"button",disabled:E,"aria-disabled":s||void 0,"aria-label":l,"aria-describedby":f,onClick:W,children:(0,e.jsx)(Xe,{src:r},r)}),(0,e.jsxs)("div",{className:T.content,children:[(0,e.jsxs)("div",{className:T.actions,children:[(0,e.jsx)("input",{"aria-label":l,...q,ref:$,className:T.fileInput,dir:p,children:void 0,dangerouslySetInnerHTML:void 0,type:"file",multiple:!1,value:void 0,defaultValue:void 0,accept:o,disabled:R,"aria-describedby":f,hidden:!0,onChange:B}),se?(0,e.jsx)(I.Button,{type:"button",startIcon:(0,e.jsx)(j.IconX,{}),onClick:a,disabled:i,variant:"outline",children:g}):(0,e.jsx)(I.Button,{type:"button",startIcon:(0,e.jsx)(j.IconUpload,{}),onClick:W,disabled:R,focusableWhenDisabled:s&&!E,"aria-describedby":f,variant:"outline",children:l}),(0,e.jsx)(I.Button,{type:"button",startIcon:(0,e.jsx)(j.IconTrash,{}),onClick:n,disabled:ae,focusableWhenDisabled:s&&!z,variant:"outline",children:h})]}),G&&(0,e.jsx)("span",{className:T.helperText,id:N,children:u}),L&&(0,e.jsx)("span",{className:T.errorMessage,id:V,role:"alert",children:c})]})]})}})},Ye="_button_k3e4y_1",Ze={button:Ye},er=({className:r,emphasis:t="standard",size:n,variant:a,...i})=>{const s=(0,x.useContext)(I.ButtonGroupContext),u=n??s?.size??"sm",c=a??s?.variant??"ghost";return(0,e.jsx)(I.Button,{...i,size:u,variant:c,"data-emphasis":t,className:F.mergeClassNames(Ze.button,r)})},rr="_button_1fwx7_1",tr={button:rr},nr=({className:r,elevated:t=!0,variant:n,...a})=>{const i=(0,x.useContext)(I.ButtonGroupContext),s=n??i?.variant??"solid";return(0,e.jsx)(I.Button,{...a,elevated:t,variant:s,className:F.mergeClassNames(tr.button,r)})},ue={maximumFractionDigits:15,numberingSystem:"latn",useGrouping:"min2"},ar=({nextValue:r,currentValue:t,reason:n})=>n==="input-blur"&&(0,pe.formatNumber)(r,void 0,ue)===(0,pe.formatNumber)(t,void 0,ue),sr="_root_17bio_1",ir="_valueInput_17bio_7",or="_button_17bio_14",lr="_icon_17bio_32",A={root:sr,valueInput:ir,button:or,icon:lr},ur=({value:r,defaultValue:t,onValueChange:n,onValueCommitted:a,allowOutOfRange:i=!1,min:s,max:u,step:c=1,disabled:l,readOnly:h,required:g,name:o,form:_,id:v,showButtons:b=!0,decrementLabel:w="Decrease value",incrementLabel:P="Increase value",className:p,...M})=>{const[k,q]=(0,Se.useControlled)({controlled:r,default:t??null,name:"NumberStepper",state:"value"}),O=(0,Ce.useValueAsRef)(k),$=(C,N)=>{if(C!==O.current){if(ar({nextValue:C,currentValue:O.current,reason:N.reason})){N.cancel();return}n?.(C,N),!N.isCanceled&&(O.current=C,q(C))}};return(0,e.jsxs)(D.NumberField.Root,{value:k,onValueChange:$,onValueCommitted:a,min:s,max:u,allowOutOfRange:i,step:c,smallStep:c,largeStep:c,disabled:l,readOnly:h,required:g,name:o,form:_,id:v,format:ue,className:A.root,children:[b&&(0,e.jsx)(D.NumberField.Decrement,{"aria-label":w,render:(0,e.jsx)(I.Button,{type:"button",size:"sm",className:A.button,startIcon:(0,e.jsx)("span",{className:A.icon,children:(0,e.jsx)(j.IconMinus,{})})})}),(0,e.jsx)(D.NumberField.Input,{...M,form:_,className:F.mergeClassNames((0,Z.clsx)(Y.Input_module_default.input,Y.Input_module_default.sm,A.valueInput),p)}),b&&(0,e.jsx)(D.NumberField.Increment,{"aria-label":P,render:(0,e.jsx)(I.Button,{type:"button",size:"sm",className:A.button,startIcon:(0,e.jsx)("span",{className:A.icon,children:(0,e.jsx)(j.IconPlus,{})})})})]})},cr="_trigger_1fjn7_1",dr="_triggerFlag_1fjn7_31",mr="_optionFlag_1fjn7_32",pr="_chevron_1fjn7_52",_r="_selectedCountryLabel_1fjn7_57",X={trigger:cr,triggerFlag:dr,optionFlag:mr,chevron:pr,selectedCountryLabel:_r},br=({label:r,callingCode:t})=>`${r} (+${t})`,gr=({countries:r,value:t,onValueChange:n,searchLabel:a="Search",emptyLabel:i="No results"})=>{const[s,u]=(0,x.useState)(""),c=J.normalizeSearchText(s),l=r.filter(({label:o})=>J.normalizeSearchText(o).includes(c)),h=l.find(o=>o.value===t),g=S.isDefined(h)?[h,...l.filter(o=>o.value!==t)]:l;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(m.Dropdown.Search,{value:s,onValueChange:u,placeholder:a,"aria-label":a}),(0,e.jsx)(m.Dropdown.Separator,{}),(0,e.jsxs)(m.Dropdown.Section,{scrollable:!0,children:[!(0,d.isNonEmptyArray)(g)&&(0,e.jsx)(m.Dropdown.Empty,{children:i}),g.map(o=>{const _=br(o);return(0,e.jsx)(m.Dropdown.OptionItem,{"aria-label":_,selected:o.value===t,onSelect:()=>n(o.value),startIcon:(0,e.jsx)("span",{className:X.optionFlag,"aria-hidden":!0,children:o.flag}),children:(0,e.jsx)(ce.OverflowingTextWithTooltip,{text:(0,e.jsxs)(e.Fragment,{children:[o.label," (",(0,e.jsxs)("bdi",{dir:"ltr",children:["+",o.callingCode]}),")"]}),tooltipContent:_})},o.value)})]})]})},hr=({country:r,className:t,"aria-describedby":n,...a})=>{const i=(0,x.useId)(),s=[S.isDefined(r)&&i,n].filter(d.isNonEmptyString).join(" ")||void 0;return(0,e.jsxs)(m.Dropdown.Trigger,{...a,"aria-describedby":s,className:F.mergeClassNames(X.trigger,t),children:[(0,e.jsx)("span",{className:X.triggerFlag,"aria-hidden":!0,children:r?.flag??(0,e.jsx)(j.IconWorld,{})}),S.isDefined(r)&&(0,e.jsx)("span",{id:i,className:X.selectedCountryLabel,children:r.label}),(0,e.jsx)(j.IconChevronDown,{className:X.chevron,"aria-hidden":!0})]})},vr={Trigger:hr,Options:gr},fr="_wrapper_fz4xu_1",xr="_filterButton_fz4xu_8",jr="_inputGroup_fz4xu_17",yr="_searchIcon_fz4xu_23",te={wrapper:fr,filterButton:xr,inputGroup:jr,searchIcon:yr},Nr=({placeholder:r,filterDropdown:t,size:n="md",id:a,filterButtonAriaLabel:i="Filter","aria-label":s,"aria-labelledby":u,...c})=>{const l=be.useTheme(),h=(0,x.useId)(),g=a??h,o=(0,e.jsx)(I.Button,{variant:"outline",size:n,"aria-label":i,startIcon:(0,e.jsx)(j.IconFilter,{size:l.icon.size.md}),className:te.filterButton});return(0,e.jsxs)("div",{className:te.wrapper,children:[(0,e.jsx)(D.InputGroup,{className:te.inputGroup,size:n,startElement:(0,e.jsx)(j.IconSearch,{className:te.searchIcon,size:l.icon.size.md,"aria-hidden":!0}),children:(0,e.jsx)(Y.Input,{...c,id:g,placeholder:r,"aria-label":(0,d.isNonEmptyString)(u)?void 0:s??r,"aria-labelledby":u})}),t?.(o)]})},Sr="_container_1uovu_1",Cr="_item_1uovu_20",Ir="_iconOnly_1uovu_60",Dr="_icon_1uovu_60",wr="_label_1uovu_79",K={container:Sr,item:Cr,iconOnly:Ir,icon:Dr,label:wr},Or=({className:r,itemWidth:t="equal",options:n,...a})=>(0,e.jsx)(Ie.RadioGroup,{...a,className:F.mergeClassNames(K.container,r),"data-item-width":t,children:n.map(({"aria-label":i,disabled:s,label:u,startIcon:c,value:l})=>(0,e.jsxs)(D.Radio.Root,{value:l,disabled:s,"aria-label":i,className:(0,Z.clsx)(K.item,!le.isRenderableSlot(u)&&K.iconOnly),children:[le.isRenderableSlot(c)&&(0,e.jsx)("span",{className:K.icon,"aria-hidden":!0,children:c}),le.isRenderableSlot(u)&&(0,e.jsx)("span",{className:K.label,children:u})]},l))});Object.defineProperty(exports,"CountrySelect",{enumerable:!0,get:function(){return qe}});Object.defineProperty(exports,"CurrencyPicker",{enumerable:!0,get:function(){return Me}});Object.defineProperty(exports,"ImageInput",{enumerable:!0,get:function(){return Qe}});Object.defineProperty(exports,"LightButton",{enumerable:!0,get:function(){return er}});Object.defineProperty(exports,"MainButton",{enumerable:!0,get:function(){return nr}});Object.defineProperty(exports,"NumberStepper",{enumerable:!0,get:function(){return ur}});Object.defineProperty(exports,"PhoneCountryPicker",{enumerable:!0,get:function(){return vr}});Object.defineProperty(exports,"SearchInput",{enumerable:!0,get:function(){return Nr}});Object.defineProperty(exports,"SegmentedControl",{enumerable:!0,get:function(){return Or}});