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