beathers 5.3.6 → 5.4.1
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 -0
- package/CHANGELOG +176 -154
- package/css/beathers-icons.min.css.map +1 -0
- package/{dist/css → css}/beathers.min.css +2 -2
- package/css/beathers.min.css.map +1 -0
- package/data/colors.d.ts.map +1 -0
- package/data/font.d.ts.map +1 -0
- package/data/index.d.ts.map +1 -0
- package/index.d.ts.map +1 -0
- package/package.json +27 -26
- package/readme.md +263 -256
- package/scripts/cli.d.ts.map +1 -0
- package/{dist/scripts → scripts}/cli.js +0 -0
- package/scripts/commands/build.d.ts.map +1 -0
- package/{dist/scripts → scripts}/commands/build.js +16 -4
- package/scripts/commands/colors.d.ts.map +1 -0
- package/scripts/commands/fonts.d.ts.map +1 -0
- package/scripts/commands/help.d.ts.map +1 -0
- package/scripts/commands/index.d.ts.map +1 -0
- package/scripts/commands/init.d.ts.map +1 -0
- package/scripts/commands/list.d.ts.map +1 -0
- package/scripts/commands/version.d.ts.map +1 -0
- package/scripts/helpers/BuildScssVariables.d.ts.map +1 -0
- package/scripts/helpers/BuildScssVariables.js +138 -0
- package/scripts/helpers/CallNewVariables.d.ts +2 -0
- package/scripts/helpers/CallNewVariables.d.ts.map +1 -0
- package/{dist/scripts → scripts}/helpers/CallNewVariables.js +5 -3
- package/scripts/helpers/LoadUserConfigs.d.ts.map +1 -0
- package/scripts/helpers/Merge.d.ts.map +1 -0
- package/scripts/helpers/ReadDefaultValues.d.ts.map +1 -0
- package/scripts/helpers/index.d.ts.map +1 -0
- package/scripts/types.d.ts.map +1 -0
- package/{dist/scss → scss}/_variables.scss +21 -0
- package/{dist/scss → scss}/beathers-icons.min.scss +265 -265
- package/{dist/scss → scss}/beathers.min.scss +11 -11
- package/{dist/scss → scss}/functions/_colors.scss +230 -243
- package/{dist/scss → scss}/functions/_mediaQueries.scss +133 -138
- package/{dist/scss → scss}/functions/_others.scss +87 -92
- package/{dist/scss → scss}/functions/_typographic.scss +129 -134
- package/{dist/scss → scss}/functions/_validations.scss +251 -251
- package/{dist/scss → scss}/settings/_configs.scss +295 -295
- package/{dist/scss → scss}/settings/_defaults.scss +178 -178
- package/{dist/scss → scss}/settings/_index.scss +68 -68
- package/{dist/scss → scss}/style/_colors.scss +146 -155
- package/{dist/scss → scss}/style/_grid.scss +89 -90
- package/{dist/scss → scss}/style/_resets.scss +110 -119
- package/{dist/scss → scss}/style/_shaping.scss +388 -425
- package/{dist/scss → scss}/style/_typographic.scss +319 -347
- package/dist/css/beathers-icons.min.css.map +0 -1
- package/dist/css/beathers.min.css.map +0 -1
- package/dist/scripts/helpers/BuildScssVariables.js +0 -111
- package/dist/scripts/helpers/CallNewVariables.d.ts +0 -2
- /package/{dist/css → css}/beathers-icons.min.css +0 -0
- /package/{dist/data → data}/colors.d.ts +0 -0
- /package/{dist/data → data}/colors.js +0 -0
- /package/{dist/data → data}/font.d.ts +0 -0
- /package/{dist/data → data}/font.js +0 -0
- /package/{dist/data → data}/index.d.ts +0 -0
- /package/{dist/data → data}/index.js +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/scripts → scripts}/cli.d.ts +0 -0
- /package/{dist/scripts → scripts}/commands/build.d.ts +0 -0
- /package/{dist/scripts → scripts}/commands/colors.d.ts +0 -0
- /package/{dist/scripts → scripts}/commands/colors.js +0 -0
- /package/{dist/scripts → scripts}/commands/fonts.d.ts +0 -0
- /package/{dist/scripts → scripts}/commands/fonts.js +0 -0
- /package/{dist/scripts → scripts}/commands/help.d.ts +0 -0
- /package/{dist/scripts → scripts}/commands/help.js +0 -0
- /package/{dist/scripts → scripts}/commands/index.d.ts +0 -0
- /package/{dist/scripts → scripts}/commands/index.js +0 -0
- /package/{dist/scripts → scripts}/commands/init.d.ts +0 -0
- /package/{dist/scripts → scripts}/commands/init.js +0 -0
- /package/{dist/scripts → scripts}/commands/list.d.ts +0 -0
- /package/{dist/scripts → scripts}/commands/list.js +0 -0
- /package/{dist/scripts → scripts}/commands/version.d.ts +0 -0
- /package/{dist/scripts → scripts}/commands/version.js +0 -0
- /package/{dist/scripts → scripts}/helpers/BuildScssVariables.d.ts +0 -0
- /package/{dist/scripts → scripts}/helpers/LoadUserConfigs.d.ts +0 -0
- /package/{dist/scripts → scripts}/helpers/LoadUserConfigs.js +0 -0
- /package/{dist/scripts → scripts}/helpers/Merge.d.ts +0 -0
- /package/{dist/scripts → scripts}/helpers/Merge.js +0 -0
- /package/{dist/scripts → scripts}/helpers/ReadDefaultValues.d.ts +0 -0
- /package/{dist/scripts → scripts}/helpers/ReadDefaultValues.js +0 -0
- /package/{dist/scripts → scripts}/helpers/index.d.ts +0 -0
- /package/{dist/scripts → scripts}/helpers/index.js +0 -0
- /package/{dist/scripts → scripts}/types.d.ts +0 -0
- /package/{dist/scripts → scripts}/types.js +0 -0
|
@@ -1,134 +1,129 @@
|
|
|
1
|
-
@use 'sass:
|
|
2
|
-
@use 'sass:
|
|
3
|
-
@use '
|
|
4
|
-
@use '../
|
|
5
|
-
@use '../
|
|
6
|
-
@use '../
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
// @param {String} $
|
|
21
|
-
// @param {
|
|
22
|
-
// @param {String} $
|
|
23
|
-
//
|
|
24
|
-
// @
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
// @
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
// //
|
|
32
|
-
// //
|
|
33
|
-
// //
|
|
34
|
-
// //
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
// //
|
|
38
|
-
// //
|
|
39
|
-
// //
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
// //
|
|
43
|
-
// //
|
|
44
|
-
// //
|
|
45
|
-
// //
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
//
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
// @
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
//
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
// //
|
|
109
|
-
// //
|
|
110
|
-
// //
|
|
111
|
-
//
|
|
112
|
-
//
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
//
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
} @else if $type == 'styles' {
|
|
131
|
-
font-style: $value;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
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($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, '#{$title}-#{$index}');
|
|
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
|
+
}
|