@sc-360-v2/storefront-cms-library 0.2.100 → 0.3.1

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.
@@ -20,30 +20,40 @@
20
20
  // ),
21
21
  // );
22
22
 
23
- $breakPoints: (
23
+ $breakPointsV2: (
24
24
  desktop: (
25
- min: 1024px,
25
+ min: 768px,
26
26
  max: 99999px,
27
27
  ),
28
28
  mobile: (
29
29
  min: 10px,
30
30
  max: 767px,
31
31
  ),
32
- tablet: (
32
+ laptop: (
33
33
  min: 768px,
34
34
  max: 1023px,
35
35
  ),
36
36
  );
37
37
 
38
+ @function safe-map-get($map, $key) {
39
+ @if $map != null and type-of($map) == "map" and map-has-key($map, $key) {
40
+ @return map.get($map, $key);
41
+ }
42
+ @return null;
43
+ }
44
+
38
45
  @mixin prepareMediaQueries($list) {
39
- @each $mediaKey, $mediaValue in $breakPoints {
40
- $maxWidth: map.get($mediaValue, max);
41
- $minWidth: map.get($mediaValue, min);
42
- @media only screen and (max-width: #{$maxWidth}) and (min-width: #{$minWidth}) {
43
- @each $key, $value in $list {
44
- $value1: map.get($value, $mediaKey);
45
- @if ($value1 != null) {
46
- #{$key}: $value1;
46
+ @each $mediaKey, $mediaValue in $breakPointsV2 {
47
+ $maxWidth: safe-map-get($mediaValue, max);
48
+ $minWidth: safe-map-get($mediaValue, min);
49
+
50
+ @if $maxWidth != null and $minWidth != null {
51
+ @media only screen and (max-width: #{$maxWidth}) and (min-width: #{$minWidth}) {
52
+ @each $key, $value in $list {
53
+ $value1: safe-map-get($value, $mediaKey);
54
+ @if $value1 != null {
55
+ #{$key}: $value1;
56
+ }
47
57
  }
48
58
  }
49
59
  }
@@ -75,16 +85,23 @@ $breakPoints: (
75
85
  }
76
86
  }
77
87
 
78
- @function getListOfResponsive($desktop, $mobile, $latop: "optional") {
88
+ @function getListOfResponsive($desktop, $mobile, $laptop: "optional") {
79
89
  $list: (
80
90
  desktop: $desktop,
81
91
  mobile: $mobile,
82
92
  );
83
- @if ($latop != "optional") {
93
+ @if ($laptop != "optional") {
94
+ $list: map-merge(
95
+ $list,
96
+ (
97
+ laptop: $laptop,
98
+ )
99
+ );
100
+ } @else {
84
101
  $list: map-merge(
85
102
  $list,
86
103
  (
87
- laptop: $latop,
104
+ laptop: $desktop,
88
105
  )
89
106
  );
90
107
  }
@@ -129,9 +146,19 @@ $breakPoints: (
129
146
  #{$key2}: #{$value2};
130
147
  }
131
148
  } @else {
132
- @media only screen and (max-width: #{map.get(map.get($breakPoints, $key1), max)}) and (min-width: #{map.get(map.get($breakPoints, $key1), min)}) {
133
- @each $key2, $value2 in $value1 {
134
- #{$key2}: #{$value2};
149
+ $mediaValue: safe-map-get($breakPointsV2, $key1);
150
+ $maxWidth: safe-map-get($mediaValue, max);
151
+ $minWidth: safe-map-get($mediaValue, min);
152
+ // @media only screen and (max-width: #{map.get(map.get($breakPointsV2, $key1), max)}) and (min-width: #{map.get(map.get($breakPointsV2, $key1), min)}) {
153
+ // @each $key2, $value2 in $value1 {
154
+ // #{$key2}: #{$value2};
155
+ // }
156
+ // }
157
+ @if $maxWidth != null and $minWidth != null {
158
+ @media only screen and (max-width: #{$maxWidth}) and (min-width: #{$minWidth}) {
159
+ @each $key2, $value2 in $value1 {
160
+ #{$key2}: #{$value2};
161
+ }
135
162
  }
136
163
  }
137
164
  }
@@ -147,7 +174,15 @@ $breakPoints: (
147
174
  #{$key2}: #{$value2};
148
175
  }
149
176
  } @else {
150
- @media only screen and (max-width: #{map.get(map.get($breakPoints, $key1), max)}) and (min-width: #{map.get(map.get($breakPoints, $key1), min)}) {
177
+ // @media only screen and (max-width: #{map.get(map.get($breakPoints, $key1), max)}) and (min-width: #{map.get(map.get($breakPoints, $key1), min)}) {
178
+ // @each $key2, $value2 in $value1 {
179
+ // #{$key2}: #{$value2};
180
+ // }
181
+ // }
182
+ $mediaValue: safe-map-get($breakPointsV2, $key1);
183
+ $maxWidth: safe-map-get($mediaValue, max);
184
+ $minWidth: safe-map-get($mediaValue, min);
185
+ @media only screen and (max-width: #{$maxWidth}) and (min-width: #{$minWidth}) {
151
186
  @each $key2, $value2 in $value1 {
152
187
  #{$key2}: #{$value2};
153
188
  }
package/dist/modal.scss CHANGED
@@ -192,15 +192,13 @@ $shadow-md: 0 8px 20px rgba(0, 0, 0, 0.1);
192
192
  .modalV2-main {
193
193
  .modalV2-wrapper {
194
194
  position: fixed;
195
- bottom: 5%;
196
195
  left: 50%;
197
- transform: translate(-50%, 0%);
198
196
  transition:
199
197
  all 0.4s ease-in-out,
200
198
  transform 0.4s ease-in-out;
201
199
  background: $white;
202
200
  border-radius: $radius-lg;
203
- padding: 20px;
201
+ padding: 0px 20px;
204
202
  width: 850px;
205
203
  font-family: $font-base;
206
204
  box-shadow: $shadow-md;
@@ -220,7 +218,6 @@ $shadow-md: 0 8px 20px rgba(0, 0, 0, 0.1);
220
218
  height: 95vh;
221
219
  border-radius: $radius-lg;
222
220
  transform: translate(-50%, -50%);
223
- padding: 24px 32px;
224
221
  box-shadow: none;
225
222
  z-index: $z-index-modal;
226
223
  display: flex;
@@ -236,10 +233,20 @@ $shadow-md: 0 8px 20px rgba(0, 0, 0, 0.1);
236
233
  .footer-bar {
237
234
  border-top: 1px solid $gray-300;
238
235
  padding-top: 16px;
239
- margin-top: 24px;
236
+ margin: 15px 0;
240
237
  }
241
238
  }
242
239
 
240
+ &.center {
241
+ top: 50%;
242
+ transform: translate(-50%, -50%);
243
+ }
244
+
245
+ &.bottom {
246
+ bottom: 5%;
247
+ transform: translate(-50%, 0%);
248
+ }
249
+
243
250
  .top-bar {
244
251
  position: sticky;
245
252
  top: 0;
@@ -250,7 +257,7 @@ $shadow-md: 0 8px 20px rgba(0, 0, 0, 0.1);
250
257
  display: flex;
251
258
  justify-content: space-between;
252
259
  align-items: center;
253
- margin-bottom: 16px;
260
+ padding: 15px 0px;
254
261
 
255
262
  .left-col {
256
263
  display: flex;
@@ -339,10 +346,11 @@ $shadow-md: 0 8px 20px rgba(0, 0, 0, 0.1);
339
346
  bottom: 0;
340
347
  display: flex;
341
348
  justify-content: space-between;
342
- padding-top: 16px;
349
+ padding: 15px 0;
343
350
  border-top: 1px solid $gray-300;
344
351
  margin-top: 24px;
345
352
  font-size: $font-size-base;
353
+ background: $footer_btn_background_color;
346
354
 
347
355
  .summary span {
348
356
  margin-right: 18px;
@@ -1,316 +1,57 @@
1
1
  // Colors
2
- $white: var(--_white);
3
- $black: var(--base-black);
4
- $gray-100: #f9fafb;
5
- $gray-300: #e5e7eb;
6
2
  $gray-400: #ccc;
7
- $gray-600: #737373;
8
- $gray-700: #6b7280;
9
3
  $gray-800: #444;
10
- $gray-900: #111827;
11
4
 
12
5
  $primary: var(--_primary-400);
13
6
  $primary-hover: var(--_primary-500);
14
- $text-dark: #222;
15
- $text-medium: #374151;
16
- $text-light: #666;
7
+ $white: var(--_white);
17
8
 
18
9
  // Typography
19
- $font-base: "Segoe UI", sans-serif;
20
10
  $font-size-base: 14px;
21
- $font-size-sm: 12px;
22
- $font-size-md: 15px;
23
- $font-size-lg: 18px;
24
11
 
25
12
  // Spacing & Sizes
26
13
  $radius: 6px;
27
- $radius-lg: 8px;
28
- $input-height: 32px;
29
14
  $input-padding: 10px 12px;
30
15
 
31
- // Z-Index
32
- $z-index-modal: calc(var(--_higher-zIndex) + var(--_cs-et-zIndex) + 10);
33
- $z-index-backdrop: calc(var(--_higher-zIndex) + var(--_cs-et-zIndex) + 11);
34
- $z-index-wrapper: calc(var(--_higher-zIndex) + var(--_cs-et-zIndex) + 9);
35
- $z-index-minimized: calc(var(--_higher-zIndex) + var(--_cs-et-zIndex) + 12);
36
- $z-index-min-cart: calc(
37
- var(--_higher-zIndex) + var(--_cs-et-zIndex) + 13
38
- ); // Higher z-index for min cart
39
-
40
- // Shadows
41
- $shadow-md: 0 8px 20px rgba(0, 0, 0, 0.1);
42
-
16
+ // .quick-order-main Styles
43
17
  .quick-order-main {
44
- .quick-order-wrapper {
45
- position: fixed;
46
- bottom: 5%;
47
- left: 50%;
48
- transform: translate(-50%, 0%);
49
- transition:
50
- all 0.4s ease-in-out,
51
- transform 0.4s ease-in-out;
52
- background: $white;
53
- border-radius: $radius-lg;
54
- padding: 20px;
55
- width: 850px;
56
- font-family: $font-base;
57
- box-shadow: $shadow-md;
58
- z-index: $z-index-wrapper;
59
- max-height: 70vh;
60
- overflow: scroll;
18
+ .input-group {
61
19
  display: flex;
62
- flex-direction: column;
63
-
64
- &.fullscreen {
65
- transition:
66
- all 0.5s ease-in-out,
67
- transform 0.5s ease-in-out;
68
- top: 50%;
69
- left: 50%;
70
- width: 95vw;
71
- height: 95vh;
72
- border-radius: $radius-lg;
73
- transform: translate(-50%, -50%);
74
- padding: 24px 32px;
75
- box-shadow: none;
76
- z-index: $z-index-modal;
77
- display: flex;
78
- flex-direction: column;
79
- max-height: 100vh;
80
-
81
- .product-list {
82
- flex: 1;
83
- overflow-y: auto;
84
- margin-top: 24px;
85
- }
86
-
87
- .footer-bar {
88
- border-top: 1px solid $gray-300;
89
- padding-top: 16px;
90
- margin-top: 24px;
91
- }
92
- }
93
-
94
- .top-bar {
95
- position: sticky;
96
- top: 0;
97
- background: $white;
98
- z-index: 1;
99
- padding-bottom: 12px;
100
- .title-bar {
101
- display: flex;
102
- justify-content: space-between;
103
- align-items: center;
104
- margin-bottom: 16px;
105
-
106
- .left-col {
107
- display: flex;
108
- gap: 10px;
109
- align-items: center;
110
- }
111
-
112
- .title {
113
- font-size: $font-size-lg;
114
- font-weight: 600;
115
- display: flex;
116
- align-items: center;
117
- gap: 8px;
118
-
119
- .count {
120
- font-weight: 700;
121
- color: $gray-600;
122
- background-color: #f2f4f7;
123
- border-radius: 50%;
124
- font-size: $font-size-sm;
125
- width: 25px;
126
- height: 25px;
127
- display: flex;
128
- align-items: center;
129
- justify-content: center;
130
- }
131
- }
132
-
133
- .actions span {
134
- margin-left: 14px;
135
- cursor: pointer;
136
- font-size: 16px;
137
- color: $text-light;
138
- transition: color 0.2s;
139
-
140
- &:hover {
141
- color: $black;
142
- }
143
- }
144
- }
145
-
146
- .input-group {
147
- display: flex;
148
- gap: 12px;
149
-
150
- .qty-input {
151
- padding: $input-padding;
152
- border: 1px solid $gray-400;
153
- border-radius: $radius;
154
- font-size: $font-size-base;
155
- transition: border 0.2s;
156
- width: 120px;
157
-
158
- &:focus {
159
- border-color: $primary;
160
- outline: none;
161
- }
162
- }
163
-
164
- .or-text {
165
- align-self: center;
166
- font-weight: 600;
167
- color: $gray-800;
168
- font-size: $font-size-base;
169
- }
170
-
171
- .add-btn {
172
- background-color: $primary;
173
- color: $white;
174
- padding: 10px 16px;
175
- border-radius: $radius;
176
- font-weight: 600;
177
- font-size: $font-size-base;
178
- cursor: pointer;
179
- transition: background-color 0.2s;
180
-
181
- &:hover {
182
- background-color: $primary-hover;
183
- }
184
- }
185
- }
186
- }
20
+ gap: 12px;
21
+ margin-bottom: 10px;
187
22
 
188
- .footer-bar {
189
- position: sticky;
190
- bottom: 0;
191
- display: flex;
192
- justify-content: space-between;
193
- padding-top: 16px;
194
- border-top: 1px solid $gray-300;
195
- margin-top: 24px;
23
+ .qty-input {
24
+ padding: $input-padding;
25
+ border: 1px solid $gray-400;
26
+ border-radius: $radius;
196
27
  font-size: $font-size-base;
28
+ transition: border 0.2s;
29
+ width: 120px;
197
30
 
198
- .summary span {
199
- margin-right: 18px;
200
- font-weight: 500;
201
- color: $text-medium;
202
- }
203
-
204
- .footer-actions {
205
- display: flex;
206
- gap: 10px;
207
-
208
- .cancel-btn {
209
- border-radius: $radius;
210
- padding: 10px 14px;
211
- font-weight: 500;
212
- font-size: $font-size-base;
213
- color: #333;
214
- cursor: pointer;
215
- transition: background 0.2s;
216
-
217
- &:hover {
218
- background: $gray-300;
219
- }
220
- }
221
-
222
- .cart-btn {
223
- background: $primary;
224
- color: $white;
225
- border-radius: $radius;
226
- padding: 10px 20px;
227
- font-weight: 600;
228
- font-size: $font-size-base;
229
- display: flex;
230
- align-items: center;
231
- gap: 8px;
232
- cursor: pointer;
233
- transition: background 0.2s;
234
-
235
- &:hover {
236
- background: $primary-hover;
237
- }
238
- }
31
+ &:focus {
32
+ border-color: $primary;
33
+ outline: none;
239
34
  }
240
35
  }
241
- }
242
-
243
- .quick-order-backdrop {
244
- position: fixed;
245
- inset: 0;
246
- background: rgba(0, 0, 0, 0.4);
247
- z-index: $z-index-backdrop;
248
- }
249
-
250
- .quick-order-min {
251
- position: fixed;
252
- transition:
253
- all 0.4s ease-in-out,
254
- transform 0.4s ease-in-out;
255
- right: 20px;
256
- bottom: 20px;
257
- padding: 0; /* Remove padding from the main min container */
258
- border-radius: $radius;
259
- box-shadow: $shadow-md;
260
- z-index: $z-index-minimized;
261
- display: none;
262
- flex-direction: row; /* Align items in a row */
263
- align-items: center;
264
- gap: 10px; /* Adjust gap between elements */
265
- font-size: $font-size-base;
266
- background-color: transparent; /* Make the main container transparent */
267
36
 
268
- .min-toolbar {
269
- background-color: $white;
270
- display: flex;
271
- align-items: center; /* Align items vertically in the toolbar */
272
- padding: 12px 16px; /* Add padding to the toolbar */
273
- border-radius: $radius 0 0 $radius; /* Rounded left corners */
274
- gap: 16px;
275
- }
276
-
277
- &.active {
278
- display: flex;
37
+ .or-text {
38
+ align-self: center;
39
+ font-weight: 600;
40
+ color: $gray-800;
41
+ font-size: $font-size-base;
279
42
  }
280
43
 
281
- .cart-btn {
282
- background: $primary;
44
+ .add-btn {
45
+ background-color: $primary;
283
46
  color: $white;
284
- border: none; /* Remove border */
285
- border-radius: 0 $radius $radius 0; /* Rounded right corners */
286
- padding: 12px 16px;
47
+ padding: 10px 16px;
48
+ border-radius: $radius;
287
49
  font-weight: 600;
288
- font-size: $font-size-sm;
289
- display: flex;
290
- align-items: center;
291
- gap: 4px;
50
+ font-size: $font-size-base;
292
51
  cursor: pointer;
293
- transition: background 0.2s;
294
- z-index: $z-index-min-cart;
295
-
52
+ transition: background-color 0.2s;
296
53
  &:hover {
297
- background: $primary-hover;
298
- }
299
- }
300
-
301
- .actions {
302
- display: flex;
303
- gap: 8px;
304
-
305
- span {
306
- cursor: pointer;
307
- font-size: 16px;
308
- color: $text-light;
309
- transition: color 0.2s;
310
-
311
- &:hover {
312
- color: $black;
313
- }
54
+ background-color: $primary-hover;
314
55
  }
315
56
  }
316
57
  }
package/dist/quotes.scss CHANGED
@@ -246,6 +246,14 @@ $resizeActive: '[data-cms-element-resizer="true"]';
246
246
  ctm-var(dn-qe-id-sw-cr);
247
247
  }
248
248
  }
249
+ .quotes_action {
250
+ display: flex;
251
+ align-items: center;
252
+ gap: 16px;
253
+ flex: 1 0 0;
254
+ align-self: stretch;
255
+ font-size: 14px;
256
+ }
249
257
  }
250
258
  }
251
259
  }
package/dist/rfqs.scss CHANGED
@@ -246,6 +246,14 @@ $resizeActive: '[data-cms-element-resizer="true"]';
246
246
  ctm-var(dn-rq-id-sw-cr);
247
247
  }
248
248
  }
249
+ .rfq_action {
250
+ display: flex;
251
+ align-items: center;
252
+ gap: 16px;
253
+ flex: 1 0 0;
254
+ align-self: stretch;
255
+ font-size: 14px;
256
+ }
249
257
  }
250
258
  }
251
259
  }