@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,66 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { Tooltip as Tooltip$1, Slot } from "radix-ui";
|
|
5
|
-
import { usePortalElement } from "@preply/ds-web-root";
|
|
6
|
-
import { getDatasetProps } from "@preply/ds-web-core";
|
|
7
|
-
import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
|
|
8
|
-
import '../../assets/Tooltip.css';const content = "content__ZZg4T";
|
|
9
|
-
const arrow = "arrow__IVeyw";
|
|
10
|
-
const styles = {
|
|
11
|
-
content,
|
|
12
|
-
arrow
|
|
13
|
-
};
|
|
14
|
-
const LONG_PRESS_DELAY = 300;
|
|
15
|
-
const Tooltip = forwardRef(function Tooltip2({
|
|
16
|
-
children,
|
|
17
|
-
content: content2,
|
|
18
|
-
side = "top",
|
|
19
|
-
trigger = "hover",
|
|
20
|
-
disabled = false,
|
|
21
|
-
dataset,
|
|
22
|
-
dsInternalSimulation,
|
|
23
|
-
...restProps
|
|
24
|
-
}, ref) {
|
|
25
|
-
const portalElement = usePortalElement();
|
|
26
|
-
const touchStartTimeRef = useRef(0);
|
|
27
|
-
const [touchOpen, setTouchOpen] = useState(false);
|
|
28
|
-
const handleTouchStart = () => {
|
|
29
|
-
if (trigger === "hover") return;
|
|
30
|
-
touchStartTimeRef.current = Date.now();
|
|
31
|
-
setTouchOpen(true);
|
|
32
|
-
};
|
|
33
|
-
const handleTouchEnd = () => {
|
|
34
|
-
if (trigger === "hover") return;
|
|
35
|
-
const isLongPress = Date.now() - touchStartTimeRef.current > LONG_PRESS_DELAY;
|
|
36
|
-
if (isLongPress) {
|
|
37
|
-
setTouchOpen(false);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
if (disabled) {
|
|
41
|
-
return children;
|
|
42
|
-
}
|
|
43
|
-
let open;
|
|
44
|
-
if (dsInternalSimulation === "open") {
|
|
45
|
-
open = true;
|
|
46
|
-
} else if (trigger === "hover") {
|
|
47
|
-
open = void 0;
|
|
48
|
-
} else {
|
|
49
|
-
open = touchOpen || void 0;
|
|
50
|
-
}
|
|
51
|
-
const openProps = open === void 0 ? {} : {
|
|
52
|
-
open
|
|
53
|
-
};
|
|
54
|
-
return /* @__PURE__ */ jsxs(Tooltip$1.Root, { ...openProps, delayDuration: 300, children: [
|
|
55
|
-
/* @__PURE__ */ jsx(Slot.Root, { ref, ...restProps, children: /* @__PURE__ */ jsx(Tooltip$1.Trigger, { onTouchStart: handleTouchStart, onTouchEnd: handleTouchEnd, tabIndex: 0, asChild: true, children }) }),
|
|
56
|
-
/* @__PURE__ */ jsx(Tooltip$1.Portal, { container: portalElement, children: /* @__PURE__ */ jsxs(Tooltip$1.Content, { side, className: styles.content, onPointerDownOutside: () => setTouchOpen(false), ...getDatasetProps(dataset, {
|
|
57
|
-
preplyDsComponent: webComponentNames.Tooltip
|
|
58
|
-
}), children: [
|
|
59
|
-
content2,
|
|
60
|
-
/* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: styles.arrow, width: 10, height: 6 })
|
|
61
|
-
] }) })
|
|
62
|
-
] });
|
|
63
|
-
});
|
|
64
|
-
export {
|
|
65
|
-
Tooltip
|
|
66
|
-
};
|
|
1
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
2
|
+
import { t as Tooltip } from "../../Tooltip-grvKQxTN.js";
|
|
3
|
+
export { Tooltip };
|
|
@@ -1,76 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import { forwardRef } from "react";
|
|
7
|
-
import { Icon } from "../../Icon/Icon.js";
|
|
8
|
-
import { filterAttributesPassedByRadixUIAtRuntime } from "../../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
|
|
9
|
-
import { useIntl } from "react-intl";
|
|
10
|
-
import { genericAriaLabels } from "../../../utils/shared-strings.js";
|
|
11
|
-
import '../../../assets/Chips.css';const chips = "chips__0cCVU";
|
|
12
|
-
const chip = "chip__t4Yxh";
|
|
13
|
-
const styles = {
|
|
14
|
-
chips,
|
|
15
|
-
chip,
|
|
16
|
-
"chip-toggle": "chip-toggle__Q6Xqq",
|
|
17
|
-
"chip-remove": "chip-remove__uHsIL"
|
|
18
|
-
};
|
|
19
|
-
const SvgClose = ({
|
|
20
|
-
title,
|
|
21
|
-
titleId,
|
|
22
|
-
...props
|
|
23
|
-
}, ref) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ref, "aria-labelledby": titleId, ...props }, title ? /* @__PURE__ */ React.createElement("title", { id: titleId }, title) : null, /* @__PURE__ */ React.createElement("path", { fillRule: "evenodd", d: "M7.207 5.793a1 1 0 0 0-1.414 1.414L10.586 12l-4.793 4.793a1 1 0 1 0 1.414 1.414L12 13.414l4.793 4.793a1 1 0 0 0 1.414-1.414L13.414 12l4.793-4.793a1 1 0 0 0-1.414-1.414L12 10.586 7.207 5.793Z", clipRule: "evenodd" }));
|
|
24
|
-
const ForwardRef = forwardRef(SvgClose);
|
|
25
|
-
const Chips = ({
|
|
26
|
-
variant = "choice",
|
|
27
|
-
children,
|
|
28
|
-
"aria-label": ariaLabel,
|
|
29
|
-
dataset
|
|
30
|
-
}) => {
|
|
31
|
-
const dataAttributes = {
|
|
32
|
-
...dataset,
|
|
33
|
-
variant
|
|
34
|
-
};
|
|
35
|
-
return /* @__PURE__ */ jsx("ul", { "aria-label": ariaLabel, className: styles.chips, ...getDatasetProps(dataAttributes, {
|
|
36
|
-
preplyDsComponent: webComponentNames.Chips
|
|
37
|
-
}), children });
|
|
38
|
-
};
|
|
39
|
-
Chips.Item = forwardRef(function ChipsItem({
|
|
40
|
-
label,
|
|
41
|
-
leadingSvgIcon,
|
|
42
|
-
pressed,
|
|
43
|
-
onToggle,
|
|
44
|
-
onRemove,
|
|
45
|
-
"aria-controls": ariaControls,
|
|
46
|
-
dataset,
|
|
47
|
-
...restPropsPassedByRadixUI
|
|
48
|
-
}, ref) {
|
|
49
|
-
const {
|
|
50
|
-
formatMessage
|
|
51
|
-
} = useIntl();
|
|
52
|
-
const toggle = () => onToggle == null ? void 0 : onToggle(!pressed);
|
|
53
|
-
const remove = onRemove != null ? onRemove : toggle;
|
|
54
|
-
return /* @__PURE__ */ jsxs("li", { ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI), ref, className: styles.chip, ...getDatasetProps(dataset, {
|
|
55
|
-
preplyDsComponent: webComponentNames.Chip
|
|
56
|
-
}), children: [
|
|
57
|
-
/* @__PURE__ */ jsxs("button", { type: "button", className: styles["chip-toggle"], "aria-pressed": pressed, "aria-controls": ariaControls, onClick: toggle, onKeyUp: (e) => {
|
|
58
|
-
switch (e.key) {
|
|
59
|
-
case "Backspace":
|
|
60
|
-
case "Delete":
|
|
61
|
-
if (!pressed) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
toggle();
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
}, children: [
|
|
68
|
-
leadingSvgIcon && /* @__PURE__ */ jsx(Icon, { size: "24", svg: leadingSvgIcon }),
|
|
69
|
-
label
|
|
70
|
-
] }),
|
|
71
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: styles["chip-remove"], onClick: remove, "aria-label": formatMessage(genericAriaLabels.remove), "aria-controls": ariaControls, children: /* @__PURE__ */ jsx(Icon, { size: "24", svg: ForwardRef }) })
|
|
72
|
-
] });
|
|
73
|
-
});
|
|
74
|
-
export {
|
|
75
|
-
Chips
|
|
76
|
-
};
|
|
1
|
+
import "../../../render-icon-Ch3b2dE0.js";
|
|
2
|
+
import "../../../jsx-runtime-i4KUlhDu.js";
|
|
3
|
+
import { t as Chips } from "../../../Chips-BRGw7Uup.js";
|
|
4
|
+
export { Chips };
|
|
@@ -1,36 +1,44 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { t as Icon } from "../../../Icon-CixAeOSd.js";
|
|
3
|
+
import "../../../render-icon-Ch3b2dE0.js";
|
|
4
|
+
import { t as require_jsx_runtime } from "../../../jsx-runtime-i4KUlhDu.js";
|
|
5
|
+
import { n as Input_module_default, t as InputContainer } from "../../../InputContainer-CzzuOe_p.js";
|
|
6
|
+
import { t as ForwardRef } from "../../../TokyoUIChevronDown-DGcVqR1z.js";
|
|
3
7
|
import { forwardRef, useState } from "react";
|
|
4
8
|
import { getDatasetProps } from "@preply/ds-web-core";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
9
|
+
//#region src/components/deprecated/NativeSelectField/NativeSelect.tsx
|
|
10
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
11
|
+
/**
|
|
12
|
+
* A component to render a select with optional icon.
|
|
13
|
+
* For internal use only.
|
|
14
|
+
*/
|
|
15
|
+
var NativeSelect = forwardRef(function NativeSelectComponent({ dataset, onChange, onValueChange, icon, children, placeholder, ...props }, ref) {
|
|
16
|
+
const [isEmpty, setIsEmpty] = useState(!props.value && !props.defaultValue);
|
|
17
|
+
const datasetProps = getDatasetProps(dataset);
|
|
18
|
+
const valueProps = props.value === void 0 ? { defaultValue: props.defaultValue || "" } : { value: props.value };
|
|
19
|
+
const handleChange = (e) => {
|
|
20
|
+
onChange === null || onChange === void 0 || onChange(e);
|
|
21
|
+
onValueChange === null || onValueChange === void 0 || onValueChange(e.target.value);
|
|
22
|
+
setIsEmpty(!e.target.value);
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputContainer, {
|
|
25
|
+
icon,
|
|
26
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { svg: ForwardRef }),
|
|
27
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("select", {
|
|
28
|
+
...datasetProps,
|
|
29
|
+
...props,
|
|
30
|
+
...valueProps,
|
|
31
|
+
onChange: handleChange,
|
|
32
|
+
ref,
|
|
33
|
+
className: Input_module_default.input,
|
|
34
|
+
"data-empty": isEmpty,
|
|
35
|
+
children: [typeof placeholder === "string" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
|
|
36
|
+
value: "",
|
|
37
|
+
disabled: props.required,
|
|
38
|
+
children: placeholder
|
|
39
|
+
}), children]
|
|
40
|
+
})
|
|
41
|
+
});
|
|
33
42
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { NativeSelect };
|
|
@@ -1,41 +1,42 @@
|
|
|
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 { t as FormControl } from "../../../FormControl-qnbQL1iF.js";
|
|
5
|
+
import "../../../TokyoUIChevronDown-DGcVqR1z.js";
|
|
6
|
+
import { NativeSelect } from "./NativeSelect.js";
|
|
3
7
|
import { forwardRef } from "react";
|
|
4
8
|
import { getDatasetProps } from "@preply/ds-web-core";
|
|
5
9
|
import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, ref) {
|
|
29
|
-
return /* @__PURE__ */ jsx(FormControl, { id, label, description, error, hasError, required, dataset, hideLabel, onClick, useLegacyRequiredLabel, preplyDsComponent: webComponentNames.SelectField, children: /* @__PURE__ */ jsx(NativeSelect, { ...props, ref, dataset: inputDataset, children }) });
|
|
10
|
+
//#region src/components/deprecated/NativeSelectField/NativeSelectField.tsx
|
|
11
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
12
|
+
var NativeSelectFieldLocal = forwardRef(function NativeSelectField({ id, label, description, error, required, inputDataset, dataset, hideLabel, onClick, children, hasError, useLegacyRequiredLabel, className, style, ...props }, ref) {
|
|
13
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormControl, {
|
|
14
|
+
id,
|
|
15
|
+
label,
|
|
16
|
+
description,
|
|
17
|
+
error,
|
|
18
|
+
hasError,
|
|
19
|
+
required,
|
|
20
|
+
dataset,
|
|
21
|
+
hideLabel,
|
|
22
|
+
onClick,
|
|
23
|
+
useLegacyRequiredLabel,
|
|
24
|
+
preplyDsComponent: webComponentNames.SelectField,
|
|
25
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeSelect, {
|
|
26
|
+
...props,
|
|
27
|
+
ref,
|
|
28
|
+
dataset: inputDataset,
|
|
29
|
+
children
|
|
30
|
+
})
|
|
31
|
+
});
|
|
30
32
|
});
|
|
31
33
|
NativeSelectFieldLocal.Option = NativeSelectFieldOption;
|
|
32
|
-
|
|
34
|
+
var NativeSelectField = NativeSelectFieldLocal;
|
|
33
35
|
function NativeSelectFieldOption(props) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
|
|
37
|
+
...props,
|
|
38
|
+
...getDatasetProps(void 0, { preplyDsComponent: webComponentNames.SelectFieldOption })
|
|
39
|
+
});
|
|
37
40
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
NativeSelectFieldOption
|
|
41
|
-
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { NativeSelectField, NativeSelectFieldOption };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../../render-icon-Ch3b2dE0.js";
|
|
2
|
+
import "../../jsx-runtime-i4KUlhDu.js";
|
|
3
|
+
import "../../TokyoUIChevronDown-DGcVqR1z.js";
|
|
4
|
+
import { t as Chips } from "../../Chips-BRGw7Uup.js";
|
|
2
5
|
import { NativeSelectField, NativeSelectFieldOption } from "./NativeSelectField/NativeSelectField.js";
|
|
3
|
-
export {
|
|
4
|
-
Chips,
|
|
5
|
-
NativeSelectField,
|
|
6
|
-
NativeSelectFieldOption
|
|
7
|
-
};
|
|
6
|
+
export { Chips, NativeSelectField, NativeSelectFieldOption };
|
package/dist/components/index.js
CHANGED
|
@@ -1,178 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { t as Icon } from "../Icon-CixAeOSd.js";
|
|
2
|
+
import "../render-icon-Ch3b2dE0.js";
|
|
3
|
+
import "../jsx-runtime-i4KUlhDu.js";
|
|
4
|
+
import { t as Text } from "../Text-CaOF75Z-.js";
|
|
5
|
+
import { i as AccordionItem, n as AccordionContent, r as AccordionHeader, t as Accordion } from "../Accordion-B0hR-tcI.js";
|
|
6
|
+
import { t as AlertDialog } from "../AlertDialog-BG-diKBi.js";
|
|
7
|
+
import "../store-sN_eYeZT.js";
|
|
8
|
+
import { t as DialogRoot } from "../DialogRoot-B67oJduC.js";
|
|
9
|
+
import { t as DialogCloseButton } from "../DialogCloseButton-DjDd9Mid.js";
|
|
10
|
+
import { t as DialogDescription } from "../DialogDescription-8zw9t6pm.js";
|
|
11
|
+
import { t as DialogTitle } from "../DialogTitle-C2Nn2ys-.js";
|
|
12
|
+
import { t as Heading } from "../Heading-DA9gHfsx.js";
|
|
13
|
+
import { t as Button } from "../Button-C35BZJZT.js";
|
|
14
|
+
import { t as AlertBannerProvider } from "../AlertBannerProvider-Cf7w9AOq.js";
|
|
7
15
|
import { AlertBannerRoot } from "./AlertBanner/primitives/AlertBannerRoot.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
16
|
+
import { AlertBannerCriticalIcon, AlertBannerIcon, AlertBannerPositiveIcon, AlertBannerWarningIcon } from "./AlertBanner/primitives/AlertBannerIcon.js";
|
|
17
|
+
import { a as AlertBannerText, i as AlertBannerAction, n as IconTile, r as AlertBanner, t as usePortalElement } from "../components-BIYP8wHJ.js";
|
|
18
|
+
import { t as Avatar } from "../Avatar-B-JdqVyg.js";
|
|
19
|
+
import { t as AvatarWithStatus } from "../AvatarWithStatus-CD9jEqEB.js";
|
|
20
|
+
import { t as Badge } from "../Badge-Dd-CLBoW.js";
|
|
21
|
+
import { t as Box } from "../Box-BJBE9KNm.js";
|
|
12
22
|
import { BubbleCounter } from "./BubbleCounter/BubbleCounter.js";
|
|
13
|
-
import {
|
|
23
|
+
import { CalloutBannerRoot } from "./CalloutBanner/primitives/CalloutBannerRoot.js";
|
|
14
24
|
import { CalloutBanner } from "./CalloutBanner/CalloutBanner.js";
|
|
25
|
+
import { t as IconButton } from "../IconButton-BPKpgfep.js";
|
|
15
26
|
import { CalloutBannerDismissButton } from "./CalloutBanner/primitives/CalloutBannerDismissButton.js";
|
|
16
27
|
import { CalloutBannerCriticalIcon, CalloutBannerIcon, CalloutBannerInfoIcon, CalloutBannerPositiveIcon, CalloutBannerWarningIcon } from "./CalloutBanner/primitives/CalloutBannerIcon.js";
|
|
17
|
-
import { CalloutBannerRoot } from "./CalloutBanner/primitives/CalloutBannerRoot.js";
|
|
18
28
|
import { CalloutBannerText } from "./CalloutBanner/primitives/CalloutBannerText.js";
|
|
19
|
-
import { Checkbox } from "
|
|
29
|
+
import { t as Checkbox } from "../Checkbox-CtolNbxI.js";
|
|
30
|
+
import { t as CountryFlag } from "../CountryFlag-DVDKHmQH.js";
|
|
20
31
|
import { SingleSelectChips, SingleSelectChipsItem } from "./Chips/SingleSelectChips.js";
|
|
21
32
|
import { MultiSelectChips, MultiSelectChipsItem } from "./Chips/MultiSelectChips.js";
|
|
22
33
|
import { DismissibleChips, DismissibleChipsItem } from "./Chips/DismissibleChips.js";
|
|
23
|
-
import {
|
|
34
|
+
import { n as OnboardingTooltip } from "../OnboardingTooltip-B47_Yrsj.js";
|
|
35
|
+
import { t as createOnboardingTour } from "../OnboardingTour-DUUoI5WE.js";
|
|
24
36
|
import { Dialog } from "./Dialog/Dialog.js";
|
|
25
|
-
import { DialogRoot } from "./Dialog/primitives/DialogRoot.js";
|
|
26
|
-
import { DialogCloseButton } from "./Dialog/primitives/DialogCloseButton.js";
|
|
27
37
|
import { DialogFooter } from "./Dialog/primitives/DialogFooter.js";
|
|
28
|
-
import
|
|
29
|
-
import { DialogDescription } from "./Dialog/primitives/DialogDescription.js";
|
|
30
|
-
import { DialogActions } from "./Dialog/primitives/DialogActions.js";
|
|
38
|
+
import "../useBreakpointMatch-D9a3CTNK.js";
|
|
31
39
|
import { DialogButtonStack } from "./Dialog/primitives/DialogButtonStack.js";
|
|
40
|
+
import { DialogActions } from "./Dialog/primitives/DialogActions.js";
|
|
41
|
+
import { t as Steps } from "../Steps-DbN5vFrP.js";
|
|
42
|
+
import { t as ProgressSteps } from "../ProgressSteps-BSqopxqv.js";
|
|
32
43
|
import { DialogStep, DialogSteps, DialogStepsActions, DialogStepsNext, DialogStepsPrevious } from "./Dialog/DialogSteps.js";
|
|
33
|
-
import { Divider } from "
|
|
44
|
+
import { t as Divider } from "../Divider-DvwDWB9_.js";
|
|
34
45
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSelect, DropdownMenuSelectOption, DropdownSubmenu } from "./DropdownMenu/DropdownMenu.js";
|
|
35
|
-
import { FieldButton } from "
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import { Icon } from "./Icon/Icon.js";
|
|
40
|
-
import { IconButton } from "./IconButton/IconButton.js";
|
|
41
|
-
import { LayoutFlex } from "./LayoutFlex/LayoutFlex.js";
|
|
42
|
-
import { LayoutFlexItem } from "./LayoutFlexItem/LayoutFlexItem.js";
|
|
46
|
+
import { t as FieldButton } from "../FieldButton-B2slox8P.js";
|
|
47
|
+
import { t as FormControl } from "../FormControl-qnbQL1iF.js";
|
|
48
|
+
import { t as LayoutFlex } from "../LayoutFlex-e9auDvWD.js";
|
|
49
|
+
import { t as LayoutFlexItem } from "../LayoutFlexItem-D9ziMmHe.js";
|
|
43
50
|
import { LayoutGrid } from "./LayoutGrid/LayoutGrid.js";
|
|
44
|
-
import { LayoutGridItem } from "
|
|
45
|
-
import { Link } from "
|
|
46
|
-
import { Loader } from "
|
|
51
|
+
import { t as LayoutGridItem } from "../LayoutGridItem-Q8Lnvrri.js";
|
|
52
|
+
import { t as Link } from "../Link-CdoJVeER.js";
|
|
53
|
+
import { t as Loader } from "../Loader-BMOxdJce.js";
|
|
47
54
|
import { NumberField } from "./NumberField/NumberField.js";
|
|
48
55
|
import { ObserveIntersection } from "./ObserveIntersection/ObserveIntersection.js";
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import { ProgressBar } from "./ProgressBar/ProgressBar.js";
|
|
53
|
-
import { ProgressSteps } from "./ProgressSteps/ProgressSteps.js";
|
|
56
|
+
import { t as PasswordField } from "../PasswordField-Bx5YG62t.js";
|
|
57
|
+
import { t as PreplyLogo } from "../PreplyLogo-abgOre30.js";
|
|
58
|
+
import { t as ProgressBar } from "../ProgressBar-CEU4GyHn.js";
|
|
54
59
|
import { Rating } from "./Rating/Rating.js";
|
|
55
60
|
import { RatingInput } from "./Rating/RatingInput.js";
|
|
61
|
+
import "../TokyoUIChevronDown-DGcVqR1z.js";
|
|
62
|
+
import "../Select-Bo7PX_8V.js";
|
|
56
63
|
import { SelectField, SelectFieldGroup, SelectFieldOption } from "./SelectField/SelectField.js";
|
|
57
64
|
import { ShowOnIntersection } from "./ShowOnIntersection/ShowOnIntersection.js";
|
|
58
|
-
import {
|
|
65
|
+
import { t as Slider } from "../Slider-Crg4DEn_.js";
|
|
59
66
|
import { RangeSlider } from "./Slider/RangeSlider.js";
|
|
60
|
-
import {
|
|
61
|
-
import { Switch } from "./Switch/Switch.js";
|
|
62
|
-
import { Text } from "./Text/Text.js";
|
|
67
|
+
import { t as Switch } from "../Switch-Ck_xB0ID.js";
|
|
63
68
|
import { TextareaField } from "./TextareaField/TextareaField.js";
|
|
64
69
|
import { TextField } from "./TextField/TextField.js";
|
|
65
|
-
import { TextHighlighted } from "
|
|
66
|
-
import { TextInline } from "
|
|
67
|
-
import { ToastProvider, showToast } from "
|
|
68
|
-
import { Tooltip } from "
|
|
70
|
+
import { t as TextHighlighted } from "../TextHighlighted-Dwq9Clgn.js";
|
|
71
|
+
import { t as TextInline } from "../TextInline-BcA4H2Tk.js";
|
|
72
|
+
import { n as ToastProvider, r as showToast } from "../Toast-wJAjSLfo.js";
|
|
73
|
+
import { t as Tooltip } from "../Tooltip-grvKQxTN.js";
|
|
69
74
|
import { IntlFormattedAggregatedDateTime } from "./IntlFormatted/IntlFormattedAggregatedDateTime.js";
|
|
70
75
|
import { IntlFormattedCurrency } from "./IntlFormatted/IntlFormattedCurrency.js";
|
|
71
76
|
import { IntlFormattedDate } from "./IntlFormatted/IntlFormattedDate.js";
|
|
72
77
|
import { IntlFormattedTime } from "./IntlFormatted/IntlFormattedTime.js";
|
|
73
|
-
|
|
74
|
-
export {
|
|
75
|
-
Accordion,
|
|
76
|
-
AccordionContent,
|
|
77
|
-
AccordionHeader,
|
|
78
|
-
AccordionItem,
|
|
79
|
-
AlertBanner,
|
|
80
|
-
A2 as AlertBannerAction,
|
|
81
|
-
AlertBannerCriticalIcon,
|
|
82
|
-
AlertBannerIcon,
|
|
83
|
-
AlertBannerPositiveIcon,
|
|
84
|
-
A as AlertBannerProvider,
|
|
85
|
-
AlertBannerRoot,
|
|
86
|
-
a as AlertBannerText,
|
|
87
|
-
AlertBannerWarningIcon,
|
|
88
|
-
AlertDialog,
|
|
89
|
-
Avatar,
|
|
90
|
-
AvatarWithStatus,
|
|
91
|
-
Badge,
|
|
92
|
-
Box,
|
|
93
|
-
BubbleCounter,
|
|
94
|
-
Button,
|
|
95
|
-
CalloutBanner,
|
|
96
|
-
CalloutBannerCriticalIcon,
|
|
97
|
-
CalloutBannerDismissButton,
|
|
98
|
-
CalloutBannerIcon,
|
|
99
|
-
CalloutBannerInfoIcon,
|
|
100
|
-
CalloutBannerPositiveIcon,
|
|
101
|
-
CalloutBannerRoot,
|
|
102
|
-
CalloutBannerText,
|
|
103
|
-
CalloutBannerWarningIcon,
|
|
104
|
-
Checkbox,
|
|
105
|
-
CountryFlag,
|
|
106
|
-
Dialog,
|
|
107
|
-
DialogActions,
|
|
108
|
-
DialogButtonStack,
|
|
109
|
-
DialogCloseButton,
|
|
110
|
-
DialogDescription,
|
|
111
|
-
DialogFooter,
|
|
112
|
-
DialogRoot,
|
|
113
|
-
DialogStep,
|
|
114
|
-
DialogSteps,
|
|
115
|
-
DialogStepsActions,
|
|
116
|
-
DialogStepsNext,
|
|
117
|
-
DialogStepsPrevious,
|
|
118
|
-
DialogTitle,
|
|
119
|
-
DismissibleChips,
|
|
120
|
-
DismissibleChipsItem,
|
|
121
|
-
Divider,
|
|
122
|
-
DropdownMenu,
|
|
123
|
-
DropdownMenuCheckboxItem,
|
|
124
|
-
DropdownMenuGroup,
|
|
125
|
-
DropdownMenuItem,
|
|
126
|
-
DropdownMenuRadioGroup,
|
|
127
|
-
DropdownMenuRadioItem,
|
|
128
|
-
DropdownMenuSelect,
|
|
129
|
-
DropdownMenuSelectOption,
|
|
130
|
-
DropdownSubmenu,
|
|
131
|
-
FieldButton,
|
|
132
|
-
FormControl,
|
|
133
|
-
Heading,
|
|
134
|
-
Icon,
|
|
135
|
-
IconButton,
|
|
136
|
-
I as IconTile,
|
|
137
|
-
IntlFormattedAggregatedDateTime,
|
|
138
|
-
IntlFormattedCurrency,
|
|
139
|
-
IntlFormattedDate,
|
|
140
|
-
IntlFormattedTime,
|
|
141
|
-
LayoutFlex,
|
|
142
|
-
LayoutFlexItem,
|
|
143
|
-
LayoutGrid,
|
|
144
|
-
LayoutGridItem,
|
|
145
|
-
Link,
|
|
146
|
-
Loader,
|
|
147
|
-
MultiSelectChips,
|
|
148
|
-
MultiSelectChipsItem,
|
|
149
|
-
NumberField,
|
|
150
|
-
ObserveIntersection,
|
|
151
|
-
OnboardingTooltip,
|
|
152
|
-
PasswordField,
|
|
153
|
-
PreplyLogo,
|
|
154
|
-
ProgressBar,
|
|
155
|
-
ProgressSteps,
|
|
156
|
-
RangeSlider,
|
|
157
|
-
Rating,
|
|
158
|
-
RatingInput,
|
|
159
|
-
SelectField,
|
|
160
|
-
SelectFieldGroup,
|
|
161
|
-
SelectFieldOption,
|
|
162
|
-
ShowOnIntersection,
|
|
163
|
-
SingleSelectChips,
|
|
164
|
-
SingleSelectChipsItem,
|
|
165
|
-
S as Slider,
|
|
166
|
-
Steps,
|
|
167
|
-
Switch,
|
|
168
|
-
Text,
|
|
169
|
-
TextField,
|
|
170
|
-
TextHighlighted,
|
|
171
|
-
TextInline,
|
|
172
|
-
TextareaField,
|
|
173
|
-
ToastProvider,
|
|
174
|
-
Tooltip,
|
|
175
|
-
createOnboardingTour,
|
|
176
|
-
showToast,
|
|
177
|
-
usePortalElement
|
|
178
|
-
};
|
|
78
|
+
export { Accordion, AccordionContent, AccordionHeader, AccordionItem, AlertBanner, AlertBannerAction, AlertBannerCriticalIcon, AlertBannerIcon, AlertBannerPositiveIcon, AlertBannerProvider, AlertBannerRoot, AlertBannerText, AlertBannerWarningIcon, AlertDialog, Avatar, AvatarWithStatus, Badge, Box, BubbleCounter, Button, CalloutBanner, CalloutBannerCriticalIcon, CalloutBannerDismissButton, CalloutBannerIcon, CalloutBannerInfoIcon, CalloutBannerPositiveIcon, CalloutBannerRoot, CalloutBannerText, CalloutBannerWarningIcon, Checkbox, CountryFlag, Dialog, DialogActions, DialogButtonStack, DialogCloseButton, DialogDescription, DialogFooter, DialogRoot, DialogStep, DialogSteps, DialogStepsActions, DialogStepsNext, DialogStepsPrevious, DialogTitle, DismissibleChips, DismissibleChipsItem, Divider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSelect, DropdownMenuSelectOption, DropdownSubmenu, FieldButton, FormControl, Heading, Icon, IconButton, IconTile, IntlFormattedAggregatedDateTime, IntlFormattedCurrency, IntlFormattedDate, IntlFormattedTime, LayoutFlex, LayoutFlexItem, LayoutGrid, LayoutGridItem, Link, Loader, MultiSelectChips, MultiSelectChipsItem, NumberField, ObserveIntersection, OnboardingTooltip, PasswordField, PreplyLogo, ProgressBar, ProgressSteps, RangeSlider, Rating, RatingInput, SelectField, SelectFieldGroup, SelectFieldOption, ShowOnIntersection, SingleSelectChips, SingleSelectChipsItem, Slider, Steps, Switch, Text, TextField, TextHighlighted, TextInline, TextareaField, ToastProvider, Tooltip, createOnboardingTour, showToast, usePortalElement };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonSize, ButtonVariant, Dataset, Responsive } from '@preply/ds-core';
|
|
2
2
|
import { default as React, KeyboardEventHandler, MouseEventHandler, ReactElement, ReactNode } from 'react';
|
|
3
|
-
type
|
|
3
|
+
export type ButtonBaseProps = {
|
|
4
4
|
id?: string;
|
|
5
5
|
variant?: ButtonVariant;
|
|
6
6
|
size?: Responsive<ButtonSize>;
|
|
@@ -26,6 +26,10 @@ type ButtonBaseCommonProps = {
|
|
|
26
26
|
* Replaces the content with a loading indicator.
|
|
27
27
|
*/
|
|
28
28
|
busy?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Used only for classroom and ghost variants
|
|
31
|
+
* */
|
|
32
|
+
selected?: boolean;
|
|
29
33
|
isIconButton: boolean;
|
|
30
34
|
/**
|
|
31
35
|
* Custom element to render the button.
|
|
@@ -60,15 +64,7 @@ type ButtonBaseCommonProps = {
|
|
|
60
64
|
*/
|
|
61
65
|
preplyDsComponent: string;
|
|
62
66
|
};
|
|
63
|
-
export
|
|
64
|
-
export type ButtonBaseSelectableProps = ButtonBaseCommonProps & {
|
|
65
|
-
variant: ButtonSelectableVariant;
|
|
66
|
-
isIconButton: true;
|
|
67
|
-
selected?: boolean;
|
|
68
|
-
};
|
|
69
|
-
export type ButtonBaseProps = ButtonBaseCommonProps | ButtonBaseSelectableProps;
|
|
70
|
-
export declare const ButtonBase: React.ForwardRefExoticComponent<(ButtonBaseProps & {
|
|
67
|
+
export declare const ButtonBase: React.ForwardRefExoticComponent<ButtonBaseProps & {
|
|
71
68
|
className?: string | undefined;
|
|
72
|
-
}
|
|
73
|
-
export {};
|
|
69
|
+
} & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
74
70
|
//# sourceMappingURL=ButtonBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../../../src/components/private/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAYtF,OAAO,KAAK,EAAE,EAGV,oBAAoB,EAEpB,iBAAiB,EACjB,YAAY,EACZ,SAAS,EAIZ,MAAM,OAAO,CAAC;AAUf,
|
|
1
|
+
{"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../../../src/components/private/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAYtF,OAAO,KAAK,EAAE,EAGV,oBAAoB,EAEpB,iBAAiB,EACjB,YAAY,EACZ,SAAS,EAIZ,MAAM,OAAO,CAAC;AAUf,MAAM,MAAM,eAAe,GAAG;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9B,SAAS,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;SAEK;IACL,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB;;;;;;;;;;;OAWG;IACH,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;IACpD;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAiBF,eAAO,MAAM,UAAU;;+DAwIrB,CAAC"}
|