@ultraviolet/plus 3.4.5 → 3.5.1

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 (222) hide show
  1. package/dist/.vite/license.md +3 -0
  2. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/defineProperty.js +15 -0
  3. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/objectSpread2.js +28 -0
  4. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/objectWithoutProperties.js +18 -0
  5. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/objectWithoutPropertiesLoose.js +15 -0
  6. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/toPrimitive.js +17 -0
  7. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/toPropertyKey.js +12 -0
  8. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/typeof.js +14 -0
  9. package/dist/_virtual/_rolldown/runtime.js +9 -0
  10. package/dist/components/CodeEditor/CodeEditor.d.ts +1 -1
  11. package/dist/components/CodeEditor/CodeEditor.d.ts.map +1 -1
  12. package/dist/components/CodeEditor/CodeEditor.js +111 -137
  13. package/dist/components/CodeEditor/styles.css.js +18 -15
  14. package/dist/components/ContentCard/Skeleton.d.ts.map +1 -1
  15. package/dist/components/ContentCard/Skeleton.js +31 -27
  16. package/dist/components/ContentCard/index.js +107 -140
  17. package/dist/components/ContentCard/styles.css.d.ts +1 -1
  18. package/dist/components/ContentCard/styles.css.js +23 -19
  19. package/dist/components/ContentCardGroup/Card.js +55 -69
  20. package/dist/components/ContentCardGroup/SkeletonCard.js +28 -14
  21. package/dist/components/ContentCardGroup/index.d.ts +7 -7
  22. package/dist/components/ContentCardGroup/index.js +20 -25
  23. package/dist/components/ContentCardGroup/styles.css.js +6 -11
  24. package/dist/components/Conversation/index.d.ts +29 -23
  25. package/dist/components/Conversation/index.d.ts.map +1 -1
  26. package/dist/components/Conversation/index.js +46 -48
  27. package/dist/components/Conversation/styles.css.js +19 -13
  28. package/dist/components/CustomerSatisfaction/assets/1-5.js +5 -0
  29. package/dist/components/CustomerSatisfaction/assets/1-5NB.js +5 -0
  30. package/dist/components/CustomerSatisfaction/assets/2-5.js +5 -0
  31. package/dist/components/CustomerSatisfaction/assets/2-5NB.js +5 -0
  32. package/dist/components/CustomerSatisfaction/assets/3-5.js +5 -0
  33. package/dist/components/CustomerSatisfaction/assets/3-5NB.js +5 -0
  34. package/dist/components/CustomerSatisfaction/assets/4-5.js +5 -0
  35. package/dist/components/CustomerSatisfaction/assets/4-5NB.js +5 -0
  36. package/dist/components/CustomerSatisfaction/assets/5-5.js +5 -0
  37. package/dist/components/CustomerSatisfaction/assets/5-5NB.js +5 -0
  38. package/dist/components/CustomerSatisfaction/index.d.ts +1 -1
  39. package/dist/components/CustomerSatisfaction/index.d.ts.map +1 -1
  40. package/dist/components/CustomerSatisfaction/index.js +85 -100
  41. package/dist/components/CustomerSatisfaction/styles.css.js +18 -6
  42. package/dist/components/EstimateCost/Components/CustomUnitInput.d.ts.map +1 -1
  43. package/dist/components/EstimateCost/Components/CustomUnitInput.js +39 -52
  44. package/dist/components/EstimateCost/Components/Item.d.ts.map +1 -1
  45. package/dist/components/EstimateCost/Components/Item.js +223 -323
  46. package/dist/components/EstimateCost/Components/LineThrough.d.ts.map +1 -1
  47. package/dist/components/EstimateCost/Components/LineThrough.js +16 -16
  48. package/dist/components/EstimateCost/Components/NumberInput.d.ts.map +1 -1
  49. package/dist/components/EstimateCost/Components/NumberInput.js +33 -37
  50. package/dist/components/EstimateCost/Components/Region.d.ts.map +1 -1
  51. package/dist/components/EstimateCost/Components/Region.js +34 -57
  52. package/dist/components/EstimateCost/Components/Regular.d.ts.map +1 -1
  53. package/dist/components/EstimateCost/Components/Regular.js +21 -26
  54. package/dist/components/EstimateCost/Components/Strong.d.ts.map +1 -1
  55. package/dist/components/EstimateCost/Components/Strong.js +14 -19
  56. package/dist/components/EstimateCost/Components/Unit.d.ts.map +1 -1
  57. package/dist/components/EstimateCost/Components/Unit.js +47 -40
  58. package/dist/components/EstimateCost/Components/Zone.d.ts.map +1 -1
  59. package/dist/components/EstimateCost/Components/Zone.js +33 -55
  60. package/dist/components/EstimateCost/Components/components.css.js +122 -86
  61. package/dist/components/EstimateCost/EstimateCost.d.ts +138 -121
  62. package/dist/components/EstimateCost/EstimateCost.d.ts.map +1 -1
  63. package/dist/components/EstimateCost/EstimateCost.js +79 -124
  64. package/dist/components/EstimateCost/EstimateCostContent.d.ts.map +1 -1
  65. package/dist/components/EstimateCost/EstimateCostContent.js +284 -394
  66. package/dist/components/EstimateCost/EstimateCostProvider.d.ts +1 -1
  67. package/dist/components/EstimateCost/EstimateCostProvider.d.ts.map +1 -1
  68. package/dist/components/EstimateCost/EstimateCostProvider.js +30 -37
  69. package/dist/components/EstimateCost/OverlayComponent.d.ts.map +1 -1
  70. package/dist/components/EstimateCost/OverlayComponent.js +95 -93
  71. package/dist/components/EstimateCost/OverlayContext.d.ts.map +1 -1
  72. package/dist/components/EstimateCost/OverlayContext.js +12 -10
  73. package/dist/components/EstimateCost/constants.js +19 -21
  74. package/dist/components/EstimateCost/helper.d.ts +2 -2
  75. package/dist/components/EstimateCost/helper.d.ts.map +1 -1
  76. package/dist/components/EstimateCost/helper.js +9 -14
  77. package/dist/components/EstimateCost/locales/en.js +24 -23
  78. package/dist/components/EstimateCost/styles.css.d.ts +2 -2
  79. package/dist/components/EstimateCost/styles.css.js +50 -36
  80. package/dist/components/EstimateCost/types.d.ts +1 -1
  81. package/dist/components/EstimateCost/types.d.ts.map +1 -1
  82. package/dist/components/FAQ/index.d.ts.map +1 -1
  83. package/dist/components/FAQ/index.js +37 -31
  84. package/dist/components/FAQ/styles.css.js +6 -4
  85. package/dist/components/InfoTable/InfoTable.d.ts +10 -13
  86. package/dist/components/InfoTable/InfoTable.d.ts.map +1 -1
  87. package/dist/components/InfoTable/InfoTable.js +24 -15
  88. package/dist/components/InfoTable/components/Cell.d.ts.map +1 -1
  89. package/dist/components/InfoTable/components/Cell.js +37 -45
  90. package/dist/components/InfoTable/components/Row.d.ts.map +1 -1
  91. package/dist/components/InfoTable/components/Row.js +19 -27
  92. package/dist/components/InfoTable/context.d.ts +1 -1
  93. package/dist/components/InfoTable/context.d.ts.map +1 -1
  94. package/dist/components/InfoTable/context.js +5 -3
  95. package/dist/components/InfoTable/styles.css.js +6 -10
  96. package/dist/components/Navigation/Footer.d.ts.map +1 -1
  97. package/dist/components/Navigation/Footer.js +59 -75
  98. package/dist/components/Navigation/Header.d.ts.map +1 -1
  99. package/dist/components/Navigation/Header.js +20 -17
  100. package/dist/components/Navigation/Navigation.d.ts +46 -43
  101. package/dist/components/Navigation/Navigation.d.ts.map +1 -1
  102. package/dist/components/Navigation/Navigation.js +23 -27
  103. package/dist/components/Navigation/NavigationContent.d.ts +1 -1
  104. package/dist/components/Navigation/NavigationContent.d.ts.map +1 -1
  105. package/dist/components/Navigation/NavigationContent.js +100 -138
  106. package/dist/components/Navigation/NavigationProvider.d.ts.map +1 -1
  107. package/dist/components/Navigation/NavigationProvider.js +116 -165
  108. package/dist/components/Navigation/components/Group.d.ts.map +1 -1
  109. package/dist/components/Navigation/components/Group.js +36 -43
  110. package/dist/components/Navigation/components/Item.d.ts +1 -1
  111. package/dist/components/Navigation/components/Item.d.ts.map +1 -1
  112. package/dist/components/Navigation/components/Item.js +440 -607
  113. package/dist/components/Navigation/components/ItemProvider.d.ts.map +1 -1
  114. package/dist/components/Navigation/components/ItemProvider.js +13 -8
  115. package/dist/components/Navigation/components/PinnedItems.d.ts.map +1 -1
  116. package/dist/components/Navigation/components/PinnedItems.js +101 -132
  117. package/dist/components/Navigation/components/Separator.js +10 -7
  118. package/dist/components/Navigation/components/ShowHide.d.ts +1 -1
  119. package/dist/components/Navigation/components/ShowHide.d.ts.map +1 -1
  120. package/dist/components/Navigation/components/ShowHide.js +51 -75
  121. package/dist/components/Navigation/components/items.css.js +72 -30
  122. package/dist/components/Navigation/components/styles.css.js +23 -13
  123. package/dist/components/Navigation/locales/en.js +12 -11
  124. package/dist/components/Navigation/styles.css.js +28 -14
  125. package/dist/components/Navigation/variables.css.js +6 -4
  126. package/dist/components/OfferList/OfferList.d.ts +5 -51
  127. package/dist/components/OfferList/OfferList.d.ts.map +1 -1
  128. package/dist/components/OfferList/OfferList.js +11 -78
  129. package/dist/components/OrderSummary/index.d.ts +5 -2
  130. package/dist/components/OrderSummary/index.d.ts.map +1 -1
  131. package/dist/components/OrderSummary/index.js +11 -204
  132. package/dist/components/Plans/index.d.ts +5 -21
  133. package/dist/components/Plans/index.d.ts.map +1 -1
  134. package/dist/components/Plans/index.js +11 -214
  135. package/dist/components/SteppedListCard/index.d.ts +5 -1
  136. package/dist/components/SteppedListCard/index.d.ts.map +1 -1
  137. package/dist/components/SteppedListCard/index.js +11 -0
  138. package/dist/index.js +5 -21
  139. package/dist/plus.css +2 -1
  140. package/package.json +9 -8
  141. package/LICENSE +0 -189
  142. package/dist/components/CustomerSatisfaction/assets/1-5.svg.js +0 -4
  143. package/dist/components/CustomerSatisfaction/assets/1-5NB.svg.js +0 -4
  144. package/dist/components/CustomerSatisfaction/assets/2-5.svg.js +0 -4
  145. package/dist/components/CustomerSatisfaction/assets/2-5NB.svg.js +0 -4
  146. package/dist/components/CustomerSatisfaction/assets/3-5.svg.js +0 -4
  147. package/dist/components/CustomerSatisfaction/assets/3-5NB.svg.js +0 -4
  148. package/dist/components/CustomerSatisfaction/assets/4-5.svg.js +0 -4
  149. package/dist/components/CustomerSatisfaction/assets/4-5NB.svg.js +0 -4
  150. package/dist/components/CustomerSatisfaction/assets/5-5.svg.js +0 -4
  151. package/dist/components/CustomerSatisfaction/assets/5-5NB.svg.js +0 -4
  152. package/dist/components/Navigation/constants.js +0 -10
  153. package/dist/components/OfferList/OfferListProvider.d.ts +0 -30
  154. package/dist/components/OfferList/OfferListProvider.d.ts.map +0 -1
  155. package/dist/components/OfferList/OfferListProvider.js +0 -48
  156. package/dist/components/OfferList/components/Banner.d.ts +0 -13
  157. package/dist/components/OfferList/components/Banner.d.ts.map +0 -1
  158. package/dist/components/OfferList/components/Banner.js +0 -43
  159. package/dist/components/OfferList/components/Cell.d.ts +0 -4
  160. package/dist/components/OfferList/components/Cell.d.ts.map +0 -1
  161. package/dist/components/OfferList/components/Cell.js +0 -35
  162. package/dist/components/OfferList/components/OfferListRowProvider.d.ts +0 -9
  163. package/dist/components/OfferList/components/OfferListRowProvider.d.ts.map +0 -1
  164. package/dist/components/OfferList/components/OfferListRowProvider.js +0 -10
  165. package/dist/components/OfferList/components/Row.d.ts +0 -18
  166. package/dist/components/OfferList/components/Row.d.ts.map +0 -1
  167. package/dist/components/OfferList/components/Row.js +0 -258
  168. package/dist/components/OfferList/styles.css.d.ts +0 -44
  169. package/dist/components/OfferList/styles.css.d.ts.map +0 -1
  170. package/dist/components/OfferList/styles.css.js +0 -40
  171. package/dist/components/OrderSummary/NonScrollableContent.d.ts +0 -20
  172. package/dist/components/OrderSummary/NonScrollableContent.d.ts.map +0 -1
  173. package/dist/components/OrderSummary/NonScrollableContent.js +0 -136
  174. package/dist/components/OrderSummary/Provider.d.ts +0 -15
  175. package/dist/components/OrderSummary/Provider.d.ts.map +0 -1
  176. package/dist/components/OrderSummary/Provider.js +0 -15
  177. package/dist/components/OrderSummary/ScrollableContent.d.ts +0 -2
  178. package/dist/components/OrderSummary/ScrollableContent.d.ts.map +0 -1
  179. package/dist/components/OrderSummary/ScrollableContent.js +0 -314
  180. package/dist/components/OrderSummary/constants.d.ts +0 -3
  181. package/dist/components/OrderSummary/constants.d.ts.map +0 -1
  182. package/dist/components/OrderSummary/constants.js +0 -18
  183. package/dist/components/OrderSummary/helpers.d.ts +0 -28
  184. package/dist/components/OrderSummary/helpers.d.ts.map +0 -1
  185. package/dist/components/OrderSummary/helpers.js +0 -156
  186. package/dist/components/OrderSummary/locales/en.d.ts +0 -11
  187. package/dist/components/OrderSummary/locales/en.d.ts.map +0 -1
  188. package/dist/components/OrderSummary/locales/en.js +0 -12
  189. package/dist/components/OrderSummary/styles.css.d.ts +0 -21
  190. package/dist/components/OrderSummary/styles.css.d.ts.map +0 -1
  191. package/dist/components/OrderSummary/styles.css.js +0 -26
  192. package/dist/components/OrderSummary/types.d.ts +0 -125
  193. package/dist/components/OrderSummary/types.d.ts.map +0 -1
  194. package/dist/components/Plans/FeatureHint.d.ts +0 -7
  195. package/dist/components/Plans/FeatureHint.d.ts.map +0 -1
  196. package/dist/components/Plans/FeatureHint.js +0 -42
  197. package/dist/components/Plans/PlanHeader.d.ts +0 -14
  198. package/dist/components/Plans/PlanHeader.d.ts.map +0 -1
  199. package/dist/components/Plans/PlanHeader.js +0 -96
  200. package/dist/components/Plans/locales/en.d.ts +0 -7
  201. package/dist/components/Plans/locales/en.d.ts.map +0 -1
  202. package/dist/components/Plans/locales/en.js +0 -8
  203. package/dist/components/Plans/styles.css.d.ts +0 -67
  204. package/dist/components/Plans/styles.css.d.ts.map +0 -1
  205. package/dist/components/Plans/styles.css.js +0 -26
  206. package/dist/components/Plans/types.d.ts +0 -38
  207. package/dist/components/Plans/types.d.ts.map +0 -1
  208. package/dist/components/SteppedListCard/Step.d.ts +0 -23
  209. package/dist/components/SteppedListCard/Step.d.ts.map +0 -1
  210. package/dist/components/SteppedListCard/Step.js +0 -61
  211. package/dist/components/SteppedListCard/SteppedListCard.d.ts +0 -69
  212. package/dist/components/SteppedListCard/SteppedListCard.d.ts.map +0 -1
  213. package/dist/components/SteppedListCard/SteppedListCard.js +0 -105
  214. package/dist/components/SteppedListCard/SteppedListContent.d.ts +0 -12
  215. package/dist/components/SteppedListCard/SteppedListContent.d.ts.map +0 -1
  216. package/dist/components/SteppedListCard/SteppedListContent.js +0 -53
  217. package/dist/components/SteppedListCard/helper.d.ts +0 -27
  218. package/dist/components/SteppedListCard/helper.d.ts.map +0 -1
  219. package/dist/components/SteppedListCard/helper.js +0 -41
  220. package/dist/components/SteppedListCard/styles.css.d.ts +0 -9
  221. package/dist/components/SteppedListCard/styles.css.d.ts.map +0 -1
  222. package/dist/components/SteppedListCard/styles.css.js +0 -19
