@preply/ds-web-lib 11.2.0 → 11.3.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-DWYyIhpM.js → Accordion-OUCMnLE8.js} +2 -7
- package/dist/{Checkbox-CCRFUeUv.js → Checkbox-CSLZpqgE.js} +4 -5
- package/dist/{ChipsPrimitive-D9iTGyhy.js → ChipsPrimitive-CbTMHL4C.js} +1 -2
- package/dist/{Link-Bgs5_cuZ.js → Link-BPEWniLB.js} +2 -13
- package/dist/{PreplyLogo-PXWQpm9O.js → PreplyLogo-B7PvFxL2.js} +3 -0
- package/dist/{Stars-B1ZzV72Y.js → Stars-Ck5nxipT.js} +1 -3
- package/dist/{Tooltip-DAQ4kJ-D.js → Tooltip-bKYrcDdB.js} +2 -3
- package/dist/assets/Accordion.css +3 -12
- 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 +4 -4
- package/dist/assets/Checkbox.css +2 -3
- package/dist/assets/Chips.css +2 -2
- package/dist/assets/ChipsPrimitive.css +4 -9
- package/dist/assets/CountryFlag.css +1 -1
- package/dist/assets/Dialog.css +3 -3
- 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 +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 +13 -23
- 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 +3 -6
- package/dist/assets/Slider.css +1 -1
- package/dist/assets/Spinner.css +3 -3
- package/dist/assets/Stars.css +3 -18
- 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/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/components/Accordion/Accordion.d.ts +0 -10
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +0 -10
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Chips/Chips.types.d.ts +2 -2
- package/dist/components/Chips/Chips.types.d.ts.map +1 -1
- package/dist/components/Chips/DismissibleChips.d.ts +1 -1
- package/dist/components/Chips/DismissibleChips.d.ts.map +1 -1
- package/dist/components/Chips/DismissibleChips.js +2 -3
- package/dist/components/Chips/MultiSelectChips.d.ts +1 -1
- package/dist/components/Chips/MultiSelectChips.d.ts.map +1 -1
- package/dist/components/Chips/MultiSelectChips.js +2 -3
- package/dist/components/Chips/SingleSelectChips.d.ts +1 -1
- package/dist/components/Chips/SingleSelectChips.d.ts.map +1 -1
- package/dist/components/Chips/SingleSelectChips.js +2 -3
- package/dist/components/Chips/private/ChipsPrimitive.d.ts +0 -10
- package/dist/components/Chips/private/ChipsPrimitive.d.ts.map +1 -1
- package/dist/components/Chips/private/ChipsPrimitive.js +1 -1
- package/dist/components/Dialog/primitives/DialogFooter.d.ts.map +1 -1
- package/dist/components/Dialog/primitives/DialogFooter.js +23 -9
- package/dist/components/Link/Link.d.ts +0 -10
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.js +1 -1
- package/dist/components/PreplyLogo/PreplyLogo.d.ts +1 -1
- package/dist/components/PreplyLogo/PreplyLogo.d.ts.map +1 -1
- package/dist/components/PreplyLogo/PreplyLogo.js +1 -1
- package/dist/components/Rating/Rating.js +1 -1
- package/dist/components/Rating/RatingInput.d.ts +0 -5
- package/dist/components/Rating/RatingInput.d.ts.map +1 -1
- package/dist/components/Rating/RatingInput.js +4 -4
- package/dist/components/Rating/Stars.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +0 -5
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/index.js +5 -5
- package/dist/index.js +5 -5
- package/package.json +12 -12
|
@@ -11,19 +11,33 @@ var DialogFooter = ({ children, className, dataset, ...props }) => {
|
|
|
11
11
|
const classNames = [Dialog_module_default.footer, className].filter(Boolean).join(" ");
|
|
12
12
|
const datasetProps = getDatasetProps(dataset, { preplyDsComponent: webComponentNames.DialogFooter });
|
|
13
13
|
/**
|
|
14
|
-
* Detects if dialog is fully scrolled to the bottom and adds border to the footer
|
|
14
|
+
* Detects if dialog is fully scrolled to the bottom and adds border to the footer.
|
|
15
|
+
* Uses ResizeObserver to recreate the IntersectionObserver when the footer height changes.
|
|
15
16
|
*/
|
|
16
17
|
useLayoutEffect(() => {
|
|
17
18
|
if (!footerRef.current || !scrollDetectorRef.current) return;
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
const footer = footerRef.current;
|
|
20
|
+
const scrollDetector = scrollDetectorRef.current;
|
|
21
|
+
let intersectionObserver = null;
|
|
22
|
+
const setupIntersectionObserver = () => {
|
|
23
|
+
intersectionObserver === null || intersectionObserver === void 0 || intersectionObserver.disconnect();
|
|
24
|
+
intersectionObserver = new IntersectionObserver(([entry]) => {
|
|
25
|
+
footer.toggleAttribute("data-sticky", !entry.isIntersecting);
|
|
26
|
+
}, {
|
|
27
|
+
root: footer.closest("[role=dialog]"),
|
|
28
|
+
rootMargin: `0px 0px -${footer.offsetHeight}px 0px`
|
|
29
|
+
});
|
|
30
|
+
intersectionObserver.observe(scrollDetector);
|
|
31
|
+
};
|
|
32
|
+
setupIntersectionObserver();
|
|
33
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
34
|
+
setupIntersectionObserver();
|
|
24
35
|
});
|
|
25
|
-
|
|
26
|
-
return () =>
|
|
36
|
+
resizeObserver.observe(footer);
|
|
37
|
+
return () => {
|
|
38
|
+
intersectionObserver === null || intersectionObserver === void 0 || intersectionObserver.disconnect();
|
|
39
|
+
resizeObserver.disconnect();
|
|
40
|
+
};
|
|
27
41
|
}, []);
|
|
28
42
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
29
43
|
className: Dialog_module_default.scrollEndDetector,
|
|
@@ -30,11 +30,6 @@ export type Props = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'down
|
|
|
30
30
|
*/
|
|
31
31
|
inline?: boolean;
|
|
32
32
|
noUnderline?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated This is meant for internal DS usage only. Do not use it in your code.
|
|
35
|
-
* @ignore
|
|
36
|
-
*/
|
|
37
|
-
dsInternalSimulation?: 'hover' | 'active';
|
|
38
33
|
};
|
|
39
34
|
/**
|
|
40
35
|
* This is an inline element and will inherit font-size, line-height and
|
|
@@ -72,10 +67,5 @@ export declare const Link: React.ForwardRefExoticComponent<Pick<React.AnchorHTML
|
|
|
72
67
|
*/
|
|
73
68
|
inline?: boolean | undefined;
|
|
74
69
|
noUnderline?: boolean | undefined;
|
|
75
|
-
/**
|
|
76
|
-
* @deprecated This is meant for internal DS usage only. Do not use it in your code.
|
|
77
|
-
* @ignore
|
|
78
|
-
*/
|
|
79
|
-
dsInternalSimulation?: "hover" | "active" | undefined;
|
|
80
70
|
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
81
71
|
//# sourceMappingURL=Link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/Link/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAwB,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAU7E,OAAO,KAAK,EAAE,EAEV,YAAY,EACZ,SAAS,EAET,oBAAoB,EACvB,MAAM,OAAO,CAAC;AAKf,MAAM,MAAM,KAAK,GAAG,IAAI,CACpB,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,MAAM,GAAG,UAAU,GAAG,SAAS,CAClC,GAAG;IACA,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/Link/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAwB,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAU7E,OAAO,KAAK,EAAE,EAEV,YAAY,EACZ,SAAS,EAET,oBAAoB,EACvB,MAAM,OAAO,CAAC;AAKf,MAAM,MAAM,KAAK,GAAG,IAAI,CACpB,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,MAAM,GAAG,UAAU,GAAG,SAAS,CAClC,GAAG;IACA,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;IArCb;;OAEG;;;IAGH;;;OAGG;;;IAIH;;OAEG;;IAEH;;;;;OAKG;;eAEQ,SAAS;IACpB;;OAEG;;;2CA+DL,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Link } from "../../Link-
|
|
1
|
+
import { t as Link } from "../../Link-BPEWniLB.js";
|
|
2
2
|
export { Link };
|
|
@@ -21,7 +21,7 @@ export type Props = {
|
|
|
21
21
|
/**
|
|
22
22
|
* @default 'm'
|
|
23
23
|
*/
|
|
24
|
-
size?: 'xs' | 's' | 'm' | 'l';
|
|
24
|
+
size?: 'xxs' | 'xs' | 's' | 'm' | 'l';
|
|
25
25
|
};
|
|
26
26
|
export declare const PreplyLogo: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLSpanElement>>;
|
|
27
27
|
//# sourceMappingURL=PreplyLogo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreplyLogo.d.ts","sourceRoot":"","sources":["../../../src/components/PreplyLogo/PreplyLogo.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,MAAM,MAAM,KAAK,GAAG;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"PreplyLogo.d.ts","sourceRoot":"","sources":["../../../src/components/PreplyLogo/PreplyLogo.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,MAAM,MAAM,KAAK,GAAG;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CACzC,CAAC;AAmCF,eAAO,MAAM,UAAU,+EAuCrB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PreplyLogo } from "../../PreplyLogo-
|
|
1
|
+
import { t as PreplyLogo } from "../../PreplyLogo-B7PvFxL2.js";
|
|
2
2
|
export { PreplyLogo };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as index_module_default, t as Stars } from "../../Stars-
|
|
2
|
+
import { n as index_module_default, t as Stars } from "../../Stars-Ck5nxipT.js";
|
|
3
3
|
import { roundToHalfDecimal } from "./utils/roundToHalfDecimal.js";
|
|
4
4
|
import { useLocalizations } from "./hooks/useLocalizations.js";
|
|
5
5
|
import "react";
|
|
@@ -61,11 +61,6 @@ export type RatingInputProps = {
|
|
|
61
61
|
* <Rating dataset={{ 'qa-id': 'accept-conditions' }} /> // will add data-qa-id="accept-conditions" to the HTML element
|
|
62
62
|
*/
|
|
63
63
|
dataset?: Dataset;
|
|
64
|
-
/**
|
|
65
|
-
* @deprecated This is meant for internal DS usage only. Do not use it in your code.
|
|
66
|
-
* @ignore
|
|
67
|
-
*/
|
|
68
|
-
dsInternalSimulation?: 'focus' | 'hover';
|
|
69
64
|
onBlur?: InputHTMLAttributes<HTMLInputElement>['onBlur'];
|
|
70
65
|
onFocus?: InputHTMLAttributes<HTMLInputElement>['onFocus'];
|
|
71
66
|
onChange?: InputHTMLAttributes<HTMLInputElement>['onChange'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RatingInput.d.ts","sourceRoot":"","sources":["../../../src/components/Rating/RatingInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAc,KAAK,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAe/C,MAAM,MAAM,gBAAgB,GAAG;IAC3B;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,cAAc,CAAC,CAAC;IAEvE;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB
|
|
1
|
+
{"version":3,"file":"RatingInput.d.ts","sourceRoot":"","sources":["../../../src/components/Rating/RatingInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAc,KAAK,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAe/C,MAAM,MAAM,gBAAgB,GAAG;IAC3B;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,cAAc,CAAC,CAAC;IAEvE;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,MAAM,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC;IACzD,OAAO,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC;IAC3D,QAAQ,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,CAAC;IAC7D,YAAY,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,CAAC;IACnE,iBAAiB,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC7E,kBAAkB,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,kBAAkB,CAAC,CAAC;CAClF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,2FAyEtB,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as index_module_default, t as Stars } from "../../Stars-
|
|
2
|
+
import { n as index_module_default, t as Stars } from "../../Stars-Ck5nxipT.js";
|
|
3
3
|
import { roundToHalfDecimal } from "./utils/roundToHalfDecimal.js";
|
|
4
4
|
import { useLocalizations } from "./hooks/useLocalizations.js";
|
|
5
5
|
import { useHoverPercentage } from "./hooks/useHoverPercentage.js";
|
|
6
6
|
import { useInputState } from "./hooks/useInputState.js";
|
|
7
7
|
import { useHasError } from "./hooks/useHasError.js";
|
|
8
8
|
import { forwardRef } from "react";
|
|
9
|
-
import { getDatasetProps, moduleClassNames
|
|
9
|
+
import { getDatasetProps, moduleClassNames } from "@preply/ds-web-core";
|
|
10
10
|
import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/Rating/RatingInput.tsx
|
|
@@ -17,7 +17,7 @@ var amountOfStars = 5;
|
|
|
17
17
|
* If you need to visualize the current rating without the users changing it, look at Rating.
|
|
18
18
|
* @see Rating
|
|
19
19
|
*/
|
|
20
|
-
var RatingInput = forwardRef(function Rating({ id, name, value: valueProp, defaultValue = 0, onValueChange, onChange: onChangeProp, hasError: hasErrorProp, required, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, dataset,
|
|
20
|
+
var RatingInput = forwardRef(function Rating({ id, name, value: valueProp, defaultValue = 0, onValueChange, onChange: onChangeProp, hasError: hasErrorProp, required, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, dataset, onBlur, onFocus, "aria-invalid": ariaInvalid }, ref) {
|
|
21
21
|
const { value, onChange } = useInputState({
|
|
22
22
|
onChange: onChangeProp,
|
|
23
23
|
onValueChange,
|
|
@@ -33,7 +33,7 @@ var RatingInput = forwardRef(function Rating({ id, name, value: valueProp, defau
|
|
|
33
33
|
const { hoverValue, ref: hoverRef } = useHoverPercentage({ amountOfStars });
|
|
34
34
|
const shownValue = typeof hoverValue === "number" ? hoverValue : roundedValue;
|
|
35
35
|
return /* @__PURE__ */ jsxs("div", {
|
|
36
|
-
className: [...moduleClassNames(index_module_default, "rating"), ...moduleClassNames(index_module_default, "ratingInput"
|
|
36
|
+
className: [...moduleClassNames(index_module_default, "rating"), ...moduleClassNames(index_module_default, "ratingInput")].join(" "),
|
|
37
37
|
...getDatasetProps(dataset, { preplyDsComponent: webComponentNames.RatingInput }),
|
|
38
38
|
ref: hoverRef,
|
|
39
39
|
children: [/* @__PURE__ */ jsx(Stars, { filledPerc: shownValue / amountOfStars }), /* @__PURE__ */ jsx("input", {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Stars } from "../../Stars-
|
|
1
|
+
import { t as Stars } from "../../Stars-Ck5nxipT.js";
|
|
2
2
|
export { Stars };
|
|
@@ -30,11 +30,6 @@ export type TooltipProps = {
|
|
|
30
30
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
31
31
|
onOpenChange?: (open: boolean) => void;
|
|
32
32
|
dataset?: Dataset;
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated This is meant for internal DS usage only. Do not use it in your code.
|
|
35
|
-
* @ignore
|
|
36
|
-
*/
|
|
37
|
-
dsInternalSimulation?: 'open';
|
|
38
33
|
};
|
|
39
34
|
/**
|
|
40
35
|
* Tooltip component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAoB,SAAS,EAAc,MAAM,OAAO,CAAC;AAIrF,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI1C;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,KAAK,OAAO,GAAG,OAAO,GAAG,iBAAiB,CAAC;AAE3C,MAAM,MAAM,YAAY,GAAG;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAoB,SAAS,EAAc,MAAM,OAAO,CAAC;AAIrF,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI1C;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,KAAK,OAAO,GAAG,OAAO,GAAG,iBAAiB,CAAC;AAE3C,MAAM,MAAM,YAAY,GAAG;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,kFAgFlB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Tooltip, t as LONG_PRESS_DELAY } from "../../Tooltip-
|
|
1
|
+
import { n as Tooltip, t as LONG_PRESS_DELAY } from "../../Tooltip-bKYrcDdB.js";
|
|
2
2
|
export { LONG_PRESS_DELAY, Tooltip };
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Icon } from "../Icon-CKiNINGw.js";
|
|
2
2
|
import { t as Text } from "../Text-s6A-oZRo.js";
|
|
3
|
-
import { i as AccordionItem, n as AccordionContent, r as AccordionHeader, t as Accordion } from "../Accordion-
|
|
3
|
+
import { i as AccordionItem, n as AccordionContent, r as AccordionHeader, t as Accordion } from "../Accordion-OUCMnLE8.js";
|
|
4
4
|
import { t as AlertDialog } from "../AlertDialog-DX-Lt1Pg.js";
|
|
5
5
|
import { t as Heading } from "../Heading-DGXWX9aE.js";
|
|
6
6
|
import { t as Button } from "../Button-RM_5Cccy.js";
|
|
@@ -19,7 +19,7 @@ import { t as IconButton } from "../IconButton-wdbk-52H.js";
|
|
|
19
19
|
import { CalloutBannerDismissButton } from "./CalloutBanner/primitives/CalloutBannerDismissButton.js";
|
|
20
20
|
import { CalloutBannerCriticalIcon, CalloutBannerIcon, CalloutBannerInfoIcon, CalloutBannerPositiveIcon, CalloutBannerWarningIcon } from "./CalloutBanner/primitives/CalloutBannerIcon.js";
|
|
21
21
|
import { CalloutBannerText } from "./CalloutBanner/primitives/CalloutBannerText.js";
|
|
22
|
-
import { t as Checkbox } from "../Checkbox-
|
|
22
|
+
import { t as Checkbox } from "../Checkbox-CSLZpqgE.js";
|
|
23
23
|
import { t as CountryFlag } from "../CountryFlag-U3Q7oDNa.js";
|
|
24
24
|
import { SingleSelectChips, SingleSelectChipsItem } from "./Chips/SingleSelectChips.js";
|
|
25
25
|
import { MultiSelectChips, MultiSelectChipsItem } from "./Chips/MultiSelectChips.js";
|
|
@@ -45,12 +45,12 @@ import { t as LayoutFlex } from "../LayoutFlex-CE_gsa8S.js";
|
|
|
45
45
|
import { t as LayoutFlexItem } from "../LayoutFlexItem-savJs9eF.js";
|
|
46
46
|
import { LayoutGrid } from "./LayoutGrid/LayoutGrid.js";
|
|
47
47
|
import { t as LayoutGridItem } from "../LayoutGridItem-DS6uJDjH.js";
|
|
48
|
-
import { t as Link } from "../Link-
|
|
48
|
+
import { t as Link } from "../Link-BPEWniLB.js";
|
|
49
49
|
import { t as Loader } from "../Loader-CoaelI0i.js";
|
|
50
50
|
import { NumberField } from "./NumberField/NumberField.js";
|
|
51
51
|
import { ObserveIntersection } from "./ObserveIntersection/ObserveIntersection.js";
|
|
52
52
|
import { t as PasswordField } from "../PasswordField-C6m9yNGI.js";
|
|
53
|
-
import { t as PreplyLogo } from "../PreplyLogo-
|
|
53
|
+
import { t as PreplyLogo } from "../PreplyLogo-B7PvFxL2.js";
|
|
54
54
|
import { t as ProgressBar } from "../ProgressBar-DhnU_zOd.js";
|
|
55
55
|
import { Rating } from "./Rating/Rating.js";
|
|
56
56
|
import { RatingInput } from "./Rating/RatingInput.js";
|
|
@@ -66,7 +66,7 @@ import { TextField } from "./TextField/TextField.js";
|
|
|
66
66
|
import { t as TextHighlighted } from "../TextHighlighted-D48Jl_vd.js";
|
|
67
67
|
import { t as TextInline } from "../TextInline-bfkJcLte.js";
|
|
68
68
|
import { n as ToastProvider, r as showToast } from "../Toast-BKVvAzPW.js";
|
|
69
|
-
import { n as Tooltip } from "../Tooltip-
|
|
69
|
+
import { n as Tooltip } from "../Tooltip-bKYrcDdB.js";
|
|
70
70
|
import { IntlFormattedAggregatedDateTime } from "./IntlFormatted/IntlFormattedAggregatedDateTime.js";
|
|
71
71
|
import { IntlFormattedCurrency } from "./IntlFormatted/IntlFormattedCurrency.js";
|
|
72
72
|
import { IntlFormattedDate } from "./IntlFormatted/IntlFormattedDate.js";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Icon } from "./Icon-CKiNINGw.js";
|
|
2
2
|
import { t as Text } from "./Text-s6A-oZRo.js";
|
|
3
|
-
import { i as AccordionItem, n as AccordionContent, r as AccordionHeader, t as Accordion } from "./Accordion-
|
|
3
|
+
import { i as AccordionItem, n as AccordionContent, r as AccordionHeader, t as Accordion } from "./Accordion-OUCMnLE8.js";
|
|
4
4
|
import { t as AlertDialog } from "./AlertDialog-DX-Lt1Pg.js";
|
|
5
5
|
import { t as Heading } from "./Heading-DGXWX9aE.js";
|
|
6
6
|
import { t as Button } from "./Button-RM_5Cccy.js";
|
|
@@ -19,7 +19,7 @@ import { t as IconButton } from "./IconButton-wdbk-52H.js";
|
|
|
19
19
|
import { CalloutBannerDismissButton } from "./components/CalloutBanner/primitives/CalloutBannerDismissButton.js";
|
|
20
20
|
import { CalloutBannerCriticalIcon, CalloutBannerIcon, CalloutBannerInfoIcon, CalloutBannerPositiveIcon, CalloutBannerWarningIcon } from "./components/CalloutBanner/primitives/CalloutBannerIcon.js";
|
|
21
21
|
import { CalloutBannerText } from "./components/CalloutBanner/primitives/CalloutBannerText.js";
|
|
22
|
-
import { t as Checkbox } from "./Checkbox-
|
|
22
|
+
import { t as Checkbox } from "./Checkbox-CSLZpqgE.js";
|
|
23
23
|
import { t as CountryFlag } from "./CountryFlag-U3Q7oDNa.js";
|
|
24
24
|
import { SingleSelectChips, SingleSelectChipsItem } from "./components/Chips/SingleSelectChips.js";
|
|
25
25
|
import { MultiSelectChips, MultiSelectChipsItem } from "./components/Chips/MultiSelectChips.js";
|
|
@@ -45,12 +45,12 @@ import { t as LayoutFlex } from "./LayoutFlex-CE_gsa8S.js";
|
|
|
45
45
|
import { t as LayoutFlexItem } from "./LayoutFlexItem-savJs9eF.js";
|
|
46
46
|
import { LayoutGrid } from "./components/LayoutGrid/LayoutGrid.js";
|
|
47
47
|
import { t as LayoutGridItem } from "./LayoutGridItem-DS6uJDjH.js";
|
|
48
|
-
import { t as Link } from "./Link-
|
|
48
|
+
import { t as Link } from "./Link-BPEWniLB.js";
|
|
49
49
|
import { t as Loader } from "./Loader-CoaelI0i.js";
|
|
50
50
|
import { NumberField } from "./components/NumberField/NumberField.js";
|
|
51
51
|
import { ObserveIntersection } from "./components/ObserveIntersection/ObserveIntersection.js";
|
|
52
52
|
import { t as PasswordField } from "./PasswordField-C6m9yNGI.js";
|
|
53
|
-
import { t as PreplyLogo } from "./PreplyLogo-
|
|
53
|
+
import { t as PreplyLogo } from "./PreplyLogo-B7PvFxL2.js";
|
|
54
54
|
import { t as ProgressBar } from "./ProgressBar-DhnU_zOd.js";
|
|
55
55
|
import { Rating } from "./components/Rating/Rating.js";
|
|
56
56
|
import { RatingInput } from "./components/Rating/RatingInput.js";
|
|
@@ -66,7 +66,7 @@ import { TextField } from "./components/TextField/TextField.js";
|
|
|
66
66
|
import { t as TextHighlighted } from "./TextHighlighted-D48Jl_vd.js";
|
|
67
67
|
import { t as TextInline } from "./TextInline-bfkJcLte.js";
|
|
68
68
|
import { n as ToastProvider, r as showToast } from "./Toast-BKVvAzPW.js";
|
|
69
|
-
import { n as Tooltip } from "./Tooltip-
|
|
69
|
+
import { n as Tooltip } from "./Tooltip-bKYrcDdB.js";
|
|
70
70
|
import { IntlFormattedAggregatedDateTime } from "./components/IntlFormatted/IntlFormattedAggregatedDateTime.js";
|
|
71
71
|
import { IntlFormattedCurrency } from "./components/IntlFormatted/IntlFormattedCurrency.js";
|
|
72
72
|
import { IntlFormattedDate } from "./components/IntlFormatted/IntlFormattedDate.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@preply/ds-web-lib",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -28,21 +28,21 @@
|
|
|
28
28
|
"sonner": "^2.0.7"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@preply/ds-core": "11.
|
|
32
|
-
"@preply/ds-media-icons": "11.
|
|
33
|
-
"@preply/ds-visual-coverage-preply-component-names": "11.
|
|
34
|
-
"@preply/ds-web-core": "11.
|
|
35
|
-
"@preply/ds-web-root": "11.
|
|
31
|
+
"@preply/ds-core": "11.3.0",
|
|
32
|
+
"@preply/ds-media-icons": "11.3.0",
|
|
33
|
+
"@preply/ds-visual-coverage-preply-component-names": "11.3.0",
|
|
34
|
+
"@preply/ds-web-core": "11.3.0",
|
|
35
|
+
"@preply/ds-web-root": "11.3.0",
|
|
36
36
|
"react": "^16 || ^18",
|
|
37
37
|
"react-dom": "^16 || ^18",
|
|
38
38
|
"react-intl": "^6.5.5"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@preply/ds-core": "11.
|
|
42
|
-
"@preply/ds-media-icons": "11.
|
|
43
|
-
"@preply/ds-visual-coverage-preply-component-names": "11.
|
|
44
|
-
"@preply/ds-web-core": "11.
|
|
45
|
-
"@preply/ds-web-root": "11.
|
|
41
|
+
"@preply/ds-core": "11.3.0",
|
|
42
|
+
"@preply/ds-media-icons": "11.3.0",
|
|
43
|
+
"@preply/ds-visual-coverage-preply-component-names": "11.3.0",
|
|
44
|
+
"@preply/ds-web-core": "11.3.0",
|
|
45
|
+
"@preply/ds-web-root": "11.3.0",
|
|
46
46
|
"@storybook/react-vite": "10.2.19",
|
|
47
47
|
"@testing-library/react": "16.3.0",
|
|
48
48
|
"@types/react-is": "^18.2.0",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"vite-plugin-svgr": "4.5.0",
|
|
59
59
|
"vitest-browser-react": "^0.1.1"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "7715829c87adcf2b4a52d234deb3bf6e0f0d2527"
|
|
62
62
|
}
|