beathers 5.7.2 → 5.7.6
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/.prettierrc.js +8 -8
- package/CHANGELOG +274 -267
- package/css/beathers.min.css +3 -3
- package/css/beathers.min.css.map +1 -1
- package/docs/colors.md +250 -250
- package/docs/grid-system.md +130 -130
- package/docs/shaping.md +272 -272
- package/docs/typography.md +124 -124
- package/package.json +105 -101
- package/readme.md +301 -301
- package/scripts/cli.js +0 -0
- package/scripts/helpers/Merge.d.ts.map +1 -1
- package/scripts/helpers/Merge.js +4 -3
- package/scss/_variables.scss +106 -106
- package/scss/beathers.min.scss +14 -15
- package/scss/functions/_colors.scss +230 -230
- package/scss/functions/_mediaQueries.scss +136 -136
- package/scss/functions/_others.scss +79 -79
- package/scss/functions/_typographic.scss +129 -129
- package/scss/functions/_validations.scss +251 -251
- package/scss/settings/_configs.scss +270 -270
- package/scss/settings/_defaults.scss +214 -214
- package/scss/settings/_index.scss +90 -90
- package/scss/style/_button.scss +101 -101
- package/scss/style/_colors.scss +146 -146
- package/scss/style/_dialog.scss +146 -146
- package/scss/style/_glass.scss +80 -80
- package/scss/style/_grid.scss +95 -95
- package/scss/style/_loader.scss +62 -62
- package/scss/style/_resets.scss +168 -168
- package/scss/style/_shaping.scss +439 -432
- package/scss/style/_typographic.scss +345 -345
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
@use 'sass:string';
|
|
2
|
-
@use 'sass:map';
|
|
3
|
-
@use '../variables' as vars;
|
|
4
|
-
@use '../settings/defaults' as defs;
|
|
5
|
-
@use '../functions/validations' as val;
|
|
6
|
-
@use '../settings/configs' as configs;
|
|
7
|
-
|
|
8
|
-
// Definitions
|
|
9
|
-
$fontMainPath: if(vars.$fontMainPath != null, vars.$fontMainPath, defs.$fontMainPath);
|
|
10
|
-
|
|
11
|
-
// Font Face Mixin
|
|
12
|
-
// --------------------------------------
|
|
13
|
-
// Generates an @font-face rule.
|
|
14
|
-
//
|
|
15
|
-
// @param {String} $title - The base name of the font (e.g., "OpenSans").
|
|
16
|
-
// @param {String} $weight - The font weight key (e.g., "regular", "bold").
|
|
17
|
-
// @param {String} $format - The font file format (e.g., "woff2").
|
|
18
|
-
// @param {String} $style - The font style (e.g., "normal", "italic").
|
|
19
|
-
// @param {Number} $index [0] - An index appended to the font-family name if multiple fonts share the same weight name.
|
|
20
|
-
// @param {String | Null} $unicode [null] - Optional unicode range for the font.
|
|
21
|
-
// @param {Boolean} $isLocal [true] - Whether the font is hosted locally or externally.
|
|
22
|
-
// @param {String} $externalUrl [""] - The URL for externally hosted fonts (if $isLocal is false).
|
|
23
|
-
//
|
|
24
|
-
// @example scss
|
|
25
|
-
// @include font("OpenSans", "regular", "woff2", "normal", 0, null, true);
|
|
26
|
-
// // Generates:
|
|
27
|
-
// // @font-face {
|
|
28
|
-
// // font-family: "regular"; // Or "regular-0" if $index is 0 but other fonts exist with same weight
|
|
29
|
-
// // font-weight: 400;
|
|
30
|
-
// // font-style: normal;
|
|
31
|
-
// // font-display: swap;
|
|
32
|
-
// // src: local("OpenSans-regular"),
|
|
33
|
-
// // url("../fonts/OpenSans-regular.woff2") format("woff2");
|
|
34
|
-
// // }
|
|
35
|
-
//
|
|
36
|
-
// @include font("Roboto", "bold", "ttf", "normal", 1, "U+000-5FF", false, "https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfBBc4.ttf");
|
|
37
|
-
// // Generates:
|
|
38
|
-
// // @font-face {
|
|
39
|
-
// // font-family: "bold-1";
|
|
40
|
-
// // font-weight: 700;
|
|
41
|
-
// // font-style: normal;
|
|
42
|
-
// // font-display: swap;
|
|
43
|
-
// // src: url("https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfBBc4.ttf");
|
|
44
|
-
// // unicode-range: U+000-5FF;
|
|
45
|
-
// // }
|
|
46
|
-
//
|
|
47
|
-
@mixin font($key, $title, $weight, $format, $style, $index: 0, $unicode: null, $isLocal: true, $externalUrl: '') {
|
|
48
|
-
// Validate parameters
|
|
49
|
-
$checkedIsLocal: val.boolean($isLocal, '#{$title}.font().local');
|
|
50
|
-
$checkedTitle: val.string($title, '#{$title}.font().title');
|
|
51
|
-
$checkedWeight: val.mapItem(
|
|
52
|
-
configs.$fontWeightsValues,
|
|
53
|
-
$weight,
|
|
54
|
-
configs.$fontWeightsValues,
|
|
55
|
-
'Typographic.fontFace.weights.#{$weight}'
|
|
56
|
-
);
|
|
57
|
-
$checkedStyle: val.listItem(('normal', 'italic', 'oblique'), $style, '#{$title}.font().weights.#{$style}');
|
|
58
|
-
$checkIndex: val.number($index, '#{$title}.font().index');
|
|
59
|
-
$checkedFormat: val.string($format, '#{$title}.font().format');
|
|
60
|
-
|
|
61
|
-
@if (not($isLocal)) {
|
|
62
|
-
$checkedExternalUrl: val.string($externalUrl, 'Typographic.fontFace.externalUrl');
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
$name: if($index == 0, $title, '#{$key}\:#{$title}');
|
|
66
|
-
$weightValue: map.get(configs.$fontWeightsValues, $weight);
|
|
67
|
-
|
|
68
|
-
@font-face {
|
|
69
|
-
font-family: $name;
|
|
70
|
-
font-weight: $weightValue;
|
|
71
|
-
font-style: $style;
|
|
72
|
-
font-display: swap;
|
|
73
|
-
|
|
74
|
-
@if ($isLocal) {
|
|
75
|
-
src:
|
|
76
|
-
local('#{$title}-#{$weight}'),
|
|
77
|
-
url(string.unquote('#{$fontMainPath}#{$title}-#{$weight}.#{$format}')) format('#{$format}');
|
|
78
|
-
} @else {
|
|
79
|
-
src: url(string.unquote('#{$externalUrl}'));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@if $unicode {
|
|
83
|
-
// Validate parameters
|
|
84
|
-
$checkedUnicode: val.string($unicode, '#{$title}.font().unicode');
|
|
85
|
-
|
|
86
|
-
unicode-range: string.unquote($unicode);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// Font Shapes Mixin
|
|
92
|
-
// --------------------------------------
|
|
93
|
-
// Applies text transformation, decoration, or style properties to a class.
|
|
94
|
-
//
|
|
95
|
-
// @param {String} $class - The CSS class name to apply the style to.
|
|
96
|
-
// @param {String} $type - The type of shape property ("transform", "decoration", "styles").
|
|
97
|
-
// @param {String} $value - The value for the shape property (e.g., "uppercase", "underline", "italic").
|
|
98
|
-
// @param {String | Null} $size [null] - Optional size prefix for responsive classes, determines if `!important` is added.
|
|
99
|
-
//
|
|
100
|
-
// @example scss
|
|
101
|
-
// @include fontShapes("uppercase", "transform", "uppercase");
|
|
102
|
-
// // Generates:
|
|
103
|
-
// // .uppercase {
|
|
104
|
-
// // text-transform: uppercase;
|
|
105
|
-
// // }
|
|
106
|
-
//
|
|
107
|
-
// @include fontShapes("md:underline", "decoration", "underline", "md");
|
|
108
|
-
// // Generates:
|
|
109
|
-
// // .md\\:underline {
|
|
110
|
-
// // text-decoration: underline !important;
|
|
111
|
-
// // }
|
|
112
|
-
//
|
|
113
|
-
@mixin fontShapes($class, $type, $value) {
|
|
114
|
-
$shapeList: map.get(configs.$fontShapes, $type);
|
|
115
|
-
|
|
116
|
-
// Validate parameters
|
|
117
|
-
$checkedType: val.mapItem(configs.$fontShapes, $type, configs.$fontShapes, 'fontShapes().#{$type}');
|
|
118
|
-
$checkedValue: val.listItem($shapeList, $value, 'fontShapes().#{$value}');
|
|
119
|
-
|
|
120
|
-
.#{$class} {
|
|
121
|
-
@if $type == 'transform' {
|
|
122
|
-
text-transform: $value;
|
|
123
|
-
} @else if $type == 'decoration' {
|
|
124
|
-
text-decoration: $value;
|
|
125
|
-
} @else if $type == 'styles' {
|
|
126
|
-
font-style: $value;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
1
|
+
@use 'sass:string';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use '../variables' as vars;
|
|
4
|
+
@use '../settings/defaults' as defs;
|
|
5
|
+
@use '../functions/validations' as val;
|
|
6
|
+
@use '../settings/configs' as configs;
|
|
7
|
+
|
|
8
|
+
// Definitions
|
|
9
|
+
$fontMainPath: if(vars.$fontMainPath != null, vars.$fontMainPath, defs.$fontMainPath);
|
|
10
|
+
|
|
11
|
+
// Font Face Mixin
|
|
12
|
+
// --------------------------------------
|
|
13
|
+
// Generates an @font-face rule.
|
|
14
|
+
//
|
|
15
|
+
// @param {String} $title - The base name of the font (e.g., "OpenSans").
|
|
16
|
+
// @param {String} $weight - The font weight key (e.g., "regular", "bold").
|
|
17
|
+
// @param {String} $format - The font file format (e.g., "woff2").
|
|
18
|
+
// @param {String} $style - The font style (e.g., "normal", "italic").
|
|
19
|
+
// @param {Number} $index [0] - An index appended to the font-family name if multiple fonts share the same weight name.
|
|
20
|
+
// @param {String | Null} $unicode [null] - Optional unicode range for the font.
|
|
21
|
+
// @param {Boolean} $isLocal [true] - Whether the font is hosted locally or externally.
|
|
22
|
+
// @param {String} $externalUrl [""] - The URL for externally hosted fonts (if $isLocal is false).
|
|
23
|
+
//
|
|
24
|
+
// @example scss
|
|
25
|
+
// @include font("OpenSans", "regular", "woff2", "normal", 0, null, true);
|
|
26
|
+
// // Generates:
|
|
27
|
+
// // @font-face {
|
|
28
|
+
// // font-family: "regular"; // Or "regular-0" if $index is 0 but other fonts exist with same weight
|
|
29
|
+
// // font-weight: 400;
|
|
30
|
+
// // font-style: normal;
|
|
31
|
+
// // font-display: swap;
|
|
32
|
+
// // src: local("OpenSans-regular"),
|
|
33
|
+
// // url("../fonts/OpenSans-regular.woff2") format("woff2");
|
|
34
|
+
// // }
|
|
35
|
+
//
|
|
36
|
+
// @include font("Roboto", "bold", "ttf", "normal", 1, "U+000-5FF", false, "https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfBBc4.ttf");
|
|
37
|
+
// // Generates:
|
|
38
|
+
// // @font-face {
|
|
39
|
+
// // font-family: "bold-1";
|
|
40
|
+
// // font-weight: 700;
|
|
41
|
+
// // font-style: normal;
|
|
42
|
+
// // font-display: swap;
|
|
43
|
+
// // src: url("https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfBBc4.ttf");
|
|
44
|
+
// // unicode-range: U+000-5FF;
|
|
45
|
+
// // }
|
|
46
|
+
//
|
|
47
|
+
@mixin font($key, $title, $weight, $format, $style, $index: 0, $unicode: null, $isLocal: true, $externalUrl: '') {
|
|
48
|
+
// Validate parameters
|
|
49
|
+
$checkedIsLocal: val.boolean($isLocal, '#{$title}.font().local');
|
|
50
|
+
$checkedTitle: val.string($title, '#{$title}.font().title');
|
|
51
|
+
$checkedWeight: val.mapItem(
|
|
52
|
+
configs.$fontWeightsValues,
|
|
53
|
+
$weight,
|
|
54
|
+
configs.$fontWeightsValues,
|
|
55
|
+
'Typographic.fontFace.weights.#{$weight}'
|
|
56
|
+
);
|
|
57
|
+
$checkedStyle: val.listItem(('normal', 'italic', 'oblique'), $style, '#{$title}.font().weights.#{$style}');
|
|
58
|
+
$checkIndex: val.number($index, '#{$title}.font().index');
|
|
59
|
+
$checkedFormat: val.string($format, '#{$title}.font().format');
|
|
60
|
+
|
|
61
|
+
@if (not($isLocal)) {
|
|
62
|
+
$checkedExternalUrl: val.string($externalUrl, 'Typographic.fontFace.externalUrl');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
$name: if($index == 0, $title, '#{$key}\:#{$title}');
|
|
66
|
+
$weightValue: map.get(configs.$fontWeightsValues, $weight);
|
|
67
|
+
|
|
68
|
+
@font-face {
|
|
69
|
+
font-family: $name;
|
|
70
|
+
font-weight: $weightValue;
|
|
71
|
+
font-style: $style;
|
|
72
|
+
font-display: swap;
|
|
73
|
+
|
|
74
|
+
@if ($isLocal) {
|
|
75
|
+
src:
|
|
76
|
+
local('#{$title}-#{$weight}'),
|
|
77
|
+
url(string.unquote('#{$fontMainPath}#{$title}-#{$weight}.#{$format}')) format('#{$format}');
|
|
78
|
+
} @else {
|
|
79
|
+
src: url(string.unquote('#{$externalUrl}'));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@if $unicode {
|
|
83
|
+
// Validate parameters
|
|
84
|
+
$checkedUnicode: val.string($unicode, '#{$title}.font().unicode');
|
|
85
|
+
|
|
86
|
+
unicode-range: string.unquote($unicode);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Font Shapes Mixin
|
|
92
|
+
// --------------------------------------
|
|
93
|
+
// Applies text transformation, decoration, or style properties to a class.
|
|
94
|
+
//
|
|
95
|
+
// @param {String} $class - The CSS class name to apply the style to.
|
|
96
|
+
// @param {String} $type - The type of shape property ("transform", "decoration", "styles").
|
|
97
|
+
// @param {String} $value - The value for the shape property (e.g., "uppercase", "underline", "italic").
|
|
98
|
+
// @param {String | Null} $size [null] - Optional size prefix for responsive classes, determines if `!important` is added.
|
|
99
|
+
//
|
|
100
|
+
// @example scss
|
|
101
|
+
// @include fontShapes("uppercase", "transform", "uppercase");
|
|
102
|
+
// // Generates:
|
|
103
|
+
// // .uppercase {
|
|
104
|
+
// // text-transform: uppercase;
|
|
105
|
+
// // }
|
|
106
|
+
//
|
|
107
|
+
// @include fontShapes("md:underline", "decoration", "underline", "md");
|
|
108
|
+
// // Generates:
|
|
109
|
+
// // .md\\:underline {
|
|
110
|
+
// // text-decoration: underline !important;
|
|
111
|
+
// // }
|
|
112
|
+
//
|
|
113
|
+
@mixin fontShapes($class, $type, $value) {
|
|
114
|
+
$shapeList: map.get(configs.$fontShapes, $type);
|
|
115
|
+
|
|
116
|
+
// Validate parameters
|
|
117
|
+
$checkedType: val.mapItem(configs.$fontShapes, $type, configs.$fontShapes, 'fontShapes().#{$type}');
|
|
118
|
+
$checkedValue: val.listItem($shapeList, $value, 'fontShapes().#{$value}');
|
|
119
|
+
|
|
120
|
+
.#{$class} {
|
|
121
|
+
@if $type == 'transform' {
|
|
122
|
+
text-transform: $value;
|
|
123
|
+
} @else if $type == 'decoration' {
|
|
124
|
+
text-decoration: $value;
|
|
125
|
+
} @else if $type == 'styles' {
|
|
126
|
+
font-style: $value;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|