@formixru/b2b-ui 1.0.0

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 (73) hide show
  1. package/CONTRIBUTING.md +61 -0
  2. package/README.md +30 -0
  3. package/package.json +110 -0
  4. package/src/base.scss +89 -0
  5. package/src/components/action-list/index.scss +38 -0
  6. package/src/components/banner/index.scss +30 -0
  7. package/src/components/breadcrumbs/index.js +8 -0
  8. package/src/components/breadcrumbs/index.scss +55 -0
  9. package/src/components/button/index.scss +223 -0
  10. package/src/components/checkbox/index.scss +94 -0
  11. package/src/components/color-input/index.scss +88 -0
  12. package/src/components/color-input/index.vue +156 -0
  13. package/src/components/date-input/index.scss +126 -0
  14. package/src/components/date-input/index.vue +240 -0
  15. package/src/components/delete-all/index.scss +44 -0
  16. package/src/components/dialog/index.js +221 -0
  17. package/src/components/dialog/index.scss +198 -0
  18. package/src/components/empty-list/index.scss +97 -0
  19. package/src/components/file-input/index.scss +119 -0
  20. package/src/components/file-input/index.vue +333 -0
  21. package/src/components/font-input/index.scss +47 -0
  22. package/src/components/font-input/index.vue +154 -0
  23. package/src/components/form/index.js +228 -0
  24. package/src/components/form/index.scss +398 -0
  25. package/src/components/header-announcement/index.scss +48 -0
  26. package/src/components/input/index.js +85 -0
  27. package/src/components/input/index.scss +87 -0
  28. package/src/components/link/index.scss +266 -0
  29. package/src/components/loader/index.js +65 -0
  30. package/src/components/loader/index.scss +99 -0
  31. package/src/components/nobr/index.scss +5 -0
  32. package/src/components/overlay/index.js +82 -0
  33. package/src/components/overlay/index.scss +29 -0
  34. package/src/components/pagination/index.scss +59 -0
  35. package/src/components/pagination-group/index.js +5 -0
  36. package/src/components/pagination-group/index.scss +86 -0
  37. package/src/components/quantity-input/index.scss +179 -0
  38. package/src/components/quantity-input/index.vue +141 -0
  39. package/src/components/radio/index.scss +80 -0
  40. package/src/components/radio-list/index.scss +79 -0
  41. package/src/components/range-input/index.scss +109 -0
  42. package/src/components/range-input/index.vue +185 -0
  43. package/src/components/rating-input/index.js +32 -0
  44. package/src/components/rating-input/index.scss +36 -0
  45. package/src/components/select/index.js +6 -0
  46. package/src/components/select/index.scss +84 -0
  47. package/src/components/sidebar/index.js +174 -0
  48. package/src/components/sidebar/index.scss +398 -0
  49. package/src/components/simple-page/index.scss +32 -0
  50. package/src/components/slider-nav/index.scss +82 -0
  51. package/src/components/slider-pagination/index.scss +130 -0
  52. package/src/components/spinner/index.scss +35 -0
  53. package/src/components/sr-only/index.scss +25 -0
  54. package/src/components/steps/index.scss +155 -0
  55. package/src/components/suggest-input/index.scss +141 -0
  56. package/src/components/suggest-input/index.vue +324 -0
  57. package/src/components/tabs/index.js +192 -0
  58. package/src/components/tabs/index.scss +137 -0
  59. package/src/components/time-select/index.scss +27 -0
  60. package/src/components/toggle/index.scss +76 -0
  61. package/src/components/tooltip/index.js +69 -0
  62. package/src/components/tooltip/index.scss +112 -0
  63. package/src/components/total/index.scss +162 -0
  64. package/src/components/warning-message/index.scss +170 -0
  65. package/src/components/warning-message/index.vue +94 -0
  66. package/src/components/wysiwyg/index.scss +344 -0
  67. package/src/helpers/css-var.js +8 -0
  68. package/src/helpers/error-handler.js +61 -0
  69. package/src/helpers/get-smart-captcha.js +7 -0
  70. package/src/helpers/is-in-viewport.js +10 -0
  71. package/src/helpers/mm.js +52 -0
  72. package/src/helpers/scroll-to.js +21 -0
  73. package/src/variables.scss +1295 -0
@@ -0,0 +1,398 @@
1
+ @use '../../variables' as *;
2
+
3
+ $b: '.sidebar';
4
+
5
+ #{$b} {
6
+ background-color: $sidebar-bg;
7
+ height: calc(100% - var(--tab-bar-height));
8
+ position: fixed;
9
+ right: 0;
10
+ top: 0;
11
+ width: calc(100% - 56px);
12
+ z-index: 910;
13
+
14
+ @media (--tablet-landscape-up) {
15
+ height: 100%;
16
+ width: 320px;
17
+ }
18
+
19
+ &_left {
20
+ left: 0;
21
+ right: auto;
22
+ }
23
+
24
+ &_l {
25
+ @media (--tablet-landscape-up) {
26
+ width: 640px;
27
+ }
28
+ }
29
+
30
+ &_xl {
31
+ @media (--tablet-landscape-up) {
32
+ width: 960px;
33
+ }
34
+ }
35
+
36
+ &__aside {
37
+ align-items: flex-end;
38
+ display: flex;
39
+ flex-direction: column;
40
+ position: absolute;
41
+ right: 100%;
42
+ top: 0;
43
+
44
+ #{$b}_left & {
45
+ align-items: flex-start;
46
+ left: 100%;
47
+ right: auto;
48
+ }
49
+ }
50
+
51
+ &__button {
52
+ align-items: center;
53
+ background-color: $sidebar-disabled-button-bg;
54
+ color: $sidebar-disabled-button-color;
55
+ display: flex;
56
+ height: 4px * 14;
57
+ justify-content: center;
58
+ position: relative;
59
+ transition-duration: var(--duration-micro-s);
60
+ transition-property: background-color, color;
61
+ transition-timing-function: var(--easing-standard);
62
+ width: 4px * 14;
63
+
64
+ #{$b}_catalog & {
65
+ @media (--tablet-landscape-up) {
66
+ background-color: $sidebar-catalog-disabled-button-bg;
67
+ color: $sidebar-catalog-disabled-button-color;
68
+ }
69
+ }
70
+
71
+ &:enabled,
72
+ &:any-link {
73
+ background-color: $sidebar-button-bg;
74
+ color: $sidebar-button-color;
75
+ cursor: pointer;
76
+
77
+ &:hover,
78
+ &:focus-visible {
79
+ background-color: $sidebar-active-button-bg;
80
+ color: $sidebar-active-button-color;
81
+ }
82
+ }
83
+
84
+ &[data-notification] {
85
+ &::before {
86
+ align-items: center;
87
+ background-color: $sidebar-notification-bg;
88
+ border-radius: 50%;
89
+ color: $sidebar-notification-color;
90
+ content: attr(data-notification);
91
+ display: flex;
92
+ height: 4px * 4;
93
+ justify-content: center;
94
+ position: absolute;
95
+ right: 4px * 3;
96
+ top: 4px * 3;
97
+ width: 4px * 4;
98
+
99
+ @include font($sidebar-notification-font);
100
+ }
101
+ }
102
+
103
+ &[data-sidebar-close] {
104
+ background-color: $sidebar-close-bg;
105
+ color: $sidebar-close-color;
106
+
107
+ #{$b}_catalog & {
108
+ @media (--tablet-landscape-up) {
109
+ align-self: flex-start;
110
+ transform: translateX(-100%);
111
+ }
112
+ }
113
+ }
114
+
115
+ &_big {
116
+ color: $sidebar-disabled-button-label-color;
117
+ height: auto;
118
+ justify-content: flex-start;
119
+ min-height: 4px * 14;
120
+ min-width: 4px * 28;
121
+ padding: 4px * 4;
122
+ width: 100%;
123
+
124
+ @include font($sidebar-button-label-font);
125
+
126
+ &:enabled,
127
+ &:any-link {
128
+ color: $sidebar-button-label-color;
129
+
130
+ &:hover,
131
+ &:focus-visible {
132
+ color: $sidebar-active-button-label-color;
133
+ }
134
+ }
135
+
136
+ #{$b}_catalog & {
137
+ @media (--tablet-landscape-up) {
138
+ min-width: 4px * 56;
139
+ }
140
+ }
141
+ }
142
+ }
143
+
144
+ &__button-icon {
145
+ fill: currentcolor;
146
+ height: 4px * 6;
147
+ width: 4px * 6;
148
+
149
+ [data-sidebar-close] & {
150
+ height: 4px * 5;
151
+ width: 4px * 5;
152
+ }
153
+ }
154
+
155
+ &__tabs {
156
+ }
157
+
158
+ &__tab {
159
+ }
160
+
161
+ &__wrapper {
162
+ display: flex;
163
+ flex-direction: column;
164
+ height: 100%;
165
+ overflow: auto;
166
+ -webkit-overflow-scrolling: touch;
167
+
168
+ #{$b}_catalog & {
169
+ @media (--tablet-landscape-up) {
170
+ height: calc(100% - (4px * 14 + 1px));
171
+ }
172
+ }
173
+ }
174
+
175
+ &__container {
176
+ display: flex;
177
+ flex-direction: column;
178
+ flex-grow: 1;
179
+ }
180
+
181
+ &__header {
182
+ align-items: center;
183
+ border-bottom: $sidebar-header-separator-width solid $sidebar-header-separator-color;
184
+ display: flex;
185
+ flex-direction: column;
186
+ flex-shrink: 0;
187
+ justify-content: center;
188
+ margin-bottom: 4px * 4;
189
+ min-height: 4px * 14;
190
+ padding-bottom: 4px * 4;
191
+ padding-left: 4px * 4;
192
+ padding-right: 4px * 4;
193
+ padding-top: 4px * 4 + 1px;
194
+
195
+ #{$b}_catalog & {
196
+ @media (--tablet-landscape-up) {
197
+ background-color: $sidebar-catalog-header-bg;
198
+ left: -4px * 56;
199
+ margin-bottom: 0;
200
+ padding-left: 4px * 2;
201
+ position: relative;
202
+ width: calc(100% + 4px * 56);
203
+ z-index: 1;
204
+ }
205
+ }
206
+ }
207
+
208
+ &__header-icon-wrapper {
209
+ align-items: center;
210
+ border: $sidebar-header-icon-border-width solid $sidebar-header-icon-border-color;
211
+ border-radius: 50%;
212
+ display: flex;
213
+ height: 4px * 6;
214
+ justify-content: center;
215
+ position: relative;
216
+ width: 4px * 6;
217
+
218
+ @media (--tablet-landscape-up) {
219
+ background-color: $sidebar-header-icon-bg;
220
+ border-style: none;
221
+ height: 4px * 12;
222
+ width: 4px * 12;
223
+ }
224
+ }
225
+
226
+ &__header-icon {
227
+ fill: $sidebar-header-icon-color;
228
+ height: 4px * 4;
229
+ width: 4px * 4;
230
+
231
+ @media (--tablet-landscape-up) {
232
+ height: 4px * 6;
233
+ width: 4px * 6;
234
+ }
235
+ }
236
+
237
+ &__header-title {
238
+ color: $sidebar-header-title-color;
239
+ text-align: center;
240
+
241
+ @include font($sidebar-header-title-font);
242
+
243
+ @media (--tablet-landscape-up) {
244
+ margin-top: 4px * 2;
245
+ }
246
+ }
247
+
248
+ &__title-wrapper {
249
+ display: flex;
250
+ flex-direction: column;
251
+ width: 100%;
252
+
253
+ @media (--tablet-landscape-up) {
254
+ align-items: baseline;
255
+ flex-direction: row;
256
+ justify-content: space-between;
257
+ }
258
+
259
+ &:not(:first-child) {
260
+ margin-top: 4px * 2;
261
+ }
262
+
263
+ &:first-child:last-child {
264
+ margin-bottom: -2px;
265
+ margin-top: -3px;
266
+ }
267
+ }
268
+
269
+ &__title {
270
+ text-align: center;
271
+ width: 100%;
272
+
273
+ @include font($sidebar-title-mobile-font);
274
+
275
+ @media (--tablet-landscape-up) {
276
+ @include font($sidebar-title-desktop-font);
277
+ }
278
+
279
+ &:not(:first-child) {
280
+ margin-top: 4px * 2;
281
+ }
282
+
283
+ &:first-child:last-child {
284
+ margin-bottom: -2px;
285
+ margin-top: -3px;
286
+ }
287
+
288
+ #{$b}__title-wrapper & {
289
+ text-align: left;
290
+
291
+ @media (--tablet-landscape-up) {
292
+ margin-left: 4px * 2;
293
+ margin-right: 4px * 2;
294
+ }
295
+ }
296
+ }
297
+
298
+ &__header-link {
299
+ margin-top: 4px * 2;
300
+
301
+ @media (--tablet-landscape-up) {
302
+ flex-shrink: 0;
303
+ margin-left: 4px * 2;
304
+ margin-top: 0;
305
+ }
306
+ }
307
+
308
+ &__sub-title {
309
+ background-color: $sidebar-sub-title-bg;
310
+ color: $sidebar-sub-title-color;
311
+ margin-bottom: 4px * 4;
312
+ padding: 4px * 2 4px * 4;
313
+ text-align: center;
314
+
315
+ @include font($sidebar-sub-title-font);
316
+
317
+ #{$b}__header + & {
318
+ margin-top: -4px * 4;
319
+
320
+ @media (--tablet-landscape-up) {
321
+ margin-top: -4px * 8;
322
+ }
323
+ }
324
+ }
325
+
326
+ &__specs {
327
+ &:last-child {
328
+ margin-bottom: 4px * 6;
329
+ }
330
+ }
331
+
332
+ &__action-list {
333
+ margin-top: 4px * 6;
334
+ padding: 0 4px * 4;
335
+
336
+ &:last-child {
337
+ margin-bottom: 4px * 6;
338
+ }
339
+ }
340
+
341
+ &__action-item {
342
+ width: 100%;
343
+
344
+ &:not(:first-child) {
345
+ margin-top: 4px * 4;
346
+ }
347
+ }
348
+
349
+ &__descr {
350
+ color: $sidebar-descr-color;
351
+ margin-top: 4px * 2;
352
+ width: 100%;
353
+
354
+ @include font($sidebar-descr-font);
355
+ }
356
+
357
+ &__descr-icon {
358
+ display: inline-block;
359
+ margin-left: 2px;
360
+ position: relative;
361
+ top: 2px;
362
+
363
+ > svg {
364
+ display: block;
365
+ fill: $sidebar-descr-icon-color;
366
+ height: 4px * 4;
367
+ width: 4px * 4;
368
+ }
369
+ }
370
+
371
+ &__content {
372
+ flex-grow: 1;
373
+ }
374
+
375
+ &__footer {
376
+ flex-shrink: 0;
377
+ margin-top: 4px * 4;
378
+ }
379
+
380
+ &__toggle-wrapper {
381
+ @media (--tablet-landscape-up) {
382
+ align-items: center;
383
+ display: flex;
384
+ }
385
+ }
386
+
387
+ &__toggle {
388
+ margin-bottom: 4px * 2;
389
+ margin-top: 4px * 4;
390
+
391
+ @media (--tablet-landscape-up) {
392
+ flex-shrink: 0;
393
+ margin-bottom: 0;
394
+ margin-left: 4px * 4;
395
+ margin-top: 0;
396
+ }
397
+ }
398
+ }
@@ -0,0 +1,32 @@
1
+ @use '../../variables' as *;
2
+
3
+ $b: '.simple-page';
4
+
5
+ #{$b} {
6
+ display: flex;
7
+ flex-direction: column;
8
+
9
+ @media (--tablet-landscape-up) {
10
+ align-items: flex-start;
11
+ flex-direction: row;
12
+ }
13
+
14
+ &__content {
15
+ width: 100%;
16
+
17
+ @media (--tablet-landscape-up) {
18
+ width: calc(75% - 32px);
19
+ }
20
+ }
21
+
22
+ &__aside {
23
+ margin-top: 4px * 8;
24
+ width: 100%;
25
+
26
+ @media (--tablet-landscape-up) {
27
+ margin-left: 4px * 8;
28
+ margin-top: 0;
29
+ width: 25%;
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,82 @@
1
+ @use '../../variables' as *;
2
+
3
+ $b: '.slider-nav';
4
+
5
+ #{$b} {
6
+ &__button {
7
+ align-items: center;
8
+ background-color: $slider-nav-button-bg;
9
+ border: $slider-nav-button-border-width solid $slider-nav-button-border-color;
10
+ border-radius: $slider-nav-button-radius;
11
+ cursor: pointer;
12
+ display: flex;
13
+ height: 4px * 8;
14
+ justify-content: center;
15
+ opacity: 1;
16
+ transition-duration: var(--duration-micro-s);
17
+ transition-property: border-color, color, opacity;
18
+ transition-timing-function: var(--easing-standard);
19
+ width: 4px * 8;
20
+
21
+ @media (--tablet-portrait-down) {
22
+ display: none;
23
+ }
24
+
25
+ @media (--tablet-landscape-up) {
26
+ height: 4px * 12;
27
+ width: 4px * 12;
28
+ }
29
+
30
+ &_disabled {
31
+ cursor: default;
32
+ opacity: 0.5;
33
+ }
34
+
35
+ &_lock {
36
+ display: none;
37
+ }
38
+
39
+ &_prev {
40
+ }
41
+
42
+ &_next {
43
+ }
44
+
45
+ &_autohide {
46
+ .swiper:not(:hover) & {
47
+ opacity: 0;
48
+ }
49
+ }
50
+
51
+ &_fill-white {
52
+ background-color: $slider-nav-button-fill-white-bg;
53
+ border-color: $slider-nav-button-fill-white-border-color;
54
+ box-shadow: $slider-nav-button-fill-white-shadow;
55
+ color: $slider-nav-button-fill-white-color;
56
+
57
+ &:not(#{$b}__button_disabled):hover,
58
+ &:not(#{$b}__button_disabled):focus-visible {
59
+ color: $slider-nav-button-fill-white-active-color;
60
+ }
61
+ }
62
+ }
63
+
64
+ &__icon {
65
+ fill: currentcolor;
66
+ height: 4px * 4;
67
+ width: 4px * 4;
68
+
69
+ @media (--tablet-landscape-up) {
70
+ height: 4px * 6;
71
+ width: 4px * 6;
72
+ }
73
+
74
+ #{$b}__button_prev & {
75
+ transform: translateX(-2px);
76
+ }
77
+
78
+ #{$b}__button_next & {
79
+ transform: translateX(1px);
80
+ }
81
+ }
82
+ }
@@ -0,0 +1,130 @@
1
+ @use 'sass:math';
2
+ @use '../../variables' as *;
3
+
4
+ $b: '.slider-pagination';
5
+
6
+ #{$b} {
7
+ display: flex;
8
+ justify-content: center;
9
+
10
+ &_lock {
11
+ display: none;
12
+ }
13
+
14
+ &_clickable {
15
+ }
16
+
17
+ &_light {
18
+ }
19
+
20
+ &_dark {
21
+ }
22
+
23
+ &.swiper-pagination-bullets-dynamic {
24
+ justify-content: flex-start;
25
+ overflow: visible;
26
+ position: relative;
27
+ }
28
+
29
+ &__bullet {
30
+ border: 1px solid transparent;
31
+ border-radius: 50%;
32
+ display: block;
33
+ flex-shrink: 0;
34
+ height: $slider-pagination-bullet-size;
35
+ margin-left: math.div($slider-pagination-bullet-gap, 2);
36
+ margin-right: math.div($slider-pagination-bullet-gap, 2);
37
+ opacity: 1;
38
+ transition-duration: var(--duration-micro-s);
39
+ transition-property: background-color, border-color, left, transform;
40
+ transition-timing-function: var(--easing-standard);
41
+ width: $slider-pagination-bullet-size;
42
+
43
+ #{$b}_clickable &:hover,
44
+ #{$b}_clickable &:focus-visible {
45
+ cursor: pointer;
46
+ transform: scale(1.5);
47
+ }
48
+
49
+ #{$b}.swiper-pagination-bullets-dynamic & {
50
+ position: relative;
51
+ transform: scale(0);
52
+ }
53
+
54
+ &_active {
55
+ transform: scale(1.5);
56
+
57
+ #{$b}_clickable &:hover,
58
+ #{$b}_clickable &:focus-visible {
59
+ cursor: default;
60
+ transform: scale(1.5);
61
+ }
62
+
63
+ #{$b}.swiper-pagination-bullets-dynamic & {
64
+ transform: scale(1.5);
65
+
66
+ &-next,
67
+ &-prev {
68
+ transform: scale(1);
69
+ }
70
+
71
+ &-next-next,
72
+ &-prev-prev {
73
+ transform: scale(0.5);
74
+ }
75
+ }
76
+ }
77
+
78
+ #{$b}_light & {
79
+ background-color: $slider-pagination-bullet-light-bg;
80
+ border-color: $slider-pagination-bullet-light-border-color;
81
+
82
+ &_active {
83
+ background-color: $slider-pagination-bullet-light-selected-bg;
84
+ border-color: $slider-pagination-bullet-light-selected-border-color;
85
+ }
86
+ }
87
+
88
+ #{$b}_light#{$b}_clickable & {
89
+ &:hover,
90
+ &:focus-visible {
91
+ background-color: $slider-pagination-bullet-light-active-bg;
92
+ border-color: $slider-pagination-bullet-light-active-border-color;
93
+ }
94
+
95
+ &_active {
96
+ &:hover,
97
+ &:focus-visible {
98
+ background-color: $slider-pagination-bullet-light-selected-bg;
99
+ border-color: $slider-pagination-bullet-light-selected-border-color;
100
+ }
101
+ }
102
+ }
103
+
104
+ #{$b}_dark & {
105
+ background-color: $slider-pagination-bullet-dark-bg;
106
+ border-color: $slider-pagination-bullet-dark-border-color;
107
+
108
+ &_active {
109
+ background-color: $slider-pagination-bullet-dark-selected-bg;
110
+ border-color: $slider-pagination-bullet-dark-selected-border-color;
111
+ }
112
+ }
113
+
114
+ #{$b}_dark#{$b}_clickable & {
115
+ &:hover,
116
+ &:focus-visible {
117
+ background-color: $slider-pagination-bullet-dark-active-bg;
118
+ border-color: $slider-pagination-bullet-dark-active-border-color;
119
+ }
120
+
121
+ &_active {
122
+ &:hover,
123
+ &:focus-visible {
124
+ background-color: $slider-pagination-bullet-dark-selected-bg;
125
+ border-color: $slider-pagination-bullet-dark-selected-border-color;
126
+ }
127
+ }
128
+ }
129
+ }
130
+ }
@@ -0,0 +1,35 @@
1
+ @use '../../variables' as *;
2
+
3
+ @keyframes spinner {
4
+ 0% {
5
+ transform: rotate(0deg);
6
+ }
7
+
8
+ 100% {
9
+ transform: rotate(360deg);
10
+ }
11
+ }
12
+
13
+ $b: '.spinner';
14
+
15
+ #{$b} {
16
+ animation-duration: $spinner-speed;
17
+ animation-iteration-count: infinite;
18
+ animation-name: spinner;
19
+ animation-timing-function: linear;
20
+ border: $spinner-size solid $spinner-color;
21
+ border-bottom-color: transparent;
22
+ border-radius: 50%;
23
+ display: block;
24
+ height: 100%;
25
+ width: 100%;
26
+
27
+ @container (width >= #{$spinner-l-container-size}) {
28
+ border-width: $spinner-l-size;
29
+ }
30
+
31
+ &_inverted {
32
+ border-color: $spinner-inverted-color;
33
+ border-bottom-color: transparent;
34
+ }
35
+ }
@@ -0,0 +1,25 @@
1
+ @use '../../variables' as *;
2
+
3
+ // https://allyjs.io/tutorials/hiding-elements.html#2017-edition-of-visuallyhidden
4
+
5
+ .sr-only {
6
+ border-bottom-style: none;
7
+ border-left-style: none;
8
+ border-right-style: none;
9
+ border-top-style: none;
10
+ clip: rect(0 0 0 0);
11
+ clip-path: inset(100%);
12
+ height: 1px;
13
+ margin-bottom: -1px;
14
+ margin-left: -1px;
15
+ margin-right: -1px;
16
+ margin-top: -1px;
17
+ overflow: hidden;
18
+ padding-bottom: 0;
19
+ padding-left: 0;
20
+ padding-right: 0;
21
+ padding-top: 0;
22
+ position: absolute;
23
+ white-space: nowrap;
24
+ width: 1px;
25
+ }