@matteusan/himig 1.8.1 → 1.9.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 +16 -11
- package/ms-button/_button-base.scss +3 -1
- package/ms-button/_button-styles.scss +12 -3
- package/ms-button/_button-theme.scss +5 -5
- package/ms-card/_card-base.scss +4 -2
- package/ms-card/_card-theme.scss +2 -2
- package/ms-form-field/_form-field-base.scss +9 -3
- package/ms-form-field/_form-field-styles.scss +7 -1
- package/ms-form-field/_form-field-theme.scss +5 -5
- package/ms-link/_link-styles.scss +3 -1
- package/ms-list/_list-base.scss +3 -1
- package/ms-list/_list-theme.scss +8 -8
- package/ms-select-field/_select-field-base.scss +6 -2
- package/ms-select-field/_select-field-theme.scss +5 -5
- package/ms-tick-field/_tick-field-base.scss +12 -3
- package/ms-tick-field/_tick-field-styles.scss +47 -29
- package/ms-tick-field/_tick-field-theme.scss +14 -9
- package/ms-utils/_struct-utils.scss +0 -1
- package/ms-utils/_typography-utils.scss +64 -9
- package/package.json +12 -13
package/README.md
CHANGED
|
@@ -6,11 +6,11 @@ use DartSass instead of the now deprecated LibSass (node-sass)**.
|
|
|
6
6
|
|
|
7
7
|
## Setup
|
|
8
8
|
```sh
|
|
9
|
-
$ npm
|
|
9
|
+
$ npm i @matteusan/himig @matteusan/pintig --save
|
|
10
10
|
|
|
11
11
|
# or
|
|
12
12
|
|
|
13
|
-
$
|
|
13
|
+
$ pnpm add @matteusan/himig @matteusan/pintig
|
|
14
14
|
```
|
|
15
15
|
```scss
|
|
16
16
|
// main.scss
|
package/_index.scss
CHANGED
|
@@ -21,10 +21,10 @@ $vue-mode: $test-mode !default;
|
|
|
21
21
|
|
|
22
22
|
@mixin init(
|
|
23
23
|
$theme: (),
|
|
24
|
-
$primary: 'ms-
|
|
24
|
+
$primary: 'ms-neutral',
|
|
25
25
|
$accent: 'ms-orange',
|
|
26
|
-
$surface: 'ms-
|
|
27
|
-
$background: 'ms-
|
|
26
|
+
$surface: 'ms-neutral',
|
|
27
|
+
$background: 'ms-neutral.800',
|
|
28
28
|
$error: 'ms-red',
|
|
29
29
|
$disabled: (
|
|
30
30
|
'default': rgba(#fff, 12%),
|
|
@@ -64,30 +64,34 @@ $vue-mode: $test-mode !default;
|
|
|
64
64
|
'weight': 'weight.normal',
|
|
65
65
|
'line-height': 'line-height.normal',
|
|
66
66
|
'squeeze': 'squeeze.normal',
|
|
67
|
+
'stretch': 'stretch.normal'
|
|
67
68
|
);
|
|
68
69
|
|
|
69
70
|
$_init-type-supertitle: (
|
|
70
71
|
'family': 'family.serif',
|
|
71
|
-
'size': 'size.
|
|
72
|
+
'size': 'size.6xl',
|
|
72
73
|
'weight': 'weight.normal',
|
|
73
|
-
'line-height': 'line-height.short',
|
|
74
|
-
'squeeze': 'squeeze.tight',
|
|
74
|
+
'line-height': 'line-height.x-short',
|
|
75
|
+
'squeeze': 'squeeze.x-tight',
|
|
76
|
+
'stretch': 'stretch.condensed'
|
|
75
77
|
);
|
|
76
78
|
|
|
77
79
|
$_init-type-title: (
|
|
78
80
|
'family': 'family.serif',
|
|
79
|
-
'size': 'size.
|
|
81
|
+
'size': 'size.3xl',
|
|
80
82
|
'weight': 'weight.normal',
|
|
81
|
-
'line-height': 'line-height.short',
|
|
83
|
+
'line-height': 'line-height.x-short',
|
|
82
84
|
'squeeze': 'squeeze.tight',
|
|
85
|
+
'stretch': 'stretch.condensed'
|
|
83
86
|
);
|
|
84
87
|
|
|
85
88
|
$_init-type-subtitle: (
|
|
86
89
|
'family': 'family.sans-serif',
|
|
87
|
-
'size': 'size.
|
|
90
|
+
'size': 'size.xl',
|
|
88
91
|
'weight': 'weight.light',
|
|
89
92
|
'line-height': 'line-height.normal',
|
|
90
93
|
'squeeze': 'squeeze.normal',
|
|
94
|
+
'stretch': 'stretch.normal'
|
|
91
95
|
);
|
|
92
96
|
|
|
93
97
|
$_init-type-body: (
|
|
@@ -96,6 +100,7 @@ $vue-mode: $test-mode !default;
|
|
|
96
100
|
'weight': 'weight.normal',
|
|
97
101
|
'line-height': 'line-height.normal',
|
|
98
102
|
'squeeze': 'squeeze.normal',
|
|
103
|
+
'stretch': 'stretch.normal'
|
|
99
104
|
);
|
|
100
105
|
|
|
101
106
|
$_init-type-mono: (
|
|
@@ -104,6 +109,7 @@ $vue-mode: $test-mode !default;
|
|
|
104
109
|
'weight': 'weight.normal',
|
|
105
110
|
'line-height': 'line-height.normal',
|
|
106
111
|
'squeeze': 'squeeze.normal',
|
|
112
|
+
'stretch': 'stretch.normal'
|
|
107
113
|
);
|
|
108
114
|
|
|
109
115
|
$_init-type-small: (
|
|
@@ -112,6 +118,7 @@ $vue-mode: $test-mode !default;
|
|
|
112
118
|
'weight': 'weight.light',
|
|
113
119
|
'line-height': 'line-height.tall',
|
|
114
120
|
'squeeze': 'squeeze.normal',
|
|
121
|
+
'stretch': 'stretch.normal'
|
|
115
122
|
);
|
|
116
123
|
|
|
117
124
|
$_init-breakpoints: (
|
|
@@ -167,9 +174,7 @@ $vue-mode: $test-mode !default;
|
|
|
167
174
|
)
|
|
168
175
|
));
|
|
169
176
|
|
|
170
|
-
// Immutables
|
|
171
177
|
--ms-shadow-color: rgba(0, 0, 0, 0.25);
|
|
172
|
-
--ms-transition-time: 0.2s;
|
|
173
178
|
|
|
174
179
|
font-family: pintig.token-get('family-global');
|
|
175
180
|
line-height: pintig.token-get('line-height-global');
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
outline: pintig.key-create('button-outline', none);
|
|
21
21
|
|
|
22
22
|
-webkit-appearance: caret;
|
|
23
|
-
|
|
23
|
+
transition-property: background, color, border;
|
|
24
|
+
transition-duration: pintig.token-get('time-short');
|
|
25
|
+
transition-timing-function: pintig.token-get('easing');
|
|
24
26
|
|
|
25
27
|
@content;
|
|
26
28
|
|
|
@@ -78,7 +78,7 @@ $_states: ('error');
|
|
|
78
78
|
|
|
79
79
|
&:where(.is-small) {
|
|
80
80
|
@include pintig.struct-bind('button', (
|
|
81
|
-
padding: 'sm',
|
|
81
|
+
padding: ('xs' 'sm'),
|
|
82
82
|
));
|
|
83
83
|
@include pintig.typography-apply('button', (
|
|
84
84
|
size: 'xs'
|
|
@@ -87,15 +87,24 @@ $_states: ('error');
|
|
|
87
87
|
|
|
88
88
|
&:where(.is-large) {
|
|
89
89
|
@include pintig.struct-bind('button', (
|
|
90
|
-
padding: 'lg',
|
|
90
|
+
padding: ('md' 'lg'),
|
|
91
91
|
gap: 'sm',
|
|
92
|
-
radius: 'md'
|
|
93
92
|
));
|
|
94
93
|
@include pintig.typography-apply('button', (
|
|
95
94
|
size: 'md'
|
|
96
95
|
));
|
|
97
96
|
}
|
|
98
97
|
|
|
98
|
+
&:where(.is-fullwidth) {
|
|
99
|
+
@include pintig.struct-bind('button', (
|
|
100
|
+
width: (
|
|
101
|
+
default: 100%,
|
|
102
|
+
max: 100%,
|
|
103
|
+
),
|
|
104
|
+
height: 100%
|
|
105
|
+
));
|
|
106
|
+
}
|
|
107
|
+
|
|
99
108
|
@each $state in $_states {
|
|
100
109
|
&:where(.is-#{$state}) {
|
|
101
110
|
@include style.text(
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
$init-color: (
|
|
6
6
|
fill: (
|
|
7
7
|
default: 'accent-400',
|
|
8
|
-
hover: 'accent-
|
|
9
|
-
active: 'accent-
|
|
8
|
+
hover: 'accent-400',
|
|
9
|
+
active: 'accent-300',
|
|
10
10
|
focus: 'accent-400',
|
|
11
11
|
disabled: 'disabled',
|
|
12
12
|
),
|
|
@@ -19,8 +19,8 @@ $init-color: (
|
|
|
19
19
|
),
|
|
20
20
|
border: (
|
|
21
21
|
default: 'accent-400',
|
|
22
|
-
hover: 'accent-
|
|
23
|
-
active: 'accent-
|
|
22
|
+
hover: 'accent-400',
|
|
23
|
+
active: 'accent-300',
|
|
24
24
|
focus: 'accent-400',
|
|
25
25
|
disabled: 'disabled',
|
|
26
26
|
),
|
|
@@ -32,7 +32,7 @@ $init-struct: (
|
|
|
32
32
|
min: 50px,
|
|
33
33
|
max: max-content
|
|
34
34
|
),
|
|
35
|
-
padding: 'md',
|
|
35
|
+
padding: ('md' 'lg'),
|
|
36
36
|
radius: 'small',
|
|
37
37
|
border-width: 'xs',
|
|
38
38
|
border-style: solid,
|
package/ms-card/_card-base.scss
CHANGED
|
@@ -85,7 +85,9 @@
|
|
|
85
85
|
left: 0;
|
|
86
86
|
opacity: 0;
|
|
87
87
|
transform: translateY(100%);
|
|
88
|
-
transition:
|
|
88
|
+
transition-property: transform, bottom, opacity;
|
|
89
|
+
transition-duration: pintig.token-get('time-short');
|
|
90
|
+
transition-timing-function: pintig.token-get('easing-smooth');
|
|
89
91
|
|
|
90
92
|
.ms-card__header {
|
|
91
93
|
padding-block-end: 0 !important;
|
|
@@ -119,7 +121,7 @@
|
|
|
119
121
|
display: flex;
|
|
120
122
|
flex-flow: column nowrap;
|
|
121
123
|
justify-content: space-between;
|
|
122
|
-
transition: all 0.8s var(--easing);
|
|
124
|
+
transition: all 0.8s var(--ms-easing);
|
|
123
125
|
will-change: transform;
|
|
124
126
|
gap: pintig.key-get('card-section-gap');
|
|
125
127
|
|
package/ms-card/_card-theme.scss
CHANGED
|
@@ -36,7 +36,7 @@ $init-typography: (
|
|
|
36
36
|
),
|
|
37
37
|
size: (
|
|
38
38
|
'default': 'body',
|
|
39
|
-
'title': '
|
|
39
|
+
'title': 'subtitle',
|
|
40
40
|
'subtitle': 'body',
|
|
41
41
|
'icon': 66px
|
|
42
42
|
),
|
|
@@ -47,7 +47,7 @@ $init-typography: (
|
|
|
47
47
|
),
|
|
48
48
|
line-height: (
|
|
49
49
|
'default': 'normal',
|
|
50
|
-
'title': '
|
|
50
|
+
'title': 'x-short',
|
|
51
51
|
'subtitle': 'normal',
|
|
52
52
|
),
|
|
53
53
|
squeeze: (
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
padding: ('xs' 'xs' 0 0),
|
|
28
28
|
));
|
|
29
29
|
@include pintig.typography-apply('form-field-label', pintig.$type-inherit-template);
|
|
30
|
-
|
|
30
|
+
transition-property: top, font-size;
|
|
31
|
+
transition-duration: pintig.token-get('time-short');
|
|
32
|
+
transition-timing-function: pintig.token-get('easing');
|
|
31
33
|
cursor: text;
|
|
32
34
|
}
|
|
33
35
|
|
|
@@ -78,7 +80,9 @@
|
|
|
78
80
|
resize: none;
|
|
79
81
|
cursor: text;
|
|
80
82
|
-webkit-appearance: caret;
|
|
81
|
-
|
|
83
|
+
transition-property: background, color, border;
|
|
84
|
+
transition-duration: pintig.token-get('time-short');
|
|
85
|
+
transition-timing-function: pintig.token-get('easing');
|
|
82
86
|
|
|
83
87
|
&::placeholder {
|
|
84
88
|
color: pintig.key-create('form-field-placeholder-ink', inherit);
|
|
@@ -96,7 +100,9 @@
|
|
|
96
100
|
weight: inherit,
|
|
97
101
|
line-height: inherit,
|
|
98
102
|
));
|
|
99
|
-
|
|
103
|
+
transition-property: background, color, border;
|
|
104
|
+
transition-duration: pintig.token-get('time-short');
|
|
105
|
+
transition-timing-function: pintig.token-get('easing');
|
|
100
106
|
}
|
|
101
107
|
}
|
|
102
108
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
) {
|
|
29
29
|
.ms-form-field__label {
|
|
30
30
|
@include pintig.color-bind('form-field-label', (
|
|
31
|
-
ink: pintig.theme-get($color, 'ink', '
|
|
31
|
+
ink: pintig.theme-get($color, 'ink', 'default'),
|
|
32
32
|
));
|
|
33
33
|
@include pintig.typography-bind('form-field-label', (
|
|
34
34
|
family: pintig.theme-get($typography, 'family'),
|
|
@@ -37,6 +37,12 @@
|
|
|
37
37
|
line-height: pintig.theme-get($typography, 'height'),
|
|
38
38
|
));
|
|
39
39
|
user-select: none;
|
|
40
|
+
|
|
41
|
+
&:has(+ .ms-form-field__input:disabled) {
|
|
42
|
+
@include pintig.color-bind('form-field-label', (
|
|
43
|
+
ink: pintig.theme-get($color, 'ink', 'disabled'),
|
|
44
|
+
));
|
|
45
|
+
}
|
|
40
46
|
}
|
|
41
47
|
|
|
42
48
|
&:has(.ms-form-field__input:read-only:disabled) {
|
|
@@ -8,8 +8,8 @@ $init-color: (
|
|
|
8
8
|
focus: 'accent-400',
|
|
9
9
|
disabled: 'disabled',
|
|
10
10
|
error: (
|
|
11
|
-
default: 'error-
|
|
12
|
-
focus: 'error-
|
|
11
|
+
default: 'error-600',
|
|
12
|
+
focus: 'error-600'
|
|
13
13
|
)
|
|
14
14
|
),
|
|
15
15
|
ink: (
|
|
@@ -19,12 +19,12 @@ $init-color: (
|
|
|
19
19
|
error: 'error-400'
|
|
20
20
|
),
|
|
21
21
|
border: (
|
|
22
|
-
default: 'surface-
|
|
22
|
+
default: 'surface-600',
|
|
23
23
|
focus: 'accent-400',
|
|
24
24
|
disabled: 'disabled',
|
|
25
25
|
error: (
|
|
26
|
-
default: 'error-
|
|
27
|
-
focus: 'error-
|
|
26
|
+
default: 'error-600',
|
|
27
|
+
focus: 'error-500'
|
|
28
28
|
)
|
|
29
29
|
),
|
|
30
30
|
);
|
|
@@ -30,7 +30,9 @@
|
|
|
30
30
|
line-height: pintig.theme-get($typography, 'line-height')
|
|
31
31
|
));
|
|
32
32
|
text-decoration: underline;
|
|
33
|
-
|
|
33
|
+
transition-property: background, color, border;
|
|
34
|
+
transition-duration: pintig.token-get('time-short');
|
|
35
|
+
transition-timing-function: pintig.token-get('easing');
|
|
34
36
|
|
|
35
37
|
&:hover {
|
|
36
38
|
@include pintig.color-bind('link', (
|
package/ms-list/_list-base.scss
CHANGED
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
weight: inherit,
|
|
40
40
|
line-height: inherit,
|
|
41
41
|
));
|
|
42
|
-
|
|
42
|
+
transition-property: background, color, border;
|
|
43
|
+
transition-duration: pintig.token-get('time-short');
|
|
44
|
+
transition-timing-function: pintig.token-get('easing');
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
}
|
package/ms-list/_list-theme.scss
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
$init-color: (
|
|
6
6
|
fill: (
|
|
7
|
-
default: 'surface-
|
|
8
|
-
hover: 'surface-
|
|
9
|
-
focus: 'surface-
|
|
10
|
-
active: 'surface-
|
|
7
|
+
default: 'surface-600',
|
|
8
|
+
hover: 'surface-500',
|
|
9
|
+
focus: 'surface-500',
|
|
10
|
+
active: 'surface-400'
|
|
11
11
|
),
|
|
12
12
|
ink: 'surface-ink',
|
|
13
13
|
border: (
|
|
14
|
-
default: 'surface-
|
|
15
|
-
hover: 'surface-
|
|
16
|
-
focus: 'surface-
|
|
17
|
-
active: 'surface-
|
|
14
|
+
default: 'surface-600',
|
|
15
|
+
hover: 'surface-500',
|
|
16
|
+
focus: 'surface-500',
|
|
17
|
+
active: 'surface-400'
|
|
18
18
|
),
|
|
19
19
|
);
|
|
20
20
|
|
|
@@ -72,7 +72,9 @@
|
|
|
72
72
|
resize: none;
|
|
73
73
|
cursor: text;
|
|
74
74
|
-webkit-appearance: caret;
|
|
75
|
-
|
|
75
|
+
transition-property: background, color, border;
|
|
76
|
+
transition-duration: pintig.token-get('time-short');
|
|
77
|
+
transition-timing-function: pintig.token-get('easing');
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
.ms-select-field__helper {
|
|
@@ -85,7 +87,9 @@
|
|
|
85
87
|
weight: inherit,
|
|
86
88
|
line-height: inherit,
|
|
87
89
|
));
|
|
88
|
-
|
|
90
|
+
transition-property: background, color, border;
|
|
91
|
+
transition-duration: pintig.token-get('time-short');
|
|
92
|
+
transition-timing-function: pintig.token-get('easing');
|
|
89
93
|
}
|
|
90
94
|
}
|
|
91
95
|
}
|
|
@@ -8,8 +8,8 @@ $init-color: (
|
|
|
8
8
|
focus: 'accent-400',
|
|
9
9
|
disabled: 'disabled',
|
|
10
10
|
error: (
|
|
11
|
-
default: 'error-
|
|
12
|
-
focus: 'error-
|
|
11
|
+
default: 'error-600',
|
|
12
|
+
focus: 'error-600'
|
|
13
13
|
)
|
|
14
14
|
),
|
|
15
15
|
ink: (
|
|
@@ -19,12 +19,12 @@ $init-color: (
|
|
|
19
19
|
error: 'error-400'
|
|
20
20
|
),
|
|
21
21
|
border: (
|
|
22
|
-
default: 'surface-
|
|
22
|
+
default: 'surface-600',
|
|
23
23
|
focus: 'accent-400',
|
|
24
24
|
disabled: 'disabled',
|
|
25
25
|
error: (
|
|
26
|
-
default: 'error-
|
|
27
|
-
focus: 'error-
|
|
26
|
+
default: 'error-600',
|
|
27
|
+
focus: 'error-500'
|
|
28
28
|
)
|
|
29
29
|
),
|
|
30
30
|
);
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
flex-flow: row nowrap;
|
|
12
12
|
align-items: center;
|
|
13
13
|
gap: pintig.key-create('tick-field-gap', 0.5rem);
|
|
14
|
-
transition:
|
|
14
|
+
transition-property: background, color, border;
|
|
15
|
+
transition-duration: pintig.token-get('time-short');
|
|
16
|
+
transition-timing-function: pintig.token-get('easing');
|
|
15
17
|
|
|
16
18
|
@content;
|
|
17
19
|
|
|
@@ -20,9 +22,16 @@
|
|
|
20
22
|
place-content: center;
|
|
21
23
|
@include pintig.struct-radius('tick-field-input', inherit);
|
|
22
24
|
@include pintig.color-apply('tick-field-input', pintig.$color-inherit-template);
|
|
23
|
-
transition:
|
|
24
|
-
|
|
25
|
+
transition-property: background, color, border;
|
|
26
|
+
transition-duration: pintig.token-get('time-short');
|
|
27
|
+
transition-timing-function: pintig.token-get('easing');
|
|
28
|
+
appearance: none;
|
|
25
29
|
outline: none;
|
|
30
|
+
cursor: pintig.key-create('tick-field-input-cursor', not-allowed);
|
|
31
|
+
|
|
32
|
+
&:not(:disabled) {
|
|
33
|
+
@include pintig.key-bind('tick-field-input-cursor', pointer);
|
|
34
|
+
}
|
|
26
35
|
|
|
27
36
|
&::before {
|
|
28
37
|
content: '';
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
@layer components {
|
|
22
22
|
@include base.init() {
|
|
23
23
|
@include pintig.color-apply('tick-field', (
|
|
24
|
-
fill: pintig.theme-get($color, 'fill'),
|
|
25
|
-
ink: pintig.theme-get($color, 'ink'),
|
|
26
|
-
border: pintig.theme-get($color, 'border'),
|
|
24
|
+
fill: pintig.theme-get($color, 'fill', 'disabled'),
|
|
25
|
+
ink: pintig.theme-get($color, 'ink', 'disabled'),
|
|
26
|
+
border: pintig.theme-get($color, 'border', 'disabled'),
|
|
27
27
|
));
|
|
28
28
|
@include pintig.struct-apply('tick-field', $struct);
|
|
29
29
|
@include pintig.typography-bind('tick-field', $typography);
|
|
@@ -33,24 +33,34 @@
|
|
|
33
33
|
weight: pintig.theme-get($typography, 'weight'),
|
|
34
34
|
line-height: pintig.theme-get($typography, 'line-height'),
|
|
35
35
|
));
|
|
36
|
+
cursor: pintig.key-create('tick-field-cursor', not-allowed);
|
|
36
37
|
|
|
37
38
|
@include pintig.struct-bind('tick-field-text', (
|
|
38
39
|
gap: pintig.theme-get($struct, 'gap', 'text'),
|
|
39
40
|
));
|
|
40
41
|
|
|
41
|
-
&:
|
|
42
|
-
&:has(.ms-tick-field__input:focus) {
|
|
42
|
+
&:has(.ms-tick-field__input:not(:disabled)) {
|
|
43
43
|
@include pintig.color-bind('tick-field', (
|
|
44
|
-
fill:
|
|
45
|
-
|
|
44
|
+
fill: pintig.theme-get($color, 'fill'),
|
|
45
|
+
ink: pintig.theme-get($color, 'ink'),
|
|
46
|
+
border: pintig.theme-get($color, 'border'),
|
|
46
47
|
));
|
|
47
|
-
|
|
48
|
+
@include pintig.key-bind('tick-field-cursor', pointer);
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
&:hover,
|
|
51
|
+
&:has(.ms-tick-field__input:focus) {
|
|
52
|
+
@include pintig.color-bind('tick-field', (
|
|
53
|
+
fill: rgb(from pintig.token-switch(pintig.theme-get($color, 'fill', 'hover')) r g b / pintig.$color-fill-focus-opacity),
|
|
54
|
+
border: rgb(from pintig.token-switch(pintig.theme-get($color, 'border', 'hover')) r g b / pintig.$color-fill-focus-opacity),
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:has(.ms-tick-field__input:checked) {
|
|
59
|
+
@include pintig.color-bind('tick-field', (
|
|
60
|
+
fill: rgb(from pintig.token-switch(pintig.theme-get($color, 'fill', 'checked')) r g b / pintig.$color-fill-focus-opacity),
|
|
61
|
+
border: pintig.theme-get($color, 'border', 'checked'),
|
|
62
|
+
));
|
|
63
|
+
}
|
|
54
64
|
}
|
|
55
65
|
|
|
56
66
|
.ms-tick-field__input {
|
|
@@ -62,11 +72,33 @@
|
|
|
62
72
|
border-style: 'solid'
|
|
63
73
|
));
|
|
64
74
|
@include pintig.color-bind('tick-field-input', (
|
|
65
|
-
fill: pintig.theme-get($color, 'fill', 'input'),
|
|
75
|
+
fill: pintig.theme-get($color, 'fill', 'input', 'disabled'),
|
|
66
76
|
ink: pintig.theme-get($color, 'ink', 'input'),
|
|
67
|
-
border: pintig.theme-get($color, 'border', 'input'),
|
|
77
|
+
border: pintig.theme-get($color, 'border', 'input', 'disabled'),
|
|
68
78
|
));
|
|
69
79
|
|
|
80
|
+
&:not(:disabled) {
|
|
81
|
+
@include pintig.color-bind('tick-field-input', (
|
|
82
|
+
fill: pintig.theme-get($color, 'fill', 'input'),
|
|
83
|
+
ink: pintig.theme-get($color, 'ink', 'input'),
|
|
84
|
+
border: pintig.theme-get($color, 'border', 'input'),
|
|
85
|
+
));
|
|
86
|
+
|
|
87
|
+
&:hover,
|
|
88
|
+
&:focus {
|
|
89
|
+
@include pintig.color-fill('tick-field-input', rgb(from pintig.token-switch(pintig.theme-get($color, 'fill', 'input', 'hover')) r g b / pintig.$color-fill-focus-opacity), 'bind');
|
|
90
|
+
@include pintig.color-border('tick-field-input', rgb(from pintig.token-switch(pintig.theme-get($color, 'border', 'input', 'hover')) r g b / pintig.$color-fill-focus-opacity), 'bind');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:checked {
|
|
94
|
+
@include pintig.color-bind('tick-field-input', (
|
|
95
|
+
fill: pintig.theme-get($color, 'fill', 'input', 'checked'),
|
|
96
|
+
ink: pintig.theme-get($color, 'ink', 'input'),
|
|
97
|
+
border: pintig.theme-get($color, 'border', 'input', 'checked'),
|
|
98
|
+
));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
70
102
|
&[type='checkbox'] {
|
|
71
103
|
@include pintig.struct-radius('tick-field-input', pintig.theme-get($struct, 'radius', 'input', 'checkbox'), 'bind');
|
|
72
104
|
}
|
|
@@ -74,20 +106,6 @@
|
|
|
74
106
|
&[type='radio'] {
|
|
75
107
|
@include pintig.struct-radius('tick-field-input', pintig.theme-get($struct, 'radius', 'input', 'radio'), 'bind');
|
|
76
108
|
}
|
|
77
|
-
|
|
78
|
-
&:hover,
|
|
79
|
-
&:focus {
|
|
80
|
-
@include pintig.color-fill('tick-field-input', rgb(from pintig.token-switch(pintig.theme-get($color, 'fill', 'input', 'hover')) r g b / pintig.$color-fill-focus-opacity), 'bind');
|
|
81
|
-
@include pintig.color-border('tick-field-input', rgb(from pintig.token-switch(pintig.theme-get($color, 'border', 'input', 'hover')) r g b / pintig.$color-fill-focus-opacity), 'bind');
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&:checked {
|
|
85
|
-
@include pintig.color-bind('tick-field-input', (
|
|
86
|
-
fill: pintig.theme-get($color, 'fill', 'input', 'checked'),
|
|
87
|
-
ink: pintig.theme-get($color, 'ink', 'input'),
|
|
88
|
-
border: pintig.theme-get($color, 'border', 'input', 'checked'),
|
|
89
|
-
));
|
|
90
|
-
}
|
|
91
109
|
}
|
|
92
110
|
}
|
|
93
111
|
}
|
|
@@ -5,26 +5,31 @@
|
|
|
5
5
|
$init-color: (
|
|
6
6
|
fill: (
|
|
7
7
|
default: rgba(0 0 0 / 0),
|
|
8
|
-
hover: 'accent-
|
|
9
|
-
checked: 'accent-
|
|
8
|
+
hover: 'accent-400',
|
|
9
|
+
checked: 'accent-400',
|
|
10
|
+
disabled: 'disabled',
|
|
10
11
|
input: (
|
|
11
12
|
default: rgba(0 0 0 / 0),
|
|
12
|
-
hover:
|
|
13
|
-
checked: 'accent-400'
|
|
13
|
+
hover: rgba(0 0 0 / 0),
|
|
14
|
+
checked: 'accent-400',
|
|
15
|
+
disabled: 'disabled',
|
|
14
16
|
),
|
|
15
17
|
),
|
|
16
18
|
ink: (
|
|
17
19
|
default: 'surface-ink',
|
|
18
|
-
input: 'accent-ink'
|
|
20
|
+
input: 'accent-ink',
|
|
21
|
+
disabled: 'disabled-ink',
|
|
19
22
|
),
|
|
20
23
|
border: (
|
|
21
|
-
default: 'surface-
|
|
22
|
-
hover: 'accent-
|
|
24
|
+
default: 'surface-600',
|
|
25
|
+
hover: 'accent-400',
|
|
23
26
|
checked: 'accent-400',
|
|
27
|
+
disabled: 'disabled',
|
|
24
28
|
input: (
|
|
25
|
-
default: 'surface-
|
|
26
|
-
hover: 'accent-
|
|
29
|
+
default: 'surface-600',
|
|
30
|
+
hover: 'accent-400',
|
|
27
31
|
checked: 'accent-400',
|
|
32
|
+
disabled: 'disabled',
|
|
28
33
|
)
|
|
29
34
|
),
|
|
30
35
|
);
|
|
@@ -17,49 +17,56 @@ $_presets: (
|
|
|
17
17
|
size: 'supertitle',
|
|
18
18
|
weight: 'supertitle',
|
|
19
19
|
line-height: 'supertitle',
|
|
20
|
-
squeeze: 'supertitle'
|
|
20
|
+
squeeze: 'supertitle',
|
|
21
|
+
stretch: 'supertitle',
|
|
21
22
|
),
|
|
22
23
|
'title': (
|
|
23
24
|
family: 'title',
|
|
24
25
|
size: 'title',
|
|
25
26
|
weight: 'title',
|
|
26
27
|
line-height: 'title',
|
|
27
|
-
squeeze: 'title'
|
|
28
|
+
squeeze: 'title',
|
|
29
|
+
stretch: 'title',
|
|
28
30
|
),
|
|
29
31
|
'subtitle': (
|
|
30
32
|
family: 'subtitle',
|
|
31
33
|
size: 'subtitle',
|
|
32
34
|
weight: 'subtitle',
|
|
33
35
|
line-height: 'subtitle',
|
|
34
|
-
squeeze: 'subtitle'
|
|
36
|
+
squeeze: 'subtitle',
|
|
37
|
+
stretch: 'subtitle',
|
|
35
38
|
),
|
|
36
39
|
'body': (
|
|
37
40
|
family: 'body',
|
|
38
41
|
size: 'body',
|
|
39
42
|
weight: 'body',
|
|
40
43
|
line-height: 'body',
|
|
41
|
-
squeeze: 'body'
|
|
44
|
+
squeeze: 'body',
|
|
45
|
+
stretch: 'body',
|
|
42
46
|
),
|
|
43
47
|
'mono': (
|
|
44
48
|
family: 'mono',
|
|
45
49
|
size: 'mono',
|
|
46
50
|
weight: 'mono',
|
|
47
51
|
line-height: 'mono',
|
|
48
|
-
squeeze: 'mono'
|
|
52
|
+
squeeze: 'mono',
|
|
53
|
+
stretch: 'mono',
|
|
49
54
|
),
|
|
50
55
|
'small': (
|
|
51
56
|
family: 'small',
|
|
52
57
|
size: 'small',
|
|
53
58
|
weight: 'small',
|
|
54
59
|
line-height: 'small',
|
|
55
|
-
squeeze: 'small'
|
|
60
|
+
squeeze: 'small',
|
|
61
|
+
stretch: 'small'
|
|
56
62
|
)
|
|
57
63
|
);
|
|
58
64
|
$_sizes: ('xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl');
|
|
59
65
|
$_weights: ('black', 'bold', 'normal', 'light');
|
|
60
|
-
$_line-heights: ('broad', 'normal', 'condensed', 'tall', 'short');
|
|
66
|
+
$_line-heights: ('broad', 'normal', 'condensed', 'tall', 'short', 'x-tall', 'x-short');
|
|
61
67
|
$_alignments: ('center', 'left', 'right', 'justify', 'justify-all');
|
|
62
|
-
$_squeezes: ('tight', 'normal', 'loose');
|
|
68
|
+
$_squeezes: ('x-tight', 'tight', 'normal', 'loose', 'x-loose');
|
|
69
|
+
$_stretches: ('x-condensed', 'condensed', 'normal', 'wide', 'x-wide');
|
|
63
70
|
|
|
64
71
|
@mixin typography($include: (), $exclude: ()) {
|
|
65
72
|
$utils-to-render: helpers.handle-include-exclude((
|
|
@@ -69,7 +76,9 @@ $_squeezes: ('tight', 'normal', 'loose');
|
|
|
69
76
|
'weight',
|
|
70
77
|
'line-height',
|
|
71
78
|
'alignment',
|
|
72
|
-
'squeeze'
|
|
79
|
+
'squeeze',
|
|
80
|
+
'stretch',
|
|
81
|
+
'style'
|
|
73
82
|
), $include, $exclude);
|
|
74
83
|
|
|
75
84
|
@layer utils {
|
|
@@ -81,6 +90,7 @@ $_squeezes: ('tight', 'normal', 'loose');
|
|
|
81
90
|
font-weight: pintig.token-switch('weight-#{map.get($values, 'weight')}', pintig.primitive-token-switch('weight.#{map.get($values, 'weight')}', $values));
|
|
82
91
|
line-height: pintig.token-switch('line-height-#{map.get($values, 'weight')}', pintig.primitive-token-switch('line-height.#{map.get($values, 'line-height')}', $values));
|
|
83
92
|
letter-spacing: pintig.token-switch('squeeze-#{map.get($values, 'squeeze')}', pintig.primitive-token-switch('squeeze.#{map.get($values, 'squeeze')}', $values));
|
|
93
|
+
font-stretch: pintig.token-switch('stretch-#{map.get($values, 'stretch')}', pintig.primitive-token-switch('stretch.#{map.get($values, 'stretch')}', $values));
|
|
84
94
|
}
|
|
85
95
|
|
|
86
96
|
@each $breakpoint in $_breakpoints {
|
|
@@ -91,6 +101,7 @@ $_squeezes: ('tight', 'normal', 'loose');
|
|
|
91
101
|
font-weight: pintig.token-switch('weight-#{map.get($values, 'weight')}', pintig.primitive-token-switch('weight.#{map.get($values, 'weight')}', $values));
|
|
92
102
|
line-height: pintig.token-switch('line-height-#{map.get($values, 'weight')}', pintig.primitive-token-switch('line-height.#{map.get($values, 'line-height')}', $values));
|
|
93
103
|
letter-spacing: pintig.token-switch('squeeze-#{map.get($values, 'squeeze')}', pintig.primitive-token-switch('squeeze.#{map.get($values, 'squeeze')}', $values));
|
|
104
|
+
font-stretch: pintig.token-switch('stretch-#{map.get($values, 'stretch')}', pintig.primitive-token-switch('stretch.#{map.get($values, 'stretch')}', $values));
|
|
94
105
|
}
|
|
95
106
|
}
|
|
96
107
|
}
|
|
@@ -192,5 +203,49 @@ $_squeezes: ('tight', 'normal', 'loose');
|
|
|
192
203
|
}
|
|
193
204
|
}
|
|
194
205
|
}
|
|
206
|
+
|
|
207
|
+
@if list.index($utils-to-render, 'stretch') {
|
|
208
|
+
@each $stretch in $_stretches {
|
|
209
|
+
.stretch-#{$stretch} {
|
|
210
|
+
font-stretch: pintig.primitive-token-get('stretch.#{$stretch}');
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@each $breakpoint in $_breakpoints {
|
|
214
|
+
.\@#{$breakpoint}\:stretch-#{$stretch} {
|
|
215
|
+
@include pintig.breakpoint-create($breakpoint) {
|
|
216
|
+
font-stretch: pintig.primitive-token-get('stretch.#{$stretch}') !important;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@if list.index($utils-to-render, 'style') {
|
|
224
|
+
@each $stretch in $_stretches {
|
|
225
|
+
.italic {
|
|
226
|
+
font-style: italic;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@each $breakpoint in $_breakpoints {
|
|
230
|
+
.\@#{$breakpoint}\:italic {
|
|
231
|
+
@include pintig.breakpoint-create($breakpoint) {
|
|
232
|
+
font-style: italic;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.oblique {
|
|
238
|
+
font-style: oblique;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@each $breakpoint in $_breakpoints {
|
|
242
|
+
.\@#{$breakpoint}\:oblique {
|
|
243
|
+
@include pintig.breakpoint-create($breakpoint) {
|
|
244
|
+
font-style: oblique;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
195
250
|
}
|
|
196
251
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matteusan/himig",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Matteu's personal design system for building user interfaces.",
|
|
5
5
|
"repository": "https://github.com/MatteuSan/himig",
|
|
6
6
|
"author": "Matteu <matteugt@gmail.com>",
|
|
@@ -12,36 +12,35 @@
|
|
|
12
12
|
".": {
|
|
13
13
|
"sass": "./_index.scss"
|
|
14
14
|
},
|
|
15
|
-
"./ms-badge
|
|
15
|
+
"./ms-badge": {
|
|
16
16
|
"sass": "./ms-badge/_index.scss"
|
|
17
17
|
},
|
|
18
|
-
"./ms-button
|
|
18
|
+
"./ms-button": {
|
|
19
19
|
"sass": "./ms-button/_index.scss"
|
|
20
20
|
},
|
|
21
|
-
"./ms-card
|
|
21
|
+
"./ms-card": {
|
|
22
22
|
"sass": "./ms-card/_index.scss"
|
|
23
23
|
},
|
|
24
|
-
"./ms-form-field
|
|
24
|
+
"./ms-form-field": {
|
|
25
25
|
"sass": "./ms-form-field/_index.scss"
|
|
26
26
|
},
|
|
27
|
-
"./ms-link
|
|
27
|
+
"./ms-link": {
|
|
28
28
|
"sass": "./ms-link/_index.scss"
|
|
29
29
|
},
|
|
30
|
-
"./ms-list
|
|
30
|
+
"./ms-list": {
|
|
31
31
|
"sass": "./ms-list/_index.scss"
|
|
32
32
|
},
|
|
33
|
-
"./ms-select-field
|
|
33
|
+
"./ms-select-field": {
|
|
34
34
|
"sass": "./ms-select-field/_index.scss"
|
|
35
35
|
},
|
|
36
|
-
"./ms-tick-field
|
|
36
|
+
"./ms-tick-field": {
|
|
37
37
|
"sass": "./ms-tick-field/_index.scss"
|
|
38
38
|
},
|
|
39
|
-
"./ms-utils
|
|
39
|
+
"./ms-utils": {
|
|
40
40
|
"sass": "./ms-utils/_index.scss"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
"
|
|
44
|
-
"@matteusan/pintig": "^1.
|
|
45
|
-
"@matteusan/sentro": "^1.2.3"
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@matteusan/pintig": "^1.10"
|
|
46
45
|
}
|
|
47
46
|
}
|