@capillarytech/blaze-ui 6.1.0 → 6.1.2

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 (92) hide show
  1. package/.npmrc +3 -0
  2. package/CapCustomCheckboxList/styles.css +3 -3
  3. package/CapCustomCheckboxList/styles.scss +7 -8
  4. package/CapEventCalendar/CalendarCanvas/calendarCanvasStyles.css +21 -0
  5. package/CapEventCalendar/CalendarCanvas/calendarCanvasStyles.module.scss.js +8 -0
  6. package/CapEventCalendar/CalendarCanvas/calendarCanvasStyles.scss +17 -0
  7. package/CapEventCalendar/CalendarCanvas/index.d.ts +3 -52
  8. package/CapEventCalendar/CalendarCanvas/index.d.ts.map +1 -1
  9. package/CapEventCalendar/CalendarCanvas/index.js +31 -50
  10. package/CapEventCalendar/CalendarCanvas/utils.d.ts +5 -9
  11. package/CapEventCalendar/CalendarCanvas/utils.d.ts.map +1 -1
  12. package/CapEventCalendar/CalendarCanvas/utils.js +6 -6
  13. package/CapEventCalendar/components/DayDropdown/index.d.ts +3 -13
  14. package/CapEventCalendar/components/DayDropdown/index.d.ts.map +1 -1
  15. package/CapEventCalendar/components/DayDropdown/index.js +32 -14
  16. package/CapEventCalendar/components/MonthHeader/index.d.ts +3 -9
  17. package/CapEventCalendar/components/MonthHeader/index.d.ts.map +1 -1
  18. package/CapEventCalendar/components/MonthHeader/index.js +4 -9
  19. package/CapEventCalendar/components/MonthHeader/monthHeaderStyles.css +20 -0
  20. package/CapEventCalendar/components/MonthHeader/monthHeaderStyles.module.scss.js +7 -0
  21. package/CapEventCalendar/components/MonthHeader/monthHeaderStyles.scss +15 -0
  22. package/CapEventCalendar/drawUtils.d.ts +9 -71
  23. package/CapEventCalendar/drawUtils.d.ts.map +1 -1
  24. package/CapEventCalendar/drawUtils.js +12 -4
  25. package/CapEventCalendar/index.d.ts +4 -80
  26. package/CapEventCalendar/index.d.ts.map +1 -1
  27. package/CapEventCalendar/index.js +60 -85
  28. package/CapEventCalendar/messages.d.ts +25 -0
  29. package/CapEventCalendar/messages.d.ts.map +1 -0
  30. package/CapEventCalendar/messages.js +28 -0
  31. package/CapEventCalendar/styles.css +9 -81
  32. package/CapEventCalendar/styles.module.scss.js +12 -0
  33. package/CapEventCalendar/styles.scss +34 -107
  34. package/CapEventCalendar/tests/types.d.ts +26 -0
  35. package/CapEventCalendar/tests/types.d.ts.map +1 -0
  36. package/CapEventCalendar/types.d.ts +188 -0
  37. package/CapEventCalendar/types.d.ts.map +1 -0
  38. package/CapEventCalendar/types.js +1 -0
  39. package/CapEventCalendar/utils.d.ts +11 -9
  40. package/CapEventCalendar/utils.d.ts.map +1 -1
  41. package/CapEventCalendar/utils.js +10 -7
  42. package/CapProductSelection/index.d.ts +7 -29
  43. package/CapProductSelection/index.d.ts.map +1 -1
  44. package/CapProductSelection/index.js +52 -89
  45. package/CapProductSelection/messages.d.ts +76 -0
  46. package/CapProductSelection/messages.d.ts.map +1 -0
  47. package/CapProductSelection/messages.js +79 -0
  48. package/CapProductSelection/styles.css +81 -0
  49. package/CapProductSelection/styles.module.scss.js +8 -0
  50. package/CapProductSelection/styles.scss +82 -40
  51. package/CapProductSelection/tests/CapProductSelection.mockData.d.ts +36 -0
  52. package/CapProductSelection/tests/CapProductSelection.mockData.d.ts.map +1 -0
  53. package/CapProductSelection/types.d.ts +34 -0
  54. package/CapProductSelection/types.d.ts.map +1 -0
  55. package/CapProductSelection/types.js +1 -0
  56. package/CapRadioCard/index.d.ts.map +1 -1
  57. package/CapRadioCard/index.js +52 -20
  58. package/CapRadioCard/styles.css +25 -25
  59. package/CapRadioCard/styles.module.scss.js +14 -40
  60. package/CapRadioCard/styles.scss +20 -20
  61. package/CapRadioCard/types.d.ts +20 -0
  62. package/CapRadioCard/types.d.ts.map +1 -1
  63. package/CapStaticTemplates/index.d.ts +3 -1
  64. package/CapStaticTemplates/index.d.ts.map +1 -1
  65. package/CapStaticTemplates/index.js +185 -144
  66. package/CapStaticTemplates/messages.d.ts +32 -0
  67. package/CapStaticTemplates/messages.d.ts.map +1 -0
  68. package/CapStaticTemplates/messages.js +35 -0
  69. package/CapStaticTemplates/styles.css +220 -0
  70. package/CapStaticTemplates/styles.module.scss.js +55 -0
  71. package/CapStaticTemplates/styles.scss +291 -0
  72. package/CapStaticTemplates/tests/CapStaticTemplates.mockData.d.ts +54 -0
  73. package/CapStaticTemplates/tests/CapStaticTemplates.mockData.d.ts.map +1 -0
  74. package/CapStaticTemplates/types.d.ts +97 -0
  75. package/CapStaticTemplates/types.d.ts.map +1 -0
  76. package/CapStaticTemplates/types.js +1 -0
  77. package/CapTabV3/tests/CapTabV3.mockData.d.ts +26 -26
  78. package/CapTabV3/tests/CapTabV3.mockData.d.ts.map +1 -1
  79. package/index.d.ts +6 -0
  80. package/index.d.ts.map +1 -1
  81. package/index.js +227 -221
  82. package/package.json +1 -1
  83. package/styles/_variables.scss +2 -0
  84. package/utils/dayjs.d.ts +1 -0
  85. package/utils/dayjs.d.ts.map +1 -1
  86. package/utils/dayjs.js +1 -0
  87. package/CapProductSelection/style.d.ts +0 -3
  88. package/CapProductSelection/style.d.ts.map +0 -1
  89. package/CapProductSelection/style.js +0 -38
  90. package/CapStaticTemplates/style.d.ts +0 -13
  91. package/CapStaticTemplates/style.d.ts.map +0 -1
  92. package/CapStaticTemplates/style.js +0 -216
