@sc-360-v2/storefront-cms-library 0.5.49 → 0.5.51

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 (48) hide show
  1. package/dist/brand-basic-elements.scss +109 -46
  2. package/dist/brand.scss +6 -0
  3. package/dist/breadcrumbs.scss +144 -51
  4. package/dist/builder.js +1 -1
  5. package/dist/bundle.scss +74 -48
  6. package/dist/bundleDetails.scss +1360 -275
  7. package/dist/button copy.scss +271 -271
  8. package/dist/cart.scss +85 -4
  9. package/dist/category.scss +25 -4
  10. package/dist/container.scss +20 -17
  11. package/dist/embed-temp.scss +2 -2
  12. package/dist/hotspot.scss +12 -3
  13. package/dist/language-selector.scss +42 -0
  14. package/dist/line.scss +54 -36
  15. package/dist/login.scss +225 -69
  16. package/dist/map.scss +354 -147
  17. package/dist/marchandiserSets.scss +34 -0
  18. package/dist/product-actions.scss +53 -0
  19. package/dist/product-basic-elements.scss +50 -4
  20. package/dist/productDetails.scss +33 -0
  21. package/dist/quick-links.scss +23 -2
  22. package/dist/repeater copy.scss +635 -635
  23. package/dist/repeater-grid-toggle.scss +93 -3
  24. package/dist/repeater-item.scss +5 -1
  25. package/dist/review-cart.scss +7 -1
  26. package/dist/search.scss +45 -5
  27. package/dist/styles.css +1 -1
  28. package/dist/tab-v2.scss +724 -583
  29. package/dist/text-temp-v2.scss +7 -1
  30. package/dist/types/builder/tools/element-edit/breadcrumbs.d.ts +26 -0
  31. package/dist/types/builder/tools/element-edit/bundle.d.ts +104 -4
  32. package/dist/types/builder/tools/element-edit/cart.d.ts +7 -0
  33. package/dist/types/builder/tools/element-edit/map.d.ts +0 -1
  34. package/dist/types/builder/tools/element-edit/quickLinks.d.ts +6 -0
  35. package/dist/types/builder/tools/element-edit/search.d.ts +4 -61
  36. package/dist/types/builder/tools/element-edit/tabsV2.d.ts +110 -1
  37. package/dist/upload-media.scss +14 -2
  38. package/package.json +1 -1
  39. package/dist/add-products-tab copy.scss +0 -1122
  40. package/dist/allocationDetails copy.scss +0 -757
  41. package/dist/bulk-variant-picker copy.scss +0 -1121
  42. package/dist/bundleDetails copy.scss +0 -1431
  43. package/dist/product-actions copy.scss +0 -2765
  44. package/dist/product-highlights copy.scss +0 -217
  45. package/dist/product-image copy.scss +0 -787
  46. package/dist/user-elements copy.scss +0 -1437
  47. package/dist/volume-pricing copy 2.scss +0 -1468
  48. package/dist/volume-pricing copy.scss +0 -1076
package/dist/map.scss CHANGED
@@ -2,128 +2,142 @@
2
2
  @use "sass:list";
3
3
  @use "./functions.scss" as *;
4
4
 
5
- $tpgp: 20px;
5
+ // Tooltip tip + placement, ported from the image hotspot (hotspot.scss) so both
6
+ // elements anchor their tooltip the same way.
7
+ //
8
+ // $ics is the tip's border-width: a 5px border with no content box makes a 10px
9
+ // triangle whose apex sits at the centre of the 10px box.
10
+ $ics: 5px;
11
+ $tip: $ics * 2;
6
12
  $bm: 30px;
7
- $ics: -1px;
8
13
 
