vira 28.19.6 → 28.20.0
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/elements/define-vira-element.d.ts +18 -0
- package/dist/elements/define-vira-element.js +19 -0
- package/dist/elements/form/vira-form-fields.d.ts +100 -0
- package/dist/elements/form/vira-form-fields.js +60 -0
- package/dist/elements/form/vira-form.element.d.ts +35 -0
- package/dist/elements/form/vira-form.element.js +151 -0
- package/dist/elements/index.js +25 -0
- package/dist/elements/pop-up/pop-up-helpers.d.ts +33 -0
- package/dist/elements/pop-up/pop-up-helpers.js +58 -0
- package/{src/elements/pop-up/pop-up-menu-item.ts → dist/elements/pop-up/pop-up-menu-item.d.ts} +3 -4
- package/dist/elements/pop-up/pop-up-menu-item.js +1 -0
- package/dist/elements/pop-up/vira-menu-item.element.d.ts +19 -0
- package/{src/elements/pop-up/vira-menu-item.element.ts → dist/elements/pop-up/vira-menu-item.element.js} +11 -28
- package/dist/elements/pop-up/vira-menu-trigger.element.d.ts +41 -0
- package/dist/elements/pop-up/vira-menu-trigger.element.js +121 -0
- package/dist/elements/pop-up/vira-menu.element.d.ts +38 -0
- package/{src/elements/pop-up/vira-menu.element.ts → dist/elements/pop-up/vira-menu.element.js} +49 -76
- package/dist/elements/pop-up/vira-pop-up-menu.element.d.ts +35 -0
- package/{src/elements/pop-up/vira-pop-up-menu.element.ts → dist/elements/pop-up/vira-pop-up-menu.element.js} +22 -34
- package/dist/elements/pop-up/vira-pop-up-trigger.element.d.ts +105 -0
- package/{src/elements/pop-up/vira-pop-up-trigger.element.ts → dist/elements/pop-up/vira-pop-up-trigger.element.js} +104 -199
- package/dist/elements/shared-text-input-logic.d.ts +63 -0
- package/dist/elements/shared-text-input-logic.js +101 -0
- package/dist/elements/vira-bold-text.element.d.ts +9 -0
- package/{src/elements/vira-bold-text.element.ts → dist/elements/vira-bold-text.element.js} +7 -8
- package/dist/elements/vira-button.element.d.ts +31 -0
- package/{src/elements/vira-button.element.ts → dist/elements/vira-button.element.js} +35 -66
- package/dist/elements/vira-card.element.d.ts +18 -0
- package/{src/elements/vira-card.element.ts → dist/elements/vira-card.element.js} +13 -16
- package/dist/elements/vira-checkbox.element.d.ts +34 -0
- package/{src/elements/vira-checkbox.element.ts → dist/elements/vira-checkbox.element.js} +28 -71
- package/dist/elements/vira-collapsible-wrapper.element.d.ts +16 -0
- package/{src/elements/vira-collapsible-wrapper.element.ts → dist/elements/vira-collapsible-wrapper.element.js} +26 -18
- package/dist/elements/vira-dropdown.element.d.ts +46 -0
- package/{src/elements/vira-dropdown.element.ts → dist/elements/vira-dropdown.element.js} +48 -94
- package/dist/elements/vira-error.element.d.ts +7 -0
- package/{src/elements/vira-error.element.ts → dist/elements/vira-error.element.js} +5 -6
- package/dist/elements/vira-icon.element.d.ts +13 -0
- package/{src/elements/vira-icon.element.ts → dist/elements/vira-icon.element.js} +6 -13
- package/dist/elements/vira-image.element.d.ts +45 -0
- package/{src/elements/vira-image.element.ts → dist/elements/vira-image.element.js} +43 -63
- package/dist/elements/vira-input.element.d.ts +62 -0
- package/{src/elements/vira-input.element.ts → dist/elements/vira-input.element.js} +85 -151
- package/dist/elements/vira-link.element.d.ts +73 -0
- package/{src/elements/vira-link.element.ts → dist/elements/vira-link.element.js} +11 -62
- package/dist/elements/vira-modal.element.d.ts +39 -0
- package/{src/elements/vira-modal.element.ts → dist/elements/vira-modal.element.js} +50 -89
- package/dist/elements/vira-overflow-switch.element.d.ts +21 -0
- package/dist/elements/vira-overflow-switch.element.js +110 -0
- package/dist/elements/vira-progress.element.d.ts +18 -0
- package/{src/elements/vira-progress.element.ts → dist/elements/vira-progress.element.js} +11 -26
- package/dist/elements/vira-select.element.d.ts +48 -0
- package/{src/elements/vira-select.element.ts → dist/elements/vira-select.element.js} +41 -96
- package/dist/icons/icon-color.test-helper.d.ts +6 -0
- package/dist/icons/icon-color.test-helper.js +9 -0
- package/dist/icons/icon-css-vars.d.ts +14 -0
- package/{src/icons/icon-css-vars.ts → dist/icons/icon-css-vars.js} +1 -2
- package/dist/icons/icon-svg.d.ts +27 -0
- package/dist/icons/icon-svg.js +48 -0
- package/dist/icons/icon-svgs/bell-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/bell-24.icon.ts → dist/icons/icon-svgs/bell-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/chat-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/chat-24.icon.ts → dist/icons/icon-svgs/chat-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/check-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/check-24.icon.ts → dist/icons/icon-svgs/check-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/chevron-down-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/chevron-down-24.icon.ts → dist/icons/icon-svgs/chevron-down-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/chevron-up-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/chevron-up-24.icon.ts → dist/icons/icon-svgs/chevron-up-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/close-x-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/close-x-24.icon.ts → dist/icons/icon-svgs/close-x-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/commit-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/commit-24.icon.ts → dist/icons/icon-svgs/commit-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/copy-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/copy-24.icon.ts → dist/icons/icon-svgs/copy-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/document-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/document-24.icon.ts → dist/icons/icon-svgs/document-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/document-search-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/document-search-24.icon.ts → dist/icons/icon-svgs/document-search-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/double-chevron-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/double-chevron-24.icon.ts → dist/icons/icon-svgs/double-chevron-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/element-16.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/element-16.icon.ts → dist/icons/icon-svgs/element-16.icon.js} +4 -5
- package/dist/icons/icon-svgs/element-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/element-24.icon.ts → dist/icons/icon-svgs/element-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/external-link-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/external-link-24.icon.ts → dist/icons/icon-svgs/external-link-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/eye-closed-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/eye-closed-24.icon.ts → dist/icons/icon-svgs/eye-closed-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/eye-open-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/eye-open-24.icon.ts → dist/icons/icon-svgs/eye-open-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/filter-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/filter-24.icon.ts → dist/icons/icon-svgs/filter-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/link-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/link-24.icon.ts → dist/icons/icon-svgs/link-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/loader-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/loader-24.icon.ts → dist/icons/icon-svgs/loader-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/loader-animated-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/loader-animated-24.icon.ts → dist/icons/icon-svgs/loader-animated-24.icon.js} +6 -8
- package/dist/icons/icon-svgs/lock-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/lock-24.icon.ts → dist/icons/icon-svgs/lock-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/options-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/options-24.icon.ts → dist/icons/icon-svgs/options-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/pencil-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/pencil-24.icon.ts → dist/icons/icon-svgs/pencil-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/shield-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/shield-24.icon.ts → dist/icons/icon-svgs/shield-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/sort-ascending-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/sort-ascending-24.icon.ts → dist/icons/icon-svgs/sort-ascending-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/sort-descending-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/sort-descending-24.icon.ts → dist/icons/icon-svgs/sort-descending-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/speaker-loud-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/speaker-loud-24.icon.ts → dist/icons/icon-svgs/speaker-loud-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/speaker-medium-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/speaker-medium-24.icon.ts → dist/icons/icon-svgs/speaker-medium-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/speaker-muted-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/speaker-muted-24.icon.ts → dist/icons/icon-svgs/speaker-muted-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/speaker-quiet-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/speaker-quiet-24.icon.ts → dist/icons/icon-svgs/speaker-quiet-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/star-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/star-24.icon.ts → dist/icons/icon-svgs/star-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/status-failure-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/status-failure-24.icon.ts → dist/icons/icon-svgs/status-failure-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/status-in-progress-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/status-in-progress-24.icon.ts → dist/icons/icon-svgs/status-in-progress-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/status-success-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/status-success-24.icon.ts → dist/icons/icon-svgs/status-success-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/status-unknown-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/status-unknown-24.icon.ts → dist/icons/icon-svgs/status-unknown-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/status-warning-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/status-warning-24.icon.ts → dist/icons/icon-svgs/status-warning-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/upload-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/upload-24.icon.ts → dist/icons/icon-svgs/upload-24.icon.js} +4 -5
- package/dist/icons/icon-svgs/x-24.icon.d.ts +8 -0
- package/{src/icons/icon-svgs/x-24.icon.ts → dist/icons/icon-svgs/x-24.icon.js} +4 -5
- package/dist/icons/index.d.ts +86 -0
- package/{src/icons/index.ts → dist/icons/index.js} +39 -43
- package/dist/index.js +4 -0
- package/dist/styles/border.d.ts +9 -0
- package/{src/styles/border.ts → dist/styles/border.js} +1 -2
- package/dist/styles/disabled.d.ts +6 -0
- package/{src/styles/disabled.ts → dist/styles/disabled.js} +2 -3
- package/dist/styles/durations.d.ts +22 -0
- package/{src/styles/durations.ts → dist/styles/durations.js} +1 -2
- package/dist/styles/focus.d.ts +34 -0
- package/{src/styles/focus.ts → dist/styles/focus.js} +8 -29
- package/dist/styles/font.d.ts +9 -0
- package/{src/styles/font.ts → dist/styles/font.js} +1 -2
- package/dist/styles/form-styles.d.ts +20 -0
- package/{src/styles/form-styles.ts → dist/styles/form-styles.js} +1 -6
- package/{src/styles/index.ts → dist/styles/index.d.ts} +0 -1
- package/dist/styles/index.js +13 -0
- package/dist/styles/native-styles.d.ts +13 -0
- package/{src/styles/native-styles.ts → dist/styles/native-styles.js} +3 -5
- package/dist/styles/scrollbar.d.ts +6 -0
- package/{src/styles/scrollbar.ts → dist/styles/scrollbar.js} +3 -4
- package/dist/styles/shadows.d.ts +20 -0
- package/{src/styles/shadows.ts → dist/styles/shadows.js} +6 -8
- package/dist/styles/user-select.d.ts +6 -0
- package/{src/styles/user-select.ts → dist/styles/user-select.js} +2 -3
- package/dist/styles/vira-color-palette.d.ts +95 -0
- package/{src/styles/vira-color-palette.ts → dist/styles/vira-color-palette.js} +1 -11
- package/dist/styles/vira-color-theme.d.ts +1184 -0
- package/dist/styles/vira-color-theme.js +1138 -0
- package/dist/util/define-table.d.ts +110 -0
- package/dist/util/define-table.js +115 -0
- package/dist/util/dynamic-element.d.ts +63 -0
- package/dist/util/dynamic-element.js +61 -0
- package/dist/util/index.js +3 -0
- package/dist/util/pop-up-manager.d.ts +186 -0
- package/dist/util/pop-up-manager.js +214 -0
- package/package.json +6 -6
- package/src/elements/define-vira-element.ts +0 -29
- package/src/elements/form/vira-form-fields.ts +0 -140
- package/src/elements/form/vira-form.element.ts +0 -204
- package/src/elements/pop-up/pop-up-helpers.ts +0 -85
- package/src/elements/pop-up/vira-menu-trigger.element.ts +0 -158
- package/src/elements/shared-text-input-logic.ts +0 -173
- package/src/elements/vira-overflow-switch.element.ts +0 -137
- package/src/icons/icon-color.test-helper.ts +0 -9
- package/src/icons/icon-svg.ts +0 -71
- package/src/styles/vira-color-theme.ts +0 -1142
- package/src/util/define-table.ts +0 -279
- package/src/util/dynamic-element.ts +0 -129
- package/src/util/pop-up-manager.ts +0 -380
- /package/{src/elements/index.ts → dist/elements/index.d.ts} +0 -0
- /package/{src/index.ts → dist/index.d.ts} +0 -0
- /package/{src/util/index.ts → dist/util/index.d.ts} +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { classMap, css, defineElementEvent, html, listen, nothing, testId } from 'element-vir';
|
|
2
|
+
import { defineViraElement } from '../define-vira-element.js';
|
|
3
|
+
import { updateSelectedItems } from './pop-up-helpers.js';
|
|
4
|
+
import { ViraMenu } from './vira-menu.element.js';
|
|
5
|
+
import { PopUpMenuDirection, ViraPopUpMenu, } from './vira-pop-up-menu.element.js';
|
|
6
|
+
import { HorizontalAnchor, ViraPopUpTrigger, } from './vira-pop-up-trigger.element.js';
|
|
7
|
+
/**
|
|
8
|
+
* Test ids for {@link ViraMenuTrigger}.
|
|
9
|
+
*
|
|
10
|
+
* @category Internal
|
|
11
|
+
*/
|
|
12
|
+
export const viraMenuTriggerTestIds = {
|
|
13
|
+
menu: 'menu-trigger-menu',
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A more specific wrapper of `ViraPopUpTrigger` that always opens a menu.
|
|
17
|
+
*
|
|
18
|
+
* @category PopUp
|
|
19
|
+
* @category Elements
|
|
20
|
+
*/
|
|
21
|
+
export const ViraMenuTrigger = defineViraElement()({
|
|
22
|
+
tagName: 'vira-menu-trigger',
|
|
23
|
+
styles: css `
|
|
24
|
+
:host {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
vertical-align: middle;
|
|
28
|
+
max-width: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
${ViraPopUpTrigger} {
|
|
32
|
+
width: 100%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.full-width-menu {
|
|
36
|
+
width: 100%;
|
|
37
|
+
}
|
|
38
|
+
`,
|
|
39
|
+
events: {
|
|
40
|
+
itemActivate: defineElementEvent(),
|
|
41
|
+
openChange: defineElementEvent(),
|
|
42
|
+
},
|
|
43
|
+
state() {
|
|
44
|
+
return {
|
|
45
|
+
navController: undefined,
|
|
46
|
+
popUpManager: undefined,
|
|
47
|
+
/** `undefined` means the pop up is not currently showing. */
|
|
48
|
+
showPopUpResult: undefined,
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
render({ inputs, state, updateState, dispatch, events }) {
|
|
52
|
+
return html `
|
|
53
|
+
<${ViraPopUpTrigger.assign({
|
|
54
|
+
...inputs,
|
|
55
|
+
keepOpenAfterInteraction: true,
|
|
56
|
+
popUpOffset: inputs.popUpOffset,
|
|
57
|
+
horizontalAnchor: inputs.horizontalAnchor || HorizontalAnchor.Left,
|
|
58
|
+
})}
|
|
59
|
+
class=${classMap({
|
|
60
|
+
open: !!state.showPopUpResult,
|
|
61
|
+
})}
|
|
62
|
+
${listen(ViraPopUpTrigger.events.init, (event) => {
|
|
63
|
+
updateState({
|
|
64
|
+
navController: event.detail.navController,
|
|
65
|
+
popUpManager: event.detail.popUpManager,
|
|
66
|
+
});
|
|
67
|
+
})}
|
|
68
|
+
${listen(ViraPopUpTrigger.events.openChange, (event) => {
|
|
69
|
+
if (!!state.showPopUpResult !== !!event.detail) {
|
|
70
|
+
dispatch(new events.openChange(event.detail));
|
|
71
|
+
}
|
|
72
|
+
updateState({
|
|
73
|
+
showPopUpResult: event.detail,
|
|
74
|
+
});
|
|
75
|
+
})}
|
|
76
|
+
${listen(ViraPopUpTrigger.events.navSelect, (event) => {
|
|
77
|
+
const itemIndex = event.detail.x;
|
|
78
|
+
const item = inputs.items[itemIndex];
|
|
79
|
+
if (!item) {
|
|
80
|
+
throw new Error(`Found no dropdown option at index '${itemIndex}'`);
|
|
81
|
+
}
|
|
82
|
+
dispatch(new events.itemActivate(updateSelectedItems(item, inputs.selected, inputs.isMultiSelect)));
|
|
83
|
+
if (!inputs.isMultiSelect) {
|
|
84
|
+
/**
|
|
85
|
+
* Defer pop up removal to prevent race conditions with element-internal
|
|
86
|
+
* click handlers.
|
|
87
|
+
*/
|
|
88
|
+
globalThis.setTimeout(() => state.popUpManager?.removePopUp());
|
|
89
|
+
}
|
|
90
|
+
})}
|
|
91
|
+
>
|
|
92
|
+
<slot slot=${ViraPopUpTrigger.slotNames.trigger}></slot>
|
|
93
|
+
${state.navController && state.showPopUpResult
|
|
94
|
+
? html `
|
|
95
|
+
<${ViraPopUpMenu.assign({
|
|
96
|
+
direction: state.showPopUpResult.popDown
|
|
97
|
+
? PopUpMenuDirection.Downwards
|
|
98
|
+
: PopUpMenuDirection.Upwards,
|
|
99
|
+
cornerStyle: inputs.menuCornerStyle,
|
|
100
|
+
})}
|
|
101
|
+
slot=${ViraPopUpTrigger.slotNames.popUp}
|
|
102
|
+
class=${classMap({
|
|
103
|
+
'full-width-menu': inputs.horizontalAnchor === HorizontalAnchor.Both,
|
|
104
|
+
})}
|
|
105
|
+
>
|
|
106
|
+
<${ViraMenu.assign({
|
|
107
|
+
items: inputs.items,
|
|
108
|
+
selected: inputs.selected,
|
|
109
|
+
navController: state.navController,
|
|
110
|
+
isMultiSelect: !!inputs.isMultiSelect,
|
|
111
|
+
hideCheckIcons: inputs.hideCheckIcons,
|
|
112
|
+
})}
|
|
113
|
+
${testId(viraMenuTriggerTestIds.menu)}
|
|
114
|
+
></${ViraMenu}>
|
|
115
|
+
</${ViraPopUpMenu}>
|
|
116
|
+
`
|
|
117
|
+
: nothing}
|
|
118
|
+
</${ViraPopUpTrigger}>
|
|
119
|
+
`;
|
|
120
|
+
},
|
|
121
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type PartialWithUndefined } from '@augment-vir/common';
|
|
2
|
+
import { NavController } from 'device-navigation';
|
|
3
|
+
import { type MenuItem } from './pop-up-menu-item.js';
|
|
4
|
+
/**
|
|
5
|
+
* Test ids for {@link ViraMenu}.
|
|
6
|
+
*
|
|
7
|
+
* @category Internal
|
|
8
|
+
*/
|
|
9
|
+
export declare const viraMenuTestIds: {
|
|
10
|
+
item: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A wrapper for menu items. This can be used for dropdown items or menu bar dropdowns. To detect
|
|
14
|
+
* when items are selected or unselected, pass in a `NavController` instance and hook into its
|
|
15
|
+
* events.
|
|
16
|
+
*
|
|
17
|
+
* @category PopUp
|
|
18
|
+
* @category Elements
|
|
19
|
+
*/
|
|
20
|
+
export declare const ViraMenu: import("element-vir").DeclarativeElementDefinition<"vira-menu", Readonly<{
|
|
21
|
+
/**
|
|
22
|
+
* The parent nav controller for this menu. If none is provided, an internal nav
|
|
23
|
+
* controller is created (which means it can't be hooked into by external elements).
|
|
24
|
+
*
|
|
25
|
+
* It is recommended to not leave this `undefined`.
|
|
26
|
+
*/
|
|
27
|
+
navController: NavController | undefined;
|
|
28
|
+
/** All menu items to show to the user. */
|
|
29
|
+
items: ReadonlyArray<Readonly<MenuItem>>;
|
|
30
|
+
} & PartialWithUndefined<{
|
|
31
|
+
/** The ids of the currently selected menu items. */
|
|
32
|
+
selected: ReadonlyArray<PropertyKey>;
|
|
33
|
+
isMultiSelect: boolean;
|
|
34
|
+
/** Hide menu item check mark icons. */
|
|
35
|
+
hideCheckIcons: boolean;
|
|
36
|
+
}>>, {
|
|
37
|
+
internalNavController: NavController;
|
|
38
|
+
}, {}, "vira-menu-multiselect", "vira-menu-", readonly [], readonly []>;
|
package/{src/elements/pop-up/vira-menu.element.ts → dist/elements/pop-up/vira-menu.element.js}
RENAMED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import {check} from '@augment-vir/assert';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {type MenuItem} from './pop-up-menu-item.js';
|
|
11
|
-
import {ViraMenuItem} from './vira-menu-item.element.js';
|
|
12
|
-
|
|
1
|
+
import { check } from '@augment-vir/assert';
|
|
2
|
+
import { nav, navAttribute, NavController, NavValue } from 'device-navigation';
|
|
3
|
+
import { classMap, css, html, ifDefined, testId } from 'element-vir';
|
|
4
|
+
import { viraFormCssVars } from '../../styles/form-styles.js';
|
|
5
|
+
import { noNativeFormStyles, viraDisabledStyles } from '../../styles/index.js';
|
|
6
|
+
import { defineViraElement } from '../define-vira-element.js';
|
|
7
|
+
import { ViraLink } from '../vira-link.element.js';
|
|
8
|
+
import { assertUniqueIdProps } from './pop-up-helpers.js';
|
|
9
|
+
import { ViraMenuItem } from './vira-menu-item.element.js';
|
|
13
10
|
/**
|
|
14
11
|
* Test ids for {@link ViraMenu}.
|
|
15
12
|
*
|
|
@@ -18,7 +15,6 @@ import {ViraMenuItem} from './vira-menu-item.element.js';
|
|
|
18
15
|
export const viraMenuTestIds = {
|
|
19
16
|
item: 'menu-item',
|
|
20
17
|
};
|
|
21
|
-
|
|
22
18
|
/**
|
|
23
19
|
* A wrapper for menu items. This can be used for dropdown items or menu bar dropdowns. To detect
|
|
24
20
|
* when items are selected or unselected, pass in a `NavController` instance and hook into its
|
|
@@ -27,37 +23,17 @@ export const viraMenuTestIds = {
|
|
|
27
23
|
* @category PopUp
|
|
28
24
|
* @category Elements
|
|
29
25
|
*/
|
|
30
|
-
export const ViraMenu = defineViraElement
|
|
31
|
-
Readonly<
|
|
32
|
-
{
|
|
33
|
-
/**
|
|
34
|
-
* The parent nav controller for this menu. If none is provided, an internal nav
|
|
35
|
-
* controller is created (which means it can't be hooked into by external elements).
|
|
36
|
-
*
|
|
37
|
-
* It is recommended to not leave this `undefined`.
|
|
38
|
-
*/
|
|
39
|
-
navController: NavController | undefined;
|
|
40
|
-
/** All menu items to show to the user. */
|
|
41
|
-
items: ReadonlyArray<Readonly<MenuItem>>;
|
|
42
|
-
} & PartialWithUndefined<{
|
|
43
|
-
/** The ids of the currently selected menu items. */
|
|
44
|
-
selected: ReadonlyArray<PropertyKey>;
|
|
45
|
-
isMultiSelect: boolean;
|
|
46
|
-
/** Hide menu item check mark icons. */
|
|
47
|
-
hideCheckIcons: boolean;
|
|
48
|
-
}>
|
|
49
|
-
>
|
|
50
|
-
>()({
|
|
26
|
+
export const ViraMenu = defineViraElement()({
|
|
51
27
|
tagName: 'vira-menu',
|
|
52
|
-
state({inputs, host}) {
|
|
28
|
+
state({ inputs, host }) {
|
|
53
29
|
return {
|
|
54
30
|
internalNavController: inputs.navController || new NavController(host),
|
|
55
31
|
};
|
|
56
32
|
},
|
|
57
33
|
hostClasses: {
|
|
58
|
-
'vira-menu-multiselect': ({inputs}) => !!inputs.isMultiSelect,
|
|
34
|
+
'vira-menu-multiselect': ({ inputs }) => !!inputs.isMultiSelect,
|
|
59
35
|
},
|
|
60
|
-
styles: ({hostClasses}) => css`
|
|
36
|
+
styles: ({ hostClasses }) => css `
|
|
61
37
|
:host {
|
|
62
38
|
display: flex;
|
|
63
39
|
flex-direction: column;
|
|
@@ -82,30 +58,30 @@ export const ViraMenu = defineViraElement<
|
|
|
82
58
|
}
|
|
83
59
|
|
|
84
60
|
${navAttribute.css({
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
61
|
+
baseSelector: '.menu-item:not(.disabled):not(.selected)',
|
|
62
|
+
navValue: NavValue.Focused,
|
|
63
|
+
})}, ${navAttribute.css({
|
|
64
|
+
baseSelector: '.menu-item:not(.disabled):not(.selected)',
|
|
65
|
+
navValue: NavValue.Active,
|
|
66
|
+
})}, .menu-item:not(.disabled):not(.selected):hover {
|
|
91
67
|
background-color: ${viraFormCssVars['vira-form-selection-hover-background-color']
|
|
92
|
-
|
|
68
|
+
.value};
|
|
93
69
|
outline: none;
|
|
94
70
|
}
|
|
95
71
|
|
|
96
72
|
${hostClasses['vira-menu-multiselect'].selector} {
|
|
97
73
|
&
|
|
98
74
|
${navAttribute.css({
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
75
|
+
baseSelector: '.menu-item:not(.disabled)',
|
|
76
|
+
navValue: NavValue.Focused,
|
|
77
|
+
})},
|
|
102
78
|
${navAttribute.css({
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
79
|
+
baseSelector: '.menu-item:not(.disabled)',
|
|
80
|
+
navValue: NavValue.Active,
|
|
81
|
+
})},
|
|
106
82
|
.menu-item:not(.disabled):hover {
|
|
107
83
|
background-color: ${viraFormCssVars['vira-form-selection-hover-background-color']
|
|
108
|
-
|
|
84
|
+
.value};
|
|
109
85
|
outline: none;
|
|
110
86
|
}
|
|
111
87
|
}
|
|
@@ -119,64 +95,61 @@ export const ViraMenu = defineViraElement<
|
|
|
119
95
|
pointer-events: auto;
|
|
120
96
|
}
|
|
121
97
|
`,
|
|
122
|
-
cleanup({inputs, state}) {
|
|
98
|
+
cleanup({ inputs, state }) {
|
|
123
99
|
if (!inputs.navController) {
|
|
124
100
|
state.internalNavController.destroy();
|
|
125
101
|
}
|
|
126
102
|
},
|
|
127
|
-
render({inputs, state}) {
|
|
103
|
+
render({ inputs, state }) {
|
|
128
104
|
assertUniqueIdProps(inputs.items);
|
|
129
|
-
|
|
130
105
|
const itemTemplates = inputs.items.map((item) => {
|
|
131
106
|
const selected = !!inputs.selected?.includes(item.id);
|
|
132
107
|
const innerTemplate = check.isString(item.label)
|
|
133
|
-
? html`
|
|
108
|
+
? html `
|
|
134
109
|
<${ViraMenuItem.assign({
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
110
|
+
label: item.label,
|
|
111
|
+
selected,
|
|
112
|
+
hideCheckIcon: inputs.hideCheckIcons,
|
|
113
|
+
})}></${ViraMenuItem}>
|
|
139
114
|
`
|
|
140
115
|
: item.label;
|
|
141
|
-
|
|
142
116
|
const disabled = item.disabled || (!inputs.isMultiSelect && selected);
|
|
143
|
-
|
|
144
117
|
if (item.route) {
|
|
145
|
-
return html`
|
|
118
|
+
return html `
|
|
146
119
|
<${ViraLink.assign({
|
|
147
|
-
|
|
148
|
-
|
|
120
|
+
route: item.route,
|
|
121
|
+
})}
|
|
149
122
|
class="menu-item ${classMap({
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
123
|
+
disabled: !!item.disabled,
|
|
124
|
+
selected,
|
|
125
|
+
})}"
|
|
153
126
|
${testId(viraMenuTestIds.item)}
|
|
154
127
|
title=${ifDefined(item.titleText || undefined)}
|
|
155
128
|
role="option"
|
|
156
|
-
${nav(state.internalNavController, {disabled})}
|
|
129
|
+
${nav(state.internalNavController, { disabled })}
|
|
157
130
|
>
|
|
158
131
|
${innerTemplate}
|
|
159
132
|
</${ViraLink}>
|
|
160
133
|
`;
|
|
161
|
-
}
|
|
162
|
-
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
return html `
|
|
163
137
|
<button
|
|
164
138
|
class="menu-item ${classMap({
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
139
|
+
disabled: !!item.disabled,
|
|
140
|
+
selected,
|
|
141
|
+
})}"
|
|
168
142
|
${testId(viraMenuTestIds.item)}
|
|
169
143
|
title=${ifDefined(item.titleText || undefined)}
|
|
170
144
|
role="option"
|
|
171
|
-
${nav(state.internalNavController, {disabled})}
|
|
145
|
+
${nav(state.internalNavController, { disabled })}
|
|
172
146
|
>
|
|
173
147
|
${innerTemplate}
|
|
174
148
|
</button>
|
|
175
149
|
`;
|
|
176
150
|
}
|
|
177
151
|
});
|
|
178
|
-
|
|
179
|
-
return html`
|
|
152
|
+
return html `
|
|
180
153
|
${itemTemplates}
|
|
181
154
|
`;
|
|
182
155
|
},
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type PartialWithUndefined } from '@augment-vir/common';
|
|
2
|
+
/**
|
|
3
|
+
* Possible corner styles for {@link ViraPopUpMenu}.
|
|
4
|
+
*
|
|
5
|
+
* @category Internal
|
|
6
|
+
*/
|
|
7
|
+
export declare enum PopUpMenuCornerStyle {
|
|
8
|
+
/** Rounding of corners depends on the open direction of the menu. */
|
|
9
|
+
Directional = "directional",
|
|
10
|
+
/** All of the menus corners should be rounded. */
|
|
11
|
+
AllRounded = "all-rounded",
|
|
12
|
+
/** None of the menus corners should be rounded. */
|
|
13
|
+
AllSquare = "all-square"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Menu pop-up directions available for {@link ViraPopUpMenu}.
|
|
17
|
+
*
|
|
18
|
+
* @category Internal
|
|
19
|
+
*/
|
|
20
|
+
export declare enum PopUpMenuDirection {
|
|
21
|
+
Downwards = "downwards",
|
|
22
|
+
Upwards = "upwards"
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A simple default style wrapper for pop-up menus.
|
|
26
|
+
*
|
|
27
|
+
* @category PopUp
|
|
28
|
+
* @category Elements
|
|
29
|
+
*/
|
|
30
|
+
export declare const ViraPopUpMenu: import("element-vir").DeclarativeElementDefinition<"vira-pop-up-menu", PartialWithUndefined<{
|
|
31
|
+
/** @default PopUpMenuDirection.Downwards */
|
|
32
|
+
direction: PopUpMenuDirection;
|
|
33
|
+
/** @default PopUpMenuCornerStyle.Directional */
|
|
34
|
+
cornerStyle: PopUpMenuCornerStyle;
|
|
35
|
+
}>, {}, {}, "vira-pop-up-menu-open-upwards" | "vira-pop-up-menu-rounded" | "vira-pop-up-menu-square", "vira-pop-up-menu-", readonly [], readonly []>;
|
|
@@ -1,58 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {defineViraElement} from '../define-vira-element.js';
|
|
7
|
-
|
|
1
|
+
import { css, html } from 'element-vir';
|
|
2
|
+
import { viraBorders } from '../../styles/border.js';
|
|
3
|
+
import { viraFormCssVars } from '../../styles/form-styles.js';
|
|
4
|
+
import { viraShadows } from '../../styles/shadows.js';
|
|
5
|
+
import { defineViraElement } from '../define-vira-element.js';
|
|
8
6
|
/**
|
|
9
7
|
* Possible corner styles for {@link ViraPopUpMenu}.
|
|
10
8
|
*
|
|
11
9
|
* @category Internal
|
|
12
10
|
*/
|
|
13
|
-
export
|
|
11
|
+
export var PopUpMenuCornerStyle;
|
|
12
|
+
(function (PopUpMenuCornerStyle) {
|
|
14
13
|
/** Rounding of corners depends on the open direction of the menu. */
|
|
15
|
-
Directional =
|
|
14
|
+
PopUpMenuCornerStyle["Directional"] = "directional";
|
|
16
15
|
/** All of the menus corners should be rounded. */
|
|
17
|
-
AllRounded =
|
|
16
|
+
PopUpMenuCornerStyle["AllRounded"] = "all-rounded";
|
|
18
17
|
/** None of the menus corners should be rounded. */
|
|
19
|
-
AllSquare =
|
|
20
|
-
}
|
|
21
|
-
|
|
18
|
+
PopUpMenuCornerStyle["AllSquare"] = "all-square";
|
|
19
|
+
})(PopUpMenuCornerStyle || (PopUpMenuCornerStyle = {}));
|
|
22
20
|
/**
|
|
23
21
|
* Menu pop-up directions available for {@link ViraPopUpMenu}.
|
|
24
22
|
*
|
|
25
23
|
* @category Internal
|
|
26
24
|
*/
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
export var PopUpMenuDirection;
|
|
26
|
+
(function (PopUpMenuDirection) {
|
|
27
|
+
PopUpMenuDirection["Downwards"] = "downwards";
|
|
28
|
+
PopUpMenuDirection["Upwards"] = "upwards";
|
|
29
|
+
})(PopUpMenuDirection || (PopUpMenuDirection = {}));
|
|
32
30
|
/**
|
|
33
31
|
* A simple default style wrapper for pop-up menus.
|
|
34
32
|
*
|
|
35
33
|
* @category PopUp
|
|
36
34
|
* @category Elements
|
|
37
35
|
*/
|
|
38
|
-
export const ViraPopUpMenu = defineViraElement
|
|
39
|
-
PartialWithUndefined<{
|
|
40
|
-
/** @default PopUpMenuDirection.Downwards */
|
|
41
|
-
direction: PopUpMenuDirection;
|
|
42
|
-
/** @default PopUpMenuCornerStyle.Directional */
|
|
43
|
-
cornerStyle: PopUpMenuCornerStyle;
|
|
44
|
-
}>
|
|
45
|
-
>()({
|
|
36
|
+
export const ViraPopUpMenu = defineViraElement()({
|
|
46
37
|
tagName: 'vira-pop-up-menu',
|
|
47
38
|
hostClasses: {
|
|
48
|
-
'vira-pop-up-menu-open-upwards': ({inputs}) =>
|
|
49
|
-
|
|
50
|
-
'vira-pop-up-menu-
|
|
51
|
-
inputs.cornerStyle === PopUpMenuCornerStyle.AllRounded,
|
|
52
|
-
'vira-pop-up-menu-square': ({inputs}) =>
|
|
53
|
-
inputs.cornerStyle === PopUpMenuCornerStyle.AllSquare,
|
|
39
|
+
'vira-pop-up-menu-open-upwards': ({ inputs }) => inputs.direction === PopUpMenuDirection.Upwards,
|
|
40
|
+
'vira-pop-up-menu-rounded': ({ inputs }) => inputs.cornerStyle === PopUpMenuCornerStyle.AllRounded,
|
|
41
|
+
'vira-pop-up-menu-square': ({ inputs }) => inputs.cornerStyle === PopUpMenuCornerStyle.AllSquare,
|
|
54
42
|
},
|
|
55
|
-
styles: ({hostClasses}) => css`
|
|
43
|
+
styles: ({ hostClasses }) => css `
|
|
56
44
|
:host {
|
|
57
45
|
display: flex;
|
|
58
46
|
max-width: 100%;
|
|
@@ -85,7 +73,7 @@ export const ViraPopUpMenu = defineViraElement<
|
|
|
85
73
|
}
|
|
86
74
|
`,
|
|
87
75
|
render() {
|
|
88
|
-
return html`
|
|
76
|
+
return html `
|
|
89
77
|
<slot></slot>
|
|
90
78
|
`;
|
|
91
79
|
},
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { type PartialWithUndefined } from '@augment-vir/common';
|
|
2
|
+
import { NavController, type Coords } from 'device-navigation';
|
|
3
|
+
import { PopUpManager, type ShowPopUpResult } from '../../util/pop-up-manager.js';
|
|
4
|
+
/**
|
|
5
|
+
* Offsets applied to any menu opened by {@link ViraPopUpTrigger}.
|
|
6
|
+
*
|
|
7
|
+
* @category Internal
|
|
8
|
+
*/
|
|
9
|
+
export type PopUpOffset = PartialWithUndefined<{
|
|
10
|
+
vertical: number;
|
|
11
|
+
right: number;
|
|
12
|
+
left: number;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Anchor options for pop-ups.
|
|
16
|
+
*
|
|
17
|
+
* @category Internal
|
|
18
|
+
*/
|
|
19
|
+
export declare enum HorizontalAnchor {
|
|
20
|
+
/**
|
|
21
|
+
* The left side of the pop-up will be anchored to the left side of the trigger, allowing the
|
|
22
|
+
* pop-up to grow on the right side of the trigger.
|
|
23
|
+
*/
|
|
24
|
+
Left = "left",
|
|
25
|
+
/**
|
|
26
|
+
* The Right side of the pop-up will be anchored to the right side of the trigger, allowing the
|
|
27
|
+
* pop-up to grow on the left side of the trigger.
|
|
28
|
+
*/
|
|
29
|
+
Right = "right",
|
|
30
|
+
/** Restrict the pop-up on both sides. */
|
|
31
|
+
Both = "both",
|
|
32
|
+
/**
|
|
33
|
+
* Automatically choose left or right based on available space, defaulting to anchoring on the
|
|
34
|
+
* left side.
|
|
35
|
+
*
|
|
36
|
+
* This is the default anchor for {@link ViraPopUpTrigger}.
|
|
37
|
+
*/
|
|
38
|
+
Auto = "auto"
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Configs for {@link ViraPopUpTrigger} pop-up positioning and sizing.
|
|
42
|
+
*
|
|
43
|
+
* @category Internal
|
|
44
|
+
*/
|
|
45
|
+
export type PopUpTriggerPosition = {
|
|
46
|
+
/**
|
|
47
|
+
* - `HorizontalAnchor.Left`: pop-up is anchored to the left side of the trigger and the pop-up
|
|
48
|
+
* can grow to the right.
|
|
49
|
+
* - `HorizontalAnchor.Right`: pop-up is anchored to the right side of the trigger and the pop-up
|
|
50
|
+
* can grow to the left.
|
|
51
|
+
* - `HorizontalAnchor.Both`: pop-up is anchored on both sides of the trigger and cannot grow
|
|
52
|
+
* beyond it.
|
|
53
|
+
* - `HorizontalAnchor.Auto`: automatically choose left or right anchor based on available space,
|
|
54
|
+
* defaulting to left anchor. (This is the default experience.)
|
|
55
|
+
*
|
|
56
|
+
* Note that when `HorizontalAnchor.Both` is _not_ used, this anchor will cancel out any
|
|
57
|
+
* `popUpOffset` for the direction _opposite_ of the chosen anchor.
|
|
58
|
+
*/
|
|
59
|
+
horizontalAnchor: HorizontalAnchor;
|
|
60
|
+
/**
|
|
61
|
+
* When `true`, the pop-up will not have its maximum width constrained to fit within the
|
|
62
|
+
* overflow container. The positioning logic (left/right) will still be applied.
|
|
63
|
+
*
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
ignoreMaxWidth: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* When `true`, the pop-up will not have its maximum height constrained to fit within the
|
|
69
|
+
* overflow container. The positioning logic (up/down) will still be applied.
|
|
70
|
+
*
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
ignoreMaxHeight: boolean;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* An element with slots for a pop-up trigger and pop-up contents.
|
|
77
|
+
*
|
|
78
|
+
* @category PopUp
|
|
79
|
+
* @category Elements
|
|
80
|
+
* @see https://electrovir.github.io/vira/book/elements/vira-pop-up-trigger
|
|
81
|
+
*/
|
|
82
|
+
export declare const ViraPopUpTrigger: import("element-vir").DeclarativeElementDefinition<"vira-pop-up-trigger", PartialWithUndefined<PopUpTriggerPosition & {
|
|
83
|
+
isDisabled: boolean;
|
|
84
|
+
/** For debugging purposes only. Very bad for actual production code use. */
|
|
85
|
+
z_debug_forceOpenState: boolean;
|
|
86
|
+
/** Set to `true` to keep the pop-up open if it is interacted with. */
|
|
87
|
+
keepOpenAfterInteraction: boolean;
|
|
88
|
+
/** All values in px. */
|
|
89
|
+
popUpOffset: PopUpOffset;
|
|
90
|
+
}>, {
|
|
91
|
+
/** `undefined` means the pop up is not currently showing. */
|
|
92
|
+
showPopUpResult: ShowPopUpResult | undefined;
|
|
93
|
+
popUpManager: PopUpManager;
|
|
94
|
+
}, {
|
|
95
|
+
navSelect: import("element-vir").DefineEvent<Coords>;
|
|
96
|
+
/**
|
|
97
|
+
* - `undefined` indicates that the pop-up just closed.
|
|
98
|
+
* - {@link ShowPopUpResult} indicates that the pop-up just opened.
|
|
99
|
+
*/
|
|
100
|
+
openChange: import("element-vir").DefineEvent<ShowPopUpResult | undefined>;
|
|
101
|
+
init: import("element-vir").DefineEvent<{
|
|
102
|
+
navController: NavController;
|
|
103
|
+
popUpManager: PopUpManager;
|
|
104
|
+
}>;
|
|
105
|
+
}, "vira-pop-up-trigger-disabled", "vira-pop-up-trigger-", readonly ["trigger", "popUp"], readonly []>;
|