twenty-ui 2.48.0 → 2.50.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 (286) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +27 -2
  3. package/dist/Button-CU8BS-Yd.js +75 -0
  4. package/dist/Button-iVyxlrwO.cjs +1 -0
  5. package/dist/Dropdown-ChTVyesF.js +1018 -0
  6. package/dist/Dropdown-DlItz8Gh.cjs +1 -0
  7. package/dist/Heading-CHvEXL6n.cjs +1 -0
  8. package/dist/{Heading-pXllCJCO.js → Heading-Nj5BlPqB.js} +3 -3
  9. package/dist/{ListItem-CHTR-GLd.cjs → ListItem-C6Xl00m1.cjs} +1 -1
  10. package/dist/{ListItem-CjnrSbka.js → ListItem-C84ANa76.js} +2 -2
  11. package/dist/{OverflowingTextWithTooltip-Z2daM0_x.cjs → OverflowingTextWithTooltip-BQmpPObX.cjs} +1 -1
  12. package/dist/{OverflowingTextWithTooltip-BmUROIah.js → OverflowingTextWithTooltip-BtB9cGdJ.js} +20 -21
  13. package/dist/ProgressBar-CzGs7cuE.cjs +1 -0
  14. package/dist/ProgressBar-D4tKQ7OA.js +84 -0
  15. package/dist/{Radio-DMI1B7o5.js → Radio-BwBZ4e8g.js} +29 -29
  16. package/dist/{Radio-xmHgGHQO.cjs → Radio-sIYxZnR_.cjs} +1 -1
  17. package/dist/ResizeHandle-B1MuHTNA.cjs +1 -0
  18. package/dist/{ResizeHandle-C1kQ3MYR.js → ResizeHandle-B30OYZxS.js} +56 -55
  19. package/dist/Shortcut-Bp9iDdQg.js +73 -0
  20. package/dist/Shortcut-N8TELGPI.cjs +1 -0
  21. package/dist/TabsTabContent-6rkARU9F.cjs +1 -0
  22. package/dist/TabsTabContent-DPkLTBi2.js +39 -0
  23. package/dist/Tooltip-6uS8_wdA.js +132 -0
  24. package/dist/Tooltip-DL3sfbuw.cjs +1 -0
  25. package/dist/components/__stories__/reading-direction/DirectionalLayoutExample.d.ts +3 -1
  26. package/dist/components/code-editor.cjs +1 -1
  27. package/dist/components/code-editor.mjs +52 -51
  28. package/dist/components/data-display.cjs +1 -1
  29. package/dist/components/data-display.mjs +6 -7
  30. package/dist/components/feedback/InlineBanner/InlineBanner.d.ts +2 -2
  31. package/dist/components/feedback/InlineBanner/internal/InlineBannerComponent.d.ts +1 -1
  32. package/dist/components/feedback/InlineBanner/types/InlineBannerProps.d.ts +1 -0
  33. package/dist/components/feedback.cjs +1 -1
  34. package/dist/components/feedback.mjs +1 -1
  35. package/dist/components/input/CountrySelect/CountrySelect.d.ts +5 -2
  36. package/dist/components/input/CountrySelect/__stories__/CountrySelectPartsExample.d.ts +11 -0
  37. package/dist/components/input/CountrySelect/internal/CountrySelectComponent.d.ts +2 -0
  38. package/dist/components/input/CountrySelect/internal/CountrySelectContext.d.ts +2 -0
  39. package/dist/components/input/CountrySelect/internal/CountrySelectContextValue.d.ts +11 -0
  40. package/dist/components/input/CountrySelect/internal/CountrySelectDropdown.d.ts +4 -0
  41. package/dist/components/input/CountrySelect/internal/CountrySelectOptions.d.ts +2 -11
  42. package/dist/components/input/CountrySelect/internal/CountrySelectOptionsContent.d.ts +2 -0
  43. package/dist/components/input/CountrySelect/internal/CountrySelectRoot.d.ts +2 -0
  44. package/dist/components/input/CountrySelect/internal/CountrySelectTrigger.d.ts +2 -0
  45. package/dist/components/input/CountrySelect/internal/NO_COUNTRY_SELECTION_VALUE.d.ts +1 -0
  46. package/dist/components/input/CountrySelect/internal/PreparedCountryChoice.d.ts +5 -0
  47. package/dist/components/input/CountrySelect/internal/getCountrySelectionValue.d.ts +1 -0
  48. package/dist/components/input/CountrySelect/internal/useCountrySelectContextOrThrow.d.ts +1 -0
  49. package/dist/components/input/CountrySelect/types/CountryChoice.d.ts +1 -0
  50. package/dist/components/input/CountrySelect/types/CountrySelectOptionsProps.d.ts +10 -0
  51. package/dist/components/input/CountrySelect/types/CountrySelectOptionsState.d.ts +4 -0
  52. package/dist/components/input/CountrySelect/types/CountrySelectProps.d.ts +7 -13
  53. package/dist/components/input/CountrySelect/types/CountrySelectRootProps.d.ts +12 -0
  54. package/dist/components/input/CountrySelect/types/CountrySelectTriggerProps.d.ts +6 -0
  55. package/dist/components/input/CurrencyPicker/CurrencyPicker.d.ts +4 -3
  56. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerChangingDefaultExample.d.ts +5 -0
  57. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledExample.d.ts +5 -0
  58. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledSearchExample.d.ts +5 -0
  59. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerExample.d.ts +3 -4
  60. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerListLabelExample.d.ts +1 -0
  61. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerRootStateExample.d.ts +1 -0
  62. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerContext.d.ts +11 -0
  63. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerOptions.d.ts +1 -1
  64. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerRoot.d.ts +2 -0
  65. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerShorthand.d.ts +2 -0
  66. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerTrigger.d.ts +1 -1
  67. package/dist/components/input/CurrencyPicker/internal/PreparedCurrencyPickerOption.d.ts +7 -0
  68. package/dist/components/input/CurrencyPicker/internal/getCurrencyPickerSearchText.d.ts +2 -0
  69. package/dist/components/input/CurrencyPicker/internal/useCurrencyPickerContextOrThrow.d.ts +7 -0
  70. package/dist/components/input/CurrencyPicker/types/CurrencyPickerChangeEventDetails.d.ts +2 -0
  71. package/dist/components/input/CurrencyPicker/types/CurrencyPickerOption.d.ts +1 -0
  72. package/dist/components/input/CurrencyPicker/types/CurrencyPickerOptionsProps.d.ts +6 -5
  73. package/dist/components/input/CurrencyPicker/types/CurrencyPickerProps.d.ts +10 -0
  74. package/dist/components/input/CurrencyPicker/types/CurrencyPickerRootProps.d.ts +17 -0
  75. package/dist/components/input/CurrencyPicker/types/CurrencyPickerState.d.ts +6 -0
  76. package/dist/components/input/CurrencyPicker/types/CurrencyPickerTriggerProps.d.ts +3 -2
  77. package/dist/components/input/IconButton/__stories__/IconButtonExample.d.ts +7 -0
  78. package/dist/components/input/PhoneCountryPicker/PhoneCountryPicker.d.ts +5 -3
  79. package/dist/components/input/PhoneCountryPicker/__stories__/PhoneCountryPickerExample.d.ts +7 -3
  80. package/dist/components/input/PhoneCountryPicker/__stories__/testDisabledPhoneCountryPicker.d.ts +5 -0
  81. package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryCallingCodeDirection.d.ts +3 -0
  82. package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryNullSelection.d.ts +5 -0
  83. package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountrySelection.d.ts +5 -0
  84. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerContext.d.ts +9 -0
  85. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerOptions.d.ts +1 -1
  86. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerRoot.d.ts +2 -0
  87. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerTrigger.d.ts +1 -1
  88. package/dist/components/input/PhoneCountryPicker/internal/PreparedPhoneCountryOption.d.ts +5 -0
  89. package/dist/components/input/PhoneCountryPicker/internal/getPhoneCountryOptionTooltipLabel.d.ts +2 -0
  90. package/dist/components/input/PhoneCountryPicker/internal/matchesPhoneCountrySearch.d.ts +6 -0
  91. package/dist/components/input/PhoneCountryPicker/internal/usePhoneCountryPickerContextOrThrow.d.ts +7 -0
  92. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryOption.d.ts +1 -0
  93. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerOptionsProps.d.ts +4 -5
  94. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerProps.d.ts +10 -0
  95. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerRootProps.d.ts +12 -0
  96. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerTriggerProps.d.ts +1 -3
  97. package/dist/components/input/SegmentedControl/types/SegmentedControlProps.d.ts +1 -1
  98. package/dist/components/input/index.d.ts +10 -0
  99. package/dist/components/input.cjs +1 -1
  100. package/dist/components/input.mjs +13 -13
  101. package/dist/components/layout/OverflowingList/internal/measureItemWidths.d.ts +1 -2
  102. package/dist/components/layout/OverflowingList/internal/measureOverflowingListLayout.d.ts +1 -2
  103. package/dist/components/layout.cjs +1 -1
  104. package/dist/components/layout.mjs +1 -1
  105. package/dist/components/navigation/Dropdown/Dropdown.d.ts +3 -2
  106. package/dist/components/navigation/Dropdown/__stories__/DropdownIconGridExample.d.ts +3 -0
  107. package/dist/components/navigation/Dropdown/__stories__/DropdownSelectionGroupsExample.d.ts +1 -0
  108. package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +6 -1
  109. package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +1 -1
  110. package/dist/components/navigation/Dropdown/internal/DropdownOptionItemOwner.d.ts +7 -0
  111. package/dist/components/navigation/Dropdown/internal/DropdownSearch.d.ts +1 -1
  112. package/dist/components/navigation/Dropdown/internal/DropdownSearchEffect.d.ts +8 -0
  113. package/dist/components/navigation/Dropdown/internal/DropdownSelectionContext.d.ts +2 -0
  114. package/dist/components/navigation/Dropdown/internal/DropdownSelectionContextValue.d.ts +9 -0
  115. package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroup.d.ts +2 -0
  116. package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroupEffect.d.ts +11 -0
  117. package/dist/components/navigation/Dropdown/internal/createDropdownSelectionEventDetails.d.ts +5 -0
  118. package/dist/components/navigation/Dropdown/internal/dropdownItemActivation.d.ts +11 -0
  119. package/dist/components/navigation/Dropdown/internal/getDropdownItemExplicitId.d.ts +2 -2
  120. package/dist/components/navigation/Dropdown/internal/getDropdownOptionItemRole.d.ts +9 -0
  121. package/dist/components/navigation/Dropdown/internal/getDropdownSelectionGroupState.d.ts +6 -0
  122. package/dist/components/navigation/Dropdown/internal/getTrailingFocusGuard.d.ts +1 -0
  123. package/dist/components/navigation/Dropdown/internal/isDropdownOptionItemSelected.d.ts +6 -0
  124. package/dist/components/navigation/Dropdown/internal/useDropdownSelections.d.ts +12 -0
  125. package/dist/components/navigation/Dropdown/types/DropdownOptionItemProps.d.ts +7 -2
  126. package/dist/components/navigation/Dropdown/types/DropdownOptionItemSelectEventDetails.d.ts +2 -0
  127. package/dist/components/navigation/Dropdown/types/DropdownOptionItemState.d.ts +5 -0
  128. package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupChangeEventDetails.d.ts +7 -0
  129. package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupProps.d.ts +21 -0
  130. package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupState.d.ts +7 -0
  131. package/dist/components/navigation/index.d.ts +5 -11
  132. package/dist/components/navigation.cjs +1 -1
  133. package/dist/components/navigation.mjs +6 -11
  134. package/dist/components/settings.cjs +1 -1
  135. package/dist/components/settings.mjs +1 -1
  136. package/dist/components.cjs +1 -1
  137. package/dist/components.mjs +37 -43
  138. package/dist/data-display-C-eoJ5En.js +378 -0
  139. package/dist/data-display-CM1yXpnE.cjs +2 -0
  140. package/dist/data-display-CXw-mxeS.js +252 -0
  141. package/dist/data-display-DdES9XqZ.cjs +1 -0
  142. package/dist/doNotTranslate-BSVT8Xyd.js +4 -0
  143. package/dist/doNotTranslate-CHE7WmRS.cjs +1 -0
  144. package/dist/feedback-4HKPcMRs.js +666 -0
  145. package/dist/feedback-BSOWDBI0.js +38 -0
  146. package/dist/feedback-DBRXDPSP.cjs +1 -0
  147. package/dist/feedback-DspXawf9.cjs +1 -0
  148. package/dist/index.cjs +1 -1
  149. package/dist/index.mjs +625 -631
  150. package/dist/input-CWWp7cqL.cjs +1 -0
  151. package/dist/input-CvZ_uB_9.cjs +1 -0
  152. package/dist/input-Qn5_aFYU.js +785 -0
  153. package/dist/input-k5cMhFI_.js +428 -0
  154. package/dist/layout-DDqeMgFv.js +439 -0
  155. package/dist/layout-iSfGrMrH.cjs +1 -0
  156. package/dist/navigation-7Y6gHFlj.cjs +1 -0
  157. package/dist/navigation-BY8X2w04.js +132 -0
  158. package/dist/navigation-BcXCiLE1.js +86 -0
  159. package/dist/navigation-ByYN6NgX.cjs +1 -0
  160. package/dist/normalizeSearchText-DLmPiBUZ.js +19 -0
  161. package/dist/normalizeSearchText-Do0MELpQ.cjs +1 -0
  162. package/dist/preventDismissingClickActivation-BEBrL9aB.cjs +1 -0
  163. package/dist/preventDismissingClickActivation-BQFMKRey.js +29 -0
  164. package/dist/primitives/accessibility.cjs +1 -1
  165. package/dist/primitives/accessibility.mjs +1 -1
  166. package/dist/primitives/data-display/Avatar/constants/AvatarPropertiesBySize.d.ts +4 -0
  167. package/dist/primitives/data-display/Avatar/types/AvatarSize.d.ts +1 -1
  168. package/dist/primitives/data-display/Badge/types/BadgeColor.d.ts +1 -1
  169. package/dist/primitives/data-display/Chip/types/ChipVariant.d.ts +1 -1
  170. package/dist/primitives/data-display.cjs +1 -1
  171. package/dist/primitives/data-display.mjs +7 -8
  172. package/dist/primitives/feedback/Banner/Banner.d.ts +1 -1
  173. package/dist/primitives/feedback/Banner/internal/BannerAction.d.ts +1 -1
  174. package/dist/primitives/feedback.cjs +1 -1
  175. package/dist/primitives/feedback.mjs +2 -2
  176. package/dist/primitives/input/Autocomplete/Autocomplete.d.ts +1 -1
  177. package/dist/primitives/input/Autocomplete/internal/AutocompleteInput.d.ts +1 -1
  178. package/dist/primitives/input/Autocomplete/types/AutocompleteInputProps.d.ts +8 -1
  179. package/dist/primitives/input/Button/types/ButtonColor.d.ts +1 -1
  180. package/dist/primitives/input/Radio/__stories__/RadioCardContent.d.ts +8 -0
  181. package/dist/primitives/input/RadioGroup/RadioGroup.d.ts +1 -1
  182. package/dist/primitives/input/RadioGroup/types/RadioGroupProps.d.ts +3 -1
  183. package/dist/primitives/input.cjs +1 -1
  184. package/dist/primitives/input.mjs +3 -3
  185. package/dist/primitives/layout/ResizeHandle/__stories__/ResizableNotesExample.d.ts +2 -0
  186. package/dist/primitives/layout.cjs +1 -1
  187. package/dist/primitives/layout.mjs +1 -1
  188. package/dist/primitives/navigation/Tabs/types/TabsSize.d.ts +1 -1
  189. package/dist/primitives/navigation.cjs +1 -1
  190. package/dist/primitives/navigation.mjs +2 -2
  191. package/dist/primitives/surfaces/Card/Card.d.ts +1 -1
  192. package/dist/primitives/surfaces/Card/internal/CardRoot.d.ts +1 -1
  193. package/dist/primitives/surfaces/Card/types/CardRootProps.d.ts +0 -1
  194. package/dist/primitives/surfaces/Tooltip/Tooltip.d.ts +1 -0
  195. package/dist/primitives/surfaces/Tooltip/__stories__/findTooltip.d.ts +1 -0
  196. package/dist/primitives/surfaces/Tooltip/internal/TooltipBody.d.ts +2 -8
  197. package/dist/primitives/surfaces/Tooltip/types/TooltipBodyProps.d.ts +6 -0
  198. package/dist/primitives/surfaces/index.d.ts +1 -0
  199. package/dist/primitives/surfaces.cjs +1 -1
  200. package/dist/primitives/surfaces.mjs +2 -2
  201. package/dist/primitives/typography/Heading/types/HeadingProps.d.ts +1 -1
  202. package/dist/primitives/typography.cjs +1 -1
  203. package/dist/primitives/typography.mjs +4 -4
  204. package/dist/primitives.cjs +1 -1
  205. package/dist/primitives.mjs +46 -47
  206. package/dist/{settings-BAYsnlZJ.cjs → settings-DT5bEO6A.cjs} +1 -1
  207. package/dist/{settings-BjEZiHXE.js → settings-XGSJtobU.js} +1 -1
  208. package/dist/style.css +1 -1
  209. package/dist/surfaces-q8voTXEJ.cjs +1 -0
  210. package/dist/{surfaces-BLsR5ka0.js → surfaces-vhSZBmbz.js} +77 -78
  211. package/dist/testing/GroupedCatalog.d.ts +14 -0
  212. package/dist/testing/index.d.ts +2 -0
  213. package/dist/testing/utils/waitForStorybookFontsLoaded.d.ts +1 -0
  214. package/dist/testing.cjs +1 -1
  215. package/dist/testing.mjs +102 -62
  216. package/dist/{typography-fOTFr0jS.js → typography-BPdXzW2T.js} +2 -2
  217. package/dist/{typography-B5QEuPaL.cjs → typography-CWtuNruY.cjs} +1 -1
  218. package/dist/useIsMobile-Byp9AIq-.cjs +1 -0
  219. package/dist/useIsMobile-D1ImfQnE.js +38 -0
  220. package/dist/utilities/internal/doNotTranslate.d.ts +1 -0
  221. package/dist/utilities-BKCMZyqZ.js +53 -0
  222. package/dist/utilities-xZh8D2gd.cjs +1 -0
  223. package/dist/utilities.cjs +1 -1
  224. package/dist/utilities.mjs +11 -10
  225. package/package.json +3 -3
  226. package/dist/Avatar-CQhIEazb.cjs +0 -1
  227. package/dist/Avatar-D-QA0RE5.js +0 -72
  228. package/dist/Button-D5enZ0Qz.js +0 -72
  229. package/dist/Button-Dbi5P05r.cjs +0 -1
  230. package/dist/Dropdown-BKjAaZS0.cjs +0 -1
  231. package/dist/Dropdown-C2hXrjvD.js +0 -820
  232. package/dist/Heading-CTRYClCO.cjs +0 -1
  233. package/dist/ProgressBar-BvT1dyFo.js +0 -84
  234. package/dist/ProgressBar-DfFz0fFB.cjs +0 -1
  235. package/dist/ResizeHandle-DI4LHIQm.cjs +0 -1
  236. package/dist/Shortcut-BvWUZ3pb.js +0 -72
  237. package/dist/Shortcut-CgrdLv_L.cjs +0 -1
  238. package/dist/TabsTabContent-Co27Y2TU.cjs +0 -1
  239. package/dist/TabsTabContent-DVcObDp6.js +0 -39
  240. package/dist/TintedIconTile-4BGa8g8n.js +0 -40
  241. package/dist/TintedIconTile-CU2hCerq.cjs +0 -1
  242. package/dist/Tooltip-Bg9Uk01p.cjs +0 -1
  243. package/dist/Tooltip-cLCgtFBF.js +0 -124
  244. package/dist/components/navigation/MenuItem/MenuItem.d.ts +0 -2
  245. package/dist/components/navigation/MenuItem/parts/MenuItemIcon.d.ts +0 -9
  246. package/dist/components/navigation/MenuItem/parts/MenuItemIconBoxContainer.d.ts +0 -7
  247. package/dist/components/navigation/MenuItem/parts/MenuItemIconWithGripSwap.d.ts +0 -8
  248. package/dist/components/navigation/MenuItem/parts/MenuItemLeftContent.d.ts +0 -19
  249. package/dist/components/navigation/MenuItem/parts/StyledMenuItemBase.d.ts +0 -25
  250. package/dist/components/navigation/MenuItem/types/MenuItemDraggableGripMode.d.ts +0 -1
  251. package/dist/components/navigation/MenuItem/types/MenuItemProps.d.ts +0 -33
  252. package/dist/components/navigation/MenuItemAvatar/MenuItemAvatar.d.ts +0 -2
  253. package/dist/components/navigation/MenuItemAvatar/types/MenuItemAvatarProps.d.ts +0 -18
  254. package/dist/components/navigation/MenuItemDraggable/MenuItemDraggable.d.ts +0 -2
  255. package/dist/components/navigation/MenuItemDraggable/types/MenuItemDraggableProps.d.ts +0 -20
  256. package/dist/components/navigation/MenuItemSuggestion/MenuItemSuggestion.d.ts +0 -2
  257. package/dist/components/navigation/MenuItemSuggestion/types/MenuItemSuggestionProps.d.ts +0 -12
  258. package/dist/components/navigation/MenuPicker/MenuPicker.d.ts +0 -2
  259. package/dist/components/navigation/MenuPicker/types/MenuPickerProps.d.ts +0 -15
  260. package/dist/data-display-0QO_WDSs.js +0 -183
  261. package/dist/data-display-CPmTJAWJ.cjs +0 -1
  262. package/dist/data-display-DjhAHvj1.cjs +0 -2
  263. package/dist/data-display-KyZbLLy-.js +0 -344
  264. package/dist/feedback-CM6fatE8.js +0 -664
  265. package/dist/feedback-DA-AU5z5.js +0 -38
  266. package/dist/feedback-DNLERYY9.cjs +0 -1
  267. package/dist/feedback-ybO4n69s.cjs +0 -1
  268. package/dist/input-3D2lXywH.cjs +0 -1
  269. package/dist/input-CJDYNwoO.cjs +0 -1
  270. package/dist/input-DRpDiMRi.js +0 -421
  271. package/dist/input-TM3nUdu6.js +0 -554
  272. package/dist/layout-BszCDxAO.js +0 -441
  273. package/dist/layout-VaIq7Sjr.cjs +0 -1
  274. package/dist/navigation-B1SRvzKK.js +0 -403
  275. package/dist/navigation-CYAs2LnR.js +0 -131
  276. package/dist/navigation-CthkGHJ8.cjs +0 -1
  277. package/dist/navigation-DrOV5E67.cjs +0 -1
  278. package/dist/preventDismissingClickActivation-CzWqpjiX.js +0 -44
  279. package/dist/preventDismissingClickActivation-DZxTSLV3.cjs +0 -1
  280. package/dist/surfaces-0rL5DoHt.cjs +0 -1
  281. package/dist/useIsMobile-DxOPI2_E.cjs +0 -1
  282. package/dist/useIsMobile-nrufFzMb.js +0 -37
  283. package/dist/utilities-BeLfNQ0Q.cjs +0 -1
  284. package/dist/utilities-CEi9I09B.js +0 -52
  285. /package/dist/{handleClickableElementKeyDown-C8Uz61XJ.js → accessibility-C8Uz61XJ.js} +0 -0
  286. /package/dist/{handleClickableElementKeyDown-CByqtBhO.cjs → accessibility-CByqtBhO.cjs} +0 -0
@@ -1,664 +0,0 @@
1
- import { t as l } from "./isDefined-fMi6eQ4r.js";
2
- import { Ta as Y, gl as Z, hc as pe, la as _e, nt as F } from "./icon-CUE-QGQK.js";
3
- import { a as Te, r as he, t as ge } from "./theme-B2EaXhye.js";
4
- import { t as Ce } from "./mergeClassNames-ClFMR1v0.js";
5
- import { t as W } from "./Button-D5enZ0Qz.js";
6
- import { n as ee, r as be, t as we } from "./ProgressBar-BvT1dyFo.js";
7
- import { t as y } from "./isRenderableSlot-DT_depzM.js";
8
- import { t as xe } from "./useProvidedTextDirection-Dk8LBQeF.js";
9
- import { t as ye } from "./OverflowingTextWithTooltip-BmUROIah.js";
10
- import { t as Ae } from "./Separator-0LzwPfOn.js";
11
- import { useRender as z } from "@base-ui/react/use-render";
12
- import { isNonEmptyArray as $, isPositiveInteger as Ne, isString as Ee, isUndefined as Pe } from "@sniptt/guards";
13
- import { clsx as S } from "clsx";
14
- import { createContext as te, useCallback as Ie, useContext as q, useEffect as Re, useLayoutEffect as I, useMemo as Se, useRef as ke, useState as P, useSyncExternalStore as Oe } from "react";
15
- import { Fragment as R, jsx as a, jsxs as g } from "react/jsx-runtime";
16
- import { Store as We, useStore as Be } from "@base-ui/utils/store";
17
- import { createPortal as Me } from "react-dom";
18
- var Fe = "_action_3r2bm_1", De = { action: Fe }, ze = ({ className: e, ...t }) => /* @__PURE__ */ a(W, {
19
- ...t,
20
- size: "sm",
21
- variant: "ghost",
22
- className: Ce(De.action, e)
23
- }), $e = "_container_1ix4w_1", qe = "_containerFullWidth_1ix4w_40", je = "_header_1ix4w_44", Ue = "_iconContainer_1ix4w_53", Le = "_title_1ix4w_63", Ke = "_descriptionWrapper_1ix4w_75", He = "_descriptionWrapperWithIcon_1ix4w_82", Ve = "_descriptionWrapperWithAction_1ix4w_86", Xe = "_description_1ix4w_75", Ge = "_footer_1ix4w_99", Je = "_closeButton_1ix4w_106", h = {
24
- container: $e,
25
- containerFullWidth: qe,
26
- header: je,
27
- iconContainer: Ue,
28
- title: Le,
29
- descriptionWrapper: Ke,
30
- descriptionWrapperWithIcon: He,
31
- descriptionWrapperWithAction: Ve,
32
- description: Xe,
33
- footer: Ge,
34
- closeButton: Je
35
- }, Qe = ({ status: e = "info", variant: t = "soft", color: o = be[e], title: s, description: r, fullWidth: c = !1, icon: n = /* @__PURE__ */ a(_e, {
36
- size: Te.icon.size.md,
37
- "aria-hidden": "true"
38
- }), action: v, closeLabel: f = "Close", onDismiss: m, className: _, render: T, ref: u, ...d }) => {
39
- const i = y(n), p = y(v);
40
- return z({
41
- render: T,
42
- ref: u,
43
- state: {
44
- status: e,
45
- variant: t,
46
- color: o
47
- },
48
- props: {
49
- ...d,
50
- className: S(h.container, c && h.containerFullWidth, _),
51
- children: /* @__PURE__ */ g(R, { children: [
52
- /* @__PURE__ */ g("div", {
53
- className: h.header,
54
- children: [
55
- i && /* @__PURE__ */ a("div", {
56
- className: h.iconContainer,
57
- children: n
58
- }),
59
- /* @__PURE__ */ a("div", {
60
- className: h.title,
61
- children: s
62
- }),
63
- l(m) && /* @__PURE__ */ a(W, {
64
- type: "button",
65
- startIcon: /* @__PURE__ */ a(Z, { "aria-hidden": "true" }),
66
- className: h.closeButton,
67
- variant: "ghost",
68
- size: "sm",
69
- "aria-label": f,
70
- onClick: () => m()
71
- })
72
- ]
73
- }),
74
- y(r) && /* @__PURE__ */ a("div", {
75
- className: S(h.descriptionWrapper, i && h.descriptionWrapperWithIcon, p && h.descriptionWrapperWithAction),
76
- children: /* @__PURE__ */ a("div", {
77
- className: h.description,
78
- children: r
79
- })
80
- }),
81
- p && /* @__PURE__ */ a("div", {
82
- className: h.footer,
83
- children: v
84
- })
85
- ] })
86
- }
87
- });
88
- }, no = Object.assign(Qe, { Action: ze }), Ye = "_banner_17vm4_1", Ze = "_embedded_17vm4_6", et = "_bannerContent_17vm4_10", tt = "_icon_17vm4_18", ot = "_bannerText_17vm4_28", st = "_compact_17vm4_33", E = {
89
- banner: Ye,
90
- embedded: Ze,
91
- bannerContent: et,
92
- icon: tt,
93
- bannerText: ot,
94
- compact: st
95
- }, rt = ({ children: e, layout: t = "standard", variant: o = "soft", embedded: s = !1, icon: r = /* @__PURE__ */ a(Y, { "aria-hidden": "true" }), className: c, ...n }) => {
96
- const v = t === "compact", f = !v && Ee(e);
97
- return /* @__PURE__ */ a(ee, {
98
- ...n,
99
- className: S(E.banner, v && E.compact, s && E.embedded, c),
100
- variant: o,
101
- "data-layout": t,
102
- children: /* @__PURE__ */ g("div", {
103
- className: E.bannerContent,
104
- children: [y(r) && /* @__PURE__ */ a("span", {
105
- className: E.icon,
106
- children: r
107
- }), /* @__PURE__ */ a("div", {
108
- className: E.bannerText,
109
- children: f ? /* @__PURE__ */ a(ye, {
110
- isFocusable: !0,
111
- text: /* @__PURE__ */ a(R, { children: e }),
112
- tooltipContent: e
113
- }) : e
114
- })]
115
- })
116
- });
117
- }, io = Object.assign(rt, { Action: ee.Action }), A = (e) => e.status === "visible", B = ({ store: e, toastsToClose: t, nextToasts: o = e.state.toasts }) => {
118
- const s = t.filter((n) => A(n) && e.state.toasts.includes(n)), r = o.map((n) => s.includes(n) ? {
119
- ...n,
120
- status: "closing"
121
- } : n), c = e.state.mountedToasterCount > 0;
122
- e.set("toasts", c ? r : r.filter(A));
123
- for (const n of s) n.notification.onClose?.();
124
- }, oe = te(void 0), N = () => {
125
- const e = q(oe);
126
- if (!l(e)) throw new Error("Toast components must be used within a ToastProvider.");
127
- return e;
128
- }, se = () => {
129
- const e = N();
130
- return { closeToast: (o) => {
131
- if (!e.lifecycle.isActive()) return;
132
- const s = e.state.toasts.filter((r) => A(r) && (!l(o) || r.notification.id === o));
133
- $(s) && B({
134
- store: e,
135
- toastsToClose: s
136
- });
137
- } };
138
- }, J = 0, Q = () => (J += 1, `toast-${J}`), nt = () => {
139
- const e = N();
140
- return { enqueueToast: Se(() => {
141
- function t(o) {
142
- if (!l(o)) return;
143
- if (!e.lifecycle.isActive()) return Q();
144
- const { dedupeKey: s, ...r } = o, { toasts: c, limit: n } = e.state, v = c.filter(A), f = l(s) ? v.find((T) => T.dedupeKey === s) : void 0;
145
- if (l(f)) return f.notification.id;
146
- const m = Q(), _ = Math.max(0, v.length - n + 1);
147
- return B({
148
- store: e,
149
- toastsToClose: v.slice(0, _),
150
- nextToasts: [...c, {
151
- notification: {
152
- ...r,
153
- id: m
154
- },
155
- dedupeKey: s,
156
- status: "visible"
157
- }]
158
- }), m;
159
- }
160
- return t;
161
- }, [e]) };
162
- }, it = ({ store: e, id: t, ...o }) => {
163
- if (!e.lifecycle.isActive()) return;
164
- const s = e.state.toasts.find((n) => n.notification.id === t && A(n)), r = Object.keys(o);
165
- if (!l(s) || !$(r)) return;
166
- const c = r.includes("duration") || l(s.notification.progress) && r.includes("progress") && !l(o.progress);
167
- e.set("toasts", e.state.toasts.map((n) => n === s ? {
168
- ...n,
169
- notification: {
170
- ...n.notification,
171
- ...o,
172
- id: t
173
- },
174
- ...c ? { durationRevision: (n.durationRevision ?? 0) + 1 } : {}
175
- } : n));
176
- }, at = () => {
177
- const e = N();
178
- return { updateToast: Ie((t) => it({
179
- store: e,
180
- ...t
181
- }), [e]) };
182
- }, ao = () => {
183
- const { closeToast: e } = se(), { enqueueToast: t } = nt(), { updateToast: o } = at();
184
- return {
185
- enqueueToast: t,
186
- closeToast: e,
187
- updateToast: o
188
- };
189
- }, ct = "_root_181ka_1", dt = "_progress_181ka_19", lt = "_header_181ka_30", ut = "_message_181ka_40", vt = "_icon_181ka_45", ft = "_actions_181ka_50", mt = "_description_181ka_56", pt = "_footer_181ka_65", _t = "_footerAction_181ka_69", Tt = "_closeButton_181ka_76", b = {
190
- root: ct,
191
- progress: dt,
192
- header: lt,
193
- message: ut,
194
- icon: vt,
195
- actions: ft,
196
- description: mt,
197
- footer: pt,
198
- footerAction: _t,
199
- closeButton: Tt
200
- }, j = te({
201
- durationRevision: 0,
202
- isActive: !0
203
- }), ht = ({ clock: e, onClockChange: t, duration: o, progress: s, isPaused: r, onClose: c }) => {
204
- const { durationRevision: n, isActive: v, lifecycle: f, id: m, rendererKey: _, timingOverrides: T } = q(j), u = l(f) && l(m) && l(_), d = u ? void 0 : e, i = l(s), p = l(T) && Object.prototype.propertyIsEnumerable.call(T, "duration"), x = l(T) && Object.prototype.propertyIsEnumerable.call(T, "progress");
205
- return I(() => {
206
- if (u) {
207
- t(f.updateRenderer({
208
- id: m,
209
- key: _,
210
- configuration: {
211
- duration: p ? o : void 0,
212
- isProgress: x ? i : void 0,
213
- isPaused: r
214
- }
215
- }));
216
- return;
217
- }
218
- d?.update({
219
- duration: o,
220
- durationRevision: n,
221
- isPaused: r,
222
- isProgress: i,
223
- isActive: v,
224
- onClose: c
225
- });
226
- }, [
227
- d,
228
- t,
229
- u,
230
- o,
231
- n,
232
- r,
233
- i,
234
- v,
235
- c,
236
- f,
237
- m,
238
- _,
239
- p,
240
- x
241
- ]), I(() => () => {
242
- if (u) {
243
- f.removeRenderer({
244
- id: m,
245
- key: _
246
- });
247
- return;
248
- }
249
- d?.stop();
250
- }, [
251
- d,
252
- f,
253
- m,
254
- _,
255
- u
256
- ]), null;
257
- }, gt = ({ element: e, isFocused: t, onFocusChange: o }) => (I(() => {
258
- if (!t || !l(e)) return;
259
- const s = () => {
260
- e.contains(e.ownerDocument.activeElement) || o(!1);
261
- };
262
- s();
263
- const r = new MutationObserver(s);
264
- return r.observe(e, {
265
- childList: !0,
266
- subtree: !0
267
- }), () => r.disconnect();
268
- }, [
269
- e,
270
- t,
271
- o
272
- ]), null), re = 6e3, ne = (e) => Number.isFinite(e) && e > 0, Ct = "_countdown_1vuo8_1", bt = "_toastCountdown_1vuo8_1", wt = {
273
- countdown: Ct,
274
- toastCountdown: bt
275
- }, xt = ({ progress: e, duration: t, remainingDuration: o, revision: s, isPaused: r, barColor: c }) => l(e) ? /* @__PURE__ */ a(we, {
276
- value: e,
277
- barColor: c
278
- }) : ne(t) ? /* @__PURE__ */ a("div", {
279
- className: wt.countdown,
280
- "data-paused": r || void 0,
281
- style: {
282
- "--toast-countdown-color": c,
283
- "--toast-countdown-width": `${o / t * 100}%`,
284
- "--toast-countdown-duration": `${o}ms`
285
- }
286
- }, s) : null, yt = 2 ** 31 - 1, At = ({ onChange: e }) => {
287
- let t, o = 0, s, r, c = 0, n = 0, v = !1;
288
- const f = () => {
289
- n += 1, l(s) && (o = Math.max(0, o - (performance.now() - s)), s = void 0), clearTimeout(r), r = void 0;
290
- }, m = () => {
291
- l(t) && (c += 1, e({
292
- duration: t.duration,
293
- remainingDuration: o,
294
- revision: c,
295
- isPaused: t.isPaused || !t.isActive
296
- }));
297
- }, _ = () => {
298
- v || (f(), v = !0, o = 0, m(), t?.onClose?.());
299
- }, T = () => l(t) && t.isActive && !t.isPaused && !t.isProgress && ne(t.duration) && !v, u = () => {
300
- if (!T()) return;
301
- s = performance.now();
302
- const i = n;
303
- r = setTimeout(() => {
304
- if (i === n) {
305
- if (f(), o > 0) {
306
- u();
307
- return;
308
- }
309
- _();
310
- }
311
- }, Math.min(o, yt));
312
- };
313
- return {
314
- update: (i) => {
315
- const p = !l(t) || i.duration !== t.duration || i.durationRevision !== t.durationRevision || t.isProgress && !i.isProgress, x = p || i.isProgress !== t?.isProgress || i.isPaused !== t?.isPaused || i.isActive !== t?.isActive, C = !l(s) && T();
316
- if (!x && !C) {
317
- t = i;
318
- return;
319
- }
320
- f(), t = i, !v && (p && (o = Math.max(0, i.duration)), m(), u());
321
- },
322
- close: _,
323
- stop: f
324
- };
325
- }, ie = ({ duration: e, isPaused: t }) => {
326
- let o = {
327
- duration: e,
328
- remainingDuration: e,
329
- revision: 0,
330
- isPaused: t
331
- };
332
- const s = /* @__PURE__ */ new Set();
333
- return {
334
- ...At({ onChange: (r) => {
335
- o = r;
336
- for (const c of s) c();
337
- } }),
338
- getSnapshot: () => o,
339
- subscribe: (r) => (s.add(r), () => {
340
- s.delete(r);
341
- })
342
- };
343
- }, Nt = ({ duration: e, isPaused: t }) => {
344
- const { lifecycle: o, id: s, rendererKey: r } = q(j), [c, n] = P(() => (l(o) && l(s) && l(r) ? o.getCountdown(s) : void 0) ?? ie({
345
- duration: e,
346
- isPaused: t
347
- }));
348
- return {
349
- countdown: Oe(c.subscribe, c.getSnapshot, c.getSnapshot),
350
- clock: c,
351
- setClock: n
352
- };
353
- }, Et = {
354
- neutral: F,
355
- error: F,
356
- success: pe,
357
- info: Y,
358
- warning: F
359
- }, Pt = ({ children: e, description: t, icon: o, iconLabel: s, action: r, progress: c, duration: n = re, onCancel: v, onClose: f, cancelLabel: m = "Cancel", closeLabel: _ = "Close", status: T = "neutral", role: u = "status", className: d, onMouseEnter: i, onMouseLeave: p, onFocus: x, onBlur: C, render: k, ref: ce, ...de }) => {
360
- const U = he(), [le, L] = P(!1), [K, M] = P(!1), [ue, ve] = P(null), H = le || K, { countdown: O, clock: V, setClock: fe } = Nt({
361
- duration: n,
362
- isPaused: H
363
- }), me = Et[T], X = U.snackBar[T === "neutral" ? "default" : T], G = Pe(o) ? /* @__PURE__ */ a(me, {
364
- "aria-label": s,
365
- "aria-hidden": !l(s),
366
- color: X.color,
367
- size: U.icon.size.md
368
- }) : o;
369
- return /* @__PURE__ */ g(R, { children: [
370
- z({
371
- render: k,
372
- ref: [ce ?? null, ve],
373
- props: {
374
- role: u,
375
- "aria-live": u === "alert" ? "assertive" : "polite",
376
- ...de,
377
- className: S(b.root, d),
378
- onMouseEnter: (w) => {
379
- L(!0), i?.(w);
380
- },
381
- onMouseLeave: (w) => {
382
- L(!1), p?.(w);
383
- },
384
- onFocus: (w) => {
385
- M(!0), x?.(w);
386
- },
387
- onBlur: (w) => {
388
- w.currentTarget.contains(w.relatedTarget) || M(!1), C?.(w);
389
- },
390
- children: /* @__PURE__ */ g(R, { children: [
391
- /* @__PURE__ */ a("div", {
392
- className: b.progress,
393
- "aria-hidden": !0,
394
- children: /* @__PURE__ */ a(xt, {
395
- barColor: X.backgroundColor,
396
- progress: c,
397
- duration: O.duration,
398
- remainingDuration: O.remainingDuration,
399
- revision: O.revision,
400
- isPaused: O.isPaused
401
- })
402
- }),
403
- /* @__PURE__ */ g("div", {
404
- className: b.header,
405
- children: [
406
- y(G) && /* @__PURE__ */ a("div", {
407
- className: b.icon,
408
- children: G
409
- }),
410
- /* @__PURE__ */ a("div", {
411
- className: b.message,
412
- children: e
413
- }),
414
- /* @__PURE__ */ g("div", {
415
- className: b.actions,
416
- children: [l(v) && y(m) && /* @__PURE__ */ a(W, {
417
- onClick: v,
418
- size: "sm",
419
- variant: "ghost",
420
- style: { fontWeight: "var(--t-font-weight-regular)" },
421
- children: m
422
- }), l(f) && /* @__PURE__ */ a(W, {
423
- title: _,
424
- "aria-label": _,
425
- startIcon: /* @__PURE__ */ a(Z, {}),
426
- className: b.closeButton,
427
- variant: "ghost",
428
- size: "sm",
429
- onClick: V.close
430
- })]
431
- })
432
- ]
433
- }),
434
- y(t) && /* @__PURE__ */ a("div", {
435
- className: b.description,
436
- children: t
437
- }),
438
- y(r) && /* @__PURE__ */ g("div", {
439
- className: b.footer,
440
- children: [/* @__PURE__ */ a(Ae, {}), /* @__PURE__ */ a("div", {
441
- className: b.footerAction,
442
- children: r
443
- })]
444
- })
445
- ] })
446
- }
447
- }),
448
- /* @__PURE__ */ a(gt, {
449
- element: ue,
450
- isFocused: K,
451
- onFocusChange: M
452
- }),
453
- /* @__PURE__ */ a(ht, {
454
- clock: V,
455
- onClockChange: fe,
456
- duration: n,
457
- progress: c,
458
- isPaused: H,
459
- onClose: f
460
- })
461
- ] });
462
- }, ae = (e) => {
463
- if (!Ne(e)) throw new Error("Toast limit must be a positive integer.");
464
- }, It = ({ store: e, limit: t }) => {
465
- if (ae(t), e.state.limit === t) return;
466
- e.set("limit", t);
467
- const o = e.state.toasts.filter(A), s = Math.max(0, o.length - t);
468
- s !== 0 && B({
469
- store: e,
470
- toastsToClose: o.slice(0, s)
471
- });
472
- }, Rt = ({ limit: e }) => {
473
- const t = N();
474
- return Re(() => t.lifecycle.mount(), [t]), I(() => It({
475
- store: t,
476
- limit: e
477
- }), [t, e]), null;
478
- }, St = ({ store: e, toast: t }) => {
479
- const { toasts: o } = e.state;
480
- t.status === "closing" && o.includes(t) && e.set("toasts", o.filter((s) => s !== t));
481
- }, kt = (e) => {
482
- const t = /* @__PURE__ */ new Map();
483
- let o = !1, s = !1, r = 0;
484
- const c = (u) => {
485
- const d = t.get(u);
486
- if (l(d)) return d;
487
- const i = {
488
- countdown: ie({
489
- duration: re,
490
- isPaused: !0
491
- }),
492
- renderers: /* @__PURE__ */ new Map()
493
- };
494
- return t.set(u, i), i;
495
- }, n = (u) => {
496
- if (!o) return;
497
- const d = t.get(u);
498
- if (!l(d?.pendingExits) || d.pendingExits.size > 0) return;
499
- const i = e.state.toasts.find((p) => p.notification.id === u);
500
- l(i) && St({
501
- store: e,
502
- toast: i
503
- });
504
- }, v = () => {
505
- for (const [u, d] of t) {
506
- const i = e.state.toasts.find((C) => C.notification.id === u);
507
- if (!l(i)) {
508
- d.countdown.stop(), t.delete(u);
509
- continue;
510
- }
511
- const p = d.renderers.values().next().value ?? d.lastRenderer;
512
- d.lastRenderer = p;
513
- const x = !o || d.renderers.size === 0 || [...d.renderers.values()].some((C) => C.isPaused);
514
- d.countdown.update({
515
- duration: p?.duration ?? i.notification.duration ?? 6e3,
516
- durationRevision: i.durationRevision ?? 0,
517
- isProgress: p?.isProgress ?? l(i.notification.progress),
518
- isPaused: x,
519
- isActive: i.status === "visible",
520
- onClose: () => {
521
- const C = e.state.toasts.find((k) => k.notification.id === u && A(k));
522
- !o || !l(C) || B({
523
- store: e,
524
- toastsToClose: [C]
525
- });
526
- }
527
- }), i.status !== "visible" && (d.pendingExits ??= new Set(d.renderers.keys()), n(u));
528
- }
529
- };
530
- return {
531
- mount: () => {
532
- o = !0, s = !1, r += 1;
533
- const u = e.subscribe(v);
534
- return v(), () => {
535
- o = !1, u();
536
- for (const i of t.values()) i.countdown.stop();
537
- const d = ++r;
538
- queueMicrotask(() => {
539
- o || r !== d || (s = !0, t.clear(), e.set("toasts", []));
540
- });
541
- };
542
- },
543
- isActive: () => !s,
544
- getCountdown: (u) => t.get(u)?.countdown,
545
- updateRenderer: ({ id: u, key: d, configuration: i }) => {
546
- const p = c(u);
547
- return p.renderers.has(d) || (p.countdown.stop(), p.pendingExits?.add(d)), p.renderers.set(d, i), v(), p.countdown;
548
- },
549
- removeRenderer: ({ id: u, key: d }) => {
550
- const i = t.get(u);
551
- l(i) && (i.renderers.delete(d), i.pendingExits?.delete(d), v());
552
- },
553
- finishExit: ({ id: u, key: d }) => {
554
- t.get(u)?.pendingExits?.delete(d), n(u);
555
- }
556
- };
557
- }, Ot = (e = 3) => {
558
- ae(e);
559
- const t = new We({
560
- toasts: [],
561
- limit: e,
562
- mountedToasterCount: 0
563
- });
564
- return Object.assign(t, { lifecycle: kt(t) });
565
- }, co = ({ children: e, limit: t = 3 }) => {
566
- const [o] = P(() => Ot(t));
567
- return /* @__PURE__ */ g(oe.Provider, {
568
- value: o,
569
- children: [e, /* @__PURE__ */ a(Rt, { limit: t })]
570
- });
571
- }, Wt = "_root_1q2cc_1", Bt = "_item_1q2cc_20", Mt = "_itemContent_1q2cc_47", D = {
572
- root: Wt,
573
- item: Bt,
574
- itemContent: Mt
575
- }, Ft = () => Be(N(), (e) => e.toasts), Dt = ({ elementRef: e, toastEntry: t, rendererKey: o }) => {
576
- const s = N();
577
- return I(() => {
578
- if (t.status === "visible") return;
579
- const r = () => s.lifecycle.finishExit({
580
- id: t.notification.id,
581
- key: o
582
- }), c = e.current?.getAnimations?.() ?? [];
583
- if (!$(c)) {
584
- r();
585
- return;
586
- }
587
- let n = !1;
588
- return Promise.allSettled(c.map((v) => v.finished)).then(() => {
589
- n || r();
590
- }), () => {
591
- n = !0;
592
- };
593
- }, [
594
- e,
595
- t,
596
- s,
597
- o
598
- ]), null;
599
- }, zt = ({ toastEntry: e, getToastProps: t, onClose: o }) => {
600
- const { notification: s, status: r, durationRevision: c = 0 } = e, { id: n, ...v } = s, f = N(), m = t?.(s), [_] = P(() => /* @__PURE__ */ Symbol()), T = ke(null);
601
- return /* @__PURE__ */ g(R, { children: [/* @__PURE__ */ a("div", {
602
- ref: T,
603
- className: D.item,
604
- "data-exiting": r === "closing" || void 0,
605
- inert: r === "closing",
606
- children: /* @__PURE__ */ a("div", {
607
- className: D.itemContent,
608
- children: /* @__PURE__ */ a(j.Provider, {
609
- value: {
610
- durationRevision: c,
611
- isActive: r === "visible",
612
- lifecycle: f.lifecycle,
613
- id: n,
614
- rendererKey: _,
615
- timingOverrides: m
616
- },
617
- children: /* @__PURE__ */ a(Pt, {
618
- ...v,
619
- ...m,
620
- id: n,
621
- onClose: () => o(n)
622
- })
623
- })
624
- })
625
- }), /* @__PURE__ */ a(Dt, {
626
- elementRef: T,
627
- toastEntry: e,
628
- rendererKey: _
629
- })] });
630
- }, $t = ({ getToastProps: e }) => {
631
- const t = Ft(), { closeToast: o } = se();
632
- return t.map((s) => /* @__PURE__ */ a(zt, {
633
- toastEntry: s,
634
- getToastProps: e,
635
- onClose: o
636
- }, s.notification.id));
637
- }, qt = () => {
638
- const e = N();
639
- return I(() => (e.set("mountedToasterCount", e.state.mountedToasterCount + 1), () => {
640
- e.set("mountedToasterCount", e.state.mountedToasterCount - 1), !(e.state.mountedToasterCount > 0) && e.set("toasts", e.state.toasts.filter(A));
641
- }), [e]), null;
642
- }, lo = ({ container: e, getToastProps: t, className: o, render: s, ref: r, ...c }) => {
643
- const n = ge(), v = xe(), f = e === void 0 ? n ?? (typeof document > "u" ? null : document.body) : e, m = z({
644
- render: s,
645
- ref: r,
646
- props: {
647
- role: "region",
648
- dir: v,
649
- "aria-label": "Notifications",
650
- ...c,
651
- className: S(D.root, o),
652
- children: /* @__PURE__ */ g(R, { children: [/* @__PURE__ */ a(qt, {}), /* @__PURE__ */ a($t, { getToastProps: t })] })
653
- }
654
- });
655
- return l(f) ? Me(m, f) : null;
656
- };
657
- export {
658
- io as a,
659
- ao as i,
660
- co as n,
661
- no as o,
662
- Pt as r,
663
- lo as t
664
- };
@@ -1,38 +0,0 @@
1
- import { useRender as _ } from "@base-ui/react/use-render";
2
- import { clsx as u } from "clsx";
3
- var f = {
4
- xs: 13,
5
- s: 16,
6
- m: 24,
7
- l: 32,
8
- xl: 40
9
- }, h = "_root_1kar2_1", v = "_skeletonShimmer_1kar2_1", S = {
10
- root: h,
11
- skeletonShimmer: v
12
- }, g = ({ width: a, height: o, borderRadius: t, baseColor: e, highlightColor: l, animated: n = !0, layout: r = "inline", className: i, style: s, render: d, ref: m, ...k }) => _({
13
- defaultTagName: "span",
14
- render: d,
15
- ref: m,
16
- props: {
17
- "aria-hidden": !0,
18
- ...k,
19
- "data-skeleton": "",
20
- "data-animated": n || void 0,
21
- "data-layout": r,
22
- className: u(S.root, i),
23
- style: {
24
- width: a,
25
- height: o,
26
- borderRadius: t,
27
- backgroundColor: e,
28
- "--skeleton-base-color": e,
29
- "--skeleton-highlight-color": l,
30
- ...s
31
- },
32
- children: r === "inline" ? "‌" : void 0
33
- }
34
- });
35
- export {
36
- f as n,
37
- g as t
38
- };
@@ -1 +0,0 @@
1
- let c=require("@base-ui/react/use-render"),k=require("clsx");var m={xs:13,s:16,m:24,l:32,xl:40},S="_root_1kar2_1",E="_skeletonShimmer_1kar2_1",h={root:S,skeletonShimmer:E},v=({width:t,height:n,borderRadius:a,baseColor:e,highlightColor:l,animated:o=!0,layout:r="inline",className:i,style:u,render:d,ref:s,..._})=>(0,c.useRender)({defaultTagName:"span",render:d,ref:s,props:{"aria-hidden":!0,..._,"data-skeleton":"","data-animated":o||void 0,"data-layout":r,className:(0,k.clsx)(h.root,i),style:{width:t,height:n,borderRadius:a,backgroundColor:e,"--skeleton-base-color":e,"--skeleton-highlight-color":l,...u},children:r==="inline"?"‌":void 0}});Object.defineProperty(exports,"SKELETON_HEIGHT_SIZES",{enumerable:!0,get:function(){return m}});Object.defineProperty(exports,"Skeleton",{enumerable:!0,get:function(){return v}});