q2-tecton-elements 1.69.1 → 1.70.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/bundle-report.json +2246 -355
- package/dist/cjs/click-elsewhere_3.cjs.entry.js +2 -2
- package/dist/cjs/{index-D2LFCsNP.js → index-SpDCZABA.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +2 -2
- package/dist/cjs/q2-badge_2.cjs.entry.js +11 -4
- package/dist/cjs/q2-btn_2.cjs.entry.js +6 -2
- package/dist/cjs/q2-calendar.cjs.entry.js +5 -3
- package/dist/cjs/q2-card-image.cjs.entry.js +8 -6
- package/dist/cjs/q2-card.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox_2.cjs.entry.js +4 -3
- package/dist/cjs/q2-context.cjs.entry.js +1 -1
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +6 -3
- package/dist/cjs/q2-detail.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/q2-editable-field.cjs.entry.js +12 -4
- package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +1 -1
- package/dist/cjs/q2-item.cjs.entry.js +2 -2
- package/dist/cjs/q2-legend.cjs.entry.js +1 -1
- package/dist/cjs/q2-link_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-loc.cjs.entry.js +20 -2
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-meter.cjs.entry.js +2 -2
- package/dist/cjs/q2-modal.cjs.entry.js +3 -3
- package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-otp.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +1 -1
- 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-relative-time.cjs.entry.js +1 -1
- package/dist/cjs/q2-search.cjs.entry.js +101 -12
- package/dist/cjs/q2-section.cjs.entry.js +2 -2
- package/dist/cjs/q2-select.cjs.entry.js +36 -6
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +24 -18
- package/dist/cjs/q2-stepper.cjs.entry.js +5 -4
- package/dist/cjs/q2-surface.cjs.entry.js +95 -0
- package/dist/cjs/q2-tab-container.cjs.entry.js +2 -2
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
- package/dist/cjs/q2-toast.cjs.entry.js +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.css +1 -1
- package/dist/collection/components/q2-btn/q2-btn.css +32 -17
- package/dist/collection/components/q2-btn/q2-btn.js +6 -1
- package/dist/collection/components/q2-calendar/q2-calendar.js +24 -2
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.vr.js +4 -0
- package/dist/collection/components/q2-card/q2-card.css +2 -2
- package/dist/collection/components/q2-card-image/q2-card-image.css +3 -0
- package/dist/collection/components/q2-card-image/q2-card-image.js +25 -23
- package/dist/collection/components/q2-chart-area/q2-chart-area.css +4 -0
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.css +4 -0
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.css +1 -1
- package/dist/collection/components/q2-checkbox/q2-checkbox.js +2 -1
- package/dist/collection/components/q2-currency/q2-currency.css +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js +5 -2
- package/dist/collection/components/q2-detail/q2-detail.css +12 -12
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +2 -2
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +11 -3
- package/dist/collection/components/q2-input/q2-input.css +11 -1
- package/dist/collection/components/q2-input/q2-input.js +29 -2
- package/dist/collection/components/q2-input/test/q2-input-test.vr.js +8 -0
- package/dist/collection/components/q2-item/q2-item.css +10 -5
- package/dist/collection/components/q2-item/test/q2-item-test.vr.js +132 -0
- package/dist/collection/components/q2-legend/q2-legend.css +2 -2
- package/dist/collection/components/q2-list/q2-list.css +1 -1
- package/dist/collection/components/q2-loc/q2-loc.js +42 -1
- package/dist/collection/components/q2-message/q2-message.css +4 -0
- package/dist/collection/components/q2-meter/q2-meter.css +3 -3
- package/dist/collection/components/q2-modal/q2-modal.css +1 -1
- package/dist/collection/components/q2-modal/q2-modal.js +2 -2
- package/dist/collection/components/q2-otp/q2-otp.css +33 -0
- package/dist/collection/components/q2-otp/test/q2-otp-test.vr.js +83 -0
- package/dist/collection/components/q2-popover/q2-popover.css +2 -1
- package/dist/collection/components/q2-radio/q2-radio.css +2 -0
- package/dist/collection/components/q2-search/q2-search.css +30 -0
- package/dist/collection/components/q2-search/q2-search.js +99 -10
- package/dist/collection/components/q2-search/test/q2-search-test.vr.js +145 -0
- package/dist/collection/components/q2-section/q2-section.css +1 -1
- package/dist/collection/components/q2-select/q2-select.css +4 -2
- package/dist/collection/components/q2-select/q2-select.js +54 -4
- package/dist/collection/components/q2-select/test/q2-select-test.vr.js +5 -0
- package/dist/collection/components/q2-stepper/q2-stepper.css +2 -2
- package/dist/collection/components/q2-stepper/q2-stepper.js +3 -2
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.css +2 -2
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +22 -16
- package/dist/collection/components/q2-surface/q2-surface.css +348 -0
- package/dist/collection/components/q2-surface/q2-surface.js +381 -0
- package/dist/collection/components/q2-surface/test/q2-surface-test.vr.js +108 -0
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +1 -1
- package/dist/collection/components/q2-toast/q2-toast.js +3 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/index.js +2 -2
- package/dist/components/index.js +12 -10
- package/dist/components/index2.js +3 -3
- package/dist/components/q2-action-sheet.js +1 -1
- package/dist/components/q2-btn2.js +5 -1
- package/dist/components/q2-calendar.js +294 -290
- package/dist/components/q2-card-image.js +9 -6
- package/dist/components/q2-card.js +14 -14
- package/dist/components/q2-chart-donut.js +1 -1
- package/dist/components/q2-checkbox2.js +12 -12
- package/dist/components/q2-currency.js +1 -1
- package/dist/components/q2-data-table.js +4 -4
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-dropdown.js +8 -8
- package/dist/components/q2-editable-field.js +15 -5
- package/dist/components/q2-input2.js +46 -26
- package/dist/components/q2-item2.js +1 -1
- package/dist/components/q2-legend2.js +51 -51
- package/dist/components/q2-list2.js +1 -1
- package/dist/components/q2-loc.js +23 -8
- package/dist/components/q2-meter.js +10 -10
- package/dist/components/q2-modal.js +54 -54
- package/dist/components/q2-popover2.js +1 -1
- package/dist/components/q2-search.js +106 -51
- package/dist/components/q2-section.js +1 -1
- package/dist/components/q2-select2.js +25 -9
- package/dist/components/q2-stepper-vertical.js +72 -63
- package/dist/components/q2-stepper.js +73 -71
- package/dist/components/q2-surface.d.ts +11 -0
- package/dist/components/q2-surface.js +109 -0
- package/dist/components/q2-tab-container.js +12 -12
- package/dist/components/q2-tab-pane.js +6 -6
- package/dist/components/q2-tag2.js +5 -5
- package/dist/components/tecton-tab-pane.js +10 -10
- package/dist/esm/click-elsewhere_3.entry.js +2 -2
- package/dist/esm/{index-Bx4m6N0g.js → index-Cps4jSQM.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group_2.entry.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +2 -2
- package/dist/esm/q2-badge_2.entry.js +11 -4
- package/dist/esm/q2-btn_2.entry.js +6 -2
- package/dist/esm/q2-calendar.entry.js +5 -3
- package/dist/esm/q2-card-image.entry.js +8 -6
- package/dist/esm/q2-card.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/q2-checkbox-group.entry.js +1 -1
- package/dist/esm/q2-checkbox_2.entry.js +4 -3
- package/dist/esm/q2-context.entry.js +1 -1
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +6 -3
- package/dist/esm/q2-detail.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +3 -3
- package/dist/esm/q2-editable-field.entry.js +12 -4
- package/dist/esm/q2-file-picker.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js +1 -1
- package/dist/esm/q2-item.entry.js +2 -2
- package/dist/esm/q2-legend.entry.js +1 -1
- package/dist/esm/q2-link_2.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +20 -2
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-meter.entry.js +2 -2
- package/dist/esm/q2-modal.entry.js +3 -3
- package/dist/esm/q2-month-picker.entry.js +1 -1
- package/dist/esm/q2-optgroup.entry.js +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-otp.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +1 -1
- package/dist/esm/q2-pill.entry.js +1 -1
- package/dist/esm/q2-radio-group.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-relative-time.entry.js +1 -1
- package/dist/esm/q2-search.entry.js +101 -12
- package/dist/esm/q2-section.entry.js +2 -2
- package/dist/esm/q2-select.entry.js +36 -6
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +24 -18
- package/dist/esm/q2-stepper.entry.js +5 -4
- package/dist/esm/q2-surface.entry.js +93 -0
- package/dist/esm/q2-tab-container.entry.js +2 -2
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +1 -1
- package/dist/esm/q2-toast.entry.js +1 -1
- package/dist/esm/q2-tooltip.entry.js +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/click-elsewhere_3.entry.js +2 -2
- package/dist/q2-tecton-elements/{index-Bx4m6N0g.js → index-Cps4jSQM.js} +3 -3
- package/dist/q2-tecton-elements/q2-action-group_2.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-badge_2.entry.js +51 -32
- package/dist/q2-tecton-elements/q2-btn_2.entry.js +6 -2
- package/dist/q2-tecton-elements/q2-calendar.entry.js +7 -4
- package/dist/q2-tecton-elements/q2-card-image.entry.js +65 -62
- package/dist/q2-tecton-elements/q2-card.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +54 -54
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +18 -18
- package/dist/q2-tecton-elements/q2-context.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-currency.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-data-table.entry.js +50 -50
- package/dist/q2-tecton-elements/q2-detail.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +16 -16
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +15 -8
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-icon.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-item.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-legend.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-link_2.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-loc.entry.js +20 -6
- package/dist/q2-tecton-elements/q2-message.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-meter.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-modal.entry.js +55 -55
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-option.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-otp.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-pagination.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-pill.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-search.entry.js +108 -53
- package/dist/q2-tecton-elements/q2-section.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-select.entry.js +25 -10
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +75 -66
- package/dist/q2-tecton-elements/q2-stepper.entry.js +47 -45
- package/dist/q2-tecton-elements/q2-surface.entry.js +89 -0
- package/dist/q2-tecton-elements/q2-tab-container.entry.js +13 -13
- package/dist/q2-tecton-elements/q2-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-toast.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +8 -8
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
- package/dist/types/components/q2-calendar/q2-calendar.d.ts +2 -0
- package/dist/types/components/q2-card-image/q2-card-image.d.ts +5 -5
- package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +1 -0
- package/dist/types/components/q2-input/q2-input.d.ts +3 -0
- package/dist/types/components/q2-item/test/q2-item-test.vr.d.ts +1 -0
- package/dist/types/components/q2-loc/q2-loc.d.ts +6 -0
- package/dist/types/components/q2-modal/q2-modal.d.ts +1 -1
- package/dist/types/components/q2-otp/test/q2-otp-test.vr.d.ts +1 -0
- package/dist/types/components/q2-search/q2-search.d.ts +7 -0
- package/dist/types/components/q2-search/test/q2-search-test.vr.d.ts +1 -0
- package/dist/types/components/q2-select/q2-select.d.ts +4 -0
- package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +2 -1
- package/dist/types/components/q2-surface/q2-surface.d.ts +54 -0
- package/dist/types/components/q2-surface/test/q2-surface-test.vr.d.ts +1 -0
- package/dist/types/components/q2-toast/q2-toast.d.ts +3 -1
- package/dist/types/components.d.ts +259 -13
- package/dist/types/utils/index.d.ts +3 -1
- package/package.json +4 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement as t, HTMLElement as e, createEvent as i, h as s, Fragment as o, transformTag as n } from "@stencil/core/internal/client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { o as r, i as l, w as a, l as h } from "./index2.js";
|
|
4
4
|
|
|
5
5
|
import { d as c } from "./click-elsewhere2.js";
|
|
6
6
|
|
|
@@ -85,6 +85,7 @@ const f = t(class extends e {
|
|
|
85
85
|
* results and only the selected options. Only applies to `multiple` (multi-select).
|
|
86
86
|
*/
|
|
87
87
|
this.showSelectedToggle = !1, this.clearAll = () => {
|
|
88
|
+
this.clearSelectedDisplay();
|
|
88
89
|
const {multiple: t} = this;
|
|
89
90
|
this.value = "", this.selectedOptions = [], this.searchText = "", this.isShowingSelectionDisplay = !1,
|
|
90
91
|
this.showSelected = !1,
|
|
@@ -98,9 +99,9 @@ const f = t(class extends e {
|
|
|
98
99
|
query: ""
|
|
99
100
|
});
|
|
100
101
|
}, this.handleSelectionChanges = t => {
|
|
101
|
-
var e, i, s, o, n
|
|
102
|
-
const {multiple:
|
|
103
|
-
if (
|
|
102
|
+
var e, i, s, o, n;
|
|
103
|
+
const {multiple: r} = this;
|
|
104
|
+
if (r) {
|
|
104
105
|
const s = (null !== (e = t.values) && void 0 !== e ? e : []).map((t => t.value)), o = null !== (i = t.value) && void 0 !== i ? i : "";
|
|
105
106
|
this.selectedOptions = s,
|
|
106
107
|
// Preserve the in-progress query — the user may want to keep refining and pick more
|
|
@@ -114,16 +115,20 @@ const f = t(class extends e {
|
|
|
114
115
|
const e = null !== (s = t.value) && void 0 !== s ? s : "";
|
|
115
116
|
// Re-clicking the already-selected single-select option closes the popover
|
|
116
117
|
// with no state change and no `tctChange`.
|
|
117
|
-
if (e === this.value && "" !== e)
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
if (e === this.value && "" !== e) {
|
|
119
|
+
const t = this.optionElements.find((t => t.value === e));
|
|
120
|
+
return this.searchText = this.optionDisplayText(t, e), this.isShowingSelectionDisplay = !0,
|
|
121
|
+
this.checkSelectedDisplay(),
|
|
122
|
+
// Focus before close so the focus event fires while open===true, which
|
|
123
|
+
// causes onFocus to skip openDropdown (it's already open at that point).
|
|
124
|
+
null === (o = this.innerInputField) || void 0 === o || o.focus(), void this.closeDropdown();
|
|
125
|
+
}
|
|
121
126
|
this.value = e;
|
|
122
|
-
const i = this.optionElements.find((t => t.value === e)),
|
|
123
|
-
this.searchText =
|
|
127
|
+
const i = this.optionElements.find((t => t.value === e)), r = this.optionDisplayText(i, e);
|
|
128
|
+
this.searchText = r, this.isShowingSelectionDisplay = !0, this.checkSelectedDisplay(),
|
|
124
129
|
// Focus before close: the focus event fires while open===true so onFocus's
|
|
125
130
|
// openDropdown call is a no-op, then closeDropdown brings us to closed+focused.
|
|
126
|
-
null === (
|
|
131
|
+
null === (n = this.innerInputField) || void 0 === n || n.focus(), this.closeDropdown(),
|
|
127
132
|
this.tctChange.emit({
|
|
128
133
|
value: e,
|
|
129
134
|
selectedOptions: e ? [ e ] : [],
|
|
@@ -139,10 +144,11 @@ const f = t(class extends e {
|
|
|
139
144
|
}, this.inputInputHandler = t => {
|
|
140
145
|
t.stopPropagation();
|
|
141
146
|
const e = t.detail.value;
|
|
147
|
+
this.isShowingSelectionDisplay && this.clearSelectedDisplay(),
|
|
142
148
|
// Preserve `value` while the user types — they're searching, not deselecting.
|
|
143
149
|
// `handleSelectionChanges` updates value if they pick a different option,
|
|
144
150
|
// and `revertToSelectedDisplay` restores the display on blur.
|
|
145
|
-
|
|
151
|
+
this.searchText = e, this.isShowingSelectionDisplay = !1, this.open || this.openDropdown(),
|
|
146
152
|
// Local filter applies the new query synchronously; we can announce the count now.
|
|
147
153
|
// In async mode (filter=false) results land later — onLoadingChange handles the
|
|
148
154
|
// 'Loading' announcement and the post-fetch count.
|
|
@@ -163,6 +169,11 @@ const f = t(class extends e {
|
|
|
163
169
|
this.multilineOptions && this.applyMultilineOptions();
|
|
164
170
|
}, this.onOptionListChange = t => {
|
|
165
171
|
t.stopPropagation(), this.handleSelectionChanges(t.detail);
|
|
172
|
+
}, this.onSelectedDisplayMousedown = t => {
|
|
173
|
+
var e;
|
|
174
|
+
t.preventDefault(), t.stopPropagation(), this.isShowingSelectionDisplay = !1, this.clearSelectedDisplay(),
|
|
175
|
+
this.value && (null === (e = this.innerInputField) || void 0 === e || e.select()),
|
|
176
|
+
this.open || this.openDropdown();
|
|
166
177
|
}, this.onViewportResize = () => {
|
|
167
178
|
if (!this.open || !this.popoverAlignment) return;
|
|
168
179
|
const t = this.getResolvedPopoverWidth();
|
|
@@ -187,23 +198,26 @@ const f = t(class extends e {
|
|
|
187
198
|
this.buildStructuredSelectedOptions(), this.applyMultilineOptions();
|
|
188
199
|
}
|
|
189
200
|
componentDidLoad() {
|
|
190
|
-
this.initMutationObserver(),
|
|
201
|
+
this.initMutationObserver(), r(this.hostElement), this.setCustomLabel();
|
|
191
202
|
}
|
|
192
203
|
// #endregion
|
|
193
204
|
// #region Listeners
|
|
194
205
|
onFocus(t) {
|
|
195
206
|
var e, i, s, o;
|
|
196
207
|
// Delegate programmatic focus from the host to the inner input
|
|
197
|
-
t &&
|
|
208
|
+
t && l(t, this.hostElement) && (null === (e = this.innerInputField) || void 0 === e || e.focus());
|
|
198
209
|
// Ignore focus that originates inside the popover (e.g., tabbing into a slotted
|
|
199
210
|
// popover-bottom action button). Without this gate, the focus event bubbles up and
|
|
200
211
|
// re-opens a just-closed popover as the user is trying to leave it.
|
|
201
212
|
const n = null !== (i = ("function" == typeof (null == t ? void 0 : t.composedPath) ? t.composedPath() : [])[0]) && void 0 !== i ? i : null == t ? void 0 : t.target;
|
|
202
213
|
n && (null === (s = this.popoverElement) || void 0 === s ? void 0 : s.contains(n)) || (this.inputFocused = !0,
|
|
203
|
-
|
|
214
|
+
// Only switch away from the selection display when the user actively re-engages the
|
|
215
|
+
// field (popover is closed). During the post-selection focus that closes the popover,
|
|
216
|
+
// `open` is still true — clearing here would immediately discard the rich display.
|
|
217
|
+
this.isShowingSelectionDisplay && !this.open && (
|
|
204
218
|
// Clear the flag before mutating searchText so the filter watcher runs against the
|
|
205
219
|
// new query, not the stale "showing a selection" guard.
|
|
206
|
-
this.isShowingSelectionDisplay = !1, this.multiple ?
|
|
220
|
+
this.isShowingSelectionDisplay = !1, this.clearSelectedDisplay(), this.multiple ?
|
|
207
221
|
// Multi-select always opens to a fresh search after a selection.
|
|
208
222
|
this.searchText = "" : this.value && (
|
|
209
223
|
// Single-select: pre-select the displayed text so the next keystroke replaces it
|
|
@@ -244,13 +258,13 @@ const f = t(class extends e {
|
|
|
244
258
|
* @testOnly
|
|
245
259
|
*/
|
|
246
260
|
async closePopover() {
|
|
247
|
-
this.closeDropdown(), await
|
|
261
|
+
this.closeDropdown(), await a();
|
|
248
262
|
}
|
|
249
263
|
/**
|
|
250
264
|
* Opens the popover.
|
|
251
265
|
* @testOnly
|
|
252
266
|
*/ async openPopover() {
|
|
253
|
-
this.openDropdown(), await
|
|
267
|
+
this.openDropdown(), await a();
|
|
254
268
|
}
|
|
255
269
|
/**
|
|
256
270
|
* Resets the search to its initial state: clears the input, the
|
|
@@ -262,8 +276,9 @@ const f = t(class extends e {
|
|
|
262
276
|
* Emits `tctClose` as a side effect of closing the popover if it is open.
|
|
263
277
|
* Does not emit `tctChange`.
|
|
264
278
|
*/ async reset() {
|
|
265
|
-
this.value = "", this.selectedOptions = [], this.searchText = "",
|
|
266
|
-
this.showSelected = !1, this.closeDropdown(),
|
|
279
|
+
this.clearSelectedDisplay(), this.value = "", this.selectedOptions = [], this.searchText = "",
|
|
280
|
+
this.isShowingSelectionDisplay = !1, this.showSelected = !1, this.closeDropdown(),
|
|
281
|
+
this.tctInput.emit({
|
|
267
282
|
query: ""
|
|
268
283
|
});
|
|
269
284
|
}
|
|
@@ -285,14 +300,14 @@ const f = t(class extends e {
|
|
|
285
300
|
this.open || await this.openPopover(), i.forEach((t => {
|
|
286
301
|
var e;
|
|
287
302
|
null === (e = this.optionElements.find((e => e.value === t))) || void 0 === e || e.click();
|
|
288
|
-
})), e.closePopover && (await this.closePopover(), await
|
|
303
|
+
})), e.closePopover && (await this.closePopover(), await a());
|
|
289
304
|
}
|
|
290
305
|
// #endregion
|
|
291
306
|
// #region Watchers
|
|
292
307
|
onLoadingChange(t) {
|
|
293
308
|
// When loading turns on with the input focused but the popover was closed (because
|
|
294
309
|
// input-only mode was active), open the popover so the spinner is visible.
|
|
295
|
-
t && this.inputFocused && !this.open && this.openDropdown(), t ? this.setStatusMessage(
|
|
310
|
+
t && this.inputFocused && !this.open && this.openDropdown(), t ? this.setStatusMessage(h("tecton.element.search.loading")) : this.open && this.announceResults();
|
|
296
311
|
}
|
|
297
312
|
onMultilineOptionsChange() {
|
|
298
313
|
this.applyMultilineOptions();
|
|
@@ -338,6 +353,11 @@ const f = t(class extends e {
|
|
|
338
353
|
// total count (no selection display in the input to subtract from).
|
|
339
354
|
this.isShowingSelectionDisplay ? i > 1 ? "+" + (i - 1) : null : "" + i;
|
|
340
355
|
}
|
|
356
|
+
get firstSelectedOptionElement() {
|
|
357
|
+
var t, e;
|
|
358
|
+
const i = this.multiple ? null === (t = this.selectedOptions) || void 0 === t ? void 0 : t[0] : this.value;
|
|
359
|
+
return i && null !== (e = this.optionElements.find((t => t.value === i))) && void 0 !== e ? e : null;
|
|
360
|
+
}
|
|
341
361
|
get innerInputContainer() {
|
|
342
362
|
var t, e, i;
|
|
343
363
|
return null !== (i = null === (e = null === (t = this.inputField) || void 0 === t ? void 0 : t.shadowRoot) || void 0 === e ? void 0 : e.querySelector(".input-container")) && void 0 !== i ? i : null;
|
|
@@ -364,6 +384,9 @@ const f = t(class extends e {
|
|
|
364
384
|
const t = this.hostElement.querySelector("q2-option:not([hidden])"), e = t ? window.getComputedStyle(t).minHeight : null, i = e && /^([\d.]+)px$/.exec(e), s = i ? parseFloat(i[1]) : NaN, o = Number.isFinite(s) && s > 0 ? s : 44;
|
|
365
385
|
return this.minRows * o;
|
|
366
386
|
}
|
|
387
|
+
get selectedDisplaySlot() {
|
|
388
|
+
return this.hostElement.querySelector('[slot="_selected-display"]');
|
|
389
|
+
}
|
|
367
390
|
get visibleOptionElements() {
|
|
368
391
|
return this.optionElements.filter((t => !t.hidden));
|
|
369
392
|
}
|
|
@@ -373,7 +396,7 @@ const f = t(class extends e {
|
|
|
373
396
|
this.inputFocused && t.push("is-focused"), t.join(" ");
|
|
374
397
|
}
|
|
375
398
|
announceResults() {
|
|
376
|
-
const t = this.visibleOptionElements.length, e = 0 === t ?
|
|
399
|
+
const t = this.visibleOptionElements.length, e = 0 === t ? h("tecton.element.search.noResults") : h("tecton.element.search.results", [ t ]);
|
|
377
400
|
this.setStatusMessage(e);
|
|
378
401
|
}
|
|
379
402
|
applyLocalFilter() {
|
|
@@ -389,12 +412,34 @@ const f = t(class extends e {
|
|
|
389
412
|
const {multilineOptions: t} = this;
|
|
390
413
|
this.optionElements.forEach((e => e.multiline = t));
|
|
391
414
|
}
|
|
415
|
+
checkSelectedDisplay() {
|
|
416
|
+
var t;
|
|
417
|
+
const {multilineOptions: e, isShowingSelectionDisplay: i, value: s, multiple: o, selectedOptions: n, firstSelectedOptionElement: r} = this, l = o ? !(null == n ? void 0 : n.length) : !s;
|
|
418
|
+
if (!e || !i || l) return this.clearSelectedDisplay();
|
|
419
|
+
if (!r || r.display) return this.clearSelectedDisplay();
|
|
420
|
+
const a = r.firstElementChild;
|
|
421
|
+
if (!a) return this.clearSelectedDisplay();
|
|
422
|
+
const h = a.cloneNode(!0);
|
|
423
|
+
h.querySelectorAll("[hide-on-select]").forEach((t => t.remove()));
|
|
424
|
+
let c = this.selectedDisplaySlot;
|
|
425
|
+
return c ? (null === (t = c.firstElementChild) || void 0 === t ? void 0 : t.outerHTML) !== h.outerHTML && c.replaceChildren(h) : (c = document.createElement("div"),
|
|
426
|
+
c.slot = "_selected-display",
|
|
427
|
+
// Prevent the non-focusable overlay from blurring the hidden input when clicked.
|
|
428
|
+
// Same pattern used by q2-input's clear button (onMouseDown preventDefault).
|
|
429
|
+
c.addEventListener("mousedown", this.onSelectedDisplayMousedown), c.appendChild(h),
|
|
430
|
+
this.hostElement.appendChild(c)), c;
|
|
431
|
+
}
|
|
392
432
|
checkSelectedOptions() {
|
|
393
433
|
const {multiple: t, selectedOptions: e, value: i} = this;
|
|
394
434
|
this.optionElements.forEach((s => {
|
|
395
435
|
s.selected = t ? e.includes(s.value) : s.value === i;
|
|
396
436
|
}));
|
|
397
437
|
}
|
|
438
|
+
clearSelectedDisplay() {
|
|
439
|
+
const t = this.selectedDisplaySlot;
|
|
440
|
+
return t && (t.removeEventListener("mousedown", this.onSelectedDisplayMousedown),
|
|
441
|
+
t.remove()), null;
|
|
442
|
+
}
|
|
398
443
|
closeDropdown() {
|
|
399
444
|
this.open && (this.open = !1, this.tctClose.emit());
|
|
400
445
|
}
|
|
@@ -411,29 +456,33 @@ const f = t(class extends e {
|
|
|
411
456
|
this.readonly || this.disabled || this.open || this.isInputOnlyMode || (this.open = !0,
|
|
412
457
|
this.tctOpen.emit());
|
|
413
458
|
}
|
|
459
|
+
optionDisplayText(t, e = "") {
|
|
460
|
+
var i, s;
|
|
461
|
+
return (null == t ? void 0 : t.display) ? h(t.display) : this.multilineOptions ? "" : null !== (s = null === (i = null == t ? void 0 : t.textContent) || void 0 === i ? void 0 : i.trim()) && void 0 !== s ? s : e;
|
|
462
|
+
}
|
|
414
463
|
revertToSelectedDisplay() {
|
|
415
|
-
var t, e, i
|
|
464
|
+
var t, e, i;
|
|
416
465
|
if (this.multiple) {
|
|
417
466
|
// Preserve an in-progress query — user blurred without selecting and may resume.
|
|
418
467
|
if (this.searchText) return;
|
|
419
468
|
// No in-progress query: show the first selection's display, paired with the badge.
|
|
420
|
-
const
|
|
421
|
-
if (!
|
|
422
|
-
const
|
|
469
|
+
const e = null === (t = this.selectedOptions) || void 0 === t ? void 0 : t[0];
|
|
470
|
+
if (!e) return;
|
|
471
|
+
const i = this.optionElements.find((t => t.value === e));
|
|
423
472
|
// No matching slotted option (typical with async-fetched options that haven't
|
|
424
473
|
// re-populated yet) — leave the query alone rather than blanking it.
|
|
425
|
-
if (!
|
|
426
|
-
const
|
|
427
|
-
return this.searchText =
|
|
474
|
+
if (!i) return;
|
|
475
|
+
const s = this.optionDisplayText(i);
|
|
476
|
+
return this.searchText = s, void (this.isShowingSelectionDisplay = !0);
|
|
428
477
|
}
|
|
429
478
|
// Single-select: if a value is set, snap the input back to its display.
|
|
430
479
|
// If nothing is selected, leave any in-progress query alone.
|
|
431
480
|
if (!this.value) return;
|
|
432
|
-
const
|
|
481
|
+
const s = this.optionElements.find((t => t.value === this.value));
|
|
433
482
|
// Same guard: don't clobber an in-progress query when the matching option isn't in the DOM.
|
|
434
|
-
if (!
|
|
435
|
-
const
|
|
436
|
-
this.isShowingSelectionDisplay = !0, this.searchText !==
|
|
483
|
+
if (!s) return;
|
|
484
|
+
const o = s.display ? h(s.display) : this.multilineOptions ? "" : null !== (i = null === (e = s.textContent) || void 0 === e ? void 0 : e.trim()) && void 0 !== i ? i : "";
|
|
485
|
+
this.isShowingSelectionDisplay = !0, this.searchText !== o ? this.searchText = o : this.checkSelectedDisplay();
|
|
437
486
|
}
|
|
438
487
|
setCustomLabel() {
|
|
439
488
|
var t;
|
|
@@ -456,12 +505,18 @@ const f = t(class extends e {
|
|
|
456
505
|
}
|
|
457
506
|
// #endregion
|
|
458
507
|
// #region Render Methods
|
|
508
|
+
renderCustomDisplay() {
|
|
509
|
+
return this.checkSelectedDisplay() ? s("slot", {
|
|
510
|
+
name: "_selected-display",
|
|
511
|
+
slot: "custom-display"
|
|
512
|
+
}) : null;
|
|
513
|
+
}
|
|
459
514
|
renderEmpty() {
|
|
460
515
|
return this.hasEmptySlot ? s("slot", {
|
|
461
516
|
name: "empty"
|
|
462
517
|
}) : s("div", {
|
|
463
518
|
class: "no-results"
|
|
464
|
-
},
|
|
519
|
+
}, h(this.noResultsMessage));
|
|
465
520
|
}
|
|
466
521
|
renderMultiSelectHeader() {
|
|
467
522
|
var t, e;
|
|
@@ -470,19 +525,19 @@ const f = t(class extends e {
|
|
|
470
525
|
return s("div", {
|
|
471
526
|
class: "multi-select-header"
|
|
472
527
|
}, s("fieldset", null, s("legend", {
|
|
473
|
-
"aria-label":
|
|
474
|
-
},
|
|
528
|
+
"aria-label": h("tecton.element.search.multiHeader.showing")
|
|
529
|
+
}, h("tecton.element.search.multiHeader.showing")), s("div", null, s("input", {
|
|
475
530
|
class: "sr",
|
|
476
531
|
type: "radio",
|
|
477
532
|
id: this.optionListId + "-results",
|
|
478
533
|
name: this.optionListId + "-view",
|
|
479
534
|
value: "results",
|
|
480
535
|
checked: !n,
|
|
481
|
-
"aria-label":
|
|
536
|
+
"aria-label": h("tecton.element.search.multiHeader.resultsAriaLabel", [ o ]),
|
|
482
537
|
onClick: this.showAllOptions
|
|
483
538
|
}), s("label", {
|
|
484
539
|
htmlFor: this.optionListId + "-results"
|
|
485
|
-
},
|
|
540
|
+
}, h("tecton.element.search.multiHeader.results", [ o ]))), s("div", null, s("input", {
|
|
486
541
|
class: "sr",
|
|
487
542
|
type: "radio",
|
|
488
543
|
id: this.optionListId + "-selected",
|
|
@@ -490,11 +545,11 @@ const f = t(class extends e {
|
|
|
490
545
|
value: "selected",
|
|
491
546
|
disabled: 0 === i,
|
|
492
547
|
checked: n,
|
|
493
|
-
"aria-label":
|
|
548
|
+
"aria-label": h("tecton.element.search.multiHeader.selectedAriaLabel", [ i ]),
|
|
494
549
|
onClick: this.showSelectedOptions
|
|
495
550
|
}), s("label", {
|
|
496
551
|
htmlFor: this.optionListId + "-selected"
|
|
497
|
-
},
|
|
552
|
+
}, h("tecton.element.search.multiHeader.selected", [ i ])))));
|
|
498
553
|
}
|
|
499
554
|
renderOptionsDropdown() {
|
|
500
555
|
var t;
|
|
@@ -535,7 +590,7 @@ const f = t(class extends e {
|
|
|
535
590
|
ref: t => this.optionList = t,
|
|
536
591
|
type: "listbox",
|
|
537
592
|
id: this.optionListId,
|
|
538
|
-
label:
|
|
593
|
+
label: h(this.listLabel),
|
|
539
594
|
multiple: this.multiple,
|
|
540
595
|
selectedOptions: this.structuredSelectedOptions,
|
|
541
596
|
showSelected: this.showSelected,
|
|
@@ -558,32 +613,32 @@ const f = t(class extends e {
|
|
|
558
613
|
}
|
|
559
614
|
render() {
|
|
560
615
|
return s(o, {
|
|
561
|
-
key: "
|
|
616
|
+
key: "0686476c153375c6c3cca61cdeaf1267c5ca6b20"
|
|
562
617
|
}, s("div", {
|
|
563
|
-
key: "
|
|
618
|
+
key: "f5ed583b8da30b2222dd4a466a37e1c10b589fa7",
|
|
564
619
|
"aria-live": "polite",
|
|
565
620
|
"aria-atomic": "true",
|
|
566
621
|
role: "status",
|
|
567
622
|
class: "sr"
|
|
568
623
|
}, this.statusMessage), s("click-elsewhere", {
|
|
569
|
-
key: "
|
|
624
|
+
key: "f1172a06706ea799f6020d21610004450e051d9a",
|
|
570
625
|
class: this.wrapperClasses,
|
|
571
626
|
role: "presentation",
|
|
572
627
|
onChange: this.onClickElsewhere
|
|
573
628
|
}, s("q2-input", {
|
|
574
|
-
key: "
|
|
629
|
+
key: "75675f105bd09279650e6aae6b869e0f3f99c270",
|
|
575
630
|
ref: t => this.inputField = t,
|
|
576
631
|
class: "q2-search-input",
|
|
577
|
-
label: this.label &&
|
|
632
|
+
label: this.label && h(this.label) || "",
|
|
578
633
|
value: this.searchText,
|
|
579
634
|
iconLeft: "search",
|
|
580
635
|
clearable: this.clearable && !this.loading && !!this.searchText,
|
|
581
636
|
disabled: this.disabled,
|
|
582
637
|
optional: this.optional,
|
|
583
638
|
readonly: !!this.readonly,
|
|
584
|
-
placeholder: this.placeholder ?
|
|
639
|
+
placeholder: this.placeholder ? h(this.placeholder) : void 0,
|
|
585
640
|
hideLabel: this.hideLabel,
|
|
586
|
-
errors: Array.isArray(this.errors) && this.errors.length > 0 && this.errors.map((t =>
|
|
641
|
+
errors: Array.isArray(this.errors) && this.errors.length > 0 && this.errors.map((t => h(t))) || this.invalid && [ "tecton.element.search.invalid" ] || [],
|
|
587
642
|
ariaExpanded: this.isInputOnlyMode ? void 0 : "" + this.open,
|
|
588
643
|
ariaControls: this.isInputOnlyMode ? void 0 : this.optionListId,
|
|
589
644
|
ariaHaspopup: this.isInputOnlyMode ? void 0 : "listbox",
|
|
@@ -594,7 +649,7 @@ const f = t(class extends e {
|
|
|
594
649
|
onChange: t => t.stopPropagation(),
|
|
595
650
|
onTctChange: t => t.stopPropagation(),
|
|
596
651
|
badgeValue: this.badgeValue
|
|
597
|
-
}), this.renderOptionsDropdown()));
|
|
652
|
+
}, this.renderCustomDisplay()), this.renderOptionsDropdown()));
|
|
598
653
|
}
|
|
599
654
|
get hostElement() {
|
|
600
655
|
return this;
|
|
@@ -622,7 +677,7 @@ const f = t(class extends e {
|
|
|
622
677
|
};
|
|
623
678
|
}
|
|
624
679
|
static get style() {
|
|
625
|
-
return "*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}: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}.q2-element-dropdown{display:none;position:absolute;background-color:var(--app-white, #ffffff);color:var(--t-text, #4d4d4d);left:0;width:100%;z-index:100;margin-top:1px;box-shadow:var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14));height:0;overflow:hidden;opacity:0;visibility:hidden;transition:opacity var(--app-tween-1, 0.2s ease);border-radius:var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 0);--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, 4px)));--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}.q2-element-dropdown::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.q2-element-dropdown::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown.sizable{display:block;height:auto}.dropdown-open .q2-element-dropdown{display:block;height:auto;overflow:auto;opacity:1;visibility:visible}:host([alignment=right]) .q2-element-dropdown{left:auto;right:0}:host([block]) q2-btn,:host([block]){display:block}:host{display:block;margin:var(--tct-search-margin, var(--tct-search-margin-top, var(--app-scale-5x, 25px)) 0 var(--tct-search-margin-bottom, var(--app-scale-5x, 25px)))}.q2-search-container{display:block;position:relative}.q2-search-input{margin:0;--tct-input-min-height:var(--tct-search-input-min-height, initial);--tct-input-max-height:var(--tct-search-input-max-height, none);--tct-input-horizontal-gap:var(--tct-search-input-horizontal-gap, var(--app-scale-2x, 10px));--tct-input-icon-container-icon-min-width:var(--tct-search-icon-min-width, fit-content)}.popover-content{display:flex;flex-direction:column}.popover-content[data-loading=true]{min-height:var(--tct-search-loading-popover-height, var(--app-scale-12x, 60px));position:relative}.popover-content[data-loading=true] .loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.popover-content[data-loading=true] .loading-overlay q2-loading{--tct-loading-spinner-size:var(--tct-search-loading-spinner-size, var(--app-scale-8x, 40px));width:1em;height:1em}.popover-top-container[hidden],.popover-bottom-container[hidden]{display:none}.popover-top-container{position:sticky;top:0;z-index:5}.popover-top-container .multi-select-header{padding:var(--tct-search-multi-select-header-padding, var(--app-scale-2x, 10px));background:var(--tct-search-multi-select-header-background, var(--t-base, #ffffff));display:flex;gap:var(--app-scale-2x, 10px);align-items:center}.popover-top-container .multi-select-header fieldset{margin:0;padding:0;border:0;display:flex;gap:var(--app-scale-2x, 10px)}.popover-top-container .multi-select-header legend{padding:0;float:left}.popover-top-container .multi-select-header label{cursor:pointer;padding:var(--tct-search-multi-select-option-padding, 2px 5px);font-size:var(--tct-search-multi-select-option-font-size, inherit);border-radius:var(--tct-search-multi-select-option-border-radius, var(--app-border-radius-1, 4px));background:var(--tct-search-multi-select-option-background, transparent);color:var(--tct-search-multi-select-option-font-color, inherit)}.popover-top-container .multi-select-header label:hover{background:var(--tct-search-multi-select-option-hover-background, var(--t-gray-14, #f2f2f2));color:var(--tct-search-multi-select-option-hover-font-color, var(--t-gray-5, #404040))}.popover-top-container .multi-select-header input:checked+label,.popover-top-container .multi-select-header input:checked+label:enabled:hover{background:var(--tct-search-multi-select-option-active-background, var(--t-gray-4, #333333));color:var(--tct-search-multi-select-option-active-font-color, var(--t-base, #ffffff))}.popover-top-container .multi-select-header input:disabled+label{opacity:var(--tct-search-multi-select-option-disabled-opacity, var(--app-disabled-opacity, 0.4));cursor:not-allowed}.popover-top-container .multi-select-header input:focus-visible+label{box-shadow:var(--const-double-focus-ring)}.no-results{padding:var(--tct-search-no-results-padding, var(--app-scale-3x, 15px));color:var(--tct-search-no-results-font-color, var(--t-textA, rgba(77, 77, 77, 0.77)));text-align:center}";
|
|
680
|
+
return "*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}: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}.q2-element-dropdown{display:none;position:absolute;background-color:var(--app-white, #ffffff);color:var(--t-text, #4d4d4d);left:0;width:100%;z-index:100;margin-top:1px;box-shadow:var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14));height:0;overflow:hidden;opacity:0;visibility:hidden;transition:opacity var(--app-tween-1, 0.2s ease);border-radius:var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 0);--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, 4px)));--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}.q2-element-dropdown::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.q2-element-dropdown::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown.sizable{display:block;height:auto}.dropdown-open .q2-element-dropdown{display:block;height:auto;overflow:auto;opacity:1;visibility:visible}:host([alignment=right]) .q2-element-dropdown{left:auto;right:0}:host([block]) q2-btn,:host([block]){display:block}:host{display:block;margin:var(--tct-search-margin, var(--tct-search-margin-top, var(--app-scale-5x, 25px)) 0 var(--tct-search-margin-bottom, var(--app-scale-5x, 25px)))}::slotted([slot=_selected-display]){width:100%;min-height:var(--comp-selected-display-height, 44px)}.q2-search-container{display:block;position:relative}.q2-search-input{margin:0;--tct-input-min-height:var(--tct-search-input-min-height, initial);--tct-input-max-height:var(--tct-search-input-max-height, none);--tct-input-horizontal-gap:var(--tct-search-input-horizontal-gap, var(--app-scale-2x, 10px));--tct-input-icon-container-icon-min-width:var(--tct-search-icon-min-width, fit-content)}.popover-content{display:flex;flex-direction:column}.popover-content[data-loading=true]{min-height:var(--tct-search-loading-popover-height, var(--app-scale-12x, 60px));position:relative}.popover-content[data-loading=true] .loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.popover-content[data-loading=true] .loading-overlay q2-loading{--tct-loading-spinner-size:var(--tct-search-loading-spinner-size, var(--app-scale-8x, 40px));width:1em;height:1em}.popover-top-container[hidden],.popover-bottom-container[hidden]{display:none}.popover-top-container{position:sticky;top:0;z-index:5}.popover-top-container .multi-select-header{padding:var(--tct-search-multi-select-header-padding, var(--app-scale-2x, 10px));background:var(--tct-search-multi-select-header-background, var(--t-base, #ffffff));display:flex;gap:var(--app-scale-2x, 10px);align-items:center}.popover-top-container .multi-select-header fieldset{margin:0;padding:0;border:0;display:flex;gap:var(--app-scale-2x, 10px)}.popover-top-container .multi-select-header legend{padding:0;float:left}.popover-top-container .multi-select-header label{cursor:pointer;padding:var(--tct-search-multi-select-option-padding, 2px 5px);font-size:var(--tct-search-multi-select-option-font-size, inherit);border-radius:var(--tct-search-multi-select-option-border-radius, var(--app-border-radius-1, 4px));background:var(--tct-search-multi-select-option-background, transparent);color:var(--tct-search-multi-select-option-font-color, inherit)}.popover-top-container .multi-select-header label:hover{background:var(--tct-search-multi-select-option-hover-background, var(--t-gray-14, #f2f2f2));color:var(--tct-search-multi-select-option-hover-font-color, var(--t-gray-5, #404040))}.popover-top-container .multi-select-header input:checked+label,.popover-top-container .multi-select-header input:checked+label:enabled:hover{background:var(--tct-search-multi-select-option-active-background, var(--t-gray-4, #333333));color:var(--tct-search-multi-select-option-active-font-color, var(--t-base, #ffffff))}.popover-top-container .multi-select-header input:disabled+label{opacity:var(--tct-search-multi-select-option-disabled-opacity, var(--app-disabled-opacity, 0.4));cursor:not-allowed}.popover-top-container .multi-select-header input:focus-visible+label{box-shadow:var(--const-double-focus-ring)}.no-results{padding:var(--tct-search-no-results-padding, var(--app-scale-3x, 15px));color:var(--tct-search-no-results-font-color, var(--t-textA, rgba(77, 77, 77, 0.77)));text-align:center}";
|
|
626
681
|
}
|
|
627
682
|
}, [ 257, "q2-search", {
|
|
628
683
|
clearable: [ 516 ],
|
|
@@ -193,7 +193,7 @@ const v = t(class extends e {
|
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
static get style() {
|
|
196
|
-
return "*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}: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:var(--tct-section-background, 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,
|
|
196
|
+
return "*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}: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:var(--tct-section-background, 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, inherit));border-radius:var(--tct-section-border-radius, var(--t-section-border-radius, var(--app-border-radius-1, 4px)));margin:var(--tct-section-margin, var(--t-section-margin, var(--app-scale-3x, 15px)));border-width:var(--tct-section-border-width, 0);border-style:var(--tct-section-border-style, solid);border-color:var(--tct-section-border-color, none)}@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)))}}@media print{:host{--comp-default-print-margin:var(--app-scale-3x, 15px) 0;margin:var(--tct-section-print-margin, var(--comp-default-print-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;border-radius:var(--tct-section-border-radius, var(--t-section-border-radius, var(--app-border-radius-1, 4px)));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}@media print{header{padding:var(--tct-section-header-print-padding, 0)}}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:var(--tct-section-title-margin, 0);font-size:var(--tct-section-title-font-size, 20px);font-weight:var(--tct-section-title-font-weight, 600);text-transform:var(--tct-section-title-text-transform, none);letter-spacing:var(--tct-section-title-letter-spacing, inherit)}q2-icon{transition:transform var(--comp-tween)}:host(:not([expanded])) q2-icon,:host([expanded=false]) q2-icon{transform:rotate(180deg)}.content-wrapper{height:auto}.content-wrapper.is-closed{display:none;overflow:hidden}.content-wrapper.is-transitioning{overflow:hidden}:host([collapsible]) .content-wrapper{transition:height var(--comp-tween)}.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)))}@media print{.content{padding:var(--tct-section-content-print-padding, 0)}}.content:focus{box-shadow:none}:host([collapsible]) :host(:not([expanded])) .content{visibility:hidden}q2-btn{--tct-btn-icon-hover-background:var(--tct-section-btn-hover-background, var(--app-gray-l3, #f2f2f2));--tct-icon-stroke-primary:var(--tct-section-btn-icon-stroke-primary, var(--app-gray, #747474));--tct-icon-stroke-secondary:var(--tct-section-btn-icon-stroke-secondary, var(--app-gray, #747474))}";
|
|
197
197
|
}
|
|
198
198
|
}, [ 257, "q2-section", {
|
|
199
199
|
collapsible: [ 516 ],
|
|
@@ -87,7 +87,9 @@ const O = t(class extends e {
|
|
|
87
87
|
* Each item in this array should correspond to the value of a `q2-option` element.
|
|
88
88
|
* This property is only relevant for `multiple` (i.e., multi-select) implementations.
|
|
89
89
|
*/
|
|
90
|
-
this.selectedOptions = [],
|
|
90
|
+
this.selectedOptions = [],
|
|
91
|
+
/** Determines whether to show a success state. The error state takes precedence when both are set. */
|
|
92
|
+
this.valid = !1, this.addTouchEventListeners = () => {
|
|
91
93
|
r() && this.popoverElement && this.popoverElement.addEventListener("touchmove", this.handleTouchMove, {
|
|
92
94
|
passive: !0
|
|
93
95
|
});
|
|
@@ -174,6 +176,13 @@ const O = t(class extends e {
|
|
|
174
176
|
}, this.onPopoverState = ({detail: {open: t, action: e}}) => {
|
|
175
177
|
t && !this.searchText || ("select" !== e && this.optionList.setActiveElement(null),
|
|
176
178
|
this.inputField.focus()), this.open !== t && (this.open = t);
|
|
179
|
+
}, this.onSelectedDisplayClick = t => {
|
|
180
|
+
// Stop click from bubbling to q2-input's onClick (which would toggle the dropdown)
|
|
181
|
+
t.stopPropagation(), this.open || (this.prioritizeSearch = this.searchable, this.clearSelectedDisplay(),
|
|
182
|
+
this.openDropdownWithoutActiveElement()), this.focusInput();
|
|
183
|
+
}, this.onSelectedDisplayMousedown = t => {
|
|
184
|
+
// Prevent focus shift away from the hidden input
|
|
185
|
+
t.preventDefault();
|
|
177
186
|
}, this.removeTouchEventListeners = () => {
|
|
178
187
|
r() && this.popoverElement && this.popoverElement.removeEventListener("touchmove", this.handleTouchMove);
|
|
179
188
|
}, this.showAllOptions = () => {
|
|
@@ -319,7 +328,9 @@ const O = t(class extends e {
|
|
|
319
328
|
t !== e && this.optionElements.forEach((e => e.multiline = t));
|
|
320
329
|
}
|
|
321
330
|
openChanged(t) {
|
|
322
|
-
t ? this.addTouchEventListeners() : this.removeTouchEventListeners(),
|
|
331
|
+
t ? this.addTouchEventListeners() : (this.removeTouchEventListeners(),
|
|
332
|
+
// Reset prioritizeSearch when dropdown closes to ensure selected display can be restored
|
|
333
|
+
this.prioritizeSearch = !1), this.scheduledAfterRender.push((async () => {
|
|
323
334
|
await v();
|
|
324
335
|
const {popoverTopContainer: e, popoverElement: i} = this, s = t && (null == e ? void 0 : e.offsetHeight) || 0;
|
|
325
336
|
s ? i.style.setProperty("--comp-popover-top-container-height", `${s}px`) : i.style.removeProperty("--comp-popover-top-container-height");
|
|
@@ -414,9 +425,11 @@ const O = t(class extends e {
|
|
|
414
425
|
const r = l.firstElementChild.cloneNode(!0);
|
|
415
426
|
if (r.querySelectorAll("[hide-on-select]").forEach((t => t.remove())), t) {
|
|
416
427
|
const e = 0 === t.clientHeight ? "auto" : `${t.clientHeight}px`;
|
|
417
|
-
t.style.setProperty("--comp-selected-display-height", e), t.firstElementChild.outerHTML !== r.outerHTML && t.replaceChild(r, t.firstElementChild)
|
|
418
|
-
|
|
419
|
-
|
|
428
|
+
t.style.setProperty("--comp-selected-display-height", e), t.firstElementChild.outerHTML !== r.outerHTML && t.replaceChild(r, t.firstElementChild),
|
|
429
|
+
t.removeEventListener("mousedown", this.onSelectedDisplayMousedown), t.addEventListener("mousedown", this.onSelectedDisplayMousedown),
|
|
430
|
+
t.removeEventListener("click", this.onSelectedDisplayClick), t.addEventListener("click", this.onSelectedDisplayClick);
|
|
431
|
+
} else t = document.createElement("div"), t.slot = "_selected-display", t.addEventListener("mousedown", this.onSelectedDisplayMousedown),
|
|
432
|
+
t.addEventListener("click", this.onSelectedDisplayClick), t.appendChild(r), this.hostElement.appendChild(t);
|
|
420
433
|
return t;
|
|
421
434
|
}
|
|
422
435
|
checkSelectedDisplayHeight() {
|
|
@@ -435,8 +448,9 @@ const O = t(class extends e {
|
|
|
435
448
|
}));
|
|
436
449
|
}
|
|
437
450
|
clearSelectedDisplay() {
|
|
438
|
-
|
|
439
|
-
|
|
451
|
+
const t = this.selectedDisplaySlot;
|
|
452
|
+
t && (t.removeEventListener("mousedown", this.onSelectedDisplayMousedown), t.removeEventListener("click", this.onSelectedDisplayClick),
|
|
453
|
+
t.remove());
|
|
440
454
|
}
|
|
441
455
|
clearValue() {
|
|
442
456
|
const {multiple: t} = this;
|
|
@@ -554,6 +568,7 @@ const O = t(class extends e {
|
|
|
554
568
|
readonly: !!this.readonly,
|
|
555
569
|
placeholder: this.placeholder || void 0,
|
|
556
570
|
hideLabel: this.hideLabel,
|
|
571
|
+
valid: this.valid,
|
|
557
572
|
ariaExpanded: `${this.open}`,
|
|
558
573
|
ariaControls: "option-list",
|
|
559
574
|
ariaHaspopup: "listbox",
|
|
@@ -618,7 +633,7 @@ const O = t(class extends e {
|
|
|
618
633
|
}
|
|
619
634
|
render() {
|
|
620
635
|
return s("click-elsewhere", {
|
|
621
|
-
key: "
|
|
636
|
+
key: "a08e10cf8bd4e2d3f210d36003417f2a1dec4b21",
|
|
622
637
|
class: this.wrapperClasses,
|
|
623
638
|
role: "presentation",
|
|
624
639
|
onChange: this.clickedElsewhere
|
|
@@ -652,7 +667,7 @@ const O = t(class extends e {
|
|
|
652
667
|
};
|
|
653
668
|
}
|
|
654
669
|
static get style() {
|
|
655
|
-
return "*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}: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}.q2-element-dropdown{display:none;position:absolute;background-color:var(--app-white, #ffffff);color:var(--t-text, #4d4d4d);left:0;width:100%;z-index:100;margin-top:1px;box-shadow:var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14));height:0;overflow:hidden;opacity:0;visibility:hidden;transition:opacity var(--app-tween-1, 0.2s ease);border-radius:var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 0);--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, 4px)));--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}.q2-element-dropdown::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.q2-element-dropdown::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown.sizable{display:block;height:auto}.dropdown-open .q2-element-dropdown{display:block;height:auto;overflow:auto;opacity:1;visibility:visible}:host([alignment=right]) .q2-element-dropdown{left:auto;right:0}:host([block]) q2-btn,:host([block]){display:block}:host{--comp-default-select-margin:var(--tct-select-margin-top, var(--t-select-margin-top, var(--app-scale-5x, 25px))) 0 var(--tct-select-margin-bottom, var(--t-select-margin-bottom, var(--app-scale-5x, 25px)));display:block;margin:var(--tct-select-margin, var(--comp-default-select-margin))}.q2-select-container{position:relative;display:block}.q2-select-input{margin:0;--tct-input-min-height:var(--tct-select-input-min-height, var(--t-select-input-min-height));--tct-input-max-height:var(--tct-select-input-max-height, var(--t-select-input-max-height, none))}::slotted([slot=_selected-display]){width:100%;min-height:var(--comp-selected-display-height, 44px)}.custom-display-content{position:absolute;bottom:0;left:calc(var(--tct-scale-2, var(--app-scale-2x, 10px)) + 1px);height:44px;width:calc(100% - 34px - var(--tct-scale-3, var(--app-scale-3x, 15px)));overflow:hidden;cursor:pointer;transition:left var(--tct-tween-2, var(--app-tween-1, 0.2s ease))}.custom-display-content:not([hidden]){display:flex;align-items:center}.is-searchable.is-focused .custom-display-content,.is-searchable .custom-display-content:active{left:calc(var(--tct-scale-3, var(--app-scale-3x, 15px)) + 1px)}.has-error .custom-display-content{width:calc(100% - 68px - var(--tct-scale-3, var(--app-scale-3x, 15px)))}.popover-content{display:flex;flex-direction:column-reverse}.popover-bottom-container{position:sticky;bottom:0;z-index:5}.popover-top-container{position:sticky;top:0;z-index:5}.popover-top-container .multi-select-header{padding:var(--tct-scale-2, var(--app-scale-2x, 10px)) var(--tct-scale-2, var(--app-scale-2x, 10px));background:var(--app-white);display:flex;gap:var(--app-scale-2x, 10px);align-items:center}.popover-top-container .multi-select-header fieldset{margin:0;padding:0;border:0;display:flex;gap:var(--app-scale-2x, 10px)}.popover-top-container .multi-select-header legend{padding:0;float:left}.popover-top-container .multi-select-header label{cursor:pointer;padding:var(--tct-select-multi-select-option-padding, var(--t-select-multi-select-option-padding, var(--tct-btn-badge-padding, var(--t-btn-badge-padding, 2px 5px))));font-size:var(--tct-select-multi-select-option-font-size, var(--t-select-multi-select-option-font-size, var(--tct-btn-badge-font-size, var(--t-btn-badge-font-size, inherit))));border-radius:var(--tct-select-multi-select-option-radius, var(--t-select-multi-select-option-radius, var(--tct-btn-badge-border-radius, var(--t-btn-badge-border-radius, var(--app-border-radius-1, 4px)))));background:var(--tct-select-multi-select-option-background, var(--tct-select-multi-select-option-bg, var(--t-select-multi-select-option-bg, var(--tct-badge-background, var(--tct-btn-badge-bg, var(--t-btn-badge-bg, transparent))))));color:var(--tct-select-multi-select-option-color, var(--t-select-multi-select-option-color, var(--tct-btn-badge-font-color, var(--t-btn-badge-font-color, inherit))))}.popover-top-container .multi-select-header label:hover{background:var(--tct-select-multi-select-option-hover-background, var(--tct-select-multi-select-option-hover-background-color, var(--t-select-multi-select-option-hover-background-color, var(--tct-btn-badge-hover-bg, var(--t-btn-badge-hover-bg, var(--tct-gray-14, var(--t-gray-14, var(--app-gray-l3, #f2f2f2))))))));color:var(--tct-select-multi-select-option-hover-color, var(--tct-select-multi-select-option-color, var(--t-select-multi-select-option-color, var(--tct-btn-badge-hover-font-color, var(--t-btn-badge-hover-font-color, var(--tct-gray-5, var(--t-gray-5, var(--app-gray-d2, #404040))))))))}.popover-top-container .multi-select-header input:checked+label,.popover-top-container .multi-select-header input:checked+label:enabled:hover{background:var(--tct-select-multi-select-option-active-background, var(--tct-select-multi-select-option-active-background-color, var(--t-select-multi-select-option-active-background-color, var(--tct-btn-primary-bg, var(--t-btn-primary-bg, #2e2e2e)))));color:var(--tct-select-multi-select-option-active-color, var(--t-select-multi-select-option-active-color, var(--tct-btn-primary-font-color, var(--t-btn-primary-font-color, var(--app-white, #ffffff)))))}.popover-top-container .multi-select-header input:disabled+label{opacity:var(--tct-select-multi-select-option-disabled-opacity, var(--t-select-multi-select-option-disabled-opacity, var(--tct-btn-disabled-opacity, var(--t-btn-disabled-opacity, var(--app-disabled-opacity, 0.4)))));cursor:not-allowed}.popover-top-container .multi-select-header input:focus-visible+label{box-shadow:var(--const-double-focus-ring)}";
|
|
670
|
+
return "*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}: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}.q2-element-dropdown{display:none;position:absolute;background-color:var(--app-white, #ffffff);color:var(--t-text, #4d4d4d);left:0;width:100%;z-index:100;margin-top:1px;box-shadow:var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14));height:0;overflow:hidden;opacity:0;visibility:hidden;transition:opacity var(--app-tween-1, 0.2s ease);border-radius:var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 0);--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, 4px)));--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}.q2-element-dropdown::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.q2-element-dropdown::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown.sizable{display:block;height:auto}.dropdown-open .q2-element-dropdown{display:block;height:auto;overflow:auto;opacity:1;visibility:visible}:host([alignment=right]) .q2-element-dropdown{left:auto;right:0}:host([block]) q2-btn,:host([block]){display:block}:host{--comp-default-select-margin:var(--tct-select-margin-top, var(--t-select-margin-top, var(--app-scale-5x, 25px))) 0 var(--tct-select-margin-bottom, var(--t-select-margin-bottom, var(--app-scale-5x, 25px)));display:block;margin:var(--tct-select-margin, var(--comp-default-select-margin))}.q2-select-container{position:relative;display:block}.q2-select-input{margin:0;--tct-input-min-height:var(--tct-select-input-min-height, var(--t-select-input-min-height));--tct-input-max-height:var(--tct-select-input-max-height, var(--t-select-input-max-height, none))}::slotted([slot=_selected-display]){width:100%;min-height:var(--comp-selected-display-height, 44px);padding-top:var(--tct-select-selected-display-padding, var(--app-scale-2x, 10px));padding-bottom:var(--tct-select-selected-display-padding, var(--app-scale-2x, 10px))}.custom-display-content{position:absolute;bottom:0;left:calc(var(--tct-scale-2, var(--app-scale-2x, 10px)) + 1px);height:44px;width:calc(100% - 34px - var(--tct-scale-3, var(--app-scale-3x, 15px)));overflow:hidden;cursor:pointer;transition:left var(--tct-tween-2, var(--app-tween-1, 0.2s ease))}.custom-display-content:not([hidden]){display:flex;align-items:center}.is-searchable.is-focused .custom-display-content,.is-searchable .custom-display-content:active{left:calc(var(--tct-scale-3, var(--app-scale-3x, 15px)) + 1px)}.has-error .custom-display-content{width:calc(100% - 68px - var(--tct-scale-3, var(--app-scale-3x, 15px)))}.popover-content{display:flex;flex-direction:column-reverse}.popover-bottom-container{position:sticky;bottom:0;z-index:5}.popover-top-container{position:sticky;top:0;z-index:5}.popover-top-container .multi-select-header{padding:var(--tct-scale-2, var(--app-scale-2x, 10px)) var(--tct-scale-2, var(--app-scale-2x, 10px));background:var(--app-white);display:flex;gap:var(--app-scale-2x, 10px);align-items:center}.popover-top-container .multi-select-header fieldset{margin:0;padding:0;border:0;display:flex;gap:var(--app-scale-2x, 10px)}.popover-top-container .multi-select-header legend{padding:0;float:left}.popover-top-container .multi-select-header label{cursor:pointer;padding:var(--tct-select-multi-select-option-padding, var(--t-select-multi-select-option-padding, var(--tct-btn-badge-padding, var(--t-btn-badge-padding, 2px 5px))));font-size:var(--tct-select-multi-select-option-font-size, var(--t-select-multi-select-option-font-size, var(--tct-btn-badge-font-size, var(--t-btn-badge-font-size, inherit))));border-radius:var(--tct-select-multi-select-option-radius, var(--t-select-multi-select-option-radius, var(--tct-btn-badge-border-radius, var(--t-btn-badge-border-radius, var(--app-border-radius-1, 4px)))));background:var(--tct-select-multi-select-option-background, var(--tct-select-multi-select-option-bg, var(--t-select-multi-select-option-bg, var(--tct-badge-background, var(--tct-btn-badge-bg, var(--t-btn-badge-bg, transparent))))));color:var(--tct-select-multi-select-option-color, var(--t-select-multi-select-option-color, var(--tct-btn-badge-font-color, var(--t-btn-badge-font-color, inherit))))}.popover-top-container .multi-select-header label:hover{background:var(--tct-select-multi-select-option-hover-background, var(--tct-select-multi-select-option-hover-background-color, var(--t-select-multi-select-option-hover-background-color, var(--tct-btn-badge-hover-bg, var(--t-btn-badge-hover-bg, var(--tct-gray-14, var(--t-gray-14, var(--app-gray-l3, #f2f2f2))))))));color:var(--tct-select-multi-select-option-hover-color, var(--tct-select-multi-select-option-color, var(--t-select-multi-select-option-color, var(--tct-btn-badge-hover-font-color, var(--t-btn-badge-hover-font-color, var(--tct-gray-5, var(--t-gray-5, var(--app-gray-d2, #404040))))))))}.popover-top-container .multi-select-header input:checked+label,.popover-top-container .multi-select-header input:checked+label:enabled:hover{background:var(--tct-select-multi-select-option-active-background, var(--tct-select-multi-select-option-active-background-color, var(--t-select-multi-select-option-active-background-color, var(--tct-btn-primary-bg, var(--t-btn-primary-bg, #2e2e2e)))));color:var(--tct-select-multi-select-option-active-color, var(--t-select-multi-select-option-active-color, var(--tct-btn-primary-font-color, var(--t-btn-primary-font-color, var(--app-white, #ffffff)))))}.popover-top-container .multi-select-header input:disabled+label{opacity:var(--tct-select-multi-select-option-disabled-opacity, var(--t-select-multi-select-option-disabled-opacity, var(--tct-btn-disabled-opacity, var(--t-btn-disabled-opacity, var(--app-disabled-opacity, 0.4)))));cursor:not-allowed}.popover-top-container .multi-select-header input:focus-visible+label{box-shadow:var(--const-double-focus-ring)}";
|
|
656
671
|
}
|
|
657
672
|
}, [ 257, "q2-select", {
|
|
658
673
|
ariaLabel: [ 1537, "aria-label" ],
|
|
@@ -675,6 +690,7 @@ const O = t(class extends e {
|
|
|
675
690
|
readonly: [ 516 ],
|
|
676
691
|
searchable: [ 1540 ],
|
|
677
692
|
selectedOptions: [ 1040 ],
|
|
693
|
+
valid: [ 516 ],
|
|
678
694
|
value: [ 1025 ],
|
|
679
695
|
hasCustomDisplay: [ 32 ],
|
|
680
696
|
hasPopoverBottom: [ 32 ],
|