@threadlabs/looma 0.22.6 → 0.22.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.22.6",
3
+ "version": "0.22.7",
4
4
  "type": "module",
5
5
  "description": "Looma components as HTML, Vue, and plain DOM, with design tokens.",
6
6
  "license": "MIT",
@@ -94,6 +94,8 @@
94
94
  display: none;
95
95
  }
96
96
 
97
+ /* A <kbd> takes the browser's monospace; the hint reads in the item's own type. */
98
+
97
99
  /* Keep the text row at the shared control height where cap trimming is available. */
98
100
  @supports (text-box-trim: trim-both) {
99
101
  :scope {
@@ -145,6 +147,11 @@
145
147
  /* A menu marks its chosen item with a check, as menus conventionally do; a radio circle reads
146
148
  as a form control. The empty slot keeps unchosen labels aligned with the chosen one. */
147
149
 
150
+ /* A <kbd> takes the browser's monospace; the hint reads in the item's own type. */
151
+ .shortcut :where([data-slotted], [data-slotted] *):is(kbd) {
152
+ font: inherit;
153
+ }
154
+
148
155
  /* Keep the text row at the shared control height where cap trimming is available. */
149
156
  @supports (text-box-trim: trim-both) {
150
157
  }
@@ -110,9 +110,7 @@
110
110
  display: none;
111
111
  }
112
112
 
113
- .shortcut kbd {
114
- font: inherit;
115
- }
113
+ /* A <kbd> takes the browser's monospace; the hint reads in the tooltip's own type. */
116
114
 
117
115
  :scope[data-ui-tooltip-state~="inverse"] .surface {
118
116
  --_tooltip-line: var(--_ui-tooltip-inverse-surface, var(--ui-text-primary));
@@ -219,6 +217,11 @@
219
217
  /* A keyboard shortcut follows the label after a thin divider, smaller and quieter, as menus show
220
218
  it. The label stays first in the description, so a screen reader hears the name, then the keys. */
221
219
 
220
+ /* A <kbd> takes the browser's monospace; the hint reads in the tooltip's own type. */
221
+ .shortcut :where([data-slotted], [data-slotted] *):is(kbd) {
222
+ font: inherit;
223
+ }
224
+
222
225
  /* A rotated square shares the surface fill and draws the two outward border edges. Its centre sits on
223
226
  * the surface border line, so the fill covers that stretch of border and the outline runs unbroken. */
224
227
 
@@ -413,6 +413,11 @@ function attribute(value: unknown): any {
413
413
  display: none;
414
414
  }
415
415
 
416
+ /* A <kbd> takes the browser's monospace; the hint reads in the item's own type. */
417
+ .shortcut :slotted(kbd) {
418
+ font: inherit;
419
+ }
420
+
416
421
  /* Keep the text row at the shared control height where cap trimming is available. */
417
422
  @supports (text-box-trim: trim-both) {
418
423
  [data-component~="ui-menu-item"] {
package/vue/UiTooltip.vue CHANGED
@@ -432,7 +432,8 @@ useComponentHost(() => import('../components/ui-tooltip/ui-tooltip.js'), {
432
432
  display: none;
433
433
  }
434
434
 
435
- .shortcut kbd {
435
+ /* A <kbd> takes the browser's monospace; the hint reads in the tooltip's own type. */
436
+ .shortcut :slotted(kbd) {
436
437
  font: inherit;
437
438
  }
438
439
 
@@ -253,7 +253,7 @@ var UiMenuItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
253
253
  "data-value": reflectedProp("value", "value", checkedProps.value.value, void 0, true),
254
254
  "data-ui-menu-item-state": hostState.value || void 0,
255
255
  ref: "@html-next/root"
256
- }), [createElementVNode("span", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]), createElementVNode("span", _hoisted_3, [renderSlot(_ctx.$slots, "shortcut", {}, void 0, true)])], 16, _hoisted_1)), [[unref(vPropValidity), {
256
+ }), [createElementVNode("span", _hoisted_2, [renderSlot(_ctx.$slots, "default")]), createElementVNode("span", _hoisted_3, [renderSlot(_ctx.$slots, "shortcut")])], 16, _hoisted_1)), [[unref(vPropValidity), {
257
257
  contract: propValidityContract,
258
258
  values: { ...checkedProps.value }
259
259
  }]]) : withDirectives((openBlock(), createElementBlock("div", mergeProps({
@@ -280,14 +280,14 @@ var UiMenuItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
280
280
  key: 0,
281
281
  name: "check"
282
282
  })) : createCommentVNode("v-if", true)]),
