@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,58 +1,68 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { t as require_jsx_runtime } from "../../jsx-runtime-i4KUlhDu.js";
|
|
3
|
+
import { n as filterThumbProps, r as Slider_module_default } from "../../Slider-Crg4DEn_.js";
|
|
3
4
|
import { forwardRef } from "react";
|
|
4
|
-
import { Slider } from "radix-ui";
|
|
5
|
-
import { s as styles, f as filterThumbProps } from "../../Slider-DB4Maswa.js";
|
|
6
5
|
import { getDatasetProps } from "@preply/ds-web-core";
|
|
7
6
|
import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
|
|
8
7
|
import { useIntl } from "react-intl";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
8
|
+
import { Slider } from "radix-ui";
|
|
9
|
+
//#region src/components/Slider/RangeSlider.tsx
|
|
10
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
11
|
+
/**
|
|
12
|
+
* A slider input that allows users to select a range between two values.
|
|
13
|
+
*
|
|
14
|
+
* @example Uncontrolled
|
|
15
|
+
* <RangeSlider defaultValue={[25, 75]} />
|
|
16
|
+
*
|
|
17
|
+
* @example Controlled
|
|
18
|
+
* const [value, setValue] = useState([25, 75])
|
|
19
|
+
* <RangeSlider value={value} onValueChange={setValue} />
|
|
20
|
+
*
|
|
21
|
+
* @example With minimum steps between thumbs
|
|
22
|
+
* <RangeSlider defaultValue={[20, 80]} minStepsBetweenThumbs={10} />
|
|
23
|
+
*/
|
|
24
|
+
var RangeSlider = forwardRef(function RangeSlider({ value, defaultValue = [0, 100], onValueChange, min = 0, max = 100, step = 1, minStepsBetweenThumbs = 0, dataset, "aria-label": ariaLabel, ...thumbProps }, ref) {
|
|
25
|
+
const { formatMessage } = useIntl();
|
|
26
|
+
const datasetProps = getDatasetProps(dataset, { preplyDsComponent: webComponentNames.Slider });
|
|
27
|
+
const handleValueChange = onValueChange ? (newValue) => onValueChange([newValue[0], newValue[1]]) : void 0;
|
|
28
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Slider.Root, {
|
|
29
|
+
ref,
|
|
30
|
+
...datasetProps,
|
|
31
|
+
className: Slider_module_default.root,
|
|
32
|
+
value,
|
|
33
|
+
defaultValue,
|
|
34
|
+
onValueChange: handleValueChange,
|
|
35
|
+
min,
|
|
36
|
+
max,
|
|
37
|
+
step,
|
|
38
|
+
minStepsBetweenThumbs,
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Slider.Track, {
|
|
41
|
+
className: Slider_module_default.track,
|
|
42
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Slider.Range, { className: Slider_module_default.range })
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Slider.Thumb, {
|
|
45
|
+
...filterThumbProps(thumbProps),
|
|
46
|
+
className: Slider_module_default.thumb,
|
|
47
|
+
"aria-label": formatMessage({
|
|
48
|
+
id: "preply-ds.slider-field.accessibility-label.minimum",
|
|
49
|
+
defaultMessage: "Minimum {label}",
|
|
50
|
+
description: `A label for a slider input's minimum value.
|
|
51
|
+
For example: 'Minimum Price'.`
|
|
52
|
+
}, { label: ariaLabel })
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Slider.Thumb, {
|
|
55
|
+
...filterThumbProps(thumbProps),
|
|
56
|
+
className: Slider_module_default.thumb,
|
|
57
|
+
"aria-label": formatMessage({
|
|
58
|
+
id: "preply-ds.slider-field.accessibility-label.maximum",
|
|
59
|
+
defaultMessage: "Maximum {label}",
|
|
60
|
+
description: `A label for a slider input's maximum value.
|
|
61
|
+
For example: 'Maximum Price'.`
|
|
62
|
+
}, { label: ariaLabel })
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
});
|
|
55
66
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { RangeSlider };
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
import { S, f } from "../../Slider-DB4Maswa.js";
|
|
5
|
-
import "@preply/ds-web-core";
|
|
6
|
-
import "@preply/ds-visual-coverage-preply-component-names";
|
|
7
|
-
export {
|
|
8
|
-
S as Slider,
|
|
9
|
-
f as filterThumbProps
|
|
10
|
-
};
|
|
1
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
2
|
+
import { n as filterThumbProps, t as Slider } from "../../Slider-Crg4DEn_.js";
|
|
3
|
+
export { Slider, filterThumbProps };
|
|
@@ -1,210 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { FormattedMessage } from "react-intl";
|
|
6
|
-
import { getDatasetProps } from "@preply/ds-web-core";
|
|
7
|
-
import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
|
|
8
|
-
import { Heading } from "../Heading/Heading.js";
|
|
9
|
-
import { ProgressSteps } from "../ProgressSteps/ProgressSteps.js";
|
|
10
|
-
import { Text } from "../Text/Text.js";
|
|
11
|
-
import '../../assets/Steps.css';const steps = "steps__BxrkC";
|
|
12
|
-
const header = "header__HFxfM";
|
|
13
|
-
const styles = {
|
|
14
|
-
steps,
|
|
15
|
-
header
|
|
16
|
-
};
|
|
17
|
-
const StepsContext = createContext(void 0);
|
|
18
|
-
const useStepsContext = () => {
|
|
19
|
-
const context = useContext(StepsContext);
|
|
20
|
-
if (context === void 0) {
|
|
21
|
-
throw new Error("Steps navigation components must be used within a Steps component");
|
|
22
|
-
}
|
|
23
|
-
return context || {};
|
|
24
|
-
};
|
|
25
|
-
const StepsPrevious = forwardRef(function StepsPrevious2({
|
|
26
|
-
onClick,
|
|
27
|
-
disabled,
|
|
28
|
-
variant = "ghost",
|
|
29
|
-
...props
|
|
30
|
-
}, ref) {
|
|
31
|
-
const {
|
|
32
|
-
goToPreviousStep,
|
|
33
|
-
currentStep,
|
|
34
|
-
isNavigating,
|
|
35
|
-
contentId
|
|
36
|
-
} = useStepsContext();
|
|
37
|
-
return /* @__PURE__ */ jsx(Button, { ...props, ref, size: "medium", variant, onClick: (e) => {
|
|
38
|
-
onClick == null ? void 0 : onClick(e);
|
|
39
|
-
if (e.defaultPrevented) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
goToPreviousStep();
|
|
43
|
-
}, disabled: currentStep === 1 || isNavigating || disabled, "aria-controls": contentId, children: props.children || /* @__PURE__ */ jsx(FormattedMessage, { id: "preply-ds.steps.previous", defaultMessage: [{
|
|
44
|
-
"type": 0,
|
|
45
|
-
"value": "Previous"
|
|
46
|
-
}] }) });
|
|
47
|
-
});
|
|
48
|
-
const StepsNext = forwardRef(function StepsNext2({
|
|
49
|
-
onClick,
|
|
50
|
-
disabled,
|
|
51
|
-
variant = "primary",
|
|
52
|
-
...props
|
|
53
|
-
}, ref) {
|
|
54
|
-
const {
|
|
55
|
-
goToNextStep,
|
|
56
|
-
currentStep,
|
|
57
|
-
totalSteps,
|
|
58
|
-
isNavigating,
|
|
59
|
-
contentId
|
|
60
|
-
} = useStepsContext();
|
|
61
|
-
return /* @__PURE__ */ jsx(Button, { ...props, ref, size: "medium", variant, onClick: (e) => {
|
|
62
|
-
onClick == null ? void 0 : onClick(e);
|
|
63
|
-
if (e.defaultPrevented) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
goToNextStep();
|
|
67
|
-
}, disabled: currentStep === totalSteps || isNavigating || disabled, "aria-controls": contentId, children: props.children || /* @__PURE__ */ jsx(FormattedMessage, { id: "preply-ds.steps.next", defaultMessage: [{
|
|
68
|
-
"type": 0,
|
|
69
|
-
"value": "Next"
|
|
70
|
-
}] }) });
|
|
71
|
-
});
|
|
72
|
-
const StepsComponent = ({
|
|
73
|
-
children,
|
|
74
|
-
"aria-label": ariaLabel,
|
|
75
|
-
initialStep = 1,
|
|
76
|
-
onStepChange,
|
|
77
|
-
dataset
|
|
78
|
-
}) => {
|
|
79
|
-
const contentId = useId();
|
|
80
|
-
const [currentStep, setCurrentStep] = useState(initialStep);
|
|
81
|
-
const [isNavigating, setIsNavigating] = useState(false);
|
|
82
|
-
const stepChildren = [];
|
|
83
|
-
const otherChildren = [];
|
|
84
|
-
children == null ? void 0 : children.forEach((child) => {
|
|
85
|
-
if (isValidElement(child) && child.type === Step) {
|
|
86
|
-
stepChildren.push(child);
|
|
87
|
-
} else {
|
|
88
|
-
otherChildren.push(child);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
const totalSteps = stepChildren.length;
|
|
92
|
-
const datasetProps = getDatasetProps(dataset, {
|
|
93
|
-
preplyDsComponent: webComponentNames.Steps
|
|
94
|
-
});
|
|
95
|
-
const handleStepChange = async (nextStep) => {
|
|
96
|
-
const boundedNextStep = Math.min(Math.max(nextStep, 1), totalSteps);
|
|
97
|
-
if (!onStepChange) {
|
|
98
|
-
setCurrentStep(boundedNextStep);
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
setIsNavigating(true);
|
|
102
|
-
try {
|
|
103
|
-
const interceptedStep = await onStepChange(currentStep, boundedNextStep);
|
|
104
|
-
setCurrentStep(interceptedStep != null ? interceptedStep : boundedNextStep);
|
|
105
|
-
} finally {
|
|
106
|
-
setIsNavigating(false);
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
const goToPreviousStep = () => handleStepChange(currentStep - 1);
|
|
110
|
-
const goToNextStep = () => handleStepChange(currentStep + 1);
|
|
111
|
-
const goToStep = (step) => handleStepChange(step);
|
|
112
|
-
const contextValue = {
|
|
113
|
-
goToPreviousStep,
|
|
114
|
-
goToNextStep,
|
|
115
|
-
goToStep,
|
|
116
|
-
currentStep,
|
|
117
|
-
totalSteps,
|
|
118
|
-
isNavigating,
|
|
119
|
-
contentId
|
|
120
|
-
};
|
|
121
|
-
return /* @__PURE__ */ jsxs("div", { ...datasetProps, className: styles.steps, id: contentId, "aria-live": "polite", "aria-busy": isNavigating, children: [
|
|
122
|
-
/* @__PURE__ */ jsx(ProgressSteps, { currentStep, totalSteps, "aria-label": ariaLabel }),
|
|
123
|
-
/* @__PURE__ */ jsx("div", { className: styles.content, children: /* @__PURE__ */ jsxs(StepsContext.Provider, { value: contextValue, children: [
|
|
124
|
-
stepChildren[currentStep - 1],
|
|
125
|
-
otherChildren
|
|
126
|
-
] }) })
|
|
127
|
-
] });
|
|
128
|
-
};
|
|
129
|
-
const Step = ({
|
|
130
|
-
title,
|
|
131
|
-
description,
|
|
132
|
-
children,
|
|
133
|
-
hideHeader
|
|
134
|
-
}) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
135
|
-
/* @__PURE__ */ jsxs("hgroup", { className: styles.header, hidden: hideHeader, children: [
|
|
136
|
-
/* @__PURE__ */ jsx(Heading, { tag: "h3", variant: {
|
|
137
|
-
_: "medium",
|
|
138
|
-
"medium-l": "large"
|
|
139
|
-
}, children: title }),
|
|
140
|
-
description && /* @__PURE__ */ jsx(Text, { variant: "default-regular", accent: "secondary", children: description })
|
|
141
|
-
] }),
|
|
142
|
-
children
|
|
143
|
-
] });
|
|
144
|
-
const Steps = Object.assign(StepsComponent, {
|
|
145
|
-
/**
|
|
146
|
-
* An individual Step.
|
|
147
|
-
*
|
|
148
|
-
* @example
|
|
149
|
-
* <Steps aria-label="Onboarding Steps">
|
|
150
|
-
* <Steps.Step title="Subject" description="What do you want to learn?">
|
|
151
|
-
* <SubjectStep />
|
|
152
|
-
* </Steps.Step>
|
|
153
|
-
* <Steps.Step title="Availability" description="When would you like to have classes?">
|
|
154
|
-
* <AvailabilityStep />
|
|
155
|
-
* </Steps.Step>
|
|
156
|
-
* </Steps>
|
|
157
|
-
*/
|
|
158
|
-
Step,
|
|
159
|
-
/**
|
|
160
|
-
* A wrapper around `Button` that automatically navigates to the previous step on click.
|
|
161
|
-
*
|
|
162
|
-
* It is also automatically disabled when on the first step or during navigation.
|
|
163
|
-
*
|
|
164
|
-
* This behaviour can be overridden by providing an `onClick` handler that calls `preventDefault()`.
|
|
165
|
-
*
|
|
166
|
-
* For full control, you can also use the `StepsContext` directly to call `goToPreviousStep` or `goToStep`.
|
|
167
|
-
*
|
|
168
|
-
* @example Usage in `Steps`
|
|
169
|
-
* <Steps aria-label="My Steps">
|
|
170
|
-
* // Steps
|
|
171
|
-
*
|
|
172
|
-
* <LayoutFlex justifyContent="space-between">
|
|
173
|
-
* <Steps.Previous variant="tertiary">Back</Steps.Previous>
|
|
174
|
-
* // Next button
|
|
175
|
-
* </LayoutFlex>
|
|
176
|
-
* </Steps>
|
|
177
|
-
*
|
|
178
|
-
* @example Customisation
|
|
179
|
-
* <Steps.Previous variant="tertiary">Back</Steps.Previous>
|
|
180
|
-
*/
|
|
181
|
-
Previous: StepsPrevious,
|
|
182
|
-
/**
|
|
183
|
-
* A wrapper around `Button` that automatically navigates to the next step on click.
|
|
184
|
-
*
|
|
185
|
-
* It is also automatically disabled when on the last step or during navigation.
|
|
186
|
-
*
|
|
187
|
-
* This behaviour can be overridden by providing an `onClick` handler that calls `preventDefault()`.
|
|
188
|
-
*
|
|
189
|
-
* For full control, you can also use the `StepsContext` directly to call `goToNextStep` or `goToStep`.
|
|
190
|
-
*
|
|
191
|
-
* @example Usage in `Steps`
|
|
192
|
-
* <Steps aria-label="My Steps">
|
|
193
|
-
* // Steps
|
|
194
|
-
*
|
|
195
|
-
* <LayoutFlex justifyContent="space-between">
|
|
196
|
-
* // Previous button
|
|
197
|
-
* <Steps.Next variant="primary">Next</Steps.Next>
|
|
198
|
-
* </LayoutFlex>
|
|
199
|
-
* </Steps>
|
|
200
|
-
*
|
|
201
|
-
* @example Customisation
|
|
202
|
-
* <Steps.Next variant="secondary">Continue</Steps.Next>
|
|
203
|
-
*/
|
|
204
|
-
Next: StepsNext
|
|
205
|
-
});
|
|
206
|
-
export {
|
|
207
|
-
Steps,
|
|
208
|
-
StepsContext,
|
|
209
|
-
useStepsContext
|
|
210
|
-
};
|
|
1
|
+
import "../../render-icon-Ch3b2dE0.js";
|
|
2
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
3
|
+
import { n as StepsContext, r as useStepsContext, t as Steps } from "../../Steps-DbN5vFrP.js";
|
|
4
|
+
export { Steps, StepsContext, useStepsContext };
|
|
@@ -1,51 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { getDatasetProps } from "@preply/ds-web-core";
|
|
5
|
-
import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
|
|
6
|
-
import '../../assets/Switch.css';const Switch$1 = "Switch__-4XFt";
|
|
7
|
-
const thumb = "thumb__qAYMq";
|
|
8
|
-
const styles = {
|
|
9
|
-
Switch: Switch$1,
|
|
10
|
-
thumb
|
|
11
|
-
};
|
|
12
|
-
function filterSwitchProps(props) {
|
|
13
|
-
const filteredProps = {};
|
|
14
|
-
Object.entries(props).forEach(([key, value]) => {
|
|
15
|
-
switch (key) {
|
|
16
|
-
case "id":
|
|
17
|
-
case "disabled":
|
|
18
|
-
case "aria-label":
|
|
19
|
-
case "aria-labelledby":
|
|
20
|
-
case "aria-describedby":
|
|
21
|
-
case "aria-invalid":
|
|
22
|
-
case "aria-errormessage":
|
|
23
|
-
filteredProps[key] = value;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return filteredProps;
|
|
27
|
-
}
|
|
28
|
-
const Switch = forwardRef(function Switch2({
|
|
29
|
-
checked: forceChecked,
|
|
30
|
-
defaultChecked,
|
|
31
|
-
onCheckedChange,
|
|
32
|
-
dataset,
|
|
33
|
-
...otherProps
|
|
34
|
-
}, ref) {
|
|
35
|
-
const [internalChecked, setInternalChecked] = useState(defaultChecked != null ? defaultChecked : false);
|
|
36
|
-
const isControlled = forceChecked !== void 0;
|
|
37
|
-
const checked = isControlled ? forceChecked : internalChecked;
|
|
38
|
-
const handleClick = () => {
|
|
39
|
-
const newValue = !checked;
|
|
40
|
-
if (!isControlled) {
|
|
41
|
-
setInternalChecked(newValue);
|
|
42
|
-
}
|
|
43
|
-
onCheckedChange == null ? void 0 : onCheckedChange(newValue);
|
|
44
|
-
};
|
|
45
|
-
return /* @__PURE__ */ jsx("button", { ...filterSwitchProps(otherProps), ...getDatasetProps(dataset, {
|
|
46
|
-
preplyDsComponent: webComponentNames.Switch
|
|
47
|
-
}), ref, role: "switch", "aria-checked": checked, className: styles.Switch, onClick: handleClick, children: /* @__PURE__ */ jsx("span", { className: styles.thumb }) });
|
|
48
|
-
});
|
|
49
|
-
export {
|
|
50
|
-
Switch
|
|
51
|
-
};
|
|
1
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
2
|
+
import { t as Switch } from "../../Switch-Ck_xB0ID.js";
|
|
3
|
+
export { Switch };
|
|
@@ -1,128 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { moduleClassNames, stringClassNames, booleanClassNames, getDatasetProps } from "@preply/ds-web-core";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import { getTextAccentClassnames } from "../../shared-styles/text-accent/text-accent.js";
|
|
7
|
-
import { getTextCenteredClassnames } from "../../shared-styles/text-centered/text-centered.js";
|
|
8
|
-
import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
|
|
9
|
-
import '../../assets/Text.css';const Text$1 = "Text__uVacy";
|
|
10
|
-
const styles = {
|
|
11
|
-
Text: Text$1,
|
|
12
|
-
"Text--variant-caption-regular": "Text--variant-caption-regular__Qv2Ax",
|
|
13
|
-
"Text--variant-caption-semibold": "Text--variant-caption-semibold__qycaB",
|
|
14
|
-
"Text--variant-small-regular": "Text--variant-small-regular__YFauL",
|
|
15
|
-
"Text--variant-small-regular-italic": "Text--variant-small-regular-italic__sGPGa",
|
|
16
|
-
"Text--variant-small-semibold": "Text--variant-small-semibold__wY3fp",
|
|
17
|
-
"Text--variant-small-semibold-italic": "Text--variant-small-semibold-italic__ydWgK",
|
|
18
|
-
"Text--variant-default-regular": "Text--variant-default-regular__d6Rfb",
|
|
19
|
-
"Text--variant-default-regular-italic": "Text--variant-default-regular-italic__adOeM",
|
|
20
|
-
"Text--variant-default-semibold": "Text--variant-default-semibold__UlmHo",
|
|
21
|
-
"Text--variant-default-semibold-italic": "Text--variant-default-semibold-italic__9WbJJ",
|
|
22
|
-
"Text--variant-large-regular": "Text--variant-large-regular__zzp2H",
|
|
23
|
-
"Text--variant-large-regular-italic": "Text--variant-large-regular-italic__gGcEV",
|
|
24
|
-
"Text--variant-large-semibold": "Text--variant-large-semibold__4S-U4",
|
|
25
|
-
"Text--variant-large-semibold-italic": "Text--variant-large-semibold-italic__ZrpZw",
|
|
26
|
-
"Text--narrow-l--variant-caption-regular": "Text--narrow-l--variant-caption-regular__62qXj",
|
|
27
|
-
"Text--narrow-l--variant-caption-semibold": "Text--narrow-l--variant-caption-semibold__niLxy",
|
|
28
|
-
"Text--narrow-l--variant-small-regular": "Text--narrow-l--variant-small-regular__JI9Mz",
|
|
29
|
-
"Text--narrow-l--variant-small-regular-italic": "Text--narrow-l--variant-small-regular-italic__h38Hy",
|
|
30
|
-
"Text--narrow-l--variant-small-semibold": "Text--narrow-l--variant-small-semibold__jqUJO",
|
|
31
|
-
"Text--narrow-l--variant-small-semibold-italic": "Text--narrow-l--variant-small-semibold-italic__XCXW6",
|
|
32
|
-
"Text--narrow-l--variant-default-regular": "Text--narrow-l--variant-default-regular__nCPnt",
|
|
33
|
-
"Text--narrow-l--variant-default-regular-italic": "Text--narrow-l--variant-default-regular-italic__dKZEJ",
|
|
34
|
-
"Text--narrow-l--variant-default-semibold": "Text--narrow-l--variant-default-semibold__6VGIy",
|
|
35
|
-
"Text--narrow-l--variant-default-semibold-italic": "Text--narrow-l--variant-default-semibold-italic__giyrw",
|
|
36
|
-
"Text--narrow-l--variant-large-regular": "Text--narrow-l--variant-large-regular__7uObP",
|
|
37
|
-
"Text--narrow-l--variant-large-regular-italic": "Text--narrow-l--variant-large-regular-italic__iW3Nb",
|
|
38
|
-
"Text--narrow-l--variant-large-semibold": "Text--narrow-l--variant-large-semibold__-R2qZ",
|
|
39
|
-
"Text--narrow-l--variant-large-semibold-italic": "Text--narrow-l--variant-large-semibold-italic__VISYL",
|
|
40
|
-
"Text--medium-s--variant-caption-regular": "Text--medium-s--variant-caption-regular__XEVQe",
|
|
41
|
-
"Text--medium-s--variant-caption-semibold": "Text--medium-s--variant-caption-semibold__f0rdW",
|
|
42
|
-
"Text--medium-s--variant-small-regular": "Text--medium-s--variant-small-regular__2dml2",
|
|
43
|
-
"Text--medium-s--variant-small-regular-italic": "Text--medium-s--variant-small-regular-italic__GUOiJ",
|
|
44
|
-
"Text--medium-s--variant-small-semibold": "Text--medium-s--variant-small-semibold__uQZGO",
|
|
45
|
-
"Text--medium-s--variant-small-semibold-italic": "Text--medium-s--variant-small-semibold-italic__5Jqrk",
|
|
46
|
-
"Text--medium-s--variant-default-regular": "Text--medium-s--variant-default-regular__jLGVH",
|
|
47
|
-
"Text--medium-s--variant-default-regular-italic": "Text--medium-s--variant-default-regular-italic__meFSk",
|
|
48
|
-
"Text--medium-s--variant-default-semibold": "Text--medium-s--variant-default-semibold__V4BoL",
|
|
49
|
-
"Text--medium-s--variant-default-semibold-italic": "Text--medium-s--variant-default-semibold-italic__wNC52",
|
|
50
|
-
"Text--medium-s--variant-large-regular": "Text--medium-s--variant-large-regular__0WQ9H",
|
|
51
|
-
"Text--medium-s--variant-large-regular-italic": "Text--medium-s--variant-large-regular-italic__-lOJl",
|
|
52
|
-
"Text--medium-s--variant-large-semibold": "Text--medium-s--variant-large-semibold__qbJdo",
|
|
53
|
-
"Text--medium-s--variant-large-semibold-italic": "Text--medium-s--variant-large-semibold-italic__OwChG",
|
|
54
|
-
"Text--medium-l--variant-caption-regular": "Text--medium-l--variant-caption-regular__mT3--",
|
|
55
|
-
"Text--medium-l--variant-caption-semibold": "Text--medium-l--variant-caption-semibold__8-hkD",
|
|
56
|
-
"Text--medium-l--variant-small-regular": "Text--medium-l--variant-small-regular__HO15d",
|
|
57
|
-
"Text--medium-l--variant-small-regular-italic": "Text--medium-l--variant-small-regular-italic__i92C6",
|
|
58
|
-
"Text--medium-l--variant-small-semibold": "Text--medium-l--variant-small-semibold__CjiKc",
|
|
59
|
-
"Text--medium-l--variant-small-semibold-italic": "Text--medium-l--variant-small-semibold-italic__PJHhp",
|
|
60
|
-
"Text--medium-l--variant-default-regular": "Text--medium-l--variant-default-regular__bWryq",
|
|
61
|
-
"Text--medium-l--variant-default-regular-italic": "Text--medium-l--variant-default-regular-italic__eWPQy",
|
|
62
|
-
"Text--medium-l--variant-default-semibold": "Text--medium-l--variant-default-semibold__DlFqw",
|
|
63
|
-
"Text--medium-l--variant-default-semibold-italic": "Text--medium-l--variant-default-semibold-italic__1UrvG",
|
|
64
|
-
"Text--medium-l--variant-large-regular": "Text--medium-l--variant-large-regular__Ur-1P",
|
|
65
|
-
"Text--medium-l--variant-large-regular-italic": "Text--medium-l--variant-large-regular-italic__sZ7If",
|
|
66
|
-
"Text--medium-l--variant-large-semibold": "Text--medium-l--variant-large-semibold__BPxlV",
|
|
67
|
-
"Text--medium-l--variant-large-semibold-italic": "Text--medium-l--variant-large-semibold-italic__vTWZt",
|
|
68
|
-
"Text--wide-s--variant-caption-regular": "Text--wide-s--variant-caption-regular__45qL-",
|
|
69
|
-
"Text--wide-s--variant-caption-semibold": "Text--wide-s--variant-caption-semibold__ybSD2",
|
|
70
|
-
"Text--wide-s--variant-small-regular": "Text--wide-s--variant-small-regular__pnI1L",
|
|
71
|
-
"Text--wide-s--variant-small-regular-italic": "Text--wide-s--variant-small-regular-italic__zbEZJ",
|
|
72
|
-
"Text--wide-s--variant-small-semibold": "Text--wide-s--variant-small-semibold__pBKrO",
|
|
73
|
-
"Text--wide-s--variant-small-semibold-italic": "Text--wide-s--variant-small-semibold-italic__5xaMk",
|
|
74
|
-
"Text--wide-s--variant-default-regular": "Text--wide-s--variant-default-regular__DEbnG",
|
|
75
|
-
"Text--wide-s--variant-default-regular-italic": "Text--wide-s--variant-default-regular-italic__QPvW9",
|
|
76
|
-
"Text--wide-s--variant-default-semibold": "Text--wide-s--variant-default-semibold__eOf2n",
|
|
77
|
-
"Text--wide-s--variant-default-semibold-italic": "Text--wide-s--variant-default-semibold-italic__52kF0",
|
|
78
|
-
"Text--wide-s--variant-large-regular": "Text--wide-s--variant-large-regular__nkIe1",
|
|
79
|
-
"Text--wide-s--variant-large-regular-italic": "Text--wide-s--variant-large-regular-italic__Z9BlJ",
|
|
80
|
-
"Text--wide-s--variant-large-semibold": "Text--wide-s--variant-large-semibold__hnlmr",
|
|
81
|
-
"Text--wide-s--variant-large-semibold-italic": "Text--wide-s--variant-large-semibold-italic__-E52C",
|
|
82
|
-
"Text--wide-l--variant-caption-regular": "Text--wide-l--variant-caption-regular__A-258",
|
|
83
|
-
"Text--wide-l--variant-caption-semibold": "Text--wide-l--variant-caption-semibold__Fkrc2",
|
|
84
|
-
"Text--wide-l--variant-small-regular": "Text--wide-l--variant-small-regular__jxxVQ",
|
|
85
|
-
"Text--wide-l--variant-small-regular-italic": "Text--wide-l--variant-small-regular-italic__m4Blo",
|
|
86
|
-
"Text--wide-l--variant-small-semibold": "Text--wide-l--variant-small-semibold__xpw7Q",
|
|
87
|
-
"Text--wide-l--variant-small-semibold-italic": "Text--wide-l--variant-small-semibold-italic__AYnvO",
|
|
88
|
-
"Text--wide-l--variant-default-regular": "Text--wide-l--variant-default-regular__ZB6T-",
|
|
89
|
-
"Text--wide-l--variant-default-regular-italic": "Text--wide-l--variant-default-regular-italic__-kppq",
|
|
90
|
-
"Text--wide-l--variant-default-semibold": "Text--wide-l--variant-default-semibold__-4aqX",
|
|
91
|
-
"Text--wide-l--variant-default-semibold-italic": "Text--wide-l--variant-default-semibold-italic__aju5z",
|
|
92
|
-
"Text--wide-l--variant-large-regular": "Text--wide-l--variant-large-regular__2LL-6",
|
|
93
|
-
"Text--wide-l--variant-large-regular-italic": "Text--wide-l--variant-large-regular-italic__TIX-D",
|
|
94
|
-
"Text--wide-l--variant-large-semibold": "Text--wide-l--variant-large-semibold__taO1N",
|
|
95
|
-
"Text--wide-l--variant-large-semibold-italic": "Text--wide-l--variant-large-semibold-italic__7iaxB",
|
|
96
|
-
"Text--strong": "Text--strong__SiU3Y"
|
|
97
|
-
};
|
|
98
|
-
const Text = forwardRef(function TextComponent({
|
|
99
|
-
children,
|
|
100
|
-
variant,
|
|
101
|
-
tag: Tag = TEXT_TAG_DEFAULT,
|
|
102
|
-
accent,
|
|
103
|
-
strong,
|
|
104
|
-
centered,
|
|
105
|
-
dataset,
|
|
106
|
-
className,
|
|
107
|
-
...restPropsPassedByRadixUI
|
|
108
|
-
}, ref) {
|
|
109
|
-
const actualVariant = variant || TEXT_VARIANT_DEFAULT;
|
|
110
|
-
const actualStrong = variant ? void 0 : strong;
|
|
111
|
-
const classNames = moduleClassNames(styles, webComponentNames.Text, [stringClassNames("variant", actualVariant), booleanClassNames("strong", void 0, actualStrong)]);
|
|
112
|
-
const useDefaultAccent = !accent;
|
|
113
|
-
const accentClassNames = getTextAccentClassnames(useDefaultAccent, accent);
|
|
114
|
-
const centeredClassNames = getTextCenteredClassnames(centered);
|
|
115
|
-
const allClassNames = [...classNames, ...accentClassNames, ...centeredClassNames, className];
|
|
116
|
-
const props = {
|
|
117
|
-
...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
|
|
118
|
-
ref,
|
|
119
|
-
className: allClassNames.join(" "),
|
|
120
|
-
...getDatasetProps(dataset, {
|
|
121
|
-
preplyDsComponent: webComponentNames.Text
|
|
122
|
-
})
|
|
123
|
-
};
|
|
124
|
-
return /* @__PURE__ */ jsx(Tag, { ...props, children });
|
|
125
|
-
});
|
|
126
|
-
export {
|
|
127
|
-
Text
|
|
128
|
-
};
|
|
1
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
2
|
+
import { t as Text } from "../../Text-CaOF75Z-.js";
|
|
3
|
+
export { Text };
|
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { FormControl } from "../FormControl/FormControl.js";
|
|
2
|
+
import { t as require_jsx_runtime } from "../../jsx-runtime-i4KUlhDu.js";
|
|
3
|
+
import { t as FormControl } from "../../FormControl-qnbQL1iF.js";
|
|
5
4
|
import { Input } from "../private/Input/Input.js";
|
|
6
|
-
import "
|
|
5
|
+
import { forwardRef } from "react";
|
|
7
6
|
import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
7
|
+
//#region src/components/TextField/TextField.tsx
|
|
8
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
9
|
+
var TextField = forwardRef(function TextField({ id, label, description, error, required, type = "text", inputDataset, dataset, hideLabel, onClick, hasError, useLegacyRequiredLabel, className, style, ...props }, ref) {
|
|
10
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormControl, {
|
|
11
|
+
id,
|
|
12
|
+
label,
|
|
13
|
+
description,
|
|
14
|
+
error,
|
|
15
|
+
hasError,
|
|
16
|
+
required,
|
|
17
|
+
dataset,
|
|
18
|
+
hideLabel,
|
|
19
|
+
onClick,
|
|
20
|
+
useLegacyRequiredLabel,
|
|
21
|
+
preplyDsComponent: webComponentNames.TextField,
|
|
22
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
|
|
23
|
+
...props,
|
|
24
|
+
type,
|
|
25
|
+
ref,
|
|
26
|
+
dataset: inputDataset
|
|
27
|
+
})
|
|
28
|
+
});
|
|
30
29
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { TextField };
|
|
@@ -1,41 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { moduleClassNames, stringClassNames, getDatasetProps } from "@preply/ds-web-core";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
|
|
7
|
-
import '../../assets/TextHighlighted.css';const TextHighlighted$1 = "TextHighlighted__ehLpO";
|
|
8
|
-
const styles = {
|
|
9
|
-
TextHighlighted: TextHighlighted$1,
|
|
10
|
-
"TextHighlighted--highlight-blue": "TextHighlighted--highlight-blue__a1Ymf",
|
|
11
|
-
"TextHighlighted--highlight-green": "TextHighlighted--highlight-green__QQm6L",
|
|
12
|
-
"TextHighlighted--highlight-primary": "TextHighlighted--highlight-primary__n35-d",
|
|
13
|
-
"TextHighlighted--highlight-secondary": "TextHighlighted--highlight-secondary__YEj6c",
|
|
14
|
-
"TextHighlighted--highlight-tertiary": "TextHighlighted--highlight-tertiary__uDEFk",
|
|
15
|
-
"TextHighlighted--highlight-accent": "TextHighlighted--highlight-accent__JrA2s",
|
|
16
|
-
"TextHighlighted--highlight-positive": "TextHighlighted--highlight-positive__tfVNZ",
|
|
17
|
-
"TextHighlighted--highlight-info": "TextHighlighted--highlight-info__W1sMI",
|
|
18
|
-
"TextHighlighted--highlight-warning": "TextHighlighted--highlight-warning__dzj54",
|
|
19
|
-
"TextHighlighted--highlight-critical": "TextHighlighted--highlight-critical__V3-1S"
|
|
20
|
-
};
|
|
21
|
-
const TextHighlighted = forwardRef(function TextHighlightedComponent({
|
|
22
|
-
children,
|
|
23
|
-
highlight = TEXT_HIGHLIGHT_DEFAULT,
|
|
24
|
-
tag: Tag = TEXT_INLINE_TAG_DEFAULT,
|
|
25
|
-
dataset,
|
|
26
|
-
...restPropsPassedByRadixUI
|
|
27
|
-
}, ref) {
|
|
28
|
-
const classNames = moduleClassNames(styles, webComponentNames.TextHighlighted, [stringClassNames("highlight", highlight)]);
|
|
29
|
-
const props = {
|
|
30
|
-
...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
|
|
31
|
-
ref,
|
|
32
|
-
className: classNames.join(" "),
|
|
33
|
-
...getDatasetProps(dataset, {
|
|
34
|
-
preplyDsComponent: webComponentNames.TextHighlighted
|
|
35
|
-
})
|
|
36
|
-
};
|
|
37
|
-
return /* @__PURE__ */ jsx(Tag, { ...props, children });
|
|
38
|
-
});
|
|
39
|
-
export {
|
|
40
|
-
TextHighlighted
|
|
41
|
-
};
|
|
1
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
2
|
+
import { t as TextHighlighted } from "../../TextHighlighted-Dwq9Clgn.js";
|
|
3
|
+
export { TextHighlighted };
|