@threadlabs/looma 0.12.5 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui-avatar/ui-avatar.html +18 -0
- package/components/ui-checkbox/ui-checkbox.html +1 -1
- package/components/ui-combobox/ui-combobox.html +2 -2
- package/components/ui-disclosure/ui-disclosure.html +1 -1
- package/components/ui-editable/ui-editable.html +1 -1
- package/components/ui-input/ui-input.html +1 -1
- package/components/ui-radio/ui-radio.html +1 -1
- package/components/ui-select/ui-select.html +1 -1
- package/components/ui-switch/ui-switch.html +1 -1
- package/components/ui-textarea/ui-textarea.html +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-avatar.css +17 -1
- package/styles/ui-checkbox.css +1 -1
- package/styles/ui-combobox.css +2 -2
- package/styles/ui-disclosure.css +1 -1
- package/styles/ui-editable.css +1 -1
- package/styles/ui-input.css +1 -1
- package/styles/ui-radio.css +1 -1
- package/styles/ui-select.css +1 -1
- package/styles/ui-switch.css +1 -1
- package/styles/ui-textarea.css +1 -1
- package/theme-dark.css +1 -1
- package/theme-light.css +1 -1
- package/tokens.css +8 -6
- package/vanilla/UiAvatar.d.ts +2 -0
- package/vanilla/UiAvatar.js +1 -1
- package/vue/UiAvatar.d.ts +4 -0
- package/vue/UiAvatar.vue +32 -2
- package/vue/UiButton.d.ts +1 -1
- package/vue/UiCheckbox.vue +1 -1
- package/vue/UiCombobox.d.ts +1 -1
- package/vue/UiCombobox.vue +2 -2
- package/vue/UiDisclosure.vue +1 -1
- package/vue/UiEditable.vue +1 -1
- package/vue/UiIconButton.d.ts +1 -1
- package/vue/UiInput.vue +1 -1
- package/vue/UiRadio.vue +1 -1
- package/vue/UiSelect.vue +1 -1
- package/vue/UiSwitch.vue +1 -1
- package/vue/UiText.d.ts +1 -1
- package/vue/UiTextarea.vue +1 -1
- package/vue/chunks/UiAvatar.js +16 -7
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiCombobox.js +1 -1
- package/vue/chunks/UiDisclosure.js +1 -1
- package/vue/chunks/UiEditable.js +1 -1
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiRadio.js +1 -1
- package/vue/chunks/UiSelect.js +1 -1
- package/vue/chunks/UiSwitch.js +1 -1
- package/vue/chunks/UiTextarea.js +1 -1
- package/vue/components.css +177 -165
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
<prop name="fallback" type="string" default=""
|
|
13
13
|
>Text shown instead of the initials derived from name or alt, whenever there is no image. It is uppercased; keep it to a couple of characters, because the
|
|
14
14
|
circle clips anything wider.</prop>
|
|
15
|
+
<prop name="size" type="sm | md" default="md"
|
|
16
|
+
>md is 2.5rem, for a person on their own (a profile, a comment); sm is 1.75rem with smaller initials, for a row of people in a toolbar or header.</prop>
|
|
17
|
+
<prop name="active" type="boolean" default="false"
|
|
18
|
+
>Marks the person as active now, such as editing the same page: a ring in the success colour around the avatar. The ring is not announced, so say what it
|
|
19
|
+
means in alt ("Ada Lovelace, editing").</prop>
|
|
15
20
|
<state name="hasImage" :value="false"></state>
|
|
16
21
|
<state name="hasAuthoredImage" :value="false"></state>
|
|
17
22
|
<state name="initials" :value="'?'"></state>
|
|
@@ -38,6 +43,19 @@
|
|
|
38
43
|
text-transform: uppercase;
|
|
39
44
|
}
|
|
40
45
|
|
|
46
|
+
:host-state([size="sm"]) {
|
|
47
|
+
inline-size: 1.75rem;
|
|
48
|
+
block-size: 1.75rem;
|
|
49
|
+
font-size: var(--ui-font-size-xs);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* An outline, not a dot: the avatar clips its content to the circle, and an outline is drawn
|
|
53
|
+
outside the box, so the ring survives the clip and the overlap in an Avatar Group. */
|
|
54
|
+
:host-state([active]) {
|
|
55
|
+
outline: 2px solid var(--ui-avatar-active-ring, var(--ui-success));
|
|
56
|
+
outline-offset: 1px;
|
|
57
|
+
}
|
|
58
|
+
|
|
41
59
|
.image,
|
|
42
60
|
:slotted(img) {
|
|
43
61
|
grid-area: 1 / 1;
|
|
@@ -368,7 +368,7 @@
|
|
|
368
368
|
box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ui-focus-ring) 45%, transparent);
|
|
369
369
|
}
|
|
370
370
|
input:disabled, button:disabled {
|
|
371
|
-
color: var(--ui-text
|
|
371
|
+
color: var(--ui-disabled-text);
|
|
372
372
|
cursor: not-allowed;
|
|
373
373
|
}
|
|
374
374
|
.field:has(input:disabled) {
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
outline-offset: -1px;
|
|
407
407
|
}
|
|
408
408
|
.option[aria-disabled="true"] {
|
|
409
|
-
color: var(--ui-text
|
|
409
|
+
color: var(--ui-disabled-text);
|
|
410
410
|
cursor: not-allowed;
|
|
411
411
|
}
|
|
412
412
|
.primary {
|