@mlut/core 1.0.0
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 +24 -0
- package/_index.scss +1 -0
- package/_tools.scss +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/jit/JitEngine.d.ts +19 -0
- package/dist/jit/JitEngine.js +124 -0
- package/dist/jit/index.d.ts +1 -0
- package/dist/jit/index.js +1 -0
- package/dist/sass/addons/demo-theme.scss +112 -0
- package/dist/sass/css/_base-setup.scss +3 -0
- package/dist/sass/css/_index.scss +2 -0
- package/dist/sass/css/helpers/_index.scss +3 -0
- package/dist/sass/css/helpers/btn.scss +28 -0
- package/dist/sass/css/helpers/gs-debug.scss +28 -0
- package/dist/sass/css/helpers/ratio-box.scss +47 -0
- package/dist/sass/css/helpers/row.scss +98 -0
- package/dist/sass/css/helpers/wrapper.scss +21 -0
- package/dist/sass/css/styles/_index.scss +2 -0
- package/dist/sass/css/styles/generic.scss +296 -0
- package/dist/sass/css/styles/variables.scss +32 -0
- package/dist/sass/css/utils/_bg-bd.scss +27 -0
- package/dist/sass/css/utils/_grid.scss +37 -0
- package/dist/sass/css/utils/_index.scss +2 -0
- package/dist/sass/css/utils/_load.scss +9 -0
- package/dist/sass/css/utils/_transition.scss +16 -0
- package/dist/sass/css/utils/box-alignment.scss +29 -0
- package/dist/sass/css/utils/box-model.scss +48 -0
- package/dist/sass/css/utils/grid-system.scss +17 -0
- package/dist/sass/css/utils/init.scss +107 -0
- package/dist/sass/css/utils/other.scss +35 -0
- package/dist/sass/css/utils/text.scss +33 -0
- package/dist/sass/css/utils/visual.scss +32 -0
- package/dist/sass/index.scss +4 -0
- package/dist/sass/tools/_index.scss +4 -0
- package/dist/sass/tools/functions/_index.import.scss +3 -0
- package/dist/sass/tools/functions/_index.scss +9 -0
- package/dist/sass/tools/functions/base/_error.scss +9 -0
- package/dist/sass/tools/functions/base/_getters.scss +124 -0
- package/dist/sass/tools/functions/base/_index.scss +11 -0
- package/dist/sass/tools/functions/base/_list.scss +56 -0
- package/dist/sass/tools/functions/base/_math.scss +149 -0
- package/dist/sass/tools/functions/base/_string.scss +300 -0
- package/dist/sass/tools/functions/common/_custom-units.scss +231 -0
- package/dist/sass/tools/functions/common/_forward-tools.scss +2 -0
- package/dist/sass/tools/functions/common/_helpers.scss +57 -0
- package/dist/sass/tools/functions/common/_index.scss +9 -0
- package/dist/sass/tools/functions/common/_utils.scss +211 -0
- package/dist/sass/tools/functions/high/_at-rules.scss +296 -0
- package/dist/sass/tools/functions/high/_forward-tools.scss +3 -0
- package/dist/sass/tools/functions/high/_index.scss +8 -0
- package/dist/sass/tools/functions/high/utils/_index.scss +288 -0
- package/dist/sass/tools/functions/high/utils/_parse-util.scss +107 -0
- package/dist/sass/tools/functions/high/utils/_range-generators.scss +355 -0
- package/dist/sass/tools/functions/high/utils/_util-apply-selector.scss +134 -0
- package/dist/sass/tools/functions/high/utils/_value-converters.scss +294 -0
- package/dist/sass/tools/functions/high/utils/_value-transformers.scss +65 -0
- package/dist/sass/tools/mixins/_index.import.scss +2 -0
- package/dist/sass/tools/mixins/_index.scss +8 -0
- package/dist/sass/tools/mixins/base/_forward-tools.scss +2 -0
- package/dist/sass/tools/mixins/base/_index.scss +93 -0
- package/dist/sass/tools/mixins/base/_mk-ar.scss +96 -0
- package/dist/sass/tools/mixins/base/_mk-state.scss +175 -0
- package/dist/sass/tools/mixins/high/_forward-tools.scss +3 -0
- package/dist/sass/tools/mixins/high/_index.scss +1 -0
- package/dist/sass/tools/mixins/high/utils/_index.scss +188 -0
- package/dist/sass/tools/mixins/high/utils/_mk-util.scss +366 -0
- package/dist/sass/tools/settings/_index.import.scss +3 -0
- package/dist/sass/tools/settings/_index.scss +3 -0
- package/dist/sass/tools/settings/base/_general.scss +175 -0
- package/dist/sass/tools/settings/base/_index.scss +2 -0
- package/dist/sass/tools/settings/base/_utils.scss +578 -0
- package/dist/sass/tools/settings/common/_at-rules.scss +213 -0
- package/dist/sass/tools/settings/common/_index.scss +2 -0
- package/dist/sass/tools/settings/common/_utils.scss +1926 -0
- package/dist/sass/tools/settings/high/_forward-tools.scss +2 -0
- package/dist/sass/tools/settings/high/_grid.scss +55 -0
- package/dist/sass/tools/settings/high/_index.scss +2 -0
- package/dist/sass/tools/settings/high/_utils.scss +104 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/logger.d.ts +7 -0
- package/dist/utils/logger.js +13 -0
- package/package.json +48 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:list';
|
|
3
|
+
@use 'sass:string';
|
|
4
|
+
@use 'sass:math';
|
|
5
|
+
@use '../base' as ml;
|
|
6
|
+
@use 'utils' as ud;
|
|
7
|
+
|
|
8
|
+
// At-rules
|
|
9
|
+
//
|
|
10
|
+
// Settings for media queries and other CSS at-rules. There is a small database and several configs.
|
|
11
|
+
//
|
|
12
|
+
// Styleguide: settings.at_rules
|
|
13
|
+
|
|
14
|
+
// Data
|
|
15
|
+
//
|
|
16
|
+
// `$at-rules-db` \- map, the keys in which are the names of the at-rules, and the values are map with options. In the options of each at-rule there is a custom map, to which you can add alias for custom expressions. See example [here](section-how_to.html#kssref-how_to-config-media).
|
|
17
|
+
//
|
|
18
|
+
// Below are the at-rule options
|
|
19
|
+
//
|
|
20
|
+
// alias - `string` <div>the abbreviation that will be used in the utils components. It will be converted into at-crule name. For example: `@s` => `@supports`</div>
|
|
21
|
+
// default = false - <div class="Mt3u"> `boolean` </div> It can be `true`, only in one at-rule. Sets at-rule by default. This means that this at-rule will be used, without an indication of alias after the `@` symbol. By default, `media` is default at-rule
|
|
22
|
+
// custom - <div class="Mt3u"> `map` </div> Here you can set alias for custom expressions. See the example above
|
|
23
|
+
//
|
|
24
|
+
// Styleguide: settings.at_rules.data
|
|
25
|
+
|
|
26
|
+
// Breakpoints
|
|
27
|
+
//
|
|
28
|
+
// Breakpoints are stored in the config `$at-rules-cfg`, in the `breakpoints` section. For convenience, they are configured in a separate map `$breakpoints`. You can see an example of simple use [here](section-how_to.html#kssref-how_to-config-bp).
|
|
29
|
+
//
|
|
30
|
+
// Name | Value
|
|
31
|
+
// :---: | :---:
|
|
32
|
+
// <sm | 0px
|
|
33
|
+
// sm | 520px
|
|
34
|
+
// md | 768px
|
|
35
|
+
// lg | 992px
|
|
36
|
+
// xl | 1200px
|
|
37
|
+
// xxl | 1400px
|
|
38
|
+
//
|
|
39
|
+
// To fully rewrite breakpoints, use `$breakpoints-ext` map:
|
|
40
|
+
// ```scss
|
|
41
|
+
// @use 'mlut/tools' as ml with (
|
|
42
|
+
// $breakpoints: null,
|
|
43
|
+
// $breakpoints-ext: (
|
|
44
|
+
// 'sm': 768px,
|
|
45
|
+
// 'md': 1200px,
|
|
46
|
+
// 'lg': 1440px,
|
|
47
|
+
// ),
|
|
48
|
+
// );
|
|
49
|
+
//
|
|
50
|
+
// @debug map.get(ml.$at-rules-cfg, 'breakpoints');
|
|
51
|
+
// // (
|
|
52
|
+
// // 'sm': 768px,
|
|
53
|
+
// // 'md': 1200px,
|
|
54
|
+
// // 'lg': 1440px,
|
|
55
|
+
// // )
|
|
56
|
+
// ```
|
|
57
|
+
//
|
|
58
|
+
// Styleguide: settings.at_rules.breakpoints
|
|
59
|
+
|
|
60
|
+
$at-rules-db: (
|
|
61
|
+
'media': (
|
|
62
|
+
'alias': 'm',
|
|
63
|
+
'default': true,
|
|
64
|
+
'types': (
|
|
65
|
+
'pr': print,
|
|
66
|
+
's': screen,
|
|
67
|
+
),
|
|
68
|
+
),
|
|
69
|
+
'supports': (
|
|
70
|
+
'alias': 's',
|
|
71
|
+
),
|
|
72
|
+
'container': (
|
|
73
|
+
'alias': 'c',
|
|
74
|
+
),
|
|
75
|
+
'layer': (
|
|
76
|
+
'alias': 'l',
|
|
77
|
+
),
|
|
78
|
+
) !default;
|
|
79
|
+
|
|
80
|
+
$at-rules-cfg: (
|
|
81
|
+
'tokens': (
|
|
82
|
+
'syntax': (
|
|
83
|
+
'or': ml.$tSOr,
|
|
84
|
+
'and': ml.$tSAnd,
|
|
85
|
+
'custom': ml.$tSCs,
|
|
86
|
+
'not': ml.$tSNot,
|
|
87
|
+
'ar': '@',
|
|
88
|
+
'greater-equal': '>=',
|
|
89
|
+
'less-equal': '<=',
|
|
90
|
+
'greater': '>',
|
|
91
|
+
'less': '<',
|
|
92
|
+
),
|
|
93
|
+
'generation': (
|
|
94
|
+
'all-breakpoints': 'BpAll',
|
|
95
|
+
'at-rules-only': 'ArOl',
|
|
96
|
+
'at-rules-states': 'ArSt',
|
|
97
|
+
'at-rules-states-only': 'ArSO',
|
|
98
|
+
),
|
|
99
|
+
),
|
|
100
|
+
'breakpoints': (
|
|
101
|
+
'sm': 520px,
|
|
102
|
+
'md': 768px,
|
|
103
|
+
'lg': 992px,
|
|
104
|
+
'xl': 1200px,
|
|
105
|
+
'xxl': 1400px,
|
|
106
|
+
),
|
|
107
|
+
) !default;
|
|
108
|
+
|
|
109
|
+
$at-rules-data: () !default;
|
|
110
|
+
$at-rules-data-ext: () !default;
|
|
111
|
+
$at-rules-config: () !default;
|
|
112
|
+
$at-rules-config-ext: () !default;
|
|
113
|
+
$breakpoints: () !default;
|
|
114
|
+
$breakpoints-ext: () !default;
|
|
115
|
+
|
|
116
|
+
$at-rules-db: map.deep-merge($at-rules-db, $at-rules-data);
|
|
117
|
+
$at-rules-db: map.deep-merge($at-rules-db, $at-rules-data-ext);
|
|
118
|
+
$at-rules-cfg: map.deep-merge($at-rules-cfg, $at-rules-config);
|
|
119
|
+
$at-rules-cfg: map.deep-merge($at-rules-cfg, $at-rules-config-ext);
|
|
120
|
+
$at-rules-cfg: map.merge($at-rules-cfg, 'breakpoints', $breakpoints);
|
|
121
|
+
$at-rules-cfg: map.merge($at-rules-cfg, 'breakpoints', $breakpoints-ext);
|
|
122
|
+
|
|
123
|
+
$bp-map: map.get($at-rules-cfg, 'breakpoints');
|
|
124
|
+
$-bp-values: map.values($bp-map);
|
|
125
|
+
$bp-keys: map.keys($bp-map);
|
|
126
|
+
$bp-map: ();
|
|
127
|
+
|
|
128
|
+
@for $i from 1 through list.length($-bp-values) {
|
|
129
|
+
$min-bp: math.min($-bp-values...);
|
|
130
|
+
$min-index: list.index($-bp-values, $min-bp);
|
|
131
|
+
$-bp-values: list.set-nth($-bp-values, $min-index, ml.$number-max);
|
|
132
|
+
$bp-map: map.set($bp-map, list.nth($bp-keys, $min-index), $min-bp);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
$at-rules-cfg: map.set($at-rules-cfg, 'breakpoints', $bp-map);
|
|
136
|
+
$-custom-global-kw: map.get(ud.$utils-db, 'common', 'keywords', 'global');
|
|
137
|
+
$-bp-kw-map: ();
|
|
138
|
+
|
|
139
|
+
@each $key, $value in $bp-map {
|
|
140
|
+
$-bp-kw-map: map.set(
|
|
141
|
+
$-bp-kw-map,
|
|
142
|
+
(
|
|
143
|
+
ml.$tUGkw +
|
|
144
|
+
string.to-upper-case(string.slice($key, 1, 1)) +
|
|
145
|
+
string.slice($key, 2)
|
|
146
|
+
),
|
|
147
|
+
$value
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
$global-kw-bp: map.keys($-bp-kw-map);
|
|
152
|
+
|
|
153
|
+
@if $-custom-global-kw {
|
|
154
|
+
$-bp-kw-map: map.merge($-bp-kw-map, $-custom-global-kw);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
ud.$utils-db: map.set(
|
|
158
|
+
ud.$utils-db, 'common', 'keywords', 'global', $-bp-kw-map
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
$tAOr: map.get($at-rules-cfg, 'tokens', 'syntax', 'or');
|
|
162
|
+
$tAAnd: map.get($at-rules-cfg, 'tokens', 'syntax', 'and');
|
|
163
|
+
$tANot: map.get($at-rules-cfg, 'tokens', 'syntax', 'not');
|
|
164
|
+
$tACs: map.get($at-rules-cfg, 'tokens', 'syntax', 'custom');
|
|
165
|
+
$tAAr: map.get($at-rules-cfg, 'tokens', 'syntax', 'ar');
|
|
166
|
+
$tAGte: map.get($at-rules-cfg, 'tokens', 'syntax', 'greater-equal');
|
|
167
|
+
$tALse: map.get($at-rules-cfg, 'tokens', 'syntax', 'less-equal');
|
|
168
|
+
$tAGt: map.get($at-rules-cfg, 'tokens', 'syntax', 'greater');
|
|
169
|
+
$tALs: map.get($at-rules-cfg, 'tokens', 'syntax', 'less');
|
|
170
|
+
|
|
171
|
+
$kBpAll: map.get($at-rules-cfg, 'tokens', 'generation', 'all-breakpoints');
|
|
172
|
+
$kArOl: map.get($at-rules-cfg, 'tokens', 'generation', 'at-rules-only');
|
|
173
|
+
$kArSt: map.get($at-rules-cfg, 'tokens', 'generation', 'at-rules-states');
|
|
174
|
+
$kArSO: map.get($at-rules-cfg, 'tokens', 'generation', 'at-rules-states-only');
|
|
175
|
+
|
|
176
|
+
$cBpAllCp: $kBpAll + ' _';
|
|
177
|
+
$cArOlBp: '#{$kBpAll} #{$kArOl} _';
|
|
178
|
+
$cArStBp: '#{$kBpAll} #{$kArSt} _';
|
|
179
|
+
|
|
180
|
+
$at-rules-cfg: map.merge(
|
|
181
|
+
$at-rules-cfg,
|
|
182
|
+
(
|
|
183
|
+
'keywords': map.merge(
|
|
184
|
+
(
|
|
185
|
+
$kBpAll: 'breakpoints',
|
|
186
|
+
$kArOl: null,
|
|
187
|
+
$kArSO: null,
|
|
188
|
+
$kArSt: null,
|
|
189
|
+
),
|
|
190
|
+
map.get($at-rules-cfg, 'keywords') or ()
|
|
191
|
+
),
|
|
192
|
+
'abbr-separators': list.join(
|
|
193
|
+
(
|
|
194
|
+
$tAGte,
|
|
195
|
+
$tALse,
|
|
196
|
+
$tAGt,
|
|
197
|
+
$tALs,
|
|
198
|
+
),
|
|
199
|
+
map.get($at-rules-cfg, 'abbr-separators') or ()
|
|
200
|
+
)
|
|
201
|
+
)
|
|
202
|
+
);
|
|
203
|
+
|
|
204
|
+
$abbr-separators: ();
|
|
205
|
+
|
|
206
|
+
@each $item in list.join(
|
|
207
|
+
map.get($at-rules-cfg, 'abbr-separators'),
|
|
208
|
+
map.get(ml.$utils-cfg, 'abbr-separators'),
|
|
209
|
+
) {
|
|
210
|
+
@if $item != '' {
|
|
211
|
+
$abbr-separators: list.append($abbr-separators, $item);
|
|
212
|
+
}
|
|
213
|
+
}
|