q2-tecton-elements 1.17.1 → 1.19.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/cjs/click-elsewhere.cjs.entry.js +1 -1
- package/dist/cjs/{icons-e2bc9ee9.js → icons-afbdf88a.js} +1 -1
- package/dist/cjs/{index-afc50fbb.js → index-3518c78c.js} +9 -1
- package/dist/cjs/{index-0128397d.js → index-734296a7.js} +476 -271
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +9 -6
- package/dist/cjs/q2-badge_2.cjs.entry.js +46 -7
- package/dist/cjs/q2-btn_2.cjs.entry.js +31 -5
- package/dist/cjs/q2-calendar.cjs.entry.js +89 -62
- package/dist/cjs/q2-card.cjs.entry.js +17 -6
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +7 -3
- package/dist/cjs/q2-carousel.cjs.entry.js +196 -285
- package/dist/cjs/q2-chart-donut.cjs.entry.js +583 -504
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +9 -7
- package/dist/cjs/q2-checkbox.cjs.entry.js +17 -4
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +9 -3
- package/dist/cjs/q2-dropdown.cjs.entry.js +16 -5
- package/dist/cjs/q2-editable-field.cjs.entry.js +16 -6
- package/dist/cjs/q2-icon.cjs.entry.js +6 -4
- package/dist/cjs/q2-loading-element.cjs.entry.js +6 -2
- package/dist/cjs/q2-loc.cjs.entry.js +5 -3
- package/dist/cjs/q2-message.cjs.entry.js +4 -3
- package/dist/cjs/q2-month-picker.cjs.entry.js +149 -0
- package/dist/cjs/q2-optgroup.cjs.entry.js +6 -5
- package/dist/cjs/{q2-option-list.cjs.entry.js → q2-option-list_2.cjs.entry.js} +120 -23
- package/dist/cjs/q2-option.cjs.entry.js +12 -2
- package/dist/cjs/q2-pagination.cjs.entry.js +18 -4
- package/dist/cjs/q2-pill.cjs.entry.js +40 -20
- package/dist/cjs/q2-radio-group.cjs.entry.js +13 -6
- package/dist/cjs/q2-radio.cjs.entry.js +13 -8
- package/dist/cjs/q2-section.cjs.entry.js +9 -4
- package/dist/cjs/q2-select.cjs.entry.js +28 -21
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +8 -3
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +5 -4
- package/dist/cjs/q2-stepper.cjs.entry.js +9 -7
- package/dist/cjs/q2-tab-container.cjs.entry.js +14 -9
- package/dist/cjs/q2-tab-pane.cjs.entry.js +10 -2
- package/dist/cjs/q2-tag.cjs.entry.js +32 -17
- package/dist/cjs/q2-tecton-elements.cjs.js +3 -3
- package/dist/cjs/q2-textarea.cjs.entry.js +20 -4
- package/dist/cjs/q2-tooltip.cjs.entry.js +70 -14
- package/dist/cjs/{shapes-c1a60d46.js → shapes-aad2b98f.js} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +17 -2
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/click-elsewhere/index.js +18 -17
- package/dist/collection/components/q2-avatar/index.js +100 -92
- package/dist/collection/components/q2-avatar/styles.css +1 -1
- package/dist/collection/components/q2-badge/index.js +119 -111
- package/dist/collection/components/q2-badge/styles.css +1 -1
- package/dist/collection/components/q2-btn/index.js +351 -306
- package/dist/collection/components/q2-btn/styles.css +8 -7
- package/dist/collection/components/q2-calendar/index.js +565 -551
- package/dist/collection/components/q2-calendar/q2-month-picker.css +130 -0
- package/dist/collection/components/q2-calendar/q2-month-picker.js +242 -0
- package/dist/collection/components/q2-calendar/styles.css +1 -1
- package/dist/collection/components/q2-card/index.js +262 -244
- package/dist/collection/components/q2-card/styles.css +9 -2
- package/dist/collection/components/q2-carousel/index.js +249 -253
- package/dist/collection/components/q2-carousel/styles.css +1 -1
- package/dist/collection/components/q2-carousel-pane/index.js +108 -96
- package/dist/collection/components/q2-carousel-pane/styles.css +5 -4
- package/dist/collection/components/q2-chart-donut/index.js +350 -334
- package/dist/collection/components/q2-chart-donut/styles.css +3 -3
- package/dist/collection/components/q2-checkbox/index.js +296 -287
- package/dist/collection/components/q2-checkbox/styles.css +2 -2
- package/dist/collection/components/q2-checkbox-group/index.js +156 -152
- package/dist/collection/components/q2-checkbox-group/styles.css +1 -1
- package/dist/collection/components/q2-dropdown/index.js +255 -240
- package/dist/collection/components/q2-dropdown/styles.css +1 -1
- package/dist/collection/components/q2-dropdown-item/index.js +134 -123
- package/dist/collection/components/q2-dropdown-item/styles.css +12 -10
- package/dist/collection/components/q2-editable-field/index.js +300 -293
- package/dist/collection/components/q2-editable-field/styles.css +1 -1
- package/dist/collection/components/q2-icon/icons.js +358 -2158
- package/dist/collection/components/q2-icon/index.js +59 -49
- package/dist/collection/components/q2-icon/styles.css +1 -1
- package/dist/collection/components/q2-input/index.js +729 -705
- package/dist/collection/components/q2-input/styles.css +2 -2
- package/dist/collection/components/q2-loading/index.js +143 -132
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +85 -74
- package/dist/collection/components/q2-loading/skeleton/shapes.js +23 -36
- package/dist/collection/components/q2-loading/styles.css +1 -1
- package/dist/collection/components/q2-loc/index.js +49 -39
- package/dist/collection/components/q2-loc/styles.css +1 -1
- package/dist/collection/components/q2-message/index.js +101 -92
- package/dist/collection/components/q2-message/styles.css +1 -1
- package/dist/collection/components/q2-optgroup/index.js +64 -56
- package/dist/collection/components/q2-optgroup/styles.css +1 -1
- package/dist/collection/components/q2-option/index.js +244 -229
- package/dist/collection/components/q2-option/styles.css +5 -1
- package/dist/collection/components/q2-option-list/index.js +295 -319
- package/dist/collection/components/q2-option-list/styles.css +2 -50
- package/dist/collection/components/q2-pagination/index.js +183 -173
- package/dist/collection/components/q2-pagination/styles.css +1 -1
- package/dist/collection/components/q2-pill/index.js +276 -221
- package/dist/collection/components/q2-pill/styles.css +12 -7
- package/dist/collection/components/q2-popover/index.js +263 -0
- package/dist/collection/components/q2-popover/styles.css +205 -0
- package/dist/collection/components/q2-radio/index.js +233 -224
- package/dist/collection/components/q2-radio/styles.css +3 -3
- package/dist/collection/components/q2-radio-group/index.js +252 -244
- package/dist/collection/components/q2-radio-group/styles.css +1 -1
- package/dist/collection/components/q2-section/index.js +134 -125
- package/dist/collection/components/q2-section/styles.css +12 -1
- package/dist/collection/components/q2-select/index.js +395 -385
- package/dist/collection/components/q2-select/styles.css +1 -1
- package/dist/collection/components/q2-stepper/index.js +124 -126
- package/dist/collection/components/q2-stepper/styles.css +2 -1
- package/dist/collection/components/q2-stepper-pane/index.js +165 -149
- package/dist/collection/components/q2-stepper-pane/styles.css +1 -1
- package/dist/collection/components/q2-stepper-vertical/index.js +86 -85
- package/dist/collection/components/q2-stepper-vertical/styles.css +1 -1
- package/dist/collection/components/q2-tab-container/index.js +189 -184
- package/dist/collection/components/q2-tab-container/styles.css +1 -1
- package/dist/collection/components/q2-tab-pane/index.js +185 -166
- package/dist/collection/components/q2-tab-pane/styles.css +1 -1
- package/dist/collection/components/q2-tag/index.js +180 -125
- package/dist/collection/components/q2-tag/styles.css +2 -6
- package/dist/collection/components/q2-textarea/index.js +344 -327
- package/dist/collection/components/q2-textarea/styles.css +2 -2
- package/dist/collection/components/q2-tooltip/index.js +207 -104
- package/dist/collection/components/q2-tooltip/styles.css +63 -83
- package/dist/collection/components/tecton-tab-pane/index.js +287 -266
- package/dist/collection/components/tecton-tab-pane/styles.css +1 -1
- package/dist/collection/utils/index.js +9 -6
- package/dist/esm/click-elsewhere.entry.js +1 -1
- package/dist/esm/{icons-ed54e307.js → icons-78da5dd2.js} +1 -1
- package/dist/esm/{index-2ca8c93c.js → index-9c591682.js} +9 -2
- package/dist/esm/{index-6d5ed7cc.js → index-bb1c8c7f.js} +476 -271
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/q2-avatar.entry.js +9 -6
- package/dist/esm/q2-badge_2.entry.js +46 -7
- package/dist/esm/q2-btn_2.entry.js +31 -5
- package/dist/esm/q2-calendar.entry.js +89 -62
- package/dist/esm/q2-card.entry.js +17 -6
- package/dist/esm/q2-carousel-pane.entry.js +7 -3
- package/dist/esm/q2-carousel.entry.js +196 -285
- package/dist/esm/q2-chart-donut.entry.js +583 -504
- package/dist/esm/q2-checkbox-group.entry.js +9 -7
- package/dist/esm/q2-checkbox.entry.js +17 -4
- package/dist/esm/q2-dropdown-item.entry.js +9 -3
- package/dist/esm/q2-dropdown.entry.js +16 -5
- package/dist/esm/q2-editable-field.entry.js +16 -6
- package/dist/esm/q2-icon.entry.js +6 -4
- package/dist/esm/q2-loading-element.entry.js +6 -2
- package/dist/esm/q2-loc.entry.js +5 -3
- package/dist/esm/q2-message.entry.js +4 -3
- package/dist/esm/q2-month-picker.entry.js +145 -0
- package/dist/esm/q2-optgroup.entry.js +6 -5
- package/dist/esm/{q2-option-list.entry.js → q2-option-list_2.entry.js} +120 -24
- package/dist/esm/q2-option.entry.js +12 -2
- package/dist/esm/q2-pagination.entry.js +18 -4
- package/dist/esm/q2-pill.entry.js +40 -20
- package/dist/esm/q2-radio-group.entry.js +13 -6
- package/dist/esm/q2-radio.entry.js +13 -8
- package/dist/esm/q2-section.entry.js +9 -4
- package/dist/esm/q2-select.entry.js +28 -21
- package/dist/esm/q2-stepper-pane.entry.js +8 -3
- package/dist/esm/q2-stepper-vertical.entry.js +5 -4
- package/dist/esm/q2-stepper.entry.js +9 -7
- package/dist/esm/q2-tab-container.entry.js +14 -9
- package/dist/esm/q2-tab-pane.entry.js +10 -2
- package/dist/esm/q2-tag.entry.js +32 -17
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +20 -4
- package/dist/esm/q2-tooltip.entry.js +70 -14
- package/dist/esm/{shapes-c32e3ba2.js → shapes-62b8a431.js} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +17 -2
- package/dist/loader/package.json +1 -0
- package/dist/q2-tecton-elements/p-0ba564b1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-0fad9c5a.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-73154834.js → p-13a639cf.js} +1 -1
- package/dist/q2-tecton-elements/p-16c11d74.entry.js +1 -0
- package/dist/q2-tecton-elements/p-17e0cbf1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-18e095af.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2c9b1308.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2e832e42.entry.js +1 -0
- package/dist/q2-tecton-elements/p-315fdb74.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-318758d4.entry.js → p-444415b5.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-4d700630.entry.js +1 -0
- package/dist/q2-tecton-elements/p-4f0f45e7.entry.js +1 -0
- package/dist/q2-tecton-elements/p-54e792bd.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-41fcf343.js → p-5e374fbd.js} +1 -1
- package/dist/q2-tecton-elements/p-5f064e1e.entry.js +39 -0
- package/dist/q2-tecton-elements/p-692f2d09.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6e6b5b80.entry.js +1 -0
- package/dist/q2-tecton-elements/p-7e8f43d1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-8e380edf.entry.js +1 -0
- package/dist/q2-tecton-elements/p-926a3e80.js +2 -0
- package/dist/q2-tecton-elements/{p-93c00587.js → p-92e1faf8.js} +1 -1
- package/dist/q2-tecton-elements/p-9772b15f.entry.js +1 -0
- package/dist/q2-tecton-elements/p-97aa8423.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-17cffd7d.entry.js → p-a987402e.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-aaf42539.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ac674c20.entry.js +1 -0
- package/dist/q2-tecton-elements/p-b8b00394.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c444a60b.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c6c489fe.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ce015552.entry.js +1 -0
- package/dist/q2-tecton-elements/p-d464fccc.entry.js +1 -0
- package/dist/q2-tecton-elements/p-de164483.entry.js +1 -0
- package/dist/q2-tecton-elements/p-df91e954.entry.js +1 -0
- package/dist/q2-tecton-elements/p-e6d26f39.entry.js +1 -0
- package/dist/q2-tecton-elements/p-e8e113c2.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f1d06917.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f800fd1e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fb37e67e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fc134a5d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fe88e979.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ffb48ccc.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/helpers.js +6 -0
- package/dist/types/components/q2-btn/index.d.ts +1 -0
- package/dist/types/components/q2-calendar/q2-month-picker.d.ts +24 -0
- package/dist/types/components/q2-option-list/index.d.ts +1 -4
- package/dist/types/components/q2-pill/index.d.ts +10 -3
- package/dist/types/components/q2-popover/index.d.ts +26 -0
- package/dist/types/components/q2-tag/index.d.ts +8 -2
- package/dist/types/components/q2-tooltip/index.d.ts +12 -0
- package/dist/types/components.d.ts +203 -38
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/workspace/workspace/{tecton-production_release_1.17.x → Tecton_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -0
- package/package.json +6 -6
- package/dist/q2-tecton-elements/p-06865cf5.entry.js +0 -1
- package/dist/q2-tecton-elements/p-0d849ed4.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2a217895.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2b94ae62.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2faed36b.entry.js +0 -1
- package/dist/q2-tecton-elements/p-30a4fdfb.entry.js +0 -1
- package/dist/q2-tecton-elements/p-30f81b22.entry.js +0 -1
- package/dist/q2-tecton-elements/p-31070ab8.entry.js +0 -1
- package/dist/q2-tecton-elements/p-41c22a16.entry.js +0 -1
- package/dist/q2-tecton-elements/p-445e7c45.entry.js +0 -1
- package/dist/q2-tecton-elements/p-44bdaf52.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4c53713d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4da9b6b6.entry.js +0 -1
- package/dist/q2-tecton-elements/p-5acb7ec6.entry.js +0 -1
- package/dist/q2-tecton-elements/p-64605d17.entry.js +0 -1
- package/dist/q2-tecton-elements/p-64ca8c59.entry.js +0 -1
- package/dist/q2-tecton-elements/p-654fcd6b.entry.js +0 -1
- package/dist/q2-tecton-elements/p-661c2092.entry.js +0 -1
- package/dist/q2-tecton-elements/p-732dafd0.entry.js +0 -1
- package/dist/q2-tecton-elements/p-815c8a7d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-824a1d7c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-8543a0e1.entry.js +0 -1
- package/dist/q2-tecton-elements/p-916fd90b.entry.js +0 -1
- package/dist/q2-tecton-elements/p-94b3c534.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9725d55f.entry.js +0 -1
- package/dist/q2-tecton-elements/p-a45c6b65.entry.js +0 -1
- package/dist/q2-tecton-elements/p-a659d112.entry.js +0 -1
- package/dist/q2-tecton-elements/p-b4b8f85c.entry.js +0 -39
- package/dist/q2-tecton-elements/p-b595b415.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c5691700.js +0 -1
- package/dist/q2-tecton-elements/p-cde0cdff.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d3e4cc5d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d781e2d9.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d8d9e8eb.entry.js +0 -1
- package/dist/q2-tecton-elements/p-fbf23146.entry.js +0 -1
- package/dist/test/elements/q2-tag-test.js +0 -151
- package/dist/types/workspace/workspace/tecton-production_release_1.17.x/packages/q2-tecton-elements/.stencil/test/elements/q2-tag-test.d.ts +0 -1
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, Host, } from '@stencil/core';
|
|
2
2
|
import { isEventFromElement, overrideFocus } from 'src/utils';
|
|
3
3
|
export class Q2OptionList {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.role = 'listbox';
|
|
6
|
-
this.direction = 'down';
|
|
7
|
-
this.selectedOptions = [];
|
|
8
5
|
this.scheduledAfterRender = [];
|
|
9
6
|
/// Event Handlers ///
|
|
10
7
|
/* tslint:disable:cyclomatic-complexity */
|
|
@@ -86,7 +83,7 @@ export class Q2OptionList {
|
|
|
86
83
|
case 'Escape':
|
|
87
84
|
if (this.noSelect)
|
|
88
85
|
this.setActiveElement(null);
|
|
89
|
-
this.open
|
|
86
|
+
this.popoverState.emit({ open: false });
|
|
90
87
|
break;
|
|
91
88
|
default:
|
|
92
89
|
if (customSearch)
|
|
@@ -114,6 +111,16 @@ export class Q2OptionList {
|
|
|
114
111
|
}
|
|
115
112
|
this.selectOption(target.value);
|
|
116
113
|
};
|
|
114
|
+
this.role = 'listbox';
|
|
115
|
+
this.direction = 'down';
|
|
116
|
+
this.customSearch = undefined;
|
|
117
|
+
this.noSelect = undefined;
|
|
118
|
+
this.align = undefined;
|
|
119
|
+
this.selectedOptions = [];
|
|
120
|
+
this.multiple = undefined;
|
|
121
|
+
this.disabled = undefined;
|
|
122
|
+
this.type = undefined;
|
|
123
|
+
this.hasOptions = undefined;
|
|
117
124
|
}
|
|
118
125
|
/// LifeCycle Hooks ///
|
|
119
126
|
componentWillLoad() {
|
|
@@ -122,6 +129,7 @@ export class Q2OptionList {
|
|
|
122
129
|
componentDidLoad() {
|
|
123
130
|
overrideFocus(this.hostElement);
|
|
124
131
|
this.checkOptions();
|
|
132
|
+
this.selectedOptionsUpdated();
|
|
125
133
|
}
|
|
126
134
|
componentDidRender() {
|
|
127
135
|
this.scheduledAfterRender.forEach(fn => fn());
|
|
@@ -168,7 +176,7 @@ export class Q2OptionList {
|
|
|
168
176
|
if (this.disabled)
|
|
169
177
|
return;
|
|
170
178
|
this.activeIndex = activeIndex;
|
|
171
|
-
this.open
|
|
179
|
+
this.popoverState.emit({ open: true });
|
|
172
180
|
this.setActiveOption();
|
|
173
181
|
this.setFocusedOption();
|
|
174
182
|
this.scheduledAfterRender.push(() => {
|
|
@@ -202,8 +210,6 @@ export class Q2OptionList {
|
|
|
202
210
|
});
|
|
203
211
|
}
|
|
204
212
|
setActiveOption() {
|
|
205
|
-
if (!this.open)
|
|
206
|
-
return;
|
|
207
213
|
const activeIndex = this.activeIndex;
|
|
208
214
|
this.allOptions.forEach((element, elementIndex) => {
|
|
209
215
|
element.active = activeIndex === elementIndex;
|
|
@@ -256,7 +262,7 @@ export class Q2OptionList {
|
|
|
256
262
|
this.change.emit({ value: selectedValue, values });
|
|
257
263
|
if (multiple)
|
|
258
264
|
return;
|
|
259
|
-
this.open
|
|
265
|
+
this.popoverState.emit({ open: false });
|
|
260
266
|
}
|
|
261
267
|
adjustActiveOptionAndScroll(numToAdd) {
|
|
262
268
|
this.activeIndex += numToAdd;
|
|
@@ -292,24 +298,17 @@ export class Q2OptionList {
|
|
|
292
298
|
this.updateSingleOptionAttrs();
|
|
293
299
|
}
|
|
294
300
|
}
|
|
295
|
-
openChanged(newValue) {
|
|
296
|
-
this.optionListState.emit({ open: newValue });
|
|
297
|
-
}
|
|
298
301
|
/// Listeners ///
|
|
299
302
|
delegateFocus(event) {
|
|
300
303
|
if (!isEventFromElement(event, this.hostElement))
|
|
301
304
|
return;
|
|
302
|
-
this.open
|
|
305
|
+
this.popoverState.emit({ open: true });
|
|
303
306
|
this.setDefaultActiveElement();
|
|
304
307
|
}
|
|
305
308
|
handleClick(event) {
|
|
306
309
|
event.stopPropagation();
|
|
307
310
|
}
|
|
308
311
|
/// Public Methods ///
|
|
309
|
-
async toggle() {
|
|
310
|
-
const isOpen = !this.open;
|
|
311
|
-
this.open = isOpen;
|
|
312
|
-
}
|
|
313
312
|
async setDefaultActiveElement() {
|
|
314
313
|
this.activeIndex = this.getDefaultActiveIndex();
|
|
315
314
|
this.setActiveOption();
|
|
@@ -323,7 +322,7 @@ export class Q2OptionList {
|
|
|
323
322
|
async handleExternalKeydown(event) {
|
|
324
323
|
const keysThatTriggerOpen = ['ArrowDown', 'ArrowUp', 'PageDown', 'PageUp', 'Home', 'End'];
|
|
325
324
|
if (keysThatTriggerOpen.includes(event.key)) {
|
|
326
|
-
this.open
|
|
325
|
+
this.popoverState.emit({ open: true });
|
|
327
326
|
}
|
|
328
327
|
const keysThatTriggerDefault = ['ArrowDown', 'ArrowUp'];
|
|
329
328
|
if (keysThatTriggerDefault.includes(event.key)) {
|
|
@@ -336,328 +335,305 @@ export class Q2OptionList {
|
|
|
336
335
|
}
|
|
337
336
|
/// DOM ///
|
|
338
337
|
render() {
|
|
339
|
-
return (h(Host, null,
|
|
340
|
-
h("div", { class: "content", ref: el => (this.contentElement = el), onFocusout: this.focusoutHandler },
|
|
341
|
-
h("div", { class: "options", role: this.type || 'listbox', onKeyDown: this.keydownHandler, onClick: this.clickHandler },
|
|
342
|
-
h("slot", null)))));
|
|
338
|
+
return (h(Host, null, h("div", { class: "content", ref: el => (this.contentElement = el), onFocusout: this.focusoutHandler }, h("div", { class: "options", role: this.type || 'listbox', onKeyDown: this.keydownHandler, onClick: this.clickHandler }, h("slot", null)))));
|
|
343
339
|
}
|
|
344
340
|
static get is() { return "q2-option-list"; }
|
|
345
341
|
static get encapsulation() { return "shadow"; }
|
|
346
|
-
static get originalStyleUrls() {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
"
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
"original": "'up' | 'down'",
|
|
376
|
-
"resolved": "\"down\" | \"up\"",
|
|
377
|
-
"references": {}
|
|
378
|
-
},
|
|
379
|
-
"required": false,
|
|
380
|
-
"optional": false,
|
|
381
|
-
"docs": {
|
|
382
|
-
"tags": [],
|
|
383
|
-
"text": ""
|
|
384
|
-
},
|
|
385
|
-
"attribute": "direction",
|
|
386
|
-
"reflect": true,
|
|
387
|
-
"defaultValue": "'down'"
|
|
388
|
-
},
|
|
389
|
-
"open": {
|
|
390
|
-
"type": "boolean",
|
|
391
|
-
"mutable": true,
|
|
392
|
-
"complexType": {
|
|
393
|
-
"original": "boolean",
|
|
394
|
-
"resolved": "boolean",
|
|
395
|
-
"references": {}
|
|
396
|
-
},
|
|
397
|
-
"required": false,
|
|
398
|
-
"optional": false,
|
|
399
|
-
"docs": {
|
|
400
|
-
"tags": [],
|
|
401
|
-
"text": ""
|
|
402
|
-
},
|
|
403
|
-
"attribute": "open",
|
|
404
|
-
"reflect": true
|
|
405
|
-
},
|
|
406
|
-
"customSearch": {
|
|
407
|
-
"type": "boolean",
|
|
408
|
-
"mutable": false,
|
|
409
|
-
"complexType": {
|
|
410
|
-
"original": "boolean",
|
|
411
|
-
"resolved": "boolean",
|
|
412
|
-
"references": {}
|
|
413
|
-
},
|
|
414
|
-
"required": false,
|
|
415
|
-
"optional": false,
|
|
416
|
-
"docs": {
|
|
417
|
-
"tags": [],
|
|
418
|
-
"text": ""
|
|
419
|
-
},
|
|
420
|
-
"attribute": "custom-search",
|
|
421
|
-
"reflect": true
|
|
422
|
-
},
|
|
423
|
-
"noSelect": {
|
|
424
|
-
"type": "boolean",
|
|
425
|
-
"mutable": false,
|
|
426
|
-
"complexType": {
|
|
427
|
-
"original": "boolean",
|
|
428
|
-
"resolved": "boolean",
|
|
429
|
-
"references": {}
|
|
430
|
-
},
|
|
431
|
-
"required": false,
|
|
432
|
-
"optional": false,
|
|
433
|
-
"docs": {
|
|
434
|
-
"tags": [],
|
|
435
|
-
"text": ""
|
|
436
|
-
},
|
|
437
|
-
"attribute": "no-select",
|
|
438
|
-
"reflect": true
|
|
439
|
-
},
|
|
440
|
-
"align": {
|
|
441
|
-
"type": "string",
|
|
442
|
-
"mutable": false,
|
|
443
|
-
"complexType": {
|
|
444
|
-
"original": "'left' | 'right'",
|
|
445
|
-
"resolved": "\"left\" | \"right\"",
|
|
446
|
-
"references": {}
|
|
447
|
-
},
|
|
448
|
-
"required": false,
|
|
449
|
-
"optional": false,
|
|
450
|
-
"docs": {
|
|
451
|
-
"tags": [],
|
|
452
|
-
"text": ""
|
|
453
|
-
},
|
|
454
|
-
"attribute": "align",
|
|
455
|
-
"reflect": true
|
|
456
|
-
},
|
|
457
|
-
"selectedOptions": {
|
|
458
|
-
"type": "unknown",
|
|
459
|
-
"mutable": true,
|
|
460
|
-
"complexType": {
|
|
461
|
-
"original": "IOptionValue[]",
|
|
462
|
-
"resolved": "IOptionValue[]",
|
|
463
|
-
"references": {
|
|
464
|
-
"IOptionValue": {
|
|
465
|
-
"location": "local"
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
},
|
|
469
|
-
"required": false,
|
|
470
|
-
"optional": false,
|
|
471
|
-
"docs": {
|
|
472
|
-
"tags": [],
|
|
473
|
-
"text": ""
|
|
474
|
-
},
|
|
475
|
-
"defaultValue": "[]"
|
|
476
|
-
},
|
|
477
|
-
"multiple": {
|
|
478
|
-
"type": "boolean",
|
|
479
|
-
"mutable": false,
|
|
480
|
-
"complexType": {
|
|
481
|
-
"original": "boolean",
|
|
482
|
-
"resolved": "boolean",
|
|
483
|
-
"references": {}
|
|
484
|
-
},
|
|
485
|
-
"required": false,
|
|
486
|
-
"optional": false,
|
|
487
|
-
"docs": {
|
|
488
|
-
"tags": [],
|
|
489
|
-
"text": ""
|
|
490
|
-
},
|
|
491
|
-
"attribute": "multiple",
|
|
492
|
-
"reflect": true
|
|
493
|
-
},
|
|
494
|
-
"disabled": {
|
|
495
|
-
"type": "boolean",
|
|
496
|
-
"mutable": false,
|
|
497
|
-
"complexType": {
|
|
498
|
-
"original": "boolean",
|
|
499
|
-
"resolved": "boolean",
|
|
500
|
-
"references": {}
|
|
342
|
+
static get originalStyleUrls() {
|
|
343
|
+
return {
|
|
344
|
+
"$": ["styles.scss"]
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
static get styleUrls() {
|
|
348
|
+
return {
|
|
349
|
+
"$": ["styles.css"]
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
static get properties() {
|
|
353
|
+
return {
|
|
354
|
+
"role": {
|
|
355
|
+
"type": "string",
|
|
356
|
+
"mutable": false,
|
|
357
|
+
"complexType": {
|
|
358
|
+
"original": "'listbox' | 'menu'",
|
|
359
|
+
"resolved": "\"listbox\" | \"menu\"",
|
|
360
|
+
"references": {}
|
|
361
|
+
},
|
|
362
|
+
"required": false,
|
|
363
|
+
"optional": false,
|
|
364
|
+
"docs": {
|
|
365
|
+
"tags": [],
|
|
366
|
+
"text": ""
|
|
367
|
+
},
|
|
368
|
+
"attribute": "role",
|
|
369
|
+
"reflect": true,
|
|
370
|
+
"defaultValue": "'listbox'"
|
|
501
371
|
},
|
|
502
|
-
"
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
"
|
|
506
|
-
|
|
372
|
+
"direction": {
|
|
373
|
+
"type": "string",
|
|
374
|
+
"mutable": false,
|
|
375
|
+
"complexType": {
|
|
376
|
+
"original": "'up' | 'down'",
|
|
377
|
+
"resolved": "\"down\" | \"up\"",
|
|
378
|
+
"references": {}
|
|
379
|
+
},
|
|
380
|
+
"required": false,
|
|
381
|
+
"optional": false,
|
|
382
|
+
"docs": {
|
|
383
|
+
"tags": [],
|
|
384
|
+
"text": ""
|
|
385
|
+
},
|
|
386
|
+
"attribute": "direction",
|
|
387
|
+
"reflect": true,
|
|
388
|
+
"defaultValue": "'down'"
|
|
507
389
|
},
|
|
508
|
-
"
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
"
|
|
517
|
-
"
|
|
390
|
+
"customSearch": {
|
|
391
|
+
"type": "boolean",
|
|
392
|
+
"mutable": false,
|
|
393
|
+
"complexType": {
|
|
394
|
+
"original": "boolean",
|
|
395
|
+
"resolved": "boolean",
|
|
396
|
+
"references": {}
|
|
397
|
+
},
|
|
398
|
+
"required": false,
|
|
399
|
+
"optional": false,
|
|
400
|
+
"docs": {
|
|
401
|
+
"tags": [],
|
|
402
|
+
"text": ""
|
|
403
|
+
},
|
|
404
|
+
"attribute": "custom-search",
|
|
405
|
+
"reflect": true
|
|
518
406
|
},
|
|
519
|
-
"
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
"
|
|
523
|
-
|
|
407
|
+
"noSelect": {
|
|
408
|
+
"type": "boolean",
|
|
409
|
+
"mutable": false,
|
|
410
|
+
"complexType": {
|
|
411
|
+
"original": "boolean",
|
|
412
|
+
"resolved": "boolean",
|
|
413
|
+
"references": {}
|
|
414
|
+
},
|
|
415
|
+
"required": false,
|
|
416
|
+
"optional": false,
|
|
417
|
+
"docs": {
|
|
418
|
+
"tags": [],
|
|
419
|
+
"text": ""
|
|
420
|
+
},
|
|
421
|
+
"attribute": "no-select",
|
|
422
|
+
"reflect": true
|
|
524
423
|
},
|
|
525
|
-
"
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
"
|
|
540
|
-
"
|
|
424
|
+
"align": {
|
|
425
|
+
"type": "string",
|
|
426
|
+
"mutable": false,
|
|
427
|
+
"complexType": {
|
|
428
|
+
"original": "'left' | 'right'",
|
|
429
|
+
"resolved": "\"left\" | \"right\"",
|
|
430
|
+
"references": {}
|
|
431
|
+
},
|
|
432
|
+
"required": false,
|
|
433
|
+
"optional": false,
|
|
434
|
+
"docs": {
|
|
435
|
+
"tags": [],
|
|
436
|
+
"text": ""
|
|
437
|
+
},
|
|
438
|
+
"attribute": "align",
|
|
439
|
+
"reflect": true
|
|
541
440
|
},
|
|
542
|
-
"
|
|
543
|
-
"
|
|
544
|
-
"
|
|
545
|
-
"
|
|
546
|
-
"
|
|
547
|
-
|
|
441
|
+
"selectedOptions": {
|
|
442
|
+
"type": "unknown",
|
|
443
|
+
"mutable": true,
|
|
444
|
+
"complexType": {
|
|
445
|
+
"original": "IOptionValue[]",
|
|
446
|
+
"resolved": "IOptionValue[]",
|
|
447
|
+
"references": {
|
|
448
|
+
"IOptionValue": {
|
|
449
|
+
"location": "local"
|
|
450
|
+
}
|
|
548
451
|
}
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
"docs": {
|
|
558
|
-
"tags": [],
|
|
559
|
-
"text": ""
|
|
452
|
+
},
|
|
453
|
+
"required": false,
|
|
454
|
+
"optional": false,
|
|
455
|
+
"docs": {
|
|
456
|
+
"tags": [],
|
|
457
|
+
"text": ""
|
|
458
|
+
},
|
|
459
|
+
"defaultValue": "[]"
|
|
560
460
|
},
|
|
561
|
-
"
|
|
562
|
-
"
|
|
563
|
-
"
|
|
564
|
-
"
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
"toggle": {
|
|
569
|
-
"complexType": {
|
|
570
|
-
"signature": "() => Promise<void>",
|
|
571
|
-
"parameters": [],
|
|
572
|
-
"references": {
|
|
573
|
-
"Promise": {
|
|
574
|
-
"location": "global"
|
|
575
|
-
}
|
|
461
|
+
"multiple": {
|
|
462
|
+
"type": "boolean",
|
|
463
|
+
"mutable": false,
|
|
464
|
+
"complexType": {
|
|
465
|
+
"original": "boolean",
|
|
466
|
+
"resolved": "boolean",
|
|
467
|
+
"references": {}
|
|
576
468
|
},
|
|
577
|
-
"
|
|
469
|
+
"required": false,
|
|
470
|
+
"optional": false,
|
|
471
|
+
"docs": {
|
|
472
|
+
"tags": [],
|
|
473
|
+
"text": ""
|
|
474
|
+
},
|
|
475
|
+
"attribute": "multiple",
|
|
476
|
+
"reflect": true
|
|
578
477
|
},
|
|
579
|
-
"
|
|
580
|
-
"
|
|
581
|
-
"
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
"signature": "() => Promise<void>",
|
|
587
|
-
"parameters": [],
|
|
588
|
-
"references": {
|
|
589
|
-
"Promise": {
|
|
590
|
-
"location": "global"
|
|
591
|
-
}
|
|
478
|
+
"disabled": {
|
|
479
|
+
"type": "boolean",
|
|
480
|
+
"mutable": false,
|
|
481
|
+
"complexType": {
|
|
482
|
+
"original": "boolean",
|
|
483
|
+
"resolved": "boolean",
|
|
484
|
+
"references": {}
|
|
592
485
|
},
|
|
593
|
-
"
|
|
486
|
+
"required": false,
|
|
487
|
+
"optional": false,
|
|
488
|
+
"docs": {
|
|
489
|
+
"tags": [],
|
|
490
|
+
"text": ""
|
|
491
|
+
},
|
|
492
|
+
"attribute": "disabled",
|
|
493
|
+
"reflect": true
|
|
594
494
|
},
|
|
595
|
-
"
|
|
596
|
-
"
|
|
597
|
-
"
|
|
495
|
+
"type": {
|
|
496
|
+
"type": "string",
|
|
497
|
+
"mutable": false,
|
|
498
|
+
"complexType": {
|
|
499
|
+
"original": "'menu' | 'listbox'",
|
|
500
|
+
"resolved": "\"listbox\" | \"menu\"",
|
|
501
|
+
"references": {}
|
|
502
|
+
},
|
|
503
|
+
"required": false,
|
|
504
|
+
"optional": false,
|
|
505
|
+
"docs": {
|
|
506
|
+
"tags": [],
|
|
507
|
+
"text": ""
|
|
508
|
+
},
|
|
509
|
+
"attribute": "type",
|
|
510
|
+
"reflect": false
|
|
598
511
|
}
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
static get states() {
|
|
515
|
+
return {
|
|
516
|
+
"hasOptions": {}
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
static get events() {
|
|
520
|
+
return [{
|
|
521
|
+
"method": "change",
|
|
522
|
+
"name": "change",
|
|
523
|
+
"bubbles": true,
|
|
524
|
+
"cancelable": true,
|
|
525
|
+
"composed": true,
|
|
526
|
+
"docs": {
|
|
527
|
+
"tags": [],
|
|
528
|
+
"text": ""
|
|
529
|
+
},
|
|
530
|
+
"complexType": {
|
|
531
|
+
"original": "{ value: string; values: IOptionValue[] }",
|
|
532
|
+
"resolved": "{ value: string; values: IOptionValue[]; }",
|
|
533
|
+
"references": {
|
|
534
|
+
"IOptionValue": {
|
|
535
|
+
"location": "local"
|
|
536
|
+
}
|
|
610
537
|
}
|
|
538
|
+
}
|
|
539
|
+
}, {
|
|
540
|
+
"method": "popoverState",
|
|
541
|
+
"name": "popoverState",
|
|
542
|
+
"bubbles": true,
|
|
543
|
+
"cancelable": true,
|
|
544
|
+
"composed": true,
|
|
545
|
+
"docs": {
|
|
546
|
+
"tags": [],
|
|
547
|
+
"text": ""
|
|
548
|
+
},
|
|
549
|
+
"complexType": {
|
|
550
|
+
"original": "{ open: boolean }",
|
|
551
|
+
"resolved": "{ open: boolean; }",
|
|
552
|
+
"references": {}
|
|
553
|
+
}
|
|
554
|
+
}];
|
|
555
|
+
}
|
|
556
|
+
static get methods() {
|
|
557
|
+
return {
|
|
558
|
+
"setDefaultActiveElement": {
|
|
559
|
+
"complexType": {
|
|
560
|
+
"signature": "() => Promise<void>",
|
|
561
|
+
"parameters": [],
|
|
562
|
+
"references": {
|
|
563
|
+
"Promise": {
|
|
564
|
+
"location": "global"
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
"return": "Promise<void>"
|
|
611
568
|
},
|
|
612
|
-
"
|
|
569
|
+
"docs": {
|
|
570
|
+
"text": "",
|
|
571
|
+
"tags": []
|
|
572
|
+
}
|
|
613
573
|
},
|
|
614
|
-
"
|
|
615
|
-
"
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
}],
|
|
626
|
-
"references": {
|
|
627
|
-
"Promise": {
|
|
628
|
-
"location": "global"
|
|
574
|
+
"setActiveElement": {
|
|
575
|
+
"complexType": {
|
|
576
|
+
"signature": "(index: number) => Promise<void>",
|
|
577
|
+
"parameters": [{
|
|
578
|
+
"tags": [],
|
|
579
|
+
"text": ""
|
|
580
|
+
}],
|
|
581
|
+
"references": {
|
|
582
|
+
"Promise": {
|
|
583
|
+
"location": "global"
|
|
584
|
+
}
|
|
629
585
|
},
|
|
630
|
-
"
|
|
631
|
-
"location": "global"
|
|
632
|
-
}
|
|
586
|
+
"return": "Promise<void>"
|
|
633
587
|
},
|
|
634
|
-
"
|
|
588
|
+
"docs": {
|
|
589
|
+
"text": "",
|
|
590
|
+
"tags": []
|
|
591
|
+
}
|
|
635
592
|
},
|
|
636
|
-
"
|
|
637
|
-
"
|
|
638
|
-
|
|
593
|
+
"handleExternalKeydown": {
|
|
594
|
+
"complexType": {
|
|
595
|
+
"signature": "(event: KeyboardEvent) => Promise<void>",
|
|
596
|
+
"parameters": [{
|
|
597
|
+
"tags": [],
|
|
598
|
+
"text": ""
|
|
599
|
+
}],
|
|
600
|
+
"references": {
|
|
601
|
+
"Promise": {
|
|
602
|
+
"location": "global"
|
|
603
|
+
},
|
|
604
|
+
"KeyboardEvent": {
|
|
605
|
+
"location": "global"
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
"return": "Promise<void>"
|
|
609
|
+
},
|
|
610
|
+
"docs": {
|
|
611
|
+
"text": "",
|
|
612
|
+
"tags": []
|
|
613
|
+
}
|
|
639
614
|
}
|
|
640
|
-
}
|
|
641
|
-
}
|
|
615
|
+
};
|
|
616
|
+
}
|
|
642
617
|
static get elementRef() { return "hostElement"; }
|
|
643
|
-
static get watchers() {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
618
|
+
static get watchers() {
|
|
619
|
+
return [{
|
|
620
|
+
"propName": "selectedOptions",
|
|
621
|
+
"methodName": "selectedOptionsUpdated"
|
|
622
|
+
}];
|
|
623
|
+
}
|
|
624
|
+
static get listeners() {
|
|
625
|
+
return [{
|
|
626
|
+
"name": "focus",
|
|
627
|
+
"method": "delegateFocus",
|
|
628
|
+
"target": undefined,
|
|
629
|
+
"capture": false,
|
|
630
|
+
"passive": false
|
|
631
|
+
}, {
|
|
632
|
+
"name": "click",
|
|
633
|
+
"method": "handleClick",
|
|
634
|
+
"target": undefined,
|
|
635
|
+
"capture": false,
|
|
636
|
+
"passive": false
|
|
637
|
+
}];
|
|
638
|
+
}
|
|
663
639
|
}
|