@@ -1,9 +1,10 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { Checkbox, Tree, Tooltip } from "antd";
2
+ import { useState, useEffect, createElement } from "react";
3
+ import { Checkbox, Tree, Tooltip } from "antd-v5";
3
4
  import classNames from "classnames";
4
- import PropTypes from "prop-types";
5
- import { useState, useEffect } from "react";
5
+ import { injectIntl } from "react-intl";
6
6
  import CapButton from "../CapButton/index.js";
7
+ import CapCard from "../CapCard/index.js";
7
8
  import CapHeadingWithStatic from "../CapHeading/index.js";
8
9
  import CapIcon from "../CapIcon/index.js";
9
10
  import CapPopover from "../CapPopover/index.js";
@@ -11,12 +12,13 @@ import CapRadio from "../CapRadio/index.js";
11
12
  import CapRow from "../CapRow/index.js";
12
13
  import CapTooltip from "../CapTooltip/index.js";
13
14
  import CapTree from "../CapTree/index.js";
14
- import LocaleHoc from "../LocaleHoc/index.js";
15
15
  import { CAP_G06 } from "../styles/_variables.js";
16
16
  import { SKU, ATTRIBUTE, BRAND, CATEGORY, PRODUCT_ATTRIBUTE, SKU_UPLOAD, SKU_SELECT, LINE_ITEM } from "./constants.js";
17
- import { StyledCapCard } from "./style.js";
17
+ import messages from "./messages.js";
18
+ import styles from "./styles.module.scss.js";
18
19
  const clsPrefix = "cap-product-selection-v2";
