@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,22 +1,36 @@
1
- /* empty css */
1
+ /* empty css */
2
2
  import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
3
- var navigationStickyFooter = createRuntimeFn({ defaultClassName: "uv_plus_19x50fv0", variantClassNames: { overflow: { false: "uv_plus_19x50fv1" } }, defaultVariants: { overflow: false }, compoundVariants: [] });
3
+
4
+ //#region src/components/Navigation/styles.css.ts
5
+ var navigationStickyFooter = createRuntimeFn({
6
+ defaultClassName: "uv_plus_19x50fv0",
7
+ variantClassNames: { overflow: { false: "uv_plus_19x50fv1" } },
8
+ defaultVariants: { overflow: false },
9
+ compoundVariants: []
10
+ });
4
11
  var navigationHeader = "uv_plus_19x50fv2";
5
12
  var navigationLogoContainer = "uv_plus_19x50fv3";
6
13
  var navigation = "uv_plus_19x50fv4";
7
- var navigationContainer = createRuntimeFn({ defaultClassName: "uv_plus_19x50fv5", variantClassNames: { animation: { collapse: "uv_plus_19x50fv6", expand: "uv_plus_19x50fv7", false: "uv_plus_19x50fv8" }, expanded: { false: "uv_plus_19x50fv9" } }, defaultVariants: {}, compoundVariants: [[{ animation: false, expanded: true }, "uv_plus_19x50fva"]] });
14
+ var navigationContainer = createRuntimeFn({
15
+ defaultClassName: "uv_plus_19x50fv5",
16
+ variantClassNames: {
17
+ animation: {
18
+ collapse: "uv_plus_19x50fv6",
19
+ expand: "uv_plus_19x50fv7",
20
+ false: "uv_plus_19x50fv8"
21
+ },
22
+ expanded: { false: "uv_plus_19x50fv9" }
23
+ },
24
+ defaultVariants: {},
25
+ compoundVariants: [[{
26
+ animation: false,
27
+ expanded: true
28
+ }, "uv_plus_19x50fva"]]
29
+ });
8
30
  var navigationContentContainer = "uv_plus_19x50fvb";
9
31
  var navigationContentContainerCollapsed = "uv_plus_19x50fvc";
10
32
  var navigationContent = "uv_plus_19x50fvd";
11
33
  var navigationSlider = "uv_plus_19x50fve";
12
- export {
13
- navigation,
14
- navigationContainer,
15
- navigationContent,
16
- navigationContentContainer,
17
- navigationContentContainerCollapsed,
18
- navigationHeader,
19
- navigationLogoContainer,
20
- navigationSlider,
21
- navigationStickyFooter
22
- };
34
+
35
+ //#endregion
36
+ export { navigation, navigationContainer, navigationContent, navigationContentContainer, navigationContentContainerCollapsed, navigationHeader, navigationLogoContainer, navigationSlider, navigationStickyFooter };
@@ -1,5 +1,7 @@
1
- /* empty css */
1
+ /* empty css */
2
+
3
+ //#region src/components/Navigation/variables.css.ts
2
4
  var widthNavigationContainer = "var(--uv_plus_1rde5pt0)";
