q2-tecton-elements 1.73.0 → 1.73.1
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 +16 -21
- package/dist/cjs/q2-avatar.cjs.entry.js +34 -1
- package/dist/cjs/q2-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +11 -5
- package/dist/cjs/q2-pill.cjs.entry.js +2 -2
- package/dist/cjs/q2-relative-time.cjs.entry.js +1 -1
- package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
- package/dist/cjs/q2-search.cjs.entry.js +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +2 -2
- 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-surface.cjs.entry.js +1 -1
- package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/components/q2-avatar/q2-avatar.js +34 -1
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.vr.js +79 -4
- package/dist/collection/components/q2-input/formatting/phone-number-formats.js +1 -1
- package/dist/collection/components/q2-message/q2-message.css +1 -1
- package/dist/collection/components/q2-message/test/q2-message-test.vr.js +11 -2
- package/dist/collection/components/q2-pagination/q2-pagination.css +17 -0
- package/dist/collection/components/q2-pagination/q2-pagination.js +10 -4
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.vr.js +39 -0
- package/dist/collection/components/q2-pill/q2-pill.css +14 -10
- package/dist/collection/components/q2-pill/q2-pill.js +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.vr.js +25 -0
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
- package/dist/collection/components/q2-search/q2-search.js +1 -1
- package/dist/collection/components/q2-section/q2-section.js +2 -2
- package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
- package/dist/collection/components/q2-surface/q2-surface.js +1 -1
- 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/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/components/q2-avatar2.js +41 -27
- package/dist/components/q2-input2.js +1 -1
- package/dist/components/q2-message2.js +1 -1
- package/dist/components/q2-pagination.js +37 -35
- package/dist/components/q2-pill.js +43 -40
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer2.js +23 -23
- package/dist/components/q2-search.js +4 -4
- package/dist/components/q2-section.js +15 -15
- package/dist/components/q2-stepper-pane.js +29 -29
- package/dist/components/q2-stepper-vertical.js +4 -4
- package/dist/components/q2-stepper.js +12 -12
- package/dist/components/q2-surface.js +3 -3
- package/dist/components/q2-tab-container.js +16 -16
- package/dist/components/q2-tab-pane.js +6 -6
- package/dist/components/q2-tag2.js +5 -5
- package/dist/components/tecton-tab-pane.js +6 -6
- package/dist/esm/q2-avatar.entry.js +34 -1
- package/dist/esm/q2-badge_2.entry.js +1 -1
- package/dist/esm/q2-checkbox_2.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +11 -5
- package/dist/esm/q2-pill.entry.js +2 -2
- package/dist/esm/q2-relative-time.entry.js +1 -1
- package/dist/esm/q2-resize-observer.entry.js +1 -1
- package/dist/esm/q2-search.entry.js +1 -1
- package/dist/esm/q2-section.entry.js +2 -2
- 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-surface.entry.js +1 -1
- package/dist/esm/q2-tab-container.entry.js +1 -1
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-avatar.entry.js +24 -10
- package/dist/q2-tecton-elements/q2-badge_2.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-message.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-pagination.entry.js +51 -49
- package/dist/q2-tecton-elements/q2-pill.entry.js +38 -35
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-search.entry.js +30 -30
- package/dist/q2-tecton-elements/q2-section.entry.js +11 -11
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +12 -12
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-stepper.entry.js +12 -12
- package/dist/q2-tecton-elements/q2-surface.entry.js +15 -15
- package/dist/q2-tecton-elements/q2-tab-container.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-tab-pane.entry.js +4 -4
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +9 -9
- package/dist/types/components/q2-avatar/q2-avatar.d.ts +5 -0
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as t, c as o, h as i, g as e } from "./index-Cqkz7Bnm.js";
|
|
2
2
|
|
|
3
|
-
import { a
|
|
3
|
+
import { a, o as r, i as n, w as c, l as s } from "./index-CP8pXJ-l.js";
|
|
4
4
|
|
|
5
5
|
import { m as l } from "./mirror-emit-DUjY_ucm.js";
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@ const v = class {
|
|
|
31
31
|
value: null,
|
|
32
32
|
values: [],
|
|
33
33
|
active: !1
|
|
34
|
-
}), this.scheduledAfterRender.push(
|
|
34
|
+
}), this.scheduledAfterRender.push(a);
|
|
35
35
|
}, this.determineOptionCount = async () => {
|
|
36
36
|
if (this.optionList) {
|
|
37
37
|
const t = await this.getOptionListOptions();
|
|
@@ -92,7 +92,7 @@ const v = class {
|
|
|
92
92
|
var o;
|
|
93
93
|
await (null === (o = this.optionList) || void 0 === o ? void 0 : o.handleExternalKeydown(t));
|
|
94
94
|
}, this.handleSelectionChanges = async t => {
|
|
95
|
-
const {multiple: o} = this, {value: i = "", values: e = []} = t,
|
|
95
|
+
const {multiple: o} = this, {value: i = "", values: e = []} = t, a = o ? !!e.length : !!i;
|
|
96
96
|
if (!this.hostElement.onchange) if (o) this.selectedOptions = e, this.value = void 0; else {
|
|
97
97
|
const t = await this.getOption(i);
|
|
98
98
|
this.selectedOptions = t ? [ {
|
|
@@ -103,7 +103,7 @@ const v = class {
|
|
|
103
103
|
l(this, [ "change", "tctChange" ], {
|
|
104
104
|
value: o ? void 0 : i,
|
|
105
105
|
values: e,
|
|
106
|
-
active:
|
|
106
|
+
active: a
|
|
107
107
|
});
|
|
108
108
|
}, this.handleSlotKeydown = t => {
|
|
109
109
|
var o;
|
|
@@ -143,8 +143,8 @@ const v = class {
|
|
|
143
143
|
const {selectedOptions: t = []} = this, o = t.map((t => t.value)), i = await this.getOptionListOptions();
|
|
144
144
|
this.optionCount && (this.active = !!o.length), this.selectedOptionElements = (null == i ? void 0 : i.filter((t => o.includes(t.value)))) || [];
|
|
145
145
|
}, this.updateSlotState = () => {
|
|
146
|
-
const {hostElement: t, hasPopoverTop: o, hasPopoverBottom: i} = this, e = t.shadowRoot.querySelector('slot[name="popover-top"]'),
|
|
147
|
-
o !==
|
|
146
|
+
const {hostElement: t, hasPopoverTop: o, hasPopoverBottom: i} = this, e = t.shadowRoot.querySelector('slot[name="popover-top"]'), a = t.shadowRoot.querySelector('slot[name="popover-bottom"]'), r = (null == e ? void 0 : e.assignedNodes().length) > 0, n = (null == a ? void 0 : a.assignedNodes().length) > 0;
|
|
147
|
+
o !== r && (this.hasPopoverTop = r), i !== n && (this.hasPopoverBottom = n);
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
// #endregion
|
|
@@ -161,7 +161,7 @@ const v = class {
|
|
|
161
161
|
}), this.mutationObserver = t;
|
|
162
162
|
}
|
|
163
163
|
componentDidLoad() {
|
|
164
|
-
|
|
164
|
+
r(this.hostElement), this.syncValueProperties(), this.filterSlottedElements();
|
|
165
165
|
}
|
|
166
166
|
componentDidRender() {
|
|
167
167
|
this.scheduledAfterRender.forEach((t => t())), this.scheduledAfterRender = [];
|
|
@@ -216,14 +216,14 @@ const v = class {
|
|
|
216
216
|
// #region Watchers
|
|
217
217
|
selectedOptionsChanged(t) {
|
|
218
218
|
var o, i;
|
|
219
|
-
const {multiple: e} = this,
|
|
220
|
-
e ? (this.value && (this.value = null), this.updateSelectedOptionElements()) : this.value ===
|
|
219
|
+
const {multiple: e} = this, a = null !== (i = null === (o = null == t ? void 0 : t[0]) || void 0 === o ? void 0 : o.value) && void 0 !== i ? i : null;
|
|
220
|
+
e ? (this.value && (this.value = null), this.updateSelectedOptionElements()) : this.value === a ? this.updateSelectedOptionElements() : this.value = a;
|
|
221
221
|
}
|
|
222
222
|
async valueChanged(t, o, i) {
|
|
223
|
-
var e,
|
|
224
|
-
const {label:
|
|
223
|
+
var e, a;
|
|
224
|
+
const {label: r, multiple: n, selectedOptions: c, value: s} = this, l = "value" === i ? t : s, p = "label" === i ? t : r;
|
|
225
225
|
if (n) return;
|
|
226
|
-
const d = null !== (
|
|
226
|
+
const d = null !== (a = null === (e = null == c ? void 0 : c[0]) || void 0 === e ? void 0 : e.value) && void 0 !== a ? a : null;
|
|
227
227
|
if ("value" === i && t === d) this.updateSelectedOptionElements(); else {
|
|
228
228
|
const o = await this.getOption(t), {value: i, display: e} = o || {
|
|
229
229
|
value: l,
|
|
@@ -238,21 +238,21 @@ const v = class {
|
|
|
238
238
|
// #endregion
|
|
239
239
|
// #region Local Methods
|
|
240
240
|
get buttonContent() {
|
|
241
|
-
const {label: t, selectedOptionElements: o, optionCount: i, maxLength: e} = this,
|
|
242
|
-
let
|
|
243
|
-
if (i && 0 !==
|
|
244
|
-
if (1 !==
|
|
245
|
-
const t = s(o[0].display), i = " +" + (
|
|
241
|
+
const {label: t, selectedOptionElements: o, optionCount: i, maxLength: e} = this, a = o.length;
|
|
242
|
+
let r;
|
|
243
|
+
if (i && 0 !== a) {
|
|
244
|
+
if (1 !== a) {
|
|
245
|
+
const t = s(o[0].display), i = " +" + (a - 1);
|
|
246
246
|
return {
|
|
247
247
|
text: `${t}${i}`,
|
|
248
248
|
truncatedText: `${this._truncate(t, e)}${i}`
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
|
-
|
|
252
|
-
} else
|
|
251
|
+
r = s(o[0].display);
|
|
252
|
+
} else r = s(t);
|
|
253
253
|
return {
|
|
254
|
-
text:
|
|
255
|
-
truncatedText: this._truncate(
|
|
254
|
+
text: r,
|
|
255
|
+
truncatedText: this._truncate(r, e)
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
258
|
_togglePopover() {
|
|
@@ -272,7 +272,7 @@ const v = class {
|
|
|
272
272
|
}, s("tecton.element.optionList.optionCount", [ this.optionCount ]));
|
|
273
273
|
}
|
|
274
274
|
renderIcon() {
|
|
275
|
-
const {optionCount: t, active: o} = this, e = t && o,
|
|
275
|
+
const {optionCount: t, active: o} = this, e = t && o, a = e || !t ? "close" : "chevron-down";
|
|
276
276
|
return i(e ? "button" : "div", {
|
|
277
277
|
class: "btn-close",
|
|
278
278
|
onClick: e && this.clearSelectedOptions || void 0,
|
|
@@ -280,11 +280,11 @@ const v = class {
|
|
|
280
280
|
"aria-label": e && s("tecton.element.pill.clearSelection") || void 0,
|
|
281
281
|
type: e ? "button" : void 0
|
|
282
282
|
}, i("q2-icon", {
|
|
283
|
-
type:
|
|
283
|
+
type: a
|
|
284
284
|
}));
|
|
285
285
|
}
|
|
286
286
|
render() {
|
|
287
|
-
const {optionCount: t, active: o, open: e} = this, {text:
|
|
287
|
+
const {optionCount: t, active: o, open: e} = this, {text: a, truncatedText: r} = this.buttonContent, n = [ "btn-wrapper" ];
|
|
288
288
|
return (t || o) && n.push("has-icon"), t && n.push("has-options"), i("click-elsewhere", {
|
|
289
289
|
key: "8cba59cde3746d0397305512334eb56357e9e5d4",
|
|
290
290
|
onChange: this.onClickElsewhere
|
|
@@ -311,14 +311,17 @@ const v = class {
|
|
|
311
311
|
"aria-roledescription": !t && "filter",
|
|
312
312
|
"aria-controls": t ? "option-list" : void 0,
|
|
313
313
|
"aria-expanded": t && `${!!e}` || void 0,
|
|
314
|
-
"aria-label":
|
|
314
|
+
"aria-label": a,
|
|
315
315
|
"aria-pressed": t ? void 0 : `${!!o}`,
|
|
316
316
|
"aria-describedby": t ? "option-description" : void 0
|
|
317
317
|
}, i("slot", {
|
|
318
318
|
key: "e1f4c57b7526f714cf0242e101ec0f5c39ebafa5",
|
|
319
319
|
name: "decorator"
|
|
320
|
-
}),
|
|
321
|
-
key: "
|
|
320
|
+
}), i("span", {
|
|
321
|
+
key: "98a770f6f4fabe04d886f66d57e76a4febb31353",
|
|
322
|
+
class: "pill-label"
|
|
323
|
+
}, r))), this.renderIcon(), !!t && this.renderHiddenElement()), this.optionCount > 0 && i("q2-popover", {
|
|
324
|
+
key: "30fb581a9eeb008262bbb3fc4a82537f1b78af28",
|
|
322
325
|
ref: t => this.popoverElement = t,
|
|
323
326
|
controlElement: this.primaryBtn,
|
|
324
327
|
open: this.open,
|
|
@@ -328,20 +331,20 @@ const v = class {
|
|
|
328
331
|
align: this.popoverAlignment,
|
|
329
332
|
onFocusout: this.handleFocusOut
|
|
330
333
|
}, i("div", {
|
|
331
|
-
key: "
|
|
334
|
+
key: "6fc858b2064b78b2ccaafd35aefaa2e4c9e1ea07",
|
|
332
335
|
class: "popover-content"
|
|
333
336
|
}, i("div", {
|
|
334
|
-
key: "
|
|
337
|
+
key: "75134f4a5d4296f6f69a70197bf1bd450c05a8e0",
|
|
335
338
|
ref: t => this.popoverTopContainer = t,
|
|
336
339
|
class: "popover-top-container",
|
|
337
340
|
tabindex: "-1",
|
|
338
341
|
hidden: !this.hasPopoverTop,
|
|
339
342
|
onKeyDown: this.handleSlotKeydown
|
|
340
343
|
}, i("slot", {
|
|
341
|
-
key: "
|
|
344
|
+
key: "f570a1a19b97bd7eb4b2ae38975db95ff1153b00",
|
|
342
345
|
name: "popover-top"
|
|
343
346
|
})), i("q2-option-list", {
|
|
344
|
-
key: "
|
|
347
|
+
key: "aca9ff86903dcf5b4e5138541ac20dac68955fb7",
|
|
345
348
|
type: "listbox",
|
|
346
349
|
ref: t => this.optionList = t,
|
|
347
350
|
id: "option-list",
|
|
@@ -352,16 +355,16 @@ const v = class {
|
|
|
352
355
|
onPopoverState: this.onPopoverState,
|
|
353
356
|
label: s("tecton.element.optionList.label", [ this.optionListLabel ])
|
|
354
357
|
}, i("slot", {
|
|
355
|
-
key: "
|
|
358
|
+
key: "89c5f3739c36206ceecb06245ba3052491b89898"
|
|
356
359
|
})), i("div", {
|
|
357
|
-
key: "
|
|
360
|
+
key: "8f98c6b4a59c2c0675b5648aed4a1110f0136d87",
|
|
358
361
|
ref: t => this.popoverBottomContainer = t,
|
|
359
362
|
class: "popover-bottom-container",
|
|
360
363
|
tabindex: "-1",
|
|
361
364
|
hidden: !this.hasPopoverBottom,
|
|
362
365
|
onKeyDown: this.handleSlotKeydown
|
|
363
366
|
}, i("slot", {
|
|
364
|
-
key: "
|
|
367
|
+
key: "75ef6c235c31755e0a5b9905db16e02ff8c4eea3",
|
|
365
368
|
name: "popover-bottom"
|
|
366
369
|
})))));
|
|
367
370
|
}
|
|
@@ -383,6 +386,6 @@ const v = class {
|
|
|
383
386
|
}
|
|
384
387
|
};
|
|
385
388
|
|
|
386
|
-
v.style = '*{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}@container style(--t-prefers-motion: "reduced"){*,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;animation-delay:0ms !important;transition-delay:0ms !important}}@container (not style(--t-prefers-motion: "normal")) and (not style(--t-prefers-motion: "reduced")){@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;animation-delay:0ms !important;transition-delay:0ms !important}}}: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))}.popover-top-container{position:sticky;top:0;z-index:5}.popover-bottom-container{position:sticky;bottom:0;z-index:5}.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)));--comp-btn-box-shadow:var(--tct-pill-btn-box-shadow, none);--comp-btn-backdrop-filter:var(--tct-pill-btn-backdrop-filter, none);--comp-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-letter-spacing:var(--tct-pill-btn-letter-spacing, inherit);--comp-btn-color:var(--tct-pill-btn-color, var(--t-pill-btn-color, var(--t-gray-3, #262626)));--comp-active-btn-color:var(--tct-pill-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-box-shadow:var(--tct-pill-active-btn-box-shadow, var(--tct-pill-btn-box-shadow, none));--comp-active-btn-backdrop-filter:var(--tct-pill-active-btn-backdrop-filter, none);--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}.btn-wrapper.has-options,.btn-wrapper.has-icon{--comp-close-size:var(--comp-pill-btn-height)}:host([active]:not([active=false])) .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(--tct-pill-primary-active-background, var(--t-primary, #0079c1));--comp-active-btn-box-shadow:var(--tct-pill-primary-active-btn-box-shadow, none);--comp-active-btn-backdrop-filter:var(--tct-pill-primary-active-backdrop-filter, none);--comp-active-btn-color:var(--tct-pill-primary-active-font-color, var(--t-primary-text, #ffffff));--comp-active-btn-border-color:var(--tct-pill-primary-active-border-color, var(--t-primary, #0079c1));--comp-hover-active-btn-background:var(--tct-pill-primary-active-hover-background, var(--t-primary-l3, #21acff));--comp-hover-active-btn-border-color:var(--tct-pill-primary-active-hover-border-color, var(--t-primary-l3, #21acff))}:host([theme=secondary]) .btn-wrapper{--comp-active-btn-background:var(--tct-pill-secondary-active-background, var(--t-secondary, #b3c2cc));--comp-active-btn-box-shadow:var(--tct-pill-secondary-active-box-shadow, none);--comp-active-btn-backdrop-filter:var(--tct-pill-secondary-active-backdrop-filter, none);--comp-active-btn-color:var(--tct-pill-secondary-active-font-color, var(--t-secondary-text, #141414));--comp-active-btn-border-color:var(--tct-pill-secondary-active-border-color, var(--t-secondary, #b3c2cc));--comp-hover-active-btn-background:var(--tct-pill-secondary-active-hover-background, var(--t-secondary-l3, #c9d5db));--comp-hover-active-btn-border-color:var(--tct-pill-secondary-active-hover-border-color, var(--t-secondary-l3, #c9d5db))}:host([theme=tertiary]) .btn-wrapper{--comp-active-btn-background:var(--tct-pill-tertiary-active-background, var(--t-tertiary, #e8f5fc));--comp-active-btn-box-shadow:var(--tct-pill-tertiary-active-box-shadow, none);--comp-active-btn-backdrop-filter:var(--tct-pill-tertiary-active-backdrop-filter, none);--comp-active-btn-color:var(--tct-pill-tertiary-active-font-color, var(--t-tertiary-text, #141414));--comp-active-btn-border-color:var(--tct-pill-tertiary-active-border-color, var(--t-tertiary, #e8f5fc));--comp-hover-active-btn-background:var(--tct-pill-tertiary-active-hover-background, var(--t-tertiary-l3, #eff8fd));--comp-hover-active-btn-border-color:var(--tct-pill-tertiary-active-hover-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);box-shadow:var(--comp-btn-box-shadow);backdrop-filter:var(--comp-btn-backdrop-filter);border-width:var(--comp-pill-btn-border-width);border-color:var(--tct-pill-btn-border-color, var(--t-pill-btn-border-color, var(--t-a11y-gray-color-AA, #949494)));letter-spacing:var(--comp-btn-letter-spacing);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, var(--const-px-14, 14px))));font-weight:var(--tct-pill-btn-font-weight, 400);color:var(--comp-btn-color);display:flex;align-items:center;gap:var(--app-scale-1x, 5px);width:100%;text-align:start}.btn-primary ::slotted(q2-icon[slot=decorator]){--tct-icon-size:1em;--tct-icon-stroke-primary:var(--tct-pill-decorator-icon-primary-stroke, var(--comp-btn-color));--tct-icon-stroke-secondary:var(--tct-pill-decorator-icon-secondary-stroke, var(--comp-btn-color))}.btn-primary:focus{box-shadow:var(--tct-pill-btn-focus-box-shadow, var(--const-double-focus-ring))}.btn-primary:focus-visible{box-shadow:var(--tct-pill-btn-focus-visible-box-shadow, var(--const-double-focus-ring))}.btn-primary:hover{background:var(--comp-hover-btn-background)}.has-options .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]:not([active=false])) .btn-primary{background:var(--comp-active-btn-background);box-shadow:var(--comp-active-btn-box-shadow);backdrop-filter:var(--comp-active-btn-backdrop-filter);border-color:var(--comp-active-btn-border-color);color:var(--comp-active-btn-color)}:host([active]:not([active=false])) .btn-primary:focus{box-shadow:var(--tct-pill-btn-focus-box-shadow, var(--const-double-focus-ring))}:host([active]:not([active=false])) .btn-primary:focus-visible{box-shadow:var(--tct-pill-btn-focus-visible-box-shadow, var(--const-double-focus-ring))}:host([active]:not([active=false])) .btn-primary:hover{background:var(--comp-hover-active-btn-background);border-color:var(--comp-hover-active-btn-border-color)}:host([active]:not([active=false])) .btn-primary ::slotted(q2-icon[slot=decorator]){--tct-icon-stroke-primary:var(--tct-pill-active-decorator-icon-primary-stroke, var(--tct-pill-decorator-icon-primary-stroke, var(--comp-active-btn-color)));--tct-icon-stroke-secondary:var(--tct-pill-active-decorator-icon-secondary-stroke, var(--tct-pill-decorator-icon-secondary-stroke, var(--comp-active-btn-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}.btn-close:focus-visible{box-shadow:var(--tct-pill-btn-focus-visible-box-shadow, var(--const-double-focus-ring))}:host([active]:not([active=false])) .btn-close{color:var(--comp-active-btn-color)}.has-options .btn-close,.has-icon .btn-close{opacity:1}q2-icon{--tct-icon-stroke-primary:var(--tct-pill-icon-stroke, currentcolor);--tct-icon-stroke-width:var(--tct-pill-icon-stroke-width, inherit);width:var(--tct-pill-icon-size, var(--t-pill-icon-size, var(--const-px-18, 18px)));height:var(--tct-pill-icon-size, var(--t-pill-icon-size, var(--const-px-18, 18px)));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]:not([active=false])) button.btn-close:focus,:host([active]:not([active=false])) 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)}:host([borderless]:not([borderless=false])) button{border-style:none}';
|
|
389
|
+
v.style = '*{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}@container style(--t-prefers-motion: "reduced"){*,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;animation-delay:0ms !important;transition-delay:0ms !important}}@container (not style(--t-prefers-motion: "normal")) and (not style(--t-prefers-motion: "reduced")){@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;animation-delay:0ms !important;transition-delay:0ms !important}}}:host{display:inline-block;max-width:100%;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))}.popover-top-container{position:sticky;top:0;z-index:5}.popover-bottom-container{position:sticky;bottom:0;z-index:5}.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)));--comp-btn-box-shadow:var(--tct-pill-btn-box-shadow, none);--comp-btn-backdrop-filter:var(--tct-pill-btn-backdrop-filter, none);--comp-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-letter-spacing:var(--tct-pill-btn-letter-spacing, inherit);--comp-btn-color:var(--tct-pill-btn-color, var(--t-pill-btn-color, var(--t-gray-3, #262626)));--comp-active-btn-color:var(--tct-pill-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-box-shadow:var(--tct-pill-active-btn-box-shadow, var(--tct-pill-btn-box-shadow, none));--comp-active-btn-backdrop-filter:var(--tct-pill-active-btn-backdrop-filter, none);--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}.btn-wrapper.has-options,.btn-wrapper.has-icon{--comp-close-size:var(--comp-pill-btn-height)}:host([active]:not([active=false])) .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(--tct-pill-primary-active-background, var(--t-primary, #0079c1));--comp-active-btn-box-shadow:var(--tct-pill-primary-active-btn-box-shadow, none);--comp-active-btn-backdrop-filter:var(--tct-pill-primary-active-backdrop-filter, none);--comp-active-btn-color:var(--tct-pill-primary-active-font-color, var(--t-primary-text, #ffffff));--comp-active-btn-border-color:var(--tct-pill-primary-active-border-color, var(--t-primary, #0079c1));--comp-hover-active-btn-background:var(--tct-pill-primary-active-hover-background, var(--t-primary-l3, #21acff));--comp-hover-active-btn-border-color:var(--tct-pill-primary-active-hover-border-color, var(--t-primary-l3, #21acff))}:host([theme=secondary]) .btn-wrapper{--comp-active-btn-background:var(--tct-pill-secondary-active-background, var(--t-secondary, #b3c2cc));--comp-active-btn-box-shadow:var(--tct-pill-secondary-active-box-shadow, none);--comp-active-btn-backdrop-filter:var(--tct-pill-secondary-active-backdrop-filter, none);--comp-active-btn-color:var(--tct-pill-secondary-active-font-color, var(--t-secondary-text, #141414));--comp-active-btn-border-color:var(--tct-pill-secondary-active-border-color, var(--t-secondary, #b3c2cc));--comp-hover-active-btn-background:var(--tct-pill-secondary-active-hover-background, var(--t-secondary-l3, #c9d5db));--comp-hover-active-btn-border-color:var(--tct-pill-secondary-active-hover-border-color, var(--t-secondary-l3, #c9d5db))}:host([theme=tertiary]) .btn-wrapper{--comp-active-btn-background:var(--tct-pill-tertiary-active-background, var(--t-tertiary, #e8f5fc));--comp-active-btn-box-shadow:var(--tct-pill-tertiary-active-box-shadow, none);--comp-active-btn-backdrop-filter:var(--tct-pill-tertiary-active-backdrop-filter, none);--comp-active-btn-color:var(--tct-pill-tertiary-active-font-color, var(--t-tertiary-text, #141414));--comp-active-btn-border-color:var(--tct-pill-tertiary-active-border-color, var(--t-tertiary, #e8f5fc));--comp-hover-active-btn-background:var(--tct-pill-tertiary-active-hover-background, var(--t-tertiary-l3, #eff8fd));--comp-hover-active-btn-border-color:var(--tct-pill-tertiary-active-hover-border-color, var(--t-tertiary-l3, #eff8fd))}.btn-height-wrapper{min-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;min-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);box-shadow:var(--comp-btn-box-shadow);backdrop-filter:var(--comp-btn-backdrop-filter);border-width:var(--comp-pill-btn-border-width);border-color:var(--tct-pill-btn-border-color, var(--t-pill-btn-border-color, var(--t-a11y-gray-color-AA, #949494)));letter-spacing:var(--comp-btn-letter-spacing);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, var(--const-px-14, 14px))));font-weight:var(--tct-pill-btn-font-weight, 400);color:var(--comp-btn-color);display:flex;align-items:center;gap:var(--app-scale-1x, 5px);width:100%;max-width:var(--tct-pill-max-width, var(--t-pill-max-width, calc(200 * var(--t-px-1, 1px))));min-width:0;text-align:start}.btn-primary ::slotted(q2-icon[slot=decorator]){flex-shrink:0;--tct-icon-size:1em;--tct-icon-stroke-primary:var(--tct-pill-decorator-icon-primary-stroke, var(--comp-btn-color));--tct-icon-stroke-secondary:var(--tct-pill-decorator-icon-secondary-stroke, var(--comp-btn-color))}.btn-primary:focus{box-shadow:var(--tct-pill-btn-focus-box-shadow, var(--const-double-focus-ring))}.btn-primary:focus-visible{box-shadow:var(--tct-pill-btn-focus-visible-box-shadow, var(--const-double-focus-ring))}.btn-primary:hover{background:var(--comp-hover-btn-background)}.has-options .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))}:host([active]:not([active=false])) .btn-primary{background:var(--comp-active-btn-background);box-shadow:var(--comp-active-btn-box-shadow);backdrop-filter:var(--comp-active-btn-backdrop-filter);border-color:var(--comp-active-btn-border-color);color:var(--comp-active-btn-color)}:host([active]:not([active=false])) .btn-primary:focus{box-shadow:var(--tct-pill-btn-focus-box-shadow, var(--const-double-focus-ring))}:host([active]:not([active=false])) .btn-primary:focus-visible{box-shadow:var(--tct-pill-btn-focus-visible-box-shadow, var(--const-double-focus-ring))}:host([active]:not([active=false])) .btn-primary:hover{background:var(--comp-hover-active-btn-background);border-color:var(--comp-hover-active-btn-border-color)}:host([active]:not([active=false])) .btn-primary ::slotted(q2-icon[slot=decorator]){--tct-icon-stroke-primary:var(--tct-pill-active-decorator-icon-primary-stroke, var(--tct-pill-decorator-icon-primary-stroke, var(--comp-active-btn-color)));--tct-icon-stroke-secondary:var(--tct-pill-active-decorator-icon-secondary-stroke, var(--tct-pill-decorator-icon-secondary-stroke, var(--comp-active-btn-color)))}.pill-label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;min-width:0}.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}.btn-close:focus-visible{box-shadow:var(--tct-pill-btn-focus-visible-box-shadow, var(--const-double-focus-ring))}:host([active]:not([active=false])) .btn-close{color:var(--comp-active-btn-color)}.has-options .btn-close,.has-icon .btn-close{opacity:1}q2-icon{--tct-icon-stroke-primary:var(--tct-pill-icon-stroke, currentcolor);--tct-icon-stroke-width:var(--tct-pill-icon-stroke-width, inherit);width:var(--tct-pill-icon-size, var(--t-pill-icon-size, var(--const-px-18, 18px)));height:var(--tct-pill-icon-size, var(--t-pill-icon-size, var(--const-px-18, 18px)));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]:not([active=false])) button.btn-close:focus,:host([active]:not([active=false])) 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)}:host([borderless]:not([borderless=false])) button{border-style:none}';
|
|
387
390
|
|
|
388
391
|
export { v as q2_pill }
|
|
@@ -63,16 +63,16 @@ const o = class {
|
|
|
63
63
|
// #endregion
|
|
64
64
|
// #region Watchers
|
|
65
65
|
updateMessage() {
|
|
66
|
-
const {isValidDate: t, isBaseDateProvided: e, isValidBaseDate: i, dateObject: s, baseDateObject: o, locale: r, handleNumeric: d, messageFormat: l, isValidUnit: h, unit:
|
|
66
|
+
const {isValidDate: t, isBaseDateProvided: e, isValidBaseDate: i, dateObject: s, baseDateObject: o, locale: r, handleNumeric: d, messageFormat: l, isValidUnit: h, unit: u, trimSuffix: c} = this;
|
|
67
67
|
if (!t || e && !i) return this.sync = !1, void (this.displayedMessage = a("tecton.element.relativeTime.invalidDate"));
|
|
68
68
|
const m = n.intlFormatDistance(new Date(s), new Date(o), {
|
|
69
69
|
locale: r || document.documentElement.lang || "en-US",
|
|
70
70
|
localeMatcher: "best fit",
|
|
71
71
|
numeric: d,
|
|
72
72
|
style: l,
|
|
73
|
-
unit: h ?
|
|
73
|
+
unit: h ? u : null
|
|
74
74
|
});
|
|
75
|
-
this.displayedMessage =
|
|
75
|
+
this.displayedMessage = c ? this.trimMessage(m) : m;
|
|
76
76
|
}
|
|
77
77
|
syncUpdated() {
|
|
78
78
|
this.sync ? this.syncTimer = window.setInterval((() => {
|
|
@@ -118,7 +118,7 @@ const o = class {
|
|
|
118
118
|
render() {
|
|
119
119
|
const {shouldShow: t, displayedMessage: s} = this;
|
|
120
120
|
return e(i, {
|
|
121
|
-
key: "
|
|
121
|
+
key: "e32fc9201354f10456368f47c0a7b6e50fd3eeb2"
|
|
122
122
|
}, t ? e("time", {
|
|
123
123
|
dateTime: s
|
|
124
124
|
}, s) : null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as t, c as i, h as e, F as s, g as o } from "./index-Cqkz7Bnm.js";
|
|
2
2
|
|
|
3
|
-
import { o as n, i as r, w as
|
|
3
|
+
import { o as n, i as r, w as a, l } from "./index-CP8pXJ-l.js";
|
|
4
4
|
|
|
5
5
|
const h = class {
|
|
6
6
|
constructor(e) {
|
|
@@ -144,8 +144,8 @@ const h = class {
|
|
|
144
144
|
var t, i, e, s;
|
|
145
145
|
const o = this.hostElement.shadowRoot;
|
|
146
146
|
if (!o) return;
|
|
147
|
-
const n = o.querySelector('slot[name="popover-top"]'), r = o.querySelector('slot[name="popover-bottom"]'),
|
|
148
|
-
this.hasPopoverTop !==
|
|
147
|
+
const n = o.querySelector('slot[name="popover-top"]'), r = o.querySelector('slot[name="popover-bottom"]'), a = o.querySelector('slot[name="empty"]'), l = (null !== (t = null == n ? void 0 : n.assignedNodes().length) && void 0 !== t ? t : 0) > 0, h = (null !== (i = null == r ? void 0 : r.assignedNodes().length) && void 0 !== i ? i : 0) > 0, c = (null !== (e = null == a ? void 0 : a.assignedNodes().length) && void 0 !== e ? e : 0) > 0, d = this.optionElements.length > 0;
|
|
148
|
+
this.hasPopoverTop !== l && (this.hasPopoverTop = l), this.hasPopoverBottom !== h && (this.hasPopoverBottom = h),
|
|
149
149
|
this.hasEmptySlot !== c && (this.hasEmptySlot = c), this.hasOptions !== d && (this.hasOptions = d),
|
|
150
150
|
// If input-only mode just turned on while popover was open, close it.
|
|
151
151
|
this.open && this.isInputOnlyMode && this.closeDropdown(), this.checkSelectedOptions(),
|
|
@@ -246,13 +246,13 @@ const h = class {
|
|
|
246
246
|
* @testOnly
|
|
247
247
|
*/
|
|
248
248
|
async closePopover() {
|
|
249
|
-
this.closeDropdown(), await
|
|
249
|
+
this.closeDropdown(), await a();
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
252
|
* Opens the popover.
|
|
253
253
|
* @testOnly
|
|
254
254
|
*/ async openPopover() {
|
|
255
|
-
this.openDropdown(), await
|
|
255
|
+
this.openDropdown(), await a();
|
|
256
256
|
}
|
|
257
257
|
/**
|
|
258
258
|
* Resets the search to its initial state: clears the input, the
|
|
@@ -288,14 +288,14 @@ const h = class {
|
|
|
288
288
|
this.open || await this.openPopover(), e.forEach((t => {
|
|
289
289
|
var i;
|
|
290
290
|
null === (i = this.optionElements.find((i => i.value === t))) || void 0 === i || i.click();
|
|
291
|
-
})), i.closePopover && (await this.closePopover(), await
|
|
291
|
+
})), i.closePopover && (await this.closePopover(), await a());
|
|
292
292
|
}
|
|
293
293
|
// #endregion
|
|
294
294
|
// #region Watchers
|
|
295
295
|
onLoadingChange(t) {
|
|
296
296
|
// When loading turns on with the input focused but the popover was closed (because
|
|
297
297
|
// input-only mode was active), open the popover so the spinner is visible.
|
|
298
|
-
t && this.inputFocused && !this.open && this.openDropdown(), t ? this.setStatusMessage(
|
|
298
|
+
t && this.inputFocused && !this.open && this.openDropdown(), t ? this.setStatusMessage(l("tecton.element.search.loading")) : this.open && this.announceResults();
|
|
299
299
|
}
|
|
300
300
|
onMultilineOptionsChange() {
|
|
301
301
|
this.applyMultilineOptions();
|
|
@@ -384,7 +384,7 @@ const h = class {
|
|
|
384
384
|
this.inputFocused && t.push("is-focused"), t.join(" ");
|
|
385
385
|
}
|
|
386
386
|
announceResults() {
|
|
387
|
-
const t = this.visibleOptionElements.length, i = 0 === t ?
|
|
387
|
+
const t = this.visibleOptionElements.length, i = 0 === t ? l("tecton.element.search.noResults") : l("tecton.element.search.results", [ t ]);
|
|
388
388
|
this.setStatusMessage(i);
|
|
389
389
|
}
|
|
390
390
|
applyLocalFilter() {
|
|
@@ -402,12 +402,12 @@ const h = class {
|
|
|
402
402
|
}
|
|
403
403
|
checkSelectedDisplay() {
|
|
404
404
|
var t;
|
|
405
|
-
const {multilineOptions: i, isShowingSelectionDisplay: e, value: s, multiple: o, selectedOptions: n, firstSelectedOptionElement: r} = this,
|
|
406
|
-
if (!i || !e ||
|
|
405
|
+
const {multilineOptions: i, isShowingSelectionDisplay: e, value: s, multiple: o, selectedOptions: n, firstSelectedOptionElement: r} = this, a = o ? !(null == n ? void 0 : n.length) : !s;
|
|
406
|
+
if (!i || !e || a) return this.clearSelectedDisplay();
|
|
407
407
|
if (!r || r.display) return this.clearSelectedDisplay();
|
|
408
|
-
const
|
|
409
|
-
if (!
|
|
410
|
-
const h =
|
|
408
|
+
const l = r.firstElementChild;
|
|
409
|
+
if (!l) return this.clearSelectedDisplay();
|
|
410
|
+
const h = l.cloneNode(!0);
|
|
411
411
|
h.querySelectorAll("[hide-on-select]").forEach((t => t.remove()));
|
|
412
412
|
let c = this.selectedDisplaySlot;
|
|
413
413
|
return c ? (null === (t = c.firstElementChild) || void 0 === t ? void 0 : t.outerHTML) !== h.outerHTML && c.replaceChildren(h) : (c = document.createElement("div"),
|
|
@@ -446,7 +446,7 @@ const h = class {
|
|
|
446
446
|
}
|
|
447
447
|
optionDisplayText(t, i = "") {
|
|
448
448
|
var e, s;
|
|
449
|
-
return (null == t ? void 0 : t.display) ?
|
|
449
|
+
return (null == t ? void 0 : t.display) ? l(t.display) : this.multilineOptions ? "" : null !== (s = null === (e = null == t ? void 0 : t.textContent) || void 0 === e ? void 0 : e.trim()) && void 0 !== s ? s : i;
|
|
450
450
|
}
|
|
451
451
|
revertToSelectedDisplay() {
|
|
452
452
|
var t, i, e;
|
|
@@ -469,7 +469,7 @@ const h = class {
|
|
|
469
469
|
const s = this.optionElements.find((t => t.value === this.value));
|
|
470
470
|
// Same guard: don't clobber an in-progress query when the matching option isn't in the DOM.
|
|
471
471
|
if (!s) return;
|
|
472
|
-
const o = s.display ?
|
|
472
|
+
const o = s.display ? l(s.display) : this.multilineOptions ? "" : null !== (e = null === (i = s.textContent) || void 0 === i ? void 0 : i.trim()) && void 0 !== e ? e : "";
|
|
473
473
|
this.isShowingSelectionDisplay = !0, this.searchText !== o ? this.searchText = o : this.checkSelectedDisplay();
|
|
474
474
|
}
|
|
475
475
|
setCustomLabel() {
|
|
@@ -504,7 +504,7 @@ const h = class {
|
|
|
504
504
|
name: "empty"
|
|
505
505
|
}) : e("div", {
|
|
506
506
|
class: "no-results"
|
|
507
|
-
},
|
|
507
|
+
}, l(this.noResultsMessage));
|
|
508
508
|
}
|
|
509
509
|
renderMultiSelectHeader() {
|
|
510
510
|
var t, i;
|
|
@@ -513,19 +513,19 @@ const h = class {
|
|
|
513
513
|
return e("div", {
|
|
514
514
|
class: "multi-select-header"
|
|
515
515
|
}, e("fieldset", null, e("legend", {
|
|
516
|
-
"aria-label":
|
|
517
|
-
},
|
|
516
|
+
"aria-label": l("tecton.element.search.multiHeader.showing")
|
|
517
|
+
}, l("tecton.element.search.multiHeader.showing")), e("div", null, e("input", {
|
|
518
518
|
class: "sr",
|
|
519
519
|
type: "radio",
|
|
520
520
|
id: `${this.optionListId}-results`,
|
|
521
521
|
name: `${this.optionListId}-view`,
|
|
522
522
|
value: "results",
|
|
523
523
|
checked: !n,
|
|
524
|
-
"aria-label":
|
|
524
|
+
"aria-label": l("tecton.element.search.multiHeader.resultsAriaLabel", [ o ]),
|
|
525
525
|
onClick: this.showAllOptions
|
|
526
526
|
}), e("label", {
|
|
527
527
|
htmlFor: `${this.optionListId}-results`
|
|
528
|
-
},
|
|
528
|
+
}, l("tecton.element.search.multiHeader.results", [ o ]))), e("div", null, e("input", {
|
|
529
529
|
class: "sr",
|
|
530
530
|
type: "radio",
|
|
531
531
|
id: `${this.optionListId}-selected`,
|
|
@@ -533,11 +533,11 @@ const h = class {
|
|
|
533
533
|
value: "selected",
|
|
534
534
|
disabled: 0 === s,
|
|
535
535
|
checked: n,
|
|
536
|
-
"aria-label":
|
|
536
|
+
"aria-label": l("tecton.element.search.multiHeader.selectedAriaLabel", [ s ]),
|
|
537
537
|
onClick: this.showSelectedOptions
|
|
538
538
|
}), e("label", {
|
|
539
539
|
htmlFor: `${this.optionListId}-selected`
|
|
540
|
-
},
|
|
540
|
+
}, l("tecton.element.search.multiHeader.selected", [ s ])))));
|
|
541
541
|
}
|
|
542
542
|
renderOptionsDropdown() {
|
|
543
543
|
var t;
|
|
@@ -578,7 +578,7 @@ const h = class {
|
|
|
578
578
|
ref: t => this.optionList = t,
|
|
579
579
|
type: "listbox",
|
|
580
580
|
id: this.optionListId,
|
|
581
|
-
label:
|
|
581
|
+
label: l(this.listLabel),
|
|
582
582
|
multiple: this.multiple,
|
|
583
583
|
selectedOptions: this.structuredSelectedOptions,
|
|
584
584
|
showSelected: this.showSelected,
|
|
@@ -601,32 +601,32 @@ const h = class {
|
|
|
601
601
|
}
|
|
602
602
|
render() {
|
|
603
603
|
return e(s, {
|
|
604
|
-
key: "
|
|
604
|
+
key: "4b3787554c37521bc3467345cdd1d733cffba3a5"
|
|
605
605
|
}, e("div", {
|
|
606
|
-
key: "
|
|
606
|
+
key: "696caa142cffecf1e0d62afafd826dce37f75512",
|
|
607
607
|
"aria-live": "polite",
|
|
608
608
|
"aria-atomic": "true",
|
|
609
609
|
role: "status",
|
|
610
610
|
class: "sr"
|
|
611
611
|
}, this.statusMessage), e("click-elsewhere", {
|
|
612
|
-
key: "
|
|
612
|
+
key: "f8b493ec8f7da09fad48f9fa30f0e9be7fbaedf4",
|
|
613
613
|
class: this.wrapperClasses,
|
|
614
614
|
role: "presentation",
|
|
615
615
|
onChange: this.onClickElsewhere
|
|
616
616
|
}, e("q2-input", {
|
|
617
|
-
key: "
|
|
617
|
+
key: "44e0ad4b7825ac319dd4277ccb93d4dd66acef12",
|
|
618
618
|
ref: t => this.inputField = t,
|
|
619
619
|
class: "q2-search-input",
|
|
620
|
-
label: this.label &&
|
|
620
|
+
label: this.label && l(this.label) || "",
|
|
621
621
|
value: this.searchText,
|
|
622
622
|
iconLeft: "search",
|
|
623
623
|
clearable: this.clearable && !this.loading && !!this.searchText,
|
|
624
624
|
disabled: this.disabled,
|
|
625
625
|
optional: this.optional,
|
|
626
626
|
readonly: !!this.readonly,
|
|
627
|
-
placeholder: this.placeholder ?
|
|
627
|
+
placeholder: this.placeholder ? l(this.placeholder) : void 0,
|
|
628
628
|
hideLabel: this.hideLabel,
|
|
629
|
-
errors: Array.isArray(this.errors) && this.errors.length > 0 && this.errors.map((t =>
|
|
629
|
+
errors: Array.isArray(this.errors) && this.errors.length > 0 && this.errors.map((t => l(t))) || this.invalid && [ "tecton.element.search.invalid" ] || [],
|
|
630
630
|
ariaExpanded: this.isInputOnlyMode ? void 0 : `${this.open}`,
|
|
631
631
|
ariaControls: this.isInputOnlyMode ? void 0 : this.optionListId,
|
|
632
632
|
ariaHaspopup: this.isInputOnlyMode ? void 0 : "listbox",
|
|
@@ -121,29 +121,29 @@ const p = class {
|
|
|
121
121
|
n && (a ? e.push("is-closed") : r && e.push("is-transitioning"));
|
|
122
122
|
const s = !this.hasYieldedHeader && !!this.label;
|
|
123
123
|
return i("section", {
|
|
124
|
-
key: "
|
|
124
|
+
key: "5adb22a7e6cf098fa3cf2325c945c6aa1c20b2d5",
|
|
125
125
|
class: "wrapper"
|
|
126
126
|
}, i("header", {
|
|
127
|
-
key: "
|
|
127
|
+
key: "c04df6d07756c27374e4be85ad88848a0c1ac897",
|
|
128
128
|
class: t ? "has-header" : ""
|
|
129
129
|
}, i("div", {
|
|
130
|
-
key: "
|
|
130
|
+
key: "8cd09e8bf367a7510b91106b8ebd4f419faff861",
|
|
131
131
|
class: "header-content",
|
|
132
132
|
id: this.titleId,
|
|
133
133
|
onClick: this.collapsible && this.onHeaderClick
|
|
134
134
|
}, s && i("h2", {
|
|
135
|
-
key: "
|
|
135
|
+
key: "195e1523e68c83e294bd92d617b8c4d44e679494",
|
|
136
136
|
class: "title"
|
|
137
137
|
}, d(this.label)), i("div", {
|
|
138
|
-
key: "
|
|
138
|
+
key: "e493986ee113d44bf74b11116003939f3db24bd7",
|
|
139
139
|
ref: t => this.headerSlotWrapper = t,
|
|
140
140
|
class: "header-slot-wrapper"
|
|
141
141
|
}, i("slot", {
|
|
142
|
-
key: "
|
|
142
|
+
key: "44f2dc2ca76acfd800a1435608a75bf6e3258d37",
|
|
143
143
|
ref: t => this.headerSlot = t,
|
|
144
144
|
name: "q2-section-header"
|
|
145
145
|
}))), this.collapsible && !this.noCollapseIcon && i("q2-btn", {
|
|
146
|
-
key: "
|
|
146
|
+
key: "b2602555b9282c8149780f65d2fbaa65febc1f50",
|
|
147
147
|
label: d(this.label || "tecton.element.section.defaultToggleLabel"),
|
|
148
148
|
ariaExpanded: `${!!this.expanded}`,
|
|
149
149
|
ariaControls: this.contentId,
|
|
@@ -151,10 +151,10 @@ const p = class {
|
|
|
151
151
|
"hide-label": !0,
|
|
152
152
|
onClick: this.onHeaderClick
|
|
153
153
|
}, i("q2-icon", {
|
|
154
|
-
key: "
|
|
154
|
+
key: "62728524b58cf5cf7aa2531df1218d3bf0b40b0a",
|
|
155
155
|
type: "chevron-up"
|
|
156
156
|
}))), i("div", {
|
|
157
|
-
key: "
|
|
157
|
+
key: "13ef854a01937880007fb4021b1528c1b83fe937",
|
|
158
158
|
class: e.join(" "),
|
|
159
159
|
id: this.contentId,
|
|
160
160
|
"aria-labelledby": this.titleId,
|
|
@@ -164,12 +164,12 @@ const p = class {
|
|
|
164
164
|
height: this.contentHeight
|
|
165
165
|
}
|
|
166
166
|
}, i("div", {
|
|
167
|
-
key: "
|
|
167
|
+
key: "866d8b0301a9c5979f5b3bd31086d25f73373709",
|
|
168
168
|
ref: t => this.contentContainer = t,
|
|
169
169
|
class: "content",
|
|
170
170
|
tabindex: "-1"
|
|
171
171
|
}, i("slot", {
|
|
172
|
-
key: "
|
|
172
|
+
key: "36c97155aa106dc1587537066e031c7d6c032295",
|
|
173
173
|
ref: t => this.contentSlot = t
|
|
174
174
|
}))));
|
|
175
175
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as t, c as e, h as i, F as
|
|
1
|
+
import { r as t, c as e, h as i, F as a, H as s, g as n } from "./index-Cqkz7Bnm.js";
|
|
2
2
|
|
|
3
3
|
import { b as o } from "./component-DaQM9u3s.js";
|
|
4
4
|
|
|
@@ -69,35 +69,35 @@ const l = class {
|
|
|
69
69
|
// #region Render Methods
|
|
70
70
|
render() {
|
|
71
71
|
const {label: t, isActive: e} = this;
|
|
72
|
-
return i(
|
|
73
|
-
key: "
|
|
72
|
+
return i(s, {
|
|
73
|
+
key: "3929b6bdb716394892be2bcdd933864e43f0204e",
|
|
74
74
|
role: "listitem"
|
|
75
|
-
}, i(
|
|
76
|
-
key: "
|
|
75
|
+
}, i(a, {
|
|
76
|
+
key: "d913741a6b71aebef92be14fd7ee541a3d5568da"
|
|
77
77
|
}, i("div", {
|
|
78
|
-
key: "
|
|
78
|
+
key: "038d29ac861f70ad15350da7733b39eece30e538",
|
|
79
79
|
role: "group",
|
|
80
80
|
"aria-labelledby": "pane-label",
|
|
81
81
|
tabindex: "0",
|
|
82
82
|
hidden: !(e || this.isChildActive && this.showWithChildren)
|
|
83
83
|
}, i("slot", {
|
|
84
|
-
key: "
|
|
84
|
+
key: "56f4c0d9edfe134886d46367f2c801348267b53d"
|
|
85
85
|
})), i("div", {
|
|
86
|
-
key: "
|
|
86
|
+
key: "88bf8a9e1a6124c39d9ac4ee8906f61ac026966a",
|
|
87
87
|
hidden: !0
|
|
88
88
|
}, i("span", {
|
|
89
|
-
key: "
|
|
89
|
+
key: "db485a5e84ab67fe714f0861fcd05c4b0bd7722f",
|
|
90
90
|
id: "pane-label"
|
|
91
91
|
}, i("slot", {
|
|
92
|
-
key: "
|
|
92
|
+
key: "940a9a3a8543fd4c64425db2b7ea7b9cf079c947",
|
|
93
93
|
name: "label",
|
|
94
94
|
onSlotchange: () => this.contentChange.emit()
|
|
95
95
|
}, t && h(t))), i("slot", {
|
|
96
|
-
key: "
|
|
96
|
+
key: "74a78697ed1aa85fca66743023d303c7abea0116",
|
|
97
97
|
name: "description",
|
|
98
98
|
onSlotchange: () => this.contentChange.emit()
|
|
99
99
|
})), i("slot", {
|
|
100
|
-
key: "
|
|
100
|
+
key: "4fb660b547a2da7dca37de9106b20b93b72aaf83",
|
|
101
101
|
name: "children"
|
|
102
102
|
})));
|
|
103
103
|
}
|
|
@@ -299,15 +299,15 @@ const d = class {
|
|
|
299
299
|
}
|
|
300
300
|
render() {
|
|
301
301
|
return a(r, {
|
|
302
|
-
key: "
|
|
302
|
+
key: "d2e82613e91ef3acf210781f807807b0fba8e7fc"
|
|
303
303
|
}, a("ul", {
|
|
304
|
-
key: "
|
|
304
|
+
key: "1ad1e36d0fca4b0c1cf793de43d9ea9ccb76974f",
|
|
305
305
|
role: "tablist"
|
|
306
306
|
}, this.structuredPanes.map(((t, e) => this.renderStepBtn(t, e)))), a("div", {
|
|
307
|
-
key: "
|
|
307
|
+
key: "ee710c6cb41011be7a8223ec817563cfeaeb6b71",
|
|
308
308
|
role: "list"
|
|
309
309
|
}, a("slot", {
|
|
310
|
-
key: "
|
|
310
|
+
key: "0d1f6f53b73f72f163fc219de8db9736f669720d"
|
|
311
311
|
})));
|
|
312
312
|
}
|
|
313
313
|
get hostElement() {
|