@formixru/b2b-ui 3.4.0 → 3.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formixru/b2b-ui",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,7 +10,7 @@
10
10
  "browserslist": [
11
11
  "defaults and fully supports es6-module"
12
12
  ],
13
- "packageManager": "yarn@4.12.0",
13
+ "packageManager": "yarn@4.14.1",
14
14
  "scripts": {
15
15
  "_postinstall": "husky",
16
16
  "prepack": "yarn pinst --disable",
@@ -24,46 +24,47 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@advdominion/css-var": "^1.0.1",
27
- "@advdominion/eslint-config": "^2.0.0",
27
+ "@advdominion/eslint-config": "^2.1.0",
28
28
  "@advdominion/get-scrollbar-width": "^2.0.1",
29
29
  "@advdominion/pluralize": "^1.0.2",
30
30
  "@advdominion/scroll-to": "^1.0.1",
31
31
  "@advdominion/stylelint-config": "^1.1.0",
32
32
  "@advdominion/tooltip": "^6.0.0",
33
- "@floating-ui/dom": "^1.7.5",
33
+ "@floating-ui/dom": "^1.7.6",
34
34
  "@popperjs/core": "^2.11.8",
35
- "@prettier/plugin-php": "^0.24.0",
36
- "@storybook/addon-designs": "^11.1.2",
37
- "@storybook/addon-docs": "^10.2.13",
38
- "@storybook/addon-links": "^10.2.13",
39
- "@storybook/vue3-vite": "^10.2.13",
40
- "@vitejs/plugin-vue": "^6.0.4",
35
+ "@prettier/plugin-php": "^0.25.0",
36
+ "@storybook/addon-designs": "^11.1.3",
37
+ "@storybook/addon-docs": "^10.3.5",
38
+ "@storybook/addon-links": "^10.3.5",
39
+ "@storybook/vue3-vite": "^10.3.5",
40
+ "@vitejs/plugin-vue": "^6.0.6",
41
41
  "@vueless/storybook-dark-mode": "^10.0.7",
42
- "browserslist": "^4.28.1",
42
+ "browserslist": "^4.28.2",
43
43
  "color": "^5.0.3",
44
- "dayjs": "^1.11.19",
45
- "es-toolkit": "^1.44.0",
46
- "eslint": "^10.0.2",
44
+ "dayjs": "^1.11.20",
45
+ "es-toolkit": "^1.46.0",
46
+ "eslint": "^10.2.1",
47
47
  "husky": "^9.1.7",
48
48
  "imask": "^7.6.1",
49
- "lint-staged": "^16.2.7",
49
+ "js-cookie": "^3.0.5",
50
+ "lint-staged": "^16.4.0",
50
51
  "mime": "^4.1.0",
51
- "msw": "^2.12.10",
52
- "msw-storybook-addon": "^2.0.6",
52
+ "msw": "^2.13.6",
53
+ "msw-storybook-addon": "^2.0.7",
53
54
  "nouislider": "^15.8.1",
54
55
  "pinst": "^3.0.0",
55
- "postcss": "^8.5.6",
56
- "postcss-preset-env": "^11.2.0",
57
- "prettier": "^3.8.1",
56
+ "postcss": "^8.5.12",
57
+ "postcss-preset-env": "^11.2.1",
58
+ "prettier": "^3.8.3",
58
59
  "reset-css": "^5.0.2",
59
- "sass-embedded": "^1.97.3",
60
- "storybook": "^10.2.13",
61
- "stylelint": "^17.4.0",
62
- "swiper": "^12.1.2",
60
+ "sass-embedded": "^1.99.0",
61
+ "storybook": "^10.3.5",
62
+ "stylelint": "^17.9.1",
63
+ "swiper": "^12.1.3",
63
64
  "update-browserslist-db": "^1.2.3",
64
65
  "v-calendar": "3.0.1",
65
- "vite": "^7.3.1",
66
- "vue": "^3.5.29",
66
+ "vite": "^8.0.10",
67
+ "vue": "^3.5.33",
67
68
  "vue-eslint-parser": "^10.4.0",
68
69
  "yargs": "^18.0.0"
69
70
  },
@@ -77,6 +78,7 @@
77
78
  "dayjs": "^1.0.0",
78
79
  "es-toolkit": "^1.0.0",
79
80
  "imask": "^7.0.0",
81
+ "js-cookie": "^3.0.0",
80
82
  "mime": "^4.0.0",
81
83
  "nouislider": "^15.0.0",
82
84
  "reset-css": "^5.0.0",
