@ultraviolet/plus 3.0.0-beta.16 → 3.0.0-beta.17

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 (106) 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/ContentCard/styles.css.js +1 -0
  7. package/dist/components/ContentCardGroup/Card.js +63 -22
  8. package/dist/components/ContentCardGroup/SkeletonCard.d.ts +1 -1
  9. package/dist/components/ContentCardGroup/SkeletonCard.js +1 -1
  10. package/dist/components/ContentCardGroup/index.js +11 -6
  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 +23 -3
  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/Navigation/Footer.d.ts +1 -1
  52. package/dist/components/Navigation/Footer.js +34 -19
  53. package/dist/components/Navigation/Header.d.ts +1 -1
  54. package/dist/components/Navigation/Header.js +12 -9
  55. package/dist/components/Navigation/Navigation.d.ts +5 -5
  56. package/dist/components/Navigation/Navigation.js +2 -5
  57. package/dist/components/Navigation/NavigationContent.d.ts +1 -1
  58. package/dist/components/Navigation/NavigationContent.js +56 -18
  59. package/dist/components/Navigation/NavigationProvider.d.ts +1 -1
  60. package/dist/components/Navigation/NavigationProvider.js +108 -70
  61. package/dist/components/Navigation/components/Group.d.ts +1 -1
  62. package/dist/components/Navigation/components/Group.js +20 -19
  63. package/dist/components/Navigation/components/Item.d.ts +1 -1
  64. package/dist/components/Navigation/components/Item.js +551 -254
  65. package/dist/components/Navigation/components/ItemProvider.d.ts +1 -1
  66. package/dist/components/Navigation/components/ItemProvider.js +2 -4
  67. package/dist/components/Navigation/components/PinnedItems.d.ts +1 -1
  68. package/dist/components/Navigation/components/PinnedItems.js +91 -37
  69. package/dist/components/Navigation/components/Separator.d.ts +1 -1
  70. package/dist/components/Navigation/components/Separator.js +1 -1
  71. package/dist/components/Navigation/styles.css.js +0 -1
  72. package/dist/components/Navigation/variables.css.js +1 -0
  73. package/dist/components/OfferList/OfferList.d.ts +3 -3
  74. package/dist/components/OfferList/OfferList.js +41 -9
  75. package/dist/components/OfferList/OfferListProvider.d.ts +1 -1
  76. package/dist/components/OfferList/OfferListProvider.js +25 -15
  77. package/dist/components/OfferList/components/Banner.d.ts +1 -1
  78. package/dist/components/OfferList/components/Banner.js +30 -8
  79. package/dist/components/OfferList/components/Cell.d.ts +1 -1
  80. package/dist/components/OfferList/components/Cell.js +12 -5
  81. package/dist/components/OfferList/components/Row.d.ts +1 -1
  82. package/dist/components/OfferList/components/Row.js +135 -42
  83. package/dist/components/OrderSummary/NonScrollableContent.d.ts +1 -1
  84. package/dist/components/OrderSummary/NonScrollableContent.js +68 -22
  85. package/dist/components/OrderSummary/Provider.js +1 -4
  86. package/dist/components/OrderSummary/ScrollableContent.d.ts +1 -1
  87. package/dist/components/OrderSummary/ScrollableContent.js +174 -33
  88. package/dist/components/OrderSummary/constants.js +7 -1
  89. package/dist/components/OrderSummary/helpers.js +36 -18
  90. package/dist/components/OrderSummary/index.d.ts +1 -1
  91. package/dist/components/OrderSummary/index.js +135 -48
  92. package/dist/components/Plans/FeatureHint.d.ts +1 -1
  93. package/dist/components/Plans/FeatureHint.js +26 -8
  94. package/dist/components/Plans/PlanHeader.d.ts +1 -1
  95. package/dist/components/Plans/PlanHeader.js +79 -25
  96. package/dist/components/Plans/index.d.ts +1 -1
  97. package/dist/components/Plans/index.js +142 -53
  98. package/dist/components/Plans/styles.css.js +0 -1
  99. package/dist/components/SteppedListCard/Step.d.ts +1 -1
  100. package/dist/components/SteppedListCard/Step.js +42 -2
  101. package/dist/components/SteppedListCard/SteppedListCard.d.ts +2 -2
  102. package/dist/components/SteppedListCard/SteppedListCard.js +66 -19
  103. package/dist/components/SteppedListCard/SteppedListContent.d.ts +1 -1
  104. package/dist/components/SteppedListCard/SteppedListContent.js +13 -11
  105. package/dist/components/SteppedListCard/helper.js +3 -1
  106. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { CloseIcon, CheckCircleIcon } from "@ultraviolet/icons";
