@threadlabs/looma 0.1.20 → 0.1.21
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/dist/{chunk-RLSUA6N5.js → chunk-FSGGPFID.js} +29 -29
- package/dist/cjs/ui-tree.cjs.entry.js +16 -3
- package/dist/collection/components/ui-tree/ui-tree.js +16 -3
- package/dist/components/ui-tree.js +1 -1
- package/dist/esm/ui-tree.entry.js +16 -3
- package/dist/index.cjs +16 -3
- package/dist/index.js +1 -1
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/p-b0431118.entry.js +1 -0
- package/dist/types/components/ui-tree/ui-tree.d.ts +1 -0
- package/dist/{ui-affordance-scope.entry-TEYCR7NX.js → ui-affordance-scope.entry-Z3H4CM6J.js} +1 -1
- package/dist/{ui-avatar-group.entry-Z2JCVPMM.js → ui-avatar-group.entry-ONGVFRD3.js} +1 -1
- package/dist/{ui-avatar.entry-CDDUQV4B.js → ui-avatar.entry-TBA3IEED.js} +1 -1
- package/dist/{ui-badge.entry-ELFAXPKR.js → ui-badge.entry-DKBPJ7G7.js} +1 -1
- package/dist/{ui-button.entry-S5GEJ55S.js → ui-button.entry-U2MMIHLY.js} +1 -1
- package/dist/{ui-checkbox.entry-NFXU5LDX.js → ui-checkbox.entry-QJTO2U6Z.js} +1 -1
- package/dist/{ui-context-menu.entry-W5F6LBEC.js → ui-context-menu.entry-CC4VXCEB.js} +1 -1
- package/dist/{ui-dialog.entry-G2K37IUH.js → ui-dialog.entry-GPJWOH5Z.js} +1 -1
- package/dist/{ui-disclosure.entry-JO3XAMCC.js → ui-disclosure.entry-EGG3HXD4.js} +1 -1
- package/dist/{ui-floating-action-button.entry-EXXENSSO.js → ui-floating-action-button.entry-XUD44HRX.js} +1 -1
- package/dist/{ui-form-field.entry-L62S6Z62.js → ui-form-field.entry-UHLNDUXR.js} +1 -1
- package/dist/{ui-icon-button.entry-D7I7BV27.js → ui-icon-button.entry-6HDCV3E7.js} +1 -1
- package/dist/{ui-input.entry-YDFDXMZE.js → ui-input.entry-73QXAVLL.js} +1 -1
- package/dist/{ui-menu-item.entry-QH7UGDFX.js → ui-menu-item.entry-HCZRSY5Y.js} +1 -1
- package/dist/{ui-menu.entry-YIQOPJOS.js → ui-menu.entry-ASIVAX6M.js} +1 -1
- package/dist/{ui-popover.entry-XN2IOEYH.js → ui-popover.entry-WSQ7AEJN.js} +1 -1
- package/dist/{ui-radio-group.entry-C7ESTJSS.js → ui-radio-group.entry-2N7BEBJW.js} +1 -1
- package/dist/{ui-radio.entry-AKVI5OUS.js → ui-radio.entry-TOM6HBXP.js} +1 -1
- package/dist/{ui-search-result-row.entry-3BY6GUCL.js → ui-search-result-row.entry-KA3P76WE.js} +1 -1
- package/dist/{ui-search-shell.entry-2Z3GUR2I.js → ui-search-shell.entry-ERMS7TIH.js} +1 -1
- package/dist/{ui-select.entry-2YQLACCA.js → ui-select.entry-KDIM3SWS.js} +1 -1
- package/dist/{ui-switch.entry-N5HDUJIW.js → ui-switch.entry-VRTB6X4D.js} +1 -1
- package/dist/{ui-tabs.entry-FVOVVZOQ.js → ui-tabs.entry-GIAO5W3U.js} +1 -1
- package/dist/{ui-textarea.entry-ZFGGCBLG.js → ui-textarea.entry-T6YH4HVG.js} +1 -1
- package/dist/{ui-toast-region.entry-AA2DEUUZ.js → ui-toast-region.entry-DBQCXOPJ.js} +1 -1
- package/dist/{ui-tooltip.entry-WN4PYNTZ.js → ui-tooltip.entry-VS26OECS.js} +1 -1
- package/dist/{ui-top-bar.entry-ZYYXC7OA.js → ui-top-bar.entry-HGWP6PFQ.js} +1 -1
- package/dist/{ui-tree-item.entry-HWCNTX6N.js → ui-tree-item.entry-ZRXUIZDR.js} +1 -1
- package/dist/{ui-tree.entry-6NPGKN5P.js → ui-tree.entry-TC2SCQJF.js} +17 -4
- package/editor/{chunk-3QMBK3XZ.js → chunk-64GLF274.js} +12 -2
- package/editor/{chunk-OXFYYLUC.js → chunk-QCOYOVQL.js} +83 -15
- package/editor/extensions/index.d.ts +7 -2
- package/editor/extensions/index.js +5 -1
- package/editor/index.d.ts +1 -1
- package/editor/index.js +6 -2
- package/editor/ui.js +1 -1
- package/editor.css +49 -0
- package/package.json +1 -1
- package/dist/looma/p-979b8ab1.entry.js +0 -1
|
@@ -6,35 +6,35 @@ var __glob = (map) => (path) => {
|
|
|
6
6
|
|
|
7
7
|
// import("./**/*.entry.js") in dist/esm/index-CEeiinfk.js
|
|
8
8
|
var globImport_entry_js = __glob({
|
|
9
|
-
"./ui-affordance-scope.entry.js": () => import("./ui-affordance-scope.entry-
|
|
10
|
-
"./ui-avatar-group.entry.js": () => import("./ui-avatar-group.entry-
|
|
11
|
-
"./ui-avatar.entry.js": () => import("./ui-avatar.entry-
|
|
12
|
-
"./ui-badge.entry.js": () => import("./ui-badge.entry-
|
|
13
|
-
"./ui-button.entry.js": () => import("./ui-button.entry-
|
|
14
|
-
"./ui-checkbox.entry.js": () => import("./ui-checkbox.entry-
|
|
15
|
-
"./ui-context-menu.entry.js": () => import("./ui-context-menu.entry-
|
|
16
|
-
"./ui-dialog.entry.js": () => import("./ui-dialog.entry-
|
|
17
|
-
"./ui-disclosure.entry.js": () => import("./ui-disclosure.entry-
|
|
18
|
-
"./ui-floating-action-button.entry.js": () => import("./ui-floating-action-button.entry-
|
|
19
|
-
"./ui-form-field.entry.js": () => import("./ui-form-field.entry-
|
|
20
|
-
"./ui-icon-button.entry.js": () => import("./ui-icon-button.entry-
|
|
21
|
-
"./ui-input.entry.js": () => import("./ui-input.entry-
|
|
22
|
-
"./ui-menu-item.entry.js": () => import("./ui-menu-item.entry-
|
|
23
|
-
"./ui-menu.entry.js": () => import("./ui-menu.entry-
|
|
24
|
-
"./ui-popover.entry.js": () => import("./ui-popover.entry-
|
|
25
|
-
"./ui-radio-group.entry.js": () => import("./ui-radio-group.entry-
|
|
26
|
-
"./ui-radio.entry.js": () => import("./ui-radio.entry-
|
|
27
|
-
"./ui-search-result-row.entry.js": () => import("./ui-search-result-row.entry-
|
|
28
|
-
"./ui-search-shell.entry.js": () => import("./ui-search-shell.entry-
|
|
29
|
-
"./ui-select.entry.js": () => import("./ui-select.entry-
|
|
30
|
-
"./ui-switch.entry.js": () => import("./ui-switch.entry-
|
|
31
|
-
"./ui-tabs.entry.js": () => import("./ui-tabs.entry-
|
|
32
|
-
"./ui-textarea.entry.js": () => import("./ui-textarea.entry-
|
|
33
|
-
"./ui-toast-region.entry.js": () => import("./ui-toast-region.entry-
|
|
34
|
-
"./ui-tooltip.entry.js": () => import("./ui-tooltip.entry-
|
|
35
|
-
"./ui-top-bar.entry.js": () => import("./ui-top-bar.entry-
|
|
36
|
-
"./ui-tree-item.entry.js": () => import("./ui-tree-item.entry-
|
|
37
|
-
"./ui-tree.entry.js": () => import("./ui-tree.entry-
|
|
9
|
+
"./ui-affordance-scope.entry.js": () => import("./ui-affordance-scope.entry-Z3H4CM6J.js"),
|
|
10
|
+
"./ui-avatar-group.entry.js": () => import("./ui-avatar-group.entry-ONGVFRD3.js"),
|
|
11
|
+
"./ui-avatar.entry.js": () => import("./ui-avatar.entry-TBA3IEED.js"),
|
|
12
|
+
"./ui-badge.entry.js": () => import("./ui-badge.entry-DKBPJ7G7.js"),
|
|
13
|
+
"./ui-button.entry.js": () => import("./ui-button.entry-U2MMIHLY.js"),
|
|
14
|
+
"./ui-checkbox.entry.js": () => import("./ui-checkbox.entry-QJTO2U6Z.js"),
|
|
15
|
+
"./ui-context-menu.entry.js": () => import("./ui-context-menu.entry-CC4VXCEB.js"),
|
|
16
|
+
"./ui-dialog.entry.js": () => import("./ui-dialog.entry-GPJWOH5Z.js"),
|
|
17
|
+
"./ui-disclosure.entry.js": () => import("./ui-disclosure.entry-EGG3HXD4.js"),
|
|
18
|
+
"./ui-floating-action-button.entry.js": () => import("./ui-floating-action-button.entry-XUD44HRX.js"),
|
|
19
|
+
"./ui-form-field.entry.js": () => import("./ui-form-field.entry-UHLNDUXR.js"),
|
|
20
|
+
"./ui-icon-button.entry.js": () => import("./ui-icon-button.entry-6HDCV3E7.js"),
|
|
21
|
+
"./ui-input.entry.js": () => import("./ui-input.entry-73QXAVLL.js"),
|
|
22
|
+
"./ui-menu-item.entry.js": () => import("./ui-menu-item.entry-HCZRSY5Y.js"),
|
|
23
|
+
"./ui-menu.entry.js": () => import("./ui-menu.entry-ASIVAX6M.js"),
|
|
24
|
+
"./ui-popover.entry.js": () => import("./ui-popover.entry-WSQ7AEJN.js"),
|
|
25
|
+
"./ui-radio-group.entry.js": () => import("./ui-radio-group.entry-2N7BEBJW.js"),
|
|
26
|
+
"./ui-radio.entry.js": () => import("./ui-radio.entry-TOM6HBXP.js"),
|
|
27
|
+
"./ui-search-result-row.entry.js": () => import("./ui-search-result-row.entry-KA3P76WE.js"),
|
|
28
|
+
"./ui-search-shell.entry.js": () => import("./ui-search-shell.entry-ERMS7TIH.js"),
|
|
29
|
+
"./ui-select.entry.js": () => import("./ui-select.entry-KDIM3SWS.js"),
|
|
30
|
+
"./ui-switch.entry.js": () => import("./ui-switch.entry-VRTB6X4D.js"),
|
|
31
|
+
"./ui-tabs.entry.js": () => import("./ui-tabs.entry-GIAO5W3U.js"),
|
|
32
|
+
"./ui-textarea.entry.js": () => import("./ui-textarea.entry-T6YH4HVG.js"),
|
|
33
|
+
"./ui-toast-region.entry.js": () => import("./ui-toast-region.entry-DBQCXOPJ.js"),
|
|
34
|
+
"./ui-tooltip.entry.js": () => import("./ui-tooltip.entry-VS26OECS.js"),
|
|
35
|
+
"./ui-top-bar.entry.js": () => import("./ui-top-bar.entry-HGWP6PFQ.js"),
|
|
36
|
+
"./ui-tree-item.entry.js": () => import("./ui-tree-item.entry-ZRXUIZDR.js"),
|
|
37
|
+
"./ui-tree.entry.js": () => import("./ui-tree.entry-TC2SCQJF.js")
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
// dist/esm/index-CEeiinfk.js
|
|
@@ -71,6 +71,7 @@ const UITree = class {
|
|
|
71
71
|
componentDidLoad() {
|
|
72
72
|
this.hoverIntent = createHoverIntent(this.hoverExpandDelay, this.expandTarget);
|
|
73
73
|
this.host.addEventListener('dragstart', this.onDragStart);
|
|
74
|
+
this.host.addEventListener('dragenter', this.onDragOver);
|
|
74
75
|
this.host.addEventListener('dragover', this.onDragOver);
|
|
75
76
|
this.host.addEventListener('dragleave', this.onDragLeave);
|
|
76
77
|
this.host.addEventListener('drop', this.onDrop);
|
|
@@ -80,6 +81,7 @@ const UITree = class {
|
|
|
80
81
|
disconnectedCallback() {
|
|
81
82
|
this.hoverIntent?.destroy();
|
|
82
83
|
this.host.removeEventListener('dragstart', this.onDragStart);
|
|
84
|
+
this.host.removeEventListener('dragenter', this.onDragOver);
|
|
83
85
|
this.host.removeEventListener('dragover', this.onDragOver);
|
|
84
86
|
this.host.removeEventListener('dragleave', this.onDragLeave);
|
|
85
87
|
this.host.removeEventListener('drop', this.onDrop);
|
|
@@ -106,6 +108,16 @@ const UITree = class {
|
|
|
106
108
|
}
|
|
107
109
|
return null;
|
|
108
110
|
}
|
|
111
|
+
isWithinTree(node) {
|
|
112
|
+
let element = node instanceof HTMLElement ? node : null;
|
|
113
|
+
while (element) {
|
|
114
|
+
if (element === this.host || this.host.contains(element))
|
|
115
|
+
return true;
|
|
116
|
+
const root = element.getRootNode();
|
|
117
|
+
element = root instanceof ShadowRoot ? root.host : element.parentElement;
|
|
118
|
+
}
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
109
121
|
acceptsChildren(item) {
|
|
110
122
|
return Boolean(item.container ?? item.hasAttribute('container'))
|
|
111
123
|
&& !Boolean(item.disabled ?? item.hasAttribute('disabled'));
|
|
@@ -211,8 +223,9 @@ const UITree = class {
|
|
|
211
223
|
}
|
|
212
224
|
};
|
|
213
225
|
onDragLeave = (event) => {
|
|
214
|
-
|
|
215
|
-
|
|
226
|
+
if (this.isWithinTree(event.relatedTarget))
|
|
227
|
+
return;
|
|
228
|
+
if (this.itemAtPoint(event.clientX, event.clientY))
|
|
216
229
|
return;
|
|
217
230
|
this.clearTarget();
|
|
218
231
|
};
|
|
@@ -275,7 +288,7 @@ const UITree = class {
|
|
|
275
288
|
next.focus();
|
|
276
289
|
};
|
|
277
290
|
render() {
|
|
278
|
-
return (index.h(index.Host, { key: '
|
|
291
|
+
return (index.h(index.Host, { key: 'b659635f6acdf09a3618c514f5bdd9bf173f9d98', role: "tree", "aria-label": this.label || 'Tree' }, index.h("slot", { key: '0815f0eb0bfe766dd2f358385af1516fd4328e2e' })));
|
|
279
292
|
}
|
|
280
293
|
};
|
|
281
294
|
UITree.style = uiTreeCss();
|
|
@@ -12,6 +12,7 @@ export class UITree {
|
|
|
12
12
|
componentDidLoad() {
|
|
13
13
|
this.hoverIntent = createHoverIntent(this.hoverExpandDelay, this.expandTarget);
|
|
14
14
|
this.host.addEventListener('dragstart', this.onDragStart);
|
|
15
|
+
this.host.addEventListener('dragenter', this.onDragOver);
|
|
15
16
|
this.host.addEventListener('dragover', this.onDragOver);
|
|
16
17
|
this.host.addEventListener('dragleave', this.onDragLeave);
|
|
17
18
|
this.host.addEventListener('drop', this.onDrop);
|
|
@@ -21,6 +22,7 @@ export class UITree {
|
|
|
21
22
|
disconnectedCallback() {
|
|
22
23
|
this.hoverIntent?.destroy();
|
|
23
24
|
this.host.removeEventListener('dragstart', this.onDragStart);
|
|
25
|
+
this.host.removeEventListener('dragenter', this.onDragOver);
|
|
24
26
|
this.host.removeEventListener('dragover', this.onDragOver);
|
|
25
27
|
this.host.removeEventListener('dragleave', this.onDragLeave);
|
|
26
28
|
this.host.removeEventListener('drop', this.onDrop);
|
|
@@ -47,6 +49,16 @@ export class UITree {
|
|
|
47
49
|
}
|
|
48
50
|
return null;
|
|
49
51
|
}
|
|
52
|
+
isWithinTree(node) {
|
|
53
|
+
let element = node instanceof HTMLElement ? node : null;
|
|
54
|
+
while (element) {
|
|
55
|
+
if (element === this.host || this.host.contains(element))
|
|
56
|
+
return true;
|
|
57
|
+
const root = element.getRootNode();
|
|
58
|
+
element = root instanceof ShadowRoot ? root.host : element.parentElement;
|
|
59
|
+
}
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
50
62
|
acceptsChildren(item) {
|
|
51
63
|
return Boolean(item.container ?? item.hasAttribute('container'))
|
|
52
64
|
&& !Boolean(item.disabled ?? item.hasAttribute('disabled'));
|
|
@@ -152,8 +164,9 @@ export class UITree {
|
|
|
152
164
|
}
|
|
153
165
|
};
|
|
154
166
|
onDragLeave = (event) => {
|
|
155
|
-
|
|
156
|
-
|
|
167
|
+
if (this.isWithinTree(event.relatedTarget))
|
|
168
|
+
return;
|
|
169
|
+
if (this.itemAtPoint(event.clientX, event.clientY))
|
|
157
170
|
return;
|
|
158
171
|
this.clearTarget();
|
|
159
172
|
};
|
|
@@ -216,7 +229,7 @@ export class UITree {
|
|
|
216
229
|
next.focus();
|
|
217
230
|
};
|
|
218
231
|
render() {
|
|
219
|
-
return (h(Host, { key: '
|
|
232
|
+
return (h(Host, { key: 'b659635f6acdf09a3618c514f5bdd9bf173f9d98', role: "tree", "aria-label": this.label || 'Tree' }, h("slot", { key: '0815f0eb0bfe766dd2f358385af1516fd4328e2e' })));
|
|
220
233
|
}
|
|
221
234
|
static get is() { return "ui-tree"; }
|
|
222
235
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as i,c as s,t as r}from"./p-CIA4RyEp.js";import{d as n}from"./p-JwSoedEO.js";function o(t,e,i){const s=t.height>0?Math.min(1,Math.max(0,(e-t.top)/t.height)):.5;return i?s<.25?"before":s>.75?"after":"inside":s<.5?"before":"after"}const
|
|
1
|
+
import{p as t,H as e,h as i,c as s,t as r}from"./p-CIA4RyEp.js";import{d as n}from"./p-JwSoedEO.js";function o(t,e,i){const s=t.height>0?Math.min(1,Math.max(0,(e-t.top)/t.height)):.5;return i?s<.25?"before":s>.75?"after":"inside":s<.5?"before":"after"}const h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get host(){return this}label="Tree";hoverExpandDelay=700;source=null;target=null;position=null;hoverIntent=null;componentDidLoad(){this.hoverIntent=function(t,e){let i,s;function r(){i&&clearTimeout(i),i=void 0,s=void 0}return{schedule(n){s===n&&i||(r(),s=n,i=setTimeout((()=>{i=void 0;const t=s;s=void 0,t&&e(t)}),Math.max(0,t)))},cancel:r,destroy:r}}(this.hoverExpandDelay,this.expandTarget),this.host.addEventListener("dragstart",this.onDragStart),this.host.addEventListener("dragenter",this.onDragOver),this.host.addEventListener("dragover",this.onDragOver),this.host.addEventListener("dragleave",this.onDragLeave),this.host.addEventListener("drop",this.onDrop),this.host.addEventListener("dragend",this.onDragEnd),this.host.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){this.hoverIntent?.destroy(),this.host.removeEventListener("dragstart",this.onDragStart),this.host.removeEventListener("dragenter",this.onDragOver),this.host.removeEventListener("dragover",this.onDragOver),this.host.removeEventListener("dragleave",this.onDragLeave),this.host.removeEventListener("drop",this.onDrop),this.host.removeEventListener("dragend",this.onDragEnd),this.host.removeEventListener("keydown",this.onKeyDown)}itemFromEvent(t){return t.composedPath().find((t=>t instanceof e&&"ui-tree-item"===t.localName))??null}itemId(t){return t.itemId||t.getAttribute("item-id")||""}rowFor(t){return t.shadowRoot?.querySelector('[part="row"]')??null}itemAtPoint(t,e){let i=this.host.ownerDocument.elementFromPoint(t,e);for(;i;){if("ui-tree-item"===i.localName&&this.host.contains(i))return i;const t=i.getRootNode();i=t instanceof ShadowRoot?t.host:i.parentElement}return null}isWithinTree(t){let i=t instanceof e?t:null;for(;i;){if(i===this.host||this.host.contains(i))return!0;const t=i.getRootNode();i=t instanceof ShadowRoot?t.host:i.parentElement}return!1}acceptsChildren(t){return!!(t.container??t.hasAttribute("container"))&&!(t.disabled??t.hasAttribute("disabled"))}itemMetadata(t){return{type:t.getAttribute("data-drag-type")||t.getAttribute("drag-type")||"item",scope:t.getAttribute("data-drop-scope")||t.getAttribute("drop-scope")||"",accepts:(t.getAttribute("data-accepts")||t.getAttribute("accepts")||"").split(",").map((t=>t.trim())).filter(Boolean)}}permitsDrop(t,e,i){if(t.contains(e))return!1;const s=this.itemMetadata(t),r=this.itemMetadata(e);return"inside"===i?this.acceptsChildren(e)&&(0===r.accepts.length||r.accepts.includes(s.type)):s.type===r.type}clearTarget(){this.target?.removeAttribute("data-drop-position"),this.target=null,this.position=null,this.hoverIntent?.cancel()}finishDrag(){this.source?.removeAttribute("data-dragging"),this.source=null,this.clearTarget()}expandTarget=t=>{const e=Array.from(this.host.querySelectorAll("ui-tree-item")).find((e=>this.itemId(e)===t));e&&"false"===e.getAttribute("aria-expanded")&&e.dispatchEvent(new CustomEvent("ui-tree-auto-expand"))};onDragStart=t=>{const i=this.itemFromEvent(t);if(!i||!(i.sortable??i.hasAttribute("sortable"))||(i.disabled??i.hasAttribute("disabled")))return;if(!t.composedPath().some((t=>t instanceof e&&"drag-handle"===t.getAttribute("part"))))return void t.preventDefault();const s=this.itemId(i),r=this.rowFor(i);s&&r?(this.source=i,i.setAttribute("data-dragging","true"),t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",s)),function(t,e){if(!t||"function"!=typeof t.setDragImage)return;const{height:i}=e.getBoundingClientRect();t.setDragImage(e,16,Math.max(0,i/2))}(t.dataTransfer,r)):t.preventDefault()};onDragOver=t=>{if(!this.source)return;const e=this.itemFromEvent(t);if(!e||e===this.source)return void this.clearTarget();const i=this.rowFor(e);if(!i)return;const s=o(i.getBoundingClientRect(),t.clientY,this.acceptsChildren(e));if(!this.permitsDrop(this.source,e,s))return t.dataTransfer&&(t.dataTransfer.dropEffect="none"),void this.clearTarget();t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"),this.target===e&&this.position===s||(this.clearTarget(),this.target=e,this.position=s,e.setAttribute("data-drop-position",s)),"inside"===s&&"false"===e.getAttribute("aria-expanded")?this.hoverIntent?.schedule(this.itemId(e)):this.hoverIntent?.cancel()};onDragLeave=t=>{this.isWithinTree(t.relatedTarget)||this.itemAtPoint(t.clientX,t.clientY)||this.clearTarget()};dispatchReorder(t,e,i){const s=this.itemId(t),r=this.itemId(e);if(!s||!r)return;const o=this.itemMetadata(t),h=this.itemMetadata(e);n(this.host,"reorder",{sourceId:s,targetId:r,position:i,sourceType:o.type,targetType:h.type,sourceScope:o.scope,targetScope:h.scope,trigger:"pointer"})}onDrop=t=>{this.source&&this.target&&this.position&&(t.preventDefault(),this.dispatchReorder(this.source,this.target,this.position),this.finishDrag())};onDragEnd=t=>{if(this.source){const e=this.itemAtPoint(t.clientX,t.clientY);if(e&&e!==this.source){const i=this.rowFor(e);if(i){const s=o(i.getBoundingClientRect(),t.clientY,this.acceptsChildren(e));this.permitsDrop(this.source,e,s)&&this.dispatchReorder(this.source,e,s)}}}this.finishDrag()};visibleItems(){return Array.from(this.host.querySelectorAll("ui-tree-item")).filter((t=>t.getClientRects().length>0&&!t.hasAttribute("disabled")))}onKeyDown=t=>{const e=this.itemFromEvent(t);if(!e)return;const i=this.visibleItems(),s=i.indexOf(e);if(s<0)return;const r="ArrowDown"===t.key?i[s+1]:"ArrowUp"===t.key?i[s-1]:null;r&&(t.preventDefault(),r.focus())};render(){return i(s,{key:"b659635f6acdf09a3618c514f5bdd9bf173f9d98",role:"tree","aria-label":this.label||"Tree"},i("slot",{key:"0815f0eb0bfe766dd2f358385af1516fd4328e2e"}))}static get style(){return":host{--ui-tree-indent:16px;display:block;min-inline-size:0;padding-inline-start:var(--ui-tree-gutter, 22px)}::slotted(ui-tree-item){--ui-tree-indent:inherit}"}},[769,"ui-tree",{label:[1],hoverExpandDelay:[2,"hover-expand-delay"]}]),a=h,d=function(){"undefined"!=typeof customElements&&["ui-tree"].forEach((t=>{"ui-tree"===t&&(customElements.get(r(t))||customElements.define(r(t),h))}))};export{a as UiTree,d as defineCustomElement}
|
|
@@ -69,6 +69,7 @@ const UITree = class {
|
|
|
69
69
|
componentDidLoad() {
|
|
70
70
|
this.hoverIntent = createHoverIntent(this.hoverExpandDelay, this.expandTarget);
|
|
71
71
|
this.host.addEventListener('dragstart', this.onDragStart);
|
|
72
|
+
this.host.addEventListener('dragenter', this.onDragOver);
|
|
72
73
|
this.host.addEventListener('dragover', this.onDragOver);
|
|
73
74
|
this.host.addEventListener('dragleave', this.onDragLeave);
|
|
74
75
|
this.host.addEventListener('drop', this.onDrop);
|
|
@@ -78,6 +79,7 @@ const UITree = class {
|
|
|
78
79
|
disconnectedCallback() {
|
|
79
80
|
this.hoverIntent?.destroy();
|
|
80
81
|
this.host.removeEventListener('dragstart', this.onDragStart);
|
|
82
|
+
this.host.removeEventListener('dragenter', this.onDragOver);
|
|
81
83
|
this.host.removeEventListener('dragover', this.onDragOver);
|
|
82
84
|
this.host.removeEventListener('dragleave', this.onDragLeave);
|
|
83
85
|
this.host.removeEventListener('drop', this.onDrop);
|
|
@@ -104,6 +106,16 @@ const UITree = class {
|
|
|
104
106
|
}
|
|
105
107
|
return null;
|
|
106
108
|
}
|
|
109
|
+
isWithinTree(node) {
|
|
110
|
+
let element = node instanceof HTMLElement ? node : null;
|
|
111
|
+
while (element) {
|
|
112
|
+
if (element === this.host || this.host.contains(element))
|
|
113
|
+
return true;
|
|
114
|
+
const root = element.getRootNode();
|
|
115
|
+
element = root instanceof ShadowRoot ? root.host : element.parentElement;
|
|
116
|
+
}
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
107
119
|
acceptsChildren(item) {
|
|
108
120
|
return Boolean(item.container ?? item.hasAttribute('container'))
|
|
109
121
|
&& !Boolean(item.disabled ?? item.hasAttribute('disabled'));
|
|
@@ -209,8 +221,9 @@ const UITree = class {
|
|
|
209
221
|
}
|
|
210
222
|
};
|
|
211
223
|
onDragLeave = (event) => {
|
|
212
|
-
|
|
213
|
-
|
|
224
|
+
if (this.isWithinTree(event.relatedTarget))
|
|
225
|
+
return;
|
|
226
|
+
if (this.itemAtPoint(event.clientX, event.clientY))
|
|
214
227
|
return;
|
|
215
228
|
this.clearTarget();
|
|
216
229
|
};
|
|
@@ -273,7 +286,7 @@ const UITree = class {
|
|
|
273
286
|
next.focus();
|
|
274
287
|
};
|
|
275
288
|
render() {
|
|
276
|
-
return (h(Host, { key: '
|
|
289
|
+
return (h(Host, { key: 'b659635f6acdf09a3618c514f5bdd9bf173f9d98', role: "tree", "aria-label": this.label || 'Tree' }, h("slot", { key: '0815f0eb0bfe766dd2f358385af1516fd4328e2e' })));
|
|
277
290
|
}
|
|
278
291
|
};
|
|
279
292
|
UITree.style = uiTreeCss();
|
package/dist/index.cjs
CHANGED
|
@@ -3423,6 +3423,7 @@ var init_ui_tree_entry = __esm({
|
|
|
3423
3423
|
componentDidLoad() {
|
|
3424
3424
|
this.hoverIntent = createHoverIntent(this.hoverExpandDelay, this.expandTarget);
|
|
3425
3425
|
this.host.addEventListener("dragstart", this.onDragStart);
|
|
3426
|
+
this.host.addEventListener("dragenter", this.onDragOver);
|
|
3426
3427
|
this.host.addEventListener("dragover", this.onDragOver);
|
|
3427
3428
|
this.host.addEventListener("dragleave", this.onDragLeave);
|
|
3428
3429
|
this.host.addEventListener("drop", this.onDrop);
|
|
@@ -3432,6 +3433,7 @@ var init_ui_tree_entry = __esm({
|
|
|
3432
3433
|
disconnectedCallback() {
|
|
3433
3434
|
this.hoverIntent?.destroy();
|
|
3434
3435
|
this.host.removeEventListener("dragstart", this.onDragStart);
|
|
3436
|
+
this.host.removeEventListener("dragenter", this.onDragOver);
|
|
3435
3437
|
this.host.removeEventListener("dragover", this.onDragOver);
|
|
3436
3438
|
this.host.removeEventListener("dragleave", this.onDragLeave);
|
|
3437
3439
|
this.host.removeEventListener("drop", this.onDrop);
|
|
@@ -3458,6 +3460,16 @@ var init_ui_tree_entry = __esm({
|
|
|
3458
3460
|
}
|
|
3459
3461
|
return null;
|
|
3460
3462
|
}
|
|
3463
|
+
isWithinTree(node) {
|
|
3464
|
+
let element = node instanceof HTMLElement ? node : null;
|
|
3465
|
+
while (element) {
|
|
3466
|
+
if (element === this.host || this.host.contains(element))
|
|
3467
|
+
return true;
|
|
3468
|
+
const root = element.getRootNode();
|
|
3469
|
+
element = root instanceof ShadowRoot ? root.host : element.parentElement;
|
|
3470
|
+
}
|
|
3471
|
+
return false;
|
|
3472
|
+
}
|
|
3461
3473
|
acceptsChildren(item) {
|
|
3462
3474
|
return Boolean(item.container ?? item.hasAttribute("container")) && !Boolean(item.disabled ?? item.hasAttribute("disabled"));
|
|
3463
3475
|
}
|
|
@@ -3552,8 +3564,9 @@ var init_ui_tree_entry = __esm({
|
|
|
3552
3564
|
}
|
|
3553
3565
|
};
|
|
3554
3566
|
onDragLeave = (event) => {
|
|
3555
|
-
|
|
3556
|
-
|
|
3567
|
+
if (this.isWithinTree(event.relatedTarget))
|
|
3568
|
+
return;
|
|
3569
|
+
if (this.itemAtPoint(event.clientX, event.clientY))
|
|
3557
3570
|
return;
|
|
3558
3571
|
this.clearTarget();
|
|
3559
3572
|
};
|
|
@@ -3615,7 +3628,7 @@ var init_ui_tree_entry = __esm({
|
|
|
3615
3628
|
next.focus();
|
|
3616
3629
|
};
|
|
3617
3630
|
render() {
|
|
3618
|
-
return h(Host, { key: "
|
|
3631
|
+
return h(Host, { key: "b659635f6acdf09a3618c514f5bdd9bf173f9d98", role: "tree", "aria-label": this.label || "Tree" }, h("slot", { key: "0815f0eb0bfe766dd2f358385af1516fd4328e2e" }));
|
|
3619
3632
|
}
|
|
3620
3633
|
};
|
|
3621
3634
|
UITree.style = uiTreeCss();
|
package/dist/index.js
CHANGED
package/dist/looma/looma.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-CEeiinfk.js";export{s as setNonce}from"./p-CEeiinfk.js";import{g as n}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,n={};return""!==a&&(n.resourcesUrl=new URL(".",a).href),e(n)})().then((async e=>(await n(),a([["p-063f5a89",[[769,"ui-context-menu",{open:[4],defaultOpen:[4,"default-open"],for:[1],internalOpen:[32],focusTrigger:[32]},null,{open:[{syncFromProp:0}],for:[{syncTarget:0}],internalOpen:[{syncOverlay:0}]}]]],["p-2e6f791e",[[769,"ui-affordance-scope",{nearRadius:[514,"near-radius"]},null,{nearRadius:[{connectCoordinator:0}]}]]],["p-1681b218",[[513,"ui-avatar",{src:[1],alt:[1],name:[1],fallback:[1],hasImage:[32]},null,{src:[{watchSrc:0}]}]]],["p-5ba9d496",[[769,"ui-avatar-group",{max:[2],label:[1],overflowCount:[32]},null,{max:[{syncOverflow:0}]}]]],["p-0584a051",[[769,"ui-badge",{variant:[1],tone:[1]}]]],["p-34417499",[[769,"ui-button",{variant:[1],size:[1],disabled:[4]},null,{variant:[{syncToButton:0}],size:[{syncToButton:0}],disabled:[{syncToButton:0}]}]]],["p-0f45c5f0",[[769,"ui-checkbox",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],indeterminate:[4],required:[4],value:[1],internalChecked:[32]},null,{checked:[{syncFromProp:0}],internalChecked:[{syncToInput:0}],indeterminate:[{syncToInput:0}],disabled:[{syncToInput:0}],required:[{syncToInput:0}]}]]],["p-11083743",[[769,"ui-dialog",{open:[4],defaultOpen:[4,"default-open"],modal:[4],dismissible:[4],label:[1],internalOpen:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{syncOpen:0}]}]]],["p-a9f46811",[[769,"ui-disclosure",{open:[4],defaultOpen:[4,"default-open"],disabled:[4],internalOpen:[32],contentId:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{syncState:0}]}]]],["p-051f578c",[[769,"ui-floating-action-button",{disabled:[516],mobileOnly:[516,"mobile-only"],label:[1]}]]],["p-5d4713a6",[[769,"ui-form-field",{invalid:[4],disabled:[4],required:[4]}]]],["p-0198bb21",[[769,"ui-icon-button",{disabled:[516],label:[1],size:[513],variant:[513],anticipatory:[516]}]]],["p-624ba086",[[769,"ui-input",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],readOnly:[4,"readonly"],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToInput:0}],defaultValue:[{syncToInput:0}],disabled:[{syncToInput:0}],invalid:[{syncToInput:0}],readOnly:[{syncToInput:0}]}]]],["p-ed5abf6d",[[769,"ui-menu-item",{disabled:[516],value:[1]}]]],["p-caa8fc7b",[[769,"ui-popover",{open:[4],defaultOpen:[4,"default-open"],for:[1],placement:[1],internalOpen:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{onOpenChange:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}]}]]],["p-8d5adb17",[[769,"ui-radio",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],name:[1],required:[4],value:[1]},null,{checked:[{syncToInput:0}],disabled:[{syncToInput:0}],name:[{syncToInput:0}],required:[{syncToInput:0}],value:[{syncToInput:0}]}]]],["p-7e94d90d",[[769,"ui-radio-group",{value:[1],name:[1],orientation:[1],disabled:[4],required:[4],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToRadios:0}],name:[{syncToRadios:0}],orientation:[{syncToRadios:0}],disabled:[{syncToRadios:0}]}]]],["p-2ed7e241",[[769,"ui-search-result-row",{disabled:[516],selected:[516],hasLeading:[32],hasMeta:[32],hasExcerpt:[32],hasTrailing:[32]}]]],["p-d273b857",[[769,"ui-search-shell",{hasStatus:[32],hasFooter:[32]}]]],["p-a5127c7d",[[769,"ui-select",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],required:[4],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToSelect:0}],defaultValue:[{syncToSelect:0}],disabled:[{syncToSelect:0}],invalid:[{syncToSelect:0}],required:[{syncToSelect:0}]}]]],["p-b7aa4488",[[769,"ui-switch",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],required:[4],value:[1],internalChecked:[32]},null,{checked:[{syncFromProp:0}]}]]],["p-078f9fb8",[[769,"ui-tabs",{value:[1],defaultValue:[1,"default-value"],orientation:[1],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncState:0}],orientation:[{syncState:0}]}]]],["p-4b422d40",[[769,"ui-textarea",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],readOnly:[4,"readonly"],rows:[2],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToTextarea:0}],defaultValue:[{syncToTextarea:0}],disabled:[{syncToTextarea:0}],invalid:[{syncToTextarea:0}],readOnly:[{syncToTextarea:0}],rows:[{syncToTextarea:0}]}]]],["p-54c41576",[[769,"ui-toast-region",{open:[4],internalOpen:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{syncSurface:0}]}]]],["p-9194a99d",[[769,"ui-tooltip",{for:[1],open:[4],defaultOpen:[4,"default-open"],placement:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],internalOpen:[32]},null,{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncOverlay:0}]}]]],["p-a33522a2",[[769,"ui-top-bar",{hasLeading:[32],hasSearch:[32],hasActions:[32]}]]],["p-
|
|
1
|
+
import{p as e,b as a}from"./p-CEeiinfk.js";export{s as setNonce}from"./p-CEeiinfk.js";import{g as n}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,n={};return""!==a&&(n.resourcesUrl=new URL(".",a).href),e(n)})().then((async e=>(await n(),a([["p-063f5a89",[[769,"ui-context-menu",{open:[4],defaultOpen:[4,"default-open"],for:[1],internalOpen:[32],focusTrigger:[32]},null,{open:[{syncFromProp:0}],for:[{syncTarget:0}],internalOpen:[{syncOverlay:0}]}]]],["p-2e6f791e",[[769,"ui-affordance-scope",{nearRadius:[514,"near-radius"]},null,{nearRadius:[{connectCoordinator:0}]}]]],["p-1681b218",[[513,"ui-avatar",{src:[1],alt:[1],name:[1],fallback:[1],hasImage:[32]},null,{src:[{watchSrc:0}]}]]],["p-5ba9d496",[[769,"ui-avatar-group",{max:[2],label:[1],overflowCount:[32]},null,{max:[{syncOverflow:0}]}]]],["p-0584a051",[[769,"ui-badge",{variant:[1],tone:[1]}]]],["p-34417499",[[769,"ui-button",{variant:[1],size:[1],disabled:[4]},null,{variant:[{syncToButton:0}],size:[{syncToButton:0}],disabled:[{syncToButton:0}]}]]],["p-0f45c5f0",[[769,"ui-checkbox",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],indeterminate:[4],required:[4],value:[1],internalChecked:[32]},null,{checked:[{syncFromProp:0}],internalChecked:[{syncToInput:0}],indeterminate:[{syncToInput:0}],disabled:[{syncToInput:0}],required:[{syncToInput:0}]}]]],["p-11083743",[[769,"ui-dialog",{open:[4],defaultOpen:[4,"default-open"],modal:[4],dismissible:[4],label:[1],internalOpen:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{syncOpen:0}]}]]],["p-a9f46811",[[769,"ui-disclosure",{open:[4],defaultOpen:[4,"default-open"],disabled:[4],internalOpen:[32],contentId:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{syncState:0}]}]]],["p-051f578c",[[769,"ui-floating-action-button",{disabled:[516],mobileOnly:[516,"mobile-only"],label:[1]}]]],["p-5d4713a6",[[769,"ui-form-field",{invalid:[4],disabled:[4],required:[4]}]]],["p-0198bb21",[[769,"ui-icon-button",{disabled:[516],label:[1],size:[513],variant:[513],anticipatory:[516]}]]],["p-624ba086",[[769,"ui-input",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],readOnly:[4,"readonly"],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToInput:0}],defaultValue:[{syncToInput:0}],disabled:[{syncToInput:0}],invalid:[{syncToInput:0}],readOnly:[{syncToInput:0}]}]]],["p-ed5abf6d",[[769,"ui-menu-item",{disabled:[516],value:[1]}]]],["p-caa8fc7b",[[769,"ui-popover",{open:[4],defaultOpen:[4,"default-open"],for:[1],placement:[1],internalOpen:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{onOpenChange:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}]}]]],["p-8d5adb17",[[769,"ui-radio",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],name:[1],required:[4],value:[1]},null,{checked:[{syncToInput:0}],disabled:[{syncToInput:0}],name:[{syncToInput:0}],required:[{syncToInput:0}],value:[{syncToInput:0}]}]]],["p-7e94d90d",[[769,"ui-radio-group",{value:[1],name:[1],orientation:[1],disabled:[4],required:[4],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToRadios:0}],name:[{syncToRadios:0}],orientation:[{syncToRadios:0}],disabled:[{syncToRadios:0}]}]]],["p-2ed7e241",[[769,"ui-search-result-row",{disabled:[516],selected:[516],hasLeading:[32],hasMeta:[32],hasExcerpt:[32],hasTrailing:[32]}]]],["p-d273b857",[[769,"ui-search-shell",{hasStatus:[32],hasFooter:[32]}]]],["p-a5127c7d",[[769,"ui-select",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],required:[4],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToSelect:0}],defaultValue:[{syncToSelect:0}],disabled:[{syncToSelect:0}],invalid:[{syncToSelect:0}],required:[{syncToSelect:0}]}]]],["p-b7aa4488",[[769,"ui-switch",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],required:[4],value:[1],internalChecked:[32]},null,{checked:[{syncFromProp:0}]}]]],["p-078f9fb8",[[769,"ui-tabs",{value:[1],defaultValue:[1,"default-value"],orientation:[1],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncState:0}],orientation:[{syncState:0}]}]]],["p-4b422d40",[[769,"ui-textarea",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],readOnly:[4,"readonly"],rows:[2],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToTextarea:0}],defaultValue:[{syncToTextarea:0}],disabled:[{syncToTextarea:0}],invalid:[{syncToTextarea:0}],readOnly:[{syncToTextarea:0}],rows:[{syncToTextarea:0}]}]]],["p-54c41576",[[769,"ui-toast-region",{open:[4],internalOpen:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{syncSurface:0}]}]]],["p-9194a99d",[[769,"ui-tooltip",{for:[1],open:[4],defaultOpen:[4,"default-open"],placement:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],internalOpen:[32]},null,{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncOverlay:0}]}]]],["p-a33522a2",[[769,"ui-top-bar",{hasLeading:[32],hasSearch:[32],hasActions:[32]}]]],["p-b0431118",[[769,"ui-tree",{label:[1],hoverExpandDelay:[2,"hover-expand-delay"]}]]],["p-54722713",[[769,"ui-tree-item",{itemId:[1,"item-id"],label:[1],depth:[2],container:[4],sortable:[4],dragType:[1,"drag-type"],dropScope:[1,"drop-scope"],accepts:[1],expanded:[4],defaultExpanded:[4,"default-expanded"],selected:[4],disabled:[4],internalExpanded:[32]},null,{expanded:[{syncExpandedFromProp:0}]}]]],["p-1674cda4",[[769,"ui-menu",{open:[4],defaultOpen:[4,"default-open"],for:[1],placement:[1],internalOpen:[32]},null,{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncSurface:0}]}]]]],e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,g as i,h as e,H as s}from"./p-CEeiinfk.js";import{d as r}from"./p-JwSoedEO.js";function n(t,i,e){const s=t.height>0?Math.min(1,Math.max(0,(i-t.top)/t.height)):.5;return e?s<.25?"before":s>.75?"after":"inside":s<.5?"before":"after"}const o=class{constructor(i){t(this,i)}get host(){return i(this)}label="Tree";hoverExpandDelay=700;source=null;target=null;position=null;hoverIntent=null;componentDidLoad(){this.hoverIntent=function(t,i){let e,s;function r(){e&&clearTimeout(e),e=void 0,s=void 0}return{schedule(n){s===n&&e||(r(),s=n,e=setTimeout((()=>{e=void 0;const t=s;s=void 0,t&&i(t)}),Math.max(0,t)))},cancel:r,destroy:r}}(this.hoverExpandDelay,this.expandTarget),this.host.addEventListener("dragstart",this.onDragStart),this.host.addEventListener("dragenter",this.onDragOver),this.host.addEventListener("dragover",this.onDragOver),this.host.addEventListener("dragleave",this.onDragLeave),this.host.addEventListener("drop",this.onDrop),this.host.addEventListener("dragend",this.onDragEnd),this.host.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){this.hoverIntent?.destroy(),this.host.removeEventListener("dragstart",this.onDragStart),this.host.removeEventListener("dragenter",this.onDragOver),this.host.removeEventListener("dragover",this.onDragOver),this.host.removeEventListener("dragleave",this.onDragLeave),this.host.removeEventListener("drop",this.onDrop),this.host.removeEventListener("dragend",this.onDragEnd),this.host.removeEventListener("keydown",this.onKeyDown)}itemFromEvent(t){return t.composedPath().find((t=>t instanceof HTMLElement&&"ui-tree-item"===t.localName))??null}itemId(t){return t.itemId||t.getAttribute("item-id")||""}rowFor(t){return t.shadowRoot?.querySelector('[part="row"]')??null}itemAtPoint(t,i){let e=this.host.ownerDocument.elementFromPoint(t,i);for(;e;){if("ui-tree-item"===e.localName&&this.host.contains(e))return e;const t=e.getRootNode();e=t instanceof ShadowRoot?t.host:e.parentElement}return null}isWithinTree(t){let i=t instanceof HTMLElement?t:null;for(;i;){if(i===this.host||this.host.contains(i))return!0;const t=i.getRootNode();i=t instanceof ShadowRoot?t.host:i.parentElement}return!1}acceptsChildren(t){return Boolean(t.container??t.hasAttribute("container"))&&!Boolean(t.disabled??t.hasAttribute("disabled"))}itemMetadata(t){return{type:t.getAttribute("data-drag-type")||t.getAttribute("drag-type")||"item",scope:t.getAttribute("data-drop-scope")||t.getAttribute("drop-scope")||"",accepts:(t.getAttribute("data-accepts")||t.getAttribute("accepts")||"").split(",").map((t=>t.trim())).filter(Boolean)}}permitsDrop(t,i,e){if(t.contains(i))return!1;const s=this.itemMetadata(t),r=this.itemMetadata(i);return"inside"===e?this.acceptsChildren(i)&&(0===r.accepts.length||r.accepts.includes(s.type)):s.type===r.type}clearTarget(){this.target?.removeAttribute("data-drop-position"),this.target=null,this.position=null,this.hoverIntent?.cancel()}finishDrag(){this.source?.removeAttribute("data-dragging"),this.source=null,this.clearTarget()}expandTarget=t=>{const i=Array.from(this.host.querySelectorAll("ui-tree-item")).find((i=>this.itemId(i)===t));i&&"false"===i.getAttribute("aria-expanded")&&i.dispatchEvent(new CustomEvent("ui-tree-auto-expand"))};onDragStart=t=>{const i=this.itemFromEvent(t);if(!i||!Boolean(i.sortable??i.hasAttribute("sortable"))||Boolean(i.disabled??i.hasAttribute("disabled")))return;if(!t.composedPath().some((t=>t instanceof HTMLElement&&"drag-handle"===t.getAttribute("part"))))return void t.preventDefault();const e=this.itemId(i),s=this.rowFor(i);e&&s?(this.source=i,i.setAttribute("data-dragging","true"),t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e)),function(t,i){if(!t||"function"!=typeof t.setDragImage)return;const{height:e}=i.getBoundingClientRect();t.setDragImage(i,16,Math.max(0,e/2))}(t.dataTransfer,s)):t.preventDefault()};onDragOver=t=>{if(!this.source)return;const i=this.itemFromEvent(t);if(!i||i===this.source)return void this.clearTarget();const e=this.rowFor(i);if(!e)return;const s=n(e.getBoundingClientRect(),t.clientY,this.acceptsChildren(i));if(!this.permitsDrop(this.source,i,s))return t.dataTransfer&&(t.dataTransfer.dropEffect="none"),void this.clearTarget();t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"),this.target===i&&this.position===s||(this.clearTarget(),this.target=i,this.position=s,i.setAttribute("data-drop-position",s)),"inside"===s&&"false"===i.getAttribute("aria-expanded")?this.hoverIntent?.schedule(this.itemId(i)):this.hoverIntent?.cancel()};onDragLeave=t=>{this.isWithinTree(t.relatedTarget)||this.itemAtPoint(t.clientX,t.clientY)||this.clearTarget()};dispatchReorder(t,i,e){const s=this.itemId(t),n=this.itemId(i);if(!s||!n)return;const o=this.itemMetadata(t),h=this.itemMetadata(i);r(this.host,"reorder",{sourceId:s,targetId:n,position:e,sourceType:o.type,targetType:h.type,sourceScope:o.scope,targetScope:h.scope,trigger:"pointer"})}onDrop=t=>{this.source&&this.target&&this.position&&(t.preventDefault(),this.dispatchReorder(this.source,this.target,this.position),this.finishDrag())};onDragEnd=t=>{if(this.source){const i=this.itemAtPoint(t.clientX,t.clientY);if(i&&i!==this.source){const e=this.rowFor(i);if(e){const s=n(e.getBoundingClientRect(),t.clientY,this.acceptsChildren(i));this.permitsDrop(this.source,i,s)&&this.dispatchReorder(this.source,i,s)}}}this.finishDrag()};visibleItems(){return Array.from(this.host.querySelectorAll("ui-tree-item")).filter((t=>t.getClientRects().length>0&&!t.hasAttribute("disabled")))}onKeyDown=t=>{const i=this.itemFromEvent(t);if(!i)return;const e=this.visibleItems(),s=e.indexOf(i);if(s<0)return;const r="ArrowDown"===t.key?e[s+1]:"ArrowUp"===t.key?e[s-1]:null;r&&(t.preventDefault(),r.focus())};render(){return e(s,{key:"b659635f6acdf09a3618c514f5bdd9bf173f9d98",role:"tree","aria-label":this.label||"Tree"},e("slot",{key:"0815f0eb0bfe766dd2f358385af1516fd4328e2e"}))}};o.style=":host{--ui-tree-indent:16px;display:block;min-inline-size:0;padding-inline-start:var(--ui-tree-gutter, 22px)}::slotted(ui-tree-item){--ui-tree-indent:inherit}";export{o as ui_tree}
|
package/dist/{ui-affordance-scope.entry-TEYCR7NX.js → ui-affordance-scope.entry-Z3H4CM6J.js}
RENAMED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FSGGPFID.js";
|
|
11
11
|
|
|
12
12
|
// dist/esm/ui-affordance-scope.entry.js
|
|
13
13
|
var uiAffordanceScopeCss = () => `:host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}`;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getElement,
|
|
4
4
|
h,
|
|
5
5
|
registerInstance
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FSGGPFID.js";
|
|
7
7
|
|
|
8
8
|
// dist/esm/ui-avatar-group.entry.js
|
|
9
9
|
var uiAvatarGroupCss = () => `:host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*:not([data-ui-avatar-group-overflow])){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type:not([data-ui-avatar-group-overflow])){margin-inline-end:0}.overflow{margin-inline-end:-0.5rem;display:inline-flex;align-items:center;justify-content:center;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;font-weight:600;flex-shrink:0}`;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Host,
|
|
3
3
|
h,
|
|
4
4
|
registerInstance
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FSGGPFID.js";
|
|
6
6
|
|
|
7
7
|
// dist/esm/ui-badge.entry.js
|
|
8
8
|
var uiBadgeCss = () => `:host{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;line-height:1;padding:0.25em 0.6em;white-space:nowrap}:host([data-tone='accent']){background:var(--ui-accent-solid);border-color:var(--ui-accent-solid);color:var(--ui-text-on-accent)}:host([data-tone='danger']){background:var(--ui-danger-solid);border-color:var(--ui-danger-solid);color:var(--ui-text-on-accent)}:host([data-tone='success']){background:var(--ui-success-solid);border-color:var(--ui-success-solid);color:var(--ui-text-on-accent)}:host([data-tone='warning']){background:var(--ui-warning-solid);border-color:var(--ui-warning-solid);color:var(--ui-text-primary)}:host([data-tone='info']){background:var(--ui-info-solid);border-color:var(--ui-info-solid);color:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']){background:var(--ui-accent-soft);border-color:var(--ui-accent-soft);color:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']){background:var(--ui-danger-soft);border-color:var(--ui-danger-soft);color:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']){background:var(--ui-success-soft);border-color:var(--ui-success-soft);color:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']){background:var(--ui-warning-soft);border-color:var(--ui-warning-soft);color:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']){background:var(--ui-info-soft);border-color:var(--ui-info-soft);color:var(--ui-info-solid)}`;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getElement,
|
|
7
7
|
h,
|
|
8
8
|
registerInstance
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FSGGPFID.js";
|
|
10
10
|
|
|
11
11
|
// dist/esm/ui-button.entry.js
|
|
12
12
|
var uiButtonCss = () => `:host{display:inline-flex;vertical-align:middle;color:var(--ui-text-primary)}:host([variant='outline'])::slotted(button),::slotted(button){appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-button-radius, var(--ui-radius-2));background:var(--ui-surface-default);color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm'])::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg'])::slotted(button){padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:var(--ui-border-strong)}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([variant='solid'])::slotted(button){border-color:var(--ui-accent-solid);background:var(--ui-accent-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-solid-shadow, inset 0 1px rgb(255 255 255 / 0.16), var(--ui-shadow-xs))}:host([variant='solid'])::slotted(button:hover:enabled){background:var(--ui-accent-hover);border-color:var(--ui-accent-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([variant='solid'])::slotted(button:active:enabled){background:var(--ui-accent-active);border-color:var(--ui-accent-active);box-shadow:none;transform:translateY(0)}:host([variant='destructive'])::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-destructive-shadow, inset 0 1px rgb(255 255 255 / 0.14), var(--ui-shadow-xs))}:host([variant='destructive'])::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([variant='destructive'])::slotted(button:active:enabled){box-shadow:none;transform:translateY(0)}:host([variant='ghost'])::slotted(button){border-color:transparent;background:transparent}:host([variant='ghost'])::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([variant='ghost'])::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(button:disabled),:host([data-disabled]){opacity:0.6;cursor:not-allowed}`;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FSGGPFID.js";
|
|
11
11
|
|
|
12
12
|
// dist/esm/ui-checkbox.entry.js
|
|
13
13
|
var uiCheckboxCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='checkbox']){accent-color:var(--ui-accent-solid);width:1.125em;height:1.125em;cursor:pointer}::slotted(input[type='checkbox']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getElement,
|
|
15
15
|
h,
|
|
16
16
|
registerInstance
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FSGGPFID.js";
|
|
18
18
|
|
|
19
19
|
// dist/esm/ui-context-menu.entry.js
|
|
20
20
|
var uiContextMenuCss = () => `:host{display:contents}:host([data-focus-trigger='pointer']) ::slotted(ui-menu-item:focus){outline:none}.menu{position:fixed;inset:auto;margin:0;z-index:var(--ui-z-overlay, 1000);min-width:12rem;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}.menu:popover-open{opacity:1;transform:translateY(0) scale(1)}@starting-style{.menu:popover-open{opacity:0;transform:translateY(-4px) scale(0.99)}}.menu[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){.menu{transition:none}}`;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getElement,
|
|
12
12
|
h,
|
|
13
13
|
registerInstance
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FSGGPFID.js";
|
|
15
15
|
|
|
16
16
|
// dist/esm/ui-dialog.entry.js
|
|
17
17
|
var uiDialogCss = () => `:host{display:block}:host:not([data-open]){display:none}:host dialog{--ui-dialog-duration:var(--ui-motion-base);--ui-dialog-viewport-gap:var(--ui-space-4, 1rem);position:fixed;inset:0;inline-size:min( calc(100% - (var(--ui-dialog-viewport-gap) * 2)), var(--ui-dialog-max-width, 440px) );max-inline-size:none;max-block-size:calc(100dvh - (var(--ui-dialog-viewport-gap) * 2));margin:auto;padding:var(--ui-space-4);overflow:auto;background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-dialog);box-shadow:var(--ui-shadow-dialog);visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-dialog-duration) var(--ui-motion-ease), transform var(--ui-dialog-duration) var(--ui-motion-ease), visibility var(--ui-dialog-duration), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1);animation:ui-dialog-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-enter{from{opacity:0;transform:scale(0.96)}}:host dialog::backdrop{background-color:transparent;transition:background-color var(--ui-dialog-duration) var(--ui-motion-ease), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]::backdrop{background-color:var(--ui-overlay-backdrop);animation:ui-dialog-backdrop-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-backdrop-enter{from{background-color:transparent}}`;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Host,
|
|
3
3
|
h,
|
|
4
4
|
registerInstance
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FSGGPFID.js";
|
|
6
6
|
|
|
7
7
|
// dist/esm/ui-floating-action-button.entry.js
|
|
8
8
|
var uiFloatingActionButtonCss = () => `:host{position:fixed;inset-block-end:calc( var(--ui-floating-action-button-bottom, var(--ui-space-6, 1.5rem)) + env(safe-area-inset-bottom) );inset-inline-end:max( var(--ui-floating-action-button-inline-end, var(--ui-space-5, 1.25rem)), env(safe-area-inset-right) );inline-size:var(--ui-floating-action-button-size, 56px);block-size:var(--ui-floating-action-button-size, 56px);display:inline-flex;z-index:var(--ui-floating-action-button-z-index, 100)}button{appearance:none;inline-size:100%;block-size:100%;border:none;border-radius:999px;margin:0;padding:0;display:inline-flex;align-items:center;justify-content:center;background:var(--ui-floating-action-button-bg, var(--ui-accent-solid));color:var(--ui-floating-action-button-color, var(--ui-text-on-accent));box-shadow:var( --ui-floating-action-button-shadow, 0 4px 12px color-mix(in srgb, var(--ui-accent-solid) 40%, transparent) );cursor:pointer;transition:background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease), transform var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease), box-shadow var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease)}button:hover:enabled{background:var(--ui-floating-action-button-hover-bg, var(--ui-accent-hover));box-shadow:var( --ui-floating-action-button-hover-shadow, 0 6px 16px color-mix(in srgb, var(--ui-accent-solid) 50%, transparent) )}button:active:enabled{transform:scale(var(--ui-floating-action-button-active-scale, 0.94))}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:2px}button:disabled,:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(svg){inline-size:var(--ui-floating-action-button-icon-size, 24px);block-size:var(--ui-floating-action-button-icon-size, 24px);flex-shrink:0}@media (min-width: 768px){:host([mobile-only]){display:none}}`;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getElement,
|
|
7
7
|
h,
|
|
8
8
|
registerInstance
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FSGGPFID.js";
|
|
10
10
|
|
|
11
11
|
// dist/esm/ui-form-field.entry.js
|
|
12
12
|
var uiFormFieldCss = () => `:host{display:grid;gap:var(--ui-space-2);color:var(--ui-text-primary)}::slotted(label){color:var(--ui-text-secondary);font-size:0.95rem}::slotted([data-slot='help']){color:var(--ui-text-muted);font-size:0.875rem}::slotted([data-slot='error']),::slotted([role='alert']){color:var(--ui-accent-active);font-size:0.875rem}`;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Host,
|
|
3
3
|
h,
|
|
4
4
|
registerInstance
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FSGGPFID.js";
|
|
6
6
|
|
|
7
7
|
// dist/esm/ui-icon-button.entry.js
|
|
8
8
|
var uiIconButtonCss = () => `:host{display:inline-flex;color:var(--ui-text-secondary)}:host([anticipatory]){position:relative}:host([anticipatory])::before{content:'';position:absolute;inset:50% auto auto 50%;z-index:1;inline-size:var(--ui-affordance-guide-size, 0.25rem);block-size:var(--ui-affordance-guide-size, 0.25rem);border-radius:var(--ui-radius-round, 999px);background:var(--ui-affordance-guide-color, var(--ui-border-strong));opacity:var(--ui-affordance-guide-opacity, 0.42);transform:translate(-50%, -50%);transition:opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);pointer-events:none}:host([anticipatory]) button{opacity:0;transform:scale(0.72);pointer-events:none}:host([anticipatory][data-ui-proximity='near'])::before,:host([anticipatory]:focus-within)::before,:host([anticipatory]:hover)::before,:host([anticipatory][variant='solid'])::before{opacity:0}:host([anticipatory][data-ui-proximity='near']) button,:host([anticipatory]:focus-within) button,:host([anticipatory]:hover) button,:host([anticipatory][variant='solid']) button{opacity:1;transform:scale(1);pointer-events:auto}button{appearance:none;inline-size:var(--ui-icon-button-size, 2.5rem);block-size:var(--ui-icon-button-size, 2.5rem);min-inline-size:var(--ui-icon-button-size, 2.5rem);min-block-size:var(--ui-icon-button-size, 2.5rem);padding:0;margin:0;border:1px solid transparent;border-radius:var(--ui-icon-button-radius, var(--ui-radius-2));background:var(--ui-icon-button-bg, transparent);color:inherit;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease)}@media (hover: none), (pointer: coarse){:host([anticipatory])::before{opacity:0}:host([anticipatory]) button{opacity:1;transform:none;pointer-events:auto}}:host([size='sm']) button{inline-size:var(--ui-icon-button-size-sm, 2rem);block-size:var(--ui-icon-button-size-sm, 2rem);min-inline-size:var(--ui-icon-button-size-sm, 2rem);min-block-size:var(--ui-icon-button-size-sm, 2rem)}:host([size='lg']) button{inline-size:var(--ui-icon-button-size-lg, 2.75rem);block-size:var(--ui-icon-button-size-lg, 2.75rem);min-inline-size:var(--ui-icon-button-size-lg, 2.75rem);min-block-size:var(--ui-icon-button-size-lg, 2.75rem)}:host([variant='outline']) button{border-color:var(--ui-icon-button-border, var(--ui-border-default));background:var(--ui-icon-button-outline-bg, var(--ui-surface-default));color:var(--ui-icon-button-outline-color, var(--ui-text-primary))}:host([variant='solid']) button{background:var(--ui-icon-button-solid-bg, var(--ui-accent-solid));color:var(--ui-icon-button-solid-color, var(--ui-text-on-accent));box-shadow:var( --ui-icon-button-solid-shadow, 0 1px 2px color-mix(in srgb, var(--ui-accent-solid) 18%, transparent) )}button:hover:enabled{background:var(--ui-icon-button-hover-bg, var(--ui-surface-muted));color:var(--ui-icon-button-hover-color, var(--ui-text-primary))}:host([variant='outline']) button:hover:enabled{border-color:var(--ui-icon-button-hover-border, var(--ui-border-strong))}:host([variant='solid']) button:hover:enabled{background:var(--ui-icon-button-solid-hover-bg, var(--ui-accent-hover))}button:active:enabled{transform:scale(var(--ui-icon-button-active-scale, 0.96))}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:2px}button:disabled,:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(svg){inline-size:var(--ui-icon-button-icon-size, 1.125rem);block-size:var(--ui-icon-button-icon-size, 1.125rem);flex-shrink:0;stroke-width:var(--ui-icon-button-icon-stroke-width, 1.75)}`;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FSGGPFID.js";
|
|
11
11
|
|
|
12
12
|
// dist/esm/ui-input.entry.js
|
|
13
13
|
var uiInputCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(input){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding:var(--ui-space-2) var(--ui-space-3);margin:0;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(input:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(input:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(input),::slotted(input[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(input:disabled){background:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(input:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Host,
|
|
3
3
|
h,
|
|
4
4
|
registerInstance
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FSGGPFID.js";
|
|
6
6
|
|
|
7
7
|
// dist/esm/ui-menu-item.entry.js
|
|
8
8
|
var uiMenuItemCss = () => `:host{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)}:host(:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}:host([aria-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}`;
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
getElement,
|
|
16
16
|
h,
|
|
17
17
|
registerInstance
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FSGGPFID.js";
|
|
19
19
|
|
|
20
20
|
// dist/esm/ui-menu.entry.js
|
|
21
21
|
var 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}`;
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getElement,
|
|
15
15
|
h,
|
|
16
16
|
registerInstance
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FSGGPFID.js";
|
|
18
18
|
|
|
19
19
|
// dist/esm/ui-popover.entry.js
|
|
20
20
|
var 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}}`;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FSGGPFID.js";
|
|
11
11
|
|
|
12
12
|
// dist/esm/ui-radio-group.entry.js
|
|
13
13
|
var uiRadioGroupCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2)}:host([data-orientation='vertical']){display:inline-grid;justify-items:start}`;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FSGGPFID.js";
|
|
11
11
|
|
|
12
12
|
// dist/esm/ui-radio.entry.js
|
|
13
13
|
var uiRadioCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([data-disabled='true']),:host([aria-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='radio']){accent-color:var(--ui-accent-solid);cursor:pointer}::slotted(input[type='radio']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
|