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
|
@@ -249,50 +249,50 @@ const u = t(class extends e {
|
|
|
249
249
|
render() {
|
|
250
250
|
const {stepCount: t, scrollEnabled: e, showScrollLeft: r, showScrollRight: i} = this, s = [ "step-container" ];
|
|
251
251
|
return e && s.push("has-scroll"), a(o, {
|
|
252
|
-
key: "
|
|
252
|
+
key: "423f7d50f787abf21c14730ae9cd50cd3638b17b"
|
|
253
253
|
}, a("div", {
|
|
254
|
-
key: "
|
|
254
|
+
key: "2ffacd2f9792075956748eb6960975d9aeda28ad",
|
|
255
255
|
class: s.join(" ")
|
|
256
256
|
}, e && a(o, {
|
|
257
|
-
key: "
|
|
257
|
+
key: "da90a671295ce6702c3bc6f1ab71f671cda2c9c8"
|
|
258
258
|
}, a("div", {
|
|
259
|
-
key: "
|
|
259
|
+
key: "319c4a75dfafd7b03d3f7f13156f24bd1ca7b0c3",
|
|
260
260
|
class: "gradient-left",
|
|
261
261
|
hidden: !r
|
|
262
262
|
}), a("div", {
|
|
263
|
-
key: "
|
|
263
|
+
key: "80a08dc979685d94f6cfe20d66787d06e7d46014",
|
|
264
264
|
class: "gradient-right",
|
|
265
265
|
hidden: !i
|
|
266
266
|
}), a("q2-btn", {
|
|
267
|
-
key: "
|
|
267
|
+
key: "43a71cb3212ddbe37c6e7d7051850efd49ced456",
|
|
268
268
|
class: "btn-left",
|
|
269
269
|
hideLabel: !0,
|
|
270
270
|
hidden: !this.showScrollLeft,
|
|
271
271
|
label: c("tecton.element.stepper.scrollLeft"),
|
|
272
272
|
onTctClick: () => this.onScrollBtnClick("left")
|
|
273
273
|
}, a("q2-icon", {
|
|
274
|
-
key: "
|
|
274
|
+
key: "19ee5abc690bba84016fb8c692a74b5c233aa426",
|
|
275
275
|
type: "chevron-left"
|
|
276
276
|
})), a("q2-btn", {
|
|
277
|
-
key: "
|
|
277
|
+
key: "f26bc502269a5d60308aba041a6d9a75efcf2573",
|
|
278
278
|
class: "btn-right",
|
|
279
279
|
hideLabel: !0,
|
|
280
280
|
hidden: !this.showScrollRight,
|
|
281
281
|
label: c("tecton.element.stepper.scrollRight"),
|
|
282
282
|
onTctClick: () => this.onScrollBtnClick("right")
|
|
283
283
|
}, a("q2-icon", {
|
|
284
|
-
key: "
|
|
284
|
+
key: "7f35a54468433010427213e18d213b1c227413a6",
|
|
285
285
|
type: "chevron-right"
|
|
286
286
|
}))), a("ul", {
|
|
287
|
-
key: "
|
|
287
|
+
key: "0bc4eed617263c7e4a6138c3a884f6a1b8bc2ca6",
|
|
288
288
|
onScroll: this.checkScrollState,
|
|
289
289
|
ref: t => this.listElement = t,
|
|
290
290
|
role: "tablist"
|
|
291
291
|
}, t > 0 && [ ...Array(t).keys() ].map((t => this.renderStepBtn(t))))), a("div", {
|
|
292
|
-
key: "
|
|
292
|
+
key: "87945c612fcaa70164faa50d78bb63c9b290e3f2",
|
|
293
293
|
role: "list"
|
|
294
294
|
}, a("slot", {
|
|
295
|
-
key: "
|
|
295
|
+
key: "4b55529f41b4731dc1424c8be4fcd941ff2c2f33",
|
|
296
296
|
onSlotchange: () => this.onSlotChange()
|
|
297
297
|
})));
|
|
298
298
|
}
|
|
@@ -69,14 +69,14 @@ const n = r(class extends a {
|
|
|
69
69
|
// #region Render Methods
|
|
70
70
|
render() {
|
|
71
71
|
return t(o, {
|
|
72
|
-
key: "
|
|
72
|
+
key: "fba508447ca646c22aa4a14872d78e02294a2fa1"
|
|
73
73
|
}, t("div", {
|
|
74
|
-
key: "
|
|
74
|
+
key: "46ac755e4c071b2345be0ba4272f283ac2758a82",
|
|
75
75
|
class: "container",
|
|
76
76
|
role: this.clickable ? "button" : void 0,
|
|
77
77
|
tabIndex: this.clickable ? 0 : void 0
|
|
78
78
|
}, t("slot", {
|
|
79
|
-
key: "
|
|
79
|
+
key: "699fdd1427248cdff8ecf1b3b1ca1d4a892dd763"
|
|
80
80
|
})));
|
|
81
81
|
}
|
|
82
82
|
get hostElement() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement as t, HTMLElement as a, createEvent as e, h as i, Fragment as r, transformTag as o } from "@stencil/core/internal/client";
|
|
2
2
|
|
|
3
|
-
import { c as n, l as
|
|
3
|
+
import { c as n, l as c, o as s, i as l } from "./index2.js";
|
|
4
4
|
|
|
5
5
|
import { m as b } from "./mirror-emit.js";
|
|
6
6
|
|
|
@@ -145,7 +145,7 @@ const f = t(class extends a {
|
|
|
145
145
|
}
|
|
146
146
|
}, this.setTabs = () => {
|
|
147
147
|
this.tabs = this.tabPanes.map((({label: t, value: a, badgeCount: e, badgeDescription: i, badgeTheme: r, badgeStatus: o}) => ({
|
|
148
|
-
label: t &&
|
|
148
|
+
label: t && c(t) || "",
|
|
149
149
|
value: a,
|
|
150
150
|
badgeCount: e,
|
|
151
151
|
badgeDescription: i,
|
|
@@ -186,7 +186,7 @@ const f = t(class extends a {
|
|
|
186
186
|
componentDidLoad() {
|
|
187
187
|
var t;
|
|
188
188
|
null === (t = this.resizeObserver) || void 0 === t || t.observe(this.listElement),
|
|
189
|
-
this.checkScrollState(),
|
|
189
|
+
this.checkScrollState(), s(this.hostElement), this.scheduledAfterRender.push((() => this.determineTabMove())),
|
|
190
190
|
this.narrowViewportMedia && (this.narrowViewportListener = t => {
|
|
191
191
|
this.isNarrowViewport = t.matches;
|
|
192
192
|
}, this.narrowViewportMedia.addEventListener("change", this.narrowViewportListener));
|
|
@@ -274,7 +274,7 @@ const f = t(class extends a {
|
|
|
274
274
|
}
|
|
275
275
|
renderTabWithBadge(t, a) {
|
|
276
276
|
let e, r;
|
|
277
|
-
return !t.badgeStatus && a && (e = t.badgeTheme || "primary"), r = t.badgeDescription ?
|
|
277
|
+
return !t.badgeStatus && a && (e = t.badgeTheme || "primary"), r = t.badgeDescription ? c(t.badgeDescription) : t.badgeStatus ? c("tecton.element.tab.pane." + t.badgeStatus, [ t.badgeCount ]) : c("tecton.element.tab.pane.new"),
|
|
278
278
|
i("div", {
|
|
279
279
|
class: "tab-pane-badge",
|
|
280
280
|
"aria-label": `${t.label}, ${t.badgeCount} ${r}`
|
|
@@ -287,50 +287,50 @@ const f = t(class extends a {
|
|
|
287
287
|
render() {
|
|
288
288
|
const t = "vertical" === this.computedOrientation;
|
|
289
289
|
return i(r, {
|
|
290
|
-
key: "
|
|
290
|
+
key: "37c84e750a2494ea2b4302fd99e0cebc443d58ce"
|
|
291
291
|
}, i("div", {
|
|
292
|
-
key: "
|
|
292
|
+
key: "249effad5ab4e880c2c203ac0e4024557c310679",
|
|
293
293
|
class: "tab-container"
|
|
294
294
|
}, this.scrollEnabled && i(r, {
|
|
295
|
-
key: "
|
|
295
|
+
key: "10a7d53d5bde829e5897722cd924d40ce90a0b82"
|
|
296
296
|
}, i("div", {
|
|
297
|
-
key: "
|
|
297
|
+
key: "b2acc786c41a9d1a8d3e951fdc36ecea3a304664",
|
|
298
298
|
class: "gradient-left",
|
|
299
299
|
hidden: !this.showScrollBack
|
|
300
300
|
}), i("div", {
|
|
301
|
-
key: "
|
|
301
|
+
key: "fa70173c7d845f88417c6b6b6d54884ead80f34f",
|
|
302
302
|
class: "gradient-right",
|
|
303
303
|
hidden: !this.showScrollForward
|
|
304
304
|
}), i("q2-btn", {
|
|
305
|
-
key: "
|
|
305
|
+
key: "d953c160ff42503dce5bb7c60d8234bdd9196d73",
|
|
306
306
|
class: "btn-left",
|
|
307
307
|
hidden: !this.showScrollBack,
|
|
308
308
|
onTctClick: () => this.onScrollBtnClick("back")
|
|
309
309
|
}, i("q2-icon", {
|
|
310
|
-
key: "
|
|
310
|
+
key: "3980ef873b5d7ae6c50eb868455839344dda9701",
|
|
311
311
|
type: t ? "chevron-up" : "chevron-left",
|
|
312
312
|
label: t ? "scroll up" : "scroll left"
|
|
313
313
|
})), i("q2-btn", {
|
|
314
|
-
key: "
|
|
314
|
+
key: "a3b1f46355ab1de2f73ac7529b734b684194093f",
|
|
315
315
|
class: "btn-right",
|
|
316
316
|
hidden: !this.showScrollForward,
|
|
317
317
|
onTctClick: () => this.onScrollBtnClick("forward")
|
|
318
318
|
}, i("q2-icon", {
|
|
319
|
-
key: "
|
|
319
|
+
key: "a2ec50ff7e0cce3716ba890c626fa56e62ecddbb",
|
|
320
320
|
type: t ? "chevron-down" : "chevron-right",
|
|
321
321
|
label: t ? "scroll down" : "scroll right"
|
|
322
322
|
}))), i("ul", {
|
|
323
|
-
key: "
|
|
323
|
+
key: "e42bbb379d396a25b3af96985504a8f4bae1bba0",
|
|
324
324
|
onScroll: this.checkScrollState,
|
|
325
325
|
ref: t => this.listElement = t,
|
|
326
326
|
class: this.noPrint ? "no-print" : null,
|
|
327
327
|
role: "tablist",
|
|
328
328
|
"aria-orientation": this.computedOrientation
|
|
329
329
|
}, this.tabs.map(((t, a) => this.renderTab(t, a))))), i("div", {
|
|
330
|
-
key: "
|
|
330
|
+
key: "7d1f6ac5262cccb0b7087b3d93f33e46390814af",
|
|
331
331
|
class: "tab-content"
|
|
332
332
|
}, i("slot", {
|
|
333
|
-
key: "
|
|
333
|
+
key: "fa341fadca5ba04fe21ef7186cc0e15b5c7357db",
|
|
334
334
|
onSlotchange: () => this.onSlotChange()
|
|
335
335
|
})));
|
|
336
336
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { proxyCustomElement as e, HTMLElement as t, createEvent as n, h as
|
|
1
|
+
import { proxyCustomElement as e, HTMLElement as t, createEvent as n, h as a, transformTag as i } from "@stencil/core/internal/client";
|
|
2
2
|
|
|
3
3
|
import { b as o } from "./component.js";
|
|
4
4
|
|
|
@@ -19,16 +19,16 @@ const r = e(class extends t {
|
|
|
19
19
|
// #endregion
|
|
20
20
|
// #region Render Methods
|
|
21
21
|
render() {
|
|
22
|
-
return
|
|
23
|
-
key: "
|
|
22
|
+
return a("div", {
|
|
23
|
+
key: "1a957a6a6fb4dee7e420d46ad5f576b5b25008c4",
|
|
24
24
|
id: `tab-pane-${this.guid}-${this.index}`,
|
|
25
25
|
class: "tab-pane" + (this.selected ? "" : " hidden"),
|
|
26
26
|
role: "tabpanel",
|
|
27
27
|
tabindex: "-1",
|
|
28
28
|
"aria-hidden": "" + !this.selected,
|
|
29
29
|
"aria-labelledby": `tab-${this.guid}-${this.index}`
|
|
30
|
-
},
|
|
31
|
-
key: "
|
|
30
|
+
}, a("slot", {
|
|
31
|
+
key: "9c9dc847674f0a829feb822808f7e3dac9ac3263"
|
|
32
32
|
}));
|
|
33
33
|
}
|
|
34
34
|
get hostElement() {
|
|
@@ -82,7 +82,7 @@ const r = e(class extends t {
|
|
|
82
82
|
const s = r, defineCustomElement = function() {
|
|
83
83
|
if ("undefined" == typeof customElements) return;
|
|
84
84
|
[ "q2-tab-pane" ].forEach((e => {
|
|
85
|
-
if ("q2-tab-pane" === e) customElements.get(
|
|
85
|
+
if ("q2-tab-pane" === e) customElements.get(i(e)) || customElements.define(i(e), r);
|
|
86
86
|
}));
|
|
87
87
|
};
|
|
88
88
|
|
|
@@ -153,9 +153,9 @@ const f = t(class extends o {
|
|
|
153
153
|
this.optionCount && o.push("has-options");
|
|
154
154
|
const e = this.optionCount > 0;
|
|
155
155
|
return r(i, {
|
|
156
|
-
key: "
|
|
156
|
+
key: "a46abe562647fe64e55427bcc8284bbfc5f01e3f"
|
|
157
157
|
}, r("click-elsewhere", {
|
|
158
|
-
key: "
|
|
158
|
+
key: "667e76295c30be78462ee67128a8fb2c38c01285",
|
|
159
159
|
onChange: this.onClickElsewhere
|
|
160
160
|
}, e ? r(a, null, r("button", {
|
|
161
161
|
class: "tag-wrapper",
|
|
@@ -182,7 +182,7 @@ const f = t(class extends o {
|
|
|
182
182
|
}, r("slot", {
|
|
183
183
|
name: "decorator"
|
|
184
184
|
}), l(this.label))), e && r("q2-popover", {
|
|
185
|
-
key: "
|
|
185
|
+
key: "805e64b738fc5a0b1a73968636a8843af33834ef",
|
|
186
186
|
ref: t => this.popoverElement = t,
|
|
187
187
|
controlElement: this.dropdownBtn,
|
|
188
188
|
open: this.open,
|
|
@@ -191,7 +191,7 @@ const f = t(class extends o {
|
|
|
191
191
|
direction: this.popoverDirection,
|
|
192
192
|
align: this.popoverAlignment
|
|
193
193
|
}, r("q2-option-list", {
|
|
194
|
-
key: "
|
|
194
|
+
key: "1d037878cfcf4785439edb9a5693d4dba700e947",
|
|
195
195
|
id: "option-list",
|
|
196
196
|
ref: t => this.optionList = t,
|
|
197
197
|
onChange: this.handleChange,
|
|
@@ -200,7 +200,7 @@ const f = t(class extends o {
|
|
|
200
200
|
label: l("tecton.element.optionList.label", [ this.optionListLabel ]),
|
|
201
201
|
"no-select": !0
|
|
202
202
|
}, r("slot", {
|
|
203
|
-
key: "
|
|
203
|
+
key: "1039cd355f5b1a7ec7cab1eca80479042060fef4"
|
|
204
204
|
})))));
|
|
205
205
|
}
|
|
206
206
|
get hostElement() {
|
|
@@ -42,7 +42,7 @@ const o = e(class extends t {
|
|
|
42
42
|
// #region Render Methods
|
|
43
43
|
render() {
|
|
44
44
|
return n("div", {
|
|
45
|
-
key: "
|
|
45
|
+
key: "313fa13779cd8ecb5439b1a96cb7aaf17f6c871b",
|
|
46
46
|
id: `tab-pane-${this.guid}-${this.index}`,
|
|
47
47
|
class: "tab-pane" + (this.selected ? "" : " hidden"),
|
|
48
48
|
role: "tabpanel",
|
|
@@ -50,12 +50,12 @@ const o = e(class extends t {
|
|
|
50
50
|
"aria-hidden": "" + !this.selected,
|
|
51
51
|
"aria-labelledby": `tab-${this.guid}-${this.index}`
|
|
52
52
|
}, this.selected && void 0 !== this.provided && !this.provided && n("div", {
|
|
53
|
-
key: "
|
|
53
|
+
key: "5207414b205d1e9a25fb1455ca21ff7cc913a5fd"
|
|
54
54
|
}, n("slot", {
|
|
55
|
-
key: "
|
|
55
|
+
key: "d883e909e38981f315bc1cab9ef57957a616c0d5",
|
|
56
56
|
name: "loading-wrapper"
|
|
57
57
|
}), n("iframe", {
|
|
58
|
-
key: "
|
|
58
|
+
key: "2f0233d04d3c5be619cb54bfe637252a7ef42d77",
|
|
59
59
|
hidden: !0,
|
|
60
60
|
name: this.moduleId,
|
|
61
61
|
scrolling: "no",
|
|
@@ -78,11 +78,11 @@ const o = e(class extends t {
|
|
|
78
78
|
value: e.value,
|
|
79
79
|
name: e.key
|
|
80
80
|
})))) : ""), n("div", {
|
|
81
|
-
key: "
|
|
81
|
+
key: "ae5ee8d5a5a7d1b798f4111b33120d301b86a16b",
|
|
82
82
|
class: "slot-wrapper",
|
|
83
83
|
hidden: this.selected && void 0 !== this.provided && !this.provided
|
|
84
84
|
}, n("slot", {
|
|
85
|
-
key: "
|
|
85
|
+
key: "cb1057d2b6cb467a25da1577610bfcc5b6300047"
|
|
86
86
|
})));
|
|
87
87
|
}
|
|
88
88
|
get hostElement() {
|
|
@@ -5,6 +5,7 @@ const q2AvatarCss = () => `*{box-sizing:border-box}*:active{outline:none}*:focus
|
|
|
5
5
|
const Q2Avatar = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
|
+
this.initialsFontScale = 1;
|
|
8
9
|
// #endregion
|
|
9
10
|
// #region State Properties
|
|
10
11
|
this.badSrc = false;
|
|
@@ -26,9 +27,11 @@ const Q2Avatar = class {
|
|
|
26
27
|
// #endregion
|
|
27
28
|
// #region Component Lifecycle Events
|
|
28
29
|
disconnectedCallback() {
|
|
30
|
+
var _a;
|
|
29
31
|
if (this.decoratorObserver) {
|
|
30
32
|
this.decoratorObserver.disconnect();
|
|
31
33
|
}
|
|
34
|
+
(_a = this.initialsResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
32
35
|
}
|
|
33
36
|
componentWillLoad() {
|
|
34
37
|
this.checkDecorator();
|
|
@@ -36,6 +39,20 @@ const Q2Avatar = class {
|
|
|
36
39
|
componentDidLoad() {
|
|
37
40
|
this.setupDecoratorObserver();
|
|
38
41
|
}
|
|
42
|
+
componentDidRender() {
|
|
43
|
+
var _a, _b, _c;
|
|
44
|
+
const text = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.avatar-initials text');
|
|
45
|
+
if (text !== this.observedInitialsText) {
|
|
46
|
+
(_b = this.initialsResizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
47
|
+
this.observedInitialsText = text;
|
|
48
|
+
this.initialsFontScale = 1;
|
|
49
|
+
if (text && typeof ResizeObserver === 'function') {
|
|
50
|
+
(_c = this.initialsResizeObserver) !== null && _c !== void 0 ? _c : (this.initialsResizeObserver = new ResizeObserver(() => this.fitInitials()));
|
|
51
|
+
this.initialsResizeObserver.observe(text);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
this.fitInitials();
|
|
55
|
+
}
|
|
39
56
|
// #endregion
|
|
40
57
|
// #region Watchers
|
|
41
58
|
srcDidUpdate() {
|
|
@@ -66,6 +83,22 @@ const Q2Avatar = class {
|
|
|
66
83
|
const decoratorElements = Array.from(this.el.children).filter(child => child.getAttribute('slot') === 'decorator');
|
|
67
84
|
this.hasDecorator = decoratorElements.length > 0;
|
|
68
85
|
}
|
|
86
|
+
fitInitials() {
|
|
87
|
+
const text = this.observedInitialsText;
|
|
88
|
+
if (!text)
|
|
89
|
+
return;
|
|
90
|
+
const { x, y, width, height } = text.getBBox();
|
|
91
|
+
const requiredHalfExtent = Math.max(50 - x, x + width - 50, 50 - y, y + height - 50);
|
|
92
|
+
const baseHalfExtent = requiredHalfExtent / this.initialsFontScale;
|
|
93
|
+
const scale = baseHalfExtent > 50 ? 48 / baseHalfExtent : 1;
|
|
94
|
+
if (Math.abs(scale - this.initialsFontScale) < 0.00001)
|
|
95
|
+
return;
|
|
96
|
+
this.initialsFontScale = scale;
|
|
97
|
+
if (scale === 1)
|
|
98
|
+
text.style.removeProperty('font-size');
|
|
99
|
+
else
|
|
100
|
+
text.style.fontSize = `calc(var(--tct-avatar-font-size, var(--const-px-40, 40px)) * ${scale})`;
|
|
101
|
+
}
|
|
69
102
|
setupDecoratorObserver() {
|
|
70
103
|
// Set up MutationObserver to watch for changes to the host element's children
|
|
71
104
|
this.decoratorObserver = new MutationObserver(() => {
|
|
@@ -87,7 +120,7 @@ const Q2Avatar = class {
|
|
|
87
120
|
const isLoaded = this.isLoaded;
|
|
88
121
|
const showInitials = (this.name || this.initials) && (!this.src || this.badSrc);
|
|
89
122
|
const showFallback = !this.name && !this.initials && (!this.src || this.badSrc);
|
|
90
|
-
return (h("div", { key: '
|
|
123
|
+
return (h("div", { key: 'd5a32129734a7923c61ecfbace6af0799051b8c9', class: `avatar-wrapper size-${this.size}` }, this.hasDecorator && (h("div", { key: 'a20e35425d03a0b45df79846b1613be993935bab', class: "decorator" }, h("slot", { key: '082a7d3022be63825ac0237b0f458eb3fc328737', name: "decorator" }))), showImg && (h("img", { key: 'bc092a5fe3996d53f89bc69146aceb2af53b571a', class: `${isLoaded ? 'avatar-img' : 'avatar-img-default'}`, "test-id": "userImage", src: this.src, onError: this.onError, onLoad: this.onLoad, alt: this.name || '' })), showInitials && (h("svg", { key: '385335ea2b6d35d48179cbea4aa3ac3d99e56093', viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid meet", "test-id": "userInitials", class: `avatar-initials initials-size-${computedInitials.length}`, "aria-label": this.name, "aria-hidden": !this.name && 'true' }, h("text", { key: 'fb331a07ddc746787341e31febcf2a267f8f0e33', x: "50", y: "50", "dominant-baseline": "central", "text-anchor": "middle", "aria-hidden": "true" }, computedInitials))), showFallback && (h("div", { key: 'da7a75cc5e5b4e62eeaa63c399ed0dc6c869e99c', "test-id": "fallbackIcon", class: "fallback" }, h("q2-icon", { key: '626219dd1528fa7e39d298856be8205f21a6708e', type: this.icon })))));
|
|
91
124
|
}
|
|
92
125
|
get el() { return getElement(this); }
|
|
93
126
|
static get watchers() { return {
|
|
@@ -392,7 +392,7 @@ const Q2Tag = class {
|
|
|
392
392
|
if (this.optionCount)
|
|
393
393
|
wrapperClassNames.push('has-options');
|
|
394
394
|
const shouldShowOptions = this.optionCount > 0;
|
|
395
|
-
return (h(Host, { key: '
|
|
395
|
+
return (h(Host, { key: 'a46abe562647fe64e55427bcc8284bbfc5f01e3f' }, h("click-elsewhere", { key: '667e76295c30be78462ee67128a8fb2c38c01285', onChange: this.onClickElsewhere }, shouldShowOptions ? (h(Fragment, null, h("button", { class: "tag-wrapper", ref: el => (this.dropdownBtn = el), "test-id": "btn-control", type: "button", role: "combobox", onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleButtonFocusout, "aria-controls": "option-list", "aria-expanded": open ? 'true' : 'false', "aria-describedby": "option-description", "aria-label": loc(this.label) }, h("div", { class: wrapperClassNames.join(' ') }, loc(this.label)), h("q2-icon", { type: "options" })), this.renderHiddenElement())) : (h("div", { class: "tag-wrapper", onClick: e => e.stopPropagation() }, h("div", { class: wrapperClassNames.join(' ') }, h("slot", { name: "decorator" }), loc(this.label)))), shouldShowOptions && (h("q2-popover", { key: '805e64b738fc5a0b1a73968636a8843af33834ef', ref: el => (this.popoverElement = el), controlElement: this.dropdownBtn, open: this.open, maxHeight: this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("q2-option-list", { key: '1d037878cfcf4785439edb9a5693d4dba700e947', id: "option-list", ref: el => (this.optionList = el), onChange: this.handleChange, type: "menu", align: "right", label: loc('tecton.element.optionList.label', [this.optionListLabel]), "no-select": true }, h("slot", { key: '1039cd355f5b1a7ec7cab1eca80479042060fef4' })))))));
|
|
396
396
|
}
|
|
397
397
|
get hostElement() { return getElement(this); }
|
|
398
398
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-Cqkz7Bnm.js';
|
|
2
2
|
import { o as overrideFocus, i as isEventFromElement, n as nextPaint, p as isFirefox, l as loc } from './index-CP8pXJ-l.js';
|
|
3
3
|
|
|
4
|
-
const q2MessageCss = () => `*{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:block}:host([hidden]){display:none}.message{--comp-line-height:var(--tct-message-line-height, var(--t-message-line-height, var(--app-line-height, 1.428571429em)));border-width:var(--tct-message-border-width, 0);border-style:var(--tct-message-border-style, solid);border-color:var(--tct-message-border-color, transparent);position:relative;display:grid;gap:var(--tct-message-gap, 8px);align-items:flex-start;background:var(--comp-message-background);color:var(--tct-message-font-color, var(--t-message-font-color, inherit));box-shadow:var(--tct-message-box-shadow, var(--t-message-box-shadow, var(--app-shadow-1, inherit)));border-radius:var(--tct-message-border-radius, var(--t-message-border-radius, var(--app-border-radius-1, inherit)))}.message:focus{box-shadow:var(--const-global-focus)}.bar{position:absolute;left:0;top:0;bottom:0;height:100%;background:var(--comp-bar-color);width:var(--tct-message-bar-width, var(--t-message-bar-width, 4px));border-radius:var(--tct-message-bar-border-radius, var(--app-border-radius-1) 0 0 var(--app-border-radius-1))}.message-icon{--comp-top-offset:calc(calc(var(--comp-line-height) - var(--comp-icon-size)) / 2);--tct-icon-size:var(--comp-icon-size);top:var(--comp-top-offset);margin-bottom:calc(var(--comp-top-offset) * -1)}.message-content{flex:1;
|
|
4
|
+
const q2MessageCss = () => `*{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:block}:host([hidden]){display:none}.message{--comp-line-height:var(--tct-message-line-height, var(--t-message-line-height, var(--app-line-height, 1.428571429em)));border-width:var(--tct-message-border-width, 0);border-style:var(--tct-message-border-style, solid);border-color:var(--tct-message-border-color, transparent);position:relative;display:grid;gap:var(--tct-message-gap, 8px);align-items:flex-start;background:var(--comp-message-background);color:var(--tct-message-font-color, var(--t-message-font-color, inherit));box-shadow:var(--tct-message-box-shadow, var(--t-message-box-shadow, var(--app-shadow-1, inherit)));border-radius:var(--tct-message-border-radius, var(--t-message-border-radius, var(--app-border-radius-1, inherit)))}.message:focus{box-shadow:var(--const-global-focus)}.bar{position:absolute;left:0;top:0;bottom:0;height:100%;background:var(--comp-bar-color);width:var(--tct-message-bar-width, var(--t-message-bar-width, 4px));border-radius:var(--tct-message-bar-border-radius, var(--app-border-radius-1) 0 0 var(--app-border-radius-1))}.message-icon{--comp-top-offset:calc(calc(var(--comp-line-height) - var(--comp-icon-size)) / 2);--tct-icon-size:var(--comp-icon-size);top:var(--comp-top-offset);margin-bottom:calc(var(--comp-top-offset) * -1)}.message-content{flex:1;font-size:var(--tct-message-font-size, inherit);line-height:max(1.2em, var(--comp-line-height))}::slotted(ul){--comp-list-default-padding:0 0 0 var(--app-scale-3x, 15px);padding:var(--tct-message-list-padding, var(--comp-list-default-padding))}:host(:not([appearance])),:host([appearance=standard]){--comp-default-margin:var(--app-scale-3x, 5px) 0;margin:var(--tct-message-margin, var(--comp-default-margin))}:host(:not([appearance])) .message,:host([appearance=standard]) .message{--comp-icon-size:var(--tct-message-icon-size, var(--t-message-icon-size, 24px));--comp-padding:var(--tct-message-padding, var(--t-message-padding, var(--app-scale-3x, 15px)));grid-template-columns:var(--comp-icon-size) 1fr;padding:var(--comp-padding);padding-bottom:calc(var(--comp-padding) - var(--tct-scale-1, var(--app-scale-1x, 5px)))}:host(:not([appearance])) ::slotted(ul),:host([appearance=standard]) ::slotted(ul){--comp-list-default-margin:var(--app-scale-3x, 15px) 0;margin:var(--tct-message-list-margin, var(--comp-list-default-margin))}:host([appearance=minimal]){margin:0}:host([appearance=minimal]) .message{padding:var(--tct-message-minimal-padding, var(--t-message-minimal-padding, var(--app-scale-2x, 10px)));grid-template-columns:1fr}:host([appearance=minimal]) ::slotted(ul){margin:var(--tct-scale-1, var(--app-scale-1x, 5px)) 0}:host(:not([type])),:host([type=info]){--comp-info-color:#0079c1;--comp-bar-color:var(--tct-message-info-bar-color, var(--const-stoplight-info, var(--comp-info-color)));--comp-message-background:var(--tct-message-info-background, var(--tct-message-background, color-mix(in srgb, var(--t-base, #FFFFFF), var(--comp-bar-color) 10%)))}:host(:not([type])) .message-icon,:host([type=info]) .message-icon{--tct-icon-stroke-primary:var(--tct-stoplight-info, var(--const-stoplight-info, var(--comp-info-color)));--tct-icon-stroke-secondary:var(--tct-stoplight-info, var(--const-stoplight-info, var(--comp-info-color)))}:host([type=success]){--comp-success-color:#0e8a00;--comp-bar-color:var(--tct-message-success-bar-color, var(--const-stoplight-success, var(--comp-success-color)));--comp-message-background:var(--tct-message-success-background, var(--tct-message-background, color-mix(in srgb, var(--t-base, #FFFFFF), var(--comp-bar-color) 10%)))}:host([type=success]) .message-icon{--tct-icon-stroke-primary:var(--tct-stoplight-success, var(--const-stoplight-success, var(--comp-success-color)));--tct-icon-stroke-secondary:var(--tct-stoplight-success, var(--const-stoplight-success, var(--comp-success-color)))}:host([type=warning]){--comp-warning-color:#c35500;--comp-bar-color:var(--tct-message-warning-bar-color, var(--const-stoplight-warning, var(--comp-warning-color)));--comp-message-background:var(--tct-message-warning-background, var(--tct-message-background, color-mix(in srgb, var(--t-base, #FFFFFF), var(--comp-bar-color) 10%)))}:host([type=warning]) .message-icon{--tct-icon-stroke-primary:var(--tct-stoplight-warning, var(--const-stoplight-warning, var(--comp-warning-color)));--tct-icon-stroke-secondary:var(--tct-stoplight-warning, var(--const-stoplight-warning, var(--comp-warning-color)))}:host([type=error]),:host([type=danger]){--comp-error-color:#d20a0a;--comp-bar-color:var(--tct-message-error-bar-color, var(--const-stoplight-alert, var(--comp-error-color)));--comp-message-background:var(--tct-message-error-background, var(--tct-message-background, color-mix(in srgb, var(--t-base, #FFFFFF), var(--comp-bar-color) 10%)))}:host([type=error]) .message-icon,:host([type=danger]) .message-icon{--tct-icon-stroke-primary:var(--tct-stoplight-error, var(--const-stoplight-alert, var(--comp-error-color)));--tct-icon-stroke-secondary:var(--tct-stoplight-error, var(--const-stoplight-alert, var(--comp-error-color)))}`;
|
|
5
5
|
|
|
6
6
|
const Q2Message = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, g as getElement } from './i
|
|
|
2
2
|
import { n as nextPaint, o as overrideFocus, i as isEventFromElement, b as handleRenamedProp, l as loc } from './index-CP8pXJ-l.js';
|
|
3
3
|
import { m as mirrorEmit } from './mirror-emit-DUjY_ucm.js';
|
|
4
4
|
|
|
5
|
-
const q2PaginationCss = () => `*{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:flex;width:100%}:host([align=right]),:host([alignment=right]){justify-content:flex-end}:host([align=center]),:host([alignment=center]){justify-content:center}:host([align=left]),:host([alignment=left]){justify-content:flex-start}:host([hidden]){display:none}.container{display:inline-flex;column-gap:var(--tct-pagination-column-gap, var(--t-pagination-column-gap, var(--app-scale-2x, 10px)));align-items:center;height:var(--tct-pagination-height, var(--t-pagination-height, 44px));color:var(--tct-pagination-color, inherit);font-size:var(--tct-pagination-font-size, inherit);font-weight:var(--tct-pagination-font-weight, inherit)}.container.stacked{flex-direction:column;column-gap:0;row-gap:var(--tct-pagination-row-gap, var(--app-scale-2x, 10px));height:auto;align-items:stretch}.container.stacked .description{text-align:center}.container.stacked .controls{justify-content:center}.container.stacked .per-page{display:flex;justify-content:center}.container.stacked q2-select{--tct-select-margin:0;width:var(--tct-pagination-perpage-width, 60%)}.controls{display:flex}.btn-group{display:flex;gap:var(--tct-pagination-btn-gap, var(--t-pagination-btn-gap, 0))}.description,.input-display{white-space:nowrap}.input-display{display:grid;grid-template-columns:auto var(--tct-pagination-input-width, 50px) auto;align-items:center;gap:var(--tct-pagination-controls-gap, var(--t-pagination-controls-gap, var(--app-scale-1x, 5px)))}.input-display[hidden]{display:none}.input-wrapper{height:var(--tct-pagination-height, var(--t-pagination-height, 44px));display:flex;align-items:center}q2-btn{--tct-btn-border-radius:var(--tct-pagination-btn-border-radius, var(--t-pagination-btn-border-radius));--tct-btn-border:var(--tct-pagination-btn-border, var(--t-pagination-btn-border));--tct-btn-icon-hover-background:var(--tct-pagination-btn-hover-background, var(--app-gray-l3, #f2f2f2));--tct-icon-stroke-primary:var(--tct-pagination-btn-icon-stroke-primary, var(--app-gray, #747474));--tct-icon-stroke-secondary:var(--tct-pagination-btn-icon-stroke-secondary, var(--app-gray, #747474))}q2-icon{--tct-icon-size:var(--tct-pagination-icon-size, var(--t-pagination-icon-size, 12px));color:var(--tct-pagination-icon-color, var(--t-pagination-icon-color, var(--t-text, #4d4d4d)))}q2-input{--tct-input-margin-top:0;--tct-input-margin-bottom:0;--tct-input-height:var(--tct-pagination-input-height, var(--t-pagination-input-height, 30px));--tct-input-min-height:var(--tct-input-height);--tct-input-align:center}q2-select{--tct-input-align:start;--tct-select-input-min-height:var(--tct-pagination-select-height, var(--t-pagination-select-height, 30px));--tct-select-input-max-height:var(--tct-pagination-select-height, var(--t-pagination-select-height, 30px));width:var(--tct-pagination-perpage-width, var(--t-pagination-perpage-width, 100%));min-width:var(--tct-pagination-perpage-min-width, var(--t-pagination-perpage-min-width, 110px))}`;
|
|
5
|
+
const q2PaginationCss = () => `*{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:flex;width:100%}:host([align=right]),:host([alignment=right]){justify-content:flex-end}:host([align=center]),:host([alignment=center]){justify-content:center}:host([align=left]),:host([alignment=left]){justify-content:flex-start}:host([hidden]){display:none}.container{display:inline-flex;column-gap:var(--tct-pagination-column-gap, var(--t-pagination-column-gap, var(--app-scale-2x, 10px)));align-items:center;height:var(--tct-pagination-height, var(--t-pagination-height, 44px));color:var(--tct-pagination-color, inherit);font-size:var(--tct-pagination-font-size, inherit);font-weight:var(--tct-pagination-font-weight, inherit)}.container.stacked{flex-direction:column;column-gap:0;row-gap:var(--tct-pagination-row-gap, var(--app-scale-2x, 10px));height:auto;align-items:stretch}.container.stacked .description{text-align:center}.container.stacked .controls{justify-content:center}.container.stacked .per-page{display:flex;justify-content:center}.container.stacked q2-select{--tct-select-margin:0;width:var(--tct-pagination-perpage-width, 60%)}.container.small{flex-wrap:wrap;row-gap:var(--tct-pagination-row-gap, var(--app-scale-2x, 10px));height:auto;max-width:100%}.container.small .description{flex-basis:100%;min-width:0;overflow-wrap:anywhere;text-align:center;white-space:normal;line-height:max(1.2em, var(--app-line-height, 1.428571429em))}.container.small .controls{margin-inline:auto}.controls{display:flex}.btn-group{display:flex;gap:var(--tct-pagination-btn-gap, var(--t-pagination-btn-gap, 0))}.description,.input-display{white-space:nowrap}.input-display{display:grid;grid-template-columns:auto var(--tct-pagination-input-width, 50px) auto;align-items:center;gap:var(--tct-pagination-controls-gap, var(--t-pagination-controls-gap, var(--app-scale-1x, 5px)))}.input-display[hidden]{display:none}.input-wrapper{height:var(--tct-pagination-height, var(--t-pagination-height, 44px));display:flex;align-items:center}q2-btn{--tct-btn-border-radius:var(--tct-pagination-btn-border-radius, var(--t-pagination-btn-border-radius));--tct-btn-border:var(--tct-pagination-btn-border, var(--t-pagination-btn-border));--tct-btn-icon-hover-background:var(--tct-pagination-btn-hover-background, var(--app-gray-l3, #f2f2f2));--tct-icon-stroke-primary:var(--tct-pagination-btn-icon-stroke-primary, var(--app-gray, #747474));--tct-icon-stroke-secondary:var(--tct-pagination-btn-icon-stroke-secondary, var(--app-gray, #747474))}q2-icon{--tct-icon-size:var(--tct-pagination-icon-size, var(--t-pagination-icon-size, 12px));color:var(--tct-pagination-icon-color, var(--t-pagination-icon-color, var(--t-text, #4d4d4d)))}q2-input{--tct-input-margin-top:0;--tct-input-margin-bottom:0;--tct-input-height:var(--tct-pagination-input-height, var(--t-pagination-input-height, 30px));--tct-input-min-height:var(--tct-input-height);--tct-input-align:center}q2-select{--tct-input-align:start;--tct-select-input-min-height:var(--tct-pagination-select-height, var(--t-pagination-select-height, 30px));--tct-select-input-max-height:var(--tct-pagination-select-height, var(--t-pagination-select-height, 30px));width:var(--tct-pagination-perpage-width, var(--t-pagination-perpage-width, 100%));min-width:var(--tct-pagination-perpage-min-width, var(--t-pagination-perpage-min-width, 110px))}`;
|
|
6
6
|
|
|
7
7
|
const Q2Pagination = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -15,7 +15,9 @@ const Q2Pagination = class {
|
|
|
15
15
|
this.disabled = false;
|
|
16
16
|
this.checkSize = () => {
|
|
17
17
|
const { hostElement, containerElement } = this;
|
|
18
|
-
const
|
|
18
|
+
const fontSize = parseFloat(getComputedStyle(containerElement).fontSize);
|
|
19
|
+
// Reserve enough space for the full controls as the text grows.
|
|
20
|
+
const isOverflowing = this.containerWidth > hostElement.clientWidth || hostElement.clientWidth < fontSize * 42;
|
|
19
21
|
this.isSmall = isOverflowing;
|
|
20
22
|
nextPaint(() => {
|
|
21
23
|
const currentContainerWidth = containerElement.clientWidth;
|
|
@@ -70,7 +72,9 @@ const Q2Pagination = class {
|
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
74
|
componentDidLoad() {
|
|
75
|
+
var _a;
|
|
73
76
|
this.containerWidth = this.containerElement.clientWidth;
|
|
77
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(this.containerElement);
|
|
74
78
|
overrideFocus(this.hostElement);
|
|
75
79
|
}
|
|
76
80
|
// #endregion
|
|
@@ -210,6 +214,8 @@ const Q2Pagination = class {
|
|
|
210
214
|
const classes = ['container'];
|
|
211
215
|
if (this.stacked)
|
|
212
216
|
classes.push('stacked');
|
|
217
|
+
if (this.isSmall)
|
|
218
|
+
classes.push('small');
|
|
213
219
|
return classes;
|
|
214
220
|
}
|
|
215
221
|
get currentRange() {
|
|
@@ -313,7 +319,7 @@ const Q2Pagination = class {
|
|
|
313
319
|
total,
|
|
314
320
|
});
|
|
315
321
|
}
|
|
316
|
-
return (h("nav", { key: '
|
|
322
|
+
return (h("nav", { key: 'a427944d7134621fe5c1cc469d554cf60ea69271', class: this.containerClasses.join(' '), ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: 'ab5e3a0dc0a8c3ab99c8d6754097c37ae1c10193', class: "description", "test-id": "description" }, pagesOnly
|
|
317
323
|
? loc('tecton.element.pagination.pages', {
|
|
318
324
|
current: page,
|
|
319
325
|
total: totalPages,
|
|
@@ -322,10 +328,10 @@ const Q2Pagination = class {
|
|
|
322
328
|
range: currentRange,
|
|
323
329
|
recordType: recordType.toLowerCase(),
|
|
324
330
|
total: total.toLocaleString(),
|
|
325
|
-
})), h("div", { key: '
|
|
331
|
+
})), h("div", { key: 'e84213e3dbeac1bb54fcd8244e486274869c5fa5', class: "controls" }, h("div", { key: 'f5a4cb3a4d467b2ce412afa2bb016e1843ccb364', class: "btn-group" }, h("q2-btn", { key: 'b4d315503de340e482ffb042d3cd4dbaff1aa3eb', ref: el => (this.firstPageBtn = el), label: loc('tecton.element.pagination.goToFirstPage'), disabled: disabled || onFirstPage, hidden: isFullViewHidden, onTctClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: '8d437e9a6b00999eee091accd8581b84a2dbe4fe', type: "chevron-double-left" })), h("q2-btn", { key: 'bd91788b84cbe8a55fb7e7b53342a6c9a75e3694', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: disabled || onFirstPage, onTctClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: 'bf9285d825da06e43e330b565ecf46f72a9ad930', type: "chevron-left" }))), h("div", { key: '76ce1e31814ec56e7d060200ee8a87c720c5fc1e', class: "input-display", hidden: isFullViewHidden }, h("span", { key: 'b1768b78ca08e2f76892823a165448c298d2a5b4', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '8909fdeaf8832ec6a104ffad86258d0d3034fbb3', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: '96e0ce1764dc542fcac5a516b608b379bd1453a9', ref: el => (this.inputField = el), type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => event.stopImmediatePropagation(), onTctChange: event => {
|
|
326
332
|
event.stopPropagation();
|
|
327
333
|
this.handlePageChange(event.detail.value);
|
|
328
|
-
}, "test-id": "pageInput", current: "page", disabled: disabled })), h("span", { key: '
|
|
334
|
+
}, "test-id": "pageInput", current: "page", disabled: disabled })), h("span", { key: '3914f78404deab10b4173df5b16c205067c7e15e', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: 'b5b441d213d99d04b18c976628ba07142e00856f', class: "btn-group" }, h("q2-btn", { key: '3299b27a7d24045f2258288e86702a4b7e6d1e37', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: disabled || onLastPage, onTctClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: 'd63e7679e5087a1a03bb17fd0a7c24c0d07bdf87', type: "chevron-right" })), h("q2-btn", { key: 'f575528380b7d239db48f49353d71b88ba0e2d9e', ref: el => (this.lastPageBtn = el), label: "tecton.element.pagination.goToLastPage", disabled: disabled || onLastPage, hidden: isFullViewHidden, onTctClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: 'c76d0fe0dff9095f893604fc41cd4d615075045e', type: "chevron-double-right" })))), h("div", { key: '71ad1c246e16a1c84318d7ccf75d50a37246af12', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
|
|
329
335
|
}
|
|
330
336
|
get hostElement() { return getElement(this); }
|
|
331
337
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@ import { a as resizeIframe, o as overrideFocus, i as isEventFromElement, w as wa
|
|
|
3
3
|
import { m as mirrorEmit } from './mirror-emit-DUjY_ucm.js';
|
|
4
4
|
import { a as showActionSheetList, s as shouldShowActionSheet } from './action-sheet-DuQ7VZ08.js';
|
|
5
5
|
|
|
6
|
-
const q2PillCss = () => `*{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}`;
|
|
6
|
+
const q2PillCss = () => `*{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}`;
|
|
7
7
|
|
|
8
8
|
const Q2Pill = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -411,7 +411,7 @@ const Q2Pill = class {
|
|
|
411
411
|
wrapperClassNames.push('has-icon');
|
|
412
412
|
if (optionCount)
|
|
413
413
|
wrapperClassNames.push('has-options');
|
|
414
|
-
return (h("click-elsewhere", { key: '8cba59cde3746d0397305512334eb56357e9e5d4', onChange: this.onClickElsewhere }, h("div", { key: '391da54f9fd870e223765e6266291dff9775abe6', class: wrapperClassNames.join(' ') }, h("div", { key: '06431fd76c0a9d30833756407c89ff59609bc3a3', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: '609557b9206c91511e78e26c990230e61f7e5c19', class: "btn-primary", "test-id": "btn-control", type: "button", role: (optionCount && 'combobox') || undefined, ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleFocusOut, disabled: this.disabled, "aria-roledescription": !optionCount && 'filter', "aria-controls": (optionCount && 'option-list') || undefined, "aria-expanded": (optionCount && `${!!open}`) || undefined, "aria-label": text, "aria-pressed": !optionCount ? `${!!active}` : undefined, "aria-describedby": (optionCount && 'option-description') || undefined }, h("slot", { key: 'e1f4c57b7526f714cf0242e101ec0f5c39ebafa5', name: "decorator" }), truncatedText)), this.renderIcon(), !!optionCount && this.renderHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: '
|
|
414
|
+
return (h("click-elsewhere", { key: '8cba59cde3746d0397305512334eb56357e9e5d4', onChange: this.onClickElsewhere }, h("div", { key: '391da54f9fd870e223765e6266291dff9775abe6', class: wrapperClassNames.join(' ') }, h("div", { key: '06431fd76c0a9d30833756407c89ff59609bc3a3', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: '609557b9206c91511e78e26c990230e61f7e5c19', class: "btn-primary", "test-id": "btn-control", type: "button", role: (optionCount && 'combobox') || undefined, ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleFocusOut, disabled: this.disabled, "aria-roledescription": !optionCount && 'filter', "aria-controls": (optionCount && 'option-list') || undefined, "aria-expanded": (optionCount && `${!!open}`) || undefined, "aria-label": text, "aria-pressed": !optionCount ? `${!!active}` : undefined, "aria-describedby": (optionCount && 'option-description') || undefined }, h("slot", { key: 'e1f4c57b7526f714cf0242e101ec0f5c39ebafa5', name: "decorator" }), h("span", { key: '98a770f6f4fabe04d886f66d57e76a4febb31353', class: "pill-label" }, truncatedText))), this.renderIcon(), !!optionCount && this.renderHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: '30fb581a9eeb008262bbb3fc4a82537f1b78af28', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment, onFocusout: this.handleFocusOut }, h("div", { key: '6fc858b2064b78b2ccaafd35aefaa2e4c9e1ea07', class: "popover-content" }, h("div", { key: '75134f4a5d4296f6f69a70197bf1bd450c05a8e0', ref: el => (this.popoverTopContainer = el), class: "popover-top-container", tabindex: "-1", hidden: !this.hasPopoverTop, onKeyDown: this.handleSlotKeydown }, h("slot", { key: 'f570a1a19b97bd7eb4b2ae38975db95ff1153b00', name: "popover-top" })), h("q2-option-list", { key: 'aca9ff86903dcf5b4e5138541ac20dac68955fb7', type: "listbox", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements(), onPopoverState: this.onPopoverState, label: loc('tecton.element.optionList.label', [this.optionListLabel]) }, h("slot", { key: '89c5f3739c36206ceecb06245ba3052491b89898' })), h("div", { key: '8f98c6b4a59c2c0675b5648aed4a1110f0136d87', ref: el => (this.popoverBottomContainer = el), class: "popover-bottom-container", tabindex: "-1", hidden: !this.hasPopoverBottom, onKeyDown: this.handleSlotKeydown }, h("slot", { key: '75ef6c235c31755e0a5b9905db16e02ff8c4eea3', name: "popover-bottom" })))))));
|
|
415
415
|
}
|
|
416
416
|
get hostElement() { return getElement(this); }
|
|
417
417
|
static get watchers() { return {
|
|
@@ -152,7 +152,7 @@ const Q2RelativeTime = class {
|
|
|
152
152
|
// #region Render Methods
|
|
153
153
|
render() {
|
|
154
154
|
const { shouldShow, displayedMessage } = this;
|
|
155
|
-
return h(Fragment, { key: '
|
|
155
|
+
return h(Fragment, { key: 'e32fc9201354f10456368f47c0a7b6e50fd3eeb2' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
|
|
156
156
|
}
|
|
157
157
|
get hostElement() { return getElement(this); }
|
|
158
158
|
static get watchers() { return {
|