matcha-theme 20.273.0 → 20.275.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/components/matcha-chip.scss +124 -79
- package/main.scss +1 -0
- package/package.json +1 -1
|
@@ -1,85 +1,130 @@
|
|
|
1
|
-
matcha-chip{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
padding: 7px 12px;
|
|
5
|
-
font-size: 14px;
|
|
6
|
-
font-weight: 500;
|
|
7
|
-
line-height: 18px;
|
|
8
|
-
cursor: default;
|
|
9
|
-
outline: none;
|
|
10
|
-
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
11
|
-
border: 2px solid $color-base-blue-grey-600;
|
|
12
|
-
white-space: nowrap;
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
user-select: none;
|
|
15
|
-
|
|
16
|
-
&.matcha-chip-disabled {
|
|
17
|
-
opacity: 0.4;
|
|
18
|
-
pointer-events: none;
|
|
19
|
-
cursor: default;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&:not(.matcha-chip-disabled) {
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
@mixin matcha-chip-theme($theme) {
|
|
2
|
+
$foreground: map-get($theme, foreground);
|
|
3
|
+
$background: map-get($theme, background);
|
|
26
4
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
5
|
+
// --------------------------------------------------------
|
|
6
|
+
// Host element — pill, 40px height, 2px border
|
|
7
|
+
// --------------------------------------------------------
|
|
8
|
+
matcha-chip {
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
height: px-to-rem(40px);
|
|
12
|
+
min-height: px-to-rem(40px);
|
|
13
|
+
padding: 0 px-to-rem(16px);
|
|
33
14
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
height: 18px;
|
|
40
|
-
margin-left: 8px;
|
|
41
|
-
margin-right: -4px;
|
|
42
|
-
padding: 0;
|
|
43
|
-
border: none;
|
|
44
|
-
background: transparent;
|
|
45
|
-
border-radius: 50%;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
outline: none;
|
|
48
|
-
transition: opacity 0.2s;
|
|
49
|
-
|
|
50
|
-
&:hover {
|
|
51
|
-
opacity: 1;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&:focus {
|
|
55
|
-
opacity: 1;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&[disabled] {
|
|
59
|
-
cursor: default;
|
|
60
|
-
opacity: 0.4;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
15
|
+
&.matcha-chip-removable {
|
|
16
|
+
padding: 0 px-to-rem(8px) 0 px-to-rem(16px);
|
|
17
|
+
}
|
|
18
|
+
gap: px-to-rem(8px);
|
|
19
|
+
box-sizing: border-box;
|
|
63
20
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
line-height: 18px;
|
|
67
|
-
color: inherit;
|
|
68
|
-
}
|
|
21
|
+
border-radius: $border-radius-wider;
|
|
22
|
+
border: $border-width-thin $border-style-solid map-get($foreground, placeholder);
|
|
69
23
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
gap: 8px;
|
|
74
|
-
align-items: center;
|
|
24
|
+
font-size: $size-font-small;
|
|
25
|
+
font-weight: $size-font-weight-medium;
|
|
26
|
+
color: map-get($foreground, label);
|
|
75
27
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
user-select: none;
|
|
31
|
+
cursor: default;
|
|
32
|
+
outline: none;
|
|
33
|
+
|
|
34
|
+
transition:
|
|
35
|
+
border-color 150ms ease,
|
|
36
|
+
background-color 150ms ease;
|
|
37
|
+
|
|
38
|
+
&.matcha-chip-selectable:not(.matcha-chip-disabled) {
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:not(.matcha-chip-disabled):hover {
|
|
43
|
+
border-color: map-get($foreground, base);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.matcha-chip-selected {
|
|
47
|
+
border-color: getPrimary($theme);
|
|
48
|
+
background-color: getPrimaryAlpha($theme);
|
|
49
|
+
color: getPrimary($theme);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.matcha-chip-selected:not(.matcha-chip-disabled):hover {
|
|
53
|
+
border-color: getPrimary($theme);
|
|
54
|
+
}
|
|
81
55
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
56
|
+
&.matcha-chip-disabled {
|
|
57
|
+
opacity: 0.4;
|
|
58
|
+
pointer-events: none;
|
|
59
|
+
cursor: default;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// --------------------------------------------------------
|
|
64
|
+
// Content area (projected ng-content)
|
|
65
|
+
// --------------------------------------------------------
|
|
66
|
+
.matcha-chip-content {
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
flex: 1;
|
|
72
|
+
min-width: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// --------------------------------------------------------
|
|
76
|
+
// Remove button — after the vertical divider
|
|
77
|
+
// --------------------------------------------------------
|
|
78
|
+
.matcha-chip-remove {
|
|
79
|
+
display: inline-flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
width: px-to-rem(20px);
|
|
84
|
+
height: px-to-rem(20px);
|
|
85
|
+
min-width: px-to-rem(20px);
|
|
86
|
+
padding: 0;
|
|
87
|
+
margin: 0;
|
|
88
|
+
border: none;
|
|
89
|
+
border-radius: $border-radius-wider;
|
|
90
|
+
background: transparent;
|
|
91
|
+
color: inherit;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
outline: none;
|
|
94
|
+
transition: background-color 150ms ease;
|
|
95
|
+
|
|
96
|
+
&:hover {
|
|
97
|
+
background-color: map-get($foreground, divider);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:focus-visible {
|
|
101
|
+
background-color: map-get($foreground, divider);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&[disabled] {
|
|
105
|
+
cursor: default;
|
|
106
|
+
opacity: 0.4;
|
|
107
|
+
pointer-events: none;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// --------------------------------------------------------
|
|
112
|
+
// Chip list wrapper
|
|
113
|
+
// --------------------------------------------------------
|
|
114
|
+
.matcha-chip-list-wrapper {
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-wrap: wrap;
|
|
117
|
+
align-items: center;
|
|
118
|
+
gap: px-to-rem(8px);
|
|
119
|
+
|
|
120
|
+
&.matcha-chip-list-vertical {
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
align-items: flex-start;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.matcha-chip-list-disabled {
|
|
127
|
+
opacity: 0.6;
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
package/main.scss
CHANGED
|
@@ -192,6 +192,7 @@
|
|
|
192
192
|
@include matcha-slider-theme($theme);
|
|
193
193
|
@include matcha-highlight-theme($theme);
|
|
194
194
|
@include matcha-divider-theme($theme);
|
|
195
|
+
@include matcha-chip-theme($theme);
|
|
195
196
|
@include matcha-progress-bar-theme($theme);
|
|
196
197
|
@include matcha-page-builder-theme($theme);
|
|
197
198
|
@include matcha-snack-bar-theme($theme);
|