@threadlabs/looma 0.1.16 → 0.1.18
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/README.md +2 -1
- package/dist/{chunk-SVINNT3E.js → chunk-DTQVRGVL.js} +29 -29
- package/dist/{chunk-G53JEAQK.js → chunk-SZJQ3NPX.js} +6 -3
- package/dist/chunk-YHXJC5M5.js +341 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/looma.cjs.js +1 -1
- package/dist/cjs/{manager-BOpVXb92.js → manager-C9j3HZay.js} +5 -2
- package/dist/cjs/positioning-i0WrCAdF.js +384 -0
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +3 -113
- package/dist/cjs/ui-context-menu.cjs.entry.js +43 -5
- package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu.cjs.entry.js +83 -2
- package/dist/cjs/ui-popover.cjs.entry.js +43 -3
- package/dist/cjs/ui-toast-region.cjs.entry.js +17 -2
- package/dist/cjs/ui-tooltip.cjs.entry.js +95 -27
- package/dist/cjs/ui-tree-item.cjs.entry.js +1 -1
- package/dist/collection/components/ui-context-menu/ui-context-menu.css +21 -4
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +43 -4
- package/dist/collection/components/ui-menu/ui-menu.css +39 -0
- package/dist/collection/components/ui-menu/ui-menu.js +128 -1
- package/dist/collection/components/ui-popover/ui-popover.css +31 -0
- package/dist/collection/components/ui-popover/ui-popover.js +87 -1
- package/dist/collection/components/ui-toast-region/ui-toast-region.css +6 -0
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +16 -1
- package/dist/collection/components/ui-tooltip/ui-tooltip.css +20 -0
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +160 -25
- package/dist/collection/components/ui-tree-item/ui-tree-item.css +10 -6
- package/dist/collection/input-modality.js +24 -0
- package/dist/collection/overlay/manager.js +5 -2
- package/dist/collection/overlay/positioning.js +246 -0
- package/dist/components/p-CEYIKqYc.js +1 -0
- package/dist/components/p-DOulVJT7.js +1 -0
- package/dist/components/p-PM9a74r7.js +1 -0
- package/dist/components/ui-affordance-scope.js +1 -1
- package/dist/components/ui-context-menu.js +1 -1
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-menu.js +1 -1
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-toast-region.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/components/ui-tree-item.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/looma.js +1 -1
- package/dist/esm/{manager-CR7f2MQC.js → manager-PM9a74r7.js} +5 -2
- package/dist/esm/positioning-Bu0dmLBE.js +379 -0
- package/dist/esm/ui-affordance-scope.entry.js +1 -111
- package/dist/esm/ui-context-menu.entry.js +43 -5
- package/dist/esm/ui-dialog.entry.js +1 -1
- package/dist/esm/ui-menu.entry.js +83 -2
- package/dist/esm/ui-popover.entry.js +43 -3
- package/dist/esm/ui-toast-region.entry.js +17 -2
- package/dist/esm/ui-tooltip.entry.js +95 -27
- package/dist/esm/ui-tree-item.entry.js +1 -1
- package/dist/index.cjs +779 -59
- package/dist/index.d.cts +44 -1
- package/dist/index.d.ts +44 -1
- package/dist/index.js +235 -4
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/p-063f5a89.entry.js +1 -0
- package/dist/looma/{p-c6721aba.entry.js → p-11083743.entry.js} +1 -1
- package/dist/looma/p-1674cda4.entry.js +1 -0
- package/dist/looma/p-2e6f791e.entry.js +1 -0
- package/dist/looma/p-54c41576.entry.js +1 -0
- package/dist/looma/p-9194a99d.entry.js +1 -0
- package/dist/looma/p-Bu0dmLBE.js +1 -0
- package/dist/looma/p-PM9a74r7.js +1 -0
- package/dist/looma/p-caa8fc7b.entry.js +1 -0
- package/dist/looma/{p-ef9ca2ed.entry.js → p-d01960c2.entry.js} +2 -2
- package/dist/types/components/ui-context-menu/ui-context-menu.d.ts +6 -0
- package/dist/types/components/ui-menu/ui-menu.d.ts +13 -0
- package/dist/types/components/ui-popover/ui-popover.d.ts +9 -0
- package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +2 -0
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +16 -1
- package/dist/types/components.d.ts +71 -0
- package/dist/types/input-modality.d.ts +6 -0
- package/dist/types/overlay/manager.d.ts +3 -0
- package/dist/types/overlay/positioning.d.ts +33 -0
- package/dist/ui-affordance-scope.entry-2W7ZKAGK.js +54 -0
- package/dist/{ui-avatar-group.entry-DQDP325O.js → ui-avatar-group.entry-SE5JG2FT.js} +1 -1
- package/dist/{ui-avatar.entry-WYIDMOFE.js → ui-avatar.entry-46JDI25A.js} +1 -1
- package/dist/{ui-badge.entry-VGHXPEDT.js → ui-badge.entry-U7G3MEC5.js} +1 -1
- package/dist/{ui-button.entry-LKPLOJ22.js → ui-button.entry-DELD6KMH.js} +1 -1
- package/dist/{ui-checkbox.entry-J74HEA22.js → ui-checkbox.entry-ZUG2P642.js} +1 -1
- package/dist/{ui-context-menu.entry-MQM2FCLI.js → ui-context-menu.entry-L4HTK3PV.js} +43 -6
- package/dist/{ui-dialog.entry-DQMMDO4Z.js → ui-dialog.entry-TQPYD2YI.js} +2 -2
- package/dist/{ui-disclosure.entry-ONF7UZDC.js → ui-disclosure.entry-23TII4YU.js} +1 -1
- package/dist/{ui-floating-action-button.entry-FKTGVC5T.js → ui-floating-action-button.entry-FOQYAFJI.js} +1 -1
- package/dist/{ui-form-field.entry-M3ISWQNU.js → ui-form-field.entry-SCPG4STY.js} +1 -1
- package/dist/{ui-icon-button.entry-AWFIQUHM.js → ui-icon-button.entry-U45ZVAC3.js} +1 -1
- package/dist/{ui-input.entry-JZ6RETMT.js → ui-input.entry-3AIA3G4C.js} +1 -1
- package/dist/{ui-menu-item.entry-5MFR5LFL.js → ui-menu-item.entry-3QO5TG2J.js} +1 -1
- package/dist/ui-menu.entry-JACWGDDG.js +184 -0
- package/dist/{ui-popover.entry-ELCMKO6Y.js → ui-popover.entry-2XP4H3S2.js} +46 -4
- package/dist/{ui-radio-group.entry-RJHUPPEM.js → ui-radio-group.entry-73IKFMDK.js} +1 -1
- package/dist/{ui-radio.entry-3VRDPOY4.js → ui-radio.entry-INJVXUKE.js} +1 -1
- package/dist/{ui-search-result-row.entry-J34YPAV7.js → ui-search-result-row.entry-4J732TDC.js} +1 -1
- package/dist/{ui-search-shell.entry-IJ4UUP27.js → ui-search-shell.entry-3C2WRVE2.js} +1 -1
- package/dist/{ui-select.entry-C6YD3HQ5.js → ui-select.entry-3ZLDGAKX.js} +1 -1
- package/dist/{ui-switch.entry-UZDF5QTI.js → ui-switch.entry-5MJRLR2P.js} +1 -1
- package/dist/{ui-tabs.entry-YRAKWOMR.js → ui-tabs.entry-F5H7OPBO.js} +1 -1
- package/dist/{ui-textarea.entry-JLDKFT3K.js → ui-textarea.entry-BNJ375JB.js} +1 -1
- package/dist/{ui-toast-region.entry-GC7C7KXF.js → ui-toast-region.entry-ZUIPJ2JH.js} +20 -3
- package/dist/ui-tooltip.entry-DZ4RMF35.js +214 -0
- package/dist/{ui-top-bar.entry-5W5UA5KV.js → ui-top-bar.entry-VKRXIUU6.js} +1 -1
- package/dist/{ui-tree-item.entry-3LM7IXIK.js → ui-tree-item.entry-NFUQ45OL.js} +2 -2
- package/dist/{ui-tree.entry-X4FU42A6.js → ui-tree.entry-H4CWDYI6.js} +1 -1
- package/editor/{chunk-RTHHTPWK.js → chunk-3QMBK3XZ.js} +245 -41
- package/editor/{chunk-OHD4OS32.js → chunk-OXFYYLUC.js} +632 -236
- package/editor/{chunk-CX4QDKSV.js → chunk-ZOUKEZ77.js} +21 -1
- package/editor/extensions/index.d.ts +49 -1
- package/editor/extensions/index.js +15 -3
- package/editor/index.d.ts +3 -2
- package/editor/index.js +16 -4
- package/editor/ui.d.ts +9 -1
- package/editor/ui.js +2 -2
- package/editor.css +173 -4
- package/package.json +1 -1
- package/styles.css +1 -7
- package/tokens.css +14 -2
- package/vue/editor/index.d.ts +103 -4
- package/vue/editor/index.js +199 -114
- package/dist/components/p-CR7f2MQC.js +0 -1
- package/dist/components/p-QiwSQmKJ.js +0 -1
- package/dist/looma/p-2ae73d5b.entry.js +0 -1
- package/dist/looma/p-3ac2e0d4.entry.js +0 -1
- package/dist/looma/p-65c25c94.entry.js +0 -1
- package/dist/looma/p-8c09c724.entry.js +0 -1
- package/dist/looma/p-95cd639d.entry.js +0 -1
- package/dist/looma/p-96f73d07.entry.js +0 -1
- package/dist/looma/p-CR7f2MQC.js +0 -1
- package/dist/ui-affordance-scope.entry-PFP2TDKO.js +0 -145
- package/dist/ui-menu.entry-IOEIDATQ.js +0 -98
- package/dist/ui-tooltip.entry-F26XDTYX.js +0 -145
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D07f6BOw.js');
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
|
+
var manager = require('./manager-C9j3HZay.js');
|
|
6
|
+
var positioning = require('./positioning-i0WrCAdF.js');
|
|
5
7
|
|
|
6
|
-
const uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}::slotted(ui-menu-item){display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(ui-menu-item:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}::slotted(ui-menu-item[aria-disabled='true']),::slotted(ui-menu-item[disabled]){opacity:0.6;cursor:not-allowed}`;
|
|
8
|
+
const uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:auto;max-block-size:calc(100dvh - (var(--ui-menu-viewport-gap) * 2));opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}::slotted(ui-menu-item){display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(ui-menu-item:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}::slotted(ui-menu-item[aria-disabled='true']),::slotted(ui-menu-item[disabled]){opacity:0.6;cursor:not-allowed}`;
|
|
7
9
|
|
|
8
10
|
const UIMenu = class {
|
|
9
11
|
constructor(hostRef) {
|
|
@@ -12,19 +14,84 @@ const UIMenu = class {
|
|
|
12
14
|
get host() { return index.getElement(this); }
|
|
13
15
|
open = false;
|
|
14
16
|
defaultOpen = false;
|
|
17
|
+
/** Id of the control that anchors this menu in the top layer. */
|
|
18
|
+
for;
|
|
19
|
+
/** Preferred placement; Looma flips and shifts when space is constrained. */
|
|
20
|
+
placement = 'bottom-start';
|
|
15
21
|
internalOpen = false;
|
|
22
|
+
overlayId = `ui-menu-${Math.random().toString(36).slice(2, 11)}`;
|
|
23
|
+
anchor = null;
|
|
24
|
+
surface = null;
|
|
16
25
|
syncFromProp() {
|
|
17
26
|
this.internalOpen = this.open;
|
|
18
27
|
}
|
|
28
|
+
resetSurface() {
|
|
29
|
+
this.setupSurface();
|
|
30
|
+
this.syncSurface();
|
|
31
|
+
}
|
|
32
|
+
syncSurface() {
|
|
33
|
+
this.syncAnchorState();
|
|
34
|
+
if (!this.surface)
|
|
35
|
+
return;
|
|
36
|
+
if (this.internalOpen) {
|
|
37
|
+
this.surface.show();
|
|
38
|
+
manager.openOverlay({
|
|
39
|
+
id: this.overlayId,
|
|
40
|
+
modal: false,
|
|
41
|
+
element: this.host,
|
|
42
|
+
relatedElements: this.anchor ? [this.anchor] : undefined,
|
|
43
|
+
dismissible: true,
|
|
44
|
+
requestClose: (reason, trigger) => this.closeMenu(reason, trigger),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.surface.hide();
|
|
49
|
+
manager.closeOverlay(this.overlayId);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
19
52
|
componentDidLoad() {
|
|
20
53
|
this.syncFromProp();
|
|
21
54
|
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
22
55
|
this.host.addEventListener('click', this.onItemClick);
|
|
23
56
|
this.host.addEventListener('keydown', this.onKeydown);
|
|
57
|
+
this.setupSurface();
|
|
58
|
+
this.syncSurface();
|
|
24
59
|
}
|
|
25
60
|
disconnectedCallback() {
|
|
26
61
|
this.host.removeEventListener('click', this.onItemClick);
|
|
27
62
|
this.host.removeEventListener('keydown', this.onKeydown);
|
|
63
|
+
this.surface?.destroy();
|
|
64
|
+
this.surface = null;
|
|
65
|
+
manager.closeOverlay(this.overlayId);
|
|
66
|
+
}
|
|
67
|
+
setupSurface() {
|
|
68
|
+
this.surface?.destroy();
|
|
69
|
+
this.surface = null;
|
|
70
|
+
this.anchor = this.for ? this.host.ownerDocument.getElementById(this.for) : null;
|
|
71
|
+
if (!this.anchor)
|
|
72
|
+
return;
|
|
73
|
+
this.surface = positioning.createAnchoredSurface(this.host, {
|
|
74
|
+
anchor: this.anchor,
|
|
75
|
+
placement: this.placement,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
syncAnchorState() {
|
|
79
|
+
if (!this.anchor)
|
|
80
|
+
return;
|
|
81
|
+
this.anchor.setAttribute('aria-haspopup', 'menu');
|
|
82
|
+
this.anchor.setAttribute('aria-expanded', this.internalOpen ? 'true' : 'false');
|
|
83
|
+
}
|
|
84
|
+
closeMenu(reason, trigger) {
|
|
85
|
+
if (!this.internalOpen)
|
|
86
|
+
return;
|
|
87
|
+
this.internalOpen = false;
|
|
88
|
+
events.dispatchDetail(this.host, 'close', {
|
|
89
|
+
open: false,
|
|
90
|
+
reason: reason,
|
|
91
|
+
trigger: trigger,
|
|
92
|
+
});
|
|
93
|
+
if (reason === 'escape')
|
|
94
|
+
this.anchor?.focus();
|
|
28
95
|
}
|
|
29
96
|
getItems() {
|
|
30
97
|
return Array.from(this.host.querySelectorAll('ui-menu-item'));
|
|
@@ -51,6 +118,11 @@ const UIMenu = class {
|
|
|
51
118
|
this.internalOpen = false;
|
|
52
119
|
};
|
|
53
120
|
onKeydown = (e) => {
|
|
121
|
+
if (e.key === 'Escape') {
|
|
122
|
+
e.preventDefault();
|
|
123
|
+
manager.requestTopOverlayClose('escape', 'keyboard');
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
54
126
|
const items = this.getItems().filter((i) => !this.isItemDisabled(i));
|
|
55
127
|
if (items.length === 0)
|
|
56
128
|
return;
|
|
@@ -83,11 +155,20 @@ const UIMenu = class {
|
|
|
83
155
|
}
|
|
84
156
|
};
|
|
85
157
|
render() {
|
|
86
|
-
return (index.h(index.Host, { key: '
|
|
158
|
+
return (index.h(index.Host, { key: '06ad0750df843cb874bd4f257d8567157c855493', role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? '' : undefined }, index.h("slot", { key: '50118ac749a2747ca06f4d483499c4cd20125a89' })));
|
|
87
159
|
}
|
|
88
160
|
static get watchers() { return {
|
|
89
161
|
"open": [{
|
|
90
162
|
"syncFromProp": 0
|
|
163
|
+
}],
|
|
164
|
+
"for": [{
|
|
165
|
+
"resetSurface": 0
|
|
166
|
+
}],
|
|
167
|
+
"placement": [{
|
|
168
|
+
"resetSurface": 0
|
|
169
|
+
}],
|
|
170
|
+
"internalOpen": [{
|
|
171
|
+
"syncSurface": 0
|
|
91
172
|
}]
|
|
92
173
|
}; }
|
|
93
174
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D07f6BOw.js');
|
|
4
|
-
var manager = require('./manager-
|
|
4
|
+
var manager = require('./manager-C9j3HZay.js');
|
|
5
5
|
var events = require('./events-TcQIzpNv.js');
|
|
6
|
+
var positioning = require('./positioning-i0WrCAdF.js');
|
|
6
7
|
|
|
7
|
-
const uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg);max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:auto}`;
|
|
8
|
+
const uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg);max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:auto}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}`;
|
|
8
9
|
|
|
9
10
|
const UIPopover = class {
|
|
10
11
|
constructor(hostRef) {
|
|
@@ -13,8 +14,13 @@ const UIPopover = class {
|
|
|
13
14
|
get host() { return index.getElement(this); }
|
|
14
15
|
open = false;
|
|
15
16
|
defaultOpen = false;
|
|
17
|
+
/** Optional id of the element this popover follows in the top layer. */
|
|
18
|
+
for;
|
|
19
|
+
placement = 'bottom-start';
|
|
16
20
|
internalOpen = false;
|
|
17
21
|
overlayId = `ui-popover-${Math.random().toString(36).slice(2, 11)}`;
|
|
22
|
+
anchor = null;
|
|
23
|
+
surface = null;
|
|
18
24
|
syncFromProp() {
|
|
19
25
|
this.internalOpen = this.open;
|
|
20
26
|
}
|
|
@@ -35,12 +41,37 @@ const UIPopover = class {
|
|
|
35
41
|
});
|
|
36
42
|
}
|
|
37
43
|
}
|
|
44
|
+
resetSurface() {
|
|
45
|
+
this.setupSurface();
|
|
46
|
+
this.syncSurface();
|
|
47
|
+
}
|
|
48
|
+
setupSurface() {
|
|
49
|
+
this.surface?.destroy();
|
|
50
|
+
this.surface = null;
|
|
51
|
+
this.anchor = this.for ? this.host.ownerDocument.getElementById(this.for) : null;
|
|
52
|
+
if (!this.anchor)
|
|
53
|
+
return;
|
|
54
|
+
this.surface = positioning.createAnchoredSurface(this.host, {
|
|
55
|
+
anchor: this.anchor,
|
|
56
|
+
placement: this.placement,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
syncSurface() {
|
|
60
|
+
if (!this.surface)
|
|
61
|
+
return;
|
|
62
|
+
if (this.internalOpen)
|
|
63
|
+
this.surface.show();
|
|
64
|
+
else
|
|
65
|
+
this.surface.hide();
|
|
66
|
+
}
|
|
38
67
|
syncOverlay() {
|
|
68
|
+
this.syncSurface();
|
|
39
69
|
if (this.internalOpen) {
|
|
40
70
|
manager.openOverlay({
|
|
41
71
|
id: this.overlayId,
|
|
42
72
|
modal: false,
|
|
43
73
|
element: this.host,
|
|
74
|
+
relatedElements: this.anchor ? [this.anchor] : undefined,
|
|
44
75
|
dismissible: true,
|
|
45
76
|
requestClose: (reason, trigger) => this.handleRequestClose(reason, trigger),
|
|
46
77
|
});
|
|
@@ -53,10 +84,13 @@ const UIPopover = class {
|
|
|
53
84
|
this.syncFromProp();
|
|
54
85
|
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
55
86
|
this.host.addEventListener('keydown', this.onKeydown);
|
|
87
|
+
this.setupSurface();
|
|
56
88
|
this.syncOverlay();
|
|
57
89
|
}
|
|
58
90
|
disconnectedCallback() {
|
|
59
91
|
this.host.removeEventListener('keydown', this.onKeydown);
|
|
92
|
+
this.surface?.destroy();
|
|
93
|
+
this.surface = null;
|
|
60
94
|
manager.closeOverlay(this.overlayId);
|
|
61
95
|
}
|
|
62
96
|
componentDidUpdate() {
|
|
@@ -76,7 +110,7 @@ const UIPopover = class {
|
|
|
76
110
|
}
|
|
77
111
|
};
|
|
78
112
|
render() {
|
|
79
|
-
return (index.h(index.Host, { key: '
|
|
113
|
+
return (index.h(index.Host, { key: '8e45be54147ff8f76a0d5e7fd875c3f4cf5ac40a', "data-open": this.internalOpen ? '' : undefined, onKeyDown: this.onKeydown }, index.h("slot", { key: '3141729cd32c8dcdaec1fbd763eb034242563c8f' })));
|
|
80
114
|
}
|
|
81
115
|
static get watchers() { return {
|
|
82
116
|
"open": [{
|
|
@@ -84,6 +118,12 @@ const UIPopover = class {
|
|
|
84
118
|
}],
|
|
85
119
|
"internalOpen": [{
|
|
86
120
|
"onOpenChange": 0
|
|
121
|
+
}],
|
|
122
|
+
"for": [{
|
|
123
|
+
"resetSurface": 0
|
|
124
|
+
}],
|
|
125
|
+
"placement": [{
|
|
126
|
+
"resetSurface": 0
|
|
87
127
|
}]
|
|
88
128
|
}; }
|
|
89
129
|
};
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D07f6BOw.js');
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
|
+
var positioning = require('./positioning-i0WrCAdF.js');
|
|
5
6
|
|
|
6
|
-
const uiToastRegionCss = () => `:host{position:fixed;top:calc(var(--ui-space-4) + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:9999;display:grid;gap:var(--ui-space-2);inline-size:min(24rem, calc(100vw - (var(--ui-space-4) * 2)));max-inline-size:100%;pointer-events:none}:host>*{pointer-events:auto}::slotted([data-ui-toast]){display:grid;grid-template-columns:1fr auto;gap:var(--ui-space-2);align-items:start;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);padding:var(--ui-space-3) var(--ui-space-4);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-lg);animation:ui-toast-enter 0.25s var(--ui-motion-ease) forwards}@keyframes ui-toast-enter{from{opacity:0;transform:translateY(-0.5rem)}to{opacity:1;transform:translateY(0)}}::slotted([data-ui-toast][aria-hidden='true']){display:none}::slotted([data-ui-toast-dismiss]){border:0;background:transparent;color:var(--ui-text-secondary);cursor:pointer;font:inherit}`;
|
|
7
|
+
const uiToastRegionCss = () => `:host{position:fixed;top:calc(var(--ui-space-4) + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:9999;display:grid;gap:var(--ui-space-2);inline-size:min(24rem, calc(100vw - (var(--ui-space-4) * 2)));max-inline-size:100%;pointer-events:none}:host([popover]){right:auto;bottom:auto;margin:0}:host>*{pointer-events:auto}::slotted([data-ui-toast]){display:grid;grid-template-columns:1fr auto;gap:var(--ui-space-2);align-items:start;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);padding:var(--ui-space-3) var(--ui-space-4);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-lg);animation:ui-toast-enter 0.25s var(--ui-motion-ease) forwards}@keyframes ui-toast-enter{from{opacity:0;transform:translateY(-0.5rem)}to{opacity:1;transform:translateY(0)}}::slotted([data-ui-toast][aria-hidden='true']){display:none}::slotted([data-ui-toast-dismiss]){border:0;background:transparent;color:var(--ui-text-secondary);cursor:pointer;font:inherit}`;
|
|
7
8
|
|
|
8
9
|
const UIToastRegion = class {
|
|
9
10
|
constructor(hostRef) {
|
|
@@ -12,15 +13,26 @@ const UIToastRegion = class {
|
|
|
12
13
|
get host() { return index.getElement(this); }
|
|
13
14
|
open = true;
|
|
14
15
|
internalOpen = true;
|
|
16
|
+
surface = null;
|
|
15
17
|
syncFromProp() {
|
|
16
18
|
this.internalOpen = this.open;
|
|
17
19
|
}
|
|
20
|
+
syncSurface() {
|
|
21
|
+
if (this.internalOpen)
|
|
22
|
+
this.surface?.show();
|
|
23
|
+
else
|
|
24
|
+
this.surface?.hide();
|
|
25
|
+
}
|
|
18
26
|
componentDidLoad() {
|
|
27
|
+
this.surface = positioning.createViewportSurface(this.host);
|
|
19
28
|
this.syncFromProp();
|
|
29
|
+
this.syncSurface();
|
|
20
30
|
this.host.addEventListener('click', this.onClick);
|
|
21
31
|
}
|
|
22
32
|
disconnectedCallback() {
|
|
23
33
|
this.host.removeEventListener('click', this.onClick);
|
|
34
|
+
this.surface?.destroy();
|
|
35
|
+
this.surface = null;
|
|
24
36
|
}
|
|
25
37
|
getToasts() {
|
|
26
38
|
return Array.from(this.host.querySelectorAll('[data-ui-toast]'));
|
|
@@ -54,11 +66,14 @@ const UIToastRegion = class {
|
|
|
54
66
|
}
|
|
55
67
|
};
|
|
56
68
|
render() {
|
|
57
|
-
return (index.h(index.Host, { key: '
|
|
69
|
+
return (index.h(index.Host, { key: '693e24016ec0881a4d619a489f1b655feee41784', role: "region", "aria-label": "Notifications", "data-open": this.internalOpen ? '' : undefined }, index.h("slot", { key: 'e666b2a73a5d7eb8dd607df3d1c5135b78cf3775' })));
|
|
58
70
|
}
|
|
59
71
|
static get watchers() { return {
|
|
60
72
|
"open": [{
|
|
61
73
|
"syncFromProp": 0
|
|
74
|
+
}],
|
|
75
|
+
"internalOpen": [{
|
|
76
|
+
"syncSurface": 0
|
|
62
77
|
}]
|
|
63
78
|
}; }
|
|
64
79
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D07f6BOw.js');
|
|
4
|
-
var manager = require('./manager-
|
|
4
|
+
var manager = require('./manager-C9j3HZay.js');
|
|
5
5
|
var events = require('./events-TcQIzpNv.js');
|
|
6
|
+
var positioning = require('./positioning-i0WrCAdF.js');
|
|
6
7
|
|
|
7
|
-
const uiTooltipCss = () => `:host{display:inline-block;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md)}:host([hidden]){display:none !important}`;
|
|
8
|
+
const uiTooltipCss = () => `:host{position:fixed;inset:auto;margin:0;display:inline-block;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md);opacity:0;transform:translateY(4px);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host(:popover-open){opacity:1;transform:translateY(0)}@starting-style{:host(:popover-open){opacity:0;transform:translateY(4px)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host{transition:none}}`;
|
|
8
9
|
|
|
9
10
|
const UITooltip = class {
|
|
10
11
|
constructor(hostRef) {
|
|
@@ -14,51 +15,79 @@ const UITooltip = class {
|
|
|
14
15
|
for = '';
|
|
15
16
|
open = false;
|
|
16
17
|
defaultOpen = false;
|
|
18
|
+
placement = 'top-start';
|
|
19
|
+
/** Pointer hover intent delay in milliseconds. Keyboard focus is immediate. */
|
|
20
|
+
showDelay = 500;
|
|
21
|
+
/** Pointer leave grace period in milliseconds. */
|
|
22
|
+
hideDelay = 100;
|
|
17
23
|
internalOpen = false;
|
|
18
24
|
overlayId = `ui-tooltip-${Math.random().toString(36).slice(2, 11)}`;
|
|
19
25
|
trigger = null;
|
|
26
|
+
surface = null;
|
|
27
|
+
showTimer = null;
|
|
28
|
+
hideTimer = null;
|
|
20
29
|
syncFromProp() {
|
|
30
|
+
this.clearTimers();
|
|
21
31
|
this.internalOpen = this.open;
|
|
22
32
|
}
|
|
33
|
+
resetSurface() {
|
|
34
|
+
this.syncTrigger();
|
|
35
|
+
this.setupSurface();
|
|
36
|
+
this.syncOverlay();
|
|
37
|
+
}
|
|
23
38
|
syncOverlay() {
|
|
24
39
|
if (this.internalOpen) {
|
|
40
|
+
this.surface?.show();
|
|
25
41
|
manager.openOverlay({
|
|
26
42
|
id: this.overlayId,
|
|
27
43
|
modal: false,
|
|
28
44
|
element: this.host,
|
|
45
|
+
relatedElements: this.trigger ? [this.trigger] : undefined,
|
|
29
46
|
dismissible: true,
|
|
30
47
|
requestClose: (reason, trigger) => this.handleRequestClose(reason, trigger),
|
|
31
48
|
});
|
|
32
49
|
}
|
|
33
50
|
else {
|
|
51
|
+
this.surface?.hide();
|
|
34
52
|
manager.closeOverlay(this.overlayId);
|
|
35
53
|
}
|
|
36
54
|
}
|
|
37
55
|
componentDidLoad() {
|
|
38
56
|
this.syncFromProp();
|
|
39
57
|
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
58
|
+
this.syncTrigger();
|
|
59
|
+
this.setupSurface();
|
|
42
60
|
this.host.addEventListener('keydown', this.onKeydown);
|
|
43
61
|
this.syncOverlay();
|
|
44
62
|
}
|
|
45
63
|
componentDidUpdate() {
|
|
46
|
-
this.
|
|
47
|
-
this.attachTriggerListeners();
|
|
48
|
-
this.syncOverlay();
|
|
64
|
+
this.syncTrigger();
|
|
49
65
|
}
|
|
50
66
|
disconnectedCallback() {
|
|
67
|
+
this.clearTimers();
|
|
51
68
|
this.detachTriggerListeners();
|
|
69
|
+
this.surface?.destroy();
|
|
70
|
+
this.surface = null;
|
|
52
71
|
this.host.removeEventListener('keydown', this.onKeydown);
|
|
53
72
|
manager.closeOverlay(this.overlayId);
|
|
54
73
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
this.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
74
|
+
syncTrigger() {
|
|
75
|
+
const next = this.for
|
|
76
|
+
? this.host.ownerDocument.getElementById(this.for)
|
|
77
|
+
: this.host.previousElementSibling;
|
|
78
|
+
if (next === this.trigger)
|
|
79
|
+
return;
|
|
80
|
+
this.detachTriggerListeners();
|
|
81
|
+
this.trigger = next;
|
|
82
|
+
this.attachTriggerListeners();
|
|
83
|
+
this.surface?.setAnchor(next);
|
|
84
|
+
}
|
|
85
|
+
setupSurface() {
|
|
86
|
+
this.surface?.destroy();
|
|
87
|
+
this.surface = positioning.createAnchoredSurface(this.host, {
|
|
88
|
+
anchor: this.trigger,
|
|
89
|
+
placement: this.placement,
|
|
90
|
+
});
|
|
62
91
|
}
|
|
63
92
|
attachTriggerListeners() {
|
|
64
93
|
this.detachTriggerListeners();
|
|
@@ -77,31 +106,64 @@ const UITooltip = class {
|
|
|
77
106
|
this.trigger.removeEventListener('focusin', this.onTriggerFocusIn);
|
|
78
107
|
this.trigger.removeEventListener('focusout', this.onTriggerFocusOut);
|
|
79
108
|
}
|
|
109
|
+
clearShowTimer() {
|
|
110
|
+
if (this.showTimer === null)
|
|
111
|
+
return;
|
|
112
|
+
clearTimeout(this.showTimer);
|
|
113
|
+
this.showTimer = null;
|
|
114
|
+
}
|
|
115
|
+
clearHideTimer() {
|
|
116
|
+
if (this.hideTimer === null)
|
|
117
|
+
return;
|
|
118
|
+
clearTimeout(this.hideTimer);
|
|
119
|
+
this.hideTimer = null;
|
|
120
|
+
}
|
|
121
|
+
clearTimers() {
|
|
122
|
+
this.clearShowTimer();
|
|
123
|
+
this.clearHideTimer();
|
|
124
|
+
}
|
|
125
|
+
setInteractionOpen(nextOpen, trigger) {
|
|
126
|
+
if (this.internalOpen === nextOpen)
|
|
127
|
+
return;
|
|
128
|
+
this.internalOpen = nextOpen;
|
|
129
|
+
events.dispatchDetail(this.host, nextOpen ? 'open' : 'close', {
|
|
130
|
+
open: nextOpen,
|
|
131
|
+
reason: 'action',
|
|
132
|
+
trigger,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
80
135
|
onTriggerEnter = () => {
|
|
81
|
-
this.
|
|
82
|
-
|
|
83
|
-
|
|
136
|
+
this.clearHideTimer();
|
|
137
|
+
if (this.internalOpen || this.showTimer !== null)
|
|
138
|
+
return;
|
|
139
|
+
this.showTimer = setTimeout(() => {
|
|
140
|
+
this.showTimer = null;
|
|
141
|
+
this.setInteractionOpen(true, 'pointer');
|
|
142
|
+
}, Math.max(0, this.showDelay));
|
|
84
143
|
};
|
|
85
144
|
onTriggerLeave = () => {
|
|
86
|
-
this.
|
|
87
|
-
|
|
88
|
-
|
|
145
|
+
this.clearShowTimer();
|
|
146
|
+
if (!this.internalOpen || this.hideTimer !== null)
|
|
147
|
+
return;
|
|
148
|
+
this.hideTimer = setTimeout(() => {
|
|
149
|
+
this.hideTimer = null;
|
|
150
|
+
this.setInteractionOpen(false, 'pointer');
|
|
151
|
+
}, Math.max(0, this.hideDelay));
|
|
89
152
|
};
|
|
90
153
|
onTriggerFocusIn = () => {
|
|
91
|
-
this.
|
|
92
|
-
|
|
93
|
-
this.syncOverlay();
|
|
154
|
+
this.clearTimers();
|
|
155
|
+
this.setInteractionOpen(true, 'keyboard');
|
|
94
156
|
};
|
|
95
157
|
onTriggerFocusOut = (e) => {
|
|
96
158
|
const related = e.relatedTarget;
|
|
97
159
|
if (related && this.host.contains(related))
|
|
98
160
|
return;
|
|
99
|
-
this.
|
|
100
|
-
|
|
101
|
-
this.syncOverlay();
|
|
161
|
+
this.clearTimers();
|
|
162
|
+
this.setInteractionOpen(false, 'keyboard');
|
|
102
163
|
};
|
|
103
164
|
handleRequestClose(reason, trigger) {
|
|
104
165
|
if (reason === 'escape') {
|
|
166
|
+
this.clearTimers();
|
|
105
167
|
this.internalOpen = false;
|
|
106
168
|
events.dispatchDetail(this.host, 'close', {
|
|
107
169
|
open: false,
|
|
@@ -117,12 +179,18 @@ const UITooltip = class {
|
|
|
117
179
|
}
|
|
118
180
|
};
|
|
119
181
|
render() {
|
|
120
|
-
return (index.h(index.Host, { key: '
|
|
182
|
+
return (index.h(index.Host, { key: '4c3890a7371508ede06a5b370d1cec32db25280f', role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? '' : undefined, onKeyDown: this.onKeydown }, index.h("slot", { key: '2e3bcd0dc69b0c3e3376d73dc4efc82e4f4cfaaa' })));
|
|
121
183
|
}
|
|
122
184
|
static get watchers() { return {
|
|
123
185
|
"open": [{
|
|
124
186
|
"syncFromProp": 0
|
|
125
187
|
}],
|
|
188
|
+
"for": [{
|
|
189
|
+
"resetSurface": 0
|
|
190
|
+
}],
|
|
191
|
+
"placement": [{
|
|
192
|
+
"resetSurface": 0
|
|
193
|
+
}],
|
|
126
194
|
"internalOpen": [{
|
|
127
195
|
"syncOverlay": 0
|
|
128
196
|
}]
|
|
@@ -603,7 +603,7 @@ function loomaIconMarkup(name, className = 'looma-icon') {
|
|
|
603
603
|
].join('');
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
-
const uiTreeItemCss = () => `:host{--ui-tree-indent:16px;--ui-tree-row-min-height:
|
|
606
|
+
const uiTreeItemCss = () => `:host{--ui-tree-indent:16px;--ui-tree-row-min-height:32px;--ui-tree-drop-color:var(--ui-accent-solid);position:relative;display:block;min-inline-size:0;margin-inline-start:calc(var(--ui-tree-item-depth, 0) * var(--ui-tree-indent))}.row{position:relative;display:grid;grid-template-columns:20px auto minmax(0, 1fr) auto;align-items:center;min-block-size:var(--ui-tree-row-min-height);min-inline-size:0;font-size:var(--ui-tree-font-size, var(--ui-font-size-ui, 0.9375rem));border-radius:var(--ui-radius-md);color:var(--ui-text-secondary);transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), opacity var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), min-block-size var(--ui-motion-base) var(--ui-motion-ease)}.row:hover,:host([data-selected]) .row,.row:focus-within{color:var(--ui-text-primary);background:var(--ui-surface-muted)}:host([data-disabled]) .row{opacity:0.55}:host([data-dragging]) .row{opacity:0.42}:host(:focus){outline:none}:host(:focus-visible) .row{box-shadow:0 0 0 2px var(--ui-focus-ring)}:host([data-drop-position='inside']) .row{background:var(--ui-accent-subtle);box-shadow:inset 0 0 0 1px var(--ui-tree-drop-color)}.disclosure,.disclosure-spacer{grid-column:1;grid-row:1;inline-size:20px;block-size:28px}.disclosure{display:grid;place-items:center;padding:0;color:var(--ui-text-muted);background:transparent;border:0;border-radius:var(--ui-radius-sm);cursor:pointer}.disclosure:hover{color:var(--ui-text-primary);background:var(--ui-surface-elevated)}.disclosure-icon{display:block;inline-size:14px;block-size:14px;transform:rotate(-90deg);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}.disclosure-icon--expanded{transform:rotate(0deg)}.disclosure-icon :is(svg),.drag-handle :is(svg){display:block;inline-size:100%;block-size:100%}.leading{display:none}.leading:has(*){display:inline-grid;place-items:center;grid-column:2;grid-row:1;inline-size:16px;block-size:16px;margin-inline-start:var(--ui-space-1)}.label{grid-column:3;grid-row:1;min-inline-size:0;padding:var(--ui-space-1) var(--ui-space-2)}.actions{grid-column:4;grid-row:1;display:inline-flex;align-items:center;min-inline-size:0}.drag-handle{position:absolute;z-index:2;inset-block-start:50%;inset-inline-start:-22px;inline-size:20px;block-size:32px;display:grid;place-items:center;padding:7px 3px;color:var(--ui-text-muted);background:var(--ui-surface-elevated);border:1px solid transparent;border-radius:var(--ui-radius-sm);cursor:grab;opacity:0;pointer-events:none;transform:translateY(-50%);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease)}.row:hover .drag-handle,.drag-handle:focus-visible,:host([data-dragging]) .drag-handle{opacity:1;pointer-events:auto}.drag-handle:active{cursor:grabbing}.drop-indicator{position:absolute;z-index:3;inset-inline:1px;display:none;block-size:2px;border-radius:999px;background:var(--ui-tree-drop-color);pointer-events:none}.drop-indicator::before,.drop-indicator::after{content:'';position:absolute;inset-block-start:50%;inline-size:7px;block-size:7px;border:2px solid var(--ui-tree-drop-color);border-radius:999px;background:var(--ui-surface-elevated);transform:translateY(-50%)}.drop-indicator::before{inset-inline-start:-1px}.drop-indicator::after{inset-inline-end:-1px}:host([data-drop-position='before']) .drop-indicator{display:block;inset-block-start:-1px}:host([data-drop-position='after']) .drop-indicator{display:block;inset-block-end:-1px}.children[hidden]{display:none}:host-context(html[data-ui-input-modality='touch']){--ui-tree-row-min-height:44px}:host-context(html[data-ui-input-modality='touch']) .drag-handle{display:none}@media (prefers-reduced-motion: reduce){.row,.disclosure-icon,.drag-handle{transition:none}}`;
|
|
607
607
|
|
|
608
608
|
const UITreeItem = class {
|
|
609
609
|
constructor(hostRef) {
|
|
@@ -2,16 +2,33 @@
|
|
|
2
2
|
display: contents;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
:host([data-focus-trigger='pointer']) ::slotted(ui-menu-item:focus) {
|
|
6
|
+
outline: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
5
9
|
.menu {
|
|
6
10
|
position: fixed;
|
|
11
|
+
inset: auto;
|
|
12
|
+
margin: 0;
|
|
7
13
|
z-index: var(--ui-z-overlay, 1000);
|
|
8
14
|
min-width: 12rem;
|
|
15
|
+
opacity: 0;
|
|
16
|
+
transform: translateY(-4px) scale(0.99);
|
|
17
|
+
transition:
|
|
18
|
+
opacity var(--ui-motion-fast) var(--ui-motion-ease),
|
|
19
|
+
transform var(--ui-motion-fast) var(--ui-motion-ease),
|
|
20
|
+
display var(--ui-motion-fast) allow-discrete,
|
|
21
|
+
overlay var(--ui-motion-fast) allow-discrete;
|
|
9
22
|
}
|
|
10
23
|
|
|
11
|
-
.menu
|
|
12
|
-
|
|
24
|
+
.menu:popover-open { opacity: 1; transform: translateY(0) scale(1); }
|
|
25
|
+
|
|
26
|
+
@starting-style {
|
|
27
|
+
.menu:popover-open { opacity: 0; transform: translateY(-4px) scale(0.99); }
|
|
13
28
|
}
|
|
14
29
|
|
|
15
|
-
.menu
|
|
16
|
-
|
|
30
|
+
.menu[hidden] { display: none !important; }
|
|
31
|
+
|
|
32
|
+
@media (prefers-reduced-motion: reduce) {
|
|
33
|
+
.menu { transition: none; }
|
|
17
34
|
}
|