@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,61 @@
1
+ # b2b-ui
2
+
3
+ ## Системные требования
4
+
5
+ - Node.js и Yarn (https://gitea.optiweb.ru/wiki/wiki/wiki/Установка-Node.js-и-Yarn)
6
+ - [Java](https://www.java.com/download/) версии 8 или выше (только для разработки и CI)
7
+
8
+ Так же возможна работа через [Dev Containers](https://gitea.optiweb.ru/wiki/wiki/wiki/Работа-с-проектом-через-Dev-Containers).
9
+
10
+ ## Команды
11
+
12
+ Сборка проекта в development-режиме и запуск сервера для разработки на порту по-умолчанию (3000):
13
+
14
+ `yarn dev`
15
+
16
+ Сборка проекта в development-режиме и запуск сервера для разработки на определённом порту:
17
+
18
+ `yarn dev --port 8000`
19
+
20
+ Сборка проекта в production-режиме:
21
+
22
+ `yarn build`
23
+
24
+ Запуск проверки кода (в том числе его форматирования):
25
+
26
+ `yarn lint`
27
+
28
+ ## Git Hooks
29
+
30
+ ### commit-msg
31
+
32
+ Хук проверяет commit message на соответствие следующему формату:
33
+
34
+ ```
35
+ #<Номер задачи> <Краткое описание изменений>
36
+ ```
37
+
38
+ Особенности:
39
+
40
+ - Если у номера задачи нет символа `#`, он будет добавлен автоматически
41
+ - Cообщения, начинающиеся с `Merge/Revert`, не проверяются
42
+
43
+ ### pre-commit
44
+
45
+ Хук запускает проверку кода (в том числе его форматирования) с исправлением, если это возможно, найденных ошибок. Если автоматически исправить все найденные ошибки невозможно, создание коммита будет отменено.
46
+
47
+ ## Обновление зависимостей
48
+
49
+ ```shell
50
+ yarn set version stable
51
+
52
+ yarn install
53
+
54
+ yarn dlx storybook@latest upgrade
55
+
56
+ yarn upgrade-interactive
57
+
58
+ yarn update-browserslist-db
59
+
60
+ yarn dlx @yarnpkg/sdks
61
+ ```
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # b2b-ui
2
+
3
+ [Storybook](http://www.master.b2b-ui.dev.optiweb.ru/)
4
+
5
+ ## Подключение компонентов
6
+
7
+ ### JS/SCSS
8
+
9
+ ```js
10
+ import { init } from '@formixru/b2b-ui/components/input';
11
+
12
+ // Если Vue-компонент
13
+ import ExampleInput from '@formixru/b2b-ui/components/example-input/vue';
14
+ ```
15
+
16
+ ```scss
17
+ @use 'pkg:@formixru/b2b-ui/components/input/scss';
18
+ ```
19
+
20
+ При подключении Vue-компонента подключать SCSS не нужно - он подключается автоматически.
21
+
22
+ ## Подключение хелперов
23
+
24
+ ```js
25
+ import { cssVar } from '@formixru/b2b-ui/helpers/css-var';
26
+ ```
27
+
28
+ ## Разработка
29
+
30
+ [CONTRIBUTING.md](./CONTRIBUTING.md)
package/package.json ADDED
@@ -0,0 +1,110 @@
1
+ {
2
+ "name": "@formixru/b2b-ui",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://gitea.optiweb.ru/formix/b2b-ui.git"
8
+ },
9
+ "license": "MIT",
10
+ "browserslist": [
11
+ "defaults",
12
+ "not OperaMini all"
13
+ ],
14
+ "packageManager": "yarn@4.6.0",
15
+ "scripts": {
16
+ "_postinstall": "husky",
17
+ "prepack": "yarn pinst --disable",
18
+ "postpack": "yarn pinst --enable",
19
+ "lint:eslint": "yarn eslint --max-warnings 10 \"**/*.{js,vue}\"",
20
+ "lint:stylelint": "yarn stylelint --max-warnings 10 \"**/*.scss\"",
21
+ "lint:prettier": "yarn prettier --check .",
22
+ "lint": "yarn lint:eslint && yarn lint:stylelint && yarn lint:prettier",
23
+ "dev": "storybook dev -p 3000",
24
+ "build": "storybook build -o www"
25
+ },
26
+ "devDependencies": {
27
+ "@advdominion/get-scrollbar-width": "^2.0.0",
28
+ "@advdominion/is": "^1.0.1",
29
+ "@advdominion/lightningcss-loader": "^1.0.0",
30
+ "@advdominion/pluralize": "^1.0.1",
31
+ "@advdominion/tooltip": "^1.0.0",
32
+ "@eslint/eslintrc": "^3.2.0",
33
+ "@eslint/js": "^9.18.0",
34
+ "@floating-ui/dom": "^1.6.13",
35
+ "@popperjs/core": "^2.11.8",
36
+ "@prettier/plugin-php": "^0.22.4",
37
+ "@storybook/addon-designs": "^8.0.4",
38
+ "@storybook/addon-essentials": "^8.5.1",
39
+ "@storybook/addon-links": "^8.5.1",
40
+ "@storybook/addon-webpack5-compiler-swc": "^2.0.0",
41
+ "@storybook/blocks": "^8.5.1",
42
+ "@storybook/vue3": "^8.5.1",
43
+ "@storybook/vue3-webpack5": "^8.5.1",
44
+ "browserslist": "^4.24.4",
45
+ "color": "^4.2.3",
46
+ "css-loader": "^7.1.2",
47
+ "dayjs": "^1.11.13",
48
+ "eslint": "^9.18.0",
49
+ "eslint-config-prettier": "^10.0.1",
50
+ "eslint-plugin-simple-import-sort": "^12.1.1",
51
+ "eslint-plugin-unicorn": "^56.0.1",
52
+ "eslint-plugin-vue": "^9.32.0",
53
+ "globals": "^15.14.0",
54
+ "husky": "^9.1.7",
55
+ "imask": "^7.6.1",
56
+ "lightningcss": "^1.29.1",
57
+ "lint-staged": "^15.4.1",
58
+ "lodash-es": "^4.17.21",
59
+ "mime": "^4.0.6",
60
+ "msw": "^2.7.0",
61
+ "msw-storybook-addon": "^2.0.4",
62
+ "nouislider": "^15.8.1",
63
+ "pinst": "^3.0.0",
64
+ "prettier": "^3.4.2",
65
+ "reset-css": "^5.0.2",
66
+ "sass-embedded": "^1.83.4",
67
+ "sass-loader": "^16.0.4",
68
+ "storybook": "^8.5.1",
69
+ "storybook-dark-mode": "^4.0.2",
70
+ "style-loader": "^4.0.0",
71
+ "stylelint": "^16.13.2",
72
+ "stylelint-config-standard-scss": "^14.0.0",
73
+ "stylelint-config-standard-vue": "^1.0.0",
74
+ "stylelint-order": "^6.0.4",
75
+ "swiper": "^11.2.1",
76
+ "update-browserslist-db": "^1.1.2",
77
+ "v-calendar": "3.0.1",
78
+ "vue": "^3.5.13",
79
+ "webpack": "^5.97.1",
80
+ "yargs": "^17.7.2"
81
+ },
82
+ "msw": {
83
+ "workerDirectory": [
84
+ ".storybook/static"
85
+ ]
86
+ },
87
+ "peerDependencies": {
88
+ "@advdominion/get-scrollbar-width": "^2.0.0",
89
+ "@advdominion/is": "^1.0.0",
90
+ "@advdominion/pluralize": "^1.0.0",
91
+ "@advdominion/tooltip": "^1.0.0",
92
+ "color": "^4.0.0",
93
+ "dayjs": "^1.0.0",
94
+ "imask": "^7.0.0",
95
+ "lodash-es": "^4.0.0",
96
+ "mime": "^4.0.0",
97
+ "nouislider": "^15.0.0",
98
+ "reset-css": "^5.0.0",
99
+ "v-calendar": "^3.0.0",
100
+ "vue": "^3.0.0"
101
+ },
102
+ "exports": {
103
+ "./components/*/scss": "./src/components/*/index.scss",
104
+ "./components/*/vue": "./src/components/*/index.vue",
105
+ "./components/*": "./src/components/*/index.js",
106
+ "./helpers/*": "./src/helpers/*.js",
107
+ "./base": "./src/base.scss",
108
+ "./variables": "./src/variables.scss"
109
+ }
110
+ }
package/src/base.scss ADDED
@@ -0,0 +1,89 @@
1
+ @use 'variables' as *;
2
+ @use 'pkg:reset-css';
3
+
4
+ /* stylelint-disable comment-empty-line-before, custom-property-empty-line-before */
5
+ :root {
6
+ --duration-micro-s: 100ms;
7
+ --duration-micro-m: 175ms;
8
+ --duration-micro-l: 250ms;
9
+
10
+ --duration-leave-s: 200ms;
11
+ --duration-leave-m: 250ms;
12
+ --duration-leave-l: 300ms;
13
+
14
+ --duration-enter-s: 250ms;
15
+ --duration-enter-m: 300ms;
16
+ --duration-enter-l: 350ms;
17
+
18
+ --duration-effect-s: 350ms;
19
+ --duration-effect-m: 500ms;
20
+ --duration-effect-l: 650ms;
21
+
22
+ --easing-linear: cubic-bezier(0, 0, 1, 1);
23
+ --easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
24
+ --easing-deceleration: cubic-bezier(0, 0, 0.2, 1);
25
+ --easing-acceleration: cubic-bezier(0.4, 0, 1, 1);
26
+
27
+ @each $key, $value in $breakpoints {
28
+ --breakpoint-#{$key}: #{$value};
29
+ }
30
+ }
31
+ /* stylelint-enalbe comment-empty-line-before, custom-property-empty-line-before */
32
+
33
+ * {
34
+ box-sizing: border-box;
35
+
36
+ &::before,
37
+ &::after {
38
+ box-sizing: border-box;
39
+ }
40
+
41
+ &:focus {
42
+ outline: none;
43
+ }
44
+ }
45
+
46
+ [hidden] {
47
+ display: none !important;
48
+ }
49
+
50
+ [v-cloak] {
51
+ display: none !important;
52
+ }
53
+
54
+ html {
55
+ font-size: $font-size; // Базовый размер шрифта устанавливается на корневом элементе страницы (для ед. измерения rem)
56
+ text-size-adjust: 100%; // Отключение увеличения размера шрифта при изменении ориентации устройства в iOS
57
+ }
58
+
59
+ /* stylelint-disable property-disallowed-list */
60
+ button {
61
+ background: none;
62
+ border: 0;
63
+ color: inherit;
64
+ font: inherit;
65
+ margin: 0;
66
+ padding: 0;
67
+ text-align: inherit;
68
+ }
69
+ /* stylelint-enable */
70
+
71
+ img.lazyload:not([src]) {
72
+ visibility: hidden;
73
+ }
74
+
75
+ b,
76
+ strong {
77
+ font-weight: bold;
78
+ }
79
+
80
+ i,
81
+ em {
82
+ font-style: italic;
83
+ }
84
+
85
+ body {
86
+ background-color: $bg-color-primary;
87
+ color: $font-color-primary;
88
+ font-family: $font-family;
89
+ }
@@ -0,0 +1,38 @@
1
+ @use '../../variables' as *;
2
+
3
+ $b: '.action-list';
4
+
5
+ #{$b} {
6
+ &__item {
7
+ }
8
+
9
+ &__link {
10
+ align-items: center;
11
+ color: $action-list-link-color;
12
+ display: flex;
13
+ padding: 4px * 2 4px * 4;
14
+ width: 100%;
15
+
16
+ #{$b}__item:first-child:not(:last-child) & {
17
+ padding-top: 4px * 4;
18
+ }
19
+
20
+ #{$b}__item:last-child:not(:first-child) & {
21
+ padding-bottom: 4px * 4;
22
+ }
23
+
24
+ &_separator {
25
+ border-top: $action-list-link-separator-width solid $action-list-link-separator-color;
26
+ margin-top: 4px;
27
+ padding-top: 4px * 3;
28
+ }
29
+ }
30
+
31
+ &__icon {
32
+ fill: currentcolor;
33
+ flex-shrink: 0;
34
+ height: 4px * 6;
35
+ margin-right: 4px * 2;
36
+ width: 4px * 6;
37
+ }
38
+ }
@@ -0,0 +1,30 @@
1
+ @use '../../variables' as *;
2
+
3
+ $b: '.banner';
4
+
5
+ #{$b} {
6
+ border-radius: $banner-radius;
7
+ display: block;
8
+ overflow: hidden;
9
+
10
+ .content__header + .content__block > & {
11
+ margin-bottom: -4px * 3;
12
+ }
13
+
14
+ &__image {
15
+ display: block;
16
+ width: 100%;
17
+
18
+ &_mobile {
19
+ @media (--tablet-landscape-up) {
20
+ display: none;
21
+ }
22
+ }
23
+
24
+ &_desktop {
25
+ @media (--tablet-portrait-down) {
26
+ display: none;
27
+ }
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,8 @@
1
+ export const init = ($b) => {
2
+ const $toggle = $b.querySelector('.breadcrumbs__mobile-toggle');
3
+
4
+ $toggle.addEventListener('click', () => {
5
+ $b.querySelector('.breadcrumbs__list').classList.add('breadcrumbs__list_active');
6
+ $toggle.remove();
7
+ });
8
+ };
@@ -0,0 +1,55 @@
1
+ @use '../../variables' as *;
2
+
3
+ $b: '.breadcrumbs';
4
+
5
+ #{$b} {
6
+ color: $breadcrumbs-color;
7
+ display: flex;
8
+
9
+ @include font($breadcrumbs-font);
10
+
11
+ &__mobile-toggle {
12
+ margin-right: 4px * 2;
13
+
14
+ @media (--tablet-landscape-up) {
15
+ display: none;
16
+ }
17
+ }
18
+
19
+ &__icon {
20
+ display: block;
21
+ fill: $breadcrumbs-mobile-toggle-color;
22
+ height: 4px * 4;
23
+ width: 4px * 4;
24
+ }
25
+
26
+ &__list {
27
+ display: flex;
28
+ flex-wrap: wrap;
29
+ margin-bottom: -4px;
30
+
31
+ &_active {
32
+ }
33
+ }
34
+
35
+ &__item {
36
+ margin-bottom: 4px;
37
+
38
+ &:not(:last-child) {
39
+ @media (--tablet-portrait-down) {
40
+ display: none;
41
+
42
+ #{$b}__list_active & {
43
+ display: block;
44
+ }
45
+ }
46
+
47
+ &::after {
48
+ color: $breadcrumbs-item-arrow-color;
49
+ content: '→';
50
+ margin-left: 6px;
51
+ margin-right: 6px;
52
+ }
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,223 @@
1
+ @use 'sass:color';
2
+ @use '../../variables' as *;
3
+
4
+ @mixin button(
5
+ $radius: $button-radius,
6
+ $font: $button-font,
7
+ $height: $button-height,
8
+ $min-width: $button-min-width,
9
+ $padding: $button-padding,
10
+ $bg: $button-bg,
11
+ $color: $button-color,
12
+ $border-width: $button-border-width,
13
+ $border-color: $button-border-color,
14
+ $disabled-bg: $button-disabled-bg,
15
+ $disabled-color: $button-disabled-color,
16
+ $disabled-border-color: $button-disabled-border-color,
17
+ $active-bg: $button-active-bg,
18
+ $active-color: $button-active-color,
19
+ $active-border-color: $button-active-border-color
20
+ ) {
21
+ align-items: center;
22
+ background-color: $disabled-bg;
23
+ border-radius: $radius;
24
+ color: $disabled-color;
25
+ cursor: default;
26
+ display: inline-flex;
27
+ height: $height;
28
+ justify-content: center;
29
+ min-width: $min-width;
30
+ padding: $padding;
31
+ text-align: center;
32
+ text-decoration: none;
33
+ transition-duration: var(--duration-micro-s);
34
+ transition-property: background-color, border-color, color;
35
+ transition-timing-function: var(--easing-standard);
36
+ user-select: none;
37
+ white-space: nowrap;
38
+
39
+ @include font($font);
40
+
41
+ @if color.alpha($disabled-bg) == 1 or color.alpha($disabled-bg) == 0 {
42
+ border: $border-width solid $disabled-border-color;
43
+ } @else {
44
+ border: $border-width solid transparent;
45
+ }
46
+
47
+ &:enabled,
48
+ &:any-link {
49
+ background-color: $bg;
50
+ color: $color;
51
+ cursor: pointer;
52
+
53
+ @if color.alpha($bg) == 1 or color.alpha($bg) == 0 {
54
+ border: $border-width solid $border-color;
55
+ } @else {
56
+ border: $border-width solid transparent;
57
+ }
58
+
59
+ &:hover,
60
+ &:focus-visible {
61
+ background-color: $active-bg;
62
+ color: $active-color;
63
+
64
+ @if color.alpha($active-bg) == 1 or color.alpha($active-bg) == 0 {
65
+ border: $border-width solid $active-border-color;
66
+ } @else {
67
+ border: $border-width solid transparent;
68
+ }
69
+ }
70
+ }
71
+ }
72
+
73
+ @mixin only-icon($height: $button-height) {
74
+ min-width: auto;
75
+ padding-left: 0;
76
+ padding-right: 0;
77
+ width: $button-height;
78
+ }
79
+
80
+ @mixin icon(
81
+ $size: $button-icon-size,
82
+ $space-after: $button-icon-space-after,
83
+ $space-before: $button-icon-space-before
84
+ ) {
85
+ display: block; // Для случаев, когда иконка обёрнута в другой блок
86
+ fill: currentcolor;
87
+ flex-shrink: 0;
88
+ height: $size;
89
+ margin-right: $space-after;
90
+ width: $size;
91
+
92
+ &_after {
93
+ margin-left: $space-before;
94
+ margin-right: 0;
95
+ }
96
+ }
97
+
98
+ $b: '.button';
99
+
100
+ #{$b} {
101
+ @include button;
102
+
103
+ &_alt {
104
+ background-color: $button-alt-disabled-bg;
105
+ border: $button-alt-border-width solid $button-alt-disabled-border-color;
106
+ color: $button-alt-disabled-color;
107
+
108
+ &:enabled,
109
+ &:any-link {
110
+ background-color: $button-alt-bg;
111
+ border-color: $button-alt-border-color;
112
+ color: $button-alt-color;
113
+
114
+ &:hover,
115
+ &:focus-visible {
116
+ background-color: $button-alt-active-bg;
117
+ border-color: $button-alt-active-border-color;
118
+ color: $button-alt-active-color;
119
+ }
120
+ }
121
+ }
122
+
123
+ &_ghost {
124
+ background-color: $button-ghost-disabled-bg;
125
+ border: $button-ghost-border-width solid $button-ghost-disabled-border-color;
126
+ color: $button-ghost-disabled-color;
127
+
128
+ &:enabled,
129
+ &:any-link {
130
+ background-color: $button-ghost-bg;
131
+ border-color: $button-ghost-border-color;
132
+ color: $button-ghost-color;
133
+
134
+ &:hover,
135
+ &:focus-visible {
136
+ background-color: $button-ghost-active-bg;
137
+ border-color: $button-ghost-active-border-color;
138
+ color: $button-ghost-active-color;
139
+ }
140
+ }
141
+ }
142
+
143
+ &_grey {
144
+ background-color: $button-grey-disabled-bg;
145
+ border: $button-grey-border-width solid $button-grey-disabled-border-color;
146
+ color: $button-grey-disabled-color;
147
+
148
+ &:enabled,
149
+ &:any-link {
150
+ background-color: $button-grey-bg;
151
+ border-color: $button-grey-border-color;
152
+ color: $button-grey-color;
153
+
154
+ &:hover,
155
+ &:focus-visible {
156
+ background-color: $button-grey-active-bg;
157
+ border-color: $button-grey-active-border-color;
158
+ color: $button-grey-active-color;
159
+ }
160
+ }
161
+ }
162
+
163
+ &_inverted {
164
+ background-color: $button-inverted-disabled-bg;
165
+ border: $button-inverted-border-width solid $button-inverted-disabled-border-color;
166
+ color: $button-inverted-disabled-color;
167
+
168
+ &:enabled,
169
+ &:any-link {
170
+ background-color: $button-inverted-bg;
171
+ border-color: $button-inverted-border-color;
172
+ color: $button-inverted-color;
173
+
174
+ &:hover,
175
+ &:focus-visible {
176
+ background-color: $button-inverted-active-bg;
177
+ border-color: $button-inverted-active-border-color;
178
+ color: $button-inverted-active-color;
179
+ }
180
+ }
181
+ }
182
+
183
+ &_fluid {
184
+ width: 100%;
185
+ }
186
+
187
+ &_wide {
188
+ min-width: $button-wide-min-width;
189
+
190
+ &#{$b}_small {
191
+ min-width: $button-small-wide-min-width;
192
+ }
193
+ }
194
+
195
+ &_narrow {
196
+ min-width: 4px * 18;
197
+ padding: 0 4px * 4;
198
+ }
199
+
200
+ &_small {
201
+ height: $button-small-height;
202
+ min-width: $button-small-min-width;
203
+ padding: $button-small-padding;
204
+
205
+ @include font($button-small-font);
206
+ }
207
+
208
+ &_square {
209
+ border-radius: $button-square-radius;
210
+ }
211
+
212
+ &_only-icon {
213
+ @include only-icon;
214
+ }
215
+
216
+ &__icon {
217
+ @include icon;
218
+
219
+ #{$b}_only-icon & {
220
+ margin-right: 0;
221
+ }
222
+ }
223
+ }