@@ -0,0 +1,44 @@
1
+ import { cssVar } from '@advdominion/css-var';
2
+
3
+ export const hide = async ($b) => {
4
+ await $b.animate([{ transform: 'translateY(0)' }, { transform: 'translateY(100%)' }], {
5
+ duration: cssVar('--duration-leave-s'),
6
+ easing: cssVar('--easing-acceleration'),
7
+ }).finished;
8
+
9
+ $b.remove();
10
+ };
11
+
12
+ export const show = async ($b) => {
13
+ $b.hidden = false;
14
+
15
+ await $b.animate([{ transform: 'translateY(100%)' }, { transform: 'translateY(0)' }], {
16
+ duration: cssVar('--duration-enter-s'),
17
+ easing: cssVar('--easing-deceleration'),
18
+ }).finished;
19
+ };
20
+
21
+ export const init = async ($b) => {
22
+ const { default: Cookies } = await import('js-cookie');
23
+ const $button = $b.querySelector('.cookies__button');
24
+
25
+ $button.addEventListener('click', () => {
26
+ try {
27
+ const cookies = JSON.parse($button.dataset.cookies);
28
+ for (const [name, value] of Object.entries(cookies)) {
29
+ Cookies.set(name, value, { expires: 365 });
30
+ }
31
+ } catch (error) {
32
+ if (error.message.endsWith('is not valid JSON')) {
33
+ console.error('Похоже, что атрибут data-cookies не установлен или имеет некорректное значение');
34
+ }
35
+ console.error(error);
36
+ }
37
+
38
+ if (Cookies.get('APPSTORE') === 'Y') {
39
+ location.reload();
40
+ } else {
41
+ hide($b);
42
+ }
43
+ });
44
+ };
@@ -0,0 +1,73 @@
1
+ @use '../../variables' as *;
2
+ @use '../button';
3
+
4
+ $b: '.cookies';
5
+
6
+ #{$b} {
7
+ background-color: $cookies-bg;
8
+ bottom: calc(env(safe-area-inset-bottom) + var(--tab-bar-height));
9
+ box-shadow: $cookies-shadow;
10
+ left: 0;
11
+ position: fixed;
12
+ width: 100%;
13
+ z-index: 1050;
14
+
15
+ @include dark-border;
16
+ @include dark-border-disable((right, bottom, left));
17
+
18
+ @media (--tablet-landscape-up) {
19
+ bottom: 0;
20
+ }
21
+
22
+ &__wrapper {
23
+ align-items: center;
24
+ display: flex;
25
+ flex-direction: column;
26
+ padding-bottom: 16px;
27
+ padding-top: 16px;
28
+
29
+ @media (--tablet-landscape-up) {
30
+ flex-direction: row;
31
+ padding-bottom: 24px;
32
+ padding-top: 24px;
33
+ }
34
+ }
35
+
36
+ &__descr {
37
+ color: $cookies-descr-color;
38
+ flex-grow: 1;
39
+ text-align: center;
40
+
41
+ @include font($cookies-descr-mobile-font);
42
+
43
+ @media (--tablet-landscape-up) {
44
+ text-align: left;
45
+
46
+ @include font($cookies-descr-desktop-font);
47
+ }
48
+ }
49
+
50
+ &__button {
51
+ flex-shrink: 0;
52
+ margin-top: 16px;
53
+ width: 100%;
54
+
55
+ @include button.button(
56
+ $font: $button-small-font,
57
+ $height: $button-small-height,
58
+ $min-width: $button-small-min-width,
59
+ $padding: $button-small-padding
60
+ );
61
+
62
+ @media (--tablet-landscape-up) {
63
+ height: $button-height;
64
+ margin-left: 24px;
65
+ margin-top: 0;
66
+ min-width: $button-min-width;
67
+ padding: $button-padding;
68
+ width: auto;
69
+
70
+ @include font($button-font);
71
+ }
72
+ }
73
+ }
@@ -7,14 +7,14 @@ $b: '.empty-list';
7
7
  border-radius: $empty-list-radius;
8
8
  display: flex;
9
9
  flex-direction: column;
10
- padding: 4px * 6 4px * 4;
10
+ padding: 24px 16px;
11
11
 
12
12
  @include dark-border;
13
13
 
14
14
  @media (--tablet-landscape-up) {
15
15
  align-items: center;
16
16
  flex-direction: row;
17
- padding: 4px * 10 4px * 6;
17
+ padding: 40px 24px;
18
18
  }
19
19
 
20
20
  &_shadow {
@@ -25,13 +25,14 @@ $b: '.empty-list';
25
25
  align-self: center;
26
26
  fill: $empty-list-icon-color;
27
27
  flex-shrink: 0;
28
- margin-bottom: 4px * 6;
29
- width: 4px * 30;
28
+ margin-bottom: 24px;
29
+ user-select: none;
30
+ width: 120px;
30
31
 
31
32
  @media (--tablet-landscape-up) {
32
33
  margin-bottom: 0;
33
- margin-right: 4px * 12;
34
- width: 4px * 60;
34
+ margin-right: 48px;
35
+ width: 240px;
35
36
  }
36
37
  }
37
38
 
@@ -40,7 +41,7 @@ $b: '.empty-list';
40
41
  }
41
42
 
42
43
  &__title {
43
- margin-bottom: 4px * 4;
44
+ margin-bottom: 16px;
44
45
 
45
46
  @include font($empty-list-title-mobile-font);
46
47
 
@@ -50,22 +51,22 @@ $b: '.empty-list';
50
51
  }
51
52
 
52
53
  &__descr {
53
- max-width: 4px * 150;
54
+ max-width: 600px;
54
55
  }
