@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,81 +1,131 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import "../../../render-icon-Ch3b2dE0.js";
|
|
3
|
+
import { t as require_jsx_runtime } from "../../../jsx-runtime-i4KUlhDu.js";
|
|
4
|
+
import { S as SubmenuTrigger, _ as RadioGroup, p as ItemValue, v as RadioItem, w as MenuRadioItemIndicator, x as SubmenuRoot } from "../../../DropdownMenu.primitives-BrsTBvMk.js";
|
|
5
|
+
import { t as VisuallyHidden } from "../../../VisuallyHidden-CtcHcZCK.js";
|
|
6
|
+
import { useControllableState } from "../../../utils/useControllableState/useControllableState.js";
|
|
7
|
+
import "../../../useBreakpointMatch-D9a3CTNK.js";
|
|
3
8
|
import { createContext, useContext, useState } from "react";
|
|
4
|
-
import { g as SubmenuTrigger, k as RadioGroup, l as RadioItem, M as MenuRadioItemIndicator, S as SubmenuRoot, o as ItemValue } from "../../../DropdownMenu.primitives-CqJE9k4D.js";
|
|
5
9
|
import { createPortal } from "react-dom";
|
|
6
|
-
import { VisuallyHidden } from "../../private/VisuallyHidden/VisuallyHidden.js";
|
|
7
10
|
import { FormattedMessage } from "react-intl";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
11
|
+
//#region src/components/DropdownMenu/primitives/DropdownMenuSelectItem.primitives.tsx
|
|
12
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
13
|
+
/**
|
|
14
|
+
* Select menu item primitives. Basically, a Submenu with RadioGroup inside.
|
|
15
|
+
*
|
|
16
|
+
* Anatomy:
|
|
17
|
+
*
|
|
18
|
+
* <SelectRoot>
|
|
19
|
+
* <SelectTrigger>
|
|
20
|
+
* <ItemContainer>
|
|
21
|
+
* ...
|
|
22
|
+
* <ItemTrailingElements>
|
|
23
|
+
* <SelectValue />
|
|
24
|
+
* <ItemSubmenuIcon />
|
|
25
|
+
* </ItemTrailingElements>
|
|
26
|
+
* </ItemContainer>
|
|
27
|
+
* </SelectTrigger>
|
|
28
|
+
* <Portal>
|
|
29
|
+
* <Backdrop />
|
|
30
|
+
* <Positioner>
|
|
31
|
+
* <Popup>
|
|
32
|
+
* <SelectRadioGroup>
|
|
33
|
+
* <SelectOptionItem>
|
|
34
|
+
* <ItemContainer>
|
|
35
|
+
* ...
|
|
36
|
+
* <ItemLabel>
|
|
37
|
+
* <SelectOptionLabelText />
|
|
38
|
+
* </ItemLabel>
|
|
39
|
+
* </ItemContainer>
|
|
40
|
+
* </SelectOptionItem>
|
|
41
|
+
* </SelectRadioGroup>
|
|
42
|
+
* </Popup>
|
|
43
|
+
* </Positioner>
|
|
44
|
+
* </Portal>
|
|
45
|
+
* </SelectRoot>
|
|
46
|
+
*/
|
|
47
|
+
var selectValueElementCtx = createContext(null);
|
|
48
|
+
var setValueElementCtx = createContext(() => {});
|
|
49
|
+
var setSelectOpenCtx = createContext(() => {});
|
|
50
|
+
/**
|
|
51
|
+
* Groups parts of select menu item
|
|
52
|
+
*/
|
|
53
|
+
function SelectRoot({ children, open: openProp, onOpenChange: onOpenChangeProp, defaultOpen, ...props }) {
|
|
54
|
+
const [valueElement, setValueElement] = useState(null);
|
|
55
|
+
const [open, setOpen] = useControllableState({
|
|
56
|
+
value: openProp,
|
|
57
|
+
onValueChange: onOpenChangeProp,
|
|
58
|
+
defaultValue: defaultOpen
|
|
59
|
+
});
|
|
60
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(selectValueElementCtx.Provider, {
|
|
61
|
+
value: valueElement,
|
|
62
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(setValueElementCtx.Provider, {
|
|
63
|
+
value: setValueElement,
|
|
64
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(setSelectOpenCtx.Provider, {
|
|
65
|
+
value: setOpen,
|
|
66
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SubmenuRoot, {
|
|
67
|
+
...props,
|
|
68
|
+
open: !!open,
|
|
69
|
+
onOpenChange: setOpen,
|
|
70
|
+
children
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
});
|
|
28
75
|
}
|
|
29
|
-
|
|
76
|
+
var SelectTrigger = SubmenuTrigger;
|
|
77
|
+
/**
|
|
78
|
+
* Displays currently selected option label
|
|
79
|
+
*/
|
|
30
80
|
function SelectValue(props) {
|
|
31
|
-
|
|
32
|
-
|
|
81
|
+
const valueElementRef = useContext(setValueElementCtx);
|
|
82
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemValue, {
|
|
83
|
+
...props,
|
|
84
|
+
ref: valueElementRef
|
|
85
|
+
});
|
|
33
86
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
87
|
+
/**
|
|
88
|
+
* RadioGroup for select. Manages select state.
|
|
89
|
+
*/
|
|
90
|
+
var SelectRadioGroup = RadioGroup;
|
|
91
|
+
/**
|
|
92
|
+
* Select option item. Wraps RadioItem.
|
|
93
|
+
*/
|
|
94
|
+
function SelectOptionItem({ value, children, onClick, ...props }) {
|
|
95
|
+
const setSelectOpen = useContext(setSelectOpenCtx);
|
|
96
|
+
const handleClick = (event) => {
|
|
97
|
+
onClick === null || onClick === void 0 || onClick(event);
|
|
98
|
+
setSelectOpen(false);
|
|
99
|
+
};
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioItem, {
|
|
101
|
+
value,
|
|
102
|
+
onClick: handleClick,
|
|
103
|
+
...props,
|
|
104
|
+
children
|
|
105
|
+
});
|
|
47
106
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
107
|
+
/**
|
|
108
|
+
* Children of this component will be portalled into select trigger to display selected value.
|
|
109
|
+
* Basically, it implements same pattern as radix-ui or base-ui select's ItemText
|
|
110
|
+
*/
|
|
111
|
+
function SelectOptionLabelText({ children }) {
|
|
112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [children, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuRadioItemIndicator, { render: (_, { checked }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SelectedValuePortal, {
|
|
113
|
+
active: checked,
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormattedMessage, {
|
|
116
|
+
id: "preply-ds.dropdown-menu.select-option-label-text",
|
|
117
|
+
defaultMessage: "Selected:",
|
|
118
|
+
description: "Hints screen reader users that following text is currently selected value"
|
|
119
|
+
}) }),
|
|
120
|
+
" ",
|
|
121
|
+
children
|
|
122
|
+
]
|
|
123
|
+
}) })] });
|
|
65
124
|
}
|
|
66
|
-
function SelectedValuePortal({
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const selectValueElement = useContext(selectValueElementCtx);
|
|
71
|
-
if (!active || !selectValueElement) return null;
|
|
72
|
-
return createPortal(children, selectValueElement);
|
|
125
|
+
function SelectedValuePortal({ children, active }) {
|
|
126
|
+
const selectValueElement = useContext(selectValueElementCtx);
|
|
127
|
+
if (!active || !selectValueElement) return null;
|
|
128
|
+
return createPortal(children, selectValueElement);
|
|
73
129
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
SelectOptionLabelText,
|
|
77
|
-
SelectRadioGroup,
|
|
78
|
-
SelectRoot,
|
|
79
|
-
SelectTrigger,
|
|
80
|
-
SelectValue
|
|
81
|
-
};
|
|
130
|
+
//#endregion
|
|
131
|
+
export { SelectOptionItem, SelectOptionLabelText, SelectRadioGroup, SelectRoot, SelectTrigger, SelectValue };
|
|
@@ -1,37 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { moduleClassNames, getDatasetProps } from "@preply/ds-web-core";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
|
|
7
|
-
import '../../assets/FieldButton.css';const FieldButton$1 = "FieldButton__OWtNd";
|
|
8
|
-
const styles = {
|
|
9
|
-
FieldButton: FieldButton$1
|
|
10
|
-
};
|
|
11
|
-
const FieldButton = forwardRef(function FieldButtonComponent({
|
|
12
|
-
svg: Svg,
|
|
13
|
-
assistiveText,
|
|
14
|
-
onClick,
|
|
15
|
-
dataset,
|
|
16
|
-
...restPropsPassedByRadixUI
|
|
17
|
-
}, ref) {
|
|
18
|
-
const classNames = moduleClassNames(styles, webComponentNames.FieldButton);
|
|
19
|
-
const handleClick = (ev) => {
|
|
20
|
-
ev.stopPropagation();
|
|
21
|
-
onClick == null ? void 0 : onClick(ev);
|
|
22
|
-
};
|
|
23
|
-
const ownProps = {
|
|
24
|
-
...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
|
|
25
|
-
...getDatasetProps(dataset, {
|
|
26
|
-
preplyDsComponent: webComponentNames.FieldButton
|
|
27
|
-
}),
|
|
28
|
-
className: classNames.join(" "),
|
|
29
|
-
title: assistiveText,
|
|
30
|
-
onClick: handleClick,
|
|
31
|
-
ref
|
|
32
|
-
};
|
|
33
|
-
return /* @__PURE__ */ jsx("button", { ...ownProps, type: "button", children: /* @__PURE__ */ jsx(Svg, { "aria-hidden": "true", focusable: "false" }) });
|
|
34
|
-
});
|
|
35
|
-
export {
|
|
36
|
-
FieldButton
|
|
37
|
-
};
|
|
1
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
2
|
+
import { t as FieldButton } from "../../FieldButton-B2slox8P.js";
|
|
3
|
+
export { FieldButton };
|
|
@@ -1,105 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { useId, isValidElement } from "react";
|
|
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 '../../assets/FormControl.css';const container = "container__dtKps";
|
|
9
|
-
const label = "label__S0tQE";
|
|
10
|
-
const required = "required__GVzWg";
|
|
11
|
-
const description = "description__h6Gw1";
|
|
12
|
-
const error = "error__MGvA2";
|
|
13
|
-
const styles = {
|
|
14
|
-
container,
|
|
15
|
-
label,
|
|
16
|
-
required,
|
|
17
|
-
description,
|
|
18
|
-
error
|
|
19
|
-
};
|
|
20
|
-
function getInputAriaAttributes({
|
|
21
|
-
id,
|
|
22
|
-
error: error2,
|
|
23
|
-
description: description2,
|
|
24
|
-
hasError
|
|
25
|
-
}) {
|
|
26
|
-
const ariaAttributes = {};
|
|
27
|
-
if (hasError) {
|
|
28
|
-
ariaAttributes["aria-invalid"] = true;
|
|
29
|
-
}
|
|
30
|
-
if (error2) {
|
|
31
|
-
ariaAttributes["aria-invalid"] = true;
|
|
32
|
-
ariaAttributes["aria-errormessage"] = `${id}-error`;
|
|
33
|
-
}
|
|
34
|
-
if (description2) {
|
|
35
|
-
ariaAttributes["aria-describedby"] = `${id}-description`;
|
|
36
|
-
}
|
|
37
|
-
return ariaAttributes;
|
|
38
|
-
}
|
|
39
|
-
const FormControl = ({
|
|
40
|
-
id: idProp,
|
|
41
|
-
label: label2,
|
|
42
|
-
hideLabel,
|
|
43
|
-
description: description2,
|
|
44
|
-
error: error2,
|
|
45
|
-
hasError,
|
|
46
|
-
children,
|
|
47
|
-
required: required2,
|
|
48
|
-
dataset,
|
|
49
|
-
onClick,
|
|
50
|
-
preplyDsComponent = webComponentNames.FormControl,
|
|
51
|
-
useLegacyRequiredLabel = false
|
|
52
|
-
}) => {
|
|
53
|
-
const generatedId = useId();
|
|
54
|
-
const id = idProp || generatedId;
|
|
55
|
-
const inputAriaAttributes = getInputAriaAttributes({
|
|
56
|
-
id,
|
|
57
|
-
error: error2,
|
|
58
|
-
description: description2,
|
|
59
|
-
hasError
|
|
60
|
-
});
|
|
61
|
-
const datasetProps = getDatasetProps(dataset, {
|
|
62
|
-
preplyDsComponent
|
|
63
|
-
});
|
|
64
|
-
if (process.env.NODE_ENV === "development") {
|
|
65
|
-
if (isValidElement(children)) {
|
|
66
|
-
const childProps = children.props;
|
|
67
|
-
if ("id" in childProps) {
|
|
68
|
-
console.error("FormControl: trying to pass id prop to the child component. Pass it to the FormControl instead.");
|
|
69
|
-
}
|
|
70
|
-
if ("required" in childProps) {
|
|
71
|
-
console.error("FormControl: trying to pass required prop to the child component. Pass it to the FormControl instead.");
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
if (!label2) {
|
|
75
|
-
console.error("FormControl: label is required for accessibility reasons. Pass it to the field even if it's visually hidden.");
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return (
|
|
79
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
80
|
-
/* @__PURE__ */ jsxs("div", { className: styles.container, ...datasetProps, onClick, children: [
|
|
81
|
-
/* @__PURE__ */ jsxs("label", { htmlFor: id, className: styles.label, "data-hidden": hideLabel || !label2, "data-testid": "label", children: [
|
|
82
|
-
label2,
|
|
83
|
-
!!useLegacyRequiredLabel && required2 && /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: styles.required, children: [
|
|
84
|
-
" • ",
|
|
85
|
-
/* @__PURE__ */ jsx(FormattedMessage, { id: "preply-ds.fieldLabel.required", defaultMessage: [{
|
|
86
|
-
"type": 0,
|
|
87
|
-
"value": "Required"
|
|
88
|
-
}] })
|
|
89
|
-
] }),
|
|
90
|
-
!useLegacyRequiredLabel && !required2 && /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: styles.required, children: [
|
|
91
|
-
" • ",
|
|
92
|
-
/* @__PURE__ */ jsx(FormattedMessage, { id: "preply-ds.fieldLabel.optional", defaultMessage: [{
|
|
93
|
-
"type": 0,
|
|
94
|
-
"value": "Optional"
|
|
95
|
-
}] })
|
|
96
|
-
] })
|
|
97
|
-
] }),
|
|
98
|
-
/* @__PURE__ */ jsx(Slot.Root, { id, required: required2, ...inputAriaAttributes, children }),
|
|
99
|
-
error2 ? /* @__PURE__ */ jsx("p", { className: styles.error, role: "alert", id: `${id}-error`, "data-testid": "error", children: error2 }) : description2 ? /* @__PURE__ */ jsx("p", { className: styles.description, id: `${id}-description`, "data-testid": "description", children: description2 }) : null
|
|
100
|
-
] })
|
|
101
|
-
);
|
|
102
|
-
};
|
|
103
|
-
export {
|
|
104
|
-
FormControl
|
|
105
|
-
};
|
|
1
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
2
|
+
import { t as FormControl } from "../../FormControl-qnbQL1iF.js";
|
|
3
|
+
export { FormControl };
|
|
@@ -1,78 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
|
-
import { getTextAccentClassnames } from "../../shared-styles/text-accent/text-accent.js";
|
|
6
|
-
import { getTextCenteredClassnames } from "../../shared-styles/text-centered/text-centered.js";
|
|
7
|
-
import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
|
|
8
|
-
import '../../assets/Heading.css';const Heading$1 = "Heading__Lv13n";
|
|
9
|
-
const styles = {
|
|
10
|
-
Heading: Heading$1,
|
|
11
|
-
"Heading--variant-massive": "Heading--variant-massive__xBbvd",
|
|
12
|
-
"Heading--variant-huge": "Heading--variant-huge__uNKwX",
|
|
13
|
-
"Heading--variant-extraLarge": "Heading--variant-extraLarge__O5YaA",
|
|
14
|
-
"Heading--variant-large": "Heading--variant-large__npEGh",
|
|
15
|
-
"Heading--variant-medium": "Heading--variant-medium__WRzNp",
|
|
16
|
-
"Heading--variant-small": "Heading--variant-small__RlTJl",
|
|
17
|
-
"Heading--narrow-l--variant-massive": "Heading--narrow-l--variant-massive__NkQiN",
|
|
18
|
-
"Heading--narrow-l--variant-huge": "Heading--narrow-l--variant-huge__xN-4a",
|
|
19
|
-
"Heading--narrow-l--variant-extraLarge": "Heading--narrow-l--variant-extraLarge__dhHS3",
|
|
20
|
-
"Heading--narrow-l--variant-large": "Heading--narrow-l--variant-large__O-yyq",
|
|
21
|
-
"Heading--narrow-l--variant-medium": "Heading--narrow-l--variant-medium__T3ZkZ",
|
|
22
|
-
"Heading--narrow-l--variant-small": "Heading--narrow-l--variant-small__nibGn",
|
|
23
|
-
"Heading--medium-s--variant-massive": "Heading--medium-s--variant-massive__dkhpb",
|
|
24
|
-
"Heading--medium-s--variant-huge": "Heading--medium-s--variant-huge__Td7XG",
|
|
25
|
-
"Heading--medium-s--variant-extraLarge": "Heading--medium-s--variant-extraLarge__puDN9",
|
|
26
|
-
"Heading--medium-s--variant-large": "Heading--medium-s--variant-large__UQMHF",
|
|
27
|
-
"Heading--medium-s--variant-medium": "Heading--medium-s--variant-medium__i2JwC",
|
|
28
|
-
"Heading--medium-s--variant-small": "Heading--medium-s--variant-small__UQTL9",
|
|
29
|
-
"Heading--medium-l--variant-massive": "Heading--medium-l--variant-massive__UtPA0",
|
|
30
|
-
"Heading--medium-l--variant-huge": "Heading--medium-l--variant-huge__BiY-j",
|
|
31
|
-
"Heading--medium-l--variant-extraLarge": "Heading--medium-l--variant-extraLarge__IP2Vo",
|
|
32
|
-
"Heading--medium-l--variant-large": "Heading--medium-l--variant-large__tV93Y",
|
|
33
|
-
"Heading--medium-l--variant-medium": "Heading--medium-l--variant-medium__945np",
|
|
34
|
-
"Heading--medium-l--variant-small": "Heading--medium-l--variant-small__ZUV1D",
|
|
35
|
-
"Heading--wide-s--variant-massive": "Heading--wide-s--variant-massive__BWmTX",
|
|
36
|
-
"Heading--wide-s--variant-huge": "Heading--wide-s--variant-huge__inkxv",
|
|
37
|
-
"Heading--wide-s--variant-extraLarge": "Heading--wide-s--variant-extraLarge__SQjI9",
|
|
38
|
-
"Heading--wide-s--variant-large": "Heading--wide-s--variant-large__UNDsi",
|
|
39
|
-
"Heading--wide-s--variant-medium": "Heading--wide-s--variant-medium__4OLaD",
|
|
40
|
-
"Heading--wide-s--variant-small": "Heading--wide-s--variant-small__ex4C1",
|
|
41
|
-
"Heading--wide-l--variant-massive": "Heading--wide-l--variant-massive__94l-9",
|
|
42
|
-
"Heading--wide-l--variant-huge": "Heading--wide-l--variant-huge__1qto2",
|
|
43
|
-
"Heading--wide-l--variant-extraLarge": "Heading--wide-l--variant-extraLarge__udFtI",
|
|
44
|
-
"Heading--wide-l--variant-large": "Heading--wide-l--variant-large__Y7k-Q",
|
|
45
|
-
"Heading--wide-l--variant-medium": "Heading--wide-l--variant-medium__xkuYd",
|
|
46
|
-
"Heading--wide-l--variant-small": "Heading--wide-l--variant-small__ORLbL"
|
|
47
|
-
};
|
|
48
|
-
const Heading = forwardRef(function HeadingComponent({
|
|
49
|
-
children,
|
|
50
|
-
variant,
|
|
51
|
-
accent,
|
|
52
|
-
tag,
|
|
53
|
-
centered,
|
|
54
|
-
dataset,
|
|
55
|
-
id,
|
|
56
|
-
className,
|
|
57
|
-
...restPropsPassedByRadixUI
|
|
58
|
-
}, ref) {
|
|
59
|
-
const Tag = tag || "h1";
|
|
60
|
-
const classNames = moduleClassNames(styles, webComponentNames.Heading, stringClassNames("variant", variant));
|
|
61
|
-
const centeredClassNames = getTextCenteredClassnames(centered);
|
|
62
|
-
const useDefaultAccent = !accent;
|
|
63
|
-
const accentClassNames = getTextAccentClassnames(useDefaultAccent, accent);
|
|
64
|
-
const allClassNames = [...classNames, ...centeredClassNames, ...accentClassNames, className];
|
|
65
|
-
const props = {
|
|
66
|
-
...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
|
|
67
|
-
className: allClassNames.join(" "),
|
|
68
|
-
...getDatasetProps(dataset, {
|
|
69
|
-
preplyDsComponent: webComponentNames.Heading
|
|
70
|
-
}),
|
|
71
|
-
id,
|
|
72
|
-
ref
|
|
73
|
-
};
|
|
74
|
-
return /* @__PURE__ */ jsx(Tag, { ...props, children });
|
|
75
|
-
});
|
|
76
|
-
export {
|
|
77
|
-
Heading
|
|
78
|
-
};
|
|
1
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
2
|
+
import { t as Heading } from "../../Heading-DA9gHfsx.js";
|
|
3
|
+
export { Heading };
|
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
|
|
6
|
-
import { renderIcon } from "../../utils/render-icon.js";
|
|
7
|
-
import { getExpColorClassNames } from "../../shared-styles/exp-color/exp-color.js";
|
|
8
|
-
import { ICON_SIZE_DEFAULT } from "@preply/ds-core";
|
|
9
|
-
import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
|
|
10
|
-
import '../../assets/Icon.css';const Icon$1 = "Icon__jDdMD";
|
|
11
|
-
const styles = {
|
|
12
|
-
Icon: Icon$1,
|
|
13
|
-
"Icon--size-16": "Icon--size-16__P1SXI",
|
|
14
|
-
"Icon--size-24": "Icon--size-24__vnVQ0",
|
|
15
|
-
"Icon--size-32": "Icon--size-32__gHIna",
|
|
16
|
-
"Icon--size-48": "Icon--size-48__0PUAE"
|
|
17
|
-
};
|
|
18
|
-
const Icon = forwardRef(function IconComponent({
|
|
19
|
-
svg,
|
|
20
|
-
size = ICON_SIZE_DEFAULT,
|
|
21
|
-
accent,
|
|
22
|
-
expColor,
|
|
23
|
-
label,
|
|
24
|
-
dataset,
|
|
25
|
-
...restPropsPassedByRadixUI
|
|
26
|
-
}, ref) {
|
|
27
|
-
const classNames = moduleClassNames(styles, webComponentNames.Icon, [`size-${size}`]);
|
|
28
|
-
const accentClassNames = getTextAccentClassnames(false, accent);
|
|
29
|
-
const expColorClassNames = accent ? [] : getExpColorClassNames(expColor);
|
|
30
|
-
const allClassNames = [...classNames, ...accentClassNames, ...expColorClassNames];
|
|
31
|
-
const props = {
|
|
32
|
-
...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
|
|
33
|
-
className: allClassNames.join(" "),
|
|
34
|
-
...getDatasetProps(dataset, {
|
|
35
|
-
preplyDsComponent: webComponentNames.Icon
|
|
36
|
-
}),
|
|
37
|
-
ref
|
|
38
|
-
};
|
|
39
|
-
if (!svg) {
|
|
40
|
-
throw new Error("Icon prop svg is mandatory");
|
|
41
|
-
}
|
|
42
|
-
return /* @__PURE__ */ jsx("span", { ...props, role: "img", "aria-hidden": !label, "aria-label": label, children: renderIcon(svg, {
|
|
43
|
-
"aria-hidden": "true",
|
|
44
|
-
focusable: "false"
|
|
45
|
-
}) });
|
|
46
|
-
});
|
|
47
|
-
export {
|
|
48
|
-
Icon
|
|
49
|
-
};
|
|
1
|
+
import { t as Icon } from "../../Icon-CixAeOSd.js";
|
|
2
|
+
import "../../render-icon-Ch3b2dE0.js";
|
|
3
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
4
|
+
export { Icon };
|
|
@@ -8,6 +8,10 @@ export type Props = IconButtonProps & {
|
|
|
8
8
|
svg: SvgComponentOrElement;
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
};
|
|
11
|
-
export declare const IconButton: React.ForwardRefExoticComponent<
|
|
11
|
+
export declare const IconButton: React.ForwardRefExoticComponent<Omit<ButtonBaseProps, "children" | "preplyDsComponent" | "fullWidth" | "wrap" | "isIconButton"> & {
|
|
12
|
+
assistiveText: string;
|
|
13
|
+
svg: SvgComponentOrElement;
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
} & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
12
16
|
export {};
|
|
13
17
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/IconButton/IconButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAc,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAc,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAO/E,KAAK,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,OAAO,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC;AAE/F,MAAM,MAAM,eAAe,GAAG,SAAS,CACnC,eAAe,EACf,WAAW,GAAG,MAAM,GAAG,cAAc,GAAG,UAAU,GAAG,mBAAmB,CAC3E,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,eAAe,GAAG;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,qBAAqB,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/IconButton/IconButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAc,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAc,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAO/E,KAAK,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,OAAO,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC;AAE/F,MAAM,MAAM,eAAe,GAAG,SAAS,CACnC,eAAe,EACf,WAAW,GAAG,MAAM,GAAG,cAAc,GAAG,UAAU,GAAG,mBAAmB,CAC3E,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,eAAe,GAAG;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,qBAAqB,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,UAAU;mBALJ,MAAM;SAChB,qBAAqB;eACf,SAAS;+DAgCvB,CAAC"}
|
|
@@ -1,28 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { renderIcon } from "../../utils/render-icon.js";
|
|
6
|
-
import { ButtonBase } from "../private/ButtonBase/ButtonBase.js";
|
|
7
|
-
import { b as bubbleCounterStyles } from "../../BubbleCounter.module-QMwXWFIS.js";
|
|
8
|
-
import '../../assets/IconButton.css';const IconButton$1 = "IconButton__FZTVy";
|
|
9
|
-
const styles = {
|
|
10
|
-
IconButton: IconButton$1
|
|
11
|
-
};
|
|
12
|
-
const IconButton = forwardRef(function IconButtonComponent({
|
|
13
|
-
variant = BUTTON_VARIANT_DEFAULT,
|
|
14
|
-
size = BUTTON_SIZE_DEFAULT,
|
|
15
|
-
url,
|
|
16
|
-
a11yLabel,
|
|
17
|
-
svg,
|
|
18
|
-
...props
|
|
19
|
-
}, ref) {
|
|
20
|
-
const classNames = [styles.IconButton, bubbleCounterStyles.cutout].join(" ");
|
|
21
|
-
return /* @__PURE__ */ jsx(ButtonBase, { ...props, ref, className: classNames, isIconButton: true, variant, size, url, a11yLabel, preplyDsComponent: webComponentNames.IconButton, children: renderIcon(svg, {
|
|
22
|
-
"aria-hidden": "true",
|
|
23
|
-
focusable: "false"
|
|
24
|
-
}) });
|
|
25
|
-
});
|
|
26
|
-
export {
|
|
27
|
-
IconButton
|
|
28
|
-
};
|
|
1
|
+
import "../../render-icon-Ch3b2dE0.js";
|
|
2
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
3
|
+
import { t as IconButton } from "../../IconButton-BPKpgfep.js";
|
|
4
|
+
export { IconButton };
|
|
@@ -1,69 +1,11 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
import "../../
|
|
11
|
-
|
|
12
|
-
import "../AvatarWithStatus/AvatarWithStatus.js";
|
|
13
|
-
import "../Badge/Badge.js";
|
|
14
|
-
import "../Box/Box.js";
|
|
15
|
-
import "../Button/Button.js";
|
|
16
|
-
import "../CalloutBanner/CalloutBanner.js";
|
|
17
|
-
import "../CalloutBanner/primitives/CalloutBannerDismissButton.js";
|
|
18
|
-
import "../CalloutBanner/primitives/CalloutBannerIcon.js";
|
|
19
|
-
import "../CalloutBanner/primitives/CalloutBannerRoot.js";
|
|
20
|
-
import "../CalloutBanner/primitives/CalloutBannerText.js";
|
|
21
|
-
import "../Checkbox/Checkbox.js";
|
|
22
|
-
import "../Chips/SingleSelectChips.js";
|
|
23
|
-
import "../Chips/MultiSelectChips.js";
|
|
24
|
-
import "../Chips/DismissibleChips.js";
|
|
25
|
-
import "../OnboardingTour/OnboardingTour.js";
|
|
26
|
-
import "@preply/ds-web-root";
|
|
27
|
-
import "../Dialog/primitives/DialogTitle.js";
|
|
28
|
-
import "../Dialog/primitives/DialogDescription.js";
|
|
29
|
-
import "../Dialog/primitives/DialogCloseButton.js";
|
|
30
|
-
import "../Dialog/primitives/DialogButtonStack.js";
|
|
31
|
-
import "../Dialog/DialogSteps.js";
|
|
32
|
-
import "../DropdownMenu/DropdownMenu.js";
|
|
33
|
-
import "../FieldButton/FieldButton.js";
|
|
34
|
-
import "../CountryFlag/CountryFlag.js";
|
|
35
|
-
import "radix-ui";
|
|
36
|
-
import "react-intl";
|
|
37
|
-
import "../Heading/Heading.js";
|
|
38
|
-
import "../Icon/Icon.js";
|
|
39
|
-
import "../IconButton/IconButton.js";
|
|
40
|
-
import "../LayoutFlex/LayoutFlex.js";
|
|
41
|
-
import "../LayoutFlexItem/LayoutFlexItem.js";
|
|
42
|
-
import "../LayoutGrid/LayoutGrid.js";
|
|
43
|
-
import "../LayoutGridItem/LayoutGridItem.js";
|
|
44
|
-
import "../Link/Link.js";
|
|
45
|
-
import "../Loader/Loader.js";
|
|
46
|
-
import "../NumberField/NumberField.js";
|
|
47
|
-
import "@preply/ds-core";
|
|
48
|
-
import "../OnboardingTooltip/OnboardingTooltip.js";
|
|
49
|
-
import "../PasswordField/PasswordField.js";
|
|
50
|
-
import "../PreplyLogo/PreplyLogo.js";
|
|
51
|
-
import "@preply/ds-media-icons/dist/24/TokyoUIStar.svg";
|
|
52
|
-
import "@preply/ds-media-icons/dist/24/TokyoUIStarFilled.svg";
|
|
53
|
-
import "../../utils/render-icon.js";
|
|
54
|
-
import "../Rating/RatingInput.js";
|
|
55
|
-
import "../SelectField/SelectField.js";
|
|
56
|
-
import "../../Slider-DB4Maswa.js";
|
|
57
|
-
import "../Slider/RangeSlider.js";
|
|
58
|
-
import "../Steps/Steps.js";
|
|
59
|
-
import "../Switch/Switch.js";
|
|
60
|
-
import "../Text/Text.js";
|
|
61
|
-
import "../TextareaField/TextareaField.js";
|
|
62
|
-
import "../TextField/TextField.js";
|
|
63
|
-
import "../TextHighlighted/TextHighlighted.js";
|
|
64
|
-
import "../TextInline/TextInline.js";
|
|
65
|
-
import "../Toast/Toast.js";
|
|
66
|
-
import "../Tooltip/Tooltip.js";
|
|
67
|
-
export {
|
|
68
|
-
I as IconTile
|
|
69
|
-
};
|
|
1
|
+
import "../../render-icon-Ch3b2dE0.js";
|
|
2
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
3
|
+
import "../../store-sN_eYeZT.js";
|
|
4
|
+
import "../../DialogCloseButton-DjDd9Mid.js";
|
|
5
|
+
import { n as IconTile } from "../../components-BIYP8wHJ.js";
|
|
6
|
+
import "../../useBreakpointMatch-D9a3CTNK.js";
|
|
7
|
+
import "../../PasswordField-Bx5YG62t.js";
|
|
8
|
+
import "../../TokyoUIChevronDown-DGcVqR1z.js";
|
|
9
|
+
import "../../Select-Bo7PX_8V.js";
|
|
10
|
+
import "../../Toast-wJAjSLfo.js";
|
|
11
|
+
export { IconTile };
|