@threadlabs/looma 0.2.5 → 0.2.6
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-3K45IWIJ.js +4733 -0
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/chunk-UHHA4WT5.js +2916 -0
- package/dist/declarative-generated.cjs +135 -0
- package/dist/declarative-generated.d.cts +10 -0
- package/dist/declarative-generated.d.ts +10 -0
- package/dist/declarative-generated.js +111 -0
- package/dist/declarative.cjs +2944 -0
- package/dist/declarative.d.cts +27 -0
- package/dist/declarative.d.ts +27 -0
- package/dist/declarative.js +13 -0
- package/dist/index.cjs +7480 -6457
- package/dist/index.d.cts +4 -58
- package/dist/index.d.ts +4 -58
- package/dist/index.js +15 -27
- package/dist/loader.cjs +7654 -0
- package/dist/loader.d.cts +4 -0
- package/dist/loader.d.ts +4 -0
- package/dist/loader.js +16 -0
- package/dist/valibot.cjs +31 -0
- package/dist/valibot.d.cts +10 -0
- package/dist/valibot.d.ts +1 -43
- package/dist/valibot.js +2 -0
- package/dist/{types/field/validation.d.ts → validation-bxcou-l-.d.cts} +13 -11
- package/dist/validation-bxcou-l-.d.ts +58 -0
- package/editor/{chunk-B5WVJOPV.js → chunk-BXICJBWS.js} +118 -8
- package/editor/{chunk-ZOUKEZ77.js → chunk-JK53ENSG.js} +8 -21
- package/editor/chunk-WI7ZA44X.js +2558 -0
- package/editor/extensions/index.d.ts +11 -2
- package/editor/extensions/index.js +9 -7
- package/editor/index.d.ts +1 -1
- package/editor/index.js +10 -8
- package/editor/ui.js +2 -2
- package/editor.css +32 -0
- package/layout/index.cjs +466 -400
- package/layout/index.d.cts +1 -2
- package/layout/index.d.ts +1 -2
- package/layout/index.js +471 -395
- package/package.json +14 -5
- package/vue/chunk-4DPYH3IT.js +3538 -0
- package/vue/editor/index.d.ts +17 -7
- package/vue/editor/index.js +53 -35
- package/vue/index.d.ts +48 -31
- package/vue/index.js +1 -1
- package/dist/chunk-24OTMNIU.js +0 -1617
- package/dist/chunk-D5WRORG6.js +0 -366
- package/dist/chunk-HNFCGIBP.js +0 -8
- package/dist/chunk-NB6DBRXQ.js +0 -323
- package/dist/chunk-OF57X5AR.js +0 -10
- package/dist/chunk-TL4FIE7X.js +0 -93
- package/dist/chunk-UL7UIUJZ.js +0 -20
- package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
- package/dist/cjs/controlled-state-BFya8rAX.js +0 -9
- package/dist/cjs/events-TcQIzpNv.js +0 -19
- package/dist/cjs/icons-BAdjrnhS.js +0 -680
- package/dist/cjs/id-CYbKpaYr.js +0 -9
- package/dist/cjs/index-BHG9Rpil.js +0 -1602
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -13
- package/dist/cjs/looma.cjs.js +0 -25
- package/dist/cjs/manager-Ce25WRtl.js +0 -95
- package/dist/cjs/positioning-CCR6ifPj.js +0 -426
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +0 -43
- package/dist/cjs/ui-avatar-group.cjs.entry.js +0 -43
- package/dist/cjs/ui-avatar.cjs.entry.js +0 -50
- package/dist/cjs/ui-badge.cjs.entry.js +0 -19
- package/dist/cjs/ui-button.cjs.entry.js +0 -75
- package/dist/cjs/ui-callout.cjs.entry.js +0 -27
- package/dist/cjs/ui-checkbox.cjs.entry.js +0 -97
- package/dist/cjs/ui-chip_2.cjs.entry.js +0 -258
- package/dist/cjs/ui-combobox.cjs.entry.js +0 -708
- package/dist/cjs/ui-context-menu.cjs.entry.js +0 -239
- package/dist/cjs/ui-dialog.cjs.entry.js +0 -131
- package/dist/cjs/ui-disclosure.cjs.entry.js +0 -112
- package/dist/cjs/ui-editable.cjs.entry.js +0 -100
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +0 -20
- package/dist/cjs/ui-form-field.cjs.entry.js +0 -114
- package/dist/cjs/ui-icon-button.cjs.entry.js +0 -23
- package/dist/cjs/ui-input.cjs.entry.js +0 -106
- package/dist/cjs/ui-menu-item.cjs.entry.js +0 -19
- package/dist/cjs/ui-menu.cjs.entry.js +0 -182
- package/dist/cjs/ui-popover.cjs.entry.js +0 -135
- package/dist/cjs/ui-radio-group.cjs.entry.js +0 -134
- package/dist/cjs/ui-radio.cjs.entry.js +0 -94
- package/dist/cjs/ui-search-result-row.cjs.entry.js +0 -47
- package/dist/cjs/ui-search-shell.cjs.entry.js +0 -39
- package/dist/cjs/ui-select.cjs.entry.js +0 -108
- package/dist/cjs/ui-switch.cjs.entry.js +0 -74
- package/dist/cjs/ui-tabs.cjs.entry.js +0 -118
- package/dist/cjs/ui-textarea.cjs.entry.js +0 -110
- package/dist/cjs/ui-toast-region.cjs.entry.js +0 -93
- package/dist/cjs/ui-top-bar.cjs.entry.js +0 -43
- package/dist/cjs/ui-tree-item.cjs.entry.js +0 -135
- package/dist/cjs/ui-tree.cjs.entry.js +0 -500
- package/dist/collection/collection-manifest.json +0 -45
- package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.css +0 -8
- package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +0 -70
- package/dist/collection/components/ui-avatar/ui-avatar.css +0 -35
- package/dist/collection/components/ui-avatar/ui-avatar.js +0 -130
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +0 -32
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +0 -95
- package/dist/collection/components/ui-badge/ui-badge.css +0 -90
- package/dist/collection/components/ui-badge/ui-badge.js +0 -62
- package/dist/collection/components/ui-button/ui-button.css +0 -121
- package/dist/collection/components/ui-button/ui-button.js +0 -141
- package/dist/collection/components/ui-callout/ui-callout.css +0 -74
- package/dist/collection/components/ui-callout/ui-callout.js +0 -59
- package/dist/collection/components/ui-checkbox/ui-checkbox.css +0 -24
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +0 -228
- package/dist/collection/components/ui-chip/ui-chip.css +0 -57
- package/dist/collection/components/ui-chip/ui-chip.js +0 -67
- package/dist/collection/components/ui-combobox/ui-combobox.css +0 -47
- package/dist/collection/components/ui-combobox/ui-combobox.js +0 -1295
- package/dist/collection/components/ui-context-menu/ui-context-menu.css +0 -34
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +0 -311
- package/dist/collection/components/ui-dialog/ui-dialog.css +0 -72
- package/dist/collection/components/ui-dialog/ui-dialog.js +0 -242
- package/dist/collection/components/ui-disclosure/ui-disclosure.css +0 -7
- package/dist/collection/components/ui-disclosure/ui-disclosure.js +0 -184
- package/dist/collection/components/ui-editable/ui-editable.css +0 -2
- package/dist/collection/components/ui-editable/ui-editable.js +0 -196
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.css +0 -73
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +0 -85
- package/dist/collection/components/ui-form-field/ui-form-field.css +0 -25
- package/dist/collection/components/ui-form-field/ui-form-field.js +0 -180
- package/dist/collection/components/ui-icon-button/ui-icon-button.css +0 -145
- package/dist/collection/components/ui-icon-button/ui-icon-button.js +0 -128
- package/dist/collection/components/ui-input/ui-input.css +0 -48
- package/dist/collection/components/ui-input/ui-input.js +0 -217
- package/dist/collection/components/ui-menu/ui-menu.css +0 -73
- package/dist/collection/components/ui-menu/ui-menu.js +0 -280
- package/dist/collection/components/ui-menu-item/ui-menu-item.css +0 -32
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +0 -64
- package/dist/collection/components/ui-popover/ui-popover.css +0 -58
- package/dist/collection/components/ui-popover/ui-popover.js +0 -232
- package/dist/collection/components/ui-radio/ui-radio.css +0 -22
- package/dist/collection/components/ui-radio/ui-radio.js +0 -226
- package/dist/collection/components/ui-radio-group/ui-radio-group.css +0 -10
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +0 -247
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.css +0 -80
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +0 -100
- package/dist/collection/components/ui-search-shell/ui-search-shell.css +0 -63
- package/dist/collection/components/ui-search-shell/ui-search-shell.js +0 -46
- package/dist/collection/components/ui-select/ui-select.css +0 -64
- package/dist/collection/components/ui-select/ui-select.js +0 -218
- package/dist/collection/components/ui-switch/ui-switch.css +0 -63
- package/dist/collection/components/ui-switch/ui-switch.js +0 -185
- package/dist/collection/components/ui-tabs/ui-tabs.css +0 -68
- package/dist/collection/components/ui-tabs/ui-tabs.js +0 -190
- package/dist/collection/components/ui-textarea/ui-textarea.css +0 -49
- package/dist/collection/components/ui-textarea/ui-textarea.js +0 -241
- package/dist/collection/components/ui-toast-region/ui-toast-region.css +0 -59
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +0 -126
- package/dist/collection/components/ui-tooltip/ui-tooltip.css +0 -43
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +0 -430
- package/dist/collection/components/ui-top-bar/ui-top-bar.css +0 -51
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +0 -52
- package/dist/collection/components/ui-tree/ui-tree.css +0 -12
- package/dist/collection/components/ui-tree/ui-tree.js +0 -515
- package/dist/collection/components/ui-tree-item/ui-tree-item.css +0 -217
- package/dist/collection/components/ui-tree-item/ui-tree-item.js +0 -406
- package/dist/collection/field/combobox.js +0 -4
- package/dist/collection/field/editable.js +0 -1
- package/dist/collection/field/multi-combobox.js +0 -1
- package/dist/collection/field/valibot.js +0 -5
- package/dist/collection/field/validation.js +0 -62
- package/dist/collection/icons.js +0 -71
- package/dist/collection/input-modality.js +0 -24
- package/dist/collection/overlay/manager.js +0 -92
- package/dist/collection/overlay/positioning.js +0 -424
- package/dist/collection/utils/controlled-state.js +0 -4
- package/dist/collection/utils/drag-drop.js +0 -51
- package/dist/collection/utils/events.js +0 -13
- package/dist/collection/utils/id.js +0 -5
- package/dist/collection/utils/initials.js +0 -11
- package/dist/components/index.d.ts +0 -102
- package/dist/components/index.js +0 -1
- package/dist/components/p-6SWSrfmW.js +0 -1
- package/dist/components/p-B_DaIVEY.js +0 -1
- package/dist/components/p-Bh_1GxOD.js +0 -1
- package/dist/components/p-BnGhGgTH.js +0 -1
- package/dist/components/p-BzaB_bXo.js +0 -1
- package/dist/components/p-C-0syqXZ.js +0 -1
- package/dist/components/p-CoFximGM.js +0 -13
- package/dist/components/p-JwSoedEO.js +0 -1
- package/dist/components/p-Vc4ExHFc.js +0 -1
- package/dist/components/p-hgBUJRDa.js +0 -1
- package/dist/components/ui-affordance-scope.d.ts +0 -11
- package/dist/components/ui-affordance-scope.js +0 -1
- package/dist/components/ui-avatar-group.d.ts +0 -11
- package/dist/components/ui-avatar-group.js +0 -1
- package/dist/components/ui-avatar.d.ts +0 -11
- package/dist/components/ui-avatar.js +0 -1
- package/dist/components/ui-badge.d.ts +0 -11
- package/dist/components/ui-badge.js +0 -1
- package/dist/components/ui-button.d.ts +0 -11
- package/dist/components/ui-button.js +0 -1
- package/dist/components/ui-callout.d.ts +0 -11
- package/dist/components/ui-callout.js +0 -1
- package/dist/components/ui-checkbox.d.ts +0 -11
- package/dist/components/ui-checkbox.js +0 -1
- package/dist/components/ui-chip.d.ts +0 -11
- package/dist/components/ui-chip.js +0 -1
- package/dist/components/ui-combobox.d.ts +0 -11
- package/dist/components/ui-combobox.js +0 -1
- package/dist/components/ui-context-menu.d.ts +0 -11
- package/dist/components/ui-context-menu.js +0 -1
- package/dist/components/ui-dialog.d.ts +0 -11
- package/dist/components/ui-dialog.js +0 -1
- package/dist/components/ui-disclosure.d.ts +0 -11
- package/dist/components/ui-disclosure.js +0 -1
- package/dist/components/ui-editable.d.ts +0 -11
- package/dist/components/ui-editable.js +0 -1
- package/dist/components/ui-floating-action-button.d.ts +0 -11
- package/dist/components/ui-floating-action-button.js +0 -1
- package/dist/components/ui-form-field.d.ts +0 -11
- package/dist/components/ui-form-field.js +0 -1
- package/dist/components/ui-icon-button.d.ts +0 -11
- package/dist/components/ui-icon-button.js +0 -1
- package/dist/components/ui-input.d.ts +0 -11
- package/dist/components/ui-input.js +0 -1
- package/dist/components/ui-menu-item.d.ts +0 -11
- package/dist/components/ui-menu-item.js +0 -1
- package/dist/components/ui-menu.d.ts +0 -11
- package/dist/components/ui-menu.js +0 -1
- package/dist/components/ui-popover.d.ts +0 -11
- package/dist/components/ui-popover.js +0 -1
- package/dist/components/ui-radio-group.d.ts +0 -11
- package/dist/components/ui-radio-group.js +0 -1
- package/dist/components/ui-radio.d.ts +0 -11
- package/dist/components/ui-radio.js +0 -1
- package/dist/components/ui-search-result-row.d.ts +0 -11
- package/dist/components/ui-search-result-row.js +0 -1
- package/dist/components/ui-search-shell.d.ts +0 -11
- package/dist/components/ui-search-shell.js +0 -1
- package/dist/components/ui-select.d.ts +0 -11
- package/dist/components/ui-select.js +0 -1
- package/dist/components/ui-switch.d.ts +0 -11
- package/dist/components/ui-switch.js +0 -1
- package/dist/components/ui-tabs.d.ts +0 -11
- package/dist/components/ui-tabs.js +0 -1
- package/dist/components/ui-textarea.d.ts +0 -11
- package/dist/components/ui-textarea.js +0 -1
- package/dist/components/ui-toast-region.d.ts +0 -11
- package/dist/components/ui-toast-region.js +0 -1
- package/dist/components/ui-tooltip.d.ts +0 -11
- package/dist/components/ui-tooltip.js +0 -1
- package/dist/components/ui-top-bar.d.ts +0 -11
- package/dist/components/ui-top-bar.js +0 -1
- package/dist/components/ui-tree-item.d.ts +0 -11
- package/dist/components/ui-tree-item.js +0 -1
- package/dist/components/ui-tree.d.ts +0 -11
- package/dist/components/ui-tree.js +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/controlled-state-BnGhGgTH.js +0 -6
- package/dist/esm/events-JwSoedEO.js +0 -15
- package/dist/esm/icons-CoFximGM.js +0 -678
- package/dist/esm/id-hgBUJRDa.js +0 -7
- package/dist/esm/index-8BGiMGQ0.js +0 -1593
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -11
- package/dist/esm/looma.js +0 -21
- package/dist/esm/manager-C-0syqXZ.js +0 -91
- package/dist/esm/positioning-ZOr-2PSe.js +0 -421
- package/dist/esm/ui-affordance-scope.entry.js +0 -41
- package/dist/esm/ui-avatar-group.entry.js +0 -41
- package/dist/esm/ui-avatar.entry.js +0 -48
- package/dist/esm/ui-badge.entry.js +0 -17
- package/dist/esm/ui-button.entry.js +0 -73
- package/dist/esm/ui-callout.entry.js +0 -25
- package/dist/esm/ui-checkbox.entry.js +0 -95
- package/dist/esm/ui-chip_2.entry.js +0 -255
- package/dist/esm/ui-combobox.entry.js +0 -706
- package/dist/esm/ui-context-menu.entry.js +0 -237
- package/dist/esm/ui-dialog.entry.js +0 -129
- package/dist/esm/ui-disclosure.entry.js +0 -110
- package/dist/esm/ui-editable.entry.js +0 -98
- package/dist/esm/ui-floating-action-button.entry.js +0 -18
- package/dist/esm/ui-form-field.entry.js +0 -112
- package/dist/esm/ui-icon-button.entry.js +0 -21
- package/dist/esm/ui-input.entry.js +0 -104
- package/dist/esm/ui-menu-item.entry.js +0 -17
- package/dist/esm/ui-menu.entry.js +0 -180
- package/dist/esm/ui-popover.entry.js +0 -133
- package/dist/esm/ui-radio-group.entry.js +0 -132
- package/dist/esm/ui-radio.entry.js +0 -92
- package/dist/esm/ui-search-result-row.entry.js +0 -45
- package/dist/esm/ui-search-shell.entry.js +0 -37
- package/dist/esm/ui-select.entry.js +0 -106
- package/dist/esm/ui-switch.entry.js +0 -72
- package/dist/esm/ui-tabs.entry.js +0 -116
- package/dist/esm/ui-textarea.entry.js +0 -108
- package/dist/esm/ui-toast-region.entry.js +0 -91
- package/dist/esm/ui-top-bar.entry.js +0 -41
- package/dist/esm/ui-tree-item.entry.js +0 -133
- package/dist/esm/ui-tree.entry.js +0 -498
- package/dist/index.cjs.js +0 -1
- package/dist/looma/index.esm.js +0 -0
- package/dist/looma/looma.esm.js +0 -1
- package/dist/looma/p-08f80207.entry.js +0 -1
- package/dist/looma/p-0b5b8d9e.entry.js +0 -1
- package/dist/looma/p-1249a806.entry.js +0 -1
- package/dist/looma/p-16e0669d.entry.js +0 -1
- package/dist/looma/p-1c00670f.entry.js +0 -1
- package/dist/looma/p-1c5a7522.entry.js +0 -1
- package/dist/looma/p-22842f8c.entry.js +0 -1
- package/dist/looma/p-2915d5c0.entry.js +0 -1
- package/dist/looma/p-3b2961a6.entry.js +0 -1
- package/dist/looma/p-3f60f4c8.entry.js +0 -1
- package/dist/looma/p-424d6719.entry.js +0 -1
- package/dist/looma/p-4caccfce.entry.js +0 -1
- package/dist/looma/p-5fdcee1d.entry.js +0 -1
- package/dist/looma/p-6d8b99ee.entry.js +0 -1
- package/dist/looma/p-6f20d470.entry.js +0 -1
- package/dist/looma/p-7c0b5364.entry.js +0 -1
- package/dist/looma/p-8BGiMGQ0.js +0 -2
- package/dist/looma/p-8bdd9495.entry.js +0 -1
- package/dist/looma/p-99116a72.entry.js +0 -1
- package/dist/looma/p-9cfbf722.entry.js +0 -1
- package/dist/looma/p-9d2662ca.entry.js +0 -1
- package/dist/looma/p-9ff2fa19.entry.js +0 -1
- package/dist/looma/p-BnGhGgTH.js +0 -1
- package/dist/looma/p-C-0syqXZ.js +0 -1
- package/dist/looma/p-CoFximGM.js +0 -13
- package/dist/looma/p-DQuL1Twl.js +0 -1
- package/dist/looma/p-JwSoedEO.js +0 -1
- package/dist/looma/p-ZOr-2PSe.js +0 -1
- package/dist/looma/p-a2dd4c6c.entry.js +0 -1
- package/dist/looma/p-add67e4c.entry.js +0 -1
- package/dist/looma/p-b6ede6bb.entry.js +0 -1
- package/dist/looma/p-b76e2111.entry.js +0 -1
- package/dist/looma/p-ca2a54fd.entry.js +0 -1
- package/dist/looma/p-d372b0db.entry.js +0 -1
- package/dist/looma/p-d4825822.entry.js +0 -1
- package/dist/looma/p-d56571a2.entry.js +0 -1
- package/dist/looma/p-d5c3954f.entry.js +0 -1
- package/dist/looma/p-e604e906.entry.js +0 -1
- package/dist/looma/p-f1f7c5cb.entry.js +0 -1
- package/dist/looma/p-hgBUJRDa.js +0 -1
- package/dist/types/components/ui-affordance-scope/ui-affordance-scope.d.ts +0 -11
- package/dist/types/components/ui-avatar/ui-avatar.d.ts +0 -11
- package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +0 -11
- package/dist/types/components/ui-badge/ui-badge.d.ts +0 -5
- package/dist/types/components/ui-button/ui-button.d.ts +0 -13
- package/dist/types/components/ui-callout/ui-callout.d.ts +0 -6
- package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +0 -20
- package/dist/types/components/ui-chip/ui-chip.d.ts +0 -8
- package/dist/types/components/ui-combobox/ui-combobox.d.ts +0 -128
- package/dist/types/components/ui-context-menu/ui-context-menu.d.ts +0 -43
- package/dist/types/components/ui-dialog/ui-dialog.d.ts +0 -27
- package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +0 -21
- package/dist/types/components/ui-editable/ui-editable.d.ts +0 -24
- package/dist/types/components/ui-floating-action-button/ui-floating-action-button.d.ts +0 -6
- package/dist/types/components/ui-form-field/ui-form-field.d.ts +0 -18
- package/dist/types/components/ui-icon-button/ui-icon-button.d.ts +0 -9
- package/dist/types/components/ui-input/ui-input.d.ts +0 -19
- package/dist/types/components/ui-menu/ui-menu.d.ts +0 -28
- package/dist/types/components/ui-menu-item/ui-menu-item.d.ts +0 -5
- package/dist/types/components/ui-popover/ui-popover.d.ts +0 -26
- package/dist/types/components/ui-radio/ui-radio.d.ts +0 -20
- package/dist/types/components/ui-radio-group/ui-radio-group.d.ts +0 -21
- package/dist/types/components/ui-search-result-row/ui-search-result-row.d.ts +0 -15
- package/dist/types/components/ui-search-shell/ui-search-shell.d.ts +0 -9
- package/dist/types/components/ui-select/ui-select.d.ts +0 -20
- package/dist/types/components/ui-switch/ui-switch.d.ts +0 -16
- package/dist/types/components/ui-tabs/ui-tabs.d.ts +0 -18
- package/dist/types/components/ui-textarea/ui-textarea.d.ts +0 -20
- package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +0 -16
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +0 -57
- package/dist/types/components/ui-top-bar/ui-top-bar.d.ts +0 -12
- package/dist/types/components/ui-tree/ui-tree.d.ts +0 -53
- package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +0 -44
- package/dist/types/components.d.ts +0 -1889
- package/dist/types/field/combobox.d.ts +0 -46
- package/dist/types/field/editable.d.ts +0 -5
- package/dist/types/field/multi-combobox.d.ts +0 -11
- package/dist/types/field/valibot.d.ts +0 -7
- package/dist/types/icons.d.ts +0 -53
- package/dist/types/input-modality.d.ts +0 -6
- package/dist/types/overlay/manager.d.ts +0 -17
- package/dist/types/overlay/positioning.d.ts +0 -74
- package/dist/types/stencil-public-runtime.d.ts +0 -1860
- package/dist/types/utils/controlled-state.d.ts +0 -4
- package/dist/types/utils/drag-drop.d.ts +0 -15
- package/dist/types/utils/events.d.ts +0 -4
- package/dist/types/utils/id.d.ts +0 -1
- package/dist/types/utils/initials.d.ts +0 -1
- package/dist/ui-affordance-scope.entry-L6TIXYOP.js +0 -54
- package/dist/ui-avatar-group.entry-TCAA6P72.js +0 -51
- package/dist/ui-avatar.entry-52DQ7VXA.js +0 -51
- package/dist/ui-badge.entry-2XCAA6LL.js +0 -22
- package/dist/ui-button.entry-MNFBMNSX.js +0 -83
- package/dist/ui-callout.entry-SSHT5TH2.js +0 -32
- package/dist/ui-checkbox.entry-LOWIWIWI.js +0 -111
- package/dist/ui-chip_2.entry-BIMTSF6C.js +0 -272
- package/dist/ui-combobox.entry-25Z4MN7N.js +0 -717
- package/dist/ui-context-menu.entry-YZDL5Y4M.js +0 -248
- package/dist/ui-dialog.entry-HIXZX5AB.js +0 -146
- package/dist/ui-disclosure.entry-2JZHZNDQ.js +0 -126
- package/dist/ui-editable.entry-U3VR3XPT.js +0 -110
- package/dist/ui-floating-action-button.entry-6S3QN3KJ.js +0 -23
- package/dist/ui-form-field.entry-GQOSMLHT.js +0 -120
- package/dist/ui-icon-button.entry-QJXKVDM6.js +0 -26
- package/dist/ui-input.entry-UWMQ6JMP.js +0 -114
- package/dist/ui-menu-item.entry-NHNZKKJS.js +0 -22
- package/dist/ui-menu.entry-D53RUJND.js +0 -192
- package/dist/ui-popover.entry-7ZSIWCFQ.js +0 -152
- package/dist/ui-radio-group.entry-37MSYIH4.js +0 -142
- package/dist/ui-radio.entry-7YGCDHXT.js +0 -108
- package/dist/ui-search-result-row.entry-6FCCLGAS.js +0 -50
- package/dist/ui-search-shell.entry-HSBEXPER.js +0 -41
- package/dist/ui-select.entry-GIDIAYRD.js +0 -117
- package/dist/ui-switch.entry-MYAL6XPC.js +0 -87
- package/dist/ui-tabs.entry-R4TEXQSD.js +0 -128
- package/dist/ui-textarea.entry-FW32JNDV.js +0 -119
- package/dist/ui-toast-region.entry-BTMFPKZF.js +0 -104
- package/dist/ui-top-bar.entry-5DQGJF3B.js +0 -49
- package/dist/ui-tree-item.entry-ADT7DSOS.js +0 -145
- package/dist/ui-tree.entry-7PYQ5RIN.js +0 -470
- package/editor/chunk-64GLF274.js +0 -1271
- package/layout/index.css +0 -387
- package/loader/cdn.js +0 -1
- package/loader/index.cjs.js +0 -1
- package/loader/index.d.ts +0 -24
- package/loader/index.es2017.js +0 -1
- package/loader/index.js +0 -2
- package/vue/chunk-ROMBQS2L.js +0 -352
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface UiTreeItem extends Components.UiTreeItem, HTMLElement {}
|
|
4
|
-
export const UiTreeItem: {
|
|
5
|
-
prototype: UiTreeItem;
|
|
6
|
-
new (): UiTreeItem;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,H as i,h as t,c as a,t as r}from"./p-Bh_1GxOD.js";import{d as o,e as s}from"./p-JwSoedEO.js";import{l as n}from"./p-CoFximGM.js";const d=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}itemId="";label="";dropDepth;subtreeDepth;container=!1;sortable=!1;dragType="item";dropScope="";accepts="";expanded;defaultExpanded=!1;selected=!1;disabled=!1;internalExpanded=!1;structuralLevel=1;tabStop=!1;syncExpandedFromProp(){void 0!==this.expanded&&(this.internalExpanded=this.expanded)}componentWillLoad(){this.internalExpanded=this.expanded??this.defaultExpanded,this.updateStructuralLevel()}connectedCallback(){this.host.addEventListener("ui-tree-auto-expand",this.onAutoExpand),this.host.addEventListener("ui-tree-structure-sync",this.updateStructuralLevel),this.host.addEventListener("ui-tree-roving-tab-stop",this.onRovingTabStop),this.host.addEventListener("ui-tree-request-expanded",this.onExpansionRequest)}disconnectedCallback(){this.host.removeEventListener("ui-tree-auto-expand",this.onAutoExpand),this.host.removeEventListener("ui-tree-structure-sync",this.updateStructuralLevel),this.host.removeEventListener("ui-tree-roving-tab-stop",this.onRovingTabStop),this.host.removeEventListener("ui-tree-request-expanded",this.onExpansionRequest)}updateStructuralLevel=()=>{const e=this.host.closest("ui-tree");let i=this.host.parentElement?.closest("ui-tree-item")??null,t=1;for(;i&&e?.contains(i);)t+=1,i=i.parentElement?.closest("ui-tree-item")??null;this.structuralLevel!==t&&(this.structuralLevel=t)};setExpanded(e,i){const t=this.isExpanded();this.container&&!this.disabled&&t!==e&&(void 0===this.expanded&&(this.internalExpanded=e),o(this.host,"expand",{id:this.itemId,expanded:e,trigger:i}),this.host.dispatchEvent(new CustomEvent("ui-tree-expansion-change")))}isExpanded(){return this.expanded??this.internalExpanded}onAutoExpand=()=>{this.setExpanded(!0,"pointer")};onRovingTabStop=e=>{this.tabStop=!!e.detail?.active&&!this.disabled};onExpansionRequest=e=>{const i=e.detail;"boolean"==typeof i?.expanded&&this.setExpanded(i.expanded,i.trigger??"keyboard")};onDisclosureClick=e=>{e.stopPropagation(),this.setExpanded(!this.isExpanded(),s(e))};onDisclosureKeydown=e=>{"ArrowRight"!==e.key&&"ArrowLeft"!==e.key||(e.preventDefault(),e.stopPropagation(),this.setExpanded("ArrowRight"===e.key,"keyboard"))};onRowClick=e=>{this.container&&!this.disabled&&(e.composedPath().some((e=>e instanceof i&&(e.matches('a, button, input, select, textarea, [role="button"], [role="link"]')||"actions"===e.getAttribute("slot"))))||this.setExpanded(!this.isExpanded(),s(e)))};render(){const e=this.structuralLevel,i=this.isExpanded(),r=`${i?"Collapse":"Expand"} ${this.label||"item"}`,o=`Drag ${this.label||"item"} to reorder`;return t(a,{key:"0ce6384903be2181055c76808cd4664dcfa8de54",role:"treeitem","aria-label":this.label||void 0,"aria-level":e+"","aria-expanded":this.container?i+"":void 0,"aria-selected":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:{"--ui-tree-item-depth":e-1+"","margin-inline-start":e>1?"var(--ui-tree-indent, 16px)":"0px"}},t("div",{key:"7d6923da8fd8be7fffc7cf345ac4d1211217c21a",class:"row",part:"row",onClick:this.onRowClick},this.sortable&&!this.disabled?t("button",{class:"drag-handle",part:"drag-handle",type:"button",draggable:!0,"aria-label":o,title:o},t("span",{innerHTML:n("grip-vertical")})):null,this.container?t("button",{class:"disclosure",part:"disclosure",type:"button","aria-label":r,"aria-expanded":i+"",disabled:this.disabled,onClick:this.onDisclosureClick,onKeyDown:this.onDisclosureKeydown},t("span",{class:{"disclosure-icon":!0,"disclosure-icon--expanded":i},innerHTML:n("chevron-down")})):t("span",{class:"disclosure-spacer","aria-hidden":"true"}),t("span",{key:"ef8959fc858b90c7ea26c8ff740cfe02fb372686",class:"leading",part:"leading"},t("slot",{key:"1e00da2acd23ae6430e38b26502d9f3951461c93",name:"leading"})),t("span",{key:"f37a63aa0c6e73f134442589314fae01e01cf782",class:"label",part:"label"},t("slot",{key:"f527d8a33927d72502d5cbbbe0cb5739d7bdbaf2"})),t("span",{key:"de6492f81ac5747d913132c275abb9157d18deab",class:"actions",part:"actions"},t("slot",{key:"f5316e3a5fb67130ef1401253dc5ef6b7072840e",name:"actions"})),t("span",{key:"89da3b2bab7a953368810319148a644e62bc9a47",class:"drop-indicator row-drop-indicator",part:"drop-indicator","aria-hidden":"true"})),this.container?t("div",{class:"children",part:"children",role:"group",hidden:!i},t("slot",{name:"children"})):null,t("span",{key:"9a66f1ba72290a037ef02ccbd49243463ba34b67",class:"drop-indicator subtree-drop-indicator",part:"drop-indicator","aria-hidden":"true"}))}static get watchers(){return{expanded:[{syncExpandedFromProp:0}]}}static get style(){return":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}}"}},[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]},void 0,{expanded:[{syncExpandedFromProp:0}]}]),c=d,l=function(){"undefined"!=typeof customElements&&["ui-tree-item"].forEach((e=>{"ui-tree-item"===e&&(customElements.get(r(e))||customElements.define(r(e),d))}))};export{c as UiTreeItem,l as defineCustomElement}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface UiTree extends Components.UiTree, HTMLElement {}
|
|
4
|
-
export const UiTree: {
|
|
5
|
-
prototype: UiTree;
|
|
6
|
-
new (): UiTree;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,H as e,h as i,c as s,t as r}from"./p-Bh_1GxOD.js";import{d as n}from"./p-JwSoedEO.js";function h(t,e,i){const s=t.height>0?Math.min(1,Math.max(0,(e-t.top)/t.height)):.5;return i?s<.25?"before":s>.75?"after":"inside":s<.5?"before":"after"}const o=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get host(){return this}label="Tree";hoverExpandDelay=700;maxDepth=0;source=null;target=null;position=null;rejectedTarget=null;rejectedPosition=null;rejection=null;hoverIntent=null;structureObserver=null;tabStop=null;componentDidLoad(){this.hoverIntent=function(t,e){let i,s;function r(){i&&clearTimeout(i),i=void 0,s=void 0}return{schedule(n){s===n&&i||(r(),s=n,i=setTimeout((()=>{i=void 0;const t=s;s=void 0,t&&e(t)}),Math.max(0,t)))},cancel:r,destroy:r}}(this.hoverExpandDelay,this.expandTarget),this.host.addEventListener("dragstart",this.onDragStart),this.host.addEventListener("drag",this.onDrag),this.host.addEventListener("dragenter",this.onDragOver),this.host.addEventListener("dragover",this.onDragOver),this.host.addEventListener("dragleave",this.onDragLeave),this.host.addEventListener("drop",this.onDrop),this.host.addEventListener("dragend",this.onDragEnd),this.host.addEventListener("keydown",this.onKeyDown),this.host.addEventListener("focusin",this.onFocusIn),this.host.addEventListener("ui-tree-expansion-change",this.onExpansionChange),this.syncStructuralLevels(),this.structureObserver=new MutationObserver(this.syncStructuralLevels),this.structureObserver.observe(this.host,{childList:!0,subtree:!0})}disconnectedCallback(){this.hoverIntent?.destroy(),this.host.removeEventListener("dragstart",this.onDragStart),this.host.removeEventListener("drag",this.onDrag),this.host.removeEventListener("dragenter",this.onDragOver),this.host.removeEventListener("dragover",this.onDragOver),this.host.removeEventListener("dragleave",this.onDragLeave),this.host.removeEventListener("drop",this.onDrop),this.host.removeEventListener("dragend",this.onDragEnd),this.host.removeEventListener("keydown",this.onKeyDown),this.host.removeEventListener("focusin",this.onFocusIn),this.host.removeEventListener("ui-tree-expansion-change",this.onExpansionChange),this.structureObserver?.disconnect(),this.structureObserver=null}syncStructuralLevels=()=>{for(const t of Array.from(this.host.querySelectorAll("ui-tree-item")))t.dispatchEvent(new CustomEvent("ui-tree-structure-sync"));this.syncTabStop()};syncTabStop(t){const e=this.visibleItems(),i=t&&e.includes(t)?t:this.tabStop&&e.includes(this.tabStop)?this.tabStop:e[0]??null;this.tabStop=i;for(const t of e)t.dispatchEvent(new CustomEvent("ui-tree-roving-tab-stop",{detail:{active:t===i}}))}itemFromEvent(t){return t.composedPath().find((t=>t instanceof e&&"ui-tree-item"===t.localName))??null}eventTargetsInteractiveContent(t){for(const i of t.composedPath()){if(i instanceof e&&"ui-tree-item"===i.localName)break;if(i instanceof e&&i.matches('a, button, input, select, textarea, [role="button"], [role="link"]'))return!0}return!1}itemId(t){return t.itemId||t.getAttribute("item-id")||""}rowFor(t){return t.shadowRoot?.querySelector('[part="row"]')??null}itemAtPoint(t,e){let i=this.host.ownerDocument.elementFromPoint(t,e);for(;i;){if("ui-tree-item"===i.localName&&this.host.contains(i))return i;const t=i.getRootNode();i=t instanceof ShadowRoot?t.host:i.parentElement}return null}isWithinTree(t){let i=t instanceof e?t:null;for(;i;){if(i===this.host||this.host.contains(i))return!0;const t=i.getRootNode();i=t instanceof ShadowRoot?t.host:i.parentElement}return!1}acceptsChildren(t){return!!(t.container??t.hasAttribute("container"))&&!(t.disabled??t.hasAttribute("disabled"))}itemMetadata(t){return{type:t.getAttribute("data-drag-type")||t.getAttribute("drag-type")||"item",scope:t.getAttribute("data-drop-scope")||t.getAttribute("drop-scope")||"",accepts:(t.getAttribute("data-accepts")||t.getAttribute("accepts")||"").split(",").map((t=>t.trim())).filter(Boolean)}}constraintDepth(t){if(void 0!==t.dropDepth)return t.dropDepth;const e=t.getAttribute("drop-depth");return null!==e?Number(e):Number(t.getAttribute("aria-level"))||1}subtreeDepth(t){if(void 0!==t.subtreeDepth)return Math.max(0,Math.floor(t.subtreeDepth));const e=t.getAttribute("subtree-depth");return null!==e?Math.max(0,Math.floor(Number(e))):Array.from(t.querySelectorAll("ui-tree-item")).reduce(((e,i)=>{let s=0,r=i.parentElement?.closest("ui-tree-item")??null;for(;r&&r!==t;)s+=1,r=r.parentElement?.closest("ui-tree-item")??null;return r===t?Math.max(e,s+1):e}),0)}dropRejection(t,e,i){if(t.contains(e))return{reason:"descendant"};const s=this.itemMetadata(t),r=this.itemMetadata(e);if("inside"===i){if(!this.acceptsChildren(e)||r.accepts.length>0&&!r.accepts.includes(s.type))return{reason:"incompatible"}}else if(s.type!==r.type)return{reason:"incompatible"};const n=Math.max(0,Math.floor(this.maxDepth));if(n>0){const s=Math.max(0,Math.floor(this.constraintDepth(e)))+("inside"===i?1:0)+this.subtreeDepth(t);if(s>n)return{reason:"max-depth",maxDepth:n,resultingDepth:s}}return null}clearTarget(){this.target?.removeAttribute("data-drop-position"),this.target=null,this.position=null,this.hoverIntent?.cancel()}clearRejection(){this.rejectedTarget=null,this.rejectedPosition=null,this.rejection=null}finishDrag(){this.source?.removeAttribute("data-dragging"),this.source=null,this.clearTarget(),this.clearRejection()}expandTarget=t=>{const e=Array.from(this.host.querySelectorAll("ui-tree-item")).find((e=>this.itemId(e)===t));e&&"false"===e.getAttribute("aria-expanded")&&e.dispatchEvent(new CustomEvent("ui-tree-auto-expand"))};onDragStart=t=>{const i=this.itemFromEvent(t);if(!i||!(i.sortable??i.hasAttribute("sortable"))||(i.disabled??i.hasAttribute("disabled")))return;if(!t.composedPath().some((t=>t instanceof e&&"drag-handle"===t.getAttribute("part"))))return void t.preventDefault();const s=this.itemId(i),r=this.rowFor(i);s&&r?(this.source=i,i.setAttribute("data-dragging","true"),t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",s)),function(t,e){if(!t||"function"!=typeof t.setDragImage)return;const{height:i}=e.getBoundingClientRect();t.setDragImage(e,16,Math.max(0,i/2))}(t.dataTransfer,r)):t.preventDefault()};updateTarget(t,e,i){if(!this.source)return!1;if(!t||t===this.source)return this.clearTarget(),this.clearRejection(),!1;const s=this.rowFor(t);if(!s)return!1;const r=h(s.getBoundingClientRect(),e,this.acceptsChildren(t)),n=this.dropRejection(this.source,t,r);return n?(i&&(i.dropEffect="none"),this.clearTarget(),"max-depth"===n.reason?(this.rejectedTarget=t,this.rejectedPosition=r,this.rejection=n):this.clearRejection(),!1):(this.clearRejection(),i&&(i.dropEffect="move"),this.target===t&&this.position===r||(this.clearTarget(),this.target=t,this.position=r,t.setAttribute("data-drop-position",r)),"inside"===r&&"false"===t.getAttribute("aria-expanded")?this.hoverIntent?.schedule(this.itemId(t)):this.hoverIntent?.cancel(),!0)}onDrag=t=>{if(!this.source||0===t.clientX&&0===t.clientY)return;const e=this.itemAtPoint(t.clientX,t.clientY);e&&this.updateTarget(e,t.clientY,t.dataTransfer)};onDragOver=t=>{if(!this.source)return;const e=this.itemFromEvent(t);this.updateTarget(e,t.clientY,t.dataTransfer)&&t.preventDefault()};onDragLeave=t=>{this.isWithinTree(t.relatedTarget)||this.itemAtPoint(t.clientX,t.clientY)||(this.clearTarget(),this.clearRejection())};dispatchReorder(t,e,i){const s=this.itemId(t),r=this.itemId(e);if(!s||!r)return;"inside"===i&&this.expandTarget(r);const h=this.itemMetadata(t),o=this.itemMetadata(e);n(this.host,"reorder",{sourceId:s,targetId:r,position:i,sourceType:h.type,targetType:o.type,sourceScope:h.scope,targetScope:o.scope,trigger:"pointer"})}dispatchReorderRejected(t,e,i,s){const r=this.itemId(t),h=this.itemId(e);r&&h&&n(this.host,"reorder-rejected",{sourceId:r,targetId:h,position:i,reason:"max-depth",maxDepth:s.maxDepth,resultingDepth:s.resultingDepth,trigger:"pointer"})}onDrop=t=>{this.source&&this.target&&this.position&&(t.preventDefault(),this.dispatchReorder(this.source,this.target,this.position),this.finishDrag())};onDragEnd=t=>{if(this.source){if(this.rejectedTarget&&this.rejectedPosition&&this.rejection)return this.dispatchReorderRejected(this.source,this.rejectedTarget,this.rejectedPosition,this.rejection),void this.finishDrag();const e=this.itemAtPoint(t.clientX,t.clientY);if(e&&e!==this.source){const i=this.rowFor(e);if(i){const s=h(i.getBoundingClientRect(),t.clientY,this.acceptsChildren(e)),r=this.dropRejection(this.source,e,s);r?"max-depth"===r.reason&&this.dispatchReorderRejected(this.source,e,s,r):this.dispatchReorder(this.source,e,s)}}}this.finishDrag()};visibleItems(){return Array.from(this.host.querySelectorAll("ui-tree-item")).filter((t=>t.getClientRects().length>0&&!t.hasAttribute("disabled")))}parentItem(t){const e=t.parentElement?.closest("ui-tree-item")??null;return e&&this.host.contains(e)?e:null}firstVisibleChild(t,e){return e.find((e=>this.parentItem(e)===t))??null}focusItem(t){this.syncTabStop(t),t.focus()}requestExpansion(t,e){t.dispatchEvent(new CustomEvent("ui-tree-request-expanded",{detail:{expanded:e,trigger:"keyboard"}}))}onFocusIn=t=>{if(this.eventTargetsInteractiveContent(t))return;const e=this.itemFromEvent(t);e&&this.syncTabStop(e)};onExpansionChange=()=>{requestAnimationFrame((()=>this.syncTabStop()))};onKeyDown=t=>{if(this.eventTargetsInteractiveContent(t))return;const e=this.itemFromEvent(t);if(!e)return;const i=this.visibleItems(),s=i.indexOf(e);if(s<0)return;const r="ArrowDown"===t.key?i[s+1]:"ArrowUp"===t.key?i[s-1]:"Home"===t.key?i[0]:"End"===t.key?i.at(-1):null;if(r)return t.preventDefault(),void this.focusItem(r);if("ArrowLeft"!==t.key){if("ArrowRight"===t.key)if("false"===e.getAttribute("aria-expanded"))t.preventDefault(),this.requestExpansion(e,!0);else if("true"===e.getAttribute("aria-expanded")){const s=this.firstVisibleChild(e,i);s&&(t.preventDefault(),this.focusItem(s))}}else"true"===e.getAttribute("aria-expanded")?(t.preventDefault(),this.requestExpansion(e,!1)):this.parentItem(e)&&(t.preventDefault(),this.focusItem(this.parentItem(e)))};render(){return i(s,{key:"bae06665078a67c59db2d9e72c7dea6ddeeb9e56",role:"tree","aria-label":this.label||"Tree"},i("slot",{key:"232cb02f1a50bc5e18a92c0d8677e917870ec75e"}))}static get style(){return":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}"}},[769,"ui-tree",{label:[1],hoverExpandDelay:[2,"hover-expand-delay"],maxDepth:[2,"max-depth"]}]),a=o,u=function(){"undefined"!=typeof customElements&&["ui-tree"].forEach((t=>{"ui-tree"===t&&(customElements.get(r(t))||customElements.define(r(t),o))}))};export{a as UiTree,u as defineCustomElement}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/** A state prop is controlled only when the consumer supplies a value. */
|
|
2
|
-
const isControlled = (value) => value !== undefined;
|
|
3
|
-
/** Defaults apply only when a corresponding controlled prop is omitted. */
|
|
4
|
-
const controlledOrDefault = (value, defaultValue) => value === undefined ? defaultValue : value;
|
|
5
|
-
|
|
6
|
-
export { controlledOrDefault as c, isControlled as i };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
function eventToTrigger(event) {
|
|
2
|
-
if (event instanceof KeyboardEvent)
|
|
3
|
-
return 'keyboard';
|
|
4
|
-
if (event instanceof PointerEvent || event instanceof MouseEvent)
|
|
5
|
-
return 'pointer';
|
|
6
|
-
return 'programmatic';
|
|
7
|
-
}
|
|
8
|
-
function isActivationKey(event) {
|
|
9
|
-
return event.key === 'Enter' || event.key === ' ';
|
|
10
|
-
}
|
|
11
|
-
function dispatchDetail(el, name, detail) {
|
|
12
|
-
el.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { dispatchDetail as d, eventToTrigger as e, isActivationKey as i };
|