q2-tecton-elements 1.23.0 → 1.25.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/action-sheet-4b366e9a.js +84 -0
- package/dist/cjs/{index-0648c2ec.js → index-dc92e71f.js} +32 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +218 -0
- package/dist/cjs/q2-badge_2.cjs.entry.js +46 -17
- package/dist/cjs/q2-btn_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +2 -4
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +1 -1
- package/dist/cjs/q2-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup_2.cjs.entry.js +93 -0
- package/dist/cjs/q2-option-list_2.cjs.entry.js +226 -86
- package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +57 -18
- package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +148 -409
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
- package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +21 -7
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/q2-action-sheet/index.js +345 -0
- package/dist/collection/components/q2-action-sheet/styles.css +215 -0
- package/dist/collection/components/q2-calendar/index.js +2 -4
- package/dist/collection/components/q2-checkbox/index.js +2 -2
- package/dist/collection/components/q2-dropdown/index.js +1 -1
- package/dist/collection/components/q2-input/index.js +46 -17
- package/dist/collection/components/q2-loading/index.js +1 -1
- package/dist/collection/components/q2-optgroup/styles.css +2 -2
- package/dist/collection/components/q2-option/index.js +3 -58
- package/dist/collection/components/q2-option/styles.css +7 -0
- package/dist/collection/components/q2-option-list/index.js +290 -102
- package/dist/collection/components/q2-pill/index.js +79 -18
- package/dist/collection/components/q2-pill/styles.css +1 -2
- package/dist/collection/components/q2-popover/index.js +17 -3
- package/dist/collection/components/q2-popover/styles.css +10 -67
- package/dist/collection/components/q2-radio/index.js +2 -2
- package/dist/collection/components/q2-select/index.js +179 -427
- package/dist/collection/components/q2-select/styles.css +5 -11
- package/dist/collection/components/q2-tag/index.js +33 -19
- package/dist/collection/utils/action-sheet.js +79 -0
- package/dist/collection/utils/index.js +29 -5
- package/dist/components/action-sheet.js +81 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index10.js +1 -1
- package/dist/components/index11.js +42 -353
- package/dist/components/index12.js +44 -99
- package/dist/components/index13.js +495 -583
- package/dist/components/index14.js +137 -0
- package/dist/components/index15.js +629 -0
- package/dist/components/index5.js +1 -1
- package/dist/components/index6.js +1 -1
- package/dist/components/index7.js +1 -1
- package/dist/components/index8.js +46 -17
- package/dist/components/index9.js +2 -2
- package/dist/components/q2-action-sheet.d.ts +11 -0
- package/dist/components/q2-action-sheet.js +282 -0
- package/dist/components/q2-calendar.js +2 -4
- package/dist/components/q2-card.js +1 -1
- package/dist/components/q2-carousel-pane.js +1 -1
- package/dist/components/q2-carousel.js +1 -1
- package/dist/components/q2-chart-area.js +1 -1
- package/dist/components/q2-chart-bar.js +1 -1
- package/dist/components/q2-chart-donut.js +1 -1
- package/dist/components/q2-checkbox-group.js +1 -1
- package/dist/components/q2-checkbox.js +1 -1
- package/dist/components/q2-dropdown.js +2 -2
- package/dist/components/q2-editable-field.js +1 -1
- package/dist/components/q2-loc.js +1 -1
- package/dist/components/q2-month-picker.js +1 -1
- package/dist/components/q2-optgroup.js +1 -70
- package/dist/components/q2-option-list.js +1 -1
- package/dist/components/q2-option.js +1 -76
- package/dist/components/q2-pagination.js +1 -1
- package/dist/components/q2-pill.js +62 -21
- package/dist/components/q2-popover.js +1 -1
- package/dist/components/q2-radio-group.js +1 -1
- package/dist/components/q2-radio.js +3 -3
- package/dist/components/q2-section.js +1 -1
- package/dist/components/q2-select.js +179 -427
- package/dist/components/q2-stepper-pane.js +1 -1
- package/dist/components/q2-stepper-vertical.js +1 -1
- package/dist/components/q2-stepper.js +1 -1
- package/dist/components/q2-tab-container.js +1 -1
- package/dist/components/q2-tag.js +25 -11
- package/dist/components/q2-textarea.js +1 -1
- package/dist/docs.d.ts +148 -0
- package/dist/docs.json +8755 -0
- package/dist/esm/action-sheet-a9597b32.js +81 -0
- package/dist/esm/{index-501fd22e.js → index-d4a87058.js} +30 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +214 -0
- package/dist/esm/q2-badge_2.entry.js +46 -17
- package/dist/esm/q2-btn_2.entry.js +1 -1
- package/dist/esm/q2-calendar.entry.js +2 -4
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +1 -1
- package/dist/esm/q2-carousel.entry.js +1 -1
- package/dist/esm/q2-chart-area.entry.js +1 -1
- package/dist/esm/q2-chart-bar.entry.js +1 -1
- package/dist/esm/q2-chart-donut.entry.js +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +1 -1
- package/dist/esm/q2-checkbox.entry.js +1 -1
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +1 -1
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js +1 -1
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-month-picker.entry.js +1 -1
- package/dist/esm/q2-optgroup_2.entry.js +88 -0
- package/dist/esm/q2-option-list_2.entry.js +226 -86
- package/dist/esm/q2-pagination.entry.js +1 -1
- package/dist/esm/q2-pill.entry.js +57 -18
- package/dist/esm/q2-radio-group.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-section.entry.js +1 -1
- package/dist/esm/q2-select.entry.js +148 -409
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +1 -1
- package/dist/esm/q2-stepper.entry.js +1 -1
- package/dist/esm/q2-tab-container.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +22 -8
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +1 -1
- package/dist/q2-tecton-elements/p-059065e4.js +1 -0
- package/dist/q2-tecton-elements/{p-9b101e22.entry.js → p-1a744921.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-3fd5d010.entry.js → p-1b95e43f.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-3603fcdc.entry.js → p-1ea4b8bd.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-53be87c8.entry.js → p-1f3eb04c.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-25839309.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-38a33baa.entry.js → p-274ec152.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-6be86940.entry.js → p-2ba9e1a2.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-ebd7efa5.entry.js → p-2c309c54.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-3e9a30c4.entry.js → p-2cc70f49.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-604b22a8.entry.js → p-2ceb41c4.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-2e938b20.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-5b1aba1a.entry.js → p-306a4bc7.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-32f44993.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-d7b27803.entry.js → p-3a9aac19.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-3c73ce3f.entry.js +1 -0
- package/dist/q2-tecton-elements/p-4a95f78e.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-6b7e1ebd.entry.js → p-4b48a49d.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-4b92e44e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-5ecb9c27.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6779270e.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-70b01387.entry.js → p-72fc58e7.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-7ac02ae5.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-78fac0fa.entry.js → p-7c168977.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-d27b2caa.entry.js → p-7c9bf80a.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-83d678c7.entry.js +1 -0
- package/dist/q2-tecton-elements/p-a1926e65.js +1 -0
- package/dist/q2-tecton-elements/{p-24f4571d.entry.js → p-a3a5b57b.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-a6296870.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-45d61789.entry.js → p-a64e7eb1.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-8dea9a0c.entry.js → p-ad83984e.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-bf41e71b.entry.js → p-bf0ed24a.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-a2add94e.entry.js → p-bff85959.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-7aa80653.entry.js → p-c4a9ab25.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-ea5383ba.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/helpers.js +3 -2
- package/dist/types/components/q2-action-sheet/index.d.ts +52 -0
- package/dist/types/components/q2-checkbox/index.d.ts +4 -1
- package/dist/types/components/q2-input/index.d.ts +5 -0
- package/dist/types/components/q2-option/index.d.ts +1 -4
- package/dist/types/components/q2-option-list/index.d.ts +16 -8
- package/dist/types/components/q2-pill/index.d.ts +10 -1
- package/dist/types/components/q2-popover/index.d.ts +2 -0
- package/dist/types/components/q2-select/index.d.ts +45 -47
- package/dist/types/components/q2-tag/index.d.ts +3 -3
- package/dist/types/components.d.ts +44 -17
- package/dist/types/global.d.ts +9 -2
- package/dist/types/utils/action-sheet.d.ts +12 -0
- package/dist/types/utils/index.d.ts +4 -1
- package/dist/types/workspace/workspace/Tecton_tecton-production_master/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +1 -1
- package/package.json +4 -2
- package/dist/cjs/q2-optgroup.cjs.entry.js +0 -56
- package/dist/cjs/q2-option.cjs.entry.js +0 -46
- package/dist/esm/q2-optgroup.entry.js +0 -52
- package/dist/esm/q2-option.entry.js +0 -42
- package/dist/q2-tecton-elements/p-18629cbf.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2c20fc43.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3813f51d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-68ef0786.entry.js +0 -1
- package/dist/q2-tecton-elements/p-a510290a.js +0 -1
- package/dist/q2-tecton-elements/p-acc77332.entry.js +0 -1
- package/dist/q2-tecton-elements/p-ba73ee1f.entry.js +0 -1
- package/dist/q2-tecton-elements/p-ba76ecfd.entry.js +0 -1
- package/dist/q2-tecton-elements/p-bbdae095.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d68b5eb3.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d88e4383.entry.js +0 -1
- package/dist/q2-tecton-elements/p-f1d06917.entry.js +0 -1
- package/dist/q2-tecton-elements/p-f6e868c1.entry.js +0 -1
|
@@ -1,73 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as createGuid, l as loc } from './index13.js';
|
|
3
|
-
|
|
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}.q2-optgroup-header{--comp-header-padding:var(--tct-scale-1, var(--app-scale-1x, 5px)) var(--tct-scale-2, var(--app-scale-2x, 10px));background:var(--tct-optgroup-header-bg, var(--t-optgroup-header-bg, var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l2, var(--app-gray-l2, #e6e6e6))))));padding:var(--tct-optgroup-header-padding, var(--t-optgroup-header-padding, var(--comp-header-padding)));font-weight:var(--tct-optgroup-header-font-weight, var(--t-optgroup-header-font-weight, 600));text-transform:var(--tct-optgroup-header-text-transform, var(--t-optgroup-header-text-transform, uppercase));position:sticky;top:var(--comp-multi-select-header-height, 0);z-index:1}";
|
|
5
|
-
|
|
6
|
-
const Q2Optgroup$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
this.guid = createGuid();
|
|
12
|
-
this.setHidden = () => {
|
|
13
|
-
this.hidden = this.options.every(opt => opt.hidden || opt._multiSelectHidden);
|
|
14
|
-
};
|
|
15
|
-
this.disabled = false;
|
|
16
|
-
this.label = undefined;
|
|
17
|
-
this.hidden = false;
|
|
18
|
-
}
|
|
19
|
-
/// LIFECYCLE HOOKS ///
|
|
20
|
-
componentWillLoad() {
|
|
21
|
-
const observer = new MutationObserver(this.setHidden);
|
|
22
|
-
observer.observe(this.hostElement, { childList: true, attributes: true, subtree: true });
|
|
23
|
-
this.mutationObserver = observer;
|
|
24
|
-
// set initially
|
|
25
|
-
this.setHidden();
|
|
26
|
-
this.disabledWatcher(this.disabled);
|
|
27
|
-
}
|
|
28
|
-
disconnectedCallback() {
|
|
29
|
-
this.mutationObserver.disconnect();
|
|
30
|
-
this.mutationObserver = null;
|
|
31
|
-
}
|
|
32
|
-
get headerId() {
|
|
33
|
-
return `q2-optgroup-header-${this.guid}`;
|
|
34
|
-
}
|
|
35
|
-
get options() {
|
|
36
|
-
return Array.from(this.hostElement.querySelectorAll('q2-option'));
|
|
37
|
-
}
|
|
38
|
-
///// OBSERVERS ///////
|
|
39
|
-
disabledWatcher(disabled) {
|
|
40
|
-
this.options.forEach(opt => {
|
|
41
|
-
opt.disabledGroup = !!disabled;
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
render() {
|
|
45
|
-
return (h("div", { class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, h("div", { class: "q2-optgroup-header", id: this.headerId }, (this.label && loc(this.label)) || ''), h("div", { class: "q2-optgroup-options" }, h("slot", null))));
|
|
46
|
-
}
|
|
47
|
-
get hostElement() { return this; }
|
|
48
|
-
static get watchers() { return {
|
|
49
|
-
"disabled": ["disabledWatcher"]
|
|
50
|
-
}; }
|
|
51
|
-
static get style() { return stylesCss; }
|
|
52
|
-
}, [1, "q2-optgroup", {
|
|
53
|
-
"disabled": [516],
|
|
54
|
-
"label": [513],
|
|
55
|
-
"hidden": [32]
|
|
56
|
-
}]);
|
|
57
|
-
function defineCustomElement$1() {
|
|
58
|
-
if (typeof customElements === "undefined") {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
const components = ["q2-optgroup"];
|
|
62
|
-
components.forEach(tagName => { switch (tagName) {
|
|
63
|
-
case "q2-optgroup":
|
|
64
|
-
if (!customElements.get(tagName)) {
|
|
65
|
-
customElements.define(tagName, Q2Optgroup$1);
|
|
66
|
-
}
|
|
67
|
-
break;
|
|
68
|
-
} });
|
|
69
|
-
}
|
|
70
|
-
defineCustomElement$1();
|
|
1
|
+
import { Q as Q2Optgroup$1, d as defineCustomElement$1 } from './index11.js';
|
|
71
2
|
|
|
72
3
|
const Q2Optgroup = Q2Optgroup$1;
|
|
73
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,79 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as defineCustomElement$2 } from './index7.js';
|
|
3
|
-
|
|
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{--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}";
|
|
5
|
-
|
|
6
|
-
const Q2Option$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
this.role = 'option';
|
|
12
|
-
this.tabindex = '-1';
|
|
13
|
-
this.display = undefined;
|
|
14
|
-
this.value = undefined;
|
|
15
|
-
this.disabled = undefined;
|
|
16
|
-
this.optionId = undefined;
|
|
17
|
-
this.disabledGroup = undefined;
|
|
18
|
-
this.selected = undefined;
|
|
19
|
-
this.hidden = undefined;
|
|
20
|
-
this.multiline = undefined;
|
|
21
|
-
this.active = undefined;
|
|
22
|
-
this.noSelect = undefined;
|
|
23
|
-
this._multiSelectHidden = false;
|
|
24
|
-
}
|
|
25
|
-
componentWillLoad() {
|
|
26
|
-
this.handleDisplay();
|
|
27
|
-
}
|
|
28
|
-
handleDisplay() {
|
|
29
|
-
if (this.display || this.multiline)
|
|
30
|
-
return;
|
|
31
|
-
this.display = this.hostElement.textContent.trim();
|
|
32
|
-
}
|
|
33
|
-
render() {
|
|
34
|
-
const { disabled, disabledGroup, selected, _multiSelectHidden } = this;
|
|
35
|
-
const isDisabled = disabled || disabledGroup;
|
|
36
|
-
return (h(Host, { "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": selected ? 'true' : undefined, "aria-hidden": _multiSelectHidden ? 'true' : undefined }, this.selected && h("q2-icon", { type: "checkmark" }), h("div", { class: "content" }, h("slot", null))));
|
|
37
|
-
}
|
|
38
|
-
get hostElement() { return this; }
|
|
39
|
-
static get watchers() { return {
|
|
40
|
-
"display": ["handleDisplay"]
|
|
41
|
-
}; }
|
|
42
|
-
static get style() { return stylesCss; }
|
|
43
|
-
}, [1, "q2-option", {
|
|
44
|
-
"role": [513],
|
|
45
|
-
"tabindex": [513],
|
|
46
|
-
"display": [1025],
|
|
47
|
-
"value": [513],
|
|
48
|
-
"disabled": [516],
|
|
49
|
-
"optionId": [513, "option-id"],
|
|
50
|
-
"disabledGroup": [516, "disabled-group"],
|
|
51
|
-
"selected": [516],
|
|
52
|
-
"hidden": [516],
|
|
53
|
-
"multiline": [516],
|
|
54
|
-
"active": [516],
|
|
55
|
-
"noSelect": [516, "_no-select"],
|
|
56
|
-
"_multiSelectHidden": [516, "_multiselecthidden"]
|
|
57
|
-
}]);
|
|
58
|
-
function defineCustomElement$1() {
|
|
59
|
-
if (typeof customElements === "undefined") {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const components = ["q2-option", "q2-icon"];
|
|
63
|
-
components.forEach(tagName => { switch (tagName) {
|
|
64
|
-
case "q2-option":
|
|
65
|
-
if (!customElements.get(tagName)) {
|
|
66
|
-
customElements.define(tagName, Q2Option$1);
|
|
67
|
-
}
|
|
68
|
-
break;
|
|
69
|
-
case "q2-icon":
|
|
70
|
-
if (!customElements.get(tagName)) {
|
|
71
|
-
defineCustomElement$2();
|
|
72
|
-
}
|
|
73
|
-
break;
|
|
74
|
-
} });
|
|
75
|
-
}
|
|
76
|
-
defineCustomElement$1();
|
|
1
|
+
import { Q as Q2Option$1, d as defineCustomElement$1 } from './index12.js';
|
|
77
2
|
|
|
78
3
|
const Q2Option = Q2Option$1;
|
|
79
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { o as overrideFocus,
|
|
2
|
+
import { o as overrideFocus, a as isEventFromElement, l as loc, n as nextPaint } from './index15.js';
|
|
3
3
|
import { d as defineCustomElement$6 } from './index4.js';
|
|
4
4
|
import { d as defineCustomElement$5 } from './index5.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './index7.js';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { r as resizeIframe, o as overrideFocus, l as loc,
|
|
2
|
+
import { r as resizeIframe, o as overrideFocus, l as loc, a as isEventFromElement } from './index15.js';
|
|
3
|
+
import { s as shouldShowActionSheet, a as showActionSheetList } from './action-sheet.js';
|
|
3
4
|
import { d as defineCustomElement$5 } from './index2.js';
|
|
4
5
|
import { d as defineCustomElement$4 } from './index7.js';
|
|
5
|
-
import { d as defineCustomElement$3 } from './
|
|
6
|
-
import { d as defineCustomElement$2 } from './
|
|
6
|
+
import { d as defineCustomElement$3 } from './index13.js';
|
|
7
|
+
import { d as defineCustomElement$2 } from './index14.js';
|
|
7
8
|
|
|
8
|
-
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{--t-icon-stroke-primary:currentColor;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{
|
|
9
|
+
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{--t-icon-stroke-primary:currentColor;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{top:calc(var(--comp-pill-min-height) - (var(--comp-pill-min-height) - var(--comp-pill-btn-height)) / 2)}";
|
|
9
10
|
|
|
10
11
|
const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
11
12
|
constructor() {
|
|
@@ -13,9 +14,17 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
13
14
|
this.__registerHost();
|
|
14
15
|
this.__attachShadow();
|
|
15
16
|
this.change = createEvent(this, "change", 7);
|
|
17
|
+
var _a;
|
|
16
18
|
this.scheduledAfterRender = [];
|
|
17
19
|
this.activateFirstOption = false;
|
|
18
20
|
/// Helpers ///
|
|
21
|
+
this.updateSelectedOptionElements = async () => {
|
|
22
|
+
var _a;
|
|
23
|
+
const { selectedOptions } = this;
|
|
24
|
+
const selectedValues = selectedOptions.map(option => option.value);
|
|
25
|
+
const options = await ((_a = this.optionList) === null || _a === void 0 ? void 0 : _a.getOptions());
|
|
26
|
+
this.selectedOptionElements = options === null || options === void 0 ? void 0 : options.filter(option => selectedValues.includes(option.value));
|
|
27
|
+
};
|
|
19
28
|
this.determineHasOptions = () => {
|
|
20
29
|
const hasOptions = !!this.hostElement.querySelectorAll('q2-option').length;
|
|
21
30
|
this.hasOptions = hasOptions;
|
|
@@ -35,7 +44,12 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
35
44
|
return;
|
|
36
45
|
if (this.hasOptions) {
|
|
37
46
|
this.activateFirstOption = false;
|
|
38
|
-
|
|
47
|
+
if (shouldShowActionSheet(this)) {
|
|
48
|
+
this.executeActionSheet(event);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
await this.popoverElement.toggle();
|
|
52
|
+
}
|
|
39
53
|
}
|
|
40
54
|
else {
|
|
41
55
|
const { value, label } = this;
|
|
@@ -49,23 +63,22 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
49
63
|
});
|
|
50
64
|
}
|
|
51
65
|
};
|
|
52
|
-
this.handleKeydown = (event) => {
|
|
66
|
+
this.handleKeydown = async (event) => {
|
|
53
67
|
if (!this.hasOptions || this.disabled)
|
|
54
68
|
return;
|
|
55
|
-
this
|
|
56
|
-
|
|
69
|
+
if (shouldShowActionSheet(this, event)) {
|
|
70
|
+
this.executeActionSheet(event);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
this.activateFirstOption = true;
|
|
74
|
+
this.optionList.handleExternalKeydown(event);
|
|
75
|
+
}
|
|
57
76
|
};
|
|
58
77
|
this.handleChange = event => {
|
|
59
78
|
event.stopPropagation();
|
|
60
79
|
if (!this.hasOptions)
|
|
61
80
|
return;
|
|
62
|
-
|
|
63
|
-
const isActive = !!values.length;
|
|
64
|
-
if (!this.hostElement.onchange) {
|
|
65
|
-
this.selectedOptions = values;
|
|
66
|
-
this.active = isActive;
|
|
67
|
-
}
|
|
68
|
-
this.change.emit({ value, values, active: isActive });
|
|
81
|
+
this.handleSelectionChanges(event.detail);
|
|
69
82
|
};
|
|
70
83
|
this.handleWrapperClick = () => {
|
|
71
84
|
this.primaryBtn.focus();
|
|
@@ -78,6 +91,7 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
78
91
|
this.popoverElement.open = false;
|
|
79
92
|
}
|
|
80
93
|
};
|
|
94
|
+
this.hoist = !!((_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.useActionSheets);
|
|
81
95
|
this.disabled = undefined;
|
|
82
96
|
this.active = undefined;
|
|
83
97
|
this.open = undefined;
|
|
@@ -90,6 +104,7 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
90
104
|
this.popoverMinHeight = 150;
|
|
91
105
|
this.popoverDirection = undefined;
|
|
92
106
|
this.hasOptions = undefined;
|
|
107
|
+
this.selectedOptionElements = [];
|
|
93
108
|
}
|
|
94
109
|
/// LifeCycle Hooks ///
|
|
95
110
|
componentWillLoad() {
|
|
@@ -110,11 +125,11 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
110
125
|
}
|
|
111
126
|
/// Getters ///
|
|
112
127
|
get buttonContent() {
|
|
113
|
-
const { label, selectedOptions, hasOptions } = this;
|
|
114
|
-
if (!hasOptions ||
|
|
128
|
+
const { label, selectedOptions, selectedOptionElements, hasOptions } = this;
|
|
129
|
+
if (!hasOptions || selectedOptionElements.length === 0)
|
|
115
130
|
return label;
|
|
116
|
-
else if (
|
|
117
|
-
return
|
|
131
|
+
else if (selectedOptionElements.length === 1)
|
|
132
|
+
return selectedOptionElements[0].display;
|
|
118
133
|
return loc('tecton.element.pill.activeCount', { count: selectedOptions.length });
|
|
119
134
|
}
|
|
120
135
|
get truncatedButtonContent() {
|
|
@@ -124,6 +139,27 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
124
139
|
else
|
|
125
140
|
return buttonContent;
|
|
126
141
|
}
|
|
142
|
+
async executeActionSheet(event) {
|
|
143
|
+
const result = await showActionSheetList(this, event);
|
|
144
|
+
this.handleSelectionChanges(result);
|
|
145
|
+
}
|
|
146
|
+
handleSelectionChanges(changeDetails) {
|
|
147
|
+
const { value = '', values = [] } = changeDetails;
|
|
148
|
+
const isActive = !!values.length;
|
|
149
|
+
if (!this.hostElement.onchange) {
|
|
150
|
+
this.selectedOptions = values;
|
|
151
|
+
this.active = isActive;
|
|
152
|
+
}
|
|
153
|
+
this.change.emit({
|
|
154
|
+
value,
|
|
155
|
+
values,
|
|
156
|
+
active: isActive,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/// Watchers ///
|
|
160
|
+
selectedOptionsWatcher() {
|
|
161
|
+
this.updateSelectedOptionElements();
|
|
162
|
+
}
|
|
127
163
|
/// Listeners ///
|
|
128
164
|
delegateFocus(event) {
|
|
129
165
|
if (!isEventFromElement(event, this.hostElement))
|
|
@@ -157,11 +193,15 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
157
193
|
wrapperClassNames.push('has-icon');
|
|
158
194
|
if (hasOptions)
|
|
159
195
|
wrapperClassNames.push('has-options');
|
|
160
|
-
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))))));
|
|
196
|
+
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, align: "right" }, h("q2-option-list", { ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements() }, h("slot", null))))));
|
|
161
197
|
}
|
|
162
198
|
get hostElement() { return this; }
|
|
199
|
+
static get watchers() { return {
|
|
200
|
+
"selectedOptions": ["selectedOptionsWatcher"]
|
|
201
|
+
}; }
|
|
163
202
|
static get style() { return stylesCss; }
|
|
164
203
|
}, [1, "q2-pill", {
|
|
204
|
+
"hoist": [4],
|
|
165
205
|
"disabled": [516],
|
|
166
206
|
"active": [1540],
|
|
167
207
|
"open": [1540],
|
|
@@ -173,7 +213,8 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
173
213
|
"selectedOptions": [1040],
|
|
174
214
|
"popoverMinHeight": [2, "popover-min-height"],
|
|
175
215
|
"popoverDirection": [1, "popover-direction"],
|
|
176
|
-
"hasOptions": [32]
|
|
216
|
+
"hasOptions": [32],
|
|
217
|
+
"selectedOptionElements": [32]
|
|
177
218
|
}, [[0, "focus", "delegateFocus"], [0, "popoverStateChanged", "popoverStateHandler"]]]);
|
|
178
219
|
function defineCustomElement$1() {
|
|
179
220
|
if (typeof customElements === "undefined") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as createGuid, o as overrideFocus,
|
|
2
|
+
import { c as createGuid, o as overrideFocus, a as isEventFromElement, l as loc } from './index15.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './index7.js';
|
|
4
4
|
|
|
5
5
|
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}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as createGuid, h as handleAriaLabel, o as overrideFocus, l as loc } from './
|
|
2
|
+
import { c as createGuid, h as handleAriaLabel, o as overrideFocus, l as loc } from './index15.js';
|
|
3
3
|
|
|
4
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[for]{cursor:not-allowed;opacity:var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))}";
|
|
5
5
|
|
|
@@ -73,13 +73,13 @@ const Q2Radio$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
73
73
|
}; }
|
|
74
74
|
static get style() { return stylesCss; }
|
|
75
75
|
}, [1, "q2-radio", {
|
|
76
|
-
"label": [
|
|
76
|
+
"label": [1537],
|
|
77
77
|
"hideLabel": [516, "hide-label"],
|
|
78
78
|
"value": [513],
|
|
79
79
|
"disabled": [516],
|
|
80
80
|
"checked": [516],
|
|
81
81
|
"name": [513],
|
|
82
|
-
"ariaLabel": [
|
|
82
|
+
"ariaLabel": [1537, "aria-label"],
|
|
83
83
|
"groupDisabled": [4, "group-disabled"],
|
|
84
84
|
"groupReadonly": [4, "group-readonly"],
|
|
85
85
|
"groupTileLayout": [4, "group-tile-layout"]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { r as resizeIframe, o as overrideFocus,
|
|
2
|
+
import { r as resizeIframe, o as overrideFocus, a as isEventFromElement, n as nextPaint, l as loc } from './index15.js';
|
|
3
3
|
import { d as defineCustomElement$4 } from './index5.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './index7.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './index9.js';
|