@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,32 @@
1
+ "use client";
2
+ import { filterAttributesPassedByRadixUIAtRuntime } from "./utils/filterAttributesPassedByRadixUIAtRuntime.js";
3
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
4
+ import { forwardRef } from "react";
5
+ import { getDatasetProps, moduleClassNames } from "@preply/ds-web-core";
6
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
7
+ import './assets/FieldButton.css';var index_module_default = { FieldButton: "FieldButton__OWtNd" };
8
+ //#endregion
9
+ //#region src/components/FieldButton/FieldButton.tsx
10
+ var import_jsx_runtime = require_jsx_runtime();
11
+ var FieldButton = forwardRef(function FieldButtonComponent({ svg: Svg, assistiveText, onClick, dataset, ...restPropsPassedByRadixUI }, ref) {
12
+ const classNames = moduleClassNames(index_module_default, webComponentNames.FieldButton);
13
+ const handleClick = (ev) => {
14
+ ev.stopPropagation();
15
+ onClick === null || onClick === void 0 || onClick(ev);
16
+ };
17
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
18
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
19
+ ...getDatasetProps(dataset, { preplyDsComponent: webComponentNames.FieldButton }),
20
+ className: classNames.join(" "),
21
+ title: assistiveText,
22
+ onClick: handleClick,
23
+ ref,
24
+ type: "button",
25
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Svg, {
26
+ "aria-hidden": "true",
27
+ focusable: "false"
28
+ })
29
+ });
30
+ });
31
+ //#endregion
32
+ export { FieldButton as t };
@@ -0,0 +1,128 @@
1
+ "use client";
2
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
3
+ import { isValidElement, useId } from "react";
4
+ import { getDatasetProps } from "@preply/ds-web-core";
5
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
6
+ import { FormattedMessage } from "react-intl";
7
+ import { Slot } from "radix-ui";
8
+ import './assets/FormControl.css';var FormControl_module_default = {
9
+ container: "container__dtKps",
10
+ label: "label__S0tQE",
11
+ required: "required__GVzWg",
12
+ description: "description__h6Gw1",
13
+ error: "error__MGvA2"
14
+ };
15
+ //#endregion
16
+ //#region src/components/FormControl/FormControl.tsx
17
+ var import_jsx_runtime = require_jsx_runtime();
18
+ function getInputAriaAttributes({ id, error, description, hasError }) {
19
+ const ariaAttributes = {};
20
+ if (hasError) ariaAttributes["aria-invalid"] = true;
21
+ if (error) {
22
+ ariaAttributes["aria-invalid"] = true;
23
+ ariaAttributes["aria-errormessage"] = `${id}-error`;
24
+ }
25
+ if (description) ariaAttributes["aria-describedby"] = `${id}-description`;
26
+ return ariaAttributes;
27
+ }
28
+ /**
29
+ * FormControl component provides a consistent layout and accessibility
30
+ * for the form fields. You can use it to create custom fields not supported
31
+ * by the DS yet.
32
+ *
33
+ * Note that FormControl will implicitly provide some props to the child component:
34
+ *
35
+ * - `id` forwarded from FormControl props or will be generated automatically for accessibility purposes;
36
+ * - `aria-invalid` and `aria-errormessage` when `error` is provided;
37
+ * - `aria-describedby` when `description` is provided;
38
+ * - `required` when FormControl's `required` is true;
39
+ *
40
+ * @example
41
+ * const MyCustomInput = styled.input`
42
+ * // ensures that the input label is visible when scrolled to
43
+ * scroll-margin-top: var(--ds-input-scroll-margin-top);
44
+ * &[aria-invalid='true'] {
45
+ * border-color: red;
46
+ * }
47
+ * `
48
+ *
49
+ * <FormControl label="Email">
50
+ * <MyCustomInput />
51
+ * </FormControl>
52
+ */
53
+ var FormControl = ({ id: idProp, label, hideLabel, description, error, hasError, children, required, dataset, onClick, preplyDsComponent = webComponentNames.FormControl, useLegacyRequiredLabel = false }) => {
54
+ const generatedId = useId();
55
+ const id = idProp || generatedId;
56
+ const inputAriaAttributes = getInputAriaAttributes({
57
+ id,
58
+ error,
59
+ description,
60
+ hasError
61
+ });
62
+ const datasetProps = getDatasetProps(dataset, { preplyDsComponent });
63
+ /**
64
+ * Warn developers about improper usage
65
+ */
66
+ if (process.env.NODE_ENV === "development") {
67
+ if (isValidElement(children)) {
68
+ const childProps = children.props;
69
+ if ("id" in childProps) console.error("FormControl: trying to pass id prop to the child component. Pass it to the FormControl instead.");
70
+ if ("required" in childProps) console.error("FormControl: trying to pass required prop to the child component. Pass it to the FormControl instead.");
71
+ }
72
+ if (!label) console.error("FormControl: label is required for accessibility reasons. Pass it to the field even if it's visually hidden.");
73
+ }
74
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
75
+ className: FormControl_module_default.container,
76
+ ...datasetProps,
77
+ onClick,
78
+ children: [
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
80
+ htmlFor: id,
81
+ className: FormControl_module_default.label,
82
+ "data-hidden": hideLabel || !label,
83
+ "data-testid": "label",
84
+ children: [
85
+ label,
86
+ !!useLegacyRequiredLabel && required && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
87
+ "aria-hidden": true,
88
+ className: FormControl_module_default.required,
89
+ children: [" • ", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormattedMessage, {
90
+ id: "preply-ds.fieldLabel.required",
91
+ defaultMessage: "Required",
92
+ description: "Form field required label"
93
+ })]
94
+ }),
95
+ !useLegacyRequiredLabel && !required && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
96
+ "aria-hidden": true,
97
+ className: FormControl_module_default.required,
98
+ children: [" • ", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormattedMessage, {
99
+ id: "preply-ds.fieldLabel.optional",
100
+ defaultMessage: "Optional",
101
+ description: "Form field optional label"
102
+ })]
103
+ })
104
+ ]
105
+ }),
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Slot.Root, {
107
+ id,
108
+ required,
109
+ ...inputAriaAttributes,
110
+ children
111
+ }),
112
+ error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
113
+ className: FormControl_module_default.error,
114
+ role: "alert",
115
+ id: `${id}-error`,
116
+ "data-testid": "error",
117
+ children: error
118
+ }) : description ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
119
+ className: FormControl_module_default.description,
120
+ id: `${id}-description`,
121
+ "data-testid": "description",
122
+ children: description
123
+ }) : null
124
+ ]
125
+ });
126
+ };
127
+ //#endregion
128
+ export { FormControl as t };
@@ -0,0 +1,71 @@
1
+ import { t as getTextAccentClassnames } from "./text-accent-CfUFx-1K.js";
2
+ import { filterAttributesPassedByRadixUIAtRuntime } from "./utils/filterAttributesPassedByRadixUIAtRuntime.js";
3
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
4
+ import { t as getTextCenteredClassnames } from "./text-centered-Dwp2_-Yp.js";
5
+ import { forwardRef } from "react";
6
+ import { getDatasetProps, moduleClassNames, stringClassNames } from "@preply/ds-web-core";
7
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
8
+ import './assets/Heading.css';var index_module_default = {
9
+ Heading: "Heading__Lv13n",
10
+ "Heading--variant-massive": "Heading--variant-massive__xBbvd",
11
+ "Heading--variant-huge": "Heading--variant-huge__uNKwX",
12
+ "Heading--variant-extraLarge": "Heading--variant-extraLarge__O5YaA",
13
+ "Heading--variant-large": "Heading--variant-large__npEGh",
14
+ "Heading--variant-medium": "Heading--variant-medium__WRzNp",
15
+ "Heading--variant-small": "Heading--variant-small__RlTJl",
16
+ "Heading--narrow-l--variant-massive": "Heading--narrow-l--variant-massive__NkQiN",
17
+ "Heading--narrow-l--variant-huge": "Heading--narrow-l--variant-huge__xN-4a",
18
+ "Heading--narrow-l--variant-extraLarge": "Heading--narrow-l--variant-extraLarge__dhHS3",
19
+ "Heading--narrow-l--variant-large": "Heading--narrow-l--variant-large__O-yyq",
20
+ "Heading--narrow-l--variant-medium": "Heading--narrow-l--variant-medium__T3ZkZ",
21
+ "Heading--narrow-l--variant-small": "Heading--narrow-l--variant-small__nibGn",
22
+ "Heading--medium-s--variant-massive": "Heading--medium-s--variant-massive__dkhpb",
23
+ "Heading--medium-s--variant-huge": "Heading--medium-s--variant-huge__Td7XG",
24
+ "Heading--medium-s--variant-extraLarge": "Heading--medium-s--variant-extraLarge__puDN9",
25
+ "Heading--medium-s--variant-large": "Heading--medium-s--variant-large__UQMHF",
26
+ "Heading--medium-s--variant-medium": "Heading--medium-s--variant-medium__i2JwC",
27
+ "Heading--medium-s--variant-small": "Heading--medium-s--variant-small__UQTL9",
28
+ "Heading--medium-l--variant-massive": "Heading--medium-l--variant-massive__UtPA0",
29
+ "Heading--medium-l--variant-huge": "Heading--medium-l--variant-huge__BiY-j",
30
+ "Heading--medium-l--variant-extraLarge": "Heading--medium-l--variant-extraLarge__IP2Vo",
31
+ "Heading--medium-l--variant-large": "Heading--medium-l--variant-large__tV93Y",
32
+ "Heading--medium-l--variant-medium": "Heading--medium-l--variant-medium__945np",
33
+ "Heading--medium-l--variant-small": "Heading--medium-l--variant-small__ZUV1D",
34
+ "Heading--wide-s--variant-massive": "Heading--wide-s--variant-massive__BWmTX",
35
+ "Heading--wide-s--variant-huge": "Heading--wide-s--variant-huge__inkxv",
36
+ "Heading--wide-s--variant-extraLarge": "Heading--wide-s--variant-extraLarge__SQjI9",
37
+ "Heading--wide-s--variant-large": "Heading--wide-s--variant-large__UNDsi",
38
+ "Heading--wide-s--variant-medium": "Heading--wide-s--variant-medium__4OLaD",
39
+ "Heading--wide-s--variant-small": "Heading--wide-s--variant-small__ex4C1",
40
+ "Heading--wide-l--variant-massive": "Heading--wide-l--variant-massive__94l-9",
41
+ "Heading--wide-l--variant-huge": "Heading--wide-l--variant-huge__1qto2",
42
+ "Heading--wide-l--variant-extraLarge": "Heading--wide-l--variant-extraLarge__udFtI",
43
+ "Heading--wide-l--variant-large": "Heading--wide-l--variant-large__Y7k-Q",
44
+ "Heading--wide-l--variant-medium": "Heading--wide-l--variant-medium__xkuYd",
45
+ "Heading--wide-l--variant-small": "Heading--wide-l--variant-small__ORLbL"
46
+ };
47
+ //#endregion
48
+ //#region src/components/Heading/Heading.tsx
49
+ var import_jsx_runtime = require_jsx_runtime();
50
+ var Heading = forwardRef(function HeadingComponent({ children, variant, accent, tag, centered, dataset, id, className, ...restPropsPassedByRadixUI }, ref) {
51
+ const Tag = tag || "h1";
52
+ const classNames = moduleClassNames(index_module_default, webComponentNames.Heading, stringClassNames("variant", variant));
53
+ const centeredClassNames = getTextCenteredClassnames(centered);
54
+ const accentClassNames = getTextAccentClassnames(!accent, accent);
55
+ const allClassNames = [
56
+ ...classNames,
57
+ ...centeredClassNames,
58
+ ...accentClassNames,
59
+ className
60
+ ];
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, {
62
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
63
+ className: allClassNames.join(" "),
64
+ ...getDatasetProps(dataset, { preplyDsComponent: webComponentNames.Heading }),
65
+ id,
66
+ ref,
67
+ children
68
+ });
69
+ });
70
+ //#endregion
71
+ export { Heading as t };
@@ -0,0 +1,48 @@
1
+ import { t as getTextAccentClassnames } from "./text-accent-CfUFx-1K.js";
2
+ import { filterAttributesPassedByRadixUIAtRuntime } from "./utils/filterAttributesPassedByRadixUIAtRuntime.js";
3
+ import { t as renderIcon } from "./render-icon-Ch3b2dE0.js";
4
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
5
+ import { t as getExpColorClassNames } from "./exp-color-C5mKAN91.js";
6
+ import { forwardRef } from "react";
7
+ import { getDatasetProps, moduleClassNames } from "@preply/ds-web-core";
8
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
9
+ import { ICON_SIZE_DEFAULT } from "@preply/ds-core";
10
+ import './assets/Icon.css';var index_module_default = {
11
+ Icon: "Icon__jDdMD",
12
+ "Icon--size-16": "Icon--size-16__P1SXI",
13
+ "Icon--size-24": "Icon--size-24__vnVQ0",
14
+ "Icon--size-32": "Icon--size-32__gHIna",
15
+ "Icon--size-48": "Icon--size-48__0PUAE"
16
+ };
17
+ //#endregion
18
+ //#region src/components/Icon/Icon.tsx
19
+ var import_jsx_runtime = require_jsx_runtime();
20
+ var Icon = forwardRef(function IconComponent({ svg, size = ICON_SIZE_DEFAULT, accent, expColor, label, dataset, ...restPropsPassedByRadixUI }, ref) {
21
+ const classNames = moduleClassNames(index_module_default, webComponentNames.Icon, [`size-${size}`]);
22
+ const accentClassNames = getTextAccentClassnames(false, accent);
23
+ const expColorClassNames = accent ? [] : getExpColorClassNames(expColor);
24
+ const allClassNames = [
25
+ ...classNames,
26
+ ...accentClassNames,
27
+ ...expColorClassNames
28
+ ];
29
+ const props = {
30
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
31
+ className: allClassNames.join(" "),
32
+ ...getDatasetProps(dataset, { preplyDsComponent: webComponentNames.Icon }),
33
+ ref
34
+ };
35
+ if (!svg) throw new Error("Icon prop svg is mandatory");
36
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
37
+ ...props,
38
+ role: "img",
39
+ "aria-hidden": !label,
40
+ "aria-label": label,
41
+ children: renderIcon(svg, {
42
+ "aria-hidden": "true",
43
+ focusable: "false"
44
+ })
45
+ });
46
+ });
47
+ //#endregion
48
+ export { Icon as t };
@@ -0,0 +1,31 @@
1
+ import { t as renderIcon } from "./render-icon-Ch3b2dE0.js";
2
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
3
+ import { t as ButtonBase } from "./ButtonBase-8eUyTWxX.js";
4
+ import { t as BubbleCounter_module_default } from "./BubbleCounter.module-BU2S0euA.js";
5
+ import { forwardRef } from "react";
6
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
7
+ import { BUTTON_SIZE_DEFAULT, BUTTON_VARIANT_DEFAULT } from "@preply/ds-core";
8
+ import './assets/IconButton.css';var index_module_default = { IconButton: "IconButton__FZTVy" };
9
+ //#endregion
10
+ //#region src/components/IconButton/IconButton.tsx
11
+ var import_jsx_runtime = require_jsx_runtime();
12
+ var IconButton = forwardRef(function IconButtonComponent({ variant = BUTTON_VARIANT_DEFAULT, size = BUTTON_SIZE_DEFAULT, url, a11yLabel, svg, ...props }, ref) {
13
+ const classNames = [index_module_default.IconButton, BubbleCounter_module_default.cutout].join(" ");
14
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonBase, {
15
+ ...props,
16
+ ref,
17
+ className: classNames,
18
+ isIconButton: true,
19
+ variant,
20
+ size,
21
+ url,
22
+ a11yLabel,
23
+ preplyDsComponent: webComponentNames.IconButton,
24
+ children: renderIcon(svg, {
25
+ "aria-hidden": "true",
26
+ focusable: "false"
27
+ })
28
+ });
29
+ });
30
+ //#endregion
31
+ export { IconButton as t };
@@ -0,0 +1,38 @@
1
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
2
+ import "react";
3
+ import './assets/InputContainer.css';var Input_module_default = {
4
+ container: "container__B-gQ9",
5
+ input: "input__WZN7y",
6
+ icon: "icon__6Xfum",
7
+ trailingIcon: "trailingIcon__Bgnv4",
8
+ button: "button__auAU0"
9
+ };
10
+ //#endregion
11
+ //#region src/components/private/Input/InputContainer.tsx
12
+ var import_jsx_runtime = require_jsx_runtime();
13
+ /**
14
+ * A wrapper for input-like elements to render optional icon, button and trailing icon.
15
+ * For internal use only.
16
+ */
17
+ function InputContainer({ button, icon, trailingIcon, children }) {
18
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
19
+ className: Input_module_default.container,
20
+ children: [
21
+ !!icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
22
+ className: Input_module_default.icon,
23
+ children: icon
24
+ }),
25
+ children,
26
+ !!trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
27
+ className: Input_module_default.trailingIcon,
28
+ children: trailingIcon
29
+ }),
30
+ !!button && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
31
+ className: Input_module_default.button,
32
+ children: button
33
+ })
34
+ ]
35
+ });
36
+ }
37
+ //#endregion
38
+ export { Input_module_default as n, InputContainer as t };
@@ -0,0 +1,86 @@
1
+ import { filterAttributesPassedByRadixUIAtRuntime } from "./utils/filterAttributesPassedByRadixUIAtRuntime.js";
2
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
3
+ import { n as layout_padding_module_default } from "./layout-padding-ugY-yd2q.js";
4
+ import { getAlignItemsAttr, getDirectionAttr, getDisplayAttr, getGapAttr, getJustifyContentAttr, getPaddingAttr, getRelativeAttr, getWrapAttr } from "./components/LayoutFlex/style/getStyleAttrs.js";
5
+ import { t as layout_gap_module_default } from "./layout-gap.module-DLD8bcR4.js";
6
+ import { t as layout_hide_module_default } from "./layout-hide.module-B1P0N4i3.js";
7
+ import { t as layout_relative_module_default } from "./layout-relative.module-B5xrFD9j.js";
8
+ import { forwardRef } from "react";
9
+ import { getDatasetProps } from "@preply/ds-web-core";
10
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
11
+ import { LAYOUT_TAG_DEFAULT } from "@preply/ds-core";
12
+ import './assets/LayoutFlex.css';//#region src/components/LayoutFlex/style/layout-flex.module.less
13
+ var layout_flex_module_default = {};
14
+ //#endregion
15
+ //#region src/components/LayoutFlex/LayoutFlex.tsx
16
+ var import_jsx_runtime = require_jsx_runtime();
17
+ /**
18
+ * A component for rendering flex layout
19
+ *
20
+ * @example
21
+ * <LayoutFlex direction="column" gap="12">
22
+ * <div />
23
+ * <div />
24
+ * </LayoutFlex>
25
+ *
26
+ * @example
27
+ * LayoutFlex can be nested to create more complex layouts
28
+ *
29
+ * <LayoutFlex direction="column" gap="12">
30
+ * <LayoutFlex gap="24">
31
+ * <div />
32
+ * <div />
33
+ * </LayoutFlex>
34
+ * <div />
35
+ * </LayoutFlex>
36
+ */
37
+ var LayoutFlex = forwardRef(function LayoutFlexComponent(props, ref) {
38
+ const { gap, hide, column, nowrap, inline, dataset, reverse, padding, children, relative, direction, alignItems, justifyContent, tag: Tag = LAYOUT_TAG_DEFAULT, ...restPropsPassedByRadixUI } = props;
39
+ const classNames = [
40
+ layout_flex_module_default.LayoutFlex,
41
+ layout_gap_module_default.LayoutGap,
42
+ layout_hide_module_default.LayoutHide,
43
+ layout_padding_module_default.layoutPadding,
44
+ layout_relative_module_default.LayoutRelative
45
+ ];
46
+ const gapAttr = getGapAttr({ gap });
47
+ const wrapAttr = getWrapAttr({ nowrap });
48
+ const htmlRelative = getRelativeAttr({ relative });
49
+ const displayAttr = getDisplayAttr({
50
+ hide,
51
+ inline
52
+ });
53
+ const alignItemsAttr = getAlignItemsAttr({ alignItems });
54
+ const justifyContentAttr = getJustifyContentAttr({ justifyContent });
55
+ let directionAttr = void 0;
56
+ let columnReverseAttr = void 0;
57
+ const directionResult = getDirectionAttr({
58
+ direction,
59
+ column,
60
+ reverse
61
+ });
62
+ if (directionResult.applyThrough === "columnReverse") columnReverseAttr = directionResult.columnReverseAttr;
63
+ else directionAttr = directionResult.directionAttr;
64
+ let paddingAttr = void 0;
65
+ const paddingResult = getPaddingAttr({ padding });
66
+ if (paddingResult.applyThrough === "classnames") classNames.push(...paddingResult.classNames);
67
+ else paddingAttr = paddingResult.attr;
68
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, {
69
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
70
+ ref,
71
+ className: classNames.join(" "),
72
+ "data-ds-gap": gapAttr,
73
+ "data-ds-nowrap": wrapAttr,
74
+ "data-ds-padding": paddingAttr,
75
+ "data-ds-display": displayAttr,
76
+ "data-ds-relative": htmlRelative,
77
+ "data-ds-direction": directionAttr,
78
+ "data-ds-alignitems": alignItemsAttr,
79
+ "data-ds-columnreverse": columnReverseAttr,
80
+ "data-ds-justifycontent": justifyContentAttr,
81
+ ...getDatasetProps(dataset, { preplyDsComponent: webComponentNames.LayoutFlex }),
82
+ children
83
+ });
84
+ });
85
+ //#endregion
86
+ export { LayoutFlex as t };
@@ -0,0 +1,48 @@
1
+ import { filterAttributesPassedByRadixUIAtRuntime } from "./utils/filterAttributesPassedByRadixUIAtRuntime.js";
2
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
3
+ import { t as getAlignSelfClassNames } from "./align-self-VrZUceie.js";
4
+ import { getLayoutHideClassnames } from "./shared-styles/layout-hide/layout-hide.js";
5
+ import { getLayoutRelativeClassnames } from "./shared-styles/layout-relative/layout-relative.js";
6
+ import { forwardRef } from "react";
7
+ import { booleanClassNames, getDatasetProps, moduleClassNames } from "@preply/ds-web-core";
8
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
9
+ import { LAYOUT_TAG_DEFAULT } from "@preply/ds-core";
10
+ import './assets/LayoutFlexItem.css';var index_module_default = {
11
+ LayoutFlexItem: "LayoutFlexItem__0eYcj",
12
+ "LayoutFlexItem--stretch": "LayoutFlexItem--stretch__Jqv5O",
13
+ "LayoutFlexItem--no-stretch": "LayoutFlexItem--no-stretch__PvzwT",
14
+ "LayoutFlexItem--narrow-l--stretch": "LayoutFlexItem--narrow-l--stretch__qHYyW",
15
+ "LayoutFlexItem--narrow-l--no-stretch": "LayoutFlexItem--narrow-l--no-stretch__gerLX",
16
+ "LayoutFlexItem--medium-s--stretch": "LayoutFlexItem--medium-s--stretch__BzvqZ",
17
+ "LayoutFlexItem--medium-s--no-stretch": "LayoutFlexItem--medium-s--no-stretch__-yKBs",
18
+ "LayoutFlexItem--medium-l--stretch": "LayoutFlexItem--medium-l--stretch__Ta-hC",
19
+ "LayoutFlexItem--medium-l--no-stretch": "LayoutFlexItem--medium-l--no-stretch__aO4iE",
20
+ "LayoutFlexItem--wide-s--stretch": "LayoutFlexItem--wide-s--stretch__-5pQz",
21
+ "LayoutFlexItem--wide-s--no-stretch": "LayoutFlexItem--wide-s--no-stretch__cge-J",
22
+ "LayoutFlexItem--wide-l--stretch": "LayoutFlexItem--wide-l--stretch__7GhYM",
23
+ "LayoutFlexItem--wide-l--no-stretch": "LayoutFlexItem--wide-l--no-stretch__9tE4Z"
24
+ };
25
+ //#endregion
26
+ //#region src/components/LayoutFlexItem/LayoutFlexItem.tsx
27
+ var import_jsx_runtime = require_jsx_runtime();
28
+ var LayoutFlexItem = forwardRef(function LayoutFlexItemComponent({ children, alignSelf, stretch = false, tag, hide, relative, dataset, ...restPropsPassedByRadixUI }, ref) {
29
+ const classNames = moduleClassNames(index_module_default, webComponentNames.LayoutFlexItem, booleanClassNames("stretch", "no-stretch", stretch));
30
+ const alignSelfClassNames = getAlignSelfClassNames(alignSelf);
31
+ const hideClassNames = getLayoutHideClassnames(hide);
32
+ const relativeClassNames = getLayoutRelativeClassnames(relative);
33
+ const allClassNames = [
34
+ ...classNames,
35
+ ...alignSelfClassNames,
36
+ ...hideClassNames,
37
+ ...relativeClassNames
38
+ ];
39
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(tag !== null && tag !== void 0 ? tag : LAYOUT_TAG_DEFAULT, {
40
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
41
+ ref,
42
+ className: allClassNames.join(" "),
43
+ ...getDatasetProps(dataset, { preplyDsComponent: webComponentNames.LayoutFlexItem }),
44
+ children
45
+ });
46
+ });
47
+ //#endregion
48
+ export { LayoutFlexItem as t };
@@ -0,0 +1,34 @@
1
+ import { filterAttributesPassedByRadixUIAtRuntime } from "./utils/filterAttributesPassedByRadixUIAtRuntime.js";
2
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
3
+ import { t as getAlignSelfClassNames } from "./align-self-VrZUceie.js";
4
+ import { getLayoutHideClassnames } from "./shared-styles/layout-hide/layout-hide.js";
5
+ import { getLayoutRelativeClassnames } from "./shared-styles/layout-relative/layout-relative.js";
6
+ import { forwardRef } from "react";
7
+ import { getDatasetProps, moduleClassNames } from "@preply/ds-web-core";
8
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
9
+ import { LAYOUT_TAG_DEFAULT } from "@preply/ds-core";
10
+ import './assets/LayoutGridItem.css';var index_module_default = { LayoutGridItem: "LayoutGridItem__HXV4b" };
11
+ //#endregion
12
+ //#region src/components/LayoutGridItem/LayoutGridItem.tsx
13
+ var import_jsx_runtime = require_jsx_runtime();
14
+ var LayoutGridItem = forwardRef(function LayoutGridItemComponent({ children, alignSelf, tag, hide, relative, dataset, ...restPropsPassedByRadixUI }, ref) {
15
+ const classNames = moduleClassNames(index_module_default, webComponentNames.LayoutGridItem, []);
16
+ const alignSelfClassNames = getAlignSelfClassNames(alignSelf);
17
+ const hideClassNames = getLayoutHideClassnames(hide);
18
+ const relativeClassNames = getLayoutRelativeClassnames(relative);
19
+ const allClassNames = [
20
+ ...classNames,
21
+ ...alignSelfClassNames,
22
+ ...hideClassNames,
23
+ ...relativeClassNames
24
+ ];
25
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(tag !== null && tag !== void 0 ? tag : LAYOUT_TAG_DEFAULT, {
26
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
27
+ ref,
28
+ className: allClassNames.join(" "),
29
+ ...getDatasetProps(dataset, { preplyDsComponent: webComponentNames.LayoutGridItem }),
30
+ children
31
+ });
32
+ });
33
+ //#endregion
34
+ export { LayoutGridItem as t };
@@ -0,0 +1,66 @@
1
+ "use client";
2
+ import { filterAttributesPassedByRadixUIAtRuntime } from "./utils/filterAttributesPassedByRadixUIAtRuntime.js";
3
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
4
+ import { cloneElement, forwardRef } from "react";
5
+ import { booleanClassNames, getDatasetProps, getExternalUrlProps, moduleClassNames, stringClassNames, useHostname } from "@preply/ds-web-core";
6
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
7
+ import { LINK_VARIANT_DEFAULT } from "@preply/ds-core";
8
+ import './assets/Link.css';var index_module_default = {
9
+ Link: "Link__0oP-l",
10
+ "Link--inline": "Link--inline__VOKvL",
11
+ "Link--noUnderline": "Link--noUnderline__CpiR9",
12
+ "Link--variant-accentDark": "Link--variant-accentDark__ECRfH",
13
+ "Link--variant-accentDark--dsInternalSimulation-hover": "Link--variant-accentDark--dsInternalSimulation-hover__JTAlS",
14
+ "Link--variant-accentDark--dsInternalSimulation-active": "Link--variant-accentDark--dsInternalSimulation-active__ew7GY",
15
+ "Link--variant-accentDarkInverted": "Link--variant-accentDarkInverted__csBv5",
16
+ "Link--variant-accentDarkInverted--dsInternalSimulation-hover": "Link--variant-accentDarkInverted--dsInternalSimulation-hover__eAUvo",
17
+ "Link--variant-accentDarkInverted--dsInternalSimulation-active": "Link--variant-accentDarkInverted--dsInternalSimulation-active__Xb-2-",
18
+ "Link--variant-neutral": "Link--variant-neutral__krm1o",
19
+ "Link--variant-neutral--dsInternalSimulation-hover": "Link--variant-neutral--dsInternalSimulation-hover__avwXp",
20
+ "Link--variant-neutral--dsInternalSimulation-active": "Link--variant-neutral--dsInternalSimulation-active__I8XiT",
21
+ "Link--variant-neutralInverted": "Link--variant-neutralInverted__gzzYq",
22
+ "Link--variant-neutralInverted--dsInternalSimulation-hover": "Link--variant-neutralInverted--dsInternalSimulation-hover__s6i9I",
23
+ "Link--variant-neutralInverted--dsInternalSimulation-active": "Link--variant-neutralInverted--dsInternalSimulation-active__y3WF5",
24
+ "Link--variant-unsetColors": "Link--variant-unsetColors__S5q1C",
25
+ "Link--variant-unsetColors--dsInternalSimulation-hover": "Link--variant-unsetColors--dsInternalSimulation-hover__ovNJh",
26
+ "Link--variant-unsetColors--dsInternalSimulation-active": "Link--variant-unsetColors--dsInternalSimulation-active__9v0om"
27
+ };
28
+ //#endregion
29
+ //#region src/components/Link/Link.tsx
30
+ var import_jsx_runtime = require_jsx_runtime();
31
+ /**
32
+ * This is an inline element and will inherit font-size, line-height and
33
+ * font-weight from the parent context. If you need to customise any of these
34
+ * styles, all you have to do is wrap the <Link> in a Text or TextInline
35
+ * component.
36
+ */
37
+ var Link = forwardRef(function LinkComponent(props, ref) {
38
+ const { variant = LINK_VARIANT_DEFAULT, href, download, opensInNewTab, nofollow, assistiveText, onClick, as, url, dataset, children, inline, dsInternalSimulation, noUnderline, ...restPropsPassedByRadixUI } = props;
39
+ const hostname = useHostname();
40
+ const classNames = moduleClassNames(index_module_default, webComponentNames.Link, [
41
+ stringClassNames(`variant-${variant}--dsInternalSimulation`, dsInternalSimulation),
42
+ stringClassNames("variant", variant),
43
+ booleanClassNames("inline", void 0, inline),
44
+ booleanClassNames("noUnderline", void 0, noUnderline)
45
+ ]);
46
+ const actualHref = href || url;
47
+ const externalUrlProps = actualHref ? getExternalUrlProps(hostname, actualHref, opensInNewTab, nofollow) : {};
48
+ const tagProps = {
49
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
50
+ ref,
51
+ href: actualHref,
52
+ download,
53
+ "aria-label": assistiveText,
54
+ onClick,
55
+ className: classNames.join(" "),
56
+ ...getDatasetProps(dataset, { preplyDsComponent: webComponentNames.Link })
57
+ };
58
+ if (as) return cloneElement(as, { ...tagProps }, children);
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
60
+ ...tagProps,
61
+ ...externalUrlProps,
62
+ children
63
+ });
64
+ });
65
+ //#endregion
66
+ export { Link as t };
@@ -0,0 +1,26 @@
1
+ import { filterAttributesPassedByRadixUIAtRuntime } from "./utils/filterAttributesPassedByRadixUIAtRuntime.js";
2
+ import { t as require_jsx_runtime } from "./jsx-runtime-i4KUlhDu.js";
3
+ import { t as Spinner } from "./Spinner-Ck8KQA22.js";
4
+ import { forwardRef } from "react";
5
+ import { booleanClassNames, getDatasetProps, moduleClassNames } from "@preply/ds-web-core";
6
+ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
7
+ import './assets/Loader.css';var index_module_default = {
8
+ Loader: "Loader__sOe0E",
9
+ "Loader--normal": "Loader--normal__pJxRq",
10
+ "Loader--inverted": "Loader--inverted__PauMY"
11
+ };
12
+ //#endregion
13
+ //#region src/components/Loader/Loader.tsx
14
+ var import_jsx_runtime = require_jsx_runtime();
15
+ var Loader = forwardRef(function LoaderComponent({ size, inverted = false, dataset, ...restPropsPassedByRadixUI }, ref) {
16
+ const classNames = moduleClassNames(index_module_default, webComponentNames.Loader, [booleanClassNames("inverted", "normal", inverted)]);
17
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
18
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
19
+ ref,
20
+ className: classNames.join(" "),
21
+ ...getDatasetProps(dataset, { preplyDsComponent: webComponentNames.Loader }),
22
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, { size })
23
+ });
24
+ });
25
+ //#endregion
26
+ export { Loader as t };