@threadlabs/looma 0.22.6 → 0.22.8

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.
@@ -140,6 +140,11 @@
140
140
  display: none;
141
141
  }
142
142
 
143
+ /* A <kbd> takes the browser's monospace; the hint reads in the item's own type. */
144
+ .shortcut :slotted(kbd) {
145
+ font: inherit;
146
+ }
147
+
143
148
  /* Keep the text row at the shared control height where cap trimming is available. */
144
149
  @supports (text-box-trim: trim-both) {
145
150
  :host {
@@ -66,7 +66,9 @@ export default function controller(host) {
66
66
  const onClick = (event) => {
67
67
  if (host.state.dismissible && event.target === dialog) dispatchClose("light-dismiss", trigger());
68
68
  };
69
- const onClose = () => {
69
+ // Only the dialog's own close: a tooltip, menu, or popover inside it reports "close" too, and it bubbles.
70
+ const onClose = (event) => {
71
+ if (event.target !== dialog) return;
70
72
  if (!suppressNativeClose && host.state.internalOpen) dispatchClose("action", trigger());
71
73
  };
72
74
  dialog.addEventListener("cancel", onCancel);
@@ -147,7 +147,8 @@
147
147
  display: none;
148
148
  }
149
149
 
150
- .shortcut kbd {
150
+ /* A <kbd> takes the browser's monospace; the hint reads in the tooltip's own type. */
151
+ .shortcut :slotted(kbd) {
151
152
  font: inherit;
152
153
  }
153
154