@sc-360-v2/storefront-cms-library 0.5.66 → 0.5.67

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.
package/dist/map.scss CHANGED
@@ -128,6 +128,18 @@ $data: (
128
128
  )
129
129
  );
130
130
 
131
+ // Tooltip Design > Horizontal Alignment, translated for `text-align`. The control is
132
+ // picked from the shared alignment list (flex-start | center | flex-end), and those
133
+ // keywords mean nothing to text-align, so the two ends have to be mapped. The last two
134
+ // entries are the pre-list values, still stored on pages saved before that fix.
135
+ $tooltipTextAlign: (
136
+ "flex-start": left,
137
+ "center": center,
138
+ "flex-end": right,
139
+ "left": left,
140
+ "right": right,
141
+ );
142
+
131
143
  [data-div-type="element"] {
132
144
  &[data-element-type="map"] {
133
145
  // Half the pin as it actually renders, and the gap the tooltip keeps from the
@@ -266,6 +278,26 @@ $data: (
266
278
  var(--_ctm-dn-tp-dn-sw-cr);
267
279
  }
268
280
  }
281
+
282
+ // Tooltip Design > Horizontal Alignment, applied to the tooltip text itself.
283
+ //
284
+ // .text_box re-applies the control as align-items further down, which moves the
285
+ // title and the description only while they are narrower than the tooltip. A title
286
+ // long enough to wrap fills that wrapper, and a flex container cannot move a child
287
+ // that is already full width — which is why the control looked dead on the title
288
+ // while the shorter description still followed it.
289
+ //
290
+ // The value reaches the DOM as a data attribute because align-items keywords are
291
+ // not text-align keywords; Map Widget Layout's alignment takes the same route to
292
+ // .gallery-header above. The tooltip-level control wins over the per-text Alignment
293
+ // in Tooltip Text Design — it is the one that positions the text block.
294
+ @each $key, $align in $tooltipTextAlign {
295
+ &[data-tooltip-text-alignment="#{$key}"] {
296
+ .map-element .hotspot__tooltip .text_box > * {
297
+ text-align: $align;
298
+ }
299
+ }
300
+ }
269
301
  &[data-hotspot-tooltip-image-style-show-border="true"] {
270
302
  .tooltip__image {
271
303
  border-style: var(--_ctm-dn-tp-ie-dn-br-se);
@@ -512,10 +544,7 @@ $data: (
512
544
  );
513
545
  word-wrap: var(
514
546
  --_ctm-mob-dn-mp-wt-wd-wp-dc,
515
- var(
516
- --_ctm-tab-dn-mp-wt-wd-wp-dc,
517
- var(--_ctm-dn-mp-wt-wd-wp-dc, break-word)
518
- )
547
+ var(--_ctm-tab-dn-mp-wt-wd-wp-dc, var(--_ctm-dn-mp-wt-wd-wp-dc, break-word))
519
548
  );
520
549
  word-break: var(
521
550
  --_ctm-mob-dn-mp-wt-wd-bk-dc,
@@ -1005,8 +1034,8 @@ $data: (
1005
1034
  // --_ctm-mob-dn-pn-se-in-c1,
1006
1035
  // var(--_ctm-tab-dn-pn-se-in-c1, var(--_ctm-dn-pn-se-in-c1))
1007
1036
  // );
1008
- // Overrides the stroke-width presentation attribute baked into the icon markup.
1009
- stroke-width: prepareMediaVariable(--_ctm-dn-pn-se-se-wh, 1.25);
1037
+ // Overrides the stroke-width presentation attribute baked into the icon markup.
1038
+ stroke-width: prepareMediaVariable(--_ctm-dn-pn-se-se-wh, 1.25);
1010
1039
  // fill: var(
1011
1040
  // --_ctm-mob-dn-pn-se-in-c1,
1012
1041
  // var(--_ctm-tab-dn-pn-se-in-c1, var(--_ctm-dn-pn-se-in-c1))
@@ -1114,8 +1143,8 @@ $data: (
1114
1143
  // --_ctm-mob-dn-pn-se-in-c1,
1115
1144
  // var(--_ctm-tab-dn-pn-se-in-c1, var(--_ctm-dn-pn-se-in-c1))
1116
1145
  // );
1117
- // Overrides the stroke-width presentation attribute baked into the icon markup.
1118
- stroke-width: prepareMediaVariable(--_ctm-dn-pn-se-se-wh, 1.25);
1146
+ // Overrides the stroke-width presentation attribute baked into the icon markup.
1147
+ stroke-width: prepareMediaVariable(--_ctm-dn-pn-se-se-wh, 1.25);
1119
1148
  // }
1120
1149
  // }
1121
1150
  // }
package/dist/sort.scss CHANGED
@@ -1,89 +1,176 @@
1
- @use "sass:map";
2
- @use "sass:list";
3
-
4
- $resizerId: "[data-cms-tool='cms-element-resizer']";
5
- $resizeActive: '[data-cms-element-resizer="true"]';
6
- [data-div-type="element"] {
7
- &[data-element-type="sort"] {
8
- width: var(
9
- --_sf-el-wh-st-mx,
10
- calc(
11
- 1% *
12
- var(
13
- --_ctm-mob-ele-nw-wh-vl,
14
- var(--_ctm-tab-ele-nw-wh-vl, var(--_ctm-ele-nw-wh-vl, var(--_sf-nw-wh)))
15
- )
16
- )
17
- );
18
- margin: var(--_ctm-mob-lt-mn, var(--_ctm-tab-lt-mn, var(--_ctm-lt-mn)));
19
-
20
- & > div {
21
- &.wrapper {
22
- width: 100%;
23
- }
24
- }
25
- //Dropdown
26
- .est__dropdown__main {
27
- position: relative;
28
- width: 100%;
29
-
30
- label {
31
- font-size: 14px;
32
- color: var(--_gray-700);
33
- margin-bottom: 8px;
34
- display: block;
35
- }
36
-
37
- .est__dropdown {
38
- cursor: pointer;
39
- position: relative;
40
- color: var(--_gray-700);
41
-
42
- border-radius: 6px;
43
- background-color: #fff;
44
- display: flex;
45
- justify-content: space-between;
46
- align-items: center;
47
- width: 100%;
48
- .value__selected {
49
- width: 100%;
50
- }
51
-
52
- &.open .list {
53
- display: flex;
54
- }
55
-
56
- .list {
57
- display: none;
58
- flex-direction: column;
59
- border: 1px solid var(--_gray-200);
60
- border-radius: 6px;
61
- position: absolute;
62
- top: 100%;
63
- left: 0;
64
- width: 100%;
65
- background-color: #fff;
66
- border-radius: 4px;
67
- z-index: var(--_higher-zIndex);
68
- max-height: 200px;
69
- overflow-y: auto;
70
-
71
- &.top {
72
- bottom: 100%;
73
- top: auto;
74
- }
75
-
76
- .list__option {
77
- padding: 12px;
78
- cursor: pointer;
79
-
80
- &:hover {
81
- background-color: var(--_primary-25);
82
- color: var(--_primary-400);
83
- }
84
- }
85
- }
86
- }
87
- }
88
- }
89
- }
1
+ @use "sass:map";
2
+ @use "sass:list";
3
+ @use "./functions.scss" as *;
4
+
5
+ $resizerId: "[data-cms-tool='cms-element-resizer']";
6
+ $resizeActive: '[data-cms-element-resizer="true"]';
7
+ [data-div-type="element"] {
8
+ &[data-element-type="sort"] {
9
+ width: var(
10
+ --_sf-el-wh-st-mx,
11
+ calc(
12
+ 1% *
13
+ var(
14
+ --_ctm-mob-ele-nw-wh-vl,
15
+ var(--_ctm-tab-ele-nw-wh-vl, var(--_ctm-ele-nw-wh-vl, var(--_sf-nw-wh)))
16
+ )
17
+ )
18
+ );
19
+ margin: var(--_ctm-mob-lt-mn, var(--_ctm-tab-lt-mn, var(--_ctm-lt-mn)));
20
+
21
+ // The Design tab's Sort Button toggles. Both are CONTROLS with no CSS property of
22
+ // their own, so the element publishes them as data attributes and the styling has
23
+ // to act on them here — an unhandled toggle stores a value that never reaches the
24
+ // page, which is what the whole Design tab did before these variables were wired.
25
+ &[data-sort-button-shadow="false"] {
26
+ --_show-shadow-sort-button: none;
27
+ }
28
+ &[data-sort-button-border="false"] {
29
+ .est__dropdown {
30
+ border: none;
31
+ }
32
+ }
33
+
34
+ & > div {
35
+ &.wrapper {
36
+ width: 100%;
37
+ }
38
+ }
39
+ //Dropdown
40
+ .est__dropdown__main {
41
+ position: relative;
42
+ width: 100%;
43
+
44
+ label {
45
+ font-size: 14px;
46
+ color: var(--_gray-700);
47
+ margin-bottom: 8px;
48
+ display: block;
49
+ }
50
+
51
+ .est__dropdown {
52
+ cursor: pointer;
53
+ position: relative;
54
+ display: flex;
55
+ justify-content: space-between;
56
+ align-items: center;
57
+ gap: 8px;
58
+ width: 100%;
59
+
60
+ // Design > Sort Button. `--_ctm-dn-st-bn-*` is what the schema's
61
+ // design.sortButton scope emits: splitCamelCaseAndJoin("design") -> "dn",
62
+ // ("sortButton") -> "st-bn". The literals stay as the fallbacks so an element
63
+ // saved before the Design tab existed keeps the look it had.
64
+ background-color: prepareMediaVariable(--_ctm-dn-st-bn-bd-cr, #fff);
65
+ border-color: prepareMediaVariable(--_ctm-dn-st-bn-br-cr, transparent);
66
+ border-style: prepareMediaVariable(--_ctm-dn-st-bn-br-se, solid);
67
+ border-width: prepareMediaVariable(--_ctm-dn-st-bn-br-wh, 0);
68
+ border-radius: prepareMediaVariable(--_ctm-dn-st-bn-br-rs, 6px);
69
+ box-shadow: var(
70
+ --_show-shadow-sort-button,
71
+ prepareMediaVariable(--_ctm-dn-st-bn-sw-ae, 0 0)
72
+ prepareMediaVariable(--_ctm-dn-st-bn-sw-br, 0)
73
+ prepareMediaVariable(--_ctm-dn-st-bn-sw-sd, 0)
74
+ prepareMediaVariable(--_ctm-dn-st-bn-sw-cr, transparent)
75
+ );
76
+
77
+ .value__selected {
78
+ display: flex;
79
+ align-items: baseline;
80
+ gap: 4px;
81
+ // The title and the value are laid out side by side, so the pair has to be
82
+ // allowed to shrink — without min-width the flex item keeps its content
83
+ // width and pushes the chevron out of a narrow element instead of clamping.
84
+ min-width: 0;
85
+ flex: 1;
86
+ }
87
+
88
+ // Text Overflow is a CONTROL, not CSS: the element adds this class and
89
+ // publishes the line count inline, one variable per typography scope.
90
+ .sort__title.flex__overflow {
91
+ white-space: normal;
92
+ @include restrictToLinesShow(#{var(--_sf-line-clamp, 1)});
93
+ }
94
+ .selected__option.flex__overflow {
95
+ white-space: normal;
96
+ @include restrictToLinesShow(#{var(--_sf-line-clamp-desc, 1)});
97
+ }
98
+
99
+ // Design > Sort Title (design.sortTitle -> "dn-st-te")
100
+ .sort__title {
101
+ color: prepareMediaVariable(--_ctm-dn-st-te-cr, var(--_gray-700));
102
+ font-family: var(--_sf-hr-ff, prepareMediaVariable(--_ctm-dn-st-te-ft-fy, inherit));
103
+ font-size: prepareMediaVariable(--_ctm-dn-st-te-ft-se, inherit);
104
+ font-weight: prepareMediaVariable(--_ctm-dn-st-te-ft-wt, inherit);
105
+ font-style: prepareMediaVariable(--_ctm-dn-st-te-ft-se-ic, normal);
106
+ text-align: prepareMediaVariable(--_ctm-dn-st-te-tt-an, left);
107
+ letter-spacing: prepareMediaVariable(--_ctm-dn-st-te-lr-sg, normal);
108
+ line-height: prepareMediaVariable(--_ctm-dn-st-te-le-ht, normal);
109
+ text-decoration: prepareMediaVariable(--_ctm-dn-st-te-ue, none);
110
+ }
111
+
112
+ // Design > Selected Option (design.selectedOption -> "dn-sd-on")
113
+ .selected__option {
114
+ color: prepareMediaVariable(--_ctm-dn-sd-on-cr, var(--_gray-700));
115
+ font-family: var(--_sf-hr-ff, prepareMediaVariable(--_ctm-dn-sd-on-ft-fy, inherit));
116
+ font-size: prepareMediaVariable(--_ctm-dn-sd-on-ft-se, inherit);
117
+ font-weight: prepareMediaVariable(--_ctm-dn-sd-on-ft-wt, inherit);
118
+ font-style: prepareMediaVariable(--_ctm-dn-sd-on-ft-se-ic, normal);
119
+ text-align: prepareMediaVariable(--_ctm-dn-sd-on-tt-an, left);
120
+ letter-spacing: prepareMediaVariable(--_ctm-dn-sd-on-lr-sg, normal);
121
+ line-height: prepareMediaVariable(--_ctm-dn-sd-on-le-ht, normal);
122
+ text-decoration: prepareMediaVariable(--_ctm-dn-sd-on-ue, none);
123
+ }
124
+
125
+ &.open .list {
126
+ display: flex;
127
+ }
128
+
129
+ .list {
130
+ display: none;
131
+ flex-direction: column;
132
+ border: 1px solid var(--_gray-200);
133
+ border-radius: 6px;
134
+ position: absolute;
135
+ top: 100%;
136
+ left: 0;
137
+ width: 100%;
138
+ background-color: #fff;
139
+ border-radius: 4px;
140
+ z-index: var(--_higher-zIndex);
141
+ max-height: 200px;
142
+ overflow-y: auto;
143
+
144
+ &.top {
145
+ bottom: 100%;
146
+ top: auto;
147
+ }
148
+
149
+ .list__option {
150
+ padding: 12px;
151
+ cursor: pointer;
152
+ // The list has no design scope of its own. It borrows the Selected
153
+ // Option's type so the open list matches the closed control — colour and
154
+ // alignment are left to the list's own resting/hover rules below, which
155
+ // are what make an option look clickable.
156
+ font-family: var(--_sf-hr-ff, prepareMediaVariable(--_ctm-dn-sd-on-ft-fy, inherit));
157
+ font-size: prepareMediaVariable(--_ctm-dn-sd-on-ft-se, inherit);
158
+ font-weight: prepareMediaVariable(--_ctm-dn-sd-on-ft-wt, inherit);
159
+ letter-spacing: prepareMediaVariable(--_ctm-dn-sd-on-lr-sg, normal);
160
+ color: var(--_gray-700);
161
+
162
+ &:hover {
163
+ background-color: var(--_primary-25);
164
+ color: var(--_primary-400);
165
+ }
166
+
167
+ &[aria-selected="true"] {
168
+ background-color: var(--_primary-25);
169
+ color: var(--_primary-400);
170
+ }
171
+ }
172
+ }
173
+ }
174
+ }
175
+ }
176
+ }
@@ -15,7 +15,10 @@ export declare enum cartAttributesSelectorKeysEnum {
15
15
  ATTRIBUTES_INFORMATION = "attributesInformation",
16
16
  ATTRIBUTES_FIELDS = "attributesFields",
17
17
  ATTRIBUTES_LABELS = "attributesLabels",
18
+ ATTRIBUTES_PRICE = "attributesPrice",
18
19
  ATTRIBUTES_INPUTS = "attributesInputs",
20
+ ATTRIBUTES_TEXT_AREA = "attributesTextArea",
21
+ ATTRIBUTES_COLOR_PICKER = "attributesColorPicker",
19
22
  ATTRIBUTES_DROPDOWN = "attributesDropdown",
20
23
  UPLOADS = "uploads",
21
24
  ATTRIBUTES_BOOLEANS = "attributesBooleans"
@@ -130,7 +133,7 @@ export declare const getDefaultData: () => {
130
133
  attributeItemsWrapper: {
131
134
  padding: any;
132
135
  itemGap: {
133
- value: CMSCSSUnitTypesEnums;
136
+ value: number;
134
137
  unit: CMSCSSUnitTypesEnums;
135
138
  property: string;
136
139
  propertyType: CMSElementEditTypes;
@@ -236,9 +239,8 @@ export declare const getDefaultData: () => {
236
239
  selectorKey: cartAttributesSelectorKeysEnum;
237
240
  };
238
241
  attributesFields: {
239
- padding: any;
240
242
  itemGap: {
241
- value: CMSCSSUnitTypesEnums;
243
+ value: number;
242
244
  unit: CMSCSSUnitTypesEnums;
243
245
  property: string;
244
246
  propertyType: CMSElementEditTypes;
@@ -257,6 +259,7 @@ export declare const getDefaultData: () => {
257
259
  backgroundColor: CMSIBCommonInterface;
258
260
  textOverflow: any;
259
261
  numberOfDisplayedLines: any;
262
+ padding: any;
260
263
  margin: import("../../interfaces/global").CSSPaddingValues | undefined;
261
264
  borderColor: CMSIBCommonInterface;
262
265
  borderStyle: CMSIBCommonInterface;
@@ -309,7 +312,119 @@ export declare const getDefaultData: () => {
309
312
  shadows: CMSIBSizeInterface;
310
313
  selectorKey: cartAttributesSelectorKeysEnum;
311
314
  };
315
+ attributesPrice: {
316
+ padding: any;
317
+ theme: CMSIBCommonInterface;
318
+ font: CMSIBCommonInterface;
319
+ fontSize: CMSIBSizeInterface;
320
+ textColor: CMSIBCommonInterface;
321
+ bold: CMSIBCommonInterface;
322
+ italic: CMSIBCommonInterface;
323
+ linethrough: CMSIBCommonInterface;
324
+ underline: CMSIBCommonInterface;
325
+ textAlign: CMSIBCommonInterface;
326
+ characterSpacing: CMSIBSizeInterface;
327
+ lineHeight: CMSIBSizeInterface;
328
+ backgroundColor: CMSIBCommonInterface;
329
+ textOverflow: any;
330
+ numberOfDisplayedLines: any;
331
+ margin: import("../../interfaces/global").CSSPaddingValues | undefined;
332
+ borderColor: CMSIBCommonInterface;
333
+ borderStyle: CMSIBCommonInterface;
334
+ borderPerSlide: import("../../interfaces/global").CSSPaddingValues;
335
+ showBorder: CMSIBCommonInterface;
336
+ showShadow: CMSIBCommonInterface;
337
+ shadowColor: CMSIBCommonInterface;
338
+ blur: CMSIBSizeInterface;
339
+ spread: CMSIBSizeInterface;
340
+ angle: CMSIBSizeInterface;
341
+ borderRadius: import("../../interfaces/global").CSSPaddingValues;
342
+ exposure: CMSIBSizeInterface;
343
+ contrast: CMSIBSizeInterface;
344
+ saturation: CMSIBSizeInterface;
345
+ highlights: CMSIBSizeInterface;
346
+ shadows: CMSIBSizeInterface;
347
+ selectorKey: cartAttributesSelectorKeysEnum;
348
+ };
312
349
  attributesInputs: {
350
+ iconColor: CMSIBCommonInterface;
351
+ strokeWidth: CMSIBSizeInterface;
352
+ iconSize: CMSIBSizeInterface;
353
+ itemGap: {
354
+ value: number;
355
+ unit: CMSCSSUnitTypesEnums;
356
+ property: string;
357
+ propertyType: CMSElementEditTypes;
358
+ };
359
+ theme: CMSIBCommonInterface;
360
+ font: CMSIBCommonInterface;
361
+ fontSize: CMSIBSizeInterface;
362
+ textColor: CMSIBCommonInterface;
363
+ bold: CMSIBCommonInterface;
364
+ italic: CMSIBCommonInterface;
365
+ linethrough: CMSIBCommonInterface;
366
+ underline: CMSIBCommonInterface;
367
+ textAlign: CMSIBCommonInterface;
368
+ characterSpacing: CMSIBSizeInterface;
369
+ lineHeight: CMSIBSizeInterface;
370
+ backgroundColor: CMSIBCommonInterface;
371
+ textOverflow: any;
372
+ numberOfDisplayedLines: any;
373
+ padding: any;
374
+ margin: import("../../interfaces/global").CSSPaddingValues | undefined;
375
+ borderColor: CMSIBCommonInterface;
376
+ borderStyle: CMSIBCommonInterface;
377
+ borderPerSlide: import("../../interfaces/global").CSSPaddingValues;
378
+ showBorder: CMSIBCommonInterface;
379
+ showShadow: CMSIBCommonInterface;
380
+ shadowColor: CMSIBCommonInterface;
381
+ blur: CMSIBSizeInterface;
382
+ spread: CMSIBSizeInterface;
383
+ angle: CMSIBSizeInterface;
384
+ borderRadius: import("../../interfaces/global").CSSPaddingValues;
385
+ exposure: CMSIBSizeInterface;
386
+ contrast: CMSIBSizeInterface;
387
+ saturation: CMSIBSizeInterface;
388
+ highlights: CMSIBSizeInterface;
389
+ shadows: CMSIBSizeInterface;
390
+ selectorKey: cartAttributesSelectorKeysEnum;
391
+ };
392
+ attributesTextArea: {
393
+ theme: CMSIBCommonInterface;
394
+ font: CMSIBCommonInterface;
395
+ fontSize: CMSIBSizeInterface;
396
+ textColor: CMSIBCommonInterface;
397
+ bold: CMSIBCommonInterface;
398
+ italic: CMSIBCommonInterface;
399
+ linethrough: CMSIBCommonInterface;
400
+ underline: CMSIBCommonInterface;
401
+ textAlign: CMSIBCommonInterface;
402
+ characterSpacing: CMSIBSizeInterface;
403
+ lineHeight: CMSIBSizeInterface;
404
+ backgroundColor: CMSIBCommonInterface;
405
+ textOverflow: any;
406
+ numberOfDisplayedLines: any;
407
+ padding: any;
408
+ margin: import("../../interfaces/global").CSSPaddingValues | undefined;
409
+ borderColor: CMSIBCommonInterface;
410
+ borderStyle: CMSIBCommonInterface;
411
+ borderPerSlide: import("../../interfaces/global").CSSPaddingValues;
412
+ showBorder: CMSIBCommonInterface;
413
+ showShadow: CMSIBCommonInterface;
414
+ shadowColor: CMSIBCommonInterface;
415
+ blur: CMSIBSizeInterface;
416
+ spread: CMSIBSizeInterface;
417
+ angle: CMSIBSizeInterface;
418
+ borderRadius: import("../../interfaces/global").CSSPaddingValues;
419
+ exposure: CMSIBSizeInterface;
420
+ contrast: CMSIBSizeInterface;
421
+ saturation: CMSIBSizeInterface;
422
+ highlights: CMSIBSizeInterface;
423
+ shadows: CMSIBSizeInterface;
424
+ selectorKey: cartAttributesSelectorKeysEnum;
425
+ };
426
+ attributesColorPicker: {
427
+ iconSize: CMSIBSizeInterface;
313
428
  theme: CMSIBCommonInterface;
314
429
  font: CMSIBCommonInterface;
315
430
  fontSize: CMSIBSizeInterface;
@@ -603,7 +718,7 @@ export declare const getDefaultData: () => {
603
718
  propertyType: CMSElementEditTypes;
604
719
  };
605
720
  itemGap: {
606
- value: CMSCSSUnitTypesEnums;
721
+ value: number;
607
722
  unit: CMSCSSUnitTypesEnums;
608
723
  property: string;
609
724
  propertyType: CMSElementEditTypes;
@@ -854,7 +969,7 @@ export declare const getDefaultData: () => {
854
969
  propertyType: CMSElementEditTypes;
855
970
  };
856
971
  itemGap: {
857
- value: CMSCSSUnitTypesEnums;
972
+ value: number;
858
973
  unit: CMSCSSUnitTypesEnums;
859
974
  property: string;
860
975
  propertyType: CMSElementEditTypes;