@preply/ds-web-lib 10.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.
- package/dist/Accordion-B0hR-tcI.js +96 -0
- package/dist/AlertBannerProvider-Cf7w9AOq.js +76 -0
- package/dist/AlertDialog-BG-diKBi.js +475 -0
- package/dist/Avatar-B-JdqVyg.js +66 -0
- package/dist/AvatarWithStatus-CD9jEqEB.js +36 -0
- package/dist/Badge-Dd-CLBoW.js +50 -0
- package/dist/Box-BJBE9KNm.js +91 -0
- package/dist/BubbleCounter.module-BU2S0euA.js +16 -0
- package/dist/Button-C35BZJZT.js +91 -0
- package/dist/ButtonBase-8eUyTWxX.js +215 -0
- package/dist/Checkbox-CtolNbxI.js +108 -0
- package/dist/Chips-BRGw7Uup.js +99 -0
- package/dist/ChipsPrimitive-Bezq7ptE.js +1179 -0
- package/dist/CountryFlag-DVDKHmQH.js +43 -0
- package/dist/Dialog.module-Db2BJAn4.js +21 -0
- package/dist/DialogCloseButton-DjDd9Mid.js +98 -0
- package/dist/DialogDescription-8zw9t6pm.js +44 -0
- package/dist/DialogRoot-B67oJduC.js +335 -0
- package/dist/DialogRootContext-Bz8RW-Mq.js +12 -0
- package/dist/DialogTitle-C2Nn2ys-.js +43 -0
- package/dist/Divider-DvwDWB9_.js +17 -0
- package/dist/DropdownMenu.primitives-BrsTBvMk.js +4007 -0
- package/dist/FieldButton-B2slox8P.js +32 -0
- package/dist/FormControl-qnbQL1iF.js +128 -0
- package/dist/Heading-DA9gHfsx.js +71 -0
- package/dist/Icon-CixAeOSd.js +48 -0
- package/dist/IconButton-BPKpgfep.js +31 -0
- package/dist/InputContainer-CzzuOe_p.js +38 -0
- package/dist/LayoutFlex-e9auDvWD.js +86 -0
- package/dist/LayoutFlexItem-D9ziMmHe.js +48 -0
- package/dist/LayoutGridItem-Q8Lnvrri.js +34 -0
- package/dist/Link-CdoJVeER.js +66 -0
- package/dist/Loader-BMOxdJce.js +26 -0
- package/dist/OnboardingTooltip-B47_Yrsj.js +165 -0
- package/dist/OnboardingTour-DUUoI5WE.js +131 -0
- package/dist/PasswordField-Bx5YG62t.js +93 -0
- package/dist/PreplyLogo-abgOre30.js +112 -0
- package/dist/ProgressBar-CEU4GyHn.js +31 -0
- package/dist/ProgressSteps-BSqopxqv.js +45 -0
- package/dist/Select-Bo7PX_8V.js +124 -0
- package/dist/Slider-Crg4DEn_.js +64 -0
- package/dist/Spinner-Ck8KQA22.js +86 -0
- package/dist/Stars-D5QspUBE.js +72 -0
- package/dist/Steps-DbN5vFrP.js +173 -0
- package/dist/Switch-Ck_xB0ID.js +49 -0
- package/dist/Text-CaOF75Z-.js +121 -0
- package/dist/TextHighlighted-Dwq9Clgn.js +34 -0
- package/dist/TextInline-BcA4H2Tk.js +34 -0
- package/dist/Toast-wJAjSLfo.js +1019 -0
- package/dist/TokyoUIChevronDown-DGcVqR1z.js +14 -0
- package/dist/Tooltip-grvKQxTN.js +84 -0
- package/dist/VisuallyHidden-CtcHcZCK.js +29 -0
- package/dist/align-self-VrZUceie.js +42 -0
- package/dist/assets/Accordion.css +2 -2
- package/dist/assets/AlertBannerProvider.css +2 -2
- package/dist/assets/AlertDialog.css +2 -2
- package/dist/assets/Avatar.css +3 -3
- package/dist/assets/AvatarWithStatus.css +2 -2
- package/dist/assets/Badge.css +1 -1
- package/dist/assets/Box.css +3 -3
- package/dist/assets/BubbleCounter.css +1 -1
- package/dist/assets/Button.css +4 -4
- package/dist/assets/ButtonBase.css +40 -46
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Chips.css +2 -2
- package/dist/assets/ChipsPrimitive.css +2 -2
- package/dist/assets/CountryFlag.css +1 -1
- package/dist/assets/Dialog.css +13 -4
- package/dist/assets/Divider.css +1 -1
- package/dist/assets/DropdownMenu.css +2 -2
- package/dist/assets/FieldButton.css +3 -3
- package/dist/assets/FormControl.css +1 -1
- package/dist/assets/Heading.css +3 -3
- package/dist/assets/Icon.css +3 -3
- package/dist/assets/InputContainer.css +2 -2
- package/dist/assets/LayoutFlex.css +1 -1
- package/dist/assets/LayoutFlexItem.css +1 -1
- package/dist/assets/Link.css +3 -3
- package/dist/assets/Loader.css +1 -1
- package/dist/assets/OnboardingTooltip.css +6 -4
- package/dist/assets/OnboardingTour.css +3 -2
- package/dist/assets/PreplyLogo.css +1 -1
- package/dist/assets/ProgressBar.css +1 -1
- package/dist/assets/ProgressSteps.css +1 -1
- package/dist/assets/Select.css +2 -2
- package/dist/assets/Slider.css +1 -1
- package/dist/assets/Spinner.css +3 -3
- package/dist/assets/Stars.css +3 -3
- package/dist/assets/Steps.css +2 -2
- package/dist/assets/Switch.css +1 -1
- package/dist/assets/Text.css +3 -3
- package/dist/assets/TextHighlighted.css +3 -3
- package/dist/assets/TextInline.css +3 -3
- package/dist/assets/Toast.css +2 -2
- package/dist/assets/Tooltip.css +1 -1
- package/dist/assets/align-self.css +1 -1
- package/dist/assets/{IconTile.css → components.css} +9 -1
- package/dist/assets/exp-color.css +2 -2
- package/dist/assets/index.css +1 -1
- package/dist/assets/layout-gap.css +3 -3
- package/dist/assets/layout-grid.css +3 -3
- package/dist/assets/layout-hide.css +1 -1
- package/dist/assets/layout-padding.css +3 -3
- package/dist/assets/layout-relative.css +1 -1
- package/dist/assets/text-accent.css +2 -2
- package/dist/assets/text-centered.css +1 -1
- package/dist/assets/text-weight.css +2 -2
- package/dist/chunk-BVTlhY3a.js +24 -0
- package/dist/components/Accordion/Accordion.js +4 -60
- package/dist/components/Accordion/hooks/useOnOpenChange.js +19 -28
- package/dist/components/AlertBanner/AlertBanner.js +11 -26
- package/dist/components/AlertBanner/AlertBannerProvider.js +3 -8
- package/dist/components/AlertBanner/primitives/AlertBannerAction.js +11 -69
- package/dist/components/AlertBanner/primitives/AlertBannerIcon.js +77 -39
- package/dist/components/AlertBanner/primitives/AlertBannerRoot.js +26 -22
- package/dist/components/AlertBanner/primitives/AlertBannerText.js +11 -70
- package/dist/components/AlertDialog/AlertDialog.d.ts +3 -3
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +5 -94
- package/dist/components/Avatar/Avatar.js +3 -71
- package/dist/components/AvatarWithStatus/AvatarWithStatus.js +3 -43
- package/dist/components/Badge/Badge.js +4 -62
- package/dist/components/Box/Box.js +3 -95
- package/dist/components/BubbleCounter/BubbleCounter.js +23 -28
- package/dist/components/Button/Button.js +4 -80
- package/dist/components/CalloutBanner/CalloutBanner.js +61 -12
- package/dist/components/CalloutBanner/primitives/CalloutBannerDismissButton.js +50 -22
- package/dist/components/CalloutBanner/primitives/CalloutBannerIcon.js +86 -45
- package/dist/components/CalloutBanner/primitives/CalloutBannerRoot.js +50 -24
- package/dist/components/CalloutBanner/primitives/CalloutBannerText.js +41 -11
- package/dist/components/Checkbox/Checkbox.js +4 -78
- package/dist/components/Checkbox/hooks/useIndeterminate.js +24 -30
- package/dist/components/Chips/Chips.types.js +0 -1
- package/dist/components/Chips/DismissibleChips.js +117 -86
- package/dist/components/Chips/MultiSelectChips.js +98 -64
- package/dist/components/Chips/SingleSelectChips.js +94 -57
- package/dist/components/Chips/private/ChipsPrimitive.js +4 -17
- package/dist/components/CountryFlag/CountryFlag.js +3 -44
- package/dist/components/Dialog/Dialog.js +56 -31
- package/dist/components/Dialog/DialogSteps.js +40 -29
- package/dist/components/Dialog/primitives/DialogActions.js +26 -19
- package/dist/components/Dialog/primitives/DialogButtonStack.d.ts.map +1 -1
- package/dist/components/Dialog/primitives/DialogButtonStack.js +22 -15
- package/dist/components/Dialog/primitives/DialogCloseButton.d.ts +1 -1
- package/dist/components/Dialog/primitives/DialogCloseButton.d.ts.map +1 -1
- package/dist/components/Dialog/primitives/DialogCloseButton.js +4 -93
- package/dist/components/Dialog/primitives/DialogDescription.js +3 -43
- package/dist/components/Dialog/primitives/DialogFooter.js +37 -34
- package/dist/components/Dialog/primitives/DialogRoot.js +4 -1459
- package/dist/components/Dialog/primitives/DialogTitle.js +3 -42
- package/dist/components/Divider/Divider.js +3 -14
- package/dist/components/DropdownMenu/DropdownMenu.js +253 -188
- package/dist/components/DropdownMenu/primitives/DropdownMenu.primitives.js +5 -34
- package/dist/components/DropdownMenu/primitives/DropdownMenuSelectItem.primitives.js +121 -71
- package/dist/components/FieldButton/FieldButton.js +3 -37
- package/dist/components/FormControl/FormControl.js +3 -105
- package/dist/components/Heading/Heading.js +3 -78
- package/dist/components/Icon/Icon.js +4 -49
- package/dist/components/IconButton/IconButton.d.ts +5 -1
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.js +4 -28
- package/dist/components/IconTile/IconTile.js +11 -69
- package/dist/components/IntlFormatted/IntlFormattedAggregatedDateTime.js +16 -32
- package/dist/components/IntlFormatted/IntlFormattedCurrency.js +20 -42
- package/dist/components/IntlFormatted/IntlFormattedDate.js +73 -195
- package/dist/components/IntlFormatted/IntlFormattedTime.js +14 -24
- package/dist/components/IntlFormatted/Wrapper.js +14 -8
- package/dist/components/LayoutFlex/LayoutFlex.js +3 -100
- package/dist/components/LayoutFlex/style/getStyleAttrs.js +71 -143
- package/dist/components/LayoutFlex/tests/AlignItems.js +67 -97
- package/dist/components/LayoutFlex/tests/ColumnReverse.js +63 -100
- package/dist/components/LayoutFlex/tests/DataOverride.js +1498 -1093
- package/dist/components/LayoutFlex/tests/Default.js +19 -20
- package/dist/components/LayoutFlex/tests/Direction.js +65 -88
- package/dist/components/LayoutFlex/tests/Gap.js +115 -197
- package/dist/components/LayoutFlex/tests/HideInline.js +95 -136
- package/dist/components/LayoutFlex/tests/JustifyContent.js +75 -108
- package/dist/components/LayoutFlex/tests/Nowrap.js +35 -42
- package/dist/components/LayoutFlex/tests/Padding.js +207 -263
- package/dist/components/LayoutFlex/tests/Relative.js +49 -64
- package/dist/components/LayoutFlexItem/LayoutFlexItem.js +3 -54
- package/dist/components/LayoutGrid/LayoutGrid.js +26 -34
- package/dist/components/LayoutGridItem/LayoutGridItem.js +3 -41
- package/dist/components/Link/Link.js +3 -72
- package/dist/components/Loader/Loader.js +3 -32
- package/dist/components/NumberField/NumberField.js +33 -35
- package/dist/components/ObserveIntersection/ObserveIntersection.js +41 -42
- package/dist/components/OnboardingTooltip/OnboardingTooltip.js +4 -115
- package/dist/components/OnboardingTour/OnboardingTour.js +4 -114
- package/dist/components/PasswordField/PasswordField.js +3 -78
- package/dist/components/PreplyLogo/PreplyLogo.js +3 -81
- package/dist/components/ProgressBar/ProgressBar.js +3 -27
- package/dist/components/ProgressSteps/ProgressSteps.js +3 -48
- package/dist/components/Rating/Rating.js +29 -20
- package/dist/components/Rating/RatingInput.js +57 -59
- package/dist/components/Rating/Stars.js +4 -8
- package/dist/components/Rating/hooks/useHasError.js +11 -15
- package/dist/components/Rating/hooks/useHoverPercentage.js +37 -45
- package/dist/components/Rating/hooks/useInputState.js +18 -24
- package/dist/components/Rating/hooks/useLocalizations.js +12 -24
- package/dist/components/Rating/utils/roundToHalfDecimal.js +4 -4
- package/dist/components/SelectField/Select.js +5 -112
- package/dist/components/SelectField/SelectField.js +29 -24
- package/dist/components/SelectField/hooks/useBreakpointMatch.js +18 -19
- package/dist/components/ShowOnIntersection/ShowOnIntersection.js +32 -21
- package/dist/components/Slider/RangeSlider.js +62 -52
- package/dist/components/Slider/Slider.js +3 -10
- package/dist/components/Steps/Steps.js +4 -210
- package/dist/components/Switch/Switch.js +3 -51
- package/dist/components/Text/Text.js +3 -128
- package/dist/components/TextField/TextField.js +27 -29
- package/dist/components/TextHighlighted/TextHighlighted.js +3 -41
- package/dist/components/TextInline/TextInline.js +3 -40
- package/dist/components/TextareaField/TextareaField.js +26 -28
- package/dist/components/Toast/Toast.js +4 -1168
- package/dist/components/Tooltip/Tooltip.js +3 -66
- package/dist/components/deprecated/Chips/Chips.js +4 -76
- package/dist/components/deprecated/NativeSelectField/NativeSelect.js +40 -32
- package/dist/components/deprecated/NativeSelectField/NativeSelectField.js +34 -33
- package/dist/components/deprecated/index.js +5 -6
- package/dist/components/index.js +50 -150
- package/dist/components/private/ButtonBase/ButtonBase.d.ts +7 -11
- package/dist/components/private/ButtonBase/ButtonBase.d.ts.map +1 -1
- package/dist/components/private/ButtonBase/ButtonBase.js +3 -247
- package/dist/components/private/Input/Input.js +27 -19
- package/dist/components/private/Input/InputContainer.js +3 -5
- package/dist/components/private/Input/Textarea.js +24 -20
- package/dist/components/private/Input/index.js +2 -4
- package/dist/components/private/Spinner/Spinner.js +3 -52
- package/dist/components/private/VisuallyHidden/VisuallyHidden.js +3 -15
- package/dist/components-BIYP8wHJ.js +200 -0
- package/dist/exp-color-C5mKAN91.js +74 -0
- package/dist/floating-ui.utils.dom-CoeTbDZx.js +215 -0
- package/dist/index.js +50 -150
- package/dist/index.module-1c7ENvxc.js +7 -0
- package/dist/jsx-runtime-i4KUlhDu.js +743 -0
- package/dist/layout-gap.module-DLD8bcR4.js +95 -0
- package/dist/layout-grid.module-CZfhrKrB.js +101 -0
- package/dist/layout-hide.module-B1P0N4i3.js +53 -0
- package/dist/layout-padding-ugY-yd2q.js +389 -0
- package/dist/layout-relative.module-B5xrFD9j.js +6 -0
- package/dist/render-icon-Ch3b2dE0.js +290 -0
- package/dist/shared-styles/align-self/align-self.js +2 -36
- package/dist/shared-styles/exp-color/exp-color.js +2 -68
- package/dist/shared-styles/layout-gap/layout-gap.js +13 -7
- package/dist/shared-styles/layout-grid/layout-grid.js +28 -28
- package/dist/shared-styles/layout-grid-responsive-columns/layout-grid-responsive-columns.js +29 -43
- package/dist/shared-styles/layout-hide/layout-hide.js +8 -8
- package/dist/shared-styles/layout-padding/layout-padding.js +2 -5
- package/dist/shared-styles/layout-relative/layout-relative.js +14 -8
- package/dist/shared-styles/text-accent/text-accent.js +2 -25
- package/dist/shared-styles/text-centered/text-centered.js +2 -24
- package/dist/shared-styles/text-weight/text-weight.js +2 -15
- package/dist/store-sN_eYeZT.js +1064 -0
- package/dist/storybook-utils/consts.js +6 -8
- package/dist/storybook-utils/index.js +1 -5
- package/dist/text-accent-CfUFx-1K.js +30 -0
- package/dist/text-centered-Dwp2_-Yp.js +30 -0
- package/dist/text-weight-CwoqmM4o.js +21 -0
- package/dist/useBaseUiId-CWAD_PSs.js +13 -0
- package/dist/useBreakpointMatch-D9a3CTNK.js +338 -0
- package/dist/useButton-DHTh3Hm7.js +148 -0
- package/dist/useDialogClose-BzFIyWco.js +22 -0
- package/dist/useId-CJsH-2wV.js +34 -0
- package/dist/useOpenInteractionType-D8vA_ZKI.js +4104 -0
- package/dist/useRenderElement-ZBds6eRN.js +341 -0
- package/dist/utils/Orientation/OrientationProvider.js +54 -23
- package/dist/utils/Orientation/index.js +2 -4
- package/dist/utils/RovingTabIndex/RovingTabIndexProvider.js +70 -44
- package/dist/utils/RovingTabIndex/index.js +2 -4
- package/dist/utils/createRequiredContext.js +23 -13
- package/dist/utils/filterAttributesPassedByRadixUIAtRuntime.js +28 -25
- package/dist/utils/render-icon.js +3 -320
- package/dist/utils/shared-strings.js +24 -32
- package/dist/utils/useBreakpointMatch.d.ts.map +1 -1
- package/dist/utils/useBreakpointMatch.js +2 -183
- package/dist/utils/useControllableState/useControllableState.js +31 -25
- package/dist/utils/useMergeRefs.js +29 -14
- package/dist/utils/useStableCallback/useStableCallback.js +28 -13
- package/package.json +17 -22
- package/dist/AlertBannerProvider-DTx2Xp3V.js +0 -50
- package/dist/BubbleCounter.module-QMwXWFIS.js +0 -16
- package/dist/ChipsPrimitive-DzsaOWgY.js +0 -1244
- package/dist/Dialog.module-Ba1X7b3N.js +0 -29
- package/dist/DialogRootContext-BCXmmJAw.js +0 -15
- package/dist/DropdownMenu.primitives-CqJE9k4D.js +0 -5871
- package/dist/IconTile-D1G7MljH.js +0 -172
- package/dist/InputContainer-oHJlLWIi.js +0 -30
- package/dist/Slider-DB4Maswa.js +0 -55
- package/dist/Stars-C_mHop2H.js +0 -67
- package/dist/TokyoUIChevronDown-D_tD1yU8.js +0 -11
- package/dist/floating-ui.utils.dom-BvMNldxo.js +0 -234
- package/dist/index.module-Q9TzIR6B.js +0 -11
- package/dist/layout-gap.module-MKn_un_k.js +0 -97
- package/dist/layout-grid.module-P4B4WVUy.js +0 -103
- package/dist/layout-hide.module-Bpl3Pl-a.js +0 -55
- package/dist/layout-padding-D5I6rRlL.js +0 -373
- package/dist/layout-relative.module-1z75aSwo.js +0 -8
- package/dist/useBaseUiId-DavsGYu9.js +0 -8
- package/dist/useButton-fjQ0ak8m.js +0 -193
- package/dist/useId-BhIOp2JG.js +0 -28
- package/dist/useOpenInteractionType-DNYFqf-a.js +0 -2880
- package/dist/useRenderElement-BSthtPOr.js +0 -350
|
@@ -1,42 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { t as require_jsx_runtime } from "../../jsx-runtime-i4KUlhDu.js";
|
|
3
3
|
import { Wrapper } from "./Wrapper.js";
|
|
4
|
+
import "react";
|
|
4
5
|
import { useIntlFormattedAggregatedDateTime } from "@preply/ds-core";
|
|
6
|
+
//#region src/components/IntlFormatted/IntlFormattedAggregatedDateTime.tsx
|
|
7
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
5
8
|
function DateAndTime(...params) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} = useIntlFormattedAggregatedDateTime();
|
|
9
|
-
const result = formatDateAndTime(...params);
|
|
10
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
9
|
+
const { formatDateAndTime } = useIntlFormattedAggregatedDateTime();
|
|
10
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDateAndTime(...params) });
|
|
11
11
|
}
|
|
12
12
|
function DateAndTimeRange(...params) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = useIntlFormattedAggregatedDateTime();
|
|
16
|
-
const result = formatDateAndTimeRange(...params);
|
|
17
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
13
|
+
const { formatDateAndTimeRange } = useIntlFormattedAggregatedDateTime();
|
|
14
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDateAndTimeRange(...params) });
|
|
18
15
|
}
|
|
19
16
|
function DateTimeAndDateTime(...params) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = useIntlFormattedAggregatedDateTime();
|
|
23
|
-
const result = formatDateTimeAndDateTime(...params);
|
|
24
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
17
|
+
const { formatDateTimeAndDateTime } = useIntlFormattedAggregatedDateTime();
|
|
18
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDateTimeAndDateTime(...params) });
|
|
25
19
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
DateAndTime,
|
|
31
|
-
/**
|
|
32
|
-
* @returns combined date and time range object. e.g. "Mon, Jan 1, 18:00-18:50"
|
|
33
|
-
*/
|
|
34
|
-
DateAndTimeRange,
|
|
35
|
-
/**
|
|
36
|
-
* @returns combined date time and date time object. e.g. "Jan 1, 18:00 - Jan 6, 20:00"
|
|
37
|
-
*/
|
|
38
|
-
DateTimeAndDateTime
|
|
39
|
-
};
|
|
40
|
-
export {
|
|
41
|
-
IntlFormattedAggregatedDateTime
|
|
20
|
+
var IntlFormattedAggregatedDateTime = {
|
|
21
|
+
DateAndTime,
|
|
22
|
+
DateAndTimeRange,
|
|
23
|
+
DateTimeAndDateTime
|
|
42
24
|
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { IntlFormattedAggregatedDateTime };
|
|
@@ -1,53 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { useIntlFormattedCurrency } from "@preply/ds-core";
|
|
2
|
+
import { t as require_jsx_runtime } from "../../jsx-runtime-i4KUlhDu.js";
|
|
4
3
|
import { Wrapper } from "./Wrapper.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { useIntlFormattedCurrency } from "@preply/ds-core";
|
|
6
|
+
//#region src/components/IntlFormatted/IntlFormattedCurrency.tsx
|
|
7
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
5
8
|
function CurrencyShort(...params) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} = useIntlFormattedCurrency();
|
|
9
|
-
const result = formatCurrencyShort(...params);
|
|
10
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
9
|
+
const { formatCurrencyShort } = useIntlFormattedCurrency();
|
|
10
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatCurrencyShort(...params) });
|
|
11
11
|
}
|
|
12
12
|
function CurrencyRounded(...params) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = useIntlFormattedCurrency();
|
|
16
|
-
const result = formatCurrencyRounded(...params);
|
|
17
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
13
|
+
const { formatCurrencyRounded } = useIntlFormattedCurrency();
|
|
14
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatCurrencyRounded(...params) });
|
|
18
15
|
}
|
|
19
16
|
function CurrencyExplicit(...params) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = useIntlFormattedCurrency();
|
|
23
|
-
const result = formatCurrencyExplicit(...params);
|
|
24
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
17
|
+
const { formatCurrencyExplicit } = useIntlFormattedCurrency();
|
|
18
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatCurrencyExplicit(...params) });
|
|
25
19
|
}
|
|
26
20
|
function CurrencyRange(...params) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = useIntlFormattedCurrency();
|
|
30
|
-
const result = formatCurrencyRange(...params);
|
|
31
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
21
|
+
const { formatCurrencyRange } = useIntlFormattedCurrency();
|
|
22
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatCurrencyRange(...params) });
|
|
32
23
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @returns currency without decimal places, e.g. "$123"
|
|
40
|
-
*/
|
|
41
|
-
CurrencyRounded,
|
|
42
|
-
/**
|
|
43
|
-
* @returns currency with explicit currency code, e.g. "USD 123.45"
|
|
44
|
-
*/
|
|
45
|
-
CurrencyExplicit,
|
|
46
|
-
/**
|
|
47
|
-
* @returns currency range with the selected variant, e.g. "$10 - $20"
|
|
48
|
-
*/
|
|
49
|
-
CurrencyRange
|
|
50
|
-
};
|
|
51
|
-
export {
|
|
52
|
-
IntlFormattedCurrency
|
|
24
|
+
var IntlFormattedCurrency = {
|
|
25
|
+
CurrencyShort,
|
|
26
|
+
CurrencyRounded,
|
|
27
|
+
CurrencyExplicit,
|
|
28
|
+
CurrencyRange
|
|
53
29
|
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { IntlFormattedCurrency };
|
|
@@ -1,240 +1,118 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { t as require_jsx_runtime } from "../../jsx-runtime-i4KUlhDu.js";
|
|
3
3
|
import { Wrapper } from "./Wrapper.js";
|
|
4
|
+
import "react";
|
|
4
5
|
import { useIntlFormattedDate } from "@preply/ds-core";
|
|
6
|
+
//#region src/components/IntlFormatted/IntlFormattedDate.tsx
|
|
7
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
5
8
|
function DayFull(...params) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} = useIntlFormattedDate();
|
|
9
|
-
const result = formatDayFull(...params);
|
|
10
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
9
|
+
const { formatDayFull } = useIntlFormattedDate();
|
|
10
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDayFull(...params) });
|
|
11
11
|
}
|
|
12
12
|
function DayShort(...params) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = useIntlFormattedDate();
|
|
16
|
-
const result = formatDayShort(...params);
|
|
17
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
13
|
+
const { formatDayShort } = useIntlFormattedDate();
|
|
14
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDayShort(...params) });
|
|
18
15
|
}
|
|
19
16
|
function MonthFull(...params) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = useIntlFormattedDate();
|
|
23
|
-
const result = formatMonthFull(...params);
|
|
24
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
17
|
+
const { formatMonthFull } = useIntlFormattedDate();
|
|
18
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatMonthFull(...params) });
|
|
25
19
|
}
|
|
26
20
|
function MonthShort(...params) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = useIntlFormattedDate();
|
|
30
|
-
const result = formatMonthShort(...params);
|
|
31
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
21
|
+
const { formatMonthShort } = useIntlFormattedDate();
|
|
22
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatMonthShort(...params) });
|
|
32
23
|
}
|
|
33
24
|
function MonthYearFull(...params) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} = useIntlFormattedDate();
|
|
37
|
-
const result = formatMonthYearFull(...params);
|
|
38
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
25
|
+
const { formatMonthYearFull } = useIntlFormattedDate();
|
|
26
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatMonthYearFull(...params) });
|
|
39
27
|
}
|
|
40
28
|
function MonthYearShort(...params) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} = useIntlFormattedDate();
|
|
44
|
-
const result = formatMonthYearShort(...params);
|
|
45
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
29
|
+
const { formatMonthYearShort } = useIntlFormattedDate();
|
|
30
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatMonthYearShort(...params) });
|
|
46
31
|
}
|
|
47
32
|
function DateFull(...params) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
} = useIntlFormattedDate();
|
|
51
|
-
const result = formatDateFull(...params);
|
|
52
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
33
|
+
const { formatDateFull } = useIntlFormattedDate();
|
|
34
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDateFull(...params) });
|
|
53
35
|
}
|
|
54
36
|
function DateShort(...params) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
} = useIntlFormattedDate();
|
|
58
|
-
const result = formatDateShort(...params);
|
|
59
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
37
|
+
const { formatDateShort } = useIntlFormattedDate();
|
|
38
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDateShort(...params) });
|
|
60
39
|
}
|
|
61
40
|
function DateYearShort(...params) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
} = useIntlFormattedDate();
|
|
65
|
-
const result = formatDateYearShort(...params);
|
|
66
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
41
|
+
const { formatDateYearShort } = useIntlFormattedDate();
|
|
42
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDateYearShort(...params) });
|
|
67
43
|
}
|
|
68
44
|
function DayDateFull(...params) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
} = useIntlFormattedDate();
|
|
72
|
-
const result = formatDayDateFull(...params);
|
|
73
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
45
|
+
const { formatDayDateFull } = useIntlFormattedDate();
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDayDateFull(...params) });
|
|
74
47
|
}
|
|
75
48
|
function DayDateShort(...params) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
} = useIntlFormattedDate();
|
|
79
|
-
const result = formatDayDateShort(...params);
|
|
80
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
49
|
+
const { formatDayDateShort } = useIntlFormattedDate();
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDayDateShort(...params) });
|
|
81
51
|
}
|
|
82
52
|
function DateYearFull(...params) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
} = useIntlFormattedDate();
|
|
86
|
-
const result = formatDateYearFull(...params);
|
|
87
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
53
|
+
const { formatDateYearFull } = useIntlFormattedDate();
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDateYearFull(...params) });
|
|
88
55
|
}
|
|
89
56
|
function DayDateYearFull(...params) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
} = useIntlFormattedDate();
|
|
93
|
-
const result = formatDayDateYearFull(...params);
|
|
94
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
57
|
+
const { formatDayDateYearFull } = useIntlFormattedDate();
|
|
58
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDayDateYearFull(...params) });
|
|
95
59
|
}
|
|
96
60
|
function DayDateYearShort(...params) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
} = useIntlFormattedDate();
|
|
100
|
-
const result = formatDayDateYearShort(...params);
|
|
101
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
61
|
+
const { formatDayDateYearShort } = useIntlFormattedDate();
|
|
62
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDayDateYearShort(...params) });
|
|
102
63
|
}
|
|
103
64
|
function DateRangeShort(...params) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
} = useIntlFormattedDate();
|
|
107
|
-
const result = formatDateRangeShort(...params);
|
|
108
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
65
|
+
const { formatDateRangeShort } = useIntlFormattedDate();
|
|
66
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDateRangeShort(...params) });
|
|
109
67
|
}
|
|
110
68
|
function DateRangeFull(...params) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
} = useIntlFormattedDate();
|
|
114
|
-
const result = formatDateRangeFull(...params);
|
|
115
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
69
|
+
const { formatDateRangeFull } = useIntlFormattedDate();
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDateRangeFull(...params) });
|
|
116
71
|
}
|
|
117
72
|
function DateRangeYearShort(...params) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
} = useIntlFormattedDate();
|
|
121
|
-
const result = formatDateRangeYearShort(...params);
|
|
122
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
73
|
+
const { formatDateRangeYearShort } = useIntlFormattedDate();
|
|
74
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDateRangeYearShort(...params) });
|
|
123
75
|
}
|
|
124
76
|
function DayDateNumberShort(...params) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
} = useIntlFormattedDate();
|
|
128
|
-
const result = formatDayDateNumberShort(...params);
|
|
129
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
77
|
+
const { formatDayDateNumberShort } = useIntlFormattedDate();
|
|
78
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatDayDateNumberShort(...params) });
|
|
130
79
|
}
|
|
131
80
|
function RelativeDay(...params) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const result = formatRelativeDay(...params);
|
|
136
|
-
return result ? /* @__PURE__ */ jsx(Wrapper, { children: result }) : void 0;
|
|
81
|
+
const { formatRelativeDay } = useIntlFormattedDate();
|
|
82
|
+
const result = formatRelativeDay(...params);
|
|
83
|
+
return result ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: result }) : void 0;
|
|
137
84
|
}
|
|
138
85
|
function RelativeDayDateShort(...params) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const result = formatRelativeDayDateShort(...params);
|
|
143
|
-
return result ? /* @__PURE__ */ jsx(Wrapper, { children: result }) : void 0;
|
|
86
|
+
const { formatRelativeDayDateShort } = useIntlFormattedDate();
|
|
87
|
+
const result = formatRelativeDayDateShort(...params);
|
|
88
|
+
return result ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: result }) : void 0;
|
|
144
89
|
}
|
|
145
90
|
function EveryWeekDayFull(...params) {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
*/
|
|
172
|
-
MonthYearFull,
|
|
173
|
-
/**
|
|
174
|
-
* @returns e.g. "Jan 2024"
|
|
175
|
-
*/
|
|
176
|
-
MonthYearShort,
|
|
177
|
-
/**
|
|
178
|
-
* @returns e.g. "January 1"
|
|
179
|
-
*/
|
|
180
|
-
DateFull,
|
|
181
|
-
/**
|
|
182
|
-
* @returns e.g. "Jan 1"
|
|
183
|
-
*/
|
|
184
|
-
DateShort,
|
|
185
|
-
/**
|
|
186
|
-
* @returns e.g. "January 1, 2024"
|
|
187
|
-
*/
|
|
188
|
-
DateYearFull,
|
|
189
|
-
/**
|
|
190
|
-
* @returns e.g. "Jan 1, 2024"
|
|
191
|
-
*/
|
|
192
|
-
DateYearShort,
|
|
193
|
-
/**
|
|
194
|
-
* @returns e.g. "Monday, January 1"
|
|
195
|
-
*/
|
|
196
|
-
DayDateFull,
|
|
197
|
-
/**
|
|
198
|
-
* @returns e.g. "Mon, Jan 1"
|
|
199
|
-
*/
|
|
200
|
-
DayDateShort,
|
|
201
|
-
/**
|
|
202
|
-
* @returns e.g. "Monday, January 1, 2024"
|
|
203
|
-
*/
|
|
204
|
-
DayDateYearFull,
|
|
205
|
-
/**
|
|
206
|
-
* @returns e.g. "Mon, Jan 1, 2024"
|
|
207
|
-
*/
|
|
208
|
-
DayDateYearShort,
|
|
209
|
-
/**
|
|
210
|
-
* @returns e.g. "Jan 1 - 7"
|
|
211
|
-
*/
|
|
212
|
-
DateRangeShort,
|
|
213
|
-
/**
|
|
214
|
-
* @returns e.g. "January 1 - 7"
|
|
215
|
-
*/
|
|
216
|
-
DateRangeFull,
|
|
217
|
-
/**
|
|
218
|
-
* @returns e.g. "Jan 1 - 7, 2024"
|
|
219
|
-
*/
|
|
220
|
-
DateRangeYearShort,
|
|
221
|
-
/**
|
|
222
|
-
* @returns e.g. "today", "tomorrow" or undefined
|
|
223
|
-
*/
|
|
224
|
-
RelativeDay,
|
|
225
|
-
/**
|
|
226
|
-
* @returns e.g. "today, Jan 1" or "Monday, Jan 1"
|
|
227
|
-
*/
|
|
228
|
-
RelativeDayDateShort,
|
|
229
|
-
/**
|
|
230
|
-
* @returns e.g. "Mon 31"
|
|
231
|
-
*/
|
|
232
|
-
DayDateNumberShort,
|
|
233
|
-
/**
|
|
234
|
-
* @returns e.g. "Every Monday"
|
|
235
|
-
*/
|
|
236
|
-
EveryWeekDayFull
|
|
237
|
-
};
|
|
238
|
-
export {
|
|
239
|
-
IntlFormattedDate
|
|
91
|
+
const { formatEveryWeekDayFull } = useIntlFormattedDate();
|
|
92
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatEveryWeekDayFull(...params) });
|
|
93
|
+
}
|
|
94
|
+
var IntlFormattedDate = {
|
|
95
|
+
DayFull,
|
|
96
|
+
DayShort,
|
|
97
|
+
MonthFull,
|
|
98
|
+
MonthShort,
|
|
99
|
+
MonthYearFull,
|
|
100
|
+
MonthYearShort,
|
|
101
|
+
DateFull,
|
|
102
|
+
DateShort,
|
|
103
|
+
DateYearFull,
|
|
104
|
+
DateYearShort,
|
|
105
|
+
DayDateFull,
|
|
106
|
+
DayDateShort,
|
|
107
|
+
DayDateYearFull,
|
|
108
|
+
DayDateYearShort,
|
|
109
|
+
DateRangeShort,
|
|
110
|
+
DateRangeFull,
|
|
111
|
+
DateRangeYearShort,
|
|
112
|
+
RelativeDay,
|
|
113
|
+
RelativeDayDateShort,
|
|
114
|
+
DayDateNumberShort,
|
|
115
|
+
EveryWeekDayFull
|
|
240
116
|
};
|
|
117
|
+
//#endregion
|
|
118
|
+
export { IntlFormattedDate };
|
|
@@ -1,31 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { useIntlFormattedTime } from "@preply/ds-core";
|
|
2
|
+
import { t as require_jsx_runtime } from "../../jsx-runtime-i4KUlhDu.js";
|
|
4
3
|
import { Wrapper } from "./Wrapper.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { useIntlFormattedTime } from "@preply/ds-core";
|
|
6
|
+
//#region src/components/IntlFormatted/IntlFormattedTime.tsx
|
|
7
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
5
8
|
function Time(...params) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} = useIntlFormattedTime();
|
|
9
|
-
const result = formatTime(...params);
|
|
10
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
9
|
+
const { formatTime } = useIntlFormattedTime();
|
|
10
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatTime(...params) });
|
|
11
11
|
}
|
|
12
12
|
function TimeRange(...params) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = useIntlFormattedTime();
|
|
16
|
-
const result = formatTimeRange(...params);
|
|
17
|
-
return /* @__PURE__ */ jsx(Wrapper, { children: result });
|
|
13
|
+
const { formatTimeRange } = useIntlFormattedTime();
|
|
14
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: formatTimeRange(...params) });
|
|
18
15
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
Time,
|
|
24
|
-
/**
|
|
25
|
-
* @returns e.g. "18:00 - 18:50" or "6:00 PM - 6:50 PM" based on country code and locale
|
|
26
|
-
*/
|
|
27
|
-
TimeRange
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
IntlFormattedTime
|
|
16
|
+
var IntlFormattedTime = {
|
|
17
|
+
Time,
|
|
18
|
+
TimeRange
|
|
31
19
|
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { IntlFormattedTime };
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { t as require_jsx_runtime } from "../../jsx-runtime-i4KUlhDu.js";
|
|
2
|
+
import "react";
|
|
3
|
+
//#region src/components/IntlFormatted/Wrapper.tsx
|
|
4
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
5
|
+
/**
|
|
6
|
+
* Prevent Google Translate (or another browser translator / DOM manipulating extension) to make React
|
|
7
|
+
* crash when the users translate the page.
|
|
8
|
+
* @see https://preply.slack.com/archives/C033863HX/p1718188149201769
|
|
9
|
+
* @see https://martijnhols.nl/blog/everything-about-google-translate-crashing-react#monkey-patching-removechild-and-insertbefore
|
|
10
|
+
*/
|
|
11
|
+
function Wrapper({ children }) {
|
|
12
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children });
|
|
6
13
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Wrapper };
|
|
@@ -1,100 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { LAYOUT_TAG_DEFAULT } from "@preply/ds-core";
|
|
5
|
-
import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
|
|
6
|
-
import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
|
|
7
|
-
import { getGapAttr, getRelativeAttr, getDisplayAttr, getAlignItemsAttr, getJustifyContentAttr, getDirectionAttr, getPaddingAttr, DO_NOT_ADD_DATA_ATTRIBUTE, getWrapAttr } from "./style/getStyleAttrs.js";
|
|
8
|
-
import { s as styles$1 } from "../../layout-gap.module-MKn_un_k.js";
|
|
9
|
-
import { s as styles$2 } from "../../layout-hide.module-Bpl3Pl-a.js";
|
|
10
|
-
import { l as layoutPaddingStyles } from "../../layout-padding-D5I6rRlL.js";
|
|
11
|
-
import { s as styles$3 } from "../../layout-relative.module-1z75aSwo.js";
|
|
12
|
-
import '../../assets/LayoutFlex.css';const styles = {};
|
|
13
|
-
const LayoutFlex = forwardRef(function LayoutFlexComponent(props, ref) {
|
|
14
|
-
const {
|
|
15
|
-
gap,
|
|
16
|
-
hide,
|
|
17
|
-
column,
|
|
18
|
-
nowrap,
|
|
19
|
-
inline,
|
|
20
|
-
dataset,
|
|
21
|
-
reverse,
|
|
22
|
-
padding,
|
|
23
|
-
children,
|
|
24
|
-
relative,
|
|
25
|
-
direction,
|
|
26
|
-
alignItems,
|
|
27
|
-
justifyContent,
|
|
28
|
-
tag: Tag = LAYOUT_TAG_DEFAULT,
|
|
29
|
-
...restPropsPassedByRadixUI
|
|
30
|
-
} = props;
|
|
31
|
-
const classNames = [
|
|
32
|
-
// Temporary trick to avoid global styles
|
|
33
|
-
styles.LayoutFlex,
|
|
34
|
-
styles$1.LayoutGap,
|
|
35
|
-
styles$2.LayoutHide,
|
|
36
|
-
layoutPaddingStyles.layoutPadding,
|
|
37
|
-
styles$3.LayoutRelative
|
|
38
|
-
];
|
|
39
|
-
const gapAttr = getGapAttr({
|
|
40
|
-
gap
|
|
41
|
-
});
|
|
42
|
-
const wrapAttr = getWrapAttr({
|
|
43
|
-
nowrap
|
|
44
|
-
});
|
|
45
|
-
const htmlRelative = getRelativeAttr({
|
|
46
|
-
relative
|
|
47
|
-
});
|
|
48
|
-
const displayAttr = getDisplayAttr({
|
|
49
|
-
hide,
|
|
50
|
-
inline
|
|
51
|
-
});
|
|
52
|
-
const alignItemsAttr = getAlignItemsAttr({
|
|
53
|
-
alignItems
|
|
54
|
-
});
|
|
55
|
-
const justifyContentAttr = getJustifyContentAttr({
|
|
56
|
-
justifyContent
|
|
57
|
-
});
|
|
58
|
-
let directionAttr = DO_NOT_ADD_DATA_ATTRIBUTE;
|
|
59
|
-
let columnReverseAttr = DO_NOT_ADD_DATA_ATTRIBUTE;
|
|
60
|
-
const directionResult = getDirectionAttr({
|
|
61
|
-
direction,
|
|
62
|
-
column,
|
|
63
|
-
reverse
|
|
64
|
-
});
|
|
65
|
-
if (directionResult.applyThrough === "columnReverse") {
|
|
66
|
-
columnReverseAttr = directionResult.columnReverseAttr;
|
|
67
|
-
} else {
|
|
68
|
-
directionAttr = directionResult.directionAttr;
|
|
69
|
-
}
|
|
70
|
-
let paddingAttr = DO_NOT_ADD_DATA_ATTRIBUTE;
|
|
71
|
-
const paddingResult = getPaddingAttr({
|
|
72
|
-
padding
|
|
73
|
-
});
|
|
74
|
-
if (paddingResult.applyThrough === "classnames") {
|
|
75
|
-
classNames.push(...paddingResult.classNames);
|
|
76
|
-
} else {
|
|
77
|
-
paddingAttr = paddingResult.attr;
|
|
78
|
-
}
|
|
79
|
-
const tagProps = {
|
|
80
|
-
...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
|
|
81
|
-
ref,
|
|
82
|
-
className: classNames.join(" "),
|
|
83
|
-
"data-ds-gap": gapAttr,
|
|
84
|
-
"data-ds-nowrap": wrapAttr,
|
|
85
|
-
"data-ds-padding": paddingAttr,
|
|
86
|
-
"data-ds-display": displayAttr,
|
|
87
|
-
"data-ds-relative": htmlRelative,
|
|
88
|
-
"data-ds-direction": directionAttr,
|
|
89
|
-
"data-ds-alignitems": alignItemsAttr,
|
|
90
|
-
"data-ds-columnreverse": columnReverseAttr,
|
|
91
|
-
"data-ds-justifycontent": justifyContentAttr,
|
|
92
|
-
...getDatasetProps(dataset, {
|
|
93
|
-
preplyDsComponent: webComponentNames.LayoutFlex
|
|
94
|
-
})
|
|
95
|
-
};
|
|
96
|
-
return /* @__PURE__ */ jsx(Tag, { ...tagProps, children });
|
|
97
|
-
});
|
|
98
|
-
export {
|
|
99
|
-
LayoutFlex
|
|
100
|
-
};
|
|
1
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
2
|
+
import { t as LayoutFlex } from "../../LayoutFlex-e9auDvWD.js";
|
|
3
|
+
export { LayoutFlex };
|