@ultraviolet/plus 3.0.0-beta.16 → 3.0.0-beta.18
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/components/CodeEditor/CodeEditor.d.ts +1 -1
- package/dist/components/CodeEditor/CodeEditor.js +41 -11
- package/dist/components/ContentCard/Skeleton.d.ts +1 -1
- package/dist/components/ContentCard/Skeleton.js +13 -8
- package/dist/components/ContentCard/index.js +131 -51
- package/dist/components/ContentCardGroup/Card.js +63 -22
- package/dist/components/ContentCardGroup/SkeletonCard.d.ts +1 -1
- package/dist/components/ContentCardGroup/SkeletonCard.js +1 -1
- package/dist/components/ContentCardGroup/index.js +11 -6
- package/dist/components/ContentCardGroup/styles.css.js +1 -0
- package/dist/components/Conversation/index.d.ts +9 -9
- package/dist/components/Conversation/index.js +23 -6
- package/dist/components/CustomerSatisfaction/index.d.ts +1 -1
- package/dist/components/CustomerSatisfaction/index.js +68 -39
- package/dist/components/EstimateCost/Components/CustomUnitInput.d.ts +1 -1
- package/dist/components/EstimateCost/Components/CustomUnitInput.js +47 -27
- package/dist/components/EstimateCost/Components/Item.d.ts +1 -1
- package/dist/components/EstimateCost/Components/Item.js +303 -203
- package/dist/components/EstimateCost/Components/LineThrough.d.ts +1 -1
- package/dist/components/EstimateCost/Components/LineThrough.js +8 -2
- package/dist/components/EstimateCost/Components/NumberInput.d.ts +1 -1
- package/dist/components/EstimateCost/Components/NumberInput.js +17 -9
- package/dist/components/EstimateCost/Components/Region.d.ts +1 -1
- package/dist/components/EstimateCost/Components/Region.js +43 -25
- package/dist/components/EstimateCost/Components/Regular.d.ts +1 -1
- package/dist/components/EstimateCost/Components/Regular.js +20 -16
- package/dist/components/EstimateCost/Components/Strong.d.ts +1 -1
- package/dist/components/EstimateCost/Components/Strong.js +11 -10
- package/dist/components/EstimateCost/Components/Unit.d.ts +1 -1
- package/dist/components/EstimateCost/Components/Unit.js +20 -13
- package/dist/components/EstimateCost/Components/Zone.d.ts +1 -1
- package/dist/components/EstimateCost/Components/Zone.js +41 -24
- package/dist/components/EstimateCost/EstimateCost.d.ts +11 -11
- package/dist/components/EstimateCost/EstimateCost.js +61 -10
- package/dist/components/EstimateCost/EstimateCostContent.d.ts +1 -1
- package/dist/components/EstimateCost/EstimateCostContent.js +264 -120
- package/dist/components/EstimateCost/EstimateCostProvider.d.ts +1 -1
- package/dist/components/EstimateCost/EstimateCostProvider.js +24 -21
- package/dist/components/EstimateCost/OverlayComponent.d.ts +1 -1
- package/dist/components/EstimateCost/OverlayComponent.js +53 -41
- package/dist/components/EstimateCost/OverlayContext.d.ts +1 -1
- package/dist/components/EstimateCost/OverlayContext.js +2 -4
- package/dist/components/FAQ/index.d.ts +1 -1
- package/dist/components/FAQ/index.js +1 -1
- package/dist/components/InfoTable/InfoTable.d.ts +3 -3
- package/dist/components/InfoTable/InfoTable.js +10 -4
- package/dist/components/InfoTable/components/Cell.d.ts +1 -1
- package/dist/components/InfoTable/components/Cell.js +24 -4
- package/dist/components/InfoTable/components/Row.d.ts +1 -1
- package/dist/components/InfoTable/components/Row.js +16 -10
- package/dist/components/InfoTable/styles.css.d.ts +0 -1
- package/dist/components/InfoTable/styles.css.js +0 -2
- package/dist/components/Navigation/Footer.d.ts +1 -1
- package/dist/components/Navigation/Footer.js +34 -19
- package/dist/components/Navigation/Header.d.ts +1 -1
- package/dist/components/Navigation/Header.js +12 -9
- package/dist/components/Navigation/Navigation.d.ts +5 -5
- package/dist/components/Navigation/Navigation.js +2 -5
- package/dist/components/Navigation/NavigationContent.d.ts +1 -1
- package/dist/components/Navigation/NavigationContent.js +56 -18
- package/dist/components/Navigation/NavigationProvider.d.ts +1 -1
- package/dist/components/Navigation/NavigationProvider.js +108 -70
- package/dist/components/Navigation/components/Group.d.ts +1 -1
- package/dist/components/Navigation/components/Group.js +20 -19
- package/dist/components/Navigation/components/Item.d.ts +1 -1
- package/dist/components/Navigation/components/Item.js +551 -254
- package/dist/components/Navigation/components/ItemProvider.d.ts +1 -1
- package/dist/components/Navigation/components/ItemProvider.js +2 -4
- package/dist/components/Navigation/components/PinnedItems.d.ts +1 -1
- package/dist/components/Navigation/components/PinnedItems.js +91 -37
- package/dist/components/Navigation/components/Separator.d.ts +1 -1
- package/dist/components/Navigation/components/Separator.js +1 -1
- package/dist/components/Navigation/styles.css.js +0 -1
- package/dist/components/Navigation/variables.css.js +1 -0
- package/dist/components/OfferList/OfferList.d.ts +3 -3
- package/dist/components/OfferList/OfferList.js +41 -9
- package/dist/components/OfferList/OfferListProvider.d.ts +1 -1
- package/dist/components/OfferList/OfferListProvider.js +25 -15
- package/dist/components/OfferList/components/Banner.d.ts +1 -1
- package/dist/components/OfferList/components/Banner.js +30 -8
- package/dist/components/OfferList/components/Cell.d.ts +1 -1
- package/dist/components/OfferList/components/Cell.js +12 -5
- package/dist/components/OfferList/components/Row.d.ts +1 -1
- package/dist/components/OfferList/components/Row.js +135 -42
- package/dist/components/OrderSummary/NonScrollableContent.d.ts +1 -1
- package/dist/components/OrderSummary/NonScrollableContent.js +68 -22
- package/dist/components/OrderSummary/Provider.js +1 -4
- package/dist/components/OrderSummary/ScrollableContent.d.ts +1 -1
- package/dist/components/OrderSummary/ScrollableContent.js +174 -33
- package/dist/components/OrderSummary/constants.js +7 -1
- package/dist/components/OrderSummary/helpers.js +36 -18
- package/dist/components/OrderSummary/index.d.ts +1 -1
- package/dist/components/OrderSummary/index.js +135 -48
- package/dist/components/Plans/FeatureHint.d.ts +1 -1
- package/dist/components/Plans/FeatureHint.js +26 -8
- package/dist/components/Plans/PlanHeader.d.ts +1 -1
- package/dist/components/Plans/PlanHeader.js +79 -25
- package/dist/components/Plans/index.d.ts +1 -1
- package/dist/components/Plans/index.js +142 -53
- package/dist/components/Plans/styles.css.js +0 -1
- package/dist/components/SteppedListCard/Step.d.ts +1 -1
- package/dist/components/SteppedListCard/Step.js +42 -2
- package/dist/components/SteppedListCard/SteppedListCard.d.ts +2 -2
- package/dist/components/SteppedListCard/SteppedListCard.js +66 -19
- package/dist/components/SteppedListCard/SteppedListContent.d.ts +1 -1
- package/dist/components/SteppedListCard/SteppedListContent.js +13 -11
- package/dist/components/SteppedListCard/helper.js +3 -1
- package/dist/plus.css +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Stack } from "@ultraviolet/ui";
|
|
4
4
|
import { useState, useMemo } from "react";
|
|
5
5
|
import rating1 from "./assets/1-5.svg.js";
|
|
@@ -13,27 +13,33 @@ import rating4NS from "./assets/4-5NB.svg.js";
|
|
|
13
13
|
import rating5 from "./assets/5-5.svg.js";
|
|
14
14
|
import rating5NS from "./assets/5-5NB.svg.js";
|
|
15
15
|
import { customerStatisfaction } from "./styles.css.js";
|
|
16
|
-
const ratings = [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
16
|
+
const ratings = [
|
|
17
|
+
{
|
|
18
|
+
imgNotSelected: rating1NS,
|
|
19
|
+
imgSelected: rating1,
|
|
20
|
+
value: 1
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
imgNotSelected: rating2NS,
|
|
24
|
+
imgSelected: rating2,
|
|
25
|
+
value: 2
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
imgNotSelected: rating3NS,
|
|
29
|
+
imgSelected: rating3,
|
|
30
|
+
value: 3
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
imgNotSelected: rating4NS,
|
|
34
|
+
imgSelected: rating4,
|
|
35
|
+
value: 4
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
imgNotSelected: rating5NS,
|
|
39
|
+
imgSelected: rating5,
|
|
40
|
+
value: 5
|
|
41
|
+
}
|
|
42
|
+
];
|
|
37
43
|
const CustomerSatisfaction = ({
|
|
38
44
|
value,
|
|
39
45
|
onChange,
|
|
@@ -43,23 +49,46 @@ const CustomerSatisfaction = ({
|
|
|
43
49
|
}) => {
|
|
44
50
|
const [hoveredValue, setHoveredValue] = useState(0);
|
|
45
51
|
const isHappy = useMemo(() => value > ratings.length / 2, [value]);
|
|
46
|
-
return /* @__PURE__ */ jsx(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
Stack,
|
|
54
|
+
{
|
|
55
|
+
className,
|
|
56
|
+
"data-testid": dataTestId,
|
|
57
|
+
direction: "row",
|
|
58
|
+
justifyContent: "space-between",
|
|
59
|
+
style,
|
|
60
|
+
children: ratings.map((rating) => {
|
|
61
|
+
const isSelected = rating.value === value;
|
|
62
|
+
const isOverfly = rating.value <= hoveredValue;
|
|
63
|
+
const isScaled = rating.value === hoveredValue && isSelected;
|
|
64
|
+
const animated = isHappy ? "happy" : "angry";
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
"img",
|
|
67
|
+
{
|
|
68
|
+
alt: "rating",
|
|
69
|
+
className: customerStatisfaction({
|
|
70
|
+
animated: isSelected ? animated : void 0,
|
|
71
|
+
isScaled
|
|
72
|
+
}),
|
|
73
|
+
"data-testid": `${dataTestId}-${rating.value}`,
|
|
74
|
+
onClick: () => {
|
|
75
|
+
onChange(rating.value);
|
|
76
|
+
},
|
|
77
|
+
onKeyDown: () => {
|
|
78
|
+
},
|
|
79
|
+
onMouseEnter: () => {
|
|
80
|
+
setHoveredValue(rating.value);
|
|
81
|
+
},
|
|
82
|
+
onMouseLeave: () => {
|
|
83
|
+
setHoveredValue(0);
|
|
84
|
+
},
|
|
85
|
+
src: isSelected || isOverfly || rating.value <= value ? rating.imgSelected : rating.imgNotSelected
|
|
86
|
+
},
|
|
87
|
+
rating.value
|
|
88
|
+
);
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
);
|
|
63
92
|
};
|
|
64
93
|
export {
|
|
65
94
|
CustomerSatisfaction
|
|
@@ -5,5 +5,5 @@ type CustomUnitInputProps = {
|
|
|
5
5
|
iteration: Iteration;
|
|
6
6
|
timeUnits: Units[];
|
|
7
7
|
};
|
|
8
|
-
export declare const CustomUnitInput: import("react").MemoExoticComponent<({ defaultTimeUnit, setIteration, iteration, timeUnits, }: CustomUnitInputProps) => import("
|
|
8
|
+
export declare const CustomUnitInput: import("react").MemoExoticComponent<({ defaultTimeUnit, setIteration, iteration, timeUnits, }: CustomUnitInputProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
9
|
export {};
|
|
@@ -1,34 +1,54 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { UnitInput } from "@ultraviolet/ui";
|
|
4
4
|
import { memo, useMemo } from "react";
|
|
5
5
|
import { useEstimateCost } from "../EstimateCostProvider.js";
|
|
6
|
-
const CustomUnitInput = memo(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
locales
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
6
|
+
const CustomUnitInput = memo(
|
|
7
|
+
({
|
|
8
|
+
defaultTimeUnit = "hours",
|
|
9
|
+
setIteration,
|
|
10
|
+
iteration,
|
|
11
|
+
timeUnits
|
|
12
|
+
}) => {
|
|
13
|
+
const { locales } = useEstimateCost();
|
|
14
|
+
const options = useMemo(
|
|
15
|
+
() => timeUnits.map((unit) => ({
|
|
16
|
+
label: locales[`estimate.cost.units.${unit}.label`],
|
|
17
|
+
value: unit
|
|
18
|
+
})),
|
|
19
|
+
[timeUnits, locales]
|
|
20
|
+
);
|
|
21
|
+
const defaultOption = useMemo(
|
|
22
|
+
() => options.find(({ value }) => value === defaultTimeUnit),
|
|
23
|
+
[defaultTimeUnit, options]
|
|
24
|
+
);
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
UnitInput,
|
|
27
|
+
{
|
|
28
|
+
min: 1,
|
|
29
|
+
name: "iteration",
|
|
30
|
+
onChange: (inputValue) => setIteration({
|
|
31
|
+
unit: iteration.unit,
|
|
32
|
+
value: inputValue
|
|
33
|
+
}),
|
|
34
|
+
onChangeUnitValue: (unitValue) => {
|
|
35
|
+
setIteration({
|
|
36
|
+
unit: unitValue,
|
|
37
|
+
value: iteration.value
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
options,
|
|
41
|
+
placeholder: "0",
|
|
42
|
+
selectInputWidth: "100%",
|
|
43
|
+
size: "medium",
|
|
44
|
+
templateColumns: "auto auto",
|
|
45
|
+
unitValue: iteration.unit || defaultOption?.value,
|
|
46
|
+
value: iteration.value,
|
|
47
|
+
width: "100%"
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
);
|
|
32
52
|
export {
|
|
33
53
|
CustomUnitInput
|
|
34
54
|
};
|
|
@@ -113,5 +113,5 @@ type ItemProps = {
|
|
|
113
113
|
strikeThrough?: boolean;
|
|
114
114
|
style?: CSSProperties;
|
|
115
115
|
};
|
|
116
|
-
export declare const Item: import("react").MemoExoticComponent<({ discount, priceText, discountText, label, tooltipInfo, subLabel, price: basePrice, monthlyPrice, unit: baseUnit, amount: currentAmount, onAmountChange, amountFree, maxAmount, longFractionDigits, noIteration, noIterationText, noBorder, noPrice, isDefined, children, isFirstElement, isLastElement, isPrimaryBackground, productsCallback, iteration: receivedIteration, shouldBeHidden, hideFromOverlay, textNotDefined, animated, tabulation, labelTextVariant, labelTextProminence, notice, strikeThrough, style, }: ItemProps) => import("
|
|
116
|
+
export declare const Item: import("react").MemoExoticComponent<({ discount, priceText, discountText, label, tooltipInfo, subLabel, price: basePrice, monthlyPrice, unit: baseUnit, amount: currentAmount, onAmountChange, amountFree, maxAmount, longFractionDigits, noIteration, noIterationText, noBorder, noPrice, isDefined, children, isFirstElement, isLastElement, isPrimaryBackground, productsCallback, iteration: receivedIteration, shouldBeHidden, hideFromOverlay, textNotDefined, animated, tabulation, labelTextVariant, labelTextProminence, notice, strikeThrough, style, }: ItemProps) => import("react/jsx-runtime").JSX.Element>;
|
|
117
117
|
export {};
|