@matteusan/himig 1.5.0 → 1.7.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 +2 -2
- package/_index.scss +5 -23
- package/ms-badge/_badge-base.scss +1 -1
- package/ms-badge/_badge-extend.scss +1 -1
- package/ms-badge/_badge-styles.scss +1 -1
- package/ms-button/_button-base.scss +1 -1
- package/ms-button/_button-extend.scss +1 -1
- package/ms-button/_button-mixins.scss +1 -1
- package/ms-button/_button-styles.scss +26 -26
- package/ms-card/_card-base.scss +3 -3
- package/ms-card/_card-extend.scss +1 -1
- package/ms-card/_card-styles.scss +6 -1
- package/ms-card/_card-theme.scss +8 -3
- package/ms-form-field/_form-field-base.scss +6 -2
- package/ms-form-field/_form-field-extend.scss +1 -1
- package/ms-form-field/_form-field-styles.scss +15 -11
- package/ms-form-field/_form-field-theme.scss +20 -8
- package/ms-link/_link-base.scss +1 -1
- package/ms-link/_link-extend.scss +1 -1
- package/ms-link/_link-styles.scss +1 -1
- package/ms-link/_link-theme.scss +4 -4
- package/ms-list/_list-base.scss +1 -1
- package/ms-list/_list-extend.scss +1 -1
- package/ms-list/_list-styles.scss +1 -1
- package/ms-select-field/_select-field-base.scss +1 -1
- package/ms-select-field/_select-field-extend.scss +1 -1
- package/ms-select-field/_select-field-styles.scss +18 -10
- package/ms-select-field/_select-field-theme.scss +16 -8
- package/ms-tick-field/_tick-field-base.scss +1 -1
- package/ms-tick-field/_tick-field-extend.scss +1 -1
- package/ms-tick-field/_tick-field-styles.scss +3 -14
- package/ms-tick-field/_tick-field-theme.scss +5 -0
- package/ms-utils/_color-utils.scss +1 -1
- package/ms-utils/_consts.scss +1 -1
- package/ms-utils/_layout-utils.scss +1 -1
- package/ms-utils/_struct-utils.scss +1 -1
- package/ms-utils/_typography-utils.scss +1 -1
- package/ms-utils/_util-helpers.scss +1 -1
- package/package.json +11 -3
- package/pintig/README.md +0 -2
- package/pintig/_index.scss +0 -77
- package/pintig/breakpoint/_breakpoint-sentro.scss +0 -53
- package/pintig/breakpoint/_index.scss +0 -23
- package/pintig/color/_color-constants.scss +0 -33
- package/pintig/color/_color-setters.scss +0 -75
- package/pintig/color/_color-utils.scss +0 -62
- package/pintig/color/_color-validators.scss +0 -59
- package/pintig/color/_index.scss +0 -25
- package/pintig/component/_component-extend.scss +0 -56
- package/pintig/component/_index.scss +0 -23
- package/pintig/component/component-base.ts +0 -81
- package/pintig/component/component-properties.ts +0 -25
- package/pintig/component/index.ts +0 -29
- package/pintig/component/types/ms-component.d.ts +0 -24
- package/pintig/index.ts +0 -29
- package/pintig/package.json +0 -15
- package/pintig/sprite/_index.scss +0 -23
- package/pintig/sprite/_sprite-mixins.scss +0 -29
- package/pintig/struct/_index.scss +0 -24
- package/pintig/struct/_struct-setters.scss +0 -98
- package/pintig/struct/_struct-utils.scss +0 -218
- package/pintig/struct/_struct-validators.scss +0 -57
- package/pintig/theme/_index.scss +0 -30
- package/pintig/theme/_theme-get.scss +0 -41
- package/pintig/theme/_theme-keys.scss +0 -43
- package/pintig/theme/_theme-merge.scss +0 -46
- package/pintig/theme/_theme-properties.scss +0 -61
- package/pintig/theme/_theme-setters.scss +0 -167
- package/pintig/theme/_theme-tokens.scss +0 -57
- package/pintig/tokens/_index.scss +0 -23
- package/pintig/tokens/_token-data.scss +0 -249
- package/pintig/tokens/_token-methods.scss +0 -118
- package/pintig/tools/_index.scss +0 -27
- package/pintig/tools/_tools-color.scss +0 -79
- package/pintig/tools/_tools-helpers.scss +0 -30
- package/pintig/tools/_tools-sentro.scss +0 -52
- package/pintig/tools/_tools-string.scss +0 -45
- package/pintig/tools/_tools-validation.scss +0 -71
- package/pintig/typography/_index.scss +0 -24
- package/pintig/typography/_typography-setters.scss +0 -78
- package/pintig/typography/_typography-utils.scss +0 -76
- package/pintig/typography/_typography-validators.scss +0 -47
package/pintig/theme/_index.scss
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
//---------------------------------------------------
|
|
2
|
-
// Copyright (c) 2024 MatteuSan
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
// in the Software without restriction, including without limitation the rights
|
|
7
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
12
|
-
// copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
// SOFTWARE.
|
|
21
|
-
//---------------------------------------------------
|
|
22
|
-
|
|
23
|
-
$expressive-inks: false !default;
|
|
24
|
-
|
|
25
|
-
@forward 'theme-keys' as key-*;
|
|
26
|
-
@forward 'theme-tokens' as token-*;
|
|
27
|
-
@forward 'theme-setters' with ($expressive-inks: $expressive-inks);
|
|
28
|
-
@forward 'theme-properties';
|
|
29
|
-
@forward 'theme-get';
|
|
30
|
-
@forward 'theme-merge';
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
//---------------------------------------------------
|
|
2
|
-
// Copyright (c) 2024 MatteuSan
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
// in the Software without restriction, including without limitation the rights
|
|
7
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
12
|
-
// copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
// SOFTWARE.
|
|
21
|
-
//---------------------------------------------------
|
|
22
|
-
|
|
23
|
-
@use '../tools';
|
|
24
|
-
@use 'sass:map';
|
|
25
|
-
@use 'sass:list';
|
|
26
|
-
|
|
27
|
-
/// Retrieves a value from a theme map by key.
|
|
28
|
-
/// @param {map} $map
|
|
29
|
-
/// @param {string} $key
|
|
30
|
-
/// @return {*} value.
|
|
31
|
-
@function theme-get($map, $key, $keys...) {
|
|
32
|
-
$final-map: map.get($map, $key, $keys...);
|
|
33
|
-
@if tools.is-type($final-map, 'map', $errors: false) {
|
|
34
|
-
$map-keys: map.keys($final-map);
|
|
35
|
-
@if not list.index($map-keys, 'default') {
|
|
36
|
-
@error 'Missing `default` key in theme map. Please specify a key, or add a `default` key with a value.';
|
|
37
|
-
}
|
|
38
|
-
@return map.get($final-map, 'default');
|
|
39
|
-
}
|
|
40
|
-
@return $final-map;
|
|
41
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
//---------------------------------------------------
|
|
2
|
-
// Copyright (c) 2024 MatteuSan
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
// in the Software without restriction, including without limitation the rights
|
|
7
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
12
|
-
// copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
// SOFTWARE.
|
|
21
|
-
//---------------------------------------------------
|
|
22
|
-
|
|
23
|
-
@use 'node_modules/@matteusan/sentro';
|
|
24
|
-
|
|
25
|
-
@function create($key, $value) {
|
|
26
|
-
@return sentro.key-create($key, $value);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@function get($key) {
|
|
30
|
-
@return sentro.key-get($key);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@function get-raw($key) {
|
|
34
|
-
@return sentro.key-get-raw($key);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@function check($key) {
|
|
38
|
-
@return sentro.key-check($key);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@mixin bind($key, $value) {
|
|
42
|
-
@include sentro.key-bind($key, $value);
|
|
43
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
//---------------------------------------------------
|
|
2
|
-
// Copyright (c) 2024 MatteuSan
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
// in the Software without restriction, including without limitation the rights
|
|
7
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
12
|
-
// copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
// SOFTWARE.
|
|
21
|
-
//---------------------------------------------------
|
|
22
|
-
|
|
23
|
-
@use 'sass:map';
|
|
24
|
-
@use 'sass:list';
|
|
25
|
-
@use 'sass:meta';
|
|
26
|
-
|
|
27
|
-
/// Merges two or more Sass maps into a single map.
|
|
28
|
-
/// @param {map} $base-map
|
|
29
|
-
/// @param {map...} $modifying-maps
|
|
30
|
-
/// @return {map} The merged map.
|
|
31
|
-
@function theme-merge($base-map, $modifying-maps...) {
|
|
32
|
-
$final-merged-map: ();
|
|
33
|
-
@each $modifying-map in $modifying-maps {
|
|
34
|
-
$final-merged-map: map.merge($final-merged-map, _smart-merge($base-map, $modifying-map));
|
|
35
|
-
}
|
|
36
|
-
@return $final-merged-map;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/// Merges two maps into one based on the GS theme map spec.
|
|
40
|
-
/// @access private
|
|
41
|
-
/// @param {map} $base-map
|
|
42
|
-
/// @param {map} $modifying-map
|
|
43
|
-
/// @return {map} The merged map.
|
|
44
|
-
@function _smart-merge($base-map, $modifying-map) {
|
|
45
|
-
@return map.deep-merge($base-map, $modifying-map);
|
|
46
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
//---------------------------------------------------
|
|
2
|
-
// Copyright (c) 2024 MatteuSan
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
// in the Software without restriction, including without limitation the rights
|
|
7
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
12
|
-
// copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
// SOFTWARE.
|
|
21
|
-
//---------------------------------------------------
|
|
22
|
-
|
|
23
|
-
@use '../tokens' as primitive-token;
|
|
24
|
-
@use '../tools';
|
|
25
|
-
@use 'sass:map';
|
|
26
|
-
@use 'sass:list';
|
|
27
|
-
@use 'sass:string';
|
|
28
|
-
|
|
29
|
-
@use 'theme-tokens' as token;
|
|
30
|
-
@use 'theme-keys' as key;
|
|
31
|
-
|
|
32
|
-
$_valid-intents: (
|
|
33
|
-
'create',
|
|
34
|
-
'bind'
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
@mixin property($property, $values, $intent: 'create') {
|
|
38
|
-
$key: list.nth($values, 1);
|
|
39
|
-
$value: list.nth($values, 2);
|
|
40
|
-
|
|
41
|
-
@if not list.index($_valid-intents, $intent) {
|
|
42
|
-
@error 'Invalid intent: #{$intent}. Expecting a valid intent: #{$_valid-intents}.';
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@if $intent == 'bind' {
|
|
46
|
-
@include key.bind($key, _assert-value($value));
|
|
47
|
-
} @else if $intent == 'create' {
|
|
48
|
-
#{$property}: key.create($key, _assert-value($value));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@function _assert-value($query) {
|
|
53
|
-
@if tools.is-type($query, 'list', false) {
|
|
54
|
-
@if list.length($query) == 2 and
|
|
55
|
-
token.check(list.nth($query, 1)) or primitive-token.primitive-token-check(list.nth($query, 1)) and
|
|
56
|
-
list.nth($query, 2) == string.unquote('!important') {
|
|
57
|
-
@return token.switch(list.nth($query, 1), primitive-token.primitive-token-switch(list.nth($query, 1))) + ' ' + list.nth($query, 2);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
@return token.switch($query, primitive-token.primitive-token-switch($query));
|
|
61
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
//---------------------------------------------------
|
|
2
|
-
// Copyright (c) 2024 MatteuSan
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
// in the Software without restriction, including without limitation the rights
|
|
7
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
12
|
-
// copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
// SOFTWARE.
|
|
21
|
-
//---------------------------------------------------
|
|
22
|
-
|
|
23
|
-
@use 'node_modules/@matteusan/sentro';
|
|
24
|
-
@use '../tokens';
|
|
25
|
-
@use '../tools';
|
|
26
|
-
@use 'sass:map';
|
|
27
|
-
@use 'theme-tokens' as token;
|
|
28
|
-
|
|
29
|
-
$expressive-inks: false !default;
|
|
30
|
-
|
|
31
|
-
@mixin theme-config(
|
|
32
|
-
$primary: (),
|
|
33
|
-
$accent: (),
|
|
34
|
-
$surface: (),
|
|
35
|
-
$background: (),
|
|
36
|
-
$error: (),
|
|
37
|
-
$warning: (),
|
|
38
|
-
$success: (),
|
|
39
|
-
$disabled: (),
|
|
40
|
-
$radius: (),
|
|
41
|
-
$breakpoints: (),
|
|
42
|
-
$global: (),
|
|
43
|
-
$supertitle: (),
|
|
44
|
-
$title: (),
|
|
45
|
-
$subtitle: (),
|
|
46
|
-
$body: (),
|
|
47
|
-
$mono: (),
|
|
48
|
-
$small: (),
|
|
49
|
-
$extend: ()
|
|
50
|
-
) {
|
|
51
|
-
|
|
52
|
-
$_init-radius: (
|
|
53
|
-
'small': 'radius.sm',
|
|
54
|
-
'medium': 'radius.md',
|
|
55
|
-
'large': 'radius.lg',
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
$_init-breakpoints: (
|
|
59
|
-
'small': 'breakpoint.sm',
|
|
60
|
-
'medium': 'breakpoint.md',
|
|
61
|
-
'large': 'breakpoint.lg',
|
|
62
|
-
'xlarge': 'breakpoint.xl',
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
$_typography-mapper: (
|
|
66
|
-
'global': $global,
|
|
67
|
-
'supertitle': $supertitle,
|
|
68
|
-
'title': $title,
|
|
69
|
-
'subtitle': $subtitle,
|
|
70
|
-
'body': $body,
|
|
71
|
-
'mono': $mono,
|
|
72
|
-
'small': $small,
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
@include token.config($map: $extend);
|
|
76
|
-
@include token.config(
|
|
77
|
-
$primary: _color-theme-token-module($primary),
|
|
78
|
-
$accent: _color-theme-token-module($accent),
|
|
79
|
-
$surface: _color-theme-token-module($surface),
|
|
80
|
-
$primary-alpha: _alpha-color-theme-token-module($primary),
|
|
81
|
-
$accent-alpha: _alpha-color-theme-token-module($accent),
|
|
82
|
-
$surface-alpha: _alpha-color-theme-token-module($surface),
|
|
83
|
-
$background: tokens.primitive-token-switch($background),
|
|
84
|
-
$background-ink: tools.get-ink(tokens.primitive-token-switch($background)),
|
|
85
|
-
$error: _color-theme-token-module($error),
|
|
86
|
-
$error-alpha: _alpha-color-theme-token-module($error),
|
|
87
|
-
$disabled: (
|
|
88
|
-
'default': map.get($disabled, 'default'),
|
|
89
|
-
'ink': tools.prioritize(map.get($disabled, 'ink'), tools.get-ink(map.get($disabled, 'default'), $expressive-inks)),
|
|
90
|
-
),
|
|
91
|
-
$radius: _shape-theme-token-module(map.merge($_init-radius, $radius)),
|
|
92
|
-
$family: _typography-theme-token-module($_typography-mapper, 'family'),
|
|
93
|
-
$size: _typography-theme-token-module($_typography-mapper, 'size'),
|
|
94
|
-
$weight: _typography-theme-token-module($_typography-mapper, 'weight'),
|
|
95
|
-
$line-height: _typography-theme-token-module($_typography-mapper, 'line-height'),
|
|
96
|
-
);
|
|
97
|
-
|
|
98
|
-
@include sentro.breakpoint-config(
|
|
99
|
-
_shape-theme-token-module(map.merge($_init-breakpoints, $breakpoints))
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/// @access private
|
|
104
|
-
@function _color-theme-token-module($query) {
|
|
105
|
-
@if tools.is-type($query, 'map', $errors: false) {
|
|
106
|
-
@return (
|
|
107
|
-
200: tokens.primitive-token-switch('#{map.get($query, 200)}.200', map.get($query, 200)),
|
|
108
|
-
300: tokens.primitive-token-switch('#{map.get($query, 300)}.300', map.get($query, 300)),
|
|
109
|
-
400: tokens.primitive-token-switch('#{map.get($query, 400)}.400', map.get($query, 400)),
|
|
110
|
-
600: tokens.primitive-token-switch('#{map.get($query, 600)}.600', map.get($query, 600)),
|
|
111
|
-
800: tokens.primitive-token-switch('#{map.get($query, 800)}.800', map.get($query, 800)),
|
|
112
|
-
'ink': tools.get-ink(tokens.primitive-token-switch('#{map.get($query, 400)}.400', map.get($query, 400)), $expressive-inks)
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
@return (
|
|
117
|
-
200: tokens.primitive-token-get('#{$query}.200'),
|
|
118
|
-
300: tokens.primitive-token-get('#{$query}.300'),
|
|
119
|
-
400: tokens.primitive-token-get('#{$query}.400'),
|
|
120
|
-
600: tokens.primitive-token-get('#{$query}.600'),
|
|
121
|
-
800: tokens.primitive-token-get('#{$query}.800'),
|
|
122
|
-
'ink': tools.get-ink(tokens.primitive-token-get('#{$query}.400'), $expressive-inks)
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/// @access private
|
|
127
|
-
@function _alpha-color-theme-token-module($query) {
|
|
128
|
-
@if tools.is-type($query, 'map', $errors: false) {
|
|
129
|
-
@return (
|
|
130
|
-
200: rgba(tokens.primitive-token-switch('#{map.get($query, 400)}.200', map.get($query, 400)), 8%),
|
|
131
|
-
300: rgba(tokens.primitive-token-switch('#{map.get($query, 400)}.300', map.get($query, 400)), 12%),
|
|
132
|
-
400: rgba(tokens.primitive-token-switch('#{map.get($query, 400)}.400', map.get($query, 400)), 20%),
|
|
133
|
-
600: rgba(tokens.primitive-token-switch('#{map.get($query, 400)}.600', map.get($query, 400)), 33%),
|
|
134
|
-
800: rgba(tokens.primitive-token-switch('#{map.get($query, 400)}.800', map.get($query, 400)), 42%),
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
@return (
|
|
139
|
-
200: rgba(tokens.primitive-token-get('#{$query}.400'), 8%),
|
|
140
|
-
300: rgba(tokens.primitive-token-get('#{$query}.400'), 12%),
|
|
141
|
-
400: rgba(tokens.primitive-token-get('#{$query}.400'), 20%),
|
|
142
|
-
600: rgba(tokens.primitive-token-get('#{$query}.400'), 33%),
|
|
143
|
-
800: rgba(tokens.primitive-token-get('#{$query}.400'), 42%)
|
|
144
|
-
)
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/// @access private
|
|
148
|
-
@function _shape-theme-token-module($query) {
|
|
149
|
-
$result: ();
|
|
150
|
-
@each $key, $value in $query {
|
|
151
|
-
$result: map.set($result, $key, tokens.primitive-token-switch($value));
|
|
152
|
-
}
|
|
153
|
-
@return $result;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/// @access private
|
|
157
|
-
@function _typography-theme-token-module($query, $property) {
|
|
158
|
-
@return (
|
|
159
|
-
'global': tokens.primitive-token-switch(map.get(map.get($query, 'global'), $property)),
|
|
160
|
-
'supertitle': tokens.primitive-token-switch(map.get(map.get($query, 'supertitle'), $property)),
|
|
161
|
-
'title': tokens.primitive-token-switch(map.get(map.get($query, 'title'), $property)),
|
|
162
|
-
'subtitle': tokens.primitive-token-switch(map.get(map.get($query, 'subtitle'), $property)),
|
|
163
|
-
'body': tokens.primitive-token-switch(map.get(map.get($query, 'body'), $property)),
|
|
164
|
-
'mono': tokens.primitive-token-switch(map.get(map.get($query, 'mono'), $property)),
|
|
165
|
-
'small': tokens.primitive-token-switch(map.get(map.get($query, 'small'), $property)),
|
|
166
|
-
);
|
|
167
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
//---------------------------------------------------
|
|
2
|
-
// Copyright (c) 2024 MatteuSan
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
// in the Software without restriction, including without limitation the rights
|
|
7
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
12
|
-
// copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
// SOFTWARE.
|
|
21
|
-
//---------------------------------------------------
|
|
22
|
-
|
|
23
|
-
@use 'node_modules/@matteusan/sentro';
|
|
24
|
-
@use '../tools';
|
|
25
|
-
|
|
26
|
-
@function get($query) {
|
|
27
|
-
@return sentro.token-get($query);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@function get-raw($query) {
|
|
31
|
-
@return sentro.token-get-raw($query);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@function switch($query, $fallback: ()) {
|
|
35
|
-
@if not check($query) == true and not tools.is-empty($fallback) {
|
|
36
|
-
@return $fallback;
|
|
37
|
-
}
|
|
38
|
-
@return sentro.token-switch($query);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@function switch-raw($query, $fallback: ()) {
|
|
42
|
-
@if check($query) == true {
|
|
43
|
-
@return sentro.token-get-raw($query);
|
|
44
|
-
}
|
|
45
|
-
@if not tools.is-empty($fallback) {
|
|
46
|
-
@return $fallback;
|
|
47
|
-
}
|
|
48
|
-
@return $query;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@function check($query) {
|
|
52
|
-
@return sentro.token-check($query);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@mixin config($map: (), $tokens...) {
|
|
56
|
-
@include sentro.token-config($map, $tokens...);
|
|
57
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//---------------------------------------------------
|
|
2
|
-
// Copyright (c) 2024 MatteuSan
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
// in the Software without restriction, including without limitation the rights
|
|
7
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
12
|
-
// copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
// SOFTWARE.
|
|
21
|
-
//---------------------------------------------------
|
|
22
|
-
|
|
23
|
-
@forward 'token-methods' as primitive-token-*;
|