3
3
  import { Text, Badge, Stack } from "@ultraviolet/ui";
4
4
  import { useState } from "react";
@@ -22,76 +22,165 @@ const Plans = ({
22
22
  const [hoveredPlan, setHoveredPlan] = useState();
23
23
  return /* @__PURE__ */ jsxs("table", { className: plans, style, children: [
24
24
  /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
25
- /* @__PURE__ */ jsx("td", { className: plansCell({
26
- hide: hideLabels
27
- }), children: !hideFeatureText ? /* @__PURE__ */ jsx(Text, { as: "span", variant: "headingSmallStrong", children: locales$1["plans.features"] }) : null }),
25
+ /* @__PURE__ */ jsx("td", { className: plansCell({ hide: hideLabels }), children: !hideFeatureText ? /* @__PURE__ */ jsx(Text, { as: "span", variant: "headingSmallStrong", children: locales$1["plans.features"] }) : null }),
28
26
  plans$1.map((plan) => {
29
27
  const computedDisabled = !!(plan.outOfStock || plan.disabled);
30
28
  const selectable = hasCardBehavior && !computedDisabled;
31
- return /* @__PURE__ */ jsxs("td", { className: plansCell({
32
- activeColor: value === plan.value || hoveredPlan === plan.value,
33
- disabled: computedDisabled,
34
- focus: focusedPlan === plan.value,
35
- hideLabels,
36
- selectable
37
- }), onBlur: selectable ? () => setHoveredPlan(void 0) : void 0, onClick: selectable ? () => onChange(plan.value) : void 0, onFocus: selectable ? () => setHoveredPlan(plan.value) : void 0, onKeyDown: (event) => {
38
- if ([" ", "Enter"].includes(event.key) && selectable) {
39
- onChange(plan.value);
40
- }
41
- }, onMouseOut: selectable ? () => setHoveredPlan(void 0) : void 0, onMouseOver: selectable ? () => setHoveredPlan(plan.value) : void 0, children: [
42
- plan.outOfStock ? /* @__PURE__ */ jsx(Badge, { className: plansOutOfStockBadge, size: "small", children: locales$1["plans.outOfStock"] }) : null,
43
- plan.header.quotas ? /* @__PURE__ */ jsx(Badge, { className: plansOutOfStockBadge, size: "small", children: plan.header.quotas }) : null,
44
- /* @__PURE__ */ jsx(PlanHeader, { currentPlanValue: value, disabled: computedDisabled, fieldName, onChange, plan, setFocusedPlan })
45
- ] }, plan.value);
29
+ return /* @__PURE__ */ jsxs(
30
+ "td",
31
+ {
32
+ className: plansCell({
33
+ activeColor: value === plan.value || hoveredPlan === plan.value,
34
+ disabled: computedDisabled,
35
+ focus: focusedPlan === plan.value,
36
+ hideLabels,
37
+ selectable
38
+ }),
39
+ onBlur: selectable ? () => setHoveredPlan(void 0) : void 0,
40
+ onClick: selectable ? () => onChange(plan.value) : void 0,
41
+ onFocus: selectable ? () => setHoveredPlan(plan.value) : void 0,
42
+ onKeyDown: (event) => {
43
+ if ([" ", "Enter"].includes(event.key) && selectable) {
44
+ onChange(plan.value);
45
+ }
46
+ },
47
+ onMouseOut: selectable ? () => setHoveredPlan(void 0) : void 0,
48
+ onMouseOver: selectable ? () => setHoveredPlan(plan.value) : void 0,
49
+ children: [
50
+ plan.outOfStock ? /* @__PURE__ */ jsx(Badge, { className: plansOutOfStockBadge, size: "small", children: locales$1["plans.outOfStock"] }) : null,
51
+ plan.header.quotas ? /* @__PURE__ */ jsx(Badge, { className: plansOutOfStockBadge, size: "small", children: plan.header.quotas }) : null,
52
+ /* @__PURE__ */ jsx(
53
+ PlanHeader,
54
+ {
55
+ currentPlanValue: value,
56
+ disabled: computedDisabled,
57
+ fieldName,
58
+ onChange,
59
+ plan,
60
+ setFocusedPlan
61
+ }
62
+ )
63
+ ]
64
+ },
65
+ plan.value
66
+ );
46
67
  })
47
68
  ] }) }),
