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

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.
@@ -6,34 +6,35 @@
6
6
  &[data-show-shadow="false"] {
7
7
  --_show-shadow: none;
8
8
  }
9
- &[data-icon-position="left"] {
10
- .add_order_button {
11
- flex-direction: row;
9
+ // Icon Position. These used to target `.add_order_button`, which no longer exists —
10
+ // the button is rendered by the shared ButtonComponent as `.btn__with__text`, so none
11
+ // of these rules matched and the control did nothing. `.btn__with__text` resolves its
12
+ // direction through `--_sf-jc`, which nothing was setting either, so it fell back to
13
+ // the initial `row` whatever the control said.
14
+ &[data-icon-position="left"],
15
+ &[data-icon-position="center"] {
16
+ .btn__with__text {
17
+ --_sf-jc: row;
12
18
  }
13
19
  }
14
20
  &[data-icon-position="right"] {
15
- .add_order_button {
16
- flex-direction: row-reverse;
17
- }
18
- }
19
- &[data-icon-position="center"] {
20
- .add_order_button {
21
- flex-direction: row;
21
+ .btn__with__text {
22
+ --_sf-jc: row-reverse;
22
23
  }
23
24
  }
24
25
  &[data-element-style="Icon"] {
25
26
  &[data-icon-position="left"] {
26
- .add_order_button {
27
+ .btn__with__text {
27
28
  justify-content: start;
28
29
  }
29
30
  }
30
31
  &[data-icon-position="right"] {
31
- .add_order_button {
32
+ .btn__with__text {
32
33
  justify-content: end;
33
34
  }
34
35
  }
35
36
  &[data-icon-position="center"] {
36
- .add_order_button {
37
+ .btn__with__text {
37
38
  justify-content: center;
38
39
  }
39
40
  }
@@ -144,10 +145,58 @@
144
145
  --_ctm-mob-dn-dt-se-in-c1,
145
146
  var(--_ctm-tab-dn-dt-se-in-c1, var(--_ctm-dn-dt-se-in-c1))
146
147
  );
148
+ // Overrides the stroke-width presentation attribute baked into the icon markup.
149
+ // `--_sf-hr-se-wh` is published by the :hover block so the hover state can carry
150
+ // its own width; it is unset otherwise and the default state's value applies.
151
+ stroke-width: var(--_sf-hr-se-wh, prepareMediaVariable(--_ctm-dn-dt-se-se-wh, 1));
147
152
  }
148
153
  }
149
154
 
150
155
  &:hover {
156
+ // The label lives in a child (`.txt`, from ButtonComponent) which sets its own
157
+ // typography as `var(--_sf-hr-*, <default state>)`. Declaring color/font directly
158
+ // on the button below therefore never reached it — the child always won with the
159
+ // default-state values, which is why the Hover state's text properties appeared
160
+ // dead. Publishing the hover values as those custom properties is what `.txt`
161
+ // is written to consume, and matches how product-actions.scss does it.
162
+ --_sf-hr-cr: var(
163
+ --_ctm-mob-dn-hr-se-cr,
164
+ var(--_ctm-tab-dn-hr-se-cr, var(--_ctm-dn-hr-se-cr))
165
+ );
166
+ --_sf-hr-ft-fy: var(
167
+ --_ctm-mob-dn-hr-se-ft-fy,
168
+ var(--_ctm-tab-dn-hr-se-ft-fy, var(--_ctm-dn-hr-se-ft-fy))
169
+ );
170
+ --_sf-hr-ft-se: var(
171
+ --_ctm-mob-dn-hr-se-ft-se,
172
+ var(--_ctm-tab-dn-hr-se-ft-se, var(--_ctm-dn-hr-se-ft-se))
173
+ );
174
+ --_sf-hr-ft-wt: var(
175
+ --_ctm-mob-dn-hr-se-ft-wt,
176
+ var(--_ctm-tab-dn-hr-se-ft-wt, var(--_ctm-dn-hr-se-ft-wt))
177
+ );
178
+ --_sf-hr-ft-se-ic: var(
179
+ --_ctm-mob-dn-hr-se-ft-se-ic,
180
+ var(--_ctm-tab-dn-hr-se-ft-se-ic, var(--_ctm-dn-hr-se-ft-se-ic))
181
+ );
182
+ --_sf-hr-tt-an: var(
183
+ --_ctm-mob-dn-hr-se-tt-an,
184
+ var(--_ctm-tab-dn-hr-se-tt-an, var(--_ctm-dn-hr-se-tt-an))
185
+ );
186
+ --_sf-hr-lr-sg: var(
187
+ --_ctm-mob-dn-hr-se-lr-sg,
188
+ var(--_ctm-tab-dn-hr-se-lr-sg, var(--_ctm-dn-hr-se-lr-sg))
189
+ );
190
+ --_sf-hr-le-ht: var(
191
+ --_ctm-mob-dn-hr-se-le-ht,
192
+ var(--_ctm-tab-dn-hr-se-le-ht, var(--_ctm-dn-hr-se-le-ht))
193
+ );
194
+ --_sf-hr-ue: var(
195
+ --_ctm-mob-dn-hr-se-ue,
196
+ var(--_ctm-tab-dn-hr-se-ue, var(--_ctm-dn-hr-se-ue))
197
+ );
198
+ --_sf-hr-se-wh: prepareMediaVariable(--_ctm-dn-hr-se-se-wh, 1);
199
+
151
200
  background-color: var(
152
201
  --_ctm-mob-dn-hr-se-bd-cr,
153
202
  var(--_ctm-tab-dn-hr-se-bd-cr, var(--_ctm-dn-hr-se-bd-cr))
@@ -843,6 +843,11 @@ $resizeActive: '[data-cms-element-resizer="true"]';
843
843
  }
844
844
  }
845
845
 
846
+ // The Collapsed layout's expand/collapse toggle had no rules at all, so the Expand
847
+ // Icon design section had nothing to paint and the toggle rendered as an unsized,
848
+ // uncoloured, non-clickable box. It takes the same `ed-in` (expand icon) variables
849
+ // the Show More button already uses.
850
+ .collapse_btn,
846
851
  .show_more_btn {
847
852
  white-space: nowrap;
848
853
  background-color: var(
@@ -850,6 +855,7 @@ $resizeActive: '[data-cms-element-resizer="true"]';
850
855
  var(--_ctm-tab-dn-ed-in-bd-cr, var(--_ctm-dn-ed-in-bd-cr))
851
856
  );
852
857
  .icon {
858
+ display: flex;
853
859
  svg {
854
860
  width: var(
855
861
  --_ctm-mob-dn-ed-in-in-se,
@@ -868,6 +874,13 @@ $resizeActive: '[data-cms-element-resizer="true"]';
868
874
  }
869
875
  }
870
876
  }
877
+
878
+ .collapse_btn {
879
+ display: flex;
880
+ align-items: center;
881
+ flex-shrink: 0;
882
+ cursor: pointer;
883
+ }
871
884
  }
872
885
 
873
886
  // "Show Border" switches. Each design section paints its border from CSS variables,