@api-client/ui 0.3.3 → 0.3.4

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 (35) hide show
  1. package/build/src/md/button/internals/base.d.ts.map +1 -1
  2. package/build/src/md/button/internals/base.js +2 -6
  3. package/build/src/md/button/internals/base.js.map +1 -1
  4. package/build/src/md/chip/internals/Chip.d.ts +11 -15
  5. package/build/src/md/chip/internals/Chip.d.ts.map +1 -1
  6. package/build/src/md/chip/internals/Chip.js +66 -104
  7. package/build/src/md/chip/internals/Chip.js.map +1 -1
  8. package/build/src/md/chip/internals/Chip.styles.d.ts.map +1 -1
  9. package/build/src/md/chip/internals/Chip.styles.js +114 -101
  10. package/build/src/md/chip/internals/Chip.styles.js.map +1 -1
  11. package/build/src/md/chip/internals/ChipSet.d.ts +16 -0
  12. package/build/src/md/chip/internals/ChipSet.d.ts.map +1 -0
  13. package/build/src/md/chip/internals/ChipSet.js +138 -0
  14. package/build/src/md/chip/internals/ChipSet.js.map +1 -0
  15. package/build/src/md/chip/internals/ChipSet.styles.d.ts +3 -0
  16. package/build/src/md/chip/internals/ChipSet.styles.d.ts.map +1 -0
  17. package/build/src/md/chip/internals/ChipSet.styles.js +9 -0
  18. package/build/src/md/chip/internals/ChipSet.styles.js.map +1 -0
  19. package/build/src/md/chip/ui-chip-set.d.ts +11 -0
  20. package/build/src/md/chip/ui-chip-set.d.ts.map +1 -0
  21. package/build/src/md/chip/ui-chip-set.js +27 -0
  22. package/build/src/md/chip/ui-chip-set.js.map +1 -0
  23. package/build/src/md/switch/internals/Switch.styles.js +1 -1
  24. package/build/src/md/switch/internals/Switch.styles.js.map +1 -1
  25. package/demo/md/chip/chip.html +33 -6
  26. package/demo/md/chip/chip.ts +111 -56
  27. package/package.json +1 -1
  28. package/src/md/button/internals/base.ts +2 -6
  29. package/src/md/chip/internals/Chip.styles.ts +114 -101
  30. package/src/md/chip/internals/Chip.ts +58 -88
  31. package/src/md/chip/internals/ChipSet.styles.ts +9 -0
  32. package/src/md/chip/internals/ChipSet.ts +142 -0
  33. package/src/md/chip/ui-chip-set.ts +15 -0
  34. package/src/md/switch/internals/Switch.styles.ts +1 -1
  35. package/test/ui/chip/UiChip.test.ts +18 -67
@@ -12,20 +12,47 @@
12
12
  margin: 20px 0;
13
13
  }
14
14
 
