@threadlabs/looma 0.2.4 → 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/styles.css +8 -8
- 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,217 +0,0 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { eventToTrigger, dispatchDetail } from "../../utils/events";
|
|
3
|
-
export class UIInput {
|
|
4
|
-
host;
|
|
5
|
-
value;
|
|
6
|
-
defaultValue = '';
|
|
7
|
-
disabled = false;
|
|
8
|
-
invalid = false;
|
|
9
|
-
readOnly = false;
|
|
10
|
-
internalValue = '';
|
|
11
|
-
slotRef;
|
|
12
|
-
syncFromProp() {
|
|
13
|
-
if (this.value !== undefined)
|
|
14
|
-
this.internalValue = this.value;
|
|
15
|
-
}
|
|
16
|
-
syncToInput() {
|
|
17
|
-
const input = this.getInput();
|
|
18
|
-
if (!input)
|
|
19
|
-
return;
|
|
20
|
-
this.host.dataset.invalid = this.invalid ? 'true' : '';
|
|
21
|
-
// When the host has no value prop, the slotted native control is
|
|
22
|
-
// intentionally uncontrolled. Frameworks such as Vue can then own its
|
|
23
|
-
// value without Looma resetting it during hydration or unrelated updates.
|
|
24
|
-
if (this.value !== undefined)
|
|
25
|
-
input.value = this.internalValue;
|
|
26
|
-
input.defaultValue = this.defaultValue;
|
|
27
|
-
input.disabled = this.disabled;
|
|
28
|
-
input.readOnly = this.readOnly;
|
|
29
|
-
input.setAttribute('aria-invalid', this.invalid ? 'true' : 'false');
|
|
30
|
-
}
|
|
31
|
-
componentDidLoad() {
|
|
32
|
-
this.syncFromProp();
|
|
33
|
-
this.slotRef?.addEventListener('slotchange', () => this.syncToInput());
|
|
34
|
-
this.syncToInput();
|
|
35
|
-
const input = this.getInput();
|
|
36
|
-
input?.addEventListener('input', this.onInput);
|
|
37
|
-
input?.addEventListener('change', this.onChange);
|
|
38
|
-
}
|
|
39
|
-
disconnectedCallback() {
|
|
40
|
-
const input = this.getInput();
|
|
41
|
-
input?.removeEventListener('input', this.onInput);
|
|
42
|
-
input?.removeEventListener('change', this.onChange);
|
|
43
|
-
}
|
|
44
|
-
componentDidUpdate() {
|
|
45
|
-
this.syncToInput();
|
|
46
|
-
}
|
|
47
|
-
getInput() {
|
|
48
|
-
const slot = this.host.shadowRoot?.querySelector('slot');
|
|
49
|
-
const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
|
|
50
|
-
return nodes.find((el) => el.tagName === 'INPUT') ?? null;
|
|
51
|
-
}
|
|
52
|
-
onInput = (e) => {
|
|
53
|
-
const input = e.target;
|
|
54
|
-
if (!input)
|
|
55
|
-
return;
|
|
56
|
-
this.internalValue = input.value;
|
|
57
|
-
dispatchDetail(this.host, 'input', {
|
|
58
|
-
value: this.internalValue,
|
|
59
|
-
trigger: eventToTrigger(e),
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
onChange = (e) => {
|
|
63
|
-
const input = this.getInput();
|
|
64
|
-
if (!input)
|
|
65
|
-
return;
|
|
66
|
-
this.internalValue = input.value;
|
|
67
|
-
dispatchDetail(this.host, 'change', {
|
|
68
|
-
value: this.internalValue,
|
|
69
|
-
trigger: eventToTrigger(e),
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
render() {
|
|
73
|
-
return (h(Host, { key: '92505de6b1245569a6d4746418a70f8d7bc4eed9', "data-invalid": this.invalid ? '' : undefined }, h("slot", { key: 'd5743dc62037b5d7722cfbb64a582592327c75e5', ref: (el) => (this.slotRef = el) })));
|
|
74
|
-
}
|
|
75
|
-
static get is() { return "ui-input"; }
|
|
76
|
-
static get encapsulation() { return "shadow"; }
|
|
77
|
-
static get originalStyleUrls() {
|
|
78
|
-
return {
|
|
79
|
-
"$": ["ui-input.css"]
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
static get styleUrls() {
|
|
83
|
-
return {
|
|
84
|
-
"$": ["ui-input.css"]
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
static get properties() {
|
|
88
|
-
return {
|
|
89
|
-
"value": {
|
|
90
|
-
"type": "string",
|
|
91
|
-
"mutable": false,
|
|
92
|
-
"complexType": {
|
|
93
|
-
"original": "string",
|
|
94
|
-
"resolved": "string",
|
|
95
|
-
"references": {}
|
|
96
|
-
},
|
|
97
|
-
"required": false,
|
|
98
|
-
"optional": true,
|
|
99
|
-
"docs": {
|
|
100
|
-
"tags": [],
|
|
101
|
-
"text": ""
|
|
102
|
-
},
|
|
103
|
-
"getter": false,
|
|
104
|
-
"setter": false,
|
|
105
|
-
"reflect": false,
|
|
106
|
-
"attribute": "value"
|
|
107
|
-
},
|
|
108
|
-
"defaultValue": {
|
|
109
|
-
"type": "string",
|
|
110
|
-
"mutable": false,
|
|
111
|
-
"complexType": {
|
|
112
|
-
"original": "string",
|
|
113
|
-
"resolved": "string",
|
|
114
|
-
"references": {}
|
|
115
|
-
},
|
|
116
|
-
"required": false,
|
|
117
|
-
"optional": false,
|
|
118
|
-
"docs": {
|
|
119
|
-
"tags": [],
|
|
120
|
-
"text": ""
|
|
121
|
-
},
|
|
122
|
-
"getter": false,
|
|
123
|
-
"setter": false,
|
|
124
|
-
"reflect": false,
|
|
125
|
-
"attribute": "default-value",
|
|
126
|
-
"defaultValue": "''"
|
|
127
|
-
},
|
|
128
|
-
"disabled": {
|
|
129
|
-
"type": "boolean",
|
|
130
|
-
"mutable": false,
|
|
131
|
-
"complexType": {
|
|
132
|
-
"original": "boolean",
|
|
133
|
-
"resolved": "boolean",
|
|
134
|
-
"references": {}
|
|
135
|
-
},
|
|
136
|
-
"required": false,
|
|
137
|
-
"optional": false,
|
|
138
|
-
"docs": {
|
|
139
|
-
"tags": [],
|
|
140
|
-
"text": ""
|
|
141
|
-
},
|
|
142
|
-
"getter": false,
|
|
143
|
-
"setter": false,
|
|
144
|
-
"reflect": false,
|
|
145
|
-
"attribute": "disabled",
|
|
146
|
-
"defaultValue": "false"
|
|
147
|
-
},
|
|
148
|
-
"invalid": {
|
|
149
|
-
"type": "boolean",
|
|
150
|
-
"mutable": false,
|
|
151
|
-
"complexType": {
|
|
152
|
-
"original": "boolean",
|
|
153
|
-
"resolved": "boolean",
|
|
154
|
-
"references": {}
|
|
155
|
-
},
|
|
156
|
-
"required": false,
|
|
157
|
-
"optional": false,
|
|
158
|
-
"docs": {
|
|
159
|
-
"tags": [],
|
|
160
|
-
"text": ""
|
|
161
|
-
},
|
|
162
|
-
"getter": false,
|
|
163
|
-
"setter": false,
|
|
164
|
-
"reflect": false,
|
|
165
|
-
"attribute": "invalid",
|
|
166
|
-
"defaultValue": "false"
|
|
167
|
-
},
|
|
168
|
-
"readOnly": {
|
|
169
|
-
"type": "boolean",
|
|
170
|
-
"mutable": false,
|
|
171
|
-
"complexType": {
|
|
172
|
-
"original": "boolean",
|
|
173
|
-
"resolved": "boolean",
|
|
174
|
-
"references": {}
|
|
175
|
-
},
|
|
176
|
-
"required": false,
|
|
177
|
-
"optional": false,
|
|
178
|
-
"docs": {
|
|
179
|
-
"tags": [],
|
|
180
|
-
"text": ""
|
|
181
|
-
},
|
|
182
|
-
"getter": false,
|
|
183
|
-
"setter": false,
|
|
184
|
-
"reflect": false,
|
|
185
|
-
"attribute": "readonly",
|
|
186
|
-
"defaultValue": "false"
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
static get states() {
|
|
191
|
-
return {
|
|
192
|
-
"internalValue": {}
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
static get elementRef() { return "host"; }
|
|
196
|
-
static get watchers() {
|
|
197
|
-
return [{
|
|
198
|
-
"propName": "value",
|
|
199
|
-
"methodName": "syncFromProp"
|
|
200
|
-
}, {
|
|
201
|
-
"propName": "internalValue",
|
|
202
|
-
"methodName": "syncToInput"
|
|
203
|
-
}, {
|
|
204
|
-
"propName": "defaultValue",
|
|
205
|
-
"methodName": "syncToInput"
|
|
206
|
-
}, {
|
|
207
|
-
"propName": "disabled",
|
|
208
|
-
"methodName": "syncToInput"
|
|
209
|
-
}, {
|
|
210
|
-
"propName": "invalid",
|
|
211
|
-
"methodName": "syncToInput"
|
|
212
|
-
}, {
|
|
213
|
-
"propName": "readOnly",
|
|
214
|
-
"methodName": "syncToInput"
|
|
215
|
-
}];
|
|
216
|
-
}
|
|
217
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
--ui-menu-viewport-gap: var(--ui-space-2, 0.5rem);
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
inline-size: max-content;
|
|
7
|
-
min-inline-size: min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));
|
|
8
|
-
max-inline-size: calc(100vw - (var(--ui-menu-viewport-gap) * 2));
|
|
9
|
-
padding: 0;
|
|
10
|
-
border: 0;
|
|
11
|
-
border-radius: 0;
|
|
12
|
-
background: transparent;
|
|
13
|
-
box-shadow: none;
|
|
14
|
-
overflow: visible;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.menu__surface {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
max-inline-size: inherit;
|
|
22
|
-
padding: var(--ui-space-1);
|
|
23
|
-
background: var(--ui-surface-elevated);
|
|
24
|
-
border: 1px solid var(--ui-border-default);
|
|
25
|
-
border-radius: var(--ui-radius-3);
|
|
26
|
-
box-shadow: var(--ui-shadow-lg);
|
|
27
|
-
max-block-size: inherit;
|
|
28
|
-
overflow: auto;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
:host(:not([data-open])) {
|
|
32
|
-
display: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
:host([popover]) {
|
|
36
|
-
position: fixed;
|
|
37
|
-
inset: auto;
|
|
38
|
-
margin: 0;
|
|
39
|
-
overflow: visible;
|
|
40
|
-
max-block-size: calc(100dvh - (var(--ui-menu-viewport-gap) * 2));
|
|
41
|
-
opacity: 0;
|
|
42
|
-
transform: translateY(-4px) scale(0.99);
|
|
43
|
-
transition:
|
|
44
|
-
opacity var(--ui-motion-fast) var(--ui-motion-ease),
|
|
45
|
-
transform var(--ui-motion-fast) var(--ui-motion-ease),
|
|
46
|
-
display var(--ui-motion-fast) allow-discrete,
|
|
47
|
-
overlay var(--ui-motion-fast) allow-discrete;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
:host([popover]:popover-open) {
|
|
51
|
-
opacity: 1;
|
|
52
|
-
transform: translateY(0) scale(1);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@starting-style {
|
|
56
|
-
:host([popover]:popover-open) {
|
|
57
|
-
opacity: 0;
|
|
58
|
-
transform: translateY(-4px) scale(0.99);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
:host([hidden]) {
|
|
63
|
-
display: none !important;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@media (prefers-reduced-motion: reduce) {
|
|
67
|
-
:host([popover]) { transition: none; }
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
::slotted(ui-menu-item) {
|
|
71
|
-
display: block;
|
|
72
|
-
width: 100%;
|
|
73
|
-
}
|
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { eventToTrigger } from "../../utils/events";
|
|
3
|
-
import { dispatchDetail } from "../../utils/events";
|
|
4
|
-
import { closeOverlay, openOverlay, requestTopOverlayClose } from "../../overlay/manager";
|
|
5
|
-
import { controlledOrDefault, isControlled } from "../../utils/controlled-state";
|
|
6
|
-
import { createAnchoredSurface, } from "../../overlay/positioning";
|
|
7
|
-
export class UIMenu {
|
|
8
|
-
host;
|
|
9
|
-
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
10
|
-
open;
|
|
11
|
-
defaultOpen = false;
|
|
12
|
-
/** Id of the control that anchors this menu in the top layer. */
|
|
13
|
-
for;
|
|
14
|
-
/** Preferred placement; Looma flips and shifts when space is constrained. */
|
|
15
|
-
placement = 'bottom-start';
|
|
16
|
-
internalOpen = false;
|
|
17
|
-
overlayId = `ui-menu-${Math.random().toString(36).slice(2, 11)}`;
|
|
18
|
-
anchor = null;
|
|
19
|
-
surface = null;
|
|
20
|
-
syncFromProp() {
|
|
21
|
-
if (isControlled(this.open))
|
|
22
|
-
this.internalOpen = this.open;
|
|
23
|
-
}
|
|
24
|
-
resetSurface() {
|
|
25
|
-
this.setupSurface();
|
|
26
|
-
this.syncSurface();
|
|
27
|
-
}
|
|
28
|
-
syncSurface() {
|
|
29
|
-
this.syncAnchorState();
|
|
30
|
-
if (!this.surface)
|
|
31
|
-
return;
|
|
32
|
-
if (this.internalOpen) {
|
|
33
|
-
this.surface.show();
|
|
34
|
-
openOverlay({
|
|
35
|
-
id: this.overlayId,
|
|
36
|
-
modal: false,
|
|
37
|
-
element: this.host,
|
|
38
|
-
relatedElements: this.anchor ? [this.anchor] : undefined,
|
|
39
|
-
dismissible: true,
|
|
40
|
-
requestClose: (reason, trigger) => this.closeMenu(reason, trigger),
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
this.surface.hide();
|
|
45
|
-
closeOverlay(this.overlayId);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
componentDidLoad() {
|
|
49
|
-
this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
|
|
50
|
-
this.host.addEventListener('click', this.onItemClick);
|
|
51
|
-
this.host.addEventListener('keydown', this.onKeydown);
|
|
52
|
-
this.setupSurface();
|
|
53
|
-
this.syncSurface();
|
|
54
|
-
}
|
|
55
|
-
disconnectedCallback() {
|
|
56
|
-
this.host.removeEventListener('click', this.onItemClick);
|
|
57
|
-
this.host.removeEventListener('keydown', this.onKeydown);
|
|
58
|
-
this.surface?.destroy();
|
|
59
|
-
this.surface = null;
|
|
60
|
-
closeOverlay(this.overlayId);
|
|
61
|
-
}
|
|
62
|
-
setupSurface() {
|
|
63
|
-
this.surface?.destroy();
|
|
64
|
-
this.surface = null;
|
|
65
|
-
this.anchor = this.for ? this.host.ownerDocument.getElementById(this.for) : null;
|
|
66
|
-
if (!this.anchor)
|
|
67
|
-
return;
|
|
68
|
-
this.surface = createAnchoredSurface(this.host, {
|
|
69
|
-
anchor: this.anchor,
|
|
70
|
-
placement: this.placement,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
syncAnchorState() {
|
|
74
|
-
if (!this.anchor)
|
|
75
|
-
return;
|
|
76
|
-
this.anchor.setAttribute('aria-haspopup', 'menu');
|
|
77
|
-
this.anchor.setAttribute('aria-expanded', this.internalOpen ? 'true' : 'false');
|
|
78
|
-
}
|
|
79
|
-
closeMenu(reason, trigger) {
|
|
80
|
-
if (!this.internalOpen)
|
|
81
|
-
return;
|
|
82
|
-
if (!isControlled(this.open))
|
|
83
|
-
this.internalOpen = false;
|
|
84
|
-
dispatchDetail(this.host, 'close', {
|
|
85
|
-
open: false,
|
|
86
|
-
reason: reason,
|
|
87
|
-
trigger: trigger,
|
|
88
|
-
});
|
|
89
|
-
if (reason === 'escape')
|
|
90
|
-
this.anchor?.focus();
|
|
91
|
-
}
|
|
92
|
-
getItems() {
|
|
93
|
-
return Array.from(this.host.querySelectorAll('ui-menu-item'));
|
|
94
|
-
}
|
|
95
|
-
isItemDisabled(item) {
|
|
96
|
-
return (item.getAttribute('aria-disabled') === 'true' ||
|
|
97
|
-
item.hasAttribute('disabled') ||
|
|
98
|
-
item.getAttribute('disabled') === 'true' ||
|
|
99
|
-
item.disabled === true);
|
|
100
|
-
}
|
|
101
|
-
onItemClick = (e) => {
|
|
102
|
-
const item = e.target.closest?.('ui-menu-item');
|
|
103
|
-
if (!item || item.getRootNode() !== this.host.getRootNode())
|
|
104
|
-
return;
|
|
105
|
-
if (this.isItemDisabled(item))
|
|
106
|
-
return;
|
|
107
|
-
const value = item.getAttribute('value') ?? item.getAttribute('data-value') ?? '';
|
|
108
|
-
dispatchDetail(this.host, 'select', { value, trigger: eventToTrigger(e) });
|
|
109
|
-
dispatchDetail(this.host, 'close', {
|
|
110
|
-
open: false,
|
|
111
|
-
reason: 'action',
|
|
112
|
-
trigger: eventToTrigger(e),
|
|
113
|
-
});
|
|
114
|
-
if (!isControlled(this.open))
|
|
115
|
-
this.internalOpen = false;
|
|
116
|
-
};
|
|
117
|
-
onKeydown = (e) => {
|
|
118
|
-
if (e.key === 'Escape') {
|
|
119
|
-
e.preventDefault();
|
|
120
|
-
requestTopOverlayClose('escape', 'keyboard');
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
const items = this.getItems().filter((i) => !this.isItemDisabled(i));
|
|
124
|
-
if (items.length === 0)
|
|
125
|
-
return;
|
|
126
|
-
const target = e.target.closest?.('ui-menu-item');
|
|
127
|
-
const currentIndex = target && target instanceof HTMLElement ? items.indexOf(target) : -1;
|
|
128
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
129
|
-
e.preventDefault();
|
|
130
|
-
if (target && currentIndex >= 0) {
|
|
131
|
-
const value = target.getAttribute('value') ?? target.getAttribute('data-value') ?? '';
|
|
132
|
-
dispatchDetail(this.host, 'select', { value, trigger: 'keyboard' });
|
|
133
|
-
dispatchDetail(this.host, 'close', {
|
|
134
|
-
open: false,
|
|
135
|
-
reason: 'action',
|
|
136
|
-
trigger: 'keyboard',
|
|
137
|
-
});
|
|
138
|
-
if (!isControlled(this.open))
|
|
139
|
-
this.internalOpen = false;
|
|
140
|
-
}
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
|
|
144
|
-
e.preventDefault();
|
|
145
|
-
const nextIndex = e.key === 'ArrowDown'
|
|
146
|
-
? currentIndex < 0
|
|
147
|
-
? 0
|
|
148
|
-
: Math.min(currentIndex + 1, items.length - 1)
|
|
149
|
-
: currentIndex <= 0
|
|
150
|
-
? items.length - 1
|
|
151
|
-
: currentIndex - 1;
|
|
152
|
-
items[nextIndex].focus();
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
render() {
|
|
156
|
-
return (h(Host, { key: '5b64cc53ca56ea04a63013c8cb61231c9b1045cc', role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? '' : undefined }, h("div", { key: '6410a56cc5efcffd0673c9abdf8f8aa45295c516', class: "menu__surface" }, h("slot", { key: '7e7f9d3b19bbf3024d61ecf44cd8b103748ef966' }))));
|
|
157
|
-
}
|
|
158
|
-
static get is() { return "ui-menu"; }
|
|
159
|
-
static get encapsulation() { return "shadow"; }
|
|
160
|
-
static get originalStyleUrls() {
|
|
161
|
-
return {
|
|
162
|
-
"$": ["ui-menu.css"]
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
static get styleUrls() {
|
|
166
|
-
return {
|
|
167
|
-
"$": ["ui-menu.css"]
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
static get properties() {
|
|
171
|
-
return {
|
|
172
|
-
"open": {
|
|
173
|
-
"type": "boolean",
|
|
174
|
-
"mutable": false,
|
|
175
|
-
"complexType": {
|
|
176
|
-
"original": "boolean",
|
|
177
|
-
"resolved": "boolean",
|
|
178
|
-
"references": {}
|
|
179
|
-
},
|
|
180
|
-
"required": false,
|
|
181
|
-
"optional": true,
|
|
182
|
-
"docs": {
|
|
183
|
-
"tags": [],
|
|
184
|
-
"text": "Controlled open state. Omit it to use defaultOpen and local interaction state."
|
|
185
|
-
},
|
|
186
|
-
"getter": false,
|
|
187
|
-
"setter": false,
|
|
188
|
-
"reflect": false,
|
|
189
|
-
"attribute": "open"
|
|
190
|
-
},
|
|
191
|
-
"defaultOpen": {
|
|
192
|
-
"type": "boolean",
|
|
193
|
-
"mutable": false,
|
|
194
|
-
"complexType": {
|
|
195
|
-
"original": "boolean",
|
|
196
|
-
"resolved": "boolean",
|
|
197
|
-
"references": {}
|
|
198
|
-
},
|
|
199
|
-
"required": false,
|
|
200
|
-
"optional": false,
|
|
201
|
-
"docs": {
|
|
202
|
-
"tags": [],
|
|
203
|
-
"text": ""
|
|
204
|
-
},
|
|
205
|
-
"getter": false,
|
|
206
|
-
"setter": false,
|
|
207
|
-
"reflect": false,
|
|
208
|
-
"attribute": "default-open",
|
|
209
|
-
"defaultValue": "false"
|
|
210
|
-
},
|
|
211
|
-
"for": {
|
|
212
|
-
"type": "string",
|
|
213
|
-
"mutable": false,
|
|
214
|
-
"complexType": {
|
|
215
|
-
"original": "string",
|
|
216
|
-
"resolved": "string",
|
|
217
|
-
"references": {}
|
|
218
|
-
},
|
|
219
|
-
"required": false,
|
|
220
|
-
"optional": true,
|
|
221
|
-
"docs": {
|
|
222
|
-
"tags": [],
|
|
223
|
-
"text": "Id of the control that anchors this menu in the top layer."
|
|
224
|
-
},
|
|
225
|
-
"getter": false,
|
|
226
|
-
"setter": false,
|
|
227
|
-
"reflect": false,
|
|
228
|
-
"attribute": "for"
|
|
229
|
-
},
|
|
230
|
-
"placement": {
|
|
231
|
-
"type": "string",
|
|
232
|
-
"mutable": false,
|
|
233
|
-
"complexType": {
|
|
234
|
-
"original": "AnchoredPlacement",
|
|
235
|
-
"resolved": "\"bottom-end\" | \"bottom-start\" | \"top-end\" | \"top-start\"",
|
|
236
|
-
"references": {
|
|
237
|
-
"AnchoredPlacement": {
|
|
238
|
-
"location": "import",
|
|
239
|
-
"path": "../../overlay/positioning",
|
|
240
|
-
"id": "src/overlay/positioning.ts::AnchoredPlacement",
|
|
241
|
-
"referenceLocation": "AnchoredPlacement"
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
"required": false,
|
|
246
|
-
"optional": false,
|
|
247
|
-
"docs": {
|
|
248
|
-
"tags": [],
|
|
249
|
-
"text": "Preferred placement; Looma flips and shifts when space is constrained."
|
|
250
|
-
},
|
|
251
|
-
"getter": false,
|
|
252
|
-
"setter": false,
|
|
253
|
-
"reflect": false,
|
|
254
|
-
"attribute": "placement",
|
|
255
|
-
"defaultValue": "'bottom-start'"
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
static get states() {
|
|
260
|
-
return {
|
|
261
|
-
"internalOpen": {}
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
static get elementRef() { return "host"; }
|
|
265
|
-
static get watchers() {
|
|
266
|
-
return [{
|
|
267
|
-
"propName": "open",
|
|
268
|
-
"methodName": "syncFromProp"
|
|
269
|
-
}, {
|
|
270
|
-
"propName": "for",
|
|
271
|
-
"methodName": "resetSurface"
|
|
272
|
-
}, {
|
|
273
|
-
"propName": "placement",
|
|
274
|
-
"methodName": "resetSurface"
|
|
275
|
-
}, {
|
|
276
|
-
"propName": "internalOpen",
|
|
277
|
-
"methodName": "syncSurface"
|
|
278
|
-
}];
|
|
279
|
-
}
|
|
280
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
width: 100%;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.menu-item__surface {
|
|
7
|
-
display: block;
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
width: 100%;
|
|
10
|
-
padding: var(--ui-space-2) var(--ui-space-3);
|
|
11
|
-
text-align: left;
|
|
12
|
-
background: none;
|
|
13
|
-
border: none;
|
|
14
|
-
border-radius: var(--ui-radius-2);
|
|
15
|
-
color: var(--ui-text-primary);
|
|
16
|
-
font-size: var(--ui-font-size-md);
|
|
17
|
-
font-weight: var(--ui-font-medium, 500);
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
transition:
|
|
20
|
-
background-color var(--ui-motion-fast) var(--ui-motion-ease),
|
|
21
|
-
color var(--ui-motion-fast) var(--ui-motion-ease);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:host(:hover:not([aria-disabled='true']):not([disabled])) .menu-item__surface {
|
|
25
|
-
background: var(--ui-surface-subtle);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:host([aria-disabled='true']) .menu-item__surface,
|
|
29
|
-
:host([disabled]) .menu-item__surface {
|
|
30
|
-
opacity: 0.6;
|
|
31
|
-
cursor: not-allowed;
|
|
32
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
export class UIMenuItem {
|
|
3
|
-
disabled = false;
|
|
4
|
-
value = '';
|
|
5
|
-
render() {
|
|
6
|
-
return (h(Host, { key: 'd0f0886b18ebd01c0c2e20a2c1b1ecfd57eeb3e3', role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? 'true' : undefined, "data-value": this.value || undefined }, h("span", { key: '7fc584fb670b5b8ce0bbd3be1fea08f87de4a298', class: "menu-item__surface" }, h("slot", { key: '066fb08bc22996d439f3216e401a93a084e3e299' }))));
|
|
7
|
-
}
|
|
8
|
-
static get is() { return "ui-menu-item"; }
|
|
9
|
-
static get encapsulation() { return "shadow"; }
|
|
10
|
-
static get originalStyleUrls() {
|
|
11
|
-
return {
|
|
12
|
-
"$": ["ui-menu-item.css"]
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
static get styleUrls() {
|
|
16
|
-
return {
|
|
17
|
-
"$": ["ui-menu-item.css"]
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
static get properties() {
|
|
21
|
-
return {
|
|
22
|
-
"disabled": {
|
|
23
|
-
"type": "boolean",
|
|
24
|
-
"mutable": false,
|
|
25
|
-
"complexType": {
|
|
26
|
-
"original": "boolean",
|
|
27
|
-
"resolved": "boolean",
|
|
28
|
-
"references": {}
|
|
29
|
-
},
|
|
30
|
-
"required": false,
|
|
31
|
-
"optional": false,
|
|
32
|
-
"docs": {
|
|
33
|
-
"tags": [],
|
|
34
|
-
"text": ""
|
|
35
|
-
},
|
|
36
|
-
"getter": false,
|
|
37
|
-
"setter": false,
|
|
38
|
-
"reflect": true,
|
|
39
|
-
"attribute": "disabled",
|
|
40
|
-
"defaultValue": "false"
|
|
41
|
-
},
|
|
42
|
-
"value": {
|
|
43
|
-
"type": "string",
|
|
44
|
-
"mutable": false,
|
|
45
|
-
"complexType": {
|
|
46
|
-
"original": "string",
|
|
47
|
-
"resolved": "string",
|
|
48
|
-
"references": {}
|
|
49
|
-
},
|
|
50
|
-
"required": false,
|
|
51
|
-
"optional": false,
|
|
52
|
-
"docs": {
|
|
53
|
-
"tags": [],
|
|
54
|
-
"text": ""
|
|
55
|
-
},
|
|
56
|
-
"getter": false,
|
|
57
|
-
"setter": false,
|
|
58
|
-
"reflect": false,
|
|
59
|
-
"attribute": "value",
|
|
60
|
-
"defaultValue": "''"
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}
|