@preply/ds-web-lib 3.5.1 → 3.6.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/BubbleCounter.module-QMwXWFIS.js +16 -0
- package/dist/ChipsPrimitive-DN5NA2yH.js +1242 -0
- package/dist/assets/Accordion.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 +3 -3
- package/dist/assets/Box.css +3 -3
- package/dist/assets/BubbleCounter.css +69 -0
- package/dist/assets/Button.css +4 -4
- package/dist/assets/ButtonBase.css +4 -4
- package/dist/assets/Checkbox.css +2 -2
- package/dist/assets/Chips.css +16 -16
- package/dist/assets/ChipsPrimitive.css +118 -0
- package/dist/assets/CountryFlag.css +1 -1
- package/dist/assets/Dialog.css +3 -3
- package/dist/assets/Divider.css +14 -0
- package/dist/assets/FieldButton.css +3 -3
- package/dist/assets/FormControl.css +2 -2
- 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/Slider.css +1 -1
- package/dist/assets/Spinner.css +3 -3
- package/dist/assets/Steps.css +1 -1
- package/dist/assets/Switch.css +57 -0
- 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/VisuallyHidden.css +9 -0
- package/dist/assets/align-self.css +1 -1
- package/dist/assets/color.css +2 -2
- package/dist/assets/exp-color.css +2 -2
- package/dist/assets/layout-gap.css +21 -3
- package/dist/assets/layout-grid.css +3 -3
- package/dist/assets/layout-hide.css +1 -1
- package/dist/assets/layout-padding.css +75 -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/components/BubbleCounter/BubbleCounter.d.ts +41 -0
- package/dist/components/BubbleCounter/BubbleCounter.d.ts.map +1 -0
- package/dist/components/BubbleCounter/BubbleCounter.js +31 -0
- package/dist/components/Chips/Chips.types.d.ts +38 -0
- package/dist/components/Chips/Chips.types.d.ts.map +1 -0
- package/dist/components/Chips/DismissibleChips.d.ts +48 -0
- package/dist/components/Chips/DismissibleChips.d.ts.map +1 -0
- package/dist/components/Chips/DismissibleChips.js +92 -0
- package/dist/components/Chips/MultiSelectChips.d.ts +45 -0
- package/dist/components/Chips/MultiSelectChips.d.ts.map +1 -0
- package/dist/components/Chips/MultiSelectChips.js +70 -0
- package/dist/components/Chips/SingleSelectChips.d.ts +45 -0
- package/dist/components/Chips/SingleSelectChips.d.ts.map +1 -0
- package/dist/components/Chips/SingleSelectChips.js +63 -0
- package/dist/components/Chips/private/ChipsPrimitive.d.ts +58 -0
- package/dist/components/Chips/private/ChipsPrimitive.d.ts.map +1 -0
- package/dist/components/Chips/private/ChipsPrimitive.js +17 -0
- package/dist/components/CountryFlag/CountryFlag.d.ts +3 -4
- package/dist/components/CountryFlag/CountryFlag.d.ts.map +1 -1
- package/dist/components/CountryFlag/CountryFlag.js +6 -6
- package/dist/components/Divider/Divider.d.ts +9 -0
- package/dist/components/Divider/Divider.d.ts.map +1 -0
- package/dist/components/Divider/Divider.js +14 -0
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.js +2 -1
- package/dist/components/LayoutFlex/LayoutFlex.js +1 -1
- package/dist/components/LayoutFlex/tests/Gap.d.ts +1 -0
- package/dist/components/LayoutFlex/tests/Gap.d.ts.map +1 -1
- package/dist/components/LayoutFlex/tests/Gap.js +12 -0
- package/dist/components/LayoutFlex/tests/Padding.d.ts +1 -0
- package/dist/components/LayoutFlex/tests/Padding.d.ts.map +1 -1
- package/dist/components/LayoutFlex/tests/Padding.js +12 -0
- package/dist/components/Switch/Switch.d.ts +62 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -0
- package/dist/components/Switch/Switch.js +51 -0
- package/dist/components/{Chips → deprecated/Chips}/Chips.d.ts +9 -1
- package/dist/components/deprecated/Chips/Chips.d.ts.map +1 -0
- package/dist/components/{Chips → deprecated/Chips}/Chips.js +7 -7
- package/dist/components/deprecated/index.d.ts +2 -0
- package/dist/components/deprecated/index.d.ts.map +1 -0
- package/dist/components/deprecated/index.js +4 -0
- package/dist/components/index.d.ts +6 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +15 -2
- package/dist/components/private/VisuallyHidden/VisuallyHidden.d.ts +23 -0
- package/dist/components/private/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
- package/dist/components/private/VisuallyHidden/VisuallyHidden.js +15 -0
- package/dist/index.js +15 -2
- package/dist/{layout-gap.module-B_tyw31T.js → layout-gap.module-RzGBJL6B.js} +6 -0
- package/dist/shared-styles/layout-gap/layout-gap.js +1 -1
- package/dist/shared-styles/layout-padding/layout-padding.js +24 -0
- package/dist/utils/Orientation/OrientationProvider.d.ts +45 -0
- package/dist/utils/Orientation/OrientationProvider.d.ts.map +1 -0
- package/dist/utils/Orientation/OrientationProvider.js +27 -0
- package/dist/utils/Orientation/index.d.ts +2 -0
- package/dist/utils/Orientation/index.d.ts.map +1 -0
- package/dist/utils/Orientation/index.js +5 -0
- package/dist/utils/RovingTabIndex/RovingTabIndexProvider.d.ts +45 -0
- package/dist/utils/RovingTabIndex/RovingTabIndexProvider.d.ts.map +1 -0
- package/dist/utils/RovingTabIndex/RovingTabIndexProvider.js +48 -0
- package/dist/utils/RovingTabIndex/index.d.ts +2 -0
- package/dist/utils/RovingTabIndex/index.d.ts.map +1 -0
- package/dist/utils/RovingTabIndex/index.js +5 -0
- package/dist/utils/createRequiredContext.d.ts +15 -0
- package/dist/utils/createRequiredContext.d.ts.map +1 -0
- package/dist/utils/createRequiredContext.js +16 -0
- package/dist/utils/useControllableState/useControllableState.d.ts +19 -0
- package/dist/utils/useControllableState/useControllableState.d.ts.map +1 -0
- package/dist/utils/useControllableState/useControllableState.js +27 -0
- package/dist/utils/useStableCallback/useStableCallback.d.ts +18 -0
- package/dist/utils/useStableCallback/useStableCallback.d.ts.map +1 -0
- package/dist/utils/useStableCallback/useStableCallback.js +15 -0
- package/package.json +14 -13
- package/dist/components/Chips/Chips.d.ts.map +0 -1
- package/dist/components/CountryFlag/types.d.ts +0 -3
- package/dist/components/CountryFlag/types.d.ts.map +0 -1
- package/dist/components/CountryFlag/utils/countries.d.ts +0 -276
- package/dist/components/CountryFlag/utils/countries.d.ts.map +0 -1
- package/dist/components/CountryFlag/utils/countries.js +0 -275
- package/dist/components/CountryFlag/utils/getCountryFlagUrl.d.ts +0 -7
- package/dist/components/CountryFlag/utils/getCountryFlagUrl.d.ts.map +0 -1
- package/dist/components/CountryFlag/utils/getCountryFlagUrl.js +0 -14
- /package/dist/components/{CountryFlag/types.js → Chips/Chips.types.js} +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
2
|
+
.Switch__-4XFt {
|
|
3
|
+
all: unset;
|
|
4
|
+
width: 52px;
|
|
5
|
+
height: var(--7789ee);
|
|
6
|
+
border-radius: var(--aa6dcb);
|
|
7
|
+
background-color: var(--a5c761);
|
|
8
|
+
display: -webkit-box;
|
|
9
|
+
display: -ms-flexbox;
|
|
10
|
+
display: flex;
|
|
11
|
+
-webkit-box-align: center;
|
|
12
|
+
-ms-flex-align: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
-webkit-transition: background-color 220ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
15
|
+
transition: background-color 220ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
}
|
|
18
|
+
.Switch__-4XFt > .thumb__qAYMq {
|
|
19
|
+
display: inline-block;
|
|
20
|
+
width: var(--f316e1);
|
|
21
|
+
height: var(--f316e1);
|
|
22
|
+
border-radius: var(--aa6dcb);
|
|
23
|
+
background-color: var(--3546c3);
|
|
24
|
+
translate: var(--590b8d);
|
|
25
|
+
-webkit-transition: translate 220ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
26
|
+
transition: translate 220ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
27
|
+
}
|
|
28
|
+
.Switch__-4XFt[aria-checked='true'] {
|
|
29
|
+
background-color: var(--4983fe);
|
|
30
|
+
}
|
|
31
|
+
.Switch__-4XFt[aria-checked='true'] > .thumb__qAYMq {
|
|
32
|
+
translate: var(--f316e1);
|
|
33
|
+
}
|
|
34
|
+
.Switch__-4XFt[disabled] {
|
|
35
|
+
background-color: var(--04daeb);
|
|
36
|
+
cursor: not-allowed;
|
|
37
|
+
}
|
|
38
|
+
.Switch__-4XFt:focus-visible {
|
|
39
|
+
outline-style: solid;
|
|
40
|
+
outline-color: var(--603ec6);
|
|
41
|
+
outline-width: var(--99d31f);
|
|
42
|
+
outline-offset: var(--c0b12c);
|
|
43
|
+
}
|
|
44
|
+
@media (pointer: fine) {
|
|
45
|
+
.Switch__-4XFt {
|
|
46
|
+
width: 39px;
|
|
47
|
+
height: var(--f316e1);
|
|
48
|
+
}
|
|
49
|
+
.Switch__-4XFt > .thumb__qAYMq {
|
|
50
|
+
width: 18px;
|
|
51
|
+
height: 18px;
|
|
52
|
+
translate: 3px;
|
|
53
|
+
}
|
|
54
|
+
.Switch__-4XFt[aria-checked='true'] > .thumb__qAYMq {
|
|
55
|
+
translate: 18px;
|
|
56
|
+
}
|
|
57
|
+
}
|
package/dist/assets/Text.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @
|
|
2
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @
|
|
3
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
2
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @Tue Sep 09 2025 14:38:27 GMT+0000 (Coordinated Universal Time) */
|
|
3
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @Tue Sep 09 2025 14:38:31 GMT+0000 (Coordinated Universal Time) */
|
|
4
4
|
.Text__uVacy {
|
|
5
5
|
-webkit-font-smoothing: antialiased;
|
|
6
6
|
text-rendering: optimizeLegibility;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @
|
|
2
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @
|
|
3
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
2
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @Tue Sep 09 2025 14:38:27 GMT+0000 (Coordinated Universal Time) */
|
|
3
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @Tue Sep 09 2025 14:38:31 GMT+0000 (Coordinated Universal Time) */
|
|
4
4
|
.TextHighlighted__ehLpO {
|
|
5
5
|
display: inline-block;
|
|
6
6
|
padding-left: var(--58c1e5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @
|
|
2
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @
|
|
3
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
2
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @Tue Sep 09 2025 14:38:27 GMT+0000 (Coordinated Universal Time) */
|
|
3
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @Tue Sep 09 2025 14:38:31 GMT+0000 (Coordinated Universal Time) */
|
|
4
4
|
.TextInline__SqhPj {
|
|
5
5
|
-webkit-font-smoothing: antialiased;
|
|
6
6
|
text-rendering: optimizeLegibility;
|
package/dist/assets/Toast.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @
|
|
2
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
2
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @Tue Sep 09 2025 14:38:31 GMT+0000 (Coordinated Universal Time) */
|
|
3
3
|
.toast__JkBNR {
|
|
4
4
|
/*
|
|
5
5
|
* This variable comes from sonner. We're setting it manually here because
|
package/dist/assets/Tooltip.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
2
2
|
.content__ZZg4T {
|
|
3
3
|
background-color: var(--4983fe);
|
|
4
4
|
color: var(--c2b191);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @Tue Sep 09 2025 14:38:31 GMT+0000 (Coordinated Universal Time) */
|
|
2
2
|
.AlignSelf__huNbz.AlignSelf--align-self-start__Pk4Ld {
|
|
3
3
|
-ms-flex-item-align: start;
|
|
4
4
|
align-self: start;
|
package/dist/assets/color.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @
|
|
2
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
2
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @Tue Sep 09 2025 14:38:27 GMT+0000 (Coordinated Universal Time) */
|
|
3
3
|
.Color__vfkGX.Color--color-white__dhbZ3 {
|
|
4
4
|
color: var(--145676);
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @
|
|
2
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
2
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @Tue Sep 09 2025 14:38:27 GMT+0000 (Coordinated Universal Time) */
|
|
3
3
|
.ExpColor__S0PGo.ExpColor--exp-color-grey-0__DKudt {
|
|
4
4
|
color: var(--d751dc);
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @
|
|
2
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @
|
|
3
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
2
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @Tue Sep 09 2025 14:38:27 GMT+0000 (Coordinated Universal Time) */
|
|
3
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @Tue Sep 09 2025 14:38:31 GMT+0000 (Coordinated Universal Time) */
|
|
4
4
|
[data-preply-ds-component="LayoutFlex"][data-ds-gap="none"],
|
|
5
5
|
[data-preply-ds-component="LayoutFlex"][data-ds-gap*='"_":"none"'] {
|
|
6
6
|
gap: var(--74358d);
|
|
@@ -475,6 +475,9 @@
|
|
|
475
475
|
.LayoutGap__FdLKD.LayoutGap--gap-4__Yogfa {
|
|
476
476
|
gap: var(--590b8d);
|
|
477
477
|
}
|
|
478
|
+
.LayoutGap__FdLKD.LayoutGap--gap-6__K72nD {
|
|
479
|
+
gap: var(--f30851);
|
|
480
|
+
}
|
|
478
481
|
.LayoutGap__FdLKD.LayoutGap--gap-8__YbiOh {
|
|
479
482
|
gap: var(--66b80b);
|
|
480
483
|
}
|
|
@@ -542,6 +545,9 @@
|
|
|
542
545
|
.LayoutGap__FdLKD.LayoutGap--narrow-l--gap-4__aN3Fz {
|
|
543
546
|
gap: var(--590b8d);
|
|
544
547
|
}
|
|
548
|
+
.LayoutGap__FdLKD.LayoutGap--narrow-l--gap-6__w9e8z {
|
|
549
|
+
gap: var(--f30851);
|
|
550
|
+
}
|
|
545
551
|
.LayoutGap__FdLKD.LayoutGap--narrow-l--gap-8__oIVC6 {
|
|
546
552
|
gap: var(--66b80b);
|
|
547
553
|
}
|
|
@@ -610,6 +616,9 @@
|
|
|
610
616
|
.LayoutGap__FdLKD.LayoutGap--medium-s--gap-4__ueZf3 {
|
|
611
617
|
gap: var(--590b8d);
|
|
612
618
|
}
|
|
619
|
+
.LayoutGap__FdLKD.LayoutGap--medium-s--gap-6__cHexS {
|
|
620
|
+
gap: var(--f30851);
|
|
621
|
+
}
|
|
613
622
|
.LayoutGap__FdLKD.LayoutGap--medium-s--gap-8__3iOSe {
|
|
614
623
|
gap: var(--66b80b);
|
|
615
624
|
}
|
|
@@ -678,6 +687,9 @@
|
|
|
678
687
|
.LayoutGap__FdLKD.LayoutGap--medium-l--gap-4__BgGU5 {
|
|
679
688
|
gap: var(--590b8d);
|
|
680
689
|
}
|
|
690
|
+
.LayoutGap__FdLKD.LayoutGap--medium-l--gap-6__piNrc {
|
|
691
|
+
gap: var(--f30851);
|
|
692
|
+
}
|
|
681
693
|
.LayoutGap__FdLKD.LayoutGap--medium-l--gap-8__oDZhy {
|
|
682
694
|
gap: var(--66b80b);
|
|
683
695
|
}
|
|
@@ -746,6 +758,9 @@
|
|
|
746
758
|
.LayoutGap__FdLKD.LayoutGap--wide-s--gap-4__lmwS7 {
|
|
747
759
|
gap: var(--590b8d);
|
|
748
760
|
}
|
|
761
|
+
.LayoutGap__FdLKD.LayoutGap--wide-s--gap-6__Oopm2 {
|
|
762
|
+
gap: var(--f30851);
|
|
763
|
+
}
|
|
749
764
|
.LayoutGap__FdLKD.LayoutGap--wide-s--gap-8__xWztG {
|
|
750
765
|
gap: var(--66b80b);
|
|
751
766
|
}
|
|
@@ -814,6 +829,9 @@
|
|
|
814
829
|
.LayoutGap__FdLKD.LayoutGap--wide-l--gap-4__Zc72b {
|
|
815
830
|
gap: var(--590b8d);
|
|
816
831
|
}
|
|
832
|
+
.LayoutGap__FdLKD.LayoutGap--wide-l--gap-6__jULd6 {
|
|
833
|
+
gap: var(--f30851);
|
|
834
|
+
}
|
|
817
835
|
.LayoutGap__FdLKD.LayoutGap--wide-l--gap-8__esj-j {
|
|
818
836
|
gap: var(--66b80b);
|
|
819
837
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @
|
|
2
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @
|
|
3
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
2
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @Tue Sep 09 2025 14:38:27 GMT+0000 (Coordinated Universal Time) */
|
|
3
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @Tue Sep 09 2025 14:38:31 GMT+0000 (Coordinated Universal Time) */
|
|
4
4
|
.LayoutGrid__-dslt {
|
|
5
5
|
list-style: none;
|
|
6
6
|
font-weight: inherit;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @Tue Sep 09 2025 14:38:31 GMT+0000 (Coordinated Universal Time) */
|
|
2
2
|
[data-preply-ds-component="LayoutFlex"][data-ds-display="hide"],
|
|
3
3
|
[data-preply-ds-component="LayoutFlex"][data-ds-display*='"_":"hide"'] {
|
|
4
4
|
display: none;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @
|
|
2
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @
|
|
3
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
2
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @Tue Sep 09 2025 14:38:27 GMT+0000 (Coordinated Universal Time) */
|
|
3
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @Tue Sep 09 2025 14:38:31 GMT+0000 (Coordinated Universal Time) */
|
|
4
4
|
[data-preply-ds-component="LayoutFlex"][data-ds-padding="none"],
|
|
5
5
|
[data-preply-ds-component="LayoutFlex"][data-ds-padding*='"_":"none"'] {
|
|
6
6
|
padding: var(--74358d);
|
|
@@ -583,6 +583,18 @@
|
|
|
583
583
|
.LayoutPadding__MyMdq.LayoutPadding--padding-left-4__xkaFb {
|
|
584
584
|
padding-left: var(--590b8d);
|
|
585
585
|
}
|
|
586
|
+
.LayoutPadding__MyMdq.LayoutPadding--padding-top-6__f6-lM {
|
|
587
|
+
padding-top: var(--f30851);
|
|
588
|
+
}
|
|
589
|
+
.LayoutPadding__MyMdq.LayoutPadding--padding-right-6__13Zzt {
|
|
590
|
+
padding-right: var(--f30851);
|
|
591
|
+
}
|
|
592
|
+
.LayoutPadding__MyMdq.LayoutPadding--padding-bottom-6__f-md0 {
|
|
593
|
+
padding-bottom: var(--f30851);
|
|
594
|
+
}
|
|
595
|
+
.LayoutPadding__MyMdq.LayoutPadding--padding-left-6__kXjFo {
|
|
596
|
+
padding-left: var(--f30851);
|
|
597
|
+
}
|
|
586
598
|
.LayoutPadding__MyMdq.LayoutPadding--padding-top-8__-VXK9 {
|
|
587
599
|
padding-top: var(--66b80b);
|
|
588
600
|
}
|
|
@@ -848,6 +860,18 @@
|
|
|
848
860
|
.LayoutPadding__MyMdq.LayoutPadding--narrow-l--padding-left-4__gPVHe {
|
|
849
861
|
padding-left: var(--590b8d);
|
|
850
862
|
}
|
|
863
|
+
.LayoutPadding__MyMdq.LayoutPadding--narrow-l--padding-top-6__TFmG- {
|
|
864
|
+
padding-top: var(--f30851);
|
|
865
|
+
}
|
|
866
|
+
.LayoutPadding__MyMdq.LayoutPadding--narrow-l--padding-right-6__4gNEl {
|
|
867
|
+
padding-right: var(--f30851);
|
|
868
|
+
}
|
|
869
|
+
.LayoutPadding__MyMdq.LayoutPadding--narrow-l--padding-bottom-6__Wj4Fn {
|
|
870
|
+
padding-bottom: var(--f30851);
|
|
871
|
+
}
|
|
872
|
+
.LayoutPadding__MyMdq.LayoutPadding--narrow-l--padding-left-6__VDjyv {
|
|
873
|
+
padding-left: var(--f30851);
|
|
874
|
+
}
|
|
851
875
|
.LayoutPadding__MyMdq.LayoutPadding--narrow-l--padding-top-8__NZMuy {
|
|
852
876
|
padding-top: var(--66b80b);
|
|
853
877
|
}
|
|
@@ -1114,6 +1138,18 @@
|
|
|
1114
1138
|
.LayoutPadding__MyMdq.LayoutPadding--medium-s--padding-left-4__PdQHK {
|
|
1115
1139
|
padding-left: var(--590b8d);
|
|
1116
1140
|
}
|
|
1141
|
+
.LayoutPadding__MyMdq.LayoutPadding--medium-s--padding-top-6__pUjKJ {
|
|
1142
|
+
padding-top: var(--f30851);
|
|
1143
|
+
}
|
|
1144
|
+
.LayoutPadding__MyMdq.LayoutPadding--medium-s--padding-right-6__GL8op {
|
|
1145
|
+
padding-right: var(--f30851);
|
|
1146
|
+
}
|
|
1147
|
+
.LayoutPadding__MyMdq.LayoutPadding--medium-s--padding-bottom-6__9oE97 {
|
|
1148
|
+
padding-bottom: var(--f30851);
|
|
1149
|
+
}
|
|
1150
|
+
.LayoutPadding__MyMdq.LayoutPadding--medium-s--padding-left-6__opxyy {
|
|
1151
|
+
padding-left: var(--f30851);
|
|
1152
|
+
}
|
|
1117
1153
|
.LayoutPadding__MyMdq.LayoutPadding--medium-s--padding-top-8__xQP0m {
|
|
1118
1154
|
padding-top: var(--66b80b);
|
|
1119
1155
|
}
|
|
@@ -1380,6 +1416,18 @@
|
|
|
1380
1416
|
.LayoutPadding__MyMdq.LayoutPadding--medium-l--padding-left-4__Lt30f {
|
|
1381
1417
|
padding-left: var(--590b8d);
|
|
1382
1418
|
}
|
|
1419
|
+
.LayoutPadding__MyMdq.LayoutPadding--medium-l--padding-top-6__IrQpd {
|
|
1420
|
+
padding-top: var(--f30851);
|
|
1421
|
+
}
|
|
1422
|
+
.LayoutPadding__MyMdq.LayoutPadding--medium-l--padding-right-6__kLl9G {
|
|
1423
|
+
padding-right: var(--f30851);
|
|
1424
|
+
}
|
|
1425
|
+
.LayoutPadding__MyMdq.LayoutPadding--medium-l--padding-bottom-6__DiWSE {
|
|
1426
|
+
padding-bottom: var(--f30851);
|
|
1427
|
+
}
|
|
1428
|
+
.LayoutPadding__MyMdq.LayoutPadding--medium-l--padding-left-6__EU5iC {
|
|
1429
|
+
padding-left: var(--f30851);
|
|
1430
|
+
}
|
|
1383
1431
|
.LayoutPadding__MyMdq.LayoutPadding--medium-l--padding-top-8__-Uohk {
|
|
1384
1432
|
padding-top: var(--66b80b);
|
|
1385
1433
|
}
|
|
@@ -1646,6 +1694,18 @@
|
|
|
1646
1694
|
.LayoutPadding__MyMdq.LayoutPadding--wide-s--padding-left-4__ytoti {
|
|
1647
1695
|
padding-left: var(--590b8d);
|
|
1648
1696
|
}
|
|
1697
|
+
.LayoutPadding__MyMdq.LayoutPadding--wide-s--padding-top-6__U8iUC {
|
|
1698
|
+
padding-top: var(--f30851);
|
|
1699
|
+
}
|
|
1700
|
+
.LayoutPadding__MyMdq.LayoutPadding--wide-s--padding-right-6__k8QyJ {
|
|
1701
|
+
padding-right: var(--f30851);
|
|
1702
|
+
}
|
|
1703
|
+
.LayoutPadding__MyMdq.LayoutPadding--wide-s--padding-bottom-6__hr1OF {
|
|
1704
|
+
padding-bottom: var(--f30851);
|
|
1705
|
+
}
|
|
1706
|
+
.LayoutPadding__MyMdq.LayoutPadding--wide-s--padding-left-6__GeYwX {
|
|
1707
|
+
padding-left: var(--f30851);
|
|
1708
|
+
}
|
|
1649
1709
|
.LayoutPadding__MyMdq.LayoutPadding--wide-s--padding-top-8__KseoD {
|
|
1650
1710
|
padding-top: var(--66b80b);
|
|
1651
1711
|
}
|
|
@@ -1912,6 +1972,18 @@
|
|
|
1912
1972
|
.LayoutPadding__MyMdq.LayoutPadding--wide-l--padding-left-4__SZyKD {
|
|
1913
1973
|
padding-left: var(--590b8d);
|
|
1914
1974
|
}
|
|
1975
|
+
.LayoutPadding__MyMdq.LayoutPadding--wide-l--padding-top-6__rJwJK {
|
|
1976
|
+
padding-top: var(--f30851);
|
|
1977
|
+
}
|
|
1978
|
+
.LayoutPadding__MyMdq.LayoutPadding--wide-l--padding-right-6__FtB2Z {
|
|
1979
|
+
padding-right: var(--f30851);
|
|
1980
|
+
}
|
|
1981
|
+
.LayoutPadding__MyMdq.LayoutPadding--wide-l--padding-bottom-6__6o8N3 {
|
|
1982
|
+
padding-bottom: var(--f30851);
|
|
1983
|
+
}
|
|
1984
|
+
.LayoutPadding__MyMdq.LayoutPadding--wide-l--padding-left-6__QjBYB {
|
|
1985
|
+
padding-left: var(--f30851);
|
|
1986
|
+
}
|
|
1915
1987
|
.LayoutPadding__MyMdq.LayoutPadding--wide-l--padding-top-8__YQ-JN {
|
|
1916
1988
|
padding-top: var(--66b80b);
|
|
1917
1989
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @Tue Sep 09 2025 14:38:31 GMT+0000 (Coordinated Universal Time) */
|
|
2
2
|
[data-preply-ds-component="LayoutFlex"][data-ds-relative="true"],
|
|
3
3
|
[data-preply-ds-component="LayoutFlex"][data-ds-relative*='"_":true'] {
|
|
4
4
|
position: relative;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @
|
|
2
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @Tue Sep 09 2025 14:38:27 GMT+0000 (Coordinated Universal Time) */
|
|
2
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
3
3
|
.TextAccent__AfPNQ.TextAccent--accent-default__rjbSO {
|
|
4
4
|
color: var(--aface6);
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/breakpoints/web-core-breakpoints-less.ts @Tue Sep 09 2025 14:38:31 GMT+0000 (Coordinated Universal Time) */
|
|
2
2
|
.TextCentered__7KaTF.TextCentered--centered__4f-qW {
|
|
3
3
|
text-align: center;
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @
|
|
2
|
-
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @
|
|
1
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/types/web-core-options-less.ts @Tue Sep 09 2025 14:38:27 GMT+0000 (Coordinated Universal Time) */
|
|
2
|
+
/* AUTO GENERATED by support/tools/src/tool/code-generator/output/tokens/web-core-tokens-less.ts @Tue Sep 09 2025 14:38:28 GMT+0000 (Coordinated Universal Time) */
|
|
3
3
|
.TextWeight__nr38y.TextWeight--weight-400__FwN8u {
|
|
4
4
|
font-weight: var(--73984e);
|
|
5
5
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { FC, ReactElement } from 'react';
|
|
2
|
+
import { Dataset } from '@preply/ds-core';
|
|
3
|
+
export type BubbleCounterProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The counter's current value;
|
|
6
|
+
*
|
|
7
|
+
* - If `undefined`, the counter is not rendered.
|
|
8
|
+
* - If above `limit`, the `limit` value is rendered instead, with a `+`
|
|
9
|
+
* suffix.
|
|
10
|
+
*/
|
|
11
|
+
count?: number;
|
|
12
|
+
/**
|
|
13
|
+
* If `true`, the counter will render even if `count` is `undefined`.
|
|
14
|
+
*
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
showEmpty?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @default 99
|
|
20
|
+
*/
|
|
21
|
+
limit?: number;
|
|
22
|
+
/**
|
|
23
|
+
* @default large
|
|
24
|
+
*/
|
|
25
|
+
size?: 'small' | 'medium' | 'large';
|
|
26
|
+
/**
|
|
27
|
+
* @default dark
|
|
28
|
+
*/
|
|
29
|
+
variant?: 'light' | 'dark';
|
|
30
|
+
/**
|
|
31
|
+
* When provided, the `BubbleCounter` will position itself as an indicator
|
|
32
|
+
* overlay above the target child element.
|
|
33
|
+
*
|
|
34
|
+
* This is intended to work on just one child, but will not throw errors if
|
|
35
|
+
* you pass multiple children in order to avoid breaking UX unnecessarily.
|
|
36
|
+
*/
|
|
37
|
+
children?: ReactElement;
|
|
38
|
+
dataset?: Dataset;
|
|
39
|
+
};
|
|
40
|
+
export declare const BubbleCounter: FC<BubbleCounterProps>;
|
|
41
|
+
//# sourceMappingURL=BubbleCounter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BubbleCounter.d.ts","sourceRoot":"","sources":["../../../src/components/BubbleCounter/BubbleCounter.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAM/C,MAAM,MAAM,kBAAkB,GAAG;IAC7B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA6ChD,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getDatasetProps } from "@preply/ds-web-core";
|
|
3
|
+
import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
|
|
4
|
+
import { b as bubbleCounterStyles } from "../../BubbleCounter.module-QMwXWFIS.js";
|
|
5
|
+
const BubbleCounter = ({
|
|
6
|
+
count,
|
|
7
|
+
showEmpty = false,
|
|
8
|
+
limit = 99,
|
|
9
|
+
size = "large",
|
|
10
|
+
variant = "dark",
|
|
11
|
+
children,
|
|
12
|
+
dataset
|
|
13
|
+
}) => {
|
|
14
|
+
if (count === void 0 && !showEmpty) {
|
|
15
|
+
return children != null ? children : /* @__PURE__ */ jsx(Fragment, {});
|
|
16
|
+
}
|
|
17
|
+
const counter = /* @__PURE__ */ jsx("span", { className: [bubbleCounterStyles.bubbleCounter, bubbleCounterStyles[`size-${size}`], bubbleCounterStyles[`variant-${variant}`]].join(" "), ...getDatasetProps(dataset, {
|
|
18
|
+
preplyDsComponent: webComponentNames.BubbleCounter
|
|
19
|
+
}), children: typeof count === "number" && /* eslint-disable-next-line formatjs/no-literal-string-in-jsx */
|
|
20
|
+
(count > limit ? `${limit}+` : count) });
|
|
21
|
+
if (!children) {
|
|
22
|
+
return counter;
|
|
23
|
+
}
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", { className: bubbleCounterStyles.childTargetOverlay, children: [
|
|
25
|
+
counter,
|
|
26
|
+
children
|
|
27
|
+
] });
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
BubbleCounter
|
|
31
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Orientation } from '../../utils/Orientation';
|
|
3
|
+
import { ChipButtonProps } from './private/ChipsPrimitive';
|
|
4
|
+
import { Dataset } from '@preply/ds-core';
|
|
5
|
+
export type CommonChipsProps<T> = {
|
|
6
|
+
/** Current value of the chips. When provided, the component operates in controlled mode */
|
|
7
|
+
value?: T;
|
|
8
|
+
/** Default value for uncontrolled usage. Will be ignored if `value` is provided */
|
|
9
|
+
defaultValue?: T;
|
|
10
|
+
/** Callback fired when the value changes. Receives the new value as an argument */
|
|
11
|
+
onValueChange?: (value: T) => void;
|
|
12
|
+
/** Layout orientation of the chips group. @default 'horizontal'*/
|
|
13
|
+
orientation?: Orientation;
|
|
14
|
+
/** Accessible label for the chips group. Required for screen reader users */
|
|
15
|
+
'aria-label': string;
|
|
16
|
+
/** If the chips control other elements on the page, use `aria-controls` with the target element's ID. */
|
|
17
|
+
'aria-controls'?: string;
|
|
18
|
+
dataset?: Dataset;
|
|
19
|
+
} & ({
|
|
20
|
+
children: ReactNode | ReactNode[];
|
|
21
|
+
items?: never;
|
|
22
|
+
} | {
|
|
23
|
+
children?: never;
|
|
24
|
+
items: (Omit<ChipsItemProps, 'value' | 'dsInternalSimulation' | 'children'> & {
|
|
25
|
+
value: T extends unknown[] ? NonNullable<T[number]> : NonNullable<T>;
|
|
26
|
+
label: ReactNode;
|
|
27
|
+
})[];
|
|
28
|
+
});
|
|
29
|
+
export type ChipsItemProps = Pick<ChipButtonProps, 'icon' | 'countryFlagCode' | 'disabled' | 'dsInternalSimulation'> & {
|
|
30
|
+
/** Unique identifier for this chip. Used for selection tracking */
|
|
31
|
+
value: string;
|
|
32
|
+
/** Content to display inside the chip */
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
/** Optional numeric counter to display alongside the chip label */
|
|
35
|
+
counter?: number;
|
|
36
|
+
dataset?: Dataset;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=Chips.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chips.types.d.ts","sourceRoot":"","sources":["../../../src/components/Chips/Chips.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAC9B,2FAA2F;IAC3F,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,mFAAmF;IACnF,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,mFAAmF;IACnF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IACnC,kEAAkE;IAClE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,yGAAyG;IACzG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,CACE;IACI,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC;CACjB,GACD;IACI,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,KAAK,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,sBAAsB,GAAG,UAAU,CAAC,GAAG;QAC1E,KAAK,EAAE,CAAC,SAAS,OAAO,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QACrE,KAAK,EAAE,SAAS,CAAC;KACpB,CAAC,EAAE,CAAC;CACR,CACN,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,IAAI,CAC7B,eAAe,EACf,MAAM,GAAG,iBAAiB,GAAG,UAAU,GAAG,sBAAsB,CACnE,GAAG;IACA,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,QAAQ,EAAE,SAAS,CAAC;IACpB,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { default as React, PropsWithRef, RefAttributes } from 'react';
|
|
2
|
+
import { ChipsItemProps, CommonChipsProps } from './Chips.types';
|
|
3
|
+
export type DismissibleChipsProps<T extends string> = CommonChipsProps<T[]>;
|
|
4
|
+
export type DismissibleChipsItemProps = ChipsItemProps;
|
|
5
|
+
interface DismissibleChipsWithRef {
|
|
6
|
+
<T extends string>(props: PropsWithRef<DismissibleChipsProps<T> & RefAttributes<HTMLUListElement>>): React.ReactElement;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A chips component for displaying dismissible/removable items.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* **Keyboard interactions:**
|
|
13
|
+
* - **Tab** to enter/exit the component (uses [roving tabindex pattern](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex))
|
|
14
|
+
* - **Arrow keys** to navigate between chips within the group
|
|
15
|
+
* - **Space/Enter** to remove the focused chip
|
|
16
|
+
* - **Delete/Backspace** to remove the focused chip
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <DismissibleChips
|
|
21
|
+
* aria-label="Selected skills"
|
|
22
|
+
* defaultValue={['vocabulary', 'speaking', 'listening']}
|
|
23
|
+
* >
|
|
24
|
+
* <DismissibleChipsItem value="vocabulary">Vocabulary</DismissibleChipsItem>
|
|
25
|
+
* <DismissibleChipsItem value="speaking">Speaking</DismissibleChipsItem>
|
|
26
|
+
* <DismissibleChipsItem value="listening">Listening</DismissibleChipsItem>
|
|
27
|
+
* </DismissibleChips>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const DismissibleChips: DismissibleChipsWithRef;
|
|
31
|
+
/**
|
|
32
|
+
* Individual dismissible chip item for use within DismissibleChips.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <DismissibleChipsItem value="english">
|
|
37
|
+
* English
|
|
38
|
+
* </DismissibleChipsItem>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare const DismissibleChipsItem: React.ForwardRefExoticComponent<Pick<import('./private/ChipsPrimitive').ChipButtonProps, "disabled" | "dsInternalSimulation" | "icon" | "countryFlagCode"> & {
|
|
42
|
+
value: string;
|
|
43
|
+
children: React.ReactNode;
|
|
44
|
+
counter?: number | undefined;
|
|
45
|
+
dataset?: import('@preply/ds-core').Dataset | undefined;
|
|
46
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=DismissibleChips.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DismissibleChips.d.ts","sourceRoot":"","sources":["../../../src/components/Chips/DismissibleChips.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAoC,YAAY,EAAO,aAAa,EAAE,MAAM,OAAO,CAAC;AAclG,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAejE,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,MAAM,IAAI,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC;AAC5E,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC;AAGvD,UAAU,uBAAuB;IAC7B,CAAC,CAAC,SAAS,MAAM,EACb,KAAK,EAAE,YAAY,CAAC,qBAAqB,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAAC,GAChF,KAAK,CAAC,YAAY,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,gBAAgB,yBAkDA,CAAC;AAE9B;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;;;;;2CA4DhC,CAAC"}
|