283
- createElementVNode("span", _hoisted_6, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
284
- createElementVNode("span", _hoisted_7, [renderSlot(_ctx.$slots, "shortcut", {}, void 0, true)])
283
+ createElementVNode("span", _hoisted_6, [renderSlot(_ctx.$slots, "default")]),
284
+ createElementVNode("span", _hoisted_7, [renderSlot(_ctx.$slots, "shortcut")])
285
285
  ], 16, _hoisted_4)), [[unref(vPropValidity), {
286
286
  contract: propValidityContract,
287
287
  values: { ...checkedProps.value }
288
288
  }]]);
289
289
  };
290
290
  }
291
- }), [["__scopeId", "data-v-66db7524"]]);
291
+ }), [["__scopeId", "data-v-070bbdf2"]]);
292
292
  //#endregion
293
293
  export { UiMenuItem_default as t };
@@ -254,12 +254,12 @@ var UiTooltip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
254
254
  "data-ui-tooltip-state": hostState.value || void 0,
255
255
  ref_key: "root",
256
256
  ref: root
257
- }), [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true), createElementVNode("span", _hoisted_3, [renderSlot(_ctx.$slots, "shortcut", {}, void 0, true)])])], 16, _hoisted_1)), [[unref(vPropValidity), {
257
+ }), [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default"), createElementVNode("span", _hoisted_3, [renderSlot(_ctx.$slots, "shortcut")])])], 16, _hoisted_1)), [[unref(vPropValidity), {
258
258
  contract: propValidityContract,
259
259
  values: { ...checkedProps.value }
260
260
  }]]);
261
261
  };
262
262
  }
263
- }), [["__scopeId", "data-v-7648518b"]]);
263
+ }), [["__scopeId", "data-v-07f66486"]]);
264
264
  //#endregion
265
265
  export { UiTooltip_default as t };
@@ -1484,7 +1484,7 @@ input[data-v-f591bc2c]:focus-visible {
1484
1484
  syntax: "*";
1485
1485
  inherits: false;
1486
1486
  }
