@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,110 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BHG9Rpil.js');
|
|
4
|
-
var events = require('./events-TcQIzpNv.js');
|
|
5
|
-
|
|
6
|
-
const 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}`;
|
|
7
|
-
|
|
8
|
-
const UITextarea = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
index.registerInstance(this, hostRef);
|
|
11
|
-
}
|
|
12
|
-
get host() { return index.getElement(this); }
|
|
13
|
-
value;
|
|
14
|
-
defaultValue = '';
|
|
15
|
-
disabled = false;
|
|
16
|
-
invalid = false;
|
|
17
|
-
readOnly = false;
|
|
18
|
-
rows = 4;
|
|
19
|
-
internalValue = '';
|
|
20
|
-
slotRef;
|
|
21
|
-
syncFromProp() {
|
|
22
|
-
if (this.value !== undefined)
|
|
23
|
-
this.internalValue = this.value;
|
|
24
|
-
}
|
|
25
|
-
syncToTextarea() {
|
|
26
|
-
const textarea = this.getTextarea();
|
|
27
|
-
if (!textarea)
|
|
28
|
-
return;
|
|
29
|
-
this.host.dataset.invalid = this.invalid ? 'true' : '';
|
|
30
|
-
// An omitted host value leaves the slotted textarea under framework or
|
|
31
|
-
// native-form control instead of resetting it during component updates.
|
|
32
|
-
if (this.value !== undefined)
|
|
33
|
-
textarea.value = this.internalValue;
|
|
34
|
-
textarea.defaultValue = this.defaultValue;
|
|
35
|
-
textarea.disabled = this.disabled;
|
|
36
|
-
textarea.readOnly = this.readOnly;
|
|
37
|
-
textarea.rows = this.rows;
|
|
38
|
-
textarea.setAttribute('aria-invalid', this.invalid ? 'true' : 'false');
|
|
39
|
-
}
|
|
40
|
-
componentDidLoad() {
|
|
41
|
-
this.syncFromProp();
|
|
42
|
-
this.slotRef?.addEventListener('slotchange', () => this.syncToTextarea());
|
|
43
|
-
this.syncToTextarea();
|
|
44
|
-
const textarea = this.getTextarea();
|
|
45
|
-
textarea?.addEventListener('input', this.onInput);
|
|
46
|
-
textarea?.addEventListener('change', this.onChange);
|
|
47
|
-
}
|
|
48
|
-
disconnectedCallback() {
|
|
49
|
-
const textarea = this.getTextarea();
|
|
50
|
-
textarea?.removeEventListener('input', this.onInput);
|
|
51
|
-
textarea?.removeEventListener('change', this.onChange);
|
|
52
|
-
}
|
|
53
|
-
componentDidUpdate() {
|
|
54
|
-
this.syncToTextarea();
|
|
55
|
-
}
|
|
56
|
-
getTextarea() {
|
|
57
|
-
const slot = this.host.shadowRoot?.querySelector('slot');
|
|
58
|
-
const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
|
|
59
|
-
return nodes.find((el) => el.tagName === 'TEXTAREA') ?? null;
|
|
60
|
-
}
|
|
61
|
-
onInput = (e) => {
|
|
62
|
-
const textarea = e.target;
|
|
63
|
-
if (!textarea)
|
|
64
|
-
return;
|
|
65
|
-
this.internalValue = textarea.value;
|
|
66
|
-
events.dispatchDetail(this.host, 'input', {
|
|
67
|
-
value: this.internalValue,
|
|
68
|
-
trigger: events.eventToTrigger(e),
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
onChange = (e) => {
|
|
72
|
-
const textarea = this.getTextarea();
|
|
73
|
-
if (!textarea)
|
|
74
|
-
return;
|
|
75
|
-
this.internalValue = textarea.value;
|
|
76
|
-
events.dispatchDetail(this.host, 'change', {
|
|
77
|
-
value: this.internalValue,
|
|
78
|
-
trigger: events.eventToTrigger(e),
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
render() {
|
|
82
|
-
return (index.h(index.Host, { key: 'a554edb1a0ef40a2c116e3064e52af7474e065e4', "data-invalid": this.invalid ? '' : undefined }, index.h("slot", { key: 'a4eb8034ec11f8b3b06ace7287410fd839004593', ref: (el) => (this.slotRef = el) })));
|
|
83
|
-
}
|
|
84
|
-
static get watchers() { return {
|
|
85
|
-
"value": [{
|
|
86
|
-
"syncFromProp": 0
|
|
87
|
-
}],
|
|
88
|
-
"internalValue": [{
|
|
89
|
-
"syncToTextarea": 0
|
|
90
|
-
}],
|
|
91
|
-
"defaultValue": [{
|
|
92
|
-
"syncToTextarea": 0
|
|
93
|
-
}],
|
|
94
|
-
"disabled": [{
|
|
95
|
-
"syncToTextarea": 0
|
|
96
|
-
}],
|
|
97
|
-
"invalid": [{
|
|
98
|
-
"syncToTextarea": 0
|
|
99
|
-
}],
|
|
100
|
-
"readOnly": [{
|
|
101
|
-
"syncToTextarea": 0
|
|
102
|
-
}],
|
|
103
|
-
"rows": [{
|
|
104
|
-
"syncToTextarea": 0
|
|
105
|
-
}]
|
|
106
|
-
}; }
|
|
107
|
-
};
|
|
108
|
-
UITextarea.style = uiTextareaCss();
|
|
109
|
-
|
|
110
|
-
exports.ui_textarea = UITextarea;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BHG9Rpil.js');
|
|
4
|
-
var events = require('./events-TcQIzpNv.js');
|
|
5
|
-
var positioning = require('./positioning-CCR6ifPj.js');
|
|
6
|
-
|
|
7
|
-
const 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}`;
|
|
8
|
-
|
|
9
|
-
const UIToastRegion = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
get host() { return index.getElement(this); }
|
|
14
|
-
open = true;
|
|
15
|
-
internalOpen = false;
|
|
16
|
-
surface = null;
|
|
17
|
-
contentObserver = null;
|
|
18
|
-
pendingDismiss = null;
|
|
19
|
-
syncFromProp() {
|
|
20
|
-
this.syncContents();
|
|
21
|
-
}
|
|
22
|
-
syncSurface() {
|
|
23
|
-
if (this.internalOpen)
|
|
24
|
-
this.surface?.show();
|
|
25
|
-
else
|
|
26
|
-
this.surface?.hide();
|
|
27
|
-
}
|
|
28
|
-
componentDidLoad() {
|
|
29
|
-
this.surface = positioning.createViewportSurface(this.host);
|
|
30
|
-
this.contentObserver = new MutationObserver(this.syncContents);
|
|
31
|
-
this.contentObserver.observe(this.host, { childList: true, subtree: true });
|
|
32
|
-
this.syncContents();
|
|
33
|
-
this.syncSurface();
|
|
34
|
-
this.host.addEventListener('click', this.onClick);
|
|
35
|
-
}
|
|
36
|
-
disconnectedCallback() {
|
|
37
|
-
this.host.removeEventListener('click', this.onClick);
|
|
38
|
-
this.contentObserver?.disconnect();
|
|
39
|
-
this.contentObserver = null;
|
|
40
|
-
this.surface?.destroy();
|
|
41
|
-
this.surface = null;
|
|
42
|
-
}
|
|
43
|
-
getToasts() {
|
|
44
|
-
return Array.from(this.host.querySelectorAll('[data-ui-toast]'));
|
|
45
|
-
}
|
|
46
|
-
syncContents = () => {
|
|
47
|
-
const nextOpen = this.open && this.getToasts().length > 0;
|
|
48
|
-
const wasOpen = this.internalOpen;
|
|
49
|
-
const completedDismiss = this.pendingDismiss && !this.host.contains(this.pendingDismiss.toast)
|
|
50
|
-
? this.pendingDismiss
|
|
51
|
-
: null;
|
|
52
|
-
this.internalOpen = nextOpen;
|
|
53
|
-
if (wasOpen && !nextOpen && completedDismiss) {
|
|
54
|
-
events.dispatchDetail(this.host, 'close', {
|
|
55
|
-
open: false,
|
|
56
|
-
reason: 'action',
|
|
57
|
-
trigger: completedDismiss.trigger,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
if (completedDismiss || !this.open)
|
|
61
|
-
this.pendingDismiss = null;
|
|
62
|
-
};
|
|
63
|
-
onClick = (e) => {
|
|
64
|
-
const dismissBtn = e.target.closest?.('[data-ui-toast-dismiss]');
|
|
65
|
-
if (!dismissBtn)
|
|
66
|
-
return;
|
|
67
|
-
const toast = dismissBtn.closest?.('[data-ui-toast]');
|
|
68
|
-
if (!toast)
|
|
69
|
-
return;
|
|
70
|
-
const id = toast.id ?? '';
|
|
71
|
-
const trigger = events.eventToTrigger(e);
|
|
72
|
-
this.pendingDismiss = { toast: toast, trigger };
|
|
73
|
-
events.dispatchDetail(this.host, 'dismiss', {
|
|
74
|
-
id,
|
|
75
|
-
reason: 'action',
|
|
76
|
-
trigger,
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
render() {
|
|
80
|
-
return (index.h(index.Host, { key: '9f9c2e14150c631c0f7cb427c693dcd52c20897d', role: "region", "aria-label": "Notifications", "aria-live": "polite", "data-open": this.internalOpen ? '' : undefined }, index.h("slot", { key: '9e1d9ebb6b587afab2c4302241cecb03a321cee1' })));
|
|
81
|
-
}
|
|
82
|
-
static get watchers() { return {
|
|
83
|
-
"open": [{
|
|
84
|
-
"syncFromProp": 0
|
|
85
|
-
}],
|
|
86
|
-
"internalOpen": [{
|
|
87
|
-
"syncSurface": 0
|
|
88
|
-
}]
|
|
89
|
-
}; }
|
|
90
|
-
};
|
|
91
|
-
UIToastRegion.style = uiToastRegionCss();
|
|
92
|
-
|
|
93
|
-
exports.ui_toast_region = UIToastRegion;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BHG9Rpil.js');
|
|
4
|
-
|
|
5
|
-
const 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}}`;
|
|
6
|
-
|
|
7
|
-
function slotHasContent(slot) {
|
|
8
|
-
if (!slot) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
return slot.assignedNodes({ flatten: true }).some((node) => {
|
|
12
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
13
|
-
return Boolean(node.textContent?.trim());
|
|
14
|
-
}
|
|
15
|
-
return true;
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
const UITopBar = class {
|
|
19
|
-
constructor(hostRef) {
|
|
20
|
-
index.registerInstance(this, hostRef);
|
|
21
|
-
}
|
|
22
|
-
get host() { return index.getElement(this); }
|
|
23
|
-
hasLeading = false;
|
|
24
|
-
hasSearch = false;
|
|
25
|
-
hasActions = false;
|
|
26
|
-
leadingSlot;
|
|
27
|
-
searchSlot;
|
|
28
|
-
actionsSlot;
|
|
29
|
-
componentDidLoad() {
|
|
30
|
-
this.syncSlots();
|
|
31
|
-
}
|
|
32
|
-
syncSlots = () => {
|
|
33
|
-
this.hasLeading = slotHasContent(this.leadingSlot);
|
|
34
|
-
this.hasSearch = slotHasContent(this.searchSlot);
|
|
35
|
-
this.hasActions = slotHasContent(this.actionsSlot);
|
|
36
|
-
};
|
|
37
|
-
render() {
|
|
38
|
-
return (index.h(index.Host, { key: '1ef941e211c9536c034a40c0f7a255068595de10' }, index.h("header", { key: 'f1ea465d17753224d72971d26f70b546b93de8ba', class: "top-bar", part: "base" }, index.h("div", { key: '4eab975109467ad41e16527102b31e6e6d7421c8', class: "top-bar__leading", hidden: !this.hasLeading }, index.h("slot", { key: '3388d0e2346de4c08d85dd4c3a998e5f668a05f6', name: "leading", ref: (el) => (this.leadingSlot = el), onSlotchange: this.syncSlots })), index.h("div", { key: '7b176d6e82da08eb495f3ca2c83505327c21f525', class: "top-bar__title" }, index.h("slot", { key: '8196e5489d2f43a72f794aad8ceaa44c358810e9' })), index.h("div", { key: '2b29c72174559865fb01b99cfab830f74640a8a5', class: "top-bar__search", hidden: !this.hasSearch }, index.h("slot", { key: '9597fde0cf05821e641471343a38dd3190f1e18f', name: "search", ref: (el) => (this.searchSlot = el), onSlotchange: this.syncSlots })), index.h("div", { key: '1f19003e43fb28ac4ff4debd27e1a0fa9f342275', class: "top-bar__actions", hidden: !this.hasActions }, index.h("slot", { key: 'f6a84824d2806dc16b5fa82cc25dc1247a6a8ad1', name: "actions", ref: (el) => (this.actionsSlot = el), onSlotchange: this.syncSlots })))));
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
UITopBar.style = uiTopBarCss();
|
|
42
|
-
|
|
43
|
-
exports.ui_top_bar = UITopBar;
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BHG9Rpil.js');
|
|
4
|
-
var events = require('./events-TcQIzpNv.js');
|
|
5
|
-
var icons = require('./icons-BAdjrnhS.js');
|
|
6
|
-
|
|
7
|
-
const 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}}`;
|
|
8
|
-
|
|
9
|
-
const UITreeItem = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
get host() { return index.getElement(this); }
|
|
14
|
-
/** Stable application identifier emitted by tree interaction events. */
|
|
15
|
-
itemId = '';
|
|
16
|
-
/** Accessible name used by the disclosure and drag handle. */
|
|
17
|
-
label = '';
|
|
18
|
-
/** Application hierarchy depth override used for drop constraints. Defaults to structural nesting. */
|
|
19
|
-
dropDepth;
|
|
20
|
-
/** Virtualized-tree descendant-depth override for the tree's max-depth drop constraint. */
|
|
21
|
-
subtreeDepth;
|
|
22
|
-
/** Whether this item accepts children and exposes disclosure behavior. */
|
|
23
|
-
container = false;
|
|
24
|
-
/** Whether this item participates in pointer drag and drop. */
|
|
25
|
-
sortable = false;
|
|
26
|
-
/** Application-defined kind used to reject incompatible sibling drops. */
|
|
27
|
-
dragType = 'item';
|
|
28
|
-
/** Application-defined parent/list identity included with reorder events. */
|
|
29
|
-
dropScope = '';
|
|
30
|
-
/** Comma-separated drag kinds accepted as children. Empty accepts every kind. */
|
|
31
|
-
accepts = '';
|
|
32
|
-
/** Controlled expansion value. When omitted, `default-expanded` initializes uncontrolled state. */
|
|
33
|
-
expanded;
|
|
34
|
-
/** Initial uncontrolled expansion value. */
|
|
35
|
-
defaultExpanded = false;
|
|
36
|
-
selected = false;
|
|
37
|
-
disabled = false;
|
|
38
|
-
internalExpanded = false;
|
|
39
|
-
structuralLevel = 1;
|
|
40
|
-
tabStop = false;
|
|
41
|
-
syncExpandedFromProp() {
|
|
42
|
-
// A defined prop owns the rendered state; clearing it resumes the current
|
|
43
|
-
// uncontrolled state instead of replaying the initial default.
|
|
44
|
-
if (this.expanded !== undefined)
|
|
45
|
-
this.internalExpanded = this.expanded;
|
|
46
|
-
}
|
|
47
|
-
componentWillLoad() {
|
|
48
|
-
this.internalExpanded = this.expanded ?? this.defaultExpanded;
|
|
49
|
-
this.updateStructuralLevel();
|
|
50
|
-
}
|
|
51
|
-
connectedCallback() {
|
|
52
|
-
this.host.addEventListener('ui-tree-auto-expand', this.onAutoExpand);
|
|
53
|
-
this.host.addEventListener('ui-tree-structure-sync', this.updateStructuralLevel);
|
|
54
|
-
this.host.addEventListener('ui-tree-roving-tab-stop', this.onRovingTabStop);
|
|
55
|
-
this.host.addEventListener('ui-tree-request-expanded', this.onExpansionRequest);
|
|
56
|
-
}
|
|
57
|
-
disconnectedCallback() {
|
|
58
|
-
this.host.removeEventListener('ui-tree-auto-expand', this.onAutoExpand);
|
|
59
|
-
this.host.removeEventListener('ui-tree-structure-sync', this.updateStructuralLevel);
|
|
60
|
-
this.host.removeEventListener('ui-tree-roving-tab-stop', this.onRovingTabStop);
|
|
61
|
-
this.host.removeEventListener('ui-tree-request-expanded', this.onExpansionRequest);
|
|
62
|
-
}
|
|
63
|
-
updateStructuralLevel = () => {
|
|
64
|
-
const tree = this.host.closest('ui-tree');
|
|
65
|
-
let ancestor = this.host.parentElement?.closest('ui-tree-item') ?? null;
|
|
66
|
-
let level = 1;
|
|
67
|
-
while (ancestor && tree?.contains(ancestor)) {
|
|
68
|
-
level += 1;
|
|
69
|
-
ancestor = ancestor.parentElement?.closest('ui-tree-item') ?? null;
|
|
70
|
-
}
|
|
71
|
-
if (this.structuralLevel !== level)
|
|
72
|
-
this.structuralLevel = level;
|
|
73
|
-
};
|
|
74
|
-
setExpanded(expanded, trigger) {
|
|
75
|
-
const current = this.isExpanded();
|
|
76
|
-
if (!this.container || this.disabled || current === expanded)
|
|
77
|
-
return;
|
|
78
|
-
if (this.expanded === undefined)
|
|
79
|
-
this.internalExpanded = expanded;
|
|
80
|
-
events.dispatchDetail(this.host, 'expand', { id: this.itemId, expanded, trigger });
|
|
81
|
-
this.host.dispatchEvent(new CustomEvent('ui-tree-expansion-change'));
|
|
82
|
-
}
|
|
83
|
-
isExpanded() {
|
|
84
|
-
return this.expanded ?? this.internalExpanded;
|
|
85
|
-
}
|
|
86
|
-
onAutoExpand = () => {
|
|
87
|
-
this.setExpanded(true, 'pointer');
|
|
88
|
-
};
|
|
89
|
-
onRovingTabStop = (event) => {
|
|
90
|
-
this.tabStop = Boolean(event.detail?.active) && !this.disabled;
|
|
91
|
-
};
|
|
92
|
-
onExpansionRequest = (event) => {
|
|
93
|
-
const detail = event.detail;
|
|
94
|
-
if (typeof detail?.expanded === 'boolean')
|
|
95
|
-
this.setExpanded(detail.expanded, detail.trigger ?? 'keyboard');
|
|
96
|
-
};
|
|
97
|
-
onDisclosureClick = (event) => {
|
|
98
|
-
event.stopPropagation();
|
|
99
|
-
this.setExpanded(!this.isExpanded(), events.eventToTrigger(event));
|
|
100
|
-
};
|
|
101
|
-
onDisclosureKeydown = (event) => {
|
|
102
|
-
if (event.key !== 'ArrowRight' && event.key !== 'ArrowLeft')
|
|
103
|
-
return;
|
|
104
|
-
event.preventDefault();
|
|
105
|
-
event.stopPropagation();
|
|
106
|
-
this.setExpanded(event.key === 'ArrowRight', 'keyboard');
|
|
107
|
-
};
|
|
108
|
-
onRowClick = (event) => {
|
|
109
|
-
if (!this.container || this.disabled)
|
|
110
|
-
return;
|
|
111
|
-
const path = event.composedPath();
|
|
112
|
-
const interactive = path.some((node) => node instanceof HTMLElement && (node.matches('a, button, input, select, textarea, [role="button"], [role="link"]')
|
|
113
|
-
|| node.getAttribute('slot') === 'actions'));
|
|
114
|
-
if (!interactive)
|
|
115
|
-
this.setExpanded(!this.isExpanded(), events.eventToTrigger(event));
|
|
116
|
-
};
|
|
117
|
-
render() {
|
|
118
|
-
const level = this.structuralLevel;
|
|
119
|
-
const expanded = this.isExpanded();
|
|
120
|
-
const disclosureLabel = `${expanded ? 'Collapse' : 'Expand'} ${this.label || 'item'}`;
|
|
121
|
-
const dragLabel = `Drag ${this.label || 'item'} to reorder`;
|
|
122
|
-
return (index.h(index.Host, { key: '0ce6384903be2181055c76808cd4664dcfa8de54', role: "treeitem", "aria-label": this.label || undefined, "aria-level": String(level), "aria-expanded": this.container ? String(expanded) : undefined, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "data-container": this.container ? '' : undefined, "data-selected": this.selected ? '' : undefined, "data-disabled": this.disabled ? '' : undefined, "data-drag-type": this.dragType || 'item', "data-drop-scope": this.dropScope || undefined, "data-accepts": this.accepts || undefined, tabIndex: this.disabled || !this.tabStop ? -1 : 0, style: {
|
|
123
|
-
'--ui-tree-item-depth': String(level - 1),
|
|
124
|
-
'margin-inline-start': level > 1 ? 'var(--ui-tree-indent, 16px)' : '0px',
|
|
125
|
-
} }, index.h("div", { key: '7d6923da8fd8be7fffc7cf345ac4d1211217c21a', class: "row", part: "row", onClick: this.onRowClick }, this.sortable && !this.disabled ? (index.h("button", { class: "drag-handle", part: "drag-handle", type: "button", draggable: true, "aria-label": dragLabel, title: dragLabel }, index.h("span", { innerHTML: icons.loomaIconMarkup('grip-vertical') }))) : null, this.container ? (index.h("button", { class: "disclosure", part: "disclosure", type: "button", "aria-label": disclosureLabel, "aria-expanded": String(expanded), disabled: this.disabled, onClick: this.onDisclosureClick, onKeyDown: this.onDisclosureKeydown }, index.h("span", { class: { 'disclosure-icon': true, 'disclosure-icon--expanded': expanded }, innerHTML: icons.loomaIconMarkup('chevron-down') }))) : index.h("span", { class: "disclosure-spacer", "aria-hidden": "true" }), index.h("span", { key: 'ef8959fc858b90c7ea26c8ff740cfe02fb372686', class: "leading", part: "leading" }, index.h("slot", { key: '1e00da2acd23ae6430e38b26502d9f3951461c93', name: "leading" })), index.h("span", { key: 'f37a63aa0c6e73f134442589314fae01e01cf782', class: "label", part: "label" }, index.h("slot", { key: 'f527d8a33927d72502d5cbbbe0cb5739d7bdbaf2' })), index.h("span", { key: 'de6492f81ac5747d913132c275abb9157d18deab', class: "actions", part: "actions" }, index.h("slot", { key: 'f5316e3a5fb67130ef1401253dc5ef6b7072840e', name: "actions" })), index.h("span", { key: '89da3b2bab7a953368810319148a644e62bc9a47', class: "drop-indicator row-drop-indicator", part: "drop-indicator", "aria-hidden": "true" })), this.container ? (index.h("div", { class: "children", part: "children", role: "group", hidden: !expanded }, index.h("slot", { name: "children" }))) : null, index.h("span", { key: '9a66f1ba72290a037ef02ccbd49243463ba34b67', class: "drop-indicator subtree-drop-indicator", part: "drop-indicator", "aria-hidden": "true" })));
|
|
126
|
-
}
|
|
127
|
-
static get watchers() { return {
|
|
128
|
-
"expanded": [{
|
|
129
|
-
"syncExpandedFromProp": 0
|
|
130
|
-
}]
|
|
131
|
-
}; }
|
|
132
|
-
};
|
|
133
|
-
UITreeItem.style = uiTreeItemCss();
|
|
134
|
-
|
|
135
|
-
exports.ui_tree_item = UITreeItem;
|