@@ -1,38 +0,0 @@
1
- import type { Text } from '@ultraviolet/ui';
2
- import type { ComponentProps, ReactNode } from 'react';
3
- export type Hint = {
4
- type: 'tooltip';
5
- text: string;
6
- } | {
7
- type: 'popover';
8
- title: string;
9
- content: ReactNode;
10
- };
11
- export type PlanType<T extends string> = {
12
- value: string;
13
- title: string;
14
- titleHeader?: ReactNode;
15
- sentiment?: ComponentProps<typeof Text>['sentiment'];
16
- header: {
17
- description?: ReactNode;
18
- price: string;
19
- quotas?: string;
20
- priceDescription?: string;
21
- cta?: ReactNode;
22
- separator?: ReactNode;
23
- };
24
- outOfStock?: boolean;
25
- disabled?: boolean;
26
- data: Record<T, string | number | undefined | ReactNode>;
27
- };
28
- export type Feature<T extends string> = {
29
- key: T;
30
- text: string;
31
- description?: string;
32
- spaceAfter?: boolean;
33
- hint?: Hint;
34
- } | {
35
- group: string;
36
- hint?: Hint;
37
- };
38
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Plans/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtD,MAAM,MAAM,IAAI,GACZ;IACE,IAAI,EAAE,SAAS,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb,GACD;IACE,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,SAAS,CAAA;CACnB,CAAA;AAEL,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,IAAI;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,SAAS,CAAC,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,WAAW,CAAC,CAAA;IACpD,MAAM,EAAE;QACN,WAAW,CAAC,EAAE,SAAS,CAAA;QACvB,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,gBAAgB,CAAC,EAAE,MAAM,CAAA;QACzB,GAAG,CAAC,EAAE,SAAS,CAAA;QACf,SAAS,CAAC,EAAE,SAAS,CAAA;KACtB,CAAA;IACD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC,CAAA;CACzD,CAAA;AAED,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,IAChC;IACE,GAAG,EAAE,CAAC,CAAA;IACN,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ,GACD;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,CAAA"}
@@ -1,23 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- type StepProps = {
3
- /**
4
- * The number of the step, max 5 steps.
5
- */
6
- stepNumber: number;
7
- /**
8
- * An icon to replace the step number in the bullet
9
- */
10
- stepIcon?: ReactNode;
11
- /**
12
- * Title of the step
13
- */
14
- stepTitle: string;
15
- /**
16
- * State of the step
17
- */
18
- completed: boolean;
19
- 'data-testid'?: string;
20
- };
21
- export declare const SteppedList: ({ stepNumber, stepTitle, completed, stepIcon, "data-testid": dataTestId, }: StepProps) => import("react/jsx-runtime").JSX.Element;
22
- export {};
23
- //# sourceMappingURL=Step.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../src/components/SteppedListCard/Step.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,KAAK,SAAS,GAAG;IACf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,4EAMzB,SAAS,4CAyCX,CAAA"}
@@ -1,61 +0,0 @@
1
- "use client";
2
- import { jsx } from "react/jsx-runtime";
3
- import { CheckIcon } from "@ultraviolet/icons/CheckIcon";
4
- import { StepList, Text } from "@ultraviolet/ui";
5
- import { useContext } from "react";
6
- import { Data } from "./helper.js";
7
- import { steppedListCardStep, steppedListCardStepTitle } from "./styles.css.js";
8
- const SteppedList = ({
9
- stepNumber,
10
- stepTitle,
11
- completed,
12
- stepIcon,
13
- "data-testid": dataTestId
14
- }) => {
15
- const containerData = useContext(Data);
16
- const active = containerData.currentStep === stepNumber;
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
- );
58
- };
59
- export {
60
- SteppedList
61
- };
@@ -1,69 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- type SteppedListContainerProps = {
3
- /**
4
- * Title of the section, introduces the feature.
5
- */
6
- header: ReactNode;
7
- /**
8
- * List of steps
9
- */
10
- steps: (string | {
11
- title: string;
12
- icon: ReactNode;
13
- })[];
14
- /**
15
- * Define here the content of each step
16
- */
17
- children: ReactNode;
18
- /**
19
- * Function called when the component is closed. This function will overload the default behavior.
20
- */
21
- onClickHide?: () => void;
22
- } & ({
23
- /**
24
- * Show the toggle option
25
- */
26
- showToggleOption: false;
27
- hideTooltipText?: never;
28
- hideText?: never;
29
- showText?: never;
30
- showTooltipText?: never;
31
- } | {
32
- /**
33
- * Show the toggle option
34
- */
35
- showToggleOption?: true;
36
- /**
37
- * Text of the tooltip on the hide button
38
- */
39
- hideTooltipText?: string;
40
- /**
41
- * Text of the "hide" button
42
- */
43
- hideText?: string;
44
- /**
45
- * Text of the "show" button
46
- */
47
- showText?: string;
48
- /**
49
- * Text of tooltip on the "show" button
50
- */
51
- showTooltipText?: string;
52
- });
53
- /**
54
- * SteppedListCard is a component created for guiding users through steps in a structured and linear manner.
55
- * It can pass prop "nextStep" to its children.
56
- */
57
- declare const SteppedListCard: {
58
- ({ header, showToggleOption, hideTooltipText, hideText, showText, showTooltipText, children, steps, onClickHide, }: SteppedListContainerProps): import("react/jsx-runtime").JSX.Element;
59
- Step: ({ subHeader, children, image, stepNumber, completed, style, }: {
60
- subHeader?: ReactNode;
61
- children: ((nextStep: (completed?: boolean) => void) => ReactNode) | ReactNode;
62
- image?: ReactNode;
63
- stepNumber: number;
64
- completed?: boolean;
65
- style?: import("react").CSSProperties;
66
- }) => import("react/jsx-runtime").JSX.Element | null;
67
- };
68
- export { SteppedListCard };
69
- //# sourceMappingURL=SteppedListCard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SteppedListCard.d.ts","sourceRoot":"","sources":["../../../src/components/SteppedListCard/SteppedListCard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAWtC,KAAK,yBAAyB,GAAG;IAC/B;;OAEG;IACH,MAAM,EAAE,SAAS,CAAA;IACjB;;OAEG;IACH,KAAK,EAAE,CAAC,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE,CAAC,EAAE,CAAA;IACtD;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;CACzB,GAAG,CACA;IACE;;OAEG;IACH,gBAAgB,EAAE,KAAK,CAAA;IACvB,eAAe,CAAC,EAAE,KAAK,CAAA;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,eAAe,CAAC,EAAE,KAAK,CAAA;CACxB,GACD;IACE;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAA;IACvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CACJ,CAAA;AAED;;;GAGG;AACH,QAAA,MAAM,eAAe;wHAUlB,yBAAyB;;;wCAlEvB,CAAC;;;;;;CAmKL,CAAA;AAID,OAAO,EAAE,eAAe,EAAE,CAAA"}
@@ -1,105 +0,0 @@
1
- "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import { Stack, Text, Button, Card, Row, StepList } from "@ultraviolet/ui";
4
- import { Children, useState, useMemo } from "react";
5
- import { Data } from "./helper.js";
6
- import { SteppedList } from "./Step.js";
7
- import { SteppedListContent } from "./SteppedListContent.js";
8
- import { hideButton, steppedListCard, steppedListCardWrapper } from "./styles.css.js";
9
- const SteppedListCard = ({
10
- header,
11
- showToggleOption = true,
12
- hideTooltipText,
13
- hideText = "Hide",
14
- showText = "Show",
15
- showTooltipText,
16
- children,
17
- steps,
18
- onClickHide
19
- }) => {
20
- const numberOfSteps = Children.count(children);
21
- const [currentStep, setCurrentStep] = useState(1);
22
- const [hidden, setHidden] = useState(false);
23
- const [done, setDone] = useState(new Array(steps.length).fill(false));
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
- );
44
- const onClickHideButton = () => {
45
- if (onClickHide) {
46
- onClickHide();
47
- } else {
48
- setHidden(!hidden);
49
- }
50
- };
51
- return /* @__PURE__ */ jsx(Data.Provider, { value: values, children: /* @__PURE__ */ jsxs(Stack, { gap: 2, width: "100%", children: [
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
- ),
75
- hidden ? null : /* @__PURE__ */ jsx(Card, { className: steppedListCard, children: /* @__PURE__ */ jsxs(Row, { templateColumns: "1fr 3fr", children: [
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
- ),
98
- children
99
- ] }) })
100
- ] }) });
101
- };
102
- SteppedListCard.Step = SteppedListContent;
103
- export {
104
- SteppedListCard
105
- };
@@ -1,12 +0,0 @@
1
- import type { CSSProperties, ReactNode } from 'react';
2
- type SteppedListContentProps = {
3
- subHeader?: ReactNode;
4
- children: ((nextStep: (completed?: boolean) => void) => ReactNode) | ReactNode;
5
- image?: ReactNode;
6
- stepNumber: number;
7
- completed?: boolean;
8
- style?: CSSProperties;
9
- };
10
- export declare const SteppedListContent: ({ subHeader, children, image, stepNumber, completed, style, }: SteppedListContentProps) => import("react/jsx-runtime").JSX.Element | null;
11
- export {};
12
- //# sourceMappingURL=SteppedListContent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SteppedListContent.d.ts","sourceRoot":"","sources":["../../../src/components/SteppedListCard/SteppedListContent.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AASrD,KAAK,uBAAuB,GAAG;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,KAAK,SAAS,CAAC,GAAG,SAAS,CAAA;IAC9E,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AACD,eAAO,MAAM,kBAAkB,GAAI,+DAOhC,uBAAuB,mDAoDzB,CAAA"}
@@ -1,53 +0,0 @@
1
- "use client";
2
- import { jsxs, jsx } from "react/jsx-runtime";
3
- import { Stack, Text } from "@ultraviolet/ui";
4
- import { useContext, useEffect } from "react";
5
- import { Data, nextStep } from "./helper.js";
6
- import { steppedListCardContent, steppedListCardSubHeader, steppedListCardImage } from "./styles.css.js";
7
- const SteppedListContent = ({
8
- subHeader,
9
- children,
10
- image,
11
- stepNumber,
12
- completed = false,
13
- style
14
- }) => {
15
- const {
16
- setDone,
17
- currentStep,
18
- done,
19
- setCurrentStep,
20
- numberOfSteps,
21
- setHidden,
22
- onClickHide
23
- } = useContext(Data);
24
- useEffect(() => {
25
- setDone((prevDone) => {
26
- const updatedDone = [...prevDone];
27
- updatedDone[stepNumber - 1] = completed;
28
- return updatedDone;
29
- });
30
- }, [completed, setDone, stepNumber]);
31
- if (stepNumber === currentStep) {
32
- return /* @__PURE__ */ jsxs(Stack, { className: steppedListCardContent, style, children: [
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(
35
- (completedArg) => nextStep({
36
- completed: completedArg,
37
- done,
38
- numberOfSteps,
39
- onClickHide,
40
- setCompleted: setDone,
41
- setCurrentStep,
42
- setHidden,
43
- stepNumber
44
- })
45
- ) : children,
46
- /* @__PURE__ */ jsx("div", { className: steppedListCardImage, children: image })
47
- ] });
48
- }
49
- return null;
50
- };
51
- export {
52
- SteppedListContent
53
- };
@@ -1,27 +0,0 @@
1
- type ContextType = {
2
- currentStep: number;
3
- setCurrentStep: React.Dispatch<React.SetStateAction<number>>;
4
- numberOfSteps: number;
5
- done: boolean[];
6
- setDone: React.Dispatch<React.SetStateAction<boolean[]>>;
7
- setHidden: React.Dispatch<React.SetStateAction<boolean>>;
8
- onClickHide?: () => void;
9
- };
10
- export declare const Data: import("react").Context<ContextType>;
11
- type NextStepProps = {
12
- completed?: boolean;
13
- setCompleted: React.Dispatch<React.SetStateAction<boolean[]>>;
14
- stepNumber: number;
15
- setCurrentStep: React.Dispatch<React.SetStateAction<number>>;
16
- numberOfSteps: number;
17
- setHidden: React.Dispatch<React.SetStateAction<boolean>>;
18
- done: boolean[];
19
- onClickHide?: () => void;
20
- };
21
- /**
22
- * Go to next step with or without validation of the current step
23
- * Close the component for the last step
24
- */
25
- export declare const nextStep: ({ completed, setCompleted, stepNumber, setCurrentStep, numberOfSteps, setHidden, done, onClickHide, }: NextStepProps) => void;
26
- export {};
27
- //# sourceMappingURL=helper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/components/SteppedListCard/helper.ts"],"names":[],"mappings":"AAEA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5D,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;IACxD,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;IACxD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,IAAI,sCAQf,CAAA;AAEF,KAAK,aAAa,GAAG;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;IAC7D,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5D,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;IACxD,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;CACzB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,uGAStB,aAAa,SAaf,CAAA"}
@@ -1,41 +0,0 @@
1
- import { createContext } from "react";
2
- const Data = createContext({
3
- currentStep: 1,
4
- done: [false, false, false, false, false],
5
- numberOfSteps: 1,
6
- onClickHide: () => {
7
- },
8
- setCurrentStep: () => {
9
- },
10
- setDone: () => {
11
- },
12
- setHidden: () => {
13
- }
14
- });
15
- const nextStep = ({
16
- completed,
17
- setCompleted,
18
- stepNumber,
19
- setCurrentStep,
20
- numberOfSteps,
21
- setHidden,
22
- done,
23
- onClickHide
24
- }) => {
25
- const newValue = completed === void 0 ? done[stepNumber - 1] : completed;
26
- const tempDone = done.map(
27
- (item, index) => index === stepNumber - 1 ? newValue : item
28
- );
29
- setCompleted(tempDone);
30
- if (numberOfSteps > stepNumber) {
31
- setCurrentStep(stepNumber + 1);
32
- } else if (onClickHide) {
33
- onClickHide();
34
- } else {
35
- setHidden(true);
36
- }
37
- };
38
- export {
39
- Data,
40
- nextStep
41
- };
@@ -1,9 +0,0 @@
1
- export declare const steppedListCard: string;
2
- export declare const steppedListCardWrapper: string;
3
- export declare const steppedListCardContent: string;
4
- export declare const steppedListCardImage: string;
5
- export declare const steppedListCardSubHeader: string;
6
- export declare const steppedListCardStepTitle: string;
7
- export declare const steppedListCardStep: string;
8
- export declare const hideButton: string;
9
- //# sourceMappingURL=styles.css.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/SteppedListCard/styles.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,QAAwB,CAAA;AAEpD,eAAO,MAAM,sBAAsB,QAGjC,CAAA;AAEF,eAAO,MAAM,sBAAsB,QAIjC,CAAA;AAEF,eAAO,MAAM,oBAAoB,QAG/B,CAAA;AAEF,eAAO,MAAM,wBAAwB,QAEnC,CAAA;AAEF,eAAO,MAAM,wBAAwB,QAgBnC,CAAA;AAEF,eAAO,MAAM,mBAAmB,QAE9B,CAAA;AAEF,eAAO,MAAM,UAAU,QAErB,CAAA"}
@@ -1,19 +0,0 @@
1
- /* empty css */
2
- var steppedListCard = "uv_plus_l0ny240";
3
- var steppedListCardWrapper = "uv_plus_l0ny241";
4
- var steppedListCardContent = "uv_plus_l0ny242";
5
- var steppedListCardImage = "uv_plus_l0ny243";
6
- var steppedListCardSubHeader = "uv_plus_l0ny244";
7
- var steppedListCardStepTitle = "uv_plus_l0ny245";
8
- var steppedListCardStep = "uv_plus_l0ny246";
9
- var hideButton = "uv_plus_l0ny247";
10
- export {
11
- hideButton,
12
- steppedListCard,
13
- steppedListCardContent,
14
- steppedListCardImage,
15
- steppedListCardStep,
16
- steppedListCardStepTitle,
17
- steppedListCardSubHeader,
18
- steppedListCardWrapper
19
- };