48
69
  /* @__PURE__ */ jsx("tbody", { children: features.map((feature) => {
49
70
  if ("group" in feature) {
50
- return /* @__PURE__ */ jsxs("tr", { className: hideLabels ? plansRowHidden : "", children: [
51
- /* @__PURE__ */ jsx("td", { className: plansCell({}), children: /* @__PURE__ */ jsxs(Stack, { alignItems: "center", direction: "row", gap: 1, children: [
52
- /* @__PURE__ */ jsx(Text, { as: "p", className: plansUppercaseText, sentiment: "neutral", variant: "bodySmallStronger", children: feature.group }),
53
- feature.hint ? /* @__PURE__ */ jsx(FeatureHint, { hint: feature.hint }) : null
54
- ] }) }),
55
- plans$1.map((plan) => /* @__PURE__ */ jsx("td", { className: plansCell({
56
- activeColor: value === plan.value || hoveredPlan === plan.value,
57
- disabled: plan.outOfStock || plan.disabled,
58
- focus: focusedPlan === plan.value,
59
- hide: hideLabels
60
- }) }, plan.value))
61
- ] }, feature.group);
71
+ return /* @__PURE__ */ jsxs(
72
+ "tr",
73
+ {
74
+ className: hideLabels ? plansRowHidden : "",
75
+ children: [
76
+ /* @__PURE__ */ jsx("td", { className: plansCell({}), children: /* @__PURE__ */ jsxs(Stack, { alignItems: "center", direction: "row", gap: 1, children: [
77
+ /* @__PURE__ */ jsx(
78
+ Text,
79
+ {
80
+ as: "p",
81
+ className: plansUppercaseText,
82
+ sentiment: "neutral",
83
+ variant: "bodySmallStronger",
84
+ children: feature.group
85
+ }
86
+ ),
87
+ feature.hint ? /* @__PURE__ */ jsx(FeatureHint, { hint: feature.hint }) : null
88
+ ] }) }),
89
+ plans$1.map((plan) => /* @__PURE__ */ jsx(
90
+ "td",
91
+ {
92
+ className: plansCell({
93
+ activeColor: value === plan.value || hoveredPlan === plan.value,
94
+ disabled: plan.outOfStock || plan.disabled,
95
+ focus: focusedPlan === plan.value,
96
+ hide: hideLabels
97
+ })
98
+ },
99
+ plan.value
100
+ ))
101
+ ]
102
+ },
103
+ feature.group
104
+ );
62
105
  }
63
106
  const featureKey = feature.key ?? "";
64
107
  return /* @__PURE__ */ jsxs("tr", { children: [
65
- /* @__PURE__ */ jsx("td", { className: plansCell({
66
- hide: hideLabels
67
- }), children: /* @__PURE__ */ jsxs(Stack, { children: [
108
+ /* @__PURE__ */ jsx("td", { className: plansCell({ hide: hideLabels }), children: /* @__PURE__ */ jsxs(Stack, { children: [
68
109
  /* @__PURE__ */ jsxs(Stack, { alignItems: "center", direction: "row", gap: 1, children: [
69
110
  /* @__PURE__ */ jsx(Text, { as: "p", variant: "bodyStrong", children: feature.text }),
70
111
  /* @__PURE__ */ jsx(FeatureHint, { hint: feature.hint })
71
112
  ] }),
72
- feature.description ? /* @__PURE__ */ jsx(Text, { as: "div", placement: "start", prominence: "weak", sentiment: "neutral", variant: "caption", children: feature.description }) : null
113
+ feature.description ? /* @__PURE__ */ jsx(
114
+ Text,
115
+ {
116
+ as: "div",
117
+ placement: "start",
118
+ prominence: "weak",
119
+ sentiment: "neutral",
120
+ variant: "caption",
121
+ children: feature.description
122
+ }
123
+ ) : null
73
124
  ] }) }),
74
125
  plans$1.map((plan) => {
75
126
  const computedDisabled = plan.outOfStock || plan.disabled;
76
127
  const selectable = hasCardBehavior && !computedDisabled;
77
- return /* @__PURE__ */ jsxs("td", { className: plansCell({
78
- activeColor: value === plan.value || hoveredPlan === plan.value,
79
- disabled: computedDisabled,
80
- focus: focusedPlan === plan.value,
81
- hideLabels,
82
- selectable
83
- }), "data-testid": `${plan.value}-${feature.key}`, onBlur: () => {
84
- }, onClick: selectable ? () => onChange(plan.value) : void 0, onFocus: () => {
85
- }, onKeyDown: () => {
86
- }, onMouseOut: selectable ? () => {
87
- setHoveredPlan(void 0);
88
- } : void 0, onMouseOver: selectable ? () => {
89
- setHoveredPlan(plan.value);
90
- } : void 0, children: [
91
- plan.data[featureKey] === false ? /* @__PURE__ */ jsx(CloseIcon, { disabled: computedDisabled, prominence: "weak", sentiment: "neutral", size: "large" }) : null,
92
- plan.data[featureKey] === true ? /* @__PURE__ */ jsx(CheckCircleIcon, { disabled: computedDisabled, sentiment: "success", size: "medium" }) : null,
93
- typeof plan.data[featureKey] !== "boolean" ? /* @__PURE__ */ jsx(Text, { as: "span", disabled: computedDisabled, sentiment: "neutral", variant: "body", children: plan.data[featureKey] }) : null
94
- ] }, plan.value);
128
+ return /* @__PURE__ */ jsxs(
129
+ "td",
130
+ {
131
+ className: plansCell({
132
+ activeColor: value === plan.value || hoveredPlan === plan.value,
133
+ disabled: computedDisabled,
134
+ focus: focusedPlan === plan.value,
135
+ hideLabels,
136
+ selectable
137
+ }),
138
+ "data-testid": `${plan.value}-${feature.key}`,
139
+ onBlur: () => {
140
+ },
141
+ onClick: selectable ? () => onChange(plan.value) : void 0,
142
+ onFocus: () => {
143
+ },
144
+ onKeyDown: () => {
145
+ },
146
+ onMouseOut: selectable ? () => {
147
+ setHoveredPlan(void 0);
148
+ } : void 0,
149
+ onMouseOver: selectable ? () => {
150
+ setHoveredPlan(plan.value);
151
+ } : void 0,
152
+ children: [
153
+ plan.data[featureKey] === false ? /* @__PURE__ */ jsx(
154
+ CloseIcon,
155
+ {
156
+ disabled: computedDisabled,
157
+ prominence: "weak",
158
+ sentiment: "neutral",
159
+ size: "large"
160
+ }
161
+ ) : null,
162
+ plan.data[featureKey] === true ? /* @__PURE__ */ jsx(
163
+ CheckCircleIcon,
164
+ {
165
+ disabled: computedDisabled,
166
+ sentiment: "success",
167
+ size: "medium"
168
+ }
169
+ ) : null,
170
+ typeof plan.data[featureKey] !== "boolean" ? /* @__PURE__ */ jsx(
171
+ Text,
172
+ {
173
+ as: "span",
174
+ disabled: computedDisabled,
175
+ sentiment: "neutral",
176
+ variant: "body",
177
+ children: plan.data[featureKey]
178
+ }
179
+ ) : null
180
+ ]
181
+ },
182
+ plan.value
183
+ );
95
184
  })
96
185
  ] }, feature.key);
97
186
  }) })
@@ -1,4 +1,3 @@
1
- /* empty css */
2
1
  /* empty css */
3
2
  import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
4
3
  var plansIconWrapper = "uv_plus_11wud800";
@@ -18,5 +18,5 @@ type StepProps = {
18
18
  completed: boolean;
19
19
  'data-testid'?: string;
20
20
  };
21
- export declare const SteppedList: ({ stepNumber, stepTitle, completed, stepIcon, "data-testid": dataTestId, }: StepProps) => import("@emotion/react/jsx-runtime").JSX.Element;
21
+ export declare const SteppedList: ({ stepNumber, stepTitle, completed, stepIcon, "data-testid": dataTestId, }: StepProps) => import("react/jsx-runtime").JSX.Element;
22
22
  export {};
@@ -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 { CheckIcon } from "@ultraviolet/icons";
4
4
  import { StepList, Text } from "@ultraviolet/ui";
5
5
  import { useContext } from "react";
@@ -14,7 +14,47 @@ const SteppedList = ({
14
14
  }) => {
15
15
  const containerData = useContext(Data);
16
16
  const active = containerData.currentStep === stepNumber;
17
- return completed ? /* @__PURE__ */ jsx(StepList.Item, { bulletContent: /* @__PURE__ */ jsx(CheckIcon, {}), className: steppedListCardStep, "data-testid": dataTestId, onClick: () => containerData.setCurrentStep(stepNumber), prominence: active ? "strong" : "default", sentiment: "primary", size: "small", children: /* @__PURE__ */ jsx(Text, { as: "h3", className: steppedListCardStepTitle, variant: active ? "bodyStrong" : "body", children: stepTitle }) }) : /* @__PURE__ */ jsx(StepList.Item, { bulletContent: stepIcon ?? String(stepNumber), className: steppedListCardStep, "data-testid": dataTestId, onClick: () => containerData.setCurrentStep(stepNumber), prominence: active ? "strong" : void 0, sentiment: active ? "primary" : void 0, size: "small", children: /* @__PURE__ */ jsx(Text, { as: "h3", className: steppedListCardStepTitle, variant: active ? "bodyStrong" : "body", children: stepTitle }) });
17
+ return completed ? /* @__PURE__ */ jsx(
18
+ StepList.Item,
19
+ {
20
+ bulletContent: /* @__PURE__ */ jsx(CheckIcon, {}),
21
+ className: steppedListCardStep,
22
+ "data-testid": dataTestId,
23
+ onClick: () => containerData.setCurrentStep(stepNumber),
24
+ prominence: active ? "strong" : "default",
25
+ sentiment: "primary",
26
+ size: "small",
27
+ children: /* @__PURE__ */ jsx(
28
+ Text,
29
+ {
30
+ as: "h3",
31
+ className: steppedListCardStepTitle,
32
+ variant: active ? "bodyStrong" : "body",
33
+ children: stepTitle
34
+ }
35
+ )
36
+ }
37
+ ) : /* @__PURE__ */ jsx(
38
+ StepList.Item,
39
+ {
40
+ bulletContent: stepIcon ?? String(stepNumber),
41
+ className: steppedListCardStep,
42
+ "data-testid": dataTestId,
43
+ onClick: () => containerData.setCurrentStep(stepNumber),
44
+ prominence: active ? "strong" : void 0,
45
+ sentiment: active ? "primary" : void 0,
46
+ size: "small",
47
+ children: /* @__PURE__ */ jsx(
48
+ Text,
49
+ {
50
+ as: "h3",
51
+ className: steppedListCardStepTitle,
52
+ variant: active ? "bodyStrong" : "body",
53
+ children: stepTitle
54
+ }
55
+ )
56
+ }
57
+ );
18
58
  };
19
59
  export {
20
60
  SteppedList
@@ -55,7 +55,7 @@ type SteppedListContainerProps = {
55
55
  * It can pass prop "nextStep" to its children.
56
56
  */
57
57
  declare const SteppedListCard: {
58
- ({ header, showToggleOption, hideTooltipText, hideText, showText, showTooltipText, children, steps, onClickHide, }: SteppedListContainerProps): import("@emotion/react/jsx-runtime").JSX.Element;
58
+ ({ header, showToggleOption, hideTooltipText, hideText, showText, showTooltipText, children, steps, onClickHide, }: SteppedListContainerProps): import("react/jsx-runtime").JSX.Element;
59
59
  Step: ({ subHeader, children, image, stepNumber, completed, style, }: {
60
60
  subHeader?: ReactNode;
61
61
  children: ((nextStep: (completed?: boolean) => void) => ReactNode) | ReactNode;
@@ -63,6 +63,6 @@ declare const SteppedListCard: {
63
63
  stepNumber: number;
64
64
  completed?: boolean;
65
65
  style?: import("react").CSSProperties;
66
- }) => import("@emotion/react/jsx-runtime").JSX.Element | null;
66
+ }) => import("react/jsx-runtime").JSX.Element | null;
67
67
  };
68
68
  export { SteppedListCard };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx, jsxs } from "@emotion/react/jsx-runtime";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { Stack, Text, Button, Card, Row, StepList } from "@ultraviolet/ui";
4
4
  import { Children, useState, useMemo } from "react";
5
5
  import { Data } from "./helper.js";
@@ -21,15 +21,26 @@ const SteppedListCard = ({
21
21
  const [currentStep, setCurrentStep] = useState(1);
22
22
  const [hidden, setHidden] = useState(false);
23
23
  const [done, setDone] = useState(new Array(steps.length).fill(false));
24
- const values = useMemo(() => ({
25
- currentStep,
26
- done,
27
- numberOfSteps,
28
- onClickHide,
29
- setCurrentStep,
30
- setDone,
31
- setHidden
32
- }), [currentStep, setCurrentStep, numberOfSteps, done, setDone, setHidden, onClickHide]);
24
+ const values = useMemo(
25
+ () => ({
26
+ currentStep,
27
+ done,
28
+ numberOfSteps,
29
+ onClickHide,
30
+ setCurrentStep,
31
+ setDone,
32
+ setHidden
33
+ }),
34
+ [
35
+ currentStep,
36
+ setCurrentStep,
37
+ numberOfSteps,
38
+ done,
39
+ setDone,
40
+ setHidden,
41
+ onClickHide
42
+ ]
43
+ );
33
44
  const onClickHideButton = () => {
34
45
  if (onClickHide) {
35
46
  onClickHide();
@@ -38,16 +49,52 @@ const SteppedListCard = ({
38
49
  }
39
50
  };
40
51
  return /* @__PURE__ */ jsx(Data.Provider, { value: values, children: /* @__PURE__ */ jsxs(Stack, { gap: 2, width: "100%", children: [
41
- /* @__PURE__ */ jsxs(Stack, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
42
- typeof header === "string" ? /* @__PURE__ */ jsx(Text, { as: "h3", variant: "heading", children: header }) : header,
43
- showToggleOption ? /* @__PURE__ */ jsx(Button, { className: hideButton, onClick: onClickHideButton, sentiment: "neutral", size: "small", tooltip: hidden ? showTooltipText : hideTooltipText, variant: "ghost", children: hidden ? showText : hideText }) : null
44
- ] }),
52
+ /* @__PURE__ */ jsxs(
53
+ Stack,
54
+ {
55
+ alignItems: "center",
56
+ direction: "row",
57
+ justifyContent: "space-between",
58
+ children: [
59
+ typeof header === "string" ? /* @__PURE__ */ jsx(Text, { as: "h3", variant: "heading", children: header }) : header,
60
+ showToggleOption ? /* @__PURE__ */ jsx(
61
+ Button,
62
+ {
63
+ className: hideButton,
64
+ onClick: onClickHideButton,
65
+ sentiment: "neutral",
66
+ size: "small",
67
+ tooltip: hidden ? showTooltipText : hideTooltipText,
68
+ variant: "ghost",
69
+ children: hidden ? showText : hideText
70
+ }
71
+ ) : null
72
+ ]
73
+ }
74
+ ),
45
75
  hidden ? null : /* @__PURE__ */ jsx(Card, { className: steppedListCard, children: /* @__PURE__ */ jsxs(Row, { templateColumns: "1fr 3fr", children: [
46
- /* @__PURE__ */ jsx(Stack, { className: steppedListCardWrapper, direction: "column", gap: 4, children: /* @__PURE__ */ jsx(StepList, { children: steps.map((step, index) => {
47
- const stepTitle = typeof step === "string" ? step : step.title;
48
- const stepIcon = typeof step === "string" ? void 0 : step.icon;
49
- return /* @__PURE__ */ jsx(SteppedList, { completed: done[index], stepIcon, stepNumber: index + 1, stepTitle }, stepTitle);
50
- }) }) }),
76
+ /* @__PURE__ */ jsx(
77
+ Stack,
78
+ {
79
+ className: steppedListCardWrapper,
80
+ direction: "column",
81
+ gap: 4,
82
+ children: /* @__PURE__ */ jsx(StepList, { children: steps.map((step, index) => {
83
+ const stepTitle = typeof step === "string" ? step : step.title;
84
+ const stepIcon = typeof step === "string" ? void 0 : step.icon;
85
+ return /* @__PURE__ */ jsx(
86
+ SteppedList,
87
+ {
88
+ completed: done[index],
89
+ stepIcon,
90
+ stepNumber: index + 1,
91
+ stepTitle
92
+ },
93
+ stepTitle
94
+ );
95
+ }) })
96
+ }
97
+ ),
51
98
  children
52
99
  ] }) })
53
100
  ] }) });
@@ -7,5 +7,5 @@ type SteppedListContentProps = {
7
7
  completed?: boolean;
8
8
  style?: CSSProperties;
9
9
  };
10
- export declare const SteppedListContent: ({ subHeader, children, image, stepNumber, completed, style, }: SteppedListContentProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
10
+ export declare const SteppedListContent: ({ subHeader, children, image, stepNumber, completed, style, }: SteppedListContentProps) => import("react/jsx-runtime").JSX.Element | null;
11
11
  export {};
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
2
+ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { Stack, Text } from "@ultraviolet/ui";
4
4
  import { useContext, useEffect } from "react";
5
5
  import { Data, nextStep } from "./helper.js";
@@ -31,16 +31,18 @@ const SteppedListContent = ({
31
31
  if (stepNumber === currentStep) {
32
32
  return /* @__PURE__ */ jsxs(Stack, { className: steppedListCardContent, style, children: [
33
33
  /* @__PURE__ */ jsx("div", { className: steppedListCardSubHeader, children: typeof subHeader === "string" ? /* @__PURE__ */ jsx(Text, { as: "h3", variant: "headingSmallStrong", children: subHeader }) : subHeader }),
34
- typeof children === "function" ? children((completedArg) => nextStep({
35
- completed: completedArg,
36
- done,
37
- numberOfSteps,
38
- onClickHide,
39
- setCompleted: setDone,
40
- setCurrentStep,
41
- setHidden,
42
- stepNumber
43
- })) : children,
34
+ typeof children === "function" ? children(
35
+ (completedArg) => nextStep({
36
+ completed: completedArg,
37
+ done,
38
+ numberOfSteps,
39
+ onClickHide,
40
+ setCompleted: setDone,
41
+ setCurrentStep,
42
+ setHidden,
43
+ stepNumber
44
+ })
45
+ ) : children,
44
46
  /* @__PURE__ */ jsx("div", { className: steppedListCardImage, children: image })
45
47
  ] });
46
48
  }
@@ -23,7 +23,9 @@ const nextStep = ({
23
23
  onClickHide
24
24
  }) => {
25
25
  const newValue = completed === void 0 ? done[stepNumber - 1] : completed;
26
- const tempDone = done.map((item, index) => index === stepNumber - 1 ? newValue : item);
26
+ const tempDone = done.map(
27
+ (item, index) => index === stepNumber - 1 ? newValue : item
28
+ );
27
29
  setCompleted(tempDone);
28
30
  if (numberOfSteps > stepNumber) {
29
31
  setCurrentStep(stepNumber + 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/plus",
3
- "version": "3.0.0-beta.16",
3
+ "version": "3.0.0-beta.17",
4
4
  "description": "Ultraviolet Plus",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -54,7 +54,7 @@
54
54
  "peerDependencies": {
55
55
  "react": "18.x || 19.x",
56
56
  "react-dom": "18.x || 19.x",
57
- "@ultraviolet/ui": "3.0.0-beta.27"
57
+ "@ultraviolet/ui": "3.0.0-beta.28"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@babel/core": "7.28.5",
@@ -63,7 +63,7 @@
63
63
  "react": "19.2.0",
64
64
  "react-dom": "19.2.0",
65
65
  "@ultraviolet/illustrations": "6.0.0-beta.6",
66
- "@ultraviolet/ui": "3.0.0-beta.27",
66
+ "@ultraviolet/ui": "3.0.0-beta.28",
67
67
  "@utils/test": "0.0.1"
68
68
  },
69
69
  "dependencies": {
@@ -75,7 +75,7 @@
75
75
  "@vanilla-extract/recipes": "0.5.7",
76
76
  "csstype": "3.1.3",
77
77
  "react-intersection-observer": "9.16.0",
78
- "@ultraviolet/icons": "5.0.0-beta.11",
78
+ "@ultraviolet/icons": "5.0.0-beta.12",
79
79
  "@ultraviolet/themes": "3.0.0-beta.4"
80
80
  },
81
81
  "scripts": {