@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.
Files changed (53) hide show
  1. package/components/ui-avatar/ui-avatar.html +18 -0
  2. package/components/ui-checkbox/ui-checkbox.html +1 -1
  3. package/components/ui-combobox/ui-combobox.html +2 -2
  4. package/components/ui-disclosure/ui-disclosure.html +1 -1
  5. package/components/ui-editable/ui-editable.html +1 -1
  6. package/components/ui-input/ui-input.html +1 -1
  7. package/components/ui-radio/ui-radio.html +1 -1
  8. package/components/ui-select/ui-select.html +1 -1
  9. package/components/ui-switch/ui-switch.html +1 -1
  10. package/components/ui-textarea/ui-textarea.html +1 -1
  11. package/dist/index.js +1 -1
  12. package/package.json +1 -1
  13. package/styles/ui-avatar.css +17 -1
  14. package/styles/ui-checkbox.css +1 -1
  15. package/styles/ui-combobox.css +2 -2
  16. package/styles/ui-disclosure.css +1 -1
  17. package/styles/ui-editable.css +1 -1
  18. package/styles/ui-input.css +1 -1
  19. package/styles/ui-radio.css +1 -1
  20. package/styles/ui-select.css +1 -1
  21. package/styles/ui-switch.css +1 -1
  22. package/styles/ui-textarea.css +1 -1
  23. package/theme-dark.css +1 -1
  24. package/theme-light.css +1 -1
  25. package/tokens.css +8 -6
  26. package/vanilla/UiAvatar.d.ts +2 -0
  27. package/vanilla/UiAvatar.js +1 -1
  28. package/vue/UiAvatar.d.ts +4 -0
  29. package/vue/UiAvatar.vue +32 -2
  30. package/vue/UiButton.d.ts +1 -1
  31. package/vue/UiCheckbox.vue +1 -1
  32. package/vue/UiCombobox.d.ts +1 -1
  33. package/vue/UiCombobox.vue +2 -2
  34. package/vue/UiDisclosure.vue +1 -1
  35. package/vue/UiEditable.vue +1 -1
  36. package/vue/UiIconButton.d.ts +1 -1
  37. package/vue/UiInput.vue +1 -1
  38. package/vue/UiRadio.vue +1 -1
  39. package/vue/UiSelect.vue +1 -1
  40. package/vue/UiSwitch.vue +1 -1
  41. package/vue/UiText.d.ts +1 -1
  42. package/vue/UiTextarea.vue +1 -1
  43. package/vue/chunks/UiAvatar.js +16 -7
  44. package/vue/chunks/UiCheckbox.js +1 -1
  45. package/vue/chunks/UiCombobox.js +1 -1
  46. package/vue/chunks/UiDisclosure.js +1 -1
  47. package/vue/chunks/UiEditable.js +1 -1
  48. package/vue/chunks/UiInput.js +1 -1
  49. package/vue/chunks/UiRadio.js +1 -1
  50. package/vue/chunks/UiSelect.js +1 -1
  51. package/vue/chunks/UiSwitch.js +1 -1
  52. package/vue/chunks/UiTextarea.js +1 -1
  53. 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;
@@ -132,7 +132,7 @@
132
132
  }
133
133
 
134
134
  :host-state([disabled]) {
135
- color: var(--ui-text-muted);
135
+ color: var(--ui-disabled-text);
136
136
  cursor: not-allowed;
137
137
  }
138
138
  :host-state([disabled]) input {
@@ -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-muted);
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-muted);
409
+ color: var(--ui-disabled-text);
410
410
  cursor: not-allowed;
411
411
  }
412
412
  .primary {
@@ -77,7 +77,7 @@
77
77
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ui-focus-ring) 45%, transparent);
78
78
  }
79
79
  .trigger:disabled {
80
- color: var(--ui-text-muted);
80
+ color: var(--ui-disabled-text);
81
81
  cursor: not-allowed;
82
82
  }
83
83
 
@@ -153,7 +153,7 @@
153
153
  }
154
154
 
155
155
  :host-state([disabled]) .preview {
156
- color: var(--ui-text-muted);
156
+ color: var(--ui-disabled-text);
157
157
  cursor: not-allowed;
158
158
  }
159
159
 
@@ -69,7 +69,7 @@
69
69
 
70
70
  :host:disabled {
71
71
  background: var(--ui-control-surface-disabled, var(--ui-surface-muted));
72
- color: var(--ui-text-muted);
72
+ color: var(--ui-disabled-text);
73
73
  box-shadow: none;
74
74
  cursor: not-allowed;
75
75
  }
@@ -70,7 +70,7 @@
70
70
  }
71
71
 
72
72
  :host-state([disabled]) {
73
- color: var(--ui-text-muted);
73
+ color: var(--ui-disabled-text);
74
74
  cursor: not-allowed;
75
75
  }
76
76
  :host-state([disabled]) input {
@@ -69,7 +69,7 @@
69
69
 
70
70
  :host:disabled {
71
71
  background-color: var(--ui-control-surface-disabled, var(--ui-surface-muted));
72
- color: var(--ui-text-muted);
72
+ color: var(--ui-disabled-text);
73
73
  box-shadow: none;
74
74
  cursor: not-allowed;
75
75
  }
@@ -98,7 +98,7 @@
98
98
  }
99
99
 
100
100
  :host-state([disabled]) {
101
- color: var(--ui-text-muted);
101
+ color: var(--ui-disabled-text);
102
102
  cursor: not-allowed;
103
103
  }
104
104
  :host-state([disabled]) input {
@@ -69,7 +69,7 @@
69
69
 
70
70
  :host:disabled {
71
71
  background: var(--ui-control-surface-disabled, var(--ui-surface-muted));
72
- color: var(--ui-text-muted);
72
+ color: var(--ui-disabled-text);
73
73
  box-shadow: none;
74
74
  cursor: not-allowed;
75
75
  }