15
- ui-chip:not(:last-of-type) {
16
- margin-right: 12px;
15
+ .demo .demo-section {
16
+ max-width: 858px;
17
+ margin: 0 auto 80px auto;
18
+ }
19
+
20
+ .demo h2, .demo h3 {
21
+ margin-bottom: 36px;
22
+ }
23
+
24
+ .frame {
25
+ padding: 40px;
26
+ border-radius: 20px;
27
+ border: 1px var(--md-sys-color-outline) solid;
17
28
  }
18
29
 
19
30
  .grid-5 {
20
31
  display: grid;
21
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
22
- justify-items: center;
32
+ grid-template-columns: 160px 1fr 1fr 1fr 1fr;
33
+ gap: 0 0;
34
+ justify-items: center;
35
+ align-items: center;
36
+ grid-template-rows: 40px repeat(auto-fit, minmax(80px, 1fr));
37
+ grid-auto-rows: 80px;
38
+
39
+ padding: 40px;
40
+ border-radius: 20px;
41
+ border: 1px var(--md-sys-color-outline) solid;
23
42
  }
24
43
 
25
44
  .grid-4 {
26
45
  display: grid;
27
- grid-template-columns: 1fr 1fr 1fr 1fr;
28
- justify-items: center;
46
+ grid-template-columns: 160px 1fr 1fr 1fr;
47
+ gap: 0 0;
48
+ justify-items: center;
49
+ align-items: center;
50
+ grid-template-rows: 40px repeat(auto-fit, minmax(80px, 1fr));
51
+ grid-auto-rows: 60px;
52
+
53
+ padding: 40px;
54
+ border-radius: 20px;
55
+ border: 1px var(--md-sys-color-outline) solid;
29
56
  }
30
57
 
31
58
  .grid-3 {
@@ -3,6 +3,7 @@ import { iconWrapper } from '../../../src/md/icons/Icons.js'
3
3
  import type UiChip from '../../../src/md/chip/internals/Chip.js'
4
4
  import { DemoPage } from '../../../src/demo/DemoPage.js'
5
5
  import '../../../src/md/chip/ui-chip.js'
6
+ import '../../../src/md/chip/ui-chip-set.js'
6
7
  import '../../../src/md/icons/ui-icon.js'
7
8
 
8
9
  const calendarIcon = iconWrapper(
@@ -36,72 +37,100 @@ class ComponentDemoPage extends DemoPage {
36
37
  return html`
37
38
  <a href="../">Back</a>
38
39
  <section class="demo-section">
39
- <h2 class="title-large">Assist chip</h2>
40
- <div class="demo-row grid-4">
41
- <ui-chip type="assist" @click="${this.handleClickHandler}">Enabled</ui-chip>
42
- <ui-chip type="assist" disabled @click="${this.handleClickHandler}">Disabled</ui-chip>
40
+ <h2 class="display-large">Assist chip</h2>
43
41
 
42
+ <div class="grid-5">
43
+ <span>&nbsp</span>
44
+ <span class="column-title title-medium">Regular</span>
45
+ <span class="column-title title-medium">Icon</span>
46
+ <span class="column-title title-medium">Avatar</span>
47
+ <span class="column-title title-medium">Elevated</span>
48
+
49
+ <span class="row-name title-small">Enabled</span>
50
+ <ui-chip type="assist" @click="${this.handleClickHandler}">Assist</ui-chip>
44
51
  <ui-chip type="assist" @click="${this.handleClickHandler}">
45
52
  <ui-icon slot="icon">${calendarIcon}</ui-icon>
46
- With icon
53
+ Assist
54
+ </ui-chip>
55
+ <ui-chip type="assist" @click="${this.handleClickHandler}">
56
+ <img src="./pawel6c9a.jpg" slot="avatar" alt="Pawel Psztyc" />
57
+ Assist
58
+ </ui-chip>
59
+ <ui-chip type="assist" @click="${this.handleClickHandler}" elevated>
60
+ <ui-icon slot="icon">${calendarIcon}</ui-icon>Assist
47
61
  </ui-chip>
48
62
 
63
+ <span class="row-name title-small">Disabled</span>
64
+ <ui-chip type="assist" disabled @click="${this.handleClickHandler}">Assist</ui-chip>
49
65
  <ui-chip type="assist" @click="${this.handleClickHandler}" disabled>
50
66
  <ui-icon slot="icon">${calendarIcon}</ui-icon>
51
- Disabled with icon
67
+ Assist
52
68
  </ui-chip>
53
- </div>
54
-
55
- <div class="demo-row grid-4">
56
- <ui-chip type="assist" @click="${this.handleClickHandler}" elevated>Enabled</ui-chip>
57
- <ui-chip type="assist" disabled @click="${this.handleClickHandler}" elevated>Disabled</ui-chip>
58
-
59
- <ui-chip type="assist" @click="${this.handleClickHandler}" elevated>
60
- <ui-icon slot="icon">${calendarIcon}</ui-icon>
61
- With icon
69
+ <ui-chip type="assist" disabled @click="${this.handleClickHandler}">
70
+ <img src="./pawel6c9a.jpg" slot="avatar" alt="Pawel Psztyc" />
71
+ Assist
62
72
  </ui-chip>
63
-
64
73
  <ui-chip type="assist" @click="${this.handleClickHandler}" disabled elevated>
65
74
  <ui-icon slot="icon">${calendarIcon}</ui-icon>
66
- Disabled with icon
75
+ Assist
67
76
  </ui-chip>
68
77
  </div>
69
78
  </section>
70
79
 
71
80
  <section class="demo-section">
72
- <h2 class="title-large">Filter chip</h2>
73
- <div class="demo-row grid-4">
74
- <ui-chip type="filter" @click="${this.handleClickHandler}" @select="${this.handleSelect}">Docs</ui-chip>
81
+ <h2 class="display-large">Filter chip</h2>
82
+ <div class="grid-5">
83
+ <span>&nbsp</span>
84
+ <span class="column-title title-medium">Unchecked</span>
85
+ <span class="column-title title-medium">Checked</span>
86
+ <span class="column-title title-medium">List</span>
87
+ <span class="column-title title-medium">Elevated</span>
88
+
89
+ <span class="row-name title-small">Enabled</span>
90
+ <ui-chip type="filter" @click="${this.handleClickHandler}" @select="${this.handleSelect}">Filter</ui-chip>
75
91
  <ui-chip type="filter" checked @click="${this.handleClickHandler}" @select="${this.handleSelect}"
76
- >Slides</ui-chip
77
- >
78
- <ui-chip type="filter" disabled @click="${this.handleClickHandler}" @select="${this.handleSelect}"
79
- >Images</ui-chip
92
+ >Filter</ui-chip
80
93
  >
81
94
  <ui-chip
82
95
  type="filter"
83
- list="abc"
96
+ list
84
97
  @click="${this.handleClickHandler}"
85
98
  @list="${this.handleList}"
86
99
  @select="${this.handleSelect}"
87
100
  >Other</ui-chip
88
101
  >
89
- </div>
90
- <div class="demo-row grid-4">
91
- <ui-chip type="filter" @click="${this.handleClickHandler}" elevated @select="${this.handleSelect}"
92
- >Docs</ui-chip
102
+ <ui-chip
103
+ type="filter"
104
+ list
105
+ elevated
106
+ @click="${this.handleClickHandler}"
107
+ @list="${this.handleList}"
108
+ @select="${this.handleSelect}"
109
+ >Other</ui-chip
93
110
  >
94
- <ui-chip type="filter" checked @click="${this.handleClickHandler}" elevated @select="${this.handleSelect}"
95
- >Slides</ui-chip
111
+
112
+ <span class="row-name title-small">Disabled</span>
113
+ <ui-chip type="filter" disabled @click="${this.handleClickHandler}" @select="${this.handleSelect}"
114
+ >Filter</ui-chip
96
115
  >
97
- <ui-chip type="filter" disabled @click="${this.handleClickHandler}" elevated @select="${this.handleSelect}"
98
- >Images</ui-chip
116
+ <ui-chip type="filter" disabled checked @click="${this.handleClickHandler}" @select="${this.handleSelect}"
117
+ >Filter</ui-chip
99
118
  >
100
119
  <ui-chip
101
120
  type="filter"
102
- list="abc"
121
+ list
122
+ disabled
103
123
  @click="${this.handleClickHandler}"
124
+ @list="${this.handleList}"
125
+ @select="${this.handleSelect}"
126
+ >Other</ui-chip
127
+ >
128
+ <ui-chip
129
+ type="filter"
130
+ list
104
131
  elevated
132
+ disabled
133
+ @click="${this.handleClickHandler}"
105
134
  @list="${this.handleList}"
106
135
  @select="${this.handleSelect}"
107
136
  >Other</ui-chip
@@ -110,52 +139,78 @@ class ComponentDemoPage extends DemoPage {
110
139
  </section>
111
140
 
112
141
  <section class="demo-section">
113
- <h2 class="title-large">Input chip</h2>
114
- <div class="demo-row grid-3">
115
- <ui-chip type="input" @click="${this.handleClickHandler}">Enabled</ui-chip>
116
- <ui-chip type="input" closable @click="${this.handleClickHandler}" @close="${this.handleClose}"
117
- >Closable</ui-chip
142
+ <h2 class="display-large">Input chip</h2>
143
+
144
+ <div class="grid-5">
145
+ <span>&nbsp</span>
146
+ <span class="column-title title-medium">Regular</span>
147
+ <span class="column-title title-medium">removable</span>
148
+ <span class="column-title title-medium">Disabled</span>
149
+ <span class="column-title title-medium">Elevated</span>
150
+
151
+ <span class="row-name title-small">Regular</span>
152
+ <ui-chip type="input" @click="${this.handleClickHandler}">Input</ui-chip>
153
+ <ui-chip type="input" removable @click="${this.handleClickHandler}" @close="${this.handleClose}"
154
+ >Input</ui-chip
118
155
  >
119
- <ui-chip type="input" disabled @click="${this.handleClickHandler}">Disabled</ui-chip>
120
- </div>
121
- <div class="demo-row grid-3">
156
+ <ui-chip type="input" disabled @click="${this.handleClickHandler}">Input</ui-chip>
157
+ <ui-chip type="input" elevated @click="${this.handleClickHandler}">Input</ui-chip>
158
+
159
+ <span class="row-name title-small">With icon</span>
122
160
  <ui-chip type="input" @click="${this.handleClickHandler}">
123
161
  <ui-icon slot="icon">${calendarIcon}</ui-icon>
124
- With icon
162
+ Input
125
163
  </ui-chip>
126
- <ui-chip type="input" @click="${this.handleClickHandler}" closable @close="${this.handleClose}">
164
+ <ui-chip type="input" @click="${this.handleClickHandler}" removable @close="${this.handleClose}">
127
165
  <ui-icon slot="icon">${calendarIcon}</ui-icon>
128
- With icon
166
+ Input
129
167
  </ui-chip>
130
- <ui-chip type="input" @click="${this.handleClickHandler}" closable disabled @close="${this.handleClose}">
168
+ <ui-chip type="input" @click="${this.handleClickHandler}" removable disabled @close="${this.handleClose}">
131
169
  <ui-icon slot="icon">${calendarIcon}</ui-icon>
132
- With icon
170
+ Input
133
171
  </ui-chip>
134
- </div>
135
- <div class="demo-row grid-3">
172
+ <ui-chip type="input" @click="${this.handleClickHandler}" removable elevated @close="${this.handleClose}">
173
+ <ui-icon slot="icon">${calendarIcon}</ui-icon>
174
+ Input
175
+ </ui-chip>
176
+
177
+ <span class="row-name title-small">With avatar</span>
136
178
  <ui-chip type="input" @click="${this.handleClickHandler}">
137
179
  <img src="./pawel6c9a.jpg" slot="avatar" alt="Pawel Psztyc" />
138
- With avatar
180
+ Input
139
181
  </ui-chip>
140
- <ui-chip type="input" @click="${this.handleClickHandler}" closable @close="${this.handleClose}">
182
+ <ui-chip type="input" @click="${this.handleClickHandler}" removable @close="${this.handleClose}">
141
183
  <img src="./pawel6c9a.jpg" slot="avatar" alt="Pawel Psztyc" />
142
- With avatar
184
+ Input
143
185
  </ui-chip>
144
- <ui-chip type="input" @click="${this.handleClickHandler}" closable disabled @close="${this.handleClose}">
186
+ <ui-chip type="input" @click="${this.handleClickHandler}" removable disabled @close="${this.handleClose}">
145
187
  <img src="./pawel6c9a.jpg" slot="avatar" alt="Pawel Psztyc" />
146
- With avatar
188
+ Input
189
+ </ui-chip>
190
+ <ui-chip type="input" @click="${this.handleClickHandler}" removable elevated @close="${this.handleClose}">
191
+ <img src="./pawel6c9a.jpg" slot="avatar" alt="Pawel Psztyc" />
192
+ Input
147
193
  </ui-chip>
148
194
  </div>
149
195
  </section>
150
196
 
151
197
  <section class="demo-section">
152
- <h2 class="title-large">Suggestion chip</h2>
153
- <div class="demo-row grid-3">
198
+ <h2 class="display-large">Suggestion chip</h2>
199
+ <div class="demo-row grid-3 frame">
154
200
  <ui-chip type="suggestion" @click="${this.handleClickHandler}">Enabled</ui-chip>
155
201
  <ui-chip type="suggestion" @click="${this.handleClickHandler}" elevated>Elevated</ui-chip>
156
202
  <ui-chip type="suggestion" disabled @click="${this.handleClickHandler}">Disabled</ui-chip>
157
203
  </div>
158
204
  </section>
205
+
206
+ <section class="demo-section">
207
+ <h2 class="display-large">Chip set</h2>
208
+ <ui-chip-set>
209
+ <ui-chip type="input" @click="${this.handleClickHandler}" removable>Input</ui-chip>
210
+ <ui-chip type="input" @click="${this.handleClickHandler}" removable>Input</ui-chip>
211
+ <ui-chip type="input" @click="${this.handleClickHandler}" removable>Input</ui-chip>
212
+ </ui-chip-set>
213
+ </section>
159
214
  `
160
215
  }
161
216
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@api-client/ui",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Internal UI component library for the API Client ecosystem.",
5
5
  "license": "UNLICENSED",
6
6
  "main": "build/src/index.js",
@@ -262,16 +262,12 @@ export default class BaseButton extends UiElement {
262
262
 
263
263
  override handlePointerEnter(e: PointerEvent): void {
264
264
  super.handlePointerEnter(e)
265
- if (this.ripple) {
266
- this.ripple.beginHover(e)
267
- }
265
+ this.ripple?.beginHover(e)
268
266
  }
269
267
 
270
268
  override handlePointerLeave(e: PointerEvent): void {
271
269
  super.handlePointerLeave(e)
272
- if (this.ripple) {
273
- this.ripple.endHover()
274
- }
270
+ this.ripple?.endHover()
275
271
  }
276
272
 
277
273
  protected override render(): TemplateResult {
@@ -6,166 +6,179 @@ export default css`
6
6
  vertical-align: middle;
7
7
  outline: none;
8
8
  -webkit-tap-highlight-color: transparent;
9
- height: 32px;
9
+ position: relative;
10
+ user-select: none;
10
11
 
11
12
  font-family: var(--md-sys-typescale-label-large-font);
12
13
  font-size: var(--md-sys-typescale-label-large-size);
13
14
  letter-spacing: var(--md-sys-typescale-label-large-tracking);
14
15
  line-height: var(--md-sys-typescale-label-large-height);
15
16
 
16
- border-radius: var(--md-sys-shape-corner-small);
17
- color: var(--md-sys-color-on-surface);
18
- fill: var(--md-sys-color-primary);
19
-
20
- user-select: none;
21
-
22
17
  --md-ripple-hover-state-layer-color: var(--md-sys-color-on-surface);
23
18
  --md-ripple-focus-state-layer-color: var(--md-sys-color-on-surface);
24
19
  --md-ripple-pressed-state-layer-color: var(--md-sys-color-primary);
25
- }
26
20
 
27
- :host([disabled]) {
28
- pointer-events: none;
29
- }
30
-
31
- :host([disabled]) .container {
32
- border-color: var(--md-sys-color-on-surface);
33
- opacity: 0.12;
34
- }
21
+ --_leading-icon-color: currentColor;
22
+ --_trailing-icon-color: currentColor;
23
+ --_background-color: transparent;
24
+ --_color: inherit;
25
+ --_shadow: var(--md-sys-elevation-0);
26
+ --_outline-color: transparent;
27
+ --_outline-size: 0;
28
+ --_inline-padding-start: 16px;
29
+ --_inline-padding-end: 16px;
30
+ --_avatar-size: 24px;
31
+ --_avatar-shape: 24px;
32
+ --_icon-size: 18px;
35
33
 
36
- :host([disabled][elevated]) .container {
37
- background-color: var(--md-sys-color-on-surface);
38
- opacity: 0.12;
39
- box-shadow: none;
40
- }
41
-
42
- :host([disabled]) .content {
43
- color: var(--md-sys-color-on-surface);
44
- opacity: 0.68;
45
- }
46
-
47
- .surface {
48
- position: relative;
49
- height: inherit;
50
- border-radius: inherit;
34
+ height: 32px;
35
+ border-radius: var(--md-sys-shape-corner-small);
36
+ box-shadow: var(--_shadow);
37
+ border: var(--_outline-size) solid var(--_outline-color);
51
38
  }
52
39
 
53
40
  .ripple {
54
- z-index: 0;
55
41
  border-radius: inherit;
42
+ transition: border-radius var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-standard);
56
43
  }
57
44
 
58
- .container {
59
- position: absolute;
60
- inset: 0;
45
+ .ripple.activated {
46
+ z-index: 1;
47
+ }
61
48
 
62
- box-sizing: border-box;
63
- border-radius: inherit;
64
- border: 1px var(--md-sys-color-outline) solid;
65
- z-index: 0;
49
+ :host([disabled]) {
50
+ --_background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
51
+ --_color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
52
+ --_leading-icon-color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
53
+ --_trailing-icon-color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
54
+ --_outline-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
55
+ box-shadow: none;
56
+ cursor: not-allowed;
57
+ pointer-events: none;
66
58
  }
67
59
 
68
- .content {
60
+ .surface {
69
61
  height: inherit;
70
62
  display: flex;
71
63
  align-items: center;
72
64
  justify-content: start;
73
65
  box-sizing: border-box;
74
- padding: 0 16px;
66
+ padding: 0 var(--_inline-padding-end) 0 var(--_inline-padding-start);
75
67
  border-radius: inherit;
76
- border: 1px transparent solid;
77
- position: relative;
78
- z-index: 1;
68
+ background-color: var(--_background-color);
69
+ color: var(--_color);
70
+ gap: 0;
79
71
  }
80
72
 
81
- :host([elevated]) .container {
82
- background-color: var(--md-sys-color-surface);
83
- box-shadow: var(--md-sys-elevation-1);
84
- border-width: 0;
73
+ .leading-icon {
74
+ height: var(--_icon-size);
75
+ width: 0px;
76
+ overflow: hidden;
77
+ transition: width 230ms var(--md-sys-animation-easing-standard);
78
+ color: var(--_leading-icon-color);
79
+ fill: currentColor;
85
80
  }
86
81
 
87
- .withIcon .content,
88
- :host([type='filter'][checked]) .content {
89
- padding-left: 8px;
82
+ .leading-icon::slotted(*) {
83
+ width: var(--_icon-size);
84
+ height: var(--_icon-size);
85
+ margin-right: 8px;
90
86
  }
91
87
 
92
- .withAvatar .content {
93
- padding-left: 4px;
88
+ slot[name='avatar']::slotted(*) {
89
+ width: var(--_avatar-size);
90
+ height: var(--_avatar-size);
91
+ border-radius: var(--_avatar-shape);
92
+ flex-shrink: 0;
93
+ flex-grow: 0;
94
+ margin-right: 8px;
94
95
  }
95
96
 
96
- :host([closable]) .content,
97
- :host([type='filter'][list]) .content {
98
- padding-right: 8px;
97
+ .check-mark.checked {
98
+ width: 18px;
99
+ margin-right: 8px;
99
100
  }
100
101
 
101
- .withIcon slot[name='icon']::slotted(*),
102
- .withAvatar slot[name='avatar']::slotted(*) {
103
- margin-right: 8px;
102
+ .trailing-icon {
103
+ margin-left: 8px;
104
+ width: 18px;
105
+ height: 18px;
106
+ color: var(--_trailing-icon-color);
107
+ fill: currentColor;
104
108
  }
105
109
 
106
- slot[name='icon']::slotted(*) {
107
- width: 16px;
108
- height: 16px;
110
+ :host([elevated]) {
111
+ --_shadow: var(--md-sys-elevation-1);
112
+ border: none;
113
+ --_background-color: var(--md-sys-color-surface-container-low);
109
114
  }
110
115
 
111
- slot[name='avatar']::slotted(*) {
112
- width: 24px;
113
- height: 24px;
114
- border-radius: var(--md-sys-shape-corner-medium);
116
+ :host([elevated]:hover:not([disabled])) {
117
+ --_shadow: var(--md-sys-elevation-2);
115
118
  }
116
119
 
117
- .leading-icon {
118
- height: 18px;
119
- width: 0px;
120
- overflow: hidden;
121
- transition: width 230ms var(--md-sys-animation-easing-standard);
120
+ .surface.has-trailing-icon {
121
+ --_inline-padding-end: 8px;
122
122
  }
123
123
 
124
- .check-mark.checked {
125
- width: 18px;
126
- margin-right: 8px;
124
+ :host([type='assist']:not([disabled])) {
125
+ --_outline-color: var(--md-sys-color-outline-variant);
126
+ --_outline-size: 1px;
127
+ --_color: var(--md-sys-color-on-surface);
128
+ --_leading-icon-color: var(--md-sys-color-primary);
127
129
  }
128
130
 
129
- .trailing-icon {
130
- margin-left: 8px;
131
- width: 18px;
132
- height: 18px;
133
- fill: var(--md-sys-color-on-surface-variant);
131
+ :host .has-icon {
132
+ --_inline-padding-start: 8px;
133
+ }
134
+
135
+ :host .has-avatar {
136
+ --_inline-padding-start: 4px;
137
+ }
138
+
139
+ :host([checked]) {
140
+ --_inline-padding-start: 8px;
141
+ --_background-color: var(--md-sys-color-secondary-container);
134
142
  }
135
143
 
136
- :host([elevated]:hover) .container,
137
- :host([elevated]:focus) .container {
138
- box-shadow: var(--md-sys-elevation-2);
144
+ :host([type='filter']:not([disabled])) {
145
+ --_leading-icon-color: var(--md-sys-color-primary);
146
+ --_trailing-icon-color: var(--md-sys-on-surface-variant);
147
+ --_outline-color: var(--md-sys-color-outline-variant);
148
+ --_outline-size: 1px;
149
+ --_color: var(--md-sys-color-on-surface-variant);
139
150
  }
140
151
 
141
- :host([elevated][dragged]) .container {
142
- box-shadow: var(--md-sys-elevation-4);
152
+ :host([type='filter'][checked]) {
153
+ --_outline-size: 1px;
143
154
  }
144
155
 
145
- :host([checked]) .container {
146
- background-color: var(--md-sys-color-secondary-container);
147
- border-width: 0;
156
+ :host([type='filter'][checked]:not([disabled])) {
157
+ --_leading-icon-color: var(--md-sys-color-on-secondary-container);
158
+ --_trailing-icon-color: var(--md-sys-on-secondary-container);
159
+ --_outline-color: var(--md-sys-color-secondary-container);
160
+ --_color: var(--md-sys-color-on-secondary-container);
148
161
  }
149
162
 
150
- :host([type='filter']),
151
- :host([type='filter']) .leading-icon {
152
- color: var(--md-sys-color-on-surface-variant);
153
- fill: var(--md-sys-color-on-surface-variant);
163
+ :host([type='input']:not([disabled])) {
164
+ --_outline-color: var(--md-sys-color-outline-variant);
165
+ --_outline-size: 1px;
166
+ --_leading-icon-color: var(--md-sys-color-primary);
167
+ --_trailing-icon-color: var(--md-sys-color-on-surface-variant);
168
+ --_color: var(--md-sys-color-on-surface-variant);
154
169
  }
155
170
 
156
- :host([type='filter'][checked]),
157
- :host([type='filter'][checked]) .leading-icon {
158
- color: var(--md-sys-color-on-secondary-container);
171
+ :host([type='input'][checked]) {
172
+ --_outline-size: 0px;
159
173
  }
160
174
 
161
- :host([type='input']) .container {
162
- background-color: var(--md-sys-color-surface);
163
- color: var(--md-sys-color-on-surface-variant);
175
+ :host([type='suggestion']) {
176
+ --_outline-size: 1px;
177
+ --_outline-color: var(--md-sys-color-outline-variant);
178
+ --_color: var(--md-sys-color-on-surface-variant);
164
179
  }
165
180
 
166
- :host([type='input']) .leading-icon,
167
- :host([type='input']) .trailing-icon {
168
- color: var(--md-sys-color-on-surface-variant);
169
- fill: var(--md-sys-color-on-surface-variant);
181
+ :host([type='suggestion']:not([disabled])) {
182
+ --_leading-icon-color: var(--md-sys-color-primary);
170
183
  }
171
184
  `