@threadlabs/looma 0.1.22 → 0.1.24
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-HNFCGIBP.js +8 -0
- package/dist/{chunk-NIPNHZ5W.js → chunk-IMHSPETJ.js} +65 -31
- package/dist/chunk-NB6DBRXQ.js +323 -0
- package/dist/{chunk-SZJQ3NPX.js → chunk-TL4FIE7X.js} +4 -8
- package/dist/cjs/controlled-state-BFya8rAX.js +9 -0
- package/dist/cjs/icons-BAdjrnhS.js +680 -0
- 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 +2 -2
- package/dist/cjs/ui-avatar-group.cjs.entry.js +10 -18
- package/dist/cjs/ui-avatar.cjs.entry.js +3 -3
- package/dist/cjs/ui-badge.cjs.entry.js +3 -3
- package/dist/cjs/ui-button.cjs.entry.js +16 -5
- package/dist/cjs/ui-callout.cjs.entry.js +27 -0
- package/dist/cjs/ui-checkbox.cjs.entry.js +14 -8
- package/dist/cjs/ui-chip.cjs.entry.js +19 -0
- 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 +46 -10
- package/dist/cjs/ui-disclosure.cjs.entry.js +10 -7
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +2 -2
- package/dist/cjs/ui-form-field.cjs.entry.js +61 -6
- 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 +3 -3
- package/dist/cjs/ui-menu.cjs.entry.js +16 -11
- package/dist/cjs/ui-popover.cjs.entry.js +12 -9
- package/dist/cjs/ui-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/ui-radio.cjs.entry.js +18 -9
- 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 +20 -11
- package/dist/cjs/ui-tabs.cjs.entry.js +11 -10
- package/dist/cjs/ui-textarea.cjs.entry.js +10 -6
- package/dist/cjs/ui-toast-region.cjs.entry.js +31 -20
- package/dist/cjs/ui-tooltip.cjs.entry.js +63 -23
- package/dist/cjs/ui-top-bar.cjs.entry.js +2 -2
- package/dist/cjs/ui-tree-item.cjs.entry.js +57 -616
- package/dist/cjs/ui-tree.cjs.entry.js +198 -14
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +1 -1
- package/dist/collection/components/ui-avatar/ui-avatar.css +4 -4
- package/dist/collection/components/ui-avatar/ui-avatar.js +1 -1
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +2 -2
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +8 -16
- package/dist/collection/components/ui-badge/ui-badge.css +64 -48
- package/dist/collection/components/ui-badge/ui-badge.js +1 -1
- 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-callout/ui-callout.css +74 -0
- package/dist/collection/components/ui-callout/ui-callout.js +59 -0
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +16 -11
- package/dist/collection/components/ui-chip/ui-chip.css +43 -0
- package/dist/collection/components/ui-chip/ui-chip.js +45 -0
- 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 +49 -13
- package/dist/collection/components/ui-disclosure/ui-disclosure.js +12 -10
- 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 +59 -4
- 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.css +12 -23
- package/dist/collection/components/ui-menu/ui-menu.js +16 -12
- package/dist/collection/components/ui-menu-item/ui-menu-item.css +9 -3
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
- package/dist/collection/components/ui-popover/ui-popover.css +14 -5
- package/dist/collection/components/ui-popover/ui-popover.js +12 -10
- package/dist/collection/components/ui-radio/ui-radio.js +25 -12
- 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 +22 -14
- package/dist/collection/components/ui-tabs/ui-tabs.js +13 -13
- 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 +30 -19
- package/dist/collection/components/ui-tooltip/ui-tooltip.css +16 -7
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +115 -25
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
- package/dist/collection/components/ui-tree/ui-tree.css +2 -1
- package/dist/collection/components/ui-tree/ui-tree.js +216 -12
- package/dist/collection/components/ui-tree-item/ui-tree-item.js +84 -25
- 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/icons.js +6 -1
- package/dist/collection/overlay/manager.js +6 -7
- package/dist/collection/utils/controlled-state.js +4 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-Bh_1GxOD.js +1 -0
- package/dist/components/p-Bk55QiUK.js +1 -0
- package/dist/components/p-BnGhGgTH.js +1 -0
- package/dist/components/p-C-0syqXZ.js +1 -0
- package/dist/components/p-CoFximGM.js +13 -0
- package/dist/components/p-DIGcRYAW.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-callout.d.ts +11 -0
- package/dist/components/ui-callout.js +1 -0
- package/dist/components/ui-checkbox.js +1 -1
- package/dist/components/ui-chip.d.ts +11 -0
- package/dist/components/ui-chip.js +1 -0
- 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 +1 -13
- package/dist/components/ui-tree.js +1 -1
- package/dist/esm/controlled-state-BnGhGgTH.js +6 -0
- package/dist/esm/icons-CoFximGM.js +678 -0
- 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 +2 -2
- package/dist/esm/ui-avatar-group.entry.js +10 -18
- package/dist/esm/ui-avatar.entry.js +3 -3
- package/dist/esm/ui-badge.entry.js +3 -3
- package/dist/esm/ui-button.entry.js +16 -5
- package/dist/esm/ui-callout.entry.js +25 -0
- package/dist/esm/ui-checkbox.entry.js +14 -8
- package/dist/esm/ui-chip.entry.js +17 -0
- 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 +46 -10
- package/dist/esm/ui-disclosure.entry.js +10 -7
- package/dist/esm/ui-floating-action-button.entry.js +2 -2
- package/dist/esm/ui-form-field.entry.js +61 -6
- 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 +3 -3
- package/dist/esm/ui-menu.entry.js +16 -11
- package/dist/esm/ui-popover.entry.js +12 -9
- package/dist/esm/ui-radio-group.entry.js +2 -2
- package/dist/esm/ui-radio.entry.js +18 -9
- 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 +20 -11
- package/dist/esm/ui-tabs.entry.js +11 -10
- package/dist/esm/ui-textarea.entry.js +10 -6
- package/dist/esm/ui-toast-region.entry.js +31 -20
- package/dist/esm/ui-tooltip.entry.js +63 -23
- package/dist/esm/ui-top-bar.entry.js +2 -2
- package/dist/esm/ui-tree-item.entry.js +57 -616
- package/dist/esm/ui-tree.entry.js +198 -14
- package/dist/index.cjs +2012 -870
- package/dist/index.d.cts +109 -1
- package/dist/index.d.ts +109 -1
- package/dist/index.js +72 -8
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/p-03f44c45.entry.js +1 -0
- package/dist/looma/p-08f80207.entry.js +1 -0
- package/dist/looma/p-13f8195a.entry.js +1 -0
- package/dist/looma/{p-d273b857.entry.js → p-25e18ad6.entry.js} +1 -1
- package/dist/looma/p-2c03fa73.entry.js +1 -0
- package/dist/looma/p-314d5c7c.entry.js +1 -0
- package/dist/looma/{p-2ed7e241.entry.js → p-3ef2a21b.entry.js} +1 -1
- package/dist/looma/{p-063f5a89.entry.js → p-5a900d89.entry.js} +1 -1
- package/dist/looma/p-5fdcee1d.entry.js +1 -0
- package/dist/looma/{p-0198bb21.entry.js → p-672e3d16.entry.js} +1 -1
- package/dist/looma/p-68430534.entry.js +1 -0
- package/dist/looma/{p-2e6f791e.entry.js → p-72338f53.entry.js} +1 -1
- package/dist/looma/p-7ab661ec.entry.js +1 -0
- package/dist/looma/p-7c4a225f.entry.js +1 -0
- package/dist/looma/p-82f2fa3d.entry.js +1 -0
- package/dist/looma/p-839faf55.entry.js +1 -0
- package/dist/looma/p-8BGiMGQ0.js +2 -0
- package/dist/looma/p-8e254bc4.entry.js +1 -0
- package/dist/looma/p-8e6b1001.entry.js +1 -0
- package/dist/looma/p-920656cf.entry.js +1 -0
- package/dist/looma/p-97e8cb0e.entry.js +1 -0
- package/dist/looma/p-9d2662ca.entry.js +1 -0
- package/dist/looma/p-9e1c4020.entry.js +1 -0
- package/dist/looma/p-BnGhGgTH.js +1 -0
- package/dist/looma/p-C-0syqXZ.js +1 -0
- package/dist/looma/p-CoFximGM.js +13 -0
- package/dist/looma/{p-051f578c.entry.js → p-a63e2561.entry.js} +1 -1
- package/dist/looma/p-add67e4c.entry.js +1 -0
- package/dist/looma/p-b63f6d4f.entry.js +1 -0
- package/dist/looma/p-bd00d4e8.entry.js +1 -0
- package/dist/looma/p-cc915913.entry.js +1 -0
- package/dist/looma/p-cfba8f7c.entry.js +1 -0
- package/dist/looma/p-d56571a2.entry.js +1 -0
- package/dist/looma/{p-7e94d90d.entry.js → p-e0f241ab.entry.js} +1 -1
- package/dist/looma/p-f1750fd7.entry.js +1 -0
- package/dist/looma/p-fd1e4d22.entry.js +1 -0
- package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +1 -2
- package/dist/types/components/ui-callout/ui-callout.d.ts +6 -0
- package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +2 -1
- package/dist/types/components/ui-chip/ui-chip.d.ts +6 -0
- package/dist/types/components/ui-combobox/ui-combobox.d.ts +93 -0
- package/dist/types/components/ui-dialog/ui-dialog.d.ts +7 -1
- package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +2 -1
- package/dist/types/components/ui-form-field/ui-form-field.d.ts +8 -0
- package/dist/types/components/ui-input/ui-input.d.ts +1 -1
- package/dist/types/components/ui-menu/ui-menu.d.ts +2 -1
- package/dist/types/components/ui-popover/ui-popover.d.ts +2 -1
- package/dist/types/components/ui-radio/ui-radio.d.ts +4 -1
- package/dist/types/components/ui-select/ui-select.d.ts +3 -2
- package/dist/types/components/ui-switch/ui-switch.d.ts +2 -1
- package/dist/types/components/ui-tabs/ui-tabs.d.ts +2 -1
- package/dist/types/components/ui-textarea/ui-textarea.d.ts +1 -1
- package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +3 -1
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +20 -2
- package/dist/types/components/ui-tree/ui-tree.d.ts +21 -1
- package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +13 -5
- package/dist/types/components.d.ts +366 -71
- 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/types/icons.d.ts +5 -0
- package/dist/types/utils/controlled-state.d.ts +4 -0
- package/dist/{ui-affordance-scope.entry-L533MECG.js → ui-affordance-scope.entry-3TUZ6GLW.js} +2 -2
- package/dist/ui-avatar-group.entry-XGJKN25W.js +51 -0
- package/dist/{ui-avatar.entry-3INAY3XP.js → ui-avatar.entry-SN3G44HW.js} +3 -3
- package/dist/ui-badge.entry-B6WDCWJX.js +22 -0
- package/dist/ui-button.entry-AZYUELLV.js +80 -0
- package/dist/ui-callout.entry-QRPWRMPC.js +32 -0
- package/dist/{ui-checkbox.entry-2PTBHSCQ.js → ui-checkbox.entry-OB6GFC4M.js} +17 -8
- package/dist/ui-chip.entry-XSNPJXX3.js +22 -0
- package/dist/ui-combobox.entry-IIMMUJF7.js +553 -0
- package/dist/{ui-context-menu.entry-AYDDCIZS.js → ui-context-menu.entry-AIULIE5Y.js} +3 -3
- package/dist/{ui-dialog.entry-I2XI3ZTZ.js → ui-dialog.entry-QSYWYHLY.js} +48 -10
- package/dist/{ui-disclosure.entry-5LY2BT7B.js → ui-disclosure.entry-3BJEYU3U.js} +13 -7
- package/dist/{ui-floating-action-button.entry-EJAMR5AM.js → ui-floating-action-button.entry-JEVNV6FI.js} +2 -2
- package/dist/ui-form-field.entry-PKSY7UU4.js +120 -0
- package/dist/{ui-icon-button.entry-7SD2LVXE.js → ui-icon-button.entry-TPX7BE7R.js} +2 -2
- package/dist/{ui-input.entry-7MM7GEQW.js → ui-input.entry-6NCLNW4E.js} +8 -6
- package/dist/ui-menu-item.entry-KA2K3PKV.js +22 -0
- package/dist/{ui-menu.entry-R4WK5QSX.js → ui-menu.entry-7GDO5L2T.js} +19 -11
- package/dist/{ui-popover.entry-ZRJRTXA7.js → ui-popover.entry-FR6YRNK6.js} +15 -9
- package/dist/{ui-radio-group.entry-S6RXHFSN.js → ui-radio-group.entry-7QHXQSNO.js} +2 -2
- package/dist/{ui-radio.entry-B73QZK2M.js → ui-radio.entry-YNMXKLDW.js} +21 -9
- package/dist/{ui-search-result-row.entry-DR2Y5S7P.js → ui-search-result-row.entry-AHVVAAIO.js} +2 -2
- package/dist/{ui-search-shell.entry-ST5IKJBC.js → ui-search-shell.entry-CNBEAMEZ.js} +2 -2
- package/dist/{ui-select.entry-7GPRFV67.js → ui-select.entry-TUY6TCTC.js} +13 -7
- package/dist/{ui-switch.entry-XQ5IRJRH.js → ui-switch.entry-26LFI7B5.js} +23 -11
- package/dist/{ui-tabs.entry-HPW5L5CY.js → ui-tabs.entry-LXB62RJJ.js} +14 -10
- package/dist/{ui-textarea.entry-W2PSRYVS.js → ui-textarea.entry-JYGMGPX2.js} +8 -6
- package/dist/{ui-toast-region.entry-FJUHFXKZ.js → ui-toast-region.entry-TOW4KZLZ.js} +29 -20
- package/dist/{ui-tooltip.entry-G5WHQW7K.js → ui-tooltip.entry-SKFNYXPH.js} +68 -25
- package/dist/{ui-top-bar.entry-3NCHFC4Y.js → ui-top-bar.entry-S3YP52EA.js} +2 -2
- package/dist/ui-tree-item.entry-LWYIPYLC.js +145 -0
- package/dist/{ui-tree.entry-SZW4Q5PY.js → ui-tree.entry-LXKUQFRU.js} +184 -13
- package/dist/valibot.d.ts +52 -0
- package/dist/valibot.js +7 -0
- package/editor/{chunk-QCOYOVQL.js → chunk-B5WVJOPV.js} +113 -97
- package/editor/extensions/index.d.ts +14 -6
- package/editor/extensions/index.js +1 -1
- package/editor/index.js +1 -1
- package/editor.css +37 -20
- package/package.json +11 -3
- package/styles.css +46 -20
- package/theme-high-contrast.css +12 -0
- package/tokens.css +26 -0
- package/vue/{chunk-5KWCMTXB.js → chunk-D4AJULDE.js} +116 -17
- package/vue/editor/index.d.ts +5 -15
- package/vue/editor/index.js +1 -1
- package/vue/index.d.ts +447 -115
- package/vue/index.js +7 -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-0584a051.entry.js +0 -1
- package/dist/looma/p-078f9fb8.entry.js +0 -1
- package/dist/looma/p-0f45c5f0.entry.js +0 -1
- package/dist/looma/p-11083743.entry.js +0 -1
- package/dist/looma/p-1674cda4.entry.js +0 -1
- package/dist/looma/p-1681b218.entry.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-5ba9d496.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-a9f46811.entry.js +0 -1
- package/dist/looma/p-b7aa4488.entry.js +0 -1
- package/dist/looma/p-caa8fc7b.entry.js +0 -1
- package/dist/looma/p-e3f99a24.entry.js +0 -1
- package/dist/looma/p-ed5abf6d.entry.js +0 -1
- package/dist/ui-avatar-group.entry-BWS7E2CM.js +0 -59
- package/dist/ui-badge.entry-2WOBVOYP.js +0 -22
- package/dist/ui-button.entry-VCGSEONK.js +0 -71
- package/dist/ui-form-field.entry-SJ6NNFXB.js +0 -67
- package/dist/ui-menu-item.entry-V3HIMR75.js +0 -22
- package/dist/ui-tree-item.entry-45RR3CMP.js +0 -385
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 {
|
|
@@ -402,7 +402,7 @@ var init_ui_affordance_scope_entry = __esm({
|
|
|
402
402
|
this.coordinator?.refresh();
|
|
403
403
|
};
|
|
404
404
|
render() {
|
|
405
|
-
return h(Host, { key: "
|
|
405
|
+
return h(Host, { key: "f500fa48554ed6224efd2dbe9632880bf0a15a19" }, h("slot", { key: "37c5c5b7925b260ff8f9edd411ee6c90a12a4909", onSlotchange: this.onSlotChange }));
|
|
406
406
|
}
|
|
407
407
|
static get watchers() {
|
|
408
408
|
return {
|
|
@@ -421,12 +421,11 @@ var ui_avatar_group_entry_exports = {};
|
|
|
421
421
|
__export(ui_avatar_group_entry_exports, {
|
|
422
422
|
ui_avatar_group: () => UIAvatarGroup
|
|
423
423
|
});
|
|
424
|
-
var uiAvatarGroupCss,
|
|
424
|
+
var uiAvatarGroupCss, UIAvatarGroup;
|
|
425
425
|
var init_ui_avatar_group_entry = __esm({
|
|
426
426
|
"dist/esm/ui-avatar-group.entry.js"() {
|
|
427
|
-
|
|
428
|
-
uiAvatarGroupCss = () => `:host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(
|
|
429
|
-
OVERFLOW_ATTR = "data-ui-avatar-group-overflow";
|
|
427
|
+
init_index_8BGiMGQ0();
|
|
428
|
+
uiAvatarGroupCss = () => `:host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type){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}`;
|
|
430
429
|
UIAvatarGroup = class {
|
|
431
430
|
constructor(hostRef) {
|
|
432
431
|
registerInstance(this, hostRef);
|
|
@@ -437,32 +436,25 @@ var init_ui_avatar_group_entry = __esm({
|
|
|
437
436
|
max = 5;
|
|
438
437
|
label = "People";
|
|
439
438
|
overflowCount = 0;
|
|
440
|
-
slotRef;
|
|
441
439
|
syncOverflow() {
|
|
442
440
|
this.updateOverflow();
|
|
443
441
|
}
|
|
444
442
|
componentDidLoad() {
|
|
445
|
-
this.slotRef?.addEventListener("slotchange", () => this.updateOverflow());
|
|
446
443
|
this.updateOverflow();
|
|
447
444
|
}
|
|
448
|
-
|
|
449
|
-
this.
|
|
445
|
+
visibleLimit() {
|
|
446
|
+
return Number.isFinite(this.max) ? Math.max(0, Math.floor(this.max)) : 0;
|
|
450
447
|
}
|
|
451
448
|
updateOverflow() {
|
|
452
|
-
const
|
|
453
|
-
const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
|
|
454
|
-
const children = nodes.filter((el) => !el.hasAttribute(OVERFLOW_ATTR));
|
|
449
|
+
const children = Array.from(this.host.children);
|
|
455
450
|
const total = children.length;
|
|
456
|
-
const
|
|
457
|
-
const overflowCount = total >
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
el.setAttribute("aria-hidden", String(i >= visibleCount));
|
|
461
|
-
});
|
|
462
|
-
this.overflowCount = overflowCount;
|
|
451
|
+
const visibleLimit = this.visibleLimit();
|
|
452
|
+
const overflowCount = total > visibleLimit ? total - visibleLimit : 0;
|
|
453
|
+
if (this.overflowCount !== overflowCount)
|
|
454
|
+
this.overflowCount = overflowCount;
|
|
463
455
|
}
|
|
464
456
|
render() {
|
|
465
|
-
return h(Host, { key: "
|
|
457
|
+
return h(Host, { key: "9ba6693cabc379bbbe6f5698160481f27fe02f31", role: "group", "aria-label": this.label || void 0 }, h("style", { key: "ed231fe96c16a3cdd5a66d4828664c75c6959a9e" }, `::slotted(:nth-child(n + ${this.visibleLimit() + 1})) { display: none !important; }`), h("slot", { key: "463005a7f3c498c80c768151ab32c873ff1abf86", onSlotchange: () => this.updateOverflow() }), this.overflowCount > 0 && h("span", { key: "dc1ba88fd97ca461e6518d223f00a93416e6d0f0", class: "overflow", role: "img", "aria-label": `${this.overflowCount} more ${this.overflowCount === 1 ? "person" : "people"}`, "data-ui-avatar-group-overflow": true }, "+", this.overflowCount));
|
|
466
458
|
}
|
|
467
459
|
static get watchers() {
|
|
468
460
|
return {
|
|
@@ -492,8 +484,8 @@ function toInitials(value) {
|
|
|
492
484
|
var uiAvatarCss, UIAvatar;
|
|
493
485
|
var init_ui_avatar_entry = __esm({
|
|
494
486
|
"dist/esm/ui-avatar.entry.js"() {
|
|
495
|
-
|
|
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
|
|
487
|
+
init_index_8BGiMGQ0();
|
|
488
|
+
uiAvatarCss = () => `:host{display:inline-flex}.avatar{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 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
489
|
UIAvatar = class {
|
|
498
490
|
constructor(hostRef) {
|
|
499
491
|
registerInstance(this, hostRef);
|
|
@@ -515,7 +507,7 @@ var init_ui_avatar_entry = __esm({
|
|
|
515
507
|
render() {
|
|
516
508
|
const fallbackText = this.fallback || toInitials(this.name || this.alt);
|
|
517
509
|
const label = this.alt || this.name || "Avatar";
|
|
518
|
-
return h(Host, { key: "
|
|
510
|
+
return h(Host, { key: "bbe6c3a775702022a19d819a6cc9d81d798cb3e1", role: "img", "aria-label": label, "data-has-image": this.hasImage ? "" : void 0 }, h("div", { key: "63402327ba5bde122bf5deaea09baf965ee9b047", class: "avatar" }, h("img", { key: "e52b86773684b80d76efa459cb03ae40881f959b", src: this.src, alt: label, onLoad: this.onImageLoad, onError: this.onImageError, hidden: !this.hasImage, "aria-hidden": this.hasImage ? "false" : "true" }), h("span", { key: "82a6d8f0d0c69ca52f81d092a2292fc80238265b", class: "fallback", hidden: this.hasImage, "aria-hidden": this.hasImage ? "true" : "false" }, fallbackText)));
|
|
519
511
|
}
|
|
520
512
|
static get watchers() {
|
|
521
513
|
return {
|
|
@@ -537,8 +529,8 @@ __export(ui_badge_entry_exports, {
|
|
|
537
529
|
var uiBadgeCss, UIBadge;
|
|
538
530
|
var init_ui_badge_entry = __esm({
|
|
539
531
|
"dist/esm/ui-badge.entry.js"() {
|
|
540
|
-
|
|
541
|
-
uiBadgeCss = () => `:host{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border
|
|
532
|
+
init_index_8BGiMGQ0();
|
|
533
|
+
uiBadgeCss = () => `:host{--ui-badge-surface:var(--ui-surface-muted);--ui-badge-text:var(--ui-text-secondary);--ui-badge-border:var(--ui-border-default);--ui-badge-font-size:var(--ui-font-size-xs);--ui-badge-font-weight:var(--ui-font-normal);--ui-badge-line-height:var(--ui-line-height-tight);--ui-badge-padding-block:var(--ui-space-0-5);--ui-badge-padding-inline:var(--ui-space-2);display:inline-flex;max-width:100%}.badge__surface{display:inline-flex;align-items:center;justify-content:center;max-width:100%;padding:var(--ui-badge-padding-block) var(--ui-badge-padding-inline);border:1px solid var(--ui-badge-border);border-radius:var(--ui-radius-round);background:var(--ui-badge-surface);color:var(--ui-badge-text);font-family:var(--ui-font-family-sans);font-size:var(--ui-badge-font-size);font-weight:var(--ui-badge-font-weight);line-height:var(--ui-badge-line-height);white-space:nowrap}:host([data-tone='accent']) .badge__surface{--ui-badge-surface:var(--ui-accent-solid);--ui-badge-border:var(--ui-accent-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-tone='danger']) .badge__surface{--ui-badge-surface:var(--ui-danger-solid);--ui-badge-border:var(--ui-danger-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-tone='success']) .badge__surface{--ui-badge-surface:var(--ui-success-solid);--ui-badge-border:var(--ui-success-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-tone='warning']) .badge__surface{--ui-badge-surface:var(--ui-warning-solid);--ui-badge-border:var(--ui-warning-solid);--ui-badge-text:var(--ui-text-primary)}:host([data-tone='info']) .badge__surface{--ui-badge-surface:var(--ui-info-solid);--ui-badge-border:var(--ui-info-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']) .badge__surface{--ui-badge-surface:var(--ui-accent-soft);--ui-badge-border:var(--ui-accent-soft);--ui-badge-text:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']) .badge__surface{--ui-badge-surface:var(--ui-danger-soft);--ui-badge-border:var(--ui-danger-soft);--ui-badge-text:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']) .badge__surface{--ui-badge-surface:var(--ui-success-soft);--ui-badge-border:var(--ui-success-soft);--ui-badge-text:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']) .badge__surface{--ui-badge-surface:var(--ui-warning-soft);--ui-badge-border:var(--ui-warning-soft);--ui-badge-text:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']) .badge__surface{--ui-badge-surface:var(--ui-info-soft);--ui-badge-border:var(--ui-info-soft);--ui-badge-text:var(--ui-info-solid)}`;
|
|
542
534
|
UIBadge = class {
|
|
543
535
|
constructor(hostRef) {
|
|
544
536
|
registerInstance(this, hostRef);
|
|
@@ -546,7 +538,7 @@ var init_ui_badge_entry = __esm({
|
|
|
546
538
|
variant;
|
|
547
539
|
tone;
|
|
548
540
|
render() {
|
|
549
|
-
return h(Host, { key: "
|
|
541
|
+
return h(Host, { key: "ba96ade6d037a7ed9958e7eed540e62782f846f0", "data-variant": this.variant || void 0, "data-tone": this.tone || void 0 }, h("span", { key: "a1e9587f59de479c19b9ea7aec8c8e932b998369", class: "badge__surface" }, h("slot", { key: "5835ddcea5cda472e700557528fd3cbc9d572616" })));
|
|
550
542
|
}
|
|
551
543
|
};
|
|
552
544
|
UIBadge.style = uiBadgeCss();
|
|
@@ -580,9 +572,9 @@ __export(ui_button_entry_exports, {
|
|
|
580
572
|
var uiButtonCss, UIButton;
|
|
581
573
|
var init_ui_button_entry = __esm({
|
|
582
574
|
"dist/esm/ui-button.entry.js"() {
|
|
583
|
-
|
|
575
|
+
init_index_8BGiMGQ0();
|
|
584
576
|
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}
|
|
577
|
+
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
578
|
UIButton = class {
|
|
587
579
|
constructor(hostRef) {
|
|
588
580
|
registerInstance(this, hostRef);
|
|
@@ -598,8 +590,17 @@ var init_ui_button_entry = __esm({
|
|
|
598
590
|
const btn = this.getButton();
|
|
599
591
|
if (!btn)
|
|
600
592
|
return;
|
|
601
|
-
|
|
602
|
-
|
|
593
|
+
if (this.size) {
|
|
594
|
+
this.host.dataset.size = this.size;
|
|
595
|
+
} else {
|
|
596
|
+
delete this.host.dataset.size;
|
|
597
|
+
}
|
|
598
|
+
if (this.disabled) {
|
|
599
|
+
this.host.dataset.disabled = "true";
|
|
600
|
+
} else {
|
|
601
|
+
delete this.host.dataset.disabled;
|
|
602
|
+
}
|
|
603
|
+
this.host.dataset.variant = this.variant;
|
|
603
604
|
btn.disabled = this.disabled;
|
|
604
605
|
}
|
|
605
606
|
componentDidLoad() {
|
|
@@ -622,7 +623,7 @@ var init_ui_button_entry = __esm({
|
|
|
622
623
|
this.host.click();
|
|
623
624
|
};
|
|
624
625
|
render() {
|
|
625
|
-
return h(Host, { key: "
|
|
626
|
+
return h(Host, { key: "58a90293e2ac169c8bc3c6cb3d15428cc73629b7", "data-size": this.size || void 0, "data-variant": this.variant, "data-disabled": this.disabled ? "true" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "05439bdc2af81bcabe9da11b4baf13f880e0a75f", ref: (el) => this.slotRef = el }));
|
|
626
627
|
}
|
|
627
628
|
static get watchers() {
|
|
628
629
|
return {
|
|
@@ -642,255 +643,1189 @@ var init_ui_button_entry = __esm({
|
|
|
642
643
|
}
|
|
643
644
|
});
|
|
644
645
|
|
|
645
|
-
// dist/esm/
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
ui_checkbox: () => UICheckbox
|
|
649
|
-
});
|
|
650
|
-
var uiCheckboxCss, UICheckbox;
|
|
651
|
-
var init_ui_checkbox_entry = __esm({
|
|
652
|
-
"dist/esm/ui-checkbox.entry.js"() {
|
|
653
|
-
init_index_CEeiinfk();
|
|
654
|
-
init_events_JwSoedEO();
|
|
655
|
-
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
|
-
UICheckbox = class {
|
|
657
|
-
constructor(hostRef) {
|
|
658
|
-
registerInstance(this, hostRef);
|
|
659
|
-
}
|
|
660
|
-
get host() {
|
|
661
|
-
return getElement(this);
|
|
662
|
-
}
|
|
663
|
-
checked = false;
|
|
664
|
-
defaultChecked = false;
|
|
665
|
-
disabled = false;
|
|
666
|
-
indeterminate = false;
|
|
667
|
-
required = false;
|
|
668
|
-
value = "on";
|
|
669
|
-
internalChecked = false;
|
|
670
|
-
slotRef;
|
|
671
|
-
syncFromProp() {
|
|
672
|
-
this.internalChecked = this.checked;
|
|
673
|
-
}
|
|
674
|
-
syncToInput() {
|
|
675
|
-
const input = this.getInput();
|
|
676
|
-
if (!input)
|
|
677
|
-
return;
|
|
678
|
-
this.host.dataset.disabled = this.disabled ? "true" : "";
|
|
679
|
-
this.host.setAttribute("aria-disabled", String(this.disabled));
|
|
680
|
-
input.checked = this.internalChecked;
|
|
681
|
-
input.indeterminate = this.indeterminate;
|
|
682
|
-
input.disabled = this.disabled;
|
|
683
|
-
input.required = this.required;
|
|
684
|
-
input.value = this.value;
|
|
685
|
-
}
|
|
686
|
-
componentDidLoad() {
|
|
687
|
-
this.syncFromProp();
|
|
688
|
-
this.internalChecked = this.internalChecked || this.defaultChecked;
|
|
689
|
-
this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
|
|
690
|
-
this.syncToInput();
|
|
691
|
-
const input = this.getInput();
|
|
692
|
-
input?.addEventListener("change", this.onInputChange);
|
|
693
|
-
}
|
|
694
|
-
disconnectedCallback() {
|
|
695
|
-
const input = this.getInput();
|
|
696
|
-
input?.removeEventListener("change", this.onInputChange);
|
|
697
|
-
}
|
|
698
|
-
componentDidUpdate() {
|
|
699
|
-
this.syncToInput();
|
|
700
|
-
}
|
|
701
|
-
getInput() {
|
|
702
|
-
const slot = this.host.shadowRoot?.querySelector("slot");
|
|
703
|
-
const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
|
|
704
|
-
return nodes.find((el) => el instanceof HTMLInputElement && el.type === "checkbox") ?? null;
|
|
705
|
-
}
|
|
706
|
-
onInputChange = (e) => {
|
|
707
|
-
const input = e.target;
|
|
708
|
-
if (!input)
|
|
709
|
-
return;
|
|
710
|
-
this.internalChecked = input.checked;
|
|
711
|
-
this.indeterminate = input.indeterminate;
|
|
712
|
-
dispatchDetail(this.host, "change", {
|
|
713
|
-
checked: this.internalChecked,
|
|
714
|
-
value: this.value,
|
|
715
|
-
trigger: eventToTrigger(e)
|
|
716
|
-
});
|
|
717
|
-
};
|
|
718
|
-
render() {
|
|
719
|
-
return h(Host, { key: "66b6708ae71c9eca6c03c63891b590bd050c2506", role: "checkbox", "aria-checked": this.indeterminate ? "mixed" : String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "b5e168a9ff0c6e5e747fff6c6264c59744f10a56", ref: (el) => this.slotRef = el }));
|
|
720
|
-
}
|
|
721
|
-
static get watchers() {
|
|
722
|
-
return {
|
|
723
|
-
"checked": [{
|
|
724
|
-
"syncFromProp": 0
|
|
725
|
-
}],
|
|
726
|
-
"internalChecked": [{
|
|
727
|
-
"syncToInput": 0
|
|
728
|
-
}],
|
|
729
|
-
"indeterminate": [{
|
|
730
|
-
"syncToInput": 0
|
|
731
|
-
}],
|
|
732
|
-
"disabled": [{
|
|
733
|
-
"syncToInput": 0
|
|
734
|
-
}],
|
|
735
|
-
"required": [{
|
|
736
|
-
"syncToInput": 0
|
|
737
|
-
}]
|
|
738
|
-
};
|
|
739
|
-
}
|
|
740
|
-
};
|
|
741
|
-
UICheckbox.style = uiCheckboxCss();
|
|
742
|
-
}
|
|
743
|
-
});
|
|
744
|
-
|
|
745
|
-
// dist/esm/manager-PM9a74r7.js
|
|
746
|
-
function syncScrollLock() {
|
|
747
|
-
if (typeof document === "undefined") {
|
|
748
|
-
return;
|
|
749
|
-
}
|
|
750
|
-
const root = document.documentElement;
|
|
751
|
-
if (modalCount > 0) {
|
|
752
|
-
root.setAttribute(scrollLockAttribute, "true");
|
|
753
|
-
root.style.overflow = "hidden";
|
|
754
|
-
return;
|
|
755
|
-
}
|
|
756
|
-
root.removeAttribute(scrollLockAttribute);
|
|
757
|
-
root.style.removeProperty("overflow");
|
|
758
|
-
}
|
|
759
|
-
function getOverlayDismissible(record) {
|
|
760
|
-
return record.dismissible ?? true;
|
|
761
|
-
}
|
|
762
|
-
function handleEscape(event) {
|
|
763
|
-
if (event.key !== "Escape") {
|
|
764
|
-
return;
|
|
765
|
-
}
|
|
766
|
-
requestTopOverlayClose("escape", "keyboard");
|
|
767
|
-
}
|
|
768
|
-
function handleLightDismiss(event) {
|
|
769
|
-
const top = getTopOverlay();
|
|
770
|
-
if (!top || !getOverlayDismissible(top)) {
|
|
771
|
-
return;
|
|
772
|
-
}
|
|
773
|
-
const target = event.target;
|
|
774
|
-
if (target instanceof Node) {
|
|
775
|
-
if (top.element.contains(target))
|
|
776
|
-
return;
|
|
777
|
-
if (top.relatedElements?.some((element) => element.contains(target)))
|
|
778
|
-
return;
|
|
779
|
-
}
|
|
780
|
-
requestTopOverlayClose("light-dismiss", "pointer");
|
|
781
|
-
}
|
|
782
|
-
function ensureListeners() {
|
|
783
|
-
if (listenersAttached || typeof document === "undefined") {
|
|
784
|
-
return;
|
|
785
|
-
}
|
|
786
|
-
document.addEventListener("keydown", handleEscape);
|
|
787
|
-
document.addEventListener("pointerdown", handleLightDismiss, { capture: true });
|
|
788
|
-
listenersAttached = true;
|
|
789
|
-
}
|
|
790
|
-
function removeListenersIfIdle() {
|
|
791
|
-
if (!listenersAttached || stack.length > 0 || typeof document === "undefined") {
|
|
792
|
-
return;
|
|
793
|
-
}
|
|
794
|
-
document.removeEventListener("keydown", handleEscape);
|
|
795
|
-
document.removeEventListener("pointerdown", handleLightDismiss, { capture: true });
|
|
796
|
-
listenersAttached = false;
|
|
797
|
-
}
|
|
798
|
-
function openOverlay(record) {
|
|
799
|
-
closeOverlay(record.id);
|
|
800
|
-
stack.push(record);
|
|
801
|
-
if (record.modal) {
|
|
802
|
-
modalCount += 1;
|
|
803
|
-
syncScrollLock();
|
|
804
|
-
}
|
|
805
|
-
ensureListeners();
|
|
646
|
+
// dist/esm/icons-CoFximGM.js
|
|
647
|
+
function serializeAttributes(attributes) {
|
|
648
|
+
return Object.entries(attributes).map(([name, value]) => ` ${name}="${escapeAttribute(value)}"`).join("");
|
|
806
649
|
}
|
|
807
|
-
function
|
|
808
|
-
|
|
809
|
-
if (index >= 0) {
|
|
810
|
-
const [record] = stack.splice(index, 1);
|
|
811
|
-
if (record?.modal) {
|
|
812
|
-
modalCount = Math.max(0, modalCount - 1);
|
|
813
|
-
syncScrollLock();
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
removeListenersIfIdle();
|
|
650
|
+
function escapeAttribute(value) {
|
|
651
|
+
return String(value).replaceAll("&", "&").replaceAll('"', """);
|
|
817
652
|
}
|
|
818
|
-
function
|
|
819
|
-
|
|
653
|
+
function serializeIconNode(node) {
|
|
654
|
+
const [tag, attributes] = node;
|
|
655
|
+
return `<${tag}${serializeAttributes(attributes)}></${tag}>`;
|
|
820
656
|
}
|
|
821
|
-
function
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
top.requestClose(reason, trigger);
|
|
830
|
-
return true;
|
|
657
|
+
function loomaIconMarkup(name, className = "looma-icon") {
|
|
658
|
+
return [
|
|
659
|
+
`<svg class="${escapeAttribute(className)}" data-looma-icon="${name}" aria-hidden="true" focusable="false"`,
|
|
660
|
+
' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"',
|
|
661
|
+
' stroke-linecap="round" stroke-linejoin="round">',
|
|
662
|
+
LOOMA_ICONS[name].map(serializeIconNode).join(""),
|
|
663
|
+
"</svg>"
|
|
664
|
+
].join("");
|
|
831
665
|
}
|
|
832
|
-
var
|
|
833
|
-
var
|
|
834
|
-
"dist/esm/
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
666
|
+
var Bold, Braces, ChevronDown, ChevronLeft, CircleCheck, CircleX, CodeXml, Columns3, Ellipsis, Eraser, GripHorizontal, GripVertical, Heading1, Heading2, Heading3, Highlighter, Image, Info, Italic, ListOrdered, ListTodo, List, Merge, Minus, NotebookPen, PaintBucket, PanelBottom, PanelLeft, PanelRight, PanelTop, Pilcrow, Plus, Quote, Redo2, Rows3, Split, Strikethrough, Table2, TextAlignCenter, TextAlignEnd, TextAlignStart, Trash2, TriangleAlert, Underline, Undo2, LOOMA_ICONS;
|
|
667
|
+
var init_icons_CoFximGM = __esm({
|
|
668
|
+
"dist/esm/icons-CoFximGM.js"() {
|
|
669
|
+
Bold = [
|
|
670
|
+
["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" }]
|
|
671
|
+
];
|
|
672
|
+
Braces = [
|
|
673
|
+
["path", { d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1" }],
|
|
674
|
+
["path", { d: "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1" }]
|
|
675
|
+
];
|
|
676
|
+
ChevronDown = [["path", { d: "m6 9 6 6 6-6" }]];
|
|
677
|
+
ChevronLeft = [["path", { d: "m15 18-6-6 6-6" }]];
|
|
678
|
+
CircleCheck = [
|
|
679
|
+
["circle", { cx: "12", cy: "12", r: "10" }],
|
|
680
|
+
["path", { d: "m9 12 2 2 4-4" }]
|
|
681
|
+
];
|
|
682
|
+
CircleX = [
|
|
683
|
+
["circle", { cx: "12", cy: "12", r: "10" }],
|
|
684
|
+
["path", { d: "m15 9-6 6" }],
|
|
685
|
+
["path", { d: "m9 9 6 6" }]
|
|
686
|
+
];
|
|
687
|
+
CodeXml = [
|
|
688
|
+
["path", { d: "m18 16 4-4-4-4" }],
|
|
689
|
+
["path", { d: "m6 8-4 4 4 4" }],
|
|
690
|
+
["path", { d: "m14.5 4-5 16" }]
|
|
691
|
+
];
|
|
692
|
+
Columns3 = [
|
|
693
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
694
|
+
["path", { d: "M9 3v18" }],
|
|
695
|
+
["path", { d: "M15 3v18" }]
|
|
696
|
+
];
|
|
697
|
+
Ellipsis = [
|
|
698
|
+
["circle", { cx: "12", cy: "12", r: "1" }],
|
|
699
|
+
["circle", { cx: "19", cy: "12", r: "1" }],
|
|
700
|
+
["circle", { cx: "5", cy: "12", r: "1" }]
|
|
701
|
+
];
|
|
702
|
+
Eraser = [
|
|
703
|
+
[
|
|
704
|
+
"path",
|
|
705
|
+
{
|
|
706
|
+
d: "M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21"
|
|
707
|
+
}
|
|
708
|
+
],
|
|
709
|
+
["path", { d: "m5.082 11.09 8.828 8.828" }]
|
|
710
|
+
];
|
|
711
|
+
GripHorizontal = [
|
|
712
|
+
["circle", { cx: "12", cy: "9", r: "1" }],
|
|
713
|
+
["circle", { cx: "19", cy: "9", r: "1" }],
|
|
714
|
+
["circle", { cx: "5", cy: "9", r: "1" }],
|
|
715
|
+
["circle", { cx: "12", cy: "15", r: "1" }],
|
|
716
|
+
["circle", { cx: "19", cy: "15", r: "1" }],
|
|
717
|
+
["circle", { cx: "5", cy: "15", r: "1" }]
|
|
718
|
+
];
|
|
719
|
+
GripVertical = [
|
|
720
|
+
["circle", { cx: "9", cy: "12", r: "1" }],
|
|
721
|
+
["circle", { cx: "9", cy: "5", r: "1" }],
|
|
722
|
+
["circle", { cx: "9", cy: "19", r: "1" }],
|
|
723
|
+
["circle", { cx: "15", cy: "12", r: "1" }],
|
|
724
|
+
["circle", { cx: "15", cy: "5", r: "1" }],
|
|
725
|
+
["circle", { cx: "15", cy: "19", r: "1" }]
|
|
726
|
+
];
|
|
727
|
+
Heading1 = [
|
|
728
|
+
["path", { d: "M4 12h8" }],
|
|
729
|
+
["path", { d: "M4 18V6" }],
|
|
730
|
+
["path", { d: "M12 18V6" }],
|
|
731
|
+
["path", { d: "m17 12 3-2v8" }]
|
|
732
|
+
];
|
|
733
|
+
Heading2 = [
|
|
734
|
+
["path", { d: "M4 12h8" }],
|
|
735
|
+
["path", { d: "M4 18V6" }],
|
|
736
|
+
["path", { d: "M12 18V6" }],
|
|
737
|
+
["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }]
|
|
738
|
+
];
|
|
739
|
+
Heading3 = [
|
|
740
|
+
["path", { d: "M4 12h8" }],
|
|
741
|
+
["path", { d: "M4 18V6" }],
|
|
742
|
+
["path", { d: "M12 18V6" }],
|
|
743
|
+
["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }],
|
|
744
|
+
["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }]
|
|
745
|
+
];
|
|
746
|
+
Highlighter = [
|
|
747
|
+
["path", { d: "m9 11-6 6v3h9l3-3" }],
|
|
748
|
+
["path", { d: "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" }]
|
|
749
|
+
];
|
|
750
|
+
Image = [
|
|
751
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }],
|
|
752
|
+
["circle", { cx: "9", cy: "9", r: "2" }],
|
|
753
|
+
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]
|
|
754
|
+
];
|
|
755
|
+
Info = [
|
|
756
|
+
["circle", { cx: "12", cy: "12", r: "10" }],
|
|
757
|
+
["path", { d: "M12 16v-4" }],
|
|
758
|
+
["path", { d: "M12 8h.01" }]
|
|
759
|
+
];
|
|
760
|
+
Italic = [
|
|
761
|
+
["line", { x1: "19", x2: "10", y1: "4", y2: "4" }],
|
|
762
|
+
["line", { x1: "14", x2: "5", y1: "20", y2: "20" }],
|
|
763
|
+
["line", { x1: "15", x2: "9", y1: "4", y2: "20" }]
|
|
764
|
+
];
|
|
765
|
+
ListOrdered = [
|
|
766
|
+
["path", { d: "M11 5h10" }],
|
|
767
|
+
["path", { d: "M11 12h10" }],
|
|
768
|
+
["path", { d: "M11 19h10" }],
|
|
769
|
+
["path", { d: "M4 4h1v5" }],
|
|
770
|
+
["path", { d: "M4 9h2" }],
|
|
771
|
+
["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" }]
|
|
772
|
+
];
|
|
773
|
+
ListTodo = [
|
|
774
|
+
["path", { d: "M13 5h8" }],
|
|
775
|
+
["path", { d: "M13 12h8" }],
|
|
776
|
+
["path", { d: "M13 19h8" }],
|
|
777
|
+
["path", { d: "m3 17 2 2 4-4" }],
|
|
778
|
+
["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1" }]
|
|
779
|
+
];
|
|
780
|
+
List = [
|
|
781
|
+
["path", { d: "M3 5h.01" }],
|
|
782
|
+
["path", { d: "M3 12h.01" }],
|
|
783
|
+
["path", { d: "M3 19h.01" }],
|
|
784
|
+
["path", { d: "M8 5h13" }],
|
|
785
|
+
["path", { d: "M8 12h13" }],
|
|
786
|
+
["path", { d: "M8 19h13" }]
|
|
787
|
+
];
|
|
788
|
+
Merge = [
|
|
789
|
+
["path", { d: "m8 6 4-4 4 4" }],
|
|
790
|
+
["path", { d: "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }],
|
|
791
|
+
["path", { d: "m20 22-5-5" }]
|
|
792
|
+
];
|
|
793
|
+
Minus = [["path", { d: "M5 12h14" }]];
|
|
794
|
+
NotebookPen = [
|
|
795
|
+
["path", { d: "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4" }],
|
|
796
|
+
["path", { d: "M2 6h4" }],
|
|
797
|
+
["path", { d: "M2 10h4" }],
|
|
798
|
+
["path", { d: "M2 14h4" }],
|
|
799
|
+
["path", { d: "M2 18h4" }],
|
|
800
|
+
[
|
|
801
|
+
"path",
|
|
802
|
+
{
|
|
803
|
+
d: "M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"
|
|
804
|
+
}
|
|
805
|
+
]
|
|
806
|
+
];
|
|
807
|
+
PaintBucket = [
|
|
808
|
+
["path", { d: "m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z" }],
|
|
809
|
+
["path", { d: "m5 2 5 5" }],
|
|
810
|
+
["path", { d: "M2 13h15" }],
|
|
811
|
+
["path", { d: "M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z" }]
|
|
812
|
+
];
|
|
813
|
+
PanelBottom = [
|
|
814
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
815
|
+
["path", { d: "M3 15h18" }]
|
|
816
|
+
];
|
|
817
|
+
PanelLeft = [
|
|
818
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
819
|
+
["path", { d: "M9 3v18" }]
|
|
820
|
+
];
|
|
821
|
+
PanelRight = [
|
|
822
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
823
|
+
["path", { d: "M15 3v18" }]
|
|
824
|
+
];
|
|
825
|
+
PanelTop = [
|
|
826
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
827
|
+
["path", { d: "M3 9h18" }]
|
|
828
|
+
];
|
|
829
|
+
Pilcrow = [
|
|
830
|
+
["path", { d: "M13 4v16" }],
|
|
831
|
+
["path", { d: "M17 4v16" }],
|
|
832
|
+
["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }]
|
|
833
|
+
];
|
|
834
|
+
Plus = [
|
|
835
|
+
["path", { d: "M5 12h14" }],
|
|
836
|
+
["path", { d: "M12 5v14" }]
|
|
837
|
+
];
|
|
838
|
+
Quote = [
|
|
839
|
+
[
|
|
840
|
+
"path",
|
|
841
|
+
{
|
|
842
|
+
d: "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
|
|
843
|
+
}
|
|
844
|
+
],
|
|
845
|
+
[
|
|
846
|
+
"path",
|
|
847
|
+
{
|
|
848
|
+
d: "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
|
|
849
|
+
}
|
|
850
|
+
]
|
|
851
|
+
];
|
|
852
|
+
Redo2 = [
|
|
853
|
+
["path", { d: "m15 14 5-5-5-5" }],
|
|
854
|
+
["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }]
|
|
855
|
+
];
|
|
856
|
+
Rows3 = [
|
|
857
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
858
|
+
["path", { d: "M21 9H3" }],
|
|
859
|
+
["path", { d: "M21 15H3" }]
|
|
860
|
+
];
|
|
861
|
+
Split = [
|
|
862
|
+
["path", { d: "M16 3h5v5" }],
|
|
863
|
+
["path", { d: "M8 3H3v5" }],
|
|
864
|
+
["path", { d: "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" }],
|
|
865
|
+
["path", { d: "m15 9 6-6" }]
|
|
866
|
+
];
|
|
867
|
+
Strikethrough = [
|
|
868
|
+
["path", { d: "M16 4H9a3 3 0 0 0-2.83 4" }],
|
|
869
|
+
["path", { d: "M14 12a4 4 0 0 1 0 8H6" }],
|
|
870
|
+
["line", { x1: "4", x2: "20", y1: "12", y2: "12" }]
|
|
871
|
+
];
|
|
872
|
+
Table2 = [
|
|
873
|
+
[
|
|
874
|
+
"path",
|
|
875
|
+
{
|
|
876
|
+
d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"
|
|
877
|
+
}
|
|
878
|
+
]
|
|
879
|
+
];
|
|
880
|
+
TextAlignCenter = [
|
|
881
|
+
["path", { d: "M21 5H3" }],
|
|
882
|
+
["path", { d: "M17 12H7" }],
|
|
883
|
+
["path", { d: "M19 19H5" }]
|
|
884
|
+
];
|
|
885
|
+
TextAlignEnd = [
|
|
886
|
+
["path", { d: "M21 5H3" }],
|
|
887
|
+
["path", { d: "M21 12H9" }],
|
|
888
|
+
["path", { d: "M21 19H7" }]
|
|
889
|
+
];
|
|
890
|
+
TextAlignStart = [
|
|
891
|
+
["path", { d: "M21 5H3" }],
|
|
892
|
+
["path", { d: "M15 12H3" }],
|
|
893
|
+
["path", { d: "M17 19H3" }]
|
|
894
|
+
];
|
|
895
|
+
Trash2 = [
|
|
896
|
+
["path", { d: "M10 11v6" }],
|
|
897
|
+
["path", { d: "M14 11v6" }],
|
|
898
|
+
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }],
|
|
899
|
+
["path", { d: "M3 6h18" }],
|
|
900
|
+
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]
|
|
901
|
+
];
|
|
902
|
+
TriangleAlert = [
|
|
903
|
+
["path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }],
|
|
904
|
+
["path", { d: "M12 9v4" }],
|
|
905
|
+
["path", { d: "M12 17h.01" }]
|
|
906
|
+
];
|
|
907
|
+
Underline = [
|
|
908
|
+
["path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }],
|
|
909
|
+
["line", { x1: "4", x2: "20", y1: "20", y2: "20" }]
|
|
910
|
+
];
|
|
911
|
+
Undo2 = [
|
|
912
|
+
["path", { d: "M9 14 4 9l5-5" }],
|
|
913
|
+
["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" }]
|
|
914
|
+
];
|
|
915
|
+
LOOMA_ICONS = {
|
|
916
|
+
"align-center": TextAlignCenter,
|
|
917
|
+
"align-left": TextAlignStart,
|
|
918
|
+
"align-right": TextAlignEnd,
|
|
919
|
+
bold: Bold,
|
|
920
|
+
braces: Braces,
|
|
921
|
+
"circle-check": CircleCheck,
|
|
922
|
+
"circle-x": CircleX,
|
|
923
|
+
"chevron-down": ChevronDown,
|
|
924
|
+
"chevron-left": ChevronLeft,
|
|
925
|
+
"code-xml": CodeXml,
|
|
926
|
+
columns: Columns3,
|
|
927
|
+
ellipsis: Ellipsis,
|
|
928
|
+
eraser: Eraser,
|
|
929
|
+
"grip-horizontal": GripHorizontal,
|
|
930
|
+
"grip-vertical": GripVertical,
|
|
931
|
+
"heading-1": Heading1,
|
|
932
|
+
"heading-2": Heading2,
|
|
933
|
+
"heading-3": Heading3,
|
|
934
|
+
highlighter: Highlighter,
|
|
935
|
+
image: Image,
|
|
936
|
+
info: Info,
|
|
937
|
+
italic: Italic,
|
|
938
|
+
list: List,
|
|
939
|
+
"list-ordered": ListOrdered,
|
|
940
|
+
"list-todo": ListTodo,
|
|
941
|
+
merge: Merge,
|
|
942
|
+
"notebook-pen": NotebookPen,
|
|
943
|
+
minus: Minus,
|
|
944
|
+
"paint-bucket": PaintBucket,
|
|
945
|
+
"panel-bottom": PanelBottom,
|
|
946
|
+
"panel-left": PanelLeft,
|
|
947
|
+
"panel-right": PanelRight,
|
|
948
|
+
"panel-top": PanelTop,
|
|
949
|
+
pilcrow: Pilcrow,
|
|
950
|
+
plus: Plus,
|
|
951
|
+
quote: Quote,
|
|
952
|
+
redo: Redo2,
|
|
953
|
+
rows: Rows3,
|
|
954
|
+
split: Split,
|
|
955
|
+
strikethrough: Strikethrough,
|
|
956
|
+
table: Table2,
|
|
957
|
+
trash: Trash2,
|
|
958
|
+
"triangle-alert": TriangleAlert,
|
|
959
|
+
underline: Underline,
|
|
960
|
+
undo: Undo2
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
});
|
|
964
|
+
|
|
965
|
+
// dist/esm/ui-callout.entry.js
|
|
966
|
+
var ui_callout_entry_exports = {};
|
|
967
|
+
__export(ui_callout_entry_exports, {
|
|
968
|
+
ui_callout: () => UICallout
|
|
969
|
+
});
|
|
970
|
+
var uiCalloutCss, toneIcons, UICallout;
|
|
971
|
+
var init_ui_callout_entry = __esm({
|
|
972
|
+
"dist/esm/ui-callout.entry.js"() {
|
|
973
|
+
init_index_8BGiMGQ0();
|
|
974
|
+
init_icons_CoFximGM();
|
|
975
|
+
uiCalloutCss = () => `:host{--ui-callout-surface:var(--ui-info-soft);--ui-callout-text:var(--ui-text-primary);--ui-callout-border:var(--ui-info-solid);--ui-callout-icon:var(--ui-info-solid);--ui-callout-padding-block:var(--ui-space-2);--ui-callout-padding-inline:var(--ui-space-3);--ui-callout-icon-column:1rem;--ui-callout-gap:var(--ui-space-2);--ui-callout-icon-size:1rem;--ui-callout-border-width:1px;--ui-callout-leading-border-width:4px;display:block;max-width:100%}.callout__surface{display:grid;grid-template-columns:var(--ui-callout-icon-column) minmax(0, 1fr);gap:var(--ui-callout-gap);align-items:start;padding:var(--ui-callout-padding-block) var(--ui-callout-padding-inline);border:var(--ui-callout-border-width) solid color-mix(in srgb, var(--ui-callout-border) 35%, transparent);border-inline-start:var(--ui-callout-leading-border-width) solid var(--ui-callout-border);border-radius:var(--ui-radius-2);background:var(--ui-callout-surface);color:var(--ui-callout-text);font-family:var(--ui-font-family-sans);font-size:var(--ui-font-size-sm);font-weight:var(--ui-font-normal);line-height:var(--ui-line-height-md)}.icon{display:grid;place-items:center;inline-size:var(--ui-callout-icon-column);block-size:var(--ui-callout-icon-column);color:var(--ui-callout-icon)}.icon svg{inline-size:var(--ui-callout-icon-size);block-size:var(--ui-callout-icon-size)}.content{min-inline-size:0}:host([data-tone='note']){--ui-callout-surface:var(--ui-surface-muted);--ui-callout-border:var(--ui-border-strong);--ui-callout-icon:var(--ui-text-secondary)}:host([data-tone='warning']){--ui-callout-surface:var(--ui-warning-soft);--ui-callout-border:var(--ui-warning-solid);--ui-callout-icon:var(--ui-warning-solid)}:host([data-tone='success']){--ui-callout-surface:var(--ui-success-soft);--ui-callout-border:var(--ui-success-solid);--ui-callout-icon:var(--ui-success-solid)}:host([data-tone='error']){--ui-callout-surface:var(--ui-danger-soft);--ui-callout-border:var(--ui-danger-solid);--ui-callout-icon:var(--ui-danger-solid)}`;
|
|
976
|
+
toneIcons = {
|
|
977
|
+
info: "info",
|
|
978
|
+
note: "notebook-pen",
|
|
979
|
+
warning: "triangle-alert",
|
|
980
|
+
success: "circle-check",
|
|
981
|
+
error: "circle-x"
|
|
982
|
+
};
|
|
983
|
+
UICallout = class {
|
|
984
|
+
constructor(hostRef) {
|
|
985
|
+
registerInstance(this, hostRef);
|
|
986
|
+
}
|
|
987
|
+
tone = "info";
|
|
988
|
+
render() {
|
|
989
|
+
const icon = toneIcons[this.tone] ?? toneIcons.info;
|
|
990
|
+
return h(Host, { key: "94bae6fbb688e5c8da979a3bebc12c51b8689c8a", role: "note", "data-tone": this.tone }, h("div", { key: "8fe1a3dae5b7cd3679d187cef018fa0cd810fb76", class: "callout__surface" }, h("span", { key: "ed62ad8e29c30489e075631d83f1732d7a53a378", class: "icon", "aria-hidden": "true", innerHTML: loomaIconMarkup(icon) }), h("div", { key: "97638d28e3979f71913c17b2501a90e3a9251f0f", class: "content" }, h("slot", { key: "6a91a0d3f189eae28aabbe278924ba7f89015f34" }))));
|
|
991
|
+
}
|
|
992
|
+
};
|
|
993
|
+
UICallout.style = uiCalloutCss();
|
|
994
|
+
}
|
|
995
|
+
});
|
|
996
|
+
|
|
997
|
+
// dist/esm/controlled-state-BnGhGgTH.js
|
|
998
|
+
var isControlled, controlledOrDefault;
|
|
999
|
+
var init_controlled_state_BnGhGgTH = __esm({
|
|
1000
|
+
"dist/esm/controlled-state-BnGhGgTH.js"() {
|
|
1001
|
+
isControlled = (value) => value !== void 0;
|
|
1002
|
+
controlledOrDefault = (value, defaultValue) => value === void 0 ? defaultValue : value;
|
|
1003
|
+
}
|
|
1004
|
+
});
|
|
1005
|
+
|
|
1006
|
+
// dist/esm/ui-checkbox.entry.js
|
|
1007
|
+
var ui_checkbox_entry_exports = {};
|
|
1008
|
+
__export(ui_checkbox_entry_exports, {
|
|
1009
|
+
ui_checkbox: () => UICheckbox
|
|
1010
|
+
});
|
|
1011
|
+
var uiCheckboxCss, UICheckbox;
|
|
1012
|
+
var init_ui_checkbox_entry = __esm({
|
|
1013
|
+
"dist/esm/ui-checkbox.entry.js"() {
|
|
1014
|
+
init_index_8BGiMGQ0();
|
|
1015
|
+
init_events_JwSoedEO();
|
|
1016
|
+
init_controlled_state_BnGhGgTH();
|
|
1017
|
+
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}`;
|
|
1018
|
+
UICheckbox = class {
|
|
1019
|
+
constructor(hostRef) {
|
|
1020
|
+
registerInstance(this, hostRef);
|
|
1021
|
+
}
|
|
1022
|
+
get host() {
|
|
1023
|
+
return getElement(this);
|
|
1024
|
+
}
|
|
1025
|
+
/** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
|
|
1026
|
+
checked;
|
|
1027
|
+
defaultChecked = false;
|
|
1028
|
+
disabled = false;
|
|
1029
|
+
indeterminate = false;
|
|
1030
|
+
required = false;
|
|
1031
|
+
value = "on";
|
|
1032
|
+
internalChecked = false;
|
|
1033
|
+
slotRef;
|
|
1034
|
+
syncFromProp() {
|
|
1035
|
+
if (isControlled(this.checked))
|
|
1036
|
+
this.internalChecked = this.checked;
|
|
1037
|
+
}
|
|
1038
|
+
syncToInput() {
|
|
1039
|
+
const input = this.getInput();
|
|
1040
|
+
if (!input)
|
|
1041
|
+
return;
|
|
1042
|
+
this.host.dataset.disabled = this.disabled ? "true" : "";
|
|
1043
|
+
this.host.setAttribute("aria-disabled", String(this.disabled));
|
|
1044
|
+
input.checked = this.internalChecked;
|
|
1045
|
+
input.indeterminate = this.indeterminate;
|
|
1046
|
+
input.disabled = this.disabled;
|
|
1047
|
+
input.required = this.required;
|
|
1048
|
+
input.value = this.value;
|
|
1049
|
+
}
|
|
1050
|
+
componentDidLoad() {
|
|
1051
|
+
this.internalChecked = controlledOrDefault(this.checked, this.defaultChecked);
|
|
1052
|
+
this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
|
|
1053
|
+
this.syncToInput();
|
|
1054
|
+
const input = this.getInput();
|
|
1055
|
+
input?.addEventListener("change", this.onInputChange);
|
|
1056
|
+
}
|
|
1057
|
+
disconnectedCallback() {
|
|
1058
|
+
const input = this.getInput();
|
|
1059
|
+
input?.removeEventListener("change", this.onInputChange);
|
|
1060
|
+
}
|
|
1061
|
+
componentDidUpdate() {
|
|
1062
|
+
this.syncToInput();
|
|
1063
|
+
}
|
|
1064
|
+
getInput() {
|
|
1065
|
+
const slot = this.host.shadowRoot?.querySelector("slot");
|
|
1066
|
+
const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
|
|
1067
|
+
return nodes.find((el) => el instanceof HTMLInputElement && el.type === "checkbox") ?? null;
|
|
1068
|
+
}
|
|
1069
|
+
onInputChange = (e) => {
|
|
1070
|
+
const input = e.target;
|
|
1071
|
+
if (!input)
|
|
1072
|
+
return;
|
|
1073
|
+
const checked = input.checked;
|
|
1074
|
+
if (!isControlled(this.checked))
|
|
1075
|
+
this.internalChecked = checked;
|
|
1076
|
+
else
|
|
1077
|
+
this.syncToInput();
|
|
1078
|
+
this.indeterminate = input.indeterminate;
|
|
1079
|
+
dispatchDetail(this.host, "change", {
|
|
1080
|
+
checked,
|
|
1081
|
+
value: this.value,
|
|
1082
|
+
trigger: eventToTrigger(e)
|
|
1083
|
+
});
|
|
1084
|
+
};
|
|
1085
|
+
render() {
|
|
1086
|
+
return h(Host, { key: "eb46eb41a5ab871058960bd2aa1163a03144bc0f", role: "checkbox", "aria-checked": this.indeterminate ? "mixed" : String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "ce18b1f1b63efebf048cd67b87064641cf4d915c", ref: (el) => this.slotRef = el }));
|
|
1087
|
+
}
|
|
1088
|
+
static get watchers() {
|
|
1089
|
+
return {
|
|
1090
|
+
"checked": [{
|
|
1091
|
+
"syncFromProp": 0
|
|
1092
|
+
}],
|
|
1093
|
+
"internalChecked": [{
|
|
1094
|
+
"syncToInput": 0
|
|
1095
|
+
}],
|
|
1096
|
+
"indeterminate": [{
|
|
1097
|
+
"syncToInput": 0
|
|
1098
|
+
}],
|
|
1099
|
+
"disabled": [{
|
|
1100
|
+
"syncToInput": 0
|
|
1101
|
+
}],
|
|
1102
|
+
"required": [{
|
|
1103
|
+
"syncToInput": 0
|
|
1104
|
+
}]
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
};
|
|
1108
|
+
UICheckbox.style = uiCheckboxCss();
|
|
1109
|
+
}
|
|
1110
|
+
});
|
|
1111
|
+
|
|
1112
|
+
// dist/esm/ui-chip.entry.js
|
|
1113
|
+
var ui_chip_entry_exports = {};
|
|
1114
|
+
__export(ui_chip_entry_exports, {
|
|
1115
|
+
ui_chip: () => UIChip
|
|
1116
|
+
});
|
|
1117
|
+
var uiChipCss, UIChip;
|
|
1118
|
+
var init_ui_chip_entry = __esm({
|
|
1119
|
+
"dist/esm/ui-chip.entry.js"() {
|
|
1120
|
+
init_index_8BGiMGQ0();
|
|
1121
|
+
uiChipCss = () => `:host{--ui-chip-surface:var(--ui-surface-subtle);--ui-chip-text:var(--ui-text-secondary);--ui-chip-border:var(--ui-border-default);--ui-chip-font-size:var(--ui-font-size-xs);--ui-chip-font-weight:var(--ui-font-normal);--ui-chip-line-height:var(--ui-line-height-tight);--ui-chip-padding-block:var(--ui-space-0-5);--ui-chip-padding-inline:var(--ui-space-2);--ui-chip-notch:var(--ui-space-1);display:inline-flex;max-width:100%}.chip__surface{display:inline-flex;align-items:center;max-width:100%;padding:var(--ui-chip-padding-block) var(--ui-chip-padding-inline);border:1px solid var(--ui-chip-border);background:var(--ui-chip-surface);color:var(--ui-chip-text) !important;font-family:var(--ui-font-family-sans) !important;font-size:var(--ui-chip-font-size) !important;font-weight:var(--ui-chip-font-weight) !important;line-height:var(--ui-chip-line-height) !important;white-space:nowrap}:host([data-appearance='pill']) .chip__surface{border-radius:var(--ui-radius-round)}:host([data-appearance='tag']) .chip__surface{border:0;padding-inline-end:calc(var(--ui-chip-padding-inline) + var(--ui-chip-notch));clip-path:polygon(0 0, calc(100% - var(--ui-chip-notch)) 0, 100% 50%, calc(100% - var(--ui-chip-notch)) 100%, 0 100%)}`;
|
|
1122
|
+
UIChip = class {
|
|
1123
|
+
constructor(hostRef) {
|
|
1124
|
+
registerInstance(this, hostRef);
|
|
1125
|
+
}
|
|
1126
|
+
/** `tag` has a square leading edge and an angled trailing edge; `pill` is fully rounded. */
|
|
1127
|
+
appearance = "tag";
|
|
1128
|
+
render() {
|
|
1129
|
+
return h(Host, { key: "fe1246a1e698098f0ca9cb04e749d5adf233e50c", "data-appearance": this.appearance }, h("span", { key: "a17237699b9eb20fb0a084adbd900a3aa9bc12b0", class: "chip__surface" }, h("slot", { key: "7f4e5dcc82d360083d4ded2617fa39a9dc1fd3ef" })));
|
|
1130
|
+
}
|
|
1131
|
+
};
|
|
1132
|
+
UIChip.style = uiChipCss();
|
|
1133
|
+
}
|
|
1134
|
+
});
|
|
1135
|
+
|
|
1136
|
+
// dist/esm/manager-C-0syqXZ.js
|
|
1137
|
+
function syncScrollLock() {
|
|
1138
|
+
if (typeof document === "undefined") {
|
|
1139
|
+
return;
|
|
1140
|
+
}
|
|
1141
|
+
const root = document.documentElement;
|
|
1142
|
+
if (modalCount > 0) {
|
|
1143
|
+
root.setAttribute(scrollLockAttribute, "true");
|
|
1144
|
+
root.style.overflow = "hidden";
|
|
1145
|
+
return;
|
|
1146
|
+
}
|
|
1147
|
+
root.removeAttribute(scrollLockAttribute);
|
|
1148
|
+
root.style.removeProperty("overflow");
|
|
1149
|
+
}
|
|
1150
|
+
function getOverlayDismissible(record) {
|
|
1151
|
+
return record.dismissible ?? true;
|
|
1152
|
+
}
|
|
1153
|
+
function handleEscape(event) {
|
|
1154
|
+
if (event.key !== "Escape") {
|
|
1155
|
+
return;
|
|
1156
|
+
}
|
|
1157
|
+
requestTopOverlayClose("escape", "keyboard");
|
|
1158
|
+
}
|
|
1159
|
+
function handleLightDismiss(event) {
|
|
1160
|
+
const top = getTopOverlay();
|
|
1161
|
+
if (!top || !getOverlayDismissible(top)) {
|
|
1162
|
+
return;
|
|
1163
|
+
}
|
|
1164
|
+
const boundary = [top.element, ...top.relatedElements ?? []];
|
|
1165
|
+
if (event.composedPath().some((target) => target instanceof Node && boundary.some((element) => element.contains(target))))
|
|
1166
|
+
return;
|
|
1167
|
+
requestTopOverlayClose("light-dismiss", "pointer");
|
|
1168
|
+
}
|
|
1169
|
+
function ensureListeners() {
|
|
1170
|
+
if (listenersAttached || typeof document === "undefined") {
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1173
|
+
document.addEventListener("keydown", handleEscape);
|
|
1174
|
+
document.addEventListener("pointerdown", handleLightDismiss, { capture: true });
|
|
1175
|
+
listenersAttached = true;
|
|
1176
|
+
}
|
|
1177
|
+
function removeListenersIfIdle() {
|
|
1178
|
+
if (!listenersAttached || stack.length > 0 || typeof document === "undefined") {
|
|
1179
|
+
return;
|
|
1180
|
+
}
|
|
1181
|
+
document.removeEventListener("keydown", handleEscape);
|
|
1182
|
+
document.removeEventListener("pointerdown", handleLightDismiss, { capture: true });
|
|
1183
|
+
listenersAttached = false;
|
|
1184
|
+
}
|
|
1185
|
+
function openOverlay(record) {
|
|
1186
|
+
closeOverlay(record.id);
|
|
1187
|
+
stack.push(record);
|
|
1188
|
+
if (record.modal) {
|
|
1189
|
+
modalCount += 1;
|
|
1190
|
+
syncScrollLock();
|
|
1191
|
+
}
|
|
1192
|
+
ensureListeners();
|
|
1193
|
+
}
|
|
1194
|
+
function closeOverlay(id) {
|
|
1195
|
+
const index = stack.findIndex((record) => record.id === id);
|
|
1196
|
+
if (index >= 0) {
|
|
1197
|
+
const [record] = stack.splice(index, 1);
|
|
1198
|
+
if (record?.modal) {
|
|
1199
|
+
modalCount = Math.max(0, modalCount - 1);
|
|
1200
|
+
syncScrollLock();
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
removeListenersIfIdle();
|
|
1204
|
+
}
|
|
1205
|
+
function getTopOverlay() {
|
|
1206
|
+
return stack.at(-1);
|
|
1207
|
+
}
|
|
1208
|
+
function requestTopOverlayClose(reason, trigger) {
|
|
1209
|
+
const top = getTopOverlay();
|
|
1210
|
+
if (!top) {
|
|
1211
|
+
return false;
|
|
1212
|
+
}
|
|
1213
|
+
if (!getOverlayDismissible(top) && (reason === "escape" || reason === "light-dismiss")) {
|
|
1214
|
+
return false;
|
|
1215
|
+
}
|
|
1216
|
+
top.requestClose(reason, trigger);
|
|
1217
|
+
return true;
|
|
1218
|
+
}
|
|
1219
|
+
var stack, scrollLockAttribute, modalCount, listenersAttached;
|
|
1220
|
+
var init_manager_C_0syqXZ = __esm({
|
|
1221
|
+
"dist/esm/manager-C-0syqXZ.js"() {
|
|
1222
|
+
stack = [];
|
|
1223
|
+
scrollLockAttribute = "data-ui-scroll-lock";
|
|
1224
|
+
modalCount = 0;
|
|
1225
|
+
listenersAttached = false;
|
|
1226
|
+
}
|
|
1227
|
+
});
|
|
1228
|
+
|
|
1229
|
+
// dist/esm/ui-combobox.entry.js
|
|
1230
|
+
var ui_combobox_entry_exports = {};
|
|
1231
|
+
__export(ui_combobox_entry_exports, {
|
|
1232
|
+
ui_combobox: () => UICombobox
|
|
1233
|
+
});
|
|
1234
|
+
function formatEditingValue(raw, selection, format) {
|
|
1235
|
+
const unchanged = { display: raw, selection };
|
|
1236
|
+
if (!format)
|
|
1237
|
+
return unchanged;
|
|
1238
|
+
let result;
|
|
1239
|
+
try {
|
|
1240
|
+
result = format(raw, selection);
|
|
1241
|
+
} catch {
|
|
1242
|
+
return unchanged;
|
|
1243
|
+
}
|
|
1244
|
+
if (!result)
|
|
1245
|
+
return unchanged;
|
|
1246
|
+
const characters = Array.from(raw);
|
|
1247
|
+
let cursor = 0;
|
|
1248
|
+
for (const character of result.display)
|
|
1249
|
+
if (character === characters[cursor])
|
|
1250
|
+
cursor += 1;
|
|
1251
|
+
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)
|
|
1252
|
+
return unchanged;
|
|
1253
|
+
return result;
|
|
1254
|
+
}
|
|
1255
|
+
async function validateField(request, config) {
|
|
1256
|
+
let output = request.raw;
|
|
1257
|
+
let issues = [];
|
|
1258
|
+
const check = () => request.signal.throwIfAborted();
|
|
1259
|
+
try {
|
|
1260
|
+
check();
|
|
1261
|
+
if (config.parse)
|
|
1262
|
+
output = await config.parse(request.raw, request);
|
|
1263
|
+
check();
|
|
1264
|
+
if (config.schema) {
|
|
1265
|
+
const result = await config.schema["~standard"].validate(output);
|
|
1266
|
+
check();
|
|
1267
|
+
if (result.issues)
|
|
1268
|
+
issues = result.issues;
|
|
1269
|
+
else if ("value" in result)
|
|
1270
|
+
output = result.value;
|
|
1271
|
+
}
|
|
1272
|
+
if (!issues.some((issue) => issue.severity !== "warning")) {
|
|
1273
|
+
if (config.normalize)
|
|
1274
|
+
output = await config.normalize(output, request);
|
|
1275
|
+
check();
|
|
1276
|
+
if (config.validator) {
|
|
1277
|
+
const result = await config.validator(output, request);
|
|
1278
|
+
check();
|
|
1279
|
+
issues = [...issues, ...result.issues ?? []];
|
|
1280
|
+
if ("output" in result)
|
|
1281
|
+
output = result.output;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
} catch (error) {
|
|
1285
|
+
check();
|
|
1286
|
+
issues = [{ message: error instanceof Error ? error.message : "Unable to validate this value." }];
|
|
1287
|
+
}
|
|
1288
|
+
issues = [...issues, ...config.issues ?? []];
|
|
1289
|
+
return { output: issues.some((issue) => issue.severity !== "warning") ? void 0 : output, issues };
|
|
1290
|
+
}
|
|
1291
|
+
var uiComboboxCss, UICombobox;
|
|
1292
|
+
var init_ui_combobox_entry = __esm({
|
|
1293
|
+
"dist/esm/ui-combobox.entry.js"() {
|
|
1294
|
+
init_index_8BGiMGQ0();
|
|
1295
|
+
init_positioning_Bu0dmLBE();
|
|
1296
|
+
init_manager_C_0syqXZ();
|
|
1297
|
+
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}}`;
|
|
1298
|
+
UICombobox = class {
|
|
1299
|
+
constructor(hostRef) {
|
|
1300
|
+
registerInstance(this, hostRef);
|
|
1301
|
+
this.queryChange = createEvent(this, "query-change");
|
|
1302
|
+
this.valueChange = createEvent(this, "value-change");
|
|
1303
|
+
this.freeEntry = createEvent(this, "free-entry");
|
|
1304
|
+
this.createEntry = createEvent(this, "create-entry");
|
|
1305
|
+
this.dependencyInvalidate = createEvent(this, "dependency-invalidate");
|
|
1306
|
+
this.validationChange = createEvent(this, "validation-change");
|
|
1307
|
+
this.optionsChange = createEvent(this, "options-change");
|
|
1308
|
+
}
|
|
1309
|
+
get host() {
|
|
1310
|
+
return getElement(this);
|
|
1311
|
+
}
|
|
1312
|
+
/** Accessible visible label, associated with the native text input. */
|
|
1313
|
+
label = "";
|
|
1314
|
+
placeholder = "";
|
|
1315
|
+
name = "";
|
|
1316
|
+
/** Controlled canonical value. Undefined selects uncontrolled mode; null means no selection. */
|
|
1317
|
+
value;
|
|
1318
|
+
defaultValue;
|
|
1319
|
+
/** Controlled raw editing text; independent of canonical selection. */
|
|
1320
|
+
query;
|
|
1321
|
+
defaultQuery = "";
|
|
1322
|
+
/** Immutable configuration; replace the object/context when dependencies change. */
|
|
1323
|
+
config = {};
|
|
1324
|
+
disabled = false;
|
|
1325
|
+
readOnly = false;
|
|
1326
|
+
required = false;
|
|
1327
|
+
size = "md";
|
|
1328
|
+
disclosure = false;
|
|
1329
|
+
clearable = false;
|
|
1330
|
+
/** Optional description shown by the connected question-mark button. */
|
|
1331
|
+
help = "";
|
|
1332
|
+
queryChange;
|
|
1333
|
+
valueChange;
|
|
1334
|
+
freeEntry;
|
|
1335
|
+
createEntry;
|
|
1336
|
+
dependencyInvalidate;
|
|
1337
|
+
validationChange;
|
|
1338
|
+
/** Supplies the current result rows for framework-owned rich slots. */
|
|
1339
|
+
optionsChange;
|
|
1340
|
+
raw = "";
|
|
1341
|
+
display = "";
|
|
1342
|
+
selected = null;
|
|
1343
|
+
expanded = false;
|
|
1344
|
+
rows = [];
|
|
1345
|
+
active = -1;
|
|
1346
|
+
loading = false;
|
|
1347
|
+
helpOpen = false;
|
|
1348
|
+
lookupError = "";
|
|
1349
|
+
validation = { status: "pristine", touched: false, dirty: false, issues: [] };
|
|
1350
|
+
input;
|
|
1351
|
+
popup;
|
|
1352
|
+
field;
|
|
1353
|
+
surface;
|
|
1354
|
+
lookup;
|
|
1355
|
+
validationRun;
|
|
1356
|
+
lookupTimer;
|
|
1357
|
+
composing = false;
|
|
1358
|
+
initialRaw = "";
|
|
1359
|
+
overlayId = `ui-combobox-${Math.random().toString(36).slice(2)}`;
|
|
1360
|
+
alive = false;
|
|
1361
|
+
fullSet = false;
|
|
1362
|
+
knownOptions = /* @__PURE__ */ new Map();
|
|
1363
|
+
awaitingLabel = null;
|
|
1364
|
+
proposedChange;
|
|
1365
|
+
formattedRaw;
|
|
1366
|
+
formattedWith;
|
|
1367
|
+
componentWillLoad() {
|
|
1368
|
+
this.selected = this.value !== void 0 ? this.value : this.defaultValue ?? null;
|
|
1369
|
+
this.raw = this.query ?? this.defaultQuery;
|
|
1370
|
+
if (this.query === void 0 && !this.raw && this.selected !== null) {
|
|
1371
|
+
this.raw = this.config.options?.find((row) => row.value === this.selected)?.label ?? this.selected;
|
|
1372
|
+
}
|
|
1373
|
+
if (this.query === void 0 && this.selected !== null && this.raw === this.selected)
|
|
1374
|
+
this.awaitingLabel = this.selected;
|
|
1375
|
+
this.display = this.raw;
|
|
1376
|
+
this.initialRaw = this.raw;
|
|
1377
|
+
this.applyServerIssues();
|
|
1378
|
+
}
|
|
1379
|
+
connectedCallback() {
|
|
1380
|
+
this.alive = true;
|
|
1381
|
+
this.setupSurface();
|
|
1382
|
+
}
|
|
1383
|
+
componentDidLoad() {
|
|
1384
|
+
this.setupSurface();
|
|
1385
|
+
}
|
|
1386
|
+
componentDidUpdate() {
|
|
1387
|
+
if (this.input && !this.composing && this.input.value !== this.display)
|
|
1388
|
+
this.input.value = this.display;
|
|
1389
|
+
if (this.expanded)
|
|
1390
|
+
this.surface?.refresh();
|
|
1391
|
+
}
|
|
1392
|
+
disconnectedCallback() {
|
|
1393
|
+
this.alive = false;
|
|
1394
|
+
this.close();
|
|
1395
|
+
this.validationRun?.abort();
|
|
1396
|
+
this.surface?.destroy();
|
|
1397
|
+
this.surface = void 0;
|
|
1398
|
+
}
|
|
1399
|
+
setupSurface() {
|
|
1400
|
+
if (!this.surface && this.popup && this.field)
|
|
1401
|
+
this.surface = createAnchoredSurface(this.popup, { anchor: this.field, placement: "bottom-start" });
|
|
1402
|
+
}
|
|
1403
|
+
syncValue() {
|
|
1404
|
+
if (this.value === void 0)
|
|
1405
|
+
return;
|
|
1406
|
+
this.selected = this.value;
|
|
1407
|
+
if (this.query === void 0) {
|
|
1408
|
+
const proposal = this.proposedChange;
|
|
1409
|
+
const option = this.config.options?.find((row) => row.value === this.selected) ?? (this.selected === null ? void 0 : this.knownOptions.get(this.selected));
|
|
1410
|
+
const nextRaw = proposal?.value === this.selected ? proposal.query : option?.label ?? this.selected ?? "";
|
|
1411
|
+
if (proposal?.value !== this.selected || nextRaw !== this.raw) {
|
|
1412
|
+
this.raw = nextRaw;
|
|
1413
|
+
this.display = this.raw;
|
|
1414
|
+
this.formattedRaw = void 0;
|
|
1415
|
+
}
|
|
1416
|
+
this.awaitingLabel = !option && this.selected !== null ? this.selected : null;
|
|
1417
|
+
}
|
|
1418
|
+
this.resetValidation();
|
|
1419
|
+
}
|
|
1420
|
+
syncQuery() {
|
|
1421
|
+
if (this.query === void 0 || this.query === this.raw)
|
|
1422
|
+
return;
|
|
1423
|
+
if (this.value === void 0 && this.proposedChange?.query !== this.query)
|
|
1424
|
+
this.selected = null;
|
|
1425
|
+
this.awaitingLabel = null;
|
|
1426
|
+
this.formattedRaw = void 0;
|
|
1427
|
+
this.raw = this.query;
|
|
1428
|
+
this.display = this.raw;
|
|
1429
|
+
this.resetValidation();
|
|
1430
|
+
if (this.expanded)
|
|
1431
|
+
this.search("input");
|
|
1432
|
+
}
|
|
1433
|
+
syncDisabled() {
|
|
1434
|
+
if (this.disabled || this.readOnly) {
|
|
1435
|
+
this.close();
|
|
1436
|
+
this.resetValidation();
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
syncConfig(next, previous) {
|
|
1440
|
+
this.validationRun?.abort();
|
|
1441
|
+
if (next.provider !== previous?.provider || next.context !== previous?.context)
|
|
1442
|
+
this.knownOptions.clear();
|
|
1443
|
+
if (next.context !== previous?.context) {
|
|
1444
|
+
this.close();
|
|
1445
|
+
const policy = next.invalidation ?? "retain-query";
|
|
1446
|
+
const value = policy === "retain" ? this.selected : null;
|
|
1447
|
+
const query = policy === "clear" ? "" : this.raw;
|
|
1448
|
+
this.commit(value, query, null, "invalidation", "programmatic");
|
|
1449
|
+
this.validation = { status: "pristine", touched: false, dirty: this.raw !== this.initialRaw, issues: [] };
|
|
1450
|
+
}
|
|
1451
|
+
this.applyServerIssues();
|
|
1452
|
+
if (this.expanded)
|
|
1453
|
+
this.search("context");
|
|
1454
|
+
}
|
|
1455
|
+
applyServerIssues() {
|
|
1456
|
+
const issues = this.config.issues ?? [];
|
|
1457
|
+
if (issues.length)
|
|
1458
|
+
this.setValidation({ issues }, this.validation.touched);
|
|
1459
|
+
else
|
|
1460
|
+
this.resetValidation();
|
|
1461
|
+
}
|
|
1462
|
+
resetValidation() {
|
|
1463
|
+
this.validationRun?.abort();
|
|
1464
|
+
this.validation = { status: "pristine", touched: this.validation.touched, dirty: this.raw !== this.initialRaw, issues: [] };
|
|
1465
|
+
this.validationChange?.emit(this.validation);
|
|
1466
|
+
}
|
|
1467
|
+
cancelLookup() {
|
|
1468
|
+
clearTimeout(this.lookupTimer);
|
|
1469
|
+
this.lookup?.abort();
|
|
1470
|
+
this.lookup = void 0;
|
|
1471
|
+
this.loading = false;
|
|
1472
|
+
}
|
|
1473
|
+
close() {
|
|
1474
|
+
this.expanded = false;
|
|
1475
|
+
this.active = -1;
|
|
1476
|
+
this.cancelLookup();
|
|
1477
|
+
this.surface?.hide();
|
|
1478
|
+
closeOverlay(this.overlayId);
|
|
1479
|
+
}
|
|
1480
|
+
open(reason = "input") {
|
|
1481
|
+
if (this.disabled || this.readOnly)
|
|
1482
|
+
return;
|
|
1483
|
+
this.expanded = true;
|
|
1484
|
+
if (this.popup && this.field)
|
|
1485
|
+
this.popup.style.minWidth = `${this.field.getBoundingClientRect().width}px`;
|
|
1486
|
+
this.surface?.show();
|
|
1487
|
+
openOverlay({
|
|
1488
|
+
id: this.overlayId,
|
|
1489
|
+
element: this.popup,
|
|
1490
|
+
relatedElements: [this.host],
|
|
1491
|
+
modal: false,
|
|
1492
|
+
requestClose: () => this.close()
|
|
1493
|
+
});
|
|
1494
|
+
this.search(reason);
|
|
1495
|
+
}
|
|
1496
|
+
search(reason) {
|
|
1497
|
+
this.cancelLookup();
|
|
1498
|
+
this.fullSet = reason === "disclosure";
|
|
1499
|
+
this.active = -1;
|
|
1500
|
+
this.lookupError = "";
|
|
1501
|
+
const config = this.config;
|
|
1502
|
+
const query = this.fullSet ? "" : this.raw;
|
|
1503
|
+
const controller = new AbortController();
|
|
1504
|
+
this.lookup = controller;
|
|
1505
|
+
const apply = (options) => {
|
|
1506
|
+
if (controller.signal.aborted || !this.alive)
|
|
1507
|
+
return;
|
|
1508
|
+
for (const option of options)
|
|
1509
|
+
this.knownOptions.set(option.value, option);
|
|
1510
|
+
const selectedOption = this.selected === null ? void 0 : this.knownOptions.get(this.selected);
|
|
1511
|
+
if (this.query === void 0 && this.awaitingLabel === this.selected && selectedOption) {
|
|
1512
|
+
this.raw = selectedOption.label;
|
|
1513
|
+
this.display = this.raw;
|
|
1514
|
+
this.awaitingLabel = null;
|
|
1515
|
+
this.formattedRaw = void 0;
|
|
1516
|
+
this.resetValidation();
|
|
1517
|
+
}
|
|
1518
|
+
const ids = /* @__PURE__ */ new Set();
|
|
1519
|
+
this.rows = options.filter((option) => {
|
|
1520
|
+
if (ids.has(option.id))
|
|
1521
|
+
return false;
|
|
1522
|
+
ids.add(option.id);
|
|
1523
|
+
return this.fullSet || (config.filter ? config.filter(option, query, config.context) : config.provider ? true : option.label.toLocaleLowerCase().includes(query.toLocaleLowerCase()));
|
|
1524
|
+
});
|
|
1525
|
+
const groups = /* @__PURE__ */ new Map();
|
|
1526
|
+
for (const row of this.rows) {
|
|
1527
|
+
const group = row.group ?? "";
|
|
1528
|
+
if (!groups.has(group))
|
|
1529
|
+
groups.set(group, []);
|
|
1530
|
+
groups.get(group).push(row);
|
|
1531
|
+
}
|
|
1532
|
+
this.rows = [...groups.values()].flat();
|
|
1533
|
+
this.loading = false;
|
|
1534
|
+
this.optionsChange.emit(this.rows);
|
|
1535
|
+
};
|
|
1536
|
+
if (!config.provider) {
|
|
1537
|
+
apply(config.options ?? []);
|
|
1538
|
+
return;
|
|
1539
|
+
}
|
|
1540
|
+
this.rows = [];
|
|
1541
|
+
this.loading = true;
|
|
1542
|
+
this.lookupTimer = setTimeout(async () => {
|
|
1543
|
+
try {
|
|
1544
|
+
apply(await config.provider({ query, context: config.context, signal: controller.signal, reason }));
|
|
1545
|
+
} catch (error) {
|
|
1546
|
+
if (controller.signal.aborted || !this.alive)
|
|
1547
|
+
return;
|
|
1548
|
+
this.loading = false;
|
|
1549
|
+
this.lookupError = error instanceof Error ? error.message : "Unable to load suggestions.";
|
|
1550
|
+
}
|
|
1551
|
+
}, reason === "disclosure" ? 0 : Math.max(0, config.debounce ?? 200));
|
|
1552
|
+
}
|
|
1553
|
+
get canCreate() {
|
|
1554
|
+
return Boolean(this.config.allowCreate && this.raw.trim() && !this.loading && !this.lookupError && !this.rows.some((row) => row.label.toLocaleLowerCase() === this.raw.toLocaleLowerCase()));
|
|
1555
|
+
}
|
|
1556
|
+
format(timing) {
|
|
1557
|
+
if ((this.config.formatOn ?? "blur") !== timing || !this.input)
|
|
1558
|
+
return;
|
|
1559
|
+
if (this.formattedRaw === this.raw && this.formattedWith === this.config.format)
|
|
1560
|
+
return;
|
|
1561
|
+
const result = formatEditingValue(this.raw, {
|
|
1562
|
+
start: this.input.selectionStart ?? this.raw.length,
|
|
1563
|
+
end: this.input.selectionEnd ?? this.raw.length,
|
|
1564
|
+
direction: this.input.selectionDirection ?? "none"
|
|
1565
|
+
}, this.config.format);
|
|
1566
|
+
this.formattedRaw = this.raw;
|
|
1567
|
+
this.formattedWith = this.config.format;
|
|
1568
|
+
this.display = result.display;
|
|
1569
|
+
if (this.input.value !== result.display) {
|
|
1570
|
+
this.input.value = result.display;
|
|
1571
|
+
this.input.setSelectionRange(result.selection.start, result.selection.end, result.selection.direction);
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
onInput = (event) => {
|
|
1575
|
+
if (this.composing || event.isComposing)
|
|
1576
|
+
return;
|
|
1577
|
+
this.awaitingLabel = null;
|
|
1578
|
+
this.formattedRaw = void 0;
|
|
1579
|
+
this.raw = this.input.value;
|
|
1580
|
+
this.display = this.raw;
|
|
1581
|
+
this.resetValidation();
|
|
1582
|
+
this.format("input");
|
|
1583
|
+
this.queryChange.emit({ query: this.raw, display: this.display, trigger: "keyboard" });
|
|
1584
|
+
if (this.selected !== null)
|
|
1585
|
+
this.commit(null, this.raw, null, "clear", "keyboard");
|
|
1586
|
+
this.open();
|
|
1587
|
+
if (this.config.validateOn === "input")
|
|
1588
|
+
void this.validate();
|
|
1589
|
+
queueMicrotask(() => {
|
|
1590
|
+
if (this.query !== void 0 && this.query !== this.raw)
|
|
1591
|
+
this.syncQuery();
|
|
1592
|
+
});
|
|
1593
|
+
};
|
|
1594
|
+
commit(value, query, option, kind, trigger) {
|
|
1595
|
+
this.awaitingLabel = null;
|
|
1596
|
+
const queryChanged = query !== this.raw;
|
|
1597
|
+
if (this.value === void 0)
|
|
1598
|
+
this.selected = value;
|
|
1599
|
+
if (this.query === void 0 && queryChanged) {
|
|
1600
|
+
this.raw = query;
|
|
1601
|
+
this.display = query;
|
|
1602
|
+
this.formattedRaw = void 0;
|
|
1603
|
+
}
|
|
1604
|
+
this.resetValidation();
|
|
1605
|
+
const detail = { value, query, option, kind, trigger };
|
|
1606
|
+
const proposal = { value, query };
|
|
1607
|
+
this.proposedChange = proposal;
|
|
1608
|
+
this.valueChange.emit(detail);
|
|
1609
|
+
if (queryChanged)
|
|
1610
|
+
this.queryChange.emit({ query, display: query, trigger });
|
|
1611
|
+
if (kind === "create")
|
|
1612
|
+
this.createEntry.emit(detail);
|
|
1613
|
+
if (kind === "free-entry")
|
|
1614
|
+
this.freeEntry.emit(detail);
|
|
1615
|
+
if (kind === "invalidation")
|
|
1616
|
+
this.dependencyInvalidate.emit(detail);
|
|
1617
|
+
queueMicrotask(() => {
|
|
1618
|
+
if (this.proposedChange !== proposal)
|
|
1619
|
+
return;
|
|
1620
|
+
if (this.value !== void 0 && this.value !== proposal.value)
|
|
1621
|
+
this.syncValue();
|
|
1622
|
+
if (this.query !== void 0 && this.query !== proposal.query) {
|
|
1623
|
+
if (this.value === void 0) {
|
|
1624
|
+
this.selected = null;
|
|
1625
|
+
this.resetValidation();
|
|
1626
|
+
}
|
|
1627
|
+
this.syncQuery();
|
|
1628
|
+
}
|
|
1629
|
+
this.proposedChange = void 0;
|
|
1630
|
+
});
|
|
1631
|
+
}
|
|
1632
|
+
choose(index, trigger) {
|
|
1633
|
+
const option = this.rows[index];
|
|
1634
|
+
if (option?.disabled)
|
|
1635
|
+
return;
|
|
1636
|
+
if (option)
|
|
1637
|
+
this.commit(option.value, option.label, option, "selection", trigger);
|
|
1638
|
+
else if (this.canCreate && index === this.rows.length)
|
|
1639
|
+
this.commit(null, this.raw, null, "create", trigger);
|
|
1640
|
+
else
|
|
1641
|
+
return;
|
|
1642
|
+
this.close();
|
|
1643
|
+
this.input?.focus();
|
|
1644
|
+
if (this.config.validateOn !== "submit")
|
|
1645
|
+
queueMicrotask(() => void this.validate());
|
|
1646
|
+
}
|
|
1647
|
+
move(key) {
|
|
1648
|
+
const indices = this.rows.flatMap((row, index) => row.disabled ? [] : [index]);
|
|
1649
|
+
if (this.canCreate)
|
|
1650
|
+
indices.push(this.rows.length);
|
|
1651
|
+
if (!indices.length)
|
|
1652
|
+
return;
|
|
1653
|
+
const current = indices.indexOf(this.active);
|
|
1654
|
+
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);
|
|
1655
|
+
this.active = indices[next];
|
|
1656
|
+
requestAnimationFrame(() => this.host.shadowRoot?.getElementById(`option-${this.active}`)?.scrollIntoView({ block: "nearest" }));
|
|
1657
|
+
}
|
|
1658
|
+
onKeydown = (event) => {
|
|
1659
|
+
if (this.composing || event.isComposing || this.disabled || this.readOnly)
|
|
1660
|
+
return;
|
|
1661
|
+
if (event.key === "Escape" && this.expanded) {
|
|
1662
|
+
event.preventDefault();
|
|
1663
|
+
event.stopPropagation();
|
|
1664
|
+
this.close();
|
|
1665
|
+
return;
|
|
1666
|
+
}
|
|
1667
|
+
if (event.key === "Tab") {
|
|
1668
|
+
this.close();
|
|
1669
|
+
return;
|
|
1670
|
+
}
|
|
1671
|
+
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
|
|
1672
|
+
return;
|
|
1673
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
1674
|
+
event.preventDefault();
|
|
1675
|
+
if (!this.expanded)
|
|
1676
|
+
this.open("disclosure");
|
|
1677
|
+
this.move(event.key);
|
|
1678
|
+
} else if ((event.key === "Home" || event.key === "End") && this.expanded && this.active >= 0) {
|
|
1679
|
+
event.preventDefault();
|
|
1680
|
+
this.move(event.key);
|
|
1681
|
+
} else if (event.key === "Enter" && this.expanded) {
|
|
1682
|
+
if (this.active >= 0) {
|
|
1683
|
+
event.preventDefault();
|
|
1684
|
+
this.choose(this.active, "keyboard");
|
|
1685
|
+
} else if (this.config.allowFreeText) {
|
|
1686
|
+
event.preventDefault();
|
|
1687
|
+
this.commit(null, this.raw, null, "free-entry", "keyboard");
|
|
1688
|
+
this.close();
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
};
|
|
1692
|
+
onFocusOut = (event) => {
|
|
1693
|
+
if (event.relatedTarget instanceof Node && this.host.shadowRoot?.contains(event.relatedTarget))
|
|
1694
|
+
return;
|
|
1695
|
+
this.close();
|
|
1696
|
+
this.format("blur");
|
|
1697
|
+
this.validation = { ...this.validation, touched: true };
|
|
1698
|
+
if (this.config.allowFreeText && this.selected === null)
|
|
1699
|
+
this.commit(null, this.raw, null, "free-entry", "keyboard");
|
|
1700
|
+
if ((this.config.validateOn ?? "blur") === "blur")
|
|
1701
|
+
void this.validate();
|
|
1702
|
+
};
|
|
1703
|
+
setValidation(result, touched = this.validation.touched) {
|
|
1704
|
+
const blocking = result.issues.some((issue) => issue.severity !== "warning");
|
|
1705
|
+
this.validation = {
|
|
1706
|
+
status: blocking ? "error" : result.issues.length ? "warning" : "valid",
|
|
1707
|
+
touched,
|
|
1708
|
+
dirty: this.raw !== this.initialRaw,
|
|
1709
|
+
...result
|
|
1710
|
+
};
|
|
1711
|
+
this.validationChange?.emit(this.validation);
|
|
1712
|
+
}
|
|
1713
|
+
/** Validate for submission. Caller submits only non-pending, non-error output. */
|
|
1714
|
+
async validate() {
|
|
1715
|
+
this.validationRun?.abort();
|
|
1716
|
+
const run = new AbortController();
|
|
1717
|
+
this.validationRun = run;
|
|
1718
|
+
this.validation = { ...this.validation, status: "pending", output: void 0 };
|
|
1719
|
+
this.validationChange.emit(this.validation);
|
|
1720
|
+
try {
|
|
1721
|
+
const result = await validateField({ raw: this.raw, value: this.selected, context: this.config.context, signal: run.signal }, this.config);
|
|
1722
|
+
if (this.required && !this.raw.trim())
|
|
1723
|
+
result.issues = [...result.issues, { message: "A value is required." }];
|
|
1724
|
+
else if (this.raw && this.selected === null && !this.config.allowFreeText && !this.config.allowCreate)
|
|
1725
|
+
result.issues = [...result.issues, { message: "Choose a suggestion." }];
|
|
1726
|
+
if (result.issues.some((issue) => issue.severity !== "warning"))
|
|
1727
|
+
result.output = void 0;
|
|
1728
|
+
if (!run.signal.aborted && this.alive)
|
|
1729
|
+
this.setValidation(result);
|
|
1730
|
+
} catch {
|
|
1731
|
+
}
|
|
1732
|
+
return this.validation;
|
|
1733
|
+
}
|
|
1734
|
+
render() {
|
|
1735
|
+
const description = [this.helpOpen ? "help-text" : "", this.validation.issues.length ? "validation" : ""].filter(Boolean).join(" ") || void 0;
|
|
1736
|
+
const status = this.loading ? "Loading suggestions\u2026" : this.lookupError || (this.expanded ? `${this.rows.length} suggestions available.` : "");
|
|
1737
|
+
const groups = [...new Set(this.rows.map((row) => row.group ?? ""))];
|
|
1738
|
+
return h(Host, { key: "b485462943bef9e5cb0a4b42f82888024132ab3a", "data-size": this.size, "data-validation": this.validation.status, onFocusout: this.onFocusOut }, h("label", { key: "99db32d80b0a250ff4ebea8481dda94be53df2eb", htmlFor: "input", part: "label" }, this.label, this.required ? " *" : ""), h("div", { key: "922adddf41c07215d3ec73947e8e3fe801c7ef89", class: "field", part: "field", ref: (element) => this.field = element }, h("input", { key: "557780297c5afee8112a5085984c5dd4ea1a02be", 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: () => {
|
|
1739
|
+
this.composing = false;
|
|
1740
|
+
this.onInput(new InputEvent("input"));
|
|
1741
|
+
} }), this.clearable && h("button", { key: "ab180bacc7f5232eb517b7fed9bee0d62a4b1156", type: "button", part: "affordance", "aria-label": `Clear ${this.label}`, disabled: this.disabled || this.readOnly, onClick: () => {
|
|
1742
|
+
this.commit(null, "", null, "clear", "pointer");
|
|
1743
|
+
this.close();
|
|
1744
|
+
this.input?.focus();
|
|
1745
|
+
} }, "\xD7"), this.help && h("button", { key: "b4ea9b44c9e22eb9ac259fb67b86368eede2b13f", id: "help", type: "button", part: "affordance", "aria-label": `Help for ${this.label}`, disabled: this.disabled }, h("span", { key: "36222d7a98a4f6abb12f785e9b4f28c2479a4e37", "aria-hidden": "true" }, "?")), this.disclosure && h("button", { key: "1d8757b7c817575b6915d0e8c164e20776df83e5", type: "button", part: "affordance", "aria-label": `Suggestions for ${this.label}`, "aria-controls": "listbox", "aria-expanded": String(this.expanded), disabled: this.disabled || this.readOnly, onClick: () => {
|
|
1746
|
+
if (this.expanded)
|
|
1747
|
+
this.close();
|
|
1748
|
+
else
|
|
1749
|
+
this.open("disclosure");
|
|
1750
|
+
this.input?.focus();
|
|
1751
|
+
} }, h("span", { key: "cd2dad7694dc24104521a58d4182d6e866f54095", "aria-hidden": "true" }, "\u2304"))), this.help && h("ui-tooltip", { key: "5e0eecd828a0e82d94b0be5b5f3233cddca4a87b", id: "help-text", for: "help", toggleOnClick: true, onOpen: () => this.helpOpen = true, onClose: () => this.helpOpen = false }, this.help), h("div", { key: "694902d8c8f58664838a943e0e2c14c856be9a08", class: "popup", part: "popup", hidden: !this.expanded, ref: (element) => this.popup = element }, h("div", { key: "81b18e296151afde18c47492aa997bdd13d553bc", 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: "dbf87523b5c6f17aedf15295d9703557f2d31524", 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: "bd4bdd2b132de7f72c1e5450fb0c0d16254aeedb", 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: "0d39fb1acb6d65307fabc3f502785a19710dc4af", id: "validation", class: "message", part: "validation", hidden: !this.validation.issues.length }, this.validation.issues.map((issue) => h("div", null, issue.message))), h("div", { key: "a83334d72b90ca0f411e6161a8bf5e2e8c2e33a8", 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(" ")));
|
|
1752
|
+
}
|
|
1753
|
+
static get watchers() {
|
|
1754
|
+
return {
|
|
1755
|
+
"value": [{
|
|
1756
|
+
"syncValue": 0
|
|
1757
|
+
}],
|
|
1758
|
+
"query": [{
|
|
1759
|
+
"syncQuery": 0
|
|
1760
|
+
}],
|
|
1761
|
+
"disabled": [{
|
|
1762
|
+
"syncDisabled": 0
|
|
1763
|
+
}],
|
|
1764
|
+
"readOnly": [{
|
|
1765
|
+
"syncDisabled": 0
|
|
1766
|
+
}],
|
|
1767
|
+
"config": [{
|
|
1768
|
+
"syncConfig": 0
|
|
1769
|
+
}]
|
|
1770
|
+
};
|
|
1771
|
+
}
|
|
1772
|
+
};
|
|
1773
|
+
UICombobox.style = uiComboboxCss();
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1776
|
+
|
|
1777
|
+
// dist/esm/ui-context-menu.entry.js
|
|
1778
|
+
var ui_context_menu_entry_exports = {};
|
|
1779
|
+
__export(ui_context_menu_entry_exports, {
|
|
1780
|
+
ui_context_menu: () => UIContextMenu
|
|
1781
|
+
});
|
|
1782
|
+
var uiContextMenuCss, UIContextMenu;
|
|
1783
|
+
var init_ui_context_menu_entry = __esm({
|
|
1784
|
+
"dist/esm/ui-context-menu.entry.js"() {
|
|
1785
|
+
init_index_8BGiMGQ0();
|
|
1786
|
+
init_manager_C_0syqXZ();
|
|
1787
|
+
init_events_JwSoedEO();
|
|
1788
|
+
init_positioning_Bu0dmLBE();
|
|
1789
|
+
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}}`;
|
|
1790
|
+
UIContextMenu = class {
|
|
1791
|
+
constructor(hostRef) {
|
|
1792
|
+
registerInstance(this, hostRef);
|
|
1793
|
+
}
|
|
1794
|
+
get host() {
|
|
1795
|
+
return getElement(this);
|
|
1796
|
+
}
|
|
1797
|
+
/** Controls the menu when the consumer owns open state. */
|
|
1798
|
+
open = false;
|
|
1799
|
+
/** Opens the menu on first client render. */
|
|
1800
|
+
defaultOpen = false;
|
|
1801
|
+
/** Optional id of the region that should also respond to a context-menu gesture. */
|
|
1802
|
+
for;
|
|
1803
|
+
internalOpen = false;
|
|
1804
|
+
focusTrigger = "programmatic";
|
|
1805
|
+
overlayId = `ui-context-menu-${Math.random().toString(36).slice(2, 11)}`;
|
|
1806
|
+
trigger = null;
|
|
1807
|
+
contextTarget = null;
|
|
1808
|
+
pointerX = 0;
|
|
1809
|
+
pointerY = 0;
|
|
1810
|
+
pointPositioned = false;
|
|
1811
|
+
surface = null;
|
|
1812
|
+
syncFromProp() {
|
|
1813
|
+
this.internalOpen = this.open;
|
|
1814
|
+
}
|
|
1815
|
+
syncTarget() {
|
|
1816
|
+
this.resolveTargets();
|
|
1817
|
+
this.attachTargetListeners();
|
|
1818
|
+
}
|
|
1819
|
+
syncOverlay() {
|
|
1820
|
+
this.syncTriggerState();
|
|
1821
|
+
if (this.internalOpen) {
|
|
1822
|
+
if (this.pointPositioned) {
|
|
1823
|
+
this.surface?.showAtPoint({ x: this.pointerX, y: this.pointerY });
|
|
1824
|
+
} else {
|
|
1825
|
+
this.surface?.show();
|
|
1826
|
+
}
|
|
1827
|
+
openOverlay({
|
|
1828
|
+
id: this.overlayId,
|
|
894
1829
|
modal: false,
|
|
895
1830
|
element: this.host,
|
|
896
1831
|
dismissible: true,
|
|
@@ -1060,7 +1995,7 @@ var init_ui_context_menu_entry = __esm({
|
|
|
1060
1995
|
this.closeMenu("action", "pointer");
|
|
1061
1996
|
};
|
|
1062
1997
|
render() {
|
|
1063
|
-
return h(Host, { key: "
|
|
1998
|
+
return h(Host, { key: "5d927f41a72e680ad6d6d4a3fa0c913360cb8660", "data-open": this.internalOpen ? "" : void 0, "data-focus-trigger": this.internalOpen ? this.focusTrigger : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "e5b1ec05d96093671fb839e3b81ddefb730575e1", name: "trigger" }), h("div", { key: "a0c4a8ca50bcca2b7d3ee53b4c26db054af93151", class: "menu", "data-open": this.internalOpen ? "" : void 0 }, h("ui-menu", { key: "ac03b9dc3fa56d0cbb28115060726de4500a668b", open: this.internalOpen }, h("slot", { key: "f2d8484cb9fb3956a3a5979795633a74d423577d" }))));
|
|
1064
1999
|
}
|
|
1065
2000
|
static get watchers() {
|
|
1066
2001
|
return {
|
|
@@ -1088,9 +2023,10 @@ __export(ui_dialog_entry_exports, {
|
|
|
1088
2023
|
var uiDialogCss, UIDialog;
|
|
1089
2024
|
var init_ui_dialog_entry = __esm({
|
|
1090
2025
|
"dist/esm/ui-dialog.entry.js"() {
|
|
1091
|
-
|
|
1092
|
-
|
|
2026
|
+
init_index_8BGiMGQ0();
|
|
2027
|
+
init_manager_C_0syqXZ();
|
|
1093
2028
|
init_events_JwSoedEO();
|
|
2029
|
+
init_controlled_state_BnGhGgTH();
|
|
1094
2030
|
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
2031
|
UIDialog = class {
|
|
1096
2032
|
constructor(hostRef) {
|
|
@@ -1099,17 +2035,27 @@ var init_ui_dialog_entry = __esm({
|
|
|
1099
2035
|
get host() {
|
|
1100
2036
|
return getElement(this);
|
|
1101
2037
|
}
|
|
1102
|
-
open
|
|
2038
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
2039
|
+
open;
|
|
1103
2040
|
defaultOpen = false;
|
|
1104
2041
|
modal = true;
|
|
1105
2042
|
dismissible = true;
|
|
1106
2043
|
/** Accessible name forwarded to the native dialog surface. */
|
|
1107
2044
|
label;
|
|
1108
2045
|
internalOpen = false;
|
|
2046
|
+
accessibleLabel = "Dialog";
|
|
1109
2047
|
overlayId = `ui-dialog-${Math.random().toString(36).slice(2, 11)}`;
|
|
1110
2048
|
dialogRef;
|
|
2049
|
+
contentObserver = null;
|
|
1111
2050
|
syncFromProp() {
|
|
1112
|
-
|
|
2051
|
+
if (isControlled(this.open))
|
|
2052
|
+
this.internalOpen = this.open;
|
|
2053
|
+
}
|
|
2054
|
+
syncLabelFromProp() {
|
|
2055
|
+
this.syncAccessibleLabel();
|
|
2056
|
+
}
|
|
2057
|
+
componentWillLoad() {
|
|
2058
|
+
this.syncAccessibleLabel();
|
|
1113
2059
|
}
|
|
1114
2060
|
syncOpen() {
|
|
1115
2061
|
if (this.dialogRef) {
|
|
@@ -1129,20 +2075,29 @@ var init_ui_dialog_entry = __esm({
|
|
|
1129
2075
|
}
|
|
1130
2076
|
}
|
|
1131
2077
|
componentDidLoad() {
|
|
1132
|
-
this.
|
|
1133
|
-
this.
|
|
2078
|
+
this.contentObserver = new MutationObserver(this.syncAccessibleLabel);
|
|
2079
|
+
this.contentObserver.observe(this.host, {
|
|
2080
|
+
childList: true,
|
|
2081
|
+
subtree: true,
|
|
2082
|
+
characterData: true
|
|
2083
|
+
});
|
|
2084
|
+
this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
|
|
1134
2085
|
this.dialogRef?.addEventListener("close", this.onDialogClose);
|
|
2086
|
+
this.syncAccessibleLabel();
|
|
1135
2087
|
this.syncOpen();
|
|
1136
2088
|
}
|
|
1137
2089
|
disconnectedCallback() {
|
|
1138
2090
|
this.dialogRef?.removeEventListener("close", this.onDialogClose);
|
|
2091
|
+
this.contentObserver?.disconnect();
|
|
2092
|
+
this.contentObserver = null;
|
|
1139
2093
|
closeOverlay(this.overlayId);
|
|
1140
2094
|
}
|
|
1141
2095
|
componentDidUpdate() {
|
|
1142
2096
|
this.syncOpen();
|
|
1143
2097
|
}
|
|
1144
2098
|
handleRequestClose(reason, trigger) {
|
|
1145
|
-
this.
|
|
2099
|
+
if (!isControlled(this.open))
|
|
2100
|
+
this.internalOpen = false;
|
|
1146
2101
|
dispatchDetail(this.host, "close", {
|
|
1147
2102
|
open: false,
|
|
1148
2103
|
reason,
|
|
@@ -1151,8 +2106,12 @@ var init_ui_dialog_entry = __esm({
|
|
|
1151
2106
|
}
|
|
1152
2107
|
onDialogClose = () => {
|
|
1153
2108
|
if (this.internalOpen) {
|
|
1154
|
-
this.
|
|
1155
|
-
|
|
2109
|
+
if (!isControlled(this.open)) {
|
|
2110
|
+
this.internalOpen = false;
|
|
2111
|
+
closeOverlay(this.overlayId);
|
|
2112
|
+
} else {
|
|
2113
|
+
requestAnimationFrame(() => this.syncOpen());
|
|
2114
|
+
}
|
|
1156
2115
|
dispatchDetail(this.host, "close", {
|
|
1157
2116
|
open: false,
|
|
1158
2117
|
reason: "programmatic",
|
|
@@ -1165,14 +2124,25 @@ var init_ui_dialog_entry = __esm({
|
|
|
1165
2124
|
requestTopOverlayClose("escape", "keyboard");
|
|
1166
2125
|
}
|
|
1167
2126
|
};
|
|
2127
|
+
syncAccessibleLabel = () => {
|
|
2128
|
+
const explicitLabel = this.label?.trim();
|
|
2129
|
+
const heading = this.host.querySelector('[slot="heading"], [data-ui-dialog-title], h1, h2, h3, h4, h5, h6');
|
|
2130
|
+
const headingLabel = heading?.textContent?.trim();
|
|
2131
|
+
const nextLabel = explicitLabel || headingLabel || "Dialog";
|
|
2132
|
+
if (this.accessibleLabel !== nextLabel)
|
|
2133
|
+
this.accessibleLabel = nextLabel;
|
|
2134
|
+
};
|
|
1168
2135
|
render() {
|
|
1169
|
-
return h(Host, { key: "
|
|
2136
|
+
return h(Host, { key: "b7aa33e24a74527a58718b3fa2218f5a09e9e439", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("dialog", { key: "f24455edc404581b5040c9c0090bf64141f9e296", ref: (el) => this.dialogRef = el, open: this.internalOpen, "aria-label": this.accessibleLabel }, h("slot", { key: "bad318e44b9c80dc0aae04ea5cdbb7b2ab472c35" })));
|
|
1170
2137
|
}
|
|
1171
2138
|
static get watchers() {
|
|
1172
2139
|
return {
|
|
1173
2140
|
"open": [{
|
|
1174
2141
|
"syncFromProp": 0
|
|
1175
2142
|
}],
|
|
2143
|
+
"label": [{
|
|
2144
|
+
"syncLabelFromProp": 0
|
|
2145
|
+
}],
|
|
1176
2146
|
"internalOpen": [{
|
|
1177
2147
|
"syncOpen": 0
|
|
1178
2148
|
}]
|
|
@@ -1203,9 +2173,10 @@ __export(ui_disclosure_entry_exports, {
|
|
|
1203
2173
|
var uiDisclosureCss, UIDisclosure;
|
|
1204
2174
|
var init_ui_disclosure_entry = __esm({
|
|
1205
2175
|
"dist/esm/ui-disclosure.entry.js"() {
|
|
1206
|
-
|
|
2176
|
+
init_index_8BGiMGQ0();
|
|
1207
2177
|
init_id_hgBUJRDa();
|
|
1208
2178
|
init_events_JwSoedEO();
|
|
2179
|
+
init_controlled_state_BnGhGgTH();
|
|
1209
2180
|
uiDisclosureCss = () => `:host{display:block}::slotted([hidden]){display:none !important}`;
|
|
1210
2181
|
UIDisclosure = class {
|
|
1211
2182
|
constructor(hostRef) {
|
|
@@ -1214,7 +2185,8 @@ var init_ui_disclosure_entry = __esm({
|
|
|
1214
2185
|
get host() {
|
|
1215
2186
|
return getElement(this);
|
|
1216
2187
|
}
|
|
1217
|
-
open
|
|
2188
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
2189
|
+
open;
|
|
1218
2190
|
defaultOpen = false;
|
|
1219
2191
|
disabled = false;
|
|
1220
2192
|
internalOpen = false;
|
|
@@ -1222,7 +2194,8 @@ var init_ui_disclosure_entry = __esm({
|
|
|
1222
2194
|
trigger = null;
|
|
1223
2195
|
content = null;
|
|
1224
2196
|
syncFromProp() {
|
|
1225
|
-
|
|
2197
|
+
if (isControlled(this.open))
|
|
2198
|
+
this.internalOpen = this.open;
|
|
1226
2199
|
}
|
|
1227
2200
|
syncState() {
|
|
1228
2201
|
if (this.trigger) {
|
|
@@ -1234,8 +2207,7 @@ var init_ui_disclosure_entry = __esm({
|
|
|
1234
2207
|
}
|
|
1235
2208
|
componentDidLoad() {
|
|
1236
2209
|
this.resolveParts();
|
|
1237
|
-
this.
|
|
1238
|
-
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
2210
|
+
this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
|
|
1239
2211
|
this.syncState();
|
|
1240
2212
|
this.trigger?.addEventListener("click", this.onTriggerClick);
|
|
1241
2213
|
this.trigger?.addEventListener("keydown", this.onTriggerKeydown);
|
|
@@ -1272,7 +2244,8 @@ var init_ui_disclosure_entry = __esm({
|
|
|
1272
2244
|
setOpen(next, action) {
|
|
1273
2245
|
if (this.internalOpen === next)
|
|
1274
2246
|
return;
|
|
1275
|
-
this.
|
|
2247
|
+
if (!isControlled(this.open))
|
|
2248
|
+
this.internalOpen = next;
|
|
1276
2249
|
dispatchDetail(this.host, next ? "open" : "close", {
|
|
1277
2250
|
open: next,
|
|
1278
2251
|
reason: action.reason,
|
|
@@ -1293,7 +2266,7 @@ var init_ui_disclosure_entry = __esm({
|
|
|
1293
2266
|
this.setOpen(!this.internalOpen, { reason: "action", trigger: "keyboard" });
|
|
1294
2267
|
};
|
|
1295
2268
|
render() {
|
|
1296
|
-
return h(Host, { key: "
|
|
2269
|
+
return h(Host, { key: "55a6fd71965104b96b55fd53870becce748a4116" }, h("slot", { key: "542727e10d335ff44fc7cf8250e80f045f89b8f2" }));
|
|
1297
2270
|
}
|
|
1298
2271
|
static get watchers() {
|
|
1299
2272
|
return {
|
|
@@ -1318,7 +2291,7 @@ __export(ui_floating_action_button_entry_exports, {
|
|
|
1318
2291
|
var uiFloatingActionButtonCss, UIFloatingActionButton;
|
|
1319
2292
|
var init_ui_floating_action_button_entry = __esm({
|
|
1320
2293
|
"dist/esm/ui-floating-action-button.entry.js"() {
|
|
1321
|
-
|
|
2294
|
+
init_index_8BGiMGQ0();
|
|
1322
2295
|
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
2296
|
UIFloatingActionButton = class {
|
|
1324
2297
|
constructor(hostRef) {
|
|
@@ -1328,7 +2301,7 @@ var init_ui_floating_action_button_entry = __esm({
|
|
|
1328
2301
|
mobileOnly = false;
|
|
1329
2302
|
label = "";
|
|
1330
2303
|
render() {
|
|
1331
|
-
return h(Host, { key: "
|
|
2304
|
+
return h(Host, { key: "b41f0aaabbcd23cb79ac06245e69fd8ecb9c9912", "data-disabled": this.disabled ? "" : void 0 }, h("button", { key: "36a023bd66d38845f1116874380d7a28bb46b5a2", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "412c41e4732cc230f84e7758bfc7faab7e0802e2" })));
|
|
1332
2305
|
}
|
|
1333
2306
|
};
|
|
1334
2307
|
UIFloatingActionButton.style = uiFloatingActionButtonCss();
|
|
@@ -1343,9 +2316,9 @@ __export(ui_form_field_entry_exports, {
|
|
|
1343
2316
|
var uiFormFieldCss, UIFormField;
|
|
1344
2317
|
var init_ui_form_field_entry = __esm({
|
|
1345
2318
|
"dist/esm/ui-form-field.entry.js"() {
|
|
1346
|
-
|
|
2319
|
+
init_index_8BGiMGQ0();
|
|
1347
2320
|
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}`;
|
|
2321
|
+
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
2322
|
UIFormField = class {
|
|
1350
2323
|
constructor(hostRef) {
|
|
1351
2324
|
registerInstance(this, hostRef);
|
|
@@ -1356,17 +2329,61 @@ var init_ui_form_field_entry = __esm({
|
|
|
1356
2329
|
invalid = false;
|
|
1357
2330
|
disabled = false;
|
|
1358
2331
|
required = false;
|
|
2332
|
+
observer = null;
|
|
2333
|
+
activeInput = null;
|
|
2334
|
+
ownedDescriptionIds = /* @__PURE__ */ new Set();
|
|
2335
|
+
wireQueued = false;
|
|
1359
2336
|
componentDidLoad() {
|
|
2337
|
+
this.observer = new MutationObserver(this.scheduleWire);
|
|
2338
|
+
this.observer.observe(this.host, {
|
|
2339
|
+
childList: true,
|
|
2340
|
+
subtree: true,
|
|
2341
|
+
attributes: true,
|
|
2342
|
+
attributeFilter: ["aria-describedby", "data-slot", "id", "role"]
|
|
2343
|
+
});
|
|
1360
2344
|
this.wire();
|
|
1361
2345
|
}
|
|
1362
2346
|
componentDidUpdate() {
|
|
1363
|
-
this.
|
|
2347
|
+
this.scheduleWire();
|
|
1364
2348
|
}
|
|
2349
|
+
disconnectedCallback() {
|
|
2350
|
+
this.observer?.disconnect();
|
|
2351
|
+
this.observer = null;
|
|
2352
|
+
this.removeOwnedDescriptions(this.activeInput);
|
|
2353
|
+
this.activeInput = null;
|
|
2354
|
+
this.ownedDescriptionIds.clear();
|
|
2355
|
+
}
|
|
2356
|
+
descriptionIds(input) {
|
|
2357
|
+
return Array.from(new Set((input.getAttribute("aria-describedby") ?? "").split(/\s+/).filter(Boolean)));
|
|
2358
|
+
}
|
|
2359
|
+
removeOwnedDescriptions(input) {
|
|
2360
|
+
if (!input || this.ownedDescriptionIds.size === 0)
|
|
2361
|
+
return;
|
|
2362
|
+
const remaining = this.descriptionIds(input).filter((id) => !this.ownedDescriptionIds.has(id));
|
|
2363
|
+
if (remaining.length > 0)
|
|
2364
|
+
input.setAttribute("aria-describedby", remaining.join(" "));
|
|
2365
|
+
else
|
|
2366
|
+
input.removeAttribute("aria-describedby");
|
|
2367
|
+
}
|
|
2368
|
+
scheduleWire = () => {
|
|
2369
|
+
if (this.wireQueued)
|
|
2370
|
+
return;
|
|
2371
|
+
this.wireQueued = true;
|
|
2372
|
+
queueMicrotask(() => {
|
|
2373
|
+
this.wireQueued = false;
|
|
2374
|
+
this.wire();
|
|
2375
|
+
});
|
|
2376
|
+
};
|
|
1365
2377
|
wire() {
|
|
1366
2378
|
const label = this.host.querySelector("label");
|
|
1367
2379
|
const input = this.host.querySelector("input, textarea, select");
|
|
1368
2380
|
const help = this.host.querySelector('[data-slot="help"]');
|
|
1369
2381
|
const error = this.host.querySelector('[data-slot="error"], [role="alert"]');
|
|
2382
|
+
if (input !== this.activeInput) {
|
|
2383
|
+
this.removeOwnedDescriptions(this.activeInput);
|
|
2384
|
+
this.activeInput = input;
|
|
2385
|
+
this.ownedDescriptionIds.clear();
|
|
2386
|
+
}
|
|
1370
2387
|
if (!input)
|
|
1371
2388
|
return;
|
|
1372
2389
|
if (!input.id) {
|
|
@@ -1375,6 +2392,8 @@ var init_ui_form_field_entry = __esm({
|
|
|
1375
2392
|
if (label && !label.getAttribute("for")) {
|
|
1376
2393
|
label.setAttribute("for", input.id);
|
|
1377
2394
|
}
|
|
2395
|
+
const previousOwnedIds = this.ownedDescriptionIds;
|
|
2396
|
+
const externalIds = this.descriptionIds(input).filter((id) => !previousOwnedIds.has(id));
|
|
1378
2397
|
const describedIds = [];
|
|
1379
2398
|
if (help) {
|
|
1380
2399
|
if (!help.id)
|
|
@@ -1386,15 +2405,22 @@ var init_ui_form_field_entry = __esm({
|
|
|
1386
2405
|
error.id = createId("form-field-error");
|
|
1387
2406
|
describedIds.push(error.id);
|
|
1388
2407
|
}
|
|
1389
|
-
|
|
1390
|
-
|
|
2408
|
+
const nextOwnedIds = describedIds.filter((id) => !externalIds.includes(id));
|
|
2409
|
+
const nextDescribedIds = Array.from(/* @__PURE__ */ new Set([...externalIds, ...describedIds]));
|
|
2410
|
+
const nextDescribedBy = nextDescribedIds.join(" ");
|
|
2411
|
+
if (input.getAttribute("aria-describedby") !== nextDescribedBy) {
|
|
2412
|
+
if (nextDescribedBy)
|
|
2413
|
+
input.setAttribute("aria-describedby", nextDescribedBy);
|
|
2414
|
+
else
|
|
2415
|
+
input.removeAttribute("aria-describedby");
|
|
1391
2416
|
}
|
|
2417
|
+
this.ownedDescriptionIds = new Set(nextOwnedIds);
|
|
1392
2418
|
input.disabled = this.disabled;
|
|
1393
2419
|
input.required = this.required;
|
|
1394
2420
|
input.setAttribute("aria-invalid", this.invalid ? "true" : "false");
|
|
1395
2421
|
}
|
|
1396
2422
|
render() {
|
|
1397
|
-
return h(Host, { key: "
|
|
2423
|
+
return h(Host, { key: "0b8fd5608631b5f9159fdf99d6eba918cc6587e4", "data-invalid": this.invalid ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-required": this.required ? "" : void 0 }, h("slot", { key: "4ed78782bcc8b6699a40d8402994b486d71d730a", onSlotchange: this.scheduleWire }));
|
|
1398
2424
|
}
|
|
1399
2425
|
};
|
|
1400
2426
|
UIFormField.style = uiFormFieldCss();
|
|
@@ -1409,7 +2435,7 @@ __export(ui_icon_button_entry_exports, {
|
|
|
1409
2435
|
var uiIconButtonCss, UIIconButton;
|
|
1410
2436
|
var init_ui_icon_button_entry = __esm({
|
|
1411
2437
|
"dist/esm/ui-icon-button.entry.js"() {
|
|
1412
|
-
|
|
2438
|
+
init_index_8BGiMGQ0();
|
|
1413
2439
|
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
2440
|
UIIconButton = class {
|
|
1415
2441
|
constructor(hostRef) {
|
|
@@ -1422,7 +2448,7 @@ var init_ui_icon_button_entry = __esm({
|
|
|
1422
2448
|
/** Reveals this control through a surrounding ui-affordance-scope. */
|
|
1423
2449
|
anticipatory = false;
|
|
1424
2450
|
render() {
|
|
1425
|
-
return h(Host, { key: "
|
|
2451
|
+
return h(Host, { key: "fb4534d977b4812f402855f78176b8316ebace61", "data-disabled": this.disabled ? "" : void 0, "data-ui-affordance": this.anticipatory ? "button" : void 0 }, h("button", { key: "b90d290870ad76ba18de88a6b6947a15040ff12a", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "88ded6ad90a4cfeffcd687990e5ba8b0c7d3bd30" })));
|
|
1426
2452
|
}
|
|
1427
2453
|
};
|
|
1428
2454
|
UIIconButton.style = uiIconButtonCss();
|
|
@@ -1437,9 +2463,9 @@ __export(ui_input_entry_exports, {
|
|
|
1437
2463
|
var uiInputCss, UIInput;
|
|
1438
2464
|
var init_ui_input_entry = __esm({
|
|
1439
2465
|
"dist/esm/ui-input.entry.js"() {
|
|
1440
|
-
|
|
2466
|
+
init_index_8BGiMGQ0();
|
|
1441
2467
|
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}`;
|
|
2468
|
+
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
2469
|
UIInput = class {
|
|
1444
2470
|
constructor(hostRef) {
|
|
1445
2471
|
registerInstance(this, hostRef);
|
|
@@ -1447,7 +2473,7 @@ var init_ui_input_entry = __esm({
|
|
|
1447
2473
|
get host() {
|
|
1448
2474
|
return getElement(this);
|
|
1449
2475
|
}
|
|
1450
|
-
value
|
|
2476
|
+
value;
|
|
1451
2477
|
defaultValue = "";
|
|
1452
2478
|
disabled = false;
|
|
1453
2479
|
invalid = false;
|
|
@@ -1455,14 +2481,16 @@ var init_ui_input_entry = __esm({
|
|
|
1455
2481
|
internalValue = "";
|
|
1456
2482
|
slotRef;
|
|
1457
2483
|
syncFromProp() {
|
|
1458
|
-
this.
|
|
2484
|
+
if (this.value !== void 0)
|
|
2485
|
+
this.internalValue = this.value;
|
|
1459
2486
|
}
|
|
1460
2487
|
syncToInput() {
|
|
1461
2488
|
const input = this.getInput();
|
|
1462
2489
|
if (!input)
|
|
1463
2490
|
return;
|
|
1464
2491
|
this.host.dataset.invalid = this.invalid ? "true" : "";
|
|
1465
|
-
|
|
2492
|
+
if (this.value !== void 0)
|
|
2493
|
+
input.value = this.internalValue;
|
|
1466
2494
|
input.defaultValue = this.defaultValue;
|
|
1467
2495
|
input.disabled = this.disabled;
|
|
1468
2496
|
input.readOnly = this.readOnly;
|
|
@@ -1510,7 +2538,7 @@ var init_ui_input_entry = __esm({
|
|
|
1510
2538
|
});
|
|
1511
2539
|
};
|
|
1512
2540
|
render() {
|
|
1513
|
-
return h(Host, { key: "
|
|
2541
|
+
return h(Host, { key: "fe125b4e8ec35e9ac0b0ca0434aa8439f515c51b", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "ec0609f9143435cf0436abb98488b9f30b71530b", ref: (el) => this.slotRef = el }));
|
|
1514
2542
|
}
|
|
1515
2543
|
static get watchers() {
|
|
1516
2544
|
return {
|
|
@@ -1547,8 +2575,8 @@ __export(ui_menu_item_entry_exports, {
|
|
|
1547
2575
|
var uiMenuItemCss, UIMenuItem;
|
|
1548
2576
|
var init_ui_menu_item_entry = __esm({
|
|
1549
2577
|
"dist/esm/ui-menu-item.entry.js"() {
|
|
1550
|
-
|
|
1551
|
-
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}`;
|
|
2578
|
+
init_index_8BGiMGQ0();
|
|
2579
|
+
uiMenuItemCss = () => `:host{display:block;width:100%}.menu-item__surface{display:block;box-sizing:border-box;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])) .menu-item__surface{background:var(--ui-surface-subtle)}:host([aria-disabled='true']) .menu-item__surface,:host([disabled]) .menu-item__surface{opacity:0.6;cursor:not-allowed}`;
|
|
1552
2580
|
UIMenuItem = class {
|
|
1553
2581
|
constructor(hostRef) {
|
|
1554
2582
|
registerInstance(this, hostRef);
|
|
@@ -1556,7 +2584,7 @@ var init_ui_menu_item_entry = __esm({
|
|
|
1556
2584
|
disabled = false;
|
|
1557
2585
|
value = "";
|
|
1558
2586
|
render() {
|
|
1559
|
-
return h(Host, { key: "
|
|
2587
|
+
return h(Host, { key: "f8a1721f8e516af04f901b53c3a66ce1de932608", role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? "true" : void 0, "data-value": this.value || void 0 }, h("span", { key: "6483d0b3ce1be06aed214f626b2d6a2963a44ade", class: "menu-item__surface" }, h("slot", { key: "db470b1cbb54d56a14d05c0d7f72c43e37f4263e" })));
|
|
1560
2588
|
}
|
|
1561
2589
|
};
|
|
1562
2590
|
UIMenuItem.style = uiMenuItemCss();
|
|
@@ -1571,11 +2599,12 @@ __export(ui_menu_entry_exports, {
|
|
|
1571
2599
|
var uiMenuCss, UIMenu;
|
|
1572
2600
|
var init_ui_menu_entry = __esm({
|
|
1573
2601
|
"dist/esm/ui-menu.entry.js"() {
|
|
1574
|
-
|
|
2602
|
+
init_index_8BGiMGQ0();
|
|
1575
2603
|
init_events_JwSoedEO();
|
|
1576
|
-
|
|
2604
|
+
init_manager_C_0syqXZ();
|
|
2605
|
+
init_controlled_state_BnGhGgTH();
|
|
1577
2606
|
init_positioning_Bu0dmLBE();
|
|
1578
|
-
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)
|
|
2607
|
+
uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;box-sizing:border-box;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:0;border:0;border-radius:0;background:transparent;box-shadow:var(--ui-shadow-lg)}.menu__surface{display:flex;flex-direction:column;box-sizing:border-box;padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3)}: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%}`;
|
|
1579
2608
|
UIMenu = class {
|
|
1580
2609
|
constructor(hostRef) {
|
|
1581
2610
|
registerInstance(this, hostRef);
|
|
@@ -1583,7 +2612,8 @@ var init_ui_menu_entry = __esm({
|
|
|
1583
2612
|
get host() {
|
|
1584
2613
|
return getElement(this);
|
|
1585
2614
|
}
|
|
1586
|
-
open
|
|
2615
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
2616
|
+
open;
|
|
1587
2617
|
defaultOpen = false;
|
|
1588
2618
|
/** Id of the control that anchors this menu in the top layer. */
|
|
1589
2619
|
for;
|
|
@@ -1594,7 +2624,8 @@ var init_ui_menu_entry = __esm({
|
|
|
1594
2624
|
anchor = null;
|
|
1595
2625
|
surface = null;
|
|
1596
2626
|
syncFromProp() {
|
|
1597
|
-
|
|
2627
|
+
if (isControlled(this.open))
|
|
2628
|
+
this.internalOpen = this.open;
|
|
1598
2629
|
}
|
|
1599
2630
|
resetSurface() {
|
|
1600
2631
|
this.setupSurface();
|
|
@@ -1620,8 +2651,7 @@ var init_ui_menu_entry = __esm({
|
|
|
1620
2651
|
}
|
|
1621
2652
|
}
|
|
1622
2653
|
componentDidLoad() {
|
|
1623
|
-
this.
|
|
1624
|
-
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
2654
|
+
this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
|
|
1625
2655
|
this.host.addEventListener("click", this.onItemClick);
|
|
1626
2656
|
this.host.addEventListener("keydown", this.onKeydown);
|
|
1627
2657
|
this.setupSurface();
|
|
@@ -1654,7 +2684,8 @@ var init_ui_menu_entry = __esm({
|
|
|
1654
2684
|
closeMenu(reason, trigger) {
|
|
1655
2685
|
if (!this.internalOpen)
|
|
1656
2686
|
return;
|
|
1657
|
-
this.
|
|
2687
|
+
if (!isControlled(this.open))
|
|
2688
|
+
this.internalOpen = false;
|
|
1658
2689
|
dispatchDetail(this.host, "close", {
|
|
1659
2690
|
open: false,
|
|
1660
2691
|
reason,
|
|
@@ -1682,7 +2713,8 @@ var init_ui_menu_entry = __esm({
|
|
|
1682
2713
|
reason: "action",
|
|
1683
2714
|
trigger: eventToTrigger(e)
|
|
1684
2715
|
});
|
|
1685
|
-
this.
|
|
2716
|
+
if (!isControlled(this.open))
|
|
2717
|
+
this.internalOpen = false;
|
|
1686
2718
|
};
|
|
1687
2719
|
onKeydown = (e) => {
|
|
1688
2720
|
if (e.key === "Escape") {
|
|
@@ -1705,7 +2737,8 @@ var init_ui_menu_entry = __esm({
|
|
|
1705
2737
|
reason: "action",
|
|
1706
2738
|
trigger: "keyboard"
|
|
1707
2739
|
});
|
|
1708
|
-
this.
|
|
2740
|
+
if (!isControlled(this.open))
|
|
2741
|
+
this.internalOpen = false;
|
|
1709
2742
|
}
|
|
1710
2743
|
return;
|
|
1711
2744
|
}
|
|
@@ -1716,7 +2749,7 @@ var init_ui_menu_entry = __esm({
|
|
|
1716
2749
|
}
|
|
1717
2750
|
};
|
|
1718
2751
|
render() {
|
|
1719
|
-
return h(Host, { key: "
|
|
2752
|
+
return h(Host, { key: "c5af7acaf41b75165e9f7cf47d65b7a1dcd4d1c0", role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? "" : void 0 }, h("div", { key: "058fff9a00a1dcba26f6db425096e7a96d889896", class: "menu__surface" }, h("slot", { key: "dbbf9eb4ba2a348b6d85049e229ed0562ee17318" })));
|
|
1720
2753
|
}
|
|
1721
2754
|
static get watchers() {
|
|
1722
2755
|
return {
|
|
@@ -1747,11 +2780,12 @@ __export(ui_popover_entry_exports, {
|
|
|
1747
2780
|
var uiPopoverCss, UIPopover;
|
|
1748
2781
|
var init_ui_popover_entry = __esm({
|
|
1749
2782
|
"dist/esm/ui-popover.entry.js"() {
|
|
1750
|
-
|
|
1751
|
-
|
|
2783
|
+
init_index_8BGiMGQ0();
|
|
2784
|
+
init_manager_C_0syqXZ();
|
|
1752
2785
|
init_events_JwSoedEO();
|
|
2786
|
+
init_controlled_state_BnGhGgTH();
|
|
1753
2787
|
init_positioning_Bu0dmLBE();
|
|
1754
|
-
uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);
|
|
2788
|
+
uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);box-sizing:border-box;max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:auto;padding:0;border:0;border-radius:0;background:transparent;box-shadow:var(--ui-shadow-lg)}.popover__surface{box-sizing:border-box;padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3)}: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}}`;
|
|
1755
2789
|
UIPopover = class {
|
|
1756
2790
|
constructor(hostRef) {
|
|
1757
2791
|
registerInstance(this, hostRef);
|
|
@@ -1759,7 +2793,8 @@ var init_ui_popover_entry = __esm({
|
|
|
1759
2793
|
get host() {
|
|
1760
2794
|
return getElement(this);
|
|
1761
2795
|
}
|
|
1762
|
-
open
|
|
2796
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
2797
|
+
open;
|
|
1763
2798
|
defaultOpen = false;
|
|
1764
2799
|
/** Optional id of the element this popover follows in the top layer. */
|
|
1765
2800
|
for;
|
|
@@ -1769,7 +2804,8 @@ var init_ui_popover_entry = __esm({
|
|
|
1769
2804
|
anchor = null;
|
|
1770
2805
|
surface = null;
|
|
1771
2806
|
syncFromProp() {
|
|
1772
|
-
|
|
2807
|
+
if (isControlled(this.open))
|
|
2808
|
+
this.internalOpen = this.open;
|
|
1773
2809
|
}
|
|
1774
2810
|
onOpenChange() {
|
|
1775
2811
|
this.syncOverlay();
|
|
@@ -1826,8 +2862,7 @@ var init_ui_popover_entry = __esm({
|
|
|
1826
2862
|
}
|
|
1827
2863
|
}
|
|
1828
2864
|
componentDidLoad() {
|
|
1829
|
-
this.
|
|
1830
|
-
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
2865
|
+
this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
|
|
1831
2866
|
this.host.addEventListener("keydown", this.onKeydown);
|
|
1832
2867
|
this.setupSurface();
|
|
1833
2868
|
this.syncOverlay();
|
|
@@ -1842,7 +2877,8 @@ var init_ui_popover_entry = __esm({
|
|
|
1842
2877
|
this.syncOverlay();
|
|
1843
2878
|
}
|
|
1844
2879
|
handleRequestClose(reason, trigger) {
|
|
1845
|
-
this.
|
|
2880
|
+
if (!isControlled(this.open))
|
|
2881
|
+
this.internalOpen = false;
|
|
1846
2882
|
dispatchDetail(this.host, "close", {
|
|
1847
2883
|
open: false,
|
|
1848
2884
|
reason,
|
|
@@ -1855,7 +2891,7 @@ var init_ui_popover_entry = __esm({
|
|
|
1855
2891
|
}
|
|
1856
2892
|
};
|
|
1857
2893
|
render() {
|
|
1858
|
-
return h(Host, { key: "
|
|
2894
|
+
return h(Host, { key: "6a38873f2e4d085f733fa116057b1f55418e23ed", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("div", { key: "6fef6e37921e8c52994617719f1ebb6d9bd54ee2", class: "popover__surface" }, h("slot", { key: "5ee4269592219035a3185f8f06fd71ecb12e4e71" })));
|
|
1859
2895
|
}
|
|
1860
2896
|
static get watchers() {
|
|
1861
2897
|
return {
|
|
@@ -1886,7 +2922,7 @@ __export(ui_radio_group_entry_exports, {
|
|
|
1886
2922
|
var uiRadioGroupCss, UIRadioGroup;
|
|
1887
2923
|
var init_ui_radio_group_entry = __esm({
|
|
1888
2924
|
"dist/esm/ui-radio-group.entry.js"() {
|
|
1889
|
-
|
|
2925
|
+
init_index_8BGiMGQ0();
|
|
1890
2926
|
init_events_JwSoedEO();
|
|
1891
2927
|
uiRadioGroupCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2)}:host([data-orientation='vertical']){display:inline-grid;justify-items:start}`;
|
|
1892
2928
|
UIRadioGroup = class {
|
|
@@ -1992,7 +3028,7 @@ var init_ui_radio_group_entry = __esm({
|
|
|
1992
3028
|
}
|
|
1993
3029
|
};
|
|
1994
3030
|
render() {
|
|
1995
|
-
return h(Host, { key: "
|
|
3031
|
+
return h(Host, { key: "28c6eb6cc9520b570f40d2193d0c64a7a6c7db01", role: "radiogroup", "aria-orientation": this.orientation, "data-orientation": this.orientation, "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "97814378181be78bfac6090ff173459e1f539728" }));
|
|
1996
3032
|
}
|
|
1997
3033
|
static get watchers() {
|
|
1998
3034
|
return {
|
|
@@ -2026,8 +3062,9 @@ __export(ui_radio_entry_exports, {
|
|
|
2026
3062
|
var uiRadioCss, UIRadio;
|
|
2027
3063
|
var init_ui_radio_entry = __esm({
|
|
2028
3064
|
"dist/esm/ui-radio.entry.js"() {
|
|
2029
|
-
|
|
3065
|
+
init_index_8BGiMGQ0();
|
|
2030
3066
|
init_events_JwSoedEO();
|
|
3067
|
+
init_controlled_state_BnGhGgTH();
|
|
2031
3068
|
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
3069
|
UIRadio = class {
|
|
2033
3070
|
constructor(hostRef) {
|
|
@@ -2036,28 +3073,32 @@ var init_ui_radio_entry = __esm({
|
|
|
2036
3073
|
get host() {
|
|
2037
3074
|
return getElement(this);
|
|
2038
3075
|
}
|
|
2039
|
-
checked
|
|
3076
|
+
/** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
|
|
3077
|
+
checked;
|
|
2040
3078
|
defaultChecked = false;
|
|
2041
3079
|
disabled = false;
|
|
2042
3080
|
name = "";
|
|
2043
3081
|
required = false;
|
|
2044
3082
|
value = "on";
|
|
3083
|
+
internalChecked = false;
|
|
2045
3084
|
slotRef;
|
|
3085
|
+
syncFromProp() {
|
|
3086
|
+
if (isControlled(this.checked))
|
|
3087
|
+
this.internalChecked = this.checked;
|
|
3088
|
+
}
|
|
2046
3089
|
syncToInput() {
|
|
2047
3090
|
const input = this.getInput();
|
|
2048
3091
|
if (!input)
|
|
2049
3092
|
return;
|
|
2050
|
-
this.host.
|
|
2051
|
-
input.checked = this.
|
|
3093
|
+
this.host.toggleAttribute("data-disabled", this.disabled);
|
|
3094
|
+
input.checked = this.internalChecked;
|
|
2052
3095
|
input.disabled = this.disabled;
|
|
2053
3096
|
input.name = this.name;
|
|
2054
3097
|
input.required = this.required;
|
|
2055
3098
|
input.value = this.value;
|
|
2056
3099
|
}
|
|
2057
3100
|
componentDidLoad() {
|
|
2058
|
-
|
|
2059
|
-
this.checked = true;
|
|
2060
|
-
}
|
|
3101
|
+
this.internalChecked = controlledOrDefault(this.checked, this.defaultChecked);
|
|
2061
3102
|
this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
|
|
2062
3103
|
this.syncToInput();
|
|
2063
3104
|
const input = this.getInput();
|
|
@@ -2079,6 +3120,10 @@ var init_ui_radio_entry = __esm({
|
|
|
2079
3120
|
const input = e.target;
|
|
2080
3121
|
if (!input || !input.checked)
|
|
2081
3122
|
return;
|
|
3123
|
+
if (!isControlled(this.checked))
|
|
3124
|
+
this.internalChecked = true;
|
|
3125
|
+
else
|
|
3126
|
+
this.syncToInput();
|
|
2082
3127
|
dispatchDetail(this.host, "change", {
|
|
2083
3128
|
checked: true,
|
|
2084
3129
|
value: this.value,
|
|
@@ -2086,12 +3131,12 @@ var init_ui_radio_entry = __esm({
|
|
|
2086
3131
|
});
|
|
2087
3132
|
};
|
|
2088
3133
|
render() {
|
|
2089
|
-
return h(Host, { key: "
|
|
3134
|
+
return h(Host, { key: "a5220e72dbf1b55ca73a3e6234f31c99d806433a", role: "radio", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "687e94b2036107c807e0319c3620bca7c06cbb26", ref: (el) => this.slotRef = el }));
|
|
2090
3135
|
}
|
|
2091
3136
|
static get watchers() {
|
|
2092
3137
|
return {
|
|
2093
3138
|
"checked": [{
|
|
2094
|
-
"
|
|
3139
|
+
"syncFromProp": 0
|
|
2095
3140
|
}],
|
|
2096
3141
|
"disabled": [{
|
|
2097
3142
|
"syncToInput": 0
|
|
@@ -2131,7 +3176,7 @@ function slotHasContent(slot) {
|
|
|
2131
3176
|
var uiSearchResultRowCss, UISearchResultRow;
|
|
2132
3177
|
var init_ui_search_result_row_entry = __esm({
|
|
2133
3178
|
"dist/esm/ui-search-result-row.entry.js"() {
|
|
2134
|
-
|
|
3179
|
+
init_index_8BGiMGQ0();
|
|
2135
3180
|
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
3181
|
UISearchResultRow = class {
|
|
2137
3182
|
constructor(hostRef) {
|
|
@@ -2157,7 +3202,7 @@ var init_ui_search_result_row_entry = __esm({
|
|
|
2157
3202
|
this.hasTrailing = slotHasContent(this.trailingSlot);
|
|
2158
3203
|
};
|
|
2159
3204
|
render() {
|
|
2160
|
-
return h(Host, { key: "
|
|
3205
|
+
return h(Host, { key: "01e795d1c723c4e56f5648c429b40fc7841ff9b5" }, h("button", { key: "7bdde5075c5a3112d14741aa87937e69a8f5fea9", class: "search-result-row", type: "button", disabled: this.disabled, part: "button" }, h("span", { key: "39ba47af68a23875eebdbdf8f87ca7d94d42ec43", class: "search-result-row__leading", part: "leading", hidden: !this.hasLeading }, h("slot", { key: "f108b1c5d284057d5979bf4897f056543a1ff092", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "0daeb171b7010f37d959c91f2a87c1ae7e96a56f", class: "search-result-row__content", part: "content" }, h("span", { key: "d7ec1b67a15fa9c79ea0fd23db73bd7bca40a8ce", class: "search-result-row__title", part: "title" }, h("slot", { key: "8c4a45511580a655e0593c8c57fd98838f2cb896", name: "title" })), h("span", { key: "0d30a58a7079ea0c8992c9b0b02b516a65350425", class: "search-result-row__meta", part: "meta", hidden: !this.hasMeta }, h("slot", { key: "8de66e3b6adf89ed765ccc1c341ccac1b5513a6f", name: "meta", ref: (el) => this.metaSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "7c24542b9bb634a55530952c329242a351e813c3", class: "search-result-row__excerpt", part: "excerpt", hidden: !this.hasExcerpt }, h("slot", { key: "a5bfc4fd17b8535aa996e792498b33f25dd30ecd", name: "excerpt", ref: (el) => this.excerptSlot = el, onSlotchange: this.syncSlots }))), h("span", { key: "25c74d8508a0b3b527ef5529a02e54e407cae5ae", class: "search-result-row__trailing", part: "trailing", hidden: !this.hasTrailing }, h("slot", { key: "cba6f957de902b9ed3dc05c8b20794c9b69c85c6", name: "trailing", ref: (el) => this.trailingSlot = el, onSlotchange: this.syncSlots }))));
|
|
2161
3206
|
}
|
|
2162
3207
|
};
|
|
2163
3208
|
UISearchResultRow.style = uiSearchResultRowCss();
|
|
@@ -2183,7 +3228,7 @@ function slotHasContent2(slot) {
|
|
|
2183
3228
|
var uiSearchShellCss, UISearchShell;
|
|
2184
3229
|
var init_ui_search_shell_entry = __esm({
|
|
2185
3230
|
"dist/esm/ui-search-shell.entry.js"() {
|
|
2186
|
-
|
|
3231
|
+
init_index_8BGiMGQ0();
|
|
2187
3232
|
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
3233
|
UISearchShell = class {
|
|
2189
3234
|
constructor(hostRef) {
|
|
@@ -2201,7 +3246,7 @@ var init_ui_search_shell_entry = __esm({
|
|
|
2201
3246
|
this.hasFooter = slotHasContent2(this.footerSlot);
|
|
2202
3247
|
};
|
|
2203
3248
|
render() {
|
|
2204
|
-
return h("div", { key: "
|
|
3249
|
+
return h("div", { key: "c3a4366e1f22b249233e42fdc83f1620613cce52", class: "search-shell", part: "base" }, h("slot", { key: "4f22e4a44fe7ae190a80a6e5cd695c15eb4f029d", name: "backdrop" }), h("div", { key: "bf452dae29f0ab31266d848a4dd4b794997b34a7", class: "search-shell__panel", part: "panel" }, h("div", { key: "c0ef7d1d8ea95853404d39ddac1bff566d38d18e", class: "search-shell__search", part: "search" }, h("slot", { key: "462532250d8ba36aad1d31fe10da642d79e59faf", name: "search" })), h("div", { key: "4f7d91272d15f6e37df6fba4ae563efae5701b93", class: "search-shell__status", part: "status", hidden: !this.hasStatus }, h("slot", { key: "d761691c1dd2c3012075163bb7eb9ce7e5bf3ef4", name: "status", ref: (el) => this.statusSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "1427a10b3f43ea31c2a482beb17f78d70b5fb2cf", class: "search-shell__body", part: "body" }, h("slot", { key: "6d6e8c2b4ee4833b5476795d4c7e184dda07f81e", name: "body" })), h("div", { key: "8f7d36040f7d21489c703b53581e392a2616963b", class: "search-shell__footer", part: "footer", hidden: !this.hasFooter }, h("slot", { key: "08b84f01091d95895ee8693e9b322511bf614342", name: "footer", ref: (el) => this.footerSlot = el, onSlotchange: this.syncSlots }))));
|
|
2205
3250
|
}
|
|
2206
3251
|
};
|
|
2207
3252
|
UISearchShell.style = uiSearchShellCss();
|
|
@@ -2216,9 +3261,9 @@ __export(ui_select_entry_exports, {
|
|
|
2216
3261
|
var uiSelectCss, UISelect;
|
|
2217
3262
|
var init_ui_select_entry = __esm({
|
|
2218
3263
|
"dist/esm/ui-select.entry.js"() {
|
|
2219
|
-
|
|
3264
|
+
init_index_8BGiMGQ0();
|
|
2220
3265
|
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))}`;
|
|
3266
|
+
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
3267
|
UISelect = class {
|
|
2223
3268
|
constructor(hostRef) {
|
|
2224
3269
|
registerInstance(this, hostRef);
|
|
@@ -2226,22 +3271,28 @@ var init_ui_select_entry = __esm({
|
|
|
2226
3271
|
get host() {
|
|
2227
3272
|
return getElement(this);
|
|
2228
3273
|
}
|
|
2229
|
-
value
|
|
2230
|
-
defaultValue
|
|
3274
|
+
value;
|
|
3275
|
+
defaultValue;
|
|
2231
3276
|
disabled = false;
|
|
2232
3277
|
invalid = false;
|
|
2233
3278
|
required = false;
|
|
2234
3279
|
internalValue = "";
|
|
2235
3280
|
slotRef;
|
|
3281
|
+
initialized = false;
|
|
2236
3282
|
syncFromProp() {
|
|
2237
|
-
this.
|
|
3283
|
+
if (this.value !== void 0)
|
|
3284
|
+
this.internalValue = this.value;
|
|
2238
3285
|
}
|
|
2239
3286
|
syncToSelect() {
|
|
2240
3287
|
const select = this.getSelect();
|
|
2241
3288
|
if (!select)
|
|
2242
3289
|
return;
|
|
2243
3290
|
this.host.dataset.invalid = this.invalid ? "true" : "";
|
|
2244
|
-
|
|
3291
|
+
if (this.value !== void 0)
|
|
3292
|
+
select.value = this.internalValue;
|
|
3293
|
+
else if (!this.initialized && this.defaultValue !== void 0)
|
|
3294
|
+
select.value = this.defaultValue;
|
|
3295
|
+
this.initialized = true;
|
|
2245
3296
|
select.disabled = this.disabled;
|
|
2246
3297
|
select.required = this.required;
|
|
2247
3298
|
select.setAttribute("aria-invalid", this.invalid ? "true" : "false");
|
|
@@ -2288,7 +3339,7 @@ var init_ui_select_entry = __esm({
|
|
|
2288
3339
|
});
|
|
2289
3340
|
};
|
|
2290
3341
|
render() {
|
|
2291
|
-
return h(Host, { key: "
|
|
3342
|
+
return h(Host, { key: "9a83a040bbad98355999c8099a78c6eba3ffc995", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "4a70aa44651132899e283e45c32213cf3f00be24", ref: (el) => this.slotRef = el }));
|
|
2292
3343
|
}
|
|
2293
3344
|
static get watchers() {
|
|
2294
3345
|
return {
|
|
@@ -2325,8 +3376,9 @@ __export(ui_switch_entry_exports, {
|
|
|
2325
3376
|
var uiSwitchCss, UISwitch;
|
|
2326
3377
|
var init_ui_switch_entry = __esm({
|
|
2327
3378
|
"dist/esm/ui-switch.entry.js"() {
|
|
2328
|
-
|
|
3379
|
+
init_index_8BGiMGQ0();
|
|
2329
3380
|
init_events_JwSoedEO();
|
|
3381
|
+
init_controlled_state_BnGhGgTH();
|
|
2330
3382
|
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
3383
|
UISwitch = class {
|
|
2332
3384
|
constructor(hostRef) {
|
|
@@ -2335,25 +3387,28 @@ var init_ui_switch_entry = __esm({
|
|
|
2335
3387
|
get host() {
|
|
2336
3388
|
return getElement(this);
|
|
2337
3389
|
}
|
|
2338
|
-
checked
|
|
3390
|
+
/** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
|
|
3391
|
+
checked;
|
|
2339
3392
|
defaultChecked = false;
|
|
2340
3393
|
disabled = false;
|
|
2341
3394
|
required = false;
|
|
2342
3395
|
value = "on";
|
|
2343
3396
|
internalChecked = false;
|
|
2344
3397
|
syncFromProp() {
|
|
2345
|
-
|
|
3398
|
+
if (isControlled(this.checked))
|
|
3399
|
+
this.internalChecked = this.checked;
|
|
2346
3400
|
}
|
|
2347
3401
|
componentDidLoad() {
|
|
2348
|
-
this.
|
|
2349
|
-
this.internalChecked = this.internalChecked || this.defaultChecked;
|
|
3402
|
+
this.internalChecked = controlledOrDefault(this.checked, this.defaultChecked);
|
|
2350
3403
|
}
|
|
2351
3404
|
toggle = (trigger) => {
|
|
2352
3405
|
if (this.disabled)
|
|
2353
3406
|
return;
|
|
2354
|
-
|
|
3407
|
+
const checked = !this.internalChecked;
|
|
3408
|
+
if (!isControlled(this.checked))
|
|
3409
|
+
this.internalChecked = checked;
|
|
2355
3410
|
dispatchDetail(this.host, "change", {
|
|
2356
|
-
checked
|
|
3411
|
+
checked,
|
|
2357
3412
|
value: this.value,
|
|
2358
3413
|
trigger
|
|
2359
3414
|
});
|
|
@@ -2370,14 +3425,19 @@ var init_ui_switch_entry = __esm({
|
|
|
2370
3425
|
this.toggle("pointer");
|
|
2371
3426
|
};
|
|
2372
3427
|
render() {
|
|
2373
|
-
return h(Host, { key: "
|
|
2374
|
-
|
|
3428
|
+
return h(Host, { key: "e11500e37da6a52c0cb4e143254363f85911aac1", 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: "777310a90b66f67e6a8eb0f77da5274e32f10db0", type: "checkbox", checked: this.internalChecked, disabled: this.disabled, required: this.required, value: this.value, "aria-hidden": "true", tabIndex: -1, onChange: (e) => {
|
|
3429
|
+
const input = e.target;
|
|
3430
|
+
const checked = input.checked;
|
|
3431
|
+
if (!isControlled(this.checked))
|
|
3432
|
+
this.internalChecked = checked;
|
|
2375
3433
|
dispatchDetail(this.host, "change", {
|
|
2376
|
-
checked
|
|
3434
|
+
checked,
|
|
2377
3435
|
value: this.value,
|
|
2378
3436
|
trigger: "pointer"
|
|
2379
3437
|
});
|
|
2380
|
-
|
|
3438
|
+
if (isControlled(this.checked))
|
|
3439
|
+
input.checked = this.internalChecked;
|
|
3440
|
+
} }), h("slot", { key: "7d72db5b720c0af0c4561b485ca558de61e1ce6e" }));
|
|
2381
3441
|
}
|
|
2382
3442
|
static get watchers() {
|
|
2383
3443
|
return {
|
|
@@ -2399,8 +3459,9 @@ __export(ui_tabs_entry_exports, {
|
|
|
2399
3459
|
var uiTabsCss, UITabs;
|
|
2400
3460
|
var init_ui_tabs_entry = __esm({
|
|
2401
3461
|
"dist/esm/ui-tabs.entry.js"() {
|
|
2402
|
-
|
|
3462
|
+
init_index_8BGiMGQ0();
|
|
2403
3463
|
init_events_JwSoedEO();
|
|
3464
|
+
init_controlled_state_BnGhGgTH();
|
|
2404
3465
|
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
3466
|
UITabs = class {
|
|
2406
3467
|
constructor(hostRef) {
|
|
@@ -2409,12 +3470,14 @@ var init_ui_tabs_entry = __esm({
|
|
|
2409
3470
|
get host() {
|
|
2410
3471
|
return getElement(this);
|
|
2411
3472
|
}
|
|
2412
|
-
value
|
|
3473
|
+
/** Controlled selected tab value. Omit it to use defaultValue and local interaction state. */
|
|
3474
|
+
value;
|
|
2413
3475
|
defaultValue = "";
|
|
2414
3476
|
orientation = "horizontal";
|
|
2415
3477
|
internalValue = "";
|
|
2416
3478
|
syncFromProp() {
|
|
2417
|
-
|
|
3479
|
+
if (isControlled(this.value))
|
|
3480
|
+
this.internalValue = this.value;
|
|
2418
3481
|
}
|
|
2419
3482
|
syncState() {
|
|
2420
3483
|
const tabs = this.getTabs();
|
|
@@ -2435,11 +3498,8 @@ var init_ui_tabs_entry = __esm({
|
|
|
2435
3498
|
});
|
|
2436
3499
|
}
|
|
2437
3500
|
componentDidLoad() {
|
|
2438
|
-
this.
|
|
2439
|
-
if (!this.
|
|
2440
|
-
this.internalValue = this.defaultValue;
|
|
2441
|
-
}
|
|
2442
|
-
if (!this.internalValue) {
|
|
3501
|
+
this.internalValue = controlledOrDefault(this.value, this.defaultValue);
|
|
3502
|
+
if (!isControlled(this.value) && !this.internalValue) {
|
|
2443
3503
|
const tabs = this.getTabs();
|
|
2444
3504
|
if (tabs.length > 0) {
|
|
2445
3505
|
this.internalValue = tabs[0]?.id ?? tabs[0]?.getAttribute("aria-controls") ?? "";
|
|
@@ -2464,7 +3524,8 @@ var init_ui_tabs_entry = __esm({
|
|
|
2464
3524
|
if (!newValue)
|
|
2465
3525
|
return;
|
|
2466
3526
|
const prev = this.internalValue;
|
|
2467
|
-
this.
|
|
3527
|
+
if (!isControlled(this.value))
|
|
3528
|
+
this.internalValue = newValue;
|
|
2468
3529
|
this.syncState();
|
|
2469
3530
|
dispatchDetail(this.host, "select", { value: newValue, previousValue: prev || void 0, trigger });
|
|
2470
3531
|
}
|
|
@@ -2493,7 +3554,7 @@ var init_ui_tabs_entry = __esm({
|
|
|
2493
3554
|
}
|
|
2494
3555
|
};
|
|
2495
3556
|
render() {
|
|
2496
|
-
return h(Host, { key: "
|
|
3557
|
+
return h(Host, { key: "8681e699c6afdbafd59ed986b8bf3c815b32cd1c", orientation: this.orientation, "data-orientation": this.orientation }, h("slot", { key: "673f4db2ae0aded3bd40934c1fff518cf6f83837" }));
|
|
2497
3558
|
}
|
|
2498
3559
|
static get watchers() {
|
|
2499
3560
|
return {
|
|
@@ -2521,9 +3582,9 @@ __export(ui_textarea_entry_exports, {
|
|
|
2521
3582
|
var uiTextareaCss, UITextarea;
|
|
2522
3583
|
var init_ui_textarea_entry = __esm({
|
|
2523
3584
|
"dist/esm/ui-textarea.entry.js"() {
|
|
2524
|
-
|
|
3585
|
+
init_index_8BGiMGQ0();
|
|
2525
3586
|
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}`;
|
|
3587
|
+
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
3588
|
UITextarea = class {
|
|
2528
3589
|
constructor(hostRef) {
|
|
2529
3590
|
registerInstance(this, hostRef);
|
|
@@ -2531,7 +3592,7 @@ var init_ui_textarea_entry = __esm({
|
|
|
2531
3592
|
get host() {
|
|
2532
3593
|
return getElement(this);
|
|
2533
3594
|
}
|
|
2534
|
-
value
|
|
3595
|
+
value;
|
|
2535
3596
|
defaultValue = "";
|
|
2536
3597
|
disabled = false;
|
|
2537
3598
|
invalid = false;
|
|
@@ -2540,14 +3601,16 @@ var init_ui_textarea_entry = __esm({
|
|
|
2540
3601
|
internalValue = "";
|
|
2541
3602
|
slotRef;
|
|
2542
3603
|
syncFromProp() {
|
|
2543
|
-
this.
|
|
3604
|
+
if (this.value !== void 0)
|
|
3605
|
+
this.internalValue = this.value;
|
|
2544
3606
|
}
|
|
2545
3607
|
syncToTextarea() {
|
|
2546
3608
|
const textarea = this.getTextarea();
|
|
2547
3609
|
if (!textarea)
|
|
2548
3610
|
return;
|
|
2549
3611
|
this.host.dataset.invalid = this.invalid ? "true" : "";
|
|
2550
|
-
|
|
3612
|
+
if (this.value !== void 0)
|
|
3613
|
+
textarea.value = this.internalValue;
|
|
2551
3614
|
textarea.defaultValue = this.defaultValue;
|
|
2552
3615
|
textarea.disabled = this.disabled;
|
|
2553
3616
|
textarea.readOnly = this.readOnly;
|
|
@@ -2596,7 +3659,7 @@ var init_ui_textarea_entry = __esm({
|
|
|
2596
3659
|
});
|
|
2597
3660
|
};
|
|
2598
3661
|
render() {
|
|
2599
|
-
return h(Host, { key: "
|
|
3662
|
+
return h(Host, { key: "6ce80349ca316f7a44d08e83862125f6b4d736a6", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "2c1ce87c9019d8346673ae5e7dd8a543d1bcb91c", ref: (el) => this.slotRef = el }));
|
|
2600
3663
|
}
|
|
2601
3664
|
static get watchers() {
|
|
2602
3665
|
return {
|
|
@@ -2636,7 +3699,7 @@ __export(ui_toast_region_entry_exports, {
|
|
|
2636
3699
|
var uiToastRegionCss, UIToastRegion;
|
|
2637
3700
|
var init_ui_toast_region_entry = __esm({
|
|
2638
3701
|
"dist/esm/ui-toast-region.entry.js"() {
|
|
2639
|
-
|
|
3702
|
+
init_index_8BGiMGQ0();
|
|
2640
3703
|
init_events_JwSoedEO();
|
|
2641
3704
|
init_positioning_Bu0dmLBE();
|
|
2642
3705
|
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}`;
|
|
@@ -2648,10 +3711,12 @@ var init_ui_toast_region_entry = __esm({
|
|
|
2648
3711
|
return getElement(this);
|
|
2649
3712
|
}
|
|
2650
3713
|
open = true;
|
|
2651
|
-
internalOpen =
|
|
3714
|
+
internalOpen = false;
|
|
2652
3715
|
surface = null;
|
|
3716
|
+
contentObserver = null;
|
|
3717
|
+
pendingDismiss = null;
|
|
2653
3718
|
syncFromProp() {
|
|
2654
|
-
this.
|
|
3719
|
+
this.syncContents();
|
|
2655
3720
|
}
|
|
2656
3721
|
syncSurface() {
|
|
2657
3722
|
if (this.internalOpen)
|
|
@@ -2661,22 +3726,37 @@ var init_ui_toast_region_entry = __esm({
|
|
|
2661
3726
|
}
|
|
2662
3727
|
componentDidLoad() {
|
|
2663
3728
|
this.surface = createViewportSurface(this.host);
|
|
2664
|
-
this.
|
|
3729
|
+
this.contentObserver = new MutationObserver(this.syncContents);
|
|
3730
|
+
this.contentObserver.observe(this.host, { childList: true, subtree: true });
|
|
3731
|
+
this.syncContents();
|
|
2665
3732
|
this.syncSurface();
|
|
2666
3733
|
this.host.addEventListener("click", this.onClick);
|
|
2667
3734
|
}
|
|
2668
3735
|
disconnectedCallback() {
|
|
2669
3736
|
this.host.removeEventListener("click", this.onClick);
|
|
3737
|
+
this.contentObserver?.disconnect();
|
|
3738
|
+
this.contentObserver = null;
|
|
2670
3739
|
this.surface?.destroy();
|
|
2671
3740
|
this.surface = null;
|
|
2672
3741
|
}
|
|
2673
3742
|
getToasts() {
|
|
2674
3743
|
return Array.from(this.host.querySelectorAll("[data-ui-toast]"));
|
|
2675
3744
|
}
|
|
2676
|
-
|
|
2677
|
-
const
|
|
2678
|
-
|
|
2679
|
-
|
|
3745
|
+
syncContents = () => {
|
|
3746
|
+
const nextOpen = this.open && this.getToasts().length > 0;
|
|
3747
|
+
const wasOpen = this.internalOpen;
|
|
3748
|
+
const completedDismiss = this.pendingDismiss && !this.host.contains(this.pendingDismiss.toast) ? this.pendingDismiss : null;
|
|
3749
|
+
this.internalOpen = nextOpen;
|
|
3750
|
+
if (wasOpen && !nextOpen && completedDismiss) {
|
|
3751
|
+
dispatchDetail(this.host, "close", {
|
|
3752
|
+
open: false,
|
|
3753
|
+
reason: "action",
|
|
3754
|
+
trigger: completedDismiss.trigger
|
|
3755
|
+
});
|
|
3756
|
+
}
|
|
3757
|
+
if (completedDismiss || !this.open)
|
|
3758
|
+
this.pendingDismiss = null;
|
|
3759
|
+
};
|
|
2680
3760
|
onClick = (e) => {
|
|
2681
3761
|
const dismissBtn = e.target.closest?.("[data-ui-toast-dismiss]");
|
|
2682
3762
|
if (!dismissBtn)
|
|
@@ -2685,24 +3765,16 @@ var init_ui_toast_region_entry = __esm({
|
|
|
2685
3765
|
if (!toast)
|
|
2686
3766
|
return;
|
|
2687
3767
|
const id = toast.id ?? "";
|
|
2688
|
-
|
|
2689
|
-
toast
|
|
3768
|
+
const trigger = eventToTrigger(e);
|
|
3769
|
+
this.pendingDismiss = { toast, trigger };
|
|
2690
3770
|
dispatchDetail(this.host, "dismiss", {
|
|
2691
3771
|
id,
|
|
2692
3772
|
reason: "action",
|
|
2693
|
-
trigger
|
|
3773
|
+
trigger
|
|
2694
3774
|
});
|
|
2695
|
-
this.updateOpenState();
|
|
2696
|
-
if (this.getToasts().length === 0) {
|
|
2697
|
-
dispatchDetail(this.host, "close", {
|
|
2698
|
-
open: false,
|
|
2699
|
-
reason: "action",
|
|
2700
|
-
trigger: eventToTrigger(e)
|
|
2701
|
-
});
|
|
2702
|
-
}
|
|
2703
3775
|
};
|
|
2704
3776
|
render() {
|
|
2705
|
-
return h(Host, { key: "
|
|
3777
|
+
return h(Host, { key: "b4430aceacb7a66202c6a43ad7b0bbe31c51eb94", role: "region", "aria-label": "Notifications", "aria-live": "polite", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "8bfb02d38366fab29a1668a53b7834ccd1a9aa65" }));
|
|
2706
3778
|
}
|
|
2707
3779
|
static get watchers() {
|
|
2708
3780
|
return {
|
|
@@ -2727,26 +3799,36 @@ __export(ui_tooltip_entry_exports, {
|
|
|
2727
3799
|
var uiTooltipCss, UITooltip;
|
|
2728
3800
|
var init_ui_tooltip_entry = __esm({
|
|
2729
3801
|
"dist/esm/ui-tooltip.entry.js"() {
|
|
2730
|
-
|
|
2731
|
-
|
|
3802
|
+
init_index_8BGiMGQ0();
|
|
3803
|
+
init_manager_C_0syqXZ();
|
|
2732
3804
|
init_events_JwSoedEO();
|
|
3805
|
+
init_controlled_state_BnGhGgTH();
|
|
2733
3806
|
init_positioning_Bu0dmLBE();
|
|
2734
|
-
uiTooltipCss = () => `:host{position:fixed;inset:auto;margin:0;display:inline-block;
|
|
3807
|
+
uiTooltipCss = () => `:host{position:fixed;inset:auto;margin:0;display:inline-block;box-sizing:border-box;padding:0;border:0;border-radius:0;background:transparent;opacity:0;transform:translateY(4px);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}.tooltip__surface{box-sizing:border-box;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md)}:host(:popover-open){opacity:1;transform:translateY(0)}@starting-style{:host(:popover-open){opacity:0;transform:translateY(4px)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host{transition:none}}`;
|
|
2735
3808
|
UITooltip = class {
|
|
2736
3809
|
constructor(hostRef) {
|
|
2737
3810
|
registerInstance(this, hostRef);
|
|
3811
|
+
this.opened = createEvent(this, "open");
|
|
3812
|
+
this.closed = createEvent(this, "close");
|
|
2738
3813
|
}
|
|
2739
3814
|
get host() {
|
|
2740
3815
|
return getElement(this);
|
|
2741
3816
|
}
|
|
2742
3817
|
for = "";
|
|
2743
|
-
open
|
|
3818
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
3819
|
+
open;
|
|
2744
3820
|
defaultOpen = false;
|
|
2745
3821
|
placement = "top-start";
|
|
2746
3822
|
/** Pointer hover intent delay in milliseconds. Keyboard focus is immediate. */
|
|
2747
3823
|
showDelay = 500;
|
|
2748
3824
|
/** Pointer leave grace period in milliseconds. */
|
|
2749
3825
|
hideDelay = 100;
|
|
3826
|
+
/** Click or tap pins the description; activate again to dismiss. */
|
|
3827
|
+
toggleOnClick = false;
|
|
3828
|
+
pinned = false;
|
|
3829
|
+
focused = false;
|
|
3830
|
+
opened;
|
|
3831
|
+
closed;
|
|
2750
3832
|
internalOpen = false;
|
|
2751
3833
|
overlayId = `ui-tooltip-${Math.random().toString(36).slice(2, 11)}`;
|
|
2752
3834
|
trigger = null;
|
|
@@ -2755,7 +3837,8 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2755
3837
|
hideTimer = null;
|
|
2756
3838
|
syncFromProp() {
|
|
2757
3839
|
this.clearTimers();
|
|
2758
|
-
|
|
3840
|
+
if (isControlled(this.open))
|
|
3841
|
+
this.internalOpen = this.open;
|
|
2759
3842
|
}
|
|
2760
3843
|
resetSurface() {
|
|
2761
3844
|
this.syncTrigger();
|
|
@@ -2779,11 +3862,13 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2779
3862
|
}
|
|
2780
3863
|
}
|
|
2781
3864
|
componentDidLoad() {
|
|
2782
|
-
this.
|
|
2783
|
-
|
|
3865
|
+
if (!this.host.id)
|
|
3866
|
+
this.host.id = this.overlayId;
|
|
3867
|
+
this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
|
|
2784
3868
|
this.syncTrigger();
|
|
2785
3869
|
this.setupSurface();
|
|
2786
|
-
this.host.addEventListener("
|
|
3870
|
+
this.host.addEventListener("pointerenter", this.onSurfaceEnter);
|
|
3871
|
+
this.host.addEventListener("pointerleave", this.onTriggerLeave);
|
|
2787
3872
|
this.syncOverlay();
|
|
2788
3873
|
}
|
|
2789
3874
|
componentDidUpdate() {
|
|
@@ -2794,11 +3879,12 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2794
3879
|
this.detachTriggerListeners();
|
|
2795
3880
|
this.surface?.destroy();
|
|
2796
3881
|
this.surface = null;
|
|
2797
|
-
this.host.removeEventListener("
|
|
3882
|
+
this.host.removeEventListener("pointerenter", this.onSurfaceEnter);
|
|
3883
|
+
this.host.removeEventListener("pointerleave", this.onTriggerLeave);
|
|
2798
3884
|
closeOverlay(this.overlayId);
|
|
2799
3885
|
}
|
|
2800
3886
|
syncTrigger() {
|
|
2801
|
-
const next = this.for ? this.host.
|
|
3887
|
+
const next = this.for ? this.host.getRootNode().getElementById(this.for) : this.host.previousElementSibling;
|
|
2802
3888
|
if (next === this.trigger)
|
|
2803
3889
|
return;
|
|
2804
3890
|
this.detachTriggerListeners();
|
|
@@ -2817,6 +3903,11 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2817
3903
|
this.detachTriggerListeners();
|
|
2818
3904
|
if (!this.trigger)
|
|
2819
3905
|
return;
|
|
3906
|
+
const ids = new Set((this.trigger.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean));
|
|
3907
|
+
ids.add(this.host.id);
|
|
3908
|
+
this.trigger.setAttribute("aria-describedby", [...ids].join(" "));
|
|
3909
|
+
this.trigger.addEventListener("click", this.onTriggerClick);
|
|
3910
|
+
this.trigger.addEventListener("keydown", this.onTriggerKeydown);
|
|
2820
3911
|
this.trigger.addEventListener("pointerenter", this.onTriggerEnter);
|
|
2821
3912
|
this.trigger.addEventListener("pointerleave", this.onTriggerLeave);
|
|
2822
3913
|
this.trigger.addEventListener("focusin", this.onTriggerFocusIn);
|
|
@@ -2825,6 +3916,13 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2825
3916
|
detachTriggerListeners() {
|
|
2826
3917
|
if (!this.trigger)
|
|
2827
3918
|
return;
|
|
3919
|
+
const ids = (this.trigger.getAttribute("aria-describedby") || "").split(/\s+/).filter((id) => id && id !== this.host.id);
|
|
3920
|
+
if (ids.length)
|
|
3921
|
+
this.trigger.setAttribute("aria-describedby", ids.join(" "));
|
|
3922
|
+
else
|
|
3923
|
+
this.trigger.removeAttribute("aria-describedby");
|
|
3924
|
+
this.trigger.removeEventListener("click", this.onTriggerClick);
|
|
3925
|
+
this.trigger.removeEventListener("keydown", this.onTriggerKeydown);
|
|
2828
3926
|
this.trigger.removeEventListener("pointerenter", this.onTriggerEnter);
|
|
2829
3927
|
this.trigger.removeEventListener("pointerleave", this.onTriggerLeave);
|
|
2830
3928
|
this.trigger.removeEventListener("focusin", this.onTriggerFocusIn);
|
|
@@ -2844,423 +3942,163 @@ var init_ui_tooltip_entry = __esm({
|
|
|
2844
3942
|
}
|
|
2845
3943
|
clearTimers() {
|
|
2846
3944
|
this.clearShowTimer();
|
|
2847
|
-
this.clearHideTimer();
|
|
2848
|
-
}
|
|
2849
|
-
setInteractionOpen(nextOpen, trigger) {
|
|
2850
|
-
if (this.internalOpen === nextOpen)
|
|
2851
|
-
return;
|
|
2852
|
-
this.internalOpen = nextOpen;
|
|
2853
|
-
dispatchDetail(this.host, nextOpen ? "open" : "close", {
|
|
2854
|
-
open: nextOpen,
|
|
2855
|
-
reason: "action",
|
|
2856
|
-
trigger
|
|
2857
|
-
});
|
|
2858
|
-
}
|
|
2859
|
-
onTriggerEnter = () => {
|
|
2860
|
-
this.clearHideTimer();
|
|
2861
|
-
if (this.internalOpen || this.showTimer !== null)
|
|
2862
|
-
return;
|
|
2863
|
-
this.showTimer = setTimeout(() => {
|
|
2864
|
-
this.showTimer = null;
|
|
2865
|
-
this.setInteractionOpen(true, "pointer");
|
|
2866
|
-
}, Math.max(0, this.showDelay));
|
|
2867
|
-
};
|
|
2868
|
-
onTriggerLeave = () => {
|
|
2869
|
-
this.clearShowTimer();
|
|
2870
|
-
if (!this.internalOpen || this.hideTimer !== null)
|
|
2871
|
-
return;
|
|
2872
|
-
this.hideTimer = setTimeout(() => {
|
|
2873
|
-
this.hideTimer = null;
|
|
2874
|
-
this.setInteractionOpen(false, "pointer");
|
|
2875
|
-
}, Math.max(0, this.hideDelay));
|
|
2876
|
-
};
|
|
2877
|
-
onTriggerFocusIn = () => {
|
|
2878
|
-
this.clearTimers();
|
|
2879
|
-
this.setInteractionOpen(true, "keyboard");
|
|
2880
|
-
};
|
|
2881
|
-
onTriggerFocusOut = (e) => {
|
|
2882
|
-
const related = e.relatedTarget;
|
|
2883
|
-
if (related && this.host.contains(related))
|
|
2884
|
-
return;
|
|
2885
|
-
this.clearTimers();
|
|
2886
|
-
this.setInteractionOpen(false, "keyboard");
|
|
2887
|
-
};
|
|
2888
|
-
handleRequestClose(reason, trigger) {
|
|
2889
|
-
if (reason === "escape") {
|
|
2890
|
-
this.clearTimers();
|
|
2891
|
-
this.internalOpen = false;
|
|
2892
|
-
dispatchDetail(this.host, "close", {
|
|
2893
|
-
open: false,
|
|
2894
|
-
reason: "escape",
|
|
2895
|
-
trigger
|
|
2896
|
-
});
|
|
2897
|
-
this.trigger?.focus();
|
|
2898
|
-
}
|
|
2899
|
-
}
|
|
2900
|
-
onKeydown = (e) => {
|
|
2901
|
-
if (e.key === "Escape") {
|
|
2902
|
-
requestTopOverlayClose("escape", "keyboard");
|
|
2903
|
-
}
|
|
2904
|
-
};
|
|
2905
|
-
render() {
|
|
2906
|
-
return h(Host, { key: "4c3890a7371508ede06a5b370d1cec32db25280f", role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "2e3bcd0dc69b0c3e3376d73dc4efc82e4f4cfaaa" }));
|
|
2907
|
-
}
|
|
2908
|
-
static get watchers() {
|
|
2909
|
-
return {
|
|
2910
|
-
"open": [{
|
|
2911
|
-
"syncFromProp": 0
|
|
2912
|
-
}],
|
|
2913
|
-
"for": [{
|
|
2914
|
-
"resetSurface": 0
|
|
2915
|
-
}],
|
|
2916
|
-
"placement": [{
|
|
2917
|
-
"resetSurface": 0
|
|
2918
|
-
}],
|
|
2919
|
-
"internalOpen": [{
|
|
2920
|
-
"syncOverlay": 0
|
|
2921
|
-
}]
|
|
2922
|
-
};
|
|
2923
|
-
}
|
|
2924
|
-
};
|
|
2925
|
-
UITooltip.style = uiTooltipCss();
|
|
2926
|
-
}
|
|
2927
|
-
});
|
|
2928
|
-
|
|
2929
|
-
// dist/esm/ui-top-bar.entry.js
|
|
2930
|
-
var ui_top_bar_entry_exports = {};
|
|
2931
|
-
__export(ui_top_bar_entry_exports, {
|
|
2932
|
-
ui_top_bar: () => UITopBar
|
|
2933
|
-
});
|
|
2934
|
-
function slotHasContent3(slot) {
|
|
2935
|
-
if (!slot) {
|
|
2936
|
-
return false;
|
|
2937
|
-
}
|
|
2938
|
-
return slot.assignedNodes({ flatten: true }).some((node) => {
|
|
2939
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
2940
|
-
return Boolean(node.textContent?.trim());
|
|
2941
|
-
}
|
|
2942
|
-
return true;
|
|
2943
|
-
});
|
|
2944
|
-
}
|
|
2945
|
-
var uiTopBarCss, UITopBar;
|
|
2946
|
-
var init_ui_top_bar_entry = __esm({
|
|
2947
|
-
"dist/esm/ui-top-bar.entry.js"() {
|
|
2948
|
-
init_index_CEeiinfk();
|
|
2949
|
-
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
|
-
UITopBar = class {
|
|
2951
|
-
constructor(hostRef) {
|
|
2952
|
-
registerInstance(this, hostRef);
|
|
2953
|
-
}
|
|
2954
|
-
get host() {
|
|
2955
|
-
return getElement(this);
|
|
3945
|
+
this.clearHideTimer();
|
|
2956
3946
|
}
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
3947
|
+
setInteractionOpen(nextOpen, trigger) {
|
|
3948
|
+
if (this.internalOpen === nextOpen)
|
|
3949
|
+
return;
|
|
3950
|
+
if (!isControlled(this.open))
|
|
3951
|
+
this.internalOpen = nextOpen;
|
|
3952
|
+
dispatchDetail(this.host, nextOpen ? "open" : "close", {
|
|
3953
|
+
open: nextOpen,
|
|
3954
|
+
reason: "action",
|
|
3955
|
+
trigger
|
|
3956
|
+
});
|
|
2965
3957
|
}
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
3958
|
+
onSurfaceEnter = () => this.clearHideTimer();
|
|
3959
|
+
onTriggerClick = (event) => {
|
|
3960
|
+
if (!this.toggleOnClick)
|
|
3961
|
+
return;
|
|
3962
|
+
this.clearTimers();
|
|
3963
|
+
this.pinned = !this.pinned;
|
|
3964
|
+
this.setInteractionOpen(this.pinned, event.detail === 0 ? "keyboard" : "pointer");
|
|
2970
3965
|
};
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
}
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
["path", { d: "m14.5 4-5 16" }]
|
|
3021
|
-
];
|
|
3022
|
-
Columns3 = [
|
|
3023
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
3024
|
-
["path", { d: "M9 3v18" }],
|
|
3025
|
-
["path", { d: "M15 3v18" }]
|
|
3026
|
-
];
|
|
3027
|
-
Ellipsis = [
|
|
3028
|
-
["circle", { cx: "12", cy: "12", r: "1" }],
|
|
3029
|
-
["circle", { cx: "19", cy: "12", r: "1" }],
|
|
3030
|
-
["circle", { cx: "5", cy: "12", r: "1" }]
|
|
3031
|
-
];
|
|
3032
|
-
Eraser = [
|
|
3033
|
-
[
|
|
3034
|
-
"path",
|
|
3035
|
-
{
|
|
3036
|
-
d: "M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21"
|
|
3037
|
-
}
|
|
3038
|
-
],
|
|
3039
|
-
["path", { d: "m5.082 11.09 8.828 8.828" }]
|
|
3040
|
-
];
|
|
3041
|
-
GripHorizontal = [
|
|
3042
|
-
["circle", { cx: "12", cy: "9", r: "1" }],
|
|
3043
|
-
["circle", { cx: "19", cy: "9", r: "1" }],
|
|
3044
|
-
["circle", { cx: "5", cy: "9", r: "1" }],
|
|
3045
|
-
["circle", { cx: "12", cy: "15", r: "1" }],
|
|
3046
|
-
["circle", { cx: "19", cy: "15", r: "1" }],
|
|
3047
|
-
["circle", { cx: "5", cy: "15", r: "1" }]
|
|
3048
|
-
];
|
|
3049
|
-
GripVertical = [
|
|
3050
|
-
["circle", { cx: "9", cy: "12", r: "1" }],
|
|
3051
|
-
["circle", { cx: "9", cy: "5", r: "1" }],
|
|
3052
|
-
["circle", { cx: "9", cy: "19", r: "1" }],
|
|
3053
|
-
["circle", { cx: "15", cy: "12", r: "1" }],
|
|
3054
|
-
["circle", { cx: "15", cy: "5", r: "1" }],
|
|
3055
|
-
["circle", { cx: "15", cy: "19", r: "1" }]
|
|
3056
|
-
];
|
|
3057
|
-
Heading1 = [
|
|
3058
|
-
["path", { d: "M4 12h8" }],
|
|
3059
|
-
["path", { d: "M4 18V6" }],
|
|
3060
|
-
["path", { d: "M12 18V6" }],
|
|
3061
|
-
["path", { d: "m17 12 3-2v8" }]
|
|
3062
|
-
];
|
|
3063
|
-
Heading2 = [
|
|
3064
|
-
["path", { d: "M4 12h8" }],
|
|
3065
|
-
["path", { d: "M4 18V6" }],
|
|
3066
|
-
["path", { d: "M12 18V6" }],
|
|
3067
|
-
["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }]
|
|
3068
|
-
];
|
|
3069
|
-
Heading3 = [
|
|
3070
|
-
["path", { d: "M4 12h8" }],
|
|
3071
|
-
["path", { d: "M4 18V6" }],
|
|
3072
|
-
["path", { d: "M12 18V6" }],
|
|
3073
|
-
["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }],
|
|
3074
|
-
["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }]
|
|
3075
|
-
];
|
|
3076
|
-
Highlighter = [
|
|
3077
|
-
["path", { d: "m9 11-6 6v3h9l3-3" }],
|
|
3078
|
-
["path", { d: "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" }]
|
|
3079
|
-
];
|
|
3080
|
-
Image = [
|
|
3081
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }],
|
|
3082
|
-
["circle", { cx: "9", cy: "9", r: "2" }],
|
|
3083
|
-
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]
|
|
3084
|
-
];
|
|
3085
|
-
Italic = [
|
|
3086
|
-
["line", { x1: "19", x2: "10", y1: "4", y2: "4" }],
|
|
3087
|
-
["line", { x1: "14", x2: "5", y1: "20", y2: "20" }],
|
|
3088
|
-
["line", { x1: "15", x2: "9", y1: "4", y2: "20" }]
|
|
3089
|
-
];
|
|
3090
|
-
ListOrdered = [
|
|
3091
|
-
["path", { d: "M11 5h10" }],
|
|
3092
|
-
["path", { d: "M11 12h10" }],
|
|
3093
|
-
["path", { d: "M11 19h10" }],
|
|
3094
|
-
["path", { d: "M4 4h1v5" }],
|
|
3095
|
-
["path", { d: "M4 9h2" }],
|
|
3096
|
-
["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" }]
|
|
3097
|
-
];
|
|
3098
|
-
ListTodo = [
|
|
3099
|
-
["path", { d: "M13 5h8" }],
|
|
3100
|
-
["path", { d: "M13 12h8" }],
|
|
3101
|
-
["path", { d: "M13 19h8" }],
|
|
3102
|
-
["path", { d: "m3 17 2 2 4-4" }],
|
|
3103
|
-
["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1" }]
|
|
3104
|
-
];
|
|
3105
|
-
List = [
|
|
3106
|
-
["path", { d: "M3 5h.01" }],
|
|
3107
|
-
["path", { d: "M3 12h.01" }],
|
|
3108
|
-
["path", { d: "M3 19h.01" }],
|
|
3109
|
-
["path", { d: "M8 5h13" }],
|
|
3110
|
-
["path", { d: "M8 12h13" }],
|
|
3111
|
-
["path", { d: "M8 19h13" }]
|
|
3112
|
-
];
|
|
3113
|
-
Merge = [
|
|
3114
|
-
["path", { d: "m8 6 4-4 4 4" }],
|
|
3115
|
-
["path", { d: "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }],
|
|
3116
|
-
["path", { d: "m20 22-5-5" }]
|
|
3117
|
-
];
|
|
3118
|
-
Minus = [["path", { d: "M5 12h14" }]];
|
|
3119
|
-
PaintBucket = [
|
|
3120
|
-
["path", { d: "m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z" }],
|
|
3121
|
-
["path", { d: "m5 2 5 5" }],
|
|
3122
|
-
["path", { d: "M2 13h15" }],
|
|
3123
|
-
["path", { d: "M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z" }]
|
|
3124
|
-
];
|
|
3125
|
-
PanelBottom = [
|
|
3126
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
3127
|
-
["path", { d: "M3 15h18" }]
|
|
3128
|
-
];
|
|
3129
|
-
PanelLeft = [
|
|
3130
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
3131
|
-
["path", { d: "M9 3v18" }]
|
|
3132
|
-
];
|
|
3133
|
-
PanelRight = [
|
|
3134
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
3135
|
-
["path", { d: "M15 3v18" }]
|
|
3136
|
-
];
|
|
3137
|
-
PanelTop = [
|
|
3138
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
3139
|
-
["path", { d: "M3 9h18" }]
|
|
3140
|
-
];
|
|
3141
|
-
Pilcrow = [
|
|
3142
|
-
["path", { d: "M13 4v16" }],
|
|
3143
|
-
["path", { d: "M17 4v16" }],
|
|
3144
|
-
["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }]
|
|
3145
|
-
];
|
|
3146
|
-
Plus = [
|
|
3147
|
-
["path", { d: "M5 12h14" }],
|
|
3148
|
-
["path", { d: "M12 5v14" }]
|
|
3149
|
-
];
|
|
3150
|
-
Quote = [
|
|
3151
|
-
[
|
|
3152
|
-
"path",
|
|
3153
|
-
{
|
|
3154
|
-
d: "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
|
|
3155
|
-
}
|
|
3156
|
-
],
|
|
3157
|
-
[
|
|
3158
|
-
"path",
|
|
3159
|
-
{
|
|
3160
|
-
d: "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
|
|
3161
|
-
}
|
|
3162
|
-
]
|
|
3163
|
-
];
|
|
3164
|
-
Redo2 = [
|
|
3165
|
-
["path", { d: "m15 14 5-5-5-5" }],
|
|
3166
|
-
["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }]
|
|
3167
|
-
];
|
|
3168
|
-
Rows3 = [
|
|
3169
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
3170
|
-
["path", { d: "M21 9H3" }],
|
|
3171
|
-
["path", { d: "M21 15H3" }]
|
|
3172
|
-
];
|
|
3173
|
-
Split = [
|
|
3174
|
-
["path", { d: "M16 3h5v5" }],
|
|
3175
|
-
["path", { d: "M8 3H3v5" }],
|
|
3176
|
-
["path", { d: "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" }],
|
|
3177
|
-
["path", { d: "m15 9 6-6" }]
|
|
3178
|
-
];
|
|
3179
|
-
Strikethrough = [
|
|
3180
|
-
["path", { d: "M16 4H9a3 3 0 0 0-2.83 4" }],
|
|
3181
|
-
["path", { d: "M14 12a4 4 0 0 1 0 8H6" }],
|
|
3182
|
-
["line", { x1: "4", x2: "20", y1: "12", y2: "12" }]
|
|
3183
|
-
];
|
|
3184
|
-
Table2 = [
|
|
3185
|
-
[
|
|
3186
|
-
"path",
|
|
3187
|
-
{
|
|
3188
|
-
d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"
|
|
3966
|
+
onTriggerKeydown = (event) => {
|
|
3967
|
+
if (event.key === "Escape")
|
|
3968
|
+
this.clearTimers();
|
|
3969
|
+
};
|
|
3970
|
+
onTriggerEnter = (event) => {
|
|
3971
|
+
if (event.pointerType === "touch")
|
|
3972
|
+
return;
|
|
3973
|
+
this.clearHideTimer();
|
|
3974
|
+
if (this.internalOpen || this.showTimer !== null)
|
|
3975
|
+
return;
|
|
3976
|
+
this.showTimer = setTimeout(() => {
|
|
3977
|
+
this.showTimer = null;
|
|
3978
|
+
this.setInteractionOpen(true, "pointer");
|
|
3979
|
+
}, Math.max(0, this.showDelay));
|
|
3980
|
+
};
|
|
3981
|
+
onTriggerLeave = () => {
|
|
3982
|
+
this.clearShowTimer();
|
|
3983
|
+
if (this.focused || this.pinned || !this.internalOpen || this.hideTimer !== null)
|
|
3984
|
+
return;
|
|
3985
|
+
this.hideTimer = setTimeout(() => {
|
|
3986
|
+
this.hideTimer = null;
|
|
3987
|
+
this.setInteractionOpen(false, "pointer");
|
|
3988
|
+
}, Math.max(0, this.hideDelay));
|
|
3989
|
+
};
|
|
3990
|
+
onTriggerFocusIn = () => {
|
|
3991
|
+
this.focused = true;
|
|
3992
|
+
this.clearTimers();
|
|
3993
|
+
this.setInteractionOpen(true, "keyboard");
|
|
3994
|
+
};
|
|
3995
|
+
onTriggerFocusOut = (e) => {
|
|
3996
|
+
const related = e.relatedTarget;
|
|
3997
|
+
if (related && this.host.contains(related))
|
|
3998
|
+
return;
|
|
3999
|
+
this.focused = false;
|
|
4000
|
+
this.pinned = false;
|
|
4001
|
+
this.clearTimers();
|
|
4002
|
+
this.setInteractionOpen(false, "keyboard");
|
|
4003
|
+
};
|
|
4004
|
+
handleRequestClose(reason, trigger) {
|
|
4005
|
+
if (reason === "escape" || reason === "light-dismiss" && this.toggleOnClick) {
|
|
4006
|
+
this.pinned = false;
|
|
4007
|
+
this.clearTimers();
|
|
4008
|
+
if (!isControlled(this.open))
|
|
4009
|
+
this.internalOpen = false;
|
|
4010
|
+
dispatchDetail(this.host, "close", {
|
|
4011
|
+
open: false,
|
|
4012
|
+
reason,
|
|
4013
|
+
trigger
|
|
4014
|
+
});
|
|
3189
4015
|
}
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
trash: Trash2,
|
|
3261
|
-
underline: Underline,
|
|
3262
|
-
undo: Undo2
|
|
4016
|
+
}
|
|
4017
|
+
render() {
|
|
4018
|
+
return h(Host, { key: "ce34c51bc3a9c9f7f31b7f0d329175df0cee1ab3", role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? "" : void 0 }, h("div", { key: "e5bb2bcb146fe8ec3b4e9a6abb550961181e3c06", class: "tooltip__surface" }, h("slot", { key: "bdb71bfcb0f72c212cbb5c64fb69510fdded4afb" })));
|
|
4019
|
+
}
|
|
4020
|
+
static get watchers() {
|
|
4021
|
+
return {
|
|
4022
|
+
"open": [{
|
|
4023
|
+
"syncFromProp": 0
|
|
4024
|
+
}],
|
|
4025
|
+
"for": [{
|
|
4026
|
+
"resetSurface": 0
|
|
4027
|
+
}],
|
|
4028
|
+
"placement": [{
|
|
4029
|
+
"resetSurface": 0
|
|
4030
|
+
}],
|
|
4031
|
+
"internalOpen": [{
|
|
4032
|
+
"syncOverlay": 0
|
|
4033
|
+
}]
|
|
4034
|
+
};
|
|
4035
|
+
}
|
|
4036
|
+
};
|
|
4037
|
+
UITooltip.style = uiTooltipCss();
|
|
4038
|
+
}
|
|
4039
|
+
});
|
|
4040
|
+
|
|
4041
|
+
// dist/esm/ui-top-bar.entry.js
|
|
4042
|
+
var ui_top_bar_entry_exports = {};
|
|
4043
|
+
__export(ui_top_bar_entry_exports, {
|
|
4044
|
+
ui_top_bar: () => UITopBar
|
|
4045
|
+
});
|
|
4046
|
+
function slotHasContent3(slot) {
|
|
4047
|
+
if (!slot) {
|
|
4048
|
+
return false;
|
|
4049
|
+
}
|
|
4050
|
+
return slot.assignedNodes({ flatten: true }).some((node) => {
|
|
4051
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
4052
|
+
return Boolean(node.textContent?.trim());
|
|
4053
|
+
}
|
|
4054
|
+
return true;
|
|
4055
|
+
});
|
|
4056
|
+
}
|
|
4057
|
+
var uiTopBarCss, UITopBar;
|
|
4058
|
+
var init_ui_top_bar_entry = __esm({
|
|
4059
|
+
"dist/esm/ui-top-bar.entry.js"() {
|
|
4060
|
+
init_index_8BGiMGQ0();
|
|
4061
|
+
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}}`;
|
|
4062
|
+
UITopBar = class {
|
|
4063
|
+
constructor(hostRef) {
|
|
4064
|
+
registerInstance(this, hostRef);
|
|
4065
|
+
}
|
|
4066
|
+
get host() {
|
|
4067
|
+
return getElement(this);
|
|
4068
|
+
}
|
|
4069
|
+
hasLeading = false;
|
|
4070
|
+
hasSearch = false;
|
|
4071
|
+
hasActions = false;
|
|
4072
|
+
leadingSlot;
|
|
4073
|
+
searchSlot;
|
|
4074
|
+
actionsSlot;
|
|
4075
|
+
componentDidLoad() {
|
|
4076
|
+
this.syncSlots();
|
|
4077
|
+
}
|
|
4078
|
+
syncSlots = () => {
|
|
4079
|
+
this.hasLeading = slotHasContent3(this.leadingSlot);
|
|
4080
|
+
this.hasSearch = slotHasContent3(this.searchSlot);
|
|
4081
|
+
this.hasActions = slotHasContent3(this.actionsSlot);
|
|
4082
|
+
};
|
|
4083
|
+
render() {
|
|
4084
|
+
return h(Host, { key: "b92aa4e03475b3e623212a1e98f45d5532860b51" }, h("header", { key: "a3552708b0e424e762e100ee55fc6bfac4cd830a", class: "top-bar", part: "base" }, h("div", { key: "4c8a9e3a04ff23a615bf09e368f4212dd5b38157", class: "top-bar__leading", hidden: !this.hasLeading }, h("slot", { key: "64ecc99672b8fd37305810e0776a24bf87ea6f08", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "37fc003aba2b87f7c8c0e654cd6810d7f231f365", class: "top-bar__title" }, h("slot", { key: "e6c901c15852e83340ca8ad1e264fd5e35445e84" })), h("div", { key: "37b1ac319367eeded4182ada401a31e0b9c2555a", class: "top-bar__search", hidden: !this.hasSearch }, h("slot", { key: "0a8b5ef500dd843909bb35a1133be548411f3b71", name: "search", ref: (el) => this.searchSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "7e5054a3ed6ecfe8d9d8b1b36992843aa0fb62eb", class: "top-bar__actions", hidden: !this.hasActions }, h("slot", { key: "19fe59c5ba4da7f0ceda764948f1288bfaa2a41d", name: "actions", ref: (el) => this.actionsSlot = el, onSlotchange: this.syncSlots }))));
|
|
4085
|
+
}
|
|
3263
4086
|
};
|
|
4087
|
+
UITopBar.style = uiTopBarCss();
|
|
4088
|
+
}
|
|
4089
|
+
});
|
|
4090
|
+
|
|
4091
|
+
// dist/esm/ui-tree-item.entry.js
|
|
4092
|
+
var ui_tree_item_entry_exports = {};
|
|
4093
|
+
__export(ui_tree_item_entry_exports, {
|
|
4094
|
+
ui_tree_item: () => UITreeItem
|
|
4095
|
+
});
|
|
4096
|
+
var uiTreeItemCss, UITreeItem;
|
|
4097
|
+
var init_ui_tree_item_entry = __esm({
|
|
4098
|
+
"dist/esm/ui-tree-item.entry.js"() {
|
|
4099
|
+
init_index_8BGiMGQ0();
|
|
4100
|
+
init_events_JwSoedEO();
|
|
4101
|
+
init_icons_CoFximGM();
|
|
3264
4102
|
uiTreeItemCss = () => `:host{--ui-tree-indent:16px;--ui-tree-row-min-height:32px;--ui-tree-drop-color:var(--ui-accent-solid);position:relative;display:block;min-inline-size:0;margin-inline-start:calc(var(--ui-tree-item-depth, 0) * var(--ui-tree-indent))}.row{position:relative;display:grid;grid-template-columns:20px auto minmax(0, 1fr) auto;align-items:center;min-block-size:var(--ui-tree-row-min-height);min-inline-size:0;font-size:var(--ui-tree-font-size, var(--ui-font-size-ui, 0.9375rem));border-radius:var(--ui-radius-md);color:var(--ui-text-secondary);transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), opacity var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), min-block-size var(--ui-motion-base) var(--ui-motion-ease)}.row:hover,:host([data-selected]) .row,.row:focus-within{color:var(--ui-text-primary);background:var(--ui-surface-muted)}:host([data-disabled]) .row{opacity:0.55}:host([data-dragging]) .row{opacity:0.42}:host(:focus){outline:none}:host(:focus-visible) .row{box-shadow:0 0 0 2px var(--ui-focus-ring)}:host([data-drop-position='inside']) .row{background:var(--ui-accent-subtle);box-shadow:inset 0 0 0 1px var(--ui-tree-drop-color)}.disclosure,.disclosure-spacer{grid-column:1;grid-row:1;inline-size:20px;block-size:28px}.disclosure{display:grid;place-items:center;padding:0;color:var(--ui-text-muted);background:transparent;border:0;border-radius:var(--ui-radius-sm);cursor:pointer}.disclosure:hover{color:var(--ui-text-primary);background:var(--ui-surface-elevated)}.disclosure-icon{display:block;inline-size:14px;block-size:14px;transform:rotate(-90deg);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}.disclosure-icon--expanded{transform:rotate(0deg)}.disclosure-icon :is(svg),.drag-handle :is(svg){display:block;inline-size:100%;block-size:100%}.leading{display:none}.leading:has(*){display:inline-grid;place-items:center;grid-column:2;grid-row:1;inline-size:16px;block-size:16px;margin-inline-start:var(--ui-space-1)}.label{grid-column:3;grid-row:1;min-inline-size:0;padding:var(--ui-space-1) var(--ui-space-2)}.actions{grid-column:4;grid-row:1;display:inline-flex;align-items:center;min-inline-size:0}.drag-handle{position:absolute;z-index:2;inset-block-start:50%;inset-inline-start:-22px;inline-size:20px;block-size:32px;display:grid;place-items:center;padding:7px 3px;color:var(--ui-text-muted);background:var(--ui-surface-elevated);border:1px solid transparent;border-radius:var(--ui-radius-sm);cursor:grab;opacity:0;pointer-events:none;transform:translateY(-50%);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease)}.row:hover .drag-handle,.drag-handle:focus-visible,:host([data-dragging]) .drag-handle{opacity:1;pointer-events:auto}.drag-handle:active{cursor:grabbing}.drop-indicator{position:absolute;z-index:3;inset-inline:1px;display:none;block-size:2px;border-radius:999px;background:var(--ui-tree-drop-color);pointer-events:none}.drop-indicator::before,.drop-indicator::after{content:'';position:absolute;inset-block-start:50%;inline-size:7px;block-size:7px;border:2px solid var(--ui-tree-drop-color);border-radius:999px;background:var(--ui-surface-elevated);transform:translateY(-50%)}.drop-indicator::before{inset-inline-start:-1px}.drop-indicator::after{inset-inline-end:-1px}:host([data-drop-position='before']) .row-drop-indicator{display:block;inset-block-start:-1px}:host([data-drop-position='after']) .subtree-drop-indicator{display:block;inset-block-end:-1px}.children[hidden]{display:none}:host-context(html[data-ui-input-modality='touch']){--ui-tree-row-min-height:44px}:host-context(html[data-ui-input-modality='touch']) .drag-handle{display:none}@media (prefers-reduced-motion: reduce){.row,.disclosure-icon,.drag-handle{transition:none}}`;
|
|
3265
4103
|
UITreeItem = class {
|
|
3266
4104
|
constructor(hostRef) {
|
|
@@ -3273,8 +4111,10 @@ var init_ui_tree_item_entry = __esm({
|
|
|
3273
4111
|
itemId = "";
|
|
3274
4112
|
/** Accessible name used by the disclosure and drag handle. */
|
|
3275
4113
|
label = "";
|
|
3276
|
-
/**
|
|
3277
|
-
|
|
4114
|
+
/** Application hierarchy depth override used for drop constraints. Defaults to structural nesting. */
|
|
4115
|
+
dropDepth;
|
|
4116
|
+
/** Virtualized-tree descendant-depth override for the tree's max-depth drop constraint. */
|
|
4117
|
+
subtreeDepth;
|
|
3278
4118
|
/** Whether this item accepts children and exposes disclosure behavior. */
|
|
3279
4119
|
container = false;
|
|
3280
4120
|
/** Whether this item participates in pointer drag and drop. */
|
|
@@ -3285,37 +4125,72 @@ var init_ui_tree_item_entry = __esm({
|
|
|
3285
4125
|
dropScope = "";
|
|
3286
4126
|
/** Comma-separated drag kinds accepted as children. Empty accepts every kind. */
|
|
3287
4127
|
accepts = "";
|
|
3288
|
-
/**
|
|
3289
|
-
expanded
|
|
4128
|
+
/** Controlled expansion value. When omitted, `default-expanded` initializes uncontrolled state. */
|
|
4129
|
+
expanded;
|
|
3290
4130
|
/** Initial uncontrolled expansion value. */
|
|
3291
4131
|
defaultExpanded = false;
|
|
3292
4132
|
selected = false;
|
|
3293
4133
|
disabled = false;
|
|
3294
4134
|
internalExpanded = false;
|
|
4135
|
+
structuralLevel = 1;
|
|
4136
|
+
tabStop = false;
|
|
3295
4137
|
syncExpandedFromProp() {
|
|
3296
|
-
this.
|
|
4138
|
+
if (this.expanded !== void 0)
|
|
4139
|
+
this.internalExpanded = this.expanded;
|
|
3297
4140
|
}
|
|
3298
4141
|
componentWillLoad() {
|
|
3299
|
-
this.internalExpanded = this.expanded
|
|
4142
|
+
this.internalExpanded = this.expanded ?? this.defaultExpanded;
|
|
4143
|
+
this.updateStructuralLevel();
|
|
3300
4144
|
}
|
|
3301
|
-
|
|
4145
|
+
connectedCallback() {
|
|
3302
4146
|
this.host.addEventListener("ui-tree-auto-expand", this.onAutoExpand);
|
|
4147
|
+
this.host.addEventListener("ui-tree-structure-sync", this.updateStructuralLevel);
|
|
4148
|
+
this.host.addEventListener("ui-tree-roving-tab-stop", this.onRovingTabStop);
|
|
4149
|
+
this.host.addEventListener("ui-tree-request-expanded", this.onExpansionRequest);
|
|
3303
4150
|
}
|
|
3304
4151
|
disconnectedCallback() {
|
|
3305
4152
|
this.host.removeEventListener("ui-tree-auto-expand", this.onAutoExpand);
|
|
3306
|
-
|
|
4153
|
+
this.host.removeEventListener("ui-tree-structure-sync", this.updateStructuralLevel);
|
|
4154
|
+
this.host.removeEventListener("ui-tree-roving-tab-stop", this.onRovingTabStop);
|
|
4155
|
+
this.host.removeEventListener("ui-tree-request-expanded", this.onExpansionRequest);
|
|
4156
|
+
}
|
|
4157
|
+
updateStructuralLevel = () => {
|
|
4158
|
+
const tree = this.host.closest("ui-tree");
|
|
4159
|
+
let ancestor = this.host.parentElement?.closest("ui-tree-item") ?? null;
|
|
4160
|
+
let level = 1;
|
|
4161
|
+
while (ancestor && tree?.contains(ancestor)) {
|
|
4162
|
+
level += 1;
|
|
4163
|
+
ancestor = ancestor.parentElement?.closest("ui-tree-item") ?? null;
|
|
4164
|
+
}
|
|
4165
|
+
if (this.structuralLevel !== level)
|
|
4166
|
+
this.structuralLevel = level;
|
|
4167
|
+
};
|
|
3307
4168
|
setExpanded(expanded, trigger) {
|
|
3308
|
-
|
|
4169
|
+
const current = this.isExpanded();
|
|
4170
|
+
if (!this.container || this.disabled || current === expanded)
|
|
3309
4171
|
return;
|
|
3310
|
-
this.
|
|
4172
|
+
if (this.expanded === void 0)
|
|
4173
|
+
this.internalExpanded = expanded;
|
|
3311
4174
|
dispatchDetail(this.host, "expand", { id: this.itemId, expanded, trigger });
|
|
4175
|
+
this.host.dispatchEvent(new CustomEvent("ui-tree-expansion-change"));
|
|
4176
|
+
}
|
|
4177
|
+
isExpanded() {
|
|
4178
|
+
return this.expanded ?? this.internalExpanded;
|
|
3312
4179
|
}
|
|
3313
4180
|
onAutoExpand = () => {
|
|
3314
4181
|
this.setExpanded(true, "pointer");
|
|
3315
4182
|
};
|
|
4183
|
+
onRovingTabStop = (event) => {
|
|
4184
|
+
this.tabStop = Boolean(event.detail?.active) && !this.disabled;
|
|
4185
|
+
};
|
|
4186
|
+
onExpansionRequest = (event) => {
|
|
4187
|
+
const detail = event.detail;
|
|
4188
|
+
if (typeof detail?.expanded === "boolean")
|
|
4189
|
+
this.setExpanded(detail.expanded, detail.trigger ?? "keyboard");
|
|
4190
|
+
};
|
|
3316
4191
|
onDisclosureClick = (event) => {
|
|
3317
4192
|
event.stopPropagation();
|
|
3318
|
-
this.setExpanded(!this.
|
|
4193
|
+
this.setExpanded(!this.isExpanded(), eventToTrigger(event));
|
|
3319
4194
|
};
|
|
3320
4195
|
onDisclosureKeydown = (event) => {
|
|
3321
4196
|
if (event.key !== "ArrowRight" && event.key !== "ArrowLeft")
|
|
@@ -3330,16 +4205,17 @@ var init_ui_tree_item_entry = __esm({
|
|
|
3330
4205
|
const path = event.composedPath();
|
|
3331
4206
|
const interactive = path.some((node) => node instanceof HTMLElement && (node.matches('a, button, input, select, textarea, [role="button"], [role="link"]') || node.getAttribute("slot") === "actions"));
|
|
3332
4207
|
if (!interactive)
|
|
3333
|
-
this.setExpanded(!this.
|
|
4208
|
+
this.setExpanded(!this.isExpanded(), eventToTrigger(event));
|
|
3334
4209
|
};
|
|
3335
4210
|
render() {
|
|
3336
|
-
const level =
|
|
3337
|
-
const
|
|
4211
|
+
const level = this.structuralLevel;
|
|
4212
|
+
const expanded = this.isExpanded();
|
|
4213
|
+
const disclosureLabel = `${expanded ? "Collapse" : "Expand"} ${this.label || "item"}`;
|
|
3338
4214
|
const dragLabel = `Drag ${this.label || "item"} to reorder`;
|
|
3339
|
-
return h(Host, { key: "
|
|
4215
|
+
return h(Host, { key: "36ad9eac3e0fe2a606e63294891b1c0697034b46", role: "treeitem", "aria-label": this.label || void 0, "aria-level": String(level), "aria-expanded": this.container ? String(expanded) : void 0, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? "true" : void 0, "data-container": this.container ? "" : void 0, "data-selected": this.selected ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-drag-type": this.dragType || "item", "data-drop-scope": this.dropScope || void 0, "data-accepts": this.accepts || void 0, tabIndex: this.disabled || !this.tabStop ? -1 : 0, style: {
|
|
3340
4216
|
"--ui-tree-item-depth": String(level - 1),
|
|
3341
4217
|
"margin-inline-start": level > 1 ? "var(--ui-tree-indent, 16px)" : "0px"
|
|
3342
|
-
} }, h("div", { key: "
|
|
4218
|
+
} }, h("div", { key: "e92f5bc73accef3b348559ea144e0b769c98c721", class: "row", part: "row", onClick: this.onRowClick }, this.sortable && !this.disabled ? h("button", { class: "drag-handle", part: "drag-handle", type: "button", draggable: true, "aria-label": dragLabel, title: dragLabel }, h("span", { innerHTML: loomaIconMarkup("grip-vertical") })) : null, this.container ? h("button", { class: "disclosure", part: "disclosure", type: "button", "aria-label": disclosureLabel, "aria-expanded": String(expanded), disabled: this.disabled, onClick: this.onDisclosureClick, onKeyDown: this.onDisclosureKeydown }, h("span", { class: { "disclosure-icon": true, "disclosure-icon--expanded": expanded }, innerHTML: loomaIconMarkup("chevron-down") })) : h("span", { class: "disclosure-spacer", "aria-hidden": "true" }), h("span", { key: "dd2d0550d6846d0a4f80a4108968bfc32c18658f", class: "leading", part: "leading" }, h("slot", { key: "622d449a338dce57bc2e64aaf776471e8d3ce1b4", name: "leading" })), h("span", { key: "29c3e6ace4838ab941ada2547356288358faaeb2", class: "label", part: "label" }, h("slot", { key: "f1594c11fa0b9fbe8a3c20df6edce19421cab148" })), h("span", { key: "e4a6408f86b58a325145e713d116fc09322bb0d3", class: "actions", part: "actions" }, h("slot", { key: "ff3afaf1089426e19ee1fc39c6567c3d40ca4272", name: "actions" })), h("span", { key: "efcf23f7aad6c4353fa24bfe2a81001122335f72", class: "drop-indicator row-drop-indicator", part: "drop-indicator", "aria-hidden": "true" })), this.container ? h("div", { class: "children", part: "children", role: "group", hidden: !expanded }, h("slot", { name: "children" })) : null, h("span", { key: "21bfc8a6ad6e487cd044b5a3cbd7e8f900f2d1e1", class: "drop-indicator subtree-drop-indicator", part: "drop-indicator", "aria-hidden": "true" }));
|
|
3343
4219
|
}
|
|
3344
4220
|
static get watchers() {
|
|
3345
4221
|
return {
|
|
@@ -3404,9 +4280,9 @@ function createHoverIntent(delay, onIntent) {
|
|
|
3404
4280
|
var uiTreeCss, UITree;
|
|
3405
4281
|
var init_ui_tree_entry = __esm({
|
|
3406
4282
|
"dist/esm/ui-tree.entry.js"() {
|
|
3407
|
-
|
|
4283
|
+
init_index_8BGiMGQ0();
|
|
3408
4284
|
init_events_JwSoedEO();
|
|
3409
|
-
uiTreeCss = () => `:host{--ui-tree-indent:16px;display:block;min-inline-size:0;padding-inline-start:var(--ui-tree-gutter
|
|
4285
|
+
uiTreeCss = () => `:host{--ui-tree-indent:16px;--ui-tree-gutter:0px;display:block;min-inline-size:0;padding-inline-start:var(--ui-tree-gutter)}::slotted(ui-tree-item){--ui-tree-indent:inherit}`;
|
|
3410
4286
|
UITree = class {
|
|
3411
4287
|
constructor(hostRef) {
|
|
3412
4288
|
registerInstance(this, hostRef);
|
|
@@ -3416,10 +4292,17 @@ var init_ui_tree_entry = __esm({
|
|
|
3416
4292
|
}
|
|
3417
4293
|
label = "Tree";
|
|
3418
4294
|
hoverExpandDelay = 700;
|
|
4295
|
+
/** Maximum resulting item depth accepted by pointer reordering. Zero is unlimited. */
|
|
4296
|
+
maxDepth = 0;
|
|
3419
4297
|
source = null;
|
|
3420
4298
|
target = null;
|
|
3421
4299
|
position = null;
|
|
4300
|
+
rejectedTarget = null;
|
|
4301
|
+
rejectedPosition = null;
|
|
4302
|
+
rejection = null;
|
|
3422
4303
|
hoverIntent = null;
|
|
4304
|
+
structureObserver = null;
|
|
4305
|
+
tabStop = null;
|
|
3423
4306
|
componentDidLoad() {
|
|
3424
4307
|
this.hoverIntent = createHoverIntent(this.hoverExpandDelay, this.expandTarget);
|
|
3425
4308
|
this.host.addEventListener("dragstart", this.onDragStart);
|
|
@@ -3430,6 +4313,11 @@ var init_ui_tree_entry = __esm({
|
|
|
3430
4313
|
this.host.addEventListener("drop", this.onDrop);
|
|
3431
4314
|
this.host.addEventListener("dragend", this.onDragEnd);
|
|
3432
4315
|
this.host.addEventListener("keydown", this.onKeyDown);
|
|
4316
|
+
this.host.addEventListener("focusin", this.onFocusIn);
|
|
4317
|
+
this.host.addEventListener("ui-tree-expansion-change", this.onExpansionChange);
|
|
4318
|
+
this.syncStructuralLevels();
|
|
4319
|
+
this.structureObserver = new MutationObserver(this.syncStructuralLevels);
|
|
4320
|
+
this.structureObserver.observe(this.host, { childList: true, subtree: true });
|
|
3433
4321
|
}
|
|
3434
4322
|
disconnectedCallback() {
|
|
3435
4323
|
this.hoverIntent?.destroy();
|
|
@@ -3441,10 +4329,40 @@ var init_ui_tree_entry = __esm({
|
|
|
3441
4329
|
this.host.removeEventListener("drop", this.onDrop);
|
|
3442
4330
|
this.host.removeEventListener("dragend", this.onDragEnd);
|
|
3443
4331
|
this.host.removeEventListener("keydown", this.onKeyDown);
|
|
4332
|
+
this.host.removeEventListener("focusin", this.onFocusIn);
|
|
4333
|
+
this.host.removeEventListener("ui-tree-expansion-change", this.onExpansionChange);
|
|
4334
|
+
this.structureObserver?.disconnect();
|
|
4335
|
+
this.structureObserver = null;
|
|
4336
|
+
}
|
|
4337
|
+
syncStructuralLevels = () => {
|
|
4338
|
+
for (const item of Array.from(this.host.querySelectorAll("ui-tree-item"))) {
|
|
4339
|
+
item.dispatchEvent(new CustomEvent("ui-tree-structure-sync"));
|
|
4340
|
+
}
|
|
4341
|
+
this.syncTabStop();
|
|
4342
|
+
};
|
|
4343
|
+
syncTabStop(preferred) {
|
|
4344
|
+
const items = this.visibleItems();
|
|
4345
|
+
const next = preferred && items.includes(preferred) ? preferred : this.tabStop && items.includes(this.tabStop) ? this.tabStop : items[0] ?? null;
|
|
4346
|
+
this.tabStop = next;
|
|
4347
|
+
for (const item of items) {
|
|
4348
|
+
item.dispatchEvent(new CustomEvent("ui-tree-roving-tab-stop", {
|
|
4349
|
+
detail: { active: item === next }
|
|
4350
|
+
}));
|
|
4351
|
+
}
|
|
3444
4352
|
}
|
|
3445
4353
|
itemFromEvent(event) {
|
|
3446
4354
|
return event.composedPath().find((node) => node instanceof HTMLElement && node.localName === "ui-tree-item") ?? null;
|
|
3447
4355
|
}
|
|
4356
|
+
eventTargetsInteractiveContent(event) {
|
|
4357
|
+
for (const node of event.composedPath()) {
|
|
4358
|
+
if (node instanceof HTMLElement && node.localName === "ui-tree-item")
|
|
4359
|
+
break;
|
|
4360
|
+
if (node instanceof HTMLElement && node.matches('a, button, input, select, textarea, [role="button"], [role="link"]')) {
|
|
4361
|
+
return true;
|
|
4362
|
+
}
|
|
4363
|
+
}
|
|
4364
|
+
return false;
|
|
4365
|
+
}
|
|
3448
4366
|
itemId(item) {
|
|
3449
4367
|
return item.itemId || item.getAttribute("item-id") || "";
|
|
3450
4368
|
}
|
|
@@ -3482,15 +4400,51 @@ var init_ui_tree_entry = __esm({
|
|
|
3482
4400
|
accepts: (item.getAttribute("data-accepts") || item.getAttribute("accepts") || "").split(",").map((value) => value.trim()).filter(Boolean)
|
|
3483
4401
|
};
|
|
3484
4402
|
}
|
|
3485
|
-
|
|
4403
|
+
constraintDepth(item) {
|
|
4404
|
+
if (item.dropDepth !== void 0)
|
|
4405
|
+
return item.dropDepth;
|
|
4406
|
+
const dropDepth = item.getAttribute("drop-depth");
|
|
4407
|
+
if (dropDepth !== null)
|
|
4408
|
+
return Number(dropDepth);
|
|
4409
|
+
return Number(item.getAttribute("aria-level")) || 1;
|
|
4410
|
+
}
|
|
4411
|
+
subtreeDepth(item) {
|
|
4412
|
+
if (item.subtreeDepth !== void 0)
|
|
4413
|
+
return Math.max(0, Math.floor(item.subtreeDepth));
|
|
4414
|
+
const override = item.getAttribute("subtree-depth");
|
|
4415
|
+
if (override !== null)
|
|
4416
|
+
return Math.max(0, Math.floor(Number(override)));
|
|
4417
|
+
return Array.from(item.querySelectorAll("ui-tree-item")).reduce((deepest, descendant) => {
|
|
4418
|
+
let nesting = 0;
|
|
4419
|
+
let ancestor = descendant.parentElement?.closest("ui-tree-item") ?? null;
|
|
4420
|
+
while (ancestor && ancestor !== item) {
|
|
4421
|
+
nesting += 1;
|
|
4422
|
+
ancestor = ancestor.parentElement?.closest("ui-tree-item") ?? null;
|
|
4423
|
+
}
|
|
4424
|
+
return ancestor === item ? Math.max(deepest, nesting + 1) : deepest;
|
|
4425
|
+
}, 0);
|
|
4426
|
+
}
|
|
4427
|
+
dropRejection(source, target, position) {
|
|
3486
4428
|
if (source.contains(target))
|
|
3487
|
-
return
|
|
4429
|
+
return { reason: "descendant" };
|
|
3488
4430
|
const sourceMeta = this.itemMetadata(source);
|
|
3489
4431
|
const targetMeta = this.itemMetadata(target);
|
|
3490
4432
|
if (position === "inside") {
|
|
3491
|
-
|
|
4433
|
+
if (!this.acceptsChildren(target) || targetMeta.accepts.length > 0 && !targetMeta.accepts.includes(sourceMeta.type)) {
|
|
4434
|
+
return { reason: "incompatible" };
|
|
4435
|
+
}
|
|
4436
|
+
} else if (sourceMeta.type !== targetMeta.type) {
|
|
4437
|
+
return { reason: "incompatible" };
|
|
3492
4438
|
}
|
|
3493
|
-
|
|
4439
|
+
const maxDepth = Math.max(0, Math.floor(this.maxDepth));
|
|
4440
|
+
if (maxDepth > 0) {
|
|
4441
|
+
const targetDepth = Math.max(0, Math.floor(this.constraintDepth(target)));
|
|
4442
|
+
const subtreeDepth = this.subtreeDepth(source);
|
|
4443
|
+
const resultingDepth = targetDepth + (position === "inside" ? 1 : 0) + subtreeDepth;
|
|
4444
|
+
if (resultingDepth > maxDepth)
|
|
4445
|
+
return { reason: "max-depth", maxDepth, resultingDepth };
|
|
4446
|
+
}
|
|
4447
|
+
return null;
|
|
3494
4448
|
}
|
|
3495
4449
|
clearTarget() {
|
|
3496
4450
|
this.target?.removeAttribute("data-drop-position");
|
|
@@ -3498,10 +4452,16 @@ var init_ui_tree_entry = __esm({
|
|
|
3498
4452
|
this.position = null;
|
|
3499
4453
|
this.hoverIntent?.cancel();
|
|
3500
4454
|
}
|
|
4455
|
+
clearRejection() {
|
|
4456
|
+
this.rejectedTarget = null;
|
|
4457
|
+
this.rejectedPosition = null;
|
|
4458
|
+
this.rejection = null;
|
|
4459
|
+
}
|
|
3501
4460
|
finishDrag() {
|
|
3502
4461
|
this.source?.removeAttribute("data-dragging");
|
|
3503
4462
|
this.source = null;
|
|
3504
4463
|
this.clearTarget();
|
|
4464
|
+
this.clearRejection();
|
|
3505
4465
|
}
|
|
3506
4466
|
expandTarget = (itemId) => {
|
|
3507
4467
|
const item = Array.from(this.host.querySelectorAll("ui-tree-item")).find((candidate) => this.itemId(candidate) === itemId);
|
|
@@ -3537,18 +4497,28 @@ var init_ui_tree_entry = __esm({
|
|
|
3537
4497
|
return false;
|
|
3538
4498
|
if (!target || target === this.source) {
|
|
3539
4499
|
this.clearTarget();
|
|
4500
|
+
this.clearRejection();
|
|
3540
4501
|
return false;
|
|
3541
4502
|
}
|
|
3542
4503
|
const row = this.rowFor(target);
|
|
3543
4504
|
if (!row)
|
|
3544
4505
|
return false;
|
|
3545
4506
|
const position = classifyDropPosition(row.getBoundingClientRect(), clientY, this.acceptsChildren(target));
|
|
3546
|
-
|
|
4507
|
+
const rejection = this.dropRejection(this.source, target, position);
|
|
4508
|
+
if (rejection) {
|
|
3547
4509
|
if (dataTransfer)
|
|
3548
4510
|
dataTransfer.dropEffect = "none";
|
|
3549
4511
|
this.clearTarget();
|
|
4512
|
+
if (rejection.reason === "max-depth") {
|
|
4513
|
+
this.rejectedTarget = target;
|
|
4514
|
+
this.rejectedPosition = position;
|
|
4515
|
+
this.rejection = rejection;
|
|
4516
|
+
} else {
|
|
4517
|
+
this.clearRejection();
|
|
4518
|
+
}
|
|
3550
4519
|
return false;
|
|
3551
4520
|
}
|
|
4521
|
+
this.clearRejection();
|
|
3552
4522
|
if (dataTransfer)
|
|
3553
4523
|
dataTransfer.dropEffect = "move";
|
|
3554
4524
|
if (this.target !== target || this.position !== position) {
|
|
@@ -3585,12 +4555,15 @@ var init_ui_tree_entry = __esm({
|
|
|
3585
4555
|
if (this.itemAtPoint(event.clientX, event.clientY))
|
|
3586
4556
|
return;
|
|
3587
4557
|
this.clearTarget();
|
|
4558
|
+
this.clearRejection();
|
|
3588
4559
|
};
|
|
3589
4560
|
dispatchReorder(source, target, position) {
|
|
3590
4561
|
const sourceId = this.itemId(source);
|
|
3591
4562
|
const targetId = this.itemId(target);
|
|
3592
4563
|
if (!sourceId || !targetId)
|
|
3593
4564
|
return;
|
|
4565
|
+
if (position === "inside")
|
|
4566
|
+
this.expandTarget(targetId);
|
|
3594
4567
|
const sourceMeta = this.itemMetadata(source);
|
|
3595
4568
|
const targetMeta = this.itemMetadata(target);
|
|
3596
4569
|
dispatchDetail(this.host, "reorder", {
|
|
@@ -3604,6 +4577,21 @@ var init_ui_tree_entry = __esm({
|
|
|
3604
4577
|
trigger: "pointer"
|
|
3605
4578
|
});
|
|
3606
4579
|
}
|
|
4580
|
+
dispatchReorderRejected(source, target, position, rejection) {
|
|
4581
|
+
const sourceId = this.itemId(source);
|
|
4582
|
+
const targetId = this.itemId(target);
|
|
4583
|
+
if (!sourceId || !targetId)
|
|
4584
|
+
return;
|
|
4585
|
+
dispatchDetail(this.host, "reorder-rejected", {
|
|
4586
|
+
sourceId,
|
|
4587
|
+
targetId,
|
|
4588
|
+
position,
|
|
4589
|
+
reason: "max-depth",
|
|
4590
|
+
maxDepth: rejection.maxDepth,
|
|
4591
|
+
resultingDepth: rejection.resultingDepth,
|
|
4592
|
+
trigger: "pointer"
|
|
4593
|
+
});
|
|
4594
|
+
}
|
|
3607
4595
|
onDrop = (event) => {
|
|
3608
4596
|
if (!this.source || !this.target || !this.position)
|
|
3609
4597
|
return;
|
|
@@ -3613,13 +4601,21 @@ var init_ui_tree_entry = __esm({
|
|
|
3613
4601
|
};
|
|
3614
4602
|
onDragEnd = (event) => {
|
|
3615
4603
|
if (this.source) {
|
|
4604
|
+
if (this.rejectedTarget && this.rejectedPosition && this.rejection) {
|
|
4605
|
+
this.dispatchReorderRejected(this.source, this.rejectedTarget, this.rejectedPosition, this.rejection);
|
|
4606
|
+
this.finishDrag();
|
|
4607
|
+
return;
|
|
4608
|
+
}
|
|
3616
4609
|
const target = this.itemAtPoint(event.clientX, event.clientY);
|
|
3617
4610
|
if (target && target !== this.source) {
|
|
3618
4611
|
const row = this.rowFor(target);
|
|
3619
4612
|
if (row) {
|
|
3620
4613
|
const position = classifyDropPosition(row.getBoundingClientRect(), event.clientY, this.acceptsChildren(target));
|
|
3621
|
-
|
|
4614
|
+
const rejection = this.dropRejection(this.source, target, position);
|
|
4615
|
+
if (!rejection) {
|
|
3622
4616
|
this.dispatchReorder(this.source, target, position);
|
|
4617
|
+
} else if (rejection.reason === "max-depth") {
|
|
4618
|
+
this.dispatchReorderRejected(this.source, target, position, rejection);
|
|
3623
4619
|
}
|
|
3624
4620
|
}
|
|
3625
4621
|
}
|
|
@@ -3629,7 +4625,35 @@ var init_ui_tree_entry = __esm({
|
|
|
3629
4625
|
visibleItems() {
|
|
3630
4626
|
return Array.from(this.host.querySelectorAll("ui-tree-item")).filter((item) => item.getClientRects().length > 0 && !item.hasAttribute("disabled"));
|
|
3631
4627
|
}
|
|
4628
|
+
parentItem(item) {
|
|
4629
|
+
const parent = item.parentElement?.closest("ui-tree-item") ?? null;
|
|
4630
|
+
return parent && this.host.contains(parent) ? parent : null;
|
|
4631
|
+
}
|
|
4632
|
+
firstVisibleChild(item, items) {
|
|
4633
|
+
return items.find((candidate) => this.parentItem(candidate) === item) ?? null;
|
|
4634
|
+
}
|
|
4635
|
+
focusItem(item) {
|
|
4636
|
+
this.syncTabStop(item);
|
|
4637
|
+
item.focus();
|
|
4638
|
+
}
|
|
4639
|
+
requestExpansion(item, expanded) {
|
|
4640
|
+
item.dispatchEvent(new CustomEvent("ui-tree-request-expanded", {
|
|
4641
|
+
detail: { expanded, trigger: "keyboard" }
|
|
4642
|
+
}));
|
|
4643
|
+
}
|
|
4644
|
+
onFocusIn = (event) => {
|
|
4645
|
+
if (this.eventTargetsInteractiveContent(event))
|
|
4646
|
+
return;
|
|
4647
|
+
const item = this.itemFromEvent(event);
|
|
4648
|
+
if (item)
|
|
4649
|
+
this.syncTabStop(item);
|
|
4650
|
+
};
|
|
4651
|
+
onExpansionChange = () => {
|
|
4652
|
+
requestAnimationFrame(() => this.syncTabStop());
|
|
4653
|
+
};
|
|
3632
4654
|
onKeyDown = (event) => {
|
|
4655
|
+
if (this.eventTargetsInteractiveContent(event))
|
|
4656
|
+
return;
|
|
3633
4657
|
const current = this.itemFromEvent(event);
|
|
3634
4658
|
if (!current)
|
|
3635
4659
|
return;
|
|
@@ -3637,31 +4661,57 @@ var init_ui_tree_entry = __esm({
|
|
|
3637
4661
|
const index = items.indexOf(current);
|
|
3638
4662
|
if (index < 0)
|
|
3639
4663
|
return;
|
|
3640
|
-
const next = event.key === "ArrowDown" ? items[index + 1] : event.key === "ArrowUp" ? items[index - 1] : null;
|
|
3641
|
-
if (
|
|
4664
|
+
const next = event.key === "ArrowDown" ? items[index + 1] : event.key === "ArrowUp" ? items[index - 1] : event.key === "Home" ? items[0] : event.key === "End" ? items.at(-1) : null;
|
|
4665
|
+
if (next) {
|
|
4666
|
+
event.preventDefault();
|
|
4667
|
+
this.focusItem(next);
|
|
3642
4668
|
return;
|
|
3643
|
-
|
|
3644
|
-
|
|
4669
|
+
}
|
|
4670
|
+
if (event.key === "ArrowLeft") {
|
|
4671
|
+
if (current.getAttribute("aria-expanded") === "true") {
|
|
4672
|
+
event.preventDefault();
|
|
4673
|
+
this.requestExpansion(current, false);
|
|
4674
|
+
} else if (this.parentItem(current)) {
|
|
4675
|
+
event.preventDefault();
|
|
4676
|
+
this.focusItem(this.parentItem(current));
|
|
4677
|
+
}
|
|
4678
|
+
return;
|
|
4679
|
+
}
|
|
4680
|
+
if (event.key === "ArrowRight") {
|
|
4681
|
+
if (current.getAttribute("aria-expanded") === "false") {
|
|
4682
|
+
event.preventDefault();
|
|
4683
|
+
this.requestExpansion(current, true);
|
|
4684
|
+
} else if (current.getAttribute("aria-expanded") === "true") {
|
|
4685
|
+
const child = this.firstVisibleChild(current, items);
|
|
4686
|
+
if (child) {
|
|
4687
|
+
event.preventDefault();
|
|
4688
|
+
this.focusItem(child);
|
|
4689
|
+
}
|
|
4690
|
+
}
|
|
4691
|
+
}
|
|
3645
4692
|
};
|
|
3646
4693
|
render() {
|
|
3647
|
-
return h(Host, { key: "
|
|
4694
|
+
return h(Host, { key: "549c09abc67dc60b16bf2d6b7d6346f214e9d6ae", role: "tree", "aria-label": this.label || "Tree" }, h("slot", { key: "fea59bde97611bf384e32ce4fb2b3eec9aca784f" }));
|
|
3648
4695
|
}
|
|
3649
4696
|
};
|
|
3650
4697
|
UITree.style = uiTreeCss();
|
|
3651
4698
|
}
|
|
3652
4699
|
});
|
|
3653
4700
|
|
|
3654
|
-
// import("./**/*.entry.js") in dist/esm/index-
|
|
4701
|
+
// import("./**/*.entry.js") in dist/esm/index-8BGiMGQ0.js
|
|
3655
4702
|
var globImport_entry_js;
|
|
3656
4703
|
var init_ = __esm({
|
|
3657
|
-
'import("./**/*.entry.js") in dist/esm/index-
|
|
4704
|
+
'import("./**/*.entry.js") in dist/esm/index-8BGiMGQ0.js'() {
|
|
3658
4705
|
globImport_entry_js = __glob({
|
|
3659
4706
|
"./ui-affordance-scope.entry.js": () => Promise.resolve().then(() => (init_ui_affordance_scope_entry(), ui_affordance_scope_entry_exports)),
|
|
3660
4707
|
"./ui-avatar-group.entry.js": () => Promise.resolve().then(() => (init_ui_avatar_group_entry(), ui_avatar_group_entry_exports)),
|
|
3661
4708
|
"./ui-avatar.entry.js": () => Promise.resolve().then(() => (init_ui_avatar_entry(), ui_avatar_entry_exports)),
|
|
3662
4709
|
"./ui-badge.entry.js": () => Promise.resolve().then(() => (init_ui_badge_entry(), ui_badge_entry_exports)),
|
|
3663
4710
|
"./ui-button.entry.js": () => Promise.resolve().then(() => (init_ui_button_entry(), ui_button_entry_exports)),
|
|
4711
|
+
"./ui-callout.entry.js": () => Promise.resolve().then(() => (init_ui_callout_entry(), ui_callout_entry_exports)),
|
|
3664
4712
|
"./ui-checkbox.entry.js": () => Promise.resolve().then(() => (init_ui_checkbox_entry(), ui_checkbox_entry_exports)),
|
|
4713
|
+
"./ui-chip.entry.js": () => Promise.resolve().then(() => (init_ui_chip_entry(), ui_chip_entry_exports)),
|
|
4714
|
+
"./ui-combobox.entry.js": () => Promise.resolve().then(() => (init_ui_combobox_entry(), ui_combobox_entry_exports)),
|
|
3665
4715
|
"./ui-context-menu.entry.js": () => Promise.resolve().then(() => (init_ui_context_menu_entry(), ui_context_menu_entry_exports)),
|
|
3666
4716
|
"./ui-dialog.entry.js": () => Promise.resolve().then(() => (init_ui_dialog_entry(), ui_dialog_entry_exports)),
|
|
3667
4717
|
"./ui-disclosure.entry.js": () => Promise.resolve().then(() => (init_ui_disclosure_entry(), ui_disclosure_entry_exports)),
|
|
@@ -3689,7 +4739,7 @@ var init_ = __esm({
|
|
|
3689
4739
|
}
|
|
3690
4740
|
});
|
|
3691
4741
|
|
|
3692
|
-
// dist/esm/index-
|
|
4742
|
+
// dist/esm/index-8BGiMGQ0.js
|
|
3693
4743
|
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
3694
4744
|
const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
|
|
3695
4745
|
while (obj && obj !== stopAt) {
|
|
@@ -3731,9 +4781,9 @@ function sortedAttrNames(attrNames) {
|
|
|
3731
4781
|
function transformTag(tag) {
|
|
3732
4782
|
return tag;
|
|
3733
4783
|
}
|
|
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-
|
|
4784
|
+
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;
|
|
4785
|
+
var init_index_8BGiMGQ0 = __esm({
|
|
4786
|
+
"dist/esm/index-8BGiMGQ0.js"() {
|
|
3737
4787
|
/* @vite-ignore */
|
|
3738
4788
|
/* webpackInclude: /\.entry\.js$/ */
|
|
3739
4789
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
@@ -3792,6 +4842,9 @@ var init_index_CEeiinfk = __esm({
|
|
|
3792
4842
|
$instanceValues$: /* @__PURE__ */ new Map(),
|
|
3793
4843
|
$serializerValues$: /* @__PURE__ */ new Map()
|
|
3794
4844
|
};
|
|
4845
|
+
{
|
|
4846
|
+
hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
|
|
4847
|
+
}
|
|
3795
4848
|
{
|
|
3796
4849
|
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
|
3797
4850
|
hostElement["s-p"] = [];
|
|
@@ -4118,6 +5171,19 @@ var init_index_CEeiinfk = __esm({
|
|
|
4118
5171
|
var _a;
|
|
4119
5172
|
return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$;
|
|
4120
5173
|
};
|
|
5174
|
+
createEvent = (ref, name, flags) => {
|
|
5175
|
+
const elm = getElement(ref);
|
|
5176
|
+
return {
|
|
5177
|
+
emit: (detail) => {
|
|
5178
|
+
return emitEvent(elm, name, {
|
|
5179
|
+
bubbles: true,
|
|
5180
|
+
composed: true,
|
|
5181
|
+
cancelable: true,
|
|
5182
|
+
detail
|
|
5183
|
+
});
|
|
5184
|
+
}
|
|
5185
|
+
};
|
|
5186
|
+
};
|
|
4121
5187
|
emitEvent = (elm, name, opts) => {
|
|
4122
5188
|
const ev = plt.ce(name, opts);
|
|
4123
5189
|
elm.dispatchEvent(ev);
|
|
@@ -4693,6 +5759,9 @@ var init_index_CEeiinfk = __esm({
|
|
|
4693
5759
|
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
4694
5760
|
endPostUpdate();
|
|
4695
5761
|
}
|
|
5762
|
+
{
|
|
5763
|
+
hostRef.$onInstanceResolve$(elm);
|
|
5764
|
+
}
|
|
4696
5765
|
{
|
|
4697
5766
|
if (hostRef.$onRenderResolve$) {
|
|
4698
5767
|
hostRef.$onRenderResolve$();
|
|
@@ -4870,6 +5939,17 @@ var init_index_CEeiinfk = __esm({
|
|
|
4870
5939
|
}
|
|
4871
5940
|
}
|
|
4872
5941
|
});
|
|
5942
|
+
} else if (flags & 1 && memberFlags & 64) {
|
|
5943
|
+
Object.defineProperty(prototype, memberName, {
|
|
5944
|
+
value(...args) {
|
|
5945
|
+
var _a2;
|
|
5946
|
+
const ref = getHostRef(this);
|
|
5947
|
+
return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
|
|
5948
|
+
var _a3;
|
|
5949
|
+
return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
|
|
5950
|
+
});
|
|
5951
|
+
}
|
|
5952
|
+
});
|
|
4873
5953
|
}
|
|
4874
5954
|
});
|
|
4875
5955
|
if (flags & 1) {
|
|
@@ -5244,20 +6324,23 @@ __export(index_exports, {
|
|
|
5244
6324
|
createProximityCoordinator: () => createProximityCoordinator2,
|
|
5245
6325
|
createViewportSurface: () => createViewportSurface2,
|
|
5246
6326
|
distanceFromPointToRect: () => distanceFromPointToRect2,
|
|
6327
|
+
formatEditingValue: () => formatEditingValue2,
|
|
5247
6328
|
getTopOverlay: () => getTopOverlay2,
|
|
5248
6329
|
getVisualViewportRect: () => getVisualViewportRect2,
|
|
5249
6330
|
initializeInputModality: () => initializeInputModality,
|
|
5250
6331
|
isTopOverlay: () => isTopOverlay,
|
|
5251
6332
|
loomaIconMarkup: () => loomaIconMarkup2,
|
|
6333
|
+
mapComboboxOptions: () => mapComboboxOptions,
|
|
5252
6334
|
openOverlay: () => openOverlay2,
|
|
5253
6335
|
requestTopOverlayClose: () => requestTopOverlayClose2,
|
|
5254
|
-
setElementDragImage: () => setElementDragImage2
|
|
6336
|
+
setElementDragImage: () => setElementDragImage2,
|
|
6337
|
+
validateField: () => validateField2
|
|
5255
6338
|
});
|
|
5256
6339
|
module.exports = __toCommonJS(index_exports);
|
|
5257
6340
|
|
|
5258
6341
|
// dist/esm/loader.js
|
|
5259
|
-
|
|
5260
|
-
|
|
6342
|
+
init_index_8BGiMGQ0();
|
|
6343
|
+
init_index_8BGiMGQ0();
|
|
5261
6344
|
|
|
5262
6345
|
// dist/esm/app-globals-DQuL1Twl.js
|
|
5263
6346
|
var globalScripts = () => {
|
|
@@ -5267,7 +6350,7 @@ var globalScripts = () => {
|
|
|
5267
6350
|
var defineCustomElements = async (win2, options) => {
|
|
5268
6351
|
if (typeof window === "undefined") return void 0;
|
|
5269
6352
|
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": [{ "
|
|
6353
|
+
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-callout", [[769, "ui-callout", { "tone": [1] }]]], ["ui-checkbox", [[769, "ui-checkbox", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "indeterminate": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "internalChecked": [{ "syncToInput": 0 }], "indeterminate": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }] }]]], ["ui-chip", [[769, "ui-chip", { "appearance": [1] }]]], ["ui-dialog", [[769, "ui-dialog", { "open": [4], "defaultOpen": [4, "default-open"], "modal": [4], "dismissible": [4], "label": [1], "internalOpen": [32], "accessibleLabel": [32] }, null, { "open": [{ "syncFromProp": 0 }], "label": [{ "syncLabelFromProp": 0 }], "internalOpen": [{ "syncOpen": 0 }] }]]], ["ui-disclosure", [[769, "ui-disclosure", { "open": [4], "defaultOpen": [4, "default-open"], "disabled": [4], "internalOpen": [32], "contentId": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncState": 0 }] }]]], ["ui-floating-action-button", [[769, "ui-floating-action-button", { "disabled": [516], "mobileOnly": [516, "mobile-only"], "label": [1] }]]], ["ui-form-field", [[769, "ui-form-field", { "invalid": [4], "disabled": [4], "required": [4] }]]], ["ui-icon-button", [[769, "ui-icon-button", { "disabled": [516], "label": [1], "size": [513], "variant": [513], "anticipatory": [516] }]]], ["ui-input", [[769, "ui-input", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToInput": 0 }], "defaultValue": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "invalid": [{ "syncToInput": 0 }], "readOnly": [{ "syncToInput": 0 }] }]]], ["ui-menu-item", [[769, "ui-menu-item", { "disabled": [516], "value": [1] }]]], ["ui-popover", [[769, "ui-popover", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "placement": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "onOpenChange": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }] }]]], ["ui-radio", [[769, "ui-radio", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "name": [1], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "disabled": [{ "syncToInput": 0 }], "name": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }], "value": [{ "syncToInput": 0 }] }]]], ["ui-radio-group", [[769, "ui-radio-group", { "value": [1], "name": [1], "orientation": [1], "disabled": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToRadios": 0 }], "name": [{ "syncToRadios": 0 }], "orientation": [{ "syncToRadios": 0 }], "disabled": [{ "syncToRadios": 0 }] }]]], ["ui-search-result-row", [[769, "ui-search-result-row", { "disabled": [516], "selected": [516], "hasLeading": [32], "hasMeta": [32], "hasExcerpt": [32], "hasTrailing": [32] }]]], ["ui-search-shell", [[769, "ui-search-shell", { "hasStatus": [32], "hasFooter": [32] }]]], ["ui-select", [[769, "ui-select", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToSelect": 0 }], "defaultValue": [{ "syncToSelect": 0 }], "disabled": [{ "syncToSelect": 0 }], "invalid": [{ "syncToSelect": 0 }], "required": [{ "syncToSelect": 0 }] }]]], ["ui-switch", [[769, "ui-switch", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }] }]]], ["ui-tabs", [[769, "ui-tabs", { "value": [1], "defaultValue": [1, "default-value"], "orientation": [1], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncState": 0 }], "orientation": [{ "syncState": 0 }] }]]], ["ui-textarea", [[769, "ui-textarea", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "rows": [2], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToTextarea": 0 }], "defaultValue": [{ "syncToTextarea": 0 }], "disabled": [{ "syncToTextarea": 0 }], "invalid": [{ "syncToTextarea": 0 }], "readOnly": [{ "syncToTextarea": 0 }], "rows": [{ "syncToTextarea": 0 }] }]]], ["ui-toast-region", [[769, "ui-toast-region", { "open": [4], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncSurface": 0 }] }]]], ["ui-top-bar", [[769, "ui-top-bar", { "hasLeading": [32], "hasSearch": [32], "hasActions": [32] }]]], ["ui-tree", [[769, "ui-tree", { "label": [1], "hoverExpandDelay": [2, "hover-expand-delay"], "maxDepth": [2, "max-depth"] }]]], ["ui-tree-item", [[769, "ui-tree-item", { "itemId": [1, "item-id"], "label": [1], "dropDepth": [2, "drop-depth"], "subtreeDepth": [2, "subtree-depth"], "container": [4], "sortable": [4], "dragType": [1, "drag-type"], "dropScope": [1, "drop-scope"], "accepts": [1], "expanded": [4], "defaultExpanded": [4, "default-expanded"], "selected": [4], "disabled": [4], "internalExpanded": [32], "structuralLevel": [32], "tabStop": [32] }, null, { "expanded": [{ "syncExpandedFromProp": 0 }] }]]], ["ui-menu", [[769, "ui-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "placement": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }], "internalOpen": [{ "syncSurface": 0 }] }]]], ["ui-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
6354
|
};
|
|
5272
6355
|
|
|
5273
6356
|
// loader/index.js
|
|
@@ -5333,11 +6416,8 @@ function handleLightDismiss2(event) {
|
|
|
5333
6416
|
if (!top || !getOverlayDismissible2(top)) {
|
|
5334
6417
|
return;
|
|
5335
6418
|
}
|
|
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
|
-
}
|
|
6419
|
+
const boundary = [top.element, ...top.relatedElements ?? []];
|
|
6420
|
+
if (event.composedPath().some((target) => target instanceof Node && boundary.some((element) => element.contains(target)))) return;
|
|
5341
6421
|
requestTopOverlayClose2("light-dismiss", "pointer");
|
|
5342
6422
|
}
|
|
5343
6423
|
function ensureListeners2() {
|
|
@@ -5732,6 +6812,8 @@ var LOOMA_ICONS2 = {
|
|
|
5732
6812
|
"align-right": import_lucide.AlignRight,
|
|
5733
6813
|
bold: import_lucide.Bold,
|
|
5734
6814
|
braces: import_lucide.Braces,
|
|
6815
|
+
"circle-check": import_lucide.CircleCheck,
|
|
6816
|
+
"circle-x": import_lucide.CircleX,
|
|
5735
6817
|
"chevron-down": import_lucide.ChevronDown,
|
|
5736
6818
|
"chevron-left": import_lucide.ChevronLeft,
|
|
5737
6819
|
"code-xml": import_lucide.CodeXml,
|
|
@@ -5745,11 +6827,13 @@ var LOOMA_ICONS2 = {
|
|
|
5745
6827
|
"heading-3": import_lucide.Heading3,
|
|
5746
6828
|
highlighter: import_lucide.Highlighter,
|
|
5747
6829
|
image: import_lucide.Image,
|
|
6830
|
+
info: import_lucide.Info,
|
|
5748
6831
|
italic: import_lucide.Italic,
|
|
5749
6832
|
list: import_lucide.List,
|
|
5750
6833
|
"list-ordered": import_lucide.ListOrdered,
|
|
5751
6834
|
"list-todo": import_lucide.ListTodo,
|
|
5752
6835
|
merge: import_lucide.Merge,
|
|
6836
|
+
"notebook-pen": import_lucide.NotebookPen,
|
|
5753
6837
|
minus: import_lucide.Minus,
|
|
5754
6838
|
"paint-bucket": import_lucide.PaintBucket,
|
|
5755
6839
|
"panel-bottom": import_lucide.PanelBottom,
|
|
@@ -5765,6 +6849,7 @@ var LOOMA_ICONS2 = {
|
|
|
5765
6849
|
strikethrough: import_lucide.Strikethrough,
|
|
5766
6850
|
table: import_lucide.Table2,
|
|
5767
6851
|
trash: import_lucide.Trash2,
|
|
6852
|
+
"triangle-alert": import_lucide.TriangleAlert,
|
|
5768
6853
|
underline: import_lucide.Underline,
|
|
5769
6854
|
undo: import_lucide.Undo2
|
|
5770
6855
|
};
|
|
@@ -5826,6 +6911,60 @@ function createHoverIntent2(delay, onIntent) {
|
|
|
5826
6911
|
};
|
|
5827
6912
|
}
|
|
5828
6913
|
|
|
6914
|
+
// src/field/combobox.ts
|
|
6915
|
+
function mapComboboxOptions(rows, map) {
|
|
6916
|
+
return rows.map((row) => ({ ...map(row), metadata: row }));
|
|
6917
|
+
}
|
|
6918
|
+
|
|
6919
|
+
// src/field/validation.ts
|
|
6920
|
+
function formatEditingValue2(raw, selection, format) {
|
|
6921
|
+
const unchanged = { display: raw, selection };
|
|
6922
|
+
if (!format) return unchanged;
|
|
6923
|
+
let result;
|
|
6924
|
+
try {
|
|
6925
|
+
result = format(raw, selection);
|
|
6926
|
+
} catch {
|
|
6927
|
+
return unchanged;
|
|
6928
|
+
}
|
|
6929
|
+
if (!result) return unchanged;
|
|
6930
|
+
const characters = Array.from(raw);
|
|
6931
|
+
let cursor = 0;
|
|
6932
|
+
for (const character of result.display) if (character === characters[cursor]) cursor += 1;
|
|
6933
|
+
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;
|
|
6934
|
+
return result;
|
|
6935
|
+
}
|
|
6936
|
+
async function validateField2(request, config) {
|
|
6937
|
+
let output = request.raw;
|
|
6938
|
+
let issues = [];
|
|
6939
|
+
const check = () => request.signal.throwIfAborted();
|
|
6940
|
+
try {
|
|
6941
|
+
check();
|
|
6942
|
+
if (config.parse) output = await config.parse(request.raw, request);
|
|
6943
|
+
check();
|
|
6944
|
+
if (config.schema) {
|
|
6945
|
+
const result = await config.schema["~standard"].validate(output);
|
|
6946
|
+
check();
|
|
6947
|
+
if (result.issues) issues = result.issues;
|
|
6948
|
+
else if ("value" in result) output = result.value;
|
|
6949
|
+
}
|
|
6950
|
+
if (!issues.some((issue) => issue.severity !== "warning")) {
|
|
6951
|
+
if (config.normalize) output = await config.normalize(output, request);
|
|
6952
|
+
check();
|
|
6953
|
+
if (config.validator) {
|
|
6954
|
+
const result = await config.validator(output, request);
|
|
6955
|
+
check();
|
|
6956
|
+
issues = [...issues, ...result.issues ?? []];
|
|
6957
|
+
if ("output" in result) output = result.output;
|
|
6958
|
+
}
|
|
6959
|
+
}
|
|
6960
|
+
} catch (error) {
|
|
6961
|
+
check();
|
|
6962
|
+
issues = [{ message: error instanceof Error ? error.message : "Unable to validate this value." }];
|
|
6963
|
+
}
|
|
6964
|
+
issues = [...issues, ...config.issues ?? []];
|
|
6965
|
+
return { output: issues.some((issue) => issue.severity !== "warning") ? void 0 : output, issues };
|
|
6966
|
+
}
|
|
6967
|
+
|
|
5829
6968
|
// index.ts
|
|
5830
6969
|
if (typeof document !== "undefined") initializeInputModality(document);
|
|
5831
6970
|
defineCustomElements();
|
|
@@ -5841,14 +6980,17 @@ defineCustomElements();
|
|
|
5841
6980
|
createProximityCoordinator,
|
|
5842
6981
|
createViewportSurface,
|
|
5843
6982
|
distanceFromPointToRect,
|
|
6983
|
+
formatEditingValue,
|
|
5844
6984
|
getTopOverlay,
|
|
5845
6985
|
getVisualViewportRect,
|
|
5846
6986
|
initializeInputModality,
|
|
5847
6987
|
isTopOverlay,
|
|
5848
6988
|
loomaIconMarkup,
|
|
6989
|
+
mapComboboxOptions,
|
|
5849
6990
|
openOverlay,
|
|
5850
6991
|
requestTopOverlayClose,
|
|
5851
|
-
setElementDragImage
|
|
6992
|
+
setElementDragImage,
|
|
6993
|
+
validateField
|
|
5852
6994
|
});
|
|
5853
6995
|
/**
|
|
5854
6996
|
* @license lucide v0.554.0 - ISC
|