@threadlabs/looma 0.21.3 → 0.21.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.21.3",
3
+ "version": "0.21.4",
4
4
  "type": "module",
5
5
  "description": "Looma components as HTML, Vue, and plain DOM, with design tokens.",
6
6
  "license": "MIT",
@@ -36,6 +36,8 @@
36
36
  font: inherit;
37
37
  font-size: var(--ui-font-size-sm);
38
38
  font-weight: 600;
39
+ /* The initials centre in the circle wherever it sits, whatever line height surrounds it. */
40
+ line-height: 1;
39
41
  text-transform: uppercase;
40
42
  }
41
43
 
@@ -50,7 +52,9 @@
50
52
  --_ui-default-icon-size: 0.75rem;
51
53
  inline-size: 1.25rem;
52
54
  block-size: 1.25rem;
53
- font-size: var(--ui-font-size-2xs);
55
+ /* Below the type scale on purpose: two initials need room inside a 1.25rem circle. */
56
+ font-size: calc(var(--ui-font-size) * 0.5625);
57
+ letter-spacing: 0.02em;
54
58
  }
55
59
 
56
60
  :scope[data-ui-avatar-state~="hasImage"] {
package/vue/UiAvatar.vue CHANGED
@@ -239,6 +239,8 @@ useComponentHost(() => import('../components/ui-avatar/ui-avatar.js'), {
239
239
  font: inherit;
240
240
  font-size: var(--ui-font-size-sm);
241
241
  font-weight: 600;
242
+ /* The initials centre in the circle wherever it sits, whatever line height surrounds it. */
243
+ line-height: 1;
242
244
  text-transform: uppercase;
243
245
  }
244
246
 
@@ -253,7 +255,9 @@ useComponentHost(() => import('../components/ui-avatar/ui-avatar.js'), {
253
255
  --_ui-default-icon-size: 0.75rem;
254
256
  inline-size: 1.25rem;
255
257
  block-size: 1.25rem;
256
- font-size: var(--ui-font-size-2xs);
258
+ /* Below the type scale on purpose: two initials need room inside a 1.25rem circle. */
259
+ font-size: calc(var(--ui-font-size) * 0.5625);
260
+ letter-spacing: 0.02em;
257
261
  }
258
262
 
259
263
  [data-component~="ui-avatar"][data-ui-avatar-state~="hasImage"] {
@@ -186,6 +186,6 @@ var UiAvatar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
186
186
  ], 16, _hoisted_1);
187
187
  };
188
188
  }
189
- }), [["__scopeId", "data-v-42e2a578"]]);
189
+ }), [["__scopeId", "data-v-4934b13f"]]);
190
190
  //#endregion
191
191
  export { UiAvatar_default as t };
@@ -134,7 +134,7 @@ svg[data-v-fdb3ee4b] {
134
134
  syntax: "*";
135
135
  inherits: false;
136
136
  }
137
- [data-component~="ui-avatar"][data-v-42e2a578] {
137
+ [data-component~="ui-avatar"][data-v-4934b13f] {
138
138
  --_ui-default-icon-size: 1.25rem;
139
139
  display: inline-grid;
140
140
  place-items: center;
@@ -152,40 +152,44 @@ svg[data-v-fdb3ee4b] {
152
152
  font: inherit;
153
153
  font-size: var(--ui-font-size-sm);
154
154
  font-weight: 600;
155
+ /* The initials centre in the circle wherever it sits, whatever line height surrounds it. */
156
+ line-height: 1;
155
157
  text-transform: uppercase;
156
158
  }
157
- [data-component~="ui-avatar"][data-ui-avatar-state~="size=sm"][data-v-42e2a578] {
159
+ [data-component~="ui-avatar"][data-ui-avatar-state~="size=sm"][data-v-4934b13f] {
158
160
  --_ui-default-icon-size: 1rem;
159
161
  inline-size: 1.75rem;
160
162
  block-size: 1.75rem;
161
163
  font-size: var(--ui-font-size-xs);
162
164
  }
163
- [data-component~="ui-avatar"][data-ui-avatar-state~="size=xs"][data-v-42e2a578] {
165
+ [data-component~="ui-avatar"][data-ui-avatar-state~="size=xs"][data-v-4934b13f] {
164
166
  --_ui-default-icon-size: 0.75rem;
165
167
  inline-size: 1.25rem;
166
168
  block-size: 1.25rem;
167
- font-size: var(--ui-font-size-2xs);
169
+ /* Below the type scale on purpose: two initials need room inside a 1.25rem circle. */
170
+ font-size: calc(var(--ui-font-size) * 0.5625);
171
+ letter-spacing: 0.02em;
168
172
  }
169
- [data-component~="ui-avatar"][data-ui-avatar-state~="hasImage"][data-v-42e2a578] {
173
+ [data-component~="ui-avatar"][data-ui-avatar-state~="hasImage"][data-v-4934b13f] {
170
174
  border-color: var(--ui-avatar-border, var(--ui-border-strong));
171
175
  }
172
- [data-component~="ui-avatar"][data-ui-avatar-state~="shape=square"][data-v-42e2a578] {
176
+ [data-component~="ui-avatar"][data-ui-avatar-state~="shape=square"][data-v-4934b13f] {
173
177
  border-radius: var(--ui-avatar-radius, var(--ui-radius-md));
174
178
  }
175
179
 
176
180
  /* An outline, not a dot: the avatar clips its content to the circle, and an outline is drawn
177
181
  outside the box, so the ring survives the clip and the overlap in an Avatar Group. */
178
- [data-component~="ui-avatar"][data-ui-avatar-state~="active"][data-v-42e2a578] {
182
+ [data-component~="ui-avatar"][data-ui-avatar-state~="active"][data-v-4934b13f] {
179
183
  outline: 1px solid var(--ui-avatar-active-ring, var(--ui-accent-solid));
180
184
  outline-offset: 1px;
181
185
  }
182
- .image[data-v-42e2a578],img[data-v-42e2a578-s] {
186
+ .image[data-v-4934b13f],img[data-v-4934b13f-s] {
183
187
  grid-area: 1 / 1;
184
188
  inline-size: 100%;
185
189
  block-size: 100%;
186
190
  object-fit: cover;
187
191
  }
188
- .fallback[data-v-42e2a578] {
192
+ .fallback[data-v-4934b13f] {
189
193
  grid-area: 1 / 1;
190
194
  display: inline-flex;
191
195
  align-items: center;
@@ -198,7 +202,7 @@ svg[data-v-fdb3ee4b] {
198
202
  /* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
199
203
  * Trimming applies to block containers, so the box is a block with centred content. */
200
204
  @supports (text-box-trim: trim-both) {
201
- .fallback[data-v-42e2a578] {
205
+ .fallback[data-v-4934b13f] {
202
206
  display: block;
203
207
  text-align: center;
204
208
  align-content: center;
@@ -206,12 +210,12 @@ svg[data-v-fdb3ee4b] {
206
210
  text-box-edge: cap alphabetic;
207
211
  }
208
212
  }
209
- [hidden][data-v-42e2a578] {
213
+ [hidden][data-v-4934b13f] {
210
214
  display: none;
211
215
  }
212
216
 
213
217
  /* A component that sets its display still honours the hidden attribute on its root. */
214
- [data-component~="ui-avatar"][hidden][data-v-42e2a578] {
218
+ [data-component~="ui-avatar"][hidden][data-v-4934b13f] {
215
219
  display: none;
216
220
  }
217
221