@matteusan/himig 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.
Files changed (82) hide show
  1. package/README.md +29 -0
  2. package/_index.scss +219 -0
  3. package/_init-font-pack.scss +809 -0
  4. package/ms-badge/_badge-base.scss +45 -0
  5. package/ms-badge/_badge-extend.scss +53 -0
  6. package/ms-badge/_badge-styles.scss +43 -0
  7. package/ms-badge/_badge-theme.scss +47 -0
  8. package/ms-badge/_index.scss +24 -0
  9. package/ms-button/_button-base.scss +76 -0
  10. package/ms-button/_button-extend.scss +53 -0
  11. package/ms-button/_button-mixins.scss +191 -0
  12. package/ms-button/_button-styles.scss +210 -0
  13. package/ms-button/_button-theme.scss +67 -0
  14. package/ms-button/_index.scss +24 -0
  15. package/ms-core/_index.scss +76 -0
  16. package/ms-core/breakpoint/_breakpoint-sentro.scss +53 -0
  17. package/ms-core/breakpoint/_index.scss +23 -0
  18. package/ms-core/color/_color-constants.scss +33 -0
  19. package/ms-core/color/_color-setters.scss +75 -0
  20. package/ms-core/color/_color-utils.scss +62 -0
  21. package/ms-core/color/_color-validators.scss +59 -0
  22. package/ms-core/color/_index.scss +25 -0
  23. package/ms-core/component/component-base.ts +81 -0
  24. package/ms-core/component/component-properties.ts +25 -0
  25. package/ms-core/component/index.ts +29 -0
  26. package/ms-core/component/types/ms-component.d.ts +24 -0
  27. package/ms-core/index.ts +29 -0
  28. package/ms-core/sprite/_index.scss +23 -0
  29. package/ms-core/sprite/_sprite-mixins.scss +29 -0
  30. package/ms-core/struct/_index.scss +24 -0
  31. package/ms-core/struct/_struct-setters.scss +98 -0
  32. package/ms-core/struct/_struct-utils.scss +222 -0
  33. package/ms-core/struct/_struct-validators.scss +57 -0
  34. package/ms-core/theme/_index.scss +30 -0
  35. package/ms-core/theme/_theme-get.scss +41 -0
  36. package/ms-core/theme/_theme-keys.scss +43 -0
  37. package/ms-core/theme/_theme-merge.scss +46 -0
  38. package/ms-core/theme/_theme-properties.scss +52 -0
  39. package/ms-core/theme/_theme-setters.scss +139 -0
  40. package/ms-core/theme/_theme-tokens.scss +57 -0
  41. package/ms-core/tokens/_index.scss +23 -0
  42. package/ms-core/tokens/_token-data.scss +242 -0
  43. package/ms-core/tokens/_token-methods.scss +98 -0
  44. package/ms-core/tools/_index.scss +26 -0
  45. package/ms-core/tools/_tools-color.scss +79 -0
  46. package/ms-core/tools/_tools-sentro.scss +52 -0
  47. package/ms-core/tools/_tools-string.scss +45 -0
  48. package/ms-core/tools/_tools-validation.scss +71 -0
  49. package/ms-core/typography/_index.scss +24 -0
  50. package/ms-core/typography/_typography-setters.scss +78 -0
  51. package/ms-core/typography/_typography-utils.scss +76 -0
  52. package/ms-core/typography/_typography-validators.scss +47 -0
  53. package/ms-form-field/_form-field-base.scss +113 -0
  54. package/ms-form-field/_form-field-extend.scss +53 -0
  55. package/ms-form-field/_form-field-styles.scss +212 -0
  56. package/ms-form-field/_form-field-theme.scss +63 -0
  57. package/ms-form-field/_index.scss +24 -0
  58. package/ms-item-card/_index.scss +24 -0
  59. package/ms-item-card/_item-card-base.scss +96 -0
  60. package/ms-item-card/_item-card-extend.scss +53 -0
  61. package/ms-item-card/_item-card-styles.scss +64 -0
  62. package/ms-item-card/_item-card-theme.scss +66 -0
  63. package/ms-list/_index.scss +24 -0
  64. package/ms-list/_list-base.scss +62 -0
  65. package/ms-list/_list-extend.scss +53 -0
  66. package/ms-list/_list-styles.scss +77 -0
  67. package/ms-list/_list-theme.scss +59 -0
  68. package/ms-sprite/_index.scss +23 -0
  69. package/ms-sprite/_sprite-styles.scss +57 -0
  70. package/ms-surface/_index.scss +24 -0
  71. package/ms-surface/_surface-base.scss +111 -0
  72. package/ms-surface/_surface-extend.scss +53 -0
  73. package/ms-surface/_surface-styles.scss +88 -0
  74. package/ms-surface/_surface-theme.scss +55 -0
  75. package/ms-utils/_color-utils.scss +99 -0
  76. package/ms-utils/_consts.scss +25 -0
  77. package/ms-utils/_index.scss +26 -0
  78. package/ms-utils/_layout-utils.scss +307 -0
  79. package/ms-utils/_struct-utils.scss +322 -0
  80. package/ms-utils/_typography-utils.scss +167 -0
  81. package/ms-utils/_util-helpers.scss +54 -0
  82. package/package.json +15 -0
@@ -0,0 +1,45 @@
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 '../ms-core';
24
+
25
+ @mixin init() {
26
+ .ms-badge {
27
+ display: flex;
28
+ flex-flow: row nowrap;
29
+
30
+ @content;
31
+
32
+ .ms-badge__icon {
33
+ //
34
+ }
35
+
36
+ .ms-badge__label {
37
+ @include ms-core.typography-apply('badge', (
38
+ family: inherit,
39
+ size: inherit,
40
+ weight: inherit,
41
+ line-height: inherit
42
+ ));
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,53 @@
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 '../ms-core';
24
+
25
+ /// Component variant maker.
26
+ /// @param {string} $variant
27
+ /// @return {*} extension class.
28
+ @mixin extend($variant) {
29
+ .ms-badge.is-#{$variant} {
30
+ @content;
31
+ }
32
+ }
33
+
34
+ /// Color variant map.
35
+ /// @param {map} $color-map
36
+ /// @return {*} color styles.
37
+ @mixin color($color-map) {
38
+ @include ms-core.color-bind('badge', $color-map);
39
+ }
40
+
41
+ /// Structure variant mixin.
42
+ /// @param {map} $struct-map
43
+ /// @return {*} struct styles.
44
+ @mixin struct($struct-map) {
45
+ @include ms-core.struct-bind('badge', $struct-map);
46
+ }
47
+
48
+ /// Typography variant mixin.
49
+ /// @param {map} $type-map
50
+ /// @return {*} typography styles.
51
+ @mixin typography($type-map) {
52
+ @include ms-core.typography-bind('badge', $type-map);
53
+ }
@@ -0,0 +1,43 @@
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 '../ms-core';
24
+ @use 'badge-base' as base;
25
+ @use 'badge-theme' as theme;
26
+
27
+ @mixin render(
28
+ $color: (),
29
+ $struct: (),
30
+ $typography: (),
31
+ $settings: ()
32
+ ) {
33
+ $color: ms-core.theme-merge(theme.$init-color, $color);
34
+ $struct: ms-core.theme-merge(theme.$init-struct, $struct);
35
+ $typography: ms-core.theme-merge(theme.$init-typography, $typography);
36
+ $settings: ms-core.theme-merge(theme.$init-settings, $settings);
37
+
38
+ @include base.init() {
39
+ @include ms-core.color-apply('badge', $color);
40
+ @include ms-core.struct-apply('badge', $struct);
41
+ @include ms-core.typography-bind('badge', $typography);
42
+ }
43
+ }
@@ -0,0 +1,47 @@
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
+ $init-color: (
24
+ fill: 'accent-400',
25
+ ink: 'accent-ink',
26
+ border: 'accent-400',
27
+ );
28
+
29
+ $init-struct: (
30
+ width: (
31
+ default: 100%,
32
+ max: max-content
33
+ ),
34
+ padding: ('xs' 'sm'),
35
+ radius: 'small',
36
+ border-width: 'xs',
37
+ border-style: solid,
38
+ );
39
+
40
+ $init-typography: (
41
+ family: 'global',
42
+ size: 'small',
43
+ weight: 'normal',
44
+ line-height: 'condensed'
45
+ );
46
+
47
+ $init-settings: ();
@@ -0,0 +1,24 @@
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 'badge-styles';
24
+ @forward 'badge-extend';
@@ -0,0 +1,76 @@
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 '../ms-core';
24
+
25
+ @mixin init() {
26
+ .ms-button {
27
+ display: inline-flex;
28
+ flex-flow: row nowrap;
29
+ justify-content: center;
30
+ align-items: center;
31
+ text-align: center;
32
+
33
+ user-select: none;
34
+ overflow: visible;
35
+ vertical-align: middle;
36
+
37
+ cursor: pointer;
38
+ outline: ms-core.key-create('button-outline', none);
39
+
40
+ -webkit-appearance: caret;
41
+ @include ms-core.prefix(transition, all var(--ms-transition-time) ease);
42
+
43
+ @content;
44
+
45
+ .ms-button__icon {
46
+ position: relative;
47
+ @include ms-core.color-ink('button-icon', inherit);
48
+ @include ms-core.typography-size('button-icon', 'size.md');
49
+ /* @fallback */
50
+ width: ms-core.key-create('button-icon-size', ms-core.primitive-token-get('size.md'));
51
+ max-width: max-content;
52
+ height: ms-core.key-create('button-icon-size', ms-core.primitive-token-get('size.md'));
53
+
54
+ > * {
55
+ position: relative;
56
+ @include ms-core.color-ink('button-icon', inherit);
57
+ @include ms-core.typography-size('button-icon', 'size.md');
58
+ /* @fallback */
59
+ width: ms-core.key-create('button-icon-size', ms-core.primitive-token-get('size.md'));
60
+ max-width: max-content;
61
+ height: ms-core.key-create('button-icon-size', ms-core.primitive-token-get('size.md'));
62
+ }
63
+ }
64
+
65
+ .ms-button__label {
66
+ @include ms-core.color-ink('button-label', inherit);
67
+ @include ms-core.typography-apply('button-label', (
68
+ family: inherit,
69
+ size: inherit,
70
+ weight: inherit,
71
+ line-height: inherit
72
+ ));
73
+ text-align: center;
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,53 @@
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 '../ms-core';
24
+
25
+ /// Component variant maker.
26
+ /// @param {string} $variant
27
+ /// @return {*} extension class.
28
+ @mixin extend($variant) {
29
+ .ms-button.is-#{$variant} {
30
+ @content;
31
+ }
32
+ }
33
+
34
+ /// Color variant map.
35
+ /// @param {map} $color-map
36
+ /// @return {*} color styles.
37
+ @mixin color($color-map) {
38
+ @include ms-core.color-bind('button', $color-map);
39
+ }
40
+
41
+ /// Structure variant mixin.
42
+ /// @param {map} $struct-map
43
+ /// @return {*} struct styles.
44
+ @mixin struct($struct-map) {
45
+ @include ms-core.struct-bind('button', $struct-map);
46
+ }
47
+
48
+ /// Typography variant mixin.
49
+ /// @param {map} $type-map
50
+ /// @return {*} typography styles.
51
+ @mixin typography($type-map) {
52
+ @include ms-core.typography-bind('button', $type-map);
53
+ }
@@ -0,0 +1,191 @@
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 '../ms-core';
24
+ @use 'sass:map';
25
+
26
+ @mixin text($fills, $inks, $borders) {
27
+ $fill: map.get($fills, 'default');
28
+ $fill-disabled: map.get($fills, 'disabled');
29
+ $ink-disabled: map.get($fills, 'disabled');
30
+ $border: map.get($borders, 'default');
31
+
32
+ &:not(:disabled) {
33
+ @include ms-core.color-bind('button', (
34
+ fill: transparent,
35
+ ink: $fill,
36
+ border: transparent
37
+ ));
38
+ @include ms-core.key-bind('button-outline', 2px solid rgba(raw($fill), ms-core.$color-fill-default-opacity));
39
+
40
+ &:hover {
41
+ @include ms-core.color-bind('button', (
42
+ fill: rgba(raw($fill), ms-core.$color-fill-hover-opacity),
43
+ ink: $fill,
44
+ border: rgba(raw($border), ms-core.$color-border-hover-opacity)
45
+ ));
46
+ }
47
+
48
+ &:focus {
49
+ @include ms-core.color-bind('button', (
50
+ fill: rgba(raw($fill), ms-core.$color-fill-focus-opacity),
51
+ ink: $fill,
52
+ border: rgba(raw($border), ms-core.$color-border-focus-opacity)
53
+ ));
54
+ @include ms-core.key-bind('button-outline', 2px solid rgba(raw($fill), ms-core.$color-outline-focus-opacity));
55
+ }
56
+
57
+ &:active {
58
+ @include ms-core.color-bind('button', (
59
+ fill: rgba(raw($fill), ms-core.$color-fill-active-opacity),
60
+ ink: $fill,
61
+ border: rgba(raw($border), ms-core.$color-border-active-opacity)
62
+ ));
63
+ }
64
+ }
65
+
66
+ &:disabled {
67
+ @include ms-core.color-bind('button', (
68
+ fill: transparent,
69
+ ink: $ink-disabled,
70
+ border: transparent
71
+ ));
72
+ }
73
+ }
74
+
75
+ @mixin outlined($fills, $inks, $borders) {
76
+ $fill: map.get($fills, 'default');
77
+ $fill-hover: map.get($fills, 'hover');
78
+ $fill-focus: map.get($fills, 'focus');
79
+ $fill-active: map.get($fills, 'active');
80
+ $fill-disabled: map.get($fills, 'disabled');
81
+ $ink: map.get($inks, 'default');
82
+ $ink-disabled: map.get($fills, 'disabled');
83
+ $border: map.get($borders, 'default');
84
+ $border-hover: map.get($borders, 'hover');
85
+ $border-focus: map.get($borders, 'focus');
86
+ $border-active: map.get($borders, 'active');
87
+ $border-disabled: map.get($borders, 'disabled');
88
+
89
+ &:not(:disabled) {
90
+ @include ms-core.color-bind('button', (
91
+ fill: transparent,
92
+ ink: $fill,
93
+ border: $border
94
+ ));
95
+ @include ms-core.key-bind('button-outline', 2px solid rgba(raw($fill), ms-core.$color-fill-default-opacity));
96
+
97
+ &:focus {
98
+ @include ms-core.color-bind('button', (
99
+ fill: rgba(raw($fill), ms-core.$color-fill-focus-opacity),
100
+ ink: $fill,
101
+ border: $border
102
+ ));
103
+ @include ms-core.key-bind('button-outline', 2px solid rgba(raw($fill), ms-core.$color-outline-focus-opacity));
104
+ }
105
+
106
+ &:hover {
107
+ @include ms-core.color-bind('button', (
108
+ fill: $fill-hover,
109
+ ink: $ink,
110
+ border: $border-hover
111
+ ));
112
+ }
113
+
114
+ &:active {
115
+ @include ms-core.color-bind('button', (
116
+ fill: $fill-active,
117
+ ink: $ink,
118
+ border: $border-active
119
+ ));
120
+ }
121
+ }
122
+
123
+ &:disabled {
124
+ @include ms-core.color-bind('button', (
125
+ fill: transparent,
126
+ ink: $ink-disabled,
127
+ border: $border-disabled
128
+ ));
129
+ }
130
+ }
131
+
132
+ @mixin filled($fills, $inks, $borders) {
133
+ $fill: map.get($fills, 'default');
134
+ $fill-hover: map.get($fills, 'hover');
135
+ $fill-focus: map.get($fills, 'focus');
136
+ $fill-active: map.get($fills, 'active');
137
+ $fill-disabled: map.get($fills, 'disabled');
138
+ $ink: map.get($inks, 'default');
139
+ $ink-disabled: map.get($inks, 'disabled');
140
+ $border: map.get($borders, 'default');
141
+ $border-hover: map.get($borders, 'hover');
142
+ $border-focus: map.get($borders, 'focus');
143
+ $border-active: map.get($borders, 'active');
144
+ $border-disabled: map.get($borders, 'disabled');
145
+
146
+ &:not(:disabled) {
147
+ @include ms-core.color-bind('button', (
148
+ fill: $fill,
149
+ ink: $ink,
150
+ border: $border
151
+ ));
152
+ @include ms-core.key-bind('button-outline', 2px solid rgba(raw($fill), ms-core.$color-fill-default-opacity));
153
+
154
+ &:hover {
155
+ @include ms-core.color-bind('button', (
156
+ fill: $fill-hover,
157
+ ink: $ink,
158
+ border: $border-hover
159
+ ));
160
+ }
161
+
162
+ &:focus {
163
+ @include ms-core.color-bind('button', (
164
+ fill: $fill-focus,
165
+ ink: $ink,
166
+ border: $border-focus
167
+ ));
168
+ @include ms-core.key-bind('button-outline', 2px solid rgba(raw($fill), ms-core.$color-outline-focus-opacity));
169
+ }
170
+
171
+ &:active {
172
+ @include ms-core.color-bind('button', (
173
+ fill: $fill-active,
174
+ ink: $ink,
175
+ border: $border-active
176
+ ));
177
+ }
178
+ }
179
+
180
+ &:disabled {
181
+ @include ms-core.color-bind('button', (
182
+ fill: $fill-disabled,
183
+ ink: $ink-disabled,
184
+ border: $border-disabled
185
+ ));
186
+ }
187
+ }
188
+
189
+ @function raw($query) {
190
+ @return ms-core.token-switch-raw($query);
191
+ }