@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.
Files changed (109) hide show
  1. package/dist/components/CodeEditor/CodeEditor.d.ts +1 -1
  2. package/dist/components/CodeEditor/CodeEditor.js +41 -11
  3. package/dist/components/ContentCard/Skeleton.d.ts +1 -1
  4. package/dist/components/ContentCard/Skeleton.js +13 -8
  5. package/dist/components/ContentCard/index.js +131 -51
  6. package/dist/components/ContentCardGroup/Card.js +63 -22
  7. package/dist/components/ContentCardGroup/SkeletonCard.d.ts +1 -1
  8. package/dist/components/ContentCardGroup/SkeletonCard.js +1 -1
  9. package/dist/components/ContentCardGroup/index.js +11 -6
  10. package/dist/components/ContentCardGroup/styles.css.js +1 -0
  11. package/dist/components/Conversation/index.d.ts +9 -9
  12. package/dist/components/Conversation/index.js +23 -6
  13. package/dist/components/CustomerSatisfaction/index.d.ts +1 -1
  14. package/dist/components/CustomerSatisfaction/index.js +68 -39
  15. package/dist/components/EstimateCost/Components/CustomUnitInput.d.ts +1 -1
  16. package/dist/components/EstimateCost/Components/CustomUnitInput.js +47 -27
  17. package/dist/components/EstimateCost/Components/Item.d.ts +1 -1
  18. package/dist/components/EstimateCost/Components/Item.js +303 -203
  19. package/dist/components/EstimateCost/Components/LineThrough.d.ts +1 -1
  20. package/dist/components/EstimateCost/Components/LineThrough.js +8 -2
  21. package/dist/components/EstimateCost/Components/NumberInput.d.ts +1 -1
  22. package/dist/components/EstimateCost/Components/NumberInput.js +17 -9
  23. package/dist/components/EstimateCost/Components/Region.d.ts +1 -1
  24. package/dist/components/EstimateCost/Components/Region.js +43 -25
  25. package/dist/components/EstimateCost/Components/Regular.d.ts +1 -1
  26. package/dist/components/EstimateCost/Components/Regular.js +20 -16
  27. package/dist/components/EstimateCost/Components/Strong.d.ts +1 -1
  28. package/dist/components/EstimateCost/Components/Strong.js +11 -10
  29. package/dist/components/EstimateCost/Components/Unit.d.ts +1 -1
  30. package/dist/components/EstimateCost/Components/Unit.js +20 -13
  31. package/dist/components/EstimateCost/Components/Zone.d.ts +1 -1
  32. package/dist/components/EstimateCost/Components/Zone.js +41 -24
  33. package/dist/components/EstimateCost/EstimateCost.d.ts +11 -11
  34. package/dist/components/EstimateCost/EstimateCost.js +61 -10
  35. package/dist/components/EstimateCost/EstimateCostContent.d.ts +1 -1
  36. package/dist/components/EstimateCost/EstimateCostContent.js +264 -120
  37. package/dist/components/EstimateCost/EstimateCostProvider.d.ts +1 -1
  38. package/dist/components/EstimateCost/EstimateCostProvider.js +24 -21
  39. package/dist/components/EstimateCost/OverlayComponent.d.ts +1 -1
  40. package/dist/components/EstimateCost/OverlayComponent.js +53 -41
  41. package/dist/components/EstimateCost/OverlayContext.d.ts +1 -1
  42. package/dist/components/EstimateCost/OverlayContext.js +2 -4
  43. package/dist/components/FAQ/index.d.ts +1 -1
  44. package/dist/components/FAQ/index.js +1 -1
  45. package/dist/components/InfoTable/InfoTable.d.ts +3 -3
  46. package/dist/components/InfoTable/InfoTable.js +10 -4
  47. package/dist/components/InfoTable/components/Cell.d.ts +1 -1
  48. package/dist/components/InfoTable/components/Cell.js +24 -4
  49. package/dist/components/InfoTable/components/Row.d.ts +1 -1
  50. package/dist/components/InfoTable/components/Row.js +16 -10
  51. package/dist/components/InfoTable/styles.css.d.ts +0 -1
  52. package/dist/components/InfoTable/styles.css.js +0 -2
  53. package/dist/components/Navigation/Footer.d.ts +1 -1
  54. package/dist/components/Navigation/Footer.js +34 -19
  55. package/dist/components/Navigation/Header.d.ts +1 -1
  56. package/dist/components/Navigation/Header.js +12 -9
  57. package/dist/components/Navigation/Navigation.d.ts +5 -5
  58. package/dist/components/Navigation/Navigation.js +2 -5
  59. package/dist/components/Navigation/NavigationContent.d.ts +1 -1
  60. package/dist/components/Navigation/NavigationContent.js +56 -18
  61. package/dist/components/Navigation/NavigationProvider.d.ts +1 -1
  62. package/dist/components/Navigation/NavigationProvider.js +108 -70
  63. package/dist/components/Navigation/components/Group.d.ts +1 -1
  64. package/dist/components/Navigation/components/Group.js +20 -19
  65. package/dist/components/Navigation/components/Item.d.ts +1 -1
  66. package/dist/components/Navigation/components/Item.js +551 -254
  67. package/dist/components/Navigation/components/ItemProvider.d.ts +1 -1
  68. package/dist/components/Navigation/components/ItemProvider.js +2 -4
  69. package/dist/components/Navigation/components/PinnedItems.d.ts +1 -1
  70. package/dist/components/Navigation/components/PinnedItems.js +91 -37
  71. package/dist/components/Navigation/components/Separator.d.ts +1 -1
  72. package/dist/components/Navigation/components/Separator.js +1 -1
  73. package/dist/components/Navigation/styles.css.js +0 -1
  74. package/dist/components/Navigation/variables.css.js +1 -0
  75. package/dist/components/OfferList/OfferList.d.ts +3 -3
  76. package/dist/components/OfferList/OfferList.js +41 -9
  77. package/dist/components/OfferList/OfferListProvider.d.ts +1 -1
  78. package/dist/components/OfferList/OfferListProvider.js +25 -15
  79. package/dist/components/OfferList/components/Banner.d.ts +1 -1
  80. package/dist/components/OfferList/components/Banner.js +30 -8
  81. package/dist/components/OfferList/components/Cell.d.ts +1 -1
  82. package/dist/components/OfferList/components/Cell.js +12 -5
  83. package/dist/components/OfferList/components/Row.d.ts +1 -1
  84. package/dist/components/OfferList/components/Row.js +135 -42
  85. package/dist/components/OrderSummary/NonScrollableContent.d.ts +1 -1
  86. package/dist/components/OrderSummary/NonScrollableContent.js +68 -22
  87. package/dist/components/OrderSummary/Provider.js +1 -4
  88. package/dist/components/OrderSummary/ScrollableContent.d.ts +1 -1
  89. package/dist/components/OrderSummary/ScrollableContent.js +174 -33
  90. package/dist/components/OrderSummary/constants.js +7 -1
  91. package/dist/components/OrderSummary/helpers.js +36 -18
  92. package/dist/components/OrderSummary/index.d.ts +1 -1
  93. package/dist/components/OrderSummary/index.js +135 -48
  94. package/dist/components/Plans/FeatureHint.d.ts +1 -1
  95. package/dist/components/Plans/FeatureHint.js +26 -8
  96. package/dist/components/Plans/PlanHeader.d.ts +1 -1
  97. package/dist/components/Plans/PlanHeader.js +79 -25
  98. package/dist/components/Plans/index.d.ts +1 -1
  99. package/dist/components/Plans/index.js +142 -53
  100. package/dist/components/Plans/styles.css.js +0 -1
  101. package/dist/components/SteppedListCard/Step.d.ts +1 -1
  102. package/dist/components/SteppedListCard/Step.js +42 -2
  103. package/dist/components/SteppedListCard/SteppedListCard.d.ts +2 -2
  104. package/dist/components/SteppedListCard/SteppedListCard.js +66 -19
  105. package/dist/components/SteppedListCard/SteppedListContent.d.ts +1 -1
  106. package/dist/components/SteppedListCard/SteppedListContent.js +13 -11
  107. package/dist/components/SteppedListCard/helper.js +3 -1
  108. package/dist/plus.css +1 -1
  109. package/package.json +6 -6
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx } from "@emotion/react/jsx-runtime";
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
- imgNotSelected: rating1NS,
18
- imgSelected: rating1,
19
- value: 1
20
- }, {
21
- imgNotSelected: rating2NS,
22
- imgSelected: rating2,
23
- value: 2
24
- }, {
25
- imgNotSelected: rating3NS,
26
- imgSelected: rating3,
27
- value: 3
28
- }, {
29
- imgNotSelected: rating4NS,
30
- imgSelected: rating4,
31
- value: 4
32
- }, {
33
- imgNotSelected: rating5NS,
34
- imgSelected: rating5,
35
- value: 5
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(Stack, { className, "data-testid": dataTestId, direction: "row", justifyContent: "space-between", style, children: ratings.map((rating) => {
47
- const isSelected = rating.value === value;
48
- const isOverfly = rating.value <= hoveredValue;
49
- const isScaled = rating.value === hoveredValue && isSelected;
50
- const animated = isHappy ? "happy" : "angry";
51
- return /* @__PURE__ */ jsx("img", { alt: "rating", className: customerStatisfaction({
52
- animated: isSelected ? animated : void 0,
53
- isScaled
54
- }), "data-testid": `${dataTestId}-${rating.value}`, onClick: () => {
55
- onChange(rating.value);
56
- }, onKeyDown: () => {
57
- }, onMouseEnter: () => {
58
- setHoveredValue(rating.value);
59
- }, onMouseLeave: () => {
60
- setHoveredValue(0);
61
- }, src: isSelected || isOverfly || rating.value <= value ? rating.imgSelected : rating.imgNotSelected }, rating.value);
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("@emotion/react/jsx-runtime").JSX.Element>;
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 "@emotion/react/jsx-runtime";
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
- defaultTimeUnit = "hours",
8
- setIteration,
9
- iteration,
10
- timeUnits
11
- }) => {
12
- const {
13
- locales
14
- } = useEstimateCost();
15
- const options = useMemo(() => timeUnits.map((unit) => ({
16
- label: locales[`estimate.cost.units.${unit}.label`],
17
- value: unit
18
- })), [timeUnits, locales]);
19
- const defaultOption = useMemo(() => options.find(({
20
- value
21
- }) => value === defaultTimeUnit), [defaultTimeUnit, options]);
22
- return /* @__PURE__ */ jsx(UnitInput, { min: 1, name: "iteration", onChange: (inputValue) => setIteration({
23
- unit: iteration.unit,
24
- value: inputValue
25
- }), onChangeUnitValue: (unitValue) => {
26
- setIteration({
27
- unit: unitValue,
28
- value: iteration.value
29
- });
30
- }, options, placeholder: "0", selectInputWidth: "100%", size: "medium", templateColumns: "auto auto", unitValue: iteration.unit || defaultOption?.value, value: iteration.value, width: "100%" });
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("@emotion/react/jsx-runtime").JSX.Element>;
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 {};