@sc-360-v2/storefront-cms-library 0.5.52 → 0.5.53

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.
@@ -1,5 +1,8 @@
1
- @use "sass:map";
1
+ @use "sass:map";
2
2
  @use "sass:list";
3
+ @use "./functions.scss" as *;
4
+
5
+ $overflowSelector: ".flex__overflow";
3
6
 
4
7
  [data-div-type="element"] {
5
8
  &[data-element-type="quotaDetails"] {
@@ -10,12 +13,17 @@
10
13
  // width: var(--_ctm-lt-wh, var(--_tst-lt-wh));
11
14
  // width: 50%;
12
15
  // width: var(--_sf-nw-wh, var(--_tst-lt-wh));
13
- // width: var(
14
- // --_sf-el-wh-st-mx,
15
- // calc(
16
- // 1% * var(--_ctm-mob-ele-nw-wh-vl, var(--_ctm-tab-ele-nw-wh-vl, var(--_ctm-ele-nw-wh-vl)))
17
- // )
18
- // );
16
+ // Reads the percentage the left/right resize handles write, same as FAQ. Without
17
+ // this the handles (and the Layout > Width input) drag a value nothing consumes.
18
+ width: var(
19
+ --_sf-el-wh-st-mx,
20
+ calc(
21
+ 1% * var(--_ctm-mob-ele-nw-wh-vl, var(--_ctm-tab-ele-nw-wh-vl, var(--_ctm-ele-nw-wh-vl)))
22
+ )
23
+ );
24
+ // Floor for the width above: the two items plus their icons stop reading as a row
25
+ // below this, and dragging past it only produced a squeezed, wrapped box.
26
+ min-width: 300px !important;
19
27
  margin: var(--_ctm-mob-lt-mn, var(--_ctm-tab-lt-mn, var(--_ctm-lt-mn)));
20
28
  // aspect-ratio: 1 / var(--_sf-aspect-ratio);
21
29
 
@@ -133,6 +141,10 @@
133
141
  display: flex;
134
142
  align-items: center;
135
143
  gap: 4px;
144
+ // Flex items default to min-width:auto, so they refuse to shrink below
145
+ // their text width. Narrowing the element used to push this row outside
146
+ // the element box instead of reflowing it inside.
147
+ min-width: 0;
136
148
 
137
149
  .svg_icon {
138
150
  display: flex;
@@ -141,7 +153,10 @@
141
153
  .quota__left {
142
154
  .count {
143
155
  // padding-inline: var(--_sf-cd-gp);
144
- white-space: nowrap;
156
+ // No `white-space: nowrap` here: it stopped the text reflowing when the
157
+ // element is narrowed, and it would also defeat the line clamp below,
158
+ // which needs the text to wrap before it can restrict it to N lines.
159
+ min-width: 0;
145
160
  color: var(
146
161
  --_ctm-mob-dn-qa-lt-cr,
147
162
  var(--_ctm-tab-dn-qa-lt-cr, var(--_ctm-dn-qa-lt-cr))
@@ -178,10 +193,29 @@
178
193
  --_ctm-mob-dn-qa-lt-ue,
179
194
  var(--_ctm-tab-dn-qa-lt-ue, var(--_ctm-dn-qa-lt-ue))
180
195
  );
196
+ text-transform: var(
197
+ --_ctm-mob-dn-qa-lt-tt-tm,
198
+ var(--_ctm-tab-dn-qa-lt-tt-tm, var(--_ctm-dn-qa-lt-tt-tm, none))
199
+ );
200
+ word-wrap: var(
201
+ --_ctm-mob-dn-qa-lt-wd-wp,
202
+ var(--_ctm-tab-dn-qa-lt-wd-wp, var(--_ctm-dn-qa-lt-wd-wp, normal))
203
+ );
204
+ word-break: var(
205
+ --_ctm-mob-dn-qa-lt-wd-bk,
206
+ var(--_ctm-tab-dn-qa-lt-wd-bk, var(--_ctm-dn-qa-lt-wd-bk, normal))
207
+ );
208
+
209
+ &#{$overflowSelector} {
210
+ @include restrictToLinesShow(#{var(--_sf-line-clamp, 1)});
211
+ }
181
212
  }
182
213
  .label {
183
214
  // padding-inline: var(--_sf-cd-gp);
184
- white-space: nowrap;
215
+ // No `white-space: nowrap` here: it stopped the text reflowing when the
216
+ // element is narrowed, and it would also defeat the line clamp below,
217
+ // which needs the text to wrap before it can restrict it to N lines.
218
+ min-width: 0;
185
219
  color: var(
186
220
  --_ctm-mob-dn-qa-lt-cr-dc-dc,
187
221
  var(--_ctm-tab-dn-qa-lt-cr-dc, var(--_ctm-dn-qa-lt-cr-dc))
@@ -218,6 +252,22 @@
218
252
  --_ctm-mob-dn-qa-lt-ue-dc,
219
253
  var(--_ctm-tab-dn-qa-lt-ue-dc, var(--_ctm-dn-qa-lt-ue-dc))
220
254
  );
255
+ text-transform: var(
256
+ --_ctm-mob-dn-qa-lt-tt-tm-dc,
257
+ var(--_ctm-tab-dn-qa-lt-tt-tm-dc, var(--_ctm-dn-qa-lt-tt-tm-dc, none))
258
+ );
259
+ word-wrap: var(
260
+ --_ctm-mob-dn-qa-lt-wd-wp-dc,
261
+ var(--_ctm-tab-dn-qa-lt-wd-wp-dc, var(--_ctm-dn-qa-lt-wd-wp-dc, normal))
262
+ );
263
+ word-break: var(
264
+ --_ctm-mob-dn-qa-lt-wd-bk-dc,
265
+ var(--_ctm-tab-dn-qa-lt-wd-bk-dc, var(--_ctm-dn-qa-lt-wd-bk-dc, normal))
266
+ );
267
+
268
+ &#{$overflowSelector} {
269
+ @include restrictToLinesShow(#{var(--_sf-line-clamp-desc, 1)});
270
+ }
221
271
  }
222
272
  .icon {
223
273
  display: var(--_sf-show-icon-ff, flex);
@@ -235,6 +285,12 @@
235
285
  --_ctm-mob-dn-qa-lt-in-c1,
236
286
  var(--_ctm-tab-dn-qa-lt-in-c1, var(--_ctm-dn-qa-lt-in-c1))
237
287
  );
288
+ // Overrides the stroke-width presentation attribute baked into the
289
+ // icon markup; 1 keeps the icon as authored when nothing is set.
290
+ stroke-width: var(
291
+ --_ctm-mob-dn-qa-lt-se-wh,
292
+ var(--_ctm-tab-dn-qa-lt-se-wh, var(--_ctm-dn-qa-lt-se-wh, 1))
293
+ );
238
294
  }
239
295
  }
240
296
  }
@@ -242,7 +298,10 @@
242
298
  .days__left {
243
299
  .count {
244
300
  // padding-inline: var(--_sf-cd-gp);
245
- white-space: nowrap;
301
+ // No `white-space: nowrap` here: it stopped the text reflowing when the
302
+ // element is narrowed, and it would also defeat the line clamp below,
303
+ // which needs the text to wrap before it can restrict it to N lines.
304
+ min-width: 0;
246
305
  color: var(
247
306
  --_ctm-mob-dn-ds-lt-cr,
248
307
  var(--_ctm-tab-dn-ds-lt-cr, var(--_ctm-dn-ds-lt-cr))
@@ -279,10 +338,29 @@
279
338
  --_ctm-mob-dn-ds-lt-ue,
280
339
  var(--_ctm-tab-dn-ds-lt-ue, var(--_ctm-dn-ds-lt-ue))
281
340
  );
341
+ text-transform: var(
342
+ --_ctm-mob-dn-ds-lt-tt-tm,
343
+ var(--_ctm-tab-dn-ds-lt-tt-tm, var(--_ctm-dn-ds-lt-tt-tm, none))
344
+ );
345
+ word-wrap: var(
346
+ --_ctm-mob-dn-ds-lt-wd-wp,
347
+ var(--_ctm-tab-dn-ds-lt-wd-wp, var(--_ctm-dn-ds-lt-wd-wp, normal))
348
+ );
349
+ word-break: var(
350
+ --_ctm-mob-dn-ds-lt-wd-bk,
351
+ var(--_ctm-tab-dn-ds-lt-wd-bk, var(--_ctm-dn-ds-lt-wd-bk, normal))
352
+ );
353
+
354
+ &#{$overflowSelector} {
355
+ @include restrictToLinesShow(#{var(--_sf-line-clamp, 1)});
356
+ }
282
357
  }
283
358
  .label {
284
359
  // padding-inline: var(--_sf-cd-gp);
285
- white-space: nowrap;
360
+ // No `white-space: nowrap` here: it stopped the text reflowing when the
361
+ // element is narrowed, and it would also defeat the line clamp below,
362
+ // which needs the text to wrap before it can restrict it to N lines.
363
+ min-width: 0;
286
364
  color: var(
287
365
  --_ctm-mob-dn-ds-lt-cr-dc-dc,
288
366
  var(--_ctm-tab-dn-ds-lt-cr-dc, var(--_ctm-dn-ds-lt-cr-dc))
@@ -319,6 +397,22 @@
319
397
  --_ctm-mob-dn-ds-lt-ue-dc,
320
398
  var(--_ctm-tab-dn-ds-lt-ue-dc, var(--_ctm-dn-ds-lt-ue-dc))
321
399
  );
400
+ text-transform: var(
401
+ --_ctm-mob-dn-ds-lt-tt-tm-dc,
402
+ var(--_ctm-tab-dn-ds-lt-tt-tm-dc, var(--_ctm-dn-ds-lt-tt-tm-dc, none))
403
+ );
404
+ word-wrap: var(
405
+ --_ctm-mob-dn-ds-lt-wd-wp-dc,
406
+ var(--_ctm-tab-dn-ds-lt-wd-wp-dc, var(--_ctm-dn-ds-lt-wd-wp-dc, normal))
407
+ );
408
+ word-break: var(
409
+ --_ctm-mob-dn-ds-lt-wd-bk-dc,
410
+ var(--_ctm-tab-dn-ds-lt-wd-bk-dc, var(--_ctm-dn-ds-lt-wd-bk-dc, normal))
411
+ );
412
+
413
+ &#{$overflowSelector} {
414
+ @include restrictToLinesShow(#{var(--_sf-line-clamp-desc, 1)});
415
+ }
322
416
  }
323
417
  .icon {
324
418
  display: var(--_sf-show-icon-ff, flex);
@@ -336,6 +430,12 @@
336
430
  --_ctm-mob-dn-ds-lt-in-c1,
337
431
  var(--_ctm-tab-dn-ds-lt-in-c1, var(--_ctm-dn-ds-lt-in-c1))
338
432
  );
433
+ // Overrides the stroke-width presentation attribute baked into the
434
+ // icon markup; 1 keeps the icon as authored when nothing is set.
435
+ stroke-width: var(
436
+ --_ctm-mob-dn-ds-lt-se-wh,
437
+ var(--_ctm-tab-dn-ds-lt-se-wh, var(--_ctm-dn-ds-lt-se-wh, 1))
438
+ );
339
439
  }
340
440
  }
