@threadlabs/looma 0.1.27 → 0.2.0
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-RLELJVBL.js → chunk-JXSHRMYW.js} +32 -33
- package/dist/{chunk-YHXJC5M5.js → chunk-M7FPK6GN.js} +17 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/looma.cjs.js +1 -1
- package/dist/cjs/{positioning-i0WrCAdF.js → positioning-D5q9DM-0.js} +19 -12
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +1 -1
- package/dist/cjs/ui-chip_2.cjs.entry.js +190 -498
- package/dist/cjs/ui-combobox.cjs.entry.js +708 -0
- package/dist/cjs/ui-context-menu.cjs.entry.js +2 -2
- package/dist/cjs/ui-dialog.cjs.entry.js +2 -2
- package/dist/cjs/ui-disclosure.cjs.entry.js +1 -1
- package/dist/cjs/ui-editable.cjs.entry.js +3 -3
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-form-field.cjs.entry.js +1 -1
- package/dist/cjs/ui-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-input.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu.cjs.entry.js +3 -3
- package/dist/cjs/ui-popover.cjs.entry.js +3 -3
- package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-radio.cjs.entry.js +1 -1
- package/dist/cjs/ui-search-result-row.cjs.entry.js +1 -1
- package/dist/cjs/ui-search-shell.cjs.entry.js +1 -1
- package/dist/cjs/ui-select.cjs.entry.js +1 -1
- package/dist/cjs/ui-switch.cjs.entry.js +2 -2
- package/dist/cjs/ui-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ui-toast-region.cjs.entry.js +2 -2
- package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
- package/dist/cjs/ui-tree-item.cjs.entry.js +2 -2
- package/dist/cjs/ui-tree.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/ui-combobox/ui-combobox.css +23 -0
- package/dist/collection/components/ui-combobox/ui-combobox.js +298 -21
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
- package/dist/collection/components/ui-dialog/ui-dialog.css +1 -0
- package/dist/collection/components/ui-dialog/ui-dialog.js +1 -1
- package/dist/collection/components/ui-disclosure/ui-disclosure.js +1 -1
- package/dist/collection/components/ui-editable/ui-editable.js +3 -3
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
- package/dist/collection/components/ui-form-field/ui-form-field.js +1 -1
- package/dist/collection/components/ui-icon-button/ui-icon-button.js +1 -1
- package/dist/collection/components/ui-input/ui-input.js +1 -1
- package/dist/collection/components/ui-menu/ui-menu.css +7 -2
- package/dist/collection/components/ui-menu/ui-menu.js +1 -1
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
- package/dist/collection/components/ui-popover/ui-popover.css +6 -2
- package/dist/collection/components/ui-popover/ui-popover.js +1 -1
- package/dist/collection/components/ui-radio/ui-radio.js +1 -1
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
- package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
- package/dist/collection/components/ui-select/ui-select.js +1 -1
- package/dist/collection/components/ui-switch/ui-switch.js +2 -2
- package/dist/collection/components/ui-tabs/ui-tabs.js +1 -1
- package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +1 -1
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +1 -1
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
- package/dist/collection/components/ui-tree/ui-tree.js +1 -1
- package/dist/collection/components/ui-tree-item/ui-tree-item.js +2 -2
- package/dist/collection/overlay/positioning.js +21 -14
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +1 -1
- package/dist/components/{p-DZRtXH6j.js → p-DWN2m6ta.js} +1 -1
- package/dist/components/p-DYiNETk6.js +1 -0
- package/dist/components/p-Drw41pSY.js +1 -0
- package/dist/components/ui-affordance-scope.js +1 -1
- package/dist/components/ui-combobox.js +1 -1
- package/dist/components/ui-context-menu.js +1 -1
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-disclosure.js +1 -1
- package/dist/components/ui-editable.js +1 -1
- package/dist/components/ui-floating-action-button.js +1 -1
- package/dist/components/ui-form-field.js +1 -1
- package/dist/components/ui-icon-button.js +1 -1
- package/dist/components/ui-input.js +1 -1
- package/dist/components/ui-menu-item.js +1 -1
- package/dist/components/ui-menu.js +1 -1
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-radio-group.js +1 -1
- package/dist/components/ui-radio.js +1 -1
- package/dist/components/ui-search-result-row.js +1 -1
- package/dist/components/ui-search-shell.js +1 -1
- package/dist/components/ui-select.js +1 -1
- package/dist/components/ui-switch.js +1 -1
- package/dist/components/ui-tabs.js +1 -1
- package/dist/components/ui-textarea.js +1 -1
- package/dist/components/ui-toast-region.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/components/ui-top-bar.js +1 -1
- package/dist/components/ui-tree-item.js +1 -1
- package/dist/components/ui-tree.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/looma.js +1 -1
- package/dist/esm/{positioning-Bu0dmLBE.js → positioning-Drmwg-C1.js} +19 -12
- package/dist/esm/ui-affordance-scope.entry.js +1 -1
- package/dist/esm/ui-chip_2.entry.js +193 -501
- package/dist/esm/ui-combobox.entry.js +706 -0
- package/dist/esm/ui-context-menu.entry.js +2 -2
- package/dist/esm/ui-dialog.entry.js +2 -2
- package/dist/esm/ui-disclosure.entry.js +1 -1
- package/dist/esm/ui-editable.entry.js +3 -3
- package/dist/esm/ui-floating-action-button.entry.js +1 -1
- package/dist/esm/ui-form-field.entry.js +1 -1
- package/dist/esm/ui-icon-button.entry.js +1 -1
- package/dist/esm/ui-input.entry.js +1 -1
- package/dist/esm/ui-menu-item.entry.js +1 -1
- package/dist/esm/ui-menu.entry.js +3 -3
- package/dist/esm/ui-popover.entry.js +3 -3
- package/dist/esm/ui-radio-group.entry.js +1 -1
- package/dist/esm/ui-radio.entry.js +1 -1
- package/dist/esm/ui-search-result-row.entry.js +1 -1
- package/dist/esm/ui-search-shell.entry.js +1 -1
- package/dist/esm/ui-select.entry.js +1 -1
- package/dist/esm/ui-switch.entry.js +2 -2
- package/dist/esm/ui-tabs.entry.js +1 -1
- package/dist/esm/ui-textarea.entry.js +1 -1
- package/dist/esm/ui-toast-region.entry.js +2 -2
- package/dist/esm/ui-top-bar.entry.js +1 -1
- package/dist/esm/ui-tree-item.entry.js +2 -2
- package/dist/esm/ui-tree.entry.js +1 -1
- package/dist/index.cjs +525 -550
- package/dist/index.js +27 -14
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/{p-9a82c523.entry.js → p-1249a806.entry.js} +1 -1
- package/dist/looma/p-1c00670f.entry.js +1 -0
- package/dist/looma/p-22842f8c.entry.js +1 -0
- package/dist/looma/{p-1e1de77f.entry.js → p-2915d5c0.entry.js} +1 -1
- package/dist/looma/{p-72338f53.entry.js → p-32c85198.entry.js} +1 -1
- package/dist/looma/{p-b75aff63.entry.js → p-37ec2b4b.entry.js} +1 -1
- package/dist/looma/{p-2f3c1b57.entry.js → p-3b2961a6.entry.js} +1 -1
- package/dist/looma/{p-e07e6ac2.entry.js → p-3f60f4c8.entry.js} +1 -1
- package/dist/looma/{p-9551ebf6.entry.js → p-424d6719.entry.js} +1 -1
- package/dist/looma/{p-6cc3180b.entry.js → p-4caccfce.entry.js} +1 -1
- package/dist/looma/p-55e06e2e.entry.js +1 -0
- package/dist/looma/{p-a939c00f.entry.js → p-56dac38a.entry.js} +1 -1
- package/dist/looma/p-5cbbf7a0.entry.js +1 -0
- package/dist/looma/{p-f431dc13.entry.js → p-6f20d470.entry.js} +1 -1
- package/dist/looma/{p-b68762f2.entry.js → p-7c0b5364.entry.js} +1 -1
- package/dist/looma/{p-e82f104c.entry.js → p-8bdd9495.entry.js} +1 -1
- package/dist/looma/{p-df696cca.entry.js → p-9cfbf722.entry.js} +1 -1
- package/dist/looma/p-Drmwg-C1.js +1 -0
- package/dist/looma/{p-607c3056.entry.js → p-b6ede6bb.entry.js} +1 -1
- package/dist/looma/p-b6fb6ba3.entry.js +1 -0
- package/dist/looma/{p-da6e2d01.entry.js → p-b76e2111.entry.js} +1 -1
- package/dist/looma/{p-1a12eb5c.entry.js → p-d372b0db.entry.js} +1 -1
- package/dist/looma/p-d46317e0.entry.js +1 -0
- package/dist/looma/{p-20387ffa.entry.js → p-d4825822.entry.js} +1 -1
- package/dist/looma/{p-8a5e3fe1.entry.js → p-d5c3954f.entry.js} +1 -1
- package/dist/looma/p-e604e906.entry.js +1 -0
- package/dist/looma/{p-e406656e.entry.js → p-f1f7c5cb.entry.js} +1 -1
- package/dist/types/components/ui-combobox/ui-combobox.d.ts +35 -4
- package/dist/types/components.d.ts +56 -153
- package/dist/{ui-affordance-scope.entry-7H6GIQEK.js → ui-affordance-scope.entry-VR7FLAWG.js} +2 -2
- package/dist/{ui-avatar-group.entry-QB25IUWA.js → ui-avatar-group.entry-L3UKOY3U.js} +1 -1
- package/dist/{ui-avatar.entry-L377CWPR.js → ui-avatar.entry-VM5OHEFQ.js} +1 -1
- package/dist/{ui-badge.entry-QHC3KI5S.js → ui-badge.entry-ZTM4OPUD.js} +1 -1
- package/dist/{ui-button.entry-MZGTPU22.js → ui-button.entry-CIPUSV5B.js} +1 -1
- package/dist/{ui-callout.entry-2D4LO74K.js → ui-callout.entry-OBFCI2O7.js} +1 -1
- package/dist/{ui-checkbox.entry-B2O5DREC.js → ui-checkbox.entry-XT6ET56H.js} +1 -1
- package/dist/{ui-tooltip.entry-VG4AWEBD.js → ui-chip_2.entry-32SHCLV6.js} +19 -4
- package/dist/{ui-chip_2.entry-OOSON72O.js → ui-combobox.entry-ONBBPQ2C.js} +170 -31
- package/dist/{ui-context-menu.entry-UY76G7HM.js → ui-context-menu.entry-RXNUOK24.js} +3 -3
- package/dist/{ui-dialog.entry-345V7IJ3.js → ui-dialog.entry-IJXNUARC.js} +3 -3
- package/dist/{ui-disclosure.entry-RUU7VNDN.js → ui-disclosure.entry-5QS7UDRH.js} +2 -2
- package/dist/{ui-editable.entry-WWFFHOMP.js → ui-editable.entry-D7LOQN2H.js} +3 -3
- package/dist/{ui-floating-action-button.entry-Y2TLDJO4.js → ui-floating-action-button.entry-XQZCTZQT.js} +2 -2
- package/dist/{ui-form-field.entry-C63GZMQR.js → ui-form-field.entry-A654LJZE.js} +2 -2
- package/dist/{ui-icon-button.entry-35MJYYEI.js → ui-icon-button.entry-MJ7F7ZIH.js} +2 -2
- package/dist/{ui-input.entry-3FAXEH5M.js → ui-input.entry-B2XM7JQU.js} +2 -2
- package/dist/{ui-menu-item.entry-3J42XLCJ.js → ui-menu-item.entry-JULYSFVW.js} +2 -2
- package/dist/{ui-menu.entry-YDABO3OO.js → ui-menu.entry-ORRWW7HD.js} +4 -4
- package/dist/{ui-popover.entry-YP7R6FQO.js → ui-popover.entry-W67V4UPA.js} +4 -4
- package/dist/{ui-radio-group.entry-TYXAN7G5.js → ui-radio-group.entry-KCFOR27M.js} +2 -2
- package/dist/{ui-radio.entry-JW7HX3LW.js → ui-radio.entry-I2P4V5E3.js} +2 -2
- package/dist/{ui-search-result-row.entry-MKQYGNFO.js → ui-search-result-row.entry-GHODLSLR.js} +2 -2
- package/dist/{ui-search-shell.entry-KHIQTT4J.js → ui-search-shell.entry-PDB5UN4B.js} +2 -2
- package/dist/{ui-select.entry-R235Y3IL.js → ui-select.entry-D3CZHCKB.js} +2 -2
- package/dist/{ui-switch.entry-BJ6FIEPB.js → ui-switch.entry-WUDRL4H5.js} +3 -3
- package/dist/{ui-tabs.entry-ZBP3FLR2.js → ui-tabs.entry-MW64GKIJ.js} +2 -2
- package/dist/{ui-textarea.entry-2YW7TCEU.js → ui-textarea.entry-VHRBYY6G.js} +2 -2
- package/dist/{ui-toast-region.entry-ZSCMMIKQ.js → ui-toast-region.entry-ET75RWYP.js} +3 -3
- package/dist/{ui-top-bar.entry-CZW3MLC6.js → ui-top-bar.entry-QIYA3LD3.js} +2 -2
- package/dist/{ui-tree-item.entry-CU2SWAOK.js → ui-tree-item.entry-BDB7VEUS.js} +3 -3
- package/dist/{ui-tree.entry-M6KXK7GJ.js → ui-tree.entry-GSC7BPRN.js} +2 -2
- package/package.json +1 -1
- package/styles.css +6 -4
- package/vue/{chunk-2DDIBSFD.js → chunk-ROMBQS2L.js} +32 -89
- package/vue/editor/index.js +1 -1
- package/vue/index.d.ts +30 -107
- package/vue/index.js +1 -3
- package/dist/cjs/ui-multi-combobox.cjs.entry.js +0 -190
- package/dist/cjs/ui-tooltip.cjs.entry.js +0 -241
- package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.css +0 -33
- package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.js +0 -553
- package/dist/components/p-BKzrrab4.js +0 -1
- package/dist/components/p-D0wBI-9r.js +0 -1
- package/dist/components/p-DOulVJT7.js +0 -1
- package/dist/components/ui-multi-combobox.d.ts +0 -11
- package/dist/components/ui-multi-combobox.js +0 -1
- package/dist/esm/ui-multi-combobox.entry.js +0 -188
- package/dist/esm/ui-tooltip.entry.js +0 -239
- package/dist/looma/p-071c139c.entry.js +0 -1
- package/dist/looma/p-0fd60103.entry.js +0 -1
- package/dist/looma/p-4fc9917f.entry.js +0 -1
- package/dist/looma/p-66c6b6dd.entry.js +0 -1
- package/dist/looma/p-77dcfa6f.entry.js +0 -1
- package/dist/looma/p-85a6716e.entry.js +0 -1
- package/dist/looma/p-8f102407.entry.js +0 -1
- package/dist/looma/p-Bu0dmLBE.js +0 -1
- package/dist/looma/p-caa37be2.entry.js +0 -1
- package/dist/types/components/ui-multi-combobox/ui-multi-combobox.d.ts +0 -51
- package/dist/ui-multi-combobox.entry-XXLS4V3I.js +0 -196
package/dist/index.cjs
CHANGED
|
@@ -24,7 +24,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
};
|
|
25
25
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
26
|
|
|
27
|
-
// dist/esm/positioning-
|
|
27
|
+
// dist/esm/positioning-Drmwg-C1.js
|
|
28
28
|
function bindAnchorName(anchor, name) {
|
|
29
29
|
const binding = anchorBindings.get(anchor) ?? {
|
|
30
30
|
original: anchor.style.getPropertyValue("anchor-name"),
|
|
@@ -96,22 +96,21 @@ function createViewportSurface(surface) {
|
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
function fallbackPosition(surface, anchor, placement, gap, viewportGap) {
|
|
99
|
+
function fallbackPosition(surface, anchor, placement, gap, viewportGap, surfaceRect = surface.getBoundingClientRect()) {
|
|
100
100
|
const owner = surface.ownerDocument.defaultView ?? window;
|
|
101
101
|
const viewport = getVisualViewportRect(owner);
|
|
102
|
-
const rect = surface.getBoundingClientRect();
|
|
103
102
|
const preferTop = placement.startsWith("top");
|
|
104
103
|
const preferEnd = placement.endsWith("end");
|
|
105
104
|
const spaceBelow = viewport.bottom - anchor.bottom - viewportGap;
|
|
106
105
|
const spaceAbove = anchor.top - viewport.top - viewportGap;
|
|
107
|
-
const useTop = preferTop ? !(spaceAbove <
|
|
108
|
-
const unclampedTop = useTop ? anchor.top -
|
|
109
|
-
const unclampedLeft = preferEnd ? anchor.right -
|
|
106
|
+
const useTop = preferTop ? !(spaceAbove < surfaceRect.height + gap && spaceBelow > spaceAbove) : spaceBelow < surfaceRect.height + gap && spaceAbove > spaceBelow;
|
|
107
|
+
const unclampedTop = useTop ? anchor.top - surfaceRect.height - gap : anchor.bottom + gap;
|
|
108
|
+
const unclampedLeft = preferEnd ? anchor.right - surfaceRect.width : anchor.left;
|
|
110
109
|
const shifted = clampRectToViewport({
|
|
111
110
|
left: unclampedLeft,
|
|
112
111
|
top: unclampedTop,
|
|
113
|
-
width:
|
|
114
|
-
height:
|
|
112
|
+
width: surfaceRect.width,
|
|
113
|
+
height: surfaceRect.height
|
|
115
114
|
}, viewport, viewportGap);
|
|
116
115
|
surface.style.left = `${Math.round(unclampedLeft + shifted.x)}px`;
|
|
117
116
|
surface.style.top = `${Math.round(unclampedTop + shifted.y)}px`;
|
|
@@ -169,10 +168,16 @@ function createAnchoredSurface(surface, options = {}) {
|
|
|
169
168
|
}
|
|
170
169
|
if (!anchor)
|
|
171
170
|
return;
|
|
172
|
-
|
|
171
|
+
let surfaceRect;
|
|
172
|
+
if (nativeAnchor) {
|
|
173
173
|
positionNative();
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
const viewport = getVisualViewportRect(owner);
|
|
175
|
+
surfaceRect = surface.getBoundingClientRect();
|
|
176
|
+
const shift = clampRectToViewport(surfaceRect, viewport, viewportGap);
|
|
177
|
+
if (shift.x === 0 && shift.y === 0)
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
fallbackPosition(surface, anchor.getBoundingClientRect(), placement, gap, viewportGap, surfaceRect);
|
|
176
181
|
};
|
|
177
182
|
const schedule = () => {
|
|
178
183
|
if (!open || frame !== null)
|
|
@@ -180,7 +185,7 @@ function createAnchoredSurface(surface, options = {}) {
|
|
|
180
185
|
frame = owner.requestAnimationFrame(position);
|
|
181
186
|
};
|
|
182
187
|
const syncFallbackListeners = () => {
|
|
183
|
-
const needsListeners = open && (point !== null ||
|
|
188
|
+
const needsListeners = open && (point !== null || anchor !== null);
|
|
184
189
|
if (!needsListeners) {
|
|
185
190
|
listenerAbort?.abort();
|
|
186
191
|
listenerAbort = null;
|
|
@@ -356,8 +361,8 @@ function createProximityCoordinator(scope, options = {}) {
|
|
|
356
361
|
};
|
|
357
362
|
}
|
|
358
363
|
var DEFAULT_AFFORDANCE_NEAR_RADIUS, anchorSequence, anchorBindings;
|
|
359
|
-
var
|
|
360
|
-
"dist/esm/positioning-
|
|
364
|
+
var init_positioning_Drmwg_C1 = __esm({
|
|
365
|
+
"dist/esm/positioning-Drmwg-C1.js"() {
|
|
361
366
|
DEFAULT_AFFORDANCE_NEAR_RADIUS = 16;
|
|
362
367
|
anchorSequence = 0;
|
|
363
368
|
anchorBindings = /* @__PURE__ */ new WeakMap();
|
|
@@ -373,7 +378,7 @@ var uiAffordanceScopeCss, UIAffordanceScope;
|
|
|
373
378
|
var init_ui_affordance_scope_entry = __esm({
|
|
374
379
|
"dist/esm/ui-affordance-scope.entry.js"() {
|
|
375
380
|
init_index_8BGiMGQ0();
|
|
376
|
-
|
|
381
|
+
init_positioning_Drmwg_C1();
|
|
377
382
|
uiAffordanceScopeCss = () => `:host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}`;
|
|
378
383
|
UIAffordanceScope = class {
|
|
379
384
|
constructor(hostRef) {
|
|
@@ -1206,6 +1211,267 @@ var init_manager_C_0syqXZ = __esm({
|
|
|
1206
1211
|
var ui_chip_2_entry_exports = {};
|
|
1207
1212
|
__export(ui_chip_2_entry_exports, {
|
|
1208
1213
|
ui_chip: () => UIChip,
|
|
1214
|
+
ui_tooltip: () => UITooltip
|
|
1215
|
+
});
|
|
1216
|
+
var uiChipCss, UIChip, uiTooltipCss, UITooltip;
|
|
1217
|
+
var init_ui_chip_2_entry = __esm({
|
|
1218
|
+
"dist/esm/ui-chip_2.entry.js"() {
|
|
1219
|
+
init_index_8BGiMGQ0();
|
|
1220
|
+
init_manager_C_0syqXZ();
|
|
1221
|
+
init_events_JwSoedEO();
|
|
1222
|
+
init_controlled_state_BnGhGgTH();
|
|
1223
|
+
init_positioning_Drmwg_C1();
|
|
1224
|
+
uiChipCss = () => `:host{--ui-chip-surface:var(--ui-surface-subtle);--ui-chip-text:var(--ui-text-secondary);--ui-chip-border:var(--ui-border-default);--ui-chip-font-size:var(--ui-font-size-xs);--ui-chip-font-weight:var(--ui-font-normal);--ui-chip-line-height:var(--ui-line-height-tight);--ui-chip-padding-block:var(--ui-space-0-5);--ui-chip-padding-inline:var(--ui-space-2);--ui-chip-notch:var(--ui-space-1);display:inline-flex;min-width:0;max-width:100%}:host([data-size='sm']){--ui-chip-font-size:var(--ui-font-size-sm)}.chip__surface{display:inline-flex;align-items:center;box-sizing:border-box;min-width:0;max-width:100%;padding:var(--ui-chip-padding-block) var(--ui-chip-padding-inline);border:1px solid var(--ui-chip-border);background:var(--ui-chip-surface);color:var(--ui-chip-text) !important;font-family:var(--ui-font-family-sans) !important;font-size:var(--ui-chip-font-size) !important;font-weight:var(--ui-chip-font-weight) !important;line-height:var(--ui-chip-line-height) !important}.chip__label{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([data-appearance='pill']) .chip__surface{border-radius:var(--ui-radius-round)}:host([data-appearance='tag']) .chip__surface{border:0;padding-inline-end:calc(var(--ui-chip-padding-inline) + var(--ui-chip-notch));clip-path:polygon(0 0, calc(100% - var(--ui-chip-notch)) 0, 100% 50%, calc(100% - var(--ui-chip-notch)) 100%, 0 100%)}`;
|
|
1225
|
+
UIChip = class {
|
|
1226
|
+
constructor(hostRef) {
|
|
1227
|
+
registerInstance(this, hostRef);
|
|
1228
|
+
}
|
|
1229
|
+
/** `tag` has a square leading edge and an angled trailing edge; `pill` is fully rounded. */
|
|
1230
|
+
appearance = "tag";
|
|
1231
|
+
/** Compact typography size. */
|
|
1232
|
+
size = "xs";
|
|
1233
|
+
render() {
|
|
1234
|
+
return h(Host, { key: "970cb48cf8d70c47feaab90fe428c09f0d052a03", "data-appearance": this.appearance, "data-size": this.size }, h("span", { key: "6d8c6104d2869520097a2a61bd2a887b363b4912", class: "chip__surface" }, h("span", { key: "638fb68ff5dffa629576c9e1079bb3169f2adb4f", class: "chip__label" }, h("slot", { key: "8b31f2130e202e18d7717aee6add6bc6e7f119b5" }))));
|
|
1235
|
+
}
|
|
1236
|
+
};
|
|
1237
|
+
UIChip.style = uiChipCss();
|
|
1238
|
+
uiTooltipCss = () => `:host{position:fixed;inset:auto;margin:0;display:inline-block;box-sizing:border-box;padding:0;border:0;border-radius:0;background:transparent;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}.tooltip__surface{box-sizing:border-box;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md)}:host(: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}}`;
|
|
1239
|
+
UITooltip = class {
|
|
1240
|
+
constructor(hostRef) {
|
|
1241
|
+
registerInstance(this, hostRef);
|
|
1242
|
+
this.opened = createEvent(this, "open");
|
|
1243
|
+
this.closed = createEvent(this, "close");
|
|
1244
|
+
}
|
|
1245
|
+
get host() {
|
|
1246
|
+
return getElement(this);
|
|
1247
|
+
}
|
|
1248
|
+
for = "";
|
|
1249
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
1250
|
+
open;
|
|
1251
|
+
defaultOpen = false;
|
|
1252
|
+
placement = "top-start";
|
|
1253
|
+
/** Pointer hover intent delay in milliseconds. Keyboard focus is immediate. */
|
|
1254
|
+
showDelay = 500;
|
|
1255
|
+
/** Pointer leave grace period in milliseconds. */
|
|
1256
|
+
hideDelay = 100;
|
|
1257
|
+
/** Click or tap pins the description; activate again to dismiss. */
|
|
1258
|
+
toggleOnClick = false;
|
|
1259
|
+
pinned = false;
|
|
1260
|
+
focused = false;
|
|
1261
|
+
opened;
|
|
1262
|
+
closed;
|
|
1263
|
+
internalOpen = false;
|
|
1264
|
+
overlayId = `ui-tooltip-${Math.random().toString(36).slice(2, 11)}`;
|
|
1265
|
+
trigger = null;
|
|
1266
|
+
surface = null;
|
|
1267
|
+
showTimer = null;
|
|
1268
|
+
hideTimer = null;
|
|
1269
|
+
syncFromProp() {
|
|
1270
|
+
this.clearTimers();
|
|
1271
|
+
if (isControlled(this.open))
|
|
1272
|
+
this.internalOpen = this.open;
|
|
1273
|
+
}
|
|
1274
|
+
resetSurface() {
|
|
1275
|
+
this.syncTrigger();
|
|
1276
|
+
this.setupSurface();
|
|
1277
|
+
this.syncOverlay();
|
|
1278
|
+
}
|
|
1279
|
+
syncOverlay() {
|
|
1280
|
+
if (this.internalOpen) {
|
|
1281
|
+
this.surface?.show();
|
|
1282
|
+
openOverlay({
|
|
1283
|
+
id: this.overlayId,
|
|
1284
|
+
modal: false,
|
|
1285
|
+
element: this.host,
|
|
1286
|
+
relatedElements: this.trigger ? [this.trigger] : void 0,
|
|
1287
|
+
dismissible: true,
|
|
1288
|
+
requestClose: (reason, trigger) => this.handleRequestClose(reason, trigger)
|
|
1289
|
+
});
|
|
1290
|
+
} else {
|
|
1291
|
+
this.surface?.hide();
|
|
1292
|
+
closeOverlay(this.overlayId);
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
componentDidLoad() {
|
|
1296
|
+
if (!this.host.id)
|
|
1297
|
+
this.host.id = this.overlayId;
|
|
1298
|
+
this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
|
|
1299
|
+
this.syncTrigger();
|
|
1300
|
+
this.setupSurface();
|
|
1301
|
+
this.host.addEventListener("pointerenter", this.onSurfaceEnter);
|
|
1302
|
+
this.host.addEventListener("pointerleave", this.onTriggerLeave);
|
|
1303
|
+
this.syncOverlay();
|
|
1304
|
+
}
|
|
1305
|
+
componentDidUpdate() {
|
|
1306
|
+
this.syncTrigger();
|
|
1307
|
+
}
|
|
1308
|
+
disconnectedCallback() {
|
|
1309
|
+
this.clearTimers();
|
|
1310
|
+
this.detachTriggerListeners();
|
|
1311
|
+
this.surface?.destroy();
|
|
1312
|
+
this.surface = null;
|
|
1313
|
+
this.host.removeEventListener("pointerenter", this.onSurfaceEnter);
|
|
1314
|
+
this.host.removeEventListener("pointerleave", this.onTriggerLeave);
|
|
1315
|
+
closeOverlay(this.overlayId);
|
|
1316
|
+
}
|
|
1317
|
+
syncTrigger() {
|
|
1318
|
+
const next = this.for ? this.host.getRootNode().getElementById(this.for) : this.host.previousElementSibling;
|
|
1319
|
+
if (next === this.trigger)
|
|
1320
|
+
return;
|
|
1321
|
+
this.detachTriggerListeners();
|
|
1322
|
+
this.trigger = next;
|
|
1323
|
+
this.attachTriggerListeners();
|
|
1324
|
+
this.surface?.setAnchor(next);
|
|
1325
|
+
}
|
|
1326
|
+
setupSurface() {
|
|
1327
|
+
this.surface?.destroy();
|
|
1328
|
+
this.surface = createAnchoredSurface(this.host, {
|
|
1329
|
+
anchor: this.trigger,
|
|
1330
|
+
placement: this.placement
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
attachTriggerListeners() {
|
|
1334
|
+
this.detachTriggerListeners();
|
|
1335
|
+
if (!this.trigger)
|
|
1336
|
+
return;
|
|
1337
|
+
const ids = new Set((this.trigger.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean));
|
|
1338
|
+
ids.add(this.host.id);
|
|
1339
|
+
this.trigger.setAttribute("aria-describedby", [...ids].join(" "));
|
|
1340
|
+
this.trigger.addEventListener("click", this.onTriggerClick);
|
|
1341
|
+
this.trigger.addEventListener("keydown", this.onTriggerKeydown);
|
|
1342
|
+
this.trigger.addEventListener("pointerenter", this.onTriggerEnter);
|
|
1343
|
+
this.trigger.addEventListener("pointerleave", this.onTriggerLeave);
|
|
1344
|
+
this.trigger.addEventListener("focusin", this.onTriggerFocusIn);
|
|
1345
|
+
this.trigger.addEventListener("focusout", this.onTriggerFocusOut);
|
|
1346
|
+
}
|
|
1347
|
+
detachTriggerListeners() {
|
|
1348
|
+
if (!this.trigger)
|
|
1349
|
+
return;
|
|
1350
|
+
const ids = (this.trigger.getAttribute("aria-describedby") || "").split(/\s+/).filter((id) => id && id !== this.host.id);
|
|
1351
|
+
if (ids.length)
|
|
1352
|
+
this.trigger.setAttribute("aria-describedby", ids.join(" "));
|
|
1353
|
+
else
|
|
1354
|
+
this.trigger.removeAttribute("aria-describedby");
|
|
1355
|
+
this.trigger.removeEventListener("click", this.onTriggerClick);
|
|
1356
|
+
this.trigger.removeEventListener("keydown", this.onTriggerKeydown);
|
|
1357
|
+
this.trigger.removeEventListener("pointerenter", this.onTriggerEnter);
|
|
1358
|
+
this.trigger.removeEventListener("pointerleave", this.onTriggerLeave);
|
|
1359
|
+
this.trigger.removeEventListener("focusin", this.onTriggerFocusIn);
|
|
1360
|
+
this.trigger.removeEventListener("focusout", this.onTriggerFocusOut);
|
|
1361
|
+
}
|
|
1362
|
+
clearShowTimer() {
|
|
1363
|
+
if (this.showTimer === null)
|
|
1364
|
+
return;
|
|
1365
|
+
clearTimeout(this.showTimer);
|
|
1366
|
+
this.showTimer = null;
|
|
1367
|
+
}
|
|
1368
|
+
clearHideTimer() {
|
|
1369
|
+
if (this.hideTimer === null)
|
|
1370
|
+
return;
|
|
1371
|
+
clearTimeout(this.hideTimer);
|
|
1372
|
+
this.hideTimer = null;
|
|
1373
|
+
}
|
|
1374
|
+
clearTimers() {
|
|
1375
|
+
this.clearShowTimer();
|
|
1376
|
+
this.clearHideTimer();
|
|
1377
|
+
}
|
|
1378
|
+
setInteractionOpen(nextOpen, trigger) {
|
|
1379
|
+
if (this.internalOpen === nextOpen)
|
|
1380
|
+
return;
|
|
1381
|
+
if (!isControlled(this.open))
|
|
1382
|
+
this.internalOpen = nextOpen;
|
|
1383
|
+
dispatchDetail(this.host, nextOpen ? "open" : "close", {
|
|
1384
|
+
open: nextOpen,
|
|
1385
|
+
reason: "action",
|
|
1386
|
+
trigger
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
onSurfaceEnter = () => this.clearHideTimer();
|
|
1390
|
+
onTriggerClick = (event) => {
|
|
1391
|
+
if (!this.toggleOnClick)
|
|
1392
|
+
return;
|
|
1393
|
+
this.clearTimers();
|
|
1394
|
+
this.pinned = !this.pinned;
|
|
1395
|
+
this.setInteractionOpen(this.pinned, event.detail === 0 ? "keyboard" : "pointer");
|
|
1396
|
+
};
|
|
1397
|
+
onTriggerKeydown = (event) => {
|
|
1398
|
+
if (event.key === "Escape")
|
|
1399
|
+
this.clearTimers();
|
|
1400
|
+
};
|
|
1401
|
+
onTriggerEnter = (event) => {
|
|
1402
|
+
if (event.pointerType === "touch")
|
|
1403
|
+
return;
|
|
1404
|
+
this.clearHideTimer();
|
|
1405
|
+
if (this.internalOpen || this.showTimer !== null)
|
|
1406
|
+
return;
|
|
1407
|
+
this.showTimer = setTimeout(() => {
|
|
1408
|
+
this.showTimer = null;
|
|
1409
|
+
this.setInteractionOpen(true, "pointer");
|
|
1410
|
+
}, Math.max(0, this.showDelay));
|
|
1411
|
+
};
|
|
1412
|
+
onTriggerLeave = () => {
|
|
1413
|
+
this.clearShowTimer();
|
|
1414
|
+
if (this.focused || this.pinned || !this.internalOpen || this.hideTimer !== null)
|
|
1415
|
+
return;
|
|
1416
|
+
this.hideTimer = setTimeout(() => {
|
|
1417
|
+
this.hideTimer = null;
|
|
1418
|
+
this.setInteractionOpen(false, "pointer");
|
|
1419
|
+
}, Math.max(0, this.hideDelay));
|
|
1420
|
+
};
|
|
1421
|
+
onTriggerFocusIn = () => {
|
|
1422
|
+
this.focused = true;
|
|
1423
|
+
this.clearTimers();
|
|
1424
|
+
this.setInteractionOpen(true, "keyboard");
|
|
1425
|
+
};
|
|
1426
|
+
onTriggerFocusOut = (e) => {
|
|
1427
|
+
const related = e.relatedTarget;
|
|
1428
|
+
if (related && this.host.contains(related))
|
|
1429
|
+
return;
|
|
1430
|
+
this.focused = false;
|
|
1431
|
+
this.pinned = false;
|
|
1432
|
+
this.clearTimers();
|
|
1433
|
+
this.setInteractionOpen(false, "keyboard");
|
|
1434
|
+
};
|
|
1435
|
+
handleRequestClose(reason, trigger) {
|
|
1436
|
+
if (reason === "escape" || reason === "light-dismiss" && this.toggleOnClick) {
|
|
1437
|
+
this.pinned = false;
|
|
1438
|
+
this.clearTimers();
|
|
1439
|
+
if (!isControlled(this.open))
|
|
1440
|
+
this.internalOpen = false;
|
|
1441
|
+
dispatchDetail(this.host, "close", {
|
|
1442
|
+
open: false,
|
|
1443
|
+
reason,
|
|
1444
|
+
trigger
|
|
1445
|
+
});
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
render() {
|
|
1449
|
+
return h(Host, { key: "fd4d81febd147b846aca66e94f25d56f14b171dc", role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? "" : void 0 }, h("div", { key: "d31ac8c0e087becd7e60459f2cd894a9b15e95fa", class: "tooltip__surface" }, h("slot", { key: "06e7aac9b6992a9cf0f92c9d356b97d18fb2da8b" })));
|
|
1450
|
+
}
|
|
1451
|
+
static get watchers() {
|
|
1452
|
+
return {
|
|
1453
|
+
"open": [{
|
|
1454
|
+
"syncFromProp": 0
|
|
1455
|
+
}],
|
|
1456
|
+
"for": [{
|
|
1457
|
+
"resetSurface": 0
|
|
1458
|
+
}],
|
|
1459
|
+
"placement": [{
|
|
1460
|
+
"resetSurface": 0
|
|
1461
|
+
}],
|
|
1462
|
+
"internalOpen": [{
|
|
1463
|
+
"syncOverlay": 0
|
|
1464
|
+
}]
|
|
1465
|
+
};
|
|
1466
|
+
}
|
|
1467
|
+
};
|
|
1468
|
+
UITooltip.style = uiTooltipCss();
|
|
1469
|
+
}
|
|
1470
|
+
});
|
|
1471
|
+
|
|
1472
|
+
// dist/esm/ui-combobox.entry.js
|
|
1473
|
+
var ui_combobox_entry_exports = {};
|
|
1474
|
+
__export(ui_combobox_entry_exports, {
|
|
1209
1475
|
ui_combobox: () => UICombobox
|
|
1210
1476
|
});
|
|
1211
1477
|
function formatEditingValue(raw, selection, format) {
|
|
@@ -1265,27 +1531,13 @@ async function validateField(request, config) {
|
|
|
1265
1531
|
issues = [...issues, ...config.issues ?? []];
|
|
1266
1532
|
return { output: issues.some((issue) => issue.severity !== "warning") ? void 0 : output, issues };
|
|
1267
1533
|
}
|
|
1268
|
-
var
|
|
1269
|
-
var
|
|
1270
|
-
"dist/esm/ui-
|
|
1534
|
+
var uiComboboxCss, UICombobox;
|
|
1535
|
+
var init_ui_combobox_entry = __esm({
|
|
1536
|
+
"dist/esm/ui-combobox.entry.js"() {
|
|
1271
1537
|
init_index_8BGiMGQ0();
|
|
1272
|
-
|
|
1538
|
+
init_positioning_Drmwg_C1();
|
|
1273
1539
|
init_manager_C_0syqXZ();
|
|
1274
|
-
|
|
1275
|
-
UIChip = class {
|
|
1276
|
-
constructor(hostRef) {
|
|
1277
|
-
registerInstance(this, hostRef);
|
|
1278
|
-
}
|
|
1279
|
-
/** `tag` has a square leading edge and an angled trailing edge; `pill` is fully rounded. */
|
|
1280
|
-
appearance = "tag";
|
|
1281
|
-
/** Compact typography size. */
|
|
1282
|
-
size = "xs";
|
|
1283
|
-
render() {
|
|
1284
|
-
return h(Host, { key: "970cb48cf8d70c47feaab90fe428c09f0d052a03", "data-appearance": this.appearance, "data-size": this.size }, h("span", { key: "6d8c6104d2869520097a2a61bd2a887b363b4912", class: "chip__surface" }, h("span", { key: "638fb68ff5dffa629576c9e1079bb3169f2adb4f", class: "chip__label" }, h("slot", { key: "8b31f2130e202e18d7717aee6add6bc6e7f119b5" }))));
|
|
1285
|
-
}
|
|
1286
|
-
};
|
|
1287
|
-
UIChip.style = uiChipCss();
|
|
1288
|
-
uiComboboxCss = () => `:host{display:grid;gap:var(--ui-space-1);min-inline-size:0;color:var(--ui-text-primary);font:inherit}label{color:var(--ui-field-label-color, var(--ui-text-primary));font-size:var(--ui-field-label-size, 0.875rem);font-weight:var(--ui-field-label-weight, 500)}.field{display:flex;min-inline-size:0;border:1px solid var(--ui-control-border, var(--ui-border-default));border-radius:var(--ui-radius-2);background:var(--ui-control-surface, var(--ui-surface-default))}.field:focus-within{border-color:var(--ui-control-focus, var(--ui-focus-ring));outline:2px solid var(--ui-control-focus, var(--ui-focus-ring));outline-offset:1px}input{appearance:none;width:100%;min-inline-size:0;min-block-size:var(--ui-control-min-block-size, 2.75rem);box-sizing:border-box;border:0;border-radius:inherit;background:transparent;color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding:var(--ui-space-2) var(--ui-space-3);margin:0;outline:none}:host([data-size='sm']) input{min-block-size:var(--ui-field-compact-size, 2rem);padding:var(--ui-space-1) var(--ui-space-2)}button{appearance:none;border:0;border-radius:var(--ui-radius-2);background:transparent;color:var(--ui-field-affordance-color, var(--ui-text-secondary));font:inherit;font-weight:var(--ui-field-affordance-weight, 400);min-inline-size:2rem;padding:var(--ui-space-1);cursor:pointer}button:hover:enabled{background:var(--ui-surface-muted);color:var(--ui-text-primary)}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:-3px}input:disabled,button:disabled{color:var(--ui-text-muted);cursor:not-allowed}.field:has(input:disabled){background:var(--ui-control-surface-disabled, var(--ui-surface-muted))}:host([data-validation='error']) .field{border-color:var(--ui-danger-solid, var(--ui-accent-active))}.popup{box-sizing:border-box;min-inline-size:12rem;max-inline-size:calc(100vw - 1rem);max-block-size:var(--ui-combobox-max-block-size, 18rem);overflow:auto;margin:0;padding:var(--ui-space-1);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-md)}[hidden]{display:none !important}.option{padding:var(--ui-space-2) var(--ui-space-3);border-radius:var(--ui-radius-1);cursor:pointer;overflow-wrap:anywhere}.option:hover,.option[data-active]{background:var(--ui-surface-muted);outline:1px solid var(--ui-focus-ring);outline-offset:-1px}.option[aria-disabled='true']{color:var(--ui-text-muted);cursor:not-allowed}.primary{display:block;color:var(--ui-option-primary-color, var(--ui-text-primary));font-weight:var(--ui-option-primary-weight, 500)}.secondary{display:block;color:var(--ui-option-secondary-color, var(--ui-text-secondary));font-weight:var(--ui-option-secondary-weight, 400);font-size:var(--ui-font-size-sm)}.message,.group{color:var(--ui-field-message-color, var(--ui-text-secondary));font-weight:var(--ui-field-message-weight, 400);font-size:var(--ui-font-size-sm);line-height:var(--ui-line-height-md);overflow-wrap:anywhere}.group,.popup .message{padding:var(--ui-space-2) var(--ui-space-3)}.sr-only{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media (pointer: coarse){button{min-inline-size:2.75rem;min-block-size:2.75rem}}@media (forced-colors: active){.field,.popup{border-color:CanvasText}.option[data-active]{outline-color:Highlight}}`;
|
|
1540
|
+
uiComboboxCss = () => `:host{display:grid;gap:var(--ui-space-1);min-inline-size:0;color:var(--ui-text-primary);font:inherit}label{color:var(--ui-field-label-color, var(--ui-text-primary));font-size:var(--ui-field-label-size, 0.875rem);font-weight:var(--ui-field-label-weight, 500)}.field{display:flex;min-inline-size:0;border:1px solid var(--ui-control-border, var(--ui-border-default));border-radius:var(--ui-radius-2);background:var(--ui-control-surface, var(--ui-surface-default))}.field:focus-within{border-color:var(--ui-control-focus, var(--ui-focus-ring));outline:2px solid var(--ui-control-focus, var(--ui-focus-ring));outline-offset:1px}input{appearance:none;width:100%;min-inline-size:0;min-block-size:var(--ui-control-min-block-size, 2.75rem);box-sizing:border-box;border:0;border-radius:inherit;background:transparent;color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding:var(--ui-space-2) var(--ui-space-3);margin:0;outline:none}:host([data-size='sm']) input{min-block-size:var(--ui-field-compact-size, 2rem);padding:var(--ui-space-1) var(--ui-space-2)}button{appearance:none;border:0;border-radius:var(--ui-radius-2);background:transparent;color:var(--ui-field-affordance-color, var(--ui-text-secondary));font:inherit;font-weight:var(--ui-field-affordance-weight, 400);min-inline-size:2rem;padding:var(--ui-space-1);cursor:pointer}button:hover:enabled{background:var(--ui-surface-muted);color:var(--ui-text-primary)}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:-3px}input:disabled,button:disabled{color:var(--ui-text-muted);cursor:not-allowed}.field:has(input:disabled){background:var(--ui-control-surface-disabled, var(--ui-surface-muted))}:host([data-validation='error']) .field{border-color:var(--ui-danger-solid, var(--ui-accent-active))}.popup{box-sizing:border-box;min-inline-size:12rem;max-inline-size:calc(100vw - 1rem);max-block-size:var(--ui-combobox-max-block-size, 18rem);overflow:auto;margin:0;padding:var(--ui-space-1);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-md)}[hidden]{display:none !important}.option{padding:var(--ui-space-2) var(--ui-space-3);border-radius:var(--ui-radius-1);cursor:pointer;overflow-wrap:anywhere}.option:hover,.option[data-active]{background:var(--ui-surface-muted);outline:1px solid var(--ui-focus-ring);outline-offset:-1px}.option[aria-disabled='true']{color:var(--ui-text-muted);cursor:not-allowed}.primary{display:block;color:var(--ui-option-primary-color, var(--ui-text-primary));font-weight:var(--ui-option-primary-weight, 500)}.secondary{display:block;color:var(--ui-option-secondary-color, var(--ui-text-secondary));font-weight:var(--ui-option-secondary-weight, 400);font-size:var(--ui-font-size-sm)}.message,.group{color:var(--ui-field-message-color, var(--ui-text-secondary));font-weight:var(--ui-field-message-weight, 400);font-size:var(--ui-font-size-sm);line-height:var(--ui-line-height-md);overflow-wrap:anywhere}.group,.popup .message{padding:var(--ui-space-2) var(--ui-space-3)}.sr-only{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media (pointer: coarse){button{min-inline-size:2.75rem;min-block-size:2.75rem}}@media (forced-colors: active){.field,.popup{border-color:CanvasText}.option[data-active]{outline-color:Highlight}}:host([multiple]) .field{flex-wrap:wrap;align-items:center;gap:var(--ui-space-1);min-block-size:var(--ui-multi-combobox-min-block-size, 2.5rem);padding:var(--ui-space-1)}:host([multiple]) input{flex:1 0 var(--ui-multi-combobox-input-min-inline-size, 5rem);width:auto;min-block-size:1.75rem;padding:var(--ui-space-0-5) var(--ui-space-1)}.items{display:contents}.item{appearance:none;display:inline-flex;min-inline-size:0;max-inline-size:min(100%, var(--ui-multi-combobox-item-max-inline-size, 12rem));overflow:hidden;padding:0;border:0;border-radius:var(--ui-radius-1);background:transparent;color:inherit;font:inherit;cursor:default}.item>slot{display:block;min-inline-size:0;max-inline-size:100%;overflow:hidden}.item>slot::slotted(*){min-inline-size:0;max-inline-size:100%}.item:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:1px}.item:disabled{opacity:.6}`;
|
|
1289
1541
|
UICombobox = class {
|
|
1290
1542
|
constructor(hostRef) {
|
|
1291
1543
|
registerInstance(this, hostRef);
|
|
@@ -1296,6 +1548,9 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1296
1548
|
this.dependencyInvalidate = createEvent(this, "dependency-invalidate");
|
|
1297
1549
|
this.validationChange = createEvent(this, "validation-change");
|
|
1298
1550
|
this.optionsChange = createEvent(this, "options-change");
|
|
1551
|
+
this.addItem = createEvent(this, "add-item");
|
|
1552
|
+
this.removeItem = createEvent(this, "remove-item");
|
|
1553
|
+
this.createItem = createEvent(this, "create-item");
|
|
1299
1554
|
}
|
|
1300
1555
|
get host() {
|
|
1301
1556
|
return getElement(this);
|
|
@@ -1304,9 +1559,16 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1304
1559
|
label = "";
|
|
1305
1560
|
placeholder = "";
|
|
1306
1561
|
name = "";
|
|
1307
|
-
/**
|
|
1562
|
+
/**
|
|
1563
|
+
* Controlled canonical value. Undefined selects uncontrolled mode; null means no selection.
|
|
1564
|
+
* With `multiple`, this is the controlled list of selected items instead.
|
|
1565
|
+
*/
|
|
1308
1566
|
value;
|
|
1309
1567
|
defaultValue;
|
|
1568
|
+
/** Render selected values as removable chips before the cursor. `value` becomes the item list. */
|
|
1569
|
+
multiple = false;
|
|
1570
|
+
/** Characters that commit the current query and leave the input ready for the next item (multiple only). */
|
|
1571
|
+
tokenSeparators = [];
|
|
1310
1572
|
/** Controlled raw editing text; independent of canonical selection. */
|
|
1311
1573
|
query;
|
|
1312
1574
|
defaultQuery = "";
|
|
@@ -1323,6 +1585,7 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1323
1585
|
/** Optional description shown by the connected question-mark button. */
|
|
1324
1586
|
help = "";
|
|
1325
1587
|
queryChange;
|
|
1588
|
+
/** Single mode: the ComboboxChange. Multiple mode: the full current item list on any change. */
|
|
1326
1589
|
valueChange;
|
|
1327
1590
|
freeEntry;
|
|
1328
1591
|
createEntry;
|
|
@@ -1330,6 +1593,12 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1330
1593
|
validationChange;
|
|
1331
1594
|
/** Supplies the current result rows for framework-owned rich slots. */
|
|
1332
1595
|
optionsChange;
|
|
1596
|
+
/** Multiple mode: a suggestion or exact-match token was committed as a new item. */
|
|
1597
|
+
addItem;
|
|
1598
|
+
/** Multiple mode: a selected item was removed via chip keyboard controls. */
|
|
1599
|
+
removeItem;
|
|
1600
|
+
/** Multiple mode: an unmatched query was submitted for creation. */
|
|
1601
|
+
createItem;
|
|
1333
1602
|
raw = "";
|
|
1334
1603
|
display = "";
|
|
1335
1604
|
selected = null;
|
|
@@ -1357,7 +1626,22 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1357
1626
|
proposedChange;
|
|
1358
1627
|
formattedRaw;
|
|
1359
1628
|
formattedWith;
|
|
1629
|
+
/** Multiple mode: the controlled selected items (from `value`). Empty otherwise. */
|
|
1630
|
+
get items() {
|
|
1631
|
+
return this.multiple && Array.isArray(this.value) ? this.value : [];
|
|
1632
|
+
}
|
|
1633
|
+
get selectedValues() {
|
|
1634
|
+
return new Set(this.items.map((item) => item.value));
|
|
1635
|
+
}
|
|
1360
1636
|
componentWillLoad() {
|
|
1637
|
+
if (this.multiple) {
|
|
1638
|
+
this.selected = null;
|
|
1639
|
+
this.raw = this.query ?? this.defaultQuery;
|
|
1640
|
+
this.display = this.raw;
|
|
1641
|
+
this.initialRaw = this.raw;
|
|
1642
|
+
this.applyServerIssues();
|
|
1643
|
+
return;
|
|
1644
|
+
}
|
|
1361
1645
|
this.selected = this.value !== void 0 ? this.value : this.defaultValue ?? null;
|
|
1362
1646
|
this.raw = this.query ?? this.defaultQuery;
|
|
1363
1647
|
if (this.query === void 0 && !this.raw && this.selected !== null) {
|
|
@@ -1394,7 +1678,7 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1394
1678
|
this.surface = createAnchoredSurface(this.popup, { anchor: this.field, placement: "bottom-start" });
|
|
1395
1679
|
}
|
|
1396
1680
|
syncValue() {
|
|
1397
|
-
if (this.value === void 0)
|
|
1681
|
+
if (this.multiple || this.value === void 0)
|
|
1398
1682
|
return;
|
|
1399
1683
|
this.selected = this.value;
|
|
1400
1684
|
if (this.query === void 0) {
|
|
@@ -1436,9 +1720,14 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1436
1720
|
if (next.context !== previous?.context) {
|
|
1437
1721
|
this.close();
|
|
1438
1722
|
const policy = next.invalidation ?? "retain-query";
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1723
|
+
if (this.multiple) {
|
|
1724
|
+
if (policy === "clear")
|
|
1725
|
+
this.setMultiQuery("", "programmatic");
|
|
1726
|
+
} else {
|
|
1727
|
+
const value = policy === "retain" ? this.selected : null;
|
|
1728
|
+
const query = policy === "clear" ? "" : this.raw;
|
|
1729
|
+
this.commit(value, query, null, "invalidation", "programmatic");
|
|
1730
|
+
}
|
|
1442
1731
|
this.validation = { status: "pristine", touched: false, dirty: this.raw !== this.initialRaw, issues: [] };
|
|
1443
1732
|
}
|
|
1444
1733
|
this.applyServerIssues();
|
|
@@ -1509,11 +1798,16 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1509
1798
|
this.resetValidation();
|
|
1510
1799
|
}
|
|
1511
1800
|
const ids = /* @__PURE__ */ new Set();
|
|
1801
|
+
const selected = this.multiple ? this.selectedValues : void 0;
|
|
1512
1802
|
this.rows = options.filter((option) => {
|
|
1513
1803
|
if (ids.has(option.id))
|
|
1514
1804
|
return false;
|
|
1515
1805
|
ids.add(option.id);
|
|
1516
|
-
|
|
1806
|
+
if (this.fullSet)
|
|
1807
|
+
return true;
|
|
1808
|
+
if (selected)
|
|
1809
|
+
return !selected.has(option.value) && (config.filter ? config.filter(option, query, config.context) : option.label.toLocaleLowerCase().includes(query.toLocaleLowerCase()));
|
|
1810
|
+
return config.filter ? config.filter(option, query, config.context) : config.provider ? true : option.label.toLocaleLowerCase().includes(query.toLocaleLowerCase());
|
|
1517
1811
|
});
|
|
1518
1812
|
const groups = /* @__PURE__ */ new Map();
|
|
1519
1813
|
for (const row of this.rows) {
|
|
@@ -1627,6 +1921,18 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1627
1921
|
const option = this.rows[index];
|
|
1628
1922
|
if (option?.disabled)
|
|
1629
1923
|
return;
|
|
1924
|
+
if (this.multiple) {
|
|
1925
|
+
if (option)
|
|
1926
|
+
this.addSelectedItem(option, trigger);
|
|
1927
|
+
else if (this.canCreate && index === this.rows.length)
|
|
1928
|
+
this.createSelectedItem(this.raw.trim(), trigger);
|
|
1929
|
+
else
|
|
1930
|
+
return;
|
|
1931
|
+
this.setMultiQuery("", trigger);
|
|
1932
|
+
this.close();
|
|
1933
|
+
this.input?.focus();
|
|
1934
|
+
return;
|
|
1935
|
+
}
|
|
1630
1936
|
if (option)
|
|
1631
1937
|
this.commit(option.value, option.label, option, "selection", trigger);
|
|
1632
1938
|
else if (this.canCreate && index === this.rows.length)
|
|
@@ -1638,6 +1944,104 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1638
1944
|
if (this.config.validateOn !== "submit")
|
|
1639
1945
|
queueMicrotask(() => void this.validate());
|
|
1640
1946
|
}
|
|
1947
|
+
// --- Multiple-mode helpers ---------------------------------------------
|
|
1948
|
+
emitItems(items) {
|
|
1949
|
+
this.valueChange.emit(items);
|
|
1950
|
+
}
|
|
1951
|
+
setMultiQuery(query, trigger) {
|
|
1952
|
+
if (this.query === void 0) {
|
|
1953
|
+
this.raw = query;
|
|
1954
|
+
this.display = query;
|
|
1955
|
+
this.formattedRaw = void 0;
|
|
1956
|
+
}
|
|
1957
|
+
if (this.input)
|
|
1958
|
+
this.input.value = query;
|
|
1959
|
+
this.queryChange.emit({ query, display: query, trigger });
|
|
1960
|
+
}
|
|
1961
|
+
addSelectedItem(option, trigger) {
|
|
1962
|
+
this.addItem.emit({ item: option, index: this.items.length, trigger });
|
|
1963
|
+
this.emitItems([...this.items, option]);
|
|
1964
|
+
}
|
|
1965
|
+
createSelectedItem(query, trigger) {
|
|
1966
|
+
if (!query)
|
|
1967
|
+
return;
|
|
1968
|
+
this.createItem.emit({ query, trigger });
|
|
1969
|
+
}
|
|
1970
|
+
commitQuery(trigger) {
|
|
1971
|
+
const query = this.raw.trim();
|
|
1972
|
+
if (!query)
|
|
1973
|
+
return;
|
|
1974
|
+
const normalized = query.toLocaleLowerCase();
|
|
1975
|
+
const option = this.rows.find((row) => row.label.trim().toLocaleLowerCase() === normalized);
|
|
1976
|
+
if (option) {
|
|
1977
|
+
this.setMultiQuery("", trigger);
|
|
1978
|
+
this.addSelectedItem(option, trigger);
|
|
1979
|
+
} else if (this.config.allowCreate) {
|
|
1980
|
+
this.setMultiQuery("", trigger);
|
|
1981
|
+
this.createSelectedItem(query, trigger);
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
removeItemAt(index, trigger) {
|
|
1985
|
+
const item = this.items[index];
|
|
1986
|
+
if (!item || item.disabled || this.disabled || this.readOnly)
|
|
1987
|
+
return;
|
|
1988
|
+
this.removeItem.emit({ item, index, trigger });
|
|
1989
|
+
this.emitItems(this.items.filter((_, position) => position !== index));
|
|
1990
|
+
requestAnimationFrame(() => {
|
|
1991
|
+
const buttons = this.host.shadowRoot?.querySelectorAll('[part="item"]') ?? [];
|
|
1992
|
+
const next = buttons[Math.min(index, buttons.length - 1)] ?? buttons[index - 1];
|
|
1993
|
+
if (next && next.dataset.value !== item.value)
|
|
1994
|
+
next.focus();
|
|
1995
|
+
else
|
|
1996
|
+
void this.focusInput();
|
|
1997
|
+
});
|
|
1998
|
+
}
|
|
1999
|
+
focusItem(index) {
|
|
2000
|
+
this.host.shadowRoot?.querySelectorAll('[part="item"]')[index]?.focus();
|
|
2001
|
+
}
|
|
2002
|
+
onItemKeyDown = (event, index) => {
|
|
2003
|
+
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
|
|
2004
|
+
return;
|
|
2005
|
+
if (event.key === "ArrowLeft") {
|
|
2006
|
+
event.preventDefault();
|
|
2007
|
+
event.stopPropagation();
|
|
2008
|
+
this.focusItem(Math.max(0, index - 1));
|
|
2009
|
+
} else if (event.key === "ArrowRight") {
|
|
2010
|
+
event.preventDefault();
|
|
2011
|
+
event.stopPropagation();
|
|
2012
|
+
if (index === this.items.length - 1)
|
|
2013
|
+
void this.focusInput();
|
|
2014
|
+
else
|
|
2015
|
+
this.focusItem(index + 1);
|
|
2016
|
+
} else if (event.key === "Backspace" || event.key === "Delete") {
|
|
2017
|
+
event.preventDefault();
|
|
2018
|
+
event.stopPropagation();
|
|
2019
|
+
this.removeItemAt(index, "keyboard");
|
|
2020
|
+
}
|
|
2021
|
+
};
|
|
2022
|
+
handleMultipleKeydown(event) {
|
|
2023
|
+
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
|
|
2024
|
+
return false;
|
|
2025
|
+
if (this.tokenSeparators.includes(event.key)) {
|
|
2026
|
+
event.preventDefault();
|
|
2027
|
+
event.stopPropagation();
|
|
2028
|
+
this.commitQuery("keyboard");
|
|
2029
|
+
return true;
|
|
2030
|
+
}
|
|
2031
|
+
if (this.raw || (this.input?.selectionStart ?? 0) > 0)
|
|
2032
|
+
return false;
|
|
2033
|
+
if (event.key === "ArrowLeft" && this.items.length) {
|
|
2034
|
+
event.preventDefault();
|
|
2035
|
+
this.focusItem(this.items.length - 1);
|
|
2036
|
+
return true;
|
|
2037
|
+
}
|
|
2038
|
+
if (event.key === "Backspace" && this.items.length) {
|
|
2039
|
+
event.preventDefault();
|
|
2040
|
+
this.removeItemAt(this.items.length - 1, "keyboard");
|
|
2041
|
+
return true;
|
|
2042
|
+
}
|
|
2043
|
+
return false;
|
|
2044
|
+
}
|
|
1641
2045
|
move(key) {
|
|
1642
2046
|
const indices = this.rows.flatMap((row, index) => row.disabled ? [] : [index]);
|
|
1643
2047
|
if (this.canCreate)
|
|
@@ -1652,6 +2056,8 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1652
2056
|
onKeydown = (event) => {
|
|
1653
2057
|
if (this.composing || event.isComposing || this.disabled || this.readOnly)
|
|
1654
2058
|
return;
|
|
2059
|
+
if (this.multiple && this.handleMultipleKeydown(event))
|
|
2060
|
+
return;
|
|
1655
2061
|
if (event.key === "Escape" && this.expanded) {
|
|
1656
2062
|
event.preventDefault();
|
|
1657
2063
|
event.stopPropagation();
|
|
@@ -1689,7 +2095,7 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1689
2095
|
this.close();
|
|
1690
2096
|
this.format("blur");
|
|
1691
2097
|
this.validation = { ...this.validation, touched: true };
|
|
1692
|
-
if (this.config.allowFreeText && this.selected === null)
|
|
2098
|
+
if (!this.multiple && this.config.allowFreeText && this.selected === null)
|
|
1693
2099
|
this.commit(null, this.raw, null, "free-entry", "keyboard");
|
|
1694
2100
|
if ((this.config.validateOn ?? "blur") === "blur")
|
|
1695
2101
|
void this.validate();
|
|
@@ -1733,23 +2139,23 @@ var init_ui_chip_2_entry = __esm({
|
|
|
1733
2139
|
const description = [this.helpOpen ? "help-text" : "", this.validation.issues.length ? "validation" : ""].filter(Boolean).join(" ") || void 0;
|
|
1734
2140
|
const status = this.loading ? "Loading suggestions\u2026" : this.lookupError || (this.expanded ? `${this.rows.length} suggestions available.` : "");
|
|
1735
2141
|
const groups = [...new Set(this.rows.map((row) => row.group ?? ""))];
|
|
1736
|
-
return h(Host, { key: "
|
|
2142
|
+
return h(Host, { key: "fc4c0192d3be88d8c0199ae1bcca44232bd22351", "data-size": this.size, "data-validation": this.validation.status, onFocusout: this.onFocusOut }, h("label", { key: "bdd0d244c6ef448978fa77aac3a2d3b71d713553", htmlFor: "input", part: "label", class: this.labelVisibility === "sr-only" ? "sr-only" : void 0 }, this.label, this.required ? " *" : ""), h("div", { key: "afb3972aab52171a3b25ede863c31059e56f5d91", class: "field", part: "field", ref: (element) => this.field = element, onClick: (event) => {
|
|
1737
2143
|
if (!event.composedPath().some((node) => node instanceof HTMLButtonElement))
|
|
1738
2144
|
this.input?.focus();
|
|
1739
|
-
} }, h("slot", { key: "
|
|
2145
|
+
} }, h("slot", { key: "65e4e201d6c11cd2638e392e1298662de7ba4d57", name: "start" }), this.multiple && h("div", { key: "b80b5b85fa0540139b9756fcc494aef9df245c15", class: "items", role: "group", "aria-label": `Selected ${this.label}` }, this.items.map((item, index) => h("button", { type: "button", part: "item", class: "item", "data-value": item.value, tabIndex: -1, disabled: this.disabled || this.readOnly || item.disabled, "aria-label": `${item.label}, press Delete or Backspace to remove`, onKeyDown: (event) => this.onItemKeyDown(event, index) }, h("slot", { name: `item-${item.id}` }, h("ui-chip", { appearance: "pill" }, item.label))))), h("input", { key: "64f76055ae412cc87119270eec10c69000a72563", id: "input", ref: (element) => this.input = element, role: "combobox", "aria-autocomplete": "list", "aria-expanded": String(this.expanded), "aria-controls": "listbox", "aria-activedescendant": this.expanded && this.active >= 0 ? `option-${this.active}` : void 0, "aria-describedby": description, "aria-invalid": String(this.validation.status === "error"), "aria-busy": String(this.validation.status === "pending"), value: this.display, placeholder: this.placeholder, name: this.name || void 0, disabled: this.disabled, readOnly: this.readOnly, required: this.required, autoComplete: "off", part: "input", onInput: this.onInput, onKeyDown: this.onKeydown, onCompositionstart: () => this.composing = true, onCompositionend: () => {
|
|
1740
2146
|
this.composing = false;
|
|
1741
2147
|
this.onInput(new InputEvent("input"));
|
|
1742
|
-
} }), this.clearable && h("button", { key: "
|
|
2148
|
+
} }), this.clearable && h("button", { key: "eac4c18dadcea92065af4ecd871d925ef1248d47", type: "button", part: "affordance", "aria-label": `Clear ${this.label}`, disabled: this.disabled || this.readOnly, onClick: () => {
|
|
1743
2149
|
this.commit(null, "", null, "clear", "pointer");
|
|
1744
2150
|
this.close();
|
|
1745
2151
|
this.input?.focus();
|
|
1746
|
-
} }, "\xD7"), this.help && h("button", { key: "
|
|
2152
|
+
} }, "\xD7"), this.help && h("button", { key: "9a559d49a495ead3dbf159f170c594e0aaa0d0d0", id: "help", type: "button", part: "affordance", "aria-label": `Help for ${this.label}`, disabled: this.disabled }, h("span", { key: "73940e568b976f85399d5baa5e247a4a606d0039", "aria-hidden": "true" }, "?")), this.disclosure && h("button", { key: "30dd6746ffb121888a4c4fb6df54720906badf78", type: "button", part: "affordance", "aria-label": `Suggestions for ${this.label}`, "aria-controls": "listbox", "aria-expanded": String(this.expanded), disabled: this.disabled || this.readOnly, onClick: () => {
|
|
1747
2153
|
if (this.expanded)
|
|
1748
2154
|
this.close();
|
|
1749
2155
|
else
|
|
1750
2156
|
this.open("disclosure");
|
|
1751
2157
|
this.input?.focus();
|
|
1752
|
-
} }, h("span", { key: "
|
|
2158
|
+
} }, h("span", { key: "7d3b10a765ee0a6c40d7b0b49e98c676a5837944", "aria-hidden": "true" }, "\u2304"))), this.help && h("ui-tooltip", { key: "efff00f45dc281b727789eb2aa84ff772bb5c925", id: "help-text", for: "help", toggleOnClick: true, onOpen: () => this.helpOpen = true, onClose: () => this.helpOpen = false }, this.help), h("div", { key: "770bc12b873026b571bd3ae2a80416e8af52b8d4", class: "popup", part: "popup", hidden: !this.expanded, ref: (element) => this.popup = element }, h("div", { key: "ed48c8dd8b672a577d567ca5e795b8a53fde2761", id: "listbox", role: "listbox", "aria-label": `${this.label} suggestions`, "aria-busy": String(this.loading) }, groups.map((group) => h("div", { role: group ? "group" : "presentation", "aria-label": group || void 0 }, group && h("div", { class: "group", part: "group" }, group), this.rows.map((row, index) => (row.group ?? "") !== group ? null : h("div", { id: `option-${index}`, role: "option", "aria-selected": String(this.selected === row.value), "aria-disabled": String(Boolean(row.disabled)), "data-active": this.active === index ? "" : void 0, part: "option", class: "option", onPointerDown: (event) => event.preventDefault(), onClick: () => this.choose(index, "pointer") }, h("slot", { name: `option-${row.id}` }, h("span", { class: "primary", part: "option-primary" }, row.label), row.description && h("span", { class: "secondary", part: "option-secondary" }, row.description)))))), this.canCreate && h("div", { key: "43215f449bbccde407ef818cee473f69870f6f8c", id: `option-${this.rows.length}`, role: "option", "aria-selected": "false", class: "option", part: "option", "data-active": this.active === this.rows.length ? "" : void 0, onPointerDown: (event) => event.preventDefault(), onClick: () => this.choose(this.rows.length, "pointer") }, h("slot", { key: "3ff70ff3ab8e24afc369a26e8474e7d1220ed6eb", name: "create" }, "Create \u201C", this.raw, "\u201D"))), this.loading ? h("div", { class: "message" }, h("slot", { name: "loading" }, "Loading suggestions\u2026")) : this.lookupError ? h("div", { class: "message" }, h("slot", { name: "error" }, this.lookupError)) : !this.rows.length && !this.canCreate ? h("div", { class: "message" }, h("slot", { name: "empty" }, "No suggestions.")) : null, h("slot", { key: "8b1fbd4f5c372393d294d8c218ae1785e6b0334f", name: "footer" })), h("div", { key: "18e68687f04e35535edee363683523ce6bbb0291", id: "validation", class: "message", part: "validation", hidden: !this.validation.issues.length }, this.validation.issues.map((issue) => h("div", null, issue.message))), h("div", { key: "e4a7db06abcfaf08b8ac592107531a13ef3a5897", class: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true" }, status, " ", this.validation.status === "pending" ? "Checking value\u2026" : this.validation.issues.map((issue) => issue.message).join(" ")));
|
|
1753
2159
|
}
|
|
1754
2160
|
static get watchers() {
|
|
1755
2161
|
return {
|
|
@@ -1786,7 +2192,7 @@ var init_ui_context_menu_entry = __esm({
|
|
|
1786
2192
|
init_index_8BGiMGQ0();
|
|
1787
2193
|
init_manager_C_0syqXZ();
|
|
1788
2194
|
init_events_JwSoedEO();
|
|
1789
|
-
|
|
2195
|
+
init_positioning_Drmwg_C1();
|
|
1790
2196
|
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}}`;
|
|
1791
2197
|
UIContextMenu = class {
|
|
1792
2198
|
constructor(hostRef) {
|
|
@@ -1996,7 +2402,7 @@ var init_ui_context_menu_entry = __esm({
|
|
|
1996
2402
|
this.closeMenu("action", "pointer");
|
|
1997
2403
|
};
|
|
1998
2404
|
render() {
|
|
1999
|
-
return h(Host, { key: "
|
|
2405
|
+
return h(Host, { key: "aaf9f27402b0c88cede3847ee9c8f61ac844f889", "data-open": this.internalOpen ? "" : void 0, "data-focus-trigger": this.internalOpen ? this.focusTrigger : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "d801d564ec2ee073e517cb991c26efc61d3e499d", name: "trigger" }), h("div", { key: "4febcc5d76c79c2e5361db7b203e971582197fd2", class: "menu", "data-open": this.internalOpen ? "" : void 0 }, h("ui-menu", { key: "7aace2479a8014a20da35f69bd3ed57b402f9ef2", open: this.internalOpen }, h("slot", { key: "a31d703c437cf5d9ab82e5f7793caa093a312dfd" }))));
|
|
2000
2406
|
}
|
|
2001
2407
|
static get watchers() {
|
|
2002
2408
|
return {
|
|
@@ -2028,7 +2434,7 @@ var init_ui_dialog_entry = __esm({
|
|
|
2028
2434
|
init_manager_C_0syqXZ();
|
|
2029
2435
|
init_events_JwSoedEO();
|
|
2030
2436
|
init_controlled_state_BnGhGgTH();
|
|
2031
|
-
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}}`;
|
|
2437
|
+
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;box-sizing:border-box;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}}`;
|
|
2032
2438
|
UIDialog = class {
|
|
2033
2439
|
constructor(hostRef) {
|
|
2034
2440
|
registerInstance(this, hostRef);
|
|
@@ -2134,7 +2540,7 @@ var init_ui_dialog_entry = __esm({
|
|
|
2134
2540
|
this.accessibleLabel = nextLabel;
|
|
2135
2541
|
};
|
|
2136
2542
|
render() {
|
|
2137
|
-
return h(Host, { key: "
|
|
2543
|
+
return h(Host, { key: "b606ef8c95728b5538047a7134030455fedf69e4", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("dialog", { key: "85531d82c36e79230cbb22c105ff3821f1f35f58", ref: (el) => this.dialogRef = el, open: this.internalOpen, "aria-label": this.accessibleLabel }, h("slot", { key: "8216096bc94e8261680664398691b8ea877daa0f" })));
|
|
2138
2544
|
}
|
|
2139
2545
|
static get watchers() {
|
|
2140
2546
|
return {
|
|
@@ -2267,7 +2673,7 @@ var init_ui_disclosure_entry = __esm({
|
|
|
2267
2673
|
this.setOpen(!this.internalOpen, { reason: "action", trigger: "keyboard" });
|
|
2268
2674
|
};
|
|
2269
2675
|
render() {
|
|
2270
|
-
return h(Host, { key: "
|
|
2676
|
+
return h(Host, { key: "91d1df53268f18c8c15192fb66b67baa7053fe93" }, h("slot", { key: "578c99f8fd09415c5e63e9f6a860fe204471da2f" }));
|
|
2271
2677
|
}
|
|
2272
2678
|
static get watchers() {
|
|
2273
2679
|
return {
|
|
@@ -2336,7 +2742,7 @@ var init_ui_editable_entry = __esm({
|
|
|
2336
2742
|
}
|
|
2337
2743
|
focusEditor() {
|
|
2338
2744
|
const editRoot = this.host.querySelector('[slot="edit"]');
|
|
2339
|
-
const candidate = editRoot?.matches("input, textarea, select, button, [tabindex], ui-combobox
|
|
2745
|
+
const candidate = editRoot?.matches("input, textarea, select, button, [tabindex], ui-combobox") ? editRoot : editRoot?.querySelector("input, textarea, select, button, [tabindex], ui-combobox");
|
|
2340
2746
|
const focusInput = candidate?.focusInput;
|
|
2341
2747
|
if (typeof focusInput === "function")
|
|
2342
2748
|
void focusInput.call(candidate);
|
|
@@ -2377,7 +2783,7 @@ var init_ui_editable_entry = __esm({
|
|
|
2377
2783
|
this.requestEdit(false, "light-dismiss", "pointer");
|
|
2378
2784
|
};
|
|
2379
2785
|
render() {
|
|
2380
|
-
return h(Host, { key: "
|
|
2786
|
+
return h(Host, { key: "c11babe81053ecc0fb6390507f74d5094c551f48", "data-edit": this.internalEdit ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, onClick: this.onClick, onKeyDown: this.onKeyDown }, h("div", { key: "fbb13fda25a177ff62f4bbb16b8fa7a8d1bfefb6", part: "preview", hidden: this.internalEdit }, h("slot", { key: "29537eed3c19da07a61b0236a563912eec332572", name: "preview" })), h("div", { key: "a8cdb53c61041361ff97762bdf1e8e6992706751", part: "edit", hidden: !this.internalEdit }, h("slot", { key: "466c6bf07d44ab07ccab1fd138412e43a291dcca", name: "edit" })));
|
|
2381
2787
|
}
|
|
2382
2788
|
static get watchers() {
|
|
2383
2789
|
return {
|
|
@@ -2409,7 +2815,7 @@ var init_ui_floating_action_button_entry = __esm({
|
|
|
2409
2815
|
mobileOnly = false;
|
|
2410
2816
|
label = "";
|
|
2411
2817
|
render() {
|
|
2412
|
-
return h(Host, { key: "
|
|
2818
|
+
return h(Host, { key: "54f6284109397d15e2b3ef92f68e9bd4cf91fbae", "data-disabled": this.disabled ? "" : void 0 }, h("button", { key: "9ebad7e3bbc2bf18d4d5a04f37a9f2d77011ad34", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "222c6807ae4639eb20dc25be08fe5f4e91c638de" })));
|
|
2413
2819
|
}
|
|
2414
2820
|
};
|
|
2415
2821
|
UIFloatingActionButton.style = uiFloatingActionButtonCss();
|
|
@@ -2528,7 +2934,7 @@ var init_ui_form_field_entry = __esm({
|
|
|
2528
2934
|
input.setAttribute("aria-invalid", this.invalid ? "true" : "false");
|
|
2529
2935
|
}
|
|
2530
2936
|
render() {
|
|
2531
|
-
return h(Host, { key: "
|
|
2937
|
+
return h(Host, { key: "f052dbf0ba289bf187ea78c458260110fbfa059a", "data-invalid": this.invalid ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-required": this.required ? "" : void 0 }, h("slot", { key: "f26f48581b5781e8c3d7830ddd3707ea4fb04420", onSlotchange: this.scheduleWire }));
|
|
2532
2938
|
}
|
|
2533
2939
|
};
|
|
2534
2940
|
UIFormField.style = uiFormFieldCss();
|
|
@@ -2556,7 +2962,7 @@ var init_ui_icon_button_entry = __esm({
|
|
|
2556
2962
|
/** Reveals this control through a surrounding ui-affordance-scope. */
|
|
2557
2963
|
anticipatory = false;
|
|
2558
2964
|
render() {
|
|
2559
|
-
return h(Host, { key: "
|
|
2965
|
+
return h(Host, { key: "8d0f84c9d3aaa69f47430369b511bb4160de5cc8", "data-disabled": this.disabled ? "" : void 0, "data-ui-affordance": this.anticipatory ? "button" : void 0 }, h("button", { key: "b896cdb091e9733b2b8625463f1324819c23965c", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "76ab5e5f4d34e3f0850287b4552dde060b3798e7" })));
|
|
2560
2966
|
}
|
|
2561
2967
|
};
|
|
2562
2968
|
UIIconButton.style = uiIconButtonCss();
|
|
@@ -2646,7 +3052,7 @@ var init_ui_input_entry = __esm({
|
|
|
2646
3052
|
});
|
|
2647
3053
|
};
|
|
2648
3054
|
render() {
|
|
2649
|
-
return h(Host, { key: "
|
|
3055
|
+
return h(Host, { key: "92505de6b1245569a6d4746418a70f8d7bc4eed9", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "d5743dc62037b5d7722cfbb64a582592327c75e5", ref: (el) => this.slotRef = el }));
|
|
2650
3056
|
}
|
|
2651
3057
|
static get watchers() {
|
|
2652
3058
|
return {
|
|
@@ -2692,7 +3098,7 @@ var init_ui_menu_item_entry = __esm({
|
|
|
2692
3098
|
disabled = false;
|
|
2693
3099
|
value = "";
|
|
2694
3100
|
render() {
|
|
2695
|
-
return h(Host, { key: "
|
|
3101
|
+
return h(Host, { key: "d0f0886b18ebd01c0c2e20a2c1b1ecfd57eeb3e3", role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? "true" : void 0, "data-value": this.value || void 0 }, h("span", { key: "7fc584fb670b5b8ce0bbd3be1fea08f87de4a298", class: "menu-item__surface" }, h("slot", { key: "066fb08bc22996d439f3216e401a93a084e3e299" })));
|
|
2696
3102
|
}
|
|
2697
3103
|
};
|
|
2698
3104
|
UIMenuItem.style = uiMenuItemCss();
|
|
@@ -2711,8 +3117,8 @@ var init_ui_menu_entry = __esm({
|
|
|
2711
3117
|
init_events_JwSoedEO();
|
|
2712
3118
|
init_manager_C_0syqXZ();
|
|
2713
3119
|
init_controlled_state_BnGhGgTH();
|
|
2714
|
-
|
|
2715
|
-
uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;box-sizing:border-box;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:0;border:0;border-radius:0;background:transparent;box-shadow:
|
|
3120
|
+
init_positioning_Drmwg_C1();
|
|
3121
|
+
uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;box-sizing:border-box;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:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible}.menu__surface{display:flex;flex-direction:column;box-sizing:border-box;max-inline-size:inherit;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);max-block-size:inherit;overflow:auto}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:visible;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%}`;
|
|
2716
3122
|
UIMenu = class {
|
|
2717
3123
|
constructor(hostRef) {
|
|
2718
3124
|
registerInstance(this, hostRef);
|
|
@@ -2855,224 +3261,28 @@ var init_ui_menu_entry = __esm({
|
|
|
2855
3261
|
const nextIndex = e.key === "ArrowDown" ? currentIndex < 0 ? 0 : Math.min(currentIndex + 1, items.length - 1) : currentIndex <= 0 ? items.length - 1 : currentIndex - 1;
|
|
2856
3262
|
items[nextIndex].focus();
|
|
2857
3263
|
}
|
|
2858
|
-
};
|
|
2859
|
-
render() {
|
|
2860
|
-
return h(Host, { key: "22689ca1b0514bb27a76bfb9a702c0d4ce49d136", role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? "" : void 0 }, h("div", { key: "cff891a33348f077631f1b92f1167285aafd25f1", class: "menu__surface" }, h("slot", { key: "3a0e9ff4f36b1afbe5f879e0e51ff4943279b5b5" })));
|
|
2861
|
-
}
|
|
2862
|
-
static get watchers() {
|
|
2863
|
-
return {
|
|
2864
|
-
"open": [{
|
|
2865
|
-
"syncFromProp": 0
|
|
2866
|
-
}],
|
|
2867
|
-
"for": [{
|
|
2868
|
-
"resetSurface": 0
|
|
2869
|
-
}],
|
|
2870
|
-
"placement": [{
|
|
2871
|
-
"resetSurface": 0
|
|
2872
|
-
}],
|
|
2873
|
-
"internalOpen": [{
|
|
2874
|
-
"syncSurface": 0
|
|
2875
|
-
}]
|
|
2876
|
-
};
|
|
2877
|
-
}
|
|
2878
|
-
};
|
|
2879
|
-
UIMenu.style = uiMenuCss();
|
|
2880
|
-
}
|
|
2881
|
-
});
|
|
2882
|
-
|
|
2883
|
-
// dist/esm/ui-multi-combobox.entry.js
|
|
2884
|
-
var ui_multi_combobox_entry_exports = {};
|
|
2885
|
-
__export(ui_multi_combobox_entry_exports, {
|
|
2886
|
-
ui_multi_combobox: () => UIMultiCombobox
|
|
2887
|
-
});
|
|
2888
|
-
var uiMultiComboboxCss, UIMultiCombobox;
|
|
2889
|
-
var init_ui_multi_combobox_entry = __esm({
|
|
2890
|
-
"dist/esm/ui-multi-combobox.entry.js"() {
|
|
2891
|
-
init_index_8BGiMGQ0();
|
|
2892
|
-
uiMultiComboboxCss = () => `:host{display:block;min-inline-size:0;color:var(--ui-text-primary);font:inherit}ui-combobox::part(field){flex-wrap:wrap;align-items:center;gap:var(--ui-space-1);min-block-size:var(--ui-multi-combobox-min-block-size, 2.5rem);padding:var(--ui-space-1)}ui-combobox::part(input){flex:1 0 var(--ui-multi-combobox-input-min-inline-size, 5rem);width:auto;min-block-size:1.75rem;padding:var(--ui-space-0-5) var(--ui-space-1)}.items{display:contents}.item{appearance:none;display:inline-flex;min-inline-size:0;max-inline-size:min(100%, var(--ui-multi-combobox-item-max-inline-size, 12rem));overflow:hidden;padding:0;border:0;border-radius:var(--ui-radius-1);background:transparent;color:inherit;font:inherit;cursor:default}.item>slot{display:block;min-inline-size:0;max-inline-size:100%;overflow:hidden}.item>slot::slotted(*){min-inline-size:0;max-inline-size:100%}.item:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:1px}.item:disabled{opacity:.6}`;
|
|
2893
|
-
UIMultiCombobox = class {
|
|
2894
|
-
constructor(hostRef) {
|
|
2895
|
-
registerInstance(this, hostRef);
|
|
2896
|
-
this.queryChange = createEvent(this, "query-change");
|
|
2897
|
-
this.addItem = createEvent(this, "add-item");
|
|
2898
|
-
this.removeItem = createEvent(this, "remove-item");
|
|
2899
|
-
this.createItem = createEvent(this, "create-item");
|
|
2900
|
-
this.optionsChange = createEvent(this, "options-change");
|
|
2901
|
-
}
|
|
2902
|
-
get host() {
|
|
2903
|
-
return getElement(this);
|
|
2904
|
-
}
|
|
2905
|
-
label = "";
|
|
2906
|
-
placeholder = "";
|
|
2907
|
-
items = [];
|
|
2908
|
-
config = {};
|
|
2909
|
-
query;
|
|
2910
|
-
defaultQuery = "";
|
|
2911
|
-
/** Characters that commit the current query and leave the input ready for the next item. */
|
|
2912
|
-
tokenSeparators = [];
|
|
2913
|
-
disabled = false;
|
|
2914
|
-
readOnly = false;
|
|
2915
|
-
required = false;
|
|
2916
|
-
name = "";
|
|
2917
|
-
queryChange;
|
|
2918
|
-
addItem;
|
|
2919
|
-
removeItem;
|
|
2920
|
-
createItem;
|
|
2921
|
-
optionsChange;
|
|
2922
|
-
raw = "";
|
|
2923
|
-
rows = [];
|
|
2924
|
-
combobox;
|
|
2925
|
-
filteredConfig;
|
|
2926
|
-
filteredConfigSource;
|
|
2927
|
-
filteredSelection = "";
|
|
2928
|
-
componentWillLoad() {
|
|
2929
|
-
this.raw = this.query ?? this.defaultQuery;
|
|
2930
|
-
}
|
|
2931
|
-
syncQuery() {
|
|
2932
|
-
if (this.query !== void 0)
|
|
2933
|
-
this.raw = this.query;
|
|
2934
|
-
}
|
|
2935
|
-
get selectedValues() {
|
|
2936
|
-
return new Set(this.items.map((item) => item.value));
|
|
2937
|
-
}
|
|
2938
|
-
get comboboxConfig() {
|
|
2939
|
-
const selectionKey = this.items.map((item) => item.value).join("\0");
|
|
2940
|
-
if (this.filteredConfig && this.filteredConfigSource === this.config && this.filteredSelection === selectionKey) {
|
|
2941
|
-
return this.filteredConfig;
|
|
2942
|
-
}
|
|
2943
|
-
const ownerFilter = this.config.filter;
|
|
2944
|
-
const selected = this.selectedValues;
|
|
2945
|
-
this.filteredConfigSource = this.config;
|
|
2946
|
-
this.filteredSelection = selectionKey;
|
|
2947
|
-
this.filteredConfig = {
|
|
2948
|
-
...this.config,
|
|
2949
|
-
filter: (option, query, context) => !selected.has(option.value) && (ownerFilter ? ownerFilter(option, query, context) : option.label.toLocaleLowerCase().includes(query.toLocaleLowerCase()))
|
|
2950
|
-
};
|
|
2951
|
-
return this.filteredConfig;
|
|
2952
|
-
}
|
|
2953
|
-
setQuery(query, trigger) {
|
|
2954
|
-
if (this.query === void 0)
|
|
2955
|
-
this.raw = query;
|
|
2956
|
-
this.queryChange.emit({ query, display: query, trigger });
|
|
2957
|
-
}
|
|
2958
|
-
clearCommittedQuery(input, trigger) {
|
|
2959
|
-
input.value = "";
|
|
2960
|
-
this.raw = "";
|
|
2961
|
-
this.setQuery("", trigger);
|
|
2962
|
-
}
|
|
2963
|
-
onQueryChange = (event) => {
|
|
2964
|
-
event.stopPropagation();
|
|
2965
|
-
this.setQuery(event.detail.query, event.detail.trigger);
|
|
2966
|
-
};
|
|
2967
|
-
onOptionsChange = (event) => {
|
|
2968
|
-
event.stopPropagation();
|
|
2969
|
-
this.rows = event.detail;
|
|
2970
|
-
this.optionsChange.emit(event.detail);
|
|
2971
|
-
};
|
|
2972
|
-
onValueChange = (event) => {
|
|
2973
|
-
event.stopPropagation();
|
|
2974
|
-
if (event.detail.kind !== "selection" || !event.detail.option)
|
|
2975
|
-
return;
|
|
2976
|
-
const item = event.detail.option;
|
|
2977
|
-
this.addItem.emit({ item, index: this.items.length, trigger: event.detail.trigger });
|
|
2978
|
-
queueMicrotask(() => this.setQuery("", event.detail.trigger));
|
|
2979
|
-
};
|
|
2980
|
-
onCreateEntry = (event) => {
|
|
2981
|
-
event.stopPropagation();
|
|
2982
|
-
const query = event.detail.query.trim();
|
|
2983
|
-
if (!query)
|
|
2984
|
-
return;
|
|
2985
|
-
this.setQuery("", event.detail.trigger);
|
|
2986
|
-
this.createItem.emit({ query, trigger: event.detail.trigger });
|
|
2987
|
-
};
|
|
2988
|
-
commitQuery(input, trigger) {
|
|
2989
|
-
const query = this.raw.trim();
|
|
2990
|
-
if (!query)
|
|
2991
|
-
return;
|
|
2992
|
-
const normalizedQuery = query.toLocaleLowerCase();
|
|
2993
|
-
const option = this.rows.find((row) => row.label.trim().toLocaleLowerCase() === normalizedQuery);
|
|
2994
|
-
if (option) {
|
|
2995
|
-
this.clearCommittedQuery(input, trigger);
|
|
2996
|
-
this.addItem.emit({ item: option, index: this.items.length, trigger });
|
|
2997
|
-
} else if (this.config.allowCreate) {
|
|
2998
|
-
this.clearCommittedQuery(input, trigger);
|
|
2999
|
-
this.createItem.emit({ query, trigger });
|
|
3000
|
-
}
|
|
3001
|
-
}
|
|
3002
|
-
remove(index, trigger) {
|
|
3003
|
-
const item = this.items[index];
|
|
3004
|
-
if (!item || item.disabled || this.disabled || this.readOnly)
|
|
3005
|
-
return;
|
|
3006
|
-
this.removeItem.emit({ item, index, trigger });
|
|
3007
|
-
requestAnimationFrame(() => {
|
|
3008
|
-
const buttons = this.host.shadowRoot?.querySelectorAll('[part="item"]') ?? [];
|
|
3009
|
-
const next = buttons[Math.min(index, buttons.length - 1)] ?? buttons[index - 1];
|
|
3010
|
-
if (next && next.dataset.value !== item.value)
|
|
3011
|
-
next.focus();
|
|
3012
|
-
else
|
|
3013
|
-
void this.focusInput();
|
|
3014
|
-
});
|
|
3015
|
-
}
|
|
3016
|
-
focusItem(index) {
|
|
3017
|
-
this.host.shadowRoot?.querySelectorAll('[part="item"]')[index]?.focus();
|
|
3018
|
-
}
|
|
3019
|
-
onItemKeyDown = (event, index) => {
|
|
3020
|
-
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
|
|
3021
|
-
return;
|
|
3022
|
-
if (event.key === "ArrowLeft") {
|
|
3023
|
-
event.preventDefault();
|
|
3024
|
-
event.stopPropagation();
|
|
3025
|
-
this.focusItem(Math.max(0, index - 1));
|
|
3026
|
-
} else if (event.key === "ArrowRight") {
|
|
3027
|
-
event.preventDefault();
|
|
3028
|
-
event.stopPropagation();
|
|
3029
|
-
if (index === this.items.length - 1)
|
|
3030
|
-
void this.focusInput();
|
|
3031
|
-
else
|
|
3032
|
-
this.focusItem(index + 1);
|
|
3033
|
-
} else if (event.key === "Backspace" || event.key === "Delete") {
|
|
3034
|
-
event.preventDefault();
|
|
3035
|
-
event.stopPropagation();
|
|
3036
|
-
this.remove(index, "keyboard");
|
|
3037
|
-
}
|
|
3038
|
-
};
|
|
3039
|
-
onKeyDown = (event) => {
|
|
3040
|
-
if (event.defaultPrevented || event.isComposing || this.disabled || this.readOnly || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
|
|
3041
|
-
return;
|
|
3042
|
-
const input = event.composedPath().find((node) => node instanceof HTMLInputElement);
|
|
3043
|
-
if (!input)
|
|
3044
|
-
return;
|
|
3045
|
-
if (this.tokenSeparators.includes(event.key)) {
|
|
3046
|
-
event.preventDefault();
|
|
3047
|
-
event.stopPropagation();
|
|
3048
|
-
this.commitQuery(input, "keyboard");
|
|
3049
|
-
return;
|
|
3050
|
-
}
|
|
3051
|
-
if (this.raw || (input.selectionStart ?? 0) > 0)
|
|
3052
|
-
return;
|
|
3053
|
-
if (event.key === "ArrowLeft" && this.items.length) {
|
|
3054
|
-
event.preventDefault();
|
|
3055
|
-
this.focusItem(this.items.length - 1);
|
|
3056
|
-
} else if (event.key === "Backspace" && this.items.length) {
|
|
3057
|
-
event.preventDefault();
|
|
3058
|
-
this.remove(this.items.length - 1, "keyboard");
|
|
3059
|
-
}
|
|
3060
|
-
};
|
|
3061
|
-
async focusInput() {
|
|
3062
|
-
await this.combobox?.focusInput();
|
|
3063
|
-
}
|
|
3264
|
+
};
|
|
3064
3265
|
render() {
|
|
3065
|
-
return h(Host, { key: "
|
|
3266
|
+
return h(Host, { key: "5b64cc53ca56ea04a63013c8cb61231c9b1045cc", role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? "" : void 0 }, h("div", { key: "6410a56cc5efcffd0673c9abdf8f8aa45295c516", class: "menu__surface" }, h("slot", { key: "7e7f9d3b19bbf3024d61ecf44cd8b103748ef966" })));
|
|
3066
3267
|
}
|
|
3067
3268
|
static get watchers() {
|
|
3068
3269
|
return {
|
|
3069
|
-
"
|
|
3070
|
-
"
|
|
3270
|
+
"open": [{
|
|
3271
|
+
"syncFromProp": 0
|
|
3272
|
+
}],
|
|
3273
|
+
"for": [{
|
|
3274
|
+
"resetSurface": 0
|
|
3275
|
+
}],
|
|
3276
|
+
"placement": [{
|
|
3277
|
+
"resetSurface": 0
|
|
3278
|
+
}],
|
|
3279
|
+
"internalOpen": [{
|
|
3280
|
+
"syncSurface": 0
|
|
3071
3281
|
}]
|
|
3072
3282
|
};
|
|
3073
3283
|
}
|
|
3074
3284
|
};
|
|
3075
|
-
|
|
3285
|
+
UIMenu.style = uiMenuCss();
|
|
3076
3286
|
}
|
|
3077
3287
|
});
|
|
3078
3288
|
|
|
@@ -3088,8 +3298,8 @@ var init_ui_popover_entry = __esm({
|
|
|
3088
3298
|
init_manager_C_0syqXZ();
|
|
3089
3299
|
init_events_JwSoedEO();
|
|
3090
3300
|
init_controlled_state_BnGhGgTH();
|
|
3091
|
-
|
|
3092
|
-
uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);box-sizing:border-box;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:
|
|
3301
|
+
init_positioning_Drmwg_C1();
|
|
3302
|
+
uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);box-sizing:border-box;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:visible;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}.popover__surface{box-sizing:border-box;max-inline-size:inherit;max-block-size:inherit;overflow:auto;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)}: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}}`;
|
|
3093
3303
|
UIPopover = class {
|
|
3094
3304
|
constructor(hostRef) {
|
|
3095
3305
|
registerInstance(this, hostRef);
|
|
@@ -3195,7 +3405,7 @@ var init_ui_popover_entry = __esm({
|
|
|
3195
3405
|
}
|
|
3196
3406
|
};
|
|
3197
3407
|
render() {
|
|
3198
|
-
return h(Host, { key: "
|
|
3408
|
+
return h(Host, { key: "65a0927abc40450205989704bfde2cf7fd80d1f9", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("div", { key: "255acaf99e0fe70a92048351b24bdfde1a4ea45f", class: "popover__surface" }, h("slot", { key: "9d2f6c9d5a0f7a2766225aef0ec5b98b33ec9f07" })));
|
|
3199
3409
|
}
|
|
3200
3410
|
static get watchers() {
|
|
3201
3411
|
return {
|
|
@@ -3332,7 +3542,7 @@ var init_ui_radio_group_entry = __esm({
|
|
|
3332
3542
|
}
|
|
3333
3543
|
};
|
|
3334
3544
|
render() {
|
|
3335
|
-
return h(Host, { key: "
|
|
3545
|
+
return h(Host, { key: "9bdfe6b5209b5444cb27dde3226ec33866999c25", role: "radiogroup", "aria-orientation": this.orientation, "data-orientation": this.orientation, "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "b81a2f1e4c49000cfb5357570b460564ced48d91" }));
|
|
3336
3546
|
}
|
|
3337
3547
|
static get watchers() {
|
|
3338
3548
|
return {
|
|
@@ -3435,7 +3645,7 @@ var init_ui_radio_entry = __esm({
|
|
|
3435
3645
|
});
|
|
3436
3646
|
};
|
|
3437
3647
|
render() {
|
|
3438
|
-
return h(Host, { key: "
|
|
3648
|
+
return h(Host, { key: "32df72dff7253956875ef28f593462ddbbb90eef", role: "radio", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "0c78f3e3bdf4d618547b267128c6fc0fdd651599", ref: (el) => this.slotRef = el }));
|
|
3439
3649
|
}
|
|
3440
3650
|
static get watchers() {
|
|
3441
3651
|
return {
|
|
@@ -3506,7 +3716,7 @@ var init_ui_search_result_row_entry = __esm({
|
|
|
3506
3716
|
this.hasTrailing = slotHasContent(this.trailingSlot);
|
|
3507
3717
|
};
|
|
3508
3718
|
render() {
|
|
3509
|
-
return h(Host, { key: "
|
|
3719
|
+
return h(Host, { key: "923d7ac982594e39c06421b60f115acbb395f169" }, h("button", { key: "c97e45ba33297a8aeaa4a9726402c71e3ca73a7b", class: "search-result-row", type: "button", disabled: this.disabled, part: "button" }, h("span", { key: "dea0781519760f5dc2b46902ef86f9e72ccfa6df", class: "search-result-row__leading", part: "leading", hidden: !this.hasLeading }, h("slot", { key: "e10026c17caaa3a21e9dd34c7faabfe9b97f2f5b", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "e8bb06b45aff7ddbaa9a51cc7c53d797e68e8746", class: "search-result-row__content", part: "content" }, h("span", { key: "6e1c2d49029e1c1fdc2519f513ddedbe304ddb3e", class: "search-result-row__title", part: "title" }, h("slot", { key: "9653efc0b61c49d36034c4c75a3e9b3d7a6f837b", name: "title" })), h("span", { key: "b10885a7649c75f9e6903354f5804f459aa883b7", class: "search-result-row__meta", part: "meta", hidden: !this.hasMeta }, h("slot", { key: "b3101183b0dfa0cc1ba8e62c1f8fc39ad865e1ae", name: "meta", ref: (el) => this.metaSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "430520c0e349344fc4c549cd36a0137d39fc8d24", class: "search-result-row__excerpt", part: "excerpt", hidden: !this.hasExcerpt }, h("slot", { key: "4a90cefa9b1d2b2378d1a8aa166aa8fdebfbca42", name: "excerpt", ref: (el) => this.excerptSlot = el, onSlotchange: this.syncSlots }))), h("span", { key: "769ed2f62ead7ce32b13cdad93a7bbb981b13b3c", class: "search-result-row__trailing", part: "trailing", hidden: !this.hasTrailing }, h("slot", { key: "86490f5fef29c6fa4d8ddf838de5f9aee8535db0", name: "trailing", ref: (el) => this.trailingSlot = el, onSlotchange: this.syncSlots }))));
|
|
3510
3720
|
}
|
|
3511
3721
|
};
|
|
3512
3722
|
UISearchResultRow.style = uiSearchResultRowCss();
|
|
@@ -3550,7 +3760,7 @@ var init_ui_search_shell_entry = __esm({
|
|
|
3550
3760
|
this.hasFooter = slotHasContent2(this.footerSlot);
|
|
3551
3761
|
};
|
|
3552
3762
|
render() {
|
|
3553
|
-
return h("div", { key: "
|
|
3763
|
+
return h("div", { key: "049a6451f10f1906881efc8fc2cdeba656e68733", class: "search-shell", part: "base" }, h("slot", { key: "e807b035ccb9ec9425651b59a0d137ebc54329aa", name: "backdrop" }), h("div", { key: "5d785a0d4dab1fed7f6750b82485b9e50edd62d9", class: "search-shell__panel", part: "panel" }, h("div", { key: "b41c40485d61d9436504483759a5f42d96e5aad2", class: "search-shell__search", part: "search" }, h("slot", { key: "b19058bca701cc26d286c8694c7cdc6306e100c4", name: "search" })), h("div", { key: "260164b95427e03329f28247e8dbda867506e672", class: "search-shell__status", part: "status", hidden: !this.hasStatus }, h("slot", { key: "1d7c1e8c96e588b7c9c906cfaad91ba1cf77bf7c", name: "status", ref: (el) => this.statusSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "49963c82e54aee2b5c4c4809ce2b152f770b4468", class: "search-shell__body", part: "body" }, h("slot", { key: "ae32ec8c9ec89310ad1805f1c65bc8208ee12f29", name: "body" })), h("div", { key: "f5fc9f356035e277e4c9bb0e188d7b4be3642c27", class: "search-shell__footer", part: "footer", hidden: !this.hasFooter }, h("slot", { key: "dbf1022e49a054eee1c5e70b675c71d1cf3488bf", name: "footer", ref: (el) => this.footerSlot = el, onSlotchange: this.syncSlots }))));
|
|
3554
3764
|
}
|
|
3555
3765
|
};
|
|
3556
3766
|
UISearchShell.style = uiSearchShellCss();
|
|
@@ -3643,7 +3853,7 @@ var init_ui_select_entry = __esm({
|
|
|
3643
3853
|
});
|
|
3644
3854
|
};
|
|
3645
3855
|
render() {
|
|
3646
|
-
return h(Host, { key: "
|
|
3856
|
+
return h(Host, { key: "2b3348e1694cfd113163af3adf939fd64cb40654", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "40e627125a906cf4bf294eb085c172a5370f3a54", ref: (el) => this.slotRef = el }));
|
|
3647
3857
|
}
|
|
3648
3858
|
static get watchers() {
|
|
3649
3859
|
return {
|
|
@@ -3729,7 +3939,7 @@ var init_ui_switch_entry = __esm({
|
|
|
3729
3939
|
this.toggle("pointer");
|
|
3730
3940
|
};
|
|
3731
3941
|
render() {
|
|
3732
|
-
return h(Host, { key: "
|
|
3942
|
+
return h(Host, { key: "eaee279bbc787c844f2ad265da03fca608d9c429", role: "switch", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.onKeydown, onClick: this.onClick }, h("input", { key: "2ebfa684bf08735a4e89a06001f6758885c40ffb", type: "checkbox", checked: this.internalChecked, disabled: this.disabled, required: this.required, value: this.value, "aria-hidden": "true", tabIndex: -1, onChange: (e) => {
|
|
3733
3943
|
const input = e.target;
|
|
3734
3944
|
const checked = input.checked;
|
|
3735
3945
|
if (!isControlled(this.checked))
|
|
@@ -3741,7 +3951,7 @@ var init_ui_switch_entry = __esm({
|
|
|
3741
3951
|
});
|
|
3742
3952
|
if (isControlled(this.checked))
|
|
3743
3953
|
input.checked = this.internalChecked;
|
|
3744
|
-
} }), h("slot", { key: "
|
|
3954
|
+
} }), h("slot", { key: "ff9975d4ccbffbed2b97060eabf347653d5f5110" }));
|
|
3745
3955
|
}
|
|
3746
3956
|
static get watchers() {
|
|
3747
3957
|
return {
|
|
@@ -3858,7 +4068,7 @@ var init_ui_tabs_entry = __esm({
|
|
|
3858
4068
|
}
|
|
3859
4069
|
};
|
|
3860
4070
|
render() {
|
|
3861
|
-
return h(Host, { key: "
|
|
4071
|
+
return h(Host, { key: "61044ac3f2fcb0f766d931416f42ff17ec94c00d", orientation: this.orientation, "data-orientation": this.orientation }, h("slot", { key: "3260c95bdd24581045b1c4e4d1b8f4d08daf02b4" }));
|
|
3862
4072
|
}
|
|
3863
4073
|
static get watchers() {
|
|
3864
4074
|
return {
|
|
@@ -3963,7 +4173,7 @@ var init_ui_textarea_entry = __esm({
|
|
|
3963
4173
|
});
|
|
3964
4174
|
};
|
|
3965
4175
|
render() {
|
|
3966
|
-
return h(Host, { key: "
|
|
4176
|
+
return h(Host, { key: "a554edb1a0ef40a2c116e3064e52af7474e065e4", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "a4eb8034ec11f8b3b06ace7287410fd839004593", ref: (el) => this.slotRef = el }));
|
|
3967
4177
|
}
|
|
3968
4178
|
static get watchers() {
|
|
3969
4179
|
return {
|
|
@@ -4005,7 +4215,7 @@ var init_ui_toast_region_entry = __esm({
|
|
|
4005
4215
|
"dist/esm/ui-toast-region.entry.js"() {
|
|
4006
4216
|
init_index_8BGiMGQ0();
|
|
4007
4217
|
init_events_JwSoedEO();
|
|
4008
|
-
|
|
4218
|
+
init_positioning_Drmwg_C1();
|
|
4009
4219
|
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}`;
|
|
4010
4220
|
UIToastRegion = class {
|
|
4011
4221
|
constructor(hostRef) {
|
|
@@ -4078,7 +4288,7 @@ var init_ui_toast_region_entry = __esm({
|
|
|
4078
4288
|
});
|
|
4079
4289
|
};
|
|
4080
4290
|
render() {
|
|
4081
|
-
return h(Host, { key: "
|
|
4291
|
+
return h(Host, { key: "9f9c2e14150c631c0f7cb427c693dcd52c20897d", role: "region", "aria-label": "Notifications", "aria-live": "polite", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "9e1d9ebb6b587afab2c4302241cecb03a321cee1" }));
|
|
4082
4292
|
}
|
|
4083
4293
|
static get watchers() {
|
|
4084
4294
|
return {
|
|
@@ -4095,253 +4305,6 @@ var init_ui_toast_region_entry = __esm({
|
|
|
4095
4305
|
}
|
|
4096
4306
|
});
|
|
4097
4307
|
|
|
4098
|
-
// dist/esm/ui-tooltip.entry.js
|
|
4099
|
-
var ui_tooltip_entry_exports = {};
|
|
4100
|
-
__export(ui_tooltip_entry_exports, {
|
|
4101
|
-
ui_tooltip: () => UITooltip
|
|
4102
|
-
});
|
|
4103
|
-
var uiTooltipCss, UITooltip;
|
|
4104
|
-
var init_ui_tooltip_entry = __esm({
|
|
4105
|
-
"dist/esm/ui-tooltip.entry.js"() {
|
|
4106
|
-
init_index_8BGiMGQ0();
|
|
4107
|
-
init_manager_C_0syqXZ();
|
|
4108
|
-
init_events_JwSoedEO();
|
|
4109
|
-
init_controlled_state_BnGhGgTH();
|
|
4110
|
-
init_positioning_Bu0dmLBE();
|
|
4111
|
-
uiTooltipCss = () => `:host{position:fixed;inset:auto;margin:0;display:inline-block;box-sizing:border-box;padding:0;border:0;border-radius:0;background:transparent;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}.tooltip__surface{box-sizing:border-box;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md)}:host(: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}}`;
|
|
4112
|
-
UITooltip = class {
|
|
4113
|
-
constructor(hostRef) {
|
|
4114
|
-
registerInstance(this, hostRef);
|
|
4115
|
-
this.opened = createEvent(this, "open");
|
|
4116
|
-
this.closed = createEvent(this, "close");
|
|
4117
|
-
}
|
|
4118
|
-
get host() {
|
|
4119
|
-
return getElement(this);
|
|
4120
|
-
}
|
|
4121
|
-
for = "";
|
|
4122
|
-
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
4123
|
-
open;
|
|
4124
|
-
defaultOpen = false;
|
|
4125
|
-
placement = "top-start";
|
|
4126
|
-
/** Pointer hover intent delay in milliseconds. Keyboard focus is immediate. */
|
|
4127
|
-
showDelay = 500;
|
|
4128
|
-
/** Pointer leave grace period in milliseconds. */
|
|
4129
|
-
hideDelay = 100;
|
|
4130
|
-
/** Click or tap pins the description; activate again to dismiss. */
|
|
4131
|
-
toggleOnClick = false;
|
|
4132
|
-
pinned = false;
|
|
4133
|
-
focused = false;
|
|
4134
|
-
opened;
|
|
4135
|
-
closed;
|
|
4136
|
-
internalOpen = false;
|
|
4137
|
-
overlayId = `ui-tooltip-${Math.random().toString(36).slice(2, 11)}`;
|
|
4138
|
-
trigger = null;
|
|
4139
|
-
surface = null;
|
|
4140
|
-
showTimer = null;
|
|
4141
|
-
hideTimer = null;
|
|
4142
|
-
syncFromProp() {
|
|
4143
|
-
this.clearTimers();
|
|
4144
|
-
if (isControlled(this.open))
|
|
4145
|
-
this.internalOpen = this.open;
|
|
4146
|
-
}
|
|
4147
|
-
resetSurface() {
|
|
4148
|
-
this.syncTrigger();
|
|
4149
|
-
this.setupSurface();
|
|
4150
|
-
this.syncOverlay();
|
|
4151
|
-
}
|
|
4152
|
-
syncOverlay() {
|
|
4153
|
-
if (this.internalOpen) {
|
|
4154
|
-
this.surface?.show();
|
|
4155
|
-
openOverlay({
|
|
4156
|
-
id: this.overlayId,
|
|
4157
|
-
modal: false,
|
|
4158
|
-
element: this.host,
|
|
4159
|
-
relatedElements: this.trigger ? [this.trigger] : void 0,
|
|
4160
|
-
dismissible: true,
|
|
4161
|
-
requestClose: (reason, trigger) => this.handleRequestClose(reason, trigger)
|
|
4162
|
-
});
|
|
4163
|
-
} else {
|
|
4164
|
-
this.surface?.hide();
|
|
4165
|
-
closeOverlay(this.overlayId);
|
|
4166
|
-
}
|
|
4167
|
-
}
|
|
4168
|
-
componentDidLoad() {
|
|
4169
|
-
if (!this.host.id)
|
|
4170
|
-
this.host.id = this.overlayId;
|
|
4171
|
-
this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
|
|
4172
|
-
this.syncTrigger();
|
|
4173
|
-
this.setupSurface();
|
|
4174
|
-
this.host.addEventListener("pointerenter", this.onSurfaceEnter);
|
|
4175
|
-
this.host.addEventListener("pointerleave", this.onTriggerLeave);
|
|
4176
|
-
this.syncOverlay();
|
|
4177
|
-
}
|
|
4178
|
-
componentDidUpdate() {
|
|
4179
|
-
this.syncTrigger();
|
|
4180
|
-
}
|
|
4181
|
-
disconnectedCallback() {
|
|
4182
|
-
this.clearTimers();
|
|
4183
|
-
this.detachTriggerListeners();
|
|
4184
|
-
this.surface?.destroy();
|
|
4185
|
-
this.surface = null;
|
|
4186
|
-
this.host.removeEventListener("pointerenter", this.onSurfaceEnter);
|
|
4187
|
-
this.host.removeEventListener("pointerleave", this.onTriggerLeave);
|
|
4188
|
-
closeOverlay(this.overlayId);
|
|
4189
|
-
}
|
|
4190
|
-
syncTrigger() {
|
|
4191
|
-
const next = this.for ? this.host.getRootNode().getElementById(this.for) : this.host.previousElementSibling;
|
|
4192
|
-
if (next === this.trigger)
|
|
4193
|
-
return;
|
|
4194
|
-
this.detachTriggerListeners();
|
|
4195
|
-
this.trigger = next;
|
|
4196
|
-
this.attachTriggerListeners();
|
|
4197
|
-
this.surface?.setAnchor(next);
|
|
4198
|
-
}
|
|
4199
|
-
setupSurface() {
|
|
4200
|
-
this.surface?.destroy();
|
|
4201
|
-
this.surface = createAnchoredSurface(this.host, {
|
|
4202
|
-
anchor: this.trigger,
|
|
4203
|
-
placement: this.placement
|
|
4204
|
-
});
|
|
4205
|
-
}
|
|
4206
|
-
attachTriggerListeners() {
|
|
4207
|
-
this.detachTriggerListeners();
|
|
4208
|
-
if (!this.trigger)
|
|
4209
|
-
return;
|
|
4210
|
-
const ids = new Set((this.trigger.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean));
|
|
4211
|
-
ids.add(this.host.id);
|
|
4212
|
-
this.trigger.setAttribute("aria-describedby", [...ids].join(" "));
|
|
4213
|
-
this.trigger.addEventListener("click", this.onTriggerClick);
|
|
4214
|
-
this.trigger.addEventListener("keydown", this.onTriggerKeydown);
|
|
4215
|
-
this.trigger.addEventListener("pointerenter", this.onTriggerEnter);
|
|
4216
|
-
this.trigger.addEventListener("pointerleave", this.onTriggerLeave);
|
|
4217
|
-
this.trigger.addEventListener("focusin", this.onTriggerFocusIn);
|
|
4218
|
-
this.trigger.addEventListener("focusout", this.onTriggerFocusOut);
|
|
4219
|
-
}
|
|
4220
|
-
detachTriggerListeners() {
|
|
4221
|
-
if (!this.trigger)
|
|
4222
|
-
return;
|
|
4223
|
-
const ids = (this.trigger.getAttribute("aria-describedby") || "").split(/\s+/).filter((id) => id && id !== this.host.id);
|
|
4224
|
-
if (ids.length)
|
|
4225
|
-
this.trigger.setAttribute("aria-describedby", ids.join(" "));
|
|
4226
|
-
else
|
|
4227
|
-
this.trigger.removeAttribute("aria-describedby");
|
|
4228
|
-
this.trigger.removeEventListener("click", this.onTriggerClick);
|
|
4229
|
-
this.trigger.removeEventListener("keydown", this.onTriggerKeydown);
|
|
4230
|
-
this.trigger.removeEventListener("pointerenter", this.onTriggerEnter);
|
|
4231
|
-
this.trigger.removeEventListener("pointerleave", this.onTriggerLeave);
|
|
4232
|
-
this.trigger.removeEventListener("focusin", this.onTriggerFocusIn);
|
|
4233
|
-
this.trigger.removeEventListener("focusout", this.onTriggerFocusOut);
|
|
4234
|
-
}
|
|
4235
|
-
clearShowTimer() {
|
|
4236
|
-
if (this.showTimer === null)
|
|
4237
|
-
return;
|
|
4238
|
-
clearTimeout(this.showTimer);
|
|
4239
|
-
this.showTimer = null;
|
|
4240
|
-
}
|
|
4241
|
-
clearHideTimer() {
|
|
4242
|
-
if (this.hideTimer === null)
|
|
4243
|
-
return;
|
|
4244
|
-
clearTimeout(this.hideTimer);
|
|
4245
|
-
this.hideTimer = null;
|
|
4246
|
-
}
|
|
4247
|
-
clearTimers() {
|
|
4248
|
-
this.clearShowTimer();
|
|
4249
|
-
this.clearHideTimer();
|
|
4250
|
-
}
|
|
4251
|
-
setInteractionOpen(nextOpen, trigger) {
|
|
4252
|
-
if (this.internalOpen === nextOpen)
|
|
4253
|
-
return;
|
|
4254
|
-
if (!isControlled(this.open))
|
|
4255
|
-
this.internalOpen = nextOpen;
|
|
4256
|
-
dispatchDetail(this.host, nextOpen ? "open" : "close", {
|
|
4257
|
-
open: nextOpen,
|
|
4258
|
-
reason: "action",
|
|
4259
|
-
trigger
|
|
4260
|
-
});
|
|
4261
|
-
}
|
|
4262
|
-
onSurfaceEnter = () => this.clearHideTimer();
|
|
4263
|
-
onTriggerClick = (event) => {
|
|
4264
|
-
if (!this.toggleOnClick)
|
|
4265
|
-
return;
|
|
4266
|
-
this.clearTimers();
|
|
4267
|
-
this.pinned = !this.pinned;
|
|
4268
|
-
this.setInteractionOpen(this.pinned, event.detail === 0 ? "keyboard" : "pointer");
|
|
4269
|
-
};
|
|
4270
|
-
onTriggerKeydown = (event) => {
|
|
4271
|
-
if (event.key === "Escape")
|
|
4272
|
-
this.clearTimers();
|
|
4273
|
-
};
|
|
4274
|
-
onTriggerEnter = (event) => {
|
|
4275
|
-
if (event.pointerType === "touch")
|
|
4276
|
-
return;
|
|
4277
|
-
this.clearHideTimer();
|
|
4278
|
-
if (this.internalOpen || this.showTimer !== null)
|
|
4279
|
-
return;
|
|
4280
|
-
this.showTimer = setTimeout(() => {
|
|
4281
|
-
this.showTimer = null;
|
|
4282
|
-
this.setInteractionOpen(true, "pointer");
|
|
4283
|
-
}, Math.max(0, this.showDelay));
|
|
4284
|
-
};
|
|
4285
|
-
onTriggerLeave = () => {
|
|
4286
|
-
this.clearShowTimer();
|
|
4287
|
-
if (this.focused || this.pinned || !this.internalOpen || this.hideTimer !== null)
|
|
4288
|
-
return;
|
|
4289
|
-
this.hideTimer = setTimeout(() => {
|
|
4290
|
-
this.hideTimer = null;
|
|
4291
|
-
this.setInteractionOpen(false, "pointer");
|
|
4292
|
-
}, Math.max(0, this.hideDelay));
|
|
4293
|
-
};
|
|
4294
|
-
onTriggerFocusIn = () => {
|
|
4295
|
-
this.focused = true;
|
|
4296
|
-
this.clearTimers();
|
|
4297
|
-
this.setInteractionOpen(true, "keyboard");
|
|
4298
|
-
};
|
|
4299
|
-
onTriggerFocusOut = (e) => {
|
|
4300
|
-
const related = e.relatedTarget;
|
|
4301
|
-
if (related && this.host.contains(related))
|
|
4302
|
-
return;
|
|
4303
|
-
this.focused = false;
|
|
4304
|
-
this.pinned = false;
|
|
4305
|
-
this.clearTimers();
|
|
4306
|
-
this.setInteractionOpen(false, "keyboard");
|
|
4307
|
-
};
|
|
4308
|
-
handleRequestClose(reason, trigger) {
|
|
4309
|
-
if (reason === "escape" || reason === "light-dismiss" && this.toggleOnClick) {
|
|
4310
|
-
this.pinned = false;
|
|
4311
|
-
this.clearTimers();
|
|
4312
|
-
if (!isControlled(this.open))
|
|
4313
|
-
this.internalOpen = false;
|
|
4314
|
-
dispatchDetail(this.host, "close", {
|
|
4315
|
-
open: false,
|
|
4316
|
-
reason,
|
|
4317
|
-
trigger
|
|
4318
|
-
});
|
|
4319
|
-
}
|
|
4320
|
-
}
|
|
4321
|
-
render() {
|
|
4322
|
-
return h(Host, { key: "2216e8f56c408e775140200881c9bfd99b45f381", role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? "" : void 0 }, h("div", { key: "a547e43fb5f6c3c2f62cf7f1fb9198dc0024a28d", class: "tooltip__surface" }, h("slot", { key: "dc8863505e8140565588c57ea200b7f548fb5df3" })));
|
|
4323
|
-
}
|
|
4324
|
-
static get watchers() {
|
|
4325
|
-
return {
|
|
4326
|
-
"open": [{
|
|
4327
|
-
"syncFromProp": 0
|
|
4328
|
-
}],
|
|
4329
|
-
"for": [{
|
|
4330
|
-
"resetSurface": 0
|
|
4331
|
-
}],
|
|
4332
|
-
"placement": [{
|
|
4333
|
-
"resetSurface": 0
|
|
4334
|
-
}],
|
|
4335
|
-
"internalOpen": [{
|
|
4336
|
-
"syncOverlay": 0
|
|
4337
|
-
}]
|
|
4338
|
-
};
|
|
4339
|
-
}
|
|
4340
|
-
};
|
|
4341
|
-
UITooltip.style = uiTooltipCss();
|
|
4342
|
-
}
|
|
4343
|
-
});
|
|
4344
|
-
|
|
4345
4308
|
// dist/esm/ui-top-bar.entry.js
|
|
4346
4309
|
var ui_top_bar_entry_exports = {};
|
|
4347
4310
|
__export(ui_top_bar_entry_exports, {
|
|
@@ -4385,7 +4348,7 @@ var init_ui_top_bar_entry = __esm({
|
|
|
4385
4348
|
this.hasActions = slotHasContent3(this.actionsSlot);
|
|
4386
4349
|
};
|
|
4387
4350
|
render() {
|
|
4388
|
-
return h(Host, { key: "
|
|
4351
|
+
return h(Host, { key: "1ef941e211c9536c034a40c0f7a255068595de10" }, h("header", { key: "f1ea465d17753224d72971d26f70b546b93de8ba", class: "top-bar", part: "base" }, h("div", { key: "4eab975109467ad41e16527102b31e6e6d7421c8", class: "top-bar__leading", hidden: !this.hasLeading }, h("slot", { key: "3388d0e2346de4c08d85dd4c3a998e5f668a05f6", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "7b176d6e82da08eb495f3ca2c83505327c21f525", class: "top-bar__title" }, h("slot", { key: "8196e5489d2f43a72f794aad8ceaa44c358810e9" })), h("div", { key: "2b29c72174559865fb01b99cfab830f74640a8a5", class: "top-bar__search", hidden: !this.hasSearch }, h("slot", { key: "9597fde0cf05821e641471343a38dd3190f1e18f", name: "search", ref: (el) => this.searchSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "1f19003e43fb28ac4ff4debd27e1a0fa9f342275", class: "top-bar__actions", hidden: !this.hasActions }, h("slot", { key: "f6a84824d2806dc16b5fa82cc25dc1247a6a8ad1", name: "actions", ref: (el) => this.actionsSlot = el, onSlotchange: this.syncSlots }))));
|
|
4389
4352
|
}
|
|
4390
4353
|
};
|
|
4391
4354
|
UITopBar.style = uiTopBarCss();
|
|
@@ -4516,10 +4479,10 @@ var init_ui_tree_item_entry = __esm({
|
|
|
4516
4479
|
const expanded = this.isExpanded();
|
|
4517
4480
|
const disclosureLabel = `${expanded ? "Collapse" : "Expand"} ${this.label || "item"}`;
|
|
4518
4481
|
const dragLabel = `Drag ${this.label || "item"} to reorder`;
|
|
4519
|
-
return h(Host, { key: "
|
|
4482
|
+
return h(Host, { key: "0ce6384903be2181055c76808cd4664dcfa8de54", role: "treeitem", "aria-label": this.label || void 0, "aria-level": String(level), "aria-expanded": this.container ? String(expanded) : void 0, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? "true" : void 0, "data-container": this.container ? "" : void 0, "data-selected": this.selected ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-drag-type": this.dragType || "item", "data-drop-scope": this.dropScope || void 0, "data-accepts": this.accepts || void 0, tabIndex: this.disabled || !this.tabStop ? -1 : 0, style: {
|
|
4520
4483
|
"--ui-tree-item-depth": String(level - 1),
|
|
4521
4484
|
"margin-inline-start": level > 1 ? "var(--ui-tree-indent, 16px)" : "0px"
|
|
4522
|
-
} }, h("div", { key: "
|
|
4485
|
+
} }, h("div", { key: "7d6923da8fd8be7fffc7cf345ac4d1211217c21a", class: "row", part: "row", onClick: this.onRowClick }, this.sortable && !this.disabled ? h("button", { class: "drag-handle", part: "drag-handle", type: "button", draggable: true, "aria-label": dragLabel, title: dragLabel }, h("span", { innerHTML: loomaIconMarkup("grip-vertical") })) : null, this.container ? h("button", { class: "disclosure", part: "disclosure", type: "button", "aria-label": disclosureLabel, "aria-expanded": String(expanded), disabled: this.disabled, onClick: this.onDisclosureClick, onKeyDown: this.onDisclosureKeydown }, h("span", { class: { "disclosure-icon": true, "disclosure-icon--expanded": expanded }, innerHTML: loomaIconMarkup("chevron-down") })) : h("span", { class: "disclosure-spacer", "aria-hidden": "true" }), h("span", { key: "ef8959fc858b90c7ea26c8ff740cfe02fb372686", class: "leading", part: "leading" }, h("slot", { key: "1e00da2acd23ae6430e38b26502d9f3951461c93", name: "leading" })), h("span", { key: "f37a63aa0c6e73f134442589314fae01e01cf782", class: "label", part: "label" }, h("slot", { key: "f527d8a33927d72502d5cbbbe0cb5739d7bdbaf2" })), h("span", { key: "de6492f81ac5747d913132c275abb9157d18deab", class: "actions", part: "actions" }, h("slot", { key: "f5316e3a5fb67130ef1401253dc5ef6b7072840e", name: "actions" })), h("span", { key: "89da3b2bab7a953368810319148a644e62bc9a47", class: "drop-indicator row-drop-indicator", part: "drop-indicator", "aria-hidden": "true" })), this.container ? h("div", { class: "children", part: "children", role: "group", hidden: !expanded }, h("slot", { name: "children" })) : null, h("span", { key: "9a66f1ba72290a037ef02ccbd49243463ba34b67", class: "drop-indicator subtree-drop-indicator", part: "drop-indicator", "aria-hidden": "true" }));
|
|
4523
4486
|
}
|
|
4524
4487
|
static get watchers() {
|
|
4525
4488
|
return {
|
|
@@ -4995,7 +4958,7 @@ var init_ui_tree_entry = __esm({
|
|
|
4995
4958
|
}
|
|
4996
4959
|
};
|
|
4997
4960
|
render() {
|
|
4998
|
-
return h(Host, { key: "
|
|
4961
|
+
return h(Host, { key: "bae06665078a67c59db2d9e72c7dea6ddeeb9e56", role: "tree", "aria-label": this.label || "Tree" }, h("slot", { key: "232cb02f1a50bc5e18a92c0d8677e917870ec75e" }));
|
|
4999
4962
|
}
|
|
5000
4963
|
};
|
|
5001
4964
|
UITree.style = uiTreeCss();
|
|
@@ -5015,6 +4978,7 @@ var init_ = __esm({
|
|
|
5015
4978
|
"./ui-callout.entry.js": () => Promise.resolve().then(() => (init_ui_callout_entry(), ui_callout_entry_exports)),
|
|
5016
4979
|
"./ui-checkbox.entry.js": () => Promise.resolve().then(() => (init_ui_checkbox_entry(), ui_checkbox_entry_exports)),
|
|
5017
4980
|
"./ui-chip_2.entry.js": () => Promise.resolve().then(() => (init_ui_chip_2_entry(), ui_chip_2_entry_exports)),
|
|
4981
|
+
"./ui-combobox.entry.js": () => Promise.resolve().then(() => (init_ui_combobox_entry(), ui_combobox_entry_exports)),
|
|
5018
4982
|
"./ui-context-menu.entry.js": () => Promise.resolve().then(() => (init_ui_context_menu_entry(), ui_context_menu_entry_exports)),
|
|
5019
4983
|
"./ui-dialog.entry.js": () => Promise.resolve().then(() => (init_ui_dialog_entry(), ui_dialog_entry_exports)),
|
|
5020
4984
|
"./ui-disclosure.entry.js": () => Promise.resolve().then(() => (init_ui_disclosure_entry(), ui_disclosure_entry_exports)),
|
|
@@ -5025,7 +4989,6 @@ var init_ = __esm({
|
|
|
5025
4989
|
"./ui-input.entry.js": () => Promise.resolve().then(() => (init_ui_input_entry(), ui_input_entry_exports)),
|
|
5026
4990
|
"./ui-menu-item.entry.js": () => Promise.resolve().then(() => (init_ui_menu_item_entry(), ui_menu_item_entry_exports)),
|
|
5027
4991
|
"./ui-menu.entry.js": () => Promise.resolve().then(() => (init_ui_menu_entry(), ui_menu_entry_exports)),
|
|
5028
|
-
"./ui-multi-combobox.entry.js": () => Promise.resolve().then(() => (init_ui_multi_combobox_entry(), ui_multi_combobox_entry_exports)),
|
|
5029
4992
|
"./ui-popover.entry.js": () => Promise.resolve().then(() => (init_ui_popover_entry(), ui_popover_entry_exports)),
|
|
5030
4993
|
"./ui-radio-group.entry.js": () => Promise.resolve().then(() => (init_ui_radio_group_entry(), ui_radio_group_entry_exports)),
|
|
5031
4994
|
"./ui-radio.entry.js": () => Promise.resolve().then(() => (init_ui_radio_entry(), ui_radio_entry_exports)),
|
|
@@ -5036,7 +4999,6 @@ var init_ = __esm({
|
|
|
5036
4999
|
"./ui-tabs.entry.js": () => Promise.resolve().then(() => (init_ui_tabs_entry(), ui_tabs_entry_exports)),
|
|
5037
5000
|
"./ui-textarea.entry.js": () => Promise.resolve().then(() => (init_ui_textarea_entry(), ui_textarea_entry_exports)),
|
|
5038
5001
|
"./ui-toast-region.entry.js": () => Promise.resolve().then(() => (init_ui_toast_region_entry(), ui_toast_region_entry_exports)),
|
|
5039
|
-
"./ui-tooltip.entry.js": () => Promise.resolve().then(() => (init_ui_tooltip_entry(), ui_tooltip_entry_exports)),
|
|
5040
5002
|
"./ui-top-bar.entry.js": () => Promise.resolve().then(() => (init_ui_top_bar_entry(), ui_top_bar_entry_exports)),
|
|
5041
5003
|
"./ui-tree-item.entry.js": () => Promise.resolve().then(() => (init_ui_tree_item_entry(), ui_tree_item_entry_exports)),
|
|
5042
5004
|
"./ui-tree.entry.js": () => Promise.resolve().then(() => (init_ui_tree_entry(), ui_tree_entry_exports))
|
|
@@ -6655,7 +6617,7 @@ var globalScripts = () => {
|
|
|
6655
6617
|
var defineCustomElements = async (win2, options) => {
|
|
6656
6618
|
if (typeof window === "undefined") return void 0;
|
|
6657
6619
|
await globalScripts();
|
|
6658
|
-
return bootstrapLazy([["ui-
|
|
6620
|
+
return bootstrapLazy([["ui-combobox", [[769, "ui-combobox", { "label": [1], "placeholder": [1], "name": [1], "value": [1], "defaultValue": [1, "default-value"], "multiple": [516], "tokenSeparators": [16], "query": [1], "defaultQuery": [1, "default-query"], "config": [16], "disabled": [4], "readOnly": [4, "readonly"], "required": [4], "size": [1], "labelVisibility": [1, "label-visibility"], "disclosure": [4], "clearable": [4], "help": [1], "raw": [32], "display": [32], "selected": [32], "expanded": [32], "rows": [32], "active": [32], "loading": [32], "helpOpen": [32], "lookupError": [32], "validation": [32], "validate": [64], "focusInput": [64] }, null, { "value": [{ "syncValue": 0 }], "query": [{ "syncQuery": 0 }], "disabled": [{ "syncDisabled": 0 }], "readOnly": [{ "syncDisabled": 0 }], "config": [{ "syncConfig": 0 }] }]]], ["ui-context-menu", [[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 }] }]]], ["ui-affordance-scope", [[769, "ui-affordance-scope", { "nearRadius": [514, "near-radius"] }, null, { "nearRadius": [{ "connectCoordinator": 0 }] }]]], ["ui-avatar", [[513, "ui-avatar", { "src": [1], "alt": [1], "name": [1], "fallback": [1], "hasImage": [32] }, null, { "src": [{ "watchSrc": 0 }] }]]], ["ui-avatar-group", [[769, "ui-avatar-group", { "max": [2], "label": [1], "overflowCount": [32] }, null, { "max": [{ "syncOverflow": 0 }] }]]], ["ui-badge", [[769, "ui-badge", { "variant": [1], "tone": [1] }]]], ["ui-button", [[769, "ui-button", { "variant": [1], "size": [1], "disabled": [4] }, null, { "variant": [{ "syncToButton": 0 }], "size": [{ "syncToButton": 0 }], "disabled": [{ "syncToButton": 0 }] }]]], ["ui-callout", [[769, "ui-callout", { "tone": [1] }]]], ["ui-checkbox", [[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 }] }]]], ["ui-dialog", [[769, "ui-dialog", { "open": [4], "defaultOpen": [4, "default-open"], "modal": [4], "dismissible": [4], "label": [1], "internalOpen": [32], "accessibleLabel": [32] }, null, { "open": [{ "syncFromProp": 0 }], "label": [{ "syncLabelFromProp": 0 }], "internalOpen": [{ "syncOpen": 0 }] }]]], ["ui-disclosure", [[769, "ui-disclosure", { "open": [4], "defaultOpen": [4, "default-open"], "disabled": [4], "internalOpen": [32], "contentId": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncState": 0 }] }]]], ["ui-editable", [[769, "ui-editable", { "edit": [4], "defaultEdit": [4, "default-edit"], "disabled": [4], "internalEdit": [32] }, null, { "edit": [{ "syncFromProp": 0 }] }]]], ["ui-floating-action-button", [[769, "ui-floating-action-button", { "disabled": [516], "mobileOnly": [516, "mobile-only"], "label": [1] }]]], ["ui-form-field", [[769, "ui-form-field", { "invalid": [4], "disabled": [4], "required": [4] }]]], ["ui-icon-button", [[769, "ui-icon-button", { "disabled": [516], "label": [1], "size": [513], "variant": [513], "anticipatory": [516] }]]], ["ui-input", [[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 }] }]]], ["ui-menu-item", [[769, "ui-menu-item", { "disabled": [516], "value": [1] }]]], ["ui-popover", [[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 }] }]]], ["ui-radio", [[769, "ui-radio", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "name": [1], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "disabled": [{ "syncToInput": 0 }], "name": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }], "value": [{ "syncToInput": 0 }] }]]], ["ui-radio-group", [[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 }] }]]], ["ui-search-result-row", [[769, "ui-search-result-row", { "disabled": [516], "selected": [516], "hasLeading": [32], "hasMeta": [32], "hasExcerpt": [32], "hasTrailing": [32] }]]], ["ui-search-shell", [[769, "ui-search-shell", { "hasStatus": [32], "hasFooter": [32] }]]], ["ui-select", [[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 }] }]]], ["ui-switch", [[769, "ui-switch", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }] }]]], ["ui-tabs", [[769, "ui-tabs", { "value": [1], "defaultValue": [1, "default-value"], "orientation": [1], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncState": 0 }], "orientation": [{ "syncState": 0 }] }]]], ["ui-textarea", [[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 }] }]]], ["ui-toast-region", [[769, "ui-toast-region", { "open": [4], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncSurface": 0 }] }]]], ["ui-top-bar", [[769, "ui-top-bar", { "hasLeading": [32], "hasSearch": [32], "hasActions": [32] }]]], ["ui-tree", [[769, "ui-tree", { "label": [1], "hoverExpandDelay": [2, "hover-expand-delay"], "maxDepth": [2, "max-depth"] }]]], ["ui-tree-item", [[769, "ui-tree-item", { "itemId": [1, "item-id"], "label": [1], "dropDepth": [2, "drop-depth"], "subtreeDepth": [2, "subtree-depth"], "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], "structuralLevel": [32], "tabStop": [32] }, null, { "expanded": [{ "syncExpandedFromProp": 0 }] }]]], ["ui-menu", [[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 }] }]]], ["ui-chip_2", [[769, "ui-chip", { "appearance": [1], "size": [1] }], [769, "ui-tooltip", { "for": [1], "open": [4], "defaultOpen": [4, "default-open"], "placement": [1], "showDelay": [2, "show-delay"], "hideDelay": [2, "hide-delay"], "toggleOnClick": [4, "toggle-on-click"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]]], options);
|
|
6659
6621
|
};
|
|
6660
6622
|
|
|
6661
6623
|
// loader/index.js
|
|
@@ -6851,24 +6813,23 @@ function createViewportSurface2(surface) {
|
|
|
6851
6813
|
}
|
|
6852
6814
|
};
|
|
6853
6815
|
}
|
|
6854
|
-
function fallbackPosition2(surface, anchor, placement, gap, viewportGap) {
|
|
6816
|
+
function fallbackPosition2(surface, anchor, placement, gap, viewportGap, surfaceRect = surface.getBoundingClientRect()) {
|
|
6855
6817
|
const owner = surface.ownerDocument.defaultView ?? window;
|
|
6856
6818
|
const viewport = getVisualViewportRect2(owner);
|
|
6857
|
-
const rect = surface.getBoundingClientRect();
|
|
6858
6819
|
const preferTop = placement.startsWith("top");
|
|
6859
6820
|
const preferEnd = placement.endsWith("end");
|
|
6860
6821
|
const spaceBelow = viewport.bottom - anchor.bottom - viewportGap;
|
|
6861
6822
|
const spaceAbove = anchor.top - viewport.top - viewportGap;
|
|
6862
|
-
const useTop = preferTop ? !(spaceAbove <
|
|
6863
|
-
const unclampedTop = useTop ? anchor.top -
|
|
6864
|
-
const unclampedLeft = preferEnd ? anchor.right -
|
|
6823
|
+
const useTop = preferTop ? !(spaceAbove < surfaceRect.height + gap && spaceBelow > spaceAbove) : spaceBelow < surfaceRect.height + gap && spaceAbove > spaceBelow;
|
|
6824
|
+
const unclampedTop = useTop ? anchor.top - surfaceRect.height - gap : anchor.bottom + gap;
|
|
6825
|
+
const unclampedLeft = preferEnd ? anchor.right - surfaceRect.width : anchor.left;
|
|
6865
6826
|
const shifted = clampRectToViewport2({
|
|
6866
6827
|
left: unclampedLeft,
|
|
6867
6828
|
top: unclampedTop,
|
|
6868
|
-
right: unclampedLeft +
|
|
6869
|
-
bottom: unclampedTop +
|
|
6870
|
-
width:
|
|
6871
|
-
height:
|
|
6829
|
+
right: unclampedLeft + surfaceRect.width,
|
|
6830
|
+
bottom: unclampedTop + surfaceRect.height,
|
|
6831
|
+
width: surfaceRect.width,
|
|
6832
|
+
height: surfaceRect.height
|
|
6872
6833
|
}, viewport, viewportGap);
|
|
6873
6834
|
surface.style.left = `${Math.round(unclampedLeft + shifted.x)}px`;
|
|
6874
6835
|
surface.style.top = `${Math.round(unclampedTop + shifted.y)}px`;
|
|
@@ -6925,15 +6886,29 @@ function createAnchoredSurface2(surface, options = {}) {
|
|
|
6925
6886
|
return;
|
|
6926
6887
|
}
|
|
6927
6888
|
if (!anchor) return;
|
|
6928
|
-
|
|
6929
|
-
|
|
6889
|
+
let surfaceRect;
|
|
6890
|
+
if (nativeAnchor) {
|
|
6891
|
+
positionNative();
|
|
6892
|
+
const viewport = getVisualViewportRect2(owner);
|
|
6893
|
+
surfaceRect = surface.getBoundingClientRect();
|
|
6894
|
+
const shift = clampRectToViewport2(surfaceRect, viewport, viewportGap);
|
|
6895
|
+
if (shift.x === 0 && shift.y === 0) return;
|
|
6896
|
+
}
|
|
6897
|
+
fallbackPosition2(
|
|
6898
|
+
surface,
|
|
6899
|
+
anchor.getBoundingClientRect(),
|
|
6900
|
+
placement,
|
|
6901
|
+
gap,
|
|
6902
|
+
viewportGap,
|
|
6903
|
+
surfaceRect
|
|
6904
|
+
);
|
|
6930
6905
|
};
|
|
6931
6906
|
const schedule = () => {
|
|
6932
6907
|
if (!open || frame !== null) return;
|
|
6933
6908
|
frame = owner.requestAnimationFrame(position);
|
|
6934
6909
|
};
|
|
6935
6910
|
const syncFallbackListeners = () => {
|
|
6936
|
-
const needsListeners = open && (point !== null ||
|
|
6911
|
+
const needsListeners = open && (point !== null || anchor !== null);
|
|
6937
6912
|
if (!needsListeners) {
|
|
6938
6913
|
listenerAbort?.abort();
|
|
6939
6914
|
listenerAbort = null;
|