|
64 | 64 | margin: 8px 0; |
65 | 65 | height: 32px; |
66 | 66 | overflow: visible; |
| 67 | + |
| 68 | + font-family: 'Roboto', 'Noto', sans-serif; |
| 69 | + |
67 | 70 | @apply(--paper-chip); |
68 | 71 | } |
69 | 72 | :host([animated]) *, |
|
72 | 75 | } |
73 | 76 |
|
74 | 77 | /* initially hidden elements */ |
75 | | - :host(:not([opened])) #label ::content h2 { |
| 78 | + :host(:not([opened])) #labelContainer ::content h2 { |
76 | 79 | color: var(--paper-chip-secondary-text-color, --secondary-text-color); |
77 | 80 | font-size: 0; |
78 | 81 | height: 0; |
79 | 82 | } |
80 | | - |
81 | | - #main, #chip { |
| 83 | + :host([no-image]) #iconContainer { |
| 84 | + display: none; |
| 85 | + } |
| 86 | + #mainContainer, #iconContainer { |
82 | 87 | border-radius: 16px; |
83 | 88 | } |
84 | 89 |
|
85 | | - #main { |
86 | | - background-color: var(--paper-chip-background-color, --paper-grey-200); |
| 90 | + #mainContainer { |
| 91 | + background-color: var(--paper-chip-background-color, --paper-grey-300); |
87 | 92 | position: relative; |
88 | 93 | color: var(--paper-chip-secondary-text-color, --secondary-text-color); |
89 | 94 | @apply(--layout-vertical); |
90 | 95 | } |
91 | 96 |
|
92 | | - #chip { |
| 97 | + #chipContainer { |
93 | 98 | box-sizing: border-box; |
94 | 99 | height: 32px; |
95 | 100 | @apply(--layout-horizontal); |
96 | 101 | @apply(--layout-center); |
97 | 102 | } |
98 | | - |
99 | 103 | paper-material { |
100 | 104 | border-radius: 16px; |
101 | 105 | } |
102 | | - |
103 | | - #icon { |
| 106 | + #iconContainer { |
| 107 | + width: 32px; |
| 108 | + height: 32px; |
104 | 109 | @apply(--layout-horizontal); |
105 | 110 | @apply(--layout-center); |
106 | 111 | @apply(--layout-center-justified); |
107 | 112 | } |
108 | | - #icon ::content .icon { |
| 113 | + #iconContainer ::content .icon { |
109 | 114 | width: 32px; |
110 | 115 | height: 32px; |
111 | 116 | line-height: 32px; |
|
115 | 120 | vertical-align: middle; |
116 | 121 | font-size: 16px; |
117 | 122 | font-weight: bold; |
118 | | - background-color: var(--paper-chip-icon-background-color, --paper-grey-500); |
| 123 | + background-color: var(--paper-chip-icon-background-color, --secondary-text-color); |
119 | 124 | color: var(--paper-chip-icon-text-color, --text-primary-color); |
120 | 125 | @apply(--layout-flex); |
121 | 126 | } |
|
127 | 132 | width: 32px; |
128 | 133 | height: 32px; |
129 | 134 | } |
130 | | - |
131 | | - #label { |
| 135 | + |
| 136 | + #labelContainer { |
132 | 137 | font-family: 'Roboto', 'Noto', sans-serif; |
133 | | - padding-top: 8px; |
| 138 | + padding-top: 8px; |
134 | 139 | padding-right: 12px; |
135 | 140 | padding-bottom: 8px; |
136 | 141 | padding-left: 8px; |
137 | 142 | @apply(--layout-flex-auto); |
138 | 143 | @apply(--layout-self-center); |
139 | 144 | } |
140 | | - #label ::content h1, |
141 | | - #label ::content h2 { |
| 145 | + #labelContainer ::content h1 { |
| 146 | + font-size: 13px; |
| 147 | + font-weight: normal; |
| 148 | + color: var(--paper-chip-label-text-color, --primary-text-color); |
| 149 | + } |
| 150 | + #labelContainer ::content h2 { |
| 151 | + font-size: 14px; |
142 | 152 | white-space: nowrap; |
143 | 153 | margin: 0; |
144 | 154 | font-weight: normal; |
145 | | - font-size: 14px; |
| 155 | + } |
| 156 | + :host([no-image]) #labelContainer { |
| 157 | + padding-left: 12px; |
146 | 158 | } |
147 | 159 |
|
148 | | - .icon-btn-wrapper { |
149 | | - @apply(--layout-self-center); |
| 160 | + :host([removable]) #labelContainer { |
| 161 | + padding-right: 4px; |
150 | 162 | } |
151 | | - |
152 | | - :host(:not([opened])) #removeBtn { |
153 | | - background-color: transparent; |
| 163 | + |
| 164 | + #removeBtnContainer { |
| 165 | + width: 24px; |
| 166 | + height: 24px; |
| 167 | + margin-left: 0px; |
| 168 | + margin-right: 4px; |
| 169 | + @apply(--layout-horizontal); |
| 170 | + @apply(--layout-center-center); |
154 | 171 | } |
| 172 | + |
155 | 173 | #removeBtn { |
156 | | - width: 20px; |
157 | | - height: 20px; |
| 174 | + width: 18px; |
| 175 | + height: 18px; |
158 | 176 | border-radius: 100%; |
159 | | - margin-left: -4px; |
160 | | - margin-right: 8px; |
161 | 177 | cursor: pointer; |
| 178 | + background-color: var(--paper-chip-removebtn-background-color, --paper-grey-500); |
| 179 | + color: var(--paper-chip-removebtn-icon-color, --text-primary-color); |
| 180 | + @apply(--layout-horizontal); |
| 181 | + @apply(--layout-center-center); |
162 | 182 | } |
163 | 183 | #removeBtn iron-icon { |
164 | 184 | padding: 2px; |
165 | 185 | width: 16px; |
166 | 186 | height: 16px; |
167 | 187 | } |
168 | | - :host(:not([removable])) #removeBtn { |
| 188 | + :host(:not([removable])) #removeBtnContainer { |
169 | 189 | display: none; |
170 | 190 | } |
171 | 191 |
|
172 | 192 | /* pressed state */ |
173 | | - :host([pressed]) #main { |
| 193 | + :host([pressed]) #mainContainer { |
174 | 194 | background-color: var(--paper-chip-pressed-background-color, --paper-grey-300); |
175 | 195 | } |
176 | 196 |
|
|
180 | 200 | min-width: 100%; |
181 | 201 | overflow: hidden; |
182 | 202 | } |
183 | | - :host(:not([opened])) #label ::content h1 { |
184 | | - color: var(--paper-chip-secondary-text-color, --secondary-text-color); |
185 | | - } |
186 | | - |
| 203 | + |
187 | 204 | /* opened state */ |
188 | | - :host([opened]) #main, :host([opened]) #chip { |
| 205 | + :host([opened]) #mainContainer, :host([opened]) #chipContainer { |
189 | 206 | border-radius: 0; |
190 | 207 | } |
191 | 208 | :host([opened]) #content { |
|
194 | 211 | min-width: 100%; |
195 | 212 | overflow: hidden; |
196 | 213 | } |
197 | | - :host([opened]) #chip { |
| 214 | + :host([opened]) #chipContainer { |
198 | 215 | height: 72px; |
199 | 216 | } |
200 | | - :host([opened]) #chip, |
| 217 | + :host([opened]) #chipContainer, |
201 | 218 | :host([opened]) #content ::content > * { |
202 | 219 | padding: 16px 12px; |
203 | 220 | background-color: var(--paper-chip-opened-background-color, --paper-grey-50); |
204 | 221 | } |
205 | | - :host([opened]) #label ::content h1 { |
| 222 | + :host([opened]) #labelContainer ::content h1 { |
206 | 223 | color: var(--paper-chip-primary-text-color, --primary-text-color); |
207 | 224 | font-size: 16px; |
208 | 225 | } |
209 | 226 | :host([opened]) paper-material { |
210 | 227 | border-radius: 0; |
211 | 228 | } |
212 | 229 | :host([opened]) #removeBtn { |
213 | | - background-color: var(--paper-chip-removebtn-background-color, --paper-grey-400); |
| 230 | + background-color: var(--paper-chip-removebtn-background-color, --paper-grey-600); |
214 | 231 | color: var(--paper-chip-removebtn-icon-color, --text-primary-color); |
215 | 232 | } |
| 233 | + :host([opened]) #iconContainer { |
| 234 | + width: 40px; |
| 235 | + height: 40px; |
| 236 | + } |
216 | 237 | :host([opened]) #icon ::content .icon, |
217 | 238 | :host([opened]) #icon ::content iron-icon.icon svg { |
218 | 239 | font-size: 20px; |
219 | 240 | width: 40px; |
220 | 241 | height: 40px; |
221 | 242 | line-height: 40px; |
222 | 243 | } |
223 | | - |
224 | 244 | /* open + active state */ |
225 | | - :host([opened][active]) #chip, |
| 245 | + :host([opened][active]) #chipContainer, |
226 | 246 | :host([opened][active]) ::content { |
227 | 247 | background-color: var(--paper-chip-active-color, --accent-color); |
228 | 248 | color: var(--paper-chip-active-text-color, --text-primary-color); |
|
231 | 251 | background-color: var(--paper-chip-active-text-color, --text-primary-color); |
232 | 252 | color: var(--paper-chip-active-color, --accent-color); |
233 | 253 | } |
234 | | - :host([opened][active]) #chip #label ::content h1 { |
| 254 | + :host([opened][active]) #chipContainer #labelContainer ::content h1 { |
235 | 255 | color: var(--paper-chip-active-text-color, --text-primary-color); |
236 | 256 | } |
237 | | - :host([opened][active]) #chip #label ::content h2 { |
| 257 | + :host([opened][active]) #chipContainer #labelContainer ::content h2 { |
238 | 258 | color: var(--paper-chip-active-secondary-text-color, --text-primary-color); |
239 | 259 | } |
240 | 260 | </style> |
241 | 261 | <iron-a11y-keys target="{{}}" keys="space enter" on-keys-pressed="toggleOpened"></iron-a11y-keys> |
242 | | - <paper-material id="shadow" elevation="{{_elevation}}" animated$="{{animated}}"> |
243 | | - <div id="main"> |
244 | | - <div id="chip"> |
245 | | - <div id="icon"> |
| 262 | + <iron-a11y-keys target="{{}}" keys="del" on-keys-pressed="remove"></iron-a11y-keys> |
| 263 | + <paper-material elevation="{{_elevation}}" animated$="{{animated}}"> |
| 264 | + <div id="mainContainer"> |
| 265 | + <div id="chipContainer"> |
| 266 | + <div id="iconContainer"> |
246 | 267 | <content select=".icon"></content> |
247 | 268 | </div> |
248 | | - <div id="label"> |
| 269 | + <div id="labelContainer"> |
249 | 270 | <content select="h1"></content> |
250 | 271 | <content select="h2"></content> |
251 | 272 | </div> |
252 | | - <div id="removeBtn" on-tap="remove" aria-label="remove button"> |
253 | | - <iron-icon icon="close"></iron-icon> |
| 273 | + <div id="removeBtnContainer"> |
| 274 | + <div id="removeBtn" on-tap="remove" aria-label="remove button"> |
| 275 | + <iron-icon icon="close"></iron-icon> |
| 276 | + </div> |
254 | 277 | </div> |
255 | 278 | </div> |
256 | 279 | <div id="content"> |
|
0 commit comments