beathers 5.7.6 → 5.9.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 (48) hide show
  1. package/.prettierrc.js +10 -8
  2. package/CHANGELOG +305 -274
  3. package/css/beathers.min.css +2 -2
  4. package/css/beathers.min.css.map +1 -1
  5. package/docs/colors.md +250 -250
  6. package/docs/grid-system.md +130 -130
  7. package/docs/shaping.md +272 -272
  8. package/docs/typography.md +124 -124
  9. package/package.json +107 -105
  10. package/readme.md +301 -301
  11. package/scripts/commands/build.js +4 -4
  12. package/scripts/commands/clean.d.ts +2 -0
  13. package/scripts/commands/clean.d.ts.map +1 -0
  14. package/scripts/commands/clean.js +22 -0
  15. package/scripts/commands/fonts.d.ts.map +1 -1
  16. package/scripts/commands/fonts.js +4 -3
  17. package/scripts/commands/index.js +8 -8
  18. package/scripts/commands/init.js +1 -1
  19. package/scripts/commands/version-update.d.ts +2 -0
  20. package/scripts/commands/version-update.d.ts.map +1 -0
  21. package/scripts/commands/version-update.js +122 -0
  22. package/scripts/commands/version.js +1 -1
  23. package/scripts/helpers/BuildScssVariables.d.ts +1 -1
  24. package/scripts/helpers/BuildScssVariables.d.ts.map +1 -1
  25. package/scripts/helpers/BuildScssVariables.js +20 -10
  26. package/scripts/helpers/LoadUserConfigs.js +1 -1
  27. package/scripts/helpers/ReadDefaultValues.js +20 -20
  28. package/scripts/types.d.ts +1 -1
  29. package/scripts/types.d.ts.map +1 -1
  30. package/scss/_variables.scss +19 -19
  31. package/scss/beathers.min.scss +15 -14
  32. package/scss/functions/_colors.scss +242 -230
  33. package/scss/functions/_mediaQueries.scss +140 -136
  34. package/scss/functions/_others.scss +113 -79
  35. package/scss/functions/_typographic.scss +133 -129
  36. package/scss/functions/_validations.scss +293 -251
  37. package/scss/settings/_configs.scss +270 -270
  38. package/scss/settings/_defaults.scss +209 -214
  39. package/scss/settings/_index.scss +90 -90
  40. package/scss/style/_button.scss +103 -101
  41. package/scss/style/_colors.scss +156 -146
  42. package/scss/style/_dialog.scss +147 -146
  43. package/scss/style/_glass.scss +98 -80
  44. package/scss/style/_grid.scss +121 -95
  45. package/scss/style/_loader.scss +74 -62
  46. package/scss/style/_resets.scss +176 -168
  47. package/scss/style/_shaping.scss +561 -439
  48. package/scss/style/_typographic.scss +400 -345