341
441
  }
@@ -1,4 +1,4 @@
1
- @use "sass:map";
1
+ @use "sass:map";
2
2
  @use "sass:list";
3
3
  @use "./functions.scss" as *;
4
4
 
@@ -18,6 +18,13 @@
18
18
  // inline `min-height: 0px` on the element needs !important to be overridden
19
19
  min-height: prepareMediaVariable(--_ctm-repe-lt-mn-ht, 100px) !important;
20
20
 
21
+ // The item's own Show Shadow switch, which reaches the stylesheet as
22
+ // `data-show-shadow` (RepeaterItem surfaces it — it is a control, so it is not
23
+ // part of the BUILDER attributes that get spread onto the element).
24
+ &[data-show-shadow="false"] {
25
+ --_sf-repe-show-shadow: none;
26
+ }
27
+
21
28
  & > div {
22
29
  &.wrapper {
23
30
  width: 100%;
@@ -66,30 +73,35 @@
66
73
  --_ctm-mob-repe-dn-br-wh,
67
74
  var(--_ctm-tab-repe-dn-br-wh, var(--_ctm-repe-dn-br-wh))
68
75
  );
76
+ // The four shadow variables read `repe-se-*`, but the design section is
77
+ // `design`, so the builder writes `repe-dn-*` (see default-templates.ts). No
78
+ // `repe-se-*` variable is ever defined, which made the whole var() chain
79
+ // invalid at computed-value time and resolved box-shadow to its initial `none`.
80
+ //
81
+ // The gate is `--_sf-repe-show-shadow`, not the shared `--_show-shadow`: the
82
+ // parent Repeater sets that on its own root when its shadow is switched off, and
83
+ // custom properties inherit, so items lost their shadow whenever the repeater's
84
+ // was off. A name of its own keeps the two switches independent. The hover
85
+ // variables that used to head this chain are gone with it — this element has no
86
+ // hover state, so nothing set them and they carried the same leak risk.
87
+ //
88
+ // Per-part fallbacks match repeater.scss: without them a single unset part would
89
+ // invalidate the whole declaration again.
69
90
  box-shadow: var(
70
- --_hover-show-shadow,
71
- var(
72
- --_sf-hr-bx-sw,
91
+ --_sf-repe-show-shadow,
92
+ var(--_ctm-mob-repe-dn-sw-ae, var(--_ctm-tab-repe-dn-sw-ae, var(--_ctm-repe-dn-sw-ae, 0)))
93
+ var(
94
+ --_ctm-mob-repe-dn-sw-br,
95
+ var(--_ctm-tab-repe-dn-sw-br, var(--_ctm-repe-dn-sw-br, 0))
96
+ )
97
+ var(
98
+ --_ctm-mob-repe-dn-sw-sd,
99
+ var(--_ctm-tab-repe-dn-sw-sd, var(--_ctm-repe-dn-sw-sd, 0))
100
+ )
73
101
  var(
74
- --_show-shadow,
75
- var(
76
- --_ctm-mob-repe-se-sw-ae,
77
- var(--_ctm-tab-repe-se-sw-ae, var(--_ctm-repe-se-sw-ae))
78
- )
79
- var(
80
- --_ctm-mob-repe-se-sw-br,
81
- var(--_ctm-tab-repe-se-sw-br, var(--_ctm-repe-se-sw-br))
82
- )
83
- var(
84
- --_ctm-mob-repe-se-sw-sd,
85
- var(--_ctm-tab-repe-se-sw-sd, var(--_ctm-repe-se-sw-sd))
86
- )
87
- var(
88
- --_ctm-mob-repe-se-sw-cr,
89
- var(--_ctm-tab-repe-se-sw-cr, var(--_ctm-repe-se-sw-cr))
90
- )
102
+ --_ctm-mob-repe-dn-sw-cr,
103
+ var(--_ctm-tab-repe-dn-sw-cr, var(--_ctm-repe-dn-sw-cr, transparent))
91
104
  )
92
- )
93
105
  );
94
106
  }
95
107
  &:is([data-background-type="color"] > *).wrapper {
@@ -1,4 +1,4 @@
1
- @use "sass:map";
1
+ @use "sass:map";
2
2
  @use "sass:list";
3
3
  @import "./functions.scss";
4
4
  $defaultValues: (
@@ -11,6 +11,20 @@ $defaultValues: (
11
11
  [data-div-type="element"] {
12
12
  &[data-element-type="requestForQuote"] {
13
13
  margin: 0;
14
+ // Reads the percentage the right resize handle writes, same as My Templates and
15
+ // My Wishlist. Without it the handle drags a value nothing consumes.
16
+ width: var(
17
+ --_sf-el-wh-st-mx,
18
+ calc(
19
+ 1% * var(--_ctm-mob-ele-nw-wh-vl, var(--_ctm-tab-ele-nw-wh-vl, var(--_ctm-ele-nw-wh-vl)))
20
+ )
21
+ );
22
+
23
+ & > .wrapper {
24
+ // Layout > Padding. The element declares it but nothing read it back — the rule
25
+ // below was commented out and named a variable (`--_lt-pg`) that never existed.
26
+ padding: var(--_ctm-mob-lt-pg, var(--_ctm-tab-lt-pg, var(--_ctm-lt-pg)));
27
+ }
14
28
  // width: var(--_lt-wh);
15
29
  // height: var(--_lt-ht);
16
30
  // margin: var(--_lt-mn);
@@ -12,6 +12,15 @@ interface selfLayoutInterface {
12
12
  value: AlignItemsValue;
13
13
  };
14
14
  allocationItemGap: Pick<CMSIBCommonInterface, "property" | "propertyType"> & any;
15
+ allocationsView: Pick<CMSIBCommonInterface, "property" | "propertyType"> & {
16
+ value: string;
17
+ };
18
+ showAllocationTabs: Pick<CMSIBCommonInterface, "property" | "propertyType"> & {
19
+ value: boolean;
20
+ };
21
+ showProfileTabs: Pick<CMSIBCommonInterface, "property"> & {
22
+ value: boolean;
23
+ } & any;
15
24
  }
16
25
  interface selfDesignInterface {
17
26
  selectorKey: string;
@@ -30,7 +39,14 @@ export declare enum SelectorKeysEnum {
30
39
  GRID_VIEW_CONTROL_STYLE = "gridViewControlStyle",
31
40
  BUTTON = "button",
32
41
  SELECTED_STATE = "selectedState",
33
- LAYOUT_STYLE = "layoutStyle"
42
+ HOVER_STATE = "hoverState",
43
+ LAYOUT_STYLE = "layoutStyle",
44
+ SIDEBAR_DESIGN = "sidebarDesign",
45
+ SIDEBAR_CONTAINER = "sidebarContainer",
46
+ SIDEBAR_HEADING = "sidebarHeading",
47
+ PROFILE_ROW = "profileRow",
48
+ PROFILE_TREE_ICON = "profileTreeIcon",
49
+ ALLOCATION_ROW = "allocationRow"
34
50
  }
35
51
  export declare const getDefaultData: () => CMSElementEditPopupInterface<selfLayoutInterface & CMSElementEditPopupLayoutInterface, selfDesignInterface & CMSElementEditPopupDesignInterface>;
36
52
  export {};
@@ -1,4 +1,4 @@
1
- import { CMSCSSUnitTypesEnums } from "../../enums";
1
+ import { CMSCSSUnitTypesEnums, CMSElementEditTypes } from "../../enums";
2
2
  import { CMSIBCommonInterface } from "../../interfaces/global";
3
3
  import { CMSElementEditPopupInterface } from "./common";
4
4
  export interface SectionEditPopupInterface extends CMSElementEditPopupInterface {
@@ -33,6 +33,12 @@ export declare const getDefaultData: () => {
33
33
  showIcon: CMSIBCommonInterface | undefined;
34
34
  iconSize: import("../../interfaces/global").CMSIBSizeInterface;
35
35
  iconColor: CMSIBCommonInterface;
36
+ strokeWidth: {
37
+ value: number;
38
+ property: string;
39
+ unit: CMSCSSUnitTypesEnums;
40
+ propertyType: CMSElementEditTypes;
41
+ };
36
42
  selectorKey: SelectorKeysEnum;
37
43
  backgroundColor: CMSIBCommonInterface;
38
44
  borderColor: CMSIBCommonInterface;
@@ -45,7 +45,6 @@ export interface selfDesignInterface {
45
45
  iconColor: CMSIBCommonInterface;
46
46
  icon: CMSIBCommonInterface;
47
47
  iconSize: CMSIBCommonInterface;
48
- showIcon: controlInterface;
49
48
  hotspotSize: controlInterface;
50
49
  hotspotStyle: controlInterface;
51
50
  backgroundColor: CMSIBCommonInterface;
@@ -41,20 +41,6 @@ export declare const menuConrolsInterface: {
41
41
  value: string;
42
42
  propertyType: CMSElementEditTypes;
43
43
  };
44
- flagStyle: {
45
- value: string;
46
- propertyType: CMSElementEditTypes;
47
- };
48
- flagSize: {
49
- value: number;
50
- property: string;
51
- unit: number;
52
- propertyType: CMSElementEditTypes;
53
- };
54
- showFlags: {
55
- value: boolean;
56
- propertyType: CMSElementEditTypes;
57
- };
58
44
  showSearchText: {
59
45
  value: boolean;
60
46
  property: string;
@@ -1086,5 +1086,10 @@ export declare const getDefaultData: () => {
1086
1086
  property: string;
1087
1087
  propertyType: CMSElementEditTypes;
1088
1088
  };
1089
+ quotaLink: {
1090
+ value: string;
1091
+ property: string;
1092
+ propertyType: CMSElementEditTypes;
1093
+ };
1089
1094
  };
1090
1095
  };
@@ -1069,6 +1069,12 @@ $resizeActive: '[data-cms-element-resizer="true"]';
1069
1069
  }
1070
1070
 
1071
1071
  .quote_item_wrapper {
1072
+ // Set only on the storefront, where clicking a quota row selects that
1073
+ // allocation and its profile. Builder/preview rows are dummy data.
1074
+ &[data-is-clickable="true"] {
1075
+ cursor: pointer;
1076
+ }
1077
+
1072
1078
  display: flex;
1073
1079
  flex-direction: row;
1074
1080
  gap: prepareMediaVariable(--_ctm-lt-qa-im-sg);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sc-360-v2/storefront-cms-library",
3
- "version": "0.5.52",
3
+ "version": "0.5.53",
4
4
  "main": "/dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {