@ultraviolet/plus 3.5.1 → 3.6.0

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 (201) hide show
  1. package/dist/components/CodeEditor/CodeEditor.d.ts +5 -38
  2. package/dist/components/CodeEditor/CodeEditor.d.ts.map +1 -1
  3. package/dist/components/CodeEditor/CodeEditor.js +6 -113
  4. package/dist/components/ContentCard/index.d.ts +3 -34
  5. package/dist/components/ContentCard/index.d.ts.map +1 -1
  6. package/dist/components/ContentCard/index.js +4 -103
  7. package/dist/components/ContentCardGroup/index.d.ts +5 -20
  8. package/dist/components/ContentCardGroup/index.d.ts.map +1 -1
  9. package/dist/components/ContentCardGroup/index.js +6 -16
  10. package/dist/components/Conversation/index.d.ts +5 -49
  11. package/dist/components/Conversation/index.d.ts.map +1 -1
  12. package/dist/components/Conversation/index.js +6 -46
  13. package/dist/components/CustomerSatisfaction/index.d.ts +5 -32
  14. package/dist/components/CustomerSatisfaction/index.d.ts.map +1 -1
  15. package/dist/components/CustomerSatisfaction/index.js +6 -84
  16. package/dist/components/EstimateCost/index.d.ts +9 -3
  17. package/dist/components/EstimateCost/index.d.ts.map +1 -1
  18. package/dist/components/EstimateCost/index.js +15 -0
  19. package/dist/components/FAQ/index.d.ts +5 -13
  20. package/dist/components/FAQ/index.d.ts.map +1 -1
  21. package/dist/components/FAQ/index.js +6 -35
  22. package/dist/components/InfoTable/index.d.ts +5 -1
  23. package/dist/components/InfoTable/index.d.ts.map +1 -1
  24. package/dist/components/InfoTable/index.js +11 -0
  25. package/dist/components/Navigation/index.d.ts +13 -2
  26. package/dist/components/Navigation/index.d.ts.map +1 -1
  27. package/dist/components/Navigation/index.js +19 -0
  28. package/dist/index.js +4 -6
  29. package/package.json +9 -9
  30. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/defineProperty.js +0 -15
  31. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/objectSpread2.js +0 -28
  32. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/objectWithoutProperties.js +0 -18
  33. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/objectWithoutPropertiesLoose.js +0 -15
  34. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/toPrimitive.js +0 -17
  35. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/toPropertyKey.js +0 -12
  36. package/dist/_virtual/_@oxc-project_runtime@0.113.0/helpers/typeof.js +0 -14
  37. package/dist/_virtual/_rolldown/runtime.js +0 -9
  38. package/dist/components/CodeEditor/styles.css.d.ts +0 -10
  39. package/dist/components/CodeEditor/styles.css.d.ts.map +0 -1
  40. package/dist/components/CodeEditor/styles.css.js +0 -24
  41. package/dist/components/ContentCard/Skeleton.d.ts +0 -6
  42. package/dist/components/ContentCard/Skeleton.d.ts.map +0 -1
  43. package/dist/components/ContentCard/Skeleton.js +0 -32
  44. package/dist/components/ContentCard/styles.css.d.ts +0 -13
  45. package/dist/components/ContentCard/styles.css.d.ts.map +0 -1
  46. package/dist/components/ContentCard/styles.css.js +0 -31
  47. package/dist/components/ContentCardGroup/Card.d.ts +0 -15
  48. package/dist/components/ContentCardGroup/Card.d.ts.map +0 -1
  49. package/dist/components/ContentCardGroup/Card.js +0 -57
  50. package/dist/components/ContentCardGroup/SkeletonCard.d.ts +0 -2
  51. package/dist/components/ContentCardGroup/SkeletonCard.d.ts.map +0 -1
  52. package/dist/components/ContentCardGroup/SkeletonCard.js +0 -29
  53. package/dist/components/ContentCardGroup/styles.css.d.ts +0 -8
  54. package/dist/components/ContentCardGroup/styles.css.d.ts.map +0 -1
  55. package/dist/components/ContentCardGroup/styles.css.js +0 -13
  56. package/dist/components/Conversation/styles.css.js +0 -23
  57. package/dist/components/CustomerSatisfaction/assets/1-5.js +0 -5
  58. package/dist/components/CustomerSatisfaction/assets/1-5NB.js +0 -5
  59. package/dist/components/CustomerSatisfaction/assets/2-5.js +0 -5
  60. package/dist/components/CustomerSatisfaction/assets/2-5NB.js +0 -5
  61. package/dist/components/CustomerSatisfaction/assets/3-5.js +0 -5
  62. package/dist/components/CustomerSatisfaction/assets/3-5NB.js +0 -5
  63. package/dist/components/CustomerSatisfaction/assets/4-5.js +0 -5
  64. package/dist/components/CustomerSatisfaction/assets/4-5NB.js +0 -5
  65. package/dist/components/CustomerSatisfaction/assets/5-5.js +0 -5
  66. package/dist/components/CustomerSatisfaction/assets/5-5NB.js +0 -5
  67. package/dist/components/CustomerSatisfaction/styles.css.d.ts +0 -19
  68. package/dist/components/CustomerSatisfaction/styles.css.d.ts.map +0 -1
  69. package/dist/components/CustomerSatisfaction/styles.css.js +0 -20
  70. package/dist/components/EstimateCost/Components/CustomUnitInput.d.ts +0 -10
  71. package/dist/components/EstimateCost/Components/CustomUnitInput.d.ts.map +0 -1
  72. package/dist/components/EstimateCost/Components/CustomUnitInput.js +0 -41
  73. package/dist/components/EstimateCost/Components/Item.d.ts +0 -118
  74. package/dist/components/EstimateCost/Components/Item.d.ts.map +0 -1
  75. package/dist/components/EstimateCost/Components/Item.js +0 -228
  76. package/dist/components/EstimateCost/Components/LineThrough.d.ts +0 -7
  77. package/dist/components/EstimateCost/Components/LineThrough.d.ts.map +0 -1
  78. package/dist/components/EstimateCost/Components/LineThrough.js +0 -18
  79. package/dist/components/EstimateCost/Components/NumberInput.d.ts +0 -11
  80. package/dist/components/EstimateCost/Components/NumberInput.d.ts.map +0 -1
  81. package/dist/components/EstimateCost/Components/NumberInput.js +0 -35
  82. package/dist/components/EstimateCost/Components/Region.d.ts +0 -23
  83. package/dist/components/EstimateCost/Components/Region.d.ts.map +0 -1
  84. package/dist/components/EstimateCost/Components/Region.js +0 -38
  85. package/dist/components/EstimateCost/Components/Regular.d.ts +0 -11
  86. package/dist/components/EstimateCost/Components/Regular.d.ts.map +0 -1
  87. package/dist/components/EstimateCost/Components/Regular.js +0 -23
  88. package/dist/components/EstimateCost/Components/Strong.d.ts +0 -10
  89. package/dist/components/EstimateCost/Components/Strong.d.ts.map +0 -1
  90. package/dist/components/EstimateCost/Components/Strong.js +0 -16
  91. package/dist/components/EstimateCost/Components/Unit.d.ts +0 -11
  92. package/dist/components/EstimateCost/Components/Unit.d.ts.map +0 -1
  93. package/dist/components/EstimateCost/Components/Unit.js +0 -50
  94. package/dist/components/EstimateCost/Components/Zone.d.ts +0 -23
  95. package/dist/components/EstimateCost/Components/Zone.d.ts.map +0 -1
  96. package/dist/components/EstimateCost/Components/Zone.js +0 -37
  97. package/dist/components/EstimateCost/Components/components.css.d.ts +0 -78
  98. package/dist/components/EstimateCost/Components/components.css.d.ts.map +0 -1
  99. package/dist/components/EstimateCost/Components/components.css.js +0 -161
  100. package/dist/components/EstimateCost/EstimateCost.d.ts +0 -176
  101. package/dist/components/EstimateCost/EstimateCost.d.ts.map +0 -1
  102. package/dist/components/EstimateCost/EstimateCost.js +0 -97
  103. package/dist/components/EstimateCost/EstimateCostContent.d.ts +0 -3
  104. package/dist/components/EstimateCost/EstimateCostContent.d.ts.map +0 -1
  105. package/dist/components/EstimateCost/EstimateCostContent.js +0 -289
  106. package/dist/components/EstimateCost/EstimateCostProvider.d.ts +0 -26
  107. package/dist/components/EstimateCost/EstimateCostProvider.d.ts.map +0 -1
  108. package/dist/components/EstimateCost/EstimateCostProvider.js +0 -33
  109. package/dist/components/EstimateCost/OverlayComponent.d.ts +0 -27
  110. package/dist/components/EstimateCost/OverlayComponent.d.ts.map +0 -1
  111. package/dist/components/EstimateCost/OverlayComponent.js +0 -99
  112. package/dist/components/EstimateCost/OverlayContext.d.ts +0 -13
  113. package/dist/components/EstimateCost/OverlayContext.d.ts.map +0 -1
  114. package/dist/components/EstimateCost/OverlayContext.js +0 -15
  115. package/dist/components/EstimateCost/constants.d.ts +0 -8
  116. package/dist/components/EstimateCost/constants.d.ts.map +0 -1
  117. package/dist/components/EstimateCost/constants.js +0 -26
  118. package/dist/components/EstimateCost/helper.d.ts +0 -10
  119. package/dist/components/EstimateCost/helper.d.ts.map +0 -1
  120. package/dist/components/EstimateCost/helper.js +0 -11
  121. package/dist/components/EstimateCost/locales/en.d.ts +0 -23
  122. package/dist/components/EstimateCost/locales/en.d.ts.map +0 -1
  123. package/dist/components/EstimateCost/locales/en.js +0 -25
  124. package/dist/components/EstimateCost/styles.css.d.ts +0 -80
  125. package/dist/components/EstimateCost/styles.css.d.ts.map +0 -1
  126. package/dist/components/EstimateCost/styles.css.js +0 -70
  127. package/dist/components/EstimateCost/types.d.ts +0 -148
  128. package/dist/components/EstimateCost/types.d.ts.map +0 -1
  129. package/dist/components/FAQ/styles.css.d.ts +0 -2
  130. package/dist/components/FAQ/styles.css.d.ts.map +0 -1
  131. package/dist/components/FAQ/styles.css.js +0 -7
  132. package/dist/components/InfoTable/InfoTable.d.ts +0 -25
  133. package/dist/components/InfoTable/InfoTable.d.ts.map +0 -1
  134. package/dist/components/InfoTable/InfoTable.js +0 -28
  135. package/dist/components/InfoTable/components/Cell.d.ts +0 -10
  136. package/dist/components/InfoTable/components/Cell.d.ts.map +0 -1
  137. package/dist/components/InfoTable/components/Cell.js +0 -38
  138. package/dist/components/InfoTable/components/Row.d.ts +0 -9
  139. package/dist/components/InfoTable/components/Row.d.ts.map +0 -1
  140. package/dist/components/InfoTable/components/Row.js +0 -23
  141. package/dist/components/InfoTable/context.d.ts +0 -4
  142. package/dist/components/InfoTable/context.d.ts.map +0 -1
  143. package/dist/components/InfoTable/context.js +0 -7
  144. package/dist/components/InfoTable/styles.css.d.ts +0 -8
  145. package/dist/components/InfoTable/styles.css.d.ts.map +0 -1
  146. package/dist/components/InfoTable/styles.css.js +0 -13
  147. package/dist/components/Navigation/Footer.d.ts +0 -9
  148. package/dist/components/Navigation/Footer.d.ts.map +0 -1
  149. package/dist/components/Navigation/Footer.js +0 -64
  150. package/dist/components/Navigation/Header.d.ts +0 -7
  151. package/dist/components/Navigation/Header.d.ts.map +0 -1
  152. package/dist/components/Navigation/Header.js +0 -24
  153. package/dist/components/Navigation/Navigation.d.ts +0 -62
  154. package/dist/components/Navigation/Navigation.d.ts.map +0 -1
  155. package/dist/components/Navigation/Navigation.js +0 -34
  156. package/dist/components/Navigation/NavigationContent.d.ts +0 -3
  157. package/dist/components/Navigation/NavigationContent.d.ts.map +0 -1
  158. package/dist/components/Navigation/NavigationContent.js +0 -104
  159. package/dist/components/Navigation/NavigationProvider.d.ts +0 -94
  160. package/dist/components/Navigation/NavigationProvider.d.ts.map +0 -1
  161. package/dist/components/Navigation/NavigationProvider.js +0 -121
  162. package/dist/components/Navigation/animations.css.d.ts +0 -7
  163. package/dist/components/Navigation/animations.css.d.ts.map +0 -1
  164. package/dist/components/Navigation/components/Group.d.ts +0 -10
  165. package/dist/components/Navigation/components/Group.d.ts.map +0 -1
  166. package/dist/components/Navigation/components/Group.js +0 -39
  167. package/dist/components/Navigation/components/Item.d.ts +0 -89
  168. package/dist/components/Navigation/components/Item.d.ts.map +0 -1
  169. package/dist/components/Navigation/components/Item.js +0 -448
  170. package/dist/components/Navigation/components/ItemProvider.d.ts +0 -8
  171. package/dist/components/Navigation/components/ItemProvider.d.ts.map +0 -1
  172. package/dist/components/Navigation/components/ItemProvider.js +0 -17
  173. package/dist/components/Navigation/components/PinnedItems.d.ts +0 -24
  174. package/dist/components/Navigation/components/PinnedItems.d.ts.map +0 -1
  175. package/dist/components/Navigation/components/PinnedItems.js +0 -105
  176. package/dist/components/Navigation/components/Separator.d.ts +0 -2
  177. package/dist/components/Navigation/components/Separator.d.ts.map +0 -1
  178. package/dist/components/Navigation/components/Separator.js +0 -11
  179. package/dist/components/Navigation/components/ShowHide.d.ts +0 -16
  180. package/dist/components/Navigation/components/ShowHide.d.ts.map +0 -1
  181. package/dist/components/Navigation/components/ShowHide.js +0 -53
  182. package/dist/components/Navigation/components/items.css.d.ts +0 -71
  183. package/dist/components/Navigation/components/items.css.d.ts.map +0 -1
  184. package/dist/components/Navigation/components/items.css.js +0 -87
  185. package/dist/components/Navigation/components/styles.css.d.ts +0 -25
  186. package/dist/components/Navigation/components/styles.css.d.ts.map +0 -1
  187. package/dist/components/Navigation/components/styles.css.js +0 -29
  188. package/dist/components/Navigation/constants.d.ts +0 -10
  189. package/dist/components/Navigation/constants.d.ts.map +0 -1
  190. package/dist/components/Navigation/locales/en.d.ts +0 -11
  191. package/dist/components/Navigation/locales/en.d.ts.map +0 -1
  192. package/dist/components/Navigation/locales/en.js +0 -13
  193. package/dist/components/Navigation/styles.css.d.ts +0 -34
  194. package/dist/components/Navigation/styles.css.d.ts.map +0 -1
  195. package/dist/components/Navigation/styles.css.js +0 -36
  196. package/dist/components/Navigation/types.d.ts +0 -42
  197. package/dist/components/Navigation/types.d.ts.map +0 -1
  198. package/dist/components/Navigation/variables.css.d.ts +0 -2
  199. package/dist/components/Navigation/variables.css.d.ts.map +0 -1
  200. package/dist/components/Navigation/variables.css.js +0 -7
  201. package/dist/plus.css +0 -2
