@dss-kit/ui-kit 0.2.29 → 0.2.31
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/README.md +21 -21
- package/dist/styles/utils/breakpoints/base.scss +11 -11
- package/dist/styles/utils/breakpoints/index.scss +3 -3
- package/dist/styles/utils/breakpoints/screen.scss +61 -61
- package/dist/styles/utils/breakpoints/semantic.scss +31 -31
- package/dist/styles/utils/breakpoints.d.ts +11 -12
- package/dist/styles/utils/breakpoints.d.ts.map +1 -1
- package/dist/styles/utils/breakpoints.ts +35 -21
- package/dist/styles/utils/fonts/font-family.scss +3 -3
- package/dist/styles/utils/fonts/index.scss +1 -1
- package/dist/styles/utils/index.scss +5 -5
- package/dist/styles/utils/size/index.scss +1 -1
- package/dist/styles/utils/size/modifiers.scss +40 -40
- package/dist/styles/utils/style/index.scss +1 -1
- package/dist/styles/utils/style/variants.scss +34 -34
- package/dist/styles/utils/typography/_font-weight.scss +33 -33
- package/dist/styles/utils/typography/_variants.scss +85 -85
- package/dist/styles/utils/typography/index.scss +2 -2
- package/dist/ui-kit.cjs.js +46 -46
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.es.js +7400 -7362
- package/dist/ui-kit.es.js.map +1 -1
- package/dist/utils/hooks/breakpoints/index.d.ts +2 -0
- package/dist/utils/hooks/breakpoints/index.d.ts.map +1 -0
- package/dist/utils/hooks/breakpoints/useBreakpoint/index.d.ts +4 -0
- package/dist/utils/hooks/breakpoints/useBreakpoint/index.d.ts.map +1 -0
- package/dist/utils/hooks/breakpoints/useBreakpoint/useBreakpoint.const.d.ts +15 -0
- package/dist/utils/hooks/breakpoints/useBreakpoint/useBreakpoint.const.d.ts.map +1 -0
- package/dist/utils/hooks/breakpoints/useBreakpoint/useBreakpoint.d.ts +18 -0
- package/dist/utils/hooks/breakpoints/useBreakpoint/useBreakpoint.d.ts.map +1 -0
- package/dist/utils/hooks/breakpoints/useBreakpoint/useBreakpoint.types.d.ts +20 -0
- package/dist/utils/hooks/breakpoints/useBreakpoint/useBreakpoint.types.d.ts.map +1 -0
- package/dist/utils/hooks/index.d.ts +1 -0
- package/dist/utils/hooks/index.d.ts.map +1 -1
- package/package.json +92 -92
package/README.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
# UI Kit
|
|
2
|
-
|
|
3
|
-
Библиотека React компонентов с дизайн-системой для внутренних проектов.
|
|
4
|
-
|
|
5
|
-
## Включает:
|
|
6
|
-
|
|
7
|
-
- React компоненты
|
|
8
|
-
- CSS переменные и токены дизайна
|
|
9
|
-
- SCSS утилиты и миксины
|
|
10
|
-
- TypeScript типы
|
|
11
|
-
- SVG иконки
|
|
12
|
-
- Провайдеры тем (ThemeProviderScoped)
|
|
13
|
-
|
|
14
|
-
## Документация
|
|
15
|
-
|
|
16
|
-
Ссылки на более подробную документацию по разделам
|
|
17
|
-
|
|
18
|
-
- **[Сборка](./docs/build/index.md)** - команды сборки, публикация в npm, конфигурации Vite и т.д.
|
|
19
|
-
- **[Использование](./docs/usage/index.md)** - как использовать UI Kit в проектах, подключение стилей, примеры компонентов
|
|
20
|
-
- **[Стили](./docs/styles/index.md)** - подключение шрифтов, CSS переменных, базовые стили и миксины
|
|
21
|
-
- **[Утилиты](./docs/utils/index.md)** - функции хелперы
|
|
1
|
+
# UI Kit
|
|
2
|
+
|
|
3
|
+
Библиотека React компонентов с дизайн-системой для внутренних проектов.
|
|
4
|
+
|
|
5
|
+
## Включает:
|
|
6
|
+
|
|
7
|
+
- React компоненты
|
|
8
|
+
- CSS переменные и токены дизайна
|
|
9
|
+
- SCSS утилиты и миксины
|
|
10
|
+
- TypeScript типы
|
|
11
|
+
- SVG иконки
|
|
12
|
+
- Провайдеры тем (ThemeProviderScoped)
|
|
13
|
+
|
|
14
|
+
## Документация
|
|
15
|
+
|
|
16
|
+
Ссылки на более подробную документацию по разделам
|
|
17
|
+
|
|
18
|
+
- **[Сборка](./docs/build/index.md)** - команды сборки, публикация в npm, конфигурации Vite и т.д.
|
|
19
|
+
- **[Использование](./docs/usage/index.md)** - как использовать UI Kit в проектах, подключение стилей, примеры компонентов
|
|
20
|
+
- **[Стили](./docs/styles/index.md)** - подключение шрифтов, CSS переменных, базовые стили и миксины
|
|
21
|
+
- **[Утилиты](./docs/utils/index.md)** - функции хелперы
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@mixin breakpoint($breakpoint, $direction: max) {
|
|
2
|
-
@if $direction == min {
|
|
3
|
-
@media (min-width: $breakpoint) {
|
|
4
|
-
@content;
|
|
5
|
-
}
|
|
6
|
-
} @else if $direction == max {
|
|
7
|
-
@media (max-width: ($breakpoint - 1px)) {
|
|
8
|
-
@content;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
@mixin breakpoint($breakpoint, $direction: max) {
|
|
2
|
+
@if $direction == min {
|
|
3
|
+
@media (min-width: $breakpoint) {
|
|
4
|
+
@content;
|
|
5
|
+
}
|
|
6
|
+
} @else if $direction == max {
|
|
7
|
+
@media (max-width: ($breakpoint - 1px)) {
|
|
8
|
+
@content;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@forward "base";
|
|
2
|
-
@forward "screen";
|
|
3
|
-
@forward "semantic";
|
|
1
|
+
@forward "base";
|
|
2
|
+
@forward "screen";
|
|
3
|
+
@forward "semantic";
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
@use "./base.scss";
|
|
2
|
-
|
|
3
|
-
@mixin bp-1920($direction: max) {
|
|
4
|
-
@include base.breakpoint(1920px, $direction) {
|
|
5
|
-
@content;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@mixin bp-1440($direction: max) {
|
|
10
|
-
@include base.breakpoint(1440px, $direction) {
|
|
11
|
-
@content;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@mixin bp-1280($direction: max) {
|
|
16
|
-
@include base.breakpoint(1280px, $direction) {
|
|
17
|
-
@content;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@mixin bp-1200($direction: max) {
|
|
22
|
-
@include base.breakpoint(1200px, $direction) {
|
|
23
|
-
@content;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@mixin bp-1024($direction: max) {
|
|
28
|
-
@include base.breakpoint(1024px, $direction) {
|
|
29
|
-
@content;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@mixin bp-992($direction: max) {
|
|
34
|
-
@include base.breakpoint(992px, $direction) {
|
|
35
|
-
@content;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@mixin bp-768($direction: max) {
|
|
40
|
-
@include base.breakpoint(768px, $direction) {
|
|
41
|
-
@content;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@mixin bp-576($direction: max) {
|
|
46
|
-
@include base.breakpoint(576px, $direction) {
|
|
47
|
-
@content;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@mixin bp-480($direction: max) {
|
|
52
|
-
@include base.breakpoint(480px, $direction) {
|
|
53
|
-
@content;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@mixin bp-375($direction: max) {
|
|
58
|
-
@include base.breakpoint(375px, $direction) {
|
|
59
|
-
@content;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
@use "./base.scss";
|
|
2
|
+
|
|
3
|
+
@mixin bp-1920($direction: max) {
|
|
4
|
+
@include base.breakpoint(1920px, $direction) {
|
|
5
|
+
@content;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@mixin bp-1440($direction: max) {
|
|
10
|
+
@include base.breakpoint(1440px, $direction) {
|
|
11
|
+
@content;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@mixin bp-1280($direction: max) {
|
|
16
|
+
@include base.breakpoint(1280px, $direction) {
|
|
17
|
+
@content;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@mixin bp-1200($direction: max) {
|
|
22
|
+
@include base.breakpoint(1200px, $direction) {
|
|
23
|
+
@content;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin bp-1024($direction: max) {
|
|
28
|
+
@include base.breakpoint(1024px, $direction) {
|
|
29
|
+
@content;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@mixin bp-992($direction: max) {
|
|
34
|
+
@include base.breakpoint(992px, $direction) {
|
|
35
|
+
@content;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@mixin bp-768($direction: max) {
|
|
40
|
+
@include base.breakpoint(768px, $direction) {
|
|
41
|
+
@content;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@mixin bp-576($direction: max) {
|
|
46
|
+
@include base.breakpoint(576px, $direction) {
|
|
47
|
+
@content;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@mixin bp-480($direction: max) {
|
|
52
|
+
@include base.breakpoint(480px, $direction) {
|
|
53
|
+
@content;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@mixin bp-375($direction: max) {
|
|
58
|
+
@include base.breakpoint(375px, $direction) {
|
|
59
|
+
@content;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
@use "./screen.scss";
|
|
2
|
-
|
|
3
|
-
@mixin bp-xs($direction: max) {
|
|
4
|
-
@include screen.bp-480($direction) {
|
|
5
|
-
@content;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@mixin bp-sm($direction: max) {
|
|
10
|
-
@include screen.bp-576($direction) {
|
|
11
|
-
@content;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@mixin bp-md($direction: max) {
|
|
16
|
-
@include screen.bp-768($direction) {
|
|
17
|
-
@content;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@mixin bp-lg($direction: max) {
|
|
22
|
-
@include screen.bp-992($direction) {
|
|
23
|
-
@content;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@mixin bp-xl($direction: max) {
|
|
28
|
-
@include screen.bp-1200($direction) {
|
|
29
|
-
@content;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
@use "./screen.scss";
|
|
2
|
+
|
|
3
|
+
@mixin bp-xs($direction: max) {
|
|
4
|
+
@include screen.bp-480($direction) {
|
|
5
|
+
@content;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@mixin bp-sm($direction: max) {
|
|
10
|
+
@include screen.bp-576($direction) {
|
|
11
|
+
@content;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@mixin bp-md($direction: max) {
|
|
16
|
+
@include screen.bp-768($direction) {
|
|
17
|
+
@content;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@mixin bp-lg($direction: max) {
|
|
22
|
+
@include screen.bp-992($direction) {
|
|
23
|
+
@content;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin bp-xl($direction: max) {
|
|
28
|
+
@include screen.bp-1200($direction) {
|
|
29
|
+
@content;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { BreakpointDirection } from '../../utils';
|
|
2
2
|
export declare const bp: {
|
|
3
|
-
readonly xs: (direction?:
|
|
4
|
-
readonly sm: (direction?:
|
|
5
|
-
readonly md: (direction?:
|
|
6
|
-
readonly lg: (direction?:
|
|
7
|
-
readonly xl: (direction?:
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
3
|
+
readonly xs: (direction?: BreakpointDirection) => string;
|
|
4
|
+
readonly sm: (direction?: BreakpointDirection) => string;
|
|
5
|
+
readonly md: (direction?: BreakpointDirection) => string;
|
|
6
|
+
readonly lg: (direction?: BreakpointDirection) => string;
|
|
7
|
+
readonly xl: (direction?: BreakpointDirection) => string;
|
|
8
|
+
readonly bp375: (direction?: BreakpointDirection) => string;
|
|
9
|
+
readonly bp1024: (direction?: BreakpointDirection) => string;
|
|
10
|
+
readonly bp1280: (direction?: BreakpointDirection) => string;
|
|
11
|
+
readonly bp1440: (direction?: BreakpointDirection) => string;
|
|
12
|
+
readonly bp1920: (direction?: BreakpointDirection) => string;
|
|
13
13
|
};
|
|
14
|
-
export {};
|
|
15
14
|
//# sourceMappingURL=breakpoints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../../src/styles/utils/breakpoints.ts"],"names":[],"mappings":"AAAA,KAAK,
|
|
1
|
+
{"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../../src/styles/utils/breakpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAanD,eAAO,MAAM,EAAE;8BACG,mBAAmB;8BAEnB,mBAAmB;8BAEnB,mBAAmB;8BAEnB,mBAAmB;8BAEnB,mBAAmB;iCAEhB,mBAAmB;kCAElB,mBAAmB;kCAEnB,mBAAmB;kCAEnB,mBAAmB;kCAEnB,mBAAmB;CAE/B,CAAC"}
|
|
@@ -1,21 +1,35 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import type { BreakpointDirection } from "@/utils";
|
|
2
|
+
import { Breakpoints, BreakpointsBase } from "@/utils";
|
|
3
|
+
|
|
4
|
+
const breakpoint = (
|
|
5
|
+
px: number,
|
|
6
|
+
direction: BreakpointDirection = "max"
|
|
7
|
+
): string => {
|
|
8
|
+
if (direction === "min") {
|
|
9
|
+
return `@media (min-width: ${px}px)`;
|
|
10
|
+
}
|
|
11
|
+
return `@media (max-width: ${px - 1}px)`;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const bp = {
|
|
15
|
+
xs: (direction: BreakpointDirection = "max") =>
|
|
16
|
+
breakpoint(Breakpoints.xs, direction),
|
|
17
|
+
sm: (direction: BreakpointDirection = "max") =>
|
|
18
|
+
breakpoint(Breakpoints.sm, direction),
|
|
19
|
+
md: (direction: BreakpointDirection = "max") =>
|
|
20
|
+
breakpoint(Breakpoints.md, direction),
|
|
21
|
+
lg: (direction: BreakpointDirection = "max") =>
|
|
22
|
+
breakpoint(Breakpoints.lg, direction),
|
|
23
|
+
xl: (direction: BreakpointDirection = "max") =>
|
|
24
|
+
breakpoint(Breakpoints.xl, direction),
|
|
25
|
+
bp375: (direction: BreakpointDirection = "max") =>
|
|
26
|
+
breakpoint(BreakpointsBase._375, direction),
|
|
27
|
+
bp1024: (direction: BreakpointDirection = "max") =>
|
|
28
|
+
breakpoint(BreakpointsBase._1024, direction),
|
|
29
|
+
bp1280: (direction: BreakpointDirection = "max") =>
|
|
30
|
+
breakpoint(BreakpointsBase._1280, direction),
|
|
31
|
+
bp1440: (direction: BreakpointDirection = "max") =>
|
|
32
|
+
breakpoint(BreakpointsBase._1440, direction),
|
|
33
|
+
bp1920: (direction: BreakpointDirection = "max") =>
|
|
34
|
+
breakpoint(BreakpointsBase._1920, direction),
|
|
35
|
+
} as const;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@mixin Inter {
|
|
2
|
-
font-family: Inter, sans-serif;
|
|
3
|
-
}
|
|
1
|
+
@mixin Inter {
|
|
2
|
+
font-family: Inter, sans-serif;
|
|
3
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@forward "font-family";
|
|
1
|
+
@forward "font-family";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@forward "breakpoints";
|
|
2
|
-
@forward "fonts";
|
|
3
|
-
@forward "size";
|
|
4
|
-
@forward "typography";
|
|
5
|
-
@forward "style";
|
|
1
|
+
@forward "breakpoints";
|
|
2
|
+
@forward "fonts";
|
|
3
|
+
@forward "size";
|
|
4
|
+
@forward "typography";
|
|
5
|
+
@forward "style";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@forward "modifiers";
|
|
1
|
+
@forward "modifiers";
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
@mixin xxs-modifier {
|
|
2
|
-
&_2xsSize {
|
|
3
|
-
@content;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
@mixin xs-modifier {
|
|
8
|
-
&_xsSize {
|
|
9
|
-
@content;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@mixin sm-modifier {
|
|
14
|
-
&_smSize {
|
|
15
|
-
@content;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@mixin md-modifier {
|
|
20
|
-
&_mdSize {
|
|
21
|
-
@content;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@mixin lg-modifier {
|
|
26
|
-
&_lgSize {
|
|
27
|
-
@content;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@mixin xl-modifier {
|
|
32
|
-
&_xlSize {
|
|
33
|
-
@content;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@mixin xxl-modifier {
|
|
38
|
-
&_2xlSize {
|
|
39
|
-
@content;
|
|
40
|
-
}
|
|
1
|
+
@mixin xxs-modifier {
|
|
2
|
+
&_2xsSize {
|
|
3
|
+
@content;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@mixin xs-modifier {
|
|
8
|
+
&_xsSize {
|
|
9
|
+
@content;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin sm-modifier {
|
|
14
|
+
&_smSize {
|
|
15
|
+
@content;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@mixin md-modifier {
|
|
20
|
+
&_mdSize {
|
|
21
|
+
@content;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@mixin lg-modifier {
|
|
26
|
+
&_lgSize {
|
|
27
|
+
@content;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin xl-modifier {
|
|
32
|
+
&_xlSize {
|
|
33
|
+
@content;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@mixin xxl-modifier {
|
|
38
|
+
&_2xlSize {
|
|
39
|
+
@content;
|
|
40
|
+
}
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@forward "variants";
|
|
1
|
+
@forward "variants";
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
@mixin style-variant-text($map, $pseudo-class: null, $postfix: "") {
|
|
2
|
-
@each $style, $color in $map {
|
|
3
|
-
&_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
|
|
4
|
-
color: $color;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@mixin style-variant-border($width: 1px, $map, $pseudo-class: null, $postfix: "") {
|
|
10
|
-
border: $width solid transparent;
|
|
11
|
-
@each $style, $color in $map {
|
|
12
|
-
&_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
|
|
13
|
-
border-color: $color;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@mixin style-variant-bg($map, $pseudo-class: null, $postfix: "") {
|
|
19
|
-
@each $style, $color in $map {
|
|
20
|
-
&_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
|
|
21
|
-
background-color: $color;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@mixin style-variant-svg($map, $pseudo-class: null, $postfix: "") {
|
|
27
|
-
@each $style, $color in $map {
|
|
28
|
-
&_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
|
|
29
|
-
svg {
|
|
30
|
-
color: $color;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
@mixin style-variant-text($map, $pseudo-class: null, $postfix: "") {
|
|
2
|
+
@each $style, $color in $map {
|
|
3
|
+
&_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
|
|
4
|
+
color: $color;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@mixin style-variant-border($width: 1px, $map, $pseudo-class: null, $postfix: "") {
|
|
10
|
+
border: $width solid transparent;
|
|
11
|
+
@each $style, $color in $map {
|
|
12
|
+
&_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
|
|
13
|
+
border-color: $color;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@mixin style-variant-bg($map, $pseudo-class: null, $postfix: "") {
|
|
19
|
+
@each $style, $color in $map {
|
|
20
|
+
&_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
|
|
21
|
+
background-color: $color;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@mixin style-variant-svg($map, $pseudo-class: null, $postfix: "") {
|
|
27
|
+
@each $style, $color in $map {
|
|
28
|
+
&_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
|
|
29
|
+
svg {
|
|
30
|
+
color: $color;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
$font-weight: (
|
|
4
|
-
regular: 400,
|
|
5
|
-
medium: 500,
|
|
6
|
-
semibold: 600,
|
|
7
|
-
bold: 700,
|
|
8
|
-
) !default;
|
|
9
|
-
|
|
10
|
-
@function font-weight-token($name) {
|
|
11
|
-
@if not map.has-key($font-weight, $name) {
|
|
12
|
-
@error "Unknown font-weight token `#{$name}`";
|
|
13
|
-
}
|
|
14
|
-
@return map.get($font-weight, $name);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@mixin font-weight($name) {
|
|
18
|
-
font-weight: font-weight-token($name);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// опциональные алиасы ради DX/совместимости
|
|
22
|
-
@mixin font-regular {
|
|
23
|
-
@include font-weight(regular);
|
|
24
|
-
}
|
|
25
|
-
@mixin font-medium {
|
|
26
|
-
@include font-weight(medium);
|
|
27
|
-
}
|
|
28
|
-
@mixin font-semibold {
|
|
29
|
-
@include font-weight(semibold);
|
|
30
|
-
}
|
|
31
|
-
@mixin font-bold {
|
|
32
|
-
@include font-weight(bold);
|
|
33
|
-
}
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
$font-weight: (
|
|
4
|
+
regular: 400,
|
|
5
|
+
medium: 500,
|
|
6
|
+
semibold: 600,
|
|
7
|
+
bold: 700,
|
|
8
|
+
) !default;
|
|
9
|
+
|
|
10
|
+
@function font-weight-token($name) {
|
|
11
|
+
@if not map.has-key($font-weight, $name) {
|
|
12
|
+
@error "Unknown font-weight token `#{$name}`";
|
|
13
|
+
}
|
|
14
|
+
@return map.get($font-weight, $name);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@mixin font-weight($name) {
|
|
18
|
+
font-weight: font-weight-token($name);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// опциональные алиасы ради DX/совместимости
|
|
22
|
+
@mixin font-regular {
|
|
23
|
+
@include font-weight(regular);
|
|
24
|
+
}
|
|
25
|
+
@mixin font-medium {
|
|
26
|
+
@include font-weight(medium);
|
|
27
|
+
}
|
|
28
|
+
@mixin font-semibold {
|
|
29
|
+
@include font-weight(semibold);
|
|
30
|
+
}
|
|
31
|
+
@mixin font-bold {
|
|
32
|
+
@include font-weight(bold);
|
|
33
|
+
}
|