1487
- [data-component~="ui-tooltip"][data-v-7648518b] {
1487
+ [data-component~="ui-tooltip"][data-v-07f66486] {
1488
1488
  /* Hooks do not inherit, so the parts below read them from the root. */
1489
1489
  --_ui-tooltip-border: var(--ui-tooltip-border);
1490
1490
  --_ui-tooltip-max-inline-size: var(--ui-tooltip-max-inline-size);
@@ -1516,7 +1516,7 @@ input[data-v-f591bc2c]:focus-visible {
1516
1516
  display var(--ui-motion-fast) allow-discrete,
1517
1517
  overlay var(--ui-motion-fast) allow-discrete;
1518
1518
  }
1519
- .surface[data-v-7648518b] {
1519
+ .surface[data-v-07f66486] {
1520
1520
  --_tooltip-line: var(--_ui-tooltip-border, var(--ui-overlay-border, var(--ui-border-strong)));
1521
1521
  position: relative;
1522
1522
  box-sizing: border-box;
@@ -1537,7 +1537,7 @@ input[data-v-f591bc2c]:focus-visible {
1537
1537
 
1538
1538
  /* A keyboard shortcut follows the label after a thin divider, smaller and quieter, as menus show
1539
1539
  it. The label stays first in the description, so a screen reader hears the name, then the keys. */
1540
- .shortcut[data-v-7648518b] {
1540
+ .shortcut[data-v-07f66486] {
1541
1541
  display: inline-flex;
1542
1542
  align-items: center;
1543
1543
  margin-inline-start: var(--ui-space-2);
@@ -1549,13 +1549,15 @@ input[data-v-f591bc2c]:focus-visible {
1549
1549
  white-space: nowrap;
1550
1550
  vertical-align: baseline;
1551
1551
  }
1552
- .shortcut[data-v-7648518b]:empty {
1552
+ .shortcut[data-v-07f66486]:empty {
1553
1553
  display: none;
1554
1554
  }
1555
- .shortcut kbd[data-v-7648518b] {
1555
+
1556
+ /* A <kbd> takes the browser's monospace; the hint reads in the tooltip's own type. */
1557
+ .shortcut kbd[data-v-07f66486-s] {
1556
1558
  font: inherit;
1557
1559
  }
1558
- [data-component~="ui-tooltip"][data-ui-tooltip-state~="inverse"] .surface[data-v-7648518b] {
1560
+ [data-component~="ui-tooltip"][data-ui-tooltip-state~="inverse"] .surface[data-v-07f66486] {
1559
1561
  --_tooltip-line: var(--_ui-tooltip-inverse-surface, var(--ui-text-primary));
1560
1562
  background: var(--_ui-tooltip-inverse-surface, var(--ui-text-primary));
1561
1563
  color: var(--_ui-tooltip-inverse-text, var(--ui-surface-default));
@@ -1563,7 +1565,7 @@ input[data-v-f591bc2c]:focus-visible {
1563
1565
 
1564
1566
  /* A rotated square shares the surface fill and draws the two outward border edges. Its centre sits on
1565
1567
  * the surface border line, so the fill covers that stretch of border and the outline runs unbroken. */
1566
- .surface[data-v-7648518b]::after {
1568
+ .surface[data-v-07f66486]::after {
1567
1569
  content: "";
1568
1570
  position: absolute;
1569
1571
  z-index: 1;
@@ -1579,7 +1581,7 @@ input[data-v-f591bc2c]:focus-visible {
1579
1581
  border-end-end-radius: 1px;
1580
1582
  transform: rotate(45deg) scaleX(1.25) scaleY(0.85);
1581
1583
  }
1582
- [data-component~="ui-tooltip"][data-ui-actual-placement="bottom"] .surface[data-v-7648518b]::after {
1584
+ [data-component~="ui-tooltip"][data-ui-actual-placement="bottom"] .surface[data-v-07f66486]::after {
1583
1585
  inset-block-start: calc(var(--_ui-tooltip-arrow-size, 0.625rem) / -2 - 0.5px);
1584
1586
  inset-block-end: auto;
1585
1587
  border-inline-end-width: 0;
@@ -1589,59 +1591,59 @@ input[data-v-f591bc2c]:focus-visible {
1589
1591
  border-end-end-radius: 0;
1590
1592
  border-start-start-radius: 1px;
1591
1593
  }
1592
- [data-component~="ui-tooltip"][data-ui-actual-align="center"] .surface[data-v-7648518b]::after {
1594
+ [data-component~="ui-tooltip"][data-ui-actual-align="center"] .surface[data-v-07f66486]::after {
1593
1595
  inset-inline-start: calc(50% - var(--_ui-tooltip-arrow-size, 0.625rem) / 2);
1594
1596
  }
1595
- [data-component~="ui-tooltip"][data-ui-actual-align="end"] .surface[data-v-7648518b]::after {
1597
+ [data-component~="ui-tooltip"][data-ui-actual-align="end"] .surface[data-v-07f66486]::after {
1596
1598
  inset-inline-start: auto;
1597
1599
  inset-inline-end: var(--ui-space-3);
1598
1600
  }
1599
- [data-component~="ui-tooltip"][data-ui-actual-placement="left"] .surface[data-v-7648518b]::after,
1600
- [data-component~="ui-tooltip"][data-ui-actual-placement="right"] .surface[data-v-7648518b]::after {
1601
+ [data-component~="ui-tooltip"][data-ui-actual-placement="left"] .surface[data-v-07f66486]::after,
1602
+ [data-component~="ui-tooltip"][data-ui-actual-placement="right"] .surface[data-v-07f66486]::after {
1601
1603
  inset-block-start: calc(50% - var(--_ui-tooltip-arrow-size, 0.625rem) / 2);
1602
1604
  inset-block-end: auto;
1603
1605
  border: 0 solid var(--_tooltip-line);
1604
1606
  }
1605
- [data-component~="ui-tooltip"][data-ui-actual-placement="left"] .surface[data-v-7648518b]::after {
1607
+ [data-component~="ui-tooltip"][data-ui-actual-placement="left"] .surface[data-v-07f66486]::after {
1606
1608
  inset-inline-start: auto;
1607
1609
  inset-inline-end: calc(var(--_ui-tooltip-arrow-size, 0.625rem) / -2 - 0.5px);
1608
1610
  border-inline-end-width: 1px;
1609
1611
  border-block-start-width: 1px;
1610
1612
  }
1611
- [data-component~="ui-tooltip"][data-ui-actual-placement="right"] .surface[data-v-7648518b]::after {
1613
+ [data-component~="ui-tooltip"][data-ui-actual-placement="right"] .surface[data-v-07f66486]::after {
1612
1614
  inset-inline-start: calc(var(--_ui-tooltip-arrow-size, 0.625rem) / -2 - 0.5px);
1613
1615
  inset-inline-end: auto;
1614
1616
  border-inline-start-width: 1px;
1615
1617
  border-block-end-width: 1px;
1616
1618
  }
1617
1619
  [data-component~="ui-tooltip"][data-ui-actual-placement="left"][data-ui-actual-align="start"]
1618
- .surface[data-v-7648518b]::after,
1620
+ .surface[data-v-07f66486]::after,
1619
1621
  [data-component~="ui-tooltip"][data-ui-actual-placement="right"][data-ui-actual-align="start"]
1620
- .surface[data-v-7648518b]::after {
1622
+ .surface[data-v-07f66486]::after {
1621
1623
  inset-block-start: var(--ui-space-3);
1622
1624
  }
1623
1625
  [data-component~="ui-tooltip"][data-ui-actual-placement="left"][data-ui-actual-align="end"]
1624
- .surface[data-v-7648518b]::after,
1626
+ .surface[data-v-07f66486]::after,
1625
1627
  [data-component~="ui-tooltip"][data-ui-actual-placement="right"][data-ui-actual-align="end"]
1626
- .surface[data-v-7648518b]::after {
1628
+ .surface[data-v-07f66486]::after {
1627
1629
  inset-block-start: auto;
1628
1630
  inset-block-end: var(--ui-space-3);
1629
1631
  }
1630
- [data-component~="ui-tooltip"][data-v-7648518b]:popover-open {
1632
+ [data-component~="ui-tooltip"][data-v-07f66486]:popover-open {
1631
1633
  opacity: 1;
1632
1634
  transform: translateY(0);
1633
1635
  }
1634
1636
  @starting-style {
1635
- [data-component~="ui-tooltip"][data-v-7648518b]:popover-open {
1637
+ [data-component~="ui-tooltip"][data-v-07f66486]:popover-open {
1636
1638
  opacity: 0;
1637
1639
  transform: translateY(4px);
1638
1640
  }
1639
1641
  }
1640
- [data-component~="ui-tooltip"][hidden][data-v-7648518b] {
1642
+ [data-component~="ui-tooltip"][hidden][data-v-07f66486] {
1641
1643
  display: none;
1642
1644
  }
1643
1645
  @media (prefers-reduced-motion: reduce) {
1644
- [data-component~="ui-tooltip"][data-v-7648518b] {
1646
+ [data-component~="ui-tooltip"][data-v-07f66486] {
1645
1647
  transition: none;
1646
1648
  }
1647
1649
  }
@@ -5374,7 +5376,7 @@ svg[data-v-fee3a5e1-s] {
5374
5376
  syntax: "*";
5375
5377
  inherits: false;
5376
5378
  }
5377
- [data-component~="ui-menu-item"][data-v-66db7524] {
5379
+ [data-component~="ui-menu-item"][data-v-070bbdf2] {
5378
5380
  display: flex;
5379
5381
  align-items: center;
5380
5382
  gap: var(--ui-space-2);
@@ -5406,14 +5408,14 @@ svg[data-v-fee3a5e1-s] {
5406
5408
  background-color var(--ui-motion-fast) var(--ui-motion-ease),
5407
5409
  color var(--ui-motion-fast) var(--ui-motion-ease);
5408
5410
  }
5409
- .label[data-v-66db7524] {
5411
+ .label[data-v-070bbdf2] {
5410
5412
  display: flex;
5411
5413
  align-items: center;
5412
5414
  gap: var(--ui-space-2);
5413
5415
  flex: 1;
5414
5416
  min-inline-size: 0;
5415
5417
  }
5416
- .indicator[data-v-66db7524] {
5418
+ .indicator[data-v-070bbdf2] {
5417
5419
  display: inline-flex;
5418
5420
  align-items: center;
5419
5421
  justify-content: center;
@@ -5426,34 +5428,39 @@ svg[data-v-fee3a5e1-s] {
5426
5428
  color: var(--ui-surface);
5427
5429
  --_ui-default-icon-size: 0.75rem;
5428
5430
  }
5429
- [data-component~="ui-menu-item"][data-ui-menu-item-state~="type=action"] .indicator[data-v-66db7524] {
5431
+ [data-component~="ui-menu-item"][data-ui-menu-item-state~="type=action"] .indicator[data-v-070bbdf2] {
5430
5432
  display: none;
5431
5433
  }
5432
5434
  [data-component~="ui-menu-item"][data-ui-menu-item-state~="type=checkbox"][aria-checked="true"]
5433
- .indicator[data-v-66db7524] {
5435
+ .indicator[data-v-070bbdf2] {
5434
5436
  border-color: var(--ui-accent);
5435
5437
  background: var(--ui-accent);
5436
5438
  }
5437
5439
 
5438
5440
  /* A menu marks its chosen item with a check, as menus conventionally do; a radio circle reads
5439
5441
  as a form control. The empty slot keeps unchosen labels aligned with the chosen one. */
5440
- [data-component~="ui-menu-item"][data-ui-menu-item-state~="type=radio"] .indicator[data-v-66db7524] {
5442
+ [data-component~="ui-menu-item"][data-ui-menu-item-state~="type=radio"] .indicator[data-v-070bbdf2] {
5441
5443
  border-color: transparent;
5442
5444
  color: var(--ui-text-secondary);
5443
5445
  }
5444
- .shortcut[data-v-66db7524] {
5446
+ .shortcut[data-v-070bbdf2] {
5445
5447
  margin-inline-start: auto;
5446
5448
  color: var(--ui-text-secondary);
5447
5449
  font-size: var(--ui-font-size-sm);
5448
5450
  font-weight: var(--ui-font-normal);
5449
5451
  }
5450
- .shortcut[data-v-66db7524]:empty {
5452
+ .shortcut[data-v-070bbdf2]:empty {
5451
5453
  display: none;
5452
5454
  }
5453
5455
 
5456
+ /* A <kbd> takes the browser's monospace; the hint reads in the item's own type. */
5457
+ .shortcut kbd[data-v-070bbdf2-s] {
5458
+ font: inherit;
5459
+ }
5460
+
5454
5461
  /* Keep the text row at the shared control height where cap trimming is available. */
5455
5462
  @supports (text-box-trim: trim-both) {
5456
- [data-component~="ui-menu-item"][data-v-66db7524] {
5463
+ [data-component~="ui-menu-item"][data-v-070bbdf2] {
5457
5464
  min-block-size: var(
5458
5465
  --ui-menu-item-min-block-size,
5459
5466
  var(--_ui-default-menu-item-min-block-size, var(--ui-control-size-md, 2.5rem))
@@ -5462,34 +5469,34 @@ svg[data-v-fee3a5e1-s] {
5462
5469
  text-box-edge: cap alphabetic;
5463
5470
  }
5464
5471
  }
5465
- [data-component~="ui-menu-item"][data-v-66db7524]:is(:hover, :focus-visible):not([aria-disabled="true"]) {
5472
+ [data-component~="ui-menu-item"][data-v-070bbdf2]:is(:hover, :focus-visible):not([aria-disabled="true"]) {
5466
5473
  background: var(--ui-menu-item-hover-surface, var(--ui-surface-subtle));
5467
5474
  }
5468
- [data-component~="ui-menu-item"][data-v-66db7524]:focus-visible {
5475
+ [data-component~="ui-menu-item"][data-v-070bbdf2]:focus-visible {
5469
5476
  outline: 2px solid var(--ui-focus-ring);
5470
5477
  outline-offset: -2px;
5471
5478
  }
5472
- [data-component~="ui-menu-item"][aria-disabled="true"][data-v-66db7524] {
5479
+ [data-component~="ui-menu-item"][aria-disabled="true"][data-v-070bbdf2] {
5473
5480
  background: var(--ui-disabled-surface);
5474
5481
  color: var(--ui-disabled-text);
5475
5482
  cursor: not-allowed;
5476
5483
  }
5477
- [data-component~="ui-menu-item"][aria-disabled="true"] .indicator[data-v-66db7524] {
5484
+ [data-component~="ui-menu-item"][aria-disabled="true"] .indicator[data-v-070bbdf2] {
5478
5485
  border-color: var(--ui-disabled-border);
5479
5486
  background: transparent;
5480
5487
  color: var(--ui-disabled-text);
5481
5488
  }
5482
- [data-component~="ui-menu-item"][aria-disabled="true"] .indicator[data-v-66db7524]::after {
5489
+ [data-component~="ui-menu-item"][aria-disabled="true"] .indicator[data-v-070bbdf2]::after {
5483
5490
  background: var(--ui-disabled-text);
5484
5491
  }
5485
5492
  @media (forced-colors: active) {
5486
- [data-component~="ui-menu-item"][data-v-66db7524]:focus-visible {
5493
+ [data-component~="ui-menu-item"][data-v-070bbdf2]:focus-visible {
5487
5494
  outline-color: Highlight;
5488
5495
  }
5489
5496
  }
5490
5497
 
5491
5498
  /* A component that sets its display still honours the hidden attribute on its root. */
5492
- [data-component~="ui-menu-item"][hidden][data-v-66db7524] {
5499
+ [data-component~="ui-menu-item"][hidden][data-v-070bbdf2] {
5493
5500
  display: none;
5494
5501
  }
5495
5502