@threadlabs/looma 0.1.22 → 0.1.23
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-NIPNHZ5W.js → chunk-GDMQKT5F.js} +63 -31
- package/dist/{chunk-SZJQ3NPX.js → chunk-TL4FIE7X.js} +4 -8
- package/dist/cjs/{index-D07f6BOw.js → index-BHG9Rpil.js} +33 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/looma.cjs.js +2 -2
- package/dist/cjs/{manager-C9j3HZay.js → manager-Ce25WRtl.js} +6 -7
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +1 -1
- package/dist/cjs/ui-avatar-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-avatar.cjs.entry.js +1 -1
- package/dist/cjs/ui-badge.cjs.entry.js +1 -1
- package/dist/cjs/ui-button.cjs.entry.js +16 -5
- package/dist/cjs/ui-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ui-combobox.cjs.entry.js +541 -0
- package/dist/cjs/ui-context-menu.cjs.entry.js +3 -3
- package/dist/cjs/ui-dialog.cjs.entry.js +3 -3
- package/dist/cjs/ui-disclosure.cjs.entry.js +2 -2
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +2 -2
- package/dist/cjs/ui-form-field.cjs.entry.js +3 -3
- package/dist/cjs/ui-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/ui-input.cjs.entry.js +11 -6
- package/dist/cjs/ui-menu-item.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/ui-radio.cjs.entry.js +3 -3
- package/dist/cjs/ui-search-result-row.cjs.entry.js +2 -2
- package/dist/cjs/ui-search-shell.cjs.entry.js +2 -2
- package/dist/cjs/ui-select.cjs.entry.js +15 -7
- package/dist/cjs/ui-switch.cjs.entry.js +3 -3
- package/dist/cjs/ui-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ui-textarea.cjs.entry.js +10 -6
- package/dist/cjs/ui-toast-region.cjs.entry.js +2 -2
- package/dist/cjs/ui-tooltip.cjs.entry.js +52 -16
- package/dist/cjs/ui-top-bar.cjs.entry.js +2 -2
- package/dist/cjs/ui-tree-item.cjs.entry.js +7 -3
- package/dist/cjs/ui-tree.cjs.entry.js +81 -9
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ui-button/ui-button.css +36 -26
- package/dist/collection/components/ui-button/ui-button.js +14 -3
- package/dist/collection/components/ui-combobox/ui-combobox.css +24 -0
- package/dist/collection/components/ui-combobox/ui-combobox.js +973 -0
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
- 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-floating-action-button/ui-floating-action-button.js +1 -1
- package/dist/collection/components/ui-form-field/ui-form-field.css +4 -0
- 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.css +8 -6
- package/dist/collection/components/ui-input/ui-input.js +11 -7
- 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.js +1 -1
- package/dist/collection/components/ui-radio/ui-radio.js +2 -2
- 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.css +8 -6
- package/dist/collection/components/ui-select/ui-select.js +17 -11
- 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.css +7 -6
- package/dist/collection/components/ui-textarea/ui-textarea.js +10 -7
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +1 -1
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +102 -15
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
- package/dist/collection/components/ui-tree/ui-tree.js +100 -8
- package/dist/collection/components/ui-tree-item/ui-tree-item.js +44 -2
- package/dist/collection/field/combobox.js +4 -0
- package/dist/collection/field/valibot.js +5 -0
- package/dist/collection/field/validation.js +62 -0
- package/dist/collection/overlay/manager.js +6 -7
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-Bh_1GxOD.js +1 -0
- package/dist/components/p-C-0syqXZ.js +1 -0
- package/dist/components/p-CaietZcq.js +1 -0
- package/dist/components/p-DHd18bK7.js +1 -0
- package/dist/components/ui-affordance-scope.js +1 -1
- package/dist/components/ui-avatar-group.js +1 -1
- package/dist/components/ui-avatar.js +1 -1
- package/dist/components/ui-badge.js +1 -1
- package/dist/components/ui-button.js +1 -1
- package/dist/components/ui-checkbox.js +1 -1
- package/dist/components/ui-combobox.d.ts +11 -0
- package/dist/components/ui-combobox.js +1 -0
- 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-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 +2 -2
- package/dist/components/ui-tree.js +1 -1
- package/dist/esm/{index-CEeiinfk.js → index-8BGiMGQ0.js} +33 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/looma.js +3 -3
- package/dist/esm/{manager-PM9a74r7.js → manager-C-0syqXZ.js} +6 -7
- package/dist/esm/ui-affordance-scope.entry.js +1 -1
- package/dist/esm/ui-avatar-group.entry.js +1 -1
- package/dist/esm/ui-avatar.entry.js +1 -1
- package/dist/esm/ui-badge.entry.js +1 -1
- package/dist/esm/ui-button.entry.js +16 -5
- package/dist/esm/ui-checkbox.entry.js +1 -1
- package/dist/esm/ui-combobox.entry.js +539 -0
- package/dist/esm/ui-context-menu.entry.js +3 -3
- package/dist/esm/ui-dialog.entry.js +3 -3
- package/dist/esm/ui-disclosure.entry.js +2 -2
- package/dist/esm/ui-floating-action-button.entry.js +2 -2
- package/dist/esm/ui-form-field.entry.js +3 -3
- package/dist/esm/ui-icon-button.entry.js +2 -2
- package/dist/esm/ui-input.entry.js +11 -6
- package/dist/esm/ui-menu-item.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/ui-radio.entry.js +3 -3
- package/dist/esm/ui-search-result-row.entry.js +2 -2
- package/dist/esm/ui-search-shell.entry.js +2 -2
- package/dist/esm/ui-select.entry.js +15 -7
- package/dist/esm/ui-switch.entry.js +3 -3
- package/dist/esm/ui-tabs.entry.js +2 -2
- package/dist/esm/ui-textarea.entry.js +10 -6
- package/dist/esm/ui-toast-region.entry.js +2 -2
- package/dist/esm/ui-tooltip.entry.js +52 -16
- package/dist/esm/ui-top-bar.entry.js +2 -2
- package/dist/esm/ui-tree-item.entry.js +7 -3
- package/dist/esm/ui-tree.entry.js +81 -9
- package/dist/index.cjs +883 -123
- package/dist/index.d.cts +104 -1
- package/dist/index.d.ts +104 -1
- package/dist/index.js +62 -8
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/{p-0198bb21.entry.js → p-13347631.entry.js} +1 -1
- package/dist/looma/p-14c081cf.entry.js +1 -0
- package/dist/looma/{p-0f45c5f0.entry.js → p-25366205.entry.js} +1 -1
- package/dist/looma/{p-a9f46811.entry.js → p-2e3aa869.entry.js} +1 -1
- package/dist/looma/p-40fe7fee.entry.js +1 -0
- package/dist/looma/p-446cda76.entry.js +1 -0
- package/dist/looma/p-4fc1b005.entry.js +13 -0
- package/dist/looma/p-582973b5.entry.js +1 -0
- package/dist/looma/{p-d273b857.entry.js → p-5a87b59d.entry.js} +1 -1
- package/dist/looma/{p-2ed7e241.entry.js → p-5da09f47.entry.js} +1 -1
- package/dist/looma/{p-7e94d90d.entry.js → p-69a5557b.entry.js} +1 -1
- package/dist/looma/p-6a8a4736.entry.js +1 -0
- package/dist/looma/{p-caa8fc7b.entry.js → p-6bf4038b.entry.js} +1 -1
- package/dist/looma/p-7e0bb7f6.entry.js +1 -0
- package/dist/looma/{p-ed5abf6d.entry.js → p-8204fee6.entry.js} +1 -1
- package/dist/looma/{p-5ba9d496.entry.js → p-8238e0dc.entry.js} +1 -1
- package/dist/looma/p-8BGiMGQ0.js +2 -0
- package/dist/looma/{p-051f578c.entry.js → p-8b8840b8.entry.js} +1 -1
- package/dist/looma/{p-1674cda4.entry.js → p-99d88efb.entry.js} +1 -1
- package/dist/looma/p-C-0syqXZ.js +1 -0
- package/dist/looma/p-a27669b1.entry.js +1 -0
- package/dist/looma/{p-11083743.entry.js → p-a6ee76b7.entry.js} +1 -1
- package/dist/looma/p-a90d2821.entry.js +1 -0
- package/dist/looma/{p-2e6f791e.entry.js → p-add36e74.entry.js} +1 -1
- package/dist/looma/{p-0584a051.entry.js → p-b6398a6b.entry.js} +1 -1
- package/dist/looma/{p-078f9fb8.entry.js → p-d50faaff.entry.js} +1 -1
- package/dist/looma/{p-b7aa4488.entry.js → p-d77278ce.entry.js} +1 -1
- package/dist/looma/p-d9ec13b7.entry.js +1 -0
- package/dist/looma/{p-1681b218.entry.js → p-ecf8005f.entry.js} +1 -1
- package/dist/looma/p-ed368426.entry.js +1 -0
- package/dist/looma/{p-063f5a89.entry.js → p-f0487ff3.entry.js} +1 -1
- package/dist/looma/p-f74e5546.entry.js +1 -0
- package/dist/types/components/ui-combobox/ui-combobox.d.ts +93 -0
- package/dist/types/components/ui-input/ui-input.d.ts +1 -1
- package/dist/types/components/ui-select/ui-select.d.ts +3 -2
- package/dist/types/components/ui-textarea/ui-textarea.d.ts +1 -1
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +18 -1
- package/dist/types/components/ui-tree/ui-tree.d.ts +9 -1
- package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +4 -0
- package/dist/types/components.d.ts +260 -28
- package/dist/types/field/combobox.d.ts +46 -0
- package/dist/types/field/valibot.d.ts +7 -0
- package/dist/types/field/validation.d.ts +56 -0
- package/dist/{ui-affordance-scope.entry-L533MECG.js → ui-affordance-scope.entry-VO4C2MZX.js} +1 -1
- package/dist/{ui-avatar-group.entry-BWS7E2CM.js → ui-avatar-group.entry-TAXJRIIU.js} +1 -1
- package/dist/{ui-avatar.entry-3INAY3XP.js → ui-avatar.entry-T6FU6ZYM.js} +1 -1
- package/dist/{ui-badge.entry-2WOBVOYP.js → ui-badge.entry-MZFYNBMJ.js} +1 -1
- package/dist/ui-button.entry-7UXMUGHN.js +80 -0
- package/dist/{ui-checkbox.entry-2PTBHSCQ.js → ui-checkbox.entry-DMZJB3RE.js} +1 -1
- package/dist/ui-combobox.entry-ZCTPXEES.js +553 -0
- package/dist/{ui-context-menu.entry-AYDDCIZS.js → ui-context-menu.entry-2WMCBGCP.js} +6 -6
- package/dist/{ui-dialog.entry-I2XI3ZTZ.js → ui-dialog.entry-WO23XOSW.js} +6 -6
- package/dist/{ui-disclosure.entry-5LY2BT7B.js → ui-disclosure.entry-USX7OUEW.js} +2 -2
- package/dist/{ui-floating-action-button.entry-EJAMR5AM.js → ui-floating-action-button.entry-MXDIN7MV.js} +2 -2
- package/dist/{ui-form-field.entry-SJ6NNFXB.js → ui-form-field.entry-7ZCMEHPY.js} +3 -3
- package/dist/{ui-icon-button.entry-7SD2LVXE.js → ui-icon-button.entry-MJUNXHBU.js} +2 -2
- package/dist/{ui-input.entry-7MM7GEQW.js → ui-input.entry-AWG63YIG.js} +8 -6
- package/dist/{ui-menu-item.entry-V3HIMR75.js → ui-menu-item.entry-HFTWG62N.js} +2 -2
- package/dist/{ui-menu.entry-R4WK5QSX.js → ui-menu.entry-IT3GW5TL.js} +7 -7
- package/dist/{ui-popover.entry-ZRJRTXA7.js → ui-popover.entry-ZQQB4N6E.js} +6 -6
- package/dist/{ui-radio-group.entry-S6RXHFSN.js → ui-radio-group.entry-V7PCTS7I.js} +2 -2
- package/dist/{ui-radio.entry-B73QZK2M.js → ui-radio.entry-JYH6TQBI.js} +3 -3
- package/dist/{ui-search-result-row.entry-DR2Y5S7P.js → ui-search-result-row.entry-JBNYXXUN.js} +2 -2
- package/dist/{ui-search-shell.entry-ST5IKJBC.js → ui-search-shell.entry-TEAWE76O.js} +2 -2
- package/dist/{ui-select.entry-7GPRFV67.js → ui-select.entry-F3A6TE2U.js} +13 -7
- package/dist/{ui-switch.entry-XQ5IRJRH.js → ui-switch.entry-MJIICMP2.js} +3 -3
- package/dist/{ui-tabs.entry-HPW5L5CY.js → ui-tabs.entry-6REFIUHV.js} +2 -2
- package/dist/{ui-textarea.entry-W2PSRYVS.js → ui-textarea.entry-OJTXCED7.js} +8 -6
- package/dist/{ui-toast-region.entry-FJUHFXKZ.js → ui-toast-region.entry-NOFXLKPS.js} +5 -5
- package/dist/{ui-tooltip.entry-G5WHQW7K.js → ui-tooltip.entry-COWTWVHX.js} +57 -21
- package/dist/{ui-top-bar.entry-3NCHFC4Y.js → ui-top-bar.entry-PIAWXJNV.js} +2 -2
- package/dist/{ui-tree-item.entry-45RR3CMP.js → ui-tree-item.entry-BSEWNL2O.js} +7 -3
- package/dist/{ui-tree.entry-SZW4Q5PY.js → ui-tree.entry-XYI3ZFAZ.js} +77 -8
- package/dist/valibot.d.ts +52 -0
- package/dist/valibot.js +7 -0
- package/package.json +11 -3
- package/styles.css +36 -20
- package/theme-high-contrast.css +12 -0
- package/tokens.css +23 -0
- package/vue/{chunk-5KWCMTXB.js → chunk-JLW23USW.js} +88 -1
- package/vue/editor/index.js +1 -1
- package/vue/index.d.ts +123 -1
- package/vue/index.js +3 -1
- package/dist/components/p-CEYIKqYc.js +0 -1
- package/dist/components/p-CIA4RyEp.js +0 -1
- package/dist/components/p-PM9a74r7.js +0 -1
- package/dist/looma/p-34417499.entry.js +0 -1
- package/dist/looma/p-4b422d40.entry.js +0 -1
- package/dist/looma/p-54722713.entry.js +0 -13
- package/dist/looma/p-54c41576.entry.js +0 -1
- package/dist/looma/p-5d4713a6.entry.js +0 -1
- package/dist/looma/p-624ba086.entry.js +0 -1
- package/dist/looma/p-8d5adb17.entry.js +0 -1
- package/dist/looma/p-9194a99d.entry.js +0 -1
- package/dist/looma/p-CEeiinfk.js +0 -2
- package/dist/looma/p-PM9a74r7.js +0 -1
- package/dist/looma/p-a33522a2.entry.js +0 -1
- package/dist/looma/p-a5127c7d.entry.js +0 -1
- package/dist/looma/p-e3f99a24.entry.js +0 -1
- package/dist/ui-button.entry-VCGSEONK.js +0 -71
package/dist/index.cjs
CHANGED
|
@@ -372,7 +372,7 @@ __export(ui_affordance_scope_entry_exports, {
|
|
|
372
372
|
var uiAffordanceScopeCss, UIAffordanceScope;
|
|
373
373
|
var init_ui_affordance_scope_entry = __esm({
|
|
374
374
|
"dist/esm/ui-affordance-scope.entry.js"() {
|
|
375
|
-
|
|
375
|
+
init_index_8BGiMGQ0();
|
|
376
376
|
init_positioning_Bu0dmLBE();
|
|
377
377
|
uiAffordanceScopeCss = () => `:host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}`;
|
|
378
378
|
UIAffordanceScope = class {
|
|
@@ -424,7 +424,7 @@ __export(ui_avatar_group_entry_exports, {
|
|
|
424
424
|
var uiAvatarGroupCss, OVERFLOW_ATTR, UIAvatarGroup;
|
|
425
425
|
var init_ui_avatar_group_entry = __esm({
|
|
426
426
|
"dist/esm/ui-avatar-group.entry.js"() {
|
|
427
|
-
|
|
427
|
+
init_index_8BGiMGQ0();
|
|
428
428
|
uiAvatarGroupCss = () => `:host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*:not([data-ui-avatar-group-overflow])){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type:not([data-ui-avatar-group-overflow])){margin-inline-end:0}.overflow{margin-inline-end:-0.5rem;display:inline-flex;align-items:center;justify-content:center;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;font-weight:600;flex-shrink:0}`;
|
|
429
429
|
OVERFLOW_ATTR = "data-ui-avatar-group-overflow";
|
|
430
430
|
UIAvatarGroup = class {
|
|
@@ -492,7 +492,7 @@ function toInitials(value) {
|
|
|
492
492
|
var uiAvatarCss, UIAvatar;
|
|
493
493
|
var init_ui_avatar_entry = __esm({
|
|
494
494
|
"dist/esm/ui-avatar.entry.js"() {
|
|
495
|
-
|
|
495
|
+
init_index_8BGiMGQ0();
|
|
496
496
|
uiAvatarCss = () => `:host{display:inline-grid;place-items:center;overflow:hidden;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.875rem;font-weight:600;text-transform:uppercase}.avatar{display:contents}.avatar img{grid-area:1 / 1;inline-size:100%;block-size:100%;object-fit:cover}.avatar .fallback{grid-area:1 / 1;display:inline-flex;align-items:center;justify-content:center;inline-size:100%;block-size:100%}`;
|
|
497
497
|
UIAvatar = class {
|
|
498
498
|
constructor(hostRef) {
|
|
@@ -537,7 +537,7 @@ __export(ui_badge_entry_exports, {
|
|
|
537
537
|
var uiBadgeCss, UIBadge;
|
|
538
538
|
var init_ui_badge_entry = __esm({
|
|
539
539
|
"dist/esm/ui-badge.entry.js"() {
|
|
540
|
-
|
|
540
|
+
init_index_8BGiMGQ0();
|
|
541
541
|
uiBadgeCss = () => `:host{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;line-height:1;padding:0.25em 0.6em;white-space:nowrap}:host([data-tone='accent']){background:var(--ui-accent-solid);border-color:var(--ui-accent-solid);color:var(--ui-text-on-accent)}:host([data-tone='danger']){background:var(--ui-danger-solid);border-color:var(--ui-danger-solid);color:var(--ui-text-on-accent)}:host([data-tone='success']){background:var(--ui-success-solid);border-color:var(--ui-success-solid);color:var(--ui-text-on-accent)}:host([data-tone='warning']){background:var(--ui-warning-solid);border-color:var(--ui-warning-solid);color:var(--ui-text-primary)}:host([data-tone='info']){background:var(--ui-info-solid);border-color:var(--ui-info-solid);color:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']){background:var(--ui-accent-soft);border-color:var(--ui-accent-soft);color:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']){background:var(--ui-danger-soft);border-color:var(--ui-danger-soft);color:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']){background:var(--ui-success-soft);border-color:var(--ui-success-soft);color:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']){background:var(--ui-warning-soft);border-color:var(--ui-warning-soft);color:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']){background:var(--ui-info-soft);border-color:var(--ui-info-soft);color:var(--ui-info-solid)}`;
|
|
542
542
|
UIBadge = class {
|
|
543
543
|
constructor(hostRef) {
|
|
@@ -580,9 +580,9 @@ __export(ui_button_entry_exports, {
|
|
|
580
580
|
var uiButtonCss, UIButton;
|
|
581
581
|
var init_ui_button_entry = __esm({
|
|
582
582
|
"dist/esm/ui-button.entry.js"() {
|
|
583
|
-
|
|
583
|
+
init_index_8BGiMGQ0();
|
|
584
584
|
init_events_JwSoedEO();
|
|
585
|
-
uiButtonCss = () => `:host{display:inline-flex;vertical-align:middle;color:var(--ui-text-primary)}:host([variant='outline'])::slotted(button),::slotted(button){appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-button-radius, var(--ui-radius-2));background:var(--ui-surface-default);color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm'])::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg'])::slotted(button){padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:var(--ui-border-strong)}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([variant='solid'])::slotted(button){border-color:var(--ui-accent-solid);background:var(--ui-accent-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-solid-shadow, inset 0 1px rgb(255 255 255 / 0.16), var(--ui-shadow-xs))}:host([variant='solid'])::slotted(button:hover:enabled){background:var(--ui-accent-hover);border-color:var(--ui-accent-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([variant='solid'])::slotted(button:active:enabled){background:var(--ui-accent-active);border-color:var(--ui-accent-active);box-shadow:none;transform:translateY(0)}:host([variant='destructive'])::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-destructive-shadow, inset 0 1px rgb(255 255 255 / 0.14), var(--ui-shadow-xs))}:host([variant='destructive'])::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([variant='destructive'])::slotted(button:active:enabled){box-shadow:none;transform:translateY(0)}:host([variant='ghost'])::slotted(button){border-color:transparent;background:transparent}:host([variant='ghost'])::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([variant='ghost'])::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}
|
|
585
|
+
uiButtonCss = () => `:host{display:inline-flex;vertical-align:middle;color:var(--ui-action-secondary-text, var(--ui-text-primary))}:host([data-variant='solid']){color:var(--ui-action-primary-text, var(--ui-text-on-accent))}:host([data-variant='outline']) ::slotted(button),::slotted(button){appearance:none;min-block-size:var(--ui-button-min-block-size, 2.5rem);border:1px solid var(--ui-control-border, var(--ui-border-default));border-radius:var(--ui-button-radius, var(--ui-radius-2));background:var(--ui-action-secondary-surface, var(--ui-surface-default));color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm']) ::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg']) ::slotted(button){min-block-size:var(--ui-control-min-block-size, 2.75rem);padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-action-secondary-surface-hover, var(--ui-surface-muted));border-color:var(--ui-control-border-hover, var(--ui-border-strong))}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([data-variant='solid']) ::slotted(button){border-color:var(--ui-action-primary-surface, var(--ui-accent-solid));background:var(--ui-action-primary-surface, var(--ui-accent-solid));color:var(--ui-action-primary-text, var(--ui-text-on-accent));box-shadow:var(--ui-button-solid-shadow, inset 0 1px rgb(255 255 255 / 0.16), var(--ui-shadow-xs))}:host([data-variant='solid']) ::slotted(button:hover:enabled){background:var(--ui-action-primary-surface-hover, var(--ui-accent-hover));border-color:var(--ui-action-primary-surface-hover, var(--ui-accent-hover));box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([data-variant='solid']) ::slotted(button:active:enabled){background:var(--ui-action-primary-surface-active, var(--ui-accent-active));border-color:var(--ui-action-primary-surface-active, var(--ui-accent-active));box-shadow:none;transform:translateY(0)}:host([data-variant='destructive']) ::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-destructive-shadow, inset 0 1px rgb(255 255 255 / 0.14), var(--ui-shadow-xs))}:host([data-variant='destructive']) ::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([data-variant='destructive']) ::slotted(button:active:enabled){box-shadow:none;transform:translateY(0)}:host([data-variant='ghost']) ::slotted(button){border-color:transparent;background:transparent}:host([data-variant='ghost']) ::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([data-variant='ghost']) ::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}:host([data-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(button:disabled){cursor:not-allowed}`;
|
|
586
586
|
UIButton = class {
|
|
587
587
|
constructor(hostRef) {
|
|
588
588
|
registerInstance(this, hostRef);
|
|
@@ -598,8 +598,17 @@ var init_ui_button_entry = __esm({
|
|
|
598
598
|
const btn = this.getButton();
|
|
599
599
|
if (!btn)
|
|
600
600
|
return;
|
|
601
|
-
|
|
602
|
-
|
|
601
|
+
if (this.size) {
|
|
602
|
+
this.host.dataset.size = this.size;
|
|
603
|
+
} else {
|
|
604
|
+
delete this.host.dataset.size;
|
|
605
|
+
}
|
|
606
|
+
if (this.disabled) {
|
|
607
|
+
this.host.dataset.disabled = "true";
|
|
608
|
+
} else {
|
|
609
|
+
delete this.host.dataset.disabled;
|
|
610
|
+
}
|
|
611
|
+
this.host.dataset.variant = this.variant;
|
|
603
612
|
btn.disabled = this.disabled;
|
|
604
613
|
}
|
|
605
614
|
componentDidLoad() {
|
|
@@ -622,7 +631,7 @@ var init_ui_button_entry = __esm({
|
|
|
622
631
|
this.host.click();
|
|
623
632
|
};
|
|
624
633
|
render() {
|
|
625
|
-
return h(Host, { key: "
|
|
634
|
+
return h(Host, { key: "9c8d479fe7f1873a447048944513648bac132d52", "data-size": this.size || void 0, "data-variant": this.variant, "data-disabled": this.disabled ? "true" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "741f48e7efd42262834992c07c4685d3e929d91c", ref: (el) => this.slotRef = el }));
|
|
626
635
|
}
|
|
627
636
|
static get watchers() {
|
|
628
637
|
return {
|
|
@@ -650,7 +659,7 @@ __export(ui_checkbox_entry_exports, {
|
|
|
650
659
|
var uiCheckboxCss, UICheckbox;
|
|
651
660
|
var init_ui_checkbox_entry = __esm({
|
|
652
661
|
"dist/esm/ui-checkbox.entry.js"() {
|
|
653
|
-
|
|
662
|
+
init_index_8BGiMGQ0();
|
|
654
663
|
init_events_JwSoedEO();
|
|
655
664
|
uiCheckboxCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='checkbox']){accent-color:var(--ui-accent-solid);width:1.125em;height:1.125em;cursor:pointer}::slotted(input[type='checkbox']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
|
|
656
665
|
UICheckbox = class {
|
|
@@ -742,7 +751,7 @@ var init_ui_checkbox_entry = __esm({
|
|
|
742
751
|
}
|
|
743
752
|
});
|
|
744
753
|
|
|
745
|
-
// dist/esm/manager-
|
|
754
|
+
// dist/esm/manager-C-0syqXZ.js
|
|
746
755
|
function syncScrollLock() {
|
|
747
756
|
if (typeof document === "undefined") {
|
|
748
757
|
return;
|
|
@@ -770,13 +779,9 @@ function handleLightDismiss(event) {
|
|
|
770
779
|
if (!top || !getOverlayDismissible(top)) {
|
|
771
780
|
return;
|
|
772
781
|
}
|
|
773
|
-
const
|
|
774
|
-
if (target instanceof Node)
|
|
775
|
-
|
|
776
|
-
return;
|
|
777
|
-
if (top.relatedElements?.some((element) => element.contains(target)))
|
|
778
|
-
return;
|
|
779
|
-
}
|
|
782
|
+
const boundary = [top.element, ...top.relatedElements ?? []];
|
|
783
|
+
if (event.composedPath().some((target) => target instanceof Node && boundary.some((element) => element.contains(target))))
|
|
784
|
+
return;
|
|
780
785
|
requestTopOverlayClose("light-dismiss", "pointer");
|
|
781
786
|
}
|
|
782
787
|
function ensureListeners() {
|
|
@@ -830,8 +835,8 @@ function requestTopOverlayClose(reason, trigger) {
|
|
|
830
835
|
return true;
|
|
831
836
|
}
|
|
832
837
|
var stack, scrollLockAttribute, modalCount, listenersAttached;
|
|
833
|
-
var
|
|
834
|
-
"dist/esm/manager-
|
|
838
|
+
var init_manager_C_0syqXZ = __esm({
|
|
839
|
+
"dist/esm/manager-C-0syqXZ.js"() {
|
|
835
840
|
stack = [];
|
|
836
841
|
scrollLockAttribute = "data-ui-scroll-lock";
|
|
837
842
|
modalCount = 0;
|
|
@@ -839,6 +844,554 @@ var init_manager_PM9a74r7 = __esm({
|
|
|
839
844
|
}
|
|
840
845
|
});
|
|
841
846
|
|
|
847
|
+
// dist/esm/ui-combobox.entry.js
|
|
848
|
+
var ui_combobox_entry_exports = {};
|
|
849
|
+
__export(ui_combobox_entry_exports, {
|
|
850
|
+
ui_combobox: () => UICombobox
|
|
851
|
+
});
|
|
852
|
+
function formatEditingValue(raw, selection, format) {
|
|
853
|
+
const unchanged = { display: raw, selection };
|
|
854
|
+
if (!format)
|
|
855
|
+
return unchanged;
|
|
856
|
+
let result;
|
|
857
|
+
try {
|
|
858
|
+
result = format(raw, selection);
|
|
859
|
+
} catch {
|
|
860
|
+
return unchanged;
|
|
861
|
+
}
|
|
862
|
+
if (!result)
|
|
863
|
+
return unchanged;
|
|
864
|
+
const characters = Array.from(raw);
|
|
865
|
+
let cursor = 0;
|
|
866
|
+
for (const character of result.display)
|
|
867
|
+
if (character === characters[cursor])
|
|
868
|
+
cursor += 1;
|
|
869
|
+
if (!Number.isInteger(result.selection.start) || !Number.isInteger(result.selection.end) || cursor !== characters.length || result.selection.start < 0 || result.selection.end < result.selection.start || result.selection.end > result.display.length)
|
|
870
|
+
return unchanged;
|
|
871
|
+
return result;
|
|
872
|
+
}
|
|
873
|
+
async function validateField(request, config) {
|
|
874
|
+
let output = request.raw;
|
|
875
|
+
let issues = [];
|
|
876
|
+
const check = () => request.signal.throwIfAborted();
|
|
877
|
+
try {
|
|
878
|
+
check();
|
|
879
|
+
if (config.parse)
|
|
880
|
+
output = await config.parse(request.raw, request);
|
|
881
|
+
check();
|
|
882
|
+
if (config.schema) {
|
|
883
|
+
const result = await config.schema["~standard"].validate(output);
|
|
884
|
+
check();
|
|
885
|
+
if (result.issues)
|
|
886
|
+
issues = result.issues;
|
|
887
|
+
else if ("value" in result)
|
|
888
|
+
output = result.value;
|
|
889
|
+
}
|
|
890
|
+
if (!issues.some((issue) => issue.severity !== "warning")) {
|
|
891
|
+
if (config.normalize)
|
|
892
|
+
output = await config.normalize(output, request);
|
|
893
|
+
check();
|
|
894
|
+
if (config.validator) {
|
|
895
|
+
const result = await config.validator(output, request);
|
|
896
|
+
check();
|
|
897
|
+
issues = [...issues, ...result.issues ?? []];
|
|
898
|
+
if ("output" in result)
|
|
899
|
+
output = result.output;
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
} catch (error) {
|
|
903
|
+
check();
|
|
904
|
+
issues = [{ message: error instanceof Error ? error.message : "Unable to validate this value." }];
|
|
905
|
+
}
|
|
906
|
+
issues = [...issues, ...config.issues ?? []];
|
|
907
|
+
return { output: issues.some((issue) => issue.severity !== "warning") ? void 0 : output, issues };
|
|
908
|
+
}
|
|
909
|
+
var uiComboboxCss, UICombobox;
|
|
910
|
+
var init_ui_combobox_entry = __esm({
|
|
911
|
+
"dist/esm/ui-combobox.entry.js"() {
|
|
912
|
+
init_index_8BGiMGQ0();
|
|
913
|
+
init_positioning_Bu0dmLBE();
|
|
914
|
+
init_manager_C_0syqXZ();
|
|
915
|
+
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}}`;
|
|
916
|
+
UICombobox = class {
|
|
917
|
+
constructor(hostRef) {
|
|
918
|
+
registerInstance(this, hostRef);
|
|
919
|
+
this.queryChange = createEvent(this, "query-change");
|
|
920
|
+
this.valueChange = createEvent(this, "value-change");
|
|
921
|
+
this.freeEntry = createEvent(this, "free-entry");
|
|
922
|
+
this.createEntry = createEvent(this, "create-entry");
|
|
923
|
+
this.dependencyInvalidate = createEvent(this, "dependency-invalidate");
|
|
924
|
+
this.validationChange = createEvent(this, "validation-change");
|
|
925
|
+
this.optionsChange = createEvent(this, "options-change");
|
|
926
|
+
}
|
|
927
|
+
get host() {
|
|
928
|
+
return getElement(this);
|
|
929
|
+
}
|
|
930
|
+
/** Accessible visible label, associated with the native text input. */
|
|
931
|
+
label = "";
|
|
932
|
+
placeholder = "";
|
|
933
|
+
name = "";
|
|
934
|
+
/** Controlled canonical value. Undefined selects uncontrolled mode; null means no selection. */
|
|
935
|
+
value;
|
|
936
|
+
defaultValue;
|
|
937
|
+
/** Controlled raw editing text; independent of canonical selection. */
|
|
938
|
+
query;
|
|
939
|
+
defaultQuery = "";
|
|
940
|
+
/** Immutable configuration; replace the object/context when dependencies change. */
|
|
941
|
+
config = {};
|
|
942
|
+
disabled = false;
|
|
943
|
+
readOnly = false;
|
|
944
|
+
required = false;
|
|
945
|
+
size = "md";
|
|
946
|
+
disclosure = false;
|
|
947
|
+
clearable = false;
|
|
948
|
+
/** Optional description shown by the connected question-mark button. */
|
|
949
|
+
help = "";
|
|
950
|
+
queryChange;
|
|
951
|
+
valueChange;
|
|
952
|
+
freeEntry;
|
|
953
|
+
createEntry;
|
|
954
|
+
dependencyInvalidate;
|
|
955
|
+
validationChange;
|
|
956
|
+
/** Supplies the current result rows for framework-owned rich slots. */
|
|
957
|
+
optionsChange;
|
|
958
|
+
raw = "";
|
|
959
|
+
display = "";
|
|
960
|
+
selected = null;
|
|
961
|
+
expanded = false;
|
|
962
|
+
rows = [];
|
|
963
|
+
active = -1;
|
|
964
|
+
loading = false;
|
|
965
|
+
helpOpen = false;
|
|
966
|
+
lookupError = "";
|
|
967
|
+
validation = { status: "pristine", touched: false, dirty: false, issues: [] };
|
|
968
|
+
input;
|
|
969
|
+
popup;
|
|
970
|
+
field;
|
|
971
|
+
surface;
|
|
972
|
+
lookup;
|
|
973
|
+
validationRun;
|
|
974
|
+
lookupTimer;
|
|
975
|
+
composing = false;
|
|
976
|
+
initialRaw = "";
|
|
977
|
+
overlayId = `ui-combobox-${Math.random().toString(36).slice(2)}`;
|
|
978
|
+
alive = false;
|
|
979
|
+
fullSet = false;
|
|
980
|
+
knownOptions = /* @__PURE__ */ new Map();
|
|
981
|
+
awaitingLabel = null;
|
|
982
|
+
proposedChange;
|
|
983
|
+
formattedRaw;
|
|
984
|
+
formattedWith;
|
|
985
|
+
componentWillLoad() {
|
|
986
|
+
this.selected = this.value !== void 0 ? this.value : this.defaultValue ?? null;
|
|
987
|
+
this.raw = this.query ?? this.defaultQuery;
|
|
988
|
+
if (this.query === void 0 && !this.raw && this.selected !== null) {
|
|
989
|
+
this.raw = this.config.options?.find((row) => row.value === this.selected)?.label ?? this.selected;
|
|
990
|
+
}
|
|
991
|
+
if (this.query === void 0 && this.selected !== null && this.raw === this.selected)
|
|
992
|
+
this.awaitingLabel = this.selected;
|
|
993
|
+
this.display = this.raw;
|
|
994
|
+
this.initialRaw = this.raw;
|
|
995
|
+
this.applyServerIssues();
|
|
996
|
+
}
|
|
997
|
+
connectedCallback() {
|
|
998
|
+
this.alive = true;
|
|
999
|
+
this.setupSurface();
|
|
1000
|
+
}
|
|
1001
|
+
componentDidLoad() {
|
|
1002
|
+
this.setupSurface();
|
|
1003
|
+
}
|
|
1004
|
+
componentDidUpdate() {
|
|
1005
|
+
if (this.input && !this.composing && this.input.value !== this.display)
|
|
1006
|
+
this.input.value = this.display;
|
|
1007
|
+
if (this.expanded)
|
|
1008
|
+
this.surface?.refresh();
|
|
1009
|
+
}
|
|
1010
|
+
disconnectedCallback() {
|
|
1011
|
+
this.alive = false;
|
|
1012
|
+
this.close();
|
|
1013
|
+
this.validationRun?.abort();
|
|
1014
|
+
this.surface?.destroy();
|
|
1015
|
+
this.surface = void 0;
|
|
1016
|
+
}
|
|
1017
|
+
setupSurface() {
|
|
1018
|
+
if (!this.surface && this.popup && this.field)
|
|
1019
|
+
this.surface = createAnchoredSurface(this.popup, { anchor: this.field, placement: "bottom-start" });
|
|
1020
|
+
}
|
|
1021
|
+
syncValue() {
|
|
1022
|
+
if (this.value === void 0)
|
|
1023
|
+
return;
|
|
1024
|
+
this.selected = this.value;
|
|
1025
|
+
if (this.query === void 0) {
|
|
1026
|
+
const proposal = this.proposedChange;
|
|
1027
|
+
const option = this.config.options?.find((row) => row.value === this.selected) ?? (this.selected === null ? void 0 : this.knownOptions.get(this.selected));
|
|
1028
|
+
const nextRaw = proposal?.value === this.selected ? proposal.query : option?.label ?? this.selected ?? "";
|
|
1029
|
+
if (proposal?.value !== this.selected || nextRaw !== this.raw) {
|
|
1030
|
+
this.raw = nextRaw;
|
|
1031
|
+
this.display = this.raw;
|
|
1032
|
+
this.formattedRaw = void 0;
|
|
1033
|
+
}
|
|
1034
|
+
this.awaitingLabel = !option && this.selected !== null ? this.selected : null;
|
|
1035
|
+
}
|
|
1036
|
+
this.resetValidation();
|
|
1037
|
+
}
|
|
1038
|
+
syncQuery() {
|
|
1039
|
+
if (this.query === void 0 || this.query === this.raw)
|
|
1040
|
+
return;
|
|
1041
|
+
if (this.value === void 0 && this.proposedChange?.query !== this.query)
|
|
1042
|
+
this.selected = null;
|
|
1043
|
+
this.awaitingLabel = null;
|
|
1044
|
+
this.formattedRaw = void 0;
|
|
1045
|
+
this.raw = this.query;
|
|
1046
|
+
this.display = this.raw;
|
|
1047
|
+
this.resetValidation();
|
|
1048
|
+
if (this.expanded)
|
|
1049
|
+
this.search("input");
|
|
1050
|
+
}
|
|
1051
|
+
syncDisabled() {
|
|
1052
|
+
if (this.disabled || this.readOnly) {
|
|
1053
|
+
this.close();
|
|
1054
|
+
this.resetValidation();
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
syncConfig(next, previous) {
|
|
1058
|
+
this.validationRun?.abort();
|
|
1059
|
+
if (next.provider !== previous?.provider || next.context !== previous?.context)
|
|
1060
|
+
this.knownOptions.clear();
|
|
1061
|
+
if (next.context !== previous?.context) {
|
|
1062
|
+
this.close();
|
|
1063
|
+
const policy = next.invalidation ?? "retain-query";
|
|
1064
|
+
const value = policy === "retain" ? this.selected : null;
|
|
1065
|
+
const query = policy === "clear" ? "" : this.raw;
|
|
1066
|
+
this.commit(value, query, null, "invalidation", "programmatic");
|
|
1067
|
+
this.validation = { status: "pristine", touched: false, dirty: this.raw !== this.initialRaw, issues: [] };
|
|
1068
|
+
}
|
|
1069
|
+
this.applyServerIssues();
|
|
1070
|
+
if (this.expanded)
|
|
1071
|
+
this.search("context");
|
|
1072
|
+
}
|
|
1073
|
+
applyServerIssues() {
|
|
1074
|
+
const issues = this.config.issues ?? [];
|
|
1075
|
+
if (issues.length)
|
|
1076
|
+
this.setValidation({ issues }, this.validation.touched);
|
|
1077
|
+
else
|
|
1078
|
+
this.resetValidation();
|
|
1079
|
+
}
|
|
1080
|
+
resetValidation() {
|
|
1081
|
+
this.validationRun?.abort();
|
|
1082
|
+
this.validation = { status: "pristine", touched: this.validation.touched, dirty: this.raw !== this.initialRaw, issues: [] };
|
|
1083
|
+
this.validationChange?.emit(this.validation);
|
|
1084
|
+
}
|
|
1085
|
+
cancelLookup() {
|
|
1086
|
+
clearTimeout(this.lookupTimer);
|
|
1087
|
+
this.lookup?.abort();
|
|
1088
|
+
this.lookup = void 0;
|
|
1089
|
+
this.loading = false;
|
|
1090
|
+
}
|
|
1091
|
+
close() {
|
|
1092
|
+
this.expanded = false;
|
|
1093
|
+
this.active = -1;
|
|
1094
|
+
this.cancelLookup();
|
|
1095
|
+
this.surface?.hide();
|
|
1096
|
+
closeOverlay(this.overlayId);
|
|
1097
|
+
}
|
|
1098
|
+
open(reason = "input") {
|
|
1099
|
+
if (this.disabled || this.readOnly)
|
|
1100
|
+
return;
|
|
1101
|
+
this.expanded = true;
|
|
1102
|
+
if (this.popup && this.field)
|
|
1103
|
+
this.popup.style.minWidth = `${this.field.getBoundingClientRect().width}px`;
|
|
1104
|
+
this.surface?.show();
|
|
1105
|
+
openOverlay({
|
|
1106
|
+
id: this.overlayId,
|
|
1107
|
+
element: this.popup,
|
|
1108
|
+
relatedElements: [this.host],
|
|
1109
|
+
modal: false,
|
|
1110
|
+
requestClose: () => this.close()
|
|
1111
|
+
});
|
|
1112
|
+
this.search(reason);
|
|
1113
|
+
}
|
|
1114
|
+
search(reason) {
|
|
1115
|
+
this.cancelLookup();
|
|
1116
|
+
this.fullSet = reason === "disclosure";
|
|
1117
|
+
this.active = -1;
|
|
1118
|
+
this.lookupError = "";
|
|
1119
|
+
const config = this.config;
|
|
1120
|
+
const query = this.fullSet ? "" : this.raw;
|
|
1121
|
+
const controller = new AbortController();
|
|
1122
|
+
this.lookup = controller;
|
|
1123
|
+
const apply = (options) => {
|
|
1124
|
+
if (controller.signal.aborted || !this.alive)
|
|
1125
|
+
return;
|
|
1126
|
+
for (const option of options)
|
|
1127
|
+
this.knownOptions.set(option.value, option);
|
|
1128
|
+
const selectedOption = this.selected === null ? void 0 : this.knownOptions.get(this.selected);
|
|
1129
|
+
if (this.query === void 0 && this.awaitingLabel === this.selected && selectedOption) {
|
|
1130
|
+
this.raw = selectedOption.label;
|
|
1131
|
+
this.display = this.raw;
|
|
1132
|
+
this.awaitingLabel = null;
|
|
1133
|
+
this.formattedRaw = void 0;
|
|
1134
|
+
this.resetValidation();
|
|
1135
|
+
}
|
|
1136
|
+
const ids = /* @__PURE__ */ new Set();
|
|
1137
|
+
this.rows = options.filter((option) => {
|
|
1138
|
+
if (ids.has(option.id))
|
|
1139
|
+
return false;
|
|
1140
|
+
ids.add(option.id);
|
|
1141
|
+
return this.fullSet || (config.filter ? config.filter(option, query, config.context) : config.provider ? true : option.label.toLocaleLowerCase().includes(query.toLocaleLowerCase()));
|
|
1142
|
+
});
|
|
1143
|
+
const groups = /* @__PURE__ */ new Map();
|
|
1144
|
+
for (const row of this.rows) {
|
|
1145
|
+
const group = row.group ?? "";
|
|
1146
|
+
if (!groups.has(group))
|
|
1147
|
+
groups.set(group, []);
|
|
1148
|
+
groups.get(group).push(row);
|
|
1149
|
+
}
|
|
1150
|
+
this.rows = [...groups.values()].flat();
|
|
1151
|
+
this.loading = false;
|
|
1152
|
+
this.optionsChange.emit(this.rows);
|
|
1153
|
+
};
|
|
1154
|
+
if (!config.provider) {
|
|
1155
|
+
apply(config.options ?? []);
|
|
1156
|
+
return;
|
|
1157
|
+
}
|
|
1158
|
+
this.rows = [];
|
|
1159
|
+
this.loading = true;
|
|
1160
|
+
this.lookupTimer = setTimeout(async () => {
|
|
1161
|
+
try {
|
|
1162
|
+
apply(await config.provider({ query, context: config.context, signal: controller.signal, reason }));
|
|
1163
|
+
} catch (error) {
|
|
1164
|
+
if (controller.signal.aborted || !this.alive)
|
|
1165
|
+
return;
|
|
1166
|
+
this.loading = false;
|
|
1167
|
+
this.lookupError = error instanceof Error ? error.message : "Unable to load suggestions.";
|
|
1168
|
+
}
|
|
1169
|
+
}, reason === "disclosure" ? 0 : Math.max(0, config.debounce ?? 200));
|
|
1170
|
+
}
|
|
1171
|
+
get canCreate() {
|
|
1172
|
+
return Boolean(this.config.allowCreate && this.raw.trim() && !this.loading && !this.lookupError && !this.rows.some((row) => row.label.toLocaleLowerCase() === this.raw.toLocaleLowerCase()));
|
|
1173
|
+
}
|
|
1174
|
+
format(timing) {
|
|
1175
|
+
if ((this.config.formatOn ?? "blur") !== timing || !this.input)
|
|
1176
|
+
return;
|
|
1177
|
+
if (this.formattedRaw === this.raw && this.formattedWith === this.config.format)
|
|
1178
|
+
return;
|
|
1179
|
+
const result = formatEditingValue(this.raw, {
|
|
1180
|
+
start: this.input.selectionStart ?? this.raw.length,
|
|
1181
|
+
end: this.input.selectionEnd ?? this.raw.length,
|
|
1182
|
+
direction: this.input.selectionDirection ?? "none"
|
|
1183
|
+
}, this.config.format);
|
|
1184
|
+
this.formattedRaw = this.raw;
|
|
1185
|
+
this.formattedWith = this.config.format;
|
|
1186
|
+
this.display = result.display;
|
|
1187
|
+
if (this.input.value !== result.display) {
|
|
1188
|
+
this.input.value = result.display;
|
|
1189
|
+
this.input.setSelectionRange(result.selection.start, result.selection.end, result.selection.direction);
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
onInput = (event) => {
|
|
1193
|
+
if (this.composing || event.isComposing)
|
|
1194
|
+
return;
|
|
1195
|
+
this.awaitingLabel = null;
|
|
1196
|
+
this.formattedRaw = void 0;
|
|
1197
|
+
this.raw = this.input.value;
|
|
1198
|
+
this.display = this.raw;
|
|
1199
|
+
this.resetValidation();
|
|
1200
|
+
this.format("input");
|
|
1201
|
+
this.queryChange.emit({ query: this.raw, display: this.display, trigger: "keyboard" });
|
|
1202
|
+
if (this.selected !== null)
|
|
1203
|
+
this.commit(null, this.raw, null, "clear", "keyboard");
|
|
1204
|
+
this.open();
|
|
1205
|
+
if (this.config.validateOn === "input")
|
|
1206
|
+
void this.validate();
|
|
1207
|
+
queueMicrotask(() => {
|
|
1208
|
+
if (this.query !== void 0 && this.query !== this.raw)
|
|
1209
|
+
this.syncQuery();
|
|
1210
|
+
});
|
|
1211
|
+
};
|
|
1212
|
+
commit(value, query, option, kind, trigger) {
|
|
1213
|
+
this.awaitingLabel = null;
|
|
1214
|
+
const queryChanged = query !== this.raw;
|
|
1215
|
+
if (this.value === void 0)
|
|
1216
|
+
this.selected = value;
|
|
1217
|
+
if (this.query === void 0 && queryChanged) {
|
|
1218
|
+
this.raw = query;
|
|
1219
|
+
this.display = query;
|
|
1220
|
+
this.formattedRaw = void 0;
|
|
1221
|
+
}
|
|
1222
|
+
this.resetValidation();
|
|
1223
|
+
const detail = { value, query, option, kind, trigger };
|
|
1224
|
+
const proposal = { value, query };
|
|
1225
|
+
this.proposedChange = proposal;
|
|
1226
|
+
this.valueChange.emit(detail);
|
|
1227
|
+
if (queryChanged)
|
|
1228
|
+
this.queryChange.emit({ query, display: query, trigger });
|
|
1229
|
+
if (kind === "create")
|
|
1230
|
+
this.createEntry.emit(detail);
|
|
1231
|
+
if (kind === "free-entry")
|
|
1232
|
+
this.freeEntry.emit(detail);
|
|
1233
|
+
if (kind === "invalidation")
|
|
1234
|
+
this.dependencyInvalidate.emit(detail);
|
|
1235
|
+
queueMicrotask(() => {
|
|
1236
|
+
if (this.proposedChange !== proposal)
|
|
1237
|
+
return;
|
|
1238
|
+
if (this.value !== void 0 && this.value !== proposal.value)
|
|
1239
|
+
this.syncValue();
|
|
1240
|
+
if (this.query !== void 0 && this.query !== proposal.query) {
|
|
1241
|
+
if (this.value === void 0) {
|
|
1242
|
+
this.selected = null;
|
|
1243
|
+
this.resetValidation();
|
|
1244
|
+
}
|
|
1245
|
+
this.syncQuery();
|
|
1246
|
+
}
|
|
1247
|
+
this.proposedChange = void 0;
|
|
1248
|
+
});
|
|
1249
|
+
}
|
|
1250
|
+
choose(index, trigger) {
|
|
1251
|
+
const option = this.rows[index];
|
|
1252
|
+
if (option?.disabled)
|
|
1253
|
+
return;
|
|
1254
|
+
if (option)
|
|
1255
|
+
this.commit(option.value, option.label, option, "selection", trigger);
|
|
1256
|
+
else if (this.canCreate && index === this.rows.length)
|
|
1257
|
+
this.commit(null, this.raw, null, "create", trigger);
|
|
1258
|
+
else
|
|
1259
|
+
return;
|
|
1260
|
+
this.close();
|
|
1261
|
+
this.input?.focus();
|
|
1262
|
+
if (this.config.validateOn !== "submit")
|
|
1263
|
+
queueMicrotask(() => void this.validate());
|
|
1264
|
+
}
|
|
1265
|
+
move(key) {
|
|
1266
|
+
const indices = this.rows.flatMap((row, index) => row.disabled ? [] : [index]);
|
|
1267
|
+
if (this.canCreate)
|
|
1268
|
+
indices.push(this.rows.length);
|
|
1269
|
+
if (!indices.length)
|
|
1270
|
+
return;
|
|
1271
|
+
const current = indices.indexOf(this.active);
|
|
1272
|
+
const next = key === "Home" ? 0 : key === "End" ? indices.length - 1 : key === "ArrowDown" ? Math.min(current + 1, indices.length - 1) : current < 0 ? indices.length - 1 : Math.max(0, current - 1);
|
|
1273
|
+
this.active = indices[next];
|
|
1274
|
+
requestAnimationFrame(() => this.host.shadowRoot?.getElementById(`option-${this.active}`)?.scrollIntoView({ block: "nearest" }));
|
|
1275
|
+
}
|
|
1276
|
+
onKeydown = (event) => {
|
|
1277
|
+
if (this.composing || event.isComposing || this.disabled || this.readOnly)
|
|
1278
|
+
return;
|
|
1279
|
+
if (event.key === "Escape" && this.expanded) {
|
|
1280
|
+
event.preventDefault();
|
|
1281
|
+
event.stopPropagation();
|
|
1282
|
+
this.close();
|
|
1283
|
+
return;
|
|
1284
|
+
}
|
|
1285
|
+
if (event.key === "Tab") {
|
|
1286
|
+
this.close();
|
|
1287
|
+
return;
|
|
1288
|
+
}
|
|
1289
|
+
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
|
|
1290
|
+
return;
|
|
1291
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
1292
|
+
event.preventDefault();
|
|
1293
|
+
if (!this.expanded)
|
|
1294
|
+
this.open("disclosure");
|
|
1295
|
+
this.move(event.key);
|
|
1296
|
+
} else if ((event.key === "Home" || event.key === "End") && this.expanded && this.active >= 0) {
|
|
1297
|
+
event.preventDefault();
|
|
1298
|
+
this.move(event.key);
|
|
1299
|
+
} else if (event.key === "Enter" && this.expanded) {
|
|
1300
|
+
if (this.active >= 0) {
|
|
1301
|
+
event.preventDefault();
|
|
1302
|
+
this.choose(this.active, "keyboard");
|
|
1303
|
+
} else if (this.config.allowFreeText) {
|
|
1304
|
+
event.preventDefault();
|
|
1305
|
+
this.commit(null, this.raw, null, "free-entry", "keyboard");
|
|
1306
|
+
this.close();
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
};
|
|
1310
|
+
onFocusOut = (event) => {
|
|
1311
|
+
if (event.relatedTarget instanceof Node && this.host.shadowRoot?.contains(event.relatedTarget))
|
|
1312
|
+
return;
|
|
1313
|
+
this.close();
|
|
1314
|
+
this.format("blur");
|
|
1315
|
+
this.validation = { ...this.validation, touched: true };
|
|
1316
|
+
if (this.config.allowFreeText && this.selected === null)
|
|
1317
|
+
this.commit(null, this.raw, null, "free-entry", "keyboard");
|
|
1318
|
+
if ((this.config.validateOn ?? "blur") === "blur")
|
|
1319
|
+
void this.validate();
|
|
1320
|
+
};
|
|
1321
|
+
setValidation(result, touched = this.validation.touched) {
|
|
1322
|
+
const blocking = result.issues.some((issue) => issue.severity !== "warning");
|
|
1323
|
+
this.validation = {
|
|
1324
|
+
status: blocking ? "error" : result.issues.length ? "warning" : "valid",
|
|
1325
|
+
touched,
|
|
1326
|
+
dirty: this.raw !== this.initialRaw,
|
|
1327
|
+
...result
|
|
1328
|
+
};
|
|
1329
|
+
this.validationChange?.emit(this.validation);
|
|
1330
|
+
}
|
|
1331
|
+
/** Validate for submission. Caller submits only non-pending, non-error output. */
|
|
1332
|
+
async validate() {
|
|
1333
|
+
this.validationRun?.abort();
|
|
1334
|
+
const run = new AbortController();
|
|
1335
|
+
this.validationRun = run;
|
|
1336
|
+
this.validation = { ...this.validation, status: "pending", output: void 0 };
|
|
1337
|
+
this.validationChange.emit(this.validation);
|
|
1338
|
+
try {
|
|
1339
|
+
const result = await validateField({ raw: this.raw, value: this.selected, context: this.config.context, signal: run.signal }, this.config);
|
|
1340
|
+
if (this.required && !this.raw.trim())
|
|
1341
|
+
result.issues = [...result.issues, { message: "A value is required." }];
|
|
1342
|
+
else if (this.raw && this.selected === null && !this.config.allowFreeText && !this.config.allowCreate)
|
|
1343
|
+
result.issues = [...result.issues, { message: "Choose a suggestion." }];
|
|
1344
|
+
if (result.issues.some((issue) => issue.severity !== "warning"))
|
|
1345
|
+
result.output = void 0;
|
|
1346
|
+
if (!run.signal.aborted && this.alive)
|
|
1347
|
+
this.setValidation(result);
|
|
1348
|
+
} catch {
|
|
1349
|
+
}
|
|
1350
|
+
return this.validation;
|
|
1351
|
+
}
|
|
1352
|
+
render() {
|
|
1353
|
+
const description = [this.helpOpen ? "help-text" : "", this.validation.issues.length ? "validation" : ""].filter(Boolean).join(" ") || void 0;
|
|
1354
|
+
const status = this.loading ? "Loading suggestions\u2026" : this.lookupError || (this.expanded ? `${this.rows.length} suggestions available.` : "");
|
|
1355
|
+
const groups = [...new Set(this.rows.map((row) => row.group ?? ""))];
|
|
1356
|
+
return h(Host, { key: "2378bfd8473852642fef21898f4a756eb3b092ba", "data-size": this.size, "data-validation": this.validation.status, onFocusout: this.onFocusOut }, h("label", { key: "7aba65aeb336d490ddeaf5db9bba9db8ab8b9dbb", htmlFor: "input", part: "label" }, this.label, this.required ? " *" : ""), h("div", { key: "ee87156259d0fe1e2e56c4b36667e8daf5e1e2c1", class: "field", part: "field", ref: (element) => this.field = element }, h("input", { key: "35c5b85ff9a4bcba9bddaf85ff1f118a94aa077b", 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: () => {
|
|
1357
|
+
this.composing = false;
|
|
1358
|
+
this.onInput(new InputEvent("input"));
|
|
1359
|
+
} }), this.clearable && h("button", { key: "74e4f44836b751ab5e9f794a39b480602e0c106d", type: "button", part: "affordance", "aria-label": `Clear ${this.label}`, disabled: this.disabled || this.readOnly, onClick: () => {
|
|
1360
|
+
this.commit(null, "", null, "clear", "pointer");
|
|
1361
|
+
this.close();
|
|
1362
|
+
this.input?.focus();
|
|
1363
|
+
} }, "\xD7"), this.help && h("button", { key: "c870ced139fb22baa50a1795ab78f14c38647d34", id: "help", type: "button", part: "affordance", "aria-label": `Help for ${this.label}`, disabled: this.disabled }, h("span", { key: "ba3dc5128c1941b21b53a5ba78a27017b3df5ec8", "aria-hidden": "true" }, "?")), this.disclosure && h("button", { key: "eced588e3fa7958dd6185173faaef01219c30243", type: "button", part: "affordance", "aria-label": `Suggestions for ${this.label}`, "aria-controls": "listbox", "aria-expanded": String(this.expanded), disabled: this.disabled || this.readOnly, onClick: () => {
|
|
1364
|
+
if (this.expanded)
|
|
1365
|
+
this.close();
|
|
1366
|
+
else
|
|
1367
|
+
this.open("disclosure");
|
|
1368
|
+
this.input?.focus();
|
|
1369
|
+
} }, h("span", { key: "7cb9f7f2bb15246dcdd2348ea0ca656d1d0c8c33", "aria-hidden": "true" }, "\u2304"))), this.help && h("ui-tooltip", { key: "b1b5d42ca457f9b951758bb5e816c8dbbcd1087d", id: "help-text", for: "help", toggleOnClick: true, onOpen: () => this.helpOpen = true, onClose: () => this.helpOpen = false }, this.help), h("div", { key: "9eca2df66c72917e6bfda21205c2a4ef97dd91d5", class: "popup", part: "popup", hidden: !this.expanded, ref: (element) => this.popup = element }, h("div", { key: "641e1f137c9cfef5d08ec99f6178e59487a20bf1", 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: "38a3aa6b2ffae30e6f81e1f89d10c9966dd31b10", 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: "dd3e895ef363f6d30a0c25e4b5092a8feacc63e5", 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("div", { key: "9cf12a8fde7d9cfb9e2d2a77669ac4708c7fded6", id: "validation", class: "message", part: "validation", hidden: !this.validation.issues.length }, this.validation.issues.map((issue) => h("div", null, issue.message))), h("div", { key: "1c7b1d3f658e500cbf5f5004a76a39511cc79c49", 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(" ")));
|
|
1370
|
+
}
|
|
1371
|
+
static get watchers() {
|
|
1372
|
+
return {
|
|
1373
|
+
"value": [{
|
|
1374
|
+
"syncValue": 0
|
|
1375
|
+
}],
|
|
1376
|
+
"query": [{
|
|
1377
|
+
"syncQuery": 0
|
|
1378
|
+
}],
|
|
1379
|
+
"disabled": [{
|
|
1380
|
+
"syncDisabled": 0
|
|
1381
|
+
}],
|
|
1382
|
+
"readOnly": [{
|
|
1383
|
+
"syncDisabled": 0
|
|
1384
|
+
}],
|
|
1385
|
+
"config": [{
|
|
1386
|
+
"syncConfig": 0
|
|
1387
|
+
}]
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
};
|
|
1391
|
+
UICombobox.style = uiComboboxCss();
|
|
1392
|
+
}
|
|
1393
|
+
});
|
|
1394
|
+
|
|
842
1395
|
// dist/esm/ui-context-menu.entry.js
|
|
843
1396
|
var ui_context_menu_entry_exports = {};
|
|
844
1397
|
__export(ui_context_menu_entry_exports, {
|
|
@@ -847,8 +1400,8 @@ __export(ui_context_menu_entry_exports, {
|
|
|
847
1400
|
var uiContextMenuCss, UIContextMenu;
|
|
848
1401
|
var init_ui_context_menu_entry = __esm({
|
|
849
1402
|
"dist/esm/ui-context-menu.entry.js"() {
|
|
850
|
-
|
|
851
|
-
|
|
1403
|
+
init_index_8BGiMGQ0();
|
|
1404
|
+
init_manager_C_0syqXZ();
|
|
852
1405
|
init_events_JwSoedEO();
|
|
853
1406
|
init_positioning_Bu0dmLBE();
|
|
854
1407
|
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}}`;
|
|
@@ -1060,7 +1613,7 @@ var init_ui_context_menu_entry = __esm({
|
|
|
1060
1613
|
this.closeMenu("action", "pointer");
|
|
1061
1614
|
};
|
|
1062
1615
|
render() {
|
|
1063
|
-
return h(Host, { key: "
|
|
1616
|
+
return h(Host, { key: "641dd3aba6120cf4187f4503c64029eaf307dc4f", "data-open": this.internalOpen ? "" : void 0, "data-focus-trigger": this.internalOpen ? this.focusTrigger : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "3f550349f9537b951b50a8c291f1951dd5a3b723", name: "trigger" }), h("div", { key: "a612523f054986122638722340d8135c44a85399", class: "menu", "data-open": this.internalOpen ? "" : void 0 }, h("ui-menu", { key: "0711879d09900183e938d8942abb8b9032812a5f", open: this.internalOpen }, h("slot", { key: "8e088dd20a48d8fb81126f2dd020abb886e86e22" }))));
|
|
1064
1617
|
}
|
|
1065
1618
|
static get watchers() {
|
|
1066
1619
|
return {
|
|
@@ -1088,8 +1641,8 @@ __export(ui_dialog_entry_exports, {
|
|
|
1088
1641
|
var uiDialogCss, UIDialog;
|
|
1089
1642
|
var init_ui_dialog_entry = __esm({
|
|
1090
1643
|
"dist/esm/ui-dialog.entry.js"() {
|
|
1091
|
-
|
|
1092
|
-
|
|
1644
|
+
init_index_8BGiMGQ0();
|
|
1645
|
+
init_manager_C_0syqXZ();
|
|
1093
1646
|
init_events_JwSoedEO();
|
|
1094
1647
|
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}}`;
|
|
1095
1648
|
UIDialog = class {
|
|
@@ -1166,7 +1719,7 @@ var init_ui_dialog_entry = __esm({
|
|
|
1166
1719
|
}
|
|
1167
1720
|
};
|
|
1168
1721
|
render() {
|
|
1169
|
-
return h(Host, { key: "
|
|
1722
|
+
return h(Host, { key: "6e88afd3a595ab0eed3d82a046ffb15e1e167cdb", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("dialog", { key: "420e4d8de66245a5818a1284adb23a536ebcd907", ref: (el) => this.dialogRef = el, open: this.internalOpen, "aria-label": this.label }, h("slot", { key: "10604688504f013f79b7a6ed5f9ed36bc9c6b48b" })));
|
|
1170
1723
|
}
|
|
1171
1724
|
static get watchers() {
|
|
1172
1725
|
return {
|
|
@@ -1203,7 +1756,7 @@ __export(ui_disclosure_entry_exports, {
|
|
|
1203
1756
|
var uiDisclosureCss, UIDisclosure;
|
|
1204
1757
|
var init_ui_disclosure_entry = __esm({
|
|
1205
1758
|
"dist/esm/ui-disclosure.entry.js"() {
|
|
1206
|
-
|
|
1759
|
+
init_index_8BGiMGQ0();
|
|
1207
1760
|
init_id_hgBUJRDa();
|
|
1208
1761
|
init_events_JwSoedEO();
|
|
1209
1762
|
uiDisclosureCss = () => `:host{display:block}::slotted([hidden]){display:none !important}`;
|
|
@@ -1293,7 +1846,7 @@ var init_ui_disclosure_entry = __esm({
|
|
|
1293
1846
|
this.setOpen(!this.internalOpen, { reason: "action", trigger: "keyboard" });
|
|
1294
1847
|
};
|
|
1295
1848
|
render() {
|
|
1296
|
-
return h(Host, { key: "
|
|
1849
|
+
return h(Host, { key: "3905d2d78a2d3d4ef36b582ba0f426be8e5e0f5e" }, h("slot", { key: "18547ff56457b73319264bba981f994fb947dffb" }));
|
|
1297
1850
|
}
|
|
1298
1851
|
static get watchers() {
|
|
1299
1852
|
return {
|
|
@@ -1318,7 +1871,7 @@ __export(ui_floating_action_button_entry_exports, {
|
|
|
1318
1871
|
var uiFloatingActionButtonCss, UIFloatingActionButton;
|
|
1319
1872
|
var init_ui_floating_action_button_entry = __esm({
|
|
1320
1873
|
"dist/esm/ui-floating-action-button.entry.js"() {
|
|
1321
|
-
|
|
1874
|
+
init_index_8BGiMGQ0();
|
|
1322
1875
|
uiFloatingActionButtonCss = () => `:host{position:fixed;inset-block-end:calc( var(--ui-floating-action-button-bottom, var(--ui-space-6, 1.5rem)) + env(safe-area-inset-bottom) );inset-inline-end:max( var(--ui-floating-action-button-inline-end, var(--ui-space-5, 1.25rem)), env(safe-area-inset-right) );inline-size:var(--ui-floating-action-button-size, 56px);block-size:var(--ui-floating-action-button-size, 56px);display:inline-flex;z-index:var(--ui-floating-action-button-z-index, 100)}button{appearance:none;inline-size:100%;block-size:100%;border:none;border-radius:999px;margin:0;padding:0;display:inline-flex;align-items:center;justify-content:center;background:var(--ui-floating-action-button-bg, var(--ui-accent-solid));color:var(--ui-floating-action-button-color, var(--ui-text-on-accent));box-shadow:var( --ui-floating-action-button-shadow, 0 4px 12px color-mix(in srgb, var(--ui-accent-solid) 40%, transparent) );cursor:pointer;transition:background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease), transform var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease), box-shadow var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease)}button:hover:enabled{background:var(--ui-floating-action-button-hover-bg, var(--ui-accent-hover));box-shadow:var( --ui-floating-action-button-hover-shadow, 0 6px 16px color-mix(in srgb, var(--ui-accent-solid) 50%, transparent) )}button:active:enabled{transform:scale(var(--ui-floating-action-button-active-scale, 0.94))}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:2px}button:disabled,:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(svg){inline-size:var(--ui-floating-action-button-icon-size, 24px);block-size:var(--ui-floating-action-button-icon-size, 24px);flex-shrink:0}@media (min-width: 768px){:host([mobile-only]){display:none}}`;
|
|
1323
1876
|
UIFloatingActionButton = class {
|
|
1324
1877
|
constructor(hostRef) {
|
|
@@ -1328,7 +1881,7 @@ var init_ui_floating_action_button_entry = __esm({
|
|
|
1328
1881
|
mobileOnly = false;
|
|
1329
1882
|
label = "";
|
|
1330
1883
|
render() {
|
|
1331
|
-
return h(Host, { key: "
|
|
1884
|
+
return h(Host, { key: "c9a7d8c9b6d6608566b21621a73d939f372c830d", "data-disabled": this.disabled ? "" : void 0 }, h("button", { key: "8eddccaf6be2f028bc02df967038843120045b84", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "0ea12efb9cb8ecec06238066827a734fb3b01e1e" })));
|
|
1332
1885
|
}
|
|
1333
1886
|
};
|
|
1334
1887
|
UIFloatingActionButton.style = uiFloatingActionButtonCss();
|
|
@@ -1343,9 +1896,9 @@ __export(ui_form_field_entry_exports, {
|
|
|
1343
1896
|
var uiFormFieldCss, UIFormField;
|
|
1344
1897
|
var init_ui_form_field_entry = __esm({
|
|
1345
1898
|
"dist/esm/ui-form-field.entry.js"() {
|
|
1346
|
-
|
|
1899
|
+
init_index_8BGiMGQ0();
|
|
1347
1900
|
init_id_hgBUJRDa();
|
|
1348
|
-
uiFormFieldCss = () => `:host{display:grid;gap:var(--ui-space-2);color:var(--ui-text-primary)}::slotted(label){color:var(--ui-text-secondary);font-size:0.95rem}::slotted([data-slot='help']){color:var(--ui-text-muted);font-size:0.875rem}::slotted([data-slot='error']),::slotted([role='alert']){color:var(--ui-accent-active);font-size:0.875rem}`;
|
|
1901
|
+
uiFormFieldCss = () => `:host{display:grid;gap:var(--ui-space-2);min-inline-size:0;align-content:start;color:var(--ui-text-primary)}::slotted(label){color:var(--ui-text-secondary);font-size:0.95rem}::slotted([data-slot='help']){min-block-size:var(--ui-form-field-help-min-block-size, 0);color:var(--ui-text-muted);font-size:0.875rem;line-height:var(--ui-line-height-md)}::slotted([data-slot='error']),::slotted([role='alert']){color:var(--ui-accent-active);font-size:0.875rem}`;
|
|
1349
1902
|
UIFormField = class {
|
|
1350
1903
|
constructor(hostRef) {
|
|
1351
1904
|
registerInstance(this, hostRef);
|
|
@@ -1394,7 +1947,7 @@ var init_ui_form_field_entry = __esm({
|
|
|
1394
1947
|
input.setAttribute("aria-invalid", this.invalid ? "true" : "false");
|
|
1395
1948
|
}
|
|
1396
1949
|
render() {
|
|
1397
|
-
return h(Host, { key: "
|
|
1950
|
+
return h(Host, { key: "cdd06c6b16ac56f3547e64e7888d8766243392db", "data-invalid": this.invalid ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-required": this.required ? "" : void 0 }, h("slot", { key: "7d545673a3485f8beee01b13ab56185b98ba8856" }));
|
|
1398
1951
|
}
|
|
1399
1952
|
};
|
|
1400
1953
|
UIFormField.style = uiFormFieldCss();
|
|
@@ -1409,7 +1962,7 @@ __export(ui_icon_button_entry_exports, {
|
|
|
1409
1962
|
var uiIconButtonCss, UIIconButton;
|
|
1410
1963
|
var init_ui_icon_button_entry = __esm({
|
|
1411
1964
|
"dist/esm/ui-icon-button.entry.js"() {
|
|
1412
|
-
|
|
1965
|
+
init_index_8BGiMGQ0();
|
|
1413
1966
|
uiIconButtonCss = () => `:host{display:inline-flex;color:var(--ui-text-secondary)}:host([anticipatory]){position:relative}:host([anticipatory])::before{content:'';position:absolute;inset:50% auto auto 50%;z-index:1;inline-size:var(--ui-affordance-guide-size, 0.25rem);block-size:var(--ui-affordance-guide-size, 0.25rem);border-radius:var(--ui-radius-round, 999px);background:var(--ui-affordance-guide-color, var(--ui-border-strong));opacity:var(--ui-affordance-guide-opacity, 0.42);transform:translate(-50%, -50%);transition:opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);pointer-events:none}:host([anticipatory]) button{opacity:0;transform:scale(0.72);pointer-events:none}:host([anticipatory][data-ui-proximity='near'])::before,:host([anticipatory]:focus-within)::before,:host([anticipatory]:hover)::before,:host([anticipatory][variant='solid'])::before{opacity:0}:host([anticipatory][data-ui-proximity='near']) button,:host([anticipatory]:focus-within) button,:host([anticipatory]:hover) button,:host([anticipatory][variant='solid']) button{opacity:1;transform:scale(1);pointer-events:auto}button{appearance:none;inline-size:var(--ui-icon-button-size, 2.5rem);block-size:var(--ui-icon-button-size, 2.5rem);min-inline-size:var(--ui-icon-button-size, 2.5rem);min-block-size:var(--ui-icon-button-size, 2.5rem);padding:0;margin:0;border:1px solid transparent;border-radius:var(--ui-icon-button-radius, var(--ui-radius-2));background:var(--ui-icon-button-bg, transparent);color:inherit;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease)}@media (hover: none), (pointer: coarse){:host([anticipatory])::before{opacity:0}:host([anticipatory]) button{opacity:1;transform:none;pointer-events:auto}}:host([size='sm']) button{inline-size:var(--ui-icon-button-size-sm, 2rem);block-size:var(--ui-icon-button-size-sm, 2rem);min-inline-size:var(--ui-icon-button-size-sm, 2rem);min-block-size:var(--ui-icon-button-size-sm, 2rem)}:host([size='lg']) button{inline-size:var(--ui-icon-button-size-lg, 2.75rem);block-size:var(--ui-icon-button-size-lg, 2.75rem);min-inline-size:var(--ui-icon-button-size-lg, 2.75rem);min-block-size:var(--ui-icon-button-size-lg, 2.75rem)}:host([variant='outline']) button{border-color:var(--ui-icon-button-border, var(--ui-border-default));background:var(--ui-icon-button-outline-bg, var(--ui-surface-default));color:var(--ui-icon-button-outline-color, var(--ui-text-primary))}:host([variant='solid']) button{background:var(--ui-icon-button-solid-bg, var(--ui-accent-solid));color:var(--ui-icon-button-solid-color, var(--ui-text-on-accent));box-shadow:var( --ui-icon-button-solid-shadow, 0 1px 2px color-mix(in srgb, var(--ui-accent-solid) 18%, transparent) )}button:hover:enabled{background:var(--ui-icon-button-hover-bg, var(--ui-surface-muted));color:var(--ui-icon-button-hover-color, var(--ui-text-primary))}:host([variant='outline']) button:hover:enabled{border-color:var(--ui-icon-button-hover-border, var(--ui-border-strong))}:host([variant='solid']) button:hover:enabled{background:var(--ui-icon-button-solid-hover-bg, var(--ui-accent-hover))}button:active:enabled{transform:scale(var(--ui-icon-button-active-scale, 0.96))}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:2px}button:disabled,:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(svg){inline-size:var(--ui-icon-button-icon-size, 1.125rem);block-size:var(--ui-icon-button-icon-size, 1.125rem);flex-shrink:0;stroke-width:var(--ui-icon-button-icon-stroke-width, 1.75)}`;
|
|
1414
1967
|
UIIconButton = class {
|
|
1415
1968
|
constructor(hostRef) {
|
|
@@ -1422,7 +1975,7 @@ var init_ui_icon_button_entry = __esm({
|
|
|
1422
1975
|
/** Reveals this control through a surrounding ui-affordance-scope. */
|
|
1423
1976
|
anticipatory = false;
|
|
1424
1977
|
render() {
|
|
1425
|
-
return h(Host, { key: "
|
|
1978
|
+
return h(Host, { key: "8616d7e52a03a7a42738b11f4cabed3eb38c8640", "data-disabled": this.disabled ? "" : void 0, "data-ui-affordance": this.anticipatory ? "button" : void 0 }, h("button", { key: "fae1362a50a0d80e2fcb3ab41f63ff21cf5d939a", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "e548fc504e3b26e85263fe3fc8faac0887fee16b" })));
|
|
1426
1979
|
}
|
|
1427
1980
|
};
|
|
1428
1981
|
UIIconButton.style = uiIconButtonCss();
|
|
@@ -1437,9 +1990,9 @@ __export(ui_input_entry_exports, {
|
|
|
1437
1990
|
var uiInputCss, UIInput;
|
|
1438
1991
|
var init_ui_input_entry = __esm({
|
|
1439
1992
|
"dist/esm/ui-input.entry.js"() {
|
|
1440
|
-
|
|
1993
|
+
init_index_8BGiMGQ0();
|
|
1441
1994
|
init_events_JwSoedEO();
|
|
1442
|
-
uiInputCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(input){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding:var(--ui-space-2) var(--ui-space-3);margin:0;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(input:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(input:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(input),::slotted(input[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(input:disabled){background:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(input:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
|
|
1995
|
+
uiInputCss = () => `:host{display:inline-flex;min-inline-size:0;color:var(--ui-text-primary)}::slotted(input){width:100%;appearance:none;min-block-size:var(--ui-control-min-block-size, 2.75rem);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));color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding:var(--ui-space-2) var(--ui-space-3);margin:0;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(input:hover:not(:focus):not(:disabled)){border-color:var(--ui-control-border-hover, var(--ui-border-strong))}::slotted(input:focus){border-color:var(--ui-control-focus, var(--ui-focus-ring));box-shadow:0 0 0 3px var(--ui-control-focus-halo, var(--ui-accent-soft))}:host([data-invalid='true'])::slotted(input),::slotted(input[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(input:disabled){background:var(--ui-control-surface-disabled, var(--ui-surface-muted));color:var(--ui-text-muted);cursor:not-allowed}::slotted(input:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
|
|
1443
1996
|
UIInput = class {
|
|
1444
1997
|
constructor(hostRef) {
|
|
1445
1998
|
registerInstance(this, hostRef);
|
|
@@ -1447,7 +2000,7 @@ var init_ui_input_entry = __esm({
|
|
|
1447
2000
|
get host() {
|
|
1448
2001
|
return getElement(this);
|
|
1449
2002
|
}
|
|
1450
|
-
value
|
|
2003
|
+
value;
|
|
1451
2004
|
defaultValue = "";
|
|
1452
2005
|
disabled = false;
|
|
1453
2006
|
invalid = false;
|
|
@@ -1455,14 +2008,16 @@ var init_ui_input_entry = __esm({
|
|
|
1455
2008
|
internalValue = "";
|
|
1456
2009
|
slotRef;
|
|
1457
2010
|
syncFromProp() {
|
|
1458
|
-
this.
|
|
2011
|
+
if (this.value !== void 0)
|
|
2012
|
+
this.internalValue = this.value;
|
|
1459
2013
|
}
|
|
1460
2014
|
syncToInput() {
|
|
1461
2015
|
const input = this.getInput();
|
|
1462
2016
|
if (!input)
|
|
1463
2017
|
return;
|
|
1464
2018
|
this.host.dataset.invalid = this.invalid ? "true" : "";
|
|
1465
|
-
|
|
2019
|
+
if (this.value !== void 0)
|
|
2020
|
+
input.value = this.internalValue;
|
|
1466
2021
|
input.defaultValue = this.defaultValue;
|
|
1467
2022
|
input.disabled = this.disabled;
|
|
1468
2023
|
input.readOnly = this.readOnly;
|
|
@@ -1510,7 +2065,7 @@ var init_ui_input_entry = __esm({
|
|
|
1510
2065
|
});
|
|
1511
2066
|
};
|
|
1512
2067
|
render() {
|
|
1513
|
-
return h(Host, { key: "
|
|
2068
|
+
return h(Host, { key: "a2f2c108144a7acae0dfb1bef6ea1f38a4dcca9c", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "04284765a12089a8a1045056d72551a3494f00fc", ref: (el) => this.slotRef = el }));
|
|
1514
2069
|
}
|
|
1515
2070
|
static get watchers() {
|
|
1516
2071
|
return {
|
|
@@ -1547,7 +2102,7 @@ __export(ui_menu_item_entry_exports, {
|
|
|
1547
2102
|
var uiMenuItemCss, UIMenuItem;
|
|
1548
2103
|
var init_ui_menu_item_entry = __esm({
|
|
1549
2104
|
"dist/esm/ui-menu-item.entry.js"() {
|
|
1550
|
-
|
|
2105
|
+
init_index_8BGiMGQ0();
|
|
1551
2106
|
uiMenuItemCss = () => `:host{display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}:host(:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}:host([aria-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}`;
|
|
1552
2107
|
UIMenuItem = class {
|
|
1553
2108
|
constructor(hostRef) {
|
|
@@ -1556,7 +2111,7 @@ var init_ui_menu_item_entry = __esm({
|
|
|
1556
2111
|
disabled = false;
|
|
1557
2112
|
value = "";
|
|
1558
2113
|
render() {
|
|
1559
|
-
return h(Host, { key: "
|
|
2114
|
+
return h(Host, { key: "ebd7c5aa5c8fdce2d2349aef7f1a4505b9190852", role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? "true" : void 0, "data-value": this.value || void 0 }, h("slot", { key: "7b55a8545034b055f8cbd047a0f16ea729af097e" }));
|
|
1560
2115
|
}
|
|
1561
2116
|
};
|
|
1562
2117
|
UIMenuItem.style = uiMenuItemCss();
|
|
@@ -1571,9 +2126,9 @@ __export(ui_menu_entry_exports, {
|
|
|
1571
2126
|
var uiMenuCss, UIMenu;
|
|
1572
2127
|
var init_ui_menu_entry = __esm({
|
|
1573
2128
|
"dist/esm/ui-menu.entry.js"() {
|
|
1574
|
-
|
|
2129
|
+
init_index_8BGiMGQ0();
|
|
1575
2130
|
init_events_JwSoedEO();
|
|
1576
|
-
|
|
2131
|
+
init_manager_C_0syqXZ();
|
|
1577
2132
|
init_positioning_Bu0dmLBE();
|
|
1578
2133
|
uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:auto;max-block-size:calc(100dvh - (var(--ui-menu-viewport-gap) * 2));opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}::slotted(ui-menu-item){display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(ui-menu-item:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}::slotted(ui-menu-item[aria-disabled='true']),::slotted(ui-menu-item[disabled]){opacity:0.6;cursor:not-allowed}`;
|
|
1579
2134
|
UIMenu = class {
|
|
@@ -1716,7 +2271,7 @@ var init_ui_menu_entry = __esm({
|
|
|
1716
2271
|
}
|
|
1717
2272
|
};
|
|
1718
2273
|
render() {
|
|
1719
|
-
return h(Host, { key: "
|
|
2274
|
+
return h(Host, { key: "25ae79e914820dfc470fa03d8c843646c3c060d9", role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "b3a8b130e55610d948bc3e4603dede59dd560d05" }));
|
|
1720
2275
|
}
|
|
1721
2276
|
static get watchers() {
|
|
1722
2277
|
return {
|
|
@@ -1747,8 +2302,8 @@ __export(ui_popover_entry_exports, {
|
|
|
1747
2302
|
var uiPopoverCss, UIPopover;
|
|
1748
2303
|
var init_ui_popover_entry = __esm({
|
|
1749
2304
|
"dist/esm/ui-popover.entry.js"() {
|
|
1750
|
-
|
|
1751
|
-
|
|
2305
|
+
init_index_8BGiMGQ0();
|
|
2306
|
+
init_manager_C_0syqXZ();
|
|
1752
2307
|
init_events_JwSoedEO();
|
|
1753
2308
|
init_positioning_Bu0dmLBE();
|
|
1754
2309
|
uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg);max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:auto}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}`;
|
|
@@ -1855,7 +2410,7 @@ var init_ui_popover_entry = __esm({
|
|
|
1855
2410
|
}
|
|
1856
2411
|
};
|
|
1857
2412
|
render() {
|
|
1858
|
-
return h(Host, { key: "
|
|
2413
|
+
return h(Host, { key: "cd957cb9fd5d1c05da7729a16d4cb229bc1deffa", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "d14960a1471948120f7173e18adae8d86e4fabb7" }));
|
|
1859
2414
|
}
|
|
1860
2415
|
static get watchers() {
|
|
1861
2416
|
return {
|
|
@@ -1886,7 +2441,7 @@ __export(ui_radio_group_entry_exports, {
|
|
|
1886
2441
|
var uiRadioGroupCss, UIRadioGroup;
|
|
1887
2442
|
var init_ui_radio_group_entry = __esm({
|
|
1888
2443
|
"dist/esm/ui-radio-group.entry.js"() {
|
|
1889
|
-
|
|
2444
|
+
init_index_8BGiMGQ0();
|
|
1890
2445
|
init_events_JwSoedEO();
|
|
1891
2446
|
uiRadioGroupCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2)}:host([data-orientation='vertical']){display:inline-grid;justify-items:start}`;
|
|
1892
2447
|
UIRadioGroup = class {
|
|
@@ -1992,7 +2547,7 @@ var init_ui_radio_group_entry = __esm({
|
|
|
1992
2547
|
}
|
|
1993
2548
|
};
|
|
1994
2549
|
render() {
|
|
1995
|
-
return h(Host, { key: "
|
|
2550
|
+
return h(Host, { key: "e80e01600d499d1b8e3410060433dac2bb8cf38a", role: "radiogroup", "aria-orientation": this.orientation, "data-orientation": this.orientation, "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "e60dcfa1b174b1a4c9092567e6ec4d9f5bcd9ffe" }));
|
|
1996
2551
|
}
|
|
1997
2552
|
static get watchers() {
|
|
1998
2553
|
return {
|
|
@@ -2026,7 +2581,7 @@ __export(ui_radio_entry_exports, {
|
|
|
2026
2581
|
var uiRadioCss, UIRadio;
|
|
2027
2582
|
var init_ui_radio_entry = __esm({
|
|
2028
2583
|
"dist/esm/ui-radio.entry.js"() {
|
|
2029
|
-
|
|
2584
|
+
init_index_8BGiMGQ0();
|
|
2030
2585
|
init_events_JwSoedEO();
|
|
2031
2586
|
uiRadioCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([data-disabled='true']),:host([aria-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='radio']){accent-color:var(--ui-accent-solid);cursor:pointer}::slotted(input[type='radio']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
|
|
2032
2587
|
UIRadio = class {
|
|
@@ -2047,7 +2602,7 @@ var init_ui_radio_entry = __esm({
|
|
|
2047
2602
|
const input = this.getInput();
|
|
2048
2603
|
if (!input)
|
|
2049
2604
|
return;
|
|
2050
|
-
this.host.
|
|
2605
|
+
this.host.toggleAttribute("data-disabled", this.disabled);
|
|
2051
2606
|
input.checked = this.checked;
|
|
2052
2607
|
input.disabled = this.disabled;
|
|
2053
2608
|
input.name = this.name;
|
|
@@ -2086,7 +2641,7 @@ var init_ui_radio_entry = __esm({
|
|
|
2086
2641
|
});
|
|
2087
2642
|
};
|
|
2088
2643
|
render() {
|
|
2089
|
-
return h(Host, { key: "
|
|
2644
|
+
return h(Host, { key: "898869b84429366e43c075723e884f34da6fc6df", role: "radio", "aria-checked": String(this.checked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "3f3b881175f25d439807ec9f8f0dd59a1acd6a90", ref: (el) => this.slotRef = el }));
|
|
2090
2645
|
}
|
|
2091
2646
|
static get watchers() {
|
|
2092
2647
|
return {
|
|
@@ -2131,7 +2686,7 @@ function slotHasContent(slot) {
|
|
|
2131
2686
|
var uiSearchResultRowCss, UISearchResultRow;
|
|
2132
2687
|
var init_ui_search_result_row_entry = __esm({
|
|
2133
2688
|
"dist/esm/ui-search-result-row.entry.js"() {
|
|
2134
|
-
|
|
2689
|
+
init_index_8BGiMGQ0();
|
|
2135
2690
|
uiSearchResultRowCss = () => `:host{display:block}.search-result-row{appearance:none;inline-size:100%;min-block-size:var(--ui-search-result-row-min-height, 56px);margin:0;padding-block:var(--ui-search-result-row-padding-block, var(--ui-space-3, 0.75rem));padding-inline:var(--ui-search-result-row-padding-inline, var(--ui-space-4, 1rem));display:flex;align-items:flex-start;gap:var(--ui-search-result-row-gap, var(--ui-space-3, 0.75rem));background:var(--ui-search-result-row-bg, transparent);border:none;border-block-end:1px solid var(--ui-search-result-row-border, var(--ui-border, #e5e7eb));color:inherit;cursor:pointer;text-align:left;transition:background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease)}:host(:last-child) .search-result-row{border-block-end:none}.search-result-row:hover:enabled{background:var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%))}:host([selected]) .search-result-row{background:var( --ui-search-result-row-selected-bg, var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%)) )}.search-result-row:focus-visible{outline:2px solid var(--ui-focus-ring, #2563eb);outline-offset:-2px}.search-result-row:disabled,:host([disabled]) .search-result-row{opacity:0.6;cursor:not-allowed}.search-result-row__leading,.search-result-row__trailing{display:inline-flex;align-items:flex-start;flex-shrink:0}.search-result-row__content{min-inline-size:0;flex:1;display:flex;flex-direction:column}.search-result-row__title,.search-result-row__meta,.search-result-row__excerpt{display:block;min-inline-size:0}[hidden]{display:none}::slotted([slot='title']),::slotted([slot='meta']),::slotted([slot='excerpt']){display:block;margin:0}`;
|
|
2136
2691
|
UISearchResultRow = class {
|
|
2137
2692
|
constructor(hostRef) {
|
|
@@ -2157,7 +2712,7 @@ var init_ui_search_result_row_entry = __esm({
|
|
|
2157
2712
|
this.hasTrailing = slotHasContent(this.trailingSlot);
|
|
2158
2713
|
};
|
|
2159
2714
|
render() {
|
|
2160
|
-
return h(Host, { key: "
|
|
2715
|
+
return h(Host, { key: "8ef897782b50f1ecb129a51a25631d3d2bafe1e3" }, h("button", { key: "5b4fb4ac4968551a191e80bde7b991391d931220", class: "search-result-row", type: "button", disabled: this.disabled, part: "button" }, h("span", { key: "5f5988d87bcf754d8a521e19e0e2a490dd868bd2", class: "search-result-row__leading", part: "leading", hidden: !this.hasLeading }, h("slot", { key: "a7671c75c28d71ab843dcbb1fcdd9f4d0e0f7361", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "4ed60057e10ade9d7771812ad28aa25a017d34d8", class: "search-result-row__content", part: "content" }, h("span", { key: "37fa74ef4980ffd0b576ff824532d1267420461c", class: "search-result-row__title", part: "title" }, h("slot", { key: "187df950b39702723fa456b09e220e2b7587f00a", name: "title" })), h("span", { key: "6d2476c57d7c9c7530c3796a723f47f5f4859d71", class: "search-result-row__meta", part: "meta", hidden: !this.hasMeta }, h("slot", { key: "d53329dd6865bbda005b0d25a2b9bc7b7a597452", name: "meta", ref: (el) => this.metaSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "8846c9669c0f65a739b770f41a93ddd4bef3f6bd", class: "search-result-row__excerpt", part: "excerpt", hidden: !this.hasExcerpt }, h("slot", { key: "b63f70371538901aaff481a9e524bf817883cee6", name: "excerpt", ref: (el) => this.excerptSlot = el, onSlotchange: this.syncSlots }))), h("span", { key: "1e8f94c3d83c3f649595c2843522b0973590a8d5", class: "search-result-row__trailing", part: "trailing", hidden: !this.hasTrailing }, h("slot", { key: "cfba9301ad97c1130a01f78c16052fc26e249f4b", name: "trailing", ref: (el) => this.trailingSlot = el, onSlotchange: this.syncSlots }))));
|
|
2161
2716
|
}
|
|
2162
2717
|
};
|
|
2163
2718
|
UISearchResultRow.style = uiSearchResultRowCss();
|
|
@@ -2183,7 +2738,7 @@ function slotHasContent2(slot) {
|
|
|
2183
2738
|
var uiSearchShellCss, UISearchShell;
|
|
2184
2739
|
var init_ui_search_shell_entry = __esm({
|
|
2185
2740
|
"dist/esm/ui-search-shell.entry.js"() {
|
|
2186
|
-
|
|
2741
|
+
init_index_8BGiMGQ0();
|
|
2187
2742
|
uiSearchShellCss = () => `:host{position:fixed;inset:0;z-index:var(--ui-search-shell-z-index, 400);display:block}.search-shell{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;padding-block-start:var(--ui-search-shell-padding-top, 10vh)}.search-shell__panel{position:relative;inline-size:min( calc(100% - (var(--ui-search-shell-margin-inline, var(--ui-space-4, 1rem)) * 2)), var(--ui-search-shell-max-width, 640px) );max-block-size:var(--ui-search-shell-max-height, 80vh);display:flex;flex-direction:column;overflow:hidden;background:var(--ui-search-shell-bg, var(--ui-surface, #ffffff));border:1px solid var(--ui-search-shell-border, var(--ui-border, #e5e7eb));border-radius:var(--ui-search-shell-radius, var(--ui-radius-xl, 1rem));box-shadow:var(--ui-search-shell-shadow, var(--ui-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12)))}.search-shell__search,.search-shell__status,.search-shell__footer{flex-shrink:0}.search-shell__body{flex:1;min-block-size:0}[hidden]{display:none}@media (max-width: 767px){.search-shell{padding-block-start:0;align-items:stretch}.search-shell__panel{inline-size:100%;block-size:100vh;block-size:100dvh;max-block-size:none;border-radius:0;border-inline:none;border-block-start:none}}`;
|
|
2188
2743
|
UISearchShell = class {
|
|
2189
2744
|
constructor(hostRef) {
|
|
@@ -2201,7 +2756,7 @@ var init_ui_search_shell_entry = __esm({
|
|
|
2201
2756
|
this.hasFooter = slotHasContent2(this.footerSlot);
|
|
2202
2757
|
};
|
|
2203
2758
|
render() {
|
|
2204
|
-
return h("div", { key: "
|
|
2759
|
+
return h("div", { key: "2a09e1ee81d04c0af5420887a9fa0dfb8057040c", class: "search-shell", part: "base" }, h("slot", { key: "9124af2e3e73b686a73b11c7fe8c9d40986e98c1", name: "backdrop" }), h("div", { key: "cec39a8cbbfe99b7bbeb37ce32655a88cee2bec3", class: "search-shell__panel", part: "panel" }, h("div", { key: "8168eda720e031daf350800ac48dcf445be0c417", class: "search-shell__search", part: "search" }, h("slot", { key: "b220c9670a6a53cd93fa434dc97dc9d2582bec08", name: "search" })), h("div", { key: "24386da67dd8ab5e865519e5b0b70fe9c8924010", class: "search-shell__status", part: "status", hidden: !this.hasStatus }, h("slot", { key: "7a0dfada13aca3275961667dadc9623729fbf644", name: "status", ref: (el) => this.statusSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "e06b7da6219c7a71d69662c5bdcc24e6baa52aa9", class: "search-shell__body", part: "body" }, h("slot", { key: "fabdea16cf443b57a826fc748b24342ff214b918", name: "body" })), h("div", { key: "d38662a77f19fd59315b1882cda0a55680cc5a0b", class: "search-shell__footer", part: "footer", hidden: !this.hasFooter }, h("slot", { key: "56eb386e22ae033939cdbdf3c6b6edf68594ceb5", name: "footer", ref: (el) => this.footerSlot = el, onSlotchange: this.syncSlots }))));
|
|
2205
2760
|
}
|
|
2206
2761
|
};
|
|
2207
2762
|
UISearchShell.style = uiSearchShellCss();
|
|
@@ -2216,9 +2771,9 @@ __export(ui_select_entry_exports, {
|
|
|
2216
2771
|
var uiSelectCss, UISelect;
|
|
2217
2772
|
var init_ui_select_entry = __esm({
|
|
2218
2773
|
"dist/esm/ui-select.entry.js"() {
|
|
2219
|
-
|
|
2774
|
+
init_index_8BGiMGQ0();
|
|
2220
2775
|
init_events_JwSoedEO();
|
|
2221
|
-
uiSelectCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(select){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background-color:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding-block:var(--ui-select-padding-block, var(--ui-space-2));padding-inline-start:var(--ui-select-padding-inline-start, var(--ui-space-3));padding-inline-end:var(--ui-select-padding-inline-end, calc(var(--ui-space-6) + var(--ui-space-3)));margin:0;background-image:linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);background-position:calc(100% - 1rem) calc(50% - 2px), calc(100% - 0.7rem) calc(50% - 2px);background-size:0.35rem 0.35rem, 0.35rem 0.35rem;background-repeat:no-repeat;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(select:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(select:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(select),::slotted(select[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(select:disabled){background-color:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(select:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(select[multiple]),::slotted(select[size]:not([size='1'])){background-image:none;padding-inline-end:var(--ui-select-padding-inline-start, var(--ui-space-3))}`;
|
|
2776
|
+
uiSelectCss = () => `:host{display:inline-flex;min-inline-size:0;color:var(--ui-text-primary)}::slotted(select){width:100%;appearance:none;min-block-size:var(--ui-control-min-block-size, 2.75rem);border:1px solid var(--ui-control-border, var(--ui-border-default));border-radius:var(--ui-radius-2);background-color:var(--ui-control-surface, var(--ui-surface-default));color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding-block:var(--ui-select-padding-block, var(--ui-space-2));padding-inline-start:var(--ui-select-padding-inline-start, var(--ui-space-3));padding-inline-end:var(--ui-select-padding-inline-end, calc(var(--ui-space-6) + var(--ui-space-3)));margin:0;background-image:linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);background-position:calc(100% - 1rem) calc(50% - 2px), calc(100% - 0.7rem) calc(50% - 2px);background-size:0.35rem 0.35rem, 0.35rem 0.35rem;background-repeat:no-repeat;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(select:hover:not(:focus):not(:disabled)){border-color:var(--ui-control-border-hover, var(--ui-border-strong))}::slotted(select:focus){border-color:var(--ui-control-focus, var(--ui-focus-ring));box-shadow:0 0 0 3px var(--ui-control-focus-halo, var(--ui-accent-soft))}:host([data-invalid='true'])::slotted(select),::slotted(select[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(select:disabled){background-color:var(--ui-control-surface-disabled, var(--ui-surface-muted));color:var(--ui-text-muted);cursor:not-allowed}::slotted(select:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(select[multiple]),::slotted(select[size]:not([size='1'])){background-image:none;padding-inline-end:var(--ui-select-padding-inline-start, var(--ui-space-3))}`;
|
|
2222
2777
|
UISelect = class {
|
|
2223
2778
|
constructor(hostRef) {
|
|
2224
2779
|
registerInstance(this, hostRef);
|
|
@@ -2226,22 +2781,28 @@ var init_ui_select_entry = __esm({
|
|
|
2226
2781
|
get host() {
|
|
2227
2782
|
return getElement(this);
|
|
2228
2783
|
}
|
|
2229
|
-
value
|
|
2230
|
-
defaultValue
|
|
2784
|
+
value;
|
|
2785
|
+
defaultValue;
|
|
2231
2786
|
disabled = false;
|
|
2232
2787
|
invalid = false;
|
|
2233
2788
|
required = false;
|
|
2234
2789
|
internalValue = "";
|
|
2235
2790
|
slotRef;
|
|
2791
|
+
initialized = false;
|
|
2236
2792
|
syncFromProp() {
|
|
2237
|
-
this.
|
|
2793
|
+
if (this.value !== void 0)
|
|
2794
|
+
this.internalValue = this.value;
|
|
2238
2795
|
}
|
|
2239
2796
|
syncToSelect() {
|
|
2240
2797
|
const select = this.getSelect();
|
|
2241
2798
|
if (!select)
|
|
2242
2799
|
return;
|
|
2243
2800
|
this.host.dataset.invalid = this.invalid ? "true" : "";
|
|
2244
|
-
|
|
2801
|
+
if (this.value !== void 0)
|
|
2802
|
+
select.value = this.internalValue;
|
|
2803
|
+
else if (!this.initialized && this.defaultValue !== void 0)
|
|
2804
|
+
select.value = this.defaultValue;
|
|
2805
|
+
this.initialized = true;
|
|
2245
2806
|
select.disabled = this.disabled;
|
|
2246
2807
|
select.required = this.required;
|
|
2247
2808
|
select.setAttribute("aria-invalid", this.invalid ? "true" : "false");
|
|
@@ -2288,7 +2849,7 @@ var init_ui_select_entry = __esm({
|
|
|
2288
2849
|
});
|
|
2289
2850
|
};
|
|
2290
2851
|
render() {
|
|
2291
|
-
return h(Host, { key: "
|
|
2852
|
+
return h(Host, { key: "5ac54353f467b70e94fce0ae661dc86c305befe7", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "1386f3e4912720ab597f4567112e9c8b4166bcc6", ref: (el) => this.slotRef = el }));
|
|
2292
2853
|
}
|
|
2293
2854
|
static get watchers() {
|
|
2294
2855
|
return {
|
|
@@ -2325,7 +2886,7 @@ __export(ui_switch_entry_exports, {
|
|
|
2325
2886
|
var uiSwitchCss, UISwitch;
|
|
2326
2887
|
var init_ui_switch_entry = __esm({
|
|
2327
2888
|
"dist/esm/ui-switch.entry.js"() {
|
|
2328
|
-
|
|
2889
|
+
init_index_8BGiMGQ0();
|
|
2329
2890
|
init_events_JwSoedEO();
|
|
2330
2891
|
uiSwitchCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}:host([role='switch']){cursor:pointer}:host input[type='checkbox']{appearance:none;-webkit-appearance:none;display:block;position:relative;width:2.25rem;height:1.25rem;padding:0;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host input[type='checkbox']::after{content:'';position:absolute;top:2px;left:2px;width:0.875rem;height:0.875rem;border-radius:999px;background:var(--ui-surface-default);border:1px solid var(--ui-border-default);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}:host input[type='checkbox']:checked{background:var(--ui-accent-solid);border-color:var(--ui-accent-solid)}:host input[type='checkbox']:checked::after{transform:translateX(calc(2.25rem - 0.875rem - 4px));background:var(--ui-text-on-accent);border-color:var(--ui-text-on-accent)}:host input[type='checkbox']:focus-visible{outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
|
|
2331
2892
|
UISwitch = class {
|
|
@@ -2370,14 +2931,14 @@ var init_ui_switch_entry = __esm({
|
|
|
2370
2931
|
this.toggle("pointer");
|
|
2371
2932
|
};
|
|
2372
2933
|
render() {
|
|
2373
|
-
return h(Host, { key: "
|
|
2934
|
+
return h(Host, { key: "14205d2856f8fb49b72d69d40f10ac1473a80c04", 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: "974f8e487c8bf9196c05420e1817139dd6b4138c", type: "checkbox", checked: this.internalChecked, disabled: this.disabled, required: this.required, value: this.value, "aria-hidden": "true", tabIndex: -1, onChange: (e) => {
|
|
2374
2935
|
this.internalChecked = e.target.checked;
|
|
2375
2936
|
dispatchDetail(this.host, "change", {
|
|
2376
2937
|
checked: this.internalChecked,
|
|
2377
2938
|
value: this.value,
|
|
2378
2939
|
trigger: "pointer"
|
|
2379
2940
|
});
|
|
2380
|
-
} }), h("slot", { key: "
|
|
2941
|
+
} }), h("slot", { key: "d1cd89aa2d5312cff8845364cdee64821977cb44" }));
|
|
2381
2942
|
}
|
|
2382
2943
|
static get watchers() {
|
|
2383
2944
|
return {
|
|
@@ -2399,7 +2960,7 @@ __export(ui_tabs_entry_exports, {
|
|
|
2399
2960
|
var uiTabsCss, UITabs;
|
|
2400
2961
|
var init_ui_tabs_entry = __esm({
|
|
2401
2962
|
"dist/esm/ui-tabs.entry.js"() {
|
|
2402
|
-
|
|
2963
|
+
init_index_8BGiMGQ0();
|
|
2403
2964
|
init_events_JwSoedEO();
|
|
2404
2965
|
uiTabsCss = () => `:host{display:flex;flex-direction:column;gap:0}:host([data-orientation='vertical']){flex-direction:row}::slotted([role='tablist']){display:flex;gap:0;max-inline-size:100%;overflow-x:auto;overscroll-behavior-inline:contain;border-bottom:1px solid var(--ui-border-default)}:host([data-orientation='vertical']) ::slotted([role='tablist']){flex-direction:column;border-bottom:none;border-inline-end:1px solid var(--ui-border-default)}::slotted(button[role='tab']),::slotted([role='tab']),::slotted(ui-button) button[role='tab']{padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);font-weight:var(--ui-font-medium, 500);color:var(--ui-text-secondary);background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;transition:color var(--ui-motion-fast) var(--ui-motion-ease);box-shadow:none}::slotted(button[role='tab']:hover),::slotted([role='tab']:hover){color:var(--ui-text-primary)}::slotted(button[role='tab'][aria-selected='true']),::slotted([role='tab'][aria-selected='true']){color:var(--ui-accent-solid);border-bottom-color:var(--ui-accent-solid)}:host([data-orientation='vertical']) ::slotted(button[role='tab']),:host([data-orientation='vertical']) ::slotted([role='tab']){border-bottom:none;border-inline-end:2px solid transparent;margin-bottom:0;margin-inline-end:-1px}:host([data-orientation='vertical']) ::slotted(button[role='tab'][aria-selected='true']),:host([data-orientation='vertical']) ::slotted([role='tab'][aria-selected='true']){border-inline-end-color:var(--ui-accent-solid)}::slotted([role='tabpanel']){padding:var(--ui-space-4)}`;
|
|
2405
2966
|
UITabs = class {
|
|
@@ -2493,7 +3054,7 @@ var init_ui_tabs_entry = __esm({
|
|
|
2493
3054
|
}
|
|
2494
3055
|
};
|
|
2495
3056
|
render() {
|
|
2496
|
-
return h(Host, { key: "
|
|
3057
|
+
return h(Host, { key: "ca8671f06914de2bd6b412caf11e385d67ae722b", orientation: this.orientation, "data-orientation": this.orientation }, h("slot", { key: "49beb3783c8f6a330d25164c82933c2bf6345b1e" }));
|
|
2497
3058
|
}
|
|
2498
3059
|
static get watchers() {
|
|
2499
3060
|
return {
|
|
@@ -2521,9 +3082,9 @@ __export(ui_textarea_entry_exports, {
|
|
|
2521
3082
|
var uiTextareaCss, UITextarea;
|
|
2522
3083
|
var init_ui_textarea_entry = __esm({
|
|
2523
3084
|
"dist/esm/ui-textarea.entry.js"() {
|
|
2524
|
-
|
|
3085
|
+
init_index_8BGiMGQ0();
|
|
2525
3086
|
init_events_JwSoedEO();
|
|
2526
|
-
uiTextareaCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(textarea){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);min-block-size:calc(var(--ui-space-12, 3rem) * 2);padding:var(--ui-space-2) var(--ui-space-3);margin:0;resize:vertical;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(textarea:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(textarea:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(textarea),::slotted(textarea[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(textarea:disabled){background:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(textarea:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
|
|
3087
|
+
uiTextareaCss = () => `:host{display:inline-flex;min-inline-size:0;color:var(--ui-text-primary)}::slotted(textarea){width:100%;appearance:none;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));color:inherit;font:inherit;line-height:var(--ui-line-height-md);min-block-size:calc(var(--ui-space-12, 3rem) * 2);padding:var(--ui-space-2) var(--ui-space-3);margin:0;resize:vertical;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(textarea:hover:not(:focus):not(:disabled)){border-color:var(--ui-control-border-hover, var(--ui-border-strong))}::slotted(textarea:focus){border-color:var(--ui-control-focus, var(--ui-focus-ring));box-shadow:0 0 0 3px var(--ui-control-focus-halo, var(--ui-accent-soft))}:host([data-invalid='true'])::slotted(textarea),::slotted(textarea[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(textarea:disabled){background:var(--ui-control-surface-disabled, var(--ui-surface-muted));color:var(--ui-text-muted);cursor:not-allowed}::slotted(textarea:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
|
|
2527
3088
|
UITextarea = class {
|
|
2528
3089
|
constructor(hostRef) {
|
|
2529
3090
|
registerInstance(this, hostRef);
|
|
@@ -2531,7 +3092,7 @@ var init_ui_textarea_entry = __esm({
|
|
|
2531
3092
|
get host() {
|
|
2532
3093
|
return getElement(this);
|
|
2533
3094
|
}
|
|
2534
|
-
value
|
|
3095
|
+
value;
|
|
2535
3096
|
defaultValue = "";
|
|
2536
3097
|
disabled = false;
|
|
2537
3098
|
invalid = false;
|
|
@@ -2540,14 +3101,16 @@ var init_ui_textarea_entry = __esm({
|
|
|
2540
3101
|
internalValue = "";
|
|
2541
3102
|
slotRef;
|
|
2542
3103
|
syncFromProp() {
|
|
2543
|
-
this.
|
|
3104
|
+
if (this.value !== void 0)
|
|
3105
|
+
this.internalValue = this.value;
|
|
2544
3106
|
}
|
|
2545
3107
|
syncToTextarea() {
|
|
2546
3108
|
const textarea = this.getTextarea();
|
|
2547
3109
|
if (!textarea)
|
|
2548
3110
|
return;
|
|
2549
3111
|
this.host.dataset.invalid = this.invalid ? "true" : "";
|
|
2550
|
-
|
|
3112
|
+
if (this.value !== void 0)
|
|
3113
|
+
textarea.value = this.internalValue;
|
|
2551
3114
|
textarea.defaultValue = this.defaultValue;
|
|
2552
3115
|
textarea.disabled = this.disabled;
|
|
2553
3116
|
textarea.readOnly = this.readOnly;
|
|
@@ -2596,7 +3159,7 @@ var init_ui_textarea_entry = __esm({
|
|
|
2596
3159
|
});
|
|
2597
3160
|
};
|
|
2598
3161
|
render() {
|
|
2599
|
-
return h(Host, { key: "
|
|
3162
|
+
return h(Host, { key: "9ccc0464bca55b3364645ea90df3890f9ed9d697", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "81c4df31064d4dcd2b2e27dfcf3141cc9f18f54e", ref: (el) => this.slotRef = el }));
|
|
2600
3163
|
}
|
|
2601
3164
|
static get watchers() {
|
|
2602
3165
|
return {
|
|
@@ -2636,7 +3199,7 @@ __export(ui_toast_region_entry_exports, {
|
|
|
2636
3199
|
var uiToastRegionCss, UIToastRegion;
|
|
2637
3200
|
var init_ui_toast_region_entry = __esm({
|
|
2638
3201
|
"dist/esm/ui-toast-region.entry.js"() {
|
|
2639
|
-
|
|
3202
|
+
init_index_8BGiMGQ0();
|
|
2640
3203
|
init_events_JwSoedEO();
|
|
2641
3204
|
init_positioning_Bu0dmLBE();
|
|
2642
3205
|
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}`;
|
|
@@ -2702,7 +3265,7 @@ var init_ui_toast_region_entry = __esm({
|
|
|
2702
3265
|
}
|
|
2703
3266
|
};
|
|
2704
3267
|
render() {
|
|
2705
|
-
return h(Host, { key: "
|
|
3268
|
+
return h(Host, { key: "9ec1cc51ecc4e7a256be5d89a09a10788e46db53", role: "region", "aria-label": "Notifications", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "7b08656f3745a02f8e9f0935e47d6f2cffd88f9b" }));
|
|
2706
3269
|
}
|
|
2707
3270
|
static get watchers() {
|
|
2708
3271
|
return {
|
|
@@ -2727,14 +3290,16 @@ __export(ui_tooltip_entry_exports, {
|
|
|
2727
3290
|
var uiTooltipCss, UITooltip;
|
|
2728
3291
|
var init_ui_tooltip_entry = __esm({
|
|
2729
3292
|
"dist/esm/ui-tooltip.entry.js"() {
|
|
2730
|
-
|
|
2731
|
-
|
|
3293
|
+
init_index_8BGiMGQ0();
|
|
3294
|
+
init_manager_C_0syqXZ();
|
|
2732
3295
|
init_events_JwSoedEO();
|
|
2733
3296
|
init_positioning_Bu0dmLBE();
|
|
2734
3297
|
uiTooltipCss = () => `:host{position:fixed;inset:auto;margin:0;display:inline-block;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md);opacity:0;transform:translateY(4px);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host(:popover-open){opacity:1;transform:translateY(0)}@starting-style{:host(:popover-open){opacity:0;transform:translateY(4px)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host{transition:none}}`;
|
|
2735
3298
|
UITooltip = class {
|
|
2736
3299
|
constructor(hostRef) {
|
|
2737
3300
|
registerInstance(this, hostRef);
|
|
3301
|
+
this.opened = createEvent(this, "open");
|
|
3302
|
+
this.closed = createEvent(this, "close");
|
|
2738
3303
|
}
|
|
2739
3304
|
get host() {
|
|
2740
3305
|
return getElement(this);
|
|
@@ -2747,6 +3312,12 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2747
3312
|
showDelay = 500;
|
|
2748
3313
|
/** Pointer leave grace period in milliseconds. */
|
|
2749
3314
|
hideDelay = 100;
|
|
3315
|
+
/** Click or tap pins the description; activate again to dismiss. */
|
|
3316
|
+
toggleOnClick = false;
|
|
3317
|
+
pinned = false;
|
|
3318
|
+
focused = false;
|
|
3319
|
+
opened;
|
|
3320
|
+
closed;
|
|
2750
3321
|
internalOpen = false;
|
|
2751
3322
|
overlayId = `ui-tooltip-${Math.random().toString(36).slice(2, 11)}`;
|
|
2752
3323
|
trigger = null;
|
|
@@ -2779,11 +3350,14 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2779
3350
|
}
|
|
2780
3351
|
}
|
|
2781
3352
|
componentDidLoad() {
|
|
3353
|
+
if (!this.host.id)
|
|
3354
|
+
this.host.id = this.overlayId;
|
|
2782
3355
|
this.syncFromProp();
|
|
2783
3356
|
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
2784
3357
|
this.syncTrigger();
|
|
2785
3358
|
this.setupSurface();
|
|
2786
|
-
this.host.addEventListener("
|
|
3359
|
+
this.host.addEventListener("pointerenter", this.onSurfaceEnter);
|
|
3360
|
+
this.host.addEventListener("pointerleave", this.onTriggerLeave);
|
|
2787
3361
|
this.syncOverlay();
|
|
2788
3362
|
}
|
|
2789
3363
|
componentDidUpdate() {
|
|
@@ -2794,11 +3368,12 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2794
3368
|
this.detachTriggerListeners();
|
|
2795
3369
|
this.surface?.destroy();
|
|
2796
3370
|
this.surface = null;
|
|
2797
|
-
this.host.removeEventListener("
|
|
3371
|
+
this.host.removeEventListener("pointerenter", this.onSurfaceEnter);
|
|
3372
|
+
this.host.removeEventListener("pointerleave", this.onTriggerLeave);
|
|
2798
3373
|
closeOverlay(this.overlayId);
|
|
2799
3374
|
}
|
|
2800
3375
|
syncTrigger() {
|
|
2801
|
-
const next = this.for ? this.host.
|
|
3376
|
+
const next = this.for ? this.host.getRootNode().getElementById(this.for) : this.host.previousElementSibling;
|
|
2802
3377
|
if (next === this.trigger)
|
|
2803
3378
|
return;
|
|
2804
3379
|
this.detachTriggerListeners();
|
|
@@ -2817,6 +3392,11 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2817
3392
|
this.detachTriggerListeners();
|
|
2818
3393
|
if (!this.trigger)
|
|
2819
3394
|
return;
|
|
3395
|
+
const ids = new Set((this.trigger.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean));
|
|
3396
|
+
ids.add(this.host.id);
|
|
3397
|
+
this.trigger.setAttribute("aria-describedby", [...ids].join(" "));
|
|
3398
|
+
this.trigger.addEventListener("click", this.onTriggerClick);
|
|
3399
|
+
this.trigger.addEventListener("keydown", this.onTriggerKeydown);
|
|
2820
3400
|
this.trigger.addEventListener("pointerenter", this.onTriggerEnter);
|
|
2821
3401
|
this.trigger.addEventListener("pointerleave", this.onTriggerLeave);
|
|
2822
3402
|
this.trigger.addEventListener("focusin", this.onTriggerFocusIn);
|
|
@@ -2825,6 +3405,13 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2825
3405
|
detachTriggerListeners() {
|
|
2826
3406
|
if (!this.trigger)
|
|
2827
3407
|
return;
|
|
3408
|
+
const ids = (this.trigger.getAttribute("aria-describedby") || "").split(/\s+/).filter((id) => id && id !== this.host.id);
|
|
3409
|
+
if (ids.length)
|
|
3410
|
+
this.trigger.setAttribute("aria-describedby", ids.join(" "));
|
|
3411
|
+
else
|
|
3412
|
+
this.trigger.removeAttribute("aria-describedby");
|
|
3413
|
+
this.trigger.removeEventListener("click", this.onTriggerClick);
|
|
3414
|
+
this.trigger.removeEventListener("keydown", this.onTriggerKeydown);
|
|
2828
3415
|
this.trigger.removeEventListener("pointerenter", this.onTriggerEnter);
|
|
2829
3416
|
this.trigger.removeEventListener("pointerleave", this.onTriggerLeave);
|
|
2830
3417
|
this.trigger.removeEventListener("focusin", this.onTriggerFocusIn);
|
|
@@ -2856,7 +3443,21 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2856
3443
|
trigger
|
|
2857
3444
|
});
|
|
2858
3445
|
}
|
|
2859
|
-
|
|
3446
|
+
onSurfaceEnter = () => this.clearHideTimer();
|
|
3447
|
+
onTriggerClick = (event) => {
|
|
3448
|
+
if (!this.toggleOnClick)
|
|
3449
|
+
return;
|
|
3450
|
+
this.clearTimers();
|
|
3451
|
+
this.pinned = !this.pinned;
|
|
3452
|
+
this.setInteractionOpen(this.pinned, event.detail === 0 ? "keyboard" : "pointer");
|
|
3453
|
+
};
|
|
3454
|
+
onTriggerKeydown = (event) => {
|
|
3455
|
+
if (event.key === "Escape")
|
|
3456
|
+
this.clearTimers();
|
|
3457
|
+
};
|
|
3458
|
+
onTriggerEnter = (event) => {
|
|
3459
|
+
if (event.pointerType === "touch")
|
|
3460
|
+
return;
|
|
2860
3461
|
this.clearHideTimer();
|
|
2861
3462
|
if (this.internalOpen || this.showTimer !== null)
|
|
2862
3463
|
return;
|
|
@@ -2867,7 +3468,7 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2867
3468
|
};
|
|
2868
3469
|
onTriggerLeave = () => {
|
|
2869
3470
|
this.clearShowTimer();
|
|
2870
|
-
if (!this.internalOpen || this.hideTimer !== null)
|
|
3471
|
+
if (this.focused || this.pinned || !this.internalOpen || this.hideTimer !== null)
|
|
2871
3472
|
return;
|
|
2872
3473
|
this.hideTimer = setTimeout(() => {
|
|
2873
3474
|
this.hideTimer = null;
|
|
@@ -2875,6 +3476,7 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2875
3476
|
}, Math.max(0, this.hideDelay));
|
|
2876
3477
|
};
|
|
2877
3478
|
onTriggerFocusIn = () => {
|
|
3479
|
+
this.focused = true;
|
|
2878
3480
|
this.clearTimers();
|
|
2879
3481
|
this.setInteractionOpen(true, "keyboard");
|
|
2880
3482
|
};
|
|
@@ -2882,28 +3484,25 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2882
3484
|
const related = e.relatedTarget;
|
|
2883
3485
|
if (related && this.host.contains(related))
|
|
2884
3486
|
return;
|
|
3487
|
+
this.focused = false;
|
|
3488
|
+
this.pinned = false;
|
|
2885
3489
|
this.clearTimers();
|
|
2886
3490
|
this.setInteractionOpen(false, "keyboard");
|
|
2887
3491
|
};
|
|
2888
3492
|
handleRequestClose(reason, trigger) {
|
|
2889
|
-
if (reason === "escape") {
|
|
3493
|
+
if (reason === "escape" || reason === "light-dismiss" && this.toggleOnClick) {
|
|
3494
|
+
this.pinned = false;
|
|
2890
3495
|
this.clearTimers();
|
|
2891
3496
|
this.internalOpen = false;
|
|
2892
3497
|
dispatchDetail(this.host, "close", {
|
|
2893
3498
|
open: false,
|
|
2894
|
-
reason
|
|
3499
|
+
reason,
|
|
2895
3500
|
trigger
|
|
2896
3501
|
});
|
|
2897
|
-
this.trigger?.focus();
|
|
2898
3502
|
}
|
|
2899
3503
|
}
|
|
2900
|
-
onKeydown = (e) => {
|
|
2901
|
-
if (e.key === "Escape") {
|
|
2902
|
-
requestTopOverlayClose("escape", "keyboard");
|
|
2903
|
-
}
|
|
2904
|
-
};
|
|
2905
3504
|
render() {
|
|
2906
|
-
return h(Host, { key: "
|
|
3505
|
+
return h(Host, { key: "b0199c23316a707ae3e1e7c361f2838872f62221", role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "d0c7822f2f47848a509bf8e310806edbdb320f02" }));
|
|
2907
3506
|
}
|
|
2908
3507
|
static get watchers() {
|
|
2909
3508
|
return {
|
|
@@ -2945,7 +3544,7 @@ function slotHasContent3(slot) {
|
|
|
2945
3544
|
var uiTopBarCss, UITopBar;
|
|
2946
3545
|
var init_ui_top_bar_entry = __esm({
|
|
2947
3546
|
"dist/esm/ui-top-bar.entry.js"() {
|
|
2948
|
-
|
|
3547
|
+
init_index_8BGiMGQ0();
|
|
2949
3548
|
uiTopBarCss = () => `:host{position:sticky;inset-block-start:0;z-index:var(--ui-top-bar-z-index, 100);display:block}.top-bar{min-block-size:calc(var(--ui-top-bar-height, 56px) + env(safe-area-inset-top));display:flex;align-items:center;gap:var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));padding-block-start:env(safe-area-inset-top);padding-inline-start:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-left) );padding-inline-end:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-right) );background:var(--ui-top-bar-bg, var(--ui-surface, #ffffff));border-block-end:1px solid var(--ui-top-bar-border, var(--ui-border, #e5e7eb))}.top-bar__leading,.top-bar__search,.top-bar__actions{display:flex;align-items:center;flex-shrink:0}.top-bar__actions{gap:var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem))}.top-bar__title{min-inline-size:0;flex:1}[hidden]{display:none}@media (min-width: 768px){:host{display:none}}`;
|
|
2950
3549
|
UITopBar = class {
|
|
2951
3550
|
constructor(hostRef) {
|
|
@@ -2969,7 +3568,7 @@ var init_ui_top_bar_entry = __esm({
|
|
|
2969
3568
|
this.hasActions = slotHasContent3(this.actionsSlot);
|
|
2970
3569
|
};
|
|
2971
3570
|
render() {
|
|
2972
|
-
return h(Host, { key: "
|
|
3571
|
+
return h(Host, { key: "730e45232ab2b86c2ac99dba773f4ca15d7c3c51" }, h("header", { key: "f94f9b4f3f5930fda950895d2eec01d3ec175479", class: "top-bar", part: "base" }, h("div", { key: "038f6a404b0f159b4b826ada73d3c920266354c8", class: "top-bar__leading", hidden: !this.hasLeading }, h("slot", { key: "2d415368310c319eca3f3eb9b2c885ef79bb4107", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "dfd78b02066a91e9c610e4655a70da704ad65327", class: "top-bar__title" }, h("slot", { key: "499e24a864a31f6e400fd02aab4a3f960c87e572" })), h("div", { key: "5aa94952996487651dffecd2e351548631fa29b6", class: "top-bar__search", hidden: !this.hasSearch }, h("slot", { key: "eddad95f8acf787ee0cead2a46e7961a06375d5c", name: "search", ref: (el) => this.searchSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "dc69d492aa221a8beb888350bf101f8beeceede9", class: "top-bar__actions", hidden: !this.hasActions }, h("slot", { key: "7cde7e062f487da8209738a32415636c7a6b72f0", name: "actions", ref: (el) => this.actionsSlot = el, onSlotchange: this.syncSlots }))));
|
|
2973
3572
|
}
|
|
2974
3573
|
};
|
|
2975
3574
|
UITopBar.style = uiTopBarCss();
|
|
@@ -3003,7 +3602,7 @@ function loomaIconMarkup(name, className = "looma-icon") {
|
|
|
3003
3602
|
var Bold, Braces, ChevronDown, ChevronLeft, CodeXml, Columns3, Ellipsis, Eraser, GripHorizontal, GripVertical, Heading1, Heading2, Heading3, Highlighter, Image, Italic, ListOrdered, ListTodo, List, Merge, Minus, PaintBucket, PanelBottom, PanelLeft, PanelRight, PanelTop, Pilcrow, Plus, Quote, Redo2, Rows3, Split, Strikethrough, Table2, TextAlignCenter, TextAlignEnd, TextAlignStart, Trash2, Underline, Undo2, LOOMA_ICONS, uiTreeItemCss, UITreeItem;
|
|
3004
3603
|
var init_ui_tree_item_entry = __esm({
|
|
3005
3604
|
"dist/esm/ui-tree-item.entry.js"() {
|
|
3006
|
-
|
|
3605
|
+
init_index_8BGiMGQ0();
|
|
3007
3606
|
init_events_JwSoedEO();
|
|
3008
3607
|
Bold = [
|
|
3009
3608
|
["path", { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" }]
|
|
@@ -3275,6 +3874,10 @@ var init_ui_tree_item_entry = __esm({
|
|
|
3275
3874
|
label = "";
|
|
3276
3875
|
/** One-based visual and semantic nesting level. */
|
|
3277
3876
|
depth = 1;
|
|
3877
|
+
/** Application hierarchy depth used for drop constraints. Defaults to visual depth. */
|
|
3878
|
+
dropDepth;
|
|
3879
|
+
/** Deepest descendant distance, used with the tree's max-depth drop constraint. */
|
|
3880
|
+
subtreeDepth;
|
|
3278
3881
|
/** Whether this item accepts children and exposes disclosure behavior. */
|
|
3279
3882
|
container = false;
|
|
3280
3883
|
/** Whether this item participates in pointer drag and drop. */
|
|
@@ -3336,10 +3939,10 @@ var init_ui_tree_item_entry = __esm({
|
|
|
3336
3939
|
const level = Math.max(1, Math.floor(this.depth));
|
|
3337
3940
|
const disclosureLabel = `${this.internalExpanded ? "Collapse" : "Expand"} ${this.label || "item"}`;
|
|
3338
3941
|
const dragLabel = `Drag ${this.label || "item"} to reorder`;
|
|
3339
|
-
return h(Host, { key: "
|
|
3942
|
+
return h(Host, { key: "606f5fdac8a95489d0c62cd7d4918c6d5d0c759e", role: "treeitem", "aria-level": String(level), "aria-expanded": this.container ? String(this.internalExpanded) : 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 ? -1 : 0, style: {
|
|
3340
3943
|
"--ui-tree-item-depth": String(level - 1),
|
|
3341
3944
|
"margin-inline-start": level > 1 ? "var(--ui-tree-indent, 16px)" : "0px"
|
|
3342
|
-
} }, h("div", { key: "
|
|
3945
|
+
} }, h("div", { key: "2b4bb03d4b24ef668f22b08e803f7f43c2d63ae5", 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(this.internalExpanded), disabled: this.disabled, onClick: this.onDisclosureClick, onKeyDown: this.onDisclosureKeydown }, h("span", { class: { "disclosure-icon": true, "disclosure-icon--expanded": this.internalExpanded }, innerHTML: loomaIconMarkup("chevron-down") })) : h("span", { class: "disclosure-spacer", "aria-hidden": "true" }), h("span", { key: "e7b935158e35cdc6518bdd73d54c42dcfa211aee", class: "leading", part: "leading" }, h("slot", { key: "8448462349fd23b8be0fb673fc6e101bf94beaa7", name: "leading" })), h("span", { key: "e0b6338e1ec9ec043446e42c5f03724adf7e1862", class: "label", part: "label" }, h("slot", { key: "ed44e6f2ce3466c28d2b87fc7511399ecc339255" })), h("span", { key: "2aea78227904fe23cfc4b8e14852a4601e3cc34b", class: "actions", part: "actions" }, h("slot", { key: "7c6549008c2a54c3ea6fcdf9e0fdbe445d379922", name: "actions" })), h("span", { key: "05166ba04765bc518d6b95ca7ae5a67c4394d1bf", class: "drop-indicator row-drop-indicator", part: "drop-indicator", "aria-hidden": "true" })), this.container ? h("div", { class: "children", part: "children", role: "group", hidden: !this.internalExpanded }, h("slot", { name: "children" })) : null, h("span", { key: "7381d6e9e2a8f94695f29e73194b1603d79cefb9", class: "drop-indicator subtree-drop-indicator", part: "drop-indicator", "aria-hidden": "true" }));
|
|
3343
3946
|
}
|
|
3344
3947
|
static get watchers() {
|
|
3345
3948
|
return {
|
|
@@ -3404,7 +4007,7 @@ function createHoverIntent(delay, onIntent) {
|
|
|
3404
4007
|
var uiTreeCss, UITree;
|
|
3405
4008
|
var init_ui_tree_entry = __esm({
|
|
3406
4009
|
"dist/esm/ui-tree.entry.js"() {
|
|
3407
|
-
|
|
4010
|
+
init_index_8BGiMGQ0();
|
|
3408
4011
|
init_events_JwSoedEO();
|
|
3409
4012
|
uiTreeCss = () => `:host{--ui-tree-indent:16px;display:block;min-inline-size:0;padding-inline-start:var(--ui-tree-gutter, 22px)}::slotted(ui-tree-item){--ui-tree-indent:inherit}`;
|
|
3410
4013
|
UITree = class {
|
|
@@ -3416,9 +4019,14 @@ var init_ui_tree_entry = __esm({
|
|
|
3416
4019
|
}
|
|
3417
4020
|
label = "Tree";
|
|
3418
4021
|
hoverExpandDelay = 700;
|
|
4022
|
+
/** Maximum resulting item depth accepted by pointer reordering. Zero is unlimited. */
|
|
4023
|
+
maxDepth = 0;
|
|
3419
4024
|
source = null;
|
|
3420
4025
|
target = null;
|
|
3421
4026
|
position = null;
|
|
4027
|
+
rejectedTarget = null;
|
|
4028
|
+
rejectedPosition = null;
|
|
4029
|
+
rejection = null;
|
|
3422
4030
|
hoverIntent = null;
|
|
3423
4031
|
componentDidLoad() {
|
|
3424
4032
|
this.hoverIntent = createHoverIntent(this.hoverExpandDelay, this.expandTarget);
|
|
@@ -3482,15 +4090,37 @@ var init_ui_tree_entry = __esm({
|
|
|
3482
4090
|
accepts: (item.getAttribute("data-accepts") || item.getAttribute("accepts") || "").split(",").map((value) => value.trim()).filter(Boolean)
|
|
3483
4091
|
};
|
|
3484
4092
|
}
|
|
3485
|
-
|
|
4093
|
+
constraintDepth(item) {
|
|
4094
|
+
if (item.dropDepth !== void 0)
|
|
4095
|
+
return item.dropDepth;
|
|
4096
|
+
const dropDepth = item.getAttribute("drop-depth");
|
|
4097
|
+
if (dropDepth !== null)
|
|
4098
|
+
return Number(dropDepth);
|
|
4099
|
+
if (item.depth !== void 0)
|
|
4100
|
+
return item.depth;
|
|
4101
|
+
return Number(item.getAttribute("depth")) || 1;
|
|
4102
|
+
}
|
|
4103
|
+
dropRejection(source, target, position) {
|
|
3486
4104
|
if (source.contains(target))
|
|
3487
|
-
return
|
|
4105
|
+
return { reason: "descendant" };
|
|
3488
4106
|
const sourceMeta = this.itemMetadata(source);
|
|
3489
4107
|
const targetMeta = this.itemMetadata(target);
|
|
3490
4108
|
if (position === "inside") {
|
|
3491
|
-
|
|
4109
|
+
if (!this.acceptsChildren(target) || targetMeta.accepts.length > 0 && !targetMeta.accepts.includes(sourceMeta.type)) {
|
|
4110
|
+
return { reason: "incompatible" };
|
|
4111
|
+
}
|
|
4112
|
+
} else if (sourceMeta.type !== targetMeta.type) {
|
|
4113
|
+
return { reason: "incompatible" };
|
|
4114
|
+
}
|
|
4115
|
+
const maxDepth = Math.max(0, Math.floor(this.maxDepth));
|
|
4116
|
+
if (maxDepth > 0 && source.subtreeDepth !== void 0) {
|
|
4117
|
+
const targetDepth = Math.max(0, Math.floor(this.constraintDepth(target)));
|
|
4118
|
+
const subtreeDepth = Math.max(0, Math.floor(source.subtreeDepth));
|
|
4119
|
+
const resultingDepth = targetDepth + (position === "inside" ? 1 : 0) + subtreeDepth;
|
|
4120
|
+
if (resultingDepth > maxDepth)
|
|
4121
|
+
return { reason: "max-depth", maxDepth, resultingDepth };
|
|
3492
4122
|
}
|
|
3493
|
-
return
|
|
4123
|
+
return null;
|
|
3494
4124
|
}
|
|
3495
4125
|
clearTarget() {
|
|
3496
4126
|
this.target?.removeAttribute("data-drop-position");
|
|
@@ -3498,10 +4128,16 @@ var init_ui_tree_entry = __esm({
|
|
|
3498
4128
|
this.position = null;
|
|
3499
4129
|
this.hoverIntent?.cancel();
|
|
3500
4130
|
}
|
|
4131
|
+
clearRejection() {
|
|
4132
|
+
this.rejectedTarget = null;
|
|
4133
|
+
this.rejectedPosition = null;
|
|
4134
|
+
this.rejection = null;
|
|
4135
|
+
}
|
|
3501
4136
|
finishDrag() {
|
|
3502
4137
|
this.source?.removeAttribute("data-dragging");
|
|
3503
4138
|
this.source = null;
|
|
3504
4139
|
this.clearTarget();
|
|
4140
|
+
this.clearRejection();
|
|
3505
4141
|
}
|
|
3506
4142
|
expandTarget = (itemId) => {
|
|
3507
4143
|
const item = Array.from(this.host.querySelectorAll("ui-tree-item")).find((candidate) => this.itemId(candidate) === itemId);
|
|
@@ -3537,18 +4173,28 @@ var init_ui_tree_entry = __esm({
|
|
|
3537
4173
|
return false;
|
|
3538
4174
|
if (!target || target === this.source) {
|
|
3539
4175
|
this.clearTarget();
|
|
4176
|
+
this.clearRejection();
|
|
3540
4177
|
return false;
|
|
3541
4178
|
}
|
|
3542
4179
|
const row = this.rowFor(target);
|
|
3543
4180
|
if (!row)
|
|
3544
4181
|
return false;
|
|
3545
4182
|
const position = classifyDropPosition(row.getBoundingClientRect(), clientY, this.acceptsChildren(target));
|
|
3546
|
-
|
|
4183
|
+
const rejection = this.dropRejection(this.source, target, position);
|
|
4184
|
+
if (rejection) {
|
|
3547
4185
|
if (dataTransfer)
|
|
3548
4186
|
dataTransfer.dropEffect = "none";
|
|
3549
4187
|
this.clearTarget();
|
|
4188
|
+
if (rejection.reason === "max-depth") {
|
|
4189
|
+
this.rejectedTarget = target;
|
|
4190
|
+
this.rejectedPosition = position;
|
|
4191
|
+
this.rejection = rejection;
|
|
4192
|
+
} else {
|
|
4193
|
+
this.clearRejection();
|
|
4194
|
+
}
|
|
3550
4195
|
return false;
|
|
3551
4196
|
}
|
|
4197
|
+
this.clearRejection();
|
|
3552
4198
|
if (dataTransfer)
|
|
3553
4199
|
dataTransfer.dropEffect = "move";
|
|
3554
4200
|
if (this.target !== target || this.position !== position) {
|
|
@@ -3585,12 +4231,15 @@ var init_ui_tree_entry = __esm({
|
|
|
3585
4231
|
if (this.itemAtPoint(event.clientX, event.clientY))
|
|
3586
4232
|
return;
|
|
3587
4233
|
this.clearTarget();
|
|
4234
|
+
this.clearRejection();
|
|
3588
4235
|
};
|
|
3589
4236
|
dispatchReorder(source, target, position) {
|
|
3590
4237
|
const sourceId = this.itemId(source);
|
|
3591
4238
|
const targetId = this.itemId(target);
|
|
3592
4239
|
if (!sourceId || !targetId)
|
|
3593
4240
|
return;
|
|
4241
|
+
if (position === "inside")
|
|
4242
|
+
this.expandTarget(targetId);
|
|
3594
4243
|
const sourceMeta = this.itemMetadata(source);
|
|
3595
4244
|
const targetMeta = this.itemMetadata(target);
|
|
3596
4245
|
dispatchDetail(this.host, "reorder", {
|
|
@@ -3604,6 +4253,21 @@ var init_ui_tree_entry = __esm({
|
|
|
3604
4253
|
trigger: "pointer"
|
|
3605
4254
|
});
|
|
3606
4255
|
}
|
|
4256
|
+
dispatchReorderRejected(source, target, position, rejection) {
|
|
4257
|
+
const sourceId = this.itemId(source);
|
|
4258
|
+
const targetId = this.itemId(target);
|
|
4259
|
+
if (!sourceId || !targetId)
|
|
4260
|
+
return;
|
|
4261
|
+
dispatchDetail(this.host, "reorder-rejected", {
|
|
4262
|
+
sourceId,
|
|
4263
|
+
targetId,
|
|
4264
|
+
position,
|
|
4265
|
+
reason: "max-depth",
|
|
4266
|
+
maxDepth: rejection.maxDepth,
|
|
4267
|
+
resultingDepth: rejection.resultingDepth,
|
|
4268
|
+
trigger: "pointer"
|
|
4269
|
+
});
|
|
4270
|
+
}
|
|
3607
4271
|
onDrop = (event) => {
|
|
3608
4272
|
if (!this.source || !this.target || !this.position)
|
|
3609
4273
|
return;
|
|
@@ -3613,13 +4277,21 @@ var init_ui_tree_entry = __esm({
|
|
|
3613
4277
|
};
|
|
3614
4278
|
onDragEnd = (event) => {
|
|
3615
4279
|
if (this.source) {
|
|
4280
|
+
if (this.rejectedTarget && this.rejectedPosition && this.rejection) {
|
|
4281
|
+
this.dispatchReorderRejected(this.source, this.rejectedTarget, this.rejectedPosition, this.rejection);
|
|
4282
|
+
this.finishDrag();
|
|
4283
|
+
return;
|
|
4284
|
+
}
|
|
3616
4285
|
const target = this.itemAtPoint(event.clientX, event.clientY);
|
|
3617
4286
|
if (target && target !== this.source) {
|
|
3618
4287
|
const row = this.rowFor(target);
|
|
3619
4288
|
if (row) {
|
|
3620
4289
|
const position = classifyDropPosition(row.getBoundingClientRect(), event.clientY, this.acceptsChildren(target));
|
|
3621
|
-
|
|
4290
|
+
const rejection = this.dropRejection(this.source, target, position);
|
|
4291
|
+
if (!rejection) {
|
|
3622
4292
|
this.dispatchReorder(this.source, target, position);
|
|
4293
|
+
} else if (rejection.reason === "max-depth") {
|
|
4294
|
+
this.dispatchReorderRejected(this.source, target, position, rejection);
|
|
3623
4295
|
}
|
|
3624
4296
|
}
|
|
3625
4297
|
}
|
|
@@ -3644,17 +4316,17 @@ var init_ui_tree_entry = __esm({
|
|
|
3644
4316
|
next.focus();
|
|
3645
4317
|
};
|
|
3646
4318
|
render() {
|
|
3647
|
-
return h(Host, { key: "
|
|
4319
|
+
return h(Host, { key: "474c2154d2abe3c76eee9c36bf552390089df6e8", role: "tree", "aria-label": this.label || "Tree" }, h("slot", { key: "93aedd02f984dd33b5efc811fef417d1199917bd" }));
|
|
3648
4320
|
}
|
|
3649
4321
|
};
|
|
3650
4322
|
UITree.style = uiTreeCss();
|
|
3651
4323
|
}
|
|
3652
4324
|
});
|
|
3653
4325
|
|
|
3654
|
-
// import("./**/*.entry.js") in dist/esm/index-
|
|
4326
|
+
// import("./**/*.entry.js") in dist/esm/index-8BGiMGQ0.js
|
|
3655
4327
|
var globImport_entry_js;
|
|
3656
4328
|
var init_ = __esm({
|
|
3657
|
-
'import("./**/*.entry.js") in dist/esm/index-
|
|
4329
|
+
'import("./**/*.entry.js") in dist/esm/index-8BGiMGQ0.js'() {
|
|
3658
4330
|
globImport_entry_js = __glob({
|
|
3659
4331
|
"./ui-affordance-scope.entry.js": () => Promise.resolve().then(() => (init_ui_affordance_scope_entry(), ui_affordance_scope_entry_exports)),
|
|
3660
4332
|
"./ui-avatar-group.entry.js": () => Promise.resolve().then(() => (init_ui_avatar_group_entry(), ui_avatar_group_entry_exports)),
|
|
@@ -3662,6 +4334,7 @@ var init_ = __esm({
|
|
|
3662
4334
|
"./ui-badge.entry.js": () => Promise.resolve().then(() => (init_ui_badge_entry(), ui_badge_entry_exports)),
|
|
3663
4335
|
"./ui-button.entry.js": () => Promise.resolve().then(() => (init_ui_button_entry(), ui_button_entry_exports)),
|
|
3664
4336
|
"./ui-checkbox.entry.js": () => Promise.resolve().then(() => (init_ui_checkbox_entry(), ui_checkbox_entry_exports)),
|
|
4337
|
+
"./ui-combobox.entry.js": () => Promise.resolve().then(() => (init_ui_combobox_entry(), ui_combobox_entry_exports)),
|
|
3665
4338
|
"./ui-context-menu.entry.js": () => Promise.resolve().then(() => (init_ui_context_menu_entry(), ui_context_menu_entry_exports)),
|
|
3666
4339
|
"./ui-dialog.entry.js": () => Promise.resolve().then(() => (init_ui_dialog_entry(), ui_dialog_entry_exports)),
|
|
3667
4340
|
"./ui-disclosure.entry.js": () => Promise.resolve().then(() => (init_ui_disclosure_entry(), ui_disclosure_entry_exports)),
|
|
@@ -3689,7 +4362,7 @@ var init_ = __esm({
|
|
|
3689
4362
|
}
|
|
3690
4363
|
});
|
|
3691
4364
|
|
|
3692
|
-
// dist/esm/index-
|
|
4365
|
+
// dist/esm/index-8BGiMGQ0.js
|
|
3693
4366
|
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
3694
4367
|
const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
|
|
3695
4368
|
while (obj && obj !== stopAt) {
|
|
@@ -3731,9 +4404,9 @@ function sortedAttrNames(attrNames) {
|
|
|
3731
4404
|
function transformTag(tag) {
|
|
3732
4405
|
return tag;
|
|
3733
4406
|
}
|
|
3734
|
-
var NAMESPACE, BUILD, reWireGetterSetter, getHostRef, registerInstance, registerHost, isMemberInElement, consoleError, cmpModules, loadModule, styles, HYDRATED_CSS, SLOT_FB_CSS, win, plt, promiseResolve, supportsConstructableStylesheets, supportsMutableAdoptedStyleSheets, queuePending, queueDomReads, queueDomWrites, queueTask, consume, flush, nextTick, writeTask, globalStyleSheet, createTime, uniqueTime, rootAppliedStyles, registerStyle, addStyle, attachStyles, getScopeId, isComplexType, h, newVNode, Host, isHost, parsePropertyValue, getElement, emitEvent, setAccessor, parseClassListRegex, parseClassList, CAPTURE_EVENT_SUFFIX, CAPTURE_EVENT_REGEX, updateElement, hostTagName, useNativeShadowDom, isSvgMode, refCallbacksToRemove, refCallbacksToAttach, createElm, relocateToHostRoot, addVnodes, removeVnodes, updateChildren, isSameVnode, patch, nullifyVNodeRefs, queueRefAttachment, flushQueuedRefCallbacks, insertBefore, renderVdom, attachToAncestor, scheduleUpdate, dispatchHooks, enqueue, isPromisey, updateComponent, callRender, postUpdateComponent, appDidLoad, safeCall, addHydratedFlag, getValue, setValue, proxyComponent, initializeComponent, fireConnectedCallback, connectedCallback, disconnectInstance, disconnectedCallback, bootstrapLazy;
|
|
3735
|
-
var
|
|
3736
|
-
"dist/esm/index-
|
|
4407
|
+
var NAMESPACE, BUILD, reWireGetterSetter, getHostRef, registerInstance, registerHost, isMemberInElement, consoleError, cmpModules, loadModule, styles, HYDRATED_CSS, SLOT_FB_CSS, win, plt, promiseResolve, supportsConstructableStylesheets, supportsMutableAdoptedStyleSheets, queuePending, queueDomReads, queueDomWrites, queueTask, consume, flush, nextTick, writeTask, globalStyleSheet, createTime, uniqueTime, rootAppliedStyles, registerStyle, addStyle, attachStyles, getScopeId, isComplexType, h, newVNode, Host, isHost, parsePropertyValue, getElement, createEvent, emitEvent, setAccessor, parseClassListRegex, parseClassList, CAPTURE_EVENT_SUFFIX, CAPTURE_EVENT_REGEX, updateElement, hostTagName, useNativeShadowDom, isSvgMode, refCallbacksToRemove, refCallbacksToAttach, createElm, relocateToHostRoot, addVnodes, removeVnodes, updateChildren, isSameVnode, patch, nullifyVNodeRefs, queueRefAttachment, flushQueuedRefCallbacks, insertBefore, renderVdom, attachToAncestor, scheduleUpdate, dispatchHooks, enqueue, isPromisey, updateComponent, callRender, postUpdateComponent, appDidLoad, safeCall, addHydratedFlag, getValue, setValue, proxyComponent, initializeComponent, fireConnectedCallback, connectedCallback, disconnectInstance, disconnectedCallback, bootstrapLazy;
|
|
4408
|
+
var init_index_8BGiMGQ0 = __esm({
|
|
4409
|
+
"dist/esm/index-8BGiMGQ0.js"() {
|
|
3737
4410
|
/* @vite-ignore */
|
|
3738
4411
|
/* webpackInclude: /\.entry\.js$/ */
|
|
3739
4412
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
@@ -3792,6 +4465,9 @@ var init_index_CEeiinfk = __esm({
|
|
|
3792
4465
|
$instanceValues$: /* @__PURE__ */ new Map(),
|
|
3793
4466
|
$serializerValues$: /* @__PURE__ */ new Map()
|
|
3794
4467
|
};
|
|
4468
|
+
{
|
|
4469
|
+
hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
|
|
4470
|
+
}
|
|
3795
4471
|
{
|
|
3796
4472
|
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
|
3797
4473
|
hostElement["s-p"] = [];
|
|
@@ -4118,6 +4794,19 @@ var init_index_CEeiinfk = __esm({
|
|
|
4118
4794
|
var _a;
|
|
4119
4795
|
return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$;
|
|
4120
4796
|
};
|
|
4797
|
+
createEvent = (ref, name, flags) => {
|
|
4798
|
+
const elm = getElement(ref);
|
|
4799
|
+
return {
|
|
4800
|
+
emit: (detail) => {
|
|
4801
|
+
return emitEvent(elm, name, {
|
|
4802
|
+
bubbles: true,
|
|
4803
|
+
composed: true,
|
|
4804
|
+
cancelable: true,
|
|
4805
|
+
detail
|
|
4806
|
+
});
|
|
4807
|
+
}
|
|
4808
|
+
};
|
|
4809
|
+
};
|
|
4121
4810
|
emitEvent = (elm, name, opts) => {
|
|
4122
4811
|
const ev = plt.ce(name, opts);
|
|
4123
4812
|
elm.dispatchEvent(ev);
|
|
@@ -4693,6 +5382,9 @@ var init_index_CEeiinfk = __esm({
|
|
|
4693
5382
|
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
4694
5383
|
endPostUpdate();
|
|
4695
5384
|
}
|
|
5385
|
+
{
|
|
5386
|
+
hostRef.$onInstanceResolve$(elm);
|
|
5387
|
+
}
|
|
4696
5388
|
{
|
|
4697
5389
|
if (hostRef.$onRenderResolve$) {
|
|
4698
5390
|
hostRef.$onRenderResolve$();
|
|
@@ -4870,6 +5562,17 @@ var init_index_CEeiinfk = __esm({
|
|
|
4870
5562
|
}
|
|
4871
5563
|
}
|
|
4872
5564
|
});
|
|
5565
|
+
} else if (flags & 1 && memberFlags & 64) {
|
|
5566
|
+
Object.defineProperty(prototype, memberName, {
|
|
5567
|
+
value(...args) {
|
|
5568
|
+
var _a2;
|
|
5569
|
+
const ref = getHostRef(this);
|
|
5570
|
+
return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
|
|
5571
|
+
var _a3;
|
|
5572
|
+
return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
|
|
5573
|
+
});
|
|
5574
|
+
}
|
|
5575
|
+
});
|
|
4873
5576
|
}
|
|
4874
5577
|
});
|
|
4875
5578
|
if (flags & 1) {
|
|
@@ -5244,20 +5947,23 @@ __export(index_exports, {
|
|
|
5244
5947
|
createProximityCoordinator: () => createProximityCoordinator2,
|
|
5245
5948
|
createViewportSurface: () => createViewportSurface2,
|
|
5246
5949
|
distanceFromPointToRect: () => distanceFromPointToRect2,
|
|
5950
|
+
formatEditingValue: () => formatEditingValue2,
|
|
5247
5951
|
getTopOverlay: () => getTopOverlay2,
|
|
5248
5952
|
getVisualViewportRect: () => getVisualViewportRect2,
|
|
5249
5953
|
initializeInputModality: () => initializeInputModality,
|
|
5250
5954
|
isTopOverlay: () => isTopOverlay,
|
|
5251
5955
|
loomaIconMarkup: () => loomaIconMarkup2,
|
|
5956
|
+
mapComboboxOptions: () => mapComboboxOptions,
|
|
5252
5957
|
openOverlay: () => openOverlay2,
|
|
5253
5958
|
requestTopOverlayClose: () => requestTopOverlayClose2,
|
|
5254
|
-
setElementDragImage: () => setElementDragImage2
|
|
5959
|
+
setElementDragImage: () => setElementDragImage2,
|
|
5960
|
+
validateField: () => validateField2
|
|
5255
5961
|
});
|
|
5256
5962
|
module.exports = __toCommonJS(index_exports);
|
|
5257
5963
|
|
|
5258
5964
|
// dist/esm/loader.js
|
|
5259
|
-
|
|
5260
|
-
|
|
5965
|
+
init_index_8BGiMGQ0();
|
|
5966
|
+
init_index_8BGiMGQ0();
|
|
5261
5967
|
|
|
5262
5968
|
// dist/esm/app-globals-DQuL1Twl.js
|
|
5263
5969
|
var globalScripts = () => {
|
|
@@ -5267,7 +5973,7 @@ var globalScripts = () => {
|
|
|
5267
5973
|
var defineCustomElements = async (win2, options) => {
|
|
5268
5974
|
if (typeof window === "undefined") return void 0;
|
|
5269
5975
|
await globalScripts();
|
|
5270
|
-
return bootstrapLazy([["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-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] }, null, { "open": [{ "syncFromProp": 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-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] }, null, { "checked": [{ "syncToInput": 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-
|
|
5976
|
+
return bootstrapLazy([["ui-combobox", [[769, "ui-combobox", { "label": [1], "placeholder": [1], "name": [1], "value": [1], "defaultValue": [1, "default-value"], "query": [1], "defaultQuery": [1, "default-query"], "config": [16], "disabled": [4], "readOnly": [4, "readonly"], "required": [4], "size": [1], "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] }, 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-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] }, null, { "open": [{ "syncFromProp": 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-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] }, null, { "checked": [{ "syncToInput": 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], "depth": [2], "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] }, 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-tooltip", [[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);
|
|
5271
5977
|
};
|
|
5272
5978
|
|
|
5273
5979
|
// loader/index.js
|
|
@@ -5333,11 +6039,8 @@ function handleLightDismiss2(event) {
|
|
|
5333
6039
|
if (!top || !getOverlayDismissible2(top)) {
|
|
5334
6040
|
return;
|
|
5335
6041
|
}
|
|
5336
|
-
const
|
|
5337
|
-
if (target instanceof Node)
|
|
5338
|
-
if (top.element.contains(target)) return;
|
|
5339
|
-
if (top.relatedElements?.some((element) => element.contains(target))) return;
|
|
5340
|
-
}
|
|
6042
|
+
const boundary = [top.element, ...top.relatedElements ?? []];
|
|
6043
|
+
if (event.composedPath().some((target) => target instanceof Node && boundary.some((element) => element.contains(target)))) return;
|
|
5341
6044
|
requestTopOverlayClose2("light-dismiss", "pointer");
|
|
5342
6045
|
}
|
|
5343
6046
|
function ensureListeners2() {
|
|
@@ -5826,6 +6529,60 @@ function createHoverIntent2(delay, onIntent) {
|
|
|
5826
6529
|
};
|
|
5827
6530
|
}
|
|
5828
6531
|
|
|
6532
|
+
// src/field/combobox.ts
|
|
6533
|
+
function mapComboboxOptions(rows, map) {
|
|
6534
|
+
return rows.map((row) => ({ ...map(row), metadata: row }));
|
|
6535
|
+
}
|
|
6536
|
+
|
|
6537
|
+
// src/field/validation.ts
|
|
6538
|
+
function formatEditingValue2(raw, selection, format) {
|
|
6539
|
+
const unchanged = { display: raw, selection };
|
|
6540
|
+
if (!format) return unchanged;
|
|
6541
|
+
let result;
|
|
6542
|
+
try {
|
|
6543
|
+
result = format(raw, selection);
|
|
6544
|
+
} catch {
|
|
6545
|
+
return unchanged;
|
|
6546
|
+
}
|
|
6547
|
+
if (!result) return unchanged;
|
|
6548
|
+
const characters = Array.from(raw);
|
|
6549
|
+
let cursor = 0;
|
|
6550
|
+
for (const character of result.display) if (character === characters[cursor]) cursor += 1;
|
|
6551
|
+
if (!Number.isInteger(result.selection.start) || !Number.isInteger(result.selection.end) || cursor !== characters.length || result.selection.start < 0 || result.selection.end < result.selection.start || result.selection.end > result.display.length) return unchanged;
|
|
6552
|
+
return result;
|
|
6553
|
+
}
|
|
6554
|
+
async function validateField2(request, config) {
|
|
6555
|
+
let output = request.raw;
|
|
6556
|
+
let issues = [];
|
|
6557
|
+
const check = () => request.signal.throwIfAborted();
|
|
6558
|
+
try {
|
|
6559
|
+
check();
|
|
6560
|
+
if (config.parse) output = await config.parse(request.raw, request);
|
|
6561
|
+
check();
|
|
6562
|
+
if (config.schema) {
|
|
6563
|
+
const result = await config.schema["~standard"].validate(output);
|
|
6564
|
+
check();
|
|
6565
|
+
if (result.issues) issues = result.issues;
|
|
6566
|
+
else if ("value" in result) output = result.value;
|
|
6567
|
+
}
|
|
6568
|
+
if (!issues.some((issue) => issue.severity !== "warning")) {
|
|
6569
|
+
if (config.normalize) output = await config.normalize(output, request);
|
|
6570
|
+
check();
|
|
6571
|
+
if (config.validator) {
|
|
6572
|
+
const result = await config.validator(output, request);
|
|
6573
|
+
check();
|
|
6574
|
+
issues = [...issues, ...result.issues ?? []];
|
|
6575
|
+
if ("output" in result) output = result.output;
|
|
6576
|
+
}
|
|
6577
|
+
}
|
|
6578
|
+
} catch (error) {
|
|
6579
|
+
check();
|
|
6580
|
+
issues = [{ message: error instanceof Error ? error.message : "Unable to validate this value." }];
|
|
6581
|
+
}
|
|
6582
|
+
issues = [...issues, ...config.issues ?? []];
|
|
6583
|
+
return { output: issues.some((issue) => issue.severity !== "warning") ? void 0 : output, issues };
|
|
6584
|
+
}
|
|
6585
|
+
|
|
5829
6586
|
// index.ts
|
|
5830
6587
|
if (typeof document !== "undefined") initializeInputModality(document);
|
|
5831
6588
|
defineCustomElements();
|
|
@@ -5841,14 +6598,17 @@ defineCustomElements();
|
|
|
5841
6598
|
createProximityCoordinator,
|
|
5842
6599
|
createViewportSurface,
|
|
5843
6600
|
distanceFromPointToRect,
|
|
6601
|
+
formatEditingValue,
|
|
5844
6602
|
getTopOverlay,
|
|
5845
6603
|
getVisualViewportRect,
|
|
5846
6604
|
initializeInputModality,
|
|
5847
6605
|
isTopOverlay,
|
|
5848
6606
|
loomaIconMarkup,
|
|
6607
|
+
mapComboboxOptions,
|
|
5849
6608
|
openOverlay,
|
|
5850
6609
|
requestTopOverlayClose,
|
|
5851
|
-
setElementDragImage
|
|
6610
|
+
setElementDragImage,
|
|
6611
|
+
validateField
|
|
5852
6612
|
});
|
|
5853
6613
|
/**
|
|
5854
6614
|
* @license lucide v0.554.0 - ISC
|