19
20
  const CapProductSelection = ({
21
+ intl: { formatMessage },
20
22
  treeData: treeDataProps,
21
23
  target,
22
24
  trigger = "click",
@@ -26,25 +28,6 @@ const CapProductSelection = ({
26
28
  handleSelect = () => {
27
29
  },
28
30
  isProductMandatory,
29
- /**LocaleHoc messages */
30
- lineItem,
31
- selectAttribute,
32
- brand,
33
- brandInfo,
34
- category,
35
- categoryInfo,
36
- product,
37
- productInfo,
38
- SKU: SKU$1,
39
- uploadSKU,
40
- uploadSKUInfo,
41
- comingSoon,
42
- changeSelection,
43
- description,
44
- okText,
45
- cancelText,
46
- selectValues,
47
- atleast1Attribute,
48
31
  ...rest
49
32
  }) => {
50
33
  const [showPopover, setShowPopover] = useState(false);
@@ -87,11 +70,17 @@ const CapProductSelection = ({
87
70
  if (attribute === ATTRIBUTE) handleSelect(checkedKeys);
88
71
  if (attribute === SKU) handleSelect([SKU]);
89
72
  }
90
- }, [showPopover, isBrandSelected, isCategorySelected, isProductSelected, attribute]);
73
+ }, [
74
+ showPopover,
75
+ isBrandSelected,
76
+ isCategorySelected,
77
+ isProductSelected,
78
+ attribute,
79
+ handleSelect
80
+ ]);
91
81
  const handleCheckboxSelect = (event) => {
92
- const {
93
- target: { value }
94
- } = event;
82
+ var _a;
83
+ const value = (_a = event.target) == null ? void 0 : _a.value;
95
84
  if (attribute && attribute !== ATTRIBUTE) {
96
85
  setShowModal(true);
97
86
  setIntermediateValue(ATTRIBUTE);
@@ -115,7 +104,7 @@ const CapProductSelection = ({
115
104
  setShowModal(false);
116
105
  setAttribute(intermediateValue);
117
106
  setIntermediateValue(null);
118
- if (intermediateValue === SKU$1) {
107
+ if (intermediateValue === SKU) {
119
108
  setIsBrandSelected(false);
120
109
  setIsCategorySelected(false);
121
110
  setIsProductSelected(false);
@@ -142,12 +131,14 @@ const CapProductSelection = ({
142
131
  setIntermediateValue(null);
143
132
  };
144
133
  const handleRadioOnChange = (event) => {
134
+ var _a;
135
+ const value = (_a = event.target) == null ? void 0 : _a.value;
145
136
  if (attribute) {
146
137
  setShowModal(true);
147
- setIntermediateValue(event.target.value);
138
+ setIntermediateValue(value);
148
139
  return;
149
140
  }
150
- setAttribute(event.target.value);
141
+ setAttribute(value);
151
142
  };
152
143
  const checkedMap = {
153
144
  [BRAND]: isBrandSelected,
@@ -155,9 +146,9 @@ const CapProductSelection = ({
155
146
  [PRODUCT_ATTRIBUTE]: isProductSelected
156
147
  };
157
148
  const titleMap = {
158
- [BRAND]: brand,
159
- [CATEGORY]: category,
160
- [PRODUCT_ATTRIBUTE]: product
149
+ [BRAND]: formatMessage(messages.brand),
150
+ [CATEGORY]: formatMessage(messages.category),
151
+ [PRODUCT_ATTRIBUTE]: formatMessage(messages.product)
161
152
  };
162
153
  const checkIfDisabled = (type) => {
163
154
  if (isProductMandatory) {
@@ -176,7 +167,7 @@ const CapProductSelection = ({
176
167
  };
177
168
  const getCheckboxComponent = (type) => {
178
169
  if (checkIfDisabled(type)) {
179
- return /* @__PURE__ */ jsx(CapTooltip, { title: atleast1Attribute, children: /* @__PURE__ */ jsx(
170
+ return /* @__PURE__ */ jsx(CapTooltip, { title: formatMessage(messages.atleast1Attribute), children: /* @__PURE__ */ jsx(
180
171
  Checkbox,
181
172
  {
182
173
  checked: checkedMap[type],
@@ -191,7 +182,7 @@ const CapProductSelection = ({
191
182
  };
192
183
  const defaultTreeData = [
193
184
  {
194
- title: lineItem,
185
+ title: formatMessage(messages.lineItem),
195
186
  key: LINE_ITEM,
196
187
  children: [
197
188
  {
@@ -201,7 +192,7 @@ const CapProductSelection = ({
201
192
  checked: attribute === ATTRIBUTE,
202
193
  value: ATTRIBUTE,
203
194
  onChange: handleRadioOnChange,
204
- children: selectAttribute
195
+ children: formatMessage(messages.selectAttribute)
205
196
  }
206
197
  ),
207
198
  key: ATTRIBUTE,
@@ -209,17 +200,17 @@ const CapProductSelection = ({
209
200
  {
210
201
  title: getCheckboxComponent(BRAND),
211
202
  key: BRAND,
212
- info: brandInfo
203
+ info: formatMessage(messages.brandInfo)
213
204
  },
214
205
  {
215
206
  title: getCheckboxComponent(CATEGORY),
216
207
  key: CATEGORY,
217
- info: categoryInfo
208
+ info: formatMessage(messages.categoryInfo)
218
209
  },
219
210
  {
220
211
  title: getCheckboxComponent(PRODUCT_ATTRIBUTE),
221
212
  key: PRODUCT_ATTRIBUTE,
222
- info: productInfo
213
+ info: formatMessage(messages.productInfo)
223
214
  }
224
215
  ]
225
216
  },
@@ -230,7 +221,7 @@ const CapProductSelection = ({
230
221
  checked: attribute === SKU,
231
222
  value: SKU,
232
223
  onChange: handleRadioOnChange,
233
- children: SKU$1
224
+ children: formatMessage(messages.SKU)
234
225
  }
235
226
  ),
236
227
  key: SKU,
@@ -242,16 +233,16 @@ const CapProductSelection = ({
242
233
  onChange: handleRadioOnChange,
243
234
  value: SKU,
244
235
  checked: attribute === "SKU",
245
- children: uploadSKU
236
+ children: formatMessage(messages.uploadSKU)
246
237
  }
247
238
  ),
248
239
  key: SKU_UPLOAD,
249
- info: uploadSKUInfo
240
+ info: formatMessage(messages.uploadSKUInfo)
250
241
  },
251
242
  {
252
- title: /* @__PURE__ */ jsx(CapRadio, { disabled: true, children: selectValues }),
243
+ title: /* @__PURE__ */ jsx(CapRadio, { disabled: true, children: formatMessage(messages.selectValues) }),
253
244
  key: SKU_SELECT,
254
- info: comingSoon,
245
+ info: formatMessage(messages.comingSoon),
255
246
  isHover: true
256
247
  }
257
248
  ]
@@ -260,7 +251,9 @@ const CapProductSelection = ({
260
251
  }
261
252
  ];
262
253
  const getTreeData = (treeData) => {
263
- const finalTreeData = treeData == null ? void 0 : treeData.reduce((result, data) => {
254
+ const result = [];
255
+ if (!treeData) return result;
256
+ treeData.forEach((data) => {
264
257
  const { title, key, children = [], checkable, info, isHover } = data;
265
258
  const hoverProps = {};
266
259
  const tooltipProp = {};
@@ -280,33 +273,32 @@ const CapProductSelection = ({
280
273
  checkable
281
274
  };
282
275
  result.push(
283
- /* @__PURE__ */ jsx(Tree.TreeNode, { ...treeNodeProps, children: (children == null ? void 0 : children.length) && getTreeData(children) })
276
+ /* @__PURE__ */ createElement(Tree.TreeNode, { ...treeNodeProps, key }, (children == null ? void 0 : children.length) ? getTreeData(children) : null)
284
277
  );
285
278
  }
286
- return result;
287
- }, []);
288
- return finalTreeData;
279
+ });
280
+ return result;
289
281
  };
290
282
  return /* @__PURE__ */ jsx(
291
283
  CapPopover,
292
284
  {
293
- visible: showPopover,
294
- onVisibleChange: setShowPopover,
285
+ open: showPopover,
286
+ onOpenChange: setShowPopover,
295
287
  trigger,
296
288
  placement,
297
- overlayClassName: classNames(`${clsPrefix}`, overlayClassName, { greyed: showModal }),
289
+ overlayClassName: classNames(clsPrefix, overlayClassName, { greyed: showModal }),
298
290
  ...rest,
299
291
  content: /* @__PURE__ */ jsxs(Fragment, { children: [
300
292
  /* @__PURE__ */ jsx(CapTree, { blockNode: true, selectable: false, defaultExpandAll: true, disabled: showModal, ...rest, children: getTreeData(treeDataProps || defaultTreeData) }),
301
- showModal && /* @__PURE__ */ jsxs(StyledCapCard, { children: [
302
- /* @__PURE__ */ jsxs(CapRow, { type: "flex", align: "center", justify: "space-between", className: "card-title", children: [
303
- /* @__PURE__ */ jsx(CapHeadingWithStatic, { type: "h3", children: changeSelection }),
293
+ showModal && /* @__PURE__ */ jsxs(CapCard, { className: styles.changeSelectionCard, children: [
294
+ /* @__PURE__ */ jsxs(CapRow, { type: "flex", align: "middle", justify: "space-between", className: "card-title", children: [
295
+ /* @__PURE__ */ jsx(CapHeadingWithStatic, { type: "h3", children: formatMessage(messages.changeSelection) }),
304
296
  /* @__PURE__ */ jsx(CapIcon, { type: "close", size: "s", style: { paddingTop: "4px" } })
305
297
  ] }),
306
- /* @__PURE__ */ jsx(CapHeadingWithStatic, { type: "h5", className: "card-description", children: description }),
298
+ /* @__PURE__ */ jsx(CapHeadingWithStatic, { type: "h5", className: "card-description", children: formatMessage(messages.description) }),
307
299
  /* @__PURE__ */ jsxs(CapRow, { className: "card-buttons", children: [
308
- /* @__PURE__ */ jsx(CapButton, { onClick: handleOk, className: "card-buttons-primary", type: "primary", children: okText }),
309
- /* @__PURE__ */ jsx(CapButton, { onClick: handleCancel, type: "secondary", children: cancelText })
300
+ /* @__PURE__ */ jsx(CapButton, { onClick: handleOk, className: "card-buttons-primary", type: "primary", children: formatMessage(messages.okText) }),
301
+ /* @__PURE__ */ jsx(CapButton, { onClick: handleCancel, type: "secondary", children: formatMessage(messages.cancelText) })
310
302
  ] })
311
303
  ] })
312
304
  ] }),
@@ -314,36 +306,7 @@ const CapProductSelection = ({
314
306
  }
315
307
  );
316
308
  };
317
- CapProductSelection.propTypes = {
318
- target: PropTypes.node,
319
- treeData: PropTypes.array,
320
- trigger: PropTypes.string,
321
- placement: PropTypes.string,
322
- overlayClassName: PropTypes.string,
323
- handleSelect: PropTypes.func,
324
- selectedAttributes: PropTypes.array,
325
- isProductMandatory: PropTypes.bool,
326
- /**LocaleHoc messages */
327
- lineItem: PropTypes.string,
328
- selectAttribute: PropTypes.string,
329
- brand: PropTypes.string,
330
- brandInfo: PropTypes.string,
331
- category: PropTypes.string,
332
- categoryInfo: PropTypes.string,
333
- product: PropTypes.string,
334
- productInfo: PropTypes.string,
335
- SKU: PropTypes.string,
336
- uploadSKU: PropTypes.string,
337
- uploadSKUInfo: PropTypes.string,
338
- comingSoon: PropTypes.string,
339
- changeSelection: PropTypes.string,
340
- description: PropTypes.string,
341
- okText: PropTypes.string,
342
- cancelText: PropTypes.string,
343
- selectValues: PropTypes.string,
344
- atleast1Attribute: PropTypes.string
345
- };
346
- const CapProductSelection$1 = LocaleHoc(CapProductSelection, { key: "CapProductSelection" });
309
+ const CapProductSelection$1 = injectIntl(CapProductSelection);
347
310
  export {
348
311
  CapProductSelection$1 as default
349
312
  };
@@ -0,0 +1,76 @@
1
+ declare const _default: {
2
+ lineItem: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ };
6
+ selectAttribute: {
7
+ id: string;
8
+ defaultMessage: string;
9
+ };
10
+ brand: {
11
+ id: string;
12
+ defaultMessage: string;
13
+ };
14
+ brandInfo: {
15
+ id: string;
16
+ defaultMessage: string;
17
+ };
18
+ category: {
19
+ id: string;
20
+ defaultMessage: string;
21
+ };
22
+ categoryInfo: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ };
26
+ product: {
27
+ id: string;
28
+ defaultMessage: string;
29
+ };
30
+ productInfo: {
31
+ id: string;
32
+ defaultMessage: string;
33
+ };
34
+ SKU: {
35
+ id: string;
36
+ defaultMessage: string;
37
+ };
38
+ uploadSKU: {
39
+ id: string;
40
+ defaultMessage: string;
41
+ };
42
+ uploadSKUInfo: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ };
46
+ changeSelection: {
47
+ id: string;
48
+ defaultMessage: string;
49
+ };
50
+ description: {
51
+ id: string;
52
+ defaultMessage: string;
53
+ };
54
+ okText: {
55
+ id: string;
56
+ defaultMessage: string;
57
+ };
58
+ cancelText: {
59
+ id: string;
60
+ defaultMessage: string;
61
+ };
62
+ comingSoon: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ };
66
+ selectValues: {
67
+ id: string;
68
+ defaultMessage: string;
69
+ };
70
+ atleast1Attribute: {
71
+ id: string;
72
+ defaultMessage: string;
73
+ };
74
+ };
75
+ export default _default;
76
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../components/CapProductSelection/messages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBA0EG"}
@@ -0,0 +1,79 @@
1
+ import { defineMessages } from "react-intl";
2
+ const scope = "blaze.components.CapProductSelection";
3
+ const messages = defineMessages({
4
+ lineItem: {
5
+ id: `${scope}.lineItem`,
6
+ defaultMessage: "Line items"
7
+ },
8
+ selectAttribute: {
9
+ id: `${scope}.selectAttribute`,
10
+ defaultMessage: "Select Attribute"
11
+ },
12
+ brand: {
13
+ id: `${scope}.brand`,
14
+ defaultMessage: "Brand"
15
+ },
16
+ brandInfo: {
17
+ id: `${scope}.brandInfo`,
18
+ defaultMessage: "Brand"
19
+ },
20
+ category: {
21
+ id: `${scope}.category`,
22
+ defaultMessage: "Category"
23
+ },
24
+ categoryInfo: {
25
+ id: `${scope}.categoryInfo`,
26
+ defaultMessage: "Category"
27
+ },
28
+ product: {
29
+ id: `${scope}.product`,
30
+ defaultMessage: "Product"
31
+ },
32
+ productInfo: {
33
+ id: `${scope}.productInfo`,
34
+ defaultMessage: "Product"
35
+ },
36
+ SKU: {
37
+ id: `${scope}.SKU`,
38
+ defaultMessage: "SKU"
39
+ },
40
+ uploadSKU: {
41
+ id: `${scope}.uploadSKU`,
42
+ defaultMessage: "Upload SKU"
43
+ },
44
+ uploadSKUInfo: {
45
+ id: `${scope}.uploadSKUInfo`,
46
+ defaultMessage: "Upload SKU"
47
+ },
48
+ changeSelection: {
49
+ id: `${scope}.changeSelection`,
50
+ defaultMessage: "Change the selection"
51
+ },
52
+ description: {
53
+ id: `${scope}.description`,
54
+ defaultMessage: "Changing the attribute of additional condition will result in lose of previously defined additional condition"
55
+ },
56
+ okText: {
57
+ id: `${scope}.okText`,
58
+ defaultMessage: "Yes, change"
59
+ },
60
+ cancelText: {
61
+ id: `${scope}.cancelText`,
62
+ defaultMessage: "Cancel"
63
+ },
64
+ comingSoon: {
65
+ id: `${scope}.comingSoon`,
66
+ defaultMessage: "Coming soon"
67
+ },
68
+ selectValues: {
69
+ id: `${scope}.selectValues`,
70
+ defaultMessage: "Select value(s)"
71
+ },
72
+ atleast1Attribute: {
73
+ id: `${scope}.atleast1Attribute`,
74
+ defaultMessage: "At least 1 attribute is required"
75
+ }
76
+ });
77
+ export {
78
+ messages as default
79
+ };
@@ -0,0 +1,81 @@
1
+ /* Color Palette */
2
+ /* Fonts */
3
+ /* Backward Compatibility Aliases */
4
+ /* Component Heights */
5
+ /* Border Radius */
6
+ /* Border Width */
7
+ /* Transition */
8
+ /* Timezones Footer */
9
+ .changeSelectionCard {
10
+ position: absolute;
11
+ top: 2.857rem;
12
+ left: 0.857rem;
13
+ width: 21.428rem;
14
+ }
15
+ .changeSelectionCard .card-title {
16
+ font-size: 1rem;
17
+ line-height: 1.714rem;
18
+ padding-bottom: 0.857rem;
19
+ padding-top: 0.571rem;
20
+ }
21
+ .changeSelectionCard .card-description {
22
+ font-size: 0.857rem;
23
+ }
24
+ .changeSelectionCard .card-buttons {
25
+ padding-top: 1.142rem;
26
+ }
27
+ .changeSelectionCard .card-buttons-primary {
28
+ margin-right: 0.857rem;
29
+ }
30
+ .ant-popover.cap-product-selection-v2.greyed .ant-popover-arrow {
31
+ border-top-color: #f4f5f7;
32
+ border-left-color: #f4f5f7;
33
+ }
34
+ .ant-popover.cap-product-selection-v2.greyed .ant-popover-container {
35
+ background-color: #f4f5f7;
36
+ }
37
+ .ant-popover.cap-product-selection-v2 .ant-popover-container {
38
+ padding: 0;
39
+ }
40
+ .ant-popover.cap-product-selection-v2 .ant-tree {
41
+ background-color: inherit;
42
+ }
43
+ .ant-popover.cap-product-selection-v2 .ant-tree .ant-tree-list {
44
+ padding: 0.5rem 0;
45
+ }
46
+ .ant-popover.cap-product-selection-v2 .ant-tree li ul {
47
+ padding-left: 2.143rem;
48
+ }
49
+ .ant-popover.cap-product-selection-v2 .ant-popover-content {
50
+ width: 23.143rem;
51
+ padding: 0;
52
+ min-height: 12.571rem;
53
+ font-size: 1rem;
54
+ line-height: 1.428rem;
55
+ color: #091e42;
56
+ }
57
+ .ant-popover.cap-product-selection-v2 .divider {
58
+ border-top: 0.071rem solid #dfe2e7;
59
+ }
60
+ .ant-popover.cap-product-selection-v2 .empty-data-text {
61
+ text-align: center;
62
+ margin-top: 0.857rem;
63
+ padding: 0.714rem 0;
64
+ }
65
+ .ant-popover.cap-product-selection-v2 .ant-popover-content {
66
+ padding: 0 0.285rem 0.857rem 0.285rem;
67
+ }
68
+ .ant-popover.cap-product-selection-v2 .ant-tree-child-tree > li:first-child {
69
+ margin-top: 0.285rem;
70
+ }
71
+ .ant-popover.cap-product-selection-v2 .ant-tree-treenode-switcher-open, .ant-popover.cap-product-selection-v2 .ant-tree-treenode-switcher-close {
72
+ position: relative;
73
+ }
74
+ .ant-popover.cap-product-selection-v2 .ant-tree-treenode-switcher-open .info-tooltip, .ant-popover.cap-product-selection-v2 .ant-tree-treenode-switcher-close .info-tooltip {
75
+ position: absolute;
76
+ right: 0.714rem;
77
+ top: 0.428rem;
78
+ }
79
+ .ant-popover.cap-product-selection-v2 .tree-node-title .cap-radio-v2 .ant-radio-wrapper .title {
80
+ font-weight: normal !important;
81
+ }
@@ -0,0 +1,8 @@
1
+ import './styles.css';const changeSelectionCard = "changeSelectionCard";
2
+ const styles = {
3
+ changeSelectionCard
4
+ };
5
+ export {
6
+ changeSelectionCard,
7
+ styles as default
8
+ };
@@ -2,55 +2,97 @@
2
2
 
3
3
  $popoverTree: cap-product-selection-v2;
4
4
 
5
- .ant-popover.#{$popoverTree} {
6
- &.greyed {
7
- .ant-popover-arrow {
8
- border-top-color: $CAP_G09;
9
- border-left-color: $CAP_G09;
10
- }
11
- .ant-popover-inner {
12
- background-color: $CAP_G09;
13
- }
5
+ // Change-selection modal card (replaces StyledCapCard from style.ts)
6
+ .changeSelectionCard {
7
+ position: absolute;
8
+ top: $CAP_SPACE_40;
9
+ left: $CAP_SPACE_12;
10
+ width: 21.428rem; // 300px
11
+ .card-title {
12
+ font-size: $FONT_SIZE_M;
13
+ line-height: $CAP_SPACE_24;
14
+ padding-bottom: $CAP_SPACE_12;
15
+ padding-top: $CAP_SPACE_08;
16
+ }
17
+ .card-description {
18
+ font-size: $FONT_SIZE_S;
14
19
  }
15
- .ant-tree li ul {
16
- padding-left: 30px;
20
+ .card-buttons {
21
+ padding-top: $CAP_SPACE_16;
17
22
  }
18
- .ant-popover-content {
19
- width: 324px;
23
+ .card-buttons-primary {
24
+ margin-right: $CAP_SPACE_12;
25
+ }
26
+ }
27
+
28
+ // OVERRIDE: CapProductSelection uses a single global class for the popover overlay (cap-product-selection-v2).
29
+ // Antd Popover does not expose tokens for content width, inner padding, or greyed state; layout is component-specific.
30
+ :global {
31
+ .ant-popover.#{$popoverTree} {
32
+ &.greyed {
33
+ .ant-popover-arrow {
34
+ border-top-color: $CAP_G09;
35
+ border-left-color: $CAP_G09;
36
+ }
37
+ .ant-popover-container {
38
+ background-color: $CAP_G09;
39
+ }
40
+ }
41
+ .ant-popover-container {
20
42
  padding: 0;
21
- min-height: 176px;
22
- font-size: 14px;
23
- line-height: 20px;
43
+ }
44
+ // OVERRIDE: Tree indentation not exposed as design token
45
+ .ant-tree {
46
+ background-color: inherit;
47
+ .ant-tree-list {
48
+ padding: 0.5rem 0; // 7px
49
+ }
50
+ }
51
+ .ant-tree li ul {
52
+ padding-left: 2.143rem; // 30px
53
+ }
54
+ // OVERRIDE: Content dimensions and typography are component-specific; no token for popover content width
55
+ .ant-popover-content {
56
+ width: 23.143rem; // 324px
57
+ padding: 0;
58
+ min-height: 12.571rem; // 176px
59
+ font-size: $FONT_SIZE_M;
60
+ line-height: $CAP_SPACE_20;
24
61
  color: $CAP_G01;
25
- }
62
+ }
26
63
 
27
- .divider {
28
- border-top: 1px solid $CAP_G07;
29
- }
30
- .empty-data-text {
64
+ .divider {
65
+ border-top: $border-width-1 solid $CAP_G07;
66
+ }
67
+ .empty-data-text {
31
68
  text-align: center;
32
- margin-top: 12px;
33
- padding: 10px 0;
34
- }
35
- .ant-popover-inner-content {
36
- padding: 0 4px 12px 4px;
37
- }
69
+ margin-top: $CAP_SPACE_12;
70
+ padding: 0.714rem 0; // 10px
71
+ }
72
+ // OVERRIDE: Inner content padding is layout-specific
73
+ .ant-popover-content {
74
+ padding: 0 $CAP_SPACE_04 $CAP_SPACE_12 $CAP_SPACE_04;
75
+ }
38
76
 
39
- .ant-tree-child-tree > li:first-child {
40
- margin-top: 4px;
41
- }
77
+ // OVERRIDE: Tree node spacing not tokenized
78
+ .ant-tree-child-tree > li:first-child {
79
+ margin-top: $CAP_SPACE_04;
80
+ }
42
81
 
43
- .ant-tree-treenode-switcher-open{
44
- position: relative;
45
- .info-tooltip {
46
- position: absolute;
47
- right: 10px;
48
- top: 6px;
82
+ // OVERRIDE: Info tooltip position in tree node is custom layout
83
+ .ant-tree-treenode-switcher-open, .ant-tree-treenode-switcher-close {
84
+ position: relative;
85
+ .info-tooltip {
86
+ position: absolute;
87
+ right: 0.714rem; // 10px
88
+ top: $CAP_SPACE_06;
89
+ }
49
90
  }
50
- }
51
- .tree-node-title {
52
- .cap-radio-v2 .ant-radio-wrapper .title {
91
+ // OVERRIDE: Radio title font-weight in tree context; no token for nested radio in tree
92
+ .tree-node-title {
93
+ .cap-radio-v2 .ant-radio-wrapper .title {
53
94
  font-weight: normal !important;
95
+ }
54
96
  }
55
97
  }
56
- }
98
+ }