@@ -1,228 +0,0 @@
1
- 'use client';
2
- import { __name } from "../../../_virtual/_rolldown/runtime.js";
3
- import { estimateCostBadgeItem, estimateCostLeftSide, estimateCostMaxWidthText, estimateCostResourceName, estimateCostTextItem, estimateCostTooltip, estimateCostTr, styledDiv } from "./components.css.js";
4
- import { maximumFractionDigits, maximumFractionDigitsLong, multiplier } from "../constants.js";
5
- import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.113.0/helpers/objectSpread2.js";
6
- import { useEstimateCost } from "../EstimateCostProvider.js";
7
- import { calculatePrice } from "../helper.js";
8
- import { useOverlay } from "../OverlayContext.js";
9
- import { estimateCostCell, estimateCostOverlayRow, estimateCostPriceCell, paddingLeftCell } from "../styles.css.js";
10
- import { Badge, Stack, Text, Tooltip } from "@ultraviolet/ui";
11
- import { cn } from "@ultraviolet/utils";
12
- import { assignInlineVars } from "@vanilla-extract/dynamic";
13
- import { Children, cloneElement, isValidElement, memo, useCallback, useEffect, useId, useMemo, useState } from "react";
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- import { HelpCircleOutlineIcon } from "@ultraviolet/icons/HelpCircleOutlineIcon";
16
-
17
- //#region src/components/EstimateCost/Components/Item.tsx
18
- const TIME_RELATED_UNIT = [
19
- "seconds",
20
- "minutes",
21
- "hours",
22
- "days",
23
- "months"
24
- ];
25
- const Item = memo(({ discount = 0, priceText, discountText, label, tooltipInfo, subLabel = "", price: basePrice = 0, monthlyPrice = 0, unit: baseUnit, amount: currentAmount = 1, onAmountChange, amountFree = 0, maxAmount = 0, longFractionDigits = false, noIteration = false, noIterationText, noBorder, noPrice, isDefined = true, children = null, isFirstElement = false, isLastElement = false, isPrimaryBackground = false, productsCallback, iteration: receivedIteration, shouldBeHidden = false, hideFromOverlay = false, textNotDefined, animated = false, tabulation, labelTextVariant, labelTextProminence, notice, strikeThrough, style }) => {
26
- const { locales, formatNumber } = useEstimateCost();
27
- let iteration;
28
- if (noIteration) iteration = _objectSpread2(_objectSpread2({}, receivedIteration !== null && receivedIteration !== void 0 ? receivedIteration : { value: 0 }), {}, { unit: "hours" });
29
- else iteration = receivedIteration;
30
- const price = useMemo(() => {
31
- if (monthlyPrice && basePrice === 0) return monthlyPrice / multiplier.months;
32
- return basePrice;
33
- }, [basePrice, monthlyPrice]);
34
- const unit = useMemo(() => {
35
- if (!baseUnit) return locales["estimate.cost.units.gb.label"];
36
- return baseUnit;
37
- }, [baseUnit, locales]);
38
- const { isOverlay } = useOverlay();
39
- const Row = isOverlay ? "li" : "tr";
40
- const Cell = isOverlay ? "div" : "td";
41
- const LeftSide = "div";
42
- const [amount, setAmount] = useState(currentAmount);
43
- const [isVariant, setIsVariant] = useState(false);
44
- useEffect(() => setAmount(currentAmount), [setAmount, currentAmount]);
45
- useEffect(() => onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(amount), [onAmountChange, amount]);
46
- const itemCallback = useCallback((localAmount, localIsVariant) => {
47
- setAmount(localAmount);
48
- setIsVariant(localIsVariant);
49
- }, [setAmount, setIsVariant]);
50
- const id = useId();
51
- useEffect(() => () => productsCallback === null || productsCallback === void 0 ? void 0 : productsCallback.remove({ id }), [id, productsCallback]);
52
- useEffect(() => {
53
- if (!isOverlay) productsCallback === null || productsCallback === void 0 || productsCallback.add({
54
- amount,
55
- amountFree,
56
- discount,
57
- id,
58
- isVariant,
59
- longFractionDigits,
60
- maxAmount,
61
- noIteration,
62
- price
63
- });
64
- }, [
65
- price,
66
- discount,
67
- amount,
68
- id,
69
- productsCallback,
70
- maxAmount,
71
- noIteration,
72
- isVariant,
73
- amountFree,
74
- isOverlay,
75
- longFractionDigits
76
- ]);
77
- const computedItemPrice = useMemo(() => {
78
- var _iteration$value;
79
- var _iteration$unit;
80
- return calculatePrice({
81
- amount,
82
- amountFree,
83
- discount,
84
- price,
85
- timeAmount: noIteration ? 1 : (_iteration$value = iteration === null || iteration === void 0 ? void 0 : iteration.value) !== null && _iteration$value !== void 0 ? _iteration$value : 1,
86
- timeUnit: noIteration ? "hours" : (_iteration$unit = iteration === null || iteration === void 0 ? void 0 : iteration.unit) !== null && _iteration$unit !== void 0 ? _iteration$unit : "hours"
87
- });
88
- }, [
89
- price,
90
- amount,
91
- amountFree,
92
- iteration,
93
- noIteration,
94
- discount
95
- ]);
96
- const computedMaxItemPrice = useMemo(() => {
97
- var _iteration$value2;
98
- var _iteration$unit2;
99
- return calculatePrice({
100
- amount: maxAmount,
101
- amountFree,
102
- discount,
103
- price,
104
- timeAmount: noIteration ? 1 : (_iteration$value2 = iteration === null || iteration === void 0 ? void 0 : iteration.value) !== null && _iteration$value2 !== void 0 ? _iteration$value2 : 1,
105
- timeUnit: noIteration ? "hours" : (_iteration$unit2 = iteration === null || iteration === void 0 ? void 0 : iteration.unit) !== null && _iteration$unit2 !== void 0 ? _iteration$unit2 : "hours"
106
- });
107
- }, [
108
- price,
109
- maxAmount,
110
- amountFree,
111
- iteration,
112
- noIteration,
113
- discount
114
- ]);
115
- const formatMaximumFractionDigits = useMemo(() => {
116
- if (!(iteration === null || iteration === void 0 ? void 0 : iteration.unit)) return;
117
- return longFractionDigits ? maximumFractionDigitsLong[iteration === null || iteration === void 0 ? void 0 : iteration.unit] : maximumFractionDigits[iteration === null || iteration === void 0 ? void 0 : iteration.unit];
118
- }, [iteration === null || iteration === void 0 ? void 0 : iteration.unit, longFractionDigits]);
119
- return /* @__PURE__ */ jsxs(Row, {
120
- className: isOverlay ? estimateCostOverlayRow({
121
- hideFromOverlay,
122
- isFirstElement,
123
- shouldBeHidden
124
- }) : estimateCostTr,
125
- style,
126
- children: [/* @__PURE__ */ jsx(Cell, {
127
- className: estimateCostCell({ hasBorder: !(isLastElement || noBorder || isOverlay) }),
128
- style: assignInlineVars({ [paddingLeftCell]: `${(tabulation !== null && tabulation !== void 0 ? tabulation : 0) * 8 + 16}px` }),
129
- children: /* @__PURE__ */ jsxs(LeftSide, {
130
- className: isOverlay ? "" : estimateCostLeftSide,
131
- children: [/* @__PURE__ */ jsxs(Stack, { children: [/* @__PURE__ */ jsxs(Stack, {
132
- direction: "row",
133
- children: [
134
- /* @__PURE__ */ jsx(Text, {
135
- as: "p",
136
- prominence: labelTextProminence !== null && labelTextProminence !== void 0 ? labelTextProminence : "default",
137
- variant: labelTextVariant !== null && labelTextVariant !== void 0 ? labelTextVariant : "body",
138
- children: label
139
- }),
140
- tooltipInfo ? /* @__PURE__ */ jsx("div", {
141
- className: styledDiv,
142
- children: /* @__PURE__ */ jsx(Tooltip, {
143
- className: estimateCostTooltip,
144
- text: tooltipInfo,
145
- children: /* @__PURE__ */ jsx(HelpCircleOutlineIcon, { size: "medium" })
146
- })
147
- }) : null,
148
- subLabel && !isOverlay ? /* @__PURE__ */ jsx(Text, {
149
- as: "p",
150
- className: estimateCostTextItem,
151
- italic: true,
152
- sentiment: "primary",
153
- variant: "body",
154
- children: subLabel
155
- }) : null,
156
- discount > 0 && discountText ? /* @__PURE__ */ jsx(Badge, {
157
- className: estimateCostBadgeItem,
158
- prominence: "strong",
159
- sentiment: "warning",
160
- size: "small",
161
- children: discountText
162
- }) : null
163
- ]
164
- }), notice ? /* @__PURE__ */ jsx(Text, {
165
- as: "p",
166
- className: estimateCostMaxWidthText,
167
- prominence: "weak",
168
- variant: "caption",
169
- children: notice
170
- }) : null] }), /* @__PURE__ */ jsx("div", {
171
- className: estimateCostResourceName({
172
- isAnimated: isOverlay && animated,
173
- isOverlay
174
- }),
175
- children: isDefined ? Children.map(children, (child) => isValidElement(child) ? cloneElement(child, {
176
- amount,
177
- itemCallback,
178
- maxAmount,
179
- unit
180
- }) : null) : textNotDefined || locales["estimate.cost.notDefined"]
181
- })]
182
- })
183
- }), isOverlay ? null : /* @__PURE__ */ jsx("td", {
184
- className: cn(estimateCostCell({
185
- hasBorder: !(isLastElement || noBorder),
186
- primary: isPrimaryBackground
187
- }), estimateCostPriceCell),
188
- style: assignInlineVars({ [paddingLeftCell]: "16px" }),
189
- children: noPrice ? null : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Text, {
190
- as: "p",
191
- placement: "right",
192
- prominence: computedItemPrice === 0 && computedMaxItemPrice === 0 ? "weak" : "default",
193
- sentiment: computedItemPrice === 0 && computedMaxItemPrice === 0 ? "neutral" : "primary",
194
- strikeThrough,
195
- variant: noIterationText ? "headingSmall" : "bodyStrong",
196
- children: [
197
- priceText,
198
- priceText ? null : formatNumber(computedItemPrice, { maximumFractionDigits: formatMaximumFractionDigits }),
199
- noIterationText ? /* @__PURE__ */ jsxs(Text, {
200
- as: "span",
201
- sentiment: "primary",
202
- variant: "bodySmall",
203
- children: ["/", noIterationText]
204
- }) : null,
205
- !priceText && computedMaxItemPrice > 0 ? ` - ${formatNumber(computedMaxItemPrice, { maximumFractionDigits: formatMaximumFractionDigits })}` : null
206
- ]
207
- }), amount - amountFree !== 1 && computedItemPrice > 0 || maxAmount > 0 && computedMaxItemPrice > 0 ? /* @__PURE__ */ jsxs(Text, {
208
- as: "p",
209
- placement: "right",
210
- variant: "body",
211
- children: [
212
- formatNumber(calculatePrice({
213
- amount: 1,
214
- discount,
215
- price,
216
- timeAmount: 1,
217
- timeUnit: "hours"
218
- }), { maximumFractionDigits: longFractionDigits ? maximumFractionDigitsLong.hours : maximumFractionDigits.hours }),
219
- TIME_RELATED_UNIT.includes(unit) ? locales[`estimate.cost.units.${unit}.label`].toLowerCase() : `/${unit}`,
220
- noIteration ? null : `/${locales["estimate.cost.units.hours.label"].toLowerCase()}`
221
- ]
222
- }) : null] })
223
- })]
224
- });
225
- });
226
-
227
- //#endregion
228
- export { Item };
@@ -1,7 +0,0 @@
1
- import type { ComponentProps } from 'react';
2
- type LineThroughProps = ComponentProps<'span'> & {
3
- isActive?: boolean;
4
- };
5
- export declare const LineThrough: ({ isActive, className, ...props }: LineThroughProps) => import("react/jsx-runtime").JSX.Element;
6
- export {};
7
- //# sourceMappingURL=LineThrough.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LineThrough.d.ts","sourceRoot":"","sources":["../../../../src/components/EstimateCost/Components/LineThrough.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAG3C,KAAK,gBAAgB,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,kGAUvB,CAAA"}
@@ -1,18 +0,0 @@
1
- 'use client';
2
- import { __name } from "../../../_virtual/_rolldown/runtime.js";
3
- import { estimateCostLineThrough } from "./components.css.js";
4
- import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.113.0/helpers/objectSpread2.js";
5
- import { _objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.113.0/helpers/objectWithoutProperties.js";
6
- import { cn } from "@ultraviolet/utils";
7
- import { jsx } from "react/jsx-runtime";
8
-
9
- //#region src/components/EstimateCost/Components/LineThrough.tsx
10
- const _excluded = ["isActive", "className"];
11
- const LineThrough = (_ref) => {
12
- let { isActive, className } = _ref;
13
- let props = _objectWithoutProperties(_ref, _excluded);
14
- return /* @__PURE__ */ jsx("span", _objectSpread2({ className: cn(className, isActive ? estimateCostLineThrough : "") }, props));
15
- };
16
-
17
- //#endregion
18
- export { LineThrough };
@@ -1,11 +0,0 @@
1
- type NumberInputProps = {
2
- amount?: number;
3
- itemCallback?: (amount?: number | null, isVariant?: boolean) => void;
4
- getAmountValue?: (amount?: number | null) => void;
5
- minValue?: number;
6
- maxValue?: number;
7
- controls?: boolean;
8
- };
9
- export declare const NumberInput: ({ amount, minValue, maxValue, getAmountValue, itemCallback, controls, }: NumberInputProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
11
- //# sourceMappingURL=NumberInput.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../../src/components/EstimateCost/Components/NumberInput.tsx"],"names":[],"mappings":"AAQA,KAAK,gBAAgB,GAAG;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IACpE,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,wIAiCvB,CAAA"}
@@ -1,35 +0,0 @@
1
- 'use client';
2
- import { __name } from "../../../_virtual/_rolldown/runtime.js";
3
- import { estimateCostItemResourceName } from "./components.css.js";
4
- import { useOverlay } from "../OverlayContext.js";
5
- import { Regular } from "./Regular.js";
6
- import { NumberInput } from "@ultraviolet/ui";
7
- import { useEffect, useState } from "react";
8
- import { jsx } from "react/jsx-runtime";
9
-
10
- //#region src/components/EstimateCost/Components/NumberInput.tsx
11
- const NumberInput$1 = /* @__PURE__ */ __name(({ amount, minValue = 0, maxValue = 100, getAmountValue, itemCallback, controls = true }) => {
12
- const { isOverlay } = useOverlay();
13
- const [value, setValue] = useState(amount);
14
- useEffect(() => {
15
- getAmountValue === null || getAmountValue === void 0 || getAmountValue(amount);
16
- }, [getAmountValue, amount]);
17
- return isOverlay ? /* @__PURE__ */ jsx("div", {
18
- className: estimateCostItemResourceName(),
19
- children: /* @__PURE__ */ jsx(Regular, { children: amount })
20
- }) : /* @__PURE__ */ jsx(NumberInput, {
21
- controls,
22
- max: maxValue,
23
- min: minValue,
24
- onChange: (newValue) => {
25
- setValue(newValue);
26
- itemCallback === null || itemCallback === void 0 || itemCallback(newValue, true);
27
- getAmountValue === null || getAmountValue === void 0 || getAmountValue(newValue);
28
- },
29
- size: "small",
30
- value
31
- });
32
- }, "NumberInput");
33
-
34
- //#endregion
35
- export { NumberInput$1 as NumberInput };
@@ -1,23 +0,0 @@
1
- import type { ComponentProps, ReactNode } from 'react';
2
- import type { BareEstimateProduct, EstimateProduct, Iteration } from '../types';
3
- import { Item } from './Item';
4
- type RegionProps = {
5
- shouldBeHidden?: boolean;
6
- priceText?: ReactNode;
7
- animated?: boolean;
8
- isFirstElement?: boolean;
9
- isLastElement?: boolean;
10
- productsCallback?: {
11
- add: (product: EstimateProduct) => void;
12
- remove: (product: BareEstimateProduct) => void;
13
- };
14
- iteration?: Iteration;
15
- discount?: number;
16
- label: string;
17
- image: string;
18
- noBorder?: boolean;
19
- noPrice?: boolean;
20
- } & Pick<ComponentProps<typeof Item>, 'hideFromOverlay' | 'style'>;
21
- export declare const Region: import("react").MemoExoticComponent<({ label, image, shouldBeHidden, priceText, animated, isFirstElement, isLastElement, productsCallback, iteration, discount, noBorder, noPrice, hideFromOverlay, style, }: RegionProps) => import("react/jsx-runtime").JSX.Element>;
22
- export {};
23
- //# sourceMappingURL=Region.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Region.d.ts","sourceRoot":"","sources":["../../../../src/components/EstimateCost/Components/Region.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItD,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAG7B,KAAK,WAAW,GAAG;IACjB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,CAAC,EAAE;QACjB,GAAG,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAA;QACvC,MAAM,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAA;KAC/C,CAAA;IACD,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAA;AAElE,eAAO,MAAM,MAAM,wQAgDlB,CAAA"}
@@ -1,38 +0,0 @@
1
- 'use client';
2
- import { __name } from "../../../_virtual/_rolldown/runtime.js";
3
- import { useEstimateCost } from "../EstimateCostProvider.js";
4
- import { estimateCostImage } from "../styles.css.js";
5
- import { Item } from "./Item.js";
6
- import { Strong } from "./Strong.js";
7
- import { memo } from "react";
8
- import { jsx, jsxs } from "react/jsx-runtime";
9
-
10
- //#region src/components/EstimateCost/Components/Region.tsx
11
- const Region = memo(({ label, image, shouldBeHidden = false, priceText, animated = false, isFirstElement, isLastElement, productsCallback, iteration, discount, noBorder, noPrice, hideFromOverlay, style }) => {
12
- const { locales } = useEstimateCost();
13
- return /* @__PURE__ */ jsx(Item, {
14
- animated,
15
- discount,
16
- hideFromOverlay,
17
- isFirstElement,
18
- isLastElement,
19
- iteration,
20
- label: locales["estimate.cost.region.label"],
21
- noBorder,
22
- noPrice,
23
- priceText,
24
- productsCallback,
25
- shouldBeHidden,
26
- style,
27
- children: /* @__PURE__ */ jsxs(Strong, { children: [/* @__PURE__ */ jsx("img", {
28
- alt: label,
29
- className: estimateCostImage,
30
- height: "auto",
31
- src: image,
32
- width: "auto"
33
- }), label] })
34
- });
35
- });
36
-
37
- //#endregion
38
- export { Region };
@@ -1,11 +0,0 @@
1
- import type { CSSProperties, ReactNode } from 'react';
2
- type RegularProps = {
3
- variant?: 'normal' | 'small' | 'big' | 'capitalized';
4
- isDisabledOnOverlay?: boolean;
5
- children?: ReactNode;
6
- style?: CSSProperties;
7
- className?: string;
8
- };
9
- export declare const Regular: import("react").MemoExoticComponent<({ variant, isDisabledOnOverlay, children, className, style, }: RegularProps) => import("react/jsx-runtime").JSX.Element | null>;
10
- export {};
11
- //# sourceMappingURL=Regular.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Regular.d.ts","sourceRoot":"","sources":["../../../../src/components/EstimateCost/Components/Regular.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKrD,KAAK,YAAY,GAAG;IAClB,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,aAAa,CAAA;IACpD,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,OAAO,sKAmBnB,CAAA"}
@@ -1,23 +0,0 @@
1
- 'use client';
2
- import { __name } from "../../../_virtual/_rolldown/runtime.js";
3
- import { estimateCostRegular } from "./components.css.js";
4
- import { useOverlay } from "../OverlayContext.js";
5
- import { cn } from "@ultraviolet/utils";
6
- import { memo } from "react";
7
- import { jsx } from "react/jsx-runtime";
8
-
9
- //#region src/components/EstimateCost/Components/Regular.tsx
10
- const Regular = memo(({ variant = "normal", isDisabledOnOverlay = false, children = null, className, style }) => {
11
- const { isOverlay } = useOverlay();
12
- return isDisabledOnOverlay && isOverlay ? null : /* @__PURE__ */ jsx("div", {
13
- className: cn(className, estimateCostRegular({
14
- isOverlay,
15
- variant
16
- })),
17
- style,
18
- children
19
- });
20
- });
21
-
22
- //#endregion
23
- export { Regular };
@@ -1,10 +0,0 @@
1
- import type { CSSProperties, ReactNode } from 'react';
2
- type StrongProps = {
3
- variant?: 'normal' | 'small' | 'big' | 'capitalized';
4
- children?: ReactNode;
5
- isDisabledOnOverlay?: boolean;
6
- style?: CSSProperties;
7
- };
8
- export declare const Strong: import("react").MemoExoticComponent<({ variant, children, style }: StrongProps) => import("react/jsx-runtime").JSX.Element>;
9
- export {};
10
- //# sourceMappingURL=Strong.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Strong.d.ts","sourceRoot":"","sources":["../../../../src/components/EstimateCost/Components/Strong.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIrD,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,aAAa,CAAA;IACpD,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AACD,eAAO,MAAM,MAAM,6HAYlB,CAAA"}
@@ -1,16 +0,0 @@
1
- 'use client';
2
- import { __name } from "../../../_virtual/_rolldown/runtime.js";
3
- import { estimateCostRegular, estimateCostStrong } from "./components.css.js";
4
- import { cn } from "@ultraviolet/utils";
5
- import { memo } from "react";
6
- import { jsx } from "react/jsx-runtime";
7
-
8
- //#region src/components/EstimateCost/Components/Strong.tsx
9
- const Strong = memo(({ variant = "normal", children = null, style }) => /* @__PURE__ */ jsx("div", {
10
- className: cn(estimateCostRegular({ variant }), estimateCostStrong({ variant })),
11
- style,
12
- children
13
- }));
14
-
15
- //#endregion
16
- export { Strong };
@@ -1,11 +0,0 @@
1
- import type { CSSProperties } from 'react';
2
- type UnitProps = {
3
- amount?: number;
4
- itemCallback?: (amount?: number, isVariant?: boolean) => void;
5
- getAmountValue?: (amount?: number) => void;
6
- unit?: string;
7
- style?: CSSProperties;
8
- };
9
- export declare const Unit: ({ amount, itemCallback, getAmountValue, unit, style, }: UnitProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
11
- //# sourceMappingURL=Unit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Unit.d.ts","sourceRoot":"","sources":["../../../../src/components/EstimateCost/Components/Unit.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAS1C,KAAK,SAAS,GAAG;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAC7D,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,IAAI,gHAwChB,CAAA"}
@@ -1,50 +0,0 @@
1
- 'use client';
2
- import { __name } from "../../../_virtual/_rolldown/runtime.js";
3
- import { estimateCostItemResourceName, estimateCostNumberInput } from "./components.css.js";
4
- import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.113.0/helpers/objectSpread2.js";
5
- import { useOverlay } from "../OverlayContext.js";
6
- import { Regular } from "./Regular.js";
7
- import { NumberInput } from "@ultraviolet/ui";
8
- import { useEffect, useState } from "react";
9
- import { jsx } from "react/jsx-runtime";
10
-
11
- //#region src/components/EstimateCost/Components/Unit.tsx
12
- const Unit = ({ amount, itemCallback, getAmountValue, unit, style }) => {
13
- const { isOverlay } = useOverlay();
14
- const [capacity, setCapacity] = useState(amount === 0 ? void 0 : amount);
15
- useEffect(() => {
16
- setCapacity(amount);
17
- itemCallback === null || itemCallback === void 0 || itemCallback(amount, true);
18
- getAmountValue === null || getAmountValue === void 0 || getAmountValue(amount);
19
- }, [
20
- getAmountValue,
21
- itemCallback,
22
- capacity,
23
- amount
24
- ]);
25
- return isOverlay ? /* @__PURE__ */ jsx("div", {
26
- className: estimateCostItemResourceName(),
27
- style,
28
- children: /* @__PURE__ */ jsx(Regular, { children: capacity })
29
- }) : /* @__PURE__ */ jsx("div", {
30
- style: _objectSpread2({ width: "150px" }, style),
31
- children: /* @__PURE__ */ jsx(NumberInput, {
32
- className: estimateCostNumberInput,
33
- controls: false,
34
- name: "capacity",
35
- onChange: (capacityText) => {
36
- const newCapacity = Number(capacityText) < 0 ? 0 : Number(capacityText);
37
- setCapacity(newCapacity);
38
- itemCallback === null || itemCallback === void 0 || itemCallback(newCapacity, true);
39
- getAmountValue === null || getAmountValue === void 0 || getAmountValue(capacity);
40
- },
41
- placeholder: "00",
42
- size: "small",
43
- unit,
44
- value: capacity
45
- })
46
- });
47
- };
48
-
49
- //#endregion
50
- export { Unit };
@@ -1,23 +0,0 @@
1
- import type { CSSProperties } from 'react';
2
- import type { BareEstimateProduct, EstimateProduct, Iteration } from '../types';
3
- type RegionProps = {
4
- shouldBeHidden?: boolean;
5
- priceText?: string;
6
- animated?: boolean;
7
- isFirstElement?: boolean;
8
- isLastElement?: boolean;
9
- productsCallback?: {
10
- add: (product: EstimateProduct) => void;
11
- remove: (product: BareEstimateProduct) => void;
12
- };
13
- iteration?: Iteration;
14
- discount?: number;
15
- label: string;
16
- image: string;
17
- noBorder?: boolean;
18
- noPrice?: boolean;
19
- style?: CSSProperties;
20
- };
21
- export declare const Zone: import("react").MemoExoticComponent<({ label, image, shouldBeHidden, priceText, animated, isFirstElement, isLastElement, productsCallback, iteration, discount, noBorder, noPrice, style, }: RegionProps) => import("react/jsx-runtime").JSX.Element>;
22
- export {};
23
- //# sourceMappingURL=Zone.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Zone.d.ts","sourceRoot":"","sources":["../../../../src/components/EstimateCost/Components/Zone.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAI1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAI/E,KAAK,WAAW,GAAG;IACjB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,CAAC,EAAE;QACjB,GAAG,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAA;QACvC,MAAM,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAA;KAC/C,CAAA;IACD,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,IAAI,uPA8ChB,CAAA"}
@@ -1,37 +0,0 @@
1
- 'use client';
2
- import { __name } from "../../../_virtual/_rolldown/runtime.js";
3
- import { useEstimateCost } from "../EstimateCostProvider.js";
4
- import { estimateCostImage } from "../styles.css.js";
5
- import { Item } from "./Item.js";
6
- import { Strong } from "./Strong.js";
7
- import { memo } from "react";
8
- import { jsx, jsxs } from "react/jsx-runtime";
9
-
10
- //#region src/components/EstimateCost/Components/Zone.tsx
11
- const Zone = memo(({ label, image, shouldBeHidden = false, priceText, animated = false, isFirstElement, isLastElement, productsCallback, iteration, discount, noBorder, noPrice, style }) => {
12
- const { locales } = useEstimateCost();
13
- return /* @__PURE__ */ jsx(Item, {
14
- animated,
15
- discount,
16
- isFirstElement,
17
- isLastElement,
18
- iteration,
19
- label: locales["estimate.cost.az.label"],
20
- noBorder,
21
- noPrice,
22
- priceText,
23
- productsCallback,
24
- shouldBeHidden,
25
- style,
26
- children: /* @__PURE__ */ jsxs(Strong, { children: [/* @__PURE__ */ jsx("img", {
27
- alt: label,
28
- className: estimateCostImage,
29
- height: "auto",
30
- src: image,
31
- width: "auto"
32
- }), label] })
33
- });
34
- });
35
-
36
- //#endregion
37
- export { Zone };