@threadlabs/looma 0.1.19 → 0.1.20
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-NMV2BBWK.js → chunk-RLSUA6N5.js} +29 -29
- package/dist/cjs/ui-tree.cjs.entry.js +44 -18
- package/dist/collection/components/ui-tree/ui-tree.js +44 -18
- package/dist/components/ui-tree.js +1 -1
- package/dist/esm/ui-tree.entry.js +44 -18
- package/dist/index.cjs +44 -18
- package/dist/index.js +1 -1
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/p-979b8ab1.entry.js +1 -0
- package/dist/types/components/ui-tree/ui-tree.d.ts +2 -0
- package/dist/{ui-affordance-scope.entry-2CJOZHBF.js → ui-affordance-scope.entry-TEYCR7NX.js} +1 -1
- package/dist/{ui-avatar-group.entry-WMDVHRVT.js → ui-avatar-group.entry-Z2JCVPMM.js} +1 -1
- package/dist/{ui-avatar.entry-SHX6AOME.js → ui-avatar.entry-CDDUQV4B.js} +1 -1
- package/dist/{ui-badge.entry-S5VSVEBD.js → ui-badge.entry-ELFAXPKR.js} +1 -1
- package/dist/{ui-button.entry-HVSZQOA3.js → ui-button.entry-S5GEJ55S.js} +1 -1
- package/dist/{ui-checkbox.entry-2DWUSIEP.js → ui-checkbox.entry-NFXU5LDX.js} +1 -1
- package/dist/{ui-context-menu.entry-ZCGK2ZM3.js → ui-context-menu.entry-W5F6LBEC.js} +1 -1
- package/dist/{ui-dialog.entry-XVTGSOKV.js → ui-dialog.entry-G2K37IUH.js} +1 -1
- package/dist/{ui-disclosure.entry-Z4UNBYPO.js → ui-disclosure.entry-JO3XAMCC.js} +1 -1
- package/dist/{ui-floating-action-button.entry-7QXOFMZ2.js → ui-floating-action-button.entry-EXXENSSO.js} +1 -1
- package/dist/{ui-form-field.entry-ENMTDKN2.js → ui-form-field.entry-L62S6Z62.js} +1 -1
- package/dist/{ui-icon-button.entry-4DMRMHP2.js → ui-icon-button.entry-D7I7BV27.js} +1 -1
- package/dist/{ui-input.entry-JQROBMAB.js → ui-input.entry-YDFDXMZE.js} +1 -1
- package/dist/{ui-menu-item.entry-4KZUH65O.js → ui-menu-item.entry-QH7UGDFX.js} +1 -1
- package/dist/{ui-menu.entry-HEKD6EUJ.js → ui-menu.entry-YIQOPJOS.js} +1 -1
- package/dist/{ui-popover.entry-MP5QS5WD.js → ui-popover.entry-XN2IOEYH.js} +1 -1
- package/dist/{ui-radio-group.entry-YWXQLMSD.js → ui-radio-group.entry-C7ESTJSS.js} +1 -1
- package/dist/{ui-radio.entry-TYQ36J2G.js → ui-radio.entry-AKVI5OUS.js} +1 -1
- package/dist/{ui-search-result-row.entry-EV73E2AD.js → ui-search-result-row.entry-3BY6GUCL.js} +1 -1
- package/dist/{ui-search-shell.entry-RRS62AZU.js → ui-search-shell.entry-2Z3GUR2I.js} +1 -1
- package/dist/{ui-select.entry-NJRM2C2R.js → ui-select.entry-2YQLACCA.js} +1 -1
- package/dist/{ui-switch.entry-JNWSBOIW.js → ui-switch.entry-N5HDUJIW.js} +1 -1
- package/dist/{ui-tabs.entry-JNBWW2G3.js → ui-tabs.entry-FVOVVZOQ.js} +1 -1
- package/dist/{ui-textarea.entry-CDCRB2S3.js → ui-textarea.entry-ZFGGCBLG.js} +1 -1
- package/dist/{ui-toast-region.entry-QLPSSQ5I.js → ui-toast-region.entry-AA2DEUUZ.js} +1 -1
- package/dist/{ui-tooltip.entry-FAZT5VYK.js → ui-tooltip.entry-WN4PYNTZ.js} +1 -1
- package/dist/{ui-top-bar.entry-LNUHSZSM.js → ui-top-bar.entry-ZYYXC7OA.js} +1 -1
- package/dist/{ui-tree-item.entry-TLYU63UE.js → ui-tree-item.entry-HWCNTX6N.js} +1 -1
- package/dist/{ui-tree.entry-3OF7ZPOH.js → ui-tree.entry-6NPGKN5P.js} +45 -19
- package/package.json +1 -1
- package/dist/looma/p-95368dee.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-TEYCR7NX.js"),
|
|
10
|
+
"./ui-avatar-group.entry.js": () => import("./ui-avatar-group.entry-Z2JCVPMM.js"),
|
|
11
|
+
"./ui-avatar.entry.js": () => import("./ui-avatar.entry-CDDUQV4B.js"),
|
|
12
|
+
"./ui-badge.entry.js": () => import("./ui-badge.entry-ELFAXPKR.js"),
|
|
13
|
+
"./ui-button.entry.js": () => import("./ui-button.entry-S5GEJ55S.js"),
|
|
14
|
+
"./ui-checkbox.entry.js": () => import("./ui-checkbox.entry-NFXU5LDX.js"),
|
|
15
|
+
"./ui-context-menu.entry.js": () => import("./ui-context-menu.entry-W5F6LBEC.js"),
|
|
16
|
+
"./ui-dialog.entry.js": () => import("./ui-dialog.entry-G2K37IUH.js"),
|
|
17
|
+
"./ui-disclosure.entry.js": () => import("./ui-disclosure.entry-JO3XAMCC.js"),
|
|
18
|
+
"./ui-floating-action-button.entry.js": () => import("./ui-floating-action-button.entry-EXXENSSO.js"),
|
|
19
|
+
"./ui-form-field.entry.js": () => import("./ui-form-field.entry-L62S6Z62.js"),
|
|
20
|
+
"./ui-icon-button.entry.js": () => import("./ui-icon-button.entry-D7I7BV27.js"),
|
|
21
|
+
"./ui-input.entry.js": () => import("./ui-input.entry-YDFDXMZE.js"),
|
|
22
|
+
"./ui-menu-item.entry.js": () => import("./ui-menu-item.entry-QH7UGDFX.js"),
|
|
23
|
+
"./ui-menu.entry.js": () => import("./ui-menu.entry-YIQOPJOS.js"),
|
|
24
|
+
"./ui-popover.entry.js": () => import("./ui-popover.entry-XN2IOEYH.js"),
|
|
25
|
+
"./ui-radio-group.entry.js": () => import("./ui-radio-group.entry-C7ESTJSS.js"),
|
|
26
|
+
"./ui-radio.entry.js": () => import("./ui-radio.entry-AKVI5OUS.js"),
|
|
27
|
+
"./ui-search-result-row.entry.js": () => import("./ui-search-result-row.entry-3BY6GUCL.js"),
|
|
28
|
+
"./ui-search-shell.entry.js": () => import("./ui-search-shell.entry-2Z3GUR2I.js"),
|
|
29
|
+
"./ui-select.entry.js": () => import("./ui-select.entry-2YQLACCA.js"),
|
|
30
|
+
"./ui-switch.entry.js": () => import("./ui-switch.entry-N5HDUJIW.js"),
|
|
31
|
+
"./ui-tabs.entry.js": () => import("./ui-tabs.entry-FVOVVZOQ.js"),
|
|
32
|
+
"./ui-textarea.entry.js": () => import("./ui-textarea.entry-ZFGGCBLG.js"),
|
|
33
|
+
"./ui-toast-region.entry.js": () => import("./ui-toast-region.entry-AA2DEUUZ.js"),
|
|
34
|
+
"./ui-tooltip.entry.js": () => import("./ui-tooltip.entry-WN4PYNTZ.js"),
|
|
35
|
+
"./ui-top-bar.entry.js": () => import("./ui-top-bar.entry-ZYYXC7OA.js"),
|
|
36
|
+
"./ui-tree-item.entry.js": () => import("./ui-tree-item.entry-HWCNTX6N.js"),
|
|
37
|
+
"./ui-tree.entry.js": () => import("./ui-tree.entry-6NPGKN5P.js")
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
// dist/esm/index-CEeiinfk.js
|
|
@@ -95,6 +95,17 @@ const UITree = class {
|
|
|
95
95
|
rowFor(item) {
|
|
96
96
|
return item.shadowRoot?.querySelector('[part="row"]') ?? null;
|
|
97
97
|
}
|
|
98
|
+
itemAtPoint(clientX, clientY) {
|
|
99
|
+
let element = this.host.ownerDocument.elementFromPoint(clientX, clientY);
|
|
100
|
+
while (element) {
|
|
101
|
+
if (element.localName === 'ui-tree-item' && this.host.contains(element)) {
|
|
102
|
+
return element;
|
|
103
|
+
}
|
|
104
|
+
const root = element.getRootNode();
|
|
105
|
+
element = root instanceof ShadowRoot ? root.host : element.parentElement;
|
|
106
|
+
}
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
98
109
|
acceptsChildren(item) {
|
|
99
110
|
return Boolean(item.container ?? item.hasAttribute('container'))
|
|
100
111
|
&& !Boolean(item.disabled ?? item.hasAttribute('disabled'));
|
|
@@ -205,29 +216,44 @@ const UITree = class {
|
|
|
205
216
|
return;
|
|
206
217
|
this.clearTarget();
|
|
207
218
|
};
|
|
219
|
+
dispatchReorder(source, target, position) {
|
|
220
|
+
const sourceId = this.itemId(source);
|
|
221
|
+
const targetId = this.itemId(target);
|
|
222
|
+
if (!sourceId || !targetId)
|
|
223
|
+
return;
|
|
224
|
+
const sourceMeta = this.itemMetadata(source);
|
|
225
|
+
const targetMeta = this.itemMetadata(target);
|
|
226
|
+
events.dispatchDetail(this.host, 'reorder', {
|
|
227
|
+
sourceId,
|
|
228
|
+
targetId,
|
|
229
|
+
position,
|
|
230
|
+
sourceType: sourceMeta.type,
|
|
231
|
+
targetType: targetMeta.type,
|
|
232
|
+
sourceScope: sourceMeta.scope,
|
|
233
|
+
targetScope: targetMeta.scope,
|
|
234
|
+
trigger: 'pointer',
|
|
235
|
+
});
|
|
236
|
+
}
|
|
208
237
|
onDrop = (event) => {
|
|
209
238
|
if (!this.source || !this.target || !this.position)
|
|
210
239
|
return;
|
|
211
240
|
event.preventDefault();
|
|
212
|
-
|
|
213
|
-
const targetId = this.itemId(this.target);
|
|
214
|
-
if (sourceId && targetId) {
|
|
215
|
-
const sourceMeta = this.itemMetadata(this.source);
|
|
216
|
-
const targetMeta = this.itemMetadata(this.target);
|
|
217
|
-
events.dispatchDetail(this.host, 'reorder', {
|
|
218
|
-
sourceId,
|
|
219
|
-
targetId,
|
|
220
|
-
position: this.position,
|
|
221
|
-
sourceType: sourceMeta.type,
|
|
222
|
-
targetType: targetMeta.type,
|
|
223
|
-
sourceScope: sourceMeta.scope,
|
|
224
|
-
targetScope: targetMeta.scope,
|
|
225
|
-
trigger: 'pointer',
|
|
226
|
-
});
|
|
227
|
-
}
|
|
241
|
+
this.dispatchReorder(this.source, this.target, this.position);
|
|
228
242
|
this.finishDrag();
|
|
229
243
|
};
|
|
230
|
-
onDragEnd = () => {
|
|
244
|
+
onDragEnd = (event) => {
|
|
245
|
+
if (this.source) {
|
|
246
|
+
const target = this.itemAtPoint(event.clientX, event.clientY);
|
|
247
|
+
if (target && target !== this.source) {
|
|
248
|
+
const row = this.rowFor(target);
|
|
249
|
+
if (row) {
|
|
250
|
+
const position = classifyDropPosition(row.getBoundingClientRect(), event.clientY, this.acceptsChildren(target));
|
|
251
|
+
if (this.permitsDrop(this.source, target, position)) {
|
|
252
|
+
this.dispatchReorder(this.source, target, position);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
231
257
|
this.finishDrag();
|
|
232
258
|
};
|
|
233
259
|
visibleItems() {
|
|
@@ -249,7 +275,7 @@ const UITree = class {
|
|
|
249
275
|
next.focus();
|
|
250
276
|
};
|
|
251
277
|
render() {
|
|
252
|
-
return (index.h(index.Host, { key: '
|
|
278
|
+
return (index.h(index.Host, { key: '9668f6170cec944d7b993bf0f98637d8908f5962', role: "tree", "aria-label": this.label || 'Tree' }, index.h("slot", { key: '93140b9a53ca3cddfdc1206e952ca713559dbc2f' })));
|
|
253
279
|
}
|
|
254
280
|
};
|
|
255
281
|
UITree.style = uiTreeCss();
|
|
@@ -36,6 +36,17 @@ export class UITree {
|
|
|
36
36
|
rowFor(item) {
|
|
37
37
|
return item.shadowRoot?.querySelector('[part="row"]') ?? null;
|
|
38
38
|
}
|
|
39
|
+
itemAtPoint(clientX, clientY) {
|
|
40
|
+
let element = this.host.ownerDocument.elementFromPoint(clientX, clientY);
|
|
41
|
+
while (element) {
|
|
42
|
+
if (element.localName === 'ui-tree-item' && this.host.contains(element)) {
|
|
43
|
+
return element;
|
|
44
|
+
}
|
|
45
|
+
const root = element.getRootNode();
|
|
46
|
+
element = root instanceof ShadowRoot ? root.host : element.parentElement;
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
39
50
|
acceptsChildren(item) {
|
|
40
51
|
return Boolean(item.container ?? item.hasAttribute('container'))
|
|
41
52
|
&& !Boolean(item.disabled ?? item.hasAttribute('disabled'));
|
|
@@ -146,29 +157,44 @@ export class UITree {
|
|
|
146
157
|
return;
|
|
147
158
|
this.clearTarget();
|
|
148
159
|
};
|
|
160
|
+
dispatchReorder(source, target, position) {
|
|
161
|
+
const sourceId = this.itemId(source);
|
|
162
|
+
const targetId = this.itemId(target);
|
|
163
|
+
if (!sourceId || !targetId)
|
|
164
|
+
return;
|
|
165
|
+
const sourceMeta = this.itemMetadata(source);
|
|
166
|
+
const targetMeta = this.itemMetadata(target);
|
|
167
|
+
dispatchDetail(this.host, 'reorder', {
|
|
168
|
+
sourceId,
|
|
169
|
+
targetId,
|
|
170
|
+
position,
|
|
171
|
+
sourceType: sourceMeta.type,
|
|
172
|
+
targetType: targetMeta.type,
|
|
173
|
+
sourceScope: sourceMeta.scope,
|
|
174
|
+
targetScope: targetMeta.scope,
|
|
175
|
+
trigger: 'pointer',
|
|
176
|
+
});
|
|
177
|
+
}
|
|
149
178
|
onDrop = (event) => {
|
|
150
179
|
if (!this.source || !this.target || !this.position)
|
|
151
180
|
return;
|
|
152
181
|
event.preventDefault();
|
|
153
|
-
|
|
154
|
-
const targetId = this.itemId(this.target);
|
|
155
|
-
if (sourceId && targetId) {
|
|
156
|
-
const sourceMeta = this.itemMetadata(this.source);
|
|
157
|
-
const targetMeta = this.itemMetadata(this.target);
|
|
158
|
-
dispatchDetail(this.host, 'reorder', {
|
|
159
|
-
sourceId,
|
|
160
|
-
targetId,
|
|
161
|
-
position: this.position,
|
|
162
|
-
sourceType: sourceMeta.type,
|
|
163
|
-
targetType: targetMeta.type,
|
|
164
|
-
sourceScope: sourceMeta.scope,
|
|
165
|
-
targetScope: targetMeta.scope,
|
|
166
|
-
trigger: 'pointer',
|
|
167
|
-
});
|
|
168
|
-
}
|
|
182
|
+
this.dispatchReorder(this.source, this.target, this.position);
|
|
169
183
|
this.finishDrag();
|
|
170
184
|
};
|
|
171
|
-
onDragEnd = () => {
|
|
185
|
+
onDragEnd = (event) => {
|
|
186
|
+
if (this.source) {
|
|
187
|
+
const target = this.itemAtPoint(event.clientX, event.clientY);
|
|
188
|
+
if (target && target !== this.source) {
|
|
189
|
+
const row = this.rowFor(target);
|
|
190
|
+
if (row) {
|
|
191
|
+
const position = classifyDropPosition(row.getBoundingClientRect(), event.clientY, this.acceptsChildren(target));
|
|
192
|
+
if (this.permitsDrop(this.source, target, position)) {
|
|
193
|
+
this.dispatchReorder(this.source, target, position);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
172
198
|
this.finishDrag();
|
|
173
199
|
};
|
|
174
200
|
visibleItems() {
|
|
@@ -190,7 +216,7 @@ export class UITree {
|
|
|
190
216
|
next.focus();
|
|
191
217
|
};
|
|
192
218
|
render() {
|
|
193
|
-
return (h(Host, { key: '
|
|
219
|
+
return (h(Host, { key: '9668f6170cec944d7b993bf0f98637d8908f5962', role: "tree", "aria-label": this.label || 'Tree' }, h("slot", { key: '93140b9a53ca3cddfdc1206e952ca713559dbc2f' })));
|
|
194
220
|
}
|
|
195
221
|
static get is() { return "ui-tree"; }
|
|
196
222
|
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";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 a=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("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("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}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=>{const e=t.relatedTarget;e instanceof Node&&this.host.contains(e)||this.clearTarget()};dispatchReorder(t,e,i){const s=this.itemId(t),r=this.itemId(e);if(!s||!r)return;const o=this.itemMetadata(t),a=this.itemMetadata(e);n(this.host,"reorder",{sourceId:s,targetId:r,position:i,sourceType:o.type,targetType:a.type,sourceScope:o.scope,targetScope:a.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:"9668f6170cec944d7b993bf0f98637d8908f5962",role:"tree","aria-label":this.label||"Tree"},i("slot",{key:"93140b9a53ca3cddfdc1206e952ca713559dbc2f"}))}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"]}]),h=a,d=function(){"undefined"!=typeof customElements&&["ui-tree"].forEach((t=>{"ui-tree"===t&&(customElements.get(r(t))||customElements.define(r(t),a))}))};export{h as UiTree,d as defineCustomElement}
|
|
@@ -93,6 +93,17 @@ const UITree = class {
|
|
|
93
93
|
rowFor(item) {
|
|
94
94
|
return item.shadowRoot?.querySelector('[part="row"]') ?? null;
|
|
95
95
|
}
|
|
96
|
+
itemAtPoint(clientX, clientY) {
|
|
97
|
+
let element = this.host.ownerDocument.elementFromPoint(clientX, clientY);
|
|
98
|
+
while (element) {
|
|
99
|
+
if (element.localName === 'ui-tree-item' && this.host.contains(element)) {
|
|
100
|
+
return element;
|
|
101
|
+
}
|
|
102
|
+
const root = element.getRootNode();
|
|
103
|
+
element = root instanceof ShadowRoot ? root.host : element.parentElement;
|
|
104
|
+
}
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
96
107
|
acceptsChildren(item) {
|
|
97
108
|
return Boolean(item.container ?? item.hasAttribute('container'))
|
|
98
109
|
&& !Boolean(item.disabled ?? item.hasAttribute('disabled'));
|
|
@@ -203,29 +214,44 @@ const UITree = class {
|
|
|
203
214
|
return;
|
|
204
215
|
this.clearTarget();
|
|
205
216
|
};
|
|
217
|
+
dispatchReorder(source, target, position) {
|
|
218
|
+
const sourceId = this.itemId(source);
|
|
219
|
+
const targetId = this.itemId(target);
|
|
220
|
+
if (!sourceId || !targetId)
|
|
221
|
+
return;
|
|
222
|
+
const sourceMeta = this.itemMetadata(source);
|
|
223
|
+
const targetMeta = this.itemMetadata(target);
|
|
224
|
+
dispatchDetail(this.host, 'reorder', {
|
|
225
|
+
sourceId,
|
|
226
|
+
targetId,
|
|
227
|
+
position,
|
|
228
|
+
sourceType: sourceMeta.type,
|
|
229
|
+
targetType: targetMeta.type,
|
|
230
|
+
sourceScope: sourceMeta.scope,
|
|
231
|
+
targetScope: targetMeta.scope,
|
|
232
|
+
trigger: 'pointer',
|
|
233
|
+
});
|
|
234
|
+
}
|
|
206
235
|
onDrop = (event) => {
|
|
207
236
|
if (!this.source || !this.target || !this.position)
|
|
208
237
|
return;
|
|
209
238
|
event.preventDefault();
|
|
210
|
-
|
|
211
|
-
const targetId = this.itemId(this.target);
|
|
212
|
-
if (sourceId && targetId) {
|
|
213
|
-
const sourceMeta = this.itemMetadata(this.source);
|
|
214
|
-
const targetMeta = this.itemMetadata(this.target);
|
|
215
|
-
dispatchDetail(this.host, 'reorder', {
|
|
216
|
-
sourceId,
|
|
217
|
-
targetId,
|
|
218
|
-
position: this.position,
|
|
219
|
-
sourceType: sourceMeta.type,
|
|
220
|
-
targetType: targetMeta.type,
|
|
221
|
-
sourceScope: sourceMeta.scope,
|
|
222
|
-
targetScope: targetMeta.scope,
|
|
223
|
-
trigger: 'pointer',
|
|
224
|
-
});
|
|
225
|
-
}
|
|
239
|
+
this.dispatchReorder(this.source, this.target, this.position);
|
|
226
240
|
this.finishDrag();
|
|
227
241
|
};
|
|
228
|
-
onDragEnd = () => {
|
|
242
|
+
onDragEnd = (event) => {
|
|
243
|
+
if (this.source) {
|
|
244
|
+
const target = this.itemAtPoint(event.clientX, event.clientY);
|
|
245
|
+
if (target && target !== this.source) {
|
|
246
|
+
const row = this.rowFor(target);
|
|
247
|
+
if (row) {
|
|
248
|
+
const position = classifyDropPosition(row.getBoundingClientRect(), event.clientY, this.acceptsChildren(target));
|
|
249
|
+
if (this.permitsDrop(this.source, target, position)) {
|
|
250
|
+
this.dispatchReorder(this.source, target, position);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
229
255
|
this.finishDrag();
|
|
230
256
|
};
|
|
231
257
|
visibleItems() {
|
|
@@ -247,7 +273,7 @@ const UITree = class {
|
|
|
247
273
|
next.focus();
|
|
248
274
|
};
|
|
249
275
|
render() {
|
|
250
|
-
return (h(Host, { key: '
|
|
276
|
+
return (h(Host, { key: '9668f6170cec944d7b993bf0f98637d8908f5962', role: "tree", "aria-label": this.label || 'Tree' }, h("slot", { key: '93140b9a53ca3cddfdc1206e952ca713559dbc2f' })));
|
|
251
277
|
}
|
|
252
278
|
};
|
|
253
279
|
UITree.style = uiTreeCss();
|
package/dist/index.cjs
CHANGED
|
@@ -3447,6 +3447,17 @@ var init_ui_tree_entry = __esm({
|
|
|
3447
3447
|
rowFor(item) {
|
|
3448
3448
|
return item.shadowRoot?.querySelector('[part="row"]') ?? null;
|
|
3449
3449
|
}
|
|
3450
|
+
itemAtPoint(clientX, clientY) {
|
|
3451
|
+
let element = this.host.ownerDocument.elementFromPoint(clientX, clientY);
|
|
3452
|
+
while (element) {
|
|
3453
|
+
if (element.localName === "ui-tree-item" && this.host.contains(element)) {
|
|
3454
|
+
return element;
|
|
3455
|
+
}
|
|
3456
|
+
const root = element.getRootNode();
|
|
3457
|
+
element = root instanceof ShadowRoot ? root.host : element.parentElement;
|
|
3458
|
+
}
|
|
3459
|
+
return null;
|
|
3460
|
+
}
|
|
3450
3461
|
acceptsChildren(item) {
|
|
3451
3462
|
return Boolean(item.container ?? item.hasAttribute("container")) && !Boolean(item.disabled ?? item.hasAttribute("disabled"));
|
|
3452
3463
|
}
|
|
@@ -3546,29 +3557,44 @@ var init_ui_tree_entry = __esm({
|
|
|
3546
3557
|
return;
|
|
3547
3558
|
this.clearTarget();
|
|
3548
3559
|
};
|
|
3560
|
+
dispatchReorder(source, target, position) {
|
|
3561
|
+
const sourceId = this.itemId(source);
|
|
3562
|
+
const targetId = this.itemId(target);
|
|
3563
|
+
if (!sourceId || !targetId)
|
|
3564
|
+
return;
|
|
3565
|
+
const sourceMeta = this.itemMetadata(source);
|
|
3566
|
+
const targetMeta = this.itemMetadata(target);
|
|
3567
|
+
dispatchDetail(this.host, "reorder", {
|
|
3568
|
+
sourceId,
|
|
3569
|
+
targetId,
|
|
3570
|
+
position,
|
|
3571
|
+
sourceType: sourceMeta.type,
|
|
3572
|
+
targetType: targetMeta.type,
|
|
3573
|
+
sourceScope: sourceMeta.scope,
|
|
3574
|
+
targetScope: targetMeta.scope,
|
|
3575
|
+
trigger: "pointer"
|
|
3576
|
+
});
|
|
3577
|
+
}
|
|
3549
3578
|
onDrop = (event) => {
|
|
3550
3579
|
if (!this.source || !this.target || !this.position)
|
|
3551
3580
|
return;
|
|
3552
3581
|
event.preventDefault();
|
|
3553
|
-
|
|
3554
|
-
const targetId = this.itemId(this.target);
|
|
3555
|
-
if (sourceId && targetId) {
|
|
3556
|
-
const sourceMeta = this.itemMetadata(this.source);
|
|
3557
|
-
const targetMeta = this.itemMetadata(this.target);
|
|
3558
|
-
dispatchDetail(this.host, "reorder", {
|
|
3559
|
-
sourceId,
|
|
3560
|
-
targetId,
|
|
3561
|
-
position: this.position,
|
|
3562
|
-
sourceType: sourceMeta.type,
|
|
3563
|
-
targetType: targetMeta.type,
|
|
3564
|
-
sourceScope: sourceMeta.scope,
|
|
3565
|
-
targetScope: targetMeta.scope,
|
|
3566
|
-
trigger: "pointer"
|
|
3567
|
-
});
|
|
3568
|
-
}
|
|
3582
|
+
this.dispatchReorder(this.source, this.target, this.position);
|
|
3569
3583
|
this.finishDrag();
|
|
3570
3584
|
};
|
|
3571
|
-
onDragEnd = () => {
|
|
3585
|
+
onDragEnd = (event) => {
|
|
3586
|
+
if (this.source) {
|
|
3587
|
+
const target = this.itemAtPoint(event.clientX, event.clientY);
|
|
3588
|
+
if (target && target !== this.source) {
|
|
3589
|
+
const row = this.rowFor(target);
|
|
3590
|
+
if (row) {
|
|
3591
|
+
const position = classifyDropPosition(row.getBoundingClientRect(), event.clientY, this.acceptsChildren(target));
|
|
3592
|
+
if (this.permitsDrop(this.source, target, position)) {
|
|
3593
|
+
this.dispatchReorder(this.source, target, position);
|
|
3594
|
+
}
|
|
3595
|
+
}
|
|
3596
|
+
}
|
|
3597
|
+
}
|
|
3572
3598
|
this.finishDrag();
|
|
3573
3599
|
};
|
|
3574
3600
|
visibleItems() {
|
|
@@ -3589,7 +3615,7 @@ var init_ui_tree_entry = __esm({
|
|
|
3589
3615
|
next.focus();
|
|
3590
3616
|
};
|
|
3591
3617
|
render() {
|
|
3592
|
-
return h(Host, { key: "
|
|
3618
|
+
return h(Host, { key: "9668f6170cec944d7b993bf0f98637d8908f5962", role: "tree", "aria-label": this.label || "Tree" }, h("slot", { key: "93140b9a53ca3cddfdc1206e952ca713559dbc2f" }));
|
|
3593
3619
|
}
|
|
3594
3620
|
};
|
|
3595
3621
|
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-979b8ab1",[[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("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("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}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=>{const i=t.relatedTarget;i instanceof Node&&this.host.contains(i)||this.clearTarget()};dispatchReorder(t,i,e){const s=this.itemId(t),n=this.itemId(i);if(!s||!n)return;const o=this.itemMetadata(t),a=this.itemMetadata(i);r(this.host,"reorder",{sourceId:s,targetId:n,position:e,sourceType:o.type,targetType:a.type,sourceScope:o.scope,targetScope:a.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:"9668f6170cec944d7b993bf0f98637d8908f5962",role:"tree","aria-label":this.label||"Tree"},e("slot",{key:"93140b9a53ca3cddfdc1206e952ca713559dbc2f"}))}};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}
|
|
@@ -11,6 +11,7 @@ export declare class UITree {
|
|
|
11
11
|
private itemFromEvent;
|
|
12
12
|
private itemId;
|
|
13
13
|
private rowFor;
|
|
14
|
+
private itemAtPoint;
|
|
14
15
|
private acceptsChildren;
|
|
15
16
|
private itemMetadata;
|
|
16
17
|
private permitsDrop;
|
|
@@ -20,6 +21,7 @@ export declare class UITree {
|
|
|
20
21
|
private onDragStart;
|
|
21
22
|
private onDragOver;
|
|
22
23
|
private onDragLeave;
|
|
24
|
+
private dispatchReorder;
|
|
23
25
|
private onDrop;
|
|
24
26
|
private onDragEnd;
|
|
25
27
|
private visibleItems;
|
package/dist/{ui-affordance-scope.entry-2CJOZHBF.js → ui-affordance-scope.entry-TEYCR7NX.js}
RENAMED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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-RLSUA6N5.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}`;
|
package/dist/{ui-search-result-row.entry-EV73E2AD.js → ui-search-result-row.entry-3BY6GUCL.js}
RENAMED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Host,
|
|
3
3
|
h,
|
|
4
4
|
registerInstance
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RLSUA6N5.js";
|
|
6
6
|
|
|
7
7
|
// dist/esm/ui-search-result-row.entry.js
|
|
8
8
|
var uiSearchResultRowCss = () => `:host{display:block}.search-result-row{appearance:none;inline-size:100%;min-block-size:var(--ui-search-result-row-min-height, 56px);margin:0;padding-block:var(--ui-search-result-row-padding-block, var(--ui-space-3, 0.75rem));padding-inline:var(--ui-search-result-row-padding-inline, var(--ui-space-4, 1rem));display:flex;align-items:flex-start;gap:var(--ui-search-result-row-gap, var(--ui-space-3, 0.75rem));background:var(--ui-search-result-row-bg, transparent);border:none;border-block-end:1px solid var(--ui-search-result-row-border, var(--ui-border, #e5e7eb));color:inherit;cursor:pointer;text-align:left;transition:background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease)}:host(:last-child) .search-result-row{border-block-end:none}.search-result-row:hover:enabled{background:var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%))}:host([selected]) .search-result-row{background:var( --ui-search-result-row-selected-bg, var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%)) )}.search-result-row:focus-visible{outline:2px solid var(--ui-focus-ring, #2563eb);outline-offset:-2px}.search-result-row:disabled,:host([disabled]) .search-result-row{opacity:0.6;cursor:not-allowed}.search-result-row__leading,.search-result-row__trailing{display:inline-flex;align-items:flex-start;flex-shrink:0}.search-result-row__content{min-inline-size:0;flex:1;display:flex;flex-direction:column}.search-result-row__title,.search-result-row__meta,.search-result-row__excerpt{display:block;min-inline-size:0}[hidden]{display:none}::slotted([slot='title']),::slotted([slot='meta']),::slotted([slot='excerpt']){display:block;margin:0}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
h,
|
|
3
3
|
registerInstance
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RLSUA6N5.js";
|
|
5
5
|
|
|
6
6
|
// dist/esm/ui-search-shell.entry.js
|
|
7
7
|
var uiSearchShellCss = () => `:host{position:fixed;inset:0;z-index:var(--ui-search-shell-z-index, 400);display:block}.search-shell{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;padding-block-start:var(--ui-search-shell-padding-top, 10vh)}.search-shell__panel{position:relative;inline-size:min( calc(100% - (var(--ui-search-shell-margin-inline, var(--ui-space-4, 1rem)) * 2)), var(--ui-search-shell-max-width, 640px) );max-block-size:var(--ui-search-shell-max-height, 80vh);display:flex;flex-direction:column;overflow:hidden;background:var(--ui-search-shell-bg, var(--ui-surface, #ffffff));border:1px solid var(--ui-search-shell-border, var(--ui-border, #e5e7eb));border-radius:var(--ui-search-shell-radius, var(--ui-radius-xl, 1rem));box-shadow:var(--ui-search-shell-shadow, var(--ui-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12)))}.search-shell__search,.search-shell__status,.search-shell__footer{flex-shrink:0}.search-shell__body{flex:1;min-block-size:0}[hidden]{display:none}@media (max-width: 767px){.search-shell{padding-block-start:0;align-items:stretch}.search-shell__panel{inline-size:100%;block-size:100vh;block-size:100dvh;max-block-size:none;border-radius:0;border-inline:none;border-block-start:none}}`;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RLSUA6N5.js";
|
|
11
11
|
|
|
12
12
|
// dist/esm/ui-select.entry.js
|
|
13
13
|
var uiSelectCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(select){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background-color:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding-block:var(--ui-select-padding-block, var(--ui-space-2));padding-inline-start:var(--ui-select-padding-inline-start, var(--ui-space-3));padding-inline-end:var(--ui-select-padding-inline-end, calc(var(--ui-space-6) + var(--ui-space-3)));margin:0;background-image:linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);background-position:calc(100% - 1rem) calc(50% - 2px), calc(100% - 0.7rem) calc(50% - 2px);background-size:0.35rem 0.35rem, 0.35rem 0.35rem;background-repeat:no-repeat;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(select:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(select:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(select),::slotted(select[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(select:disabled){background-color:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(select:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(select[multiple]),::slotted(select[size]:not([size='1'])){background-image:none;padding-inline-end:var(--ui-select-padding-inline-start, var(--ui-space-3))}`;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getElement,
|
|
7
7
|
h,
|
|
8
8
|
registerInstance
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RLSUA6N5.js";
|
|
10
10
|
|
|
11
11
|
// dist/esm/ui-switch.entry.js
|
|
12
12
|
var uiSwitchCss = () => `: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}:host([role='switch']){cursor:pointer}:host input[type='checkbox']{appearance:none;-webkit-appearance:none;display:block;position:relative;width:2.25rem;height:1.25rem;padding:0;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host input[type='checkbox']::after{content:'';position:absolute;top:2px;left:2px;width:0.875rem;height:0.875rem;border-radius:999px;background:var(--ui-surface-default);border:1px solid var(--ui-border-default);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}:host input[type='checkbox']:checked{background:var(--ui-accent-solid);border-color:var(--ui-accent-solid)}:host input[type='checkbox']:checked::after{transform:translateX(calc(2.25rem - 0.875rem - 4px));background:var(--ui-text-on-accent);border-color:var(--ui-text-on-accent)}:host input[type='checkbox']:focus-visible{outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RLSUA6N5.js";
|
|
11
11
|
|
|
12
12
|
// dist/esm/ui-tabs.entry.js
|
|
13
13
|
var uiTabsCss = () => `:host{display:flex;flex-direction:column;gap:0}:host([data-orientation='vertical']){flex-direction:row}::slotted([role='tablist']){display:flex;gap:0;max-inline-size:100%;overflow-x:auto;overscroll-behavior-inline:contain;border-bottom:1px solid var(--ui-border-default)}:host([data-orientation='vertical']) ::slotted([role='tablist']){flex-direction:column;border-bottom:none;border-inline-end:1px solid var(--ui-border-default)}::slotted(button[role='tab']),::slotted([role='tab']),::slotted(ui-button) button[role='tab']{padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);font-weight:var(--ui-font-medium, 500);color:var(--ui-text-secondary);background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;transition:color var(--ui-motion-fast) var(--ui-motion-ease);box-shadow:none}::slotted(button[role='tab']:hover),::slotted([role='tab']:hover){color:var(--ui-text-primary)}::slotted(button[role='tab'][aria-selected='true']),::slotted([role='tab'][aria-selected='true']){color:var(--ui-accent-solid);border-bottom-color:var(--ui-accent-solid)}:host([data-orientation='vertical']) ::slotted(button[role='tab']),:host([data-orientation='vertical']) ::slotted([role='tab']){border-bottom:none;border-inline-end:2px solid transparent;margin-bottom:0;margin-inline-end:-1px}:host([data-orientation='vertical']) ::slotted(button[role='tab'][aria-selected='true']),:host([data-orientation='vertical']) ::slotted([role='tab'][aria-selected='true']){border-inline-end-color:var(--ui-accent-solid)}::slotted([role='tabpanel']){padding:var(--ui-space-4)}`;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RLSUA6N5.js";
|
|
11
11
|
|
|
12
12
|
// dist/esm/ui-textarea.entry.js
|
|
13
13
|
var uiTextareaCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(textarea){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);min-block-size:calc(var(--ui-space-12, 3rem) * 2);padding:var(--ui-space-2) var(--ui-space-3);margin:0;resize:vertical;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(textarea:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(textarea:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(textarea),::slotted(textarea[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(textarea:disabled){background:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(textarea:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getElement,
|
|
11
11
|
h,
|
|
12
12
|
registerInstance
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-RLSUA6N5.js";
|
|
14
14
|
|
|
15
15
|
// dist/esm/ui-toast-region.entry.js
|
|
16
16
|
var 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}`;
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getElement,
|
|
15
15
|
h,
|
|
16
16
|
registerInstance
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RLSUA6N5.js";
|
|
18
18
|
|
|
19
19
|
// dist/esm/ui-tooltip.entry.js
|
|
20
20
|
var 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}}`;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getElement,
|
|
4
4
|
h,
|
|
5
5
|
registerInstance
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RLSUA6N5.js";
|
|
7
7
|
|
|
8
8
|
// dist/esm/ui-top-bar.entry.js
|
|
9
9
|
var uiTopBarCss = () => `:host{position:sticky;inset-block-start:0;z-index:var(--ui-top-bar-z-index, 100);display:block}.top-bar{min-block-size:calc(var(--ui-top-bar-height, 56px) + env(safe-area-inset-top));display:flex;align-items:center;gap:var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));padding-block-start:env(safe-area-inset-top);padding-inline-start:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-left) );padding-inline-end:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-right) );background:var(--ui-top-bar-bg, var(--ui-surface, #ffffff));border-block-end:1px solid var(--ui-top-bar-border, var(--ui-border, #e5e7eb))}.top-bar__leading,.top-bar__search,.top-bar__actions{display:flex;align-items:center;flex-shrink:0}.top-bar__actions{gap:var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem))}.top-bar__title{min-inline-size:0;flex:1}[hidden]{display:none}@media (min-width: 768px){:host{display:none}}`;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getElement,
|
|
7
7
|
h,
|
|
8
8
|
registerInstance
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RLSUA6N5.js";
|
|
10
10
|
|
|
11
11
|
// dist/esm/ui-tree.entry.js
|
|
12
12
|
function classifyDropPosition(rect, clientY, acceptsChildren) {
|
|
@@ -93,6 +93,17 @@ var UITree = class {
|
|
|
93
93
|
rowFor(item) {
|
|
94
94
|
return item.shadowRoot?.querySelector('[part="row"]') ?? null;
|
|
95
95
|
}
|
|
96
|
+
itemAtPoint(clientX, clientY) {
|
|
97
|
+
let element = this.host.ownerDocument.elementFromPoint(clientX, clientY);
|
|
98
|
+
while (element) {
|
|
99
|
+
if (element.localName === "ui-tree-item" && this.host.contains(element)) {
|
|
100
|
+
return element;
|
|
101
|
+
}
|
|
102
|
+
const root = element.getRootNode();
|
|
103
|
+
element = root instanceof ShadowRoot ? root.host : element.parentElement;
|
|
104
|
+
}
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
96
107
|
acceptsChildren(item) {
|
|
97
108
|
return Boolean(item.container ?? item.hasAttribute("container")) && !Boolean(item.disabled ?? item.hasAttribute("disabled"));
|
|
98
109
|
}
|
|
@@ -192,29 +203,44 @@ var UITree = class {
|
|
|
192
203
|
return;
|
|
193
204
|
this.clearTarget();
|
|
194
205
|
};
|
|
206
|
+
dispatchReorder(source, target, position) {
|
|
207
|
+
const sourceId = this.itemId(source);
|
|
208
|
+
const targetId = this.itemId(target);
|
|
209
|
+
if (!sourceId || !targetId)
|
|
210
|
+
return;
|
|
211
|
+
const sourceMeta = this.itemMetadata(source);
|
|
212
|
+
const targetMeta = this.itemMetadata(target);
|
|
213
|
+
dispatchDetail(this.host, "reorder", {
|
|
214
|
+
sourceId,
|
|
215
|
+
targetId,
|
|
216
|
+
position,
|
|
217
|
+
sourceType: sourceMeta.type,
|
|
218
|
+
targetType: targetMeta.type,
|
|
219
|
+
sourceScope: sourceMeta.scope,
|
|
220
|
+
targetScope: targetMeta.scope,
|
|
221
|
+
trigger: "pointer"
|
|
222
|
+
});
|
|
223
|
+
}
|
|
195
224
|
onDrop = (event) => {
|
|
196
225
|
if (!this.source || !this.target || !this.position)
|
|
197
226
|
return;
|
|
198
227
|
event.preventDefault();
|
|
199
|
-
|
|
200
|
-
const targetId = this.itemId(this.target);
|
|
201
|
-
if (sourceId && targetId) {
|
|
202
|
-
const sourceMeta = this.itemMetadata(this.source);
|
|
203
|
-
const targetMeta = this.itemMetadata(this.target);
|
|
204
|
-
dispatchDetail(this.host, "reorder", {
|
|
205
|
-
sourceId,
|
|
206
|
-
targetId,
|
|
207
|
-
position: this.position,
|
|
208
|
-
sourceType: sourceMeta.type,
|
|
209
|
-
targetType: targetMeta.type,
|
|
210
|
-
sourceScope: sourceMeta.scope,
|
|
211
|
-
targetScope: targetMeta.scope,
|
|
212
|
-
trigger: "pointer"
|
|
213
|
-
});
|
|
214
|
-
}
|
|
228
|
+
this.dispatchReorder(this.source, this.target, this.position);
|
|
215
229
|
this.finishDrag();
|
|
216
230
|
};
|
|
217
|
-
onDragEnd = () => {
|
|
231
|
+
onDragEnd = (event) => {
|
|
232
|
+
if (this.source) {
|
|
233
|
+
const target = this.itemAtPoint(event.clientX, event.clientY);
|
|
234
|
+
if (target && target !== this.source) {
|
|
235
|
+
const row = this.rowFor(target);
|
|
236
|
+
if (row) {
|
|
237
|
+
const position = classifyDropPosition(row.getBoundingClientRect(), event.clientY, this.acceptsChildren(target));
|
|
238
|
+
if (this.permitsDrop(this.source, target, position)) {
|
|
239
|
+
this.dispatchReorder(this.source, target, position);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
218
244
|
this.finishDrag();
|
|
219
245
|
};
|
|
220
246
|
visibleItems() {
|
|
@@ -235,7 +261,7 @@ var UITree = class {
|
|
|
235
261
|
next.focus();
|
|
236
262
|
};
|
|
237
263
|
render() {
|
|
238
|
-
return h(Host, { key: "
|
|
264
|
+
return h(Host, { key: "9668f6170cec944d7b993bf0f98637d8908f5962", role: "tree", "aria-label": this.label || "Tree" }, h("slot", { key: "93140b9a53ca3cddfdc1206e952ca713559dbc2f" }));
|
|
239
265
|
}
|
|
240
266
|
};
|
|
241
267
|
UITree.style = uiTreeCss();
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as e,h as i,H as s}from"./p-CEeiinfk.js";import{d as r}from"./p-JwSoedEO.js";const n=class{constructor(e){t(this,e)}get host(){return e(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("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("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}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,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 e=this.itemFromEvent(t);if(!e||!Boolean(e.sortable??e.hasAttribute("sortable"))||Boolean(e.disabled??e.hasAttribute("disabled")))return;if(!t.composedPath().some((t=>t instanceof HTMLElement&&"drag-handle"===t.getAttribute("part"))))return void t.preventDefault();const i=this.itemId(e),s=this.rowFor(e);i&&s?(this.source=e,e.setAttribute("data-dragging","true"),t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",i)),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,s)):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=function(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"}(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=>{const e=t.relatedTarget;e instanceof Node&&this.host.contains(e)||this.clearTarget()};onDrop=t=>{if(!this.source||!this.target||!this.position)return;t.preventDefault();const e=this.itemId(this.source),i=this.itemId(this.target);if(e&&i){const t=this.itemMetadata(this.source),s=this.itemMetadata(this.target);r(this.host,"reorder",{sourceId:e,targetId:i,position:this.position,sourceType:t.type,targetType:s.type,sourceScope:t.scope,targetScope:s.scope,trigger:"pointer"})}this.finishDrag()};onDragEnd=()=>{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:"5761d2840d2694340a4b937d46522f15f81973ac",role:"tree","aria-label":this.label||"Tree"},i("slot",{key:"08e5a7b489eed4f4eae9de6462104fd12defd336"}))}};n.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{n as ui_tree}
|