@transcodes/ui-components 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +78 -0
- package/dist/ui-components.css +1 -1
- package/dist/ui-components.js +1518 -1005
- package/package.json +2 -2
package/dist/ui-components.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
class P {
|
|
1
|
+
import { css as c, LitElement as d, html as l, unsafeCSS as Ot } from "lit";
|
|
2
|
+
import { property as n, customElement as p, state as k } from "lit/decorators.js";
|
|
3
|
+
import { styleMap as f } from "lit/directives/style-map.js";
|
|
4
|
+
import { classMap as b } from "lit/directives/class-map.js";
|
|
5
|
+
import { unsafeStatic as St, html as Pt } from "lit/static-html.js";
|
|
6
|
+
class L {
|
|
8
7
|
constructor(e) {
|
|
9
8
|
this.host = e, this.host.addController(this);
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
|
-
class
|
|
13
|
-
constructor(e,
|
|
14
|
-
super(e), this._state = "hidden", typeof
|
|
11
|
+
class M extends L {
|
|
12
|
+
constructor(e, a = 300) {
|
|
13
|
+
super(e), this._state = "hidden", typeof a == "number" ? (this.showDuration = a, this.hideDuration = a) : (this.showDuration = a.showDuration ?? 300, this.hideDuration = a.hideDuration ?? 300);
|
|
15
14
|
}
|
|
16
15
|
get state() {
|
|
17
16
|
return this._state;
|
|
@@ -32,12 +31,12 @@ class j extends P {
|
|
|
32
31
|
return this.isVisible ? this.hide() : this.show();
|
|
33
32
|
}
|
|
34
33
|
waitForTransition(e) {
|
|
35
|
-
return new Promise((
|
|
36
|
-
setTimeout(
|
|
34
|
+
return new Promise((a) => {
|
|
35
|
+
setTimeout(a, e);
|
|
37
36
|
});
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
|
-
class
|
|
39
|
+
class Ge extends L {
|
|
41
40
|
constructor() {
|
|
42
41
|
super(...arguments), this.errors = /* @__PURE__ */ new Map();
|
|
43
42
|
}
|
|
@@ -50,10 +49,10 @@ class He extends P {
|
|
|
50
49
|
getAllErrors() {
|
|
51
50
|
return new Map(this.errors);
|
|
52
51
|
}
|
|
53
|
-
validate(e,
|
|
52
|
+
validate(e, a, i) {
|
|
54
53
|
this.clearError(e);
|
|
55
54
|
for (const t of i)
|
|
56
|
-
if (!this.runRule(
|
|
55
|
+
if (!this.runRule(a, t))
|
|
57
56
|
return this.errors.set(e, t.message), this.host.requestUpdate(), !1;
|
|
58
57
|
return !0;
|
|
59
58
|
}
|
|
@@ -63,26 +62,26 @@ class He extends P {
|
|
|
63
62
|
reset() {
|
|
64
63
|
this.errors.clear(), this.host.requestUpdate();
|
|
65
64
|
}
|
|
66
|
-
runRule(e,
|
|
67
|
-
switch (
|
|
65
|
+
runRule(e, a) {
|
|
66
|
+
switch (a.type) {
|
|
68
67
|
case "required":
|
|
69
68
|
return e.trim().length > 0;
|
|
70
69
|
case "email":
|
|
71
70
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
|
|
72
71
|
case "minLength":
|
|
73
|
-
return e.length >=
|
|
72
|
+
return e.length >= a.value;
|
|
74
73
|
case "maxLength":
|
|
75
|
-
return e.length <=
|
|
74
|
+
return e.length <= a.value;
|
|
76
75
|
case "pattern":
|
|
77
|
-
return
|
|
76
|
+
return a.value.test(e);
|
|
78
77
|
case "custom":
|
|
79
|
-
return
|
|
78
|
+
return a.validator ? a.validator(e) : !0;
|
|
80
79
|
default:
|
|
81
80
|
return !0;
|
|
82
81
|
}
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
|
-
class
|
|
84
|
+
class jt extends L {
|
|
86
85
|
constructor() {
|
|
87
86
|
super(...arguments), this.hasAddedEntry = !1, this.handlePopState = () => {
|
|
88
87
|
this.hasAddedEntry && (this.hasAddedEntry = !1, this.onPopCallback?.());
|
|
@@ -104,7 +103,7 @@ class Ct extends P {
|
|
|
104
103
|
window.removeEventListener("popstate", this.handlePopState), this.onPopCallback = void 0;
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
|
-
class
|
|
106
|
+
class Et extends L {
|
|
108
107
|
constructor() {
|
|
109
108
|
super(...arguments), this._isLoading = !1, this._progress = 0;
|
|
110
109
|
}
|
|
@@ -127,11 +126,11 @@ class _t extends P {
|
|
|
127
126
|
this._isLoading = !1, this._progress = 0, this.host.requestUpdate();
|
|
128
127
|
}
|
|
129
128
|
}
|
|
130
|
-
class
|
|
131
|
-
constructor(e,
|
|
129
|
+
class Bt extends L {
|
|
130
|
+
constructor(e, a) {
|
|
132
131
|
super(e), this._matches = !1, this.handleChange = (i) => {
|
|
133
132
|
this._matches = i.matches, this.host.requestUpdate();
|
|
134
|
-
}, this.mediaQuery = window.matchMedia(
|
|
133
|
+
}, this.mediaQuery = window.matchMedia(a), this._matches = this.mediaQuery.matches;
|
|
135
134
|
}
|
|
136
135
|
get matches() {
|
|
137
136
|
return this._matches;
|
|
@@ -143,38 +142,38 @@ class Dt extends P {
|
|
|
143
142
|
this.mediaQuery.removeEventListener("change", this.handleChange);
|
|
144
143
|
}
|
|
145
144
|
}
|
|
146
|
-
class
|
|
145
|
+
class Lt extends L {
|
|
147
146
|
/**
|
|
148
147
|
* @param host - The reactive controller host
|
|
149
148
|
* @param targetOrigin - The origin to accept messages from and send messages to.
|
|
150
149
|
* SECURITY NOTE: Using '*' accepts messages from any origin which can be dangerous.
|
|
151
150
|
* Always specify an explicit origin in production environments.
|
|
152
151
|
*/
|
|
153
|
-
constructor(e,
|
|
152
|
+
constructor(e, a = "*") {
|
|
154
153
|
super(e), this.handlers = /* @__PURE__ */ new Map(), this.wildcardHandlers = /* @__PURE__ */ new Set(), this.handleMessage = (i) => {
|
|
155
154
|
if (!(this.targetOrigin !== "*" && i.origin !== this.targetOrigin) && i.data && typeof i.data == "object" && typeof i.data.type == "string") {
|
|
156
|
-
const { type: t, payload:
|
|
157
|
-
this.handlers.get(t)?.forEach((
|
|
158
|
-
|
|
159
|
-
}), this.wildcardHandlers.forEach((
|
|
160
|
-
|
|
155
|
+
const { type: t, payload: s } = i.data;
|
|
156
|
+
this.handlers.get(t)?.forEach((mt) => {
|
|
157
|
+
mt(s);
|
|
158
|
+
}), this.wildcardHandlers.forEach((mt) => {
|
|
159
|
+
mt(t, s);
|
|
161
160
|
});
|
|
162
161
|
}
|
|
163
|
-
}, this.targetOrigin =
|
|
162
|
+
}, this.targetOrigin = a, a === "*" && typeof window < "u" && window.location.protocol !== "file:" && console.warn(
|
|
164
163
|
'[MessageBusController] Using targetOrigin="*" accepts messages from any origin. For security, specify an explicit origin in production.'
|
|
165
164
|
);
|
|
166
165
|
}
|
|
167
|
-
send(e,
|
|
168
|
-
i.postMessage({ type: e, payload:
|
|
166
|
+
send(e, a, i = window) {
|
|
167
|
+
i.postMessage({ type: e, payload: a }, this.targetOrigin);
|
|
169
168
|
}
|
|
170
|
-
sendToFrame(e,
|
|
171
|
-
e.contentWindow?.postMessage({ type:
|
|
169
|
+
sendToFrame(e, a, i) {
|
|
170
|
+
e.contentWindow?.postMessage({ type: a, payload: i }, this.targetOrigin);
|
|
172
171
|
}
|
|
173
|
-
onMessage(e,
|
|
174
|
-
return e === "*" ? (this.wildcardHandlers.add(
|
|
175
|
-
this.wildcardHandlers.delete(
|
|
176
|
-
}) : (this.handlers.has(e) || this.handlers.set(e, /* @__PURE__ */ new Set()), this.handlers.get(e)?.add(
|
|
177
|
-
this.handlers.get(e)?.delete(
|
|
172
|
+
onMessage(e, a) {
|
|
173
|
+
return e === "*" ? (this.wildcardHandlers.add(a), () => {
|
|
174
|
+
this.wildcardHandlers.delete(a);
|
|
175
|
+
}) : (this.handlers.has(e) || this.handlers.set(e, /* @__PURE__ */ new Set()), this.handlers.get(e)?.add(a), () => {
|
|
176
|
+
this.handlers.get(e)?.delete(a);
|
|
178
177
|
});
|
|
179
178
|
}
|
|
180
179
|
hostConnected() {
|
|
@@ -184,11 +183,11 @@ class Ot extends P {
|
|
|
184
183
|
window.removeEventListener("message", this.handleMessage), this.handlers.clear();
|
|
185
184
|
}
|
|
186
185
|
}
|
|
187
|
-
class
|
|
188
|
-
constructor(e,
|
|
186
|
+
class zt extends L {
|
|
187
|
+
constructor(e, a, i = localStorage) {
|
|
189
188
|
super(e), this._value = null, this.handleStorageChange = (t) => {
|
|
190
189
|
t.key === this.key && t.storageArea === this.storage && (this.load(), this.host.requestUpdate());
|
|
191
|
-
}, this.key =
|
|
190
|
+
}, this.key = a, this.storage = i, this.load();
|
|
192
191
|
}
|
|
193
192
|
get value() {
|
|
194
193
|
return this._value;
|
|
@@ -220,24 +219,24 @@ class bt extends P {
|
|
|
220
219
|
window.removeEventListener("storage", this.handleStorageChange);
|
|
221
220
|
}
|
|
222
221
|
}
|
|
223
|
-
var
|
|
224
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
225
|
-
(o = r[
|
|
226
|
-
return i && t &&
|
|
222
|
+
var Mt = Object.defineProperty, It = Object.getOwnPropertyDescriptor, Ct = (r, e, a, i) => {
|
|
223
|
+
for (var t = i > 1 ? void 0 : i ? It(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
224
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
225
|
+
return i && t && Mt(e, a, t), t;
|
|
227
226
|
};
|
|
228
|
-
let
|
|
227
|
+
let lt = class extends d {
|
|
229
228
|
constructor() {
|
|
230
229
|
super(...arguments), this.sx = {};
|
|
231
230
|
}
|
|
232
231
|
render() {
|
|
233
232
|
return l`
|
|
234
|
-
<div part="box" class="box" style=${
|
|
233
|
+
<div part="box" class="box" style=${f(this.sx)}>
|
|
235
234
|
<slot></slot>
|
|
236
235
|
</div>
|
|
237
236
|
`;
|
|
238
237
|
}
|
|
239
238
|
};
|
|
240
|
-
|
|
239
|
+
lt.styles = c`
|
|
241
240
|
:host {
|
|
242
241
|
display: contents;
|
|
243
242
|
}
|
|
@@ -246,13 +245,13 @@ it.styles = c`
|
|
|
246
245
|
display: block;
|
|
247
246
|
}
|
|
248
247
|
`;
|
|
249
|
-
|
|
248
|
+
Ct([
|
|
250
249
|
n({ type: Object })
|
|
251
|
-
],
|
|
252
|
-
|
|
250
|
+
], lt.prototype, "sx", 2);
|
|
251
|
+
lt = Ct([
|
|
253
252
|
p("tc-box")
|
|
254
|
-
],
|
|
255
|
-
const
|
|
253
|
+
], lt);
|
|
254
|
+
const Tt = `/**
|
|
256
255
|
* Do not edit directly, this file was auto-generated.
|
|
257
256
|
*/
|
|
258
257
|
|
|
@@ -753,13 +752,13 @@ const jt = `/**
|
|
|
753
752
|
border: var(--space-fixed-2xs) solid rgba(3, 105, 161, 0.2);
|
|
754
753
|
color: var(--semantic-info);
|
|
755
754
|
}
|
|
756
|
-
`,
|
|
757
|
-
var
|
|
758
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
759
|
-
(o = r[
|
|
760
|
-
return i && t &&
|
|
755
|
+
`, h = Ot(Tt);
|
|
756
|
+
var At = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, at = (r, e, a, i) => {
|
|
757
|
+
for (var t = i > 1 ? void 0 : i ? Ft(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
758
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
759
|
+
return i && t && At(e, a, t), t;
|
|
761
760
|
};
|
|
762
|
-
let
|
|
761
|
+
let P = class extends d {
|
|
763
762
|
constructor() {
|
|
764
763
|
super(...arguments), this.disabled = !1, this.loading = !1, this.variant = "primary", this.sx = {};
|
|
765
764
|
}
|
|
@@ -775,8 +774,8 @@ let C = class extends d {
|
|
|
775
774
|
return l`
|
|
776
775
|
<button
|
|
777
776
|
part="button"
|
|
778
|
-
class=${
|
|
779
|
-
style=${
|
|
777
|
+
class=${b(r)}
|
|
778
|
+
style=${f(this.sx)}
|
|
780
779
|
?disabled=${this.disabled || this.loading}
|
|
781
780
|
type="button"
|
|
782
781
|
@click=${this.handleClick}
|
|
@@ -798,8 +797,8 @@ let C = class extends d {
|
|
|
798
797
|
);
|
|
799
798
|
}
|
|
800
799
|
};
|
|
801
|
-
|
|
802
|
-
|
|
800
|
+
P.styles = [
|
|
801
|
+
h,
|
|
803
802
|
c`
|
|
804
803
|
:host {
|
|
805
804
|
display: block;
|
|
@@ -898,27 +897,27 @@ C.styles = [
|
|
|
898
897
|
}
|
|
899
898
|
`
|
|
900
899
|
];
|
|
901
|
-
|
|
900
|
+
at([
|
|
902
901
|
n({ type: Boolean })
|
|
903
|
-
],
|
|
904
|
-
|
|
902
|
+
], P.prototype, "disabled", 2);
|
|
903
|
+
at([
|
|
905
904
|
n({ type: Boolean })
|
|
906
|
-
],
|
|
907
|
-
|
|
905
|
+
], P.prototype, "loading", 2);
|
|
906
|
+
at([
|
|
908
907
|
n({ type: String })
|
|
909
|
-
],
|
|
910
|
-
|
|
908
|
+
], P.prototype, "variant", 2);
|
|
909
|
+
at([
|
|
911
910
|
n({ type: Object })
|
|
912
|
-
],
|
|
913
|
-
|
|
911
|
+
], P.prototype, "sx", 2);
|
|
912
|
+
P = at([
|
|
914
913
|
p("tc-button")
|
|
915
|
-
],
|
|
916
|
-
var
|
|
917
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
918
|
-
(o = r[
|
|
919
|
-
return i && t &&
|
|
914
|
+
], P);
|
|
915
|
+
var Ht = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, _t = (r, e, a, i) => {
|
|
916
|
+
for (var t = i > 1 ? void 0 : i ? Vt(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
917
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
918
|
+
return i && t && Ht(e, a, t), t;
|
|
920
919
|
};
|
|
921
|
-
let
|
|
920
|
+
let ct = class extends d {
|
|
922
921
|
constructor() {
|
|
923
922
|
super(...arguments), this.variant = "info";
|
|
924
923
|
}
|
|
@@ -931,7 +930,7 @@ let st = class extends d {
|
|
|
931
930
|
"error-message": r
|
|
932
931
|
};
|
|
933
932
|
return l`
|
|
934
|
-
<div part="callout" class=${
|
|
933
|
+
<div part="callout" class=${b(e)} role="alert">
|
|
935
934
|
<div class="callout-inner">
|
|
936
935
|
<div part="icon" class="callout-icon">
|
|
937
936
|
<slot name="icon"></slot>
|
|
@@ -944,8 +943,8 @@ let st = class extends d {
|
|
|
944
943
|
`;
|
|
945
944
|
}
|
|
946
945
|
};
|
|
947
|
-
|
|
948
|
-
|
|
946
|
+
ct.styles = [
|
|
947
|
+
h,
|
|
949
948
|
c`
|
|
950
949
|
:host {
|
|
951
950
|
display: block;
|
|
@@ -986,18 +985,18 @@ st.styles = [
|
|
|
986
985
|
}
|
|
987
986
|
`
|
|
988
987
|
];
|
|
989
|
-
|
|
988
|
+
_t([
|
|
990
989
|
n({ type: String })
|
|
991
|
-
],
|
|
992
|
-
|
|
990
|
+
], ct.prototype, "variant", 2);
|
|
991
|
+
ct = _t([
|
|
993
992
|
p("tc-callout")
|
|
994
|
-
],
|
|
995
|
-
var
|
|
996
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
997
|
-
(o = r[
|
|
998
|
-
return i && t &&
|
|
993
|
+
], ct);
|
|
994
|
+
var qt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, gt = (r, e, a, i) => {
|
|
995
|
+
for (var t = i > 1 ? void 0 : i ? Yt(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
996
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
997
|
+
return i && t && qt(e, a, t), t;
|
|
999
998
|
};
|
|
1000
|
-
let
|
|
999
|
+
let G = class extends d {
|
|
1001
1000
|
constructor() {
|
|
1002
1001
|
super(...arguments), this.noBorder = !1, this.sx = {};
|
|
1003
1002
|
}
|
|
@@ -1007,7 +1006,7 @@ let K = class extends d {
|
|
|
1007
1006
|
"card--no-border": this.noBorder
|
|
1008
1007
|
};
|
|
1009
1008
|
return l`
|
|
1010
|
-
<div part="card" class=${
|
|
1009
|
+
<div part="card" class=${b(r)} style=${f(this.sx)}>
|
|
1011
1010
|
<div class="card-content">
|
|
1012
1011
|
<slot></slot>
|
|
1013
1012
|
</div>
|
|
@@ -1015,8 +1014,8 @@ let K = class extends d {
|
|
|
1015
1014
|
`;
|
|
1016
1015
|
}
|
|
1017
1016
|
};
|
|
1018
|
-
|
|
1019
|
-
|
|
1017
|
+
G.styles = [
|
|
1018
|
+
h,
|
|
1020
1019
|
c`
|
|
1021
1020
|
:host {
|
|
1022
1021
|
display: block;
|
|
@@ -1051,21 +1050,21 @@ K.styles = [
|
|
|
1051
1050
|
}
|
|
1052
1051
|
`
|
|
1053
1052
|
];
|
|
1054
|
-
|
|
1053
|
+
gt([
|
|
1055
1054
|
n({ type: Boolean, attribute: "no-border" })
|
|
1056
|
-
],
|
|
1057
|
-
|
|
1055
|
+
], G.prototype, "noBorder", 2);
|
|
1056
|
+
gt([
|
|
1058
1057
|
n({ type: Object })
|
|
1059
|
-
],
|
|
1060
|
-
|
|
1058
|
+
], G.prototype, "sx", 2);
|
|
1059
|
+
G = gt([
|
|
1061
1060
|
p("tc-card")
|
|
1062
|
-
],
|
|
1063
|
-
var
|
|
1064
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
1065
|
-
(o = r[
|
|
1066
|
-
return i && t &&
|
|
1061
|
+
], G);
|
|
1062
|
+
var Ut = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, ft = (r, e, a, i) => {
|
|
1063
|
+
for (var t = i > 1 ? void 0 : i ? Rt(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
1064
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
1065
|
+
return i && t && Ut(e, a, t), t;
|
|
1067
1066
|
};
|
|
1068
|
-
let
|
|
1067
|
+
let Q = class extends d {
|
|
1069
1068
|
constructor() {
|
|
1070
1069
|
super(...arguments), this.variant = "default", this.size = "md";
|
|
1071
1070
|
}
|
|
@@ -1077,8 +1076,8 @@ let N = class extends d {
|
|
|
1077
1076
|
`;
|
|
1078
1077
|
}
|
|
1079
1078
|
};
|
|
1080
|
-
|
|
1081
|
-
|
|
1079
|
+
Q.styles = [
|
|
1080
|
+
h,
|
|
1082
1081
|
c`
|
|
1083
1082
|
:host {
|
|
1084
1083
|
display: inline-flex;
|
|
@@ -1124,21 +1123,21 @@ N.styles = [
|
|
|
1124
1123
|
}
|
|
1125
1124
|
`
|
|
1126
1125
|
];
|
|
1127
|
-
|
|
1126
|
+
ft([
|
|
1128
1127
|
n({ type: String })
|
|
1129
|
-
],
|
|
1130
|
-
|
|
1128
|
+
], Q.prototype, "variant", 2);
|
|
1129
|
+
ft([
|
|
1131
1130
|
n({ type: String })
|
|
1132
|
-
],
|
|
1133
|
-
|
|
1131
|
+
], Q.prototype, "size", 2);
|
|
1132
|
+
Q = ft([
|
|
1134
1133
|
p("tc-chip")
|
|
1135
|
-
],
|
|
1136
|
-
var
|
|
1137
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
1138
|
-
(o = r[
|
|
1139
|
-
return i && t &&
|
|
1134
|
+
], Q);
|
|
1135
|
+
var Nt = Object.defineProperty, Kt = Object.getOwnPropertyDescriptor, bt = (r, e, a, i) => {
|
|
1136
|
+
for (var t = i > 1 ? void 0 : i ? Kt(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
1137
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
1138
|
+
return i && t && Nt(e, a, t), t;
|
|
1140
1139
|
};
|
|
1141
|
-
let
|
|
1140
|
+
let J = class extends d {
|
|
1142
1141
|
constructor() {
|
|
1143
1142
|
super(...arguments), this.wide = !1, this.sx = {}, this.defaultStyles = {
|
|
1144
1143
|
display: "flex",
|
|
@@ -1156,14 +1155,14 @@ let W = class extends d {
|
|
|
1156
1155
|
<div
|
|
1157
1156
|
part="container"
|
|
1158
1157
|
class="container ${this.wide ? "container--wide" : ""}"
|
|
1159
|
-
style=${
|
|
1158
|
+
style=${f(r)}
|
|
1160
1159
|
>
|
|
1161
1160
|
<slot></slot>
|
|
1162
1161
|
</div>
|
|
1163
1162
|
`;
|
|
1164
1163
|
}
|
|
1165
1164
|
};
|
|
1166
|
-
|
|
1165
|
+
J.styles = c`
|
|
1167
1166
|
:host {
|
|
1168
1167
|
display: block;
|
|
1169
1168
|
width: 100%;
|
|
@@ -1180,21 +1179,21 @@ W.styles = c`
|
|
|
1180
1179
|
max-width: var(--container-max-width-wide);
|
|
1181
1180
|
}
|
|
1182
1181
|
`;
|
|
1183
|
-
|
|
1182
|
+
bt([
|
|
1184
1183
|
n({ type: Boolean })
|
|
1185
|
-
],
|
|
1186
|
-
|
|
1184
|
+
], J.prototype, "wide", 2);
|
|
1185
|
+
bt([
|
|
1187
1186
|
n({ type: Object })
|
|
1188
|
-
],
|
|
1189
|
-
|
|
1187
|
+
], J.prototype, "sx", 2);
|
|
1188
|
+
J = bt([
|
|
1190
1189
|
p("tc-container")
|
|
1191
|
-
],
|
|
1192
|
-
var
|
|
1193
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
1194
|
-
(o = r[
|
|
1195
|
-
return i && t &&
|
|
1190
|
+
], J);
|
|
1191
|
+
var Wt = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, pt = (r, e, a, i) => {
|
|
1192
|
+
for (var t = i > 1 ? void 0 : i ? Xt(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
1193
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
1194
|
+
return i && t && Wt(e, a, t), t;
|
|
1196
1195
|
};
|
|
1197
|
-
let
|
|
1196
|
+
let F = class extends d {
|
|
1198
1197
|
constructor() {
|
|
1199
1198
|
super(...arguments), this.color = "var(--ink-faint)", this.spacing = "var(--space-md)", this.text = "";
|
|
1200
1199
|
}
|
|
@@ -1211,7 +1210,7 @@ let L = class extends d {
|
|
|
1211
1210
|
`;
|
|
1212
1211
|
}
|
|
1213
1212
|
};
|
|
1214
|
-
|
|
1213
|
+
F.styles = c`
|
|
1215
1214
|
:host {
|
|
1216
1215
|
display: block;
|
|
1217
1216
|
width: 100%;
|
|
@@ -1248,137 +1247,24 @@ L.styles = c`
|
|
|
1248
1247
|
font-family: var(--font-body);
|
|
1249
1248
|
}
|
|
1250
1249
|
`;
|
|
1251
|
-
|
|
1250
|
+
pt([
|
|
1252
1251
|
n({ type: String })
|
|
1253
|
-
],
|
|
1254
|
-
|
|
1252
|
+
], F.prototype, "color", 2);
|
|
1253
|
+
pt([
|
|
1255
1254
|
n({ type: String })
|
|
1256
|
-
],
|
|
1257
|
-
|
|
1255
|
+
], F.prototype, "spacing", 2);
|
|
1256
|
+
pt([
|
|
1258
1257
|
n({ type: String })
|
|
1259
|
-
],
|
|
1260
|
-
|
|
1258
|
+
], F.prototype, "text", 2);
|
|
1259
|
+
F = pt([
|
|
1261
1260
|
p("tc-divider")
|
|
1262
|
-
],
|
|
1263
|
-
var
|
|
1264
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
1265
|
-
(o = r[
|
|
1266
|
-
return i && t &&
|
|
1267
|
-
};
|
|
1268
|
-
let b = class extends d {
|
|
1269
|
-
constructor() {
|
|
1270
|
-
super(...arguments), this.title = "", this.subtitle = "", this.notice = "", this.noAnimation = !1, this.sx = {};
|
|
1271
|
-
}
|
|
1272
|
-
render() {
|
|
1273
|
-
const r = !this.noAnimation;
|
|
1274
|
-
return l`
|
|
1275
|
-
<header part="header" class="header" style=${m(this.sx)}>
|
|
1276
|
-
${this.title ? l`<h1 part="title" class="form-title ${r ? "form-title--animated" : ""}">
|
|
1277
|
-
${this.title}
|
|
1278
|
-
</h1>` : ""}
|
|
1279
|
-
${this.subtitle ? l`<p part="subtitle" class="form-subtitle ${r ? "form-subtitle--animated" : ""}">
|
|
1280
|
-
${this.subtitle}
|
|
1281
|
-
</p>` : ""}
|
|
1282
|
-
${this.notice ? l`<div part="notice" class="notice ${r ? "notice--animated" : ""}">
|
|
1283
|
-
${this.notice}
|
|
1284
|
-
</div>` : ""}
|
|
1285
|
-
</header>
|
|
1286
|
-
`;
|
|
1287
|
-
}
|
|
1288
|
-
};
|
|
1289
|
-
b.styles = [
|
|
1290
|
-
u,
|
|
1291
|
-
c`
|
|
1292
|
-
:host {
|
|
1293
|
-
display: block;
|
|
1294
|
-
text-align: center;
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
.header {
|
|
1298
|
-
display: flex;
|
|
1299
|
-
flex-direction: column;
|
|
1300
|
-
align-items: center;
|
|
1301
|
-
gap: var(--space-sm);
|
|
1302
|
-
}
|
|
1303
|
-
|
|
1304
|
-
/* Extend design-tokens .form-title */
|
|
1305
|
-
.form-title {
|
|
1306
|
-
margin: 0;
|
|
1307
|
-
line-height: 1.2;
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
.form-title--animated {
|
|
1311
|
-
animation: slideDown var(--duration-fast) var(--easing-ease-in-out) backwards;
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
/* Extend design-tokens .form-subtitle */
|
|
1315
|
-
.form-subtitle {
|
|
1316
|
-
margin: 0;
|
|
1317
|
-
max-width: 28ch;
|
|
1318
|
-
}
|
|
1319
|
-
|
|
1320
|
-
.form-subtitle--animated {
|
|
1321
|
-
animation: slideUp var(--duration-smooth) var(--easing-ease-in-out) 100ms backwards;
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
.notice {
|
|
1325
|
-
margin-top: var(--space-sm);
|
|
1326
|
-
padding: var(--space-sm) var(--space-md);
|
|
1327
|
-
background: var(--paper-warm);
|
|
1328
|
-
border-radius: var(--radius-md);
|
|
1329
|
-
font-size: var(--font-size-sm);
|
|
1330
|
-
color: var(--ink-medium);
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
.notice--animated {
|
|
1334
|
-
animation: noticeReveal 500ms var(--easing-ease-in-out) 200ms backwards;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
@keyframes noticeReveal {
|
|
1338
|
-
from {
|
|
1339
|
-
opacity: 0;
|
|
1340
|
-
transform: scale(0.95);
|
|
1341
|
-
}
|
|
1342
|
-
to {
|
|
1343
|
-
opacity: 1;
|
|
1344
|
-
transform: scale(1);
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
/* Reduced motion */
|
|
1349
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1350
|
-
.form-title--animated,
|
|
1351
|
-
.form-subtitle--animated,
|
|
1352
|
-
.notice--animated {
|
|
1353
|
-
animation: none;
|
|
1354
|
-
}
|
|
1355
|
-
}
|
|
1356
|
-
`
|
|
1357
|
-
];
|
|
1358
|
-
H([
|
|
1359
|
-
n({ type: String })
|
|
1360
|
-
], b.prototype, "title", 2);
|
|
1361
|
-
H([
|
|
1362
|
-
n({ type: String })
|
|
1363
|
-
], b.prototype, "subtitle", 2);
|
|
1364
|
-
H([
|
|
1365
|
-
n({ type: String })
|
|
1366
|
-
], b.prototype, "notice", 2);
|
|
1367
|
-
H([
|
|
1368
|
-
n({ type: Boolean, attribute: "no-animation" })
|
|
1369
|
-
], b.prototype, "noAnimation", 2);
|
|
1370
|
-
H([
|
|
1371
|
-
n({ type: Object })
|
|
1372
|
-
], b.prototype, "sx", 2);
|
|
1373
|
-
b = H([
|
|
1374
|
-
p("tc-form-header")
|
|
1375
|
-
], b);
|
|
1376
|
-
var Kt = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, nt = (r, e, s, i) => {
|
|
1377
|
-
for (var t = i > 1 ? void 0 : i ? Nt(e, s) : e, a = r.length - 1, o; a >= 0; a--)
|
|
1378
|
-
(o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
|
|
1379
|
-
return i && t && Kt(e, s, t), t;
|
|
1261
|
+
], F);
|
|
1262
|
+
var Gt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, ht = (r, e, a, i) => {
|
|
1263
|
+
for (var t = i > 1 ? void 0 : i ? Qt(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
1264
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
1265
|
+
return i && t && Gt(e, a, t), t;
|
|
1380
1266
|
};
|
|
1381
|
-
const
|
|
1267
|
+
const Jt = {
|
|
1382
1268
|
"arrow-left": l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>`,
|
|
1383
1269
|
"arrow-right": l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg>`,
|
|
1384
1270
|
check: l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>`,
|
|
@@ -1415,12 +1301,12 @@ const Wt = {
|
|
|
1415
1301
|
qrcode: l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M3 11h8V3H3v8zm2-6h4v4H5V5zM3 21h8v-8H3v8zm2-6h4v4H5v-4zM13 3v8h8V3h-8zm6 6h-4V5h4v4zM13 13h2v2h-2zM15 15h2v2h-2zM13 17h2v2h-2zM15 19h2v2h-2zM17 17h2v2h-2zM17 13h2v2h-2zM19 15h2v2h-2zM19 19h2v2h-2z"/><path d="M6 6h2v2H6zM6 16h2v2H6zM16 6h2v2h-2z"/></svg>`,
|
|
1416
1302
|
key: l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"/></svg>`
|
|
1417
1303
|
};
|
|
1418
|
-
let
|
|
1304
|
+
let H = class extends d {
|
|
1419
1305
|
constructor() {
|
|
1420
1306
|
super(...arguments), this.name = "info", this.size = "1.5rem", this.color = "currentColor";
|
|
1421
1307
|
}
|
|
1422
1308
|
render() {
|
|
1423
|
-
const r =
|
|
1309
|
+
const r = Jt[this.name];
|
|
1424
1310
|
return r ? l`
|
|
1425
1311
|
<span
|
|
1426
1312
|
part="icon"
|
|
@@ -1432,7 +1318,7 @@ let T = class extends d {
|
|
|
1432
1318
|
` : (console.warn(`Icon "${this.name}" not found`), l``);
|
|
1433
1319
|
}
|
|
1434
1320
|
};
|
|
1435
|
-
|
|
1321
|
+
H.styles = c`
|
|
1436
1322
|
:host {
|
|
1437
1323
|
display: inline-flex;
|
|
1438
1324
|
align-items: center;
|
|
@@ -1451,134 +1337,453 @@ T.styles = c`
|
|
|
1451
1337
|
color: var(--icon-color);
|
|
1452
1338
|
}
|
|
1453
1339
|
`;
|
|
1454
|
-
|
|
1340
|
+
ht([
|
|
1455
1341
|
n({ type: String })
|
|
1456
|
-
],
|
|
1457
|
-
|
|
1342
|
+
], H.prototype, "name", 2);
|
|
1343
|
+
ht([
|
|
1458
1344
|
n({ type: String })
|
|
1459
|
-
],
|
|
1460
|
-
|
|
1345
|
+
], H.prototype, "size", 2);
|
|
1346
|
+
ht([
|
|
1461
1347
|
n({ type: String })
|
|
1462
|
-
],
|
|
1463
|
-
|
|
1348
|
+
], H.prototype, "color", 2);
|
|
1349
|
+
H = ht([
|
|
1464
1350
|
p("tc-icon")
|
|
1465
|
-
],
|
|
1466
|
-
var
|
|
1467
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
1468
|
-
(o = r[
|
|
1469
|
-
return i && t &&
|
|
1351
|
+
], H);
|
|
1352
|
+
var Zt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, Y = (r, e, a, i) => {
|
|
1353
|
+
for (var t = i > 1 ? void 0 : i ? te(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
1354
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
1355
|
+
return i && t && Zt(e, a, t), t;
|
|
1470
1356
|
};
|
|
1471
|
-
let
|
|
1357
|
+
let $ = class extends d {
|
|
1472
1358
|
constructor() {
|
|
1473
|
-
super(...arguments), this.
|
|
1359
|
+
super(...arguments), this.tag = "p", this.sx = {};
|
|
1360
|
+
}
|
|
1361
|
+
getColorClass() {
|
|
1362
|
+
return this.color && {
|
|
1363
|
+
primary: "text--primary",
|
|
1364
|
+
secondary: "text--secondary",
|
|
1365
|
+
tertiary: "text--tertiary",
|
|
1366
|
+
muted: "text--muted",
|
|
1367
|
+
accent: "text--accent",
|
|
1368
|
+
success: "text--success",
|
|
1369
|
+
error: "text--error",
|
|
1370
|
+
warning: "text--warning",
|
|
1371
|
+
info: "text--info"
|
|
1372
|
+
}[this.color] || "";
|
|
1373
|
+
}
|
|
1374
|
+
getColorStyle() {
|
|
1375
|
+
if (this.color && (this.color.startsWith("var(") || this.color.startsWith("#") || this.color.startsWith("rgb")))
|
|
1376
|
+
return this.color;
|
|
1474
1377
|
}
|
|
1475
1378
|
render() {
|
|
1476
|
-
const r = this.
|
|
1477
|
-
"
|
|
1478
|
-
|
|
1479
|
-
"
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
}, i = {
|
|
1485
|
-
input: !0,
|
|
1486
|
-
"has-error": r
|
|
1379
|
+
const r = St(this.tag), e = [
|
|
1380
|
+
"text",
|
|
1381
|
+
this.size ? `text--${this.size}` : "",
|
|
1382
|
+
this.weight ? `text--w${this.weight}` : "",
|
|
1383
|
+
this.getColorClass()
|
|
1384
|
+
].filter(Boolean).join(" "), a = this.getColorStyle(), i = {
|
|
1385
|
+
...a ? { color: a } : {},
|
|
1386
|
+
...this.sx
|
|
1487
1387
|
};
|
|
1488
|
-
return
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
<input
|
|
1493
|
-
part="input"
|
|
1494
|
-
id=${this.inputId}
|
|
1495
|
-
class=${M(i)}
|
|
1496
|
-
type=${this.type}
|
|
1497
|
-
name=${this.name}
|
|
1498
|
-
placeholder=${this.placeholder}
|
|
1499
|
-
.value=${this.value}
|
|
1500
|
-
?disabled=${this.disabled}
|
|
1501
|
-
?required=${this.required}
|
|
1502
|
-
autocomplete=${this.autocomplete || "off"}
|
|
1503
|
-
inputmode=${this.inputmode || ""}
|
|
1504
|
-
maxlength=${this.maxlength || ""}
|
|
1505
|
-
aria-invalid=${r ? "true" : "false"}
|
|
1506
|
-
aria-describedby=${r ? `${this.inputId}-error` : ""}
|
|
1507
|
-
style=${m(this.sx)}
|
|
1508
|
-
@input=${this.handleInput}
|
|
1509
|
-
@focus=${this.handleFocus}
|
|
1510
|
-
@blur=${this.handleBlur}
|
|
1511
|
-
@keydown=${this.handleKeydown}
|
|
1512
|
-
@paste=${this.handlePaste}
|
|
1513
|
-
/>
|
|
1514
|
-
<div part="ink-line" class="ink-line"></div>
|
|
1515
|
-
</div>
|
|
1516
|
-
${r ? l`<p part="error" id="${this.inputId}-error" class="input-error-text" role="alert">
|
|
1517
|
-
${this.error}
|
|
1518
|
-
</p>` : ""}
|
|
1519
|
-
</div>
|
|
1388
|
+
return Pt`
|
|
1389
|
+
<${r} part="text" class=${e} style=${f(i)}>
|
|
1390
|
+
<slot></slot>
|
|
1391
|
+
</${r}>
|
|
1520
1392
|
`;
|
|
1521
1393
|
}
|
|
1522
|
-
handleInput(r) {
|
|
1523
|
-
const e = r.target;
|
|
1524
|
-
this.value = e.value, this.dispatchEvent(
|
|
1525
|
-
new CustomEvent("tc-input", {
|
|
1526
|
-
bubbles: !0,
|
|
1527
|
-
composed: !0,
|
|
1528
|
-
detail: { value: e.value }
|
|
1529
|
-
})
|
|
1530
|
-
);
|
|
1531
|
-
}
|
|
1532
|
-
handleFocus() {
|
|
1533
|
-
this.isFocused = !0;
|
|
1534
|
-
}
|
|
1535
|
-
handleBlur(r) {
|
|
1536
|
-
const e = r.target;
|
|
1537
|
-
this.isFocused = !1, this.dispatchEvent(
|
|
1538
|
-
new CustomEvent("tc-blur", {
|
|
1539
|
-
bubbles: !0,
|
|
1540
|
-
composed: !0,
|
|
1541
|
-
detail: { value: e.value }
|
|
1542
|
-
})
|
|
1543
|
-
);
|
|
1544
|
-
}
|
|
1545
|
-
handleKeydown(r) {
|
|
1546
|
-
this.dispatchEvent(
|
|
1547
|
-
new CustomEvent("tc-keydown", {
|
|
1548
|
-
bubbles: !0,
|
|
1549
|
-
composed: !0,
|
|
1550
|
-
detail: { key: r.key, value: this.value, originalEvent: r }
|
|
1551
|
-
})
|
|
1552
|
-
);
|
|
1553
|
-
}
|
|
1554
|
-
handlePaste(r) {
|
|
1555
|
-
this.dispatchEvent(
|
|
1556
|
-
new CustomEvent("tc-paste", {
|
|
1557
|
-
bubbles: !0,
|
|
1558
|
-
composed: !0,
|
|
1559
|
-
detail: { data: r.clipboardData?.getData("text"), originalEvent: r }
|
|
1560
|
-
})
|
|
1561
|
-
);
|
|
1562
|
-
}
|
|
1563
|
-
focus() {
|
|
1564
|
-
this.shadowRoot?.querySelector("input")?.focus();
|
|
1565
|
-
}
|
|
1566
1394
|
};
|
|
1567
|
-
|
|
1568
|
-
|
|
1395
|
+
$.styles = [
|
|
1396
|
+
h,
|
|
1569
1397
|
c`
|
|
1570
1398
|
:host {
|
|
1571
|
-
display:
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
/* Extend design-tokens .field-group */
|
|
1575
|
-
.field-group {
|
|
1576
|
-
width: 100%;
|
|
1399
|
+
display: contents;
|
|
1577
1400
|
}
|
|
1578
1401
|
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1402
|
+
.text {
|
|
1403
|
+
margin: 0;
|
|
1404
|
+
padding: 0;
|
|
1405
|
+
font-family: var(--font-body);
|
|
1406
|
+
line-height: 1.4;
|
|
1407
|
+
color: var(--ink-black);
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
/* Size variants using design-tokens */
|
|
1411
|
+
.text--sm {
|
|
1412
|
+
font-size: var(--font-size-sm);
|
|
1413
|
+
}
|
|
1414
|
+
.text--base {
|
|
1415
|
+
font-size: var(--font-size-base);
|
|
1416
|
+
}
|
|
1417
|
+
.text--lg {
|
|
1418
|
+
font-size: var(--font-size-lg);
|
|
1419
|
+
}
|
|
1420
|
+
.text--xl {
|
|
1421
|
+
font-size: var(--font-size-xl);
|
|
1422
|
+
}
|
|
1423
|
+
.text--2xl {
|
|
1424
|
+
font-size: var(--font-size-2xl);
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
/* Weight variants */
|
|
1428
|
+
.text--w400 {
|
|
1429
|
+
font-weight: 400;
|
|
1430
|
+
}
|
|
1431
|
+
.text--w500 {
|
|
1432
|
+
font-weight: 500;
|
|
1433
|
+
}
|
|
1434
|
+
.text--w600 {
|
|
1435
|
+
font-weight: 600;
|
|
1436
|
+
}
|
|
1437
|
+
.text--w700 {
|
|
1438
|
+
font-weight: 700;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
/* Color variants using design-tokens - these will respond to theme changes */
|
|
1442
|
+
.text--primary {
|
|
1443
|
+
color: var(--ink-black);
|
|
1444
|
+
}
|
|
1445
|
+
.text--secondary {
|
|
1446
|
+
color: var(--ink-dark);
|
|
1447
|
+
}
|
|
1448
|
+
.text--tertiary {
|
|
1449
|
+
color: var(--ink-medium);
|
|
1450
|
+
}
|
|
1451
|
+
.text--muted {
|
|
1452
|
+
color: var(--ink-light);
|
|
1453
|
+
}
|
|
1454
|
+
.text--accent {
|
|
1455
|
+
color: var(--accent-primary);
|
|
1456
|
+
}
|
|
1457
|
+
.text--success {
|
|
1458
|
+
color: var(--accent-success);
|
|
1459
|
+
}
|
|
1460
|
+
.text--error {
|
|
1461
|
+
color: var(--error-base);
|
|
1462
|
+
}
|
|
1463
|
+
.text--warning {
|
|
1464
|
+
color: var(--semantic-warning);
|
|
1465
|
+
}
|
|
1466
|
+
.text--info {
|
|
1467
|
+
color: var(--semantic-info);
|
|
1468
|
+
}
|
|
1469
|
+
`
|
|
1470
|
+
];
|
|
1471
|
+
Y([
|
|
1472
|
+
n({ type: String })
|
|
1473
|
+
], $.prototype, "tag", 2);
|
|
1474
|
+
Y([
|
|
1475
|
+
n({ type: String })
|
|
1476
|
+
], $.prototype, "size", 2);
|
|
1477
|
+
Y([
|
|
1478
|
+
n({ type: String })
|
|
1479
|
+
], $.prototype, "weight", 2);
|
|
1480
|
+
Y([
|
|
1481
|
+
n({ type: String })
|
|
1482
|
+
], $.prototype, "color", 2);
|
|
1483
|
+
Y([
|
|
1484
|
+
n({ type: Object })
|
|
1485
|
+
], $.prototype, "sx", 2);
|
|
1486
|
+
$ = Y([
|
|
1487
|
+
p("tc-text")
|
|
1488
|
+
], $);
|
|
1489
|
+
var ee = Object.defineProperty, re = Object.getOwnPropertyDescriptor, yt = (r, e, a, i) => {
|
|
1490
|
+
for (var t = i > 1 ? void 0 : i ? re(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
1491
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
1492
|
+
return i && t && ee(e, a, t), t;
|
|
1493
|
+
};
|
|
1494
|
+
let Z = class extends d {
|
|
1495
|
+
constructor() {
|
|
1496
|
+
super(...arguments), this.variant = "error", this.message = "";
|
|
1497
|
+
}
|
|
1498
|
+
getIconName() {
|
|
1499
|
+
switch (this.variant) {
|
|
1500
|
+
case "warning":
|
|
1501
|
+
return "alert-triangle";
|
|
1502
|
+
case "info":
|
|
1503
|
+
return "info";
|
|
1504
|
+
default:
|
|
1505
|
+
return "alert-circle";
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
getIconColor() {
|
|
1509
|
+
switch (this.variant) {
|
|
1510
|
+
case "warning":
|
|
1511
|
+
return "var(--semantic-warning)";
|
|
1512
|
+
case "info":
|
|
1513
|
+
return "var(--semantic-info)";
|
|
1514
|
+
default:
|
|
1515
|
+
return "var(--error-base)";
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
render() {
|
|
1519
|
+
return this.message ? l`
|
|
1520
|
+
<tc-callout part="callout" variant=${this.variant}>
|
|
1521
|
+
<tc-icon
|
|
1522
|
+
slot="icon"
|
|
1523
|
+
part="icon"
|
|
1524
|
+
name=${this.getIconName()}
|
|
1525
|
+
size="1.25rem"
|
|
1526
|
+
color=${this.getIconColor()}
|
|
1527
|
+
></tc-icon>
|
|
1528
|
+
<tc-text part="message" class="message-text" size="sm">
|
|
1529
|
+
${this.message}
|
|
1530
|
+
</tc-text>
|
|
1531
|
+
</tc-callout>
|
|
1532
|
+
` : null;
|
|
1533
|
+
}
|
|
1534
|
+
};
|
|
1535
|
+
Z.styles = c`
|
|
1536
|
+
:host {
|
|
1537
|
+
display: block;
|
|
1538
|
+
width: 100%;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
tc-callout::part(callout) {
|
|
1542
|
+
padding: var(--space-sm) var(--space-md);
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
.message-text {
|
|
1546
|
+
line-height: 1.4;
|
|
1547
|
+
}
|
|
1548
|
+
`;
|
|
1549
|
+
yt([
|
|
1550
|
+
n({ type: String })
|
|
1551
|
+
], Z.prototype, "variant", 2);
|
|
1552
|
+
yt([
|
|
1553
|
+
n({ type: String })
|
|
1554
|
+
], Z.prototype, "message", 2);
|
|
1555
|
+
Z = yt([
|
|
1556
|
+
p("tc-error-message")
|
|
1557
|
+
], Z);
|
|
1558
|
+
var ie = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, U = (r, e, a, i) => {
|
|
1559
|
+
for (var t = i > 1 ? void 0 : i ? ae(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
1560
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
1561
|
+
return i && t && ie(e, a, t), t;
|
|
1562
|
+
};
|
|
1563
|
+
let z = class extends d {
|
|
1564
|
+
constructor() {
|
|
1565
|
+
super(...arguments), this.title = "", this.subtitle = "", this.notice = "", this.noAnimation = !1, this.sx = {};
|
|
1566
|
+
}
|
|
1567
|
+
render() {
|
|
1568
|
+
const r = !this.noAnimation;
|
|
1569
|
+
return l`
|
|
1570
|
+
<header part="header" class="header" style=${f(this.sx)}>
|
|
1571
|
+
${this.title ? l`<h1 part="title" class="form-title ${r ? "form-title--animated" : ""}">
|
|
1572
|
+
${this.title}
|
|
1573
|
+
</h1>` : ""}
|
|
1574
|
+
${this.subtitle ? l`<p part="subtitle" class="form-subtitle ${r ? "form-subtitle--animated" : ""}">
|
|
1575
|
+
${this.subtitle}
|
|
1576
|
+
</p>` : ""}
|
|
1577
|
+
${this.notice ? l`<div part="notice" class="notice ${r ? "notice--animated" : ""}">
|
|
1578
|
+
${this.notice}
|
|
1579
|
+
</div>` : ""}
|
|
1580
|
+
</header>
|
|
1581
|
+
`;
|
|
1582
|
+
}
|
|
1583
|
+
};
|
|
1584
|
+
z.styles = [
|
|
1585
|
+
h,
|
|
1586
|
+
c`
|
|
1587
|
+
:host {
|
|
1588
|
+
display: block;
|
|
1589
|
+
text-align: center;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
.header {
|
|
1593
|
+
display: flex;
|
|
1594
|
+
flex-direction: column;
|
|
1595
|
+
align-items: center;
|
|
1596
|
+
gap: var(--space-sm);
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
/* Extend design-tokens .form-title */
|
|
1600
|
+
.form-title {
|
|
1601
|
+
margin: 0;
|
|
1602
|
+
line-height: 1.2;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
.form-title--animated {
|
|
1606
|
+
animation: slideDown var(--duration-fast) var(--easing-ease-in-out) backwards;
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
/* Extend design-tokens .form-subtitle */
|
|
1610
|
+
.form-subtitle {
|
|
1611
|
+
margin: 0;
|
|
1612
|
+
max-width: 28ch;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
.form-subtitle--animated {
|
|
1616
|
+
animation: slideUp var(--duration-smooth) var(--easing-ease-in-out) 100ms backwards;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
.notice {
|
|
1620
|
+
margin-top: var(--space-sm);
|
|
1621
|
+
padding: var(--space-sm) var(--space-md);
|
|
1622
|
+
background: var(--paper-warm);
|
|
1623
|
+
border-radius: var(--radius-md);
|
|
1624
|
+
font-size: var(--font-size-sm);
|
|
1625
|
+
color: var(--ink-medium);
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
.notice--animated {
|
|
1629
|
+
animation: noticeReveal 500ms var(--easing-ease-in-out) 200ms backwards;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
@keyframes noticeReveal {
|
|
1633
|
+
from {
|
|
1634
|
+
opacity: 0;
|
|
1635
|
+
transform: scale(0.95);
|
|
1636
|
+
}
|
|
1637
|
+
to {
|
|
1638
|
+
opacity: 1;
|
|
1639
|
+
transform: scale(1);
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
/* Reduced motion */
|
|
1644
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1645
|
+
.form-title--animated,
|
|
1646
|
+
.form-subtitle--animated,
|
|
1647
|
+
.notice--animated {
|
|
1648
|
+
animation: none;
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
`
|
|
1652
|
+
];
|
|
1653
|
+
U([
|
|
1654
|
+
n({ type: String })
|
|
1655
|
+
], z.prototype, "title", 2);
|
|
1656
|
+
U([
|
|
1657
|
+
n({ type: String })
|
|
1658
|
+
], z.prototype, "subtitle", 2);
|
|
1659
|
+
U([
|
|
1660
|
+
n({ type: String })
|
|
1661
|
+
], z.prototype, "notice", 2);
|
|
1662
|
+
U([
|
|
1663
|
+
n({ type: Boolean, attribute: "no-animation" })
|
|
1664
|
+
], z.prototype, "noAnimation", 2);
|
|
1665
|
+
U([
|
|
1666
|
+
n({ type: Object })
|
|
1667
|
+
], z.prototype, "sx", 2);
|
|
1668
|
+
z = U([
|
|
1669
|
+
p("tc-form-header")
|
|
1670
|
+
], z);
|
|
1671
|
+
var se = Object.defineProperty, oe = Object.getOwnPropertyDescriptor, v = (r, e, a, i) => {
|
|
1672
|
+
for (var t = i > 1 ? void 0 : i ? oe(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
1673
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
1674
|
+
return i && t && se(e, a, t), t;
|
|
1675
|
+
};
|
|
1676
|
+
let u = class extends d {
|
|
1677
|
+
constructor() {
|
|
1678
|
+
super(...arguments), this.label = "", this.type = "text", this.placeholder = "", this.value = "", this.error = "", this.disabled = !1, this.required = !1, this.name = "", this.autocomplete = "", this.inputmode = "", this.maxlength = 0, this.sx = {}, this.inputId = `tc-input-${Math.random().toString(36).slice(2)}`, this.isFocused = !1;
|
|
1679
|
+
}
|
|
1680
|
+
render() {
|
|
1681
|
+
const r = this.error.length > 0, e = {
|
|
1682
|
+
"field-group": !0,
|
|
1683
|
+
focused: this.isFocused,
|
|
1684
|
+
"has-error": r
|
|
1685
|
+
}, a = {
|
|
1686
|
+
"input-wrapper": !0,
|
|
1687
|
+
focused: this.isFocused,
|
|
1688
|
+
"has-error": r
|
|
1689
|
+
}, i = {
|
|
1690
|
+
input: !0,
|
|
1691
|
+
"has-error": r
|
|
1692
|
+
};
|
|
1693
|
+
return l`
|
|
1694
|
+
<div class=${b(e)}>
|
|
1695
|
+
${this.label ? l`<label part="label" class="field-label" for=${this.inputId}>${this.label}</label>` : ""}
|
|
1696
|
+
<div part="wrapper" class=${b(a)}>
|
|
1697
|
+
<input
|
|
1698
|
+
part="input"
|
|
1699
|
+
id=${this.inputId}
|
|
1700
|
+
class=${b(i)}
|
|
1701
|
+
type=${this.type}
|
|
1702
|
+
name=${this.name}
|
|
1703
|
+
placeholder=${this.placeholder}
|
|
1704
|
+
.value=${this.value}
|
|
1705
|
+
?disabled=${this.disabled}
|
|
1706
|
+
?required=${this.required}
|
|
1707
|
+
autocomplete=${this.autocomplete || "off"}
|
|
1708
|
+
inputmode=${this.inputmode || ""}
|
|
1709
|
+
maxlength=${this.maxlength || ""}
|
|
1710
|
+
aria-invalid=${r ? "true" : "false"}
|
|
1711
|
+
aria-describedby=${r ? `${this.inputId}-error` : ""}
|
|
1712
|
+
style=${f(this.sx)}
|
|
1713
|
+
@input=${this.handleInput}
|
|
1714
|
+
@focus=${this.handleFocus}
|
|
1715
|
+
@blur=${this.handleBlur}
|
|
1716
|
+
@keydown=${this.handleKeydown}
|
|
1717
|
+
@paste=${this.handlePaste}
|
|
1718
|
+
/>
|
|
1719
|
+
<div part="ink-line" class="ink-line"></div>
|
|
1720
|
+
</div>
|
|
1721
|
+
${r ? l`<p part="error" id="${this.inputId}-error" class="input-error-text" role="alert">
|
|
1722
|
+
${this.error}
|
|
1723
|
+
</p>` : ""}
|
|
1724
|
+
</div>
|
|
1725
|
+
`;
|
|
1726
|
+
}
|
|
1727
|
+
handleInput(r) {
|
|
1728
|
+
const e = r.target;
|
|
1729
|
+
this.value = e.value, this.dispatchEvent(
|
|
1730
|
+
new CustomEvent("tc-input", {
|
|
1731
|
+
bubbles: !0,
|
|
1732
|
+
composed: !0,
|
|
1733
|
+
detail: { value: e.value }
|
|
1734
|
+
})
|
|
1735
|
+
);
|
|
1736
|
+
}
|
|
1737
|
+
handleFocus() {
|
|
1738
|
+
this.isFocused = !0;
|
|
1739
|
+
}
|
|
1740
|
+
handleBlur(r) {
|
|
1741
|
+
const e = r.target;
|
|
1742
|
+
this.isFocused = !1, this.dispatchEvent(
|
|
1743
|
+
new CustomEvent("tc-blur", {
|
|
1744
|
+
bubbles: !0,
|
|
1745
|
+
composed: !0,
|
|
1746
|
+
detail: { value: e.value }
|
|
1747
|
+
})
|
|
1748
|
+
);
|
|
1749
|
+
}
|
|
1750
|
+
handleKeydown(r) {
|
|
1751
|
+
this.dispatchEvent(
|
|
1752
|
+
new CustomEvent("tc-keydown", {
|
|
1753
|
+
bubbles: !0,
|
|
1754
|
+
composed: !0,
|
|
1755
|
+
detail: { key: r.key, value: this.value, originalEvent: r }
|
|
1756
|
+
})
|
|
1757
|
+
);
|
|
1758
|
+
}
|
|
1759
|
+
handlePaste(r) {
|
|
1760
|
+
this.dispatchEvent(
|
|
1761
|
+
new CustomEvent("tc-paste", {
|
|
1762
|
+
bubbles: !0,
|
|
1763
|
+
composed: !0,
|
|
1764
|
+
detail: { data: r.clipboardData?.getData("text"), originalEvent: r }
|
|
1765
|
+
})
|
|
1766
|
+
);
|
|
1767
|
+
}
|
|
1768
|
+
focus() {
|
|
1769
|
+
this.shadowRoot?.querySelector("input")?.focus();
|
|
1770
|
+
}
|
|
1771
|
+
};
|
|
1772
|
+
u.styles = [
|
|
1773
|
+
h,
|
|
1774
|
+
c`
|
|
1775
|
+
:host {
|
|
1776
|
+
display: block;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
/* Extend design-tokens .field-group */
|
|
1780
|
+
.field-group {
|
|
1781
|
+
width: 100%;
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
/* Label color change on focus - extends design-tokens .field-label */
|
|
1785
|
+
.field-group.focused .field-label {
|
|
1786
|
+
color: var(--accent-primary);
|
|
1582
1787
|
}
|
|
1583
1788
|
|
|
1584
1789
|
.field-group.has-error .field-label {
|
|
@@ -1590,10 +1795,282 @@ h.styles = [
|
|
|
1590
1795
|
width: 100%;
|
|
1591
1796
|
}
|
|
1592
1797
|
|
|
1593
|
-
/* Extend design-tokens .input */
|
|
1594
|
-
.input {
|
|
1595
|
-
width: 100%;
|
|
1596
|
-
box-sizing: border-box;
|
|
1798
|
+
/* Extend design-tokens .input */
|
|
1799
|
+
.input {
|
|
1800
|
+
width: 100%;
|
|
1801
|
+
box-sizing: border-box;
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
.input:disabled {
|
|
1805
|
+
opacity: var(--opacity-disabled);
|
|
1806
|
+
cursor: not-allowed;
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
/* Ink line animation */
|
|
1810
|
+
.ink-line {
|
|
1811
|
+
position: absolute;
|
|
1812
|
+
bottom: 0;
|
|
1813
|
+
left: 50%;
|
|
1814
|
+
transform: translateX(-50%);
|
|
1815
|
+
width: 0;
|
|
1816
|
+
height: 0.125rem;
|
|
1817
|
+
background: linear-gradient(
|
|
1818
|
+
90deg,
|
|
1819
|
+
var(--accent-primary) 0%,
|
|
1820
|
+
var(--accent-primary-hover) 100%
|
|
1821
|
+
);
|
|
1822
|
+
border-radius: 0.0625rem;
|
|
1823
|
+
transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
1824
|
+
pointer-events: none;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
.input-wrapper.focused .ink-line {
|
|
1828
|
+
width: 60%;
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
/* Error states */
|
|
1832
|
+
.input.has-error {
|
|
1833
|
+
border-color: var(--error-base);
|
|
1834
|
+
background: var(--error-bg);
|
|
1835
|
+
}
|
|
1836
|
+
|
|
1837
|
+
.input.has-error:focus {
|
|
1838
|
+
border-color: var(--error-base);
|
|
1839
|
+
box-shadow: 0 0 0 0.1875rem var(--error-border);
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
.input-wrapper.has-error .ink-line {
|
|
1843
|
+
background: linear-gradient(
|
|
1844
|
+
90deg,
|
|
1845
|
+
var(--error-base) 0%,
|
|
1846
|
+
var(--error-base) 100%
|
|
1847
|
+
);
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
.input-error-text {
|
|
1851
|
+
font-size: var(--font-size-sm);
|
|
1852
|
+
color: var(--error-base);
|
|
1853
|
+
margin: 0;
|
|
1854
|
+
animation: slideDown 300ms ease backwards;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
@keyframes slideDown {
|
|
1858
|
+
from {
|
|
1859
|
+
opacity: 0;
|
|
1860
|
+
transform: translateY(-0.25rem);
|
|
1861
|
+
}
|
|
1862
|
+
to {
|
|
1863
|
+
opacity: 1;
|
|
1864
|
+
transform: translateY(0);
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
/* Reduced motion */
|
|
1869
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1870
|
+
.field-label,
|
|
1871
|
+
.input,
|
|
1872
|
+
.ink-line,
|
|
1873
|
+
.input-error-text {
|
|
1874
|
+
transition-duration: 0.01ms !important;
|
|
1875
|
+
animation-duration: 0.01ms !important;
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
`
|
|
1879
|
+
];
|
|
1880
|
+
v([
|
|
1881
|
+
n({ type: String })
|
|
1882
|
+
], u.prototype, "label", 2);
|
|
1883
|
+
v([
|
|
1884
|
+
n({ type: String })
|
|
1885
|
+
], u.prototype, "type", 2);
|
|
1886
|
+
v([
|
|
1887
|
+
n({ type: String })
|
|
1888
|
+
], u.prototype, "placeholder", 2);
|
|
1889
|
+
v([
|
|
1890
|
+
n({ type: String })
|
|
1891
|
+
], u.prototype, "value", 2);
|
|
1892
|
+
v([
|
|
1893
|
+
n({ type: String })
|
|
1894
|
+
], u.prototype, "error", 2);
|
|
1895
|
+
v([
|
|
1896
|
+
n({ type: Boolean })
|
|
1897
|
+
], u.prototype, "disabled", 2);
|
|
1898
|
+
v([
|
|
1899
|
+
n({ type: Boolean })
|
|
1900
|
+
], u.prototype, "required", 2);
|
|
1901
|
+
v([
|
|
1902
|
+
n({ type: String })
|
|
1903
|
+
], u.prototype, "name", 2);
|
|
1904
|
+
v([
|
|
1905
|
+
n({ type: String })
|
|
1906
|
+
], u.prototype, "autocomplete", 2);
|
|
1907
|
+
v([
|
|
1908
|
+
n({ type: String })
|
|
1909
|
+
], u.prototype, "inputmode", 2);
|
|
1910
|
+
v([
|
|
1911
|
+
n({ type: Number })
|
|
1912
|
+
], u.prototype, "maxlength", 2);
|
|
1913
|
+
v([
|
|
1914
|
+
n({ type: Object })
|
|
1915
|
+
], u.prototype, "sx", 2);
|
|
1916
|
+
v([
|
|
1917
|
+
k()
|
|
1918
|
+
], u.prototype, "inputId", 2);
|
|
1919
|
+
v([
|
|
1920
|
+
k()
|
|
1921
|
+
], u.prototype, "isFocused", 2);
|
|
1922
|
+
u = v([
|
|
1923
|
+
p("tc-input")
|
|
1924
|
+
], u);
|
|
1925
|
+
var ne = Object.defineProperty, le = Object.getOwnPropertyDescriptor, g = (r, e, a, i) => {
|
|
1926
|
+
for (var t = i > 1 ? void 0 : i ? le(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
1927
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
1928
|
+
return i && t && ne(e, a, t), t;
|
|
1929
|
+
};
|
|
1930
|
+
let m = class extends d {
|
|
1931
|
+
constructor() {
|
|
1932
|
+
super(...arguments), this.label = "", this.placeholder = "", this.value = "", this.error = "", this.disabled = !1, this.readonly = !1, this.chipLabel = "", this.chipIcon = "", this.chipVariant = "default", this.inputId = `tc-input-chip-${Math.random().toString(36).slice(2)}`, this.isFocused = !1;
|
|
1933
|
+
}
|
|
1934
|
+
render() {
|
|
1935
|
+
const r = this.error.length > 0, e = {
|
|
1936
|
+
"field-group": !0,
|
|
1937
|
+
focused: this.isFocused,
|
|
1938
|
+
"has-error": r
|
|
1939
|
+
}, a = {
|
|
1940
|
+
"input-container": !0,
|
|
1941
|
+
"has-error": r
|
|
1942
|
+
};
|
|
1943
|
+
return l`
|
|
1944
|
+
<div class=${b(e)}>
|
|
1945
|
+
${this.label ? l`<label part="label" class="field-label" for=${this.inputId}>${this.label}</label>` : ""}
|
|
1946
|
+
<div part="wrapper" class=${b(a)}>
|
|
1947
|
+
<input
|
|
1948
|
+
part="input"
|
|
1949
|
+
id=${this.inputId}
|
|
1950
|
+
class="input"
|
|
1951
|
+
type="text"
|
|
1952
|
+
placeholder=${this.placeholder}
|
|
1953
|
+
.value=${this.value}
|
|
1954
|
+
?disabled=${this.disabled}
|
|
1955
|
+
?readonly=${this.readonly}
|
|
1956
|
+
aria-invalid=${r ? "true" : "false"}
|
|
1957
|
+
aria-describedby=${r ? `${this.inputId}-error` : ""}
|
|
1958
|
+
@input=${this.handleInput}
|
|
1959
|
+
@focus=${this.handleFocus}
|
|
1960
|
+
@blur=${this.handleBlur}
|
|
1961
|
+
@keydown=${this.handleKeydown}
|
|
1962
|
+
/>
|
|
1963
|
+
${this.chipLabel ? l`
|
|
1964
|
+
<div class="chip-container">
|
|
1965
|
+
<tc-chip part="chip" variant=${this.chipVariant} size="sm">
|
|
1966
|
+
<span class="chip-content">
|
|
1967
|
+
${this.chipIcon ? l`<tc-icon name=${this.chipIcon} size="0.875rem"></tc-icon>` : ""}
|
|
1968
|
+
${this.chipLabel}
|
|
1969
|
+
</span>
|
|
1970
|
+
</tc-chip>
|
|
1971
|
+
</div>
|
|
1972
|
+
` : ""}
|
|
1973
|
+
</div>
|
|
1974
|
+
${r ? l`<p part="error" id="${this.inputId}-error" class="error-text" role="alert">
|
|
1975
|
+
${this.error}
|
|
1976
|
+
</p>` : ""}
|
|
1977
|
+
</div>
|
|
1978
|
+
`;
|
|
1979
|
+
}
|
|
1980
|
+
handleInput(r) {
|
|
1981
|
+
const e = r.target;
|
|
1982
|
+
this.value = e.value, this.dispatchEvent(
|
|
1983
|
+
new CustomEvent("tc-input", {
|
|
1984
|
+
bubbles: !0,
|
|
1985
|
+
composed: !0,
|
|
1986
|
+
detail: { value: e.value }
|
|
1987
|
+
})
|
|
1988
|
+
);
|
|
1989
|
+
}
|
|
1990
|
+
handleFocus() {
|
|
1991
|
+
this.isFocused = !0;
|
|
1992
|
+
}
|
|
1993
|
+
handleBlur(r) {
|
|
1994
|
+
const e = r.target;
|
|
1995
|
+
this.isFocused = !1, this.dispatchEvent(
|
|
1996
|
+
new CustomEvent("tc-blur", {
|
|
1997
|
+
bubbles: !0,
|
|
1998
|
+
composed: !0,
|
|
1999
|
+
detail: { value: e.value }
|
|
2000
|
+
})
|
|
2001
|
+
);
|
|
2002
|
+
}
|
|
2003
|
+
handleKeydown(r) {
|
|
2004
|
+
this.dispatchEvent(
|
|
2005
|
+
new CustomEvent("tc-keydown", {
|
|
2006
|
+
bubbles: !0,
|
|
2007
|
+
composed: !0,
|
|
2008
|
+
detail: { key: r.key, value: this.value, originalEvent: r }
|
|
2009
|
+
})
|
|
2010
|
+
);
|
|
2011
|
+
}
|
|
2012
|
+
focus() {
|
|
2013
|
+
this.shadowRoot?.querySelector("input")?.focus();
|
|
2014
|
+
}
|
|
2015
|
+
};
|
|
2016
|
+
m.styles = [
|
|
2017
|
+
h,
|
|
2018
|
+
c`
|
|
2019
|
+
:host {
|
|
2020
|
+
display: block;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
.field-group {
|
|
2024
|
+
width: 100%;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
.field-group.focused .field-label {
|
|
2028
|
+
color: var(--accent-primary);
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
.field-group.has-error .field-label {
|
|
2032
|
+
color: var(--error-base);
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
.input-container {
|
|
2036
|
+
position: relative;
|
|
2037
|
+
display: flex;
|
|
2038
|
+
align-items: center;
|
|
2039
|
+
width: 100%;
|
|
2040
|
+
background: var(--paper-white);
|
|
2041
|
+
border: 1px solid var(--ink-faint);
|
|
2042
|
+
border-radius: var(--form-input-radius);
|
|
2043
|
+
transition: var(--transition-fast);
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
.input-container:focus-within {
|
|
2047
|
+
border-color: var(--accent-primary);
|
|
2048
|
+
box-shadow: 0 0 0 3px var(--alpha-primary10);
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
.input-container.has-error {
|
|
2052
|
+
border-color: var(--error-base);
|
|
2053
|
+
background: var(--error-bg);
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
.input-container.has-error:focus-within {
|
|
2057
|
+
box-shadow: 0 0 0 3px var(--error-border);
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
.input {
|
|
2061
|
+
flex: 1;
|
|
2062
|
+
min-width: 0;
|
|
2063
|
+
padding: var(--form-input-padding-y) var(--form-input-padding-x);
|
|
2064
|
+
font-family: var(--font-body);
|
|
2065
|
+
font-size: var(--form-input-font-size);
|
|
2066
|
+
color: var(--ink-black);
|
|
2067
|
+
background: transparent;
|
|
2068
|
+
border: none;
|
|
2069
|
+
outline: none;
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
.input::placeholder {
|
|
2073
|
+
color: var(--ink-light);
|
|
1597
2074
|
}
|
|
1598
2075
|
|
|
1599
2076
|
.input:disabled {
|
|
@@ -1601,51 +2078,26 @@ h.styles = [
|
|
|
1601
2078
|
cursor: not-allowed;
|
|
1602
2079
|
}
|
|
1603
2080
|
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
position: absolute;
|
|
1607
|
-
bottom: 0;
|
|
1608
|
-
left: 50%;
|
|
1609
|
-
transform: translateX(-50%);
|
|
1610
|
-
width: 0;
|
|
1611
|
-
height: 0.125rem;
|
|
1612
|
-
background: linear-gradient(
|
|
1613
|
-
90deg,
|
|
1614
|
-
var(--accent-primary) 0%,
|
|
1615
|
-
var(--accent-primary-hover) 100%
|
|
1616
|
-
);
|
|
1617
|
-
border-radius: 0.0625rem;
|
|
1618
|
-
transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
1619
|
-
pointer-events: none;
|
|
1620
|
-
}
|
|
1621
|
-
|
|
1622
|
-
.input-wrapper.focused .ink-line {
|
|
1623
|
-
width: 60%;
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
/* Error states */
|
|
1627
|
-
.input.has-error {
|
|
1628
|
-
border-color: var(--error-base);
|
|
1629
|
-
background: var(--error-bg);
|
|
2081
|
+
.input:read-only {
|
|
2082
|
+
cursor: default;
|
|
1630
2083
|
}
|
|
1631
2084
|
|
|
1632
|
-
.
|
|
1633
|
-
|
|
1634
|
-
|
|
2085
|
+
.chip-container {
|
|
2086
|
+
display: flex;
|
|
2087
|
+
align-items: center;
|
|
2088
|
+
padding-right: var(--space-sm);
|
|
1635
2089
|
}
|
|
1636
2090
|
|
|
1637
|
-
.
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
var(--error-base) 100%
|
|
1642
|
-
);
|
|
2091
|
+
.chip-content {
|
|
2092
|
+
display: flex;
|
|
2093
|
+
align-items: center;
|
|
2094
|
+
gap: var(--space-xs);
|
|
1643
2095
|
}
|
|
1644
2096
|
|
|
1645
|
-
.
|
|
2097
|
+
.error-text {
|
|
1646
2098
|
font-size: var(--font-size-sm);
|
|
1647
2099
|
color: var(--error-base);
|
|
1648
|
-
margin: 0;
|
|
2100
|
+
margin: var(--space-xs) 0 0;
|
|
1649
2101
|
animation: slideDown 300ms ease backwards;
|
|
1650
2102
|
}
|
|
1651
2103
|
|
|
@@ -1660,69 +2112,57 @@ h.styles = [
|
|
|
1660
2112
|
}
|
|
1661
2113
|
}
|
|
1662
2114
|
|
|
1663
|
-
/* Reduced motion */
|
|
1664
2115
|
@media (prefers-reduced-motion: reduce) {
|
|
1665
|
-
.
|
|
1666
|
-
.
|
|
1667
|
-
.ink-line,
|
|
1668
|
-
.input-error-text {
|
|
2116
|
+
.input-container,
|
|
2117
|
+
.error-text {
|
|
1669
2118
|
transition-duration: 0.01ms !important;
|
|
1670
2119
|
animation-duration: 0.01ms !important;
|
|
1671
2120
|
}
|
|
1672
2121
|
}
|
|
1673
2122
|
`
|
|
1674
2123
|
];
|
|
1675
|
-
|
|
1676
|
-
n({ type: String })
|
|
1677
|
-
], h.prototype, "label", 2);
|
|
1678
|
-
v([
|
|
2124
|
+
g([
|
|
1679
2125
|
n({ type: String })
|
|
1680
|
-
],
|
|
1681
|
-
|
|
2126
|
+
], m.prototype, "label", 2);
|
|
2127
|
+
g([
|
|
1682
2128
|
n({ type: String })
|
|
1683
|
-
],
|
|
1684
|
-
|
|
2129
|
+
], m.prototype, "placeholder", 2);
|
|
2130
|
+
g([
|
|
1685
2131
|
n({ type: String })
|
|
1686
|
-
],
|
|
1687
|
-
|
|
2132
|
+
], m.prototype, "value", 2);
|
|
2133
|
+
g([
|
|
1688
2134
|
n({ type: String })
|
|
1689
|
-
],
|
|
1690
|
-
|
|
2135
|
+
], m.prototype, "error", 2);
|
|
2136
|
+
g([
|
|
1691
2137
|
n({ type: Boolean })
|
|
1692
|
-
],
|
|
1693
|
-
|
|
2138
|
+
], m.prototype, "disabled", 2);
|
|
2139
|
+
g([
|
|
1694
2140
|
n({ type: Boolean })
|
|
1695
|
-
],
|
|
1696
|
-
|
|
1697
|
-
n({ type: String })
|
|
1698
|
-
],
|
|
1699
|
-
|
|
1700
|
-
n({ type: String })
|
|
1701
|
-
],
|
|
1702
|
-
|
|
1703
|
-
n({ type: String })
|
|
1704
|
-
],
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
],
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
],
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
],
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
]
|
|
1717
|
-
|
|
1718
|
-
p("tc-input")
|
|
1719
|
-
], h);
|
|
1720
|
-
var Qt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, lt = (r, e, s, i) => {
|
|
1721
|
-
for (var t = i > 1 ? void 0 : i ? Jt(e, s) : e, a = r.length - 1, o; a >= 0; a--)
|
|
1722
|
-
(o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
|
|
1723
|
-
return i && t && Qt(e, s, t), t;
|
|
2141
|
+
], m.prototype, "readonly", 2);
|
|
2142
|
+
g([
|
|
2143
|
+
n({ type: String, attribute: "chip-label" })
|
|
2144
|
+
], m.prototype, "chipLabel", 2);
|
|
2145
|
+
g([
|
|
2146
|
+
n({ type: String, attribute: "chip-icon" })
|
|
2147
|
+
], m.prototype, "chipIcon", 2);
|
|
2148
|
+
g([
|
|
2149
|
+
n({ type: String, attribute: "chip-variant" })
|
|
2150
|
+
], m.prototype, "chipVariant", 2);
|
|
2151
|
+
g([
|
|
2152
|
+
k()
|
|
2153
|
+
], m.prototype, "inputId", 2);
|
|
2154
|
+
g([
|
|
2155
|
+
k()
|
|
2156
|
+
], m.prototype, "isFocused", 2);
|
|
2157
|
+
m = g([
|
|
2158
|
+
p("tc-input-with-chip")
|
|
2159
|
+
], m);
|
|
2160
|
+
var ce = Object.defineProperty, de = Object.getOwnPropertyDescriptor, ut = (r, e, a, i) => {
|
|
2161
|
+
for (var t = i > 1 ? void 0 : i ? de(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2162
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
2163
|
+
return i && t && ce(e, a, t), t;
|
|
1724
2164
|
};
|
|
1725
|
-
let
|
|
2165
|
+
let V = class extends d {
|
|
1726
2166
|
constructor() {
|
|
1727
2167
|
super(...arguments), this.gap = "var(--space-md)", this.padding = "var(--space-md)", this.sx = {};
|
|
1728
2168
|
}
|
|
@@ -1733,7 +2173,7 @@ let A = class extends d {
|
|
|
1733
2173
|
...this.sx
|
|
1734
2174
|
};
|
|
1735
2175
|
return l`
|
|
1736
|
-
<div part="item" class="item" style=${
|
|
2176
|
+
<div part="item" class="item" style=${f(r)}>
|
|
1737
2177
|
<div part="prefix" class="prefix">
|
|
1738
2178
|
<slot name="prefix"></slot>
|
|
1739
2179
|
</div>
|
|
@@ -1747,7 +2187,7 @@ let A = class extends d {
|
|
|
1747
2187
|
`;
|
|
1748
2188
|
}
|
|
1749
2189
|
};
|
|
1750
|
-
|
|
2190
|
+
V.styles = c`
|
|
1751
2191
|
:host {
|
|
1752
2192
|
display: block;
|
|
1753
2193
|
width: 100%;
|
|
@@ -1792,24 +2232,24 @@ A.styles = c`
|
|
|
1792
2232
|
display: none;
|
|
1793
2233
|
}
|
|
1794
2234
|
`;
|
|
1795
|
-
|
|
2235
|
+
ut([
|
|
1796
2236
|
n({ type: String })
|
|
1797
|
-
],
|
|
1798
|
-
|
|
2237
|
+
], V.prototype, "gap", 2);
|
|
2238
|
+
ut([
|
|
1799
2239
|
n({ type: String })
|
|
1800
|
-
],
|
|
1801
|
-
|
|
2240
|
+
], V.prototype, "padding", 2);
|
|
2241
|
+
ut([
|
|
1802
2242
|
n({ type: Object })
|
|
1803
|
-
],
|
|
1804
|
-
|
|
2243
|
+
], V.prototype, "sx", 2);
|
|
2244
|
+
V = ut([
|
|
1805
2245
|
p("tc-item")
|
|
1806
|
-
],
|
|
1807
|
-
var
|
|
1808
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
1809
|
-
(o = r[
|
|
1810
|
-
return i && t &&
|
|
2246
|
+
], V);
|
|
2247
|
+
var pe = Object.defineProperty, he = Object.getOwnPropertyDescriptor, R = (r, e, a, i) => {
|
|
2248
|
+
for (var t = i > 1 ? void 0 : i ? he(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2249
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
2250
|
+
return i && t && pe(e, a, t), t;
|
|
1811
2251
|
};
|
|
1812
|
-
let
|
|
2252
|
+
let C = class extends d {
|
|
1813
2253
|
constructor() {
|
|
1814
2254
|
super(...arguments), this.gap = "var(--space-md)", this.padding = "var(--space-md)", this.disabled = !1, this.showArrow = !0, this.sx = {};
|
|
1815
2255
|
}
|
|
@@ -1832,7 +2272,7 @@ let y = class extends d {
|
|
|
1832
2272
|
part="button"
|
|
1833
2273
|
class="button"
|
|
1834
2274
|
?disabled=${this.disabled}
|
|
1835
|
-
style=${
|
|
2275
|
+
style=${f(r)}
|
|
1836
2276
|
@click=${this.handleClick}
|
|
1837
2277
|
>
|
|
1838
2278
|
<div part="prefix" class="prefix">
|
|
@@ -1862,7 +2302,7 @@ let y = class extends d {
|
|
|
1862
2302
|
`;
|
|
1863
2303
|
}
|
|
1864
2304
|
};
|
|
1865
|
-
|
|
2305
|
+
C.styles = c`
|
|
1866
2306
|
:host {
|
|
1867
2307
|
display: block;
|
|
1868
2308
|
width: 100%;
|
|
@@ -1948,30 +2388,30 @@ y.styles = c`
|
|
|
1948
2388
|
display: none;
|
|
1949
2389
|
}
|
|
1950
2390
|
`;
|
|
1951
|
-
|
|
2391
|
+
R([
|
|
1952
2392
|
n({ type: String })
|
|
1953
|
-
],
|
|
1954
|
-
|
|
2393
|
+
], C.prototype, "gap", 2);
|
|
2394
|
+
R([
|
|
1955
2395
|
n({ type: String })
|
|
1956
|
-
],
|
|
1957
|
-
|
|
2396
|
+
], C.prototype, "padding", 2);
|
|
2397
|
+
R([
|
|
1958
2398
|
n({ type: Boolean })
|
|
1959
|
-
],
|
|
1960
|
-
|
|
2399
|
+
], C.prototype, "disabled", 2);
|
|
2400
|
+
R([
|
|
1961
2401
|
n({ type: Boolean, attribute: "show-arrow" })
|
|
1962
|
-
],
|
|
1963
|
-
|
|
2402
|
+
], C.prototype, "showArrow", 2);
|
|
2403
|
+
R([
|
|
1964
2404
|
n({ type: Object })
|
|
1965
|
-
],
|
|
1966
|
-
|
|
2405
|
+
], C.prototype, "sx", 2);
|
|
2406
|
+
C = R([
|
|
1967
2407
|
p("tc-item-button")
|
|
1968
|
-
],
|
|
1969
|
-
var
|
|
1970
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
1971
|
-
(o = r[
|
|
1972
|
-
return i && t &&
|
|
2408
|
+
], C);
|
|
2409
|
+
var ue = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, N = (r, e, a, i) => {
|
|
2410
|
+
for (var t = i > 1 ? void 0 : i ? ve(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2411
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
2412
|
+
return i && t && ue(e, a, t), t;
|
|
1973
2413
|
};
|
|
1974
|
-
let
|
|
2414
|
+
let _ = class extends d {
|
|
1975
2415
|
constructor() {
|
|
1976
2416
|
super(...arguments), this.length = 6, this.error = !1, this.disabled = !1, this.showProgress = !0, this.values = [];
|
|
1977
2417
|
}
|
|
@@ -1979,25 +2419,25 @@ let w = class extends d {
|
|
|
1979
2419
|
super.connectedCallback(), this.values = new Array(this.length).fill("");
|
|
1980
2420
|
}
|
|
1981
2421
|
render() {
|
|
1982
|
-
const e = this.values.filter((
|
|
2422
|
+
const e = this.values.filter((a) => a.length > 0).length / this.length * 100;
|
|
1983
2423
|
return l`
|
|
1984
2424
|
<div class="container">
|
|
1985
2425
|
<div part="cells" class="cells" role="group" aria-label="OTP input">
|
|
1986
|
-
${this.values.map((
|
|
1987
|
-
const
|
|
2426
|
+
${this.values.map((a, i) => {
|
|
2427
|
+
const s = [
|
|
1988
2428
|
"cell",
|
|
1989
|
-
|
|
2429
|
+
a.length > 0 ? "cell--filled" : "",
|
|
1990
2430
|
this.error ? "cell--error" : ""
|
|
1991
2431
|
].filter(Boolean).join(" ");
|
|
1992
2432
|
return l`
|
|
1993
2433
|
<input
|
|
1994
2434
|
part="cell"
|
|
1995
|
-
class=${
|
|
2435
|
+
class=${s}
|
|
1996
2436
|
type="text"
|
|
1997
2437
|
inputmode="numeric"
|
|
1998
2438
|
maxlength="1"
|
|
1999
2439
|
pattern="[0-9]"
|
|
2000
|
-
.value=${
|
|
2440
|
+
.value=${a}
|
|
2001
2441
|
?disabled=${this.disabled}
|
|
2002
2442
|
aria-label="Digit ${i + 1}"
|
|
2003
2443
|
@input=${(o) => this.handleInput(o, i)}
|
|
@@ -2040,19 +2480,19 @@ let w = class extends d {
|
|
|
2040
2480
|
}
|
|
2041
2481
|
handlePaste(r) {
|
|
2042
2482
|
r.preventDefault();
|
|
2043
|
-
const
|
|
2044
|
-
if (
|
|
2045
|
-
this.values = new Array(this.length).fill(""),
|
|
2046
|
-
this.values[
|
|
2483
|
+
const a = (r.clipboardData?.getData("text") || "").replace(/\D/g, "").slice(0, this.length);
|
|
2484
|
+
if (a) {
|
|
2485
|
+
this.values = new Array(this.length).fill(""), a.split("").forEach((t, s) => {
|
|
2486
|
+
this.values[s] = t;
|
|
2047
2487
|
}), this.values = [...this.values];
|
|
2048
|
-
const i = Math.min(
|
|
2488
|
+
const i = Math.min(a.length, this.length - 1);
|
|
2049
2489
|
this.focusCell(i), this.dispatchEvent(
|
|
2050
2490
|
new CustomEvent("tc-change", {
|
|
2051
2491
|
bubbles: !0,
|
|
2052
2492
|
composed: !0,
|
|
2053
2493
|
detail: { value: this.values.join(""), values: [...this.values] }
|
|
2054
2494
|
})
|
|
2055
|
-
),
|
|
2495
|
+
), a.length >= this.length && this.dispatchEvent(
|
|
2056
2496
|
new CustomEvent("tc-complete", {
|
|
2057
2497
|
bubbles: !0,
|
|
2058
2498
|
composed: !0,
|
|
@@ -2070,7 +2510,7 @@ let w = class extends d {
|
|
|
2070
2510
|
}
|
|
2071
2511
|
/** Focus the first empty cell or the last cell */
|
|
2072
2512
|
focus() {
|
|
2073
|
-
const r = this.values.findIndex((
|
|
2513
|
+
const r = this.values.findIndex((a) => !a), e = r >= 0 ? r : this.length - 1;
|
|
2074
2514
|
this.focusCell(e);
|
|
2075
2515
|
}
|
|
2076
2516
|
/** Clear all values */
|
|
@@ -2082,8 +2522,8 @@ let w = class extends d {
|
|
|
2082
2522
|
return this.values.join("");
|
|
2083
2523
|
}
|
|
2084
2524
|
};
|
|
2085
|
-
|
|
2086
|
-
|
|
2525
|
+
_.styles = [
|
|
2526
|
+
h,
|
|
2087
2527
|
c`
|
|
2088
2528
|
:host {
|
|
2089
2529
|
display: block;
|
|
@@ -2172,30 +2612,30 @@ w.styles = [
|
|
|
2172
2612
|
}
|
|
2173
2613
|
`
|
|
2174
2614
|
];
|
|
2175
|
-
|
|
2615
|
+
N([
|
|
2176
2616
|
n({ type: Number })
|
|
2177
|
-
],
|
|
2178
|
-
|
|
2617
|
+
], _.prototype, "length", 2);
|
|
2618
|
+
N([
|
|
2179
2619
|
n({ type: Boolean })
|
|
2180
|
-
],
|
|
2181
|
-
|
|
2620
|
+
], _.prototype, "error", 2);
|
|
2621
|
+
N([
|
|
2182
2622
|
n({ type: Boolean })
|
|
2183
|
-
],
|
|
2184
|
-
|
|
2623
|
+
], _.prototype, "disabled", 2);
|
|
2624
|
+
N([
|
|
2185
2625
|
n({ type: Boolean, attribute: "show-progress" })
|
|
2186
|
-
],
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
],
|
|
2190
|
-
|
|
2626
|
+
], _.prototype, "showProgress", 2);
|
|
2627
|
+
N([
|
|
2628
|
+
k()
|
|
2629
|
+
], _.prototype, "values", 2);
|
|
2630
|
+
_ = N([
|
|
2191
2631
|
p("tc-otp-input")
|
|
2192
|
-
],
|
|
2193
|
-
var
|
|
2194
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
2195
|
-
(o = r[
|
|
2196
|
-
return i && t &&
|
|
2632
|
+
], _);
|
|
2633
|
+
var me = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, wt = (r, e, a, i) => {
|
|
2634
|
+
for (var t = i > 1 ? void 0 : i ? ge(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2635
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
2636
|
+
return i && t && me(e, a, t), t;
|
|
2197
2637
|
};
|
|
2198
|
-
let
|
|
2638
|
+
let tt = class extends d {
|
|
2199
2639
|
constructor() {
|
|
2200
2640
|
super(...arguments), this.gap = "var(--space-md)", this.sx = {};
|
|
2201
2641
|
}
|
|
@@ -2205,13 +2645,13 @@ let X = class extends d {
|
|
|
2205
2645
|
...this.sx
|
|
2206
2646
|
};
|
|
2207
2647
|
return l`
|
|
2208
|
-
<section part="section" class="section" style=${
|
|
2648
|
+
<section part="section" class="section" style=${f(r)}>
|
|
2209
2649
|
<slot></slot>
|
|
2210
2650
|
</section>
|
|
2211
2651
|
`;
|
|
2212
2652
|
}
|
|
2213
2653
|
};
|
|
2214
|
-
|
|
2654
|
+
tt.styles = c`
|
|
2215
2655
|
:host {
|
|
2216
2656
|
display: block;
|
|
2217
2657
|
width: 100%;
|
|
@@ -2223,23 +2663,23 @@ X.styles = c`
|
|
|
2223
2663
|
width: 100%;
|
|
2224
2664
|
}
|
|
2225
2665
|
`;
|
|
2226
|
-
|
|
2666
|
+
wt([
|
|
2227
2667
|
n({ type: String })
|
|
2228
|
-
],
|
|
2229
|
-
|
|
2668
|
+
], tt.prototype, "gap", 2);
|
|
2669
|
+
wt([
|
|
2230
2670
|
n({ type: Object })
|
|
2231
|
-
],
|
|
2232
|
-
|
|
2671
|
+
], tt.prototype, "sx", 2);
|
|
2672
|
+
tt = wt([
|
|
2233
2673
|
p("tc-section")
|
|
2234
|
-
],
|
|
2235
|
-
var
|
|
2236
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
2237
|
-
(o = r[
|
|
2238
|
-
return i && t &&
|
|
2674
|
+
], tt);
|
|
2675
|
+
var fe = Object.defineProperty, be = Object.getOwnPropertyDescriptor, xt = (r, e, a, i) => {
|
|
2676
|
+
for (var t = i > 1 ? void 0 : i ? be(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2677
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
2678
|
+
return i && t && fe(e, a, t), t;
|
|
2239
2679
|
};
|
|
2240
|
-
let
|
|
2680
|
+
let et = class extends d {
|
|
2241
2681
|
constructor() {
|
|
2242
|
-
super(...arguments), this.mobile = new
|
|
2682
|
+
super(...arguments), this.mobile = new Bt(this, "(max-width: 768px)"), this.size = "auto", this.color = "var(--accent-primary)";
|
|
2243
2683
|
}
|
|
2244
2684
|
render() {
|
|
2245
2685
|
let r;
|
|
@@ -2254,8 +2694,8 @@ let G = class extends d {
|
|
|
2254
2694
|
`;
|
|
2255
2695
|
}
|
|
2256
2696
|
};
|
|
2257
|
-
|
|
2258
|
-
|
|
2697
|
+
et.styles = [
|
|
2698
|
+
h,
|
|
2259
2699
|
c`
|
|
2260
2700
|
:host {
|
|
2261
2701
|
display: inline-flex;
|
|
@@ -2292,222 +2732,85 @@ G.styles = [
|
|
|
2292
2732
|
|
|
2293
2733
|
.spinner--auto-mobile {
|
|
2294
2734
|
width: var(--size-spinner-lg);
|
|
2295
|
-
height: var(--size-spinner-lg);
|
|
2296
|
-
border-width: var(--size-border-width-heavy);
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
.spinner--auto-desktop {
|
|
2300
|
-
width: 5rem;
|
|
2301
|
-
height: 5rem;
|
|
2302
|
-
border-width: var(--size-border-width-bold);
|
|
2303
|
-
}
|
|
2304
|
-
`
|
|
2305
|
-
];
|
|
2306
|
-
mt([
|
|
2307
|
-
n({ type: String })
|
|
2308
|
-
], G.prototype, "size", 2);
|
|
2309
|
-
mt([
|
|
2310
|
-
n({ type: String })
|
|
2311
|
-
], G.prototype, "color", 2);
|
|
2312
|
-
G = mt([
|
|
2313
|
-
p("tc-spinner")
|
|
2314
|
-
], G);
|
|
2315
|
-
var ne = Object.defineProperty, le = Object.getOwnPropertyDescriptor, ct = (r, e, s, i) => {
|
|
2316
|
-
for (var t = i > 1 ? void 0 : i ? le(e, s) : e, a = r.length - 1, o; a >= 0; a--)
|
|
2317
|
-
(o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
|
|
2318
|
-
return i && t && ne(e, s, t), t;
|
|
2319
|
-
};
|
|
2320
|
-
let I = class extends d {
|
|
2321
|
-
constructor() {
|
|
2322
|
-
super(...arguments), this.size = "3rem", this.background = "var(--paper-cream)", this.color = "var(--ink-dark)";
|
|
2323
|
-
}
|
|
2324
|
-
render() {
|
|
2325
|
-
return l`
|
|
2326
|
-
<div
|
|
2327
|
-
part="symbol"
|
|
2328
|
-
class="symbol"
|
|
2329
|
-
style="--symbol-size: ${this.size}; --symbol-bg: ${this.background}; --symbol-color: ${this.color};"
|
|
2330
|
-
>
|
|
2331
|
-
<slot></slot>
|
|
2332
|
-
</div>
|
|
2333
|
-
`;
|
|
2334
|
-
}
|
|
2335
|
-
};
|
|
2336
|
-
I.styles = c`
|
|
2337
|
-
:host {
|
|
2338
|
-
display: inline-flex;
|
|
2339
|
-
}
|
|
2340
|
-
|
|
2341
|
-
.symbol {
|
|
2342
|
-
display: flex;
|
|
2343
|
-
align-items: center;
|
|
2344
|
-
justify-content: center;
|
|
2345
|
-
border-radius: var(--radius-full);
|
|
2346
|
-
background: var(--symbol-bg);
|
|
2347
|
-
color: var(--symbol-color);
|
|
2348
|
-
width: var(--symbol-size);
|
|
2349
|
-
height: var(--symbol-size);
|
|
2350
|
-
font-family: var(--font-body);
|
|
2351
|
-
font-weight: 600;
|
|
2352
|
-
}
|
|
2353
|
-
`;
|
|
2354
|
-
ct([
|
|
2355
|
-
n({ type: String })
|
|
2356
|
-
], I.prototype, "size", 2);
|
|
2357
|
-
ct([
|
|
2358
|
-
n({ type: String })
|
|
2359
|
-
], I.prototype, "background", 2);
|
|
2360
|
-
ct([
|
|
2361
|
-
n({ type: String })
|
|
2362
|
-
], I.prototype, "color", 2);
|
|
2363
|
-
I = ct([
|
|
2364
|
-
p("tc-symbol")
|
|
2365
|
-
], I);
|
|
2366
|
-
var ce = Object.defineProperty, de = Object.getOwnPropertyDescriptor, q = (r, e, s, i) => {
|
|
2367
|
-
for (var t = i > 1 ? void 0 : i ? de(e, s) : e, a = r.length - 1, o; a >= 0; a--)
|
|
2368
|
-
(o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
|
|
2369
|
-
return i && t && ce(e, s, t), t;
|
|
2370
|
-
};
|
|
2371
|
-
let x = class extends d {
|
|
2372
|
-
constructor() {
|
|
2373
|
-
super(...arguments), this.tag = "p", this.sx = {};
|
|
2374
|
-
}
|
|
2375
|
-
getColorClass() {
|
|
2376
|
-
return this.color && {
|
|
2377
|
-
primary: "text--primary",
|
|
2378
|
-
secondary: "text--secondary",
|
|
2379
|
-
tertiary: "text--tertiary",
|
|
2380
|
-
muted: "text--muted",
|
|
2381
|
-
accent: "text--accent",
|
|
2382
|
-
success: "text--success",
|
|
2383
|
-
error: "text--error",
|
|
2384
|
-
warning: "text--warning",
|
|
2385
|
-
info: "text--info"
|
|
2386
|
-
}[this.color] || "";
|
|
2387
|
-
}
|
|
2388
|
-
getColorStyle() {
|
|
2389
|
-
if (this.color && (this.color.startsWith("var(") || this.color.startsWith("#") || this.color.startsWith("rgb")))
|
|
2390
|
-
return this.color;
|
|
2391
|
-
}
|
|
2392
|
-
render() {
|
|
2393
|
-
const r = $t(this.tag), e = [
|
|
2394
|
-
"text",
|
|
2395
|
-
this.size ? `text--${this.size}` : "",
|
|
2396
|
-
this.weight ? `text--w${this.weight}` : "",
|
|
2397
|
-
this.getColorClass()
|
|
2398
|
-
].filter(Boolean).join(" "), s = this.getColorStyle(), i = {
|
|
2399
|
-
...s ? { color: s } : {},
|
|
2400
|
-
...this.sx
|
|
2401
|
-
};
|
|
2402
|
-
return zt`
|
|
2403
|
-
<${r} part="text" class=${e} style=${m(i)}>
|
|
2404
|
-
<slot></slot>
|
|
2405
|
-
</${r}>
|
|
2406
|
-
`;
|
|
2407
|
-
}
|
|
2408
|
-
};
|
|
2409
|
-
x.styles = [
|
|
2410
|
-
u,
|
|
2411
|
-
c`
|
|
2412
|
-
:host {
|
|
2413
|
-
display: contents;
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
.text {
|
|
2417
|
-
margin: 0;
|
|
2418
|
-
padding: 0;
|
|
2419
|
-
font-family: var(--font-body);
|
|
2420
|
-
line-height: 1.4;
|
|
2421
|
-
color: var(--ink-black);
|
|
2422
|
-
}
|
|
2423
|
-
|
|
2424
|
-
/* Size variants using design-tokens */
|
|
2425
|
-
.text--sm {
|
|
2426
|
-
font-size: var(--font-size-sm);
|
|
2427
|
-
}
|
|
2428
|
-
.text--base {
|
|
2429
|
-
font-size: var(--font-size-base);
|
|
2430
|
-
}
|
|
2431
|
-
.text--lg {
|
|
2432
|
-
font-size: var(--font-size-lg);
|
|
2433
|
-
}
|
|
2434
|
-
.text--xl {
|
|
2435
|
-
font-size: var(--font-size-xl);
|
|
2436
|
-
}
|
|
2437
|
-
.text--2xl {
|
|
2438
|
-
font-size: var(--font-size-2xl);
|
|
2439
|
-
}
|
|
2440
|
-
|
|
2441
|
-
/* Weight variants */
|
|
2442
|
-
.text--w400 {
|
|
2443
|
-
font-weight: 400;
|
|
2444
|
-
}
|
|
2445
|
-
.text--w500 {
|
|
2446
|
-
font-weight: 500;
|
|
2447
|
-
}
|
|
2448
|
-
.text--w600 {
|
|
2449
|
-
font-weight: 600;
|
|
2450
|
-
}
|
|
2451
|
-
.text--w700 {
|
|
2452
|
-
font-weight: 700;
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
|
-
/* Color variants using design-tokens - these will respond to theme changes */
|
|
2456
|
-
.text--primary {
|
|
2457
|
-
color: var(--ink-black);
|
|
2458
|
-
}
|
|
2459
|
-
.text--secondary {
|
|
2460
|
-
color: var(--ink-dark);
|
|
2461
|
-
}
|
|
2462
|
-
.text--tertiary {
|
|
2463
|
-
color: var(--ink-medium);
|
|
2464
|
-
}
|
|
2465
|
-
.text--muted {
|
|
2466
|
-
color: var(--ink-light);
|
|
2467
|
-
}
|
|
2468
|
-
.text--accent {
|
|
2469
|
-
color: var(--accent-primary);
|
|
2470
|
-
}
|
|
2471
|
-
.text--success {
|
|
2472
|
-
color: var(--accent-success);
|
|
2473
|
-
}
|
|
2474
|
-
.text--error {
|
|
2475
|
-
color: var(--error-base);
|
|
2476
|
-
}
|
|
2477
|
-
.text--warning {
|
|
2478
|
-
color: var(--semantic-warning);
|
|
2735
|
+
height: var(--size-spinner-lg);
|
|
2736
|
+
border-width: var(--size-border-width-heavy);
|
|
2479
2737
|
}
|
|
2480
|
-
|
|
2481
|
-
|
|
2738
|
+
|
|
2739
|
+
.spinner--auto-desktop {
|
|
2740
|
+
width: 5rem;
|
|
2741
|
+
height: 5rem;
|
|
2742
|
+
border-width: var(--size-border-width-bold);
|
|
2482
2743
|
}
|
|
2483
2744
|
`
|
|
2484
2745
|
];
|
|
2485
|
-
|
|
2746
|
+
xt([
|
|
2747
|
+
n({ type: String })
|
|
2748
|
+
], et.prototype, "size", 2);
|
|
2749
|
+
xt([
|
|
2486
2750
|
n({ type: String })
|
|
2487
|
-
],
|
|
2488
|
-
|
|
2751
|
+
], et.prototype, "color", 2);
|
|
2752
|
+
et = xt([
|
|
2753
|
+
p("tc-spinner")
|
|
2754
|
+
], et);
|
|
2755
|
+
var ye = Object.defineProperty, we = Object.getOwnPropertyDescriptor, vt = (r, e, a, i) => {
|
|
2756
|
+
for (var t = i > 1 ? void 0 : i ? we(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2757
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
2758
|
+
return i && t && ye(e, a, t), t;
|
|
2759
|
+
};
|
|
2760
|
+
let q = class extends d {
|
|
2761
|
+
constructor() {
|
|
2762
|
+
super(...arguments), this.size = "3rem", this.background = "var(--paper-cream)", this.color = "var(--ink-dark)";
|
|
2763
|
+
}
|
|
2764
|
+
render() {
|
|
2765
|
+
return l`
|
|
2766
|
+
<div
|
|
2767
|
+
part="symbol"
|
|
2768
|
+
class="symbol"
|
|
2769
|
+
style="--symbol-size: ${this.size}; --symbol-bg: ${this.background}; --symbol-color: ${this.color};"
|
|
2770
|
+
>
|
|
2771
|
+
<slot></slot>
|
|
2772
|
+
</div>
|
|
2773
|
+
`;
|
|
2774
|
+
}
|
|
2775
|
+
};
|
|
2776
|
+
q.styles = c`
|
|
2777
|
+
:host {
|
|
2778
|
+
display: inline-flex;
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2781
|
+
.symbol {
|
|
2782
|
+
display: flex;
|
|
2783
|
+
align-items: center;
|
|
2784
|
+
justify-content: center;
|
|
2785
|
+
border-radius: var(--radius-full);
|
|
2786
|
+
background: var(--symbol-bg);
|
|
2787
|
+
color: var(--symbol-color);
|
|
2788
|
+
width: var(--symbol-size);
|
|
2789
|
+
height: var(--symbol-size);
|
|
2790
|
+
font-family: var(--font-body);
|
|
2791
|
+
font-weight: 600;
|
|
2792
|
+
}
|
|
2793
|
+
`;
|
|
2794
|
+
vt([
|
|
2489
2795
|
n({ type: String })
|
|
2490
|
-
],
|
|
2491
|
-
|
|
2796
|
+
], q.prototype, "size", 2);
|
|
2797
|
+
vt([
|
|
2492
2798
|
n({ type: String })
|
|
2493
|
-
],
|
|
2494
|
-
|
|
2799
|
+
], q.prototype, "background", 2);
|
|
2800
|
+
vt([
|
|
2495
2801
|
n({ type: String })
|
|
2496
|
-
],
|
|
2497
|
-
q([
|
|
2498
|
-
|
|
2499
|
-
],
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
],
|
|
2503
|
-
|
|
2504
|
-
for (var t = i > 1 ? void 0 : i ? he(e, s) : e, a = r.length - 1, o; a >= 0; a--)
|
|
2505
|
-
(o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
|
|
2506
|
-
return i && t && pe(e, s, t), t;
|
|
2802
|
+
], q.prototype, "color", 2);
|
|
2803
|
+
q = vt([
|
|
2804
|
+
p("tc-symbol")
|
|
2805
|
+
], q);
|
|
2806
|
+
var xe = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, st = (r, e, a, i) => {
|
|
2807
|
+
for (var t = i > 1 ? void 0 : i ? ke(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2808
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
2809
|
+
return i && t && xe(e, a, t), t;
|
|
2507
2810
|
};
|
|
2508
|
-
let
|
|
2811
|
+
let j = class extends d {
|
|
2509
2812
|
constructor() {
|
|
2510
|
-
super(...arguments), this.variant = "info", this.duration = 5e3, this.autoDismiss = !0, this.dismissible = !0, this.animation = new
|
|
2813
|
+
super(...arguments), this.variant = "info", this.duration = 5e3, this.autoDismiss = !0, this.dismissible = !0, this.animation = new M(this, {
|
|
2511
2814
|
showDuration: 300,
|
|
2512
2815
|
hideDuration: 200
|
|
2513
2816
|
});
|
|
@@ -2573,8 +2876,8 @@ let _ = class extends d {
|
|
|
2573
2876
|
`;
|
|
2574
2877
|
}
|
|
2575
2878
|
};
|
|
2576
|
-
|
|
2577
|
-
|
|
2879
|
+
j.styles = [
|
|
2880
|
+
h,
|
|
2578
2881
|
c`
|
|
2579
2882
|
:host {
|
|
2580
2883
|
display: block;
|
|
@@ -2667,27 +2970,27 @@ _.styles = [
|
|
|
2667
2970
|
}
|
|
2668
2971
|
`
|
|
2669
2972
|
];
|
|
2670
|
-
|
|
2973
|
+
st([
|
|
2671
2974
|
n({ type: String })
|
|
2672
|
-
],
|
|
2673
|
-
|
|
2975
|
+
], j.prototype, "variant", 2);
|
|
2976
|
+
st([
|
|
2674
2977
|
n({ type: Number })
|
|
2675
|
-
],
|
|
2676
|
-
|
|
2978
|
+
], j.prototype, "duration", 2);
|
|
2979
|
+
st([
|
|
2677
2980
|
n({ type: Boolean, attribute: "auto-dismiss" })
|
|
2678
|
-
],
|
|
2679
|
-
|
|
2981
|
+
], j.prototype, "autoDismiss", 2);
|
|
2982
|
+
st([
|
|
2680
2983
|
n({ type: Boolean })
|
|
2681
|
-
],
|
|
2682
|
-
|
|
2984
|
+
], j.prototype, "dismissible", 2);
|
|
2985
|
+
j = st([
|
|
2683
2986
|
p("tc-toast")
|
|
2684
|
-
],
|
|
2685
|
-
var
|
|
2686
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
2687
|
-
(o = r[
|
|
2688
|
-
return i && t &&
|
|
2987
|
+
], j);
|
|
2988
|
+
var $e = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, ot = (r, e, a, i) => {
|
|
2989
|
+
for (var t = i > 1 ? void 0 : i ? ze(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2990
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
2991
|
+
return i && t && $e(e, a, t), t;
|
|
2689
2992
|
};
|
|
2690
|
-
let
|
|
2993
|
+
let E = class extends d {
|
|
2691
2994
|
constructor() {
|
|
2692
2995
|
super(...arguments), this.title = "Something went wrong", this.message = "An unexpected error occurred. Please try again.", this.retryLabel = "Try Again", this.showRetry = !0;
|
|
2693
2996
|
}
|
|
@@ -2728,12 +3031,13 @@ let D = class extends d {
|
|
|
2728
3031
|
`;
|
|
2729
3032
|
}
|
|
2730
3033
|
};
|
|
2731
|
-
|
|
3034
|
+
E.styles = c`
|
|
2732
3035
|
:host {
|
|
2733
|
-
display:
|
|
3036
|
+
display: flex;
|
|
3037
|
+
align-items: center;
|
|
3038
|
+
justify-content: center;
|
|
2734
3039
|
width: 100%;
|
|
2735
|
-
min-height:
|
|
2736
|
-
min-height: 100dvh;
|
|
3040
|
+
min-height: inherit;
|
|
2737
3041
|
}
|
|
2738
3042
|
|
|
2739
3043
|
.screen {
|
|
@@ -2741,8 +3045,7 @@ D.styles = c`
|
|
|
2741
3045
|
align-items: center;
|
|
2742
3046
|
justify-content: center;
|
|
2743
3047
|
width: 100%;
|
|
2744
|
-
min-height:
|
|
2745
|
-
min-height: 100dvh;
|
|
3048
|
+
min-height: inherit;
|
|
2746
3049
|
padding: var(--space-lg);
|
|
2747
3050
|
box-sizing: border-box;
|
|
2748
3051
|
background: var(--paper-white);
|
|
@@ -2781,29 +3084,29 @@ D.styles = c`
|
|
|
2781
3084
|
margin-top: var(--space-md);
|
|
2782
3085
|
}
|
|
2783
3086
|
`;
|
|
2784
|
-
|
|
3087
|
+
ot([
|
|
2785
3088
|
n({ type: String })
|
|
2786
|
-
],
|
|
2787
|
-
|
|
3089
|
+
], E.prototype, "title", 2);
|
|
3090
|
+
ot([
|
|
2788
3091
|
n({ type: String })
|
|
2789
|
-
],
|
|
2790
|
-
|
|
3092
|
+
], E.prototype, "message", 2);
|
|
3093
|
+
ot([
|
|
2791
3094
|
n({ type: String, attribute: "retry-label" })
|
|
2792
|
-
],
|
|
2793
|
-
|
|
3095
|
+
], E.prototype, "retryLabel", 2);
|
|
3096
|
+
ot([
|
|
2794
3097
|
n({ type: Boolean, attribute: "show-retry" })
|
|
2795
|
-
],
|
|
2796
|
-
|
|
3098
|
+
], E.prototype, "showRetry", 2);
|
|
3099
|
+
E = ot([
|
|
2797
3100
|
p("tc-error-screen")
|
|
2798
|
-
],
|
|
2799
|
-
var
|
|
2800
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
2801
|
-
(o = r[
|
|
2802
|
-
return i && t &&
|
|
3101
|
+
], E);
|
|
3102
|
+
var Ce = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, kt = (r, e, a, i) => {
|
|
3103
|
+
for (var t = i > 1 ? void 0 : i ? _e(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
3104
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
3105
|
+
return i && t && Ce(e, a, t), t;
|
|
2803
3106
|
};
|
|
2804
|
-
let
|
|
3107
|
+
let rt = class extends d {
|
|
2805
3108
|
constructor() {
|
|
2806
|
-
super(...arguments), this.message = "", this.spinnerSize = "3rem", this.loading = new
|
|
3109
|
+
super(...arguments), this.message = "", this.spinnerSize = "3rem", this.loading = new Et(this);
|
|
2807
3110
|
}
|
|
2808
3111
|
connectedCallback() {
|
|
2809
3112
|
super.connectedCallback(), this.loading.start();
|
|
@@ -2825,12 +3128,13 @@ let Q = class extends d {
|
|
|
2825
3128
|
`;
|
|
2826
3129
|
}
|
|
2827
3130
|
};
|
|
2828
|
-
|
|
3131
|
+
rt.styles = c`
|
|
2829
3132
|
:host {
|
|
2830
|
-
display:
|
|
3133
|
+
display: flex;
|
|
3134
|
+
align-items: center;
|
|
3135
|
+
justify-content: center;
|
|
2831
3136
|
width: 100%;
|
|
2832
|
-
min-height:
|
|
2833
|
-
min-height: 100dvh;
|
|
3137
|
+
min-height: inherit;
|
|
2834
3138
|
}
|
|
2835
3139
|
|
|
2836
3140
|
.screen {
|
|
@@ -2838,8 +3142,7 @@ Q.styles = c`
|
|
|
2838
3142
|
align-items: center;
|
|
2839
3143
|
justify-content: center;
|
|
2840
3144
|
width: 100%;
|
|
2841
|
-
min-height:
|
|
2842
|
-
min-height: 100dvh;
|
|
3145
|
+
min-height: inherit;
|
|
2843
3146
|
padding: var(--space-lg);
|
|
2844
3147
|
box-sizing: border-box;
|
|
2845
3148
|
background: var(--paper-white);
|
|
@@ -2858,23 +3161,23 @@ Q.styles = c`
|
|
|
2858
3161
|
max-width: 20rem;
|
|
2859
3162
|
}
|
|
2860
3163
|
`;
|
|
2861
|
-
|
|
3164
|
+
kt([
|
|
2862
3165
|
n({ type: String })
|
|
2863
|
-
],
|
|
2864
|
-
|
|
3166
|
+
], rt.prototype, "message", 2);
|
|
3167
|
+
kt([
|
|
2865
3168
|
n({ type: String, attribute: "spinner-size" })
|
|
2866
|
-
],
|
|
2867
|
-
|
|
3169
|
+
], rt.prototype, "spinnerSize", 2);
|
|
3170
|
+
rt = kt([
|
|
2868
3171
|
p("tc-loading-screen")
|
|
2869
|
-
],
|
|
2870
|
-
var
|
|
2871
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
2872
|
-
(o = r[
|
|
2873
|
-
return i && t &&
|
|
3172
|
+
], rt);
|
|
3173
|
+
var De = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, K = (r, e, a, i) => {
|
|
3174
|
+
for (var t = i > 1 ? void 0 : i ? Oe(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
3175
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
3176
|
+
return i && t && De(e, a, t), t;
|
|
2874
3177
|
};
|
|
2875
|
-
let
|
|
3178
|
+
let D = class extends d {
|
|
2876
3179
|
constructor() {
|
|
2877
|
-
super(...arguments), this.title = "Success!", this.message = "Your action was completed successfully.", this.actionLabel = "", this.autoAnimate = !0, this.isAnimated = !1, this.animation = new
|
|
3180
|
+
super(...arguments), this.title = "Success!", this.message = "Your action was completed successfully.", this.actionLabel = "", this.autoAnimate = !0, this.isAnimated = !1, this.animation = new M(this, {
|
|
2878
3181
|
showDuration: 600,
|
|
2879
3182
|
hideDuration: 300
|
|
2880
3183
|
});
|
|
@@ -2935,12 +3238,13 @@ let k = class extends d {
|
|
|
2935
3238
|
`;
|
|
2936
3239
|
}
|
|
2937
3240
|
};
|
|
2938
|
-
|
|
3241
|
+
D.styles = c`
|
|
2939
3242
|
:host {
|
|
2940
|
-
display:
|
|
3243
|
+
display: flex;
|
|
3244
|
+
align-items: center;
|
|
3245
|
+
justify-content: center;
|
|
2941
3246
|
width: 100%;
|
|
2942
|
-
min-height:
|
|
2943
|
-
min-height: 100dvh;
|
|
3247
|
+
min-height: inherit;
|
|
2944
3248
|
}
|
|
2945
3249
|
|
|
2946
3250
|
.screen {
|
|
@@ -2948,8 +3252,7 @@ k.styles = c`
|
|
|
2948
3252
|
align-items: center;
|
|
2949
3253
|
justify-content: center;
|
|
2950
3254
|
width: 100%;
|
|
2951
|
-
min-height:
|
|
2952
|
-
min-height: 100dvh;
|
|
3255
|
+
min-height: inherit;
|
|
2953
3256
|
padding: var(--space-lg);
|
|
2954
3257
|
box-sizing: border-box;
|
|
2955
3258
|
background: var(--paper-white);
|
|
@@ -3035,30 +3338,237 @@ k.styles = c`
|
|
|
3035
3338
|
transform: translateY(0);
|
|
3036
3339
|
}
|
|
3037
3340
|
`;
|
|
3038
|
-
|
|
3341
|
+
K([
|
|
3039
3342
|
n({ type: String })
|
|
3040
|
-
],
|
|
3041
|
-
|
|
3343
|
+
], D.prototype, "title", 2);
|
|
3344
|
+
K([
|
|
3042
3345
|
n({ type: String })
|
|
3043
|
-
],
|
|
3044
|
-
|
|
3346
|
+
], D.prototype, "message", 2);
|
|
3347
|
+
K([
|
|
3045
3348
|
n({ type: String, attribute: "action-label" })
|
|
3046
|
-
],
|
|
3047
|
-
|
|
3349
|
+
], D.prototype, "actionLabel", 2);
|
|
3350
|
+
K([
|
|
3048
3351
|
n({ type: Boolean, attribute: "auto-animate" })
|
|
3049
|
-
],
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
],
|
|
3053
|
-
|
|
3352
|
+
], D.prototype, "autoAnimate", 2);
|
|
3353
|
+
K([
|
|
3354
|
+
k()
|
|
3355
|
+
], D.prototype, "isAnimated", 2);
|
|
3356
|
+
D = K([
|
|
3054
3357
|
p("tc-success-screen")
|
|
3055
|
-
],
|
|
3056
|
-
var
|
|
3057
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
3058
|
-
(o = r[
|
|
3059
|
-
return i && t &&
|
|
3358
|
+
], D);
|
|
3359
|
+
var Se = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, I = (r, e, a, i) => {
|
|
3360
|
+
for (var t = i > 1 ? void 0 : i ? Pe(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
3361
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
3362
|
+
return i && t && Se(e, a, t), t;
|
|
3060
3363
|
};
|
|
3061
|
-
let
|
|
3364
|
+
let y = class extends d {
|
|
3365
|
+
constructor() {
|
|
3366
|
+
super(...arguments), this.name = "", this.type = "passkey", this.lastUsed = "", this.enabled = !0, this.deletable = !0, this.clickable = !1;
|
|
3367
|
+
}
|
|
3368
|
+
getIconName() {
|
|
3369
|
+
switch (this.type) {
|
|
3370
|
+
case "passkey":
|
|
3371
|
+
return "key";
|
|
3372
|
+
case "totp":
|
|
3373
|
+
return "totp";
|
|
3374
|
+
case "usb":
|
|
3375
|
+
return "device";
|
|
3376
|
+
case "phone":
|
|
3377
|
+
return "phone";
|
|
3378
|
+
case "email":
|
|
3379
|
+
return "email";
|
|
3380
|
+
default:
|
|
3381
|
+
return "key";
|
|
3382
|
+
}
|
|
3383
|
+
}
|
|
3384
|
+
handleCardClick() {
|
|
3385
|
+
this.clickable && this.enabled && this.dispatchEvent(
|
|
3386
|
+
new CustomEvent("tc-click", {
|
|
3387
|
+
bubbles: !0,
|
|
3388
|
+
composed: !0
|
|
3389
|
+
})
|
|
3390
|
+
);
|
|
3391
|
+
}
|
|
3392
|
+
handleDelete(r) {
|
|
3393
|
+
r.stopPropagation(), this.dispatchEvent(
|
|
3394
|
+
new CustomEvent("tc-delete", {
|
|
3395
|
+
bubbles: !0,
|
|
3396
|
+
composed: !0,
|
|
3397
|
+
detail: { name: this.name, type: this.type }
|
|
3398
|
+
})
|
|
3399
|
+
);
|
|
3400
|
+
}
|
|
3401
|
+
render() {
|
|
3402
|
+
const r = {
|
|
3403
|
+
card: !0,
|
|
3404
|
+
clickable: this.clickable && this.enabled,
|
|
3405
|
+
disabled: !this.enabled
|
|
3406
|
+
};
|
|
3407
|
+
return l`
|
|
3408
|
+
<div
|
|
3409
|
+
part="card"
|
|
3410
|
+
class=${b(r)}
|
|
3411
|
+
@click=${this.handleCardClick}
|
|
3412
|
+
role=${this.clickable ? "button" : "article"}
|
|
3413
|
+
tabindex=${this.clickable && this.enabled ? "0" : "-1"}
|
|
3414
|
+
>
|
|
3415
|
+
<div part="icon" class="icon-container">
|
|
3416
|
+
<tc-icon name=${this.getIconName()} size="1.25rem" color="var(--ink-dark)"></tc-icon>
|
|
3417
|
+
</div>
|
|
3418
|
+
<div part="content" class="content">
|
|
3419
|
+
<div part="name" class="name">${this.name}</div>
|
|
3420
|
+
${this.lastUsed ? l`
|
|
3421
|
+
<div part="meta" class="meta">
|
|
3422
|
+
<span class="last-used">${this.lastUsed}</span>
|
|
3423
|
+
</div>
|
|
3424
|
+
` : ""}
|
|
3425
|
+
</div>
|
|
3426
|
+
<div part="actions" class="actions">
|
|
3427
|
+
${this.enabled ? "" : l`
|
|
3428
|
+
<tc-chip class="status-chip" variant="default" size="sm">Disabled</tc-chip>
|
|
3429
|
+
`}
|
|
3430
|
+
${this.deletable ? l`
|
|
3431
|
+
<button
|
|
3432
|
+
part="delete"
|
|
3433
|
+
class="delete-btn"
|
|
3434
|
+
@click=${this.handleDelete}
|
|
3435
|
+
aria-label="Delete ${this.name}"
|
|
3436
|
+
>
|
|
3437
|
+
<tc-icon name="x" size="1rem"></tc-icon>
|
|
3438
|
+
</button>
|
|
3439
|
+
` : ""}
|
|
3440
|
+
</div>
|
|
3441
|
+
</div>
|
|
3442
|
+
`;
|
|
3443
|
+
}
|
|
3444
|
+
};
|
|
3445
|
+
y.styles = c`
|
|
3446
|
+
:host {
|
|
3447
|
+
display: block;
|
|
3448
|
+
width: 100%;
|
|
3449
|
+
}
|
|
3450
|
+
|
|
3451
|
+
.card {
|
|
3452
|
+
display: flex;
|
|
3453
|
+
align-items: center;
|
|
3454
|
+
gap: var(--space-md);
|
|
3455
|
+
padding: var(--space-md);
|
|
3456
|
+
background: var(--paper-cream);
|
|
3457
|
+
border-radius: var(--radius-md);
|
|
3458
|
+
transition: var(--transition-fast);
|
|
3459
|
+
}
|
|
3460
|
+
|
|
3461
|
+
.card.clickable {
|
|
3462
|
+
cursor: pointer;
|
|
3463
|
+
}
|
|
3464
|
+
|
|
3465
|
+
.card.clickable:hover {
|
|
3466
|
+
background: var(--paper-warm);
|
|
3467
|
+
}
|
|
3468
|
+
|
|
3469
|
+
.card.disabled {
|
|
3470
|
+
opacity: var(--opacity-disabled);
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
.icon-container {
|
|
3474
|
+
display: flex;
|
|
3475
|
+
align-items: center;
|
|
3476
|
+
justify-content: center;
|
|
3477
|
+
width: 2.5rem;
|
|
3478
|
+
height: 2.5rem;
|
|
3479
|
+
background: var(--paper-white);
|
|
3480
|
+
border-radius: var(--radius-md);
|
|
3481
|
+
flex-shrink: 0;
|
|
3482
|
+
}
|
|
3483
|
+
|
|
3484
|
+
.content {
|
|
3485
|
+
flex: 1;
|
|
3486
|
+
min-width: 0;
|
|
3487
|
+
}
|
|
3488
|
+
|
|
3489
|
+
.name {
|
|
3490
|
+
font-weight: 500;
|
|
3491
|
+
color: var(--ink-black);
|
|
3492
|
+
white-space: nowrap;
|
|
3493
|
+
overflow: hidden;
|
|
3494
|
+
text-overflow: ellipsis;
|
|
3495
|
+
}
|
|
3496
|
+
|
|
3497
|
+
.meta {
|
|
3498
|
+
display: flex;
|
|
3499
|
+
align-items: center;
|
|
3500
|
+
gap: var(--space-sm);
|
|
3501
|
+
margin-top: var(--space-xs);
|
|
3502
|
+
}
|
|
3503
|
+
|
|
3504
|
+
.last-used {
|
|
3505
|
+
font-size: var(--font-size-sm);
|
|
3506
|
+
color: var(--ink-light);
|
|
3507
|
+
}
|
|
3508
|
+
|
|
3509
|
+
.actions {
|
|
3510
|
+
display: flex;
|
|
3511
|
+
align-items: center;
|
|
3512
|
+
gap: var(--space-sm);
|
|
3513
|
+
flex-shrink: 0;
|
|
3514
|
+
}
|
|
3515
|
+
|
|
3516
|
+
.delete-btn {
|
|
3517
|
+
display: flex;
|
|
3518
|
+
align-items: center;
|
|
3519
|
+
justify-content: center;
|
|
3520
|
+
width: 2rem;
|
|
3521
|
+
height: 2rem;
|
|
3522
|
+
padding: 0;
|
|
3523
|
+
background: transparent;
|
|
3524
|
+
border: none;
|
|
3525
|
+
border-radius: var(--radius-sm);
|
|
3526
|
+
color: var(--ink-light);
|
|
3527
|
+
cursor: pointer;
|
|
3528
|
+
transition: var(--transition-fast);
|
|
3529
|
+
}
|
|
3530
|
+
|
|
3531
|
+
.delete-btn:hover {
|
|
3532
|
+
background: var(--alpha-ink04);
|
|
3533
|
+
color: var(--error-base);
|
|
3534
|
+
}
|
|
3535
|
+
|
|
3536
|
+
.delete-btn:focus-visible {
|
|
3537
|
+
outline: 2px solid var(--accent-primary);
|
|
3538
|
+
outline-offset: 2px;
|
|
3539
|
+
}
|
|
3540
|
+
|
|
3541
|
+
.status-chip {
|
|
3542
|
+
flex-shrink: 0;
|
|
3543
|
+
}
|
|
3544
|
+
`;
|
|
3545
|
+
I([
|
|
3546
|
+
n({ type: String })
|
|
3547
|
+
], y.prototype, "name", 2);
|
|
3548
|
+
I([
|
|
3549
|
+
n({ type: String })
|
|
3550
|
+
], y.prototype, "type", 2);
|
|
3551
|
+
I([
|
|
3552
|
+
n({ type: String, attribute: "last-used" })
|
|
3553
|
+
], y.prototype, "lastUsed", 2);
|
|
3554
|
+
I([
|
|
3555
|
+
n({ type: Boolean })
|
|
3556
|
+
], y.prototype, "enabled", 2);
|
|
3557
|
+
I([
|
|
3558
|
+
n({ type: Boolean })
|
|
3559
|
+
], y.prototype, "deletable", 2);
|
|
3560
|
+
I([
|
|
3561
|
+
n({ type: Boolean })
|
|
3562
|
+
], y.prototype, "clickable", 2);
|
|
3563
|
+
y = I([
|
|
3564
|
+
p("tc-authenticator-card")
|
|
3565
|
+
], y);
|
|
3566
|
+
var je = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, nt = (r, e, a, i) => {
|
|
3567
|
+
for (var t = i > 1 ? void 0 : i ? Ee(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
3568
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
3569
|
+
return i && t && je(e, a, t), t;
|
|
3570
|
+
};
|
|
3571
|
+
let B = class extends d {
|
|
3062
3572
|
constructor() {
|
|
3063
3573
|
super(...arguments), this.position = "bottom-right", this.size = "3.5rem", this.disabled = !1, this.sx = {};
|
|
3064
3574
|
}
|
|
@@ -3086,7 +3596,7 @@ let O = class extends d {
|
|
|
3086
3596
|
part="button"
|
|
3087
3597
|
class="button"
|
|
3088
3598
|
?disabled=${this.disabled}
|
|
3089
|
-
style=${
|
|
3599
|
+
style=${f(r)}
|
|
3090
3600
|
@click=${this.handleClick}
|
|
3091
3601
|
aria-label="Floating action"
|
|
3092
3602
|
>
|
|
@@ -3095,8 +3605,8 @@ let O = class extends d {
|
|
|
3095
3605
|
`;
|
|
3096
3606
|
}
|
|
3097
3607
|
};
|
|
3098
|
-
|
|
3099
|
-
|
|
3608
|
+
B.styles = [
|
|
3609
|
+
h,
|
|
3100
3610
|
c`
|
|
3101
3611
|
:host {
|
|
3102
3612
|
display: block;
|
|
@@ -3163,32 +3673,32 @@ O.styles = [
|
|
|
3163
3673
|
}
|
|
3164
3674
|
`
|
|
3165
3675
|
];
|
|
3166
|
-
|
|
3676
|
+
nt([
|
|
3167
3677
|
n({ type: String })
|
|
3168
|
-
],
|
|
3169
|
-
|
|
3678
|
+
], B.prototype, "position", 2);
|
|
3679
|
+
nt([
|
|
3170
3680
|
n({ type: String })
|
|
3171
|
-
],
|
|
3172
|
-
|
|
3681
|
+
], B.prototype, "size", 2);
|
|
3682
|
+
nt([
|
|
3173
3683
|
n({ type: Boolean })
|
|
3174
|
-
],
|
|
3175
|
-
|
|
3684
|
+
], B.prototype, "disabled", 2);
|
|
3685
|
+
nt([
|
|
3176
3686
|
n({ type: Object })
|
|
3177
|
-
],
|
|
3178
|
-
|
|
3687
|
+
], B.prototype, "sx", 2);
|
|
3688
|
+
B = nt([
|
|
3179
3689
|
p("tc-floating-button")
|
|
3180
|
-
],
|
|
3181
|
-
var
|
|
3182
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
3183
|
-
(o = r[
|
|
3184
|
-
return i && t &&
|
|
3690
|
+
], B);
|
|
3691
|
+
var Be = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, T = (r, e, a, i) => {
|
|
3692
|
+
for (var t = i > 1 ? void 0 : i ? Le(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
3693
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
3694
|
+
return i && t && Be(e, a, t), t;
|
|
3185
3695
|
};
|
|
3186
|
-
let
|
|
3696
|
+
let w = class extends d {
|
|
3187
3697
|
constructor() {
|
|
3188
|
-
super(...arguments), this.src = "", this.title = "", this.closeOnEscape = !0, this.closeOnOverlay = !0, this.useHistory = !0, this.isLoading = !0, this.animation = new
|
|
3698
|
+
super(...arguments), this.src = "", this.title = "", this.closeOnEscape = !0, this.closeOnOverlay = !0, this.useHistory = !0, this.isLoading = !0, this.animation = new M(this, {
|
|
3189
3699
|
showDuration: 300,
|
|
3190
3700
|
hideDuration: 200
|
|
3191
|
-
}), this.history = new
|
|
3701
|
+
}), this.history = new jt(this), this.messageBus = new Lt(this), this.handleKeyDown = (r) => {
|
|
3192
3702
|
r.key === "Escape" && this.animation.state === "visible" && this.close();
|
|
3193
3703
|
};
|
|
3194
3704
|
}
|
|
@@ -3234,8 +3744,8 @@ let g = class extends d {
|
|
|
3234
3744
|
);
|
|
3235
3745
|
}
|
|
3236
3746
|
sendMessage(r, e) {
|
|
3237
|
-
const
|
|
3238
|
-
|
|
3747
|
+
const a = this.shadowRoot?.querySelector("iframe");
|
|
3748
|
+
a?.contentWindow && this.messageBus.send(r, e, a.contentWindow);
|
|
3239
3749
|
}
|
|
3240
3750
|
render() {
|
|
3241
3751
|
return l`
|
|
@@ -3281,8 +3791,8 @@ let g = class extends d {
|
|
|
3281
3791
|
`;
|
|
3282
3792
|
}
|
|
3283
3793
|
};
|
|
3284
|
-
|
|
3285
|
-
|
|
3794
|
+
w.styles = [
|
|
3795
|
+
h,
|
|
3286
3796
|
c`
|
|
3287
3797
|
:host {
|
|
3288
3798
|
display: contents;
|
|
@@ -3411,38 +3921,38 @@ g.styles = [
|
|
|
3411
3921
|
}
|
|
3412
3922
|
`
|
|
3413
3923
|
];
|
|
3414
|
-
|
|
3924
|
+
T([
|
|
3415
3925
|
n({ type: String })
|
|
3416
|
-
],
|
|
3417
|
-
|
|
3926
|
+
], w.prototype, "src", 2);
|
|
3927
|
+
T([
|
|
3418
3928
|
n({ type: String })
|
|
3419
|
-
],
|
|
3420
|
-
|
|
3929
|
+
], w.prototype, "title", 2);
|
|
3930
|
+
T([
|
|
3421
3931
|
n({ type: Boolean, attribute: "close-on-escape" })
|
|
3422
|
-
],
|
|
3423
|
-
|
|
3932
|
+
], w.prototype, "closeOnEscape", 2);
|
|
3933
|
+
T([
|
|
3424
3934
|
n({ type: Boolean, attribute: "close-on-overlay" })
|
|
3425
|
-
],
|
|
3426
|
-
|
|
3935
|
+
], w.prototype, "closeOnOverlay", 2);
|
|
3936
|
+
T([
|
|
3427
3937
|
n({ type: Boolean, attribute: "use-history" })
|
|
3428
|
-
],
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
],
|
|
3432
|
-
|
|
3938
|
+
], w.prototype, "useHistory", 2);
|
|
3939
|
+
T([
|
|
3940
|
+
k()
|
|
3941
|
+
], w.prototype, "isLoading", 2);
|
|
3942
|
+
w = T([
|
|
3433
3943
|
p("tc-iframe-modal")
|
|
3434
|
-
],
|
|
3435
|
-
var
|
|
3436
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
3437
|
-
(o = r[
|
|
3438
|
-
return i && t &&
|
|
3944
|
+
], w);
|
|
3945
|
+
var Me = Object.defineProperty, Ie = Object.getOwnPropertyDescriptor, A = (r, e, a, i) => {
|
|
3946
|
+
for (var t = i > 1 ? void 0 : i ? Ie(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
3947
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
3948
|
+
return i && t && Me(e, a, t), t;
|
|
3439
3949
|
};
|
|
3440
|
-
let
|
|
3950
|
+
let x = class extends d {
|
|
3441
3951
|
constructor() {
|
|
3442
|
-
super(...arguments), this.title = "Install App", this.description = "Add to your home screen for quick access", this.installLabel = "Install", this.storageKey = "tc-install-banner-dismissed", this.dismissDays = 7, this.isDismissed = !1, this.animation = new
|
|
3952
|
+
super(...arguments), this.title = "Install App", this.description = "Add to your home screen for quick access", this.installLabel = "Install", this.storageKey = "tc-install-banner-dismissed", this.dismissDays = 7, this.isDismissed = !1, this.animation = new M(this, {
|
|
3443
3953
|
showDuration: 400,
|
|
3444
3954
|
hideDuration: 300
|
|
3445
|
-
}), this.storage = new
|
|
3955
|
+
}), this.storage = new zt(
|
|
3446
3956
|
this,
|
|
3447
3957
|
this.storageKey
|
|
3448
3958
|
);
|
|
@@ -3520,8 +4030,8 @@ let f = class extends d {
|
|
|
3520
4030
|
`;
|
|
3521
4031
|
}
|
|
3522
4032
|
};
|
|
3523
|
-
|
|
3524
|
-
|
|
4033
|
+
x.styles = [
|
|
4034
|
+
h,
|
|
3525
4035
|
c`
|
|
3526
4036
|
:host {
|
|
3527
4037
|
display: block;
|
|
@@ -3637,39 +4147,39 @@ f.styles = [
|
|
|
3637
4147
|
}
|
|
3638
4148
|
`
|
|
3639
4149
|
];
|
|
3640
|
-
|
|
4150
|
+
A([
|
|
3641
4151
|
n({ type: String })
|
|
3642
|
-
],
|
|
3643
|
-
|
|
4152
|
+
], x.prototype, "title", 2);
|
|
4153
|
+
A([
|
|
3644
4154
|
n({ type: String })
|
|
3645
|
-
],
|
|
3646
|
-
|
|
4155
|
+
], x.prototype, "description", 2);
|
|
4156
|
+
A([
|
|
3647
4157
|
n({ type: String, attribute: "install-label" })
|
|
3648
|
-
],
|
|
3649
|
-
|
|
4158
|
+
], x.prototype, "installLabel", 2);
|
|
4159
|
+
A([
|
|
3650
4160
|
n({ type: String, attribute: "storage-key" })
|
|
3651
|
-
],
|
|
3652
|
-
|
|
4161
|
+
], x.prototype, "storageKey", 2);
|
|
4162
|
+
A([
|
|
3653
4163
|
n({ type: Number, attribute: "dismiss-days" })
|
|
3654
|
-
],
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
],
|
|
3658
|
-
|
|
4164
|
+
], x.prototype, "dismissDays", 2);
|
|
4165
|
+
A([
|
|
4166
|
+
k()
|
|
4167
|
+
], x.prototype, "isDismissed", 2);
|
|
4168
|
+
x = A([
|
|
3659
4169
|
p("tc-installation-banner")
|
|
3660
|
-
],
|
|
3661
|
-
var
|
|
3662
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
3663
|
-
(o = r[
|
|
3664
|
-
return i && t &&
|
|
4170
|
+
], x);
|
|
4171
|
+
var Te = Object.defineProperty, Ae = Object.getOwnPropertyDescriptor, $t = (r, e, a, i) => {
|
|
4172
|
+
for (var t = i > 1 ? void 0 : i ? Ae(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
4173
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
4174
|
+
return i && t && Te(e, a, t), t;
|
|
3665
4175
|
};
|
|
3666
|
-
let
|
|
4176
|
+
let it = class extends d {
|
|
3667
4177
|
constructor() {
|
|
3668
4178
|
super(...arguments), this.title = "Install on iOS", this.steps = [
|
|
3669
4179
|
"Tap the Share button in Safari",
|
|
3670
4180
|
'Scroll down and tap "Add to Home Screen"',
|
|
3671
4181
|
'Tap "Add" in the top right corner'
|
|
3672
|
-
], this.animation = new
|
|
4182
|
+
], this.animation = new M(this, {
|
|
3673
4183
|
showDuration: 300,
|
|
3674
4184
|
hideDuration: 200
|
|
3675
4185
|
});
|
|
@@ -3695,11 +4205,11 @@ let J = class extends d {
|
|
|
3695
4205
|
r.target === r.currentTarget && this.close();
|
|
3696
4206
|
}
|
|
3697
4207
|
renderStep(r, e) {
|
|
3698
|
-
const
|
|
4208
|
+
const a = r.split("[share]"), i = a.length > 1 ? l`${a[0]}<svg class="share-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
3699
4209
|
<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path>
|
|
3700
4210
|
<polyline points="16 6 12 2 8 6"></polyline>
|
|
3701
4211
|
<line x1="12" y1="2" x2="12" y2="15"></line>
|
|
3702
|
-
</svg>${
|
|
4212
|
+
</svg>${a[1]}` : r;
|
|
3703
4213
|
return l`
|
|
3704
4214
|
<div part="step" class="step">
|
|
3705
4215
|
<span part="step-number" class="step-number">${e + 1}</span>
|
|
@@ -3740,8 +4250,8 @@ let J = class extends d {
|
|
|
3740
4250
|
`;
|
|
3741
4251
|
}
|
|
3742
4252
|
};
|
|
3743
|
-
|
|
3744
|
-
|
|
4253
|
+
it.styles = [
|
|
4254
|
+
h,
|
|
3745
4255
|
c`
|
|
3746
4256
|
:host {
|
|
3747
4257
|
display: contents;
|
|
@@ -3882,26 +4392,26 @@ J.styles = [
|
|
|
3882
4392
|
}
|
|
3883
4393
|
`
|
|
3884
4394
|
];
|
|
3885
|
-
|
|
4395
|
+
$t([
|
|
3886
4396
|
n({ type: String })
|
|
3887
|
-
],
|
|
3888
|
-
|
|
4397
|
+
], it.prototype, "title", 2);
|
|
4398
|
+
$t([
|
|
3889
4399
|
n({ type: Array })
|
|
3890
|
-
],
|
|
3891
|
-
|
|
4400
|
+
], it.prototype, "steps", 2);
|
|
4401
|
+
it = $t([
|
|
3892
4402
|
p("tc-ios-installation-guide")
|
|
3893
|
-
],
|
|
3894
|
-
var
|
|
3895
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
3896
|
-
(o = r[
|
|
3897
|
-
return i && t &&
|
|
4403
|
+
], it);
|
|
4404
|
+
var Fe = Object.defineProperty, He = Object.getOwnPropertyDescriptor, W = (r, e, a, i) => {
|
|
4405
|
+
for (var t = i > 1 ? void 0 : i ? He(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
4406
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
4407
|
+
return i && t && Fe(e, a, t), t;
|
|
3898
4408
|
};
|
|
3899
|
-
let
|
|
4409
|
+
let O = class extends d {
|
|
3900
4410
|
constructor() {
|
|
3901
|
-
super(...arguments), this.title = "Enable Notifications", this.description = "Stay updated with important alerts and messages.", this.allowLabel = "Allow", this.denyLabel = "Not Now", this.storageKey = "tc-notification-modal-state", this.animation = new
|
|
4411
|
+
super(...arguments), this.title = "Enable Notifications", this.description = "Stay updated with important alerts and messages.", this.allowLabel = "Allow", this.denyLabel = "Not Now", this.storageKey = "tc-notification-modal-state", this.animation = new M(this, {
|
|
3902
4412
|
showDuration: 300,
|
|
3903
4413
|
hideDuration: 200
|
|
3904
|
-
}), this.storage = new
|
|
4414
|
+
}), this.storage = new zt(this, this.storageKey);
|
|
3905
4415
|
}
|
|
3906
4416
|
connectedCallback() {
|
|
3907
4417
|
super.connectedCallback(), this.updateDataState();
|
|
@@ -3993,8 +4503,8 @@ let $ = class extends d {
|
|
|
3993
4503
|
`;
|
|
3994
4504
|
}
|
|
3995
4505
|
};
|
|
3996
|
-
|
|
3997
|
-
|
|
4506
|
+
O.styles = [
|
|
4507
|
+
h,
|
|
3998
4508
|
c`
|
|
3999
4509
|
:host {
|
|
4000
4510
|
display: contents;
|
|
@@ -4095,32 +4605,32 @@ $.styles = [
|
|
|
4095
4605
|
}
|
|
4096
4606
|
`
|
|
4097
4607
|
];
|
|
4098
|
-
|
|
4608
|
+
W([
|
|
4099
4609
|
n({ type: String })
|
|
4100
|
-
],
|
|
4101
|
-
|
|
4610
|
+
], O.prototype, "title", 2);
|
|
4611
|
+
W([
|
|
4102
4612
|
n({ type: String })
|
|
4103
|
-
],
|
|
4104
|
-
|
|
4613
|
+
], O.prototype, "description", 2);
|
|
4614
|
+
W([
|
|
4105
4615
|
n({ type: String, attribute: "allow-label" })
|
|
4106
|
-
],
|
|
4107
|
-
|
|
4616
|
+
], O.prototype, "allowLabel", 2);
|
|
4617
|
+
W([
|
|
4108
4618
|
n({ type: String, attribute: "deny-label" })
|
|
4109
|
-
],
|
|
4110
|
-
|
|
4619
|
+
], O.prototype, "denyLabel", 2);
|
|
4620
|
+
W([
|
|
4111
4621
|
n({ type: String, attribute: "storage-key" })
|
|
4112
|
-
],
|
|
4113
|
-
|
|
4622
|
+
], O.prototype, "storageKey", 2);
|
|
4623
|
+
O = W([
|
|
4114
4624
|
p("tc-notification-modal")
|
|
4115
|
-
],
|
|
4116
|
-
var
|
|
4117
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
4118
|
-
(o = r[
|
|
4119
|
-
return i && t &&
|
|
4625
|
+
], O);
|
|
4626
|
+
var Ve = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, X = (r, e, a, i) => {
|
|
4627
|
+
for (var t = i > 1 ? void 0 : i ? qe(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
4628
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
4629
|
+
return i && t && Ve(e, a, t), t;
|
|
4120
4630
|
};
|
|
4121
|
-
let
|
|
4631
|
+
let S = class extends d {
|
|
4122
4632
|
constructor() {
|
|
4123
|
-
super(...arguments), this.title = "No Connection", this.description = "Please check your internet connection and try again.", this.retryLabel = "Try Again", this.autoDetect = !0, this.isOffline = !1, this.animation = new
|
|
4633
|
+
super(...arguments), this.title = "No Connection", this.description = "Please check your internet connection and try again.", this.retryLabel = "Try Again", this.autoDetect = !0, this.isOffline = !1, this.animation = new M(this, {
|
|
4124
4634
|
showDuration: 300,
|
|
4125
4635
|
hideDuration: 200
|
|
4126
4636
|
}), this.handleOnline = () => {
|
|
@@ -4206,8 +4716,8 @@ let z = class extends d {
|
|
|
4206
4716
|
`;
|
|
4207
4717
|
}
|
|
4208
4718
|
};
|
|
4209
|
-
|
|
4210
|
-
|
|
4719
|
+
S.styles = [
|
|
4720
|
+
h,
|
|
4211
4721
|
c`
|
|
4212
4722
|
:host {
|
|
4213
4723
|
display: contents;
|
|
@@ -4290,30 +4800,30 @@ z.styles = [
|
|
|
4290
4800
|
}
|
|
4291
4801
|
`
|
|
4292
4802
|
];
|
|
4293
|
-
|
|
4803
|
+
X([
|
|
4294
4804
|
n({ type: String })
|
|
4295
|
-
],
|
|
4296
|
-
|
|
4805
|
+
], S.prototype, "title", 2);
|
|
4806
|
+
X([
|
|
4297
4807
|
n({ type: String })
|
|
4298
|
-
],
|
|
4299
|
-
|
|
4808
|
+
], S.prototype, "description", 2);
|
|
4809
|
+
X([
|
|
4300
4810
|
n({ type: String, attribute: "retry-label" })
|
|
4301
|
-
],
|
|
4302
|
-
|
|
4811
|
+
], S.prototype, "retryLabel", 2);
|
|
4812
|
+
X([
|
|
4303
4813
|
n({ type: Boolean, attribute: "auto-detect" })
|
|
4304
|
-
],
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
],
|
|
4308
|
-
|
|
4814
|
+
], S.prototype, "autoDetect", 2);
|
|
4815
|
+
X([
|
|
4816
|
+
k()
|
|
4817
|
+
], S.prototype, "isOffline", 2);
|
|
4818
|
+
S = X([
|
|
4309
4819
|
p("tc-offline-modal")
|
|
4310
|
-
],
|
|
4311
|
-
var
|
|
4312
|
-
for (var t = i > 1 ? void 0 : i ?
|
|
4313
|
-
(o = r[
|
|
4314
|
-
return i && t &&
|
|
4820
|
+
], S);
|
|
4821
|
+
var Ye = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, Dt = (r, e, a, i) => {
|
|
4822
|
+
for (var t = i > 1 ? void 0 : i ? Ue(e, a) : e, s = r.length - 1, o; s >= 0; s--)
|
|
4823
|
+
(o = r[s]) && (t = (i ? o(e, a, t) : o(t)) || t);
|
|
4824
|
+
return i && t && Ye(e, a, t), t;
|
|
4315
4825
|
};
|
|
4316
|
-
let
|
|
4826
|
+
let dt = class extends d {
|
|
4317
4827
|
constructor() {
|
|
4318
4828
|
super(...arguments), this.variant = "primary";
|
|
4319
4829
|
}
|
|
@@ -4327,8 +4837,8 @@ let at = class extends d {
|
|
|
4327
4837
|
`;
|
|
4328
4838
|
}
|
|
4329
4839
|
};
|
|
4330
|
-
|
|
4331
|
-
|
|
4840
|
+
dt.styles = [
|
|
4841
|
+
h,
|
|
4332
4842
|
c`
|
|
4333
4843
|
:host {
|
|
4334
4844
|
position: fixed;
|
|
@@ -4422,47 +4932,50 @@ at.styles = [
|
|
|
4422
4932
|
}
|
|
4423
4933
|
`
|
|
4424
4934
|
];
|
|
4425
|
-
|
|
4935
|
+
Dt([
|
|
4426
4936
|
n({ type: String })
|
|
4427
|
-
],
|
|
4428
|
-
|
|
4937
|
+
], dt.prototype, "variant", 2);
|
|
4938
|
+
dt = Dt([
|
|
4429
4939
|
p("tc-page-decoration")
|
|
4430
|
-
],
|
|
4940
|
+
], dt);
|
|
4431
4941
|
export {
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4942
|
+
M as AnimationController,
|
|
4943
|
+
L as BaseController,
|
|
4944
|
+
Ge as FormValidationController,
|
|
4945
|
+
jt as HistoryController,
|
|
4946
|
+
Et as LoadingController,
|
|
4947
|
+
Bt as MatchMediaController,
|
|
4948
|
+
Lt as MessageBusController,
|
|
4949
|
+
zt as StorageController,
|
|
4950
|
+
y as TcAuthenticatorCard,
|
|
4951
|
+
lt as TcBox,
|
|
4952
|
+
P as TcButton,
|
|
4953
|
+
ct as TcCallout,
|
|
4954
|
+
G as TcCard,
|
|
4955
|
+
Q as TcChip,
|
|
4956
|
+
J as TcContainer,
|
|
4957
|
+
F as TcDivider,
|
|
4958
|
+
Z as TcErrorMessage,
|
|
4959
|
+
E as TcErrorScreen,
|
|
4960
|
+
B as TcFloatingButton,
|
|
4961
|
+
z as TcFormHeader,
|
|
4962
|
+
H as TcIcon,
|
|
4963
|
+
w as TcIframeModal,
|
|
4964
|
+
u as TcInput,
|
|
4965
|
+
m as TcInputWithChip,
|
|
4966
|
+
x as TcInstallationBanner,
|
|
4967
|
+
it as TcIosInstallationGuide,
|
|
4968
|
+
V as TcItem,
|
|
4969
|
+
C as TcItemButton,
|
|
4970
|
+
rt as TcLoadingScreen,
|
|
4971
|
+
O as TcNotificationModal,
|
|
4972
|
+
S as TcOfflineModal,
|
|
4973
|
+
_ as TcOtpInput,
|
|
4974
|
+
dt as TcPageDecoration,
|
|
4975
|
+
tt as TcSection,
|
|
4976
|
+
et as TcSpinner,
|
|
4977
|
+
D as TcSuccessScreen,
|
|
4978
|
+
q as TcSymbol,
|
|
4979
|
+
$ as TcText,
|
|
4980
|
+
j as TcToast
|
|
4468
4981
|
};
|