@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,162 @@
1
+ @use '../../variables' as *;
2
+
3
+ $b: '.total';
4
+
5
+ #{$b} {
6
+ background-color: $total-bg;
7
+ border-radius: $total-radius;
8
+ display: flex;
9
+ flex-direction: column;
10
+ padding: 4px * 6 4px * 4;
11
+
12
+ @include dark-border;
13
+ @include font($total-font);
14
+
15
+ @media (--tablet-landscape-up) {
16
+ align-items: center;
17
+ flex-direction: row;
18
+ justify-content: space-between;
19
+ padding-left: 4px * 8;
20
+ padding-right: 4px * 8;
21
+ }
22
+
23
+ &_shadow {
24
+ box-shadow: $total-shadow;
25
+ }
26
+
27
+ &__title {
28
+ @include font($total-title-mobile-font);
29
+
30
+ @media (--tablet-landscape-up) {
31
+ @include font($total-title-desktop-font);
32
+ }
33
+ }
34
+
35
+ &__wrapper {
36
+ display: flex;
37
+ flex-direction: column;
38
+ margin-top: 4px * 6;
39
+
40
+ @media (--tablet-landscape-up) {
41
+ flex-direction: row;
42
+ margin-left: 4px * 8;
43
+ margin-top: 0;
44
+ }
45
+ }
46
+
47
+ &__specs-list {
48
+ display: flex;
49
+ flex-direction: column;
50
+ justify-content: center;
51
+ }
52
+
53
+ &__specs-item {
54
+ align-items: baseline;
55
+ display: flex;
56
+ justify-content: space-between;
57
+
58
+ &:not(:first-child) {
59
+ margin-top: 4px * 3;
60
+ }
61
+ }
62
+
63
+ &__specs-label {
64
+ color: $total-specs-label-color;
65
+ margin-right: 4px * 6;
66
+
67
+ @include font($total-specs-label-font);
68
+
69
+ @media (--tablet-landscape-up) {
70
+ max-width: 4px * 25;
71
+ }
72
+ }
73
+
74
+ &__specs-value {
75
+ text-align: right;
76
+
77
+ @include font($total-specs-value-font);
78
+
79
+ &_error {
80
+ color: $total-specs-value-error-color;
81
+ }
82
+ }
83
+
84
+ &__amount-list {
85
+ display: flex;
86
+ flex-direction: column;
87
+ justify-content: center;
88
+
89
+ &:not(:first-child) {
90
+ margin-top: 4px * 3;
91
+
92
+ @media (--tablet-landscape-up) {
93
+ border-left: $total-amount-list-separator-width solid $total-amount-list-separator-color;
94
+ margin-left: 4px * 6;
95
+ margin-top: 0;
96
+ padding-left: 4px * 6;
97
+ }
98
+ }
99
+ }
100
+
101
+ &__amount-item {
102
+ align-items: baseline;
103
+ display: flex;
104
+ justify-content: space-between;
105
+
106
+ &:not(:first-child) {
107
+ margin-top: 4px * 4;
108
+ }
109
+
110
+ &_big {
111
+ align-items: flex-start;
112
+ }
113
+ }
114
+
115
+ &__amount-label {
116
+ color: $total-amount-label-color;
117
+ margin-right: 4px * 6;
118
+
119
+ @include font($total-amount-label-font);
120
+ }
121
+
122
+ &__amount-value {
123
+ color: $total-amount-value-color;
124
+ text-align: right;
125
+
126
+ @include font($total-amount-value-font);
127
+
128
+ > b {
129
+ color: $total-amount-value-b-color;
130
+
131
+ @include font($total-amount-value-b-mobile-font);
132
+
133
+ @media (--tablet-landscape-up) {
134
+ @include font($total-amount-value-b-desktop-font);
135
+ }
136
+ }
137
+
138
+ > s {
139
+ color: $total-amount-value-s-color;
140
+ display: block;
141
+
142
+ @include font($total-amount-value-s-font);
143
+ }
144
+ }
145
+
146
+ &__amount-tax {
147
+ color: $total-amount-tax-color;
148
+ margin-top: 2px;
149
+
150
+ @media (--tablet-portrait-down) {
151
+ @include font($total-amount-tax-font);
152
+ }
153
+ }
154
+
155
+ &__promocode {
156
+ margin-top: 4px * 4;
157
+
158
+ @media (--tablet-landscape-up) {
159
+ width: 4px * 85;
160
+ }
161
+ }
162
+ }
@@ -0,0 +1,170 @@
1
+ @use '../../variables' as *;
2
+
3
+ $b: '.warning-message';
4
+
5
+ #{$b} {
6
+ align-items: flex-start;
7
+ background-color: $warning-message-bg;
8
+ border-radius: $warning-message-radius;
9
+ box-shadow: $warning-message-shadow;
10
+ display: flex;
11
+ padding-bottom: 4px * 6;
12
+ padding-left: 4px * 4;
13
+ padding-right: 4px * 4;
14
+ padding-top: 4px * 4;
15
+
16
+ @include dark-border;
17
+
18
+ @media (--tablet-landscape-up) {
19
+ padding-bottom: 4px * 8;
20
+ padding-left: 4px * 6;
21
+ padding-right: 4px * 6;
22
+ padding-top: 4px * 6;
23
+ }
24
+
25
+ &_small {
26
+ padding-bottom: 4px * 6;
27
+ padding-left: 4px * 4;
28
+ padding-right: 4px * 4;
29
+ padding-top: 4px * 4;
30
+ }
31
+
32
+ &_success {
33
+ }
34
+
35
+ &_info {
36
+ }
37
+
38
+ &_error {
39
+ }
40
+
41
+ &_solid {
42
+ background-color: $warning-message-color;
43
+
44
+ &#{$b}_success {
45
+ background-color: $warning-message-success-color;
46
+ }
47
+
48
+ &#{$b}_info {
49
+ background-color: $warning-message-info-color;
50
+ }
51
+
52
+ &#{$b}_error {
53
+ background-color: $warning-message-error-color;
54
+ }
55
+ }
56
+
57
+ &__icon {
58
+ fill: $warning-message-color;
59
+ flex-shrink: 0;
60
+ height: 4px * 6;
61
+ margin-right: 4px * 2;
62
+ width: 4px * 6;
63
+
64
+ #{$b}_small & {
65
+ height: 4px * 5;
66
+ width: 4px * 5;
67
+ }
68
+
69
+ #{$b}_solid & {
70
+ fill: $warning-message-solid-color !important;
71
+ }
72
+
73
+ #{$b}_success & {
74
+ fill: $warning-message-success-color;
75
+ }
76
+
77
+ #{$b}_info & {
78
+ fill: $warning-message-info-color;
79
+ }
80
+
81
+ #{$b}_error & {
82
+ fill: $warning-message-error-color;
83
+ }
84
+ }
85
+
86
+ &__wrapper {
87
+ align-items: center;
88
+ display: flex;
89
+ flex-direction: column;
90
+ flex-grow: 1;
91
+ position: relative;
92
+ top: 2px;
93
+
94
+ @media (--tablet-landscape-up) {
95
+ flex-direction: row;
96
+ }
97
+
98
+ #{$b}_small & {
99
+ top: 3px;
100
+ }
101
+ }
102
+
103
+ &__content {
104
+ flex-grow: 1;
105
+
106
+ @media (--tablet-portrait-down) {
107
+ text-align: center;
108
+ }
109
+
110
+ #{$b}__icon + #{$b}__wrapper & {
111
+ @media (--tablet-portrait-down) {
112
+ text-align: left;
113
+ }
114
+ }
115
+ }
116
+
117
+ &__title {
118
+ color: $warning-message-color;
119
+
120
+ @include font($warning-message-title-font);
121
+
122
+ #{$b}_small & {
123
+ @include font($warning-message-small-title-font);
124
+ }
125
+
126
+ #{$b}_solid & {
127
+ color: $warning-message-solid-color !important;
128
+ }
129
+
130
+ #{$b}_success & {
131
+ color: $warning-message-success-color;
132
+ }
133
+
134
+ #{$b}_info & {
135
+ color: $warning-message-info-color;
136
+ }
137
+
138
+ #{$b}_error & {
139
+ color: $warning-message-error-color;
140
+ }
141
+ }
142
+
143
+ &__descr {
144
+ color: $warning-message-descr-color;
145
+
146
+ @include font($warning-message-descr-font);
147
+
148
+ &:not(:first-child) {
149
+ margin-top: 4px * 2;
150
+ }
151
+
152
+ #{$b}_small & {
153
+ @include font($warning-message-small-descr-font);
154
+ }
155
+
156
+ #{$b}_solid & {
157
+ color: $warning-message-solid-descr-color;
158
+ }
159
+ }
160
+
161
+ &__action {
162
+ flex-shrink: 0;
163
+ margin-top: 4px * 4;
164
+
165
+ @media (--tablet-landscape-up) {
166
+ margin-left: 4px * 6;
167
+ margin-top: 0;
168
+ }
169
+ }
170
+ }
@@ -0,0 +1,94 @@
1
+ <template>
2
+ <div class="warning-message" :class="classes">
3
+ <svg class="warning-message__icon"><use :href="`${ICONS_PATH}#${icon}`" /></svg>
4
+ <div class="warning-message__wrapper">
5
+ <div class="warning-message__content">
6
+ <div v-if="title" class="warning-message__title" v-html="title"></div>
7
+ <div v-if="descr" class="warning-message__descr" v-html="descr"></div>
8
+ </div>
9
+ <a
10
+ v-if="actionUrl.length > 0"
11
+ class="warning-message__action button"
12
+ :class="{ button_inverted: solid, button_alt: !solid }"
13
+ :href="actionUrl"
14
+ >
15
+ <svg v-if="actionIcon.length > 0" class="button__icon">
16
+ <use :href="`${ICONS_PATH}#${actionIcon}`" />
17
+ </svg>
18
+ Ссылка
19
+ </a>
20
+ </div>
21
+ </div>
22
+ </template>
23
+
24
+ <script setup>
25
+ import { computed, toRefs } from 'vue';
26
+
27
+ const ICONS_PATH = window.ICONS_PATH;
28
+
29
+ const props = defineProps({
30
+ type: {
31
+ type: String,
32
+ default: 'warning',
33
+ validator(value) {
34
+ return ['warning', 'success', 'info', 'error'].includes(value);
35
+ },
36
+ },
37
+ small: {
38
+ type: Boolean,
39
+ },
40
+ solid: {
41
+ type: Boolean,
42
+ },
43
+ title: {
44
+ type: String,
45
+ default: '',
46
+ },
47
+ descr: {
48
+ type: String,
49
+ default: '',
50
+ },
51
+ actionUrl: {
52
+ type: String,
53
+ default: '',
54
+ },
55
+ actionIcon: {
56
+ type: String,
57
+ default: '',
58
+ },
59
+ });
60
+
61
+ const { type, small, solid, title, descr } = toRefs(props);
62
+
63
+ const classes = computed(() => {
64
+ return {
65
+ warning_small: small.value,
66
+ warning_solid: solid.value,
67
+ warning_success: type.value === 'success',
68
+ warning_info: type.value === 'info',
69
+ warning_error: type.value === 'error',
70
+ };
71
+ });
72
+
73
+ const icon = computed(() => {
74
+ let icon;
75
+ switch (type.value) {
76
+ case 'success': {
77
+ icon = 'check';
78
+ break;
79
+ }
80
+ case 'info': {
81
+ icon = 'info';
82
+ break;
83
+ }
84
+ case 'error': {
85
+ icon = 'delete';
86
+ break;
87
+ }
88
+ default: {
89
+ icon = 'warning';
90
+ }
91
+ }
92
+ return icon;
93
+ });
94
+ </script>