@sc-360-v2/storefront-cms-library 0.4.79 → 0.4.81

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,481 +1,328 @@
1
- @use "sass:map";
2
- @use "sass:list";
3
- @use "./fb-dropdown.scss";
4
- /**************************************************************
5
- * Preview Form Styles
6
- **************************************************************/
7
-
8
- .new-form-template {
9
- display: flex;
10
- flex-direction: column;
11
- align-items: center;
12
- justify-content: center;
13
- padding: 20px;
14
- height: 100%;
15
- width: 100%;
16
- border-radius: 5px;
17
- text-align: center;
18
- background-color: #ffffff;
19
-
20
- .icon-container {
21
- margin-bottom: 10px;
22
-
23
- svg {
24
- width: 50px;
25
- height: 50px;
26
- color: #666;
27
- }
28
- }
29
-
30
- .title {
31
- font-size: 1.2em;
32
- color: #8b4513;
33
- margin-bottom: 10px;
34
- }
35
-
36
- .description {
37
- font-size: 0.9em;
38
- color: #777;
39
- line-height: 1.4;
40
- }
41
- .spinner {
42
- animation: spin 1s linear infinite;
43
- }
44
-
45
- @keyframes spin {
46
- 0% {
47
- transform: rotate(0deg);
48
- }
49
- 100% {
50
- transform: rotate(360deg);
51
- }
52
- }
53
- }
54
-
55
- .fb_field {
56
- width: 100%;
57
- .cnf_checkbox {
58
- display: flex;
59
- gap: 8px;
60
- }
61
-
62
- .input__error {
63
- border: 1px solid var(--_error-300) !important;
64
-
65
- &:focus {
66
- outline: 2px solid var(--_error-100) !important;
67
- }
68
-
69
- box-shadow: 0px 0px 0px 4px var(--_error-100);
70
- }
71
-
72
- .error_styles {
73
- span {
74
- svg {
75
- width: 14px;
76
- height: 14px;
77
- path {
78
- stroke: var(--_error-500);
79
- }
80
- }
81
- }
82
- }
83
-
84
- .toggle_input {
85
- display: flex;
86
- svg {
87
- width: 18px;
88
- height: 18px;
89
- }
90
- }
91
- .editor {
92
- padding-inline: 0px !important;
93
- .fr-toolbar.fr-top {
94
- border-top-left-radius: 6px;
95
- border-top-right-radius: 6px;
96
- }
97
- .fr-second-toolbar {
98
- border-bottom-left-radius: 6px;
99
- border-bottom-right-radius: 6px;
100
- }
101
- }
102
-
103
- .date_picker_container {
104
- position: relative;
105
-
106
- .svg_icon {
107
- position: absolute;
108
- left: 8px;
109
- top: 9px;
110
- z-index: 1;
111
- display: flex;
112
- }
113
-
114
- .react-datepicker-wrapper {
115
- display: block;
116
-
117
- .react-datepicker__input-container {
118
- input {
119
- padding-left: 32px !important;
120
- }
121
- }
122
- }
123
- }
124
-
125
- .react-datepicker-wrapper {
126
- display: block;
127
- }
128
- input:not([type="checkbox"][type="radio"]),
129
- select {
130
- border: 1px solid var(--_primary-300);
131
- border-radius: 6px;
132
- padding-inline: 12px;
133
- width: 100%;
134
- height: 38px;
135
- &:focus {
136
- outline: 2px solid var(--_primary-100);
137
- }
138
- }
139
- input[type="tel"] {
140
- border-top-left-radius: 0px !important;
141
- border-bottom-left-radius: 0px !important;
142
- border-left: 0 !important;
143
- background-color: var(--_base-white);
144
- height: 38px;
145
- }
146
- textarea {
147
- width: 100%;
148
- resize: vertical;
149
- border-radius: 6px;
150
- background-color: var(--_base-white);
151
- border: 1px solid var(--_gray-300);
152
- padding: 12px;
153
- }
154
- .error_styles {
155
- min-height: 20px;
156
- }
157
- .label_with_radio {
158
- display: flex;
159
- align-items: center;
160
- gap: 4px;
161
- label {
162
- margin-right: 12px;
163
- display: flex;
164
- align-items: center;
165
- gap: 12px;
166
- text-wrap: nowrap;
167
- }
168
- }
169
-
170
- .custom-input {
171
- display: inline-flex;
172
- align-items: center;
173
- gap: 0.5rem;
174
- font-size: 16px;
175
- cursor: pointer;
176
- user-select: none;
177
- flex-wrap: wrap;
178
-
179
- input {
180
- display: none;
181
- }
182
-
183
- .custom-mark {
184
- width: 20px;
185
- height: 20px;
186
- background-color: var(--_base-white);
187
- border: 2px solid var(--_gray-400);
188
- margin: 0px 4px;
189
- position: relative;
190
- transition: all 0.2s ease;
191
-
192
- &::after {
193
- content: "";
194
- position: absolute;
195
- opacity: 0;
196
- transition: opacity 0.2s ease;
197
- }
198
- }
199
-
200
- &.checkbox {
201
- .custom-mark {
202
- border-radius: 4px;
203
-
204
- &::after {
205
- left: 6px;
206
- top: 2px;
207
- width: 5px;
208
- height: 10px;
209
- border: solid #fff;
210
- border-width: 0 2px 2px 0;
211
- transform: rotate(45deg);
212
- }
213
- }
214
-
215
- input:checked + .custom-mark {
216
- background-color: var(--_primary-400);
217
- border-color: var(--_primary-400);
218
-
219
- &::after {
220
- opacity: 1;
221
- }
222
- }
223
- }
224
-
225
- &.radio {
226
- .custom-mark {
227
- border-radius: 50%;
228
-
229
- &::after {
230
- top: 50%;
231
- left: 50%;
232
- width: 10px;
233
- height: 10px;
234
- background-color: var(--_base-white);
235
- border-radius: 50%;
236
- transform: translate(-50%, -50%);
237
- }
238
- }
239
-
240
- input:checked + .custom-mark {
241
- background-color: var(--_primary-400);
242
- border-color: var(--_primary-400);
243
-
244
- &::after {
245
- opacity: 1;
246
- }
247
- }
248
- }
249
- }
250
- .label_styles {
251
- display: block;
252
- margin-bottom: 4px;
253
- }
254
- &:has(input[type="checkbox"]) {
255
- display: flex;
256
- flex-direction: column;
257
- // align-items: center;
258
- // gap: 8px;
259
- }
260
- input[type="checkbox"] {
261
- width: 20px !important;
262
- height: 20px !important;
263
- }
264
-
265
- .sc-phone-container {
266
- position: relative;
267
- width: 100%;
268
-
269
- .sc-phone-input-wrapper {
270
- display: flex;
271
- align-items: center;
272
- border: 1px solid var(--_primary-300);
273
- border-radius: 6px;
274
- height: 38px;
275
- background-color: var(--_base-white);
276
- overflow: hidden;
277
-
278
- &:focus-within {
279
- outline: 2px solid var(--_primary-100);
280
- }
281
- }
282
-
283
- .sc-phone-country-btn {
284
- display: flex;
285
- align-items: center;
286
- gap: 4px;
287
- padding: 0 8px;
288
- border: none;
289
- background: transparent;
290
- cursor: pointer;
291
- height: 100%;
292
- border-right: 1px solid var(--_primary-300);
293
- flex-shrink: 0;
294
-
295
- &:disabled {
296
- cursor: not-allowed;
297
- opacity: 0.6;
298
- }
299
- }
300
-
301
- .sc-phone-flag {
302
- width: 24px;
303
- height: 24px;
304
- min-width: 24px;
305
- min-height: 24px;
306
- object-fit: cover;
307
- border-radius: 50%;
308
- flex-shrink: 0;
309
- }
310
-
311
- .sc-phone-chevron {
312
- font-size: 10px;
313
- color: var(--_gray-500, #667085);
314
- line-height: 1;
315
- }
316
-
317
- .sc-phone-dial-code {
318
- padding: 0 4px 0 8px;
319
- font-size: 14px;
320
- color: var(--_gray-700, #344054);
321
- white-space: nowrap;
322
- flex-shrink: 0;
323
- }
324
-
325
- input[type="tel"].sc-phone-input {
326
- flex: 1;
327
- border: none !important;
328
- outline: none !important;
329
- box-shadow: none !important;
330
- border-radius: 0 !important;
331
- height: 100%;
332
- font-size: 14px;
333
- padding: 0 12px 0 0 !important;
334
- background: transparent !important;
335
- min-width: 0;
336
-
337
- &:focus {
338
- outline: none !important;
339
- box-shadow: none !important;
340
- }
341
- }
342
-
343
- .sc-phone-dropdown {
344
- position: absolute;
345
- top: calc(100% + 4px);
346
- left: 0;
347
- width: 240px;
348
- background: var(--_base-white, #fff);
349
- border: 1px solid var(--_primary-300);
350
- border-radius: 8px;
351
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
352
- z-index: 9999;
353
- overflow: hidden;
354
- }
355
-
356
- .sc-phone-search-wrapper {
357
- position: relative;
358
- padding: 8px;
359
- border-bottom: 1px solid var(--_gray-200, #e4e7ec);
360
- }
361
-
362
- input[type="text"].sc-phone-search {
363
- width: 100%;
364
- padding: 6px 30px 6px 10px !important;
365
- border: 1px solid var(--_gray-300, #d0d5dd) !important;
366
- border-radius: 6px !important;
367
- font-size: 14px;
368
- outline: none !important;
369
- box-sizing: border-box;
370
- height: auto !important;
371
-
372
- &:focus {
373
- border-color: var(--_primary-300) !important;
374
- outline: none !important;
375
- }
376
- }
377
-
378
- .sc-phone-search-icon {
379
- position: absolute;
380
- right: 16px;
381
- top: 50%;
382
- transform: translateY(-50%);
383
- pointer-events: none;
384
- display: flex;
385
- }
386
-
387
- .sc-phone-dropdown-list {
388
- max-height: 200px;
389
- overflow-y: auto;
390
- }
391
-
392
- .sc-phone-dropdown-item {
393
- display: flex;
394
- align-items: center;
395
- gap: 8px;
396
- padding: 8px 12px;
397
- cursor: pointer;
398
- font-size: 14px;
399
- color: var(--_gray-700, #344054);
400
-
401
- &:hover {
402
- background-color: var(--_gray-50, #f9fafb);
403
- }
404
-
405
- &.selected {
406
- background-color: var(--_primary-50, #f0f4ff);
407
- }
408
- }
409
-
410
- .sc-phone-country-name {
411
- flex: 1;
412
- white-space: nowrap;
413
- overflow: hidden;
414
- text-overflow: ellipsis;
415
- }
416
-
417
- .sc-phone-check {
418
- color: var(--_primary-400);
419
- font-size: 16px;
420
- flex-shrink: 0;
421
- }
422
-
423
- .sc-phone-no-results {
424
- padding: 12px;
425
- text-align: center;
426
- color: var(--_gray-500, #667085);
427
- font-size: 14px;
428
- }
429
- }
430
- }
431
- .fb_file_upload {
432
- label {
433
- display: block;
434
- margin-bottom: 6px;
435
- }
436
- }
437
- .fb_btn {
438
- height: 38px;
439
- text-align: center;
440
- border-radius: 6px;
441
- background-color: var(--_primary-400);
442
- color: var(--_base-white);
443
- width: 100%;
444
- padding-inline: 16px;
445
- cursor: pointer;
446
- transition: opacity 0.2s ease;
447
-
448
- &:disabled,
449
- &[disabled] {
450
- background-color: var(--_primary-400);
451
- color: var(--_base-white);
452
- cursor: not-allowed;
453
- opacity: 0.6;
454
- }
455
- }
456
-
457
- .react-datepicker-popper {
458
- z-index: 9999 !important;
459
- }
460
-
461
- .react-grid-item:has(.react-datepicker-popper) {
462
- z-index: 2 !important;
463
- }
464
-
465
- .react-datepicker__month {
466
- background-color: var(--_base-white);
467
- margin: 0px;
468
- border: 1px solid var(--_gray-200);
469
- border-top: 0;
470
- margin: 0px !important;
471
- }
472
-
473
- .react-datepicker__header:not(.react-datepicker__header--has-time-select) {
474
- padding: 25px 10px 15px 20px;
475
- }
476
- .react-datepicker__day-names {
477
- padding-top: 5px;
478
- }
479
- .react-datepicker__header {
480
- padding: 25px 10px 15px 20px;
481
- }
1
+ @use "sass:map";
2
+ @use "sass:list";
3
+ @use "./fb-dropdown.scss";
4
+ @use "./phone-input.scss";
5
+ /**************************************************************
6
+ * Preview Form Styles
7
+ **************************************************************/
8
+
9
+ .new-form-template {
10
+ display: flex;
11
+ flex-direction: column;
12
+ align-items: center;
13
+ justify-content: center;
14
+ padding: 20px;
15
+ height: 100%;
16
+ width: 100%;
17
+ border-radius: 5px;
18
+ text-align: center;
19
+ background-color: #ffffff;
20
+
21
+ .icon-container {
22
+ margin-bottom: 10px;
23
+
24
+ svg {
25
+ width: 50px;
26
+ height: 50px;
27
+ color: #666;
28
+ }
29
+ }
30
+
31
+ .title {
32
+ font-size: 1.2em;
33
+ color: #8b4513;
34
+ margin-bottom: 10px;
35
+ }
36
+
37
+ .description {
38
+ font-size: 0.9em;
39
+ color: #777;
40
+ line-height: 1.4;
41
+ }
42
+ .spinner {
43
+ animation: spin 1s linear infinite;
44
+ }
45
+
46
+ @keyframes spin {
47
+ 0% {
48
+ transform: rotate(0deg);
49
+ }
50
+ 100% {
51
+ transform: rotate(360deg);
52
+ }
53
+ }
54
+ }
55
+
56
+ .fb_field {
57
+ width: 100%;
58
+ .cnf_checkbox {
59
+ display: flex;
60
+ gap: 8px;
61
+ }
62
+
63
+ .input__error {
64
+ border: 1px solid var(--_error-300) !important;
65
+
66
+ &:focus {
67
+ outline: 2px solid var(--_error-100) !important;
68
+ }
69
+
70
+ box-shadow: 0px 0px 0px 4px var(--_error-100);
71
+ }
72
+
73
+ .error_styles {
74
+ span {
75
+ svg {
76
+ width: 14px;
77
+ height: 14px;
78
+ path {
79
+ stroke: var(--_error-500);
80
+ }
81
+ }
82
+ }
83
+ }
84
+
85
+ .toggle_input {
86
+ display: flex;
87
+ svg {
88
+ width: 18px;
89
+ height: 18px;
90
+ }
91
+ }
92
+ .editor {
93
+ padding-inline: 0px !important;
94
+ .fr-toolbar.fr-top {
95
+ border-top-left-radius: 6px;
96
+ border-top-right-radius: 6px;
97
+ }
98
+ .fr-second-toolbar {
99
+ border-bottom-left-radius: 6px;
100
+ border-bottom-right-radius: 6px;
101
+ }
102
+ }
103
+
104
+ .date_picker_container {
105
+ position: relative;
106
+
107
+ .svg_icon {
108
+ position: absolute;
109
+ left: 8px;
110
+ top: 9px;
111
+ z-index: 1;
112
+ display: flex;
113
+ }
114
+
115
+ .react-datepicker-wrapper {
116
+ display: block;
117
+
118
+ .react-datepicker__input-container {
119
+ input {
120
+ padding-left: 32px !important;
121
+ }
122
+ }
123
+ }
124
+ }
125
+
126
+ .react-datepicker-wrapper {
127
+ display: block;
128
+ }
129
+ input:not([type="checkbox"][type="radio"]),
130
+ select {
131
+ border: 1px solid var(--_primary-300);
132
+ border-radius: 6px;
133
+ padding-inline: 12px;
134
+ width: 100%;
135
+ height: 38px;
136
+ &:focus {
137
+ outline: 2px solid var(--_primary-100);
138
+ }
139
+ }
140
+ input[type="tel"] {
141
+ border-top-left-radius: 0px !important;
142
+ border-bottom-left-radius: 0px !important;
143
+ border-left: 0 !important;
144
+ background-color: var(--_base-white);
145
+ height: 38px;
146
+ }
147
+ textarea {
148
+ width: 100%;
149
+ resize: vertical;
150
+ border-radius: 6px;
151
+ background-color: var(--_base-white);
152
+ border: 1px solid var(--_gray-300);
153
+ padding: 12px;
154
+ }
155
+ .error_styles {
156
+ min-height: 20px;
157
+ }
158
+ .label_with_radio {
159
+ display: flex;
160
+ align-items: center;
161
+ gap: 4px;
162
+ label {
163
+ margin-right: 12px;
164
+ display: flex;
165
+ align-items: center;
166
+ gap: 12px;
167
+ text-wrap: nowrap;
168
+ }
169
+ }
170
+
171
+ .custom-input {
172
+ display: inline-flex;
173
+ align-items: center;
174
+ gap: 0.5rem;
175
+ font-size: 16px;
176
+ cursor: pointer;
177
+ user-select: none;
178
+ flex-wrap: wrap;
179
+
180
+ input {
181
+ display: none;
182
+ }
183
+
184
+ .custom-mark {
185
+ width: 20px;
186
+ height: 20px;
187
+ background-color: var(--_base-white);
188
+ border: 2px solid var(--_gray-400);
189
+ margin: 0px 4px;
190
+ position: relative;
191
+ transition: all 0.2s ease;
192
+
193
+ &::after {
194
+ content: "";
195
+ position: absolute;
196
+ opacity: 0;
197
+ transition: opacity 0.2s ease;
198
+ }
199
+ }
200
+
201
+ &.checkbox {
202
+ .custom-mark {
203
+ border-radius: 4px;
204
+
205
+ &::after {
206
+ left: 6px;
207
+ top: 2px;
208
+ width: 5px;
209
+ height: 10px;
210
+ border: solid #fff;
211
+ border-width: 0 2px 2px 0;
212
+ transform: rotate(45deg);
213
+ }
214
+ }
215
+
216
+ input:checked + .custom-mark {
217
+ background-color: var(--_primary-400);
218
+ border-color: var(--_primary-400);
219
+
220
+ &::after {
221
+ opacity: 1;
222
+ }
223
+ }
224
+ }
225
+
226
+ &.radio {
227
+ .custom-mark {
228
+ border-radius: 50%;
229
+
230
+ &::after {
231
+ top: 50%;
232
+ left: 50%;
233
+ width: 10px;
234
+ height: 10px;
235
+ background-color: var(--_base-white);
236
+ border-radius: 50%;
237
+ transform: translate(-50%, -50%);
238
+ }
239
+ }
240
+
241
+ input:checked + .custom-mark {
242
+ background-color: var(--_primary-400);
243
+ border-color: var(--_primary-400);
244
+
245
+ &::after {
246
+ opacity: 1;
247
+ }
248
+ }
249
+ }
250
+ }
251
+ .label_styles {
252
+ display: block;
253
+ margin-bottom: 4px;
254
+ }
255
+ &:has(input[type="checkbox"]) {
256
+ display: flex;
257
+ flex-direction: column;
258
+ // align-items: center;
259
+ // gap: 8px;
260
+ }
261
+ input[type="checkbox"] {
262
+ width: 20px !important;
263
+ height: 20px !important;
264
+ }
265
+ }
266
+ .fb_file_upload {
267
+ label {
268
+ display: block;
269
+ margin-bottom: 6px;
270
+ }
271
+ }
272
+ .fb_btn {
273
+ height: 38px;
274
+ text-align: center;
275
+ border-radius: 6px;
276
+ background-color: var(--_primary-400);
277
+ color: var(--_base-white);
278
+ width: 100%;
279
+ padding-inline: 16px;
280
+ cursor: pointer;
281
+ transition: opacity 0.2s ease;
282
+
283
+ &:disabled,
284
+ &[disabled] {
285
+ background-color: var(--_primary-400);
286
+ color: var(--_base-white);
287
+ cursor: not-allowed;
288
+ opacity: 0.6;
289
+ }
290
+ }
291
+
292
+ .react-datepicker-popper {
293
+ z-index: 9999 !important;
294
+ }
295
+
296
+ .react-grid-item:has(.react-datepicker-popper) {
297
+ z-index: 2 !important;
298
+ }
299
+
300
+ .react-grid-item:has(.sc-phone-dropdown) {
301
+ z-index: 2 !important;
302
+ }
303
+
304
+ .react-datepicker__month {
305
+ background-color: var(--_base-white);
306
+ margin: 0px;
307
+ border: 1px solid var(--_gray-200);
308
+ border-top: 0;
309
+ margin: 0px !important;
310
+ }
311
+
312
+ .react-datepicker__header:not(.react-datepicker__header--has-time-select) {
313
+ // padding: 25px 10px 15px 20px;
314
+ // display: flex;
315
+ // justify-content: center;
316
+ // align-items: center;
317
+ // height: 67px;
318
+ }
319
+ .react-datepicker__day-names {
320
+ padding-top: 5px;
321
+ }
322
+ .react-datepicker__header {
323
+ // padding: 25px 10px 15px 20px;
324
+ display: flex;
325
+ justify-content: center;
326
+ align-items: center;
327
+ height: 67px;
328
+ }