14
+ // Gap between the pin's edge and the tooltip. Held in a custom property so it can
15
+ // track the pin's real size at runtime (see --_sf-tp-gp below) instead of the flat
16
+ // 20px this file used to assume — that offset ignored Pin Size, so the tip drifted
17
+ // off the pin as soon as the pin was resized.
18
+ $g: var(--_sf-tp-gp);
19
+
20
+ $overflowSelector: ".flex__overflow";
21
+
22
+ // Each entry places the tooltip relative to the pin's centre, then pins the tip to
23
+ // the tooltip edge that faces the pin. Because $g already absorbs the pin's
24
+ // half-size, every tip offset below is a constant: the triangle always spans exactly
25
+ // the gap, base on the tooltip edge and apex on the pin edge. The previous table did
26
+ // this with hand-tuned multipliers (1.25 / 1.75 / 2.05 / 2.7 …) and, in five entries,
27
+ // a stray top-level border-color that painted over the tooltip's own border colour.
9
28
  $data: (
29
+ // tooltip to the LEFT — tip on its right edge, pointing right
10
30
  leftTop: (
11
- transform: translate(calc(-100% - #{$tpgp}), calc(-100% + #{$bm})),
12
- icon: (
13
- bottom: #{$bm},
14
- right: 0px,
15
- transform: translate(calc(100% + #{$ics}), calc(50% + (#{$ics} * 1.25))),
16
- border-color: transparent transparent transparent var(--_ctm-dn-tp-dn-bd-cr),
31
+ transform: translate(calc(-100% - #{$g}), calc(-100% + #{$bm})),
32
+ icon: (
33
+ right: -#{$tip},
34
+ bottom: calc(#{$bm} - #{$ics}),
35
+ border-color: transparent transparent transparent var(--_ctm-dn-tp-dn-bd-cr),
36
+ ),
17
37
  ),
18
- ),
19
38
  leftCenter: (
20
- transform: translate(calc(-100% - #{$tpgp}), calc(-50% + 0px)),
39
+ transform: translate(calc(-100% - #{$g}), -50%),
21
40
  icon: (
22
- top: 50%,
23
- right: 0px,
24
- transform: translate(calc(100% + #{$ics}), calc(-50% + (0px * 1.75))),
41
+ right: -#{$tip},
42
+ top: calc(50% - #{$ics}),
25
43
  border-color: transparent transparent transparent var(--_ctm-dn-tp-dn-bd-cr),
26
44
  ),
27
45
  ),
28
46
  leftBottom: (
29
- transform: translate(calc(-100% - #{$tpgp}), calc(0% - #{$bm})),
47
+ transform: translate(calc(-100% - #{$g}), calc(0% - #{$bm})),
30
48
  icon: (
31
- top: #{$bm},
32
- right: 0px,
33
- transform: translate(calc(100% + #{$ics}), calc(-100% + (#{$ics} * 1.75))),
49
+ right: -#{$tip},
50
+ top: calc(#{$bm} - #{$ics}),
34
51
  border-color: transparent transparent transparent var(--_ctm-dn-tp-dn-bd-cr),
35
52
  ),
36
53
  ),
54
+ // tooltip ABOVE — tip on its bottom edge, pointing down
37
55
  topLeft: (
38
- transform: translate(calc(-100% + #{$bm}), calc(-100% - #{$tpgp})),
39
- icon: (
40
- bottom: 0px,
41
- right: #{$bm},
42
- transform: translate(calc(50% + (#{$ics} * 1.75)), calc(100% + #{$ics})),
43
- border-color: var(--_ctm-dn-tp-dn-bd-cr) transparent transparent transparent,
56
+ transform: translate(calc(-100% + #{$bm}), calc(-100% - #{$g})),
57
+ icon: (
58
+ bottom: -#{$tip},
59
+ right: calc(#{$bm} - #{$ics}),
60
+ border-color: var(--_ctm-dn-tp-dn-bd-cr) transparent transparent transparent,
61
+ ),
44
62
  ),
45
- ),
46
63
  topCenter: (
47
- transform: translate(calc(-50% - #{$ics}), calc(-100% - #{$tpgp})),
64
+ transform: translate(-50%, calc(-100% - #{$g})),
48
65
  icon: (
49
- bottom: 0px,
50
- right: 50%,
51
- transform: translate(calc(50% + (#{$ics} * 1.75)), calc(100% + #{$ics})),
66
+ bottom: -#{$tip},
67
+ left: calc(50% - #{$ics}),
52
68
  border-color: var(--_ctm-dn-tp-dn-bd-cr) transparent transparent transparent,
53
69
  ),
54
70
  ),
55
71
  topRight: (
56
- transform: translate(calc(-1 * #{$bm}), calc(-100% - #{$tpgp})),
72
+ transform: translate(calc(0% - #{$bm}), calc(-100% - #{$g})),
57
73
  icon: (
58
- bottom: 0px,
59
- left: #{$bm},
60
- transform: translate(calc(-100% + (#{$ics} * 1.25)), calc(100% + #{$ics})),
74
+ bottom: -#{$tip},
75
+ left: calc(#{$bm} - #{$ics}),
61
76
  border-color: var(--_ctm-dn-tp-dn-bd-cr) transparent transparent transparent,
62
77
  ),
63
78
  ),
79
+ // tooltip to the RIGHT — tip on its left edge, pointing left
64
80
  rightTop: (
65
- transform: translate(calc(0% + #{$tpgp}), calc(-100% + #{$bm})),
66
- icon: (
67
- top: 100%,
68
- left: 0px,
69
- transform: translate(calc(-100% - #{$ics}), calc(50% - (#{$bm} * 1.25))),
70
- border-color: transparent var(--_ctm-dn-tp-dn-bd-cr) transparent transparent,
81
+ transform: translate(#{$g}, calc(-100% + #{$bm})),
82
+ icon: (
83
+ left: -#{$tip},
84
+ bottom: calc(#{$bm} - #{$ics}),
85
+ border-color: transparent var(--_ctm-dn-tp-dn-bd-cr) transparent transparent,
86
+ ),
71
87
  ),
72
- ),
73
88
  rightCenter: (
74
- transform: translate(calc(0% + #{$tpgp}), calc(-50% + #{$ics})),
75
- border-color: var(--_ctm-dn-tp-dn-bd-cr) transparent transparent transparent,
89
+ transform: translate(#{$g}, -50%),
76
90
  icon: (
77
- bottom: 50%,
78
- left: 0px,
79
- transform: translate(calc(-100% - #{$ics}), calc(50% + (0px * 1.75))),
91
+ left: -#{$tip},
92
+ top: calc(50% - #{$ics}),
80
93
  border-color: transparent var(--_ctm-dn-tp-dn-bd-cr) transparent transparent,
81
94
  ),
82
95
  ),
83
96
  rightBottom: (
84
- transform: translate(calc(0% + #{$tpgp}), calc(0% - #{$bm})),
85
- border-color: var(--_ctm-dn-tp-dn-bd-cr) transparent transparent transparent,
97
+ transform: translate(#{$g}, calc(0% - #{$bm})),
86
98
  icon: (
87
- top: 100%,
88
- left: 0,
89
- transform: translate(calc(-100% - #{$ics}), calc(-100% - (#{$bm} * 2.05))),
99
+ left: -#{$tip},
100
+ top: calc(#{$bm} - #{$ics}),
90
101
  border-color: transparent var(--_ctm-dn-tp-dn-bd-cr) transparent transparent,
91
102
  ),
92
103
  ),
104
+ // tooltip BELOW — tip on its top edge, pointing up
93
105
  bottomLeft: (
94
- transform: translate(calc(-100% + #{$bm}), calc(-50% + (#{$bm} * 2.7))),
95
- border-color: transparent transparent var(--_ctm-dn-tp-dn-bd-cr) transparent,
96
- icon: (
97
- right: #{$bm},
98
- top: 0%,
99
- transform: translate(calc(50% + (#{$ics} * 0.75)), calc(-100% - #{$ics})),
100
- border-color: transparent transparent var(--_ctm-dn-tp-dn-bd-cr) transparent,
106
+ transform: translate(calc(-100% + #{$bm}), #{$g}),
107
+ icon: (
108
+ top: -#{$tip},
109
+ right: calc(#{$bm} - #{$ics}),
110
+ border-color: transparent transparent var(--_ctm-dn-tp-dn-bd-cr) transparent,
111
+ ),
101
112
  ),
102
- ),
103
113
  bottomCenter: (
104
- transform: translate(calc(-50% - #{$ics}), calc(-50% + (#{$bm} * 2.7))),
105
- border-color: transparent transparent var(--_ctm-dn-tp-dn-bd-cr) transparent,
114
+ transform: translate(-50%, #{$g}),
106
115
  icon: (
107
- right: 50%,
108
- top: 0,
109
- transform: translate(calc(0% + (#{$ics} * 2.75)), calc(-100% - #{$ics})),
116
+ top: -#{$tip},
117
+ left: calc(50% - #{$ics}),
110
118
  border-color: transparent transparent var(--_ctm-dn-tp-dn-bd-cr) transparent,
111
119
  ),
112
120
  ),
113
121
  bottomRight: (
114
- transform: translate(calc(0% - #{$bm}), calc(-50% + (#{$bm} * 2.7))),
115
- border-color: transparent transparent var(--_ctm-dn-tp-dn-bd-cr) transparent,
122
+ transform: translate(calc(0% - #{$bm}), #{$g}),
116
123
  icon: (
117
- left: 30px,
118
- top: 0,
119
- transform: translate(calc(-50% - (#{$ics} * 1.25)), calc(-100% - #{$ics})),
124
+ top: -#{$tip},
125
+ left: calc(#{$bm} - #{$ics}),
120
126
  border-color: transparent transparent var(--_ctm-dn-tp-dn-bd-cr) transparent,
121
127
  ),
122
- ),
128
+ )
123
129
  );
124
130
 
125
131
  [data-div-type="element"] {
126
132
  &[data-element-type="map"] {
133
+ // Half the pin as it actually renders, and the gap the tooltip keeps from the
134
+ // pin's centre — both driven by the Pin Size control rather than a literal, so
135
+ // the tip lands on the pin at any size. Unlike the image hotspot there is no
136
+ // icon-only variant to handle: .hotspot is always sized by the pin size here,
137
+ // with the icon drawn inside it.
138
+ --_sf-ht-hf: calc(#{prepareMediaVariable(--_ctm-dn-pn-se-ht-se, 24px)} / 2);
139
+ --_sf-tp-gp: calc(var(--_sf-ht-hf) + #{$ics});
140
+
127
141
  &[data-hotspot-position] {
128
142
  @each $key, $value in $data {
129
143
  &[data-hotspot-position="#{$key}"] {
@@ -175,13 +189,55 @@ $data: (
175
189
  &[data-show-shadow="false"] {
176
190
  --_show-shadow: none;
177
191
  }
178
- &[data-hotspot-position="topLeft"] {
179
- --_show-shadow: none;
180
- .hotspot__tooltip {
181
- border-style: var(--_ctm-dn-tp-dn-br-se);
182
- border-color: var(--_ctm-dn-tp-dn-br-cr);
183
- border-width: var(--_ctm-dn-tp-dn-br-wh);
184
- border-radius: var(--_ctm-dn-tp-dn-br-rs);
192
+
193
+ // design > Map Widget Layout — where the title/description block sits relative to
194
+ // the map. Top/Bottom stack it (column), Left/Right put it beside the map (row).
195
+ &[data-text-container-position="Bottom"] .map-element {
196
+ flex-direction: column-reverse;
197
+ }
198
+ &[data-text-container-position="Left"],
199
+ &[data-text-container-position="Right"] {
200
+ .map-element {
201
+ flex-direction: row;
202
+
203
+ // Beside the map the header sizes to its content and the map takes the rest;
204
+ // stacked above/below it keeps spanning the full width.
205
+ > .gallery-header {
206
+ width: auto;
207
+ flex: 0 0 auto;
208
+ }
209
+ > .map {
210
+ flex: 1 1 auto;
211
+ }
212
+ }
213
+ }
214
+ &[data-text-container-position="Right"] .map-element {
215
+ flex-direction: row-reverse;
216
+ }
217
+
218
+ // The alignment control switches between the horizontal list (left/center/right)
219
+ // for stacked layouts and the vertical one (top/center/bottom) for side-by-side.
220
+ // Stacked: the header spans the full width, so align the text inside it. Side by
221
+ // side: align the header on the flex cross axis.
222
+ &[data-text-container-alignment="left"] .map-element > .gallery-header {
223
+ text-align: left;
224
+ }
225
+ &[data-text-container-alignment="right"] .map-element > .gallery-header {
226
+ text-align: right;
227
+ }
228
+ &[data-text-container-alignment="top"] .map-element {
229
+ align-items: flex-start;
230
+ }
231
+ &[data-text-container-alignment="bottom"] .map-element {
232
+ align-items: flex-end;
233
+ }
234
+ &[data-text-container-alignment="center"] {
235
+ .map-element {
236
+ align-items: center;
237
+
238
+ > .gallery-header {
239
+ text-align: center;
240
+ }
185
241
  }
186
242
  }
187
243
 
@@ -259,13 +315,15 @@ $data: (
259
315
  --_ctm-mob-dn-mp-wt-lt-mp-ad-tt-cr-sg,
260
316
  var(--_ctm-tab-dn-mp-wt-lt-mp-ad-tt-cr-sg, var(--_ctm-dn-mp-wt-lt-mp-ad-tt-cr-sg))
261
317
  );
262
- align-content: var(
263
- --_ctm-mob-dn-mp-wt-lt-mp-ad-tt-cr-sg,
264
- var(--_ctm-tab-dn-mp-wt-lt-mp-ad-tt-cr-sg, center)
265
- );
318
+ // Alignment comes from the [data-text-container-alignment] rules above. It used to
319
+ // read the *spacing* variable here, which is a length and never valid for
320
+ // align-content, so the control did nothing.
266
321
 
267
322
  width: 100%;
268
323
  height: var(--_ctm-mob-lt-ht, var(--_ctm-tab-lt-ht, var(--_ctm-lt-ht)));
324
+ // Height is a fixed value from layout, so keep the border inside it rather than
325
+ // letting it push the widget past the size the user set.
326
+ box-sizing: border-box;
269
327
 
270
328
  border-color: var(
271
329
  --_ctm-mob-dn-mp-wt-br-cr,
@@ -296,10 +354,9 @@ $data: (
296
354
  );
297
355
 
298
356
  .gallery-header {
299
- text-align: var(
300
- --_ctm-mob-dn-gy-lt-an,
301
- var(--_ctm-tab-dn-gy-lt-an, var(--_ctm-dn-gy-lt-an))
302
- );
357
+ // Text alignment is driven by [data-text-container-alignment] above. The
358
+ // gallery variable that used to sit here is never emitted for a map element.
359
+ box-sizing: border-box;
303
360
 
304
361
  // line-height: var(--_ctm-dn-gy-lt-tt-ad-dn-sg, var(--_tst-dn-gy-lt-tt-ad-dn-sg));
305
362
  display: flex;
@@ -317,9 +374,12 @@ $data: (
317
374
  --_ctm-mob-dn-mp-wt-tt-cr-lt-tt-hl-pg,
318
375
  var(--_ctm-tab-dn-mp-wt-tt-cr-lt-tt-hl-pg, var(--_ctm-dn-mp-wt-tt-cr-lt-tt-hl-pg))
319
376
  );
377
+ // design > Map Widget Text Container Design. This used to read a
378
+ // `...-tt-cr-lt-tt-cr-bd-cr` variable — the Text Container *Layout* prefix with a
379
+ // property that section has never had — so the Fill control did nothing.
320
380
  background-color: var(
321
- --_ctm-mob-dn-mp-wt-tt-cr-lt-tt-cr-bd-cr,
322
- var(--_ctm-tab-dn-mp-wt-tt-cr-lt-tt-cr-bd-cr, var(--_ctm-dn-mp-wt-tt-cr-lt-tt-cr-bd-cr))
381
+ --_ctm-mob-dn-mp-wt-tt-cr-dn-bd-cr,
382
+ var(--_ctm-tab-dn-mp-wt-tt-cr-dn-bd-cr, var(--_ctm-dn-mp-wt-tt-cr-dn-bd-cr))
323
383
  );
324
384
 
325
385
  width: 100%;
@@ -488,17 +548,69 @@ $data: (
488
548
  transform: scale(1);
489
549
  }
490
550
  }
551
+ // Sonar ripple: each ring fades in at the pin size, expands and fades out.
552
+ @keyframes sonar {
553
+ 0% {
554
+ transform: scale(1);
555
+ opacity: 0.6;
556
+ }
557
+ 100% {
558
+ // Expands to ~1.8x the pin — clearly visible motion but still tight to the
559
+ // pin (not spreading far, per the earlier "going very long" feedback).
560
+ transform: scale(1.8);
561
+ opacity: 0;
562
+ }
563
+ }
491
564
  .hotspot__container {
492
565
  position: absolute;
493
- top: 43%;
494
- left: 12%;
566
+ // The marker element is already anchored at the location's lat/lng, so the pin
567
+ // and the tooltip both sit at its origin and are placed from there. The 43%/12%
568
+ // that used to be here came from the image hotspot's static-image layout and
569
+ // means nothing for a marker.
570
+ top: 0;
571
+ left: 0;
495
572
  .hotspot__main {
496
573
  position: relative;
574
+
575
+ // Divi Pixel-style sonar: a single bordered ring centred on the pin that
576
+ // expands and fades out on a loop. Only the ring animates — the pin/icon is
577
+ // static and kept on top via z-index. Rendered in JS only when the animation
578
+ // toggle is on. Duration comes from the frequency control (2s if none set), so
579
+ // the user's ms value drives the speed.
580
+ .svg-sonar-container {
581
+ position: absolute;
582
+ top: 50%;
583
+ left: 50%;
584
+ width: prepareMediaVariable(--_ctm-dn-pn-se-ht-se);
585
+ height: prepareMediaVariable(--_ctm-dn-pn-se-ht-se);
586
+ translate: -50% -50%;
587
+ pointer-events: none;
588
+ z-index: 1;
589
+
590
+ .sonar-circle {
591
+ position: absolute;
592
+ inset: 0;
593
+ border-radius: 50%;
594
+ // Ring colour follows the pin's background colour; visible fallback so the
595
+ // ripple never renders invisibly if the background var isn't emitted.
596
+ border: 1px solid prepareMediaVariable(--_ctm-dn-pn-se-bd-cr, #243dc6);
597
+ opacity: 0;
598
+ animation: sonar prepareMediaVariable(--_ctm-dn-pn-se-an-fy, 2s) linear infinite;
599
+ }
600
+
601
+ // Square pins get matching square rings; circle (default) stays 50%.
602
+ &[data-hotspot-shape="square"] .sonar-circle {
603
+ border-radius: 0;
604
+ }
605
+ }
606
+
497
607
  .hotspot {
498
608
  // background: var(--_ctm-dn-ht-se-bd-cr);
499
609
  // height: var(--_ctm-dn-tp-tt-dn-ft-se);
500
610
  // width: var(--_ctm-dn-tp-tt-dn-ft-se);
501
611
  position: absolute;
612
+ // Above the sonar rings (container is z-index 1), so the pin/icon stays on top.
613
+ z-index: 2;
502
614
  cursor: pointer;
503
615
  // width: var(--_ctm-dn-ht-se-ht-se);
504
616
  // height: var(--_ctm-dn-ht-se-ht-se);
@@ -512,24 +624,45 @@ $data: (
512
624
  var(--_ctm-tab-dn-pn-se-ht-se, var(--_ctm-dn-pn-se-ht-se))
513
625
  );
514
626
 
515
- animation: scaleInOut var(--_ctm-dn-pn-se-an-fy) infinite;
627
+ height: prepareMediaVariable(--_ctm-dn-pn-se-ht-se);
628
+ width: prepareMediaVariable(--_ctm-dn-pn-se-ht-se);
629
+
630
+ position: absolute;
631
+ cursor: pointer;
516
632
 
517
- width: var(--_ctm-dn-pn-se-ht-se);
518
- height: var(--_ctm-dn-pn-se-ht-se);
519
- background-color: var(--_ctm-dn-ht-se-bd-cr);
520
633
  display: flex;
521
634
  align-items: center;
522
635
  top: 50%;
523
636
  left: 50%;
524
- transform: translate(-50%, -50%);
637
+
638
+ translate: -50% -50%;
525
639
  box-sizing: border-box;
526
640
  justify-content: center;
527
- animation: scaleInOut var(--_ctm-dn-pn-se-an-fy) infinite;
641
+ box-shadow: var(
642
+ --_ctm-mob-dn-pn-se-sw-ae,
643
+ var(--_ctm-tab-dn-pn-se-sw-ae, var(--_ctm-dn-pn-se-sw-ae))
644
+ )
645
+ var(
646
+ --_ctm-mob-dn-pn-se-sw-br,
647
+ var(--_ctm-tab-dn-pn-se-sw-br, var(--_ctm-dn-pn-se-sw-br))
648
+ )
649
+ var(
650
+ --_ctm-mob-dn-pn-se-sw-sd,
651
+ var(--_ctm-tab-dn-pn-se-sw-sd, var(--_ctm-dn-pn-se-sw-sd))
652
+ )
653
+ var(
654
+ --_ctm-mob-dn-pn-se-sw-cr,
655
+ var(--_ctm-tab-dn-pn-se-sw-cr, var(--_ctm-dn-pn-se-sw-cr))
656
+ );
657
+
658
+ // Pin corners follow the Shape control only — Circle or Square. There is no
659
+ // separate radius control for pins, and this used to be applied as an inline
660
+ // style from MarkersComponent, which outranked every rule in this file.
528
661
  &[data-hotspot-shape="circle"] {
529
662
  border-radius: 50%;
530
663
  }
531
- &[data-hotspot-shape="any"] {
532
- border-radius: var(--_ctm-dn-ht-se-br-rs);
664
+ &[data-hotspot-shape="square"] {
665
+ border-radius: 0;
533
666
  }
534
667
 
535
668
  svg {
@@ -543,6 +676,11 @@ $data: (
543
676
  stroke: prepareMediaVariable(--_ctm-dn-pn-se-in-c1);
544
677
  }
545
678
  }
679
+
680
+ // One gate for "this pin has a styled box": always true for a shape pin,
681
+ // and for an icon pin only while its Background toggle is on. It used to
682
+ // also match [data-show-animation="true"], which meant turning the
683
+ // background off did nothing as soon as the animation was enabled.
546
684
  &[data-show-shape-styles="true"] {
547
685
  background-color: var(
548
686
  --_ctm-mob-dn-pn-se-bd-cr,
@@ -561,29 +699,10 @@ $data: (
561
699
  --_ctm-mob-dn-pn-se-br-wh,
562
700
  var(--_ctm-tab-dn-pn-se-br-wh, var(--_ctm-dn-pn-se-br-wh))
563
701
  );
564
- border-radius: var(
565
- --_ctm-mob-dn-pn-se-br-rs,
566
- var(--_ctm-tab-dn-pn-se-br-rs, var(--_ctm-dn-pn-se-br-rs))
567
- );
568
- box-shadow: var(
569
- --_show-shadow,
570
- var(
571
- --_ctm-mob-dn-pn-se-sw-ae,
572
- var(--_ctm-tab-dn-pn-se-sw-ae, var(--_ctm-dn-pn-se-sw-ae))
573
- )
574
- var(
575
- --_ctm-mob-dn-pn-se-sw-br,
576
- var(--_ctm-tab-dn-pn-se-sw-br, var(--_ctm-dn-pn-se-sw-br))
577
- )
578
- var(
579
- --_ctm-mob-dn-pn-se-sw-sd,
580
- var(--_ctm-tab-dn-pn-se-sw-sd, var(--_ctm-dn-pn-se-sw-sd))
581
- )
582
- var(
583
- --_ctm-mob-dn-pn-se-sw-cr,
584
- var(--_ctm-tab-dn-pn-se-sw-cr, var(--_ctm-dn-pn-se-sw-cr))
585
- )
586
- );
702
+ // No border-radius here — it would land after the shape rules above and
703
+ // undo Circle. The Shape control is the only thing that rounds a pin.
704
+ // box-shadow is applied unconditionally above so it works for all pins,
705
+ // independent of this shape/animation gate.
587
706
  }
588
707
  }
589
708
  }
@@ -591,22 +710,35 @@ $data: (
591
710
  .hotspot__tooltip {
592
711
  --_sf-br-vl: var(--_ctm-dn-tp-dn-br-rs, 0px);
593
712
  position: absolute;
594
- background: var(--_ctm-dn-tp-dn-bd-cr);
713
+ background: prepareMediaVariable(--_ctm-dn-tp-dn-bd-cr);
595
714
  z-index: 1000;
715
+ // Sizing follows the image hotspot: the user's width/height with a floor under
716
+ // them. The caps are viewport-relative on purpose — this element's containing
717
+ // block is the Google marker, which is effectively zero-sized, so a percentage
718
+ // max-width would resolve to 0 and clamp the tooltip down to its min instead of
719
+ // holding the size the user set. The viewport cap still stops a desktop-sized
720
+ // tooltip spilling off a phone screen.
721
+ width: prepareMediaVariable(--_ctm-dn-tp-dn-tp-wh);
722
+ height: prepareMediaVariable(--_ctm-dn-tp-dn-tp-ht);
596
723
  min-width: 100px;
597
- width: var(--_ctm-dn-tp-dn-tp-wh);
598
724
  min-height: 100px;
599
- height: var(--_ctm-dn-tp-dn-tp-ht);
600
- top: 43%;
601
- left: 12%;
602
- overflow-y: auto;
603
- // top: var(--_sf-im-psn-tp, 0);
604
- // left: var(--_sf-im-psn-lt, 0);
725
+ max-width: calc(100vw - 32px);
726
+ max-height: calc(100vh - 32px);
727
+ box-sizing: border-box;
728
+ // Placement comes from the [data-hotspot-position] transforms above, measured
729
+ // from the marker origin.
730
+ top: 0;
731
+ left: 0;
732
+ // No overflow here on purpose. The tip is an ::after sitting 10px outside the
733
+ // box, so any overflow value other than visible clips it away — that's what was
734
+ // eating the caret. The image hotspot scrolls its inner wrapper instead, and
735
+ // .text_box below does the same.
736
+ overflow: visible;
605
737
 
606
738
  padding: 4px 8px;
607
739
  display: flex;
608
- justify-content: var(--_ctm-dn-tp-dn-hl-at);
609
- align-items: var(--_ctm-dn-tp-dn-vl-at);
740
+ justify-content: prepareMediaVariable(--_ctm-dn-tp-dn-hl-at);
741
+ align-items: prepareMediaVariable(--_ctm-dn-tp-dn-vl-at);
610
742
 
611
743
  &::after {
612
744
  content: "";
@@ -615,30 +747,77 @@ $data: (
615
747
  border-width: 5px;
616
748
  border-style: solid;
617
749
  }
750
+ // The scroll container, mirroring .tooltip__image_with_text on the image
751
+ // hotspot: long content scrolls in here rather than on the tooltip itself.
618
752
  .text_box {
619
753
  overflow-y: auto;
754
+ max-width: 100%;
755
+ width: 100%;
756
+ height: 100%;
757
+
620
758
  h6 {
621
- font-size: var(--_ctm-dn-tp-tt-dn-ft-se);
622
- font-family: var(--_ctm-dn-tp-tt-dn-ft-fy);
623
- color: var(--_ctm-dn-tp-tt-dn-cr);
624
-
625
- font-weight: var(--_ctm-dn-tp-tt-dn-ft-wt);
626
- font-style: var(--_ctm-dn-tp-tt-dn-ft-se-ic);
627
- text-align: var(--_ctm-dn-tp-tt-dn-tt-an);
628
- letter-spacing: var(--_ctm-dn-tp-tt-dn-lr-sg);
629
- line-height: var(--_ctm-dn-tp-tt-dn-le-ht);
630
- text-decoration: var(--_ctm-dn-tp-tt-dn-ue);
759
+ font-size: prepareMediaVariable(--_ctm-dn-tp-tt-dn-ft-se);
760
+ font-family: prepareMediaVariable(--_ctm-dn-tp-tt-dn-ft-fy);
761
+ color: prepareMediaVariable(--_ctm-dn-tp-tt-dn-cr);
762
+
763
+ font-weight: prepareMediaVariable(--_ctm-dn-tp-tt-dn-ft-wt);
764
+ font-style: prepareMediaVariable(--_ctm-dn-tp-tt-dn-ft-se-ic);
765
+ text-align: prepareMediaVariable(--_ctm-dn-tp-tt-dn-tt-an);
766
+ letter-spacing: prepareMediaVariable(--_ctm-dn-tp-tt-dn-lr-sg);
767
+ line-height: prepareMediaVariable(--_ctm-dn-tp-tt-dn-le-ht);
768
+ // Underline and line-through are two independent toggles writing two
769
+ // variables, so they have to be composed, not chained. `var(--lh, <ue>)`
770
+ // never reaches its fallback: the schema declares linethrough with an
771
+ // empty value, and stylesToString emits it as `--…-lh: ;`, which is a
772
+ // *defined* empty value rather than a missing one — so var() substitutes
773
+ // nothing and the whole declaration is thrown away. Listing both keywords
774
+ // on text-decoration-line lets either, both or neither apply; when both
775
+ // resolve empty the declaration is invalid and the initial `none` stands,
776
+ // which is exactly the both-off case.
777
+ text-decoration-line: var(
778
+ --_ctm-mob-dn-tp-tt-dn-ue,
779
+ var(--_ctm-tab-dn-tp-tt-dn-ue, var(--_ctm-dn-tp-tt-dn-ue,))
780
+ )
781
+ var(
782
+ --_ctm-mob-dn-tp-tt-dn-lh,
783
+ var(--_ctm-tab-dn-tp-tt-dn-lh, var(--_ctm-dn-tp-tt-dn-lh,))
784
+ );
785
+ // Same text properties the text element exposes (see text-temp-v2.scss).
786
+ text-transform: prepareMediaVariable(--_ctm-dn-tp-tt-dn-tt-tm, none);
787
+ word-wrap: prepareMediaVariable(--_ctm-dn-tp-tt-dn-wd-wp, normal);
788
+ word-break: prepareMediaVariable(--_ctm-dn-tp-tt-dn-wd-bk, normal);
789
+
790
+ // Text Overflow toggle in the typography panel; the line count rides in on
791
+ // --_sf-line-clamp from the element.
792
+ &#{$overflowSelector} {
793
+ @include restrictToLinesShow(#{var(--_sf-line-clamp, 1)});
794
+ }
631
795
  }
632
796
  p {
633
- font-size: var(--_ctm-dn-tp-tt-dn-ft-se-dc);
634
- color: var(--_ctm-dn-tp-tt-dn-cr-dc);
635
- font-family: var(--_ctm-dn-tp-tt-dn-ft-fy-dc);
636
- font-weight: var(--_ctm-dn-tp-tt-dn-ft-wt-dc);
637
- font-style: var(--_ctm-dn-tp-tt-dn-ft-se-ic-dc);
638
- text-align: var(--_ctm-dn-tp-tt-dn-tt-an-dc);
639
- letter-spacing: var(--_ctm-dn-tp-tt-dn-lr-sg-dc);
640
- line-height: var(--_ctm-dn-tp-tt-dn-le-ht-dc);
641
- text-decoration: var(--_ctm-dn-tp-tt-dn-lh-dc, var(--_ctm-dn-tp-tt-dn-ue-dc));
797
+ font-size: prepareMediaVariable(--_ctm-dn-tp-tt-dn-ft-se-dc);
798
+ color: prepareMediaVariable(--_ctm-dn-tp-tt-dn-cr-dc);
799
+ font-family: prepareMediaVariable(--_ctm-dn-tp-tt-dn-ft-fy-dc);
800
+ font-weight: prepareMediaVariable(--_ctm-dn-tp-tt-dn-ft-wt-dc);
801
+ font-style: prepareMediaVariable(--_ctm-dn-tp-tt-dn-ft-se-ic-dc);
802
+ text-align: prepareMediaVariable(--_ctm-dn-tp-tt-dn-tt-an-dc);
803
+ letter-spacing: prepareMediaVariable(--_ctm-dn-tp-tt-dn-lr-sg-dc);
804
+ line-height: prepareMediaVariable(--_ctm-dn-tp-tt-dn-le-ht-dc);
805
+ // Same composition as the title above.
806
+ text-decoration-line: var(
807
+ --_ctm-mob-dn-tp-tt-dn-ue-dc,
808
+ var(--_ctm-tab-dn-tp-tt-dn-ue-dc, var(--_ctm-dn-tp-tt-dn-ue-dc,))
809
+ )
810
+ var(
811
+ --_ctm-mob-dn-tp-tt-dn-lh-dc,
812
+ var(--_ctm-tab-dn-tp-tt-dn-lh-dc, var(--_ctm-dn-tp-tt-dn-lh-dc,))
813
+ );
814
+ text-transform: prepareMediaVariable(--_ctm-dn-tp-tt-dn-tt-tm-dc, none);
815
+ word-wrap: prepareMediaVariable(--_ctm-dn-tp-tt-dn-wd-wp-dc, normal);
816
+ word-break: prepareMediaVariable(--_ctm-dn-tp-tt-dn-wd-bk-dc, normal);
817
+
818
+ &#{$overflowSelector} {
819
+ @include restrictToLinesShow(#{var(--_sf-line-clamp-desc, 1)});
820
+ }
642
821
  }
643
822
  }
644
823
  .tooltip__image {
@@ -1022,11 +1201,39 @@ $data: (
1022
1201
  .map {
1023
1202
  width: 100%;
1024
1203
  height: 100%;
1204
+ min-width: 0;
1025
1205
  img {
1026
1206
  width: 100%;
1027
1207
  height: 100%;
1028
1208
  }
1029
1209
  }
1030
1210
  }
1211
+
1212
+ // "Show Border" / "Show Shadow" switches. Each design section paints its box from
1213
+ // CSS variables, so the switches reach the stylesheet as data attributes and the
1214
+ // matching border-width / box-shadow is zeroed here. Kept at the end of the block
1215
+ // and matched to the same selector depth as the rules they override — anywhere
1216
+ // earlier and the section rules above would win the tie on source order.
1217
+ &[data-map-widget-border="false"] .map-element {
1218
+ border-width: 0;
1219
+ border-style: none;
1220
+ }
1221
+ &[data-map-widget-shadow="false"] .map-element {
1222
+ box-shadow: none;
1223
+ }
1224
+ &[data-text-container-border="false"] .map-element > .gallery-header {
1225
+ border-width: 0;
1226
+ border-style: none;
1227
+ }
1228
+ &[data-text-container-shadow="false"] .map-element > .gallery-header {
1229
+ box-shadow: none;
1230
+ }
1231
+ &[data-pin-border="false"] .map-element .hotspot__container .hotspot__main .hotspot {
1232
+ border-width: 0;
1233
+ border-style: none;
1234
+ }
1235
+ &[data-pin-shadow="false"] .map-element .hotspot__container .hotspot__main .hotspot {
1236
+ box-shadow: none;
1237
+ }
1031
1238
  }
1032
1239
  }