3
- export {
4
- widthNavigationContainer
5
- };
5
+
6
+ //#endregion
7
+ export { widthNavigationContainer };
@@ -1,52 +1,6 @@
1
- import { List } from '@ultraviolet/ui';
2
- import type { ComponentProps, CSSProperties } from 'react';
3
- type OfferListProps = Omit<ComponentProps<typeof List>, 'selectable' | 'onSelectedChange'> & {
4
- /**
5
- * Make offerList selectable by choosing its type
6
- */
7
- type?: 'radio' | 'checkbox';
8
- onChangeSelect?: (selected: string | string[]) => void;
9
- /**
10
- * Pre-selected rows (using their offerName). Must be an array when `type = "checkbox"`.
11
- */
12
- selected?: string | string[];
13
- ['data-testid']?: string;
14
- className?: string;
15
- style?: CSSProperties;
16
- };
17
- export declare const OfferList: {
18
- ({ expandable, type, columns, children, loading, autoCollapse, selected, onChangeSelect, className, style, "data-testid": dataTestId, }: OfferListProps): import("react/jsx-runtime").JSX.Element;
19
- Row: ({ children, disabled, id, banner, expandablePadding, offerName, expandable: expandableContent, selectDisabled, highlightAnimation, expanded, className, "data-dragging": dataDragging, "data-testid": dataTestId, style, badge, }: {
20
- children: import("react").ReactNode;
21
- id: string;
22
- expandable?: import("react").ReactNode;
23
- selectDisabled?: boolean | string;
24
- disabled?: boolean;
25
- sentiment?: "neutral" | "primary" | "danger" | "info" | "secondary" | "success" | "warning";
26
- expanded?: boolean;
27
- className?: string;
28
- expandablePadding?: "0" | "1" | "0.5" | "0.25" | "1.5" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10";
29
- highlightAnimation?: boolean;
30
- 'data-testid'?: string;
31
- style?: CSSProperties;
32
- 'data-dragging'?: boolean;
33
- onMouseEnter?: import("react").MouseEventHandler<HTMLTableRowElement>;
34
- onMouseLeave?: import("react").MouseEventHandler<HTMLTableRowElement>;
35
- onClick?: (id: string) => void;
36
- } & import("react").RefAttributes<HTMLTableRowElement> & {
37
- banner?: {
38
- text: import("react").ReactNode;
39
- sentiment?: "neutral" | "primary" | "warning" | "danger";
40
- };
41
- offerName: string;
42
- badge?: {
43
- text: string;
44
- sentiment?: ComponentProps<typeof import("@ultraviolet/ui").Badge>["sentiment"];
45
- prominence?: ComponentProps<typeof import("@ultraviolet/ui").Badge>["prominence"];
46
- };
47
- style?: CSSProperties;
48
- }) => import("react/jsx-runtime").JSX.Element;
49
- Cell: ({ children, className, "data-testid": dataTestId, colSpan, style, }: ComponentProps<typeof List.Cell>) => import("react/jsx-runtime").JSX.Element;
50
- };
51
- export {};
1
+ import { OfferList as OfferListUV } from '@ultraviolet/ui/compositions/OfferList';
2
+ /**
3
+ * @deprecated Use `OfferList` from `@ultraviolet/ui/composition/OfferList` instead
4
+ */
5
+ export declare const OfferList: typeof OfferListUV;
52
6
  //# sourceMappingURL=OfferList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OfferList.d.ts","sourceRoot":"","sources":["../../../src/components/OfferList/OfferList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAO1D,KAAK,cAAc,GAAG,IAAI,CACxB,cAAc,CAAC,OAAO,IAAI,CAAC,EAC3B,YAAY,GAAG,kBAAkB,CAClC,GAAG;IACF;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,CAAA;IAC3B,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAA;IACtD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC5B,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,SAAS;6IAYnB,cAAc;;;;;;;;;;;;;;;;;;;;;qBAC0D,CAAC;;;;;qBAG5B,CAAC;sBAClB,CAAC;;;;;CA+C/B,CAAA"}
