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,16 +1,13 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import { o as overrideFocus, i as isEventFromElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-bb1c8c7f.js';
|
|
2
|
+
import { o as overrideFocus, i as isEventFromElement } from './index-9c591682.js';
|
|
3
3
|
|
|
4
|
-
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-
|
|
4
|
+
const stylesCss$1 = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{position:relative;width:100%;display:block;line-height:var(--tct-option-list-line-height, var(--t-option-list-line-height, var(--app-line-height, 1.428571429em)))}.content{text-align:start}:host([is-sizeable]) .content{display:block;height:auto}";
|
|
5
5
|
|
|
6
6
|
const Q2OptionList = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.change = createEvent(this, "change", 7);
|
|
10
|
-
this.
|
|
11
|
-
this.role = 'listbox';
|
|
12
|
-
this.direction = 'down';
|
|
13
|
-
this.selectedOptions = [];
|
|
10
|
+
this.popoverState = createEvent(this, "popoverState", 7);
|
|
14
11
|
this.scheduledAfterRender = [];
|
|
15
12
|
/// Event Handlers ///
|
|
16
13
|
/* tslint:disable:cyclomatic-complexity */
|
|
@@ -92,7 +89,7 @@ const Q2OptionList = class {
|
|
|
92
89
|
case 'Escape':
|
|
93
90
|
if (this.noSelect)
|
|
94
91
|
this.setActiveElement(null);
|
|
95
|
-
this.open
|
|
92
|
+
this.popoverState.emit({ open: false });
|
|
96
93
|
break;
|
|
97
94
|
default:
|
|
98
95
|
if (customSearch)
|
|
@@ -120,6 +117,16 @@ const Q2OptionList = class {
|
|
|
120
117
|
}
|
|
121
118
|
this.selectOption(target.value);
|
|
122
119
|
};
|
|
120
|
+
this.role = 'listbox';
|
|
121
|
+
this.direction = 'down';
|
|
122
|
+
this.customSearch = undefined;
|
|
123
|
+
this.noSelect = undefined;
|
|
124
|
+
this.align = undefined;
|
|
125
|
+
this.selectedOptions = [];
|
|
126
|
+
this.multiple = undefined;
|
|
127
|
+
this.disabled = undefined;
|
|
128
|
+
this.type = undefined;
|
|
129
|
+
this.hasOptions = undefined;
|
|
123
130
|
}
|
|
124
131
|
/// LifeCycle Hooks ///
|
|
125
132
|
componentWillLoad() {
|
|
@@ -128,6 +135,7 @@ const Q2OptionList = class {
|
|
|
128
135
|
componentDidLoad() {
|
|
129
136
|
overrideFocus(this.hostElement);
|
|
130
137
|
this.checkOptions();
|
|
138
|
+
this.selectedOptionsUpdated();
|
|
131
139
|
}
|
|
132
140
|
componentDidRender() {
|
|
133
141
|
this.scheduledAfterRender.forEach(fn => fn());
|
|
@@ -174,7 +182,7 @@ const Q2OptionList = class {
|
|
|
174
182
|
if (this.disabled)
|
|
175
183
|
return;
|
|
176
184
|
this.activeIndex = activeIndex;
|
|
177
|
-
this.open
|
|
185
|
+
this.popoverState.emit({ open: true });
|
|
178
186
|
this.setActiveOption();
|
|
179
187
|
this.setFocusedOption();
|
|
180
188
|
this.scheduledAfterRender.push(() => {
|
|
@@ -208,8 +216,6 @@ const Q2OptionList = class {
|
|
|
208
216
|
});
|
|
209
217
|
}
|
|
210
218
|
setActiveOption() {
|
|
211
|
-
if (!this.open)
|
|
212
|
-
return;
|
|
213
219
|
const activeIndex = this.activeIndex;
|
|
214
220
|
this.allOptions.forEach((element, elementIndex) => {
|
|
215
221
|
element.active = activeIndex === elementIndex;
|
|
@@ -262,7 +268,7 @@ const Q2OptionList = class {
|
|
|
262
268
|
this.change.emit({ value: selectedValue, values });
|
|
263
269
|
if (multiple)
|
|
264
270
|
return;
|
|
265
|
-
this.open
|
|
271
|
+
this.popoverState.emit({ open: false });
|
|
266
272
|
}
|
|
267
273
|
adjustActiveOptionAndScroll(numToAdd) {
|
|
268
274
|
this.activeIndex += numToAdd;
|
|
@@ -298,24 +304,17 @@ const Q2OptionList = class {
|
|
|
298
304
|
this.updateSingleOptionAttrs();
|
|
299
305
|
}
|
|
300
306
|
}
|
|
301
|
-
openChanged(newValue) {
|
|
302
|
-
this.optionListState.emit({ open: newValue });
|
|
303
|
-
}
|
|
304
307
|
/// Listeners ///
|
|
305
308
|
delegateFocus(event) {
|
|
306
309
|
if (!isEventFromElement(event, this.hostElement))
|
|
307
310
|
return;
|
|
308
|
-
this.open
|
|
311
|
+
this.popoverState.emit({ open: true });
|
|
309
312
|
this.setDefaultActiveElement();
|
|
310
313
|
}
|
|
311
314
|
handleClick(event) {
|
|
312
315
|
event.stopPropagation();
|
|
313
316
|
}
|
|
314
317
|
/// Public Methods ///
|
|
315
|
-
async toggle() {
|
|
316
|
-
const isOpen = !this.open;
|
|
317
|
-
this.open = isOpen;
|
|
318
|
-
}
|
|
319
318
|
async setDefaultActiveElement() {
|
|
320
319
|
this.activeIndex = this.getDefaultActiveIndex();
|
|
321
320
|
this.setActiveOption();
|
|
@@ -329,7 +328,7 @@ const Q2OptionList = class {
|
|
|
329
328
|
async handleExternalKeydown(event) {
|
|
330
329
|
const keysThatTriggerOpen = ['ArrowDown', 'ArrowUp', 'PageDown', 'PageUp', 'Home', 'End'];
|
|
331
330
|
if (keysThatTriggerOpen.includes(event.key)) {
|
|
332
|
-
this.open
|
|
331
|
+
this.popoverState.emit({ open: true });
|
|
333
332
|
}
|
|
334
333
|
const keysThatTriggerDefault = ['ArrowDown', 'ArrowUp'];
|
|
335
334
|
if (keysThatTriggerDefault.includes(event.key)) {
|
|
@@ -346,10 +345,107 @@ const Q2OptionList = class {
|
|
|
346
345
|
}
|
|
347
346
|
get hostElement() { return getElement(this); }
|
|
348
347
|
static get watchers() { return {
|
|
349
|
-
"selectedOptions": ["selectedOptionsUpdated"]
|
|
348
|
+
"selectedOptions": ["selectedOptionsUpdated"]
|
|
349
|
+
}; }
|
|
350
|
+
};
|
|
351
|
+
Q2OptionList.style = stylesCss$1;
|
|
352
|
+
|
|
353
|
+
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:inline-flex;width:100%}.container{display:block;overflow:hidden;opacity:0;height:0;position:absolute;visibility:hidden;background-color:var(--tct-popover-background-color, var(--t-popover-background-color, var(--app-white, #ffffff)));color:var(--tct-popover-text-color, var(--t-popover-text-color, var(--t-text, #4d4d4d)));z-index:var(--tct-popover-z-index, var(--t-popover-z-index, 100));width:max-content;min-width:var(--tct-popover-min-width, var(--t-popover-min-width, 135px));box-shadow:var(--tct-popover-box-shadow, var(--t-popover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))));text-align:start;left:0;transition:opacity var(--app-tween-1, 0.2s ease);border-radius:var(--tct-popover-border-radius, var(--t-popover-border-radius, 0));max-height:var(--comp-pop-max-height);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.container::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.container::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.container::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}:host([block]) .container{left:unset;right:unset;width:100%}:host([align=right]) .container{right:0;text-align:end;left:unset}:host([open]) .container{display:block;height:auto;overflow:auto;opacity:1;visibility:visible}.container.up{bottom:var(--comp-pop-offset)}click-elsewhere{position:relative;display:block}.content{height:auto}";
|
|
354
|
+
|
|
355
|
+
const Q2Popover = class {
|
|
356
|
+
constructor(hostRef) {
|
|
357
|
+
registerInstance(this, hostRef);
|
|
358
|
+
this.popoverStateChanged = createEvent(this, "popoverStateChanged", 7);
|
|
359
|
+
this.privateDirection = 'down';
|
|
360
|
+
this.direction = undefined;
|
|
361
|
+
this.align = undefined;
|
|
362
|
+
this.open = undefined;
|
|
363
|
+
this.block = undefined;
|
|
364
|
+
this.minHeight = undefined;
|
|
365
|
+
this.controlElement = undefined;
|
|
366
|
+
}
|
|
367
|
+
/// Lifecycle hooks ///
|
|
368
|
+
componentDidLoad() {
|
|
369
|
+
if (this.open)
|
|
370
|
+
this.determinePopDirection();
|
|
371
|
+
}
|
|
372
|
+
componentWillRender() {
|
|
373
|
+
if (this.containerElement && this.containerElement && this.open)
|
|
374
|
+
this.determinePopDirection();
|
|
375
|
+
}
|
|
376
|
+
/// Methods ///
|
|
377
|
+
async toggle() {
|
|
378
|
+
this.open = !this.open;
|
|
379
|
+
}
|
|
380
|
+
/// Watchers ///
|
|
381
|
+
openChanged(open) {
|
|
382
|
+
this.popoverStateChanged.emit({ open });
|
|
383
|
+
}
|
|
384
|
+
/// Listeners ///
|
|
385
|
+
popoverStateHandler(event) {
|
|
386
|
+
const { detail: { open }, } = event;
|
|
387
|
+
if (open === this.open)
|
|
388
|
+
return;
|
|
389
|
+
this.open = open;
|
|
390
|
+
event.stopPropagation();
|
|
391
|
+
}
|
|
392
|
+
/// Helpers ///
|
|
393
|
+
determinePopDirection() {
|
|
394
|
+
var _a;
|
|
395
|
+
const { containerElement, contentElement, direction, controlElement } = this;
|
|
396
|
+
if (containerElement)
|
|
397
|
+
containerElement.style.maxHeight = null;
|
|
398
|
+
if (direction) {
|
|
399
|
+
return (this.privateDirection = direction);
|
|
400
|
+
}
|
|
401
|
+
const contentHeight = contentElement.clientHeight;
|
|
402
|
+
const { top: topOffset, height } = (_a = controlElement === null || controlElement === void 0 ? void 0 : controlElement.getBoundingClientRect()) !== null && _a !== void 0 ? _a : {
|
|
403
|
+
top: 0,
|
|
404
|
+
height: 0,
|
|
405
|
+
};
|
|
406
|
+
const bottomOffset = window.innerHeight - topOffset - height;
|
|
407
|
+
const canShowFullSizeBelow = bottomOffset > contentHeight;
|
|
408
|
+
const canShowFullSizeAbove = contentHeight <= topOffset;
|
|
409
|
+
// Prefer full size above or below
|
|
410
|
+
if (canShowFullSizeBelow) {
|
|
411
|
+
return (this.privateDirection = 'down');
|
|
412
|
+
}
|
|
413
|
+
else if (canShowFullSizeAbove || !this.minHeight) {
|
|
414
|
+
this.determinePopOffset();
|
|
415
|
+
return (this.privateDirection = 'up');
|
|
416
|
+
}
|
|
417
|
+
// If full size will not fit and minHeight is set, then make as tall as possible
|
|
418
|
+
const { minHeight = 150 } = this;
|
|
419
|
+
const displayBuffer = 5;
|
|
420
|
+
const canShowSmallBelow = bottomOffset >= minHeight + displayBuffer;
|
|
421
|
+
if (canShowSmallBelow) {
|
|
422
|
+
const maxBelowHeight = Math.max(bottomOffset - displayBuffer, minHeight);
|
|
423
|
+
containerElement.style.setProperty('--comp-pop-max-height', `${maxBelowHeight}px`);
|
|
424
|
+
return (this.privateDirection = 'down');
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
const maxAboveHeight = Math.max(topOffset, minHeight);
|
|
428
|
+
containerElement.style.setProperty('--comp-pop-max-height', `${maxAboveHeight}px`);
|
|
429
|
+
this.determinePopOffset();
|
|
430
|
+
return (this.privateDirection = 'up');
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
determinePopOffset() {
|
|
434
|
+
var _a;
|
|
435
|
+
const { controlElement, containerElement } = this;
|
|
436
|
+
const dropdownHeight = (_a = controlElement === null || controlElement === void 0 ? void 0 : controlElement.getBoundingClientRect().height) !== null && _a !== void 0 ? _a : 0;
|
|
437
|
+
containerElement.style.setProperty('--comp-pop-offset', `${dropdownHeight}px`);
|
|
438
|
+
}
|
|
439
|
+
/// DOM ///
|
|
440
|
+
render() {
|
|
441
|
+
const containerClasses = ['container', this.privateDirection];
|
|
442
|
+
return (h("div", { ref: el => (this.containerElement = el), class: containerClasses.join(' '), role: "menu" }, h("div", { ref: el => (this.contentElement = el), class: "content" }, h("slot", null))));
|
|
443
|
+
}
|
|
444
|
+
get hostElement() { return getElement(this); }
|
|
445
|
+
static get watchers() { return {
|
|
350
446
|
"open": ["openChanged"]
|
|
351
447
|
}; }
|
|
352
448
|
};
|
|
353
|
-
|
|
449
|
+
Q2Popover.style = stylesCss;
|
|
354
450
|
|
|
355
|
-
export { Q2OptionList as q2_option_list };
|
|
451
|
+
export { Q2OptionList as q2_option_list, Q2Popover as q2_popover };
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-bb1c8c7f.js';
|
|
2
2
|
|
|
3
|
-
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-
|
|
3
|
+
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{--comp-padding:0 var(--app-scale-2x, 10px);--comp-selected-icon-size:var(--tct-option-selected-icon-size, var(--t-option-selected-icon-size, var(--tct-scale-3, var(--app-scale-3x, 15px))));padding:var(--tct-option-padding, var(--t-option-padding, var(--comp-padding)));min-height:44px;align-items:center;cursor:pointer;grid-template-columns:var(--comp-selected-icon-size) 1fr;align-items:center;grid-template-areas:\"icon content\";gap:var(--tct-scale-1, var(--app-scale-1x, 5px))}:host([multiline]){--comp-padding:var(--app-scale-2, 10px) var(--app-scale-2, 10px);--comp-selected-icon-size:var(--tct-option-selected-icon-size, var(--t-option-selected-icon-size, 26px))}:host([_no-select]){grid-template-columns:1fr;grid-template-areas:\"content\"}:host([aria-disabled]){cursor:not-allowed;opacity:var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4));pointer-events:none}:host([aria-hidden]){display:none}:host(:not([hidden]):not([aria-hidden])){display:grid}:host(:not([aria-disabled]):hover),:host([active]),:host(:focus){background-color:var(--tct-option-active-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2)))))}:host(:focus){border:1px solid #33b4ff}q2-icon{grid-area:icon;--tct-icon-size:var(--comp-selected-icon-size)}.content{display:block;grid-area:content}:host(:not([multiline])) .content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}";
|
|
4
4
|
|
|
5
5
|
const Q2Option = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
this.role = 'option';
|
|
9
9
|
this.tabindex = '-1';
|
|
10
|
+
this.display = undefined;
|
|
11
|
+
this.value = undefined;
|
|
12
|
+
this.disabled = undefined;
|
|
13
|
+
this.optionId = undefined;
|
|
14
|
+
this.disabledGroup = undefined;
|
|
15
|
+
this.selected = undefined;
|
|
16
|
+
this.hidden = undefined;
|
|
17
|
+
this.multiline = undefined;
|
|
18
|
+
this.active = undefined;
|
|
19
|
+
this.noSelect = undefined;
|
|
10
20
|
this._multiSelectHidden = false;
|
|
11
21
|
}
|
|
12
22
|
componentWillLoad() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
2
|
-
import { o as overrideFocus, i as isEventFromElement, l as loc, n as nextPaint } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-bb1c8c7f.js';
|
|
2
|
+
import { o as overrideFocus, i as isEventFromElement, l as loc, n as nextPaint } from './index-9c591682.js';
|
|
3
3
|
|
|
4
|
-
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-
|
|
4
|
+
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{text-align:right;display:block}:host([hidden]){display:none}.container{display:inline-flex;column-gap:var(--tct-pagination-column-gap, var(--t-pagination-column-gap, var(--app-scale-2x, 10px)));align-items:center;height:var(--tct-pagination-height, var(--t-pagination-height, 44px))}.btn-group{display:flex;gap:var(--tct-pagination-btn-gap, var(--t-pagination-btn-gap, 0))}.description,.controls{white-space:nowrap}.controls{display:grid;grid-template-columns:auto 50px auto;align-items:center;gap:var(--tct-pagination-controls-gap, var(--t-pagination-controls-gap, var(--app-scale-1x, 5px)))}.controls[hidden]{display:none}.input-wrapper{height:var(--tct-pagination-height, var(--t-pagination-height, 44px));display:flex;align-items:center}q2-icon{--tct-icon-size:var(--tct-pagination-icon-size, var(--t-pagination-icon-size, 12px));color:var(--tct-pagination-icon-color, var(--t-pagination-icon-color, var(--t-text, #4d4d4d)))}q2-input{--tct-input-margin-top:0;--tct-input-margin-bottom:0;--tct-input-height:var(--tct-pagination-input-height, var(--t-pagination-input-height, 30px));--tct-input-min-height:var(--tct-input-height);--tct-input-align:center}";
|
|
5
5
|
|
|
6
6
|
const Q2Pagination = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -22,6 +22,14 @@ const Q2Pagination = class {
|
|
|
22
22
|
}
|
|
23
23
|
this.change.emit({ page });
|
|
24
24
|
};
|
|
25
|
+
this.recordType = undefined;
|
|
26
|
+
this.perPage = undefined;
|
|
27
|
+
this.total = undefined;
|
|
28
|
+
this.page = undefined;
|
|
29
|
+
this.pages = undefined;
|
|
30
|
+
this.recordsOnly = undefined;
|
|
31
|
+
this.pagesOnly = undefined;
|
|
32
|
+
this.isSmall = undefined;
|
|
25
33
|
}
|
|
26
34
|
////////// LIFECYCLE HOOKS ////////
|
|
27
35
|
componentDidLoad() {
|
|
@@ -103,7 +111,13 @@ const Q2Pagination = class {
|
|
|
103
111
|
range: currentRange,
|
|
104
112
|
recordType: recordType.toLowerCase(),
|
|
105
113
|
total: total.toLocaleString(),
|
|
106
|
-
})), h("div", { class: "btn-group" }, h("q2-btn", { label:
|
|
114
|
+
})), h("div", { class: "btn-group" }, h("q2-btn", { label: loc('tecton.element.pagination.goToFirstPage'), disabled: onFirstPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { type: "chevron-double-left" })), h("q2-btn", { label: loc('tecton.element.pagination.goToPages', {
|
|
115
|
+
next: page - 1,
|
|
116
|
+
total: totalPages,
|
|
117
|
+
}), disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { type: "chevron-left" }))), h("div", { class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => this.handlePageChange(event.detail.value), "test-id": "pageInput", current: "page", ref: el => (this.inputField = el) })), h("span", { "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { class: "btn-group" }, h("q2-btn", { label: loc('tecton.element.pagination.goToPages', {
|
|
118
|
+
next: page + 1,
|
|
119
|
+
total: totalPages,
|
|
120
|
+
}), disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { type: "chevron-right" })), h("q2-btn", { label: "tecton.element.pagination.goToLastPage", disabled: onLastPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { type: "chevron-double-right" })))));
|
|
107
121
|
}
|
|
108
122
|
get hostElement() { return getElement(this); }
|
|
109
123
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h,
|
|
2
|
-
import { o as overrideFocus, l as loc, i as isEventFromElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-bb1c8c7f.js';
|
|
2
|
+
import { r as resizeIframe, o as overrideFocus, l as loc, i as isEventFromElement } from './index-9c591682.js';
|
|
3
3
|
|
|
4
|
-
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-
|
|
4
|
+
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:inline-block;position:relative;line-height:0}:host(:not(:last-child)){margin-inline-end:var(--tct-pill-margin, var(--t-pill-margin, var(--app-scale-2x, 10px)))}q2-popover,.btn-wrapper{--comp-pill-min-height:var(--tct-pill-min-height, var(--t-pill-min-height, 44px));--comp-pill-btn-height:var(--tct-pill-btn-height, var(--t-pill-btn-height, 30px))}.btn-wrapper{--comp-pill-btn-border-width:var(--tct-pill-btn-border-width, var(--t-pill-btn-border-width, 2px));--comp-close-size:0px;--comp-btn-background:var(--tct-pill-btn-background, var(--t-pill-btn-background, var(--t-base, #ffffff)));--compt-hover-btn-background:var(--tct-pill-hover-btn-background, var(--t-pill-hover-btn-background, var(--t-gray-13, #e6e6e6)));--comp-btn-padding:var(--tct-pill-btn-padding-inline, var(--t-pill-btn-padding-inline, var(--app-scale-3x, 15px)));--comp-btn-color:var(--tct-pill-btn-color, var(--t-pill-btn-color, var(--t-gray-3, #262626)));--comp-active-btn-color:var(--comp-btn-background);--comp-active-btn-background:var(--tct-pill-active-btn-background, var(--t-pill-active-btn-background, var(--t-gray-7, #666666)));--comp-active-btn-border-color:var(--tct-pill-active-btn-border-color, var(--t-pill-active-btn-border-color, var(--t-gray-7, #666666)));--comp-hover-active-btn-background:var(--tct-pill-active-btn-background, var(--t-pill-active-btn-background, var(--t-gray-6, #4d4d4d)));--comp-hover-active-btn-border-color:var(--tct-pill-active-btn-background, var(--t-pill-active-btn-background, var(--t-gray-6, #4d4d4d)));position:relative}:host(:not(:empty)) .btn-wrapper,.btn-wrapper.has-icon{--comp-close-size:var(--comp-pill-btn-height)}:host([active]) .btn-wrapper{--comp-btn-color:var(--tct-pill-active-btn-color, var(--t-pill-active-btn-color, var(--t-base, #ffffff)))}:host([theme=primary]) .btn-wrapper{--comp-active-btn-background:var(--t-primary-l5, #61c4ff);--comp-active-btn-color:var(--t-primary-text, #ffffff);--comp-active-btn-border-color:var(--t-primary-l5, #61c4ff);--comp-hover-active-btn-background:var(--t-primary-l3, #21acff);--comp-hover-active-btn-border-color:var(--t-primary-l3, #21acff)}:host([theme=secondary]) .btn-wrapper{--comp-active-btn-background:var(--t-secondary-l5, #d9e1e6);--comp-active-btn-color:var(--t-secondary-text, #141414);--comp-active-btn-border-color:var(--t-secondary-l5, #d9e1e6);--comp-hover-active-btn-background:var(--t-secondary-l3, #c9d5db);--comp-hover-active-btn-border-color:var(--t-secondary-l3, #c9d5db)}:host([theme=tertiary]) .btn-wrapper{--comp-active-btn-background:var(--t-tertiary-l5, #f4fafe);--comp-active-btn-color:var(--t-tertiary-text, #141414);--comp-active-btn-border-color:var(--t-tertiary-l5, #f4fafe);--comp-hover-active-btn-background:var(--t-tertiary-l3, #eff8fd);--comp-hover-active-btn-border-color:var(--t-tertiary-l3, #eff8fd)}.btn-height-wrapper{height:var(--comp-pill-min-height);display:flex;align-items:center;cursor:pointer}.btn-height-wrapper:focus{box-shadow:none}:host([disabled]) .btn-height-wrapper{cursor:not-allowed}.btn-close,.btn-primary{cursor:pointer;height:var(--comp-pill-btn-height);border-style:solid;border-radius:var(--tct-pill-btn-border-radius, var(--t-pill-btn-border-radius, 30px));transition-property:background, color, padding, width, opacity;transition:var(--tct-pill-btn-tween, var(--t-pill-btn-tween, var(--app-tween-1, 0.2s ease)))}:host([disabled]) .btn-close,:host([disabled]) .btn-primary,:host([disabled]) q2-icon{opacity:var(--tct-pill-disabled-opacity, var(--t-pill-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))));cursor:not-allowed}.btn-primary{background:var(--comp-btn-background);border-width:var(--comp-pill-btn-border-width);border-color:var(--tct-pill-btn-border-color, var(--t-pill-btn-border-color, var(--t-gray-9, #999999)));padding-inline:var(--comp-btn-padding);padding-right:calc(var(--comp-btn-padding) + var(--comp-close-size));font-size:var(--tct-pill-btn-font-size, var(--t-pill-btn-font-size, var(--app-font-size, 14px)));color:var(--comp-btn-color);display:block;width:100%;text-align:start}.btn-primary:focus,.btn-primary:hover{background:var(--comp-hover-btn-background)}:host(:not(:empty)) .btn-primary,.has-icon .btn-primary{padding-right:calc(var(--tct-pill-icon-gap, var(--t-pill-icon-gap, var(--app-scale-1x, 5px))) + var(--comp-close-size))}.has-options .btn-primary{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:var(--tct-pill-max-width, var(--t-pill-max-width, 200px))}:host([active]) .btn-primary{background:var(--comp-active-btn-background);border-color:var(--comp-active-btn-border-color);color:var(--comp-active-btn-color)}:host([active]) .btn-primary:focus,:host([active]) .btn-primary:hover{background:var(--comp-hover-active-btn-background);border-color:var(--comp-hover-active-btn-border-color)}.btn-close{background:transparent;border-color:transparent;border-width:var(--comp-pill-btn-border-width);width:var(--comp-close-size);height:var(--comp-close-size);padding:0;border:0;display:inline-flex;justify-content:center;align-items:center;position:absolute;right:0;top:50%;transform:translateY(-50%);opacity:0}:host([active]) .btn-close{color:var(--comp-active-btn-color)}:host(:not(:empty)) .btn-close,.has-icon .btn-close{opacity:1}q2-icon{width:var(--tct-pill-icon-size, var(--t-pill-icon-size, 14px));height:var(--tct-pill-icon-size, var(--t-pill-icon-size, 14px));transition-property:transform;transition:var(--tct-pill-btn-tween, var(--t-pill-btn-tween, var(--app-tween-1, 0.2s ease)))}div.btn-close{pointer-events:none}:host([open]) div.btn-close q2-icon{transform:rotate(180deg)}:host([active]) button.btn-close:focus,:host([active]) button.btn-close:hover{background:var(--tct-pill-hover-close-btn-background, var(--t-pill-hover-close-btn-background, var(--t-top-a1, rgba(13, 13, 13, 0.35))));border-color:var(--tct-pill-hover-close-btn-border-color, var(--t-pill-hover-close-btn-border-color, var(--t-top-a1, rgba(13, 13, 13, 0.35))))}q2-popover{position:relative;top:calc((var(--comp-pill-min-height) - var(--comp-pill-btn-height)) / 2 * -1)}";
|
|
5
5
|
|
|
6
6
|
const Q2Pill = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.change = createEvent(this, "change", 7);
|
|
10
|
-
this.selectedOptions = [];
|
|
11
10
|
this.scheduledAfterRender = [];
|
|
11
|
+
this.activateFirstOption = false;
|
|
12
12
|
/// Helpers ///
|
|
13
13
|
this.determineHasOptions = () => {
|
|
14
14
|
const hasOptions = !!this.hostElement.querySelectorAll('q2-option').length;
|
|
@@ -20,14 +20,16 @@ const Q2Pill = class {
|
|
|
20
20
|
this.open = false;
|
|
21
21
|
this.primaryBtn.focus();
|
|
22
22
|
this.change.emit({ value: null, values: [], active: false });
|
|
23
|
+
this.scheduledAfterRender.push(resizeIframe);
|
|
23
24
|
};
|
|
24
25
|
/// Event Handlers ///
|
|
25
|
-
this.handleClick = (event) => {
|
|
26
|
+
this.handleClick = async (event) => {
|
|
26
27
|
event.stopPropagation();
|
|
27
28
|
if (this.disabled)
|
|
28
29
|
return;
|
|
29
30
|
if (this.hasOptions) {
|
|
30
|
-
this.
|
|
31
|
+
this.activateFirstOption = false;
|
|
32
|
+
await this.popoverElement.toggle();
|
|
31
33
|
}
|
|
32
34
|
else {
|
|
33
35
|
const { value, label } = this;
|
|
@@ -44,9 +46,11 @@ const Q2Pill = class {
|
|
|
44
46
|
this.handleKeydown = (event) => {
|
|
45
47
|
if (!this.hasOptions || this.disabled)
|
|
46
48
|
return;
|
|
49
|
+
this.activateFirstOption = true;
|
|
47
50
|
this.optionList.handleExternalKeydown(event);
|
|
48
51
|
};
|
|
49
52
|
this.handleChange = event => {
|
|
53
|
+
event.stopPropagation();
|
|
50
54
|
if (!this.hasOptions)
|
|
51
55
|
return;
|
|
52
56
|
const { value, values } = event.detail;
|
|
@@ -57,20 +61,29 @@ const Q2Pill = class {
|
|
|
57
61
|
}
|
|
58
62
|
this.change.emit({ value, values, active: isActive });
|
|
59
63
|
};
|
|
60
|
-
this.handleFocusout = (event) => {
|
|
61
|
-
const relatedTarget = event.relatedTarget;
|
|
62
|
-
if (Array.from(this.hostElement.children).includes(relatedTarget))
|
|
63
|
-
return;
|
|
64
|
-
if (relatedTarget && !(event.relatedTarget instanceof HTMLElement))
|
|
65
|
-
return;
|
|
66
|
-
if (relatedTarget && relatedTarget.closest('.btn-height-wrapper'))
|
|
67
|
-
return;
|
|
68
|
-
this.optionList.open = false;
|
|
69
|
-
};
|
|
70
64
|
this.handleWrapperClick = () => {
|
|
71
65
|
this.primaryBtn.focus();
|
|
72
66
|
this.primaryBtn.click();
|
|
73
67
|
};
|
|
68
|
+
this.onClickElsewhere = (event) => {
|
|
69
|
+
const target = event.target;
|
|
70
|
+
if (target.localName === 'click-elsewhere') {
|
|
71
|
+
event.stopPropagation();
|
|
72
|
+
this.popoverElement.open = false;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
this.disabled = undefined;
|
|
76
|
+
this.active = undefined;
|
|
77
|
+
this.open = undefined;
|
|
78
|
+
this.multiple = undefined;
|
|
79
|
+
this.maxLength = undefined;
|
|
80
|
+
this.label = undefined;
|
|
81
|
+
this.value = undefined;
|
|
82
|
+
this.theme = undefined;
|
|
83
|
+
this.selectedOptions = [];
|
|
84
|
+
this.popoverMinHeight = 150;
|
|
85
|
+
this.popoverDirection = undefined;
|
|
86
|
+
this.hasOptions = undefined;
|
|
74
87
|
}
|
|
75
88
|
/// LifeCycle Hooks ///
|
|
76
89
|
componentWillLoad() {
|
|
@@ -111,10 +124,17 @@ const Q2Pill = class {
|
|
|
111
124
|
return;
|
|
112
125
|
this.primaryBtn.focus();
|
|
113
126
|
}
|
|
114
|
-
|
|
115
|
-
this.open
|
|
116
|
-
|
|
127
|
+
popoverStateHandler({ detail: { open } }) {
|
|
128
|
+
if (this.open !== open)
|
|
129
|
+
this.open = open;
|
|
130
|
+
if (open && this.activateFirstOption) {
|
|
131
|
+
this.optionList.focus();
|
|
132
|
+
this.activateFirstOption = false;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
this.optionList.setActiveElement(null);
|
|
117
136
|
this.primaryBtn.focus();
|
|
137
|
+
}
|
|
118
138
|
}
|
|
119
139
|
/// DOM ///
|
|
120
140
|
generateIcon() {
|
|
@@ -131,7 +151,7 @@ const Q2Pill = class {
|
|
|
131
151
|
wrapperClassNames.push('has-icon');
|
|
132
152
|
if (hasOptions)
|
|
133
153
|
wrapperClassNames.push('has-options');
|
|
134
|
-
return (h(
|
|
154
|
+
return (h("click-elsewhere", { onChange: this.onClickElsewhere }, h("div", { class: wrapperClassNames.join(' ') }, h("div", { class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { class: "btn-primary", "test-id": "btn-control", type: "button", ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, disabled: this.disabled, "aria-selected": !hasOptions && active ? 'true' : 'false', "aria-roledescription": !hasOptions && 'filter', "aria-controls": hasOptions && 'option-list', "aria-haspopup": hasOptions && 'true', "aria-expanded": (hasOptions && `${!!open}`) || undefined, "aria-label": this.maxLength && this.buttonContent }, this.truncatedButtonContent, !hasOptions && active && h("span", { class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.generateIcon()), this.hasOptions && (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.primaryBtnWrapper, open: this.open, minHeight: this.popoverMinHeight, direction: this.popoverDirection }, h("q2-option-list", { ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions }, h("slot", null))))));
|
|
135
155
|
}
|
|
136
156
|
get hostElement() { return getElement(this); }
|
|
137
157
|
};
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-
|
|
2
|
-
import { c as createGuid, o as overrideFocus, i as isEventFromElement, l as loc } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-bb1c8c7f.js';
|
|
2
|
+
import { c as createGuid, o as overrideFocus, i as isEventFromElement, l as loc } from './index-9c591682.js';
|
|
3
3
|
|
|
4
|
-
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-
|
|
4
|
+
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{margin-top:var(--tct-scale-2, var(--app-scale-2x, 10px))}fieldset{padding:0;margin:0;border:0;position:relative}.label-row{display:grid;grid-template-columns:1fr 24px;grid-template-areas:\"label icon\";gap:var(--app-scale-1x, 5px)}.label-row q2-icon{grid-area:icon;margin-top:-2px;margin-bottom:-2px}.group-legend{font-weight:600}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--t-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px))));color:var(--tct-input-label-optional-font-color, var(--t-input-label-optional-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77)))));font-size:var(--tct-input-label-optional-font-size, var(--t-input-label-optional-font-size, 12px));font-weight:var(--tct-input-label-optional-font-weight, var(--t-input-label-optional-font-weight, 400))}.tile-container,.tile-container .options-container{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;flex-grow:1}.options-container{--comp-default-margin:var(--app-scale-1x, 5px) 0;--comp-options-margin:var(--tct-radio-group-options-margin, var(--t-radio-group-options-margin, var(--comp-default-margin, 5px 0)));margin:var(--comp-options-margin);padding:var(--tct-radio-group-options-padding, var(--t-radio-group-options-padding, var(--app-scale-1x, 5px)));border-width:1px;border-color:transparent;border-style:solid;border-radius:var(--tct-border-radius-1, var(--app-border-radius-1, 2px))}:host([has-error]) .options-container{border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #c30000))}:host([has-error=false]) .options-container{border-color:transparent}.tile-container.left{justify-content:start}.tile-container.right{justify-content:end}.tile-container .options-container{gap:var(--tct-radio-group-tile-gap, var(--t-radio-group-tile-gap, var(--app-scale-2x, 10px)));justify-content:inherit}";
|
|
5
5
|
|
|
6
6
|
const Q2RadioGroup = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.change = createEvent(this, "change", 7);
|
|
10
|
-
this.disabled = false;
|
|
11
|
-
this.tileAlignment = 'center';
|
|
12
|
-
this.hasError = false;
|
|
13
10
|
this.id = `radio-group-${createGuid()}`;
|
|
14
11
|
this.onMutationObserved = () => {
|
|
15
12
|
this.valueUpdated(this.value);
|
|
@@ -24,6 +21,16 @@ const Q2RadioGroup = class {
|
|
|
24
21
|
return;
|
|
25
22
|
this.change.emit({ value: event.detail.value });
|
|
26
23
|
};
|
|
24
|
+
this.label = undefined;
|
|
25
|
+
this.value = undefined;
|
|
26
|
+
this.disabled = false;
|
|
27
|
+
this.name = undefined;
|
|
28
|
+
this.optional = undefined;
|
|
29
|
+
this.readonly = undefined;
|
|
30
|
+
this.tileLayout = undefined;
|
|
31
|
+
this.tileAlignment = 'center';
|
|
32
|
+
this.hasError = false;
|
|
33
|
+
this.tilelayout = undefined;
|
|
27
34
|
}
|
|
28
35
|
get radioElements() {
|
|
29
36
|
return Array.from(this.hostElement.querySelectorAll('q2-radio'));
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
2
|
-
import { c as createGuid, h as handleAriaLabel, o as overrideFocus, l as loc } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-bb1c8c7f.js';
|
|
2
|
+
import { c as createGuid, h as handleAriaLabel, o as overrideFocus, l as loc } from './index-9c591682.js';
|
|
3
3
|
|
|
4
|
-
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-
|
|
4
|
+
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}.radio-container{margin-top:var(--tct-radio-margin-vertical, var(--tct-scale-2, 10px));margin-right:var(--tct-radio-margin-horizontal, var(--tct-scale-3, 15px));margin-bottom:var(--tct-radio-margin-vertical, var(--tct-scale-2, 10px))}.radio-container label[for]{font-weight:var(--tct-radio-font-weight, var(--tct-checkbox-font-weight, 400));align-items:center;cursor:pointer;margin-right:1rem;display:grid;grid-template-columns:18px 1fr;gap:var(--tct-scale-1, var(--app-scale-1x, 5px))}.radio-container svg{border-radius:50%;transition:box-shadow var(--tct-tween-1, var(--app-tween-1, 0.2s ease));outline:0;width:100%}.radio-container circle:nth-child(1){stroke-width:2;stroke:var(--tct-radio-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc)))))}.radio-container input:focus+label svg{box-shadow:var(--const-double-focus-ring)}.radio-container input:focus+label circle:nth-child(1){stroke:var(--tct-radio-focus-stroke-color, var(--tct-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e)))}.radio-container input:checked+label circle:nth-child(1){background-color:var(--tct-radio-checked-bg, transparent);stroke:var(--tct-radio-checked-stroke-color, var(--tct-radio-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))))}.radio-container input:checked+label .label-content{font-weight:var(--tct-checkbox-selected-font-weight, 600);letter-spacing:var(--tct-checkbox-selected-letter-spacing, 0.25)}.radio-container input:checked+label circle:nth-child(2){fill:var(--tct-radio-checked-fill, var(--tct-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e)))}.radio-tile{flex-basis:100px;flex-grow:0;flex-wrap:wrap}.radio-tile label[for]{align-items:center;border-radius:3px;border:2px solid var(--tct-radio-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc)))));cursor:pointer;display:block;padding:10px;position:relative;text-align:center;transition:border-color var(--tct-tween-1, var(--app-tween-1, 0.2s ease));white-space:nowrap}.radio-tile input:focus+label,.radio-tile input:focus:checked+label{border-color:#0079c1;box-shadow:var(--const-double-focus-ring), var(--tct-global-focus, 0 0 0 2px #33b4ff)}.radio-tile input:checked+label{border-color:var(--tct-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e));box-shadow:inset 0 0 0 2px #ffffff}.radio-tile input:checked+label:after{border-bottom-width:3px;border-bottom:5px solid #0079c1;border-left-width:5px;border-left:8px solid transparent;border-right-width:5px;border-right:8px solid transparent;bottom:0;content:\"\";height:0;left:50%;margin-left:-5px;position:absolute;width:0}input:disabled+label{cursor:not-allowed;opacity:var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))}";
|
|
5
5
|
|
|
6
6
|
const Q2Radio = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.change = createEvent(this, "change", 7);
|
|
10
|
-
this.disabled = false;
|
|
11
|
-
this.checked = false;
|
|
12
|
-
this.groupDisabled = false;
|
|
13
|
-
this.groupReadonly = false;
|
|
14
|
-
this.groupTileLayout = false;
|
|
15
10
|
this.id = `radio-${createGuid()}`;
|
|
16
11
|
this.isLoaded = false;
|
|
17
12
|
this.inputChange = (event) => {
|
|
@@ -24,6 +19,16 @@ const Q2Radio = class {
|
|
|
24
19
|
this.checked = event.target.checked;
|
|
25
20
|
}
|
|
26
21
|
};
|
|
22
|
+
this.label = undefined;
|
|
23
|
+
this.hideLabel = undefined;
|
|
24
|
+
this.value = undefined;
|
|
25
|
+
this.disabled = false;
|
|
26
|
+
this.checked = false;
|
|
27
|
+
this.name = undefined;
|
|
28
|
+
this.ariaLabel = undefined;
|
|
29
|
+
this.groupDisabled = false;
|
|
30
|
+
this.groupReadonly = false;
|
|
31
|
+
this.groupTileLayout = false;
|
|
27
32
|
}
|
|
28
33
|
////////// LIFECYCLE HOOKS ////////
|
|
29
34
|
componentWillLoad() {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
2
|
-
import { r as resizeIframe, o as overrideFocus, i as isEventFromElement, n as nextPaint, l as loc } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-bb1c8c7f.js';
|
|
2
|
+
import { r as resizeIframe, o as overrideFocus, i as isEventFromElement, n as nextPaint, l as loc } from './index-9c591682.js';
|
|
3
3
|
|
|
4
|
-
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-
|
|
4
|
+
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block;background-color:var(--tct-section-background-color, var(--t-section-background-color, var(--tct-section-bg, var(--t-section-bg, var(--app-white, #ffffff)))));color:var(--tct-section-font-color, var(--t-section-font-color, var(--t-text, #4d4d4d)));border-radius:var(--tct-section-border-radius, var(--t-section-border-radius, var(--app-border-radius-1, 3px)));margin:var(--tct-section-margin, var(--t-section-margin, var(--app-scale-3x, 15px)))}@media screen and (max-width: 767px){:host{--comp-default-margin:var(--app-scale-3x, 15px) 0;margin:var(--tct-section-margin, var(--t-section-margin, var(--comp-default-margin)))}}.wrapper{--comp-tween:var(--tct-section-tween, var(--t-section-tween, var(--app-tween-1, 0.2s ease)));--comp-default-wrapper-padding:var(--app-scale-1x, 5px) 0;display:block;padding:var(--tct-section-wrapper-padding, var(--t-section-wrapper-padding, var(--comp-default-wrapper-padding)))}.wrapper:hover{box-shadow:var(--tct-section-wrapper-hover-box-shadow, var(--t-section-wrapper-hover-box-shadow, inherit))}:host([collapsible]) .wrapper{--comp-tween:var(--tct-section-tween, var(--t-section-tween, var(--app-tween-2, 0.4s ease)))}header{--comp-default-header-padding:0 var(--app-scale-3x, 15px);padding:var(--tct-section-header-padding, var(--t-section-header-padding, var(--comp-default-header-padding)));display:flex}header.has-header{min-height:var(--tct-section-header-min-height, var(--t-section-header-min-height, 44px))}.header-content{flex:1 1 100%;min-width:0;align-self:center}:host([collapsible]) .header-content{cursor:pointer}.title{margin:0;font-size:20px;font-weight:600;text-transform:uppercase;letter-spacing:0.5px}q2-icon{transition:transform var(--comp-tween)}:host(:not([expanded])) q2-icon{transform:rotate(180deg)}.content-wrapper{height:auto}:host([collapsible]) .content-wrapper{transition:height var(--comp-tween);overflow:hidden}:host([collapsible]) :host(:not([expanded])) .content-wrapper{height:0;padding-top:0}:host([collapsible][expanded]) .content-wrapper{overflow:unset;animation:show-overflow 1s}.content{--comp-default-content-padding:var(--app-scale-2x, 10px) var(--app-scale-3x, 15px);padding:var(--tct-section-content-padding, var(--t-section-content-padding, var(--comp-default-content-padding)))}.content:focus{box-shadow:none}:host([collapsible]) :host(:not([expanded])) .content{visibility:hidden}@keyframes show-overflow{from{overflow:hidden}}";
|
|
5
5
|
|
|
6
6
|
const Q2Section = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.change = createEvent(this, "change", 7);
|
|
10
|
-
this.hasYieldedHeader = false;
|
|
11
10
|
this.titleId = 'title';
|
|
12
11
|
this.contentId = 'content';
|
|
13
12
|
/// Event Handlers ///
|
|
@@ -70,6 +69,12 @@ const Q2Section = class {
|
|
|
70
69
|
}
|
|
71
70
|
this.contentSlotMutationObserver.disconnect();
|
|
72
71
|
};
|
|
72
|
+
this.label = undefined;
|
|
73
|
+
this.collapsible = undefined;
|
|
74
|
+
this.noCollapseIcon = undefined;
|
|
75
|
+
this.expanded = undefined;
|
|
76
|
+
this.contentHeight = undefined;
|
|
77
|
+
this.hasYieldedHeader = false;
|
|
73
78
|
}
|
|
74
79
|
componentWillLoad() {
|
|
75
80
|
this.onHeaderSlotChange();
|