luxen-ui 0.23.0 → 0.25.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/cdn/custom-elements.json +225 -192
- package/cdn/elements/avatar/avatar.js +1 -1
- package/cdn/elements/avatar/avatar.js.map +1 -1
- package/cdn/elements/combobox/combobox.d.ts +6 -1
- package/cdn/elements/combobox/combobox.d.ts.map +1 -1
- package/cdn/elements/combobox/combobox.js +19 -17
- package/cdn/elements/combobox/combobox.js.map +1 -1
- package/cdn/elements/dropdown/dropdown.d.ts +6 -7
- package/cdn/elements/dropdown/dropdown.d.ts.map +1 -1
- package/cdn/elements/dropdown/dropdown.js +2 -2
- package/cdn/elements/dropdown/dropdown.js.map +1 -1
- package/cdn/elements/dropdown-item/dropdown-item.d.ts +0 -1
- package/cdn/elements/dropdown-item/dropdown-item.d.ts.map +1 -1
- package/cdn/elements/dropdown-item/dropdown-item.js +2 -2
- package/cdn/elements/dropdown-item/dropdown-item.js.map +1 -1
- package/cdn/elements/dropdown-label/dropdown-label.js +1 -1
- package/cdn/elements/dropdown-label/dropdown-label.js.map +1 -1
- package/cdn/elements/form-field/form-field.d.ts +1 -1
- package/cdn/elements/form-field/form-field.js.map +1 -1
- package/cdn/elements/input/input.meta.d.ts +2 -0
- package/cdn/elements/input/input.meta.d.ts.map +1 -1
- package/cdn/elements/input-otp/input-otp.d.ts +3 -3
- package/cdn/elements/input-otp/input-otp.js.map +1 -1
- package/cdn/elements/popover/popover.d.ts +3 -4
- package/cdn/elements/popover/popover.d.ts.map +1 -1
- package/cdn/elements/popover/popover.js +1 -1
- package/cdn/elements/popover/popover.js.map +1 -1
- package/cdn/elements/prose-editor/prose-editor.js +1 -1
- package/cdn/elements/prose-editor/prose-editor.js.map +1 -1
- package/cdn/elements/select/select.d.ts +6 -1
- package/cdn/elements/select/select.d.ts.map +1 -1
- package/cdn/elements/select/select.js +8 -7
- package/cdn/elements/select/select.js.map +1 -1
- package/cdn/elements/stories-viewer/stories-viewer.d.ts.map +1 -1
- package/cdn/elements/stories-viewer/stories-viewer.js +4 -4
- package/cdn/elements/stories-viewer/stories-viewer.js.map +1 -1
- package/cdn/elements/tag/tag.js +1 -1
- package/cdn/elements/tag/tag.js.map +1 -1
- package/cdn/elements/tooltip/tooltip.d.ts +0 -1
- package/cdn/elements/tooltip/tooltip.d.ts.map +1 -1
- package/cdn/elements/tooltip/tooltip.js +1 -1
- package/cdn/elements/tooltip/tooltip.js.map +1 -1
- package/cdn/elements/tree/tree.js +1 -1
- package/cdn/elements/tree/tree.js.map +1 -1
- package/cdn/elements/tree-item/tree-item.js +1 -1
- package/cdn/elements/tree-item/tree-item.js.map +1 -1
- package/cdn/shared/controllers/listbox-nav.d.ts +15 -1
- package/cdn/shared/controllers/listbox-nav.d.ts.map +1 -1
- package/cdn/shared/controllers/listbox-nav.js +1 -1
- package/cdn/shared/controllers/listbox-nav.js.map +1 -1
- package/cdn/shared/controllers/popover.d.ts +10 -2
- package/cdn/shared/controllers/popover.d.ts.map +1 -1
- package/cdn/shared/controllers/popover.js +1 -1
- package/cdn/shared/controllers/popover.js.map +1 -1
- package/cdn/shared/styles/button-core.styles.js +1 -1
- package/cdn/shared/styles/button-core.styles.js.map +1 -1
- package/cdn/shared/styles/checkbox-appearance.styles.js +1 -1
- package/cdn/shared/styles/checkbox-appearance.styles.js.map +1 -1
- package/cdn/shared/styles/menu-panel.styles.d.ts +8 -0
- package/cdn/shared/styles/menu-panel.styles.d.ts.map +1 -0
- package/cdn/shared/styles/menu-panel.styles.js +2 -0
- package/cdn/shared/styles/menu-panel.styles.js.map +1 -0
- package/cdn/shared/styles/picker-core.styles.d.ts +9 -0
- package/cdn/shared/styles/picker-core.styles.d.ts.map +1 -0
- package/cdn/shared/styles/picker-core.styles.js +2 -0
- package/cdn/shared/styles/picker-core.styles.js.map +1 -0
- package/cdn/shared/styles/select-item-suffix.styles.js +1 -1
- package/cdn/shared/styles/select-item-suffix.styles.js.map +1 -1
- package/cdn/shared/styles/select-item.styles.d.ts +8 -0
- package/cdn/shared/styles/select-item.styles.d.ts.map +1 -0
- package/cdn/shared/styles/select-item.styles.js +2 -0
- package/cdn/shared/styles/select-item.styles.js.map +1 -0
- package/cdn/shared/styles/visually-hidden.styles.d.ts +8 -0
- package/cdn/shared/styles/visually-hidden.styles.d.ts.map +1 -0
- package/cdn/shared/styles/visually-hidden.styles.js +2 -0
- package/cdn/shared/styles/visually-hidden.styles.js.map +1 -0
- package/cdn/standalone.css +518 -260
- package/cdn/standalone.js +154 -81
- package/cdn/standalone.js.map +1 -1
- package/cdn/styles/base.css +30 -20
- package/cdn/styles/elements/breadcrumb.css +1 -1
- package/cdn/styles/elements/button.css +1 -1
- package/cdn/styles/elements/checkbox.css +3 -3
- package/cdn/styles/elements/close-button/circle.css +1 -1
- package/cdn/styles/elements/close-button/ring.css +1 -1
- package/cdn/styles/elements/close-button/square.css +1 -1
- package/cdn/styles/elements/disclosure.css +2 -2
- package/cdn/styles/elements/form-field.css +16 -9
- package/cdn/styles/elements/input-otp.css +18 -11
- package/cdn/styles/elements/input-stepper/default.css +6 -6
- package/cdn/styles/elements/input-stepper/pill.css +6 -6
- package/cdn/styles/elements/input-stepper/rounded.css +5 -5
- package/cdn/styles/elements/input.css +130 -42
- package/cdn/styles/elements/prose-editor.css +23 -8
- package/cdn/styles/elements/radio-group.css +1 -1
- package/cdn/styles/elements/radio.css +3 -3
- package/cdn/styles/elements/segmented-control.css +2 -2
- package/cdn/styles/elements/select.css +162 -84
- package/cdn/styles/elements/story.css +1 -1
- package/cdn/styles/elements/switch.css +4 -4
- package/cdn/styles/elements/tabs/enclosed.css +3 -3
- package/cdn/styles/elements/tabs/line.css +3 -3
- package/cdn/styles/elements/textarea.css +27 -13
- package/cdn/styles/preset.css +99 -50
- package/cdn/styles/tokens/aliases.css +3 -1
- package/cdn/styles/tokens/forms.css +37 -30
- package/cdn/styles/tokens.css +69 -30
- package/dist/css/base.css +30 -20
- package/dist/css/elements/breadcrumb.css +1 -1
- package/dist/css/elements/button.css +1 -1
- package/dist/css/elements/checkbox.css +3 -3
- package/dist/css/elements/close-button/circle.css +1 -1
- package/dist/css/elements/close-button/ring.css +1 -1
- package/dist/css/elements/close-button/square.css +1 -1
- package/dist/css/elements/disclosure.css +2 -2
- package/dist/css/elements/form-field.css +16 -9
- package/dist/css/elements/input-otp.css +18 -11
- package/dist/css/elements/input-stepper/default.css +6 -6
- package/dist/css/elements/input-stepper/pill.css +6 -6
- package/dist/css/elements/input-stepper/rounded.css +5 -5
- package/dist/css/elements/input.css +130 -42
- package/dist/css/elements/prose-editor.css +23 -8
- package/dist/css/elements/radio-group.css +1 -1
- package/dist/css/elements/radio.css +3 -3
- package/dist/css/elements/segmented-control.css +2 -2
- package/dist/css/elements/select.css +162 -84
- package/dist/css/elements/story.css +1 -1
- package/dist/css/elements/switch.css +4 -4
- package/dist/css/elements/tabs/enclosed.css +3 -3
- package/dist/css/elements/tabs/line.css +3 -3
- package/dist/css/elements/textarea.css +27 -13
- package/dist/css/preset.css +99 -50
- package/dist/css/tokens/aliases.css +3 -1
- package/dist/css/tokens/forms.css +37 -30
- package/dist/css/tokens.css +69 -30
- package/dist/custom-elements.json +225 -192
- package/dist/elements/avatar/avatar.css +1 -1
- package/dist/elements/combobox/combobox.css +30 -187
- package/dist/elements/combobox/combobox.d.ts +6 -1
- package/dist/elements/combobox/combobox.d.ts.map +1 -1
- package/dist/elements/combobox/combobox.js +48 -20
- package/dist/elements/dropdown/dropdown.css +7 -30
- package/dist/elements/dropdown/dropdown.d.ts +6 -7
- package/dist/elements/dropdown/dropdown.d.ts.map +1 -1
- package/dist/elements/dropdown/dropdown.js +17 -14
- package/dist/elements/dropdown-item/dropdown-item.css +12 -40
- package/dist/elements/dropdown-item/dropdown-item.d.ts +0 -1
- package/dist/elements/dropdown-item/dropdown-item.d.ts.map +1 -1
- package/dist/elements/dropdown-item/dropdown-item.js +4 -7
- package/dist/elements/dropdown-label/dropdown-label.css +3 -3
- package/dist/elements/form-field/form-field.d.ts +1 -1
- package/dist/elements/form-field/form-field.js +2 -2
- package/dist/elements/input/input.meta.d.ts +2 -0
- package/dist/elements/input/input.meta.d.ts.map +1 -1
- package/dist/elements/input/input.meta.js +2 -0
- package/dist/elements/input-otp/input-otp.d.ts +3 -3
- package/dist/elements/input-otp/input-otp.js +3 -3
- package/dist/elements/popover/popover.css +4 -4
- package/dist/elements/popover/popover.d.ts +3 -4
- package/dist/elements/popover/popover.d.ts.map +1 -1
- package/dist/elements/popover/popover.js +5 -9
- package/dist/elements/prose-editor/prose-editor.css +1 -1
- package/dist/elements/select/select.css +24 -264
- package/dist/elements/select/select.d.ts +6 -1
- package/dist/elements/select/select.d.ts.map +1 -1
- package/dist/elements/select/select.js +27 -9
- package/dist/elements/stories-viewer/stories-viewer.css +0 -12
- package/dist/elements/stories-viewer/stories-viewer.d.ts.map +1 -1
- package/dist/elements/stories-viewer/stories-viewer.js +4 -3
- package/dist/elements/tag/tag.css +3 -3
- package/dist/elements/tooltip/tooltip.d.ts +0 -1
- package/dist/elements/tooltip/tooltip.d.ts.map +1 -1
- package/dist/elements/tooltip/tooltip.js +2 -6
- package/dist/elements/tree/tree.css +1 -1
- package/dist/elements/tree-item/tree-item.css +1 -1
- package/dist/metadata/combobox.json +16 -1
- package/dist/metadata/dropdown.json +10 -10
- package/dist/metadata/form-field.json +1 -1
- package/dist/metadata/index.json +57 -22
- package/dist/metadata/input-otp.json +3 -3
- package/dist/metadata/input.json +5 -0
- package/dist/metadata/popover.json +5 -5
- package/dist/metadata/select.json +16 -1
- package/dist/shared/controllers/listbox-nav.d.ts +15 -1
- package/dist/shared/controllers/listbox-nav.d.ts.map +1 -1
- package/dist/shared/controllers/listbox-nav.js +32 -1
- package/dist/shared/controllers/popover.d.ts +10 -2
- package/dist/shared/controllers/popover.d.ts.map +1 -1
- package/dist/shared/controllers/popover.js +16 -2
- package/dist/shared/styles/button-core.css +1 -1
- package/dist/shared/styles/checkbox-appearance.css +3 -3
- package/dist/shared/styles/menu-panel.css +37 -0
- package/dist/shared/styles/menu-panel.styles.d.ts +8 -0
- package/dist/shared/styles/menu-panel.styles.d.ts.map +1 -0
- package/dist/shared/styles/menu-panel.styles.js +8 -0
- package/dist/shared/styles/picker-core.css +271 -0
- package/dist/shared/styles/picker-core.styles.d.ts +9 -0
- package/dist/shared/styles/picker-core.styles.d.ts.map +1 -0
- package/dist/shared/styles/picker-core.styles.js +9 -0
- package/dist/shared/styles/select-item-suffix.css +4 -4
- package/dist/shared/styles/select-item.css +98 -0
- package/dist/shared/styles/select-item.styles.d.ts +8 -0
- package/dist/shared/styles/select-item.styles.d.ts.map +1 -0
- package/dist/shared/styles/select-item.styles.js +8 -0
- package/dist/shared/styles/visually-hidden.css +27 -0
- package/dist/shared/styles/visually-hidden.styles.d.ts +8 -0
- package/dist/shared/styles/visually-hidden.styles.d.ts.map +1 -0
- package/dist/shared/styles/visually-hidden.styles.js +8 -0
- package/dist/templates/elements/combobox.md +26 -1
- package/dist/templates/elements/disclosure.md +2 -0
- package/dist/templates/elements/dropdown.md +6 -6
- package/dist/templates/elements/form-field.md +2 -2
- package/dist/templates/elements/input-otp.md +3 -3
- package/dist/templates/elements/input.md +1 -0
- package/dist/templates/elements/popover.md +3 -3
- package/dist/templates/elements/select.md +30 -1
- package/package.json +1 -1
package/cdn/custom-elements.json
CHANGED
|
@@ -172,181 +172,6 @@
|
|
|
172
172
|
}
|
|
173
173
|
]
|
|
174
174
|
},
|
|
175
|
-
{
|
|
176
|
-
"kind": "javascript-module",
|
|
177
|
-
"path": "src/html/elements/avatar/avatar.ts",
|
|
178
|
-
"declarations": [
|
|
179
|
-
{
|
|
180
|
-
"kind": "class",
|
|
181
|
-
"description": "",
|
|
182
|
-
"name": "Avatar",
|
|
183
|
-
"cssProperties": [
|
|
184
|
-
{
|
|
185
|
-
"description": "Box size (any length). Set it inline (e.g. `style=\"--size: 20px\"`) for an arbitrary size beyond the `size` token scale; the font then follows proportionally. The `size` attribute sets it to the matching token.",
|
|
186
|
-
"name": "--size",
|
|
187
|
-
"default": "40px"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"description": "Background fill color for initials and the default icon.",
|
|
191
|
-
"name": "--color"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"description": "Initials/icon color over `--color`. Defaults to an auto-derived readable color; set it to enforce a specific brand color (overrides the automatic choice).",
|
|
195
|
-
"name": "--text-color"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
"description": "Set to `circle` for a fully circular avatar (default is a rounded square).",
|
|
199
|
-
"name": "--appearance"
|
|
200
|
-
}
|
|
201
|
-
],
|
|
202
|
-
"cssParts": [
|
|
203
|
-
{
|
|
204
|
-
"description": "The avatar container that paints `--color`; style it (e.g. `color`) to override the auto-derived text color.",
|
|
205
|
-
"name": "base"
|
|
206
|
-
}
|
|
207
|
-
],
|
|
208
|
-
"members": [
|
|
209
|
-
{
|
|
210
|
-
"kind": "field",
|
|
211
|
-
"name": "src",
|
|
212
|
-
"type": {
|
|
213
|
-
"text": "string"
|
|
214
|
-
},
|
|
215
|
-
"default": "''",
|
|
216
|
-
"description": "Image URL. Falls back to initials (then the default icon) if it fails to load.",
|
|
217
|
-
"attribute": "src"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"kind": "field",
|
|
221
|
-
"name": "name",
|
|
222
|
-
"type": {
|
|
223
|
-
"text": "string"
|
|
224
|
-
},
|
|
225
|
-
"default": "''",
|
|
226
|
-
"description": "Name used as the accessible label and to derive the initials fallback.",
|
|
227
|
-
"attribute": "name"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"kind": "field",
|
|
231
|
-
"name": "size",
|
|
232
|
-
"type": {
|
|
233
|
-
"text": "string"
|
|
234
|
-
},
|
|
235
|
-
"default": "'md'",
|
|
236
|
-
"description": "Avatar size: `xs`, `sm`, `md` (default), `lg`, or `xl`.",
|
|
237
|
-
"attribute": "size",
|
|
238
|
-
"reflects": true
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
"kind": "field",
|
|
242
|
-
"name": "badge",
|
|
243
|
-
"type": {
|
|
244
|
-
"text": "number"
|
|
245
|
-
},
|
|
246
|
-
"default": "0",
|
|
247
|
-
"description": "Count shown in the corner badge. `0` hides the badge.",
|
|
248
|
-
"attribute": "badge"
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
"kind": "field",
|
|
252
|
-
"name": "interactive",
|
|
253
|
-
"type": {
|
|
254
|
-
"text": "boolean"
|
|
255
|
-
},
|
|
256
|
-
"default": "false",
|
|
257
|
-
"description": "Render as a `<button>` with focus ring and hover states.",
|
|
258
|
-
"attribute": "interactive",
|
|
259
|
-
"reflects": true
|
|
260
|
-
}
|
|
261
|
-
],
|
|
262
|
-
"attributes": [
|
|
263
|
-
{
|
|
264
|
-
"name": "src",
|
|
265
|
-
"type": {
|
|
266
|
-
"text": "string"
|
|
267
|
-
},
|
|
268
|
-
"default": "''",
|
|
269
|
-
"description": "Image URL. Falls back to initials (then the default icon) if it fails to load.",
|
|
270
|
-
"fieldName": "src"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
"name": "name",
|
|
274
|
-
"type": {
|
|
275
|
-
"text": "string"
|
|
276
|
-
},
|
|
277
|
-
"default": "''",
|
|
278
|
-
"description": "Name used as the accessible label and to derive the initials fallback.",
|
|
279
|
-
"fieldName": "name"
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
"name": "size",
|
|
283
|
-
"type": {
|
|
284
|
-
"text": "string"
|
|
285
|
-
},
|
|
286
|
-
"default": "'md'",
|
|
287
|
-
"description": "Avatar size: `xs`, `sm`, `md` (default), `lg`, or `xl`.",
|
|
288
|
-
"fieldName": "size"
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
"name": "badge",
|
|
292
|
-
"type": {
|
|
293
|
-
"text": "number"
|
|
294
|
-
},
|
|
295
|
-
"default": "0",
|
|
296
|
-
"description": "Count shown in the corner badge. `0` hides the badge.",
|
|
297
|
-
"fieldName": "badge"
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
"name": "interactive",
|
|
301
|
-
"type": {
|
|
302
|
-
"text": "boolean"
|
|
303
|
-
},
|
|
304
|
-
"default": "false",
|
|
305
|
-
"description": "Render as a `<button>` with focus ring and hover states.",
|
|
306
|
-
"fieldName": "interactive"
|
|
307
|
-
}
|
|
308
|
-
],
|
|
309
|
-
"superclass": {
|
|
310
|
-
"name": "LuxenElement",
|
|
311
|
-
"module": "/src/html/shared/luxen-element.js"
|
|
312
|
-
},
|
|
313
|
-
"tagName": "l-avatar",
|
|
314
|
-
"customElement": true,
|
|
315
|
-
"summary": "An avatar component for displaying user images, initials, or a default icon.",
|
|
316
|
-
"_cssClasses": [
|
|
317
|
-
{
|
|
318
|
-
"name": ".l-avatar-group",
|
|
319
|
-
"description": "Flex wrapper that overlaps a row of stacked avatars."
|
|
320
|
-
}
|
|
321
|
-
]
|
|
322
|
-
}
|
|
323
|
-
],
|
|
324
|
-
"exports": [
|
|
325
|
-
{
|
|
326
|
-
"kind": "js",
|
|
327
|
-
"name": "Avatar",
|
|
328
|
-
"declaration": {
|
|
329
|
-
"name": "Avatar",
|
|
330
|
-
"module": "src/html/elements/avatar/avatar.ts"
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
]
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"kind": "javascript-module",
|
|
337
|
-
"path": "src/html/elements/avatar/index.ts",
|
|
338
|
-
"declarations": [],
|
|
339
|
-
"exports": [
|
|
340
|
-
{
|
|
341
|
-
"kind": "js",
|
|
342
|
-
"name": "*",
|
|
343
|
-
"declaration": {
|
|
344
|
-
"name": "*",
|
|
345
|
-
"module": "src/html/elements/avatar/avatar.js"
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
]
|
|
349
|
-
},
|
|
350
175
|
{
|
|
351
176
|
"kind": "javascript-module",
|
|
352
177
|
"path": "src/html/elements/alert-dialog/alert-dialog.ts",
|
|
@@ -836,6 +661,181 @@
|
|
|
836
661
|
}
|
|
837
662
|
]
|
|
838
663
|
},
|
|
664
|
+
{
|
|
665
|
+
"kind": "javascript-module",
|
|
666
|
+
"path": "src/html/elements/avatar/avatar.ts",
|
|
667
|
+
"declarations": [
|
|
668
|
+
{
|
|
669
|
+
"kind": "class",
|
|
670
|
+
"description": "",
|
|
671
|
+
"name": "Avatar",
|
|
672
|
+
"cssProperties": [
|
|
673
|
+
{
|
|
674
|
+
"description": "Box size (any length). Set it inline (e.g. `style=\"--size: 20px\"`) for an arbitrary size beyond the `size` token scale; the font then follows proportionally. The `size` attribute sets it to the matching token.",
|
|
675
|
+
"name": "--size",
|
|
676
|
+
"default": "40px"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"description": "Background fill color for initials and the default icon.",
|
|
680
|
+
"name": "--color"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"description": "Initials/icon color over `--color`. Defaults to an auto-derived readable color; set it to enforce a specific brand color (overrides the automatic choice).",
|
|
684
|
+
"name": "--text-color"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"description": "Set to `circle` for a fully circular avatar (default is a rounded square).",
|
|
688
|
+
"name": "--appearance"
|
|
689
|
+
}
|
|
690
|
+
],
|
|
691
|
+
"cssParts": [
|
|
692
|
+
{
|
|
693
|
+
"description": "The avatar container that paints `--color`; style it (e.g. `color`) to override the auto-derived text color.",
|
|
694
|
+
"name": "base"
|
|
695
|
+
}
|
|
696
|
+
],
|
|
697
|
+
"members": [
|
|
698
|
+
{
|
|
699
|
+
"kind": "field",
|
|
700
|
+
"name": "src",
|
|
701
|
+
"type": {
|
|
702
|
+
"text": "string"
|
|
703
|
+
},
|
|
704
|
+
"default": "''",
|
|
705
|
+
"description": "Image URL. Falls back to initials (then the default icon) if it fails to load.",
|
|
706
|
+
"attribute": "src"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
"kind": "field",
|
|
710
|
+
"name": "name",
|
|
711
|
+
"type": {
|
|
712
|
+
"text": "string"
|
|
713
|
+
},
|
|
714
|
+
"default": "''",
|
|
715
|
+
"description": "Name used as the accessible label and to derive the initials fallback.",
|
|
716
|
+
"attribute": "name"
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"kind": "field",
|
|
720
|
+
"name": "size",
|
|
721
|
+
"type": {
|
|
722
|
+
"text": "string"
|
|
723
|
+
},
|
|
724
|
+
"default": "'md'",
|
|
725
|
+
"description": "Avatar size: `xs`, `sm`, `md` (default), `lg`, or `xl`.",
|
|
726
|
+
"attribute": "size",
|
|
727
|
+
"reflects": true
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"kind": "field",
|
|
731
|
+
"name": "badge",
|
|
732
|
+
"type": {
|
|
733
|
+
"text": "number"
|
|
734
|
+
},
|
|
735
|
+
"default": "0",
|
|
736
|
+
"description": "Count shown in the corner badge. `0` hides the badge.",
|
|
737
|
+
"attribute": "badge"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"kind": "field",
|
|
741
|
+
"name": "interactive",
|
|
742
|
+
"type": {
|
|
743
|
+
"text": "boolean"
|
|
744
|
+
},
|
|
745
|
+
"default": "false",
|
|
746
|
+
"description": "Render as a `<button>` with focus ring and hover states.",
|
|
747
|
+
"attribute": "interactive",
|
|
748
|
+
"reflects": true
|
|
749
|
+
}
|
|
750
|
+
],
|
|
751
|
+
"attributes": [
|
|
752
|
+
{
|
|
753
|
+
"name": "src",
|
|
754
|
+
"type": {
|
|
755
|
+
"text": "string"
|
|
756
|
+
},
|
|
757
|
+
"default": "''",
|
|
758
|
+
"description": "Image URL. Falls back to initials (then the default icon) if it fails to load.",
|
|
759
|
+
"fieldName": "src"
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"name": "name",
|
|
763
|
+
"type": {
|
|
764
|
+
"text": "string"
|
|
765
|
+
},
|
|
766
|
+
"default": "''",
|
|
767
|
+
"description": "Name used as the accessible label and to derive the initials fallback.",
|
|
768
|
+
"fieldName": "name"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"name": "size",
|
|
772
|
+
"type": {
|
|
773
|
+
"text": "string"
|
|
774
|
+
},
|
|
775
|
+
"default": "'md'",
|
|
776
|
+
"description": "Avatar size: `xs`, `sm`, `md` (default), `lg`, or `xl`.",
|
|
777
|
+
"fieldName": "size"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"name": "badge",
|
|
781
|
+
"type": {
|
|
782
|
+
"text": "number"
|
|
783
|
+
},
|
|
784
|
+
"default": "0",
|
|
785
|
+
"description": "Count shown in the corner badge. `0` hides the badge.",
|
|
786
|
+
"fieldName": "badge"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"name": "interactive",
|
|
790
|
+
"type": {
|
|
791
|
+
"text": "boolean"
|
|
792
|
+
},
|
|
793
|
+
"default": "false",
|
|
794
|
+
"description": "Render as a `<button>` with focus ring and hover states.",
|
|
795
|
+
"fieldName": "interactive"
|
|
796
|
+
}
|
|
797
|
+
],
|
|
798
|
+
"superclass": {
|
|
799
|
+
"name": "LuxenElement",
|
|
800
|
+
"module": "/src/html/shared/luxen-element.js"
|
|
801
|
+
},
|
|
802
|
+
"tagName": "l-avatar",
|
|
803
|
+
"customElement": true,
|
|
804
|
+
"summary": "An avatar component for displaying user images, initials, or a default icon.",
|
|
805
|
+
"_cssClasses": [
|
|
806
|
+
{
|
|
807
|
+
"name": ".l-avatar-group",
|
|
808
|
+
"description": "Flex wrapper that overlaps a row of stacked avatars."
|
|
809
|
+
}
|
|
810
|
+
]
|
|
811
|
+
}
|
|
812
|
+
],
|
|
813
|
+
"exports": [
|
|
814
|
+
{
|
|
815
|
+
"kind": "js",
|
|
816
|
+
"name": "Avatar",
|
|
817
|
+
"declaration": {
|
|
818
|
+
"name": "Avatar",
|
|
819
|
+
"module": "src/html/elements/avatar/avatar.ts"
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
]
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
"kind": "javascript-module",
|
|
826
|
+
"path": "src/html/elements/avatar/index.ts",
|
|
827
|
+
"declarations": [],
|
|
828
|
+
"exports": [
|
|
829
|
+
{
|
|
830
|
+
"kind": "js",
|
|
831
|
+
"name": "*",
|
|
832
|
+
"declaration": {
|
|
833
|
+
"name": "*",
|
|
834
|
+
"module": "src/html/elements/avatar/avatar.js"
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
]
|
|
838
|
+
},
|
|
839
839
|
{
|
|
840
840
|
"kind": "javascript-module",
|
|
841
841
|
"path": "src/html/elements/badge/badge.ts",
|
|
@@ -2404,8 +2404,22 @@
|
|
|
2404
2404
|
"name": "Combobox",
|
|
2405
2405
|
"cssProperties": [
|
|
2406
2406
|
{
|
|
2407
|
-
"description": "Control height.
|
|
2408
|
-
"name": "--height"
|
|
2407
|
+
"description": "Control height. The clear button and the chevron each take a square of this height (borders excluded), so their hit area and spacing follow it.",
|
|
2408
|
+
"name": "--height",
|
|
2409
|
+
"default": "var(--l-form-control-height)"
|
|
2410
|
+
},
|
|
2411
|
+
{
|
|
2412
|
+
"description": "Glyph size of the clear button and the chevron (global form-control token; set it here or on any ancestor). Changes the glyph only — the hit area follows `--height`.",
|
|
2413
|
+
"name": "--l-form-control-icon-size",
|
|
2414
|
+
"default": "1em"
|
|
2415
|
+
},
|
|
2416
|
+
{
|
|
2417
|
+
"description": "Chevron glyph as a `url()`. Masked, so its color comes from the control, not the image.",
|
|
2418
|
+
"name": "--chevron-icon"
|
|
2419
|
+
},
|
|
2420
|
+
{
|
|
2421
|
+
"description": "Clear button glyph as a `url()`.",
|
|
2422
|
+
"name": "--clear-icon"
|
|
2409
2423
|
},
|
|
2410
2424
|
{
|
|
2411
2425
|
"description": "Control + panel radius.",
|
|
@@ -3636,27 +3650,27 @@
|
|
|
3636
3650
|
"name": "Dropdown",
|
|
3637
3651
|
"cssProperties": [
|
|
3638
3652
|
{
|
|
3639
|
-
"description": "Panel background color.",
|
|
3653
|
+
"description": "Panel background color. Default `var(--l-color-surface-overlay)`.",
|
|
3640
3654
|
"name": "--background"
|
|
3641
3655
|
},
|
|
3642
3656
|
{
|
|
3643
|
-
"description": "Panel border radius. Default `
|
|
3657
|
+
"description": "Panel border radius. Default `var(--l-popover-border-radius)` (6px).",
|
|
3644
3658
|
"name": "--border-radius"
|
|
3645
3659
|
},
|
|
3646
3660
|
{
|
|
3647
|
-
"description": "Panel inner padding. Default `0.25rem
|
|
3661
|
+
"description": "Panel inner padding. Default `var(--l-popover-padding)` (0.25rem). Slotted `<l-divider>` elements bleed by this amount on each side to span the panel edges.",
|
|
3648
3662
|
"name": "--padding"
|
|
3649
3663
|
},
|
|
3650
3664
|
{
|
|
3651
|
-
"description": "Panel box shadow.",
|
|
3665
|
+
"description": "Panel box shadow. Default `var(--l-popover-shadow)`.",
|
|
3652
3666
|
"name": "--shadow"
|
|
3653
3667
|
},
|
|
3654
3668
|
{
|
|
3655
|
-
"description": "Show animation duration
|
|
3669
|
+
"description": "Show animation duration. Default `150ms`.",
|
|
3656
3670
|
"name": "--show-duration"
|
|
3657
3671
|
},
|
|
3658
3672
|
{
|
|
3659
|
-
"description": "Hide animation duration
|
|
3673
|
+
"description": "Hide animation duration. Default `150ms`.",
|
|
3660
3674
|
"name": "--hide-duration"
|
|
3661
3675
|
}
|
|
3662
3676
|
],
|
|
@@ -4300,7 +4314,7 @@
|
|
|
4300
4314
|
},
|
|
4301
4315
|
"tagName": "l-form-field",
|
|
4302
4316
|
"customElement": true,
|
|
4303
|
-
"summary": "Progressively enhances a label + control + messages group: wires the\naccessibility plumbing (`id`/`for`, `aria-describedby`, `aria-invalid`,\nrequired
|
|
4317
|
+
"summary": "Progressively enhances a label + control + messages group: wires the\naccessibility plumbing (`id`/`for`, `aria-describedby`, `aria-invalid`,\nrequired indicator) and picks an inline or stacked layout from the control type.\n\nStyling stays on the control (`.l-checkbox`, …); inside a field a bare control\nis auto-styled by the element CSS. Add `unstyled` to keep the ARIA wiring while\nopting out of that auto-styling (e.g. for a third-party control).",
|
|
4304
4318
|
"examples": [
|
|
4305
4319
|
{
|
|
4306
4320
|
"language": "html",
|
|
@@ -4488,6 +4502,11 @@
|
|
|
4488
4502
|
{
|
|
4489
4503
|
"description": "Search clear glyph as a `url()`.",
|
|
4490
4504
|
"name": "--clear-icon"
|
|
4505
|
+
},
|
|
4506
|
+
{
|
|
4507
|
+
"description": "Glyph size of the date/time picker icon and the search clear (global form-control token). Their hit area is a square of the control height (borders excluded).",
|
|
4508
|
+
"name": "--l-form-control-icon-size",
|
|
4509
|
+
"default": "1em"
|
|
4491
4510
|
}
|
|
4492
4511
|
],
|
|
4493
4512
|
"attributes": [
|
|
@@ -4765,15 +4784,15 @@
|
|
|
4765
4784
|
"name": "--cell-gap"
|
|
4766
4785
|
},
|
|
4767
4786
|
{
|
|
4768
|
-
"description": "Cell background color.",
|
|
4787
|
+
"description": "Cell background color (default: a faint ink tint over `--l-form-control-background-color`).",
|
|
4769
4788
|
"name": "--cell-bg-color"
|
|
4770
4789
|
},
|
|
4771
4790
|
{
|
|
4772
|
-
"description": "Cell border color.",
|
|
4791
|
+
"description": "Cell border color (default: `var(--l-form-control-border-color)`).",
|
|
4773
4792
|
"name": "--cell-border-color"
|
|
4774
4793
|
},
|
|
4775
4794
|
{
|
|
4776
|
-
"description": "Cell border-radius.",
|
|
4795
|
+
"description": "Cell border-radius (default: `var(--l-form-control-border-radius)`, like the other text fields).",
|
|
4777
4796
|
"name": "--cell-border-radius"
|
|
4778
4797
|
},
|
|
4779
4798
|
{
|
|
@@ -5141,7 +5160,7 @@
|
|
|
5141
5160
|
"name": "Popover",
|
|
5142
5161
|
"cssProperties": [
|
|
5143
5162
|
{
|
|
5144
|
-
"description": "Background color. Default
|
|
5163
|
+
"description": "Background color. Default `var(--l-color-surface-overlay)`.",
|
|
5145
5164
|
"name": "--background"
|
|
5146
5165
|
},
|
|
5147
5166
|
{
|
|
@@ -5149,7 +5168,7 @@
|
|
|
5149
5168
|
"name": "--color"
|
|
5150
5169
|
},
|
|
5151
5170
|
{
|
|
5152
|
-
"description": "Border radius. Default `
|
|
5171
|
+
"description": "Border radius. Default `var(--l-popover-border-radius)` (6px).",
|
|
5153
5172
|
"name": "--border-radius"
|
|
5154
5173
|
},
|
|
5155
5174
|
{
|
|
@@ -5157,7 +5176,7 @@
|
|
|
5157
5176
|
"name": "--max-width"
|
|
5158
5177
|
},
|
|
5159
5178
|
{
|
|
5160
|
-
"description": "Box shadow.",
|
|
5179
|
+
"description": "Box shadow. Default `var(--l-popover-shadow)`.",
|
|
5161
5180
|
"name": "--shadow"
|
|
5162
5181
|
},
|
|
5163
5182
|
{
|
|
@@ -6657,8 +6676,22 @@
|
|
|
6657
6676
|
"name": "Select",
|
|
6658
6677
|
"cssProperties": [
|
|
6659
6678
|
{
|
|
6660
|
-
"description": "Control height.
|
|
6661
|
-
"name": "--height"
|
|
6679
|
+
"description": "Control height. The clear button and the chevron each take a square of this height (borders excluded), so their hit area and spacing follow it.",
|
|
6680
|
+
"name": "--height",
|
|
6681
|
+
"default": "var(--l-form-control-height)"
|
|
6682
|
+
},
|
|
6683
|
+
{
|
|
6684
|
+
"description": "Glyph size of the clear button and the chevron (global form-control token; set it here or on any ancestor). Changes the glyph only — the hit area follows `--height`.",
|
|
6685
|
+
"name": "--l-form-control-icon-size",
|
|
6686
|
+
"default": "1em"
|
|
6687
|
+
},
|
|
6688
|
+
{
|
|
6689
|
+
"description": "Chevron glyph as a `url()`. Masked, so its color comes from the control, not the image.",
|
|
6690
|
+
"name": "--chevron-icon"
|
|
6691
|
+
},
|
|
6692
|
+
{
|
|
6693
|
+
"description": "Clear button glyph as a `url()`.",
|
|
6694
|
+
"name": "--clear-icon"
|
|
6662
6695
|
},
|
|
6663
6696
|
{
|
|
6664
6697
|
"description": "Trigger + panel radius.",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"../../chunks/lit.js";import{LuxenElement as t}from"../../shared/luxen-element.js";import{a as n,s as r,t as i}from"../../chunks/lit-html.js";import{r as a,t as o}from"../../chunks/static-html.js";import{n as s,r as c,t as l}from"../../chunks/decorate.js";import u from"../../shared/styles/host.styles.js";var d=e(`:host{--size:40px;--_font-size:calc(var(--size) * .4);width:var(--size);height:var(--size);border-radius:calc(var(--size) * .15);isolation:isolate;vertical-align:middle;color:var(--l-color-text-secondary);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative}:host([size=xs]){--size:24px;--_font-size:.75rem}:host([size=sm]){--size:32px;--_font-size:.875rem}:host([size=lg]){--size:48px;--_font-size:1.25rem}:host([size=xl]){--size:56px;--_font-size:1.25rem}img{object-fit:cover;border-radius:inherit;width:100%;height:100%}.initials{margin:auto}.icon{color:currentColor;width:60%;height:60%}.badge{z-index:1;min-width:12px;height:12px;box-shadow:0 0 0 2px var(--l-color-surface);background-color:var(--l-color-surface);font-size:.625rem;font-weight:var(--l-font-weight-medium);font-variant-numeric:tabular-nums;color:var(--l-color-text-primary);border-radius:3px;justify-content:center;align-items:center;padding-inline:2px;line-height:1;display:flex;position:absolute;bottom:0;right:0;overflow:hidden}.base:after{content:"";border-radius:inherit;pointer-events:none;position:absolute;inset:0;box-shadow:inset 0 0 0 1px var(--lightningcss-light,oklch(0% 0 0/.07))var(--lightningcss-dark,oklch(100% 0 0/.1))}.base{border-radius:calc(var(--size) * .15);background-color:var(--color,var(--l-color-bg-fill-neutral-soft));--_on:calc(255 * ( 1 - sign(.2126 * (r / 255) * (r / 255) + .7152 * (g / 255) * (g / 255) + .0722 * (b / 255) * (b / 255) - .2) ) / 2);width:100%;height:100%;color:var(--text-color,rgb(from var(--color) var(--_on) var(--_on) var(--_on)));font-size:var(--_font-size);font-weight:var(--l-font-weight-medium);text-transform:uppercase;cursor:inherit;border:none;justify-content:center;align-items:center;padding:0;line-height:1;display:inline-flex}@supports (color:contrast-color(red)){.base{color:var(--text-color,contrast-color(var(--color)))}}button.base{cursor:pointer}button.base:focus-visible{outline:
|
|
1
|
+
import{i as e}from"../../chunks/lit.js";import{LuxenElement as t}from"../../shared/luxen-element.js";import{a as n,s as r,t as i}from"../../chunks/lit-html.js";import{r as a,t as o}from"../../chunks/static-html.js";import{n as s,r as c,t as l}from"../../chunks/decorate.js";import u from"../../shared/styles/host.styles.js";var d=e(`:host{--size:40px;--_font-size:calc(var(--size) * .4);width:var(--size);height:var(--size);border-radius:calc(var(--size) * .15);isolation:isolate;vertical-align:middle;color:var(--l-color-text-secondary);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative}:host([size=xs]){--size:24px;--_font-size:.75rem}:host([size=sm]){--size:32px;--_font-size:.875rem}:host([size=lg]){--size:48px;--_font-size:1.25rem}:host([size=xl]){--size:56px;--_font-size:1.25rem}img{object-fit:cover;border-radius:inherit;width:100%;height:100%}.initials{margin:auto}.icon{color:currentColor;width:60%;height:60%}.badge{z-index:1;min-width:12px;height:12px;box-shadow:0 0 0 2px var(--l-color-surface);background-color:var(--l-color-surface);font-size:.625rem;font-weight:var(--l-font-weight-medium);font-variant-numeric:tabular-nums;color:var(--l-color-text-primary);border-radius:3px;justify-content:center;align-items:center;padding-inline:2px;line-height:1;display:flex;position:absolute;bottom:0;right:0;overflow:hidden}.base:after{content:"";border-radius:inherit;pointer-events:none;position:absolute;inset:0;box-shadow:inset 0 0 0 1px var(--lightningcss-light,oklch(0% 0 0/.07))var(--lightningcss-dark,oklch(100% 0 0/.1))}.base{border-radius:calc(var(--size) * .15);background-color:var(--color,var(--l-color-bg-fill-neutral-soft));--_on:calc(255 * ( 1 - sign(.2126 * (r / 255) * (r / 255) + .7152 * (g / 255) * (g / 255) + .0722 * (b / 255) * (b / 255) - .2) ) / 2);width:100%;height:100%;color:var(--text-color,rgb(from var(--color) var(--_on) var(--_on) var(--_on)));font-size:var(--_font-size);font-weight:var(--l-font-weight-medium);text-transform:uppercase;cursor:inherit;border:none;justify-content:center;align-items:center;padding:0;line-height:1;display:inline-flex}@supports (color:contrast-color(red)){.base{color:var(--text-color,contrast-color(var(--color)))}}button.base{cursor:pointer}button.base:focus-visible{outline:var(--l-focus-ring-width) solid var(--l-focus-ring);outline-offset:2px}button.base:hover{box-shadow:inset 0 0 0 1.5px var(--l-color-border-interactive)}@container style(--appearance:circle){.base{border-radius:50%}}`);function f(e=``){let t=e.normalize(`NFC`).trim().split(/\s+/).filter(Boolean);if(t.length===0)return``;let n=e=>[...e][0];return(n(t[0])+(t.length>1?n(t[t.length-1]):``)).toUpperCase()}var p=r`<svg class="icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
|
|
2
2
|
<path d="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z" />
|
|
3
3
|
</svg>`,m=class extends t{constructor(...e){super(...e),this.src=``,this.name=``,this.size=`md`,this.badge=0,this.interactive=!1,this._hasError=!1,this._onError=()=>{this._hasError=!0}}static{this.styles=[u,d]}willUpdate(e){e.has(`src`)&&(this._hasError=!1)}connectedCallback(){super.connectedCallback(),!this.interactive&&!this.hasAttribute(`role`)&&this.setAttribute(`role`,`img`)}updated(){this.interactive?(this.getAttribute(`role`)===`img`&&this.removeAttribute(`role`),this.removeAttribute(`aria-label`)):(this.hasAttribute(`role`)||this.setAttribute(`role`,`img`),this.name&&this.setAttribute(`aria-label`,this.name));let e=getComputedStyle(this).getPropertyValue(`--appearance`).trim()===`circle`;this.style.borderRadius=e?`50%`:``}get _tag(){return this.interactive?o`button`:o`div`}render(){let e=this.src&&!this._hasError?n`<img
|
|
4
4
|
src=${this.src}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","names":["unsafeCSS","rawStyles","hostStyles","nothing","_decorate","property","state","r","b","w","A","u","i","r$1","n","__decorate","host_styles_default","styles","getInitials","words","name","firstLetter","word","defaultIcon","Avatar","LuxenElement","_args","changed","isCircle","content"],"sources":["../../../src/html/elements/avatar/avatar.css?inline","../../../src/html/elements/avatar/avatar.ts"],"sourcesContent":[":host {\n --size: 40px;\n --_font-size: calc(var(--size) * 0.4);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--size);\n height: var(--size);\n border-radius: calc(var(--size) * 0.15);\n isolation: isolate;\n vertical-align: middle;\n flex-shrink: 0;\n color: var(--l-color-text-secondary);\n}\n\n:host([size='xs']) {\n --size: 24px;\n --_font-size: 0.75rem;\n}\n:host([size='sm']) {\n --size: 32px;\n --_font-size: 0.875rem;\n}\n:host([size='lg']) {\n --size: 48px;\n --_font-size: 1.25rem;\n}\n:host([size='xl']) {\n --size: 56px;\n --_font-size: 1.25rem;\n}\n\nimg {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: inherit;\n}\n\n.initials {\n margin: auto;\n}\n\n.icon {\n width: 60%;\n height: 60%;\n color: currentColor;\n}\n\n.badge {\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: 1;\n height: 12px;\n min-width: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-inline: 2px;\n border-radius: 3px;\n box-shadow: 0 0 0 2px var(--l-color-surface);\n background-color: var(--l-color-surface);\n font-size: 0.625rem;\n font-weight: var(--l-font-weight-medium);\n font-variant-numeric: tabular-nums;\n line-height: 1;\n color: var(--l-color-text-primary);\n overflow: hidden;\n}\n\n/*\n * Inset ring via ::after so it renders on top of the <img>.\n * A box-shadow on :host would be covered by the image since\n * it fills the entire element with object-fit: cover.\n */\n.base::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px light-dark(oklch(0 0 0 / 7%), oklch(100% 0 0 / 10%));\n pointer-events: none;\n}\n\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n border: none;\n border-radius: calc(var(--size) * 0.15);\n background-color: var(--color, var(--l-color-bg-fill-neutral-soft));\n /*\n * Text over --color, decided by the background's own luminance — never the\n * document mode, since --color is consumer-set and ignores light/dark.\n * The contrast-color() block below is the primary path (Baseline 2026); this\n * --_on calc() is the fallback for browsers predating it (Chrome ≤146,\n * Safari <26, Firefox <146). It approximates WCAG relative luminance with\n * squared sRGB channels (a cheap linearization, Rec. 709 weights) and flips at\n * 0.2, just above the black/white crossover (~0.179) to offset squaring\n * underestimating mid-tones — holding AA across saturated brand colors where an\n * OKLCH-lightness threshold collapses to ≈1:1 (OKLCH L tracks hue, not\n * luminance: a mid red reads \"light\" yet needs white text). --text-color lets\n * consumers force a specific brand text color, overriding both paths.\n */\n --_on: calc(\n 255 *\n (\n 1 -\n sign(\n 0.2126 * (r / 255) * (r / 255) + 0.7152 * (g / 255) * (g / 255) + 0.0722 * (b / 255) *\n (b / 255) - 0.2\n )\n ) /\n 2\n );\n color: var(--text-color, rgb(from var(--color) var(--_on) var(--_on) var(--_on)));\n font-size: var(--_font-size);\n font-weight: var(--l-font-weight-medium);\n line-height: 1;\n text-transform: uppercase;\n padding: 0;\n cursor: inherit;\n}\n\n/* Primary path: native, guaranteed-contrast black/white. contrast-color() is\n * Baseline Newly Available (2026) — Safari 26+, Firefox 146+, Chrome/Edge 147+ —\n * and supersedes the luminance approximation above where supported. @supports (not\n * declaration order) is required: the value contains var(), so a non-supporting\n * browser would treat contrast-color() as invalid-at-computed-value-time and reset\n * to `inherit` rather than falling back to the calc() line. No bg fallback inside,\n * so a bare avatar (no --color) keeps inheriting --l-color-text-secondary.\n * --text-color still wins here, overriding contrast-color()'s choice.\n * (The earlier `… vs black, white to AA` extended syntax was dropped from the spec.) */\n@supports (color: contrast-color(red)) {\n .base {\n color: var(--text-color, contrast-color(var(--color)));\n }\n}\n\nbutton.base {\n cursor: pointer;\n}\n\nbutton.base:focus-visible {\n outline: 2px solid var(--l-focus-ring);\n outline-offset: 2px;\n}\n\nbutton.base:hover {\n box-shadow: inset 0 0 0 1.5px var(--l-color-border-interactive);\n}\n\n@container style(--appearance: circle) {\n .base {\n border-radius: 50%;\n }\n}\n","import { html, nothing, svg, unsafeCSS } from 'lit';\nimport { LuxenElement } from '../../shared/luxen-element.js';\nimport { html as staticHtml, literal } from 'lit/static-html.js';\nimport { property, state } from 'lit/decorators.js';\nimport hostStyles from '../../shared/styles/host.styles.js';\nimport rawStyles from './avatar.css?inline';\n\nconst styles = unsafeCSS(rawStyles);\n\n/**\n * Extracts up to two uppercase initials from a name: the first letter of the\n * first word, plus the first letter of the last word when there is more than one.\n *\n * Splits on whitespace rather than relying on a `\\b`/`\\w` regex, which only\n * recognises ASCII and mangles accented or non-ASCII names.\n *\n * @param name - The name to extract initials from. Defaults to an empty string.\n * @return The uppercased initials, or an empty string when `name` is blank.\n *\n * @example getInitials('John Doe') // 'JD'\n * @example getInitials('Markus Nösterer') // 'MN' (accents preserved)\n * @example getInitials('Cher') // 'C' (single word → one initial)\n * @example getInitials(' John Doe ') // 'JD' (extra whitespace ignored)\n * @example getInitials('') // ''\n */\nfunction getInitials(name: string = ''): string {\n const words = name.normalize('NFC').trim().split(/\\s+/).filter(Boolean);\n if (words.length === 0) return '';\n\n // Spreading iterates by code point, so an accented letter (or an astral\n // character like an emoji) is taken whole instead of a broken half.\n // oxlint-disable-next-line typescript/no-misused-spread -- code-point-safe first char is the intent\n const firstLetter = (word: string) => [...word][0];\n\n const first = firstLetter(words[0]);\n const last = words.length > 1 ? firstLetter(words[words.length - 1]) : '';\n return (first + last).toUpperCase();\n}\n\nconst defaultIcon = svg`<svg class=\"icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z\" />\n</svg>`;\n\n/**\n * @summary An avatar component for displaying user images, initials, or a default icon.\n * @customElement l-avatar\n *\n * @cssproperty [--size=40px] - Box size (any length). Set it inline (e.g. `style=\"--size: 20px\"`) for an arbitrary size beyond the `size` token scale; the font then follows proportionally. The `size` attribute sets it to the matching token.\n * @cssproperty --color - Background fill color for initials and the default icon.\n * @cssproperty --text-color - Initials/icon color over `--color`. Defaults to an auto-derived readable color; set it to enforce a specific brand color (overrides the automatic choice).\n * @cssproperty --appearance - Set to `circle` for a fully circular avatar (default is a rounded square).\n *\n * @csspart base - The avatar container that paints `--color`; style it (e.g. `color`) to override the auto-derived text color.\n *\n * @cssClass .l-avatar-group - Flex wrapper that overlaps a row of stacked avatars.\n */\nexport class Avatar extends LuxenElement {\n static styles = [hostStyles, styles];\n\n /** Image URL. Falls back to initials (then the default icon) if it fails to load. */\n @property()\n src = '';\n\n /** Name used as the accessible label and to derive the initials fallback. */\n @property()\n name = '';\n\n /** Avatar size: `xs`, `sm`, `md` (default), `lg`, or `xl`. */\n @property({ reflect: true })\n size = 'md';\n\n /** Count shown in the corner badge. `0` hides the badge. */\n @property({ type: Number })\n badge = 0;\n\n /** Render as a `<button>` with focus ring and hover states. */\n @property({ type: Boolean, reflect: true })\n interactive = false;\n\n @state() private _hasError = false;\n\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('src')) {\n this._hasError = false;\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.interactive && !this.hasAttribute('role')) {\n this.setAttribute('role', 'img');\n }\n }\n\n updated() {\n // An interactive avatar renders a focusable <button>, and a role=\"img\" node\n // must stay a leaf in the accessibility tree — so the host carries no role\n // or label and the inner button holds the accessible name (see render()).\n if (this.interactive) {\n if (this.getAttribute('role') === 'img') this.removeAttribute('role');\n this.removeAttribute('aria-label');\n } else {\n if (!this.hasAttribute('role')) this.setAttribute('role', 'img');\n if (this.name) this.setAttribute('aria-label', this.name);\n }\n\n const isCircle = getComputedStyle(this).getPropertyValue('--appearance').trim() === 'circle';\n this.style.borderRadius = isCircle ? '50%' : '';\n }\n\n private get _tag() {\n return this.interactive ? literal`button` : literal`div`;\n }\n\n render() {\n const content =\n this.src && !this._hasError\n ? html`<img\n src=${this.src}\n alt=${this.name || ''}\n @error=${this._onError}\n />`\n : this.name\n ? html`<span class=\"initials\">${getInitials(this.name)}</span>`\n : html`<slot>${defaultIcon}</slot>`;\n\n return staticHtml`\n <${this._tag}\n class=\"base\"\n part=\"base\"\n type=${this.interactive ? 'button' : nothing}\n aria-label=${this.interactive && this.name ? this.name : nothing}\n >\n ${content}\n </${this._tag}>\n ${\n this.badge\n ? html`<div\n class=\"badge\"\n aria-hidden=\"true\"\n >\n ${this.badge}\n </div>`\n : nothing\n }\n `;\n }\n\n private _onError = () => {\n this._hasError = true;\n };\n}\n"],"mappings":"A,oUCOA,IAAMiB,EAASjB,EAAUC,4mEAAS,EAkBlC,SAASiB,EAAY,EAAe,GAAY,CAC9C,IAAMC,EAAQC,EAAK,UAAU,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,OAAO,EACtE,GAAID,EAAM,SAAW,EAAG,MAAO,GAK/B,IAAME,EAAe,GAAiB,CAAC,GAAGC,CAAI,CAAC,CAAC,GAIhD,OAFcD,EAAYF,EAAM,EAExB,GADKA,EAAM,OAAS,EAAIE,EAAYF,EAAMA,EAAM,OAAS,EAAE,EAAI,IAAA,CACjD,YAAY,CACpC,CAEA,IAAMI,EAAc,CAAG;;QAiBVC,EAAb,cAA4BC,CAAa,C,8BAKjC,KAAA,IAAA,GAIC,KAAA,KAAA,GAIA,KAAA,KAAA,KAIC,KAAA,MAAA,EAIM,KAAA,YAAA,GAEe,KAAA,UAAA,GAqEJ,KAAA,aAAA,CACvB,KAAK,UAAY,EACnB,C,QA7FgB,KAAA,OAAA,CAACvB,EAAYe,CAAM,C,CAwBnC,WAAW,EAA+B,CACpCU,EAAQ,IAAI,KAAK,IACnB,KAAK,UAAY,GAErB,CAEA,mBAAoB,CAClB,MAAM,kBAAkB,EACpB,CAAC,KAAK,aAAe,CAAC,KAAK,aAAa,MAAM,GAChD,KAAK,aAAa,OAAQ,KAA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,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAmB,EAAA,UAAA,cAAA,IAAA,EAAA,EAGzCpB,EAAA,CAAAE,EAAM,CAAA,EAAAkB,EAAA,UAAA,YAAA,IAAA,EAAA,E"}
|
|
1
|
+
{"version":3,"file":"avatar.js","names":["unsafeCSS","rawStyles","hostStyles","nothing","_decorate","property","state","r","b","w","A","u","i","r$1","n","__decorate","host_styles_default","styles","getInitials","words","name","firstLetter","word","defaultIcon","Avatar","LuxenElement","_args","changed","isCircle","content"],"sources":["../../../src/html/elements/avatar/avatar.css?inline","../../../src/html/elements/avatar/avatar.ts"],"sourcesContent":[":host {\n --size: 40px;\n --_font-size: calc(var(--size) * 0.4);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--size);\n height: var(--size);\n border-radius: calc(var(--size) * 0.15);\n isolation: isolate;\n vertical-align: middle;\n flex-shrink: 0;\n color: var(--l-color-text-secondary);\n}\n\n:host([size='xs']) {\n --size: 24px;\n --_font-size: 0.75rem;\n}\n:host([size='sm']) {\n --size: 32px;\n --_font-size: 0.875rem;\n}\n:host([size='lg']) {\n --size: 48px;\n --_font-size: 1.25rem;\n}\n:host([size='xl']) {\n --size: 56px;\n --_font-size: 1.25rem;\n}\n\nimg {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: inherit;\n}\n\n.initials {\n margin: auto;\n}\n\n.icon {\n width: 60%;\n height: 60%;\n color: currentColor;\n}\n\n.badge {\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: 1;\n height: 12px;\n min-width: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-inline: 2px;\n border-radius: 3px;\n box-shadow: 0 0 0 2px var(--l-color-surface);\n background-color: var(--l-color-surface);\n font-size: 0.625rem;\n font-weight: var(--l-font-weight-medium);\n font-variant-numeric: tabular-nums;\n line-height: 1;\n color: var(--l-color-text-primary);\n overflow: hidden;\n}\n\n/*\n * Inset ring via ::after so it renders on top of the <img>.\n * A box-shadow on :host would be covered by the image since\n * it fills the entire element with object-fit: cover.\n */\n.base::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px light-dark(oklch(0 0 0 / 7%), oklch(100% 0 0 / 10%));\n pointer-events: none;\n}\n\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n border: none;\n border-radius: calc(var(--size) * 0.15);\n background-color: var(--color, var(--l-color-bg-fill-neutral-soft));\n /*\n * Text over --color, decided by the background's own luminance — never the\n * document mode, since --color is consumer-set and ignores light/dark.\n * The contrast-color() block below is the primary path (Baseline 2026); this\n * --_on calc() is the fallback for browsers predating it (Chrome ≤146,\n * Safari <26, Firefox <146). It approximates WCAG relative luminance with\n * squared sRGB channels (a cheap linearization, Rec. 709 weights) and flips at\n * 0.2, just above the black/white crossover (~0.179) to offset squaring\n * underestimating mid-tones — holding AA across saturated brand colors where an\n * OKLCH-lightness threshold collapses to ≈1:1 (OKLCH L tracks hue, not\n * luminance: a mid red reads \"light\" yet needs white text). --text-color lets\n * consumers force a specific brand text color, overriding both paths.\n */\n --_on: calc(\n 255 *\n (\n 1 -\n sign(\n 0.2126 * (r / 255) * (r / 255) + 0.7152 * (g / 255) * (g / 255) + 0.0722 * (b / 255) *\n (b / 255) - 0.2\n )\n ) /\n 2\n );\n color: var(--text-color, rgb(from var(--color) var(--_on) var(--_on) var(--_on)));\n font-size: var(--_font-size);\n font-weight: var(--l-font-weight-medium);\n line-height: 1;\n text-transform: uppercase;\n padding: 0;\n cursor: inherit;\n}\n\n/* Primary path: native, guaranteed-contrast black/white. contrast-color() is\n * Baseline Newly Available (2026) — Safari 26+, Firefox 146+, Chrome/Edge 147+ —\n * and supersedes the luminance approximation above where supported. @supports (not\n * declaration order) is required: the value contains var(), so a non-supporting\n * browser would treat contrast-color() as invalid-at-computed-value-time and reset\n * to `inherit` rather than falling back to the calc() line. No bg fallback inside,\n * so a bare avatar (no --color) keeps inheriting --l-color-text-secondary.\n * --text-color still wins here, overriding contrast-color()'s choice.\n * (The earlier `… vs black, white to AA` extended syntax was dropped from the spec.) */\n@supports (color: contrast-color(red)) {\n .base {\n color: var(--text-color, contrast-color(var(--color)));\n }\n}\n\nbutton.base {\n cursor: pointer;\n}\n\nbutton.base:focus-visible {\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring);\n outline-offset: 2px;\n}\n\nbutton.base:hover {\n box-shadow: inset 0 0 0 1.5px var(--l-color-border-interactive);\n}\n\n@container style(--appearance: circle) {\n .base {\n border-radius: 50%;\n }\n}\n","import { html, nothing, svg, unsafeCSS } from 'lit';\nimport { LuxenElement } from '../../shared/luxen-element.js';\nimport { html as staticHtml, literal } from 'lit/static-html.js';\nimport { property, state } from 'lit/decorators.js';\nimport hostStyles from '../../shared/styles/host.styles.js';\nimport rawStyles from './avatar.css?inline';\n\nconst styles = unsafeCSS(rawStyles);\n\n/**\n * Extracts up to two uppercase initials from a name: the first letter of the\n * first word, plus the first letter of the last word when there is more than one.\n *\n * Splits on whitespace rather than relying on a `\\b`/`\\w` regex, which only\n * recognises ASCII and mangles accented or non-ASCII names.\n *\n * @param name - The name to extract initials from. Defaults to an empty string.\n * @return The uppercased initials, or an empty string when `name` is blank.\n *\n * @example getInitials('John Doe') // 'JD'\n * @example getInitials('Markus Nösterer') // 'MN' (accents preserved)\n * @example getInitials('Cher') // 'C' (single word → one initial)\n * @example getInitials(' John Doe ') // 'JD' (extra whitespace ignored)\n * @example getInitials('') // ''\n */\nfunction getInitials(name: string = ''): string {\n const words = name.normalize('NFC').trim().split(/\\s+/).filter(Boolean);\n if (words.length === 0) return '';\n\n // Spreading iterates by code point, so an accented letter (or an astral\n // character like an emoji) is taken whole instead of a broken half.\n // oxlint-disable-next-line typescript/no-misused-spread -- code-point-safe first char is the intent\n const firstLetter = (word: string) => [...word][0];\n\n const first = firstLetter(words[0]);\n const last = words.length > 1 ? firstLetter(words[words.length - 1]) : '';\n return (first + last).toUpperCase();\n}\n\nconst defaultIcon = svg`<svg class=\"icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z\" />\n</svg>`;\n\n/**\n * @summary An avatar component for displaying user images, initials, or a default icon.\n * @customElement l-avatar\n *\n * @cssproperty [--size=40px] - Box size (any length). Set it inline (e.g. `style=\"--size: 20px\"`) for an arbitrary size beyond the `size` token scale; the font then follows proportionally. The `size` attribute sets it to the matching token.\n * @cssproperty --color - Background fill color for initials and the default icon.\n * @cssproperty --text-color - Initials/icon color over `--color`. Defaults to an auto-derived readable color; set it to enforce a specific brand color (overrides the automatic choice).\n * @cssproperty --appearance - Set to `circle` for a fully circular avatar (default is a rounded square).\n *\n * @csspart base - The avatar container that paints `--color`; style it (e.g. `color`) to override the auto-derived text color.\n *\n * @cssClass .l-avatar-group - Flex wrapper that overlaps a row of stacked avatars.\n */\nexport class Avatar extends LuxenElement {\n static styles = [hostStyles, styles];\n\n /** Image URL. Falls back to initials (then the default icon) if it fails to load. */\n @property()\n src = '';\n\n /** Name used as the accessible label and to derive the initials fallback. */\n @property()\n name = '';\n\n /** Avatar size: `xs`, `sm`, `md` (default), `lg`, or `xl`. */\n @property({ reflect: true })\n size = 'md';\n\n /** Count shown in the corner badge. `0` hides the badge. */\n @property({ type: Number })\n badge = 0;\n\n /** Render as a `<button>` with focus ring and hover states. */\n @property({ type: Boolean, reflect: true })\n interactive = false;\n\n @state() private _hasError = false;\n\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('src')) {\n this._hasError = false;\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.interactive && !this.hasAttribute('role')) {\n this.setAttribute('role', 'img');\n }\n }\n\n updated() {\n // An interactive avatar renders a focusable <button>, and a role=\"img\" node\n // must stay a leaf in the accessibility tree — so the host carries no role\n // or label and the inner button holds the accessible name (see render()).\n if (this.interactive) {\n if (this.getAttribute('role') === 'img') this.removeAttribute('role');\n this.removeAttribute('aria-label');\n } else {\n if (!this.hasAttribute('role')) this.setAttribute('role', 'img');\n if (this.name) this.setAttribute('aria-label', this.name);\n }\n\n const isCircle = getComputedStyle(this).getPropertyValue('--appearance').trim() === 'circle';\n this.style.borderRadius = isCircle ? '50%' : '';\n }\n\n private get _tag() {\n return this.interactive ? literal`button` : literal`div`;\n }\n\n render() {\n const content =\n this.src && !this._hasError\n ? html`<img\n src=${this.src}\n alt=${this.name || ''}\n @error=${this._onError}\n />`\n : this.name\n ? html`<span class=\"initials\">${getInitials(this.name)}</span>`\n : html`<slot>${defaultIcon}</slot>`;\n\n return staticHtml`\n <${this._tag}\n class=\"base\"\n part=\"base\"\n type=${this.interactive ? 'button' : nothing}\n aria-label=${this.interactive && this.name ? this.name : nothing}\n >\n ${content}\n </${this._tag}>\n ${\n this.badge\n ? html`<div\n class=\"badge\"\n aria-hidden=\"true\"\n >\n ${this.badge}\n </div>`\n : nothing\n }\n `;\n }\n\n private _onError = () => {\n this._hasError = true;\n };\n}\n"],"mappings":"A,oUCOA,IAAMiB,EAASjB,EAAUC,koEAAS,EAkBlC,SAASiB,EAAY,EAAe,GAAY,CAC9C,IAAMC,EAAQC,EAAK,UAAU,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,OAAO,EACtE,GAAID,EAAM,SAAW,EAAG,MAAO,GAK/B,IAAME,EAAe,GAAiB,CAAC,GAAGC,CAAI,CAAC,CAAC,GAIhD,OAFcD,EAAYF,EAAM,EAExB,GADKA,EAAM,OAAS,EAAIE,EAAYF,EAAMA,EAAM,OAAS,EAAE,EAAI,IAAA,CACjD,YAAY,CACpC,CAEA,IAAMI,EAAc,CAAG;;QAiBVC,EAAb,cAA4BC,CAAa,C,8BAKjC,KAAA,IAAA,GAIC,KAAA,KAAA,GAIA,KAAA,KAAA,K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EAAA,UAAA,MAAA,IAAA,EAAA,EAITpB,EAAA,CAAAC,EAAS,CAAA,EAAAmB,EAAA,UAAA,OAAA,IAAA,EAAA,EAITpB,EAAA,CAAAC,EAAS,CAAE,QAAS,EAAK,CAAC,CAAA,EAAAmB,EAAA,UAAA,OAAA,IAAA,EAAA,EAI1BpB,EAAA,CAAAC,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAmB,EAAA,UAAA,QAAA,IAAA,EAAA,EAIzBpB,EAAA,CAAAC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAmB,EAAA,UAAA,cAAA,IAAA,EAAA,EAGzCpB,EAAA,CAAAE,EAAM,CAAA,EAAAkB,EAAA,UAAA,YAAA,IAAA,EAAA,E"}
|
|
@@ -58,7 +58,12 @@ interface ComboboxEventMap {
|
|
|
58
58
|
* @csspart option - Each option row.
|
|
59
59
|
* @csspart empty - The "no results" message.
|
|
60
60
|
*
|
|
61
|
-
* @cssproperty [--height] - Control height.
|
|
61
|
+
* @cssproperty [--height=var(--l-form-control-height)] - Control height. The clear button and the chevron
|
|
62
|
+
* each take a square of this height (borders excluded), so their hit area and spacing follow it.
|
|
63
|
+
* @cssproperty [--l-form-control-icon-size=1em] - Glyph size of the clear button and the chevron (global form-control
|
|
64
|
+
* token; set it here or on any ancestor). Changes the glyph only — the hit area follows `--height`.
|
|
65
|
+
* @cssproperty --chevron-icon - Chevron glyph as a `url()`. Masked, so its color comes from the control, not the image.
|
|
66
|
+
* @cssproperty --clear-icon - Clear button glyph as a `url()`.
|
|
62
67
|
* @cssproperty [--border-radius] - Control + panel radius.
|
|
63
68
|
* @cssproperty [--background] - Panel background.
|
|
64
69
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../src/html/elements/combobox/combobox.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1C,O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