1
+ {"version":3,"file":"OfferList.d.ts","sourceRoot":"","sources":["../../../src/components/OfferList/OfferList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACjF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,OAAO,WAAyB,CAAA"}
@@ -1,78 +1,11 @@
1
- "use client";
2
- import { jsx } from "react/jsx-runtime";
3
- import { List } from "@ultraviolet/ui";
4
- import { cn } from "@ultraviolet/utils";
5
- import { useState, useEffect } from "react";
6
- import { Cell } from "./components/Cell.js";
7
- import { Row } from "./components/Row.js";
8
- import { OfferListProvider } from "./OfferListProvider.js";
9
- import { offerList } from "./styles.css.js";
10
- const OfferList = ({
11
- expandable,
12
- type = "radio",
13
- columns,
14
- children,
15
- loading,
16
- autoCollapse,
17
- selected,
18
- onChangeSelect,
19
- className,
20
- style,
21
- "data-testid": dataTestId
22
- }) => {
23
- const [radioSelectedRow, setRadioSelectedRow] = useState(
24
- typeof selected === "string" ? selected : void 0
25
- );
26
- const [checkboxSelectedRows, setCheckboxSelectedRows] = useState(
27
- Array.isArray(selected) ? selected : []
28
- );
29
- const computedColumns = [
30
- {
31
- label: ""
32
- },
33
- expandable ? { label: "" } : null,
34
- ...columns
35
- ].filter((element) => !!element);
36
- useEffect(() => {
37
- if (selected) {
38
- if (typeof selected === "string" && type === "radio") {
39
- setRadioSelectedRow(selected);
40
- }
41
- if (Array.isArray(selected) && type === "checkbox") {
42
- setCheckboxSelectedRows(selected);
43
- }
44
- }
45
- }, [type, selected]);
46
- return /* @__PURE__ */ jsx(
47
- OfferListProvider,
48
- {
49
- autoCollapse,
50
- checkboxSelectedRows,
51
- expandable,
52
- loading,
53
- onChangeSelect,
54
- radioSelectedRow,
55
- selectable: type,
56
- setCheckboxSelectedRows,
57
- setRadioSelectedRow,
58
- children: /* @__PURE__ */ jsx(
59
- List,
60
- {
61
- autoCollapse,
62
- className: cn(className, offerList),
63
- columns: computedColumns,
64
- "data-testid": dataTestId,
65
- expandable: false,
66
- selectable: false,
67
- style,
68
- children
69
- }
70
- )
71
- }
72
- );
73
- };
74
- OfferList.Row = Row;
75
- OfferList.Cell = Cell;
76
- export {
77
- OfferList
78
- };
1
+ 'use client';
2
+ import { OfferList } from "@ultraviolet/ui/compositions/OfferList";
3
+
4
+ //#region src/components/OfferList/OfferList.tsx
5
+ /**
6
+ * @deprecated Use `OfferList` from `@ultraviolet/ui/composition/OfferList` instead
7
+ */
8
+ const OfferList$1 = OfferList;
9
+
10
+ //#endregion
11
+ export { OfferList$1 as OfferList };
@@ -1,3 +1,6 @@
1
- import type { OrderSummaryProps } from './types';
2
- export declare const OrderSummary: ({ header, hideTimeUnit, periodOptions, valueUnitInput, unitUnitInput, items, locales, currency, localeFormat, footer, children, discount, totalPriceInfo, fractionDigits, hideDetails, onChange, onChangeUnitInput, totalPriceDescription, additionalInfo, className, totalPriceInfoPlacement, hideBeforePrice, "data-testid": dataTestId, style, priceInformation, }: OrderSummaryProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { OrderSummary as OrderSummaryUV } from '@ultraviolet/ui/compositions/OrderSummary';
2
+ /**
3
+ * @deprecated Use `OrderSummary` from `@ultraviolet/ui/composition/OrderSummary` instead
4
+ */
5
+ export declare const OrderSummary: typeof OrderSummaryUV;
3
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/OrderSummary/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,SAAS,CAAA;AAErE,eAAO,MAAM,YAAY,GAAI,uWA0B1B,iBAAiB,4CAsLnB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/OrderSummary/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,2CAA2C,CAAA;AAC1F;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,cAA+B,CAAA"}
@@ -1,204 +1,11 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Stack, Text, UnitInput } from "@ultraviolet/ui";
3
- import { cn } from "@ultraviolet/utils";
4
- import { useState, useMemo, useEffect } from "react";
5
- import { Units } from "./constants.js";
6
- import { calculateCategoryPrice } from "./helpers.js";
7
- import orderSummaryLocales from "./locales/en.js";
8
- import { NonScrollableContent } from "./NonScrollableContent.js";
9
- import { OrderSummaryContext } from "./Provider.js";
10
- import { ScrollableContent } from "./ScrollableContent.js";
11
- import { orderSummaryHeaderContainer, orderSummaryStackBackground, orderSummaryContainer } from "./styles.css.js";
12
- const OrderSummary = ({
13
- header,
14
- hideTimeUnit = false,
15
- periodOptions = Units,
16
- valueUnitInput = 1,
17
- unitUnitInput = "hours",
18
- items,
19
- locales = orderSummaryLocales,
20
- currency = "EUR",
21
- localeFormat = "en-US",
22
- footer,
23
- children,
24
- discount = 0,
25
- totalPriceInfo,
26
- fractionDigits,
27
- hideDetails = false,
28
- onChange,
29
- onChangeUnitInput,
30
- totalPriceDescription,
31
- additionalInfo,
32
- className,
33
- totalPriceInfoPlacement = "left",
34
- hideBeforePrice = false,
35
- "data-testid": dataTestId,
36
- style,
37
- priceInformation
38
- }) => {
39
- const [timePeriodUnit, setTimePeriodUnit] = useState(unitUnitInput);
40
- const [timePeriodAmount, setTimePeriodAmount] = useState(valueUnitInput);
41
- const categoriesPrice = useMemo(
42
- () => items.reduce((acc, category) => {
43
- const { categoryPrice, discountedPrice } = calculateCategoryPrice(
44
- category,
45
- hideTimeUnit,
46
- timePeriodAmount,
47
- timePeriodUnit
48
- );
49
- return {
50
- ...acc,
51
- [category.category]: {
52
- maxPrice: categoryPrice[1],
53
- maxPriceWithDiscount: discountedPrice[1],
54
- timeUnit: unitUnitInput,
55
- totalPrice: categoryPrice[0],
56
- totalPriceWithDiscount: discountedPrice[0]
57
- }
58
- };
59
- }, {}),
60
- [hideTimeUnit, items, timePeriodAmount, timePeriodUnit, unitUnitInput]
61
- );
62
- const totalPrice = useMemo(() => {
63
- const price = Object.values(categoriesPrice).reduce(
64
- (acc, categoryPrice) => [
65
- acc[0] + categoryPrice.totalPrice,
66
- acc[1] + categoryPrice.maxPrice
67
- ],
68
- [0, 0]
69
- );
70
- const priceDiscounted = Object.values(categoriesPrice).reduce(
71
- (acc, categoryPrice) => [
72
- acc[0] + categoryPrice.totalPriceWithDiscount,
73
- acc[1] + categoryPrice.maxPriceWithDiscount
74
- ],
75
- [0, 0]
76
- );
77
- const computedPrice = {
78
- maxPrice: Math.max(price[1], 0),
79
- maxPriceWithDiscount: Math.max(
80
- priceDiscounted[1] * (discount <= 1 ? 1 - discount : 1) - (discount > 1 ? Math.abs(discount) : 0),
81
- 0
82
- ),
83
- timeUnit: unitUnitInput,
84
- totalPrice: Math.max(price[0], 0),
85
- totalPriceWithDiscount: Math.max(
86
- priceDiscounted[0] * (discount <= 1 ? 1 - discount : 1) - (discount > 1 ? Math.abs(discount) : 0),
87
- 0
88
- )
89
- };
90
- return computedPrice;
91
- }, [categoriesPrice, discount, unitUnitInput]);
92
- const valueContext = useMemo(
93
- () => ({
94
- categoriesPrice,
95
- currency,
96
- fractionDigits,
97
- hideTimeUnit,
98
- items,
99
- localeFormat,
100
- locales,
101
- timePeriodAmount,
102
- timePeriodUnit
103
- }),
104
- [
105
- currency,
106
- localeFormat,
107
- items,
108
- categoriesPrice,
109
- hideTimeUnit,
110
- timePeriodUnit,
111
- timePeriodAmount,
112
- locales,
113
- fractionDigits
114
- ]
115
- );
116
- const computePeriodOptions = useMemo(() => {
117
- const computedPeriodOptions = [];
118
- for (const option of periodOptions) {
119
- computedPeriodOptions.push({
120
- label: locales[`order.summary.units.${option}.label`],
121
- value: option
122
- });
123
- }
124
- return computedPeriodOptions;
125
- }, [periodOptions, locales]);
126
- useEffect(() => {
127
- onChange?.(categoriesPrice, totalPrice);
128
- }, [categoriesPrice, totalPrice, onChange]);
129
- return /* @__PURE__ */ jsx(OrderSummaryContext.Provider, { value: valueContext, children: /* @__PURE__ */ jsxs(
130
- Stack,
131
- {
132
- className: cn(className, orderSummaryContainer),
133
- "data-testid": dataTestId,
134
- justifyContent: hideDetails ? "flex-start" : "space-between",
135
- style,
136
- children: [
137
- header ? /* @__PURE__ */ jsxs(
138
- Stack,
139
- {
140
- alignItems: "center",
141
- className: orderSummaryHeaderContainer[hideDetails ? "hideDetails" : "showDetails"],
142
- direction: "row",
143
- gap: 2,
144
- justifyContent: "space-between",
145
- children: [
146
- /* @__PURE__ */ jsx(
147
- Text,
148
- {
149
- as: "h3",
150
- prominence: "strong",
151
- sentiment: "neutral",
152
- variant: "headingSmallStrong",
153
- children: header
154
- }
155
- ),
156
- hideTimeUnit || hideDetails ? null : /* @__PURE__ */ jsx(Stack, { className: orderSummaryStackBackground, children: /* @__PURE__ */ jsx(
157
- UnitInput,
158
- {
159
- dropdownAlign: "center",
160
- maxWidth: "200px",
161
- onChange: (value) => {
162
- setTimePeriodAmount(value);
163
- },
164
- onChangeUnitValue: (val) => {
165
- setTimePeriodUnit(val);
166
- onChangeUnitInput?.(val);
167
- },
168
- options: computePeriodOptions,
169
- selectInputWidth: "100%",
170
- size: "small",
171
- templateColumns: "2fr 3fr",
172
- unitValue: unitUnitInput,
173
- value: valueUnitInput
174
- }
175
- ) })
176
- ]
177
- }
178
- ) : null,
179
- hideDetails ? null : /* @__PURE__ */ jsx(ScrollableContent, {}),
180
- /* @__PURE__ */ jsx(
181
- NonScrollableContent,
182
- {
183
- additionalInfo,
184
- defaultPriceInformation: priceInformation === true || hideDetails && !priceInformation && priceInformation !== false,
185
- discount,
186
- footer,
187
- hideBeforePrice,
188
- priceInformation,
189
- timePeriodAmount,
190
- totalPrice,
191
- totalPriceDescription,
192
- totalPriceInfo,
193
- totalPriceInfoPlacement,
194
- unit: timePeriodUnit,
195
- children
196
- }
197
- )
198
- ]
199
- }
200
- ) });
201
- };
202
- export {
203
- OrderSummary
204
- };
1
+ 'use client';
2
+ import { OrderSummary } from "@ultraviolet/ui/compositions/OrderSummary";
3
+
4
+ //#region src/components/OrderSummary/index.ts
5
+ /**
6
+ * @deprecated Use `OrderSummary` from `@ultraviolet/ui/composition/OrderSummary` instead
7
+ */
8
+ const OrderSummary$1 = OrderSummary;
9
+
10
+ //#endregion
11
+ export { OrderSummary$1 as OrderSummary };
@@ -1,22 +1,6 @@
1
- import type { CSSProperties } from 'react';
2
- import PlansLocales from './locales/en';
3
- import type { Feature, PlanType } from './types';
4
- type PlansProps<T extends string> = {
5
- fieldName?: string;
6
- onChange?: (newPlanValue: string | undefined) => void;
7
- value?: string;
8
- features: Feature<T>[];
9
- plans: PlanType<T>[];
10
- hideFeatureText?: boolean;
11
- hideLabels?: boolean;
12
- locales?: Record<keyof typeof PlansLocales, string>;
13
- style?: CSSProperties;
14
- /** Highlights a plan. Use plan value and define the content of the highlight badge */
15
- highlight?: {
16
- plan: string;
17
- content: string;
18
- };
19
- };
20
- export declare const Plans: <T extends string>({ fieldName, onChange, value, features, plans, hideFeatureText, hideLabels, locales, style, highlight, }: PlansProps<T>) => import("react/jsx-runtime").JSX.Element;
21
- export {};
1
+ import { Plans as PlansUV } from '@ultraviolet/ui/compositions/Plans';
2
+ /**
3
+ * @deprecated Use `Plans` from `@ultraviolet/ui/composition/Plans` instead
4
+ */
5
+ export declare const Plans: typeof PlansUV;
22
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Plans/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,OAAO,YAAY,MAAM,cAAc,CAAA;AASvC,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEhD,KAAK,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAA;IACrD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;IACtB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAA;IACpB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,OAAO,YAAY,EAAE,MAAM,CAAC,CAAA;IACnD,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,sFAAsF;IACtF,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAC9C,CAAA;AAED,eAAO,MAAM,KAAK,GAAI,CAAC,SAAS,MAAM,EAAE,0GAWrC,UAAU,CAAC,CAAC,CAAC,4CAsOf,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Plans/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,oCAAoC,CAAA;AACrE;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,OAAO,OAAiB,CAAA"}