@preply/ds-web-lib 11.0.0 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +1 -1
- package/dist/assets/OnboardingTour.css +1 -1
- 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} +1 -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.js +5 -430
- 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 -67
- 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 -315
- 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-B3WK71bR.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-3OgjGonN.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/store-BUKWfVf3.js +0 -1155
- package/dist/useBaseUiId-DavsGYu9.js +0 -8
- package/dist/useButton-CFPpP0o5.js +0 -193
- package/dist/useDialogClose-C9x1leGd.js +0 -34
- package/dist/useId-BhIOp2JG.js +0 -28
- package/dist/useOpenInteractionType-Cj41-8Yk.js +0 -2880
- package/dist/useRenderElement-DtYPTE_y.js +0 -350
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
-
import { moduleClassNames, getDatasetProps } from "@preply/ds-web-core";
|
|
4
|
-
import { forwardRef, useContext, Children, cloneElement, isValidElement } from "react";
|
|
5
|
-
import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
|
|
6
|
-
import "./components/Accordion/Accordion.js";
|
|
7
|
-
import "./components/AlertDialog/AlertDialog.js";
|
|
8
|
-
import { AlertBannerComponentContext } from "./components/AlertBanner/primitives/AlertBannerRoot.js";
|
|
9
|
-
import "./components/AlertBanner/primitives/AlertBannerIcon.js";
|
|
10
|
-
import { FormattedMessage } from "react-intl";
|
|
11
|
-
import { s as styles$1 } from "./AlertBannerProvider-DTx2Xp3V.js";
|
|
12
|
-
import "./components/Avatar/Avatar.js";
|
|
13
|
-
import "./components/AvatarWithStatus/AvatarWithStatus.js";
|
|
14
|
-
import "./components/Badge/Badge.js";
|
|
15
|
-
import "./components/Box/Box.js";
|
|
16
|
-
import { Button } from "./components/Button/Button.js";
|
|
17
|
-
import "./components/CalloutBanner/CalloutBanner.js";
|
|
18
|
-
import "./components/CalloutBanner/primitives/CalloutBannerDismissButton.js";
|
|
19
|
-
import "./components/CalloutBanner/primitives/CalloutBannerIcon.js";
|
|
20
|
-
import "./components/CalloutBanner/primitives/CalloutBannerRoot.js";
|
|
21
|
-
import "./components/CalloutBanner/primitives/CalloutBannerText.js";
|
|
22
|
-
import "./components/Checkbox/Checkbox.js";
|
|
23
|
-
import "./components/Chips/SingleSelectChips.js";
|
|
24
|
-
import "./components/Chips/MultiSelectChips.js";
|
|
25
|
-
import "./components/Chips/DismissibleChips.js";
|
|
26
|
-
import "./components/OnboardingTour/OnboardingTour.js";
|
|
27
|
-
import "@preply/ds-web-root";
|
|
28
|
-
import "./components/Dialog/primitives/DialogTitle.js";
|
|
29
|
-
import "./components/Dialog/primitives/DialogDescription.js";
|
|
30
|
-
import "./components/Dialog/primitives/DialogCloseButton.js";
|
|
31
|
-
import "./components/Dialog/primitives/DialogButtonStack.js";
|
|
32
|
-
import "./components/Dialog/DialogSteps.js";
|
|
33
|
-
import "./components/DropdownMenu/DropdownMenu.js";
|
|
34
|
-
import "./components/FieldButton/FieldButton.js";
|
|
35
|
-
import "./components/CountryFlag/CountryFlag.js";
|
|
36
|
-
import "radix-ui";
|
|
37
|
-
import "./components/Heading/Heading.js";
|
|
38
|
-
import { Icon } from "./components/Icon/Icon.js";
|
|
39
|
-
import { IconButton } from "./components/IconButton/IconButton.js";
|
|
40
|
-
import "./components/LayoutFlex/LayoutFlex.js";
|
|
41
|
-
import "./components/LayoutFlexItem/LayoutFlexItem.js";
|
|
42
|
-
import "./components/LayoutGrid/LayoutGrid.js";
|
|
43
|
-
import "./components/LayoutGridItem/LayoutGridItem.js";
|
|
44
|
-
import "./components/Link/Link.js";
|
|
45
|
-
import "./components/Loader/Loader.js";
|
|
46
|
-
import "./components/NumberField/NumberField.js";
|
|
47
|
-
import "@preply/ds-core";
|
|
48
|
-
import "./components/OnboardingTooltip/OnboardingTooltip.js";
|
|
49
|
-
import "./components/PasswordField/PasswordField.js";
|
|
50
|
-
import "./components/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 "./components/Rating/RatingInput.js";
|
|
55
|
-
import "./components/SelectField/SelectField.js";
|
|
56
|
-
import "./Slider-DB4Maswa.js";
|
|
57
|
-
import "./components/Slider/RangeSlider.js";
|
|
58
|
-
import "./components/Steps/Steps.js";
|
|
59
|
-
import "./components/Switch/Switch.js";
|
|
60
|
-
import { Text } from "./components/Text/Text.js";
|
|
61
|
-
import "./components/TextareaField/TextareaField.js";
|
|
62
|
-
import "./components/TextField/TextField.js";
|
|
63
|
-
import "./components/TextHighlighted/TextHighlighted.js";
|
|
64
|
-
import "./components/TextInline/TextInline.js";
|
|
65
|
-
import "./components/Toast/Toast.js";
|
|
66
|
-
import "./components/Tooltip/Tooltip.js";
|
|
67
|
-
import { VisuallyHidden } from "./components/private/VisuallyHidden/VisuallyHidden.js";
|
|
68
|
-
import './assets/IconTile.css';const alertBannerA11yPrefixMap = {
|
|
69
|
-
critical: /* @__PURE__ */ jsx(FormattedMessage, { id: "preply-ds.alert-banner.critical-prefix", defaultMessage: [{
|
|
70
|
-
"type": 0,
|
|
71
|
-
"value": "Alert:"
|
|
72
|
-
}] }),
|
|
73
|
-
warning: /* @__PURE__ */ jsx(FormattedMessage, { id: "preply-ds.alert-banner.warning-prefix", defaultMessage: [{
|
|
74
|
-
"type": 0,
|
|
75
|
-
"value": "Warning:"
|
|
76
|
-
}] }),
|
|
77
|
-
positive: /* @__PURE__ */ jsx(FormattedMessage, { id: "preply-ds.alert-banner.positive-prefix", defaultMessage: [{
|
|
78
|
-
"type": 0,
|
|
79
|
-
"value": "Update:"
|
|
80
|
-
}] })
|
|
81
|
-
};
|
|
82
|
-
const AlertBannerText = forwardRef(function AlertBannerText2({
|
|
83
|
-
className,
|
|
84
|
-
children,
|
|
85
|
-
...props
|
|
86
|
-
}, ref) {
|
|
87
|
-
const {
|
|
88
|
-
variant
|
|
89
|
-
} = useContext(AlertBannerComponentContext);
|
|
90
|
-
const classNames = [styles$1.description, className].filter(Boolean).join(" ");
|
|
91
|
-
return /* @__PURE__ */ jsxs(Text, { ref, variant: "default-regular", accent: "primary", className: classNames, ...props, children: [
|
|
92
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: alertBannerA11yPrefixMap[variant] }),
|
|
93
|
-
" ",
|
|
94
|
-
children
|
|
95
|
-
] });
|
|
96
|
-
});
|
|
97
|
-
const buttonDefaultProps = {
|
|
98
|
-
variant: "secondary",
|
|
99
|
-
size: "small",
|
|
100
|
-
wrap: true,
|
|
101
|
-
fullWidth: {
|
|
102
|
-
_: true,
|
|
103
|
-
"medium-l": false
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
const AlertBannerAction = forwardRef(function AlertBannerAction2({
|
|
107
|
-
className,
|
|
108
|
-
children,
|
|
109
|
-
...props
|
|
110
|
-
}, ref) {
|
|
111
|
-
const classNames = [styles$1.action, className].filter(Boolean).join(" ");
|
|
112
|
-
const patchedChildren = Children.map(children, (child) => {
|
|
113
|
-
if (!isDsButton(child)) {
|
|
114
|
-
return child;
|
|
115
|
-
}
|
|
116
|
-
return cloneElement(child, {
|
|
117
|
-
...buttonDefaultProps,
|
|
118
|
-
...child.props,
|
|
119
|
-
ref,
|
|
120
|
-
...props
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
return (
|
|
124
|
-
// The container here is necessary because Button doesn't accept `classname`.
|
|
125
|
-
/* @__PURE__ */ jsx("div", { className: classNames, "data-preply-ds-component": webComponentNames.AlertBannerAction, children: patchedChildren })
|
|
126
|
-
);
|
|
127
|
-
});
|
|
128
|
-
function isDsButton(node) {
|
|
129
|
-
if (!isValidElement(node)) return false;
|
|
130
|
-
return node.type === Button || node.type === IconButton;
|
|
131
|
-
}
|
|
132
|
-
const IconTile$1 = "IconTile__JN1Mo";
|
|
133
|
-
const styles = {
|
|
134
|
-
IconTile: IconTile$1,
|
|
135
|
-
"IconTile--size-small": "IconTile--size-small__8PuLN",
|
|
136
|
-
"IconTile--size-base": "IconTile--size-base__8cobE",
|
|
137
|
-
"IconTile--size-medium": "IconTile--size-medium__AYnun",
|
|
138
|
-
"IconTile--size-large": "IconTile--size-large__R159S",
|
|
139
|
-
"IconTile--tone-neutral": "IconTile--tone-neutral__RakY4",
|
|
140
|
-
"IconTile--tone-info": "IconTile--tone-info__yqu8Y",
|
|
141
|
-
"IconTile--tone-ai": "IconTile--tone-ai__IsgQT",
|
|
142
|
-
"IconTile--tone-positive": "IconTile--tone-positive__5fQ5C",
|
|
143
|
-
"IconTile--tone-warning": "IconTile--tone-warning__wCeLx",
|
|
144
|
-
"IconTile--tone-critical": "IconTile--tone-critical__FeCE3"
|
|
145
|
-
};
|
|
146
|
-
function getIconSize(size) {
|
|
147
|
-
switch (size) {
|
|
148
|
-
case "small":
|
|
149
|
-
return "16";
|
|
150
|
-
case "medium":
|
|
151
|
-
return "32";
|
|
152
|
-
case "large":
|
|
153
|
-
return "48";
|
|
154
|
-
}
|
|
155
|
-
return "24";
|
|
156
|
-
}
|
|
157
|
-
const IconTile = forwardRef(function IconComponent({
|
|
158
|
-
size = "base",
|
|
159
|
-
tone = "neutral",
|
|
160
|
-
dataset,
|
|
161
|
-
...iconProps
|
|
162
|
-
}, ref) {
|
|
163
|
-
const classNames = moduleClassNames(styles, webComponentNames.IconTile, [`size-${size}`, `tone-${tone}`]);
|
|
164
|
-
return /* @__PURE__ */ jsx("span", { className: classNames.join(" "), ...getDatasetProps(dataset, {
|
|
165
|
-
preplyDsComponent: webComponentNames.IconTile
|
|
166
|
-
}), children: /* @__PURE__ */ jsx(Icon, { ...iconProps, accent: "primary", size: getIconSize(size), ref }) });
|
|
167
|
-
});
|
|
168
|
-
export {
|
|
169
|
-
AlertBannerAction as A,
|
|
170
|
-
IconTile as I,
|
|
171
|
-
AlertBannerText as a
|
|
172
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import './assets/InputContainer.css';const container = "container__B-gQ9";
|
|
3
|
-
const input = "input__WZN7y";
|
|
4
|
-
const icon = "icon__6Xfum";
|
|
5
|
-
const trailingIcon = "trailingIcon__Bgnv4";
|
|
6
|
-
const button = "button__auAU0";
|
|
7
|
-
const styles = {
|
|
8
|
-
container,
|
|
9
|
-
input,
|
|
10
|
-
icon,
|
|
11
|
-
trailingIcon,
|
|
12
|
-
button
|
|
13
|
-
};
|
|
14
|
-
function InputContainer({
|
|
15
|
-
button: button2,
|
|
16
|
-
icon: icon2,
|
|
17
|
-
trailingIcon: trailingIcon2,
|
|
18
|
-
children
|
|
19
|
-
}) {
|
|
20
|
-
return /* @__PURE__ */ jsxs("div", { className: styles.container, children: [
|
|
21
|
-
!!icon2 && /* @__PURE__ */ jsx("span", { className: styles.icon, children: icon2 }),
|
|
22
|
-
children,
|
|
23
|
-
!!trailingIcon2 && /* @__PURE__ */ jsx("span", { className: styles.trailingIcon, children: trailingIcon2 }),
|
|
24
|
-
!!button2 && /* @__PURE__ */ jsx("span", { className: styles.button, children: button2 })
|
|
25
|
-
] });
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
InputContainer as I,
|
|
29
|
-
styles as s
|
|
30
|
-
};
|
package/dist/Slider-DB4Maswa.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { Slider as Slider$1 } from "radix-ui";
|
|
5
|
-
import { getDatasetProps } from "@preply/ds-web-core";
|
|
6
|
-
import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
|
|
7
|
-
import './assets/Slider.css';const root = "root__QwW3E";
|
|
8
|
-
const track = "track__iifdu";
|
|
9
|
-
const range = "range__ZdmUh";
|
|
10
|
-
const thumb = "thumb__7W7O-";
|
|
11
|
-
const styles = {
|
|
12
|
-
root,
|
|
13
|
-
track,
|
|
14
|
-
range,
|
|
15
|
-
thumb
|
|
16
|
-
};
|
|
17
|
-
function filterThumbProps(props) {
|
|
18
|
-
const thumbProps = {};
|
|
19
|
-
Object.entries(props).forEach(([key, value]) => {
|
|
20
|
-
switch (key) {
|
|
21
|
-
case "id":
|
|
22
|
-
case "aria-label":
|
|
23
|
-
case "aria-labelledby":
|
|
24
|
-
case "aria-describedby":
|
|
25
|
-
case "aria-invalid":
|
|
26
|
-
case "aria-errormessage":
|
|
27
|
-
thumbProps[key] = value;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
return thumbProps;
|
|
31
|
-
}
|
|
32
|
-
const Slider = forwardRef(function Slider2({
|
|
33
|
-
value,
|
|
34
|
-
defaultValue = 0,
|
|
35
|
-
onValueChange,
|
|
36
|
-
min = 0,
|
|
37
|
-
max = 100,
|
|
38
|
-
step = 1,
|
|
39
|
-
dataset,
|
|
40
|
-
...thumbProps
|
|
41
|
-
}, ref) {
|
|
42
|
-
const datasetProps = getDatasetProps(dataset, {
|
|
43
|
-
preplyDsComponent: webComponentNames.Slider
|
|
44
|
-
});
|
|
45
|
-
const handleValueChange = onValueChange ? (newValue) => onValueChange(newValue[0]) : void 0;
|
|
46
|
-
return /* @__PURE__ */ jsxs(Slider$1.Root, { ref, ...datasetProps, className: styles.root, value: value !== void 0 ? [value] : void 0, defaultValue: defaultValue !== void 0 ? [defaultValue] : void 0, onValueChange: handleValueChange, min, max, step, children: [
|
|
47
|
-
/* @__PURE__ */ jsx(Slider$1.Track, { className: styles.track, children: /* @__PURE__ */ jsx(Slider$1.Range, { className: styles.range }) }),
|
|
48
|
-
/* @__PURE__ */ jsx(Slider$1.Thumb, { ...filterThumbProps(thumbProps), className: styles.thumb })
|
|
49
|
-
] });
|
|
50
|
-
});
|
|
51
|
-
export {
|
|
52
|
-
Slider as S,
|
|
53
|
-
filterThumbProps as f,
|
|
54
|
-
styles as s
|
|
55
|
-
};
|
package/dist/Stars-C_mHop2H.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import StarIcon from "@preply/ds-media-icons/dist/24/TokyoUIStar.svg";
|
|
3
|
-
import StarFilledIcon from "@preply/ds-media-icons/dist/24/TokyoUIStarFilled.svg";
|
|
4
|
-
import { renderIcon } from "./utils/render-icon.js";
|
|
5
|
-
import './assets/Stars.css';const rating = "rating__Le8xf";
|
|
6
|
-
const ratingInput = "ratingInput__aOeLl";
|
|
7
|
-
const stars = "stars__7wYnu";
|
|
8
|
-
const styles = {
|
|
9
|
-
rating,
|
|
10
|
-
"rating--size-small": "rating--size-small__mIdaG",
|
|
11
|
-
"rating--size-medium": "rating--size-medium__2tNG2",
|
|
12
|
-
"rating--size-large": "rating--size-large__tZXTm",
|
|
13
|
-
"rating--narrow-l--size-small": "rating--narrow-l--size-small__nDn-T",
|
|
14
|
-
"rating--narrow-l--size-medium": "rating--narrow-l--size-medium__Vfex3",
|
|
15
|
-
"rating--narrow-l--size-large": "rating--narrow-l--size-large__YVlZT",
|
|
16
|
-
"rating--medium-s--size-small": "rating--medium-s--size-small__tDVGz",
|
|
17
|
-
"rating--medium-s--size-medium": "rating--medium-s--size-medium__m53Rx",
|
|
18
|
-
"rating--medium-s--size-large": "rating--medium-s--size-large__QaGl7",
|
|
19
|
-
"rating--medium-l--size-small": "rating--medium-l--size-small__6rJT2",
|
|
20
|
-
"rating--medium-l--size-medium": "rating--medium-l--size-medium__PPIhH",
|
|
21
|
-
"rating--medium-l--size-large": "rating--medium-l--size-large__WIjDu",
|
|
22
|
-
"rating--wide-s--size-small": "rating--wide-s--size-small__8ulej",
|
|
23
|
-
"rating--wide-s--size-medium": "rating--wide-s--size-medium__2FRMh",
|
|
24
|
-
"rating--wide-s--size-large": "rating--wide-s--size-large__mc81k",
|
|
25
|
-
"rating--wide-l--size-small": "rating--wide-l--size-small__JpDLa",
|
|
26
|
-
"rating--wide-l--size-medium": "rating--wide-l--size-medium__WvAyR",
|
|
27
|
-
"rating--wide-l--size-large": "rating--wide-l--size-large__VXvoH",
|
|
28
|
-
ratingInput,
|
|
29
|
-
stars,
|
|
30
|
-
"ratingInput--dsInternalSimulation-hover": "ratingInput--dsInternalSimulation-hover__YfddP",
|
|
31
|
-
"focus-style": "focus-style__SSYAT",
|
|
32
|
-
"ratingInput--dsInternalSimulation-focus": "ratingInput--dsInternalSimulation-focus__18rP3"
|
|
33
|
-
};
|
|
34
|
-
function FilledStars({
|
|
35
|
-
filledPerc
|
|
36
|
-
}) {
|
|
37
|
-
return /* @__PURE__ */ jsxs("div", { "data-filled": "true", style: {
|
|
38
|
-
width: `${filledPerc * 100}%`
|
|
39
|
-
}, children: [
|
|
40
|
-
renderIcon(StarFilledIcon),
|
|
41
|
-
renderIcon(StarFilledIcon),
|
|
42
|
-
renderIcon(StarFilledIcon),
|
|
43
|
-
renderIcon(StarFilledIcon),
|
|
44
|
-
renderIcon(StarFilledIcon)
|
|
45
|
-
] });
|
|
46
|
-
}
|
|
47
|
-
function EmptyStars() {
|
|
48
|
-
return /* @__PURE__ */ jsxs("div", { "data-filled": "false", children: [
|
|
49
|
-
renderIcon(StarIcon),
|
|
50
|
-
renderIcon(StarIcon),
|
|
51
|
-
renderIcon(StarIcon),
|
|
52
|
-
renderIcon(StarIcon),
|
|
53
|
-
renderIcon(StarIcon)
|
|
54
|
-
] });
|
|
55
|
-
}
|
|
56
|
-
function Stars({
|
|
57
|
-
filledPerc
|
|
58
|
-
}) {
|
|
59
|
-
return /* @__PURE__ */ jsxs("div", { className: styles.stars, "aria-hidden": "true", children: [
|
|
60
|
-
/* @__PURE__ */ jsx(FilledStars, { filledPerc }),
|
|
61
|
-
/* @__PURE__ */ jsx(EmptyStars, {})
|
|
62
|
-
] });
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
Stars as S,
|
|
66
|
-
styles as s
|
|
67
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
const SvgTokyoUiChevronDown = ({
|
|
4
|
-
title,
|
|
5
|
-
titleId,
|
|
6
|
-
...props
|
|
7
|
-
}, ref) => /* @__PURE__ */ React.createElement("svg", { "data-preply-ds-component": "SvgTokyoUIIcon", 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", { d: "M18.707 9.707 12 16.414 5.293 9.707l1.414-1.414L12 13.586l5.293-5.293z" }));
|
|
8
|
-
const ForwardRef = forwardRef(SvgTokyoUiChevronDown);
|
|
9
|
-
export {
|
|
10
|
-
ForwardRef as F
|
|
11
|
-
};
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { b as useRefWithInit, E as EMPTY_OBJECT } from "./useRenderElement-DtYPTE_y.js";
|
|
4
|
-
const useInsertionEffect = React[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0, -3)];
|
|
5
|
-
const useSafeInsertionEffect = (
|
|
6
|
-
// React 17 doesn't have useInsertionEffect.
|
|
7
|
-
useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
|
|
8
|
-
useInsertionEffect !== React.useLayoutEffect ? useInsertionEffect : (fn) => fn()
|
|
9
|
-
);
|
|
10
|
-
function useEventCallback(callback) {
|
|
11
|
-
const stable = useRefWithInit(createStableCallback).current;
|
|
12
|
-
stable.next = callback;
|
|
13
|
-
useSafeInsertionEffect(stable.effect);
|
|
14
|
-
return stable.trampoline;
|
|
15
|
-
}
|
|
16
|
-
function createStableCallback() {
|
|
17
|
-
const stable = {
|
|
18
|
-
next: void 0,
|
|
19
|
-
callback: assertNotCalled,
|
|
20
|
-
trampoline: (...args) => {
|
|
21
|
-
var _a;
|
|
22
|
-
return (_a = stable.callback) == null ? void 0 : _a.call(stable, ...args);
|
|
23
|
-
},
|
|
24
|
-
effect: () => {
|
|
25
|
-
stable.callback = stable.next;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
return stable;
|
|
29
|
-
}
|
|
30
|
-
function assertNotCalled() {
|
|
31
|
-
if (process.env.NODE_ENV !== "production") {
|
|
32
|
-
throw new Error("Base UI: Cannot call an event handler while rendering.");
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
const noop = () => {
|
|
36
|
-
};
|
|
37
|
-
const useIsoLayoutEffect = typeof document !== "undefined" ? React.useLayoutEffect : noop;
|
|
38
|
-
function createChangeEventDetails(reason, event, customProperties) {
|
|
39
|
-
let canceled = false;
|
|
40
|
-
let allowPropagation = false;
|
|
41
|
-
const custom = EMPTY_OBJECT;
|
|
42
|
-
return {
|
|
43
|
-
reason,
|
|
44
|
-
event: event != null ? event : new Event("base-ui"),
|
|
45
|
-
cancel() {
|
|
46
|
-
canceled = true;
|
|
47
|
-
},
|
|
48
|
-
allowPropagation() {
|
|
49
|
-
allowPropagation = true;
|
|
50
|
-
},
|
|
51
|
-
get isCanceled() {
|
|
52
|
-
return canceled;
|
|
53
|
-
},
|
|
54
|
-
get isPropagationAllowed() {
|
|
55
|
-
return allowPropagation;
|
|
56
|
-
},
|
|
57
|
-
...custom
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function hasWindow() {
|
|
61
|
-
return typeof window !== "undefined";
|
|
62
|
-
}
|
|
63
|
-
function getNodeName(node) {
|
|
64
|
-
if (isNode(node)) {
|
|
65
|
-
return (node.nodeName || "").toLowerCase();
|
|
66
|
-
}
|
|
67
|
-
return "#document";
|
|
68
|
-
}
|
|
69
|
-
function getWindow(node) {
|
|
70
|
-
var _node$ownerDocument;
|
|
71
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
72
|
-
}
|
|
73
|
-
function getDocumentElement(node) {
|
|
74
|
-
var _ref;
|
|
75
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
76
|
-
}
|
|
77
|
-
function isNode(value) {
|
|
78
|
-
if (!hasWindow()) {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
82
|
-
}
|
|
83
|
-
function isElement(value) {
|
|
84
|
-
if (!hasWindow()) {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
88
|
-
}
|
|
89
|
-
function isHTMLElement(value) {
|
|
90
|
-
if (!hasWindow()) {
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
94
|
-
}
|
|
95
|
-
function isShadowRoot(value) {
|
|
96
|
-
if (!hasWindow() || typeof ShadowRoot === "undefined") {
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
100
|
-
}
|
|
101
|
-
const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
102
|
-
function isOverflowElement(element) {
|
|
103
|
-
const {
|
|
104
|
-
overflow,
|
|
105
|
-
overflowX,
|
|
106
|
-
overflowY,
|
|
107
|
-
display
|
|
108
|
-
} = getComputedStyle(element);
|
|
109
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
110
|
-
}
|
|
111
|
-
const tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
112
|
-
function isTableElement(element) {
|
|
113
|
-
return tableElements.has(getNodeName(element));
|
|
114
|
-
}
|
|
115
|
-
const topLayerSelectors = [":popover-open", ":modal"];
|
|
116
|
-
function isTopLayer(element) {
|
|
117
|
-
return topLayerSelectors.some((selector) => {
|
|
118
|
-
try {
|
|
119
|
-
return element.matches(selector);
|
|
120
|
-
} catch (_e) {
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
const transformProperties = ["transform", "translate", "scale", "rotate", "perspective"];
|
|
126
|
-
const willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"];
|
|
127
|
-
const containValues = ["paint", "layout", "strict", "content"];
|
|
128
|
-
function isContainingBlock(elementOrCss) {
|
|
129
|
-
const webkit = isWebKit();
|
|
130
|
-
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
131
|
-
return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
|
|
132
|
-
}
|
|
133
|
-
function getContainingBlock(element) {
|
|
134
|
-
let currentNode = getParentNode(element);
|
|
135
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
136
|
-
if (isContainingBlock(currentNode)) {
|
|
137
|
-
return currentNode;
|
|
138
|
-
} else if (isTopLayer(currentNode)) {
|
|
139
|
-
return null;
|
|
140
|
-
}
|
|
141
|
-
currentNode = getParentNode(currentNode);
|
|
142
|
-
}
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
145
|
-
function isWebKit() {
|
|
146
|
-
if (typeof CSS === "undefined" || !CSS.supports) return false;
|
|
147
|
-
return CSS.supports("-webkit-backdrop-filter", "none");
|
|
148
|
-
}
|
|
149
|
-
const lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
150
|
-
function isLastTraversableNode(node) {
|
|
151
|
-
return lastTraversableNodeNames.has(getNodeName(node));
|
|
152
|
-
}
|
|
153
|
-
function getComputedStyle(element) {
|
|
154
|
-
return getWindow(element).getComputedStyle(element);
|
|
155
|
-
}
|
|
156
|
-
function getNodeScroll(element) {
|
|
157
|
-
if (isElement(element)) {
|
|
158
|
-
return {
|
|
159
|
-
scrollLeft: element.scrollLeft,
|
|
160
|
-
scrollTop: element.scrollTop
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
return {
|
|
164
|
-
scrollLeft: element.scrollX,
|
|
165
|
-
scrollTop: element.scrollY
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
function getParentNode(node) {
|
|
169
|
-
if (getNodeName(node) === "html") {
|
|
170
|
-
return node;
|
|
171
|
-
}
|
|
172
|
-
const result = (
|
|
173
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
174
|
-
node.assignedSlot || // DOM Element detected.
|
|
175
|
-
node.parentNode || // ShadowRoot detected.
|
|
176
|
-
isShadowRoot(node) && node.host || // Fallback.
|
|
177
|
-
getDocumentElement(node)
|
|
178
|
-
);
|
|
179
|
-
return isShadowRoot(result) ? result.host : result;
|
|
180
|
-
}
|
|
181
|
-
function getNearestOverflowAncestor(node) {
|
|
182
|
-
const parentNode = getParentNode(node);
|
|
183
|
-
if (isLastTraversableNode(parentNode)) {
|
|
184
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
185
|
-
}
|
|
186
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
187
|
-
return parentNode;
|
|
188
|
-
}
|
|
189
|
-
return getNearestOverflowAncestor(parentNode);
|
|
190
|
-
}
|
|
191
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
192
|
-
var _node$ownerDocument2;
|
|
193
|
-
if (list === void 0) {
|
|
194
|
-
list = [];
|
|
195
|
-
}
|
|
196
|
-
if (traverseIframes === void 0) {
|
|
197
|
-
traverseIframes = true;
|
|
198
|
-
}
|
|
199
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
200
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
201
|
-
const win = getWindow(scrollableAncestor);
|
|
202
|
-
if (isBody) {
|
|
203
|
-
const frameElement = getFrameElement(win);
|
|
204
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
205
|
-
}
|
|
206
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
207
|
-
}
|
|
208
|
-
function getFrameElement(win) {
|
|
209
|
-
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
210
|
-
}
|
|
211
|
-
export {
|
|
212
|
-
useIsoLayoutEffect as a,
|
|
213
|
-
isShadowRoot as b,
|
|
214
|
-
createChangeEventDetails as c,
|
|
215
|
-
isNode as d,
|
|
216
|
-
getWindow as e,
|
|
217
|
-
isElement as f,
|
|
218
|
-
getNodeName as g,
|
|
219
|
-
isLastTraversableNode as h,
|
|
220
|
-
isHTMLElement as i,
|
|
221
|
-
getParentNode as j,
|
|
222
|
-
getComputedStyle as k,
|
|
223
|
-
getOverflowAncestors as l,
|
|
224
|
-
isWebKit as m,
|
|
225
|
-
getDocumentElement as n,
|
|
226
|
-
getFrameElement as o,
|
|
227
|
-
isTopLayer as p,
|
|
228
|
-
isTableElement as q,
|
|
229
|
-
isContainingBlock as r,
|
|
230
|
-
getContainingBlock as s,
|
|
231
|
-
isOverflowElement as t,
|
|
232
|
-
useEventCallback as u,
|
|
233
|
-
getNodeScroll as v
|
|
234
|
-
};
|