@preply/ds-web-lib 11.0.0 → 11.1.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 (303) hide show
  1. package/dist/Accordion-B0hR-tcI.js +96 -0
  2. package/dist/AlertBannerProvider-Cf7w9AOq.js +76 -0
  3. package/dist/AlertDialog-BG-diKBi.js +475 -0
  4. package/dist/Avatar-B-JdqVyg.js +66 -0
  5. package/dist/AvatarWithStatus-CD9jEqEB.js +36 -0
  6. package/dist/Badge-Dd-CLBoW.js +50 -0
  7. package/dist/Box-BJBE9KNm.js +91 -0
  8. package/dist/BubbleCounter.module-BU2S0euA.js +16 -0
  9. package/dist/Button-C35BZJZT.js +91 -0
  10. package/dist/ButtonBase-8eUyTWxX.js +215 -0
  11. package/dist/Checkbox-CtolNbxI.js +108 -0
  12. package/dist/Chips-BRGw7Uup.js +99 -0
  13. package/dist/ChipsPrimitive-Bezq7ptE.js +1179 -0
  14. package/dist/CountryFlag-DVDKHmQH.js +43 -0
  15. package/dist/Dialog.module-Db2BJAn4.js +21 -0
  16. package/dist/DialogCloseButton-DjDd9Mid.js +98 -0
  17. package/dist/DialogDescription-8zw9t6pm.js +44 -0
  18. package/dist/DialogRoot-B67oJduC.js +335 -0
  19. package/dist/DialogRootContext-Bz8RW-Mq.js +12 -0
  20. package/dist/DialogTitle-C2Nn2ys-.js +43 -0
  21. package/dist/Divider-DvwDWB9_.js +17 -0
  22. package/dist/DropdownMenu.primitives-BrsTBvMk.js +4007 -0
  23. package/dist/FieldButton-B2slox8P.js +32 -0
  24. package/dist/FormControl-qnbQL1iF.js +128 -0
  25. package/dist/Heading-DA9gHfsx.js +71 -0
  26. package/dist/Icon-CixAeOSd.js +48 -0
  27. package/dist/IconButton-BPKpgfep.js +31 -0
  28. package/dist/InputContainer-CzzuOe_p.js +38 -0
  29. package/dist/LayoutFlex-e9auDvWD.js +86 -0
  30. package/dist/LayoutFlexItem-D9ziMmHe.js +48 -0
  31. package/dist/LayoutGridItem-Q8Lnvrri.js +34 -0
  32. package/dist/Link-CdoJVeER.js +66 -0
  33. package/dist/Loader-BMOxdJce.js +26 -0
  34. package/dist/OnboardingTooltip-B47_Yrsj.js +165 -0
  35. package/dist/OnboardingTour-DUUoI5WE.js +131 -0
  36. package/dist/PasswordField-Bx5YG62t.js +93 -0
  37. package/dist/PreplyLogo-abgOre30.js +112 -0
  38. package/dist/ProgressBar-CEU4GyHn.js +31 -0
  39. package/dist/ProgressSteps-BSqopxqv.js +45 -0
  40. package/dist/Select-Bo7PX_8V.js +124 -0
  41. package/dist/Slider-Crg4DEn_.js +64 -0
  42. package/dist/Spinner-Ck8KQA22.js +86 -0
  43. package/dist/Stars-D5QspUBE.js +72 -0
  44. package/dist/Steps-DbN5vFrP.js +173 -0
  45. package/dist/Switch-Ck_xB0ID.js +49 -0
  46. package/dist/Text-CaOF75Z-.js +121 -0
  47. package/dist/TextHighlighted-Dwq9Clgn.js +34 -0
  48. package/dist/TextInline-BcA4H2Tk.js +34 -0
  49. package/dist/Toast-wJAjSLfo.js +1019 -0
  50. package/dist/TokyoUIChevronDown-DGcVqR1z.js +14 -0
  51. package/dist/Tooltip-grvKQxTN.js +84 -0
  52. package/dist/VisuallyHidden-CtcHcZCK.js +29 -0
  53. package/dist/align-self-VrZUceie.js +42 -0
  54. package/dist/assets/Accordion.css +2 -2
  55. package/dist/assets/AlertBannerProvider.css +2 -2
  56. package/dist/assets/AlertDialog.css +2 -2
  57. package/dist/assets/Avatar.css +3 -3
  58. package/dist/assets/AvatarWithStatus.css +2 -2
  59. package/dist/assets/Badge.css +1 -1
  60. package/dist/assets/Box.css +3 -3
  61. package/dist/assets/BubbleCounter.css +1 -1
  62. package/dist/assets/Button.css +4 -4
  63. package/dist/assets/ButtonBase.css +40 -46
  64. package/dist/assets/Checkbox.css +1 -1
  65. package/dist/assets/Chips.css +2 -2
  66. package/dist/assets/ChipsPrimitive.css +2 -2
  67. package/dist/assets/CountryFlag.css +1 -1
  68. package/dist/assets/Dialog.css +13 -4
  69. package/dist/assets/Divider.css +1 -1
  70. package/dist/assets/DropdownMenu.css +2 -2
  71. package/dist/assets/FieldButton.css +3 -3
  72. package/dist/assets/FormControl.css +1 -1
  73. package/dist/assets/Heading.css +3 -3
  74. package/dist/assets/Icon.css +3 -3
  75. package/dist/assets/InputContainer.css +2 -2
  76. package/dist/assets/LayoutFlex.css +1 -1
  77. package/dist/assets/LayoutFlexItem.css +1 -1
  78. package/dist/assets/Link.css +3 -3
  79. package/dist/assets/Loader.css +1 -1
  80. package/dist/assets/OnboardingTooltip.css +1 -1
  81. package/dist/assets/OnboardingTour.css +1 -1
  82. package/dist/assets/PreplyLogo.css +1 -1
  83. package/dist/assets/ProgressBar.css +1 -1
  84. package/dist/assets/ProgressSteps.css +1 -1
  85. package/dist/assets/Select.css +2 -2
  86. package/dist/assets/Slider.css +1 -1
  87. package/dist/assets/Spinner.css +3 -3
  88. package/dist/assets/Stars.css +3 -3
  89. package/dist/assets/Steps.css +2 -2
  90. package/dist/assets/Switch.css +1 -1
  91. package/dist/assets/Text.css +3 -3
  92. package/dist/assets/TextHighlighted.css +3 -3
  93. package/dist/assets/TextInline.css +3 -3
  94. package/dist/assets/Toast.css +2 -2
  95. package/dist/assets/Tooltip.css +1 -1
  96. package/dist/assets/align-self.css +1 -1
  97. package/dist/assets/{IconTile.css → components.css} +1 -1
  98. package/dist/assets/exp-color.css +2 -2
  99. package/dist/assets/index.css +1 -1
  100. package/dist/assets/layout-gap.css +3 -3
  101. package/dist/assets/layout-grid.css +3 -3
  102. package/dist/assets/layout-hide.css +1 -1
  103. package/dist/assets/layout-padding.css +3 -3
  104. package/dist/assets/layout-relative.css +1 -1
  105. package/dist/assets/text-accent.css +2 -2
  106. package/dist/assets/text-centered.css +1 -1
  107. package/dist/assets/text-weight.css +2 -2
  108. package/dist/chunk-BVTlhY3a.js +24 -0
  109. package/dist/components/Accordion/Accordion.js +4 -60
  110. package/dist/components/Accordion/hooks/useOnOpenChange.js +19 -28
  111. package/dist/components/AlertBanner/AlertBanner.js +11 -26
  112. package/dist/components/AlertBanner/AlertBannerProvider.js +3 -8
  113. package/dist/components/AlertBanner/primitives/AlertBannerAction.js +11 -69
  114. package/dist/components/AlertBanner/primitives/AlertBannerIcon.js +77 -39
  115. package/dist/components/AlertBanner/primitives/AlertBannerRoot.js +26 -22
  116. package/dist/components/AlertBanner/primitives/AlertBannerText.js +11 -70
  117. package/dist/components/AlertDialog/AlertDialog.js +5 -430
  118. package/dist/components/Avatar/Avatar.js +3 -71
  119. package/dist/components/AvatarWithStatus/AvatarWithStatus.js +3 -43
  120. package/dist/components/Badge/Badge.js +4 -62
  121. package/dist/components/Box/Box.js +3 -95
  122. package/dist/components/BubbleCounter/BubbleCounter.js +23 -28
  123. package/dist/components/Button/Button.js +4 -80
  124. package/dist/components/CalloutBanner/CalloutBanner.js +61 -12
  125. package/dist/components/CalloutBanner/primitives/CalloutBannerDismissButton.js +50 -22
  126. package/dist/components/CalloutBanner/primitives/CalloutBannerIcon.js +86 -45
  127. package/dist/components/CalloutBanner/primitives/CalloutBannerRoot.js +50 -24
  128. package/dist/components/CalloutBanner/primitives/CalloutBannerText.js +41 -11
  129. package/dist/components/Checkbox/Checkbox.js +4 -78
  130. package/dist/components/Checkbox/hooks/useIndeterminate.js +24 -30
  131. package/dist/components/Chips/Chips.types.js +0 -1
  132. package/dist/components/Chips/DismissibleChips.js +117 -86
  133. package/dist/components/Chips/MultiSelectChips.js +98 -64
  134. package/dist/components/Chips/SingleSelectChips.js +94 -57
  135. package/dist/components/Chips/private/ChipsPrimitive.js +4 -17
  136. package/dist/components/CountryFlag/CountryFlag.js +3 -44
  137. package/dist/components/Dialog/Dialog.js +56 -31
  138. package/dist/components/Dialog/DialogSteps.js +40 -29
  139. package/dist/components/Dialog/primitives/DialogActions.js +26 -19
  140. package/dist/components/Dialog/primitives/DialogButtonStack.d.ts.map +1 -1
  141. package/dist/components/Dialog/primitives/DialogButtonStack.js +22 -15
  142. package/dist/components/Dialog/primitives/DialogCloseButton.d.ts +1 -1
  143. package/dist/components/Dialog/primitives/DialogCloseButton.d.ts.map +1 -1
  144. package/dist/components/Dialog/primitives/DialogCloseButton.js +4 -67
  145. package/dist/components/Dialog/primitives/DialogDescription.js +3 -43
  146. package/dist/components/Dialog/primitives/DialogFooter.js +37 -34
  147. package/dist/components/Dialog/primitives/DialogRoot.js +4 -315
  148. package/dist/components/Dialog/primitives/DialogTitle.js +3 -42
  149. package/dist/components/Divider/Divider.js +3 -14
  150. package/dist/components/DropdownMenu/DropdownMenu.js +253 -188
  151. package/dist/components/DropdownMenu/primitives/DropdownMenu.primitives.js +5 -34
  152. package/dist/components/DropdownMenu/primitives/DropdownMenuSelectItem.primitives.js +121 -71
  153. package/dist/components/FieldButton/FieldButton.js +3 -37
  154. package/dist/components/FormControl/FormControl.js +3 -105
  155. package/dist/components/Heading/Heading.js +3 -78
  156. package/dist/components/Icon/Icon.js +4 -49
  157. package/dist/components/IconButton/IconButton.d.ts +5 -1
  158. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  159. package/dist/components/IconButton/IconButton.js +4 -28
  160. package/dist/components/IconTile/IconTile.js +11 -69
  161. package/dist/components/IntlFormatted/IntlFormattedAggregatedDateTime.js +16 -32
  162. package/dist/components/IntlFormatted/IntlFormattedCurrency.js +20 -42
  163. package/dist/components/IntlFormatted/IntlFormattedDate.js +73 -195
  164. package/dist/components/IntlFormatted/IntlFormattedTime.js +14 -24
  165. package/dist/components/IntlFormatted/Wrapper.js +14 -8
  166. package/dist/components/LayoutFlex/LayoutFlex.js +3 -100
  167. package/dist/components/LayoutFlex/style/getStyleAttrs.js +71 -143
  168. package/dist/components/LayoutFlex/tests/AlignItems.js +67 -97
  169. package/dist/components/LayoutFlex/tests/ColumnReverse.js +63 -100
  170. package/dist/components/LayoutFlex/tests/DataOverride.js +1498 -1093
  171. package/dist/components/LayoutFlex/tests/Default.js +19 -20
  172. package/dist/components/LayoutFlex/tests/Direction.js +65 -88
  173. package/dist/components/LayoutFlex/tests/Gap.js +115 -197
  174. package/dist/components/LayoutFlex/tests/HideInline.js +95 -136
  175. package/dist/components/LayoutFlex/tests/JustifyContent.js +75 -108
  176. package/dist/components/LayoutFlex/tests/Nowrap.js +35 -42
  177. package/dist/components/LayoutFlex/tests/Padding.js +207 -263
  178. package/dist/components/LayoutFlex/tests/Relative.js +49 -64
  179. package/dist/components/LayoutFlexItem/LayoutFlexItem.js +3 -54
  180. package/dist/components/LayoutGrid/LayoutGrid.js +26 -34
  181. package/dist/components/LayoutGridItem/LayoutGridItem.js +3 -41
  182. package/dist/components/Link/Link.js +3 -72
  183. package/dist/components/Loader/Loader.js +3 -32
  184. package/dist/components/NumberField/NumberField.js +33 -35
  185. package/dist/components/ObserveIntersection/ObserveIntersection.js +41 -42
  186. package/dist/components/OnboardingTooltip/OnboardingTooltip.js +4 -115
  187. package/dist/components/OnboardingTour/OnboardingTour.js +4 -114
  188. package/dist/components/PasswordField/PasswordField.js +3 -78
  189. package/dist/components/PreplyLogo/PreplyLogo.js +3 -81
  190. package/dist/components/ProgressBar/ProgressBar.js +3 -27
  191. package/dist/components/ProgressSteps/ProgressSteps.js +3 -48
  192. package/dist/components/Rating/Rating.js +29 -20
  193. package/dist/components/Rating/RatingInput.js +57 -59
  194. package/dist/components/Rating/Stars.js +4 -8
  195. package/dist/components/Rating/hooks/useHasError.js +11 -15
  196. package/dist/components/Rating/hooks/useHoverPercentage.js +37 -45
  197. package/dist/components/Rating/hooks/useInputState.js +18 -24
  198. package/dist/components/Rating/hooks/useLocalizations.js +12 -24
  199. package/dist/components/Rating/utils/roundToHalfDecimal.js +4 -4
  200. package/dist/components/SelectField/Select.js +5 -112
  201. package/dist/components/SelectField/SelectField.js +29 -24
  202. package/dist/components/SelectField/hooks/useBreakpointMatch.js +18 -19
  203. package/dist/components/ShowOnIntersection/ShowOnIntersection.js +32 -21
  204. package/dist/components/Slider/RangeSlider.js +62 -52
  205. package/dist/components/Slider/Slider.js +3 -10
  206. package/dist/components/Steps/Steps.js +4 -210
  207. package/dist/components/Switch/Switch.js +3 -51
  208. package/dist/components/Text/Text.js +3 -128
  209. package/dist/components/TextField/TextField.js +27 -29
  210. package/dist/components/TextHighlighted/TextHighlighted.js +3 -41
  211. package/dist/components/TextInline/TextInline.js +3 -40
  212. package/dist/components/TextareaField/TextareaField.js +26 -28
  213. package/dist/components/Toast/Toast.js +4 -1168
  214. package/dist/components/Tooltip/Tooltip.js +3 -66
  215. package/dist/components/deprecated/Chips/Chips.js +4 -76
  216. package/dist/components/deprecated/NativeSelectField/NativeSelect.js +40 -32
  217. package/dist/components/deprecated/NativeSelectField/NativeSelectField.js +34 -33
  218. package/dist/components/deprecated/index.js +5 -6
  219. package/dist/components/index.js +50 -150
  220. package/dist/components/private/ButtonBase/ButtonBase.d.ts +7 -11
  221. package/dist/components/private/ButtonBase/ButtonBase.d.ts.map +1 -1
  222. package/dist/components/private/ButtonBase/ButtonBase.js +3 -247
  223. package/dist/components/private/Input/Input.js +27 -19
  224. package/dist/components/private/Input/InputContainer.js +3 -5
  225. package/dist/components/private/Input/Textarea.js +24 -20
  226. package/dist/components/private/Input/index.js +2 -4
  227. package/dist/components/private/Spinner/Spinner.js +3 -52
  228. package/dist/components/private/VisuallyHidden/VisuallyHidden.js +3 -15
  229. package/dist/components-BIYP8wHJ.js +200 -0
  230. package/dist/exp-color-C5mKAN91.js +74 -0
  231. package/dist/floating-ui.utils.dom-CoeTbDZx.js +215 -0
  232. package/dist/index.js +50 -150
  233. package/dist/index.module-1c7ENvxc.js +7 -0
  234. package/dist/jsx-runtime-i4KUlhDu.js +743 -0
  235. package/dist/layout-gap.module-DLD8bcR4.js +95 -0
  236. package/dist/layout-grid.module-CZfhrKrB.js +101 -0
  237. package/dist/layout-hide.module-B1P0N4i3.js +53 -0
  238. package/dist/layout-padding-ugY-yd2q.js +389 -0
  239. package/dist/layout-relative.module-B5xrFD9j.js +6 -0
  240. package/dist/render-icon-Ch3b2dE0.js +290 -0
  241. package/dist/shared-styles/align-self/align-self.js +2 -36
  242. package/dist/shared-styles/exp-color/exp-color.js +2 -68
  243. package/dist/shared-styles/layout-gap/layout-gap.js +13 -7
  244. package/dist/shared-styles/layout-grid/layout-grid.js +28 -28
  245. package/dist/shared-styles/layout-grid-responsive-columns/layout-grid-responsive-columns.js +29 -43
  246. package/dist/shared-styles/layout-hide/layout-hide.js +8 -8
  247. package/dist/shared-styles/layout-padding/layout-padding.js +2 -5
  248. package/dist/shared-styles/layout-relative/layout-relative.js +14 -8
  249. package/dist/shared-styles/text-accent/text-accent.js +2 -25
  250. package/dist/shared-styles/text-centered/text-centered.js +2 -24
  251. package/dist/shared-styles/text-weight/text-weight.js +2 -15
  252. package/dist/store-sN_eYeZT.js +1064 -0
  253. package/dist/storybook-utils/consts.js +6 -8
  254. package/dist/storybook-utils/index.js +1 -5
  255. package/dist/text-accent-CfUFx-1K.js +30 -0
  256. package/dist/text-centered-Dwp2_-Yp.js +30 -0
  257. package/dist/text-weight-CwoqmM4o.js +21 -0
  258. package/dist/useBaseUiId-CWAD_PSs.js +13 -0
  259. package/dist/useBreakpointMatch-D9a3CTNK.js +338 -0
  260. package/dist/useButton-DHTh3Hm7.js +148 -0
  261. package/dist/useDialogClose-BzFIyWco.js +22 -0
  262. package/dist/useId-CJsH-2wV.js +34 -0
  263. package/dist/useOpenInteractionType-D8vA_ZKI.js +4104 -0
  264. package/dist/useRenderElement-ZBds6eRN.js +341 -0
  265. package/dist/utils/Orientation/OrientationProvider.js +54 -23
  266. package/dist/utils/Orientation/index.js +2 -4
  267. package/dist/utils/RovingTabIndex/RovingTabIndexProvider.js +70 -44
  268. package/dist/utils/RovingTabIndex/index.js +2 -4
  269. package/dist/utils/createRequiredContext.js +23 -13
  270. package/dist/utils/filterAttributesPassedByRadixUIAtRuntime.js +28 -25
  271. package/dist/utils/render-icon.js +3 -320
  272. package/dist/utils/shared-strings.js +24 -32
  273. package/dist/utils/useBreakpointMatch.d.ts.map +1 -1
  274. package/dist/utils/useBreakpointMatch.js +2 -183
  275. package/dist/utils/useControllableState/useControllableState.js +31 -25
  276. package/dist/utils/useMergeRefs.js +29 -14
  277. package/dist/utils/useStableCallback/useStableCallback.js +28 -13
  278. package/package.json +17 -22
  279. package/dist/AlertBannerProvider-DTx2Xp3V.js +0 -50
  280. package/dist/BubbleCounter.module-QMwXWFIS.js +0 -16
  281. package/dist/ChipsPrimitive-DzsaOWgY.js +0 -1244
  282. package/dist/Dialog.module-Ba1X7b3N.js +0 -29
  283. package/dist/DialogRootContext-BCXmmJAw.js +0 -15
  284. package/dist/DropdownMenu.primitives-B3WK71bR.js +0 -5871
  285. package/dist/IconTile-D1G7MljH.js +0 -172
  286. package/dist/InputContainer-oHJlLWIi.js +0 -30
  287. package/dist/Slider-DB4Maswa.js +0 -55
  288. package/dist/Stars-C_mHop2H.js +0 -67
  289. package/dist/TokyoUIChevronDown-D_tD1yU8.js +0 -11
  290. package/dist/floating-ui.utils.dom-3OgjGonN.js +0 -234
  291. package/dist/index.module-Q9TzIR6B.js +0 -11
  292. package/dist/layout-gap.module-MKn_un_k.js +0 -97
  293. package/dist/layout-grid.module-P4B4WVUy.js +0 -103
  294. package/dist/layout-hide.module-Bpl3Pl-a.js +0 -55
  295. package/dist/layout-padding-D5I6rRlL.js +0 -373
  296. package/dist/layout-relative.module-1z75aSwo.js +0 -8
  297. package/dist/store-BUKWfVf3.js +0 -1155
  298. package/dist/useBaseUiId-DavsGYu9.js +0 -8
  299. package/dist/useButton-CFPpP0o5.js +0 -193
  300. package/dist/useDialogClose-C9x1leGd.js +0 -34
  301. package/dist/useId-BhIOp2JG.js +0 -28
  302. package/dist/useOpenInteractionType-Cj41-8Yk.js +0 -2880
  303. package/dist/useRenderElement-DtYPTE_y.js +0 -350
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
3
+ import { forwardRef } from "react";
4
+ import { getDatasetProps } from "@preply/ds-web-core";
5
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
6
+ import { countryNames, getCountryFlagUrl } from "@preply/ds-core";
7
+ import './assets/CountryFlag.css';var index_module_default = { flag: "flag__wPkCc" };
8
+ //#endregion
9
+ //#region src/components/CountryFlag/CountryFlag.tsx
10
+ var import_jsx_runtime = require_jsx_runtime();
11
+ var placeholderSvg = "data:image/svg+xml;base64,PHN2ZyBkYXRhLXByZXBseS1kcy1jb21wb25lbnQ9IlN2Z0NvdW50cnlGbGFnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNDgwIi8+";
12
+ /**
13
+ * Renders an `img` element with the country flag. Passes down all the other props to the `img` element.
14
+ *
15
+ * @example
16
+ * <CountryFlag code="ua" alt="Ukraine" />
17
+ *
18
+ * @example Lazy loading the img
19
+ * <CountryFlag code="ua" alt="Ukraine" loading="lazy" />
20
+ */
21
+ var CountryFlag = forwardRef(function CountryFlag({ alt, dataset, size = "small", simplified = true, code: countryCode, ...rest }, ref) {
22
+ const width = size === "large" ? 32 : size === "medium" ? 24 : 16;
23
+ const height = width * 3 / 4;
24
+ const imgProps = {
25
+ alt,
26
+ src: typeof countryCode !== "string" || !countryNames[countryCode] ? placeholderSvg : getCountryFlagUrl({
27
+ countryCode,
28
+ simplified,
29
+ requester: "WebCountryFlag"
30
+ }),
31
+ width,
32
+ height,
33
+ className: index_module_default.flag
34
+ };
35
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
36
+ ...rest,
37
+ ref,
38
+ ...imgProps,
39
+ ...getDatasetProps(dataset, { preplyDsComponent: webComponentNames.CountryFlag })
40
+ });
41
+ });
42
+ //#endregion
43
+ export { CountryFlag as t };
@@ -0,0 +1,21 @@
1
+ import './assets/Dialog.css';var Dialog_module_default = {
2
+ dialog: "dialog__80F7X",
3
+ slideInUp: "slideInUp__Ni5JT",
4
+ slideOutDown: "slideOutDown__g4ZMG",
5
+ footer: "footer__xkM-4",
6
+ opacityIn: "opacityIn__p29KJ",
7
+ opacityOut: "opacityOut__4QmKk",
8
+ slideOutUp: "slideOutUp__FRb6L",
9
+ overlay: "overlay__otkvG",
10
+ close: "close__-TGOq",
11
+ title: "title__tGVp1",
12
+ description: "description__84a0F",
13
+ header: "header__ADm9A",
14
+ scrollEndDetector: "scrollEndDetector__Zrfqq",
15
+ buttonStack: "buttonStack__KhEjj",
16
+ stepControls: "stepControls__FoOIr",
17
+ previous: "previous__q2IlS",
18
+ next: "next__h6v4X"
19
+ };
20
+ //#endregion
21
+ export { Dialog_module_default as t };
@@ -0,0 +1,98 @@
1
+ "use client";
2
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
3
+ import { t as useRenderElement } from "./useRenderElement-ZBds6eRN.js";
4
+ import { n as useDialogRootContext } from "./DialogRootContext-Bz8RW-Mq.js";
5
+ import { t as useDialogClose } from "./useDialogClose-BzFIyWco.js";
6
+ import { t as IconButton } from "./IconButton-BPKpgfep.js";
7
+ import { genericAriaLabels } from "./utils/shared-strings.js";
8
+ import { t as Dialog_module_default } from "./Dialog.module-Db2BJAn4.js";
9
+ import * as React$1 from "react";
10
+ import { forwardRef } from "react";
11
+ import { useIntl } from "react-intl";
12
+ //#region ../../node_modules/@base-ui-components/react/esm/dialog/close/DialogClose.js
13
+ /**
14
+ * A button that closes the dialog.
15
+ * Renders a `<button>` element.
16
+ *
17
+ * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
18
+ */
19
+ var DialogClose = /* @__PURE__ */ React$1.forwardRef(function DialogClose(componentProps, forwardedRef) {
20
+ const { render, className, disabled = false, nativeButton = true, ...elementProps } = componentProps;
21
+ const { store } = useDialogRootContext();
22
+ const { getRootProps, ref } = useDialogClose({
23
+ disabled,
24
+ open: store.useState("open"),
25
+ setOpen: store.setOpen,
26
+ nativeButton
27
+ });
28
+ return useRenderElement("button", componentProps, {
29
+ state: React$1.useMemo(() => ({ disabled }), [disabled]),
30
+ ref: [forwardedRef, ref],
31
+ props: [elementProps, getRootProps]
32
+ });
33
+ });
34
+ if (process.env.NODE_ENV !== "production") DialogClose.displayName = "DialogClose";
35
+ //#endregion
36
+ //#region ../media-icons/dist/24/TokyoUIClose.svg
37
+ var SvgTokyoUiClose = ({ title, titleId, ...props }, ref) => /* @__PURE__ */ React$1.createElement("svg", {
38
+ "data-preply-ds-component": "SvgTokyoUIIcon",
39
+ xmlns: "http://www.w3.org/2000/svg",
40
+ viewBox: "0 0 24 24",
41
+ ref,
42
+ "aria-labelledby": titleId,
43
+ ...props
44
+ }, title ? /* @__PURE__ */ React$1.createElement("title", { id: titleId }, title) : null, /* @__PURE__ */ React$1.createElement("path", {
45
+ fillRule: "evenodd",
46
+ d: "M7.044 5.63 5.63 7.044l4.95 4.95-4.95 4.95 1.414 1.414 4.95-4.95 4.95 4.95 1.414-1.414-4.95-4.95 4.95-4.95-1.414-1.414-4.95 4.95-4.95-4.95Z",
47
+ clipRule: "evenodd"
48
+ }));
49
+ var ForwardRef = forwardRef(SvgTokyoUiClose);
50
+ //#endregion
51
+ //#region src/components/Dialog/primitives/DialogCloseButton.tsx
52
+ var import_jsx_runtime = require_jsx_runtime();
53
+ /**
54
+ * The DialogCloseButton is a container which defaults to:
55
+ * 1. Displaying an `IconButton` child with a `TokyoUIClose` icon, which can be
56
+ * overridden with the `children` prop.
57
+ * 2. Being absolutely positioned at the top right corner of the dialog, which
58
+ * can be overridden with the `className` prop.
59
+ *
60
+ * @example
61
+ * <DialogCloseButton className={myCustomPositioningStyle}>
62
+ * <MyCustomCloseButton />
63
+ * </DialogCloseButton>
64
+ *
65
+ * If you want the default button but need to pass your own props to it, you
66
+ * can use the `DefaultCloseButton` wrapper component.
67
+ *
68
+ * @example
69
+ * <DialogCloseButton>
70
+ * <DialogDefaultCloseButton
71
+ * variant="onColor"
72
+ * dataset={{ testid: 'close-button' }}
73
+ * />
74
+ * </DialogCloseButton>
75
+ */
76
+ var DialogCloseButton = forwardRef(function DialogCloseButton({ children, className }, ref) {
77
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
78
+ className: [Dialog_module_default.close, className].filter(Boolean).join(" "),
79
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogClose, {
80
+ ref,
81
+ render: children !== null && children !== void 0 ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogDefaultCloseButton, {})
82
+ })
83
+ });
84
+ });
85
+ var DialogDefaultCloseButton = forwardRef(function DefaultCloseButton(props, ref) {
86
+ const { formatMessage } = useIntl();
87
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconButton, {
88
+ ref,
89
+ size: "small",
90
+ variant: "ghost",
91
+ dataset: { testid: "dialog-close" },
92
+ assistiveText: formatMessage(genericAriaLabels.close),
93
+ svg: ForwardRef,
94
+ ...props
95
+ });
96
+ });
97
+ //#endregion
98
+ export { DialogDefaultCloseButton as n, DialogCloseButton as t };
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
3
+ import { t as useRenderElement } from "./useRenderElement-ZBds6eRN.js";
4
+ import { t as useBaseUiId } from "./useBaseUiId-CWAD_PSs.js";
5
+ import { n as useDialogRootContext } from "./DialogRootContext-Bz8RW-Mq.js";
6
+ import { t as Dialog_module_default } from "./Dialog.module-Db2BJAn4.js";
7
+ import * as React$1 from "react";
8
+ import { forwardRef } from "react";
9
+ import { getDatasetProps } from "@preply/ds-web-core";
10
+ //#region ../../node_modules/@base-ui-components/react/esm/dialog/description/DialogDescription.js
11
+ /**
12
+ * A paragraph with additional information about the dialog.
13
+ * Renders a `<p>` element.
14
+ *
15
+ * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
16
+ */
17
+ var DialogDescription$1 = /* @__PURE__ */ React$1.forwardRef(function DialogDescription(componentProps, forwardedRef) {
18
+ const { render, className, id: idProp, ...elementProps } = componentProps;
19
+ const { store } = useDialogRootContext();
20
+ const id = useBaseUiId(idProp);
21
+ store.useSyncedValueWithCleanup("descriptionElementId", id);
22
+ return useRenderElement("p", componentProps, {
23
+ ref: forwardedRef,
24
+ props: [{ id }, elementProps]
25
+ });
26
+ });
27
+ if (process.env.NODE_ENV !== "production") DialogDescription$1.displayName = "DialogDescription";
28
+ //#endregion
29
+ //#region src/components/Dialog/primitives/DialogDescription.tsx
30
+ var import_jsx_runtime = require_jsx_runtime();
31
+ var DialogDescription = forwardRef(function DialogDescription({ children, className, dataset, ...props }, ref) {
32
+ if (!children) return null;
33
+ const classNames = [Dialog_module_default.description, className].filter(Boolean).join(" ");
34
+ const datasetProps = getDatasetProps(dataset);
35
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogDescription$1, {
36
+ ref,
37
+ className: classNames,
38
+ ...datasetProps,
39
+ ...props,
40
+ children
41
+ });
42
+ });
43
+ //#endregion
44
+ export { DialogDescription as t };
@@ -0,0 +1,335 @@
1
+ "use client";
2
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
3
+ import { f as useRefWithInit, t as useRenderElement, u as EMPTY_OBJECT } from "./useRenderElement-ZBds6eRN.js";
4
+ import { S as useEventCallback } from "./floating-ui.utils.dom-CoeTbDZx.js";
5
+ import { A as inertValue, F as useOpenChangeComplete, L as COMPOSITE_KEYS, M as popupStateMapping, ft as transitionStatusMapping, j as CommonPopupDataAttributes, o as getEmptyContext, r as InternalBackdrop, v as FloatingFocusManager, y as FloatingPortal } from "./useOpenInteractionType-D8vA_ZKI.js";
6
+ import { n as useDialogRootContext, t as DialogRootContext } from "./DialogRootContext-Bz8RW-Mq.js";
7
+ import { n as useDialogRoot, t as DialogStore } from "./store-sN_eYeZT.js";
8
+ import { t as Dialog_module_default } from "./Dialog.module-Db2BJAn4.js";
9
+ import * as React$1 from "react";
10
+ import { useCallback, useEffect, useState } from "react";
11
+ import { getDatasetProps } from "@preply/ds-web-core";
12
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
13
+ import { usePortalElement } from "@preply/ds-web-root";
14
+ //#region ../../node_modules/@base-ui-components/react/esm/dialog/backdrop/DialogBackdrop.js
15
+ var stateAttributesMapping$1 = {
16
+ ...popupStateMapping,
17
+ ...transitionStatusMapping
18
+ };
19
+ /**
20
+ * An overlay displayed beneath the popup.
21
+ * Renders a `<div>` element.
22
+ *
23
+ * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
24
+ */
25
+ var DialogBackdrop = /* @__PURE__ */ React$1.forwardRef(function DialogBackdrop(componentProps, forwardedRef) {
26
+ const { render, className, forceRender = false, ...elementProps } = componentProps;
27
+ const { store } = useDialogRootContext();
28
+ const open = store.useState("open");
29
+ const nested = store.useState("nested");
30
+ const mounted = store.useState("mounted");
31
+ const transitionStatus = store.useState("transitionStatus");
32
+ return useRenderElement("div", componentProps, {
33
+ state: React$1.useMemo(() => ({
34
+ open,
35
+ transitionStatus
36
+ }), [open, transitionStatus]),
37
+ ref: [store.context.backdropRef, forwardedRef],
38
+ stateAttributesMapping: stateAttributesMapping$1,
39
+ props: [{
40
+ role: "presentation",
41
+ hidden: !mounted,
42
+ style: {
43
+ userSelect: "none",
44
+ WebkitUserSelect: "none"
45
+ }
46
+ }, elementProps],
47
+ enabled: forceRender || !nested
48
+ });
49
+ });
50
+ if (process.env.NODE_ENV !== "production") DialogBackdrop.displayName = "DialogBackdrop";
51
+ //#endregion
52
+ //#region ../../node_modules/@base-ui-components/react/esm/dialog/popup/DialogPopupCssVars.js
53
+ var DialogPopupCssVars = /* @__PURE__ */ function(DialogPopupCssVars) {
54
+ /**
55
+ * Indicates how many dialogs are nested within.
56
+ * @type {number}
57
+ */
58
+ DialogPopupCssVars["nestedDialogs"] = "--nested-dialogs";
59
+ return DialogPopupCssVars;
60
+ }({});
61
+ //#endregion
62
+ //#region ../../node_modules/@base-ui-components/react/esm/dialog/popup/DialogPopupDataAttributes.js
63
+ var DialogPopupDataAttributes = function(DialogPopupDataAttributes) {
64
+ /**
65
+ * Present when the dialog is open.
66
+ */
67
+ DialogPopupDataAttributes[DialogPopupDataAttributes["open"] = CommonPopupDataAttributes.open] = "open";
68
+ /**
69
+ * Present when the dialog is closed.
70
+ */
71
+ DialogPopupDataAttributes[DialogPopupDataAttributes["closed"] = CommonPopupDataAttributes.closed] = "closed";
72
+ /**
73
+ * Present when the dialog is animating in.
74
+ */
75
+ DialogPopupDataAttributes[DialogPopupDataAttributes["startingStyle"] = CommonPopupDataAttributes.startingStyle] = "startingStyle";
76
+ /**
77
+ * Present when the dialog is animating out.
78
+ */
79
+ DialogPopupDataAttributes[DialogPopupDataAttributes["endingStyle"] = CommonPopupDataAttributes.endingStyle] = "endingStyle";
80
+ /**
81
+ * Present when the dialog is nested within another dialog.
82
+ */
83
+ DialogPopupDataAttributes["nested"] = "data-nested";
84
+ /**
85
+ * Present when the dialog has other open dialogs nested within it.
86
+ */
87
+ DialogPopupDataAttributes["nestedDialogOpen"] = "data-nested-dialog-open";
88
+ return DialogPopupDataAttributes;
89
+ }({});
90
+ //#endregion
91
+ //#region ../../node_modules/@base-ui-components/react/esm/dialog/portal/DialogPortalContext.js
92
+ var DialogPortalContext = /* @__PURE__ */ React$1.createContext(void 0);
93
+ if (process.env.NODE_ENV !== "production") DialogPortalContext.displayName = "DialogPortalContext";
94
+ function useDialogPortalContext() {
95
+ const value = React$1.useContext(DialogPortalContext);
96
+ if (value === void 0) throw new Error("Base UI: <Dialog.Portal> is missing.");
97
+ return value;
98
+ }
99
+ //#endregion
100
+ //#region ../../node_modules/@base-ui-components/react/esm/dialog/popup/DialogPopup.js
101
+ var import_jsx_runtime = require_jsx_runtime();
102
+ var stateAttributesMapping = {
103
+ ...popupStateMapping,
104
+ ...transitionStatusMapping,
105
+ nestedDialogOpen(value) {
106
+ return value ? { [DialogPopupDataAttributes.nestedDialogOpen]: "" } : null;
107
+ }
108
+ };
109
+ /**
110
+ * A container for the dialog contents.
111
+ * Renders a `<div>` element.
112
+ *
113
+ * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
114
+ */
115
+ var DialogPopup = /* @__PURE__ */ React$1.forwardRef(function DialogPopup(componentProps, forwardedRef) {
116
+ const { className, finalFocus, initialFocus, render, ...elementProps } = componentProps;
117
+ const { store } = useDialogRootContext();
118
+ const descriptionElementId = store.useState("descriptionElementId");
119
+ const dismissible = store.useState("dismissible");
120
+ const floatingRootContext = store.useState("floatingRootContext");
121
+ const rootPopupProps = store.useState("popupProps");
122
+ const modal = store.useState("modal");
123
+ const mounted = store.useState("mounted");
124
+ const nested = store.useState("nested");
125
+ const nestedOpenDialogCount = store.useState("nestedOpenDialogCount");
126
+ const open = store.useState("open");
127
+ const openMethod = store.useState("openMethod");
128
+ const titleElementId = store.useState("titleElementId");
129
+ const transitionStatus = store.useState("transitionStatus");
130
+ useDialogPortalContext();
131
+ useOpenChangeComplete({
132
+ open,
133
+ ref: store.context.popupRef,
134
+ onComplete() {
135
+ if (open) {
136
+ var _store$context$openCh, _store$context;
137
+ (_store$context$openCh = (_store$context = store.context).openChangeComplete) === null || _store$context$openCh === void 0 || _store$context$openCh.call(_store$context, true);
138
+ }
139
+ }
140
+ });
141
+ const defaultInitialFocus = useEventCallback((interactionType) => {
142
+ if (interactionType === "touch") return store.context.popupRef.current;
143
+ return true;
144
+ });
145
+ const resolvedInitialFocus = initialFocus === void 0 ? defaultInitialFocus : initialFocus;
146
+ const nestedDialogOpen = nestedOpenDialogCount > 0;
147
+ const element = useRenderElement("div", componentProps, {
148
+ state: React$1.useMemo(() => ({
149
+ open,
150
+ nested,
151
+ transitionStatus,
152
+ nestedDialogOpen
153
+ }), [
154
+ open,
155
+ nested,
156
+ transitionStatus,
157
+ nestedDialogOpen
158
+ ]),
159
+ props: [
160
+ rootPopupProps,
161
+ {
162
+ "aria-labelledby": titleElementId !== null && titleElementId !== void 0 ? titleElementId : void 0,
163
+ "aria-describedby": descriptionElementId !== null && descriptionElementId !== void 0 ? descriptionElementId : void 0,
164
+ role: "dialog",
165
+ tabIndex: -1,
166
+ hidden: !mounted,
167
+ onKeyDown(event) {
168
+ if (COMPOSITE_KEYS.has(event.key)) event.stopPropagation();
169
+ },
170
+ style: { [DialogPopupCssVars.nestedDialogs]: nestedOpenDialogCount }
171
+ },
172
+ elementProps
173
+ ],
174
+ ref: [
175
+ forwardedRef,
176
+ store.context.popupRef,
177
+ store.getElementSetter("popupElement")
178
+ ],
179
+ stateAttributesMapping
180
+ });
181
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(React$1.Fragment, { children: [mounted && modal === true && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InternalBackdrop, {
182
+ ref: store.context.internalBackdropRef,
183
+ inert: inertValue(!open)
184
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingFocusManager, {
185
+ context: floatingRootContext,
186
+ openInteractionType: openMethod,
187
+ disabled: !mounted,
188
+ closeOnFocusOut: dismissible,
189
+ initialFocus: resolvedInitialFocus,
190
+ returnFocus: finalFocus,
191
+ modal: modal !== false,
192
+ restoreFocus: "popup",
193
+ children: element
194
+ })] });
195
+ });
196
+ if (process.env.NODE_ENV !== "production") DialogPopup.displayName = "DialogPopup";
197
+ //#endregion
198
+ //#region ../../node_modules/@base-ui-components/react/esm/dialog/portal/DialogPortal.js
199
+ /**
200
+ * A portal element that moves the popup to a different part of the DOM.
201
+ * By default, the portal element is appended to `<body>`.
202
+ *
203
+ * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
204
+ */
205
+ function DialogPortal(props) {
206
+ const { children, keepMounted = false, container } = props;
207
+ const { store } = useDialogRootContext();
208
+ if (!(store.useState("mounted") || keepMounted)) return null;
209
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalContext.Provider, {
210
+ value: keepMounted,
211
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingPortal, {
212
+ root: container,
213
+ children
214
+ })
215
+ });
216
+ }
217
+ //#endregion
218
+ //#region ../../node_modules/@base-ui-components/react/esm/dialog/root/DialogRoot.js
219
+ var INITIAL_STATE = {
220
+ open: false,
221
+ dismissible: true,
222
+ nested: false,
223
+ popupElement: null,
224
+ triggerElement: null,
225
+ modal: true,
226
+ descriptionElementId: void 0,
227
+ titleElementId: void 0,
228
+ openMethod: null,
229
+ mounted: false,
230
+ transitionStatus: "idle",
231
+ nestedOpenDialogCount: 0,
232
+ triggerProps: EMPTY_OBJECT,
233
+ popupProps: EMPTY_OBJECT,
234
+ floatingRootContext: getEmptyContext()
235
+ };
236
+ /**
237
+ * Groups all parts of the dialog.
238
+ * Doesn’t render its own HTML element.
239
+ *
240
+ * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
241
+ */
242
+ var DialogRoot$1 = function DialogRoot(props) {
243
+ const { children, open: openProp, defaultOpen: defaultOpenProp = false, onOpenChange, onOpenChangeComplete, dismissible = true, modal = true, actionsRef } = props;
244
+ const parentDialogRootContext = useDialogRootContext(true);
245
+ const nested = Boolean(parentDialogRootContext);
246
+ const store = useRefWithInit(DialogStore.create, INITIAL_STATE).current;
247
+ store.useControlledProp("open", openProp, defaultOpenProp);
248
+ store.useSyncedValues({
249
+ dismissible,
250
+ nested,
251
+ modal
252
+ });
253
+ store.useContextCallback("openChange", onOpenChange);
254
+ store.useContextCallback("openChangeComplete", onOpenChangeComplete);
255
+ useDialogRoot({
256
+ store,
257
+ actionsRef,
258
+ parentContext: parentDialogRootContext === null || parentDialogRootContext === void 0 ? void 0 : parentDialogRootContext.store.context,
259
+ onOpenChange
260
+ });
261
+ const contextValue = React$1.useMemo(() => ({ store }), [store]);
262
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRootContext.Provider, {
263
+ value: contextValue,
264
+ children
265
+ });
266
+ };
267
+ if (process.env.NODE_ENV !== "production") DialogRoot$1.displayName = "DialogRoot";
268
+ //#endregion
269
+ //#region src/components/Dialog/primitives/DialogRoot.tsx
270
+ var DialogRoot = ({ children, open, onOpen, onClose, overlay = true, size = "md", mobileFullHeight = false, className, dataset, ...props }) => {
271
+ const container = usePortalElement();
272
+ const respondToHeightChange = useResponsiveFullHeightStyle(open);
273
+ const onOpenChange = useCallback((open) => {
274
+ if (!open) onClose === null || onClose === void 0 || onClose();
275
+ else onOpen === null || onOpen === void 0 || onOpen();
276
+ }, [onClose, onOpen]);
277
+ const classNames = [Dialog_module_default.dialog, className].filter(Boolean).join(" ");
278
+ const datasetProps = getDatasetProps(dataset, { preplyDsComponent: webComponentNames.DialogRoot });
279
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRoot$1, {
280
+ open,
281
+ onOpenChange,
282
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, {
283
+ container,
284
+ children: [overlay && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogBackdrop, {
285
+ className: Dialog_module_default.overlay,
286
+ forceRender: true,
287
+ "data-testid": "dialog-overlay",
288
+ "data-preply-ds-component": webComponentNames.DialogOverlay
289
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPopup, {
290
+ ref: respondToHeightChange,
291
+ className: classNames,
292
+ ...getResponsiveSizeAttributes(size),
293
+ "data-mobile-full-height": mobileFullHeight ? "" : void 0,
294
+ ...datasetProps,
295
+ ...props,
296
+ children
297
+ })]
298
+ })
299
+ });
300
+ };
301
+ function useResponsiveFullHeightStyle(isOpen) {
302
+ const [el, setEl] = useState(null);
303
+ const captureRef = useCallback((node) => setEl(node), []);
304
+ useEffect(() => {
305
+ if (!isOpen || !el) return;
306
+ const toggleFullHeight = async () => {
307
+ const animations = el.getAnimations().map((a) => a.finished);
308
+ await Promise.allSettled(animations);
309
+ const { y } = el.getBoundingClientRect();
310
+ el.toggleAttribute("data-no-border-radius", y === 0);
311
+ };
312
+ toggleFullHeight();
313
+ window.addEventListener("resize", toggleFullHeight);
314
+ const resizeObserver = new ResizeObserver(toggleFullHeight);
315
+ resizeObserver.observe(el);
316
+ return () => {
317
+ window.removeEventListener("resize", toggleFullHeight);
318
+ resizeObserver.disconnect();
319
+ };
320
+ }, [isOpen, el]);
321
+ return captureRef;
322
+ }
323
+ function getResponsiveSizeAttributes(size) {
324
+ if (typeof size === "string") return { "data-size": size };
325
+ const dataAttrs = {};
326
+ if (typeof size._ === "string") dataAttrs["data-size"] = size._;
327
+ if (typeof size["narrow-l"] === "string") dataAttrs["data-size-narrow-l"] = size["narrow-l"];
328
+ if (typeof size["medium-s"] === "string") dataAttrs["data-size-medium-s"] = size["medium-s"];
329
+ if (typeof size["medium-l"] === "string") dataAttrs["data-size-medium-l"] = size["medium-l"];
330
+ if (typeof size["wide-s"] === "string") dataAttrs["data-size-wide-s"] = size["wide-s"];
331
+ if (typeof size["wide-l"] === "string") dataAttrs["data-size-wide-l"] = size["wide-l"];
332
+ return dataAttrs;
333
+ }
334
+ //#endregion
335
+ export { DialogRoot as t };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import * as React$1 from "react";
3
+ //#region ../../node_modules/@base-ui-components/react/esm/dialog/root/DialogRootContext.js
4
+ var DialogRootContext = /* @__PURE__ */ React$1.createContext(void 0);
5
+ if (process.env.NODE_ENV !== "production") DialogRootContext.displayName = "DialogRootContext";
6
+ function useDialogRootContext(optional) {
7
+ const dialogRootContext = React$1.useContext(DialogRootContext);
8
+ if (optional === false && dialogRootContext === void 0) throw new Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");
9
+ return dialogRootContext;
10
+ }
11
+ //#endregion
12
+ export { useDialogRootContext as n, DialogRootContext as t };
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
3
+ import { t as useRenderElement } from "./useRenderElement-ZBds6eRN.js";
4
+ import { t as useBaseUiId } from "./useBaseUiId-CWAD_PSs.js";
5
+ import { n as useDialogRootContext } from "./DialogRootContext-Bz8RW-Mq.js";
6
+ import { t as Dialog_module_default } from "./Dialog.module-Db2BJAn4.js";
7
+ import * as React$1 from "react";
8
+ import { forwardRef } from "react";
9
+ import { getDatasetProps } from "@preply/ds-web-core";
10
+ //#region ../../node_modules/@base-ui-components/react/esm/dialog/title/DialogTitle.js
11
+ /**
12
+ * A heading that labels the dialog.
13
+ * Renders an `<h2>` element.
14
+ *
15
+ * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
16
+ */
17
+ var DialogTitle$1 = /* @__PURE__ */ React$1.forwardRef(function DialogTitle(componentProps, forwardedRef) {
18
+ const { render, className, id: idProp, ...elementProps } = componentProps;
19
+ const { store } = useDialogRootContext();
20
+ const id = useBaseUiId(idProp);
21
+ store.useSyncedValueWithCleanup("titleElementId", id);
22
+ return useRenderElement("h2", componentProps, {
23
+ ref: forwardedRef,
24
+ props: [{ id }, elementProps]
25
+ });
26
+ });
27
+ if (process.env.NODE_ENV !== "production") DialogTitle$1.displayName = "DialogTitle";
28
+ //#endregion
29
+ //#region src/components/Dialog/primitives/DialogTitle.tsx
30
+ var import_jsx_runtime = require_jsx_runtime();
31
+ var DialogTitle = forwardRef(function DialogTitle({ children, className, dataset, ...props }, ref) {
32
+ const classNames = [Dialog_module_default.title, className].filter(Boolean).join(" ");
33
+ const datasetProps = getDatasetProps(dataset);
34
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTitle$1, {
35
+ ref,
36
+ className: classNames,
37
+ ...datasetProps,
38
+ ...props,
39
+ children
40
+ });
41
+ });
42
+ //#endregion
43
+ export { DialogTitle as t };
@@ -0,0 +1,17 @@
1
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
2
+ import "react";
3
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
4
+ import './assets/Divider.css';var Divider_module_default = {
5
+ Divider: "Divider__kU514",
6
+ "size-small": "size-small__OdB2p",
7
+ "size-large": "size-large__4iJ0a"
8
+ };
9
+ //#endregion
10
+ //#region src/components/Divider/Divider.tsx
11
+ var import_jsx_runtime = require_jsx_runtime();
12
+ var Divider = ({ size = "small" }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("hr", {
13
+ className: `${Divider_module_default.Divider} ${Divider_module_default[`size-${size}`]}`,
14
+ "data-preply-ds-component": webComponentNames.Divider
15
+ });
16
+ //#endregion
17
+ export { Divider as t };