@@ -1,136 +1,140 @@
1
- @use 'sass:map';
2
- @use 'sass:string';
3
- @use '../variables' as vars;
4
- @use '../settings/defaults' as defs;
5
- @use '../settings/index' as settings;
6
- @use '../functions/validations' as val;
7
-
8
- // Definitions
9
- $breakpoints: if(vars.$breakpoints != (), vars.$breakpoints, defs.$breakpoints);
10
-
11
- // Breakpoint Mixin
12
- // --------------------------------------
13
- // Generates a media query based on a breakpoint key and type (min/max).
14
- // If the key is not found or is null/empty (e.g., for default styles),
15
- // it applies the content directly without a media query.
16
- //
17
- // @param {String} $type - The type of media query (e.g., "min", "max").
18
- // @param {String | Null} $key - The breakpoint key from `$breakpoints` (e.g., "sm", "md", "lg").
19
- // If null or an empty string, content is applied directly.
20
- //
21
- // @content - Styles to be applied within the media query or directly.
22
- //
23
- // @example scss
24
- // .element {
25
- // color: blue; // Default
26
- //
27
- // @include mQ(min, "md") {
28
- // color: red; // Applied when (min-width: md-breakpoint-value)
29
- // }
30
- //
31
- // @include mQ(max, "lg") {
32
- // padding: 20px; // Applied when (max-width: lg-breakpoint-value)
33
- // }
34
- //
35
- // // Example for applying base styles (no media query)
36
- // @include mQ(min, null) { // or @include mQ(min, "")
37
- // font-size: 16px; // Applied directly
38
- // }
39
- // }
40
- //
41
- // @output css - Example output for .element
42
- // .element {
43
- // color: blue;
44
- // font-size: 16px;
45
- // }
46
- // @media (min-width: 768px) { // Assuming 'md' is 768px
47
- // .element {
48
- // color: red;
49
- // }
50
- // }
51
- // @media (max-width: 1024px) { // Assuming 'lg' is 1024px
52
- // .element {
53
- // padding: 20px;
54
- // }
55
- // }
56
- //
57
- @mixin mQ($type, $key, $condition: true) {
58
- // Retrieve the size value from the breakpoints map using the provided key
59
- $size: map.get($breakpoints, $key);
60
- $checkedCondition: val.boolean($condition, 'mQ().condition');
61
-
62
- @if $size and $size > 0 and $checkedCondition {
63
- // Check if a valid size value exists
64
- // Generate the media query using the provided type and size
65
- @media (string.unquote("#{$type}-width"): $size) {
66
- @content; // Content to be included within the media query
67
- }
68
- } @else {
69
- // If no valid size value exists, apply the content without a media query
70
- @content;
71
- }
72
- }
73
- // How to call
74
- // ex: color: mQ(min or max, xs/md/lg/xl/xxl) // Note: This comment seems to refer to an old way or is a general usage hint.
75
-
76
- // Multi Sizes Mixin
77
- // --------------------------------------
78
- // Iterates through media query sizes defined by the `multiSizes()` function
79
- // and applies content within the appropriate media query.
80
- // This mixin is designed to be used with `@content($size, $divider)`,
81
- // allowing the consuming code to generate responsive utility classes.
82
- //
83
- // @content {String} $size - The current breakpoint size key (e.g., "", "sm", "md").
84
- // @content {String} $divider - The class divider for the current size (e.g., "", ":").
85
- //
86
- // @example scss
87
- // // In another file (e.g., _typographic.scss)
88
- // @use "mediaQueries" as mQ;
89
- // @use "defs";
90
- //
91
- // @include mQ.multiSizes() using ($size, $divider) {
92
- // $classPrefix: if($size, "#{$size}#{$divider}", "");
93
- //
94
- // .#{$classPrefix}text-left {
95
- // text-align: left if($size, !important, null);
96
- // }
97
- // .#{$classPrefix}text-center {
98
- // text-align: center if($size, !important, null);
99
- // }
100
- // }
101
- //
102
- // @output css - Example output
103
- // .text-left {
104
- // text-align: left;
105
- // }
106
- // .text-center {
107
- // text-align: center;
108
- // }
109
- //
110
- // @media (min-width: 768px) { // Assuming 'md' is 768px
111
- // .md\\:text-left {
112
- // text-align: left !important;
113
- // }
114
- // .md\\:text-center {
115
- // text-align: center !important;
116
- // }
117
- // }
118
-
119
- @mixin multiSizes($condition: null) {
120
- $checkedCondition: val.boolean($condition, 'mQ().condition');
121
-
122
- @if $checkedCondition {
123
- @each $size, $value in $breakpoints {
124
- $divider: if($size, #{\:}, '');
125
-
126
- @include mQ(min, $size, $checkedCondition) {
127
- @content ($size, $divider);
128
- }
129
- }
130
- } @else {
131
- $size: null;
132
- $divider: '';
133
-
134
- @content ($size, $divider);
135
- }
136
- }
1
+ @use 'sass:map';
2
+ @use 'sass:string';
3
+ @use '../variables' as vars;
4
+ @use '../settings/defaults' as defs;
5
+ @use '../settings/index' as settings;
6
+ @use '../functions/validations' as val;
7
+
8
+ // Definitions
9
+ $breakpoints: if(
10
+ sass(vars.$breakpoints != null): vars.$breakpoints; else: defs.$breakpoints
11
+ );
12
+
13
+ // Breakpoint Mixin
14
+ // --------------------------------------
15
+ // Generates a media query based on a breakpoint key and type (min/max).
16
+ // If the key is not found or is null/empty (e.g., for default styles),
17
+ // it applies the content directly without a media query.
18
+ //
19
+ // @param {String} $type - The type of media query (e.g., "min", "max").
20
+ // @param {String | Null} $key - The breakpoint key from `$breakpoints` (e.g., "sm", "md", "lg").
21
+ // If null or an empty string, content is applied directly.
22
+ //
23
+ // @content - Styles to be applied within the media query or directly.
24
+ //
25
+ // @example scss
26
+ // .element {
27
+ // color: blue; // Default
28
+ //
29
+ // @include mQ(min, "md") {
30
+ // color: red; // Applied when (min-width: md-breakpoint-value)
31
+ // }
32
+ //
33
+ // @include mQ(max, "lg") {
34
+ // padding: 20px; // Applied when (max-width: lg-breakpoint-value)
35
+ // }
36
+ //
37
+ // // Example for applying base styles (no media query)
38
+ // @include mQ(min, null) { // or @include mQ(min, "")
39
+ // font-size: 16px; // Applied directly
40
+ // }
41
+ // }
42
+ //
43
+ // @output css - Example output for .element
44
+ // .element {
45
+ // color: blue;
46
+ // font-size: 16px;
47
+ // }
48
+ // @media (min-width: 768px) { // Assuming 'md' is 768px
49
+ // .element {
50
+ // color: red;
51
+ // }
52
+ // }
53
+ // @media (max-width: 1024px) { // Assuming 'lg' is 1024px
54
+ // .element {
55
+ // padding: 20px;
56
+ // }
57
+ // }
58
+ //
59
+ @mixin mQ($type, $key, $condition: true) {
60
+ // Retrieve the size value from the breakpoints map using the provided key
61
+ $size: map.get($breakpoints, $key);
62
+ $checkedCondition: val.boolean($condition, 'mQ().condition');
63
+
64
+ @if $size and $size > 0 and $checkedCondition {
65
+ // Check if a valid size value exists
66
+ // Generate the media query using the provided type and size
67
+ @media (string.unquote("#{$type}-width"): $size) {
68
+ @content; // Content to be included within the media query
69
+ }
70
+ } @else {
71
+ // If no valid size value exists, apply the content without a media query
72
+ @content;
73
+ }
74
+ }
75
+ // How to call
76
+ // ex: color: mQ(min or max, xs/md/lg/xl/xxl) // Note: This comment seems to refer to an old way or is a general usage hint.
77
+
78
+ // Multi Sizes Mixin
79
+ // --------------------------------------
80
+ // Iterates through media query sizes defined by the `multiSizes()` function
81
+ // and applies content within the appropriate media query.
82
+ // This mixin is designed to be used with `@content($size, $divider)`,
83
+ // allowing the consuming code to generate responsive utility classes.
84
+ //
85
+ // @content {String} $size - The current breakpoint size key (e.g., "", "sm", "md").
86
+ // @content {String} $divider - The class divider for the current size (e.g., "", ":").
87
+ //
88
+ // @example scss
89
+ // // In another file (e.g., _typographic.scss)
90
+ // @use "mediaQueries" as mQ;
91
+ // @use "defs";
92
+ //
93
+ // @include mQ.multiSizes() using ($size, $divider) {
94
+ // $classPrefix: if($size, "#{$size}#{$divider}", "");
95
+ //
96
+ // .#{$classPrefix}text-left {
97
+ // text-align: left if($size, !important, null);
98
+ // }
99
+ // .#{$classPrefix}text-center {
100
+ // text-align: center if($size, !important, null);
101
+ // }
102
+ // }
103
+ //
104
+ // @output css - Example output
105
+ // .text-left {
106
+ // text-align: left;
107
+ // }
108
+ // .text-center {
109
+ // text-align: center;
110
+ // }
111
+ //
112
+ // @media (min-width: 768px) { // Assuming 'md' is 768px
113
+ // .md\\:text-left {
114
+ // text-align: left !important;
115
+ // }
116
+ // .md\\:text-center {
117
+ // text-align: center !important;
118
+ // }
119
+ // }
120
+
121
+ @mixin multiSizes($condition: null) {
122
+ $checkedCondition: val.boolean($condition, 'mQ().condition');
123
+
124
+ @if $checkedCondition {
125
+ @each $size, $value in $breakpoints {
126
+ $divider: if(
127
+ sass($size): #{\:}; else: ''
128
+ );
129
+
130
+ @include mQ(min, $size, $checkedCondition) {
131
+ @content ($size, $divider);
132
+ }
133
+ }
134
+ } @else {
135
+ $size: null;
136
+ $divider: '';
137
+
138
+ @content ($size, $divider);
139
+ }
140
+ }
@@ -1,79 +1,113 @@
1
- @use 'sass:map';
2
- @use '../variables' as vars;
3
- @use '../settings/defaults' as defs;
4
- @use '../functions/validations' as val;
5
-
6
- // Definitions
7
- $axisDivisions: if(vars.$axisDivisions != null, vars.$axisDivisions, defs.$axisDivisions);
8
-
9
- // @mixin gridDivision
10
- // @description Generates CSS grid classes for creating grid layouts.
11
- // @param {String} $axis - The grid axis ('column' or 'row').
12
- // @param {String | Null} $size - A size prefix for the generated classes (e.g., 'sm', 'md').
13
- // @param {String} $divider - A divider string for the generated classes (e.g., '-').
14
- @mixin gridDivision($axis, $size, $divider) {
15
- // Validate parameters
16
- $checkedAxis: val.listItem((column, row), $axis, 'gridDivision.axis');
17
- $checkedBase: val.number($axisDivisions, 'gridDivision.axisDivisions');
18
-
19
- $type: if($axis == 'column', 'col', 'row');
20
- $mainClass: if($size, '#{$size}#{$divider}#{$type}s', '#{$type}s');
21
- $subClass: if($size, '#{$size}#{$divider}#{$type}', $type);
22
-
23
- @for $i from 0 through $axisDivisions {
24
- @if ($i > 0) {
25
- &.#{$mainClass}#{\:}#{$i} {
26
- grid-template-#{$axis}s: repeat($i, 1fr);
27
- }
28
- }
29
-
30
- $axisProperty: if($i == 0, 'grid-#{$axis}-end', 'grid-#{$axis}');
31
- $class: if($i == 0, auto, $i);
32
- $value: if($i == 0, -1, 'span #{$i}');
33
-
34
- > .#{$subClass}#{\:}#{$class} {
35
- #{$axisProperty}: #{$value};
36
- }
37
- }
38
- }
39
-
40
- // @mixin flexDivision
41
- // @description Generates CSS flexbox classes for creating flexible layouts.
42
- // @param {String} $axis - The flex axis ('width' or 'height').
43
- // @param {String} $type - The type of flex items ('col', 'cols', 'row', 'rows').
44
- // @param {String | Null} $size - A size prefix for the generated classes (e.g., 'sm', 'md').
45
- // @param {String} $divider - A divider string for the generated classes (e.g., '-').
46
- @mixin flexDivision($axis, $type, $size, $divider) {
47
- // Validate parameters
48
- $checkedAxis: val.listItem((width, height), $axis, 'flexDivision.axis');
49
- $checkedType: val.listItem(('col', 'cols', 'rows', 'row'), $type, 'flexDivision.type');
50
- $checkedBase: val.number($axisDivisions, 'flexDivision.axisDivisions');
51
-
52
- $mainClass: if($size, '#{$size}#{$divider}#{$type}', $type);
53
-
54
- @if (not $size) and $type == 'cols' or $type == 'rows' {
55
- > * {
56
- flex: 0 0 auto;
57
- max-#{$axis}: 100%;
58
- }
59
- }
60
-
61
- @for $i from 0 through $axisDivisions {
62
- @if $type == 'cols' or $type == 'rows' {
63
- $class: if($i == 0, auto, $i);
64
- $axisSize: if($i == 0, auto, calc(100% / $i));
65
-
66
- &.#{$mainClass}#{\:}#{$class} > * {
67
- #{$axis}: if($size, $axisSize !important, $axisSize);
68
- }
69
- } @else if $type == 'col' or $type == 'row' {
70
- $axisSize: if($i == 0, 100%, calc(($i / $axisDivisions) * 100%));
71
- $class: if($i == 0, '', $i);
72
- $classSize: if($i == 0, #{$class}, #{\:}#{$class});
73
-
74
- > .#{$mainClass}#{$classSize} {
75
- #{$axis}: if($size, $axisSize !important, $axisSize);
76
- }
77
- }
78
- }
79
- }
1
+ @use 'sass:map';
2
+ @use '../variables' as vars;
3
+ @use '../settings/defaults' as defs;
4
+ @use '../functions/validations' as val;
5
+
6
+ // Definitions
7
+ $axisDivisions: if(
8
+ sass(vars.$axisDivisions != null): vars.$axisDivisions; else: defs.$axisDivisions
9
+ );
10
+
11
+ // @mixin gridDivision
12
+ // @description Generates CSS grid classes for creating grid layouts.
13
+ // @param {String} $axis - The grid axis ('column' or 'row').
14
+ // @param {String | Null} $size - A size prefix for the generated classes (e.g., 'sm', 'md').
15
+ // @param {String} $divider - A divider string for the generated classes (e.g., '-').
16
+ @mixin gridDivision($axis, $size, $divider) {
17
+ // Validate parameters
18
+ $checkedAxis: val.listItem((column, row), $axis, 'gridDivision.axis');
19
+ $checkedBase: val.number($axisDivisions, 'gridDivision.axisDivisions');
20
+
21
+ $type: if(
22
+ sass($axis == 'column'): 'col' ; else: 'row'
23
+ );
24
+ $mainClass: if(
25
+ sass($size): '#{$size}#{$divider}#{$type}s' ; else: '#{$type}s'
26
+ );
27
+ $subClass: if(
28
+ sass($size): '#{$size}#{$divider}#{$type}' ; else: $type
29
+ );
30
+
31
+ @for $i from 0 through $axisDivisions {
32
+ @if ($i > 0) {
33
+ &.#{$mainClass}#{\:}#{$i} {
34
+ grid-template-#{$axis}s: repeat($i, 1fr);
35
+ }
36
+ }
37
+
38
+ $axisProperty: if(
39
+ sass($i == 0): 'grid-#{$axis}-end' ; else: 'grid-#{$axis}'
40
+ );
41
+ $class: if(
42
+ sass($i == 0): auto; else: $i
43
+ );
44
+ $value: if(
45
+ sass($i == 0): -1; else: 'span #{$i}'
46
+ );
47
+
48
+ > .#{$subClass}#{\:}#{$class} {
49
+ #{$axisProperty}: #{$value};
50
+ }
51
+ }
52
+ }
53
+
54
+ // @mixin flexDivision
55
+ // @description Generates CSS flexbox classes for creating flexible layouts.
56
+ // @param {String} $axis - The flex axis ('width' or 'height').
57
+ // @param {String} $type - The type of flex items ('col', 'cols', 'row', 'rows').
58
+ // @param {String | Null} $size - A size prefix for the generated classes (e.g., 'sm', 'md').
59
+ // @param {String} $divider - A divider string for the generated classes (e.g., '-').
60
+ @mixin flexDivision($axis, $type, $size, $divider) {
61
+ // Validate parameters
62
+ $checkedAxis: val.listItem((width, height), $axis, 'flexDivision.axis');
63
+ $checkedType: val.listItem(('col', 'cols', 'rows', 'row'), $type, 'flexDivision.type');
64
+ $checkedBase: val.number($axisDivisions, 'flexDivision.axisDivisions');
65
+
66
+ $mainClass: if(
67
+ sass($size): '#{$size}#{$divider}#{$type}' ; else: $type
68
+ );
69
+
70
+ @if (not $size) and $type == 'cols' or $type == 'rows' {
71
+ > * {
72
+ flex: 0 0 auto;
73
+ max-#{$axis}: 100%;
74
+ }
75
+ }
76
+
77
+ @for $i from 0 through $axisDivisions {
78
+ @if $type == 'cols' or $type == 'rows' {
79
+ $class: if(
80
+ sass($i == 0): auto; else: $i
81
+ );
82
+ $axisSize: if(
83
+ sass($i == 0): auto; else: calc(100% / $i)
84
+ );
85
+
86
+ &.#{$mainClass}#{\:}#{$class} > * {
87
+ @if ($size) {
88
+ #{$axis}: #{$axisSize} !important;
89
+ } @else {
90
+ #{$axis}: #{$axisSize};
91
+ }
92
+ }
93
+ } @else if $type == 'col' or $type == 'row' {
94
+ $axisSize: if(
95
+ sass($i == 0): 100%; else: calc(($i / $axisDivisions) * 100%)
96
+ );
97
+ $class: if(
98
+ sass($i == 0): '' ; else: $i
99
+ );
100
+ $classSize: if(
101
+ sass($i == 0): #{$class}; else: #{\:}#{$class}
102
+ );
103
+
104
+ > .#{$mainClass}#{$classSize} {
105
+ @if ($size) {
106
+ #{$axis}: #{$axisSize} !important;
107
+ } @else {
108
+ #{$axis}: #{$axisSize};
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }