@dss-kit/ui-kit 0.2.31 → 0.2.33
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/components/builders/Loader/Loader.d.ts +2 -0
- package/dist/components/builders/Loader/Loader.d.ts.map +1 -1
- package/dist/components/builders/Modal/Modal.d.ts +3 -0
- package/dist/components/builders/Modal/Modal.d.ts.map +1 -1
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts +8 -0
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts.map +1 -1
- package/dist/components/builders/Table/Table.d.ts +1 -1
- package/dist/components/builders/Table/Table.d.ts.map +1 -1
- package/dist/components/builders/Table/Table.stories.d.ts.map +1 -1
- package/dist/components/builders/Table/Table.types.d.ts +20 -1
- package/dist/components/builders/Table/Table.types.d.ts.map +1 -1
- package/dist/components/builders/Table/TableHeadCellContent/TableHeadCellContent.d.ts.map +1 -1
- package/dist/components/builders/Table/TablePagination/TablePagination.d.ts +28 -0
- package/dist/components/builders/Table/TablePagination/TablePagination.d.ts.map +1 -1
- package/dist/components/builders/Table/TablePagination/index.d.ts +1 -1
- package/dist/components/builders/Table/TablePagination/index.d.ts.map +1 -1
- package/dist/components/builders/Table/TableWrapper/TableWrapper.d.ts +3 -1
- package/dist/components/builders/Table/TableWrapper/TableWrapper.d.ts.map +1 -1
- package/dist/components/charts/LineChart/LineChart.d.ts.map +1 -1
- package/dist/components/charts/PieProgressChart/PieProgressChart.d.ts.map +1 -1
- package/dist/components/controls/Button/Button.d.ts +9 -0
- package/dist/components/controls/Button/Button.d.ts.map +1 -1
- package/dist/components/controls/Checkbox/Checkbox.d.ts +10 -0
- package/dist/components/controls/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/controls/IconButton/IconButton.stories.d.ts +1 -0
- package/dist/components/controls/IconButton/IconButton.stories.d.ts.map +1 -1
- package/dist/components/controls/Input/Input.d.ts +15 -2
- package/dist/components/controls/Input/Input.d.ts.map +1 -1
- package/dist/components/controls/Input/Input.stories.d.ts.map +1 -1
- package/dist/components/controls/MarkdownTextEditor/MarkdownTextEditor.d.ts +1 -1
- package/dist/components/controls/MarkdownTextEditor/MarkdownTextEditor.d.ts.map +1 -1
- package/dist/components/controls/MarkdownTextEditor/MarkdownTextEditor.types.d.ts +12 -0
- package/dist/components/controls/MarkdownTextEditor/MarkdownTextEditor.types.d.ts.map +1 -1
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/EditorToolbar.d.ts +1 -1
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/EditorToolbar.d.ts.map +1 -1
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/EditorToolbar.types.d.ts +2 -0
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/EditorToolbar.types.d.ts.map +1 -1
- package/dist/components/controls/MarkdownTextEditor/components/MarkdownField/MarkdownField.types.d.ts +2 -0
- package/dist/components/controls/MarkdownTextEditor/components/MarkdownField/MarkdownField.types.d.ts.map +1 -1
- package/dist/components/controls/MarkdownTextEditor/components/MarkdownPreview/MarkdownPreview.d.ts +8 -1
- package/dist/components/controls/MarkdownTextEditor/components/MarkdownPreview/MarkdownPreview.d.ts.map +1 -1
- package/dist/components/controls/OtpInput/OtpInput.d.ts +10 -0
- package/dist/components/controls/OtpInput/OtpInput.d.ts.map +1 -1
- package/dist/components/controls/RadioGroup/Radio.d.ts +10 -0
- package/dist/components/controls/RadioGroup/Radio.d.ts.map +1 -1
- package/dist/components/controls/RadioGroup/RadioGroup.d.ts +4 -0
- package/dist/components/controls/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/controls/SegmentControl/SegmentControl.d.ts +13 -1
- package/dist/components/controls/SegmentControl/SegmentControl.d.ts.map +1 -1
- package/dist/components/controls/Select/Select.d.ts +15 -1
- package/dist/components/controls/Select/Select.d.ts.map +1 -1
- package/dist/components/controls/Switch/Switch.d.ts +16 -0
- package/dist/components/controls/Switch/Switch.d.ts.map +1 -1
- package/dist/components/controls/Tabs/TabItem/TabItem.d.ts +6 -0
- package/dist/components/controls/Tabs/TabItem/TabItem.d.ts.map +1 -1
- package/dist/components/controls/Tabs/Tabs.d.ts +9 -1
- package/dist/components/controls/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/navigation/Breadcrumbs/Breadcrumbs.d.ts +6 -0
- package/dist/components/navigation/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/shared/Badge/Badge.d.ts +4 -0
- package/dist/components/shared/Badge/Badge.d.ts.map +1 -1
- package/dist/components/shared/Hint/Hint.d.ts +8 -0
- package/dist/components/shared/Hint/Hint.d.ts.map +1 -1
- package/dist/components/shared/MarkdownText/MarkdownText.d.ts +3 -1
- package/dist/components/shared/MarkdownText/MarkdownText.d.ts.map +1 -1
- package/dist/components/shared/Popover/Popover.d.ts +2 -0
- package/dist/components/shared/Popover/Popover.d.ts.map +1 -1
- package/dist/components/shared/Skeleton/Skeleton.d.ts +5 -0
- package/dist/components/shared/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/shared/Tag/Tag.d.ts +8 -0
- package/dist/components/shared/Tag/Tag.d.ts.map +1 -1
- package/dist/components/shared/Toast/Toast.d.ts +10 -0
- package/dist/components/shared/Toast/Toast.d.ts.map +1 -1
- package/dist/components/shared/Toast/ToastContainer.d.ts +7 -1
- package/dist/components/shared/Toast/ToastContainer.d.ts.map +1 -1
- package/dist/components/shared/Tooltip/Tooltip.d.ts +4 -0
- package/dist/components/shared/Tooltip/Tooltip.d.ts.map +1 -1
- 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.ts +35 -35
- 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 +11536 -11045
- package/dist/ui-kit.es.js.map +1 -1
- package/package.json +92 -92
|
@@ -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,35 +1,35 @@
|
|
|
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
|
+
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
|
+
}
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
@use "../fonts";
|
|
2
|
-
@use "../breakpoints/semantic.scss" as breakpoints;
|
|
3
|
-
|
|
4
|
-
/* Общий базовый стиль для любого текста */
|
|
5
|
-
@mixin common {
|
|
6
|
-
@include fonts.Inter;
|
|
7
|
-
word-break: break-word;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/* Быстрое объявление font-size + line-height */
|
|
11
|
-
@mixin text-size($font-size, $line-height) {
|
|
12
|
-
font-size: $font-size;
|
|
13
|
-
line-height: $line-height;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* ==== Titles ==== */
|
|
17
|
-
@mixin title-1 {
|
|
18
|
-
@include text-size(32px, 36px);
|
|
19
|
-
|
|
20
|
-
// md = 768px
|
|
21
|
-
@include breakpoints.bp-md() {
|
|
22
|
-
font-size: 24px;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@mixin title-2 {
|
|
27
|
-
@include text-size(24px, 28px);
|
|
28
|
-
|
|
29
|
-
// md = 768px
|
|
30
|
-
@include breakpoints.bp-md() {
|
|
31
|
-
font-size: 20px;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@mixin title-3 {
|
|
36
|
-
@include text-size(20px, 28px);
|
|
37
|
-
|
|
38
|
-
// md = 768px
|
|
39
|
-
@include breakpoints.bp-md() {
|
|
40
|
-
font-size: 18px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// xs = 480px
|
|
44
|
-
@include breakpoints.bp-xs() {
|
|
45
|
-
font-size: 16px;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/* ==== Headline ==== */
|
|
50
|
-
@mixin headline-1 {
|
|
51
|
-
font-size: 22px;
|
|
52
|
-
line-height: 26px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@mixin headline-2 {
|
|
56
|
-
font-size: 18px;
|
|
57
|
-
line-height: 22px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@mixin headline-3 {
|
|
61
|
-
font-size: 16px;
|
|
62
|
-
line-height: 20px;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/* ==== Body ==== */
|
|
66
|
-
@mixin body-1 {
|
|
67
|
-
font-size: 16px;
|
|
68
|
-
line-height: 24px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@mixin body-2 {
|
|
72
|
-
font-size: 14px;
|
|
73
|
-
line-height: 20px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* ==== Caption ==== */
|
|
77
|
-
@mixin caption-1 {
|
|
78
|
-
font-size: 12px;
|
|
79
|
-
line-height: 16px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@mixin caption-2 {
|
|
83
|
-
font-size: 10px;
|
|
84
|
-
line-height: 14px;
|
|
85
|
-
}
|
|
1
|
+
@use "../fonts";
|
|
2
|
+
@use "../breakpoints/semantic.scss" as breakpoints;
|
|
3
|
+
|
|
4
|
+
/* Общий базовый стиль для любого текста */
|
|
5
|
+
@mixin common {
|
|
6
|
+
@include fonts.Inter;
|
|
7
|
+
word-break: break-word;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Быстрое объявление font-size + line-height */
|
|
11
|
+
@mixin text-size($font-size, $line-height) {
|
|
12
|
+
font-size: $font-size;
|
|
13
|
+
line-height: $line-height;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* ==== Titles ==== */
|
|
17
|
+
@mixin title-1 {
|
|
18
|
+
@include text-size(32px, 36px);
|
|
19
|
+
|
|
20
|
+
// md = 768px
|
|
21
|
+
@include breakpoints.bp-md() {
|
|
22
|
+
font-size: 24px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@mixin title-2 {
|
|
27
|
+
@include text-size(24px, 28px);
|
|
28
|
+
|
|
29
|
+
// md = 768px
|
|
30
|
+
@include breakpoints.bp-md() {
|
|
31
|
+
font-size: 20px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@mixin title-3 {
|
|
36
|
+
@include text-size(20px, 28px);
|
|
37
|
+
|
|
38
|
+
// md = 768px
|
|
39
|
+
@include breakpoints.bp-md() {
|
|
40
|
+
font-size: 18px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// xs = 480px
|
|
44
|
+
@include breakpoints.bp-xs() {
|
|
45
|
+
font-size: 16px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ==== Headline ==== */
|
|
50
|
+
@mixin headline-1 {
|
|
51
|
+
font-size: 22px;
|
|
52
|
+
line-height: 26px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@mixin headline-2 {
|
|
56
|
+
font-size: 18px;
|
|
57
|
+
line-height: 22px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@mixin headline-3 {
|
|
61
|
+
font-size: 16px;
|
|
62
|
+
line-height: 20px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* ==== Body ==== */
|
|
66
|
+
@mixin body-1 {
|
|
67
|
+
font-size: 16px;
|
|
68
|
+
line-height: 24px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@mixin body-2 {
|
|
72
|
+
font-size: 14px;
|
|
73
|
+
line-height: 20px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* ==== Caption ==== */
|
|
77
|
+
@mixin caption-1 {
|
|
78
|
+
font-size: 12px;
|
|
79
|
+
line-height: 16px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@mixin caption-2 {
|
|
83
|
+
font-size: 10px;
|
|
84
|
+
line-height: 14px;
|
|
85
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@forward "_variants";
|
|
2
|
-
@forward "_font-weight";
|
|
1
|
+
@forward "_variants";
|
|
2
|
+
@forward "_font-weight";
|