@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
|
@@ -1,24 +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 'typography-setters';
|
|
24
|
-
@forward 'typography-utils';
|
|
@@ -1,78 +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 '../theme';
|
|
24
|
-
@use '../tools';
|
|
25
|
-
@use 'sass:map';
|
|
26
|
-
@use 'sass:list';
|
|
27
|
-
@use 'typography-utils' as util;
|
|
28
|
-
@use 'typography-validators' as validator;
|
|
29
|
-
|
|
30
|
-
/// Base mixin for apply() and bind()
|
|
31
|
-
/// @access private
|
|
32
|
-
@mixin _base($component, $theme, $settings: ()) {
|
|
33
|
-
$_init-settings: ('intent': create);
|
|
34
|
-
$_settings: map.merge($_init-settings, $settings);
|
|
35
|
-
|
|
36
|
-
/// @type string
|
|
37
|
-
$intent: map.get($_settings, 'intent');
|
|
38
|
-
|
|
39
|
-
$family: theme.theme-get($theme, 'family');
|
|
40
|
-
$size: theme.theme-get($theme, 'size');
|
|
41
|
-
$weight: theme.theme-get($theme, 'weight');
|
|
42
|
-
$line-height: theme.theme-get($theme, 'line-height');
|
|
43
|
-
|
|
44
|
-
@if tools.is-type($theme, 'map', $custom-error: '$theme is expecting a map. Map was not given.') {
|
|
45
|
-
@include validator.validate-typography-props(map.keys($theme)) {
|
|
46
|
-
@if $family {
|
|
47
|
-
@include util.family($component, $family, $intent);
|
|
48
|
-
}
|
|
49
|
-
@if $size {
|
|
50
|
-
@include util.size($component, $size, $intent);
|
|
51
|
-
}
|
|
52
|
-
@if $weight {
|
|
53
|
-
@include util.weight($component, $weight, $intent);
|
|
54
|
-
}
|
|
55
|
-
@if $line-height {
|
|
56
|
-
@include util.line-height($component, $line-height, $intent);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/// Mixin that applies typography styles to a component.
|
|
63
|
-
/// @param {string} $component
|
|
64
|
-
/// @param {map<string, string>} $theme
|
|
65
|
-
/// @return {void} void.
|
|
66
|
-
@mixin apply($component, $theme) {
|
|
67
|
-
@include _base($component, $theme);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/// Mixin that binds typography styles to a component with existing keys.
|
|
71
|
-
/// @param {string} $component
|
|
72
|
-
/// @param {map<string, string>} $theme
|
|
73
|
-
/// @return {void} void.
|
|
74
|
-
@mixin bind($component, $theme) {
|
|
75
|
-
@include _base($component, $theme, (
|
|
76
|
-
'intent': bind
|
|
77
|
-
));
|
|
78
|
-
}
|
|
@@ -1,76 +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 '../theme';
|
|
24
|
-
@use '../tokens' as token;
|
|
25
|
-
|
|
26
|
-
/// Mixin for applying font family.
|
|
27
|
-
/// @param {string} $component
|
|
28
|
-
/// @param {string} $family
|
|
29
|
-
/// @param {string} $intent
|
|
30
|
-
/// @return {void} font family styles.
|
|
31
|
-
@mixin family($component, $family, $intent: 'create') {
|
|
32
|
-
@include theme.property(
|
|
33
|
-
font-family,
|
|
34
|
-
('#{$component}-family', theme.token-switch('family-#{$family}', token.primitive-token-switch('family.#{$family}', $family))),
|
|
35
|
-
$intent
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/// Mixin for applying font size.
|
|
40
|
-
/// @param {string} $component
|
|
41
|
-
/// @param {string} $size
|
|
42
|
-
/// @param {string} $intent
|
|
43
|
-
/// @return {void} font size styles.
|
|
44
|
-
@mixin size($component, $size, $intent: 'create') {
|
|
45
|
-
@include theme.property(
|
|
46
|
-
font-size,
|
|
47
|
-
('#{$component}-size', theme.token-switch('size-#{$size}', token.primitive-token-switch('size.#{$size}', $size))),
|
|
48
|
-
$intent
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/// Mixin for applying font weight.
|
|
53
|
-
/// @param {string} $component
|
|
54
|
-
/// @param {string} $weight
|
|
55
|
-
/// @param {string} $intent
|
|
56
|
-
/// @return {void} font weight styles.
|
|
57
|
-
@mixin weight($component, $weight, $intent: 'create') {
|
|
58
|
-
@include theme.property(
|
|
59
|
-
font-weight,
|
|
60
|
-
('#{$component}-weight', theme.token-switch('weight-#{$weight}', token.primitive-token-switch('weight.#{$weight}', $weight))),
|
|
61
|
-
$intent
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/// Mixin for applying line height.
|
|
66
|
-
/// @param {string} $component
|
|
67
|
-
/// @param {string} $line-height
|
|
68
|
-
/// @param {string} $intent
|
|
69
|
-
/// @return {void} line height styles.
|
|
70
|
-
@mixin line-height($component, $line-height, $intent: 'create') {
|
|
71
|
-
@include theme.property(
|
|
72
|
-
line-height,
|
|
73
|
-
('#{$component}-line-height', theme.token-switch('line-height-#{$line-height}', token.primitive-token-switch('line-height.#{$line-height}', $line-height))),
|
|
74
|
-
$intent
|
|
75
|
-
);
|
|
76
|
-
}
|
|
@@ -1,47 +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:list';
|
|
24
|
-
|
|
25
|
-
/// Valid component props
|
|
26
|
-
/// @access private
|
|
27
|
-
$_valid-props: ('family', 'size', 'weight', 'line-height');
|
|
28
|
-
|
|
29
|
-
/// Validates a set of typography props.
|
|
30
|
-
/// @param {map} $props
|
|
31
|
-
/// @access protected
|
|
32
|
-
@mixin validate-typography-props($props) {
|
|
33
|
-
@each $prop in $props {
|
|
34
|
-
@if _is-typography-prop($prop) {
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
@content;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/// Validates a typography prop.
|
|
41
|
-
/// @access private
|
|
42
|
-
@function _is-typography-prop($query) {
|
|
43
|
-
@if not list.index($_valid-props, $query) {
|
|
44
|
-
@error 'Invalid/unrecognized prop: #{$query}. Please use one of the following props: #{$_valid-props}.'
|
|
45
|
-
}
|
|
46
|
-
@return true;
|
|
47
|
-
}
|