55
56
 
56
57
  &__action {
57
- margin-top: 4px * 4;
58
+ margin-top: 16px;
58
59
  }
59
60
 
60
61
  &__footer {
61
62
  border-top: $empty-list-footer-separator-width solid $empty-list-footer-separator-color;
62
- margin-top: 4px * 4;
63
- padding-top: 4px * 4;
63
+ margin-top: 16px;
64
+ padding-top: 16px;
64
65
  }
65
66
 
66
67
  &__action-list {
67
68
  #{$b}__descr + & {
68
- margin-top: 4px * 4;
69
+ margin-top: 16px;
69
70
  }
70
71
  }
71
72
 
@@ -75,19 +76,19 @@ $b: '.empty-list';
75
76
  &__action-link {
76
77
  align-items: center;
77
78
  display: flex;
78
- padding-bottom: 4px * 2;
79
- padding-top: 4px * 2;
79
+ padding-bottom: 8px;
80
+ padding-top: 8px;
80
81
  }
81
82
 
82
83
  &__action-icon {
83
84
  fill: $empty-list-action-icon-color;
84
85
  flex-shrink: 0;
85
- height: 4px * 6;
86
- margin-right: 4px * 2;
86
+ height: 24px;
87
+ margin-right: 8px;
87
88
  transition-duration: var(--duration-micro-s);
88
89
  transition-property: color;
89
90
  transition-timing-function: var(--easing-standard);
90
- width: 4px * 6;
91
+ width: 24px;
91
92
 
92
93
  #{$b}__action-link:hover &,
93
94
  #{$b}__action-link:focus-visible & {
@@ -0,0 +1,43 @@
1
+ @use '../../variables' as *;
2
+
3
+ $b: '.rating';
4
+
5
+ #{$b} {
6
+ align-items: center;
7
+ display: flex;
8
+
9
+ &__stars {
10
+ align-items: center;
11
+ display: flex;
12
+ }
13
+
14
+ &__star {
15
+ fill: $rating-star-color;
16
+ height: 16px;
17
+ width: 16px;
18
+
19
+ &:not(:first-child) {
20
+ margin-left: 4px;
21
+ }
22
+
23
+ &_active {
24
+ fill: $rating-star-active-color;
25
+ }
26
+ }
27
+
28
+ &__label {
29
+ display: inline-flex;
30
+ margin-left: 12px;
31
+ position: relative;
32
+ top: 2px;
33
+
34
+ @include font($rating-label-font);
35
+
36
+ @media (--tablet-landscape-up) {
37
+ display: inline;
38
+ }
39
+
40
+ > span {
41
+ }
42
+ }
43
+ }
@@ -22,7 +22,7 @@ $b: '.warning-message';
22
22
  padding: 16px 16px 24px;
23
23
 
24
24
  &:has(#{$b}__content:last-child #{$b}__descr:first-child) {
25
- padding-bottom: 16px;
25
+ padding-bottom: 20px;
26
26
  }
27
27
  }
28
28
 
@@ -0,0 +1,33 @@
1
+ @use '../../variables' as *;
2
+
3
+ $b: '.wrapper';
4
+
5
+ #{$b} {
6
+ margin-left: auto;
7
+ margin-right: auto;
8
+ max-width: 1500px;
9
+ padding-left: 16px;
10
+ padding-right: 16px;
11
+ width: 100%;
12
+
13
+ @media (--tablet-landscape-up) {
14
+ padding-left: 32px;
15
+ padding-right: 32px;
16
+ }
17
+
18
+ &_no-max-width {
19
+ max-width: none;
20
+ }
21
+
22
+ &_no-padding {
23
+ padding-left: 0;
24
+ padding-right: 0;
25
+ }
26
+
27
+ &_no-mobile-padding {
28
+ @media (--tablet-portrait-down) {
29
+ padding-left: 0;
30
+ padding-right: 0;
31
+ }
32
+ }
33
+ }
@@ -1228,6 +1228,22 @@ $counter-font: ('font-weight': bold, 'font-size': 9px, 'line-height': 1);
1228
1228
  $counter-radius: $radius-l;
1229
1229
  $counter-size: 16px;
1230
1230
 
1231
+ /********** Уведомление об использовании cookies (.cookies) **********/
1232
+
1233
+ $cookies-bg: $color-grey-100;
1234
+ $cookies-shadow: $shadow;
1235
+
1236
+ $cookies-descr-color: $font-color-secondary;
1237
+ $cookies-descr-mobile-font: ('font-size': $font-size-xs, 'line-height': $line-height);
1238
+ $cookies-descr-desktop-font: ('font-size': $font-size);
1239
+
1240
+ /********** Рейтинг товара (.rating) **********/
1241
+
1242
+ $rating-star-color: #fbe7cd;
1243
+ $rating-star-active-color: #f09135;
1244
+
1245
+ $rating-label-font: ('font-size': $font-size-s, 'line-height': 1);
1246
+
1231
1247
  /********** Адаптивные точки **********/
1232
1248
 
1233
1249
  // При изменении устройств изменить их так же в mm.js