@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
|
@@ -1,38 +1,51 @@
|
|
|
1
1
|
import {
|
|
2
2
|
closeOverlay,
|
|
3
|
-
openOverlay
|
|
4
|
-
|
|
5
|
-
} from "./chunk-SZJQ3NPX.js";
|
|
3
|
+
openOverlay
|
|
4
|
+
} from "./chunk-TL4FIE7X.js";
|
|
6
5
|
import {
|
|
7
6
|
createAnchoredSurface
|
|
8
7
|
} from "./chunk-YHXJC5M5.js";
|
|
8
|
+
import {
|
|
9
|
+
controlledOrDefault,
|
|
10
|
+
isControlled
|
|
11
|
+
} from "./chunk-HNFCGIBP.js";
|
|
9
12
|
import {
|
|
10
13
|
dispatchDetail
|
|
11
14
|
} from "./chunk-UL7UIUJZ.js";
|
|
12
15
|
import {
|
|
13
16
|
Host,
|
|
17
|
+
createEvent,
|
|
14
18
|
getElement,
|
|
15
19
|
h,
|
|
16
20
|
registerInstance
|
|
17
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-IMHSPETJ.js";
|
|
18
22
|
|
|
19
23
|
// dist/esm/ui-tooltip.entry.js
|
|
20
|
-
var uiTooltipCss = () => `:host{position:fixed;inset:auto;margin:0;display:inline-block;
|
|
24
|
+
var 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}}`;
|
|
21
25
|
var UITooltip = class {
|
|
22
26
|
constructor(hostRef) {
|
|
23
27
|
registerInstance(this, hostRef);
|
|
28
|
+
this.opened = createEvent(this, "open");
|
|
29
|
+
this.closed = createEvent(this, "close");
|
|
24
30
|
}
|
|
25
31
|
get host() {
|
|
26
32
|
return getElement(this);
|
|
27
33
|
}
|
|
28
34
|
for = "";
|
|
29
|
-
open
|
|
35
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
36
|
+
open;
|
|
30
37
|
defaultOpen = false;
|
|
31
38
|
placement = "top-start";
|
|
32
39
|
/** Pointer hover intent delay in milliseconds. Keyboard focus is immediate. */
|
|
33
40
|
showDelay = 500;
|
|
34
41
|
/** Pointer leave grace period in milliseconds. */
|
|
35
42
|
hideDelay = 100;
|
|
43
|
+
/** Click or tap pins the description; activate again to dismiss. */
|
|
44
|
+
toggleOnClick = false;
|
|
45
|
+
pinned = false;
|
|
46
|
+
focused = false;
|
|
47
|
+
opened;
|
|
48
|
+
closed;
|
|
36
49
|
internalOpen = false;
|
|
37
50
|
overlayId = `ui-tooltip-${Math.random().toString(36).slice(2, 11)}`;
|
|
38
51
|
trigger = null;
|
|
@@ -41,7 +54,8 @@ var UITooltip = class {
|
|
|
41
54
|
hideTimer = null;
|
|
42
55
|
syncFromProp() {
|
|
43
56
|
this.clearTimers();
|
|
44
|
-
|
|
57
|
+
if (isControlled(this.open))
|
|
58
|
+
this.internalOpen = this.open;
|
|
45
59
|
}
|
|
46
60
|
resetSurface() {
|
|
47
61
|
this.syncTrigger();
|
|
@@ -65,11 +79,13 @@ var UITooltip = class {
|
|
|
65
79
|
}
|
|
66
80
|
}
|
|
67
81
|
componentDidLoad() {
|
|
68
|
-
this.
|
|
69
|
-
|
|
82
|
+
if (!this.host.id)
|
|
83
|
+
this.host.id = this.overlayId;
|
|
84
|
+
this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
|
|
70
85
|
this.syncTrigger();
|
|
71
86
|
this.setupSurface();
|
|
72
|
-
this.host.addEventListener("
|
|
87
|
+
this.host.addEventListener("pointerenter", this.onSurfaceEnter);
|
|
88
|
+
this.host.addEventListener("pointerleave", this.onTriggerLeave);
|
|
73
89
|
this.syncOverlay();
|
|
74
90
|
}
|
|
75
91
|
componentDidUpdate() {
|
|
@@ -80,11 +96,12 @@ var UITooltip = class {
|
|
|
80
96
|
this.detachTriggerListeners();
|
|
81
97
|
this.surface?.destroy();
|
|
82
98
|
this.surface = null;
|
|
83
|
-
this.host.removeEventListener("
|
|
99
|
+
this.host.removeEventListener("pointerenter", this.onSurfaceEnter);
|
|
100
|
+
this.host.removeEventListener("pointerleave", this.onTriggerLeave);
|
|
84
101
|
closeOverlay(this.overlayId);
|
|
85
102
|
}
|
|
86
103
|
syncTrigger() {
|
|
87
|
-
const next = this.for ? this.host.
|
|
104
|
+
const next = this.for ? this.host.getRootNode().getElementById(this.for) : this.host.previousElementSibling;
|
|
88
105
|
if (next === this.trigger)
|
|
89
106
|
return;
|
|
90
107
|
this.detachTriggerListeners();
|
|
@@ -103,6 +120,11 @@ var UITooltip = class {
|
|
|
103
120
|
this.detachTriggerListeners();
|
|
104
121
|
if (!this.trigger)
|
|
105
122
|
return;
|
|
123
|
+
const ids = new Set((this.trigger.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean));
|
|
124
|
+
ids.add(this.host.id);
|
|
125
|
+
this.trigger.setAttribute("aria-describedby", [...ids].join(" "));
|
|
126
|
+
this.trigger.addEventListener("click", this.onTriggerClick);
|
|
127
|
+
this.trigger.addEventListener("keydown", this.onTriggerKeydown);
|
|
106
128
|
this.trigger.addEventListener("pointerenter", this.onTriggerEnter);
|
|
107
129
|
this.trigger.addEventListener("pointerleave", this.onTriggerLeave);
|
|
108
130
|
this.trigger.addEventListener("focusin", this.onTriggerFocusIn);
|
|
@@ -111,6 +133,13 @@ var UITooltip = class {
|
|
|
111
133
|
detachTriggerListeners() {
|
|
112
134
|
if (!this.trigger)
|
|
113
135
|
return;
|
|
136
|
+
const ids = (this.trigger.getAttribute("aria-describedby") || "").split(/\s+/).filter((id) => id && id !== this.host.id);
|
|
137
|
+
if (ids.length)
|
|
138
|
+
this.trigger.setAttribute("aria-describedby", ids.join(" "));
|
|
139
|
+
else
|
|
140
|
+
this.trigger.removeAttribute("aria-describedby");
|
|
141
|
+
this.trigger.removeEventListener("click", this.onTriggerClick);
|
|
142
|
+
this.trigger.removeEventListener("keydown", this.onTriggerKeydown);
|
|
114
143
|
this.trigger.removeEventListener("pointerenter", this.onTriggerEnter);
|
|
115
144
|
this.trigger.removeEventListener("pointerleave", this.onTriggerLeave);
|
|
116
145
|
this.trigger.removeEventListener("focusin", this.onTriggerFocusIn);
|
|
@@ -135,14 +164,29 @@ var UITooltip = class {
|
|
|
135
164
|
setInteractionOpen(nextOpen, trigger) {
|
|
136
165
|
if (this.internalOpen === nextOpen)
|
|
137
166
|
return;
|
|
138
|
-
this.
|
|
167
|
+
if (!isControlled(this.open))
|
|
168
|
+
this.internalOpen = nextOpen;
|
|
139
169
|
dispatchDetail(this.host, nextOpen ? "open" : "close", {
|
|
140
170
|
open: nextOpen,
|
|
141
171
|
reason: "action",
|
|
142
172
|
trigger
|
|
143
173
|
});
|
|
144
174
|
}
|
|
145
|
-
|
|
175
|
+
onSurfaceEnter = () => this.clearHideTimer();
|
|
176
|
+
onTriggerClick = (event) => {
|
|
177
|
+
if (!this.toggleOnClick)
|
|
178
|
+
return;
|
|
179
|
+
this.clearTimers();
|
|
180
|
+
this.pinned = !this.pinned;
|
|
181
|
+
this.setInteractionOpen(this.pinned, event.detail === 0 ? "keyboard" : "pointer");
|
|
182
|
+
};
|
|
183
|
+
onTriggerKeydown = (event) => {
|
|
184
|
+
if (event.key === "Escape")
|
|
185
|
+
this.clearTimers();
|
|
186
|
+
};
|
|
187
|
+
onTriggerEnter = (event) => {
|
|
188
|
+
if (event.pointerType === "touch")
|
|
189
|
+
return;
|
|
146
190
|
this.clearHideTimer();
|
|
147
191
|
if (this.internalOpen || this.showTimer !== null)
|
|
148
192
|
return;
|
|
@@ -153,7 +197,7 @@ var UITooltip = class {
|
|
|
153
197
|
};
|
|
154
198
|
onTriggerLeave = () => {
|
|
155
199
|
this.clearShowTimer();
|
|
156
|
-
if (!this.internalOpen || this.hideTimer !== null)
|
|
200
|
+
if (this.focused || this.pinned || !this.internalOpen || this.hideTimer !== null)
|
|
157
201
|
return;
|
|
158
202
|
this.hideTimer = setTimeout(() => {
|
|
159
203
|
this.hideTimer = null;
|
|
@@ -161,6 +205,7 @@ var UITooltip = class {
|
|
|
161
205
|
}, Math.max(0, this.hideDelay));
|
|
162
206
|
};
|
|
163
207
|
onTriggerFocusIn = () => {
|
|
208
|
+
this.focused = true;
|
|
164
209
|
this.clearTimers();
|
|
165
210
|
this.setInteractionOpen(true, "keyboard");
|
|
166
211
|
};
|
|
@@ -168,28 +213,26 @@ var UITooltip = class {
|
|
|
168
213
|
const related = e.relatedTarget;
|
|
169
214
|
if (related && this.host.contains(related))
|
|
170
215
|
return;
|
|
216
|
+
this.focused = false;
|
|
217
|
+
this.pinned = false;
|
|
171
218
|
this.clearTimers();
|
|
172
219
|
this.setInteractionOpen(false, "keyboard");
|
|
173
220
|
};
|
|
174
221
|
handleRequestClose(reason, trigger) {
|
|
175
|
-
if (reason === "escape") {
|
|
222
|
+
if (reason === "escape" || reason === "light-dismiss" && this.toggleOnClick) {
|
|
223
|
+
this.pinned = false;
|
|
176
224
|
this.clearTimers();
|
|
177
|
-
this.
|
|
225
|
+
if (!isControlled(this.open))
|
|
226
|
+
this.internalOpen = false;
|
|
178
227
|
dispatchDetail(this.host, "close", {
|
|
179
228
|
open: false,
|
|
180
|
-
reason
|
|
229
|
+
reason,
|
|
181
230
|
trigger
|
|
182
231
|
});
|
|
183
|
-
this.trigger?.focus();
|
|
184
232
|
}
|
|
185
233
|
}
|
|
186
|
-
onKeydown = (e) => {
|
|
187
|
-
if (e.key === "Escape") {
|
|
188
|
-
requestTopOverlayClose("escape", "keyboard");
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
234
|
render() {
|
|
192
|
-
return h(Host, { key: "
|
|
235
|
+
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" })));
|
|
193
236
|
}
|
|
194
237
|
static get watchers() {
|
|
195
238
|
return {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getElement,
|
|
4
4
|
h,
|
|
5
5
|
registerInstance
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IMHSPETJ.js";
|
|
7
7
|
|
|
8
8
|
// dist/esm/ui-top-bar.entry.js
|
|
9
9
|
var uiTopBarCss = () => `:host{position:sticky;inset-block-start:0;z-index:var(--ui-top-bar-z-index, 100);display:block}.top-bar{min-block-size:calc(var(--ui-top-bar-height, 56px) + env(safe-area-inset-top));display:flex;align-items:center;gap:var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));padding-block-start:env(safe-area-inset-top);padding-inline-start:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-left) );padding-inline-end:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-right) );background:var(--ui-top-bar-bg, var(--ui-surface, #ffffff));border-block-end:1px solid var(--ui-top-bar-border, var(--ui-border, #e5e7eb))}.top-bar__leading,.top-bar__search,.top-bar__actions{display:flex;align-items:center;flex-shrink:0}.top-bar__actions{gap:var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem))}.top-bar__title{min-inline-size:0;flex:1}[hidden]{display:none}@media (min-width: 768px){:host{display:none}}`;
|
|
@@ -40,7 +40,7 @@ var UITopBar = class {
|
|
|
40
40
|
this.hasActions = slotHasContent(this.actionsSlot);
|
|
41
41
|
};
|
|
42
42
|
render() {
|
|
43
|
-
return h(Host, { key: "
|
|
43
|
+
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 }))));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
UITopBar.style = uiTopBarCss();
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import {
|
|
2
|
+
loomaIconMarkup
|
|
3
|
+
} from "./chunk-NB6DBRXQ.js";
|
|
4
|
+
import {
|
|
5
|
+
dispatchDetail,
|
|
6
|
+
eventToTrigger
|
|
7
|
+
} from "./chunk-UL7UIUJZ.js";
|
|
8
|
+
import {
|
|
9
|
+
Host,
|
|
10
|
+
getElement,
|
|
11
|
+
h,
|
|
12
|
+
registerInstance
|
|
13
|
+
} from "./chunk-IMHSPETJ.js";
|
|
14
|
+
|
|
15
|
+
// dist/esm/ui-tree-item.entry.js
|
|
16
|
+
var 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}}`;
|
|
17
|
+
var UITreeItem = class {
|
|
18
|
+
constructor(hostRef) {
|
|
19
|
+
registerInstance(this, hostRef);
|
|
20
|
+
}
|
|
21
|
+
get host() {
|
|
22
|
+
return getElement(this);
|
|
23
|
+
}
|
|
24
|
+
/** Stable application identifier emitted by tree interaction events. */
|
|
25
|
+
itemId = "";
|
|
26
|
+
/** Accessible name used by the disclosure and drag handle. */
|
|
27
|
+
label = "";
|
|
28
|
+
/** Application hierarchy depth override used for drop constraints. Defaults to structural nesting. */
|
|
29
|
+
dropDepth;
|
|
30
|
+
/** Virtualized-tree descendant-depth override for the tree's max-depth drop constraint. */
|
|
31
|
+
subtreeDepth;
|
|
32
|
+
/** Whether this item accepts children and exposes disclosure behavior. */
|
|
33
|
+
container = false;
|
|
34
|
+
/** Whether this item participates in pointer drag and drop. */
|
|
35
|
+
sortable = false;
|
|
36
|
+
/** Application-defined kind used to reject incompatible sibling drops. */
|
|
37
|
+
dragType = "item";
|
|
38
|
+
/** Application-defined parent/list identity included with reorder events. */
|
|
39
|
+
dropScope = "";
|
|
40
|
+
/** Comma-separated drag kinds accepted as children. Empty accepts every kind. */
|
|
41
|
+
accepts = "";
|
|
42
|
+
/** Controlled expansion value. When omitted, `default-expanded` initializes uncontrolled state. */
|
|
43
|
+
expanded;
|
|
44
|
+
/** Initial uncontrolled expansion value. */
|
|
45
|
+
defaultExpanded = false;
|
|
46
|
+
selected = false;
|
|
47
|
+
disabled = false;
|
|
48
|
+
internalExpanded = false;
|
|
49
|
+
structuralLevel = 1;
|
|
50
|
+
tabStop = false;
|
|
51
|
+
syncExpandedFromProp() {
|
|
52
|
+
if (this.expanded !== void 0)
|
|
53
|
+
this.internalExpanded = this.expanded;
|
|
54
|
+
}
|
|
55
|
+
componentWillLoad() {
|
|
56
|
+
this.internalExpanded = this.expanded ?? this.defaultExpanded;
|
|
57
|
+
this.updateStructuralLevel();
|
|
58
|
+
}
|
|
59
|
+
connectedCallback() {
|
|
60
|
+
this.host.addEventListener("ui-tree-auto-expand", this.onAutoExpand);
|
|
61
|
+
this.host.addEventListener("ui-tree-structure-sync", this.updateStructuralLevel);
|
|
62
|
+
this.host.addEventListener("ui-tree-roving-tab-stop", this.onRovingTabStop);
|
|
63
|
+
this.host.addEventListener("ui-tree-request-expanded", this.onExpansionRequest);
|
|
64
|
+
}
|
|
65
|
+
disconnectedCallback() {
|
|
66
|
+
this.host.removeEventListener("ui-tree-auto-expand", this.onAutoExpand);
|
|
67
|
+
this.host.removeEventListener("ui-tree-structure-sync", this.updateStructuralLevel);
|
|
68
|
+
this.host.removeEventListener("ui-tree-roving-tab-stop", this.onRovingTabStop);
|
|
69
|
+
this.host.removeEventListener("ui-tree-request-expanded", this.onExpansionRequest);
|
|
70
|
+
}
|
|
71
|
+
updateStructuralLevel = () => {
|
|
72
|
+
const tree = this.host.closest("ui-tree");
|
|
73
|
+
let ancestor = this.host.parentElement?.closest("ui-tree-item") ?? null;
|
|
74
|
+
let level = 1;
|
|
75
|
+
while (ancestor && tree?.contains(ancestor)) {
|
|
76
|
+
level += 1;
|
|
77
|
+
ancestor = ancestor.parentElement?.closest("ui-tree-item") ?? null;
|
|
78
|
+
}
|
|
79
|
+
if (this.structuralLevel !== level)
|
|
80
|
+
this.structuralLevel = level;
|
|
81
|
+
};
|
|
82
|
+
setExpanded(expanded, trigger) {
|
|
83
|
+
const current = this.isExpanded();
|
|
84
|
+
if (!this.container || this.disabled || current === expanded)
|
|
85
|
+
return;
|
|
86
|
+
if (this.expanded === void 0)
|
|
87
|
+
this.internalExpanded = expanded;
|
|
88
|
+
dispatchDetail(this.host, "expand", { id: this.itemId, expanded, trigger });
|
|
89
|
+
this.host.dispatchEvent(new CustomEvent("ui-tree-expansion-change"));
|
|
90
|
+
}
|
|
91
|
+
isExpanded() {
|
|
92
|
+
return this.expanded ?? this.internalExpanded;
|
|
93
|
+
}
|
|
94
|
+
onAutoExpand = () => {
|
|
95
|
+
this.setExpanded(true, "pointer");
|
|
96
|
+
};
|
|
97
|
+
onRovingTabStop = (event) => {
|
|
98
|
+
this.tabStop = Boolean(event.detail?.active) && !this.disabled;
|
|
99
|
+
};
|
|
100
|
+
onExpansionRequest = (event) => {
|
|
101
|
+
const detail = event.detail;
|
|
102
|
+
if (typeof detail?.expanded === "boolean")
|
|
103
|
+
this.setExpanded(detail.expanded, detail.trigger ?? "keyboard");
|
|
104
|
+
};
|
|
105
|
+
onDisclosureClick = (event) => {
|
|
106
|
+
event.stopPropagation();
|
|
107
|
+
this.setExpanded(!this.isExpanded(), eventToTrigger(event));
|
|
108
|
+
};
|
|
109
|
+
onDisclosureKeydown = (event) => {
|
|
110
|
+
if (event.key !== "ArrowRight" && event.key !== "ArrowLeft")
|
|
111
|
+
return;
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
event.stopPropagation();
|
|
114
|
+
this.setExpanded(event.key === "ArrowRight", "keyboard");
|
|
115
|
+
};
|
|
116
|
+
onRowClick = (event) => {
|
|
117
|
+
if (!this.container || this.disabled)
|
|
118
|
+
return;
|
|
119
|
+
const path = event.composedPath();
|
|
120
|
+
const interactive = path.some((node) => node instanceof HTMLElement && (node.matches('a, button, input, select, textarea, [role="button"], [role="link"]') || node.getAttribute("slot") === "actions"));
|
|
121
|
+
if (!interactive)
|
|
122
|
+
this.setExpanded(!this.isExpanded(), eventToTrigger(event));
|
|
123
|
+
};
|
|
124
|
+
render() {
|
|
125
|
+
const level = this.structuralLevel;
|
|
126
|
+
const expanded = this.isExpanded();
|
|
127
|
+
const disclosureLabel = `${expanded ? "Collapse" : "Expand"} ${this.label || "item"}`;
|
|
128
|
+
const dragLabel = `Drag ${this.label || "item"} to reorder`;
|
|
129
|
+
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: {
|
|
130
|
+
"--ui-tree-item-depth": String(level - 1),
|
|
131
|
+
"margin-inline-start": level > 1 ? "var(--ui-tree-indent, 16px)" : "0px"
|
|
132
|
+
} }, 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" }));
|
|
133
|
+
}
|
|
134
|
+
static get watchers() {
|
|
135
|
+
return {
|
|
136
|
+
"expanded": [{
|
|
137
|
+
"syncExpandedFromProp": 0
|
|
138
|
+
}]
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
UITreeItem.style = uiTreeItemCss();
|
|
143
|
+
export {
|
|
144
|
+
UITreeItem as ui_tree_item
|
|
145
|
+
};
|