@saasbase-io/core-elements 1.21.1 → 1.22.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/components/renderers/_updated/field/_confirm-field.d.ts +14 -20
- package/dist/components/renderers/_updated/field/_email-field.d.ts +14 -15
- package/dist/components/renderers/_updated/field/_identifier-field.d.ts +14 -7
- package/dist/components/renderers/_updated/field/_name-field.d.ts +14 -31
- package/dist/components/renderers/_updated/field/_password-field.d.ts +14 -32
- package/dist/components/renderers/_updated/field/_phone-field.d.ts +14 -15
- package/dist/components/renderers/_updated/field/_username-field.d.ts +14 -31
- package/dist/components/renderers/_updated/field/field.types.d.ts +23 -7
- package/dist/index.js +80 -80
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +719 -801
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -56,7 +56,7 @@ class li {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
const oe = li.Instance;
|
|
59
|
-
class
|
|
59
|
+
class $t extends Error {
|
|
60
60
|
constructor(e, r, i) {
|
|
61
61
|
super(r), this.name = "LoginflowError", this.code = e, this.details = i;
|
|
62
62
|
}
|
|
@@ -74,11 +74,11 @@ class Qe {
|
|
|
74
74
|
const b = yield fetch(o, Object.assign(Object.assign({}, i), { signal: h.signal, headers: Object.assign(Object.assign(Object.assign({ "Content-Type": "application/json" }, s.apiKey && { Authorization: `Bearer ${s.apiKey}` }), s.headers), i.headers) }));
|
|
75
75
|
if (clearTimeout(p), !b.ok) {
|
|
76
76
|
const y = yield b.json().catch(() => ({}));
|
|
77
|
-
throw new
|
|
77
|
+
throw new $t(y.code || "API_ERROR", y.message || `HTTP ${b.status}: ${b.statusText}`, y.details);
|
|
78
78
|
}
|
|
79
79
|
return yield b.json();
|
|
80
80
|
} catch (b) {
|
|
81
|
-
throw clearTimeout(p), b instanceof
|
|
81
|
+
throw clearTimeout(p), b instanceof $t ? b : b instanceof Error ? b.name === "AbortError" ? new $t("TIMEOUT", "Request timeout") : new $t("NETWORK_ERROR", b.message) : new $t("UNKNOWN_ERROR", "An unknown error occurred");
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
}
|
|
@@ -191,7 +191,7 @@ class Bt {
|
|
|
191
191
|
expires_at: Date.now() + r.expires_in * 1e3
|
|
192
192
|
};
|
|
193
193
|
} catch (r) {
|
|
194
|
-
return r instanceof
|
|
194
|
+
return r instanceof $t ? console.error("Token refresh failed:", r.message, r.details) : console.error("Token refresh failed:", r), this.clearSession(), null;
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
}
|
|
@@ -343,11 +343,11 @@ class sa {
|
|
|
343
343
|
]);
|
|
344
344
|
const n = oe.getConfig();
|
|
345
345
|
if (!n.domain)
|
|
346
|
-
throw new
|
|
346
|
+
throw new $t("CONFIG_ERROR", "Domain is required");
|
|
347
347
|
if (!n.appId)
|
|
348
|
-
throw new
|
|
348
|
+
throw new $t("CONFIG_ERROR", "App ID is required");
|
|
349
349
|
if (!n.clientSecret)
|
|
350
|
-
throw new
|
|
350
|
+
throw new $t("CONFIG_ERROR", "Client Secret is required");
|
|
351
351
|
this.flowId = e, this.location = i, this.flowStateManager = s || new fc(), this.flowEventBus = r || new vc(), this.navigationTypeDetector = o || new vh(), Bt.Instance.cleanExpiredSession(), Bt.Instance.scheduleTokenRefresh();
|
|
352
352
|
}
|
|
353
353
|
static init(e, r, i, s, o) {
|
|
@@ -369,7 +369,7 @@ class sa {
|
|
|
369
369
|
startFlow(e, r) {
|
|
370
370
|
return K(this, void 0, void 0, function* () {
|
|
371
371
|
if (!r.app_id)
|
|
372
|
-
throw new
|
|
372
|
+
throw new $t("VALIDATION_ERROR", "Client ID is required");
|
|
373
373
|
const i = `/v1/auth-flow/${e}/start`;
|
|
374
374
|
return this.executeFlowRequest(() => this.httpClient.post(i, r), "START_FLOW_ERROR", "Failed to start flow");
|
|
375
375
|
});
|
|
@@ -389,7 +389,7 @@ class sa {
|
|
|
389
389
|
processEvent(e, r) {
|
|
390
390
|
return K(this, void 0, void 0, function* () {
|
|
391
391
|
if (!e.event)
|
|
392
|
-
throw new
|
|
392
|
+
throw new $t("VALIDATION_ERROR", "Event type is required");
|
|
393
393
|
const i = this.eventHandlers.get(e.event);
|
|
394
394
|
return i ? yield i() : yield this.processServerEvent(e, r);
|
|
395
395
|
});
|
|
@@ -403,7 +403,7 @@ class sa {
|
|
|
403
403
|
const o = yield e();
|
|
404
404
|
return s && (yield s(o)), this.processAuthResult(o.auth_result), o.redirection && this.redirect(o.redirection), o;
|
|
405
405
|
} catch (o) {
|
|
406
|
-
throw o instanceof
|
|
406
|
+
throw o instanceof $t ? o : new $t(r, i, o instanceof Error ? { originalError: o.message, stack: o.stack } : o);
|
|
407
407
|
}
|
|
408
408
|
});
|
|
409
409
|
}
|
|
@@ -414,7 +414,7 @@ class sa {
|
|
|
414
414
|
return K(this, void 0, void 0, function* () {
|
|
415
415
|
let i = this.flowStateManager.getFlowState();
|
|
416
416
|
if (!i && (console.warn("Flow state expired, restarting flow before processing event"), yield this.initializeFlowInternal(), i = this.flowStateManager.getFlowState(), !i))
|
|
417
|
-
throw new
|
|
417
|
+
throw new $t("FLOW_RESTART_ERROR", "Failed to restart flow - no flow state after initialization");
|
|
418
418
|
const s = i.state, o = `/v1/auth-flow/${i.flowType}/events`, n = yield this.executeFlowRequest(() => this.httpClient.post(o, e), "PROCESS_EVENT_ERROR", "Failed to process event", r);
|
|
419
419
|
if (!n.auth_result) {
|
|
420
420
|
this.flowStateManager.saveFlowState(i.flowType, i.flow_id, n);
|
|
@@ -461,7 +461,7 @@ class sa {
|
|
|
461
461
|
*/
|
|
462
462
|
validateFlowType(e) {
|
|
463
463
|
if (e === "custom" && !this.flowId)
|
|
464
|
-
throw new
|
|
464
|
+
throw new $t("FLOW_ID_ERROR", "Flow ID is required for custom flows");
|
|
465
465
|
}
|
|
466
466
|
/**
|
|
467
467
|
* Check if we should resume an existing flow.
|
|
@@ -547,7 +547,7 @@ class sa {
|
|
|
547
547
|
return this.flowId || "signup-flow";
|
|
548
548
|
case "custom":
|
|
549
549
|
if (!this.flowId)
|
|
550
|
-
throw new
|
|
550
|
+
throw new $t("FLOW_ID_ERROR", "Flow ID is required for custom flows");
|
|
551
551
|
return this.flowId;
|
|
552
552
|
}
|
|
553
553
|
}
|
|
@@ -1128,11 +1128,11 @@ class di {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
ensureConfigured() {
|
|
1130
1130
|
if (!this.configured)
|
|
1131
|
-
throw new
|
|
1131
|
+
throw new $t("NOT_CONFIGURED", "Auth.configure() must be called before using Auth methods");
|
|
1132
1132
|
}
|
|
1133
1133
|
ensureLoginflowInitialized() {
|
|
1134
1134
|
if (!this.loginflow)
|
|
1135
|
-
throw new
|
|
1135
|
+
throw new $t("LOGINFLOW_NOT_INITIALIZED", "Call Auth.startLoginflow() first");
|
|
1136
1136
|
}
|
|
1137
1137
|
startLoginflowInternal(e) {
|
|
1138
1138
|
return K(this, arguments, void 0, function* (r, i = !1) {
|
|
@@ -1160,7 +1160,7 @@ class di {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
configure(e) {
|
|
1162
1162
|
if (!e.domain || !e.appId || !e.clientSecret)
|
|
1163
|
-
throw new
|
|
1163
|
+
throw new $t("CONFIG_ERROR", "domain, appId, and clientSecret are required");
|
|
1164
1164
|
oe.setConfig(e), this.configured = !0;
|
|
1165
1165
|
}
|
|
1166
1166
|
isAuthenticated() {
|
|
@@ -1290,7 +1290,7 @@ class di {
|
|
|
1290
1290
|
this.ensureConfigured(), Bt.Instance.clearSession(), Bt.Instance.cleanup(), this.loginflow && (this.loginflow.cleanup(), this.loginflow = null), this.navigationManager && (this.navigationManager.destroy(), this.navigationManager = null), this.flowEventBus && (this.flowEventBus.clear(), this.flowEventBus = null), window.location.reload(), console.log("Refreshed the page to clear any in-memory state");
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
1293
|
-
const
|
|
1293
|
+
const Ct = di.Instance;
|
|
1294
1294
|
/**
|
|
1295
1295
|
* @license
|
|
1296
1296
|
* Copyright 2019 Google LLC
|
|
@@ -5489,13 +5489,13 @@ var pa = "-", dp = (t) => {
|
|
|
5489
5489
|
}
|
|
5490
5490
|
S = !1;
|
|
5491
5491
|
}
|
|
5492
|
-
let T = bp(y).join(":"),
|
|
5492
|
+
let T = bp(y).join(":"), A = w ? T + Dc : T, z = A + k;
|
|
5493
5493
|
if (o.includes(z)) continue;
|
|
5494
5494
|
o.push(z);
|
|
5495
5495
|
let J = s(k, S);
|
|
5496
5496
|
for (let Y = 0; Y < J.length; ++Y) {
|
|
5497
|
-
let
|
|
5498
|
-
o.push(
|
|
5497
|
+
let at = J[Y];
|
|
5498
|
+
o.push(A + at);
|
|
5499
5499
|
}
|
|
5500
5500
|
h = b + (h.length > 0 ? " " + h : h);
|
|
5501
5501
|
}
|
|
@@ -5542,7 +5542,7 @@ var it = (t) => {
|
|
|
5542
5542
|
let i = Mc.exec(t);
|
|
5543
5543
|
return i ? i[1] ? typeof e == "string" ? i[1] === e : e.has(i[1]) : r(i[2]) : !1;
|
|
5544
5544
|
}, zp = (t) => Cp.test(t) && !Ep.test(t), Fc = () => !1, jp = (t) => kp.test(t), Dp = (t) => Rp.test(t), Up = /* @__PURE__ */ _p(() => {
|
|
5545
|
-
let t = it("colors"), e = it("spacing"), r = it("blur"), i = it("brightness"), s = it("borderColor"), o = it("borderRadius"), n = it("borderSpacing"), h = it("borderWidth"), p = it("contrast"), b = it("grayscale"), y = it("hueRotate"), w = it("invert"), E = it("gap"), C = it("gradientColorStops"), S = it("gradientColorStopPositions"), k = it("inset"), T = it("margin"),
|
|
5545
|
+
let t = it("colors"), e = it("spacing"), r = it("blur"), i = it("brightness"), s = it("borderColor"), o = it("borderRadius"), n = it("borderSpacing"), h = it("borderWidth"), p = it("contrast"), b = it("grayscale"), y = it("hueRotate"), w = it("invert"), E = it("gap"), C = it("gradientColorStops"), S = it("gradientColorStopPositions"), k = it("inset"), T = it("margin"), A = it("opacity"), z = it("padding"), J = it("saturate"), Y = it("scale"), at = it("sepia"), gt = it("skew"), jt = it("space"), G = it("translate"), Yt = () => [
|
|
5546
5546
|
"auto",
|
|
5547
5547
|
"contain",
|
|
5548
5548
|
"none"
|
|
@@ -5556,7 +5556,7 @@ var it = (t) => {
|
|
|
5556
5556
|
"auto",
|
|
5557
5557
|
V,
|
|
5558
5558
|
e
|
|
5559
|
-
],
|
|
5559
|
+
], N = () => [V, e], hr = () => [
|
|
5560
5560
|
"",
|
|
5561
5561
|
Ae,
|
|
5562
5562
|
Me
|
|
@@ -5640,25 +5640,25 @@ var it = (t) => {
|
|
|
5640
5640
|
Fe,
|
|
5641
5641
|
V
|
|
5642
5642
|
],
|
|
5643
|
-
borderSpacing:
|
|
5643
|
+
borderSpacing: N(),
|
|
5644
5644
|
borderWidth: hr(),
|
|
5645
5645
|
contrast: mt(),
|
|
5646
5646
|
grayscale: Xt(),
|
|
5647
5647
|
hueRotate: mt(),
|
|
5648
5648
|
invert: Xt(),
|
|
5649
|
-
gap:
|
|
5649
|
+
gap: N(),
|
|
5650
5650
|
gradientColorStops: [t],
|
|
5651
5651
|
gradientColorStopPositions: [Op, Me],
|
|
5652
5652
|
inset: Oe(),
|
|
5653
5653
|
margin: Oe(),
|
|
5654
5654
|
opacity: mt(),
|
|
5655
|
-
padding:
|
|
5655
|
+
padding: N(),
|
|
5656
5656
|
saturate: mt(),
|
|
5657
5657
|
scale: mt(),
|
|
5658
5658
|
sepia: Xt(),
|
|
5659
5659
|
skew: mt(),
|
|
5660
|
-
space:
|
|
5661
|
-
translate:
|
|
5660
|
+
space: N(),
|
|
5661
|
+
translate: N()
|
|
5662
5662
|
},
|
|
5663
5663
|
classGroups: {
|
|
5664
5664
|
aspect: [{ aspect: [
|
|
@@ -6029,7 +6029,7 @@ var it = (t) => {
|
|
|
6029
6029
|
] }],
|
|
6030
6030
|
"list-style-position": [{ list: ["inside", "outside"] }],
|
|
6031
6031
|
"placeholder-color": [{ placeholder: [t] }],
|
|
6032
|
-
"placeholder-opacity": [{ "placeholder-opacity": [
|
|
6032
|
+
"placeholder-opacity": [{ "placeholder-opacity": [A] }],
|
|
6033
6033
|
"text-alignment": [{ text: [
|
|
6034
6034
|
"left",
|
|
6035
6035
|
"center",
|
|
@@ -6039,7 +6039,7 @@ var it = (t) => {
|
|
|
6039
6039
|
"end"
|
|
6040
6040
|
] }],
|
|
6041
6041
|
"text-color": [{ text: [t] }],
|
|
6042
|
-
"text-opacity": [{ "text-opacity": [
|
|
6042
|
+
"text-opacity": [{ "text-opacity": [A] }],
|
|
6043
6043
|
"text-decoration": [
|
|
6044
6044
|
"underline",
|
|
6045
6045
|
"overline",
|
|
@@ -6076,7 +6076,7 @@ var it = (t) => {
|
|
|
6076
6076
|
"balance",
|
|
6077
6077
|
"pretty"
|
|
6078
6078
|
] }],
|
|
6079
|
-
indent: [{ indent:
|
|
6079
|
+
indent: [{ indent: N() }],
|
|
6080
6080
|
"vertical-align": [{ align: [
|
|
6081
6081
|
"baseline",
|
|
6082
6082
|
"top",
|
|
@@ -6119,7 +6119,7 @@ var it = (t) => {
|
|
|
6119
6119
|
"content",
|
|
6120
6120
|
"text"
|
|
6121
6121
|
] }],
|
|
6122
|
-
"bg-opacity": [{ "bg-opacity": [
|
|
6122
|
+
"bg-opacity": [{ "bg-opacity": [A] }],
|
|
6123
6123
|
"bg-origin": [{ "bg-origin": [
|
|
6124
6124
|
"border",
|
|
6125
6125
|
"padding",
|
|
@@ -6184,13 +6184,13 @@ var it = (t) => {
|
|
|
6184
6184
|
"border-w-r": [{ "border-r": [h] }],
|
|
6185
6185
|
"border-w-b": [{ "border-b": [h] }],
|
|
6186
6186
|
"border-w-l": [{ "border-l": [h] }],
|
|
6187
|
-
"border-opacity": [{ "border-opacity": [
|
|
6187
|
+
"border-opacity": [{ "border-opacity": [A] }],
|
|
6188
6188
|
"border-style": [{ border: [...ce(), "hidden"] }],
|
|
6189
6189
|
"divide-x": [{ "divide-x": [h] }],
|
|
6190
6190
|
"divide-x-reverse": ["divide-x-reverse"],
|
|
6191
6191
|
"divide-y": [{ "divide-y": [h] }],
|
|
6192
6192
|
"divide-y-reverse": ["divide-y-reverse"],
|
|
6193
|
-
"divide-opacity": [{ "divide-opacity": [
|
|
6193
|
+
"divide-opacity": [{ "divide-opacity": [A] }],
|
|
6194
6194
|
"divide-style": [{ divide: ce() }],
|
|
6195
6195
|
"border-color": [{ border: [s] }],
|
|
6196
6196
|
"border-color-x": [{ "border-x": [s] }],
|
|
@@ -6209,7 +6209,7 @@ var it = (t) => {
|
|
|
6209
6209
|
"ring-w": [{ ring: hr() }],
|
|
6210
6210
|
"ring-w-inset": ["ring-inset"],
|
|
6211
6211
|
"ring-color": [{ ring: [t] }],
|
|
6212
|
-
"ring-opacity": [{ "ring-opacity": [
|
|
6212
|
+
"ring-opacity": [{ "ring-opacity": [A] }],
|
|
6213
6213
|
"ring-offset-w": [{ "ring-offset": [Ae, Me] }],
|
|
6214
6214
|
"ring-offset-color": [{ "ring-offset": [t] }],
|
|
6215
6215
|
shadow: [{ shadow: [
|
|
@@ -6220,7 +6220,7 @@ var it = (t) => {
|
|
|
6220
6220
|
Np
|
|
6221
6221
|
] }],
|
|
6222
6222
|
"shadow-color": [{ shadow: [Ri] }],
|
|
6223
|
-
opacity: [{ opacity: [
|
|
6223
|
+
opacity: [{ opacity: [A] }],
|
|
6224
6224
|
"mix-blend": [{ "mix-blend": [
|
|
6225
6225
|
...te(),
|
|
6226
6226
|
"plus-lighter",
|
|
@@ -6241,7 +6241,7 @@ var it = (t) => {
|
|
|
6241
6241
|
"hue-rotate": [{ "hue-rotate": [y] }],
|
|
6242
6242
|
invert: [{ invert: [w] }],
|
|
6243
6243
|
saturate: [{ saturate: [J] }],
|
|
6244
|
-
sepia: [{ sepia: [
|
|
6244
|
+
sepia: [{ sepia: [at] }],
|
|
6245
6245
|
"backdrop-filter": [{ "backdrop-filter": ["", "none"] }],
|
|
6246
6246
|
"backdrop-blur": [{ "backdrop-blur": [r] }],
|
|
6247
6247
|
"backdrop-brightness": [{ "backdrop-brightness": [i] }],
|
|
@@ -6249,9 +6249,9 @@ var it = (t) => {
|
|
|
6249
6249
|
"backdrop-grayscale": [{ "backdrop-grayscale": [b] }],
|
|
6250
6250
|
"backdrop-hue-rotate": [{ "backdrop-hue-rotate": [y] }],
|
|
6251
6251
|
"backdrop-invert": [{ "backdrop-invert": [w] }],
|
|
6252
|
-
"backdrop-opacity": [{ "backdrop-opacity": [
|
|
6252
|
+
"backdrop-opacity": [{ "backdrop-opacity": [A] }],
|
|
6253
6253
|
"backdrop-saturate": [{ "backdrop-saturate": [J] }],
|
|
6254
|
-
"backdrop-sepia": [{ "backdrop-sepia": [
|
|
6254
|
+
"backdrop-sepia": [{ "backdrop-sepia": [at] }],
|
|
6255
6255
|
"border-collapse": [{ border: ["collapse", "separate"] }],
|
|
6256
6256
|
"border-spacing": [{ "border-spacing": [n] }],
|
|
6257
6257
|
"border-spacing-x": [{ "border-spacing-x": [n] }],
|
|
@@ -6360,24 +6360,24 @@ var it = (t) => {
|
|
|
6360
6360
|
""
|
|
6361
6361
|
] }],
|
|
6362
6362
|
"scroll-behavior": [{ scroll: ["auto", "smooth"] }],
|
|
6363
|
-
"scroll-m": [{ "scroll-m":
|
|
6364
|
-
"scroll-mx": [{ "scroll-mx":
|
|
6365
|
-
"scroll-my": [{ "scroll-my":
|
|
6366
|
-
"scroll-ms": [{ "scroll-ms":
|
|
6367
|
-
"scroll-me": [{ "scroll-me":
|
|
6368
|
-
"scroll-mt": [{ "scroll-mt":
|
|
6369
|
-
"scroll-mr": [{ "scroll-mr":
|
|
6370
|
-
"scroll-mb": [{ "scroll-mb":
|
|
6371
|
-
"scroll-ml": [{ "scroll-ml":
|
|
6372
|
-
"scroll-p": [{ "scroll-p":
|
|
6373
|
-
"scroll-px": [{ "scroll-px":
|
|
6374
|
-
"scroll-py": [{ "scroll-py":
|
|
6375
|
-
"scroll-ps": [{ "scroll-ps":
|
|
6376
|
-
"scroll-pe": [{ "scroll-pe":
|
|
6377
|
-
"scroll-pt": [{ "scroll-pt":
|
|
6378
|
-
"scroll-pr": [{ "scroll-pr":
|
|
6379
|
-
"scroll-pb": [{ "scroll-pb":
|
|
6380
|
-
"scroll-pl": [{ "scroll-pl":
|
|
6363
|
+
"scroll-m": [{ "scroll-m": N() }],
|
|
6364
|
+
"scroll-mx": [{ "scroll-mx": N() }],
|
|
6365
|
+
"scroll-my": [{ "scroll-my": N() }],
|
|
6366
|
+
"scroll-ms": [{ "scroll-ms": N() }],
|
|
6367
|
+
"scroll-me": [{ "scroll-me": N() }],
|
|
6368
|
+
"scroll-mt": [{ "scroll-mt": N() }],
|
|
6369
|
+
"scroll-mr": [{ "scroll-mr": N() }],
|
|
6370
|
+
"scroll-mb": [{ "scroll-mb": N() }],
|
|
6371
|
+
"scroll-ml": [{ "scroll-ml": N() }],
|
|
6372
|
+
"scroll-p": [{ "scroll-p": N() }],
|
|
6373
|
+
"scroll-px": [{ "scroll-px": N() }],
|
|
6374
|
+
"scroll-py": [{ "scroll-py": N() }],
|
|
6375
|
+
"scroll-ps": [{ "scroll-ps": N() }],
|
|
6376
|
+
"scroll-pe": [{ "scroll-pe": N() }],
|
|
6377
|
+
"scroll-pt": [{ "scroll-pt": N() }],
|
|
6378
|
+
"scroll-pr": [{ "scroll-pr": N() }],
|
|
6379
|
+
"scroll-pb": [{ "scroll-pb": N() }],
|
|
6380
|
+
"scroll-pl": [{ "scroll-pl": N() }],
|
|
6381
6381
|
"snap-align": [{ snap: [
|
|
6382
6382
|
"start",
|
|
6383
6383
|
"end",
|
|
@@ -7883,10 +7883,10 @@ var gl = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, ml = zc, ua
|
|
|
7883
7883
|
<tr class=${m("calendar-week", X.week)}>
|
|
7884
7884
|
${o.slice(y * 7, (y + 1) * 7).map((w, E) => {
|
|
7885
7885
|
var jt, G, Yt;
|
|
7886
|
-
let C = new Date(this.currentDate.getFullYear(), w.month, Number(w.day)), S = C.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), k = this.mode === "range" && C.toDateString() === ((jt = this.selectedStartDate) == null ? void 0 : jt.toDateString()), T = this.mode === "range" && this.isDayInRange(C, !0),
|
|
7886
|
+
let C = new Date(this.currentDate.getFullYear(), w.month, Number(w.day)), S = C.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), k = this.mode === "range" && C.toDateString() === ((jt = this.selectedStartDate) == null ? void 0 : jt.toDateString()), T = this.mode === "range" && this.isDayInRange(C, !0), A = this.mode === "range" && C.toDateString() === ((G = this.selectedEndDate) == null ? void 0 : G.toDateString()), z = this.mode === "single" && C.toDateString() === ((Yt = this.selectedStartDate) == null ? void 0 : Yt.toDateString()), J = z || k || T || A, Y = E === 0, at = E === 6, gt = S ? "Today, " : "";
|
|
7887
7887
|
return gt += Vp(C), gt += J ? ", selected" : "", d`
|
|
7888
7888
|
<td
|
|
7889
|
-
class=${m("calendar-day", X.day.base, S && !J && X.day.today, J && X.day.selected.common, z && X.day.selected.single, k && X.day.selected.range.start, T && X.day.selected.range.middle,
|
|
7889
|
+
class=${m("calendar-day", X.day.base, S && !J && X.day.today, J && X.day.selected.common, z && X.day.selected.single, k && X.day.selected.range.start, T && X.day.selected.range.middle, A && X.day.selected.range.end, Y && X.day.index.first, at && X.day.index.last, !1)}
|
|
7890
7890
|
role="gridcell"
|
|
7891
7891
|
data-day=${C.toISOString().slice(0, 10)}
|
|
7892
7892
|
?data-disabled=${void 0}
|
|
@@ -7907,8 +7907,8 @@ var gl = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, ml = zc, ua
|
|
|
7907
7907
|
data-selected-single=${z.toString()}
|
|
7908
7908
|
data-range-start=${k.toString()}
|
|
7909
7909
|
data-range-middle=${T.toString()}
|
|
7910
|
-
data-range-end=${
|
|
7911
|
-
tabindex=${z ||
|
|
7910
|
+
data-range-end=${A.toString()}
|
|
7911
|
+
tabindex=${z || A ? "0" : "-1"}
|
|
7912
7912
|
type="button"
|
|
7913
7913
|
aria-label=${gt}
|
|
7914
7914
|
@click="${() => this.selectDate(Number(w.day), w.isOutside)}"
|
|
@@ -16176,11 +16176,11 @@ function Vc(t = window.React, e, r, i, s) {
|
|
|
16176
16176
|
}
|
|
16177
16177
|
render() {
|
|
16178
16178
|
let { _$Gl: S, ...k } = this.props;
|
|
16179
|
-
this.h !== S && (this.u = (
|
|
16180
|
-
S !== null && _u(S,
|
|
16179
|
+
this.h !== S && (this.u = (A) => {
|
|
16180
|
+
S !== null && _u(S, A), this.o = A, this.h = S;
|
|
16181
16181
|
}), this.i = {};
|
|
16182
16182
|
let T = { ref: this.u };
|
|
16183
|
-
for (let [
|
|
16183
|
+
for (let [A, z] of Object.entries(k)) yu.has(A) ? T[A === "className" ? "class" : A] = z : y.has(A) || A in h.prototype ? this.i[A] = z : T[A] = z;
|
|
16184
16184
|
return T.suppressHydrationWarning = !0, b(n, T);
|
|
16185
16185
|
}
|
|
16186
16186
|
}
|
|
@@ -16206,9 +16206,9 @@ var xu = /* @__PURE__ */ Lc(((t) => {
|
|
|
16206
16206
|
},
|
|
16207
16207
|
enqueueSetState: function() {
|
|
16208
16208
|
}
|
|
16209
|
-
}, T = Object.assign,
|
|
16209
|
+
}, T = Object.assign, A = {};
|
|
16210
16210
|
function z(f, $, q) {
|
|
16211
|
-
this.props = f, this.context = $, this.refs =
|
|
16211
|
+
this.props = f, this.context = $, this.refs = A, this.updater = q || k;
|
|
16212
16212
|
}
|
|
16213
16213
|
z.prototype.isReactComponent = {}, z.prototype.setState = function(f, $) {
|
|
16214
16214
|
if (typeof f != "object" && typeof f != "function" && f != null) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
|
|
@@ -16220,10 +16220,10 @@ var xu = /* @__PURE__ */ Lc(((t) => {
|
|
|
16220
16220
|
}
|
|
16221
16221
|
J.prototype = z.prototype;
|
|
16222
16222
|
function Y(f, $, q) {
|
|
16223
|
-
this.props = f, this.context = $, this.refs =
|
|
16223
|
+
this.props = f, this.context = $, this.refs = A, this.updater = q || k;
|
|
16224
16224
|
}
|
|
16225
|
-
var
|
|
16226
|
-
|
|
16225
|
+
var at = Y.prototype = new J();
|
|
16226
|
+
at.constructor = Y, T(at, z.prototype), at.isPureReactComponent = !0;
|
|
16227
16227
|
var gt = Array.isArray;
|
|
16228
16228
|
function jt() {
|
|
16229
16229
|
}
|
|
@@ -16246,7 +16246,7 @@ var xu = /* @__PURE__ */ Lc(((t) => {
|
|
|
16246
16246
|
function Oe(f, $) {
|
|
16247
16247
|
return de(f.type, $, f.props);
|
|
16248
16248
|
}
|
|
16249
|
-
function
|
|
16249
|
+
function N(f) {
|
|
16250
16250
|
return typeof f == "object" && !!f && f.$$typeof === e;
|
|
16251
16251
|
}
|
|
16252
16252
|
function hr(f) {
|
|
@@ -16305,7 +16305,7 @@ var xu = /* @__PURE__ */ Lc(((t) => {
|
|
|
16305
16305
|
}
|
|
16306
16306
|
if (rt) return W = W(f), rt = B === "" ? "." + Ie(f, 0) : B, gt(W) ? (q = "", rt != null && (q = rt.replace(Qt, "$&/") + "/"), te(W, $, q, "", function(fh) {
|
|
16307
16307
|
return fh;
|
|
16308
|
-
})) : W != null && (
|
|
16308
|
+
})) : W != null && (N(W) && (W = Oe(W, q + (W.key == null || f && f.key === W.key ? "" : ("" + W.key).replace(Qt, "$&/") + "/") + rt)), $.push(W)), 1;
|
|
16309
16309
|
rt = 0;
|
|
16310
16310
|
var _e = B === "" ? "." : B + ":";
|
|
16311
16311
|
if (gt(f)) for (var Mt = 0; Mt < f.length; Mt++) B = f[Mt], Q = _e + Ie(B, Mt), rt += te(B, $, q, Q, W);
|
|
@@ -16368,7 +16368,7 @@ var xu = /* @__PURE__ */ Lc(((t) => {
|
|
|
16368
16368
|
}) || [];
|
|
16369
16369
|
},
|
|
16370
16370
|
only: function(f) {
|
|
16371
|
-
if (!
|
|
16371
|
+
if (!N(f)) throw Error("React.Children.only expected to receive a single React element child.");
|
|
16372
16372
|
return f;
|
|
16373
16373
|
}
|
|
16374
16374
|
};
|
|
@@ -16424,7 +16424,7 @@ var xu = /* @__PURE__ */ Lc(((t) => {
|
|
|
16424
16424
|
$$typeof: p,
|
|
16425
16425
|
render: f
|
|
16426
16426
|
};
|
|
16427
|
-
}, t.isValidElement =
|
|
16427
|
+
}, t.isValidElement = N, t.lazy = function(f) {
|
|
16428
16428
|
return {
|
|
16429
16429
|
$$typeof: w,
|
|
16430
16430
|
_payload: {
|
|
@@ -16505,7 +16505,7 @@ Vc({
|
|
|
16505
16505
|
});
|
|
16506
16506
|
const $u = "sb-relative sb-overflow-hidden sb-w-1/3 sb-h-2 sb-linear-bar", Su = "sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100%-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100%-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]", Cu = "sb-h-[100%] sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100vw-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100vw-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]", Eu = "sb-fixed sb-inset-0 sb-z-[9999] sb-flex sb-items-center sb-justify-center sb-p-4 sb-overflow-auto", ku = "sb-w-fit sb-flex sb-max-h-[calc(100vh-60px)] sb-bg-background sb-shadow-2xl sb-ring-1 sb-ring-border sb-rounded-xl sb-overflow-hidden", Ru = "sb-justify-self-center sb-rotate-0", Ou = "sb-border-0 sb-bg-background !sb-m-0", Iu = "sb-border sb-rounded-2xl sb-relative sb-py-6", Au = "!sb-text-left sb-text-foreground sb-font-normal hover:!sb-bg-muted !sb-text-sm sb-rounded-md !sb-shadow-none data-[state=active]:!sb-bg-muted", Tu = "!sb-flex !sb-justify-start !sb-flex-nowrap !sb-w-full !rtg-grid-cols-2 !sb-gap-2 sb-mx-6", Lu = "!sb-w-[160px] sb-gap-4 ";
|
|
16507
16507
|
var F = /* @__PURE__ */ ((t) => (t.USER_PROFILE_CARD_HEADER_CONTAINER = "sb-user-profile-card-header-container", t.USER_PROFILE_CONTAINER = "sb-user-profile", t.USER_PROFILE_SIDEBAR = "sb-user-profile-sidebar-tabs", t.USER_PROFILE_SIDEBAR_TABS = "sb-user-profile-sidebar-tabs", t.USER_PROFILE_SIDEBAR_BURGER_MENU = "sb-user-profile-sidebar-burger-menu", t.USER_PROFILE_INPUT_LABEL = "sb-user-profile-input-label", t.USER_PROFILE_INPUT_FIELD = "sb-user-profile-input-field", t.USER_PROFILE_EDIT_FORM = "sb-user-profile-edit-form", t.USER_PROFILE_CARD_CONTAINER = "sb-user-profile-card-container", t.USER_PROFILE_EDITABLE_INPUT_FIELD = "sb-user-profile-editable-input-field", t.USER_PROFILE_DEFAULT_BUTTON = "sb-user-profile-default-button", t.USER_PROFILE_OUTLINE_BUTTON = "sb-user-profile-outline-button", t.USER_PROFILE_OTP = "sb-user-profile-otp", t.USER_PROFILE_EDIT_BUTTON = "sb-user-profile-edit-button", t))(F || {});
|
|
16508
|
-
const
|
|
16508
|
+
const Ot = {
|
|
16509
16509
|
xs: "475px",
|
|
16510
16510
|
// Tailwind's unofficial 'xs' breakpoint
|
|
16511
16511
|
sm: "640px",
|
|
@@ -16736,18 +16736,18 @@ const fa = "-", Du = (t) => {
|
|
|
16736
16736
|
const p = [];
|
|
16737
16737
|
let b = 0, y = 0, w;
|
|
16738
16738
|
for (let T = 0; T < h.length; T++) {
|
|
16739
|
-
let
|
|
16739
|
+
let A = h[T];
|
|
16740
16740
|
if (b === 0) {
|
|
16741
|
-
if (
|
|
16741
|
+
if (A === s && (i || h.slice(T, T + o) === e)) {
|
|
16742
16742
|
p.push(h.slice(y, T)), y = T + o;
|
|
16743
16743
|
continue;
|
|
16744
16744
|
}
|
|
16745
|
-
if (
|
|
16745
|
+
if (A === "/") {
|
|
16746
16746
|
w = T;
|
|
16747
16747
|
continue;
|
|
16748
16748
|
}
|
|
16749
16749
|
}
|
|
16750
|
-
|
|
16750
|
+
A === "[" ? b++ : A === "]" && b--;
|
|
16751
16751
|
}
|
|
16752
16752
|
const E = p.length === 0 ? h : h.substring(y), C = E.startsWith(sh), S = C ? E.substring(1) : E, k = w && w > y ? w - y : void 0;
|
|
16753
16753
|
return {
|
|
@@ -16799,14 +16799,14 @@ const fa = "-", Du = (t) => {
|
|
|
16799
16799
|
}
|
|
16800
16800
|
S = !1;
|
|
16801
16801
|
}
|
|
16802
|
-
const T = Hu(y).join(":"),
|
|
16802
|
+
const T = Hu(y).join(":"), A = w ? T + sh : T, z = A + k;
|
|
16803
16803
|
if (o.includes(z))
|
|
16804
16804
|
continue;
|
|
16805
16805
|
o.push(z);
|
|
16806
16806
|
const J = s(k, S);
|
|
16807
16807
|
for (let Y = 0; Y < J.length; ++Y) {
|
|
16808
|
-
const
|
|
16809
|
-
o.push(
|
|
16808
|
+
const at = J[Y];
|
|
16809
|
+
o.push(A + at);
|
|
16810
16810
|
}
|
|
16811
16811
|
h = b + (h.length > 0 ? " " + h : h);
|
|
16812
16812
|
}
|
|
@@ -16855,7 +16855,7 @@ const st = (t) => {
|
|
|
16855
16855
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
16856
16856
|
tg.test(t) && !eg.test(t)
|
|
16857
16857
|
), ah = () => !1, pg = (t) => rg.test(t), ug = (t) => ig.test(t), gg = () => {
|
|
16858
|
-
const t = st("colors"), e = st("spacing"), r = st("blur"), i = st("brightness"), s = st("borderColor"), o = st("borderRadius"), n = st("borderSpacing"), h = st("borderWidth"), p = st("contrast"), b = st("grayscale"), y = st("hueRotate"), w = st("invert"), E = st("gap"), C = st("gradientColorStops"), S = st("gradientColorStopPositions"), k = st("inset"), T = st("margin"),
|
|
16858
|
+
const t = st("colors"), e = st("spacing"), r = st("blur"), i = st("brightness"), s = st("borderColor"), o = st("borderRadius"), n = st("borderSpacing"), h = st("borderWidth"), p = st("contrast"), b = st("grayscale"), y = st("hueRotate"), w = st("invert"), E = st("gap"), C = st("gradientColorStops"), S = st("gradientColorStopPositions"), k = st("inset"), T = st("margin"), A = st("opacity"), z = st("padding"), J = st("saturate"), Y = st("scale"), at = st("sepia"), gt = st("skew"), jt = st("space"), G = st("translate"), Yt = () => ["auto", "contain", "none"], de = () => ["auto", "hidden", "clip", "visible", "scroll"], Oe = () => ["auto", H, e], N = () => [H, e], hr = () => ["", Pe, Ke], Qt = () => ["auto", gi, H], Ie = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], ce = () => ["solid", "dashed", "dotted", "double", "none"], te = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], ee = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], Xt = () => ["", "0", H], Ue = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], mt = () => [gi, H];
|
|
16859
16859
|
return {
|
|
16860
16860
|
cacheSize: 500,
|
|
16861
16861
|
separator: ":",
|
|
@@ -16866,25 +16866,25 @@ const st = (t) => {
|
|
|
16866
16866
|
brightness: mt(),
|
|
16867
16867
|
borderColor: [t],
|
|
16868
16868
|
borderRadius: ["none", "", "full", We, H],
|
|
16869
|
-
borderSpacing:
|
|
16869
|
+
borderSpacing: N(),
|
|
16870
16870
|
borderWidth: hr(),
|
|
16871
16871
|
contrast: mt(),
|
|
16872
16872
|
grayscale: Xt(),
|
|
16873
16873
|
hueRotate: mt(),
|
|
16874
16874
|
invert: Xt(),
|
|
16875
|
-
gap:
|
|
16875
|
+
gap: N(),
|
|
16876
16876
|
gradientColorStops: [t],
|
|
16877
16877
|
gradientColorStopPositions: [sg, Ke],
|
|
16878
16878
|
inset: Oe(),
|
|
16879
16879
|
margin: Oe(),
|
|
16880
16880
|
opacity: mt(),
|
|
16881
|
-
padding:
|
|
16881
|
+
padding: N(),
|
|
16882
16882
|
saturate: mt(),
|
|
16883
16883
|
scale: mt(),
|
|
16884
16884
|
sepia: Xt(),
|
|
16885
16885
|
skew: mt(),
|
|
16886
|
-
space:
|
|
16887
|
-
translate:
|
|
16886
|
+
space: N(),
|
|
16887
|
+
translate: N()
|
|
16888
16888
|
},
|
|
16889
16889
|
classGroups: {
|
|
16890
16890
|
// Layout
|
|
@@ -17637,7 +17637,7 @@ const st = (t) => {
|
|
|
17637
17637
|
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
17638
17638
|
*/
|
|
17639
17639
|
"placeholder-opacity": [{
|
|
17640
|
-
"placeholder-opacity": [
|
|
17640
|
+
"placeholder-opacity": [A]
|
|
17641
17641
|
}],
|
|
17642
17642
|
/**
|
|
17643
17643
|
* Text Alignment
|
|
@@ -17658,7 +17658,7 @@ const st = (t) => {
|
|
|
17658
17658
|
* @see https://tailwindcss.com/docs/text-opacity
|
|
17659
17659
|
*/
|
|
17660
17660
|
"text-opacity": [{
|
|
17661
|
-
"text-opacity": [
|
|
17661
|
+
"text-opacity": [A]
|
|
17662
17662
|
}],
|
|
17663
17663
|
/**
|
|
17664
17664
|
* Text Decoration
|
|
@@ -17715,7 +17715,7 @@ const st = (t) => {
|
|
|
17715
17715
|
* @see https://tailwindcss.com/docs/text-indent
|
|
17716
17716
|
*/
|
|
17717
17717
|
indent: [{
|
|
17718
|
-
indent:
|
|
17718
|
+
indent: N()
|
|
17719
17719
|
}],
|
|
17720
17720
|
/**
|
|
17721
17721
|
* Vertical Alignment
|
|
@@ -17773,7 +17773,7 @@ const st = (t) => {
|
|
|
17773
17773
|
* @see https://tailwindcss.com/docs/background-opacity
|
|
17774
17774
|
*/
|
|
17775
17775
|
"bg-opacity": [{
|
|
17776
|
-
"bg-opacity": [
|
|
17776
|
+
"bg-opacity": [A]
|
|
17777
17777
|
}],
|
|
17778
17778
|
/**
|
|
17779
17779
|
* Background Origin
|
|
@@ -18037,7 +18037,7 @@ const st = (t) => {
|
|
|
18037
18037
|
* @see https://tailwindcss.com/docs/border-opacity
|
|
18038
18038
|
*/
|
|
18039
18039
|
"border-opacity": [{
|
|
18040
|
-
"border-opacity": [
|
|
18040
|
+
"border-opacity": [A]
|
|
18041
18041
|
}],
|
|
18042
18042
|
/**
|
|
18043
18043
|
* Border Style
|
|
@@ -18075,7 +18075,7 @@ const st = (t) => {
|
|
|
18075
18075
|
* @see https://tailwindcss.com/docs/divide-opacity
|
|
18076
18076
|
*/
|
|
18077
18077
|
"divide-opacity": [{
|
|
18078
|
-
"divide-opacity": [
|
|
18078
|
+
"divide-opacity": [A]
|
|
18079
18079
|
}],
|
|
18080
18080
|
/**
|
|
18081
18081
|
* Divide Style
|
|
@@ -18206,7 +18206,7 @@ const st = (t) => {
|
|
|
18206
18206
|
* @see https://tailwindcss.com/docs/ring-opacity
|
|
18207
18207
|
*/
|
|
18208
18208
|
"ring-opacity": [{
|
|
18209
|
-
"ring-opacity": [
|
|
18209
|
+
"ring-opacity": [A]
|
|
18210
18210
|
}],
|
|
18211
18211
|
/**
|
|
18212
18212
|
* Ring Offset Width
|
|
@@ -18242,7 +18242,7 @@ const st = (t) => {
|
|
|
18242
18242
|
* @see https://tailwindcss.com/docs/opacity
|
|
18243
18243
|
*/
|
|
18244
18244
|
opacity: [{
|
|
18245
|
-
opacity: [
|
|
18245
|
+
opacity: [A]
|
|
18246
18246
|
}],
|
|
18247
18247
|
/**
|
|
18248
18248
|
* Mix Blend Mode
|
|
@@ -18328,7 +18328,7 @@ const st = (t) => {
|
|
|
18328
18328
|
* @see https://tailwindcss.com/docs/sepia
|
|
18329
18329
|
*/
|
|
18330
18330
|
sepia: [{
|
|
18331
|
-
sepia: [
|
|
18331
|
+
sepia: [at]
|
|
18332
18332
|
}],
|
|
18333
18333
|
/**
|
|
18334
18334
|
* Backdrop Filter
|
|
@@ -18385,7 +18385,7 @@ const st = (t) => {
|
|
|
18385
18385
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
18386
18386
|
*/
|
|
18387
18387
|
"backdrop-opacity": [{
|
|
18388
|
-
"backdrop-opacity": [
|
|
18388
|
+
"backdrop-opacity": [A]
|
|
18389
18389
|
}],
|
|
18390
18390
|
/**
|
|
18391
18391
|
* Backdrop Saturate
|
|
@@ -18399,7 +18399,7 @@ const st = (t) => {
|
|
|
18399
18399
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
18400
18400
|
*/
|
|
18401
18401
|
"backdrop-sepia": [{
|
|
18402
|
-
"backdrop-sepia": [
|
|
18402
|
+
"backdrop-sepia": [at]
|
|
18403
18403
|
}],
|
|
18404
18404
|
// Tables
|
|
18405
18405
|
/**
|
|
@@ -18606,126 +18606,126 @@ const st = (t) => {
|
|
|
18606
18606
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
18607
18607
|
*/
|
|
18608
18608
|
"scroll-m": [{
|
|
18609
|
-
"scroll-m":
|
|
18609
|
+
"scroll-m": N()
|
|
18610
18610
|
}],
|
|
18611
18611
|
/**
|
|
18612
18612
|
* Scroll Margin X
|
|
18613
18613
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
18614
18614
|
*/
|
|
18615
18615
|
"scroll-mx": [{
|
|
18616
|
-
"scroll-mx":
|
|
18616
|
+
"scroll-mx": N()
|
|
18617
18617
|
}],
|
|
18618
18618
|
/**
|
|
18619
18619
|
* Scroll Margin Y
|
|
18620
18620
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
18621
18621
|
*/
|
|
18622
18622
|
"scroll-my": [{
|
|
18623
|
-
"scroll-my":
|
|
18623
|
+
"scroll-my": N()
|
|
18624
18624
|
}],
|
|
18625
18625
|
/**
|
|
18626
18626
|
* Scroll Margin Start
|
|
18627
18627
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
18628
18628
|
*/
|
|
18629
18629
|
"scroll-ms": [{
|
|
18630
|
-
"scroll-ms":
|
|
18630
|
+
"scroll-ms": N()
|
|
18631
18631
|
}],
|
|
18632
18632
|
/**
|
|
18633
18633
|
* Scroll Margin End
|
|
18634
18634
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
18635
18635
|
*/
|
|
18636
18636
|
"scroll-me": [{
|
|
18637
|
-
"scroll-me":
|
|
18637
|
+
"scroll-me": N()
|
|
18638
18638
|
}],
|
|
18639
18639
|
/**
|
|
18640
18640
|
* Scroll Margin Top
|
|
18641
18641
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
18642
18642
|
*/
|
|
18643
18643
|
"scroll-mt": [{
|
|
18644
|
-
"scroll-mt":
|
|
18644
|
+
"scroll-mt": N()
|
|
18645
18645
|
}],
|
|
18646
18646
|
/**
|
|
18647
18647
|
* Scroll Margin Right
|
|
18648
18648
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
18649
18649
|
*/
|
|
18650
18650
|
"scroll-mr": [{
|
|
18651
|
-
"scroll-mr":
|
|
18651
|
+
"scroll-mr": N()
|
|
18652
18652
|
}],
|
|
18653
18653
|
/**
|
|
18654
18654
|
* Scroll Margin Bottom
|
|
18655
18655
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
18656
18656
|
*/
|
|
18657
18657
|
"scroll-mb": [{
|
|
18658
|
-
"scroll-mb":
|
|
18658
|
+
"scroll-mb": N()
|
|
18659
18659
|
}],
|
|
18660
18660
|
/**
|
|
18661
18661
|
* Scroll Margin Left
|
|
18662
18662
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
18663
18663
|
*/
|
|
18664
18664
|
"scroll-ml": [{
|
|
18665
|
-
"scroll-ml":
|
|
18665
|
+
"scroll-ml": N()
|
|
18666
18666
|
}],
|
|
18667
18667
|
/**
|
|
18668
18668
|
* Scroll Padding
|
|
18669
18669
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
18670
18670
|
*/
|
|
18671
18671
|
"scroll-p": [{
|
|
18672
|
-
"scroll-p":
|
|
18672
|
+
"scroll-p": N()
|
|
18673
18673
|
}],
|
|
18674
18674
|
/**
|
|
18675
18675
|
* Scroll Padding X
|
|
18676
18676
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
18677
18677
|
*/
|
|
18678
18678
|
"scroll-px": [{
|
|
18679
|
-
"scroll-px":
|
|
18679
|
+
"scroll-px": N()
|
|
18680
18680
|
}],
|
|
18681
18681
|
/**
|
|
18682
18682
|
* Scroll Padding Y
|
|
18683
18683
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
18684
18684
|
*/
|
|
18685
18685
|
"scroll-py": [{
|
|
18686
|
-
"scroll-py":
|
|
18686
|
+
"scroll-py": N()
|
|
18687
18687
|
}],
|
|
18688
18688
|
/**
|
|
18689
18689
|
* Scroll Padding Start
|
|
18690
18690
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
18691
18691
|
*/
|
|
18692
18692
|
"scroll-ps": [{
|
|
18693
|
-
"scroll-ps":
|
|
18693
|
+
"scroll-ps": N()
|
|
18694
18694
|
}],
|
|
18695
18695
|
/**
|
|
18696
18696
|
* Scroll Padding End
|
|
18697
18697
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
18698
18698
|
*/
|
|
18699
18699
|
"scroll-pe": [{
|
|
18700
|
-
"scroll-pe":
|
|
18700
|
+
"scroll-pe": N()
|
|
18701
18701
|
}],
|
|
18702
18702
|
/**
|
|
18703
18703
|
* Scroll Padding Top
|
|
18704
18704
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
18705
18705
|
*/
|
|
18706
18706
|
"scroll-pt": [{
|
|
18707
|
-
"scroll-pt":
|
|
18707
|
+
"scroll-pt": N()
|
|
18708
18708
|
}],
|
|
18709
18709
|
/**
|
|
18710
18710
|
* Scroll Padding Right
|
|
18711
18711
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
18712
18712
|
*/
|
|
18713
18713
|
"scroll-pr": [{
|
|
18714
|
-
"scroll-pr":
|
|
18714
|
+
"scroll-pr": N()
|
|
18715
18715
|
}],
|
|
18716
18716
|
/**
|
|
18717
18717
|
* Scroll Padding Bottom
|
|
18718
18718
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
18719
18719
|
*/
|
|
18720
18720
|
"scroll-pb": [{
|
|
18721
|
-
"scroll-pb":
|
|
18721
|
+
"scroll-pb": N()
|
|
18722
18722
|
}],
|
|
18723
18723
|
/**
|
|
18724
18724
|
* Scroll Padding Left
|
|
18725
18725
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
18726
18726
|
*/
|
|
18727
18727
|
"scroll-pl": [{
|
|
18728
|
-
"scroll-pl":
|
|
18728
|
+
"scroll-pl": N()
|
|
18729
18729
|
}],
|
|
18730
18730
|
/**
|
|
18731
18731
|
* Scroll Snap Align
|
|
@@ -18907,12 +18907,12 @@ function Dt(t) {
|
|
|
18907
18907
|
const e = {}, r = {};
|
|
18908
18908
|
for (const i in t) {
|
|
18909
18909
|
const s = t[i];
|
|
18910
|
-
s != null && (i in
|
|
18910
|
+
s != null && (i in Ot && typeof s == "object" ? r[i] = s : e[i] = s);
|
|
18911
18911
|
}
|
|
18912
18912
|
return { base: e, responsive: r };
|
|
18913
18913
|
}
|
|
18914
18914
|
function vg(t) {
|
|
18915
|
-
return { ...
|
|
18915
|
+
return { ...Ot, ...t ?? {} };
|
|
18916
18916
|
}
|
|
18917
18917
|
function Ut(t, e, r) {
|
|
18918
18918
|
const i = vg(r);
|
|
@@ -19042,7 +19042,7 @@ let ro = class extends v {
|
|
|
19042
19042
|
return Ut(
|
|
19043
19043
|
this.element.id,
|
|
19044
19044
|
i,
|
|
19045
|
-
((o = (s = this.component.customizations) == null ? void 0 : s.config) == null ? void 0 : o.breakpoints) ??
|
|
19045
|
+
((o = (s = this.component.customizations) == null ? void 0 : s.config) == null ? void 0 : o.breakpoints) ?? Ot
|
|
19046
19046
|
), d`
|
|
19047
19047
|
<p id=${this.element.id} class=${t} style=${R(r)}>
|
|
19048
19048
|
${this.element.properties.content}
|
|
@@ -19159,7 +19159,7 @@ let Zi = class extends v {
|
|
|
19159
19159
|
return Ut(
|
|
19160
19160
|
this.element.id,
|
|
19161
19161
|
w,
|
|
19162
|
-
((C = (E = this.component.customizations) == null ? void 0 : E.config) == null ? void 0 : C.breakpoints) ??
|
|
19162
|
+
((C = (E = this.component.customizations) == null ? void 0 : E.config) == null ? void 0 : C.breakpoints) ?? Ot
|
|
19163
19163
|
), d`
|
|
19164
19164
|
<rtg-button
|
|
19165
19165
|
variant=${t}
|
|
@@ -19239,7 +19239,7 @@ let so = class extends v {
|
|
|
19239
19239
|
return Ut(
|
|
19240
19240
|
this.element.id,
|
|
19241
19241
|
i,
|
|
19242
|
-
((h = (n = this.component.customizations) == null ? void 0 : n.config) == null ? void 0 : h.breakpoints) ??
|
|
19242
|
+
((h = (n = this.component.customizations) == null ? void 0 : n.config) == null ? void 0 : h.breakpoints) ?? Ot
|
|
19243
19243
|
), io`
|
|
19244
19244
|
<rtg-field-separator
|
|
19245
19245
|
id=${this.element.id}
|
|
@@ -19358,7 +19358,7 @@ let oo = class extends v {
|
|
|
19358
19358
|
return Ut(
|
|
19359
19359
|
this.element.id,
|
|
19360
19360
|
i,
|
|
19361
|
-
((o = (s = this.component.customizations) == null ? void 0 : s.config) == null ? void 0 : o.breakpoints) ??
|
|
19361
|
+
((o = (s = this.component.customizations) == null ? void 0 : s.config) == null ? void 0 : o.breakpoints) ?? Ot
|
|
19362
19362
|
), d`
|
|
19363
19363
|
<rtg-field
|
|
19364
19364
|
orientation="horizontal"
|
|
@@ -19619,7 +19619,7 @@ let ao = class extends v {
|
|
|
19619
19619
|
Ut(
|
|
19620
19620
|
this.element.id,
|
|
19621
19621
|
i,
|
|
19622
|
-
((b = (p = this.component.customizations) == null ? void 0 : p.config) == null ? void 0 : b.breakpoints) ??
|
|
19622
|
+
((b = (p = this.component.customizations) == null ? void 0 : p.config) == null ? void 0 : b.breakpoints) ?? Ot
|
|
19623
19623
|
);
|
|
19624
19624
|
const s = this.element.properties.variant || "digits_only";
|
|
19625
19625
|
return io`
|
|
@@ -19690,7 +19690,7 @@ let lo = class extends v {
|
|
|
19690
19690
|
return Ut(
|
|
19691
19691
|
this.element.id,
|
|
19692
19692
|
i,
|
|
19693
|
-
((p = (h = this.component.customizations) == null ? void 0 : h.config) == null ? void 0 : p.breakpoints) ??
|
|
19693
|
+
((p = (h = this.component.customizations) == null ? void 0 : h.config) == null ? void 0 : p.breakpoints) ?? Ot
|
|
19694
19694
|
), d`
|
|
19695
19695
|
<rtg-alert
|
|
19696
19696
|
variant=${this.element.properties.variant ?? "destructive"}
|
|
@@ -19751,7 +19751,7 @@ let co = class extends v {
|
|
|
19751
19751
|
return Ut(
|
|
19752
19752
|
this.element.id,
|
|
19753
19753
|
i,
|
|
19754
|
-
((o = (s = this.component.customizations) == null ? void 0 : s.config) == null ? void 0 : o.breakpoints) ??
|
|
19754
|
+
((o = (s = this.component.customizations) == null ? void 0 : s.config) == null ? void 0 : o.breakpoints) ?? Ot
|
|
19755
19755
|
), d`
|
|
19756
19756
|
<div id=${this.element.id} class=${t} style=${R(r)}>
|
|
19757
19757
|
${ca(xg(this.element.properties.content))}
|
|
@@ -19797,7 +19797,7 @@ let ho = class extends v {
|
|
|
19797
19797
|
return Ut(
|
|
19798
19798
|
this.element.id,
|
|
19799
19799
|
o,
|
|
19800
|
-
((h = (n = this.component.customizations) == null ? void 0 : n.config) == null ? void 0 : h.breakpoints) ??
|
|
19800
|
+
((h = (n = this.component.customizations) == null ? void 0 : n.config) == null ? void 0 : h.breakpoints) ?? Ot
|
|
19801
19801
|
), d`
|
|
19802
19802
|
<div
|
|
19803
19803
|
id=${this.element.id}
|
|
@@ -19868,7 +19868,7 @@ let Ji = class extends v {
|
|
|
19868
19868
|
return Ut(
|
|
19869
19869
|
this.element.id,
|
|
19870
19870
|
i,
|
|
19871
|
-
((p = (h = this.component.customizations) == null ? void 0 : h.config) == null ? void 0 : p.breakpoints) ??
|
|
19871
|
+
((p = (h = this.component.customizations) == null ? void 0 : h.config) == null ? void 0 : p.breakpoints) ?? Ot
|
|
19872
19872
|
), d`
|
|
19873
19873
|
<div id=${this.element.id} class=${t} style=${R(r)}>
|
|
19874
19874
|
<span>${this.renderContent()}</span>
|
|
@@ -19910,7 +19910,7 @@ let po = class extends v {
|
|
|
19910
19910
|
return Ut(
|
|
19911
19911
|
this.element.id,
|
|
19912
19912
|
i,
|
|
19913
|
-
((p = (h = this.component.customizations) == null ? void 0 : h.config) == null ? void 0 : p.breakpoints) ??
|
|
19913
|
+
((p = (h = this.component.customizations) == null ? void 0 : h.config) == null ? void 0 : p.breakpoints) ?? Ot
|
|
19914
19914
|
), d`
|
|
19915
19915
|
<sb-spinner
|
|
19916
19916
|
size="20"
|
|
@@ -20088,7 +20088,7 @@ let uo = class extends v {
|
|
|
20088
20088
|
return Ut(
|
|
20089
20089
|
this.element.id,
|
|
20090
20090
|
i,
|
|
20091
|
-
((h = (n = this.component.customizations) == null ? void 0 : n.config) == null ? void 0 : h.breakpoints) ??
|
|
20091
|
+
((h = (n = this.component.customizations) == null ? void 0 : n.config) == null ? void 0 : h.breakpoints) ?? Ot
|
|
20092
20092
|
), d`
|
|
20093
20093
|
<div id=${this.element.id} class=${t} style=${R(r)}>
|
|
20094
20094
|
${this.renderChildren()}
|
|
@@ -20148,7 +20148,7 @@ let Qi = class extends v {
|
|
|
20148
20148
|
return Ut(
|
|
20149
20149
|
this.element.id,
|
|
20150
20150
|
s,
|
|
20151
|
-
((n = (o = this.component.customizations) == null ? void 0 : o.config) == null ? void 0 : n.breakpoints) ??
|
|
20151
|
+
((n = (o = this.component.customizations) == null ? void 0 : o.config) == null ? void 0 : n.breakpoints) ?? Ot
|
|
20152
20152
|
), d`
|
|
20153
20153
|
<img class=${t} src=${r} style=${R(i)} />
|
|
20154
20154
|
`;
|
|
@@ -20260,7 +20260,7 @@ let ts = class extends v {
|
|
|
20260
20260
|
Ut(
|
|
20261
20261
|
this.element.id,
|
|
20262
20262
|
i,
|
|
20263
|
-
((b = (p = this.component.customizations) == null ? void 0 : p.config) == null ? void 0 : b.breakpoints) ??
|
|
20263
|
+
((b = (p = this.component.customizations) == null ? void 0 : p.config) == null ? void 0 : b.breakpoints) ?? Ot
|
|
20264
20264
|
);
|
|
20265
20265
|
const s = va(
|
|
20266
20266
|
this.element.properties.image_url,
|
|
@@ -20407,7 +20407,7 @@ let mo = class extends v {
|
|
|
20407
20407
|
Ut(
|
|
20408
20408
|
this.element.id,
|
|
20409
20409
|
i,
|
|
20410
|
-
((w = (y = this.component.customizations) == null ? void 0 : y.config) == null ? void 0 : w.breakpoints) ??
|
|
20410
|
+
((w = (y = this.component.customizations) == null ? void 0 : y.config) == null ? void 0 : w.breakpoints) ?? Ot
|
|
20411
20411
|
);
|
|
20412
20412
|
const { class: s, style: o } = O(
|
|
20413
20413
|
"",
|
|
@@ -20477,7 +20477,7 @@ let bo = class extends v {
|
|
|
20477
20477
|
return Ut(
|
|
20478
20478
|
this.element.id,
|
|
20479
20479
|
i,
|
|
20480
|
-
((p = (h = this.component.customizations) == null ? void 0 : h.config) == null ? void 0 : p.breakpoints) ??
|
|
20480
|
+
((p = (h = this.component.customizations) == null ? void 0 : h.config) == null ? void 0 : p.breakpoints) ?? Ot
|
|
20481
20481
|
), d`
|
|
20482
20482
|
<rtg-label
|
|
20483
20483
|
for=${this.element.properties.for ?? g}
|
|
@@ -20627,7 +20627,7 @@ var bm = Object.defineProperty, fm = Object.getOwnPropertyDescriptor, Si = (t, e
|
|
|
20627
20627
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
20628
20628
|
return i && s && bm(e, r, s), s;
|
|
20629
20629
|
};
|
|
20630
|
-
let
|
|
20630
|
+
let St = class extends v {
|
|
20631
20631
|
constructor() {
|
|
20632
20632
|
super(...arguments), this.seed = Nt(), this.variant = "default", this.content = { description: "Something went wrong." };
|
|
20633
20633
|
}
|
|
@@ -20649,28 +20649,28 @@ let $t = class extends v {
|
|
|
20649
20649
|
* derived from the component's part name and `seed`.
|
|
20650
20650
|
*/
|
|
20651
20651
|
get rootId() {
|
|
20652
|
-
return this.childId ?? `sb-${
|
|
20652
|
+
return this.childId ?? `sb-${St.parts.root}-${this.seed}`;
|
|
20653
20653
|
}
|
|
20654
20654
|
/**
|
|
20655
20655
|
* The `id` of the spinner element, derived from `rootId` with the icon part
|
|
20656
20656
|
* name appended.
|
|
20657
20657
|
*/
|
|
20658
20658
|
get iconId() {
|
|
20659
|
-
return `${this.rootId}-${
|
|
20659
|
+
return `${this.rootId}-${St._ICON}`;
|
|
20660
20660
|
}
|
|
20661
20661
|
/**
|
|
20662
20662
|
* The `id` of the spinner element, derived from `rootId` with the title part
|
|
20663
20663
|
* name appended.
|
|
20664
20664
|
*/
|
|
20665
20665
|
get titleId() {
|
|
20666
|
-
return `${this.rootId}-${
|
|
20666
|
+
return `${this.rootId}-${St._TITLE}`;
|
|
20667
20667
|
}
|
|
20668
20668
|
/**
|
|
20669
20669
|
* The `id` of the spinner element, derived from `rootId` with the description
|
|
20670
20670
|
* part name appended.
|
|
20671
20671
|
*/
|
|
20672
20672
|
get descriptionId() {
|
|
20673
|
-
return `${this.rootId}-${
|
|
20673
|
+
return `${this.rootId}-${St._DESCRIPTION}`;
|
|
20674
20674
|
}
|
|
20675
20675
|
/**
|
|
20676
20676
|
* Uses the `variant` prop to derive the `variant` prop passed to `rtg-alert`.
|
|
@@ -20686,14 +20686,14 @@ let $t = class extends v {
|
|
|
20686
20686
|
return d`
|
|
20687
20687
|
<rtg-alert
|
|
20688
20688
|
id="${this.rootId}"
|
|
20689
|
-
part="${
|
|
20689
|
+
part="${St.parts.root}"
|
|
20690
20690
|
variant="${this._variant}"
|
|
20691
20691
|
>
|
|
20692
|
-
${t ? t(this.iconId,
|
|
20692
|
+
${t ? t(this.iconId, St.parts.icon) : g}
|
|
20693
20693
|
${e ? d`
|
|
20694
20694
|
<rtg-alert-title
|
|
20695
20695
|
id="${this.titleId}"
|
|
20696
|
-
part="${
|
|
20696
|
+
part="${St.parts.title}"
|
|
20697
20697
|
>
|
|
20698
20698
|
${e}
|
|
20699
20699
|
</rtg-alert-title>
|
|
@@ -20701,7 +20701,7 @@ let $t = class extends v {
|
|
|
20701
20701
|
${r ? d`
|
|
20702
20702
|
<rtg-alert-description
|
|
20703
20703
|
id="${this.descriptionId}"
|
|
20704
|
-
part="${
|
|
20704
|
+
part="${St.parts.description}"
|
|
20705
20705
|
>
|
|
20706
20706
|
${r}
|
|
20707
20707
|
</rtg-alert-description>
|
|
@@ -20710,47 +20710,47 @@ let $t = class extends v {
|
|
|
20710
20710
|
`;
|
|
20711
20711
|
}
|
|
20712
20712
|
};
|
|
20713
|
-
|
|
20714
|
-
|
|
20715
|
-
|
|
20716
|
-
|
|
20713
|
+
St._ROOT = "error";
|
|
20714
|
+
St._ICON = "icon";
|
|
20715
|
+
St._TITLE = "title";
|
|
20716
|
+
St._DESCRIPTION = "description";
|
|
20717
20717
|
Si([
|
|
20718
20718
|
a({ type: String })
|
|
20719
|
-
],
|
|
20719
|
+
], St.prototype, "seed", 2);
|
|
20720
20720
|
Si([
|
|
20721
20721
|
a({ attribute: "child-id", type: String })
|
|
20722
|
-
],
|
|
20722
|
+
], St.prototype, "childId", 2);
|
|
20723
20723
|
Si([
|
|
20724
20724
|
a({ type: String })
|
|
20725
|
-
],
|
|
20725
|
+
], St.prototype, "variant", 2);
|
|
20726
20726
|
Si([
|
|
20727
20727
|
a({ type: Object })
|
|
20728
|
-
],
|
|
20728
|
+
], St.prototype, "content", 2);
|
|
20729
20729
|
Si([
|
|
20730
20730
|
a({ type: String })
|
|
20731
|
-
],
|
|
20732
|
-
|
|
20731
|
+
], St.prototype, "icon", 2);
|
|
20732
|
+
St = Si([
|
|
20733
20733
|
u("sb-error")
|
|
20734
|
-
],
|
|
20735
|
-
var vm = Object.defineProperty, ym = Object.getOwnPropertyDescriptor,
|
|
20734
|
+
], St);
|
|
20735
|
+
var vm = Object.defineProperty, ym = Object.getOwnPropertyDescriptor, nt = (t, e, r, i) => {
|
|
20736
20736
|
for (var s = i > 1 ? void 0 : i ? ym(e, r) : e, o = t.length - 1, n; o >= 0; o--)
|
|
20737
20737
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
20738
20738
|
return i && s && vm(e, r, s), s;
|
|
20739
20739
|
};
|
|
20740
|
-
let
|
|
20740
|
+
let I = class extends v {
|
|
20741
20741
|
constructor() {
|
|
20742
|
-
super(...arguments), this.seed = Nt(), this.name = "password", this.variant = "
|
|
20742
|
+
super(...arguments), this.seed = Nt(), this.name = "password", this.variant = "toggle", this.content = "split", this.label = "Password", this.rules = [
|
|
20743
20743
|
{ name: "uppercase", error: "Must contain an uppercase letter." },
|
|
20744
20744
|
{ name: "lowercase", error: "Must contain a lowercase letter." },
|
|
20745
20745
|
{ name: "number", error: "Must contain a number." },
|
|
20746
20746
|
{ name: "special", error: "Must contain a special character." }
|
|
20747
|
-
], this.requiredError = "Password is a required field.", this.formatError = "Enter a valid password.", this._invalid = !1, this._errors = [], this._value = "", this._form = null, this._handleInput = (t) => {
|
|
20747
|
+
], this.validation = "default", this.requiredError = "Password is a required field.", this.formatError = "Enter a valid password.", this._invalid = !1, this._errors = [], this._value = "", this._form = null, this._handleInput = (t) => {
|
|
20748
20748
|
const e = t.target;
|
|
20749
|
-
e.matches(`[part="${
|
|
20749
|
+
e.matches(`[part="${I.parts.input}"] input`) && (this._value = e.value);
|
|
20750
20750
|
}, this._handleFormSubmit = (t) => {
|
|
20751
20751
|
this._validate() || t.preventDefault();
|
|
20752
20752
|
}, this._handleFormReset = () => {
|
|
20753
|
-
const t = `[part="${
|
|
20753
|
+
const t = `[part="${I.parts.input}"]`, e = this.variant === "toggle" ? `rtg-password-input${t}` : `rtg-input${t}`, r = this.querySelector(e);
|
|
20754
20754
|
r && (r.value = ""), this._value = "", this._invalid = !1, this._errors = [];
|
|
20755
20755
|
};
|
|
20756
20756
|
}
|
|
@@ -20778,49 +20778,49 @@ let A = class extends v {
|
|
|
20778
20778
|
* derived from the component's part name and `seed`.
|
|
20779
20779
|
*/
|
|
20780
20780
|
get rootId() {
|
|
20781
|
-
return this.childId ?? `sb-${
|
|
20781
|
+
return this.childId ?? `sb-${I.parts.root}-${this.seed}`;
|
|
20782
20782
|
}
|
|
20783
20783
|
/**
|
|
20784
20784
|
* The `id` of the field content element, derived from `rootId` with the
|
|
20785
20785
|
* content part name appended.
|
|
20786
20786
|
*/
|
|
20787
20787
|
get contentId() {
|
|
20788
|
-
return `${this.rootId}-${
|
|
20788
|
+
return `${this.rootId}-${I._CONTENT}`;
|
|
20789
20789
|
}
|
|
20790
20790
|
/**
|
|
20791
20791
|
* The `id` of the field label element, derived from `rootId` with the label
|
|
20792
20792
|
* part name appended.
|
|
20793
20793
|
*/
|
|
20794
20794
|
get labelId() {
|
|
20795
|
-
return `${this.rootId}-${
|
|
20795
|
+
return `${this.rootId}-${I._LABEL}`;
|
|
20796
20796
|
}
|
|
20797
20797
|
/**
|
|
20798
20798
|
* The `id` of the field description element, derived from `rootId` with the
|
|
20799
20799
|
* description part name appended.
|
|
20800
20800
|
*/
|
|
20801
20801
|
get descriptionId() {
|
|
20802
|
-
return `${this.rootId}-${
|
|
20802
|
+
return `${this.rootId}-${I._DESCRIPTION}`;
|
|
20803
20803
|
}
|
|
20804
20804
|
/**
|
|
20805
20805
|
* The `id` of the mark element, derived from `rootId` with the mark part name
|
|
20806
20806
|
* appended.
|
|
20807
20807
|
*/
|
|
20808
20808
|
get markId() {
|
|
20809
|
-
return `${this.rootId}-${
|
|
20809
|
+
return `${this.rootId}-${I._MARK}`;
|
|
20810
20810
|
}
|
|
20811
20811
|
/**
|
|
20812
20812
|
* The `id` of the input element, equal to `fieldId` when provided, otherwise
|
|
20813
20813
|
* derived from `rootId` with the input part name appended.
|
|
20814
20814
|
*/
|
|
20815
20815
|
get inputId() {
|
|
20816
|
-
return this.fieldId ?? `${this.rootId}-${
|
|
20816
|
+
return this.fieldId ?? `${this.rootId}-${I._INPUT}`;
|
|
20817
20817
|
}
|
|
20818
20818
|
/**
|
|
20819
20819
|
* The `id` of the field error element, derived from `rootId` with the error
|
|
20820
20820
|
* part name appended.
|
|
20821
20821
|
*/
|
|
20822
20822
|
get errorId() {
|
|
20823
|
-
return `${this.rootId}-${
|
|
20823
|
+
return `${this.rootId}-${I._ERROR}`;
|
|
20824
20824
|
}
|
|
20825
20825
|
/**
|
|
20826
20826
|
* Returns sanitized `minlength` and `maxlength` values, filtering out
|
|
@@ -20859,7 +20859,7 @@ let A = class extends v {
|
|
|
20859
20859
|
* Defines and dispatches the validate event.
|
|
20860
20860
|
*/
|
|
20861
20861
|
_dispatchValidate(t, e, r, i) {
|
|
20862
|
-
const s = this.inputId, o = this.rootId, n = this.name, h = new CustomEvent(
|
|
20862
|
+
const s = this.inputId, o = this.rootId, n = this.name, h = new CustomEvent(I.validateEventName, {
|
|
20863
20863
|
detail: { id: s, parentId: o, name: n, value: r, valid: t, type: e, message: i },
|
|
20864
20864
|
bubbles: !0,
|
|
20865
20865
|
composed: !0
|
|
@@ -20867,66 +20867,50 @@ let A = class extends v {
|
|
|
20867
20867
|
this.dispatchEvent(h);
|
|
20868
20868
|
}
|
|
20869
20869
|
/**
|
|
20870
|
-
*
|
|
20871
|
-
* fields and non-empty required fields, otherwise dispatching and displaying
|
|
20872
|
-
* the required error.
|
|
20870
|
+
* Clears the invalid state and error, and dispatches a valid validate event.
|
|
20873
20871
|
*/
|
|
20874
|
-
|
|
20875
|
-
|
|
20876
|
-
const e = this.requiredError;
|
|
20877
|
-
return this._invalid = !0, this._errors = [e], this._dispatchValidate(!1, "required", t, e), !1;
|
|
20878
|
-
}
|
|
20879
|
-
/**
|
|
20880
|
-
* Handles the minlength condition validation, determining if a valid
|
|
20881
|
-
* `minlength` prop was provided, dispatching and displaying the minlength
|
|
20882
|
-
* error if the value is shorter than accepted.
|
|
20883
|
-
*/
|
|
20884
|
-
_validateMinlength(t) {
|
|
20885
|
-
const { minlength: e } = this._lengths;
|
|
20886
|
-
if (!e || t.length >= e) return !0;
|
|
20887
|
-
const r = this.minlengthError ?? `Password must be at least ${e} characters.`;
|
|
20888
|
-
return this._invalid = !0, this._errors = [r], this._dispatchValidate(!1, "minlength", t, r), !1;
|
|
20889
|
-
}
|
|
20890
|
-
/**
|
|
20891
|
-
* Handles the maxlength condition validation, determining if a valid
|
|
20892
|
-
* `maxlength` prop was provided, dispatching and displaying the maxlength
|
|
20893
|
-
* error if the value is longer than accepted.
|
|
20894
|
-
*/
|
|
20895
|
-
_validateMaxlength(t) {
|
|
20896
|
-
const { maxlength: e } = this._lengths;
|
|
20897
|
-
if (!e || t.length <= e) return !0;
|
|
20898
|
-
const r = this.maxlengthError ?? `Password must be at most ${e} characters.`;
|
|
20899
|
-
return this._invalid = !0, this._errors = [r], this._dispatchValidate(!1, "maxlength", t, r), !1;
|
|
20872
|
+
_handleValidateSuccess(t, e = "Valid password.") {
|
|
20873
|
+
this._invalid = !1, this._errors = [], this._dispatchValidate(!0, "success", t, e);
|
|
20900
20874
|
}
|
|
20901
20875
|
/**
|
|
20902
|
-
*
|
|
20903
|
-
* `rules` patterns, and dispatching and displaying the relevant or fallback
|
|
20904
|
-
* format error(s) for an invalid value.
|
|
20876
|
+
* Sets the invalid state and error, and dispatches an invalid validate event.
|
|
20905
20877
|
*/
|
|
20906
|
-
|
|
20907
|
-
|
|
20908
|
-
const r = [];
|
|
20909
|
-
for (const s of this.rules)
|
|
20910
|
-
(s.name ? A._PATTERNS[s.name] : new RegExp(s.pattern)).test(t) || (e = !1, s.error && r.push(s.error));
|
|
20911
|
-
if (e) return !0;
|
|
20912
|
-
const i = r.length ? r.join(" ") : this.formatError;
|
|
20913
|
-
return this._invalid = !0, this._errors = r.length ? r : [this.formatError], this._dispatchValidate(!1, "format", t, i), !1;
|
|
20878
|
+
_handleValidateError(t, e, r = "Invalid password.", i = []) {
|
|
20879
|
+
i.length || i.push(r), this._invalid = !0, this._errors = i, this._dispatchValidate(!1, t, e, i.join(" "));
|
|
20914
20880
|
}
|
|
20915
20881
|
/**
|
|
20916
|
-
*
|
|
20917
|
-
* validate event,
|
|
20918
|
-
*/
|
|
20919
|
-
_doValidateSuccess(t, e) {
|
|
20920
|
-
this._invalid = !1, this._errors = [], this._dispatchValidate(!0, "success", t, e);
|
|
20921
|
-
}
|
|
20922
|
-
/**
|
|
20923
|
-
* Handles validation and dispatches the success event if the required,
|
|
20924
|
-
* length, and format conditions are met.
|
|
20882
|
+
* Validates the current value against the applicable rules in sequence,
|
|
20883
|
+
* dispatches the validate event, and returns `true` if the value passes.
|
|
20925
20884
|
*/
|
|
20926
20885
|
_validate() {
|
|
20927
20886
|
const t = this._value;
|
|
20928
|
-
|
|
20929
|
-
|
|
20887
|
+
if (this.required && !t)
|
|
20888
|
+
return this._handleValidateError("required", t, this.requiredError), !1;
|
|
20889
|
+
if (!t || this.validation === "simple")
|
|
20890
|
+
return this._handleValidateSuccess(t), !0;
|
|
20891
|
+
const { minlength: e, maxlength: r } = this._lengths;
|
|
20892
|
+
if (e && t.length < e)
|
|
20893
|
+
return this._handleValidateError(
|
|
20894
|
+
"minlength",
|
|
20895
|
+
t,
|
|
20896
|
+
this.minlengthError ?? `Password must be at least ${e} characters.`
|
|
20897
|
+
), !1;
|
|
20898
|
+
if (r && t.length > r)
|
|
20899
|
+
return this._handleValidateError(
|
|
20900
|
+
"maxlength",
|
|
20901
|
+
t,
|
|
20902
|
+
this.maxlengthError ?? `Password must be at most ${r} characters.`
|
|
20903
|
+
), !1;
|
|
20904
|
+
let i = !0;
|
|
20905
|
+
const s = [];
|
|
20906
|
+
for (const o of this.rules)
|
|
20907
|
+
(o.name ? I._PATTERNS[o.name] : new RegExp(o.pattern)).test(t) || (i = !1, o.error && s.push(o.error));
|
|
20908
|
+
return i ? (this._handleValidateSuccess(t), !0) : (this._handleValidateError(
|
|
20909
|
+
"format",
|
|
20910
|
+
t,
|
|
20911
|
+
s.length ? void 0 : this.formatError,
|
|
20912
|
+
s
|
|
20913
|
+
), !1);
|
|
20930
20914
|
}
|
|
20931
20915
|
/**
|
|
20932
20916
|
* Conditionally returns the mark template for the field label. When `caret`
|
|
@@ -20939,7 +20923,7 @@ let A = class extends v {
|
|
|
20939
20923
|
return !this.mark && (!this.caret || !this.required) ? g : d`
|
|
20940
20924
|
<span
|
|
20941
20925
|
id="${this.markId}"
|
|
20942
|
-
part="${
|
|
20926
|
+
part="${I.parts.mark}"
|
|
20943
20927
|
data-content="${this.mark ? "text" : "caret"}"
|
|
20944
20928
|
>
|
|
20945
20929
|
${this.mark ? this.mark : d`*`}
|
|
@@ -20953,7 +20937,7 @@ let A = class extends v {
|
|
|
20953
20937
|
return d`
|
|
20954
20938
|
<rtg-field-label
|
|
20955
20939
|
id="${this.labelId}"
|
|
20956
|
-
part="${
|
|
20940
|
+
part="${I.parts.label}"
|
|
20957
20941
|
for="${this.inputId}"
|
|
20958
20942
|
>
|
|
20959
20943
|
${this.label} ${this._renderMark()}
|
|
@@ -20967,7 +20951,7 @@ let A = class extends v {
|
|
|
20967
20951
|
return this.description ? d`
|
|
20968
20952
|
<rtg-field-description
|
|
20969
20953
|
id="${this.descriptionId}"
|
|
20970
|
-
part="${
|
|
20954
|
+
part="${I.parts.description}"
|
|
20971
20955
|
>
|
|
20972
20956
|
${this.description}
|
|
20973
20957
|
</rtg-field-description>
|
|
@@ -20983,7 +20967,7 @@ let A = class extends v {
|
|
|
20983
20967
|
return d`
|
|
20984
20968
|
<rtg-field-error
|
|
20985
20969
|
id="${this.errorId}"
|
|
20986
|
-
part="${
|
|
20970
|
+
part="${I.parts.error}"
|
|
20987
20971
|
.errors=${t}
|
|
20988
20972
|
></rtg-field-error>
|
|
20989
20973
|
`;
|
|
@@ -20993,7 +20977,7 @@ let A = class extends v {
|
|
|
20993
20977
|
return d`
|
|
20994
20978
|
<rtg-field
|
|
20995
20979
|
id="${this.rootId}"
|
|
20996
|
-
part="${
|
|
20980
|
+
part="${I.parts.root}"
|
|
20997
20981
|
data-variant="${this.variant}"
|
|
20998
20982
|
data-content="${this.content}"
|
|
20999
20983
|
?disabled="${this.disabled}"
|
|
@@ -21002,7 +20986,7 @@ let A = class extends v {
|
|
|
21002
20986
|
${this.content === "group" ? d`
|
|
21003
20987
|
<rtg-field-content
|
|
21004
20988
|
id="${this.contentId}"
|
|
21005
|
-
part="${
|
|
20989
|
+
part="${I.parts.content}"
|
|
21006
20990
|
>
|
|
21007
20991
|
${this._renderLabel()} ${this._renderDescription()}
|
|
21008
20992
|
</rtg-field-content>
|
|
@@ -21010,7 +20994,7 @@ let A = class extends v {
|
|
|
21010
20994
|
${this.variant === "toggle" ? d`
|
|
21011
20995
|
<rtg-password-input
|
|
21012
20996
|
id="${this.inputId}"
|
|
21013
|
-
part="${
|
|
20997
|
+
part="${I.parts.input}"
|
|
21014
20998
|
name="${this.name}"
|
|
21015
20999
|
placeholder="${this.placeholder ?? g}"
|
|
21016
21000
|
minlength="${t ?? g}"
|
|
@@ -21022,7 +21006,7 @@ let A = class extends v {
|
|
|
21022
21006
|
` : d`
|
|
21023
21007
|
<rtg-input
|
|
21024
21008
|
id="${this.inputId}"
|
|
21025
|
-
part="${
|
|
21009
|
+
part="${I.parts.input}"
|
|
21026
21010
|
type="password"
|
|
21027
21011
|
name="${this.name}"
|
|
21028
21012
|
placeholder="${this.placeholder ?? g}"
|
|
@@ -21039,92 +21023,95 @@ let A = class extends v {
|
|
|
21039
21023
|
`;
|
|
21040
21024
|
}
|
|
21041
21025
|
};
|
|
21042
|
-
|
|
21043
|
-
|
|
21044
|
-
|
|
21045
|
-
|
|
21046
|
-
|
|
21047
|
-
|
|
21048
|
-
|
|
21049
|
-
|
|
21050
|
-
|
|
21026
|
+
I._ROOT = "password-field";
|
|
21027
|
+
I._CONTENT = "content";
|
|
21028
|
+
I._LABEL = "label";
|
|
21029
|
+
I._MARK = "mark";
|
|
21030
|
+
I._DESCRIPTION = "description";
|
|
21031
|
+
I._INPUT = "input";
|
|
21032
|
+
I._ERROR = "error";
|
|
21033
|
+
I.TAG = `sb-${I._ROOT}`;
|
|
21034
|
+
I._PATTERNS = {
|
|
21051
21035
|
uppercase: /[A-Z]/,
|
|
21052
21036
|
lowercase: /[a-z]/,
|
|
21053
21037
|
number: /[0-9]/,
|
|
21054
21038
|
special: /[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/
|
|
21055
21039
|
};
|
|
21056
|
-
|
|
21040
|
+
nt([
|
|
21057
21041
|
a({ type: String })
|
|
21058
|
-
],
|
|
21059
|
-
|
|
21042
|
+
], I.prototype, "seed", 2);
|
|
21043
|
+
nt([
|
|
21060
21044
|
a({ attribute: "child-id", type: String })
|
|
21061
|
-
],
|
|
21062
|
-
|
|
21045
|
+
], I.prototype, "childId", 2);
|
|
21046
|
+
nt([
|
|
21063
21047
|
a({ attribute: "field-id", type: String })
|
|
21064
|
-
],
|
|
21065
|
-
|
|
21048
|
+
], I.prototype, "fieldId", 2);
|
|
21049
|
+
nt([
|
|
21066
21050
|
a({ type: String })
|
|
21067
|
-
],
|
|
21068
|
-
|
|
21051
|
+
], I.prototype, "name", 2);
|
|
21052
|
+
nt([
|
|
21069
21053
|
a({ type: String })
|
|
21070
|
-
],
|
|
21071
|
-
|
|
21054
|
+
], I.prototype, "variant", 2);
|
|
21055
|
+
nt([
|
|
21072
21056
|
a({ type: String })
|
|
21073
|
-
],
|
|
21074
|
-
|
|
21057
|
+
], I.prototype, "content", 2);
|
|
21058
|
+
nt([
|
|
21075
21059
|
a({ type: String })
|
|
21076
|
-
],
|
|
21077
|
-
|
|
21060
|
+
], I.prototype, "label", 2);
|
|
21061
|
+
nt([
|
|
21078
21062
|
a({ type: String })
|
|
21079
|
-
],
|
|
21080
|
-
|
|
21063
|
+
], I.prototype, "placeholder", 2);
|
|
21064
|
+
nt([
|
|
21081
21065
|
a({ type: String })
|
|
21082
|
-
],
|
|
21083
|
-
|
|
21066
|
+
], I.prototype, "description", 2);
|
|
21067
|
+
nt([
|
|
21084
21068
|
a({ type: String })
|
|
21085
|
-
],
|
|
21086
|
-
|
|
21069
|
+
], I.prototype, "mark", 2);
|
|
21070
|
+
nt([
|
|
21087
21071
|
a({ type: Boolean })
|
|
21088
|
-
],
|
|
21089
|
-
|
|
21072
|
+
], I.prototype, "caret", 2);
|
|
21073
|
+
nt([
|
|
21090
21074
|
a({ type: Boolean })
|
|
21091
|
-
],
|
|
21092
|
-
|
|
21075
|
+
], I.prototype, "disabled", 2);
|
|
21076
|
+
nt([
|
|
21093
21077
|
a({ type: Boolean })
|
|
21094
|
-
],
|
|
21095
|
-
|
|
21078
|
+
], I.prototype, "required", 2);
|
|
21079
|
+
nt([
|
|
21096
21080
|
a({ type: Number })
|
|
21097
|
-
],
|
|
21098
|
-
|
|
21081
|
+
], I.prototype, "minlength", 2);
|
|
21082
|
+
nt([
|
|
21099
21083
|
a({ type: Number })
|
|
21100
|
-
],
|
|
21101
|
-
|
|
21084
|
+
], I.prototype, "maxlength", 2);
|
|
21085
|
+
nt([
|
|
21102
21086
|
a({ type: Array })
|
|
21103
|
-
],
|
|
21104
|
-
|
|
21087
|
+
], I.prototype, "rules", 2);
|
|
21088
|
+
nt([
|
|
21089
|
+
a({ type: String })
|
|
21090
|
+
], I.prototype, "validation", 2);
|
|
21091
|
+
nt([
|
|
21105
21092
|
a({ attribute: "required-error", type: String })
|
|
21106
|
-
],
|
|
21107
|
-
|
|
21093
|
+
], I.prototype, "requiredError", 2);
|
|
21094
|
+
nt([
|
|
21108
21095
|
a({ attribute: "minlength-error", type: String })
|
|
21109
|
-
],
|
|
21110
|
-
|
|
21096
|
+
], I.prototype, "minlengthError", 2);
|
|
21097
|
+
nt([
|
|
21111
21098
|
a({ attribute: "maxlength-error", type: String })
|
|
21112
|
-
],
|
|
21113
|
-
|
|
21099
|
+
], I.prototype, "maxlengthError", 2);
|
|
21100
|
+
nt([
|
|
21114
21101
|
a({ attribute: "format-error", type: String })
|
|
21115
|
-
],
|
|
21116
|
-
|
|
21102
|
+
], I.prototype, "formatError", 2);
|
|
21103
|
+
nt([
|
|
21117
21104
|
x()
|
|
21118
|
-
],
|
|
21119
|
-
|
|
21105
|
+
], I.prototype, "_invalid", 2);
|
|
21106
|
+
nt([
|
|
21120
21107
|
x()
|
|
21121
|
-
],
|
|
21122
|
-
|
|
21108
|
+
], I.prototype, "_errors", 2);
|
|
21109
|
+
nt([
|
|
21123
21110
|
x()
|
|
21124
|
-
],
|
|
21125
|
-
|
|
21111
|
+
], I.prototype, "_value", 2);
|
|
21112
|
+
I = nt([
|
|
21126
21113
|
u("sb-password-field")
|
|
21127
|
-
],
|
|
21114
|
+
], I);
|
|
21128
21115
|
var wm = Object.defineProperty, _m = Object.getOwnPropertyDescriptor, _t = (t, e, r, i) => {
|
|
21129
21116
|
for (var s = i > 1 ? void 0 : i ? _m(e, r) : e, o = t.length - 1, n; o >= 0; o--)
|
|
21130
21117
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
@@ -21132,7 +21119,7 @@ var wm = Object.defineProperty, _m = Object.getOwnPropertyDescriptor, _t = (t, e
|
|
|
21132
21119
|
};
|
|
21133
21120
|
let j = class extends v {
|
|
21134
21121
|
constructor() {
|
|
21135
|
-
super(...arguments), this.seed = Nt(), this.name = "confirm", this.variant = "
|
|
21122
|
+
super(...arguments), this.seed = Nt(), this.name = "confirm", this.variant = "toggle", this.content = "split", this.pair = "sb-password-field", this.label = "Confirm Password", this.validation = "default", this.requiredError = "Confirm password is a required field.", this.matchError = "Passwords do not match.", this._invalid = !1, this._error = "", this._value = "", this._form = null, this._handleInput = (t) => {
|
|
21136
21123
|
const e = t.target;
|
|
21137
21124
|
e.matches(`[part="${j.parts.input}"] input`) && (this._value = e.value);
|
|
21138
21125
|
}, this._handleFormSubmit = (t) => {
|
|
@@ -21239,7 +21226,7 @@ let j = class extends v {
|
|
|
21239
21226
|
const t = this._form ?? document, e = this.pair, r = t.querySelector(e);
|
|
21240
21227
|
if (!r) return "";
|
|
21241
21228
|
const i = r.querySelector(
|
|
21242
|
-
`[part="${
|
|
21229
|
+
`[part="${I.parts.input}"] input`
|
|
21243
21230
|
);
|
|
21244
21231
|
return (i == null ? void 0 : i.value) ?? "";
|
|
21245
21232
|
}
|
|
@@ -21265,44 +21252,29 @@ let j = class extends v {
|
|
|
21265
21252
|
this.dispatchEvent(b);
|
|
21266
21253
|
}
|
|
21267
21254
|
/**
|
|
21268
|
-
*
|
|
21269
|
-
* fields and non-empty required fields, otherwise dispatching and displaying
|
|
21270
|
-
* the required error.
|
|
21271
|
-
*/
|
|
21272
|
-
_validateRequired(t) {
|
|
21273
|
-
if (!this.required || t) return !0;
|
|
21274
|
-
const e = this.requiredError;
|
|
21275
|
-
return this._invalid = !0, this._error = e, this._dispatchValidate(!1, "required", t, e), !1;
|
|
21276
|
-
}
|
|
21277
|
-
/**
|
|
21278
|
-
* Handles the match condition validation, obtaining the paired field's value,
|
|
21279
|
-
* comparing it to the confirm field's value, dispatching and displaying the
|
|
21280
|
-
* match error if the values do not match.
|
|
21255
|
+
* Clears the invalid state and error, and dispatches a valid validate event.
|
|
21281
21256
|
*/
|
|
21282
|
-
|
|
21283
|
-
|
|
21284
|
-
if (t === e) return !0;
|
|
21285
|
-
const r = this.matchError;
|
|
21286
|
-
return this._invalid = !0, this._error = r, this._dispatchValidate(!1, "match", t, r, e), !1;
|
|
21257
|
+
_handleValidateSuccess(t, e = "Valid confirm.") {
|
|
21258
|
+
this._invalid = !1, this._error = "", this._dispatchValidate(!0, "success", t, e);
|
|
21287
21259
|
}
|
|
21288
21260
|
/**
|
|
21289
|
-
*
|
|
21290
|
-
* validate event, indicating a successfully validated and valid confirm.
|
|
21261
|
+
* Sets the invalid state and error, and dispatches an invalid validate event.
|
|
21291
21262
|
*/
|
|
21292
|
-
|
|
21293
|
-
this._invalid = !
|
|
21263
|
+
_handleValidateError(t, e, r) {
|
|
21264
|
+
this._invalid = !0, this._error = r, this._dispatchValidate(!1, t, e, r);
|
|
21294
21265
|
}
|
|
21295
21266
|
/**
|
|
21296
|
-
*
|
|
21297
|
-
*
|
|
21267
|
+
* Validates the current value against the applicable rules in sequence,
|
|
21268
|
+
* dispatches the validate event, and returns `true` if the value passes.
|
|
21298
21269
|
*/
|
|
21299
21270
|
_validate() {
|
|
21300
21271
|
const t = this._value;
|
|
21301
|
-
|
|
21302
|
-
|
|
21303
|
-
|
|
21304
|
-
|
|
21305
|
-
|
|
21272
|
+
if (this.required && !t)
|
|
21273
|
+
return this._handleValidateError("required", t, this.requiredError), !1;
|
|
21274
|
+
if (!t || this.validation === "simple")
|
|
21275
|
+
return this._handleValidateSuccess(t), !0;
|
|
21276
|
+
const e = this._pairValue();
|
|
21277
|
+
return t !== e ? (this._handleValidateError("match", t, this.matchError), !1) : (this._handleValidateSuccess(t), !0);
|
|
21306
21278
|
}
|
|
21307
21279
|
/**
|
|
21308
21280
|
* Conditionally returns the mark template for the field label. When `caret`
|
|
@@ -21458,6 +21430,9 @@ _t([
|
|
|
21458
21430
|
_t([
|
|
21459
21431
|
a({ type: Boolean })
|
|
21460
21432
|
], j.prototype, "required", 2);
|
|
21433
|
+
_t([
|
|
21434
|
+
a({ type: String })
|
|
21435
|
+
], j.prototype, "validation", 2);
|
|
21461
21436
|
_t([
|
|
21462
21437
|
a({ attribute: "required-error", type: String })
|
|
21463
21438
|
], j.prototype, "requiredError", 2);
|
|
@@ -21476,14 +21451,14 @@ _t([
|
|
|
21476
21451
|
j = _t([
|
|
21477
21452
|
u("sb-confirm-field")
|
|
21478
21453
|
], j);
|
|
21479
|
-
var xm = Object.defineProperty, $m = Object.getOwnPropertyDescriptor,
|
|
21454
|
+
var xm = Object.defineProperty, $m = Object.getOwnPropertyDescriptor, Et = (t, e, r, i) => {
|
|
21480
21455
|
for (var s = i > 1 ? void 0 : i ? $m(e, r) : e, o = t.length - 1, n; o >= 0; o--)
|
|
21481
21456
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
21482
21457
|
return i && s && xm(e, r, s), s;
|
|
21483
21458
|
};
|
|
21484
21459
|
let D = class extends v {
|
|
21485
21460
|
constructor() {
|
|
21486
|
-
super(...arguments), this.seed = Nt(), this.name = "email", this.content = "split", this.label = "Email", this.requiredError = "Email is a required field.", this.formatError = "Enter a valid email address.", this._invalid = !1, this._error = "", this._value = "", this._form = null, this._handleInput = (t) => {
|
|
21461
|
+
super(...arguments), this.seed = Nt(), this.name = "email", this.content = "split", this.label = "Email", this.validation = "default", this.requiredError = "Email is a required field.", this.formatError = "Enter a valid email address.", this._invalid = !1, this._error = "", this._value = "", this._form = null, this._handleInput = (t) => {
|
|
21487
21462
|
const e = t.target;
|
|
21488
21463
|
e.matches(`[part="${D.parts.input}"]>input`) && (this._value = e.value);
|
|
21489
21464
|
}, this._handleFormSubmit = (t) => {
|
|
@@ -21603,36 +21578,24 @@ let D = class extends v {
|
|
|
21603
21578
|
this.dispatchEvent(h);
|
|
21604
21579
|
}
|
|
21605
21580
|
/**
|
|
21606
|
-
*
|
|
21607
|
-
* fields and non-empty required fields, otherwise dispatching and displaying
|
|
21608
|
-
* the required error.
|
|
21581
|
+
* Clears the invalid state and error, and dispatches a valid validate event.
|
|
21609
21582
|
*/
|
|
21610
|
-
|
|
21611
|
-
|
|
21612
|
-
const e = this.requiredError;
|
|
21613
|
-
return this._invalid = !0, this._error = e, this._dispatchValidate(!1, "required", t, e), !1;
|
|
21583
|
+
_handleValidateSuccess(t, e = "Valid email.") {
|
|
21584
|
+
this._invalid = !1, this._error = "", this._dispatchValidate(!0, "success", t, e);
|
|
21614
21585
|
}
|
|
21615
21586
|
/**
|
|
21616
|
-
*
|
|
21617
|
-
* non-required fields and non-empty fields that satisfy the pattern,
|
|
21618
|
-
* otherwise dispatching and displaying the format error.
|
|
21587
|
+
* Sets the invalid state and error, and dispatches an invalid validate event.
|
|
21619
21588
|
*/
|
|
21620
|
-
|
|
21621
|
-
|
|
21622
|
-
return !0;
|
|
21623
|
-
const e = this.formatError;
|
|
21624
|
-
return this._invalid = !0, this._error = e, this._dispatchValidate(!1, "format", t, e), !1;
|
|
21589
|
+
_handleValidateError(t, e, r) {
|
|
21590
|
+
this._invalid = !0, this._error = r, this._dispatchValidate(!1, t, e, r);
|
|
21625
21591
|
}
|
|
21626
21592
|
/**
|
|
21627
|
-
*
|
|
21628
|
-
*
|
|
21593
|
+
* Validates the current value against the applicable rules in sequence,
|
|
21594
|
+
* dispatches the validate event, and returns `true` if the value passes.
|
|
21629
21595
|
*/
|
|
21630
21596
|
_validate() {
|
|
21631
21597
|
const t = this._normalizedValue;
|
|
21632
|
-
|
|
21633
|
-
if (!e || (e = this._validateFormat(t), !e)) return !1;
|
|
21634
|
-
const r = `Valid email address${!t && " (optional and empty)"}.`;
|
|
21635
|
-
return this._invalid = !1, this._error = "", this._dispatchValidate(!0, "success", t, r), !0;
|
|
21598
|
+
return this.required && !t ? (this._handleValidateError("required", t, this.requiredError), !1) : !t || this.validation === "simple" ? (this._handleValidateSuccess(t), !0) : D._PATTERN.test(t) ? (this._handleValidateSuccess(t), !0) : (this._handleValidateError("format", t, this.formatError), !1);
|
|
21636
21599
|
}
|
|
21637
21600
|
/**
|
|
21638
21601
|
* Conditionally returns the mark template for the field label. When `caret`
|
|
@@ -21736,68 +21699,71 @@ D._INPUT = "input";
|
|
|
21736
21699
|
D._ERROR = "error";
|
|
21737
21700
|
D.TAG = `sb-${D._ROOT}`;
|
|
21738
21701
|
D._PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
21739
|
-
|
|
21702
|
+
Et([
|
|
21740
21703
|
a({ type: String })
|
|
21741
21704
|
], D.prototype, "seed", 2);
|
|
21742
|
-
|
|
21705
|
+
Et([
|
|
21743
21706
|
a({ attribute: "child-id", type: String })
|
|
21744
21707
|
], D.prototype, "childId", 2);
|
|
21745
|
-
|
|
21708
|
+
Et([
|
|
21746
21709
|
a({ attribute: "field-id", type: String })
|
|
21747
21710
|
], D.prototype, "fieldId", 2);
|
|
21748
|
-
|
|
21711
|
+
Et([
|
|
21749
21712
|
a({ type: String })
|
|
21750
21713
|
], D.prototype, "name", 2);
|
|
21751
|
-
|
|
21714
|
+
Et([
|
|
21752
21715
|
a({ type: String })
|
|
21753
21716
|
], D.prototype, "content", 2);
|
|
21754
|
-
|
|
21717
|
+
Et([
|
|
21755
21718
|
a({ type: String })
|
|
21756
21719
|
], D.prototype, "label", 2);
|
|
21757
|
-
|
|
21720
|
+
Et([
|
|
21758
21721
|
a({ type: String })
|
|
21759
21722
|
], D.prototype, "placeholder", 2);
|
|
21760
|
-
|
|
21723
|
+
Et([
|
|
21761
21724
|
a({ type: String })
|
|
21762
21725
|
], D.prototype, "description", 2);
|
|
21763
|
-
|
|
21726
|
+
Et([
|
|
21764
21727
|
a({ type: String })
|
|
21765
21728
|
], D.prototype, "mark", 2);
|
|
21766
|
-
|
|
21729
|
+
Et([
|
|
21767
21730
|
a({ type: Boolean })
|
|
21768
21731
|
], D.prototype, "caret", 2);
|
|
21769
|
-
|
|
21732
|
+
Et([
|
|
21770
21733
|
a({ type: Boolean })
|
|
21771
21734
|
], D.prototype, "disabled", 2);
|
|
21772
|
-
|
|
21735
|
+
Et([
|
|
21773
21736
|
a({ type: Boolean })
|
|
21774
21737
|
], D.prototype, "required", 2);
|
|
21775
|
-
|
|
21738
|
+
Et([
|
|
21739
|
+
a({ type: String })
|
|
21740
|
+
], D.prototype, "validation", 2);
|
|
21741
|
+
Et([
|
|
21776
21742
|
a({ attribute: "required-error", type: String })
|
|
21777
21743
|
], D.prototype, "requiredError", 2);
|
|
21778
|
-
|
|
21744
|
+
Et([
|
|
21779
21745
|
a({ attribute: "format-error", type: String })
|
|
21780
21746
|
], D.prototype, "formatError", 2);
|
|
21781
|
-
|
|
21747
|
+
Et([
|
|
21782
21748
|
x()
|
|
21783
21749
|
], D.prototype, "_invalid", 2);
|
|
21784
|
-
|
|
21750
|
+
Et([
|
|
21785
21751
|
x()
|
|
21786
21752
|
], D.prototype, "_error", 2);
|
|
21787
|
-
|
|
21753
|
+
Et([
|
|
21788
21754
|
x()
|
|
21789
21755
|
], D.prototype, "_value", 2);
|
|
21790
|
-
D =
|
|
21756
|
+
D = Et([
|
|
21791
21757
|
u("sb-email-field")
|
|
21792
21758
|
], D);
|
|
21793
|
-
var Sm = Object.defineProperty, Cm = Object.getOwnPropertyDescriptor,
|
|
21759
|
+
var Sm = Object.defineProperty, Cm = Object.getOwnPropertyDescriptor, xt = (t, e, r, i) => {
|
|
21794
21760
|
for (var s = i > 1 ? void 0 : i ? Cm(e, r) : e, o = t.length - 1, n; o >= 0; o--)
|
|
21795
21761
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
21796
21762
|
return i && s && Sm(e, r, s), s;
|
|
21797
21763
|
};
|
|
21798
21764
|
let M = class extends v {
|
|
21799
21765
|
constructor() {
|
|
21800
|
-
super(...arguments), this.seed = Nt(), this.name = "identifier", this.identifiers = [], this.content = "split", this.requiredError = "Identifier is a required field.", this._invalid = !1, this._error = "", this._value = "", this._form = null, this._handleInput = (t) => {
|
|
21766
|
+
super(...arguments), this.seed = Nt(), this.name = "identifier", this.identifiers = [], this.content = "split", this.validation = "default", this.requiredError = "Identifier is a required field.", this._invalid = !1, this._error = "", this._value = "", this._form = null, this._handleInput = (t) => {
|
|
21801
21767
|
const e = t.target;
|
|
21802
21768
|
e.matches(`[part="${M.parts.input}"]>input`) && (this._value = e.value);
|
|
21803
21769
|
}, this._handleFormSubmit = (t) => {
|
|
@@ -21938,24 +21904,24 @@ let M = class extends v {
|
|
|
21938
21904
|
this.dispatchEvent(p);
|
|
21939
21905
|
}
|
|
21940
21906
|
/**
|
|
21941
|
-
*
|
|
21942
|
-
|
|
21943
|
-
|
|
21907
|
+
* Clears the invalid state and error, and dispatches a valid validate event.
|
|
21908
|
+
*/
|
|
21909
|
+
_handleValidateSuccess(t, e = "Valid identifier.") {
|
|
21910
|
+
this._invalid = !1, this._error = "", this._dispatchValidate(!0, "success", t, e);
|
|
21911
|
+
}
|
|
21912
|
+
/**
|
|
21913
|
+
* Sets the invalid state and error, and dispatches an invalid validate event.
|
|
21944
21914
|
*/
|
|
21945
|
-
|
|
21946
|
-
|
|
21947
|
-
const e = this.requiredError;
|
|
21948
|
-
return this._invalid = !0, this._error = e, this._dispatchValidate(!1, "required", t, e), !1;
|
|
21915
|
+
_handleValidateError(t, e, r) {
|
|
21916
|
+
this._invalid = !0, this._error = r, this._dispatchValidate(!1, t, e, r);
|
|
21949
21917
|
}
|
|
21950
21918
|
/**
|
|
21951
|
-
*
|
|
21952
|
-
*
|
|
21919
|
+
* Validates the current value against the applicable rules in sequence,
|
|
21920
|
+
* dispatches the validate event, and returns `true` if the value passes.
|
|
21953
21921
|
*/
|
|
21954
21922
|
_validate() {
|
|
21955
21923
|
const t = this._normalizedValue;
|
|
21956
|
-
|
|
21957
|
-
const r = `Valid identifier${t ? "" : " (optional and empty)"}.`;
|
|
21958
|
-
return this._invalid = !1, this._error = "", this._dispatchValidate(!0, "success", t, r), !0;
|
|
21924
|
+
return this.required && !t ? (this._handleValidateError("required", t, this.requiredError), !1) : !t || this.validation === "simple" ? (this._handleValidateSuccess(t), !0) : (this._handleValidateSuccess(t), !0);
|
|
21959
21925
|
}
|
|
21960
21926
|
/**
|
|
21961
21927
|
* Conditionally returns the mark template for the field label. When `caret`
|
|
@@ -22059,78 +22025,81 @@ M._DESCRIPTION = "description";
|
|
|
22059
22025
|
M._INPUT = "input";
|
|
22060
22026
|
M._ERROR = "error";
|
|
22061
22027
|
M.TAG = `sb-${M._ROOT}`;
|
|
22062
|
-
|
|
22028
|
+
xt([
|
|
22063
22029
|
a({ type: String })
|
|
22064
22030
|
], M.prototype, "seed", 2);
|
|
22065
|
-
|
|
22031
|
+
xt([
|
|
22066
22032
|
a({ attribute: "child-id", type: String })
|
|
22067
22033
|
], M.prototype, "childId", 2);
|
|
22068
|
-
|
|
22034
|
+
xt([
|
|
22069
22035
|
a({ attribute: "field-id", type: String })
|
|
22070
22036
|
], M.prototype, "fieldId", 2);
|
|
22071
|
-
|
|
22037
|
+
xt([
|
|
22072
22038
|
a({ type: String })
|
|
22073
22039
|
], M.prototype, "name", 2);
|
|
22074
|
-
|
|
22040
|
+
xt([
|
|
22075
22041
|
a({ type: Array })
|
|
22076
22042
|
], M.prototype, "identifiers", 2);
|
|
22077
|
-
|
|
22043
|
+
xt([
|
|
22078
22044
|
a({ type: String })
|
|
22079
22045
|
], M.prototype, "content", 2);
|
|
22080
|
-
|
|
22046
|
+
xt([
|
|
22081
22047
|
a({ type: String })
|
|
22082
22048
|
], M.prototype, "label", 2);
|
|
22083
|
-
|
|
22049
|
+
xt([
|
|
22084
22050
|
a({ type: String })
|
|
22085
22051
|
], M.prototype, "placeholder", 2);
|
|
22086
|
-
|
|
22052
|
+
xt([
|
|
22087
22053
|
a({ type: String })
|
|
22088
22054
|
], M.prototype, "description", 2);
|
|
22089
|
-
|
|
22055
|
+
xt([
|
|
22090
22056
|
a({ type: String })
|
|
22091
22057
|
], M.prototype, "mark", 2);
|
|
22092
|
-
|
|
22058
|
+
xt([
|
|
22093
22059
|
a({ type: Boolean })
|
|
22094
22060
|
], M.prototype, "caret", 2);
|
|
22095
|
-
|
|
22061
|
+
xt([
|
|
22096
22062
|
a({ type: Boolean })
|
|
22097
22063
|
], M.prototype, "disabled", 2);
|
|
22098
|
-
|
|
22064
|
+
xt([
|
|
22099
22065
|
a({ type: String })
|
|
22100
22066
|
], M.prototype, "autocomplete", 2);
|
|
22101
|
-
|
|
22067
|
+
xt([
|
|
22102
22068
|
a({ type: Boolean })
|
|
22103
22069
|
], M.prototype, "required", 2);
|
|
22104
|
-
|
|
22070
|
+
xt([
|
|
22071
|
+
a({ type: String })
|
|
22072
|
+
], M.prototype, "validation", 2);
|
|
22073
|
+
xt([
|
|
22105
22074
|
a({ attribute: "required-error", type: String })
|
|
22106
22075
|
], M.prototype, "requiredError", 2);
|
|
22107
|
-
|
|
22076
|
+
xt([
|
|
22108
22077
|
x()
|
|
22109
22078
|
], M.prototype, "_invalid", 2);
|
|
22110
|
-
|
|
22079
|
+
xt([
|
|
22111
22080
|
x()
|
|
22112
22081
|
], M.prototype, "_error", 2);
|
|
22113
|
-
|
|
22082
|
+
xt([
|
|
22114
22083
|
x()
|
|
22115
22084
|
], M.prototype, "_value", 2);
|
|
22116
|
-
M =
|
|
22085
|
+
M = xt([
|
|
22117
22086
|
u("sb-identifier-field")
|
|
22118
22087
|
], M);
|
|
22119
|
-
var Em = Object.defineProperty, km = Object.getOwnPropertyDescriptor,
|
|
22088
|
+
var Em = Object.defineProperty, km = Object.getOwnPropertyDescriptor, dt = (t, e, r, i) => {
|
|
22120
22089
|
for (var s = i > 1 ? void 0 : i ? km(e, r) : e, o = t.length - 1, n; o >= 0; o--)
|
|
22121
22090
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
22122
22091
|
return i && s && Em(e, r, s), s;
|
|
22123
22092
|
};
|
|
22124
|
-
let
|
|
22093
|
+
let L = class extends v {
|
|
22125
22094
|
constructor() {
|
|
22126
|
-
super(...arguments), this.seed = Nt(), this.name = "name", this.content = "split", this.label = "Name", this.requiredError = "Name is a required field.", this.formatError = "Enter a valid name.", this._invalid = !1, this._error = "", this._value = "", this._form = null, this._handleInput = (t) => {
|
|
22095
|
+
super(...arguments), this.seed = Nt(), this.name = "name", this.content = "split", this.label = "Name", this.validation = "default", this.requiredError = "Name is a required field.", this.formatError = "Enter a valid name.", this._invalid = !1, this._error = "", this._value = "", this._form = null, this._handleInput = (t) => {
|
|
22127
22096
|
const e = t.target;
|
|
22128
|
-
e.matches(`[part="${
|
|
22097
|
+
e.matches(`[part="${L.parts.input}"]>input`) && (this._value = e.value);
|
|
22129
22098
|
}, this._handleFormSubmit = (t) => {
|
|
22130
22099
|
this._validate() || t.preventDefault();
|
|
22131
22100
|
}, this._handleFormReset = () => {
|
|
22132
22101
|
const t = this.querySelector(
|
|
22133
|
-
`rtg-input[part="${
|
|
22102
|
+
`rtg-input[part="${L.parts.input}"]`
|
|
22134
22103
|
);
|
|
22135
22104
|
t && (t.value = ""), this._value = "", this._invalid = !1, this._error = "";
|
|
22136
22105
|
};
|
|
@@ -22159,49 +22128,49 @@ let P = class extends v {
|
|
|
22159
22128
|
* derived from the component's part name and `seed`.
|
|
22160
22129
|
*/
|
|
22161
22130
|
get rootId() {
|
|
22162
|
-
return this.childId ?? `sb-${
|
|
22131
|
+
return this.childId ?? `sb-${L.parts.root}-${this.seed}`;
|
|
22163
22132
|
}
|
|
22164
22133
|
/**
|
|
22165
22134
|
* The `id` of the field content element, derived from `rootId` with the
|
|
22166
22135
|
* content part name appended.
|
|
22167
22136
|
*/
|
|
22168
22137
|
get contentId() {
|
|
22169
|
-
return `${this.rootId}-${
|
|
22138
|
+
return `${this.rootId}-${L._CONTENT}`;
|
|
22170
22139
|
}
|
|
22171
22140
|
/**
|
|
22172
22141
|
* The `id` of the field label element, derived from `rootId` with the label
|
|
22173
22142
|
* part name appended.
|
|
22174
22143
|
*/
|
|
22175
22144
|
get labelId() {
|
|
22176
|
-
return `${this.rootId}-${
|
|
22145
|
+
return `${this.rootId}-${L._LABEL}`;
|
|
22177
22146
|
}
|
|
22178
22147
|
/**
|
|
22179
22148
|
* The `id` of the field description element, derived from `rootId` with the
|
|
22180
22149
|
* description part name appended.
|
|
22181
22150
|
*/
|
|
22182
22151
|
get descriptionId() {
|
|
22183
|
-
return `${this.rootId}-${
|
|
22152
|
+
return `${this.rootId}-${L._DESCRIPTION}`;
|
|
22184
22153
|
}
|
|
22185
22154
|
/**
|
|
22186
22155
|
* The `id` of the mark element, derived from `rootId` with the mark part name
|
|
22187
22156
|
* appended.
|
|
22188
22157
|
*/
|
|
22189
22158
|
get markId() {
|
|
22190
|
-
return `${this.rootId}-${
|
|
22159
|
+
return `${this.rootId}-${L._MARK}`;
|
|
22191
22160
|
}
|
|
22192
22161
|
/**
|
|
22193
22162
|
* The `id` of the input element, equal to `fieldId` when provided, otherwise
|
|
22194
22163
|
* derived from `rootId` with the input part name appended.
|
|
22195
22164
|
*/
|
|
22196
22165
|
get inputId() {
|
|
22197
|
-
return this.fieldId ?? `${this.rootId}-${
|
|
22166
|
+
return this.fieldId ?? `${this.rootId}-${L._INPUT}`;
|
|
22198
22167
|
}
|
|
22199
22168
|
/**
|
|
22200
22169
|
* The `id` of the field error element, derived from `rootId` with the error
|
|
22201
22170
|
* part name appended.
|
|
22202
22171
|
*/
|
|
22203
22172
|
get errorId() {
|
|
22204
|
-
return `${this.rootId}-${
|
|
22173
|
+
return `${this.rootId}-${L._ERROR}`;
|
|
22205
22174
|
}
|
|
22206
22175
|
/**
|
|
22207
22176
|
* Returns the normalized value of `_value` by trimming leading/trailing
|
|
@@ -22227,7 +22196,7 @@ let P = class extends v {
|
|
|
22227
22196
|
* `pattern` prop when provided, otherwise falling back to `_PATTERN`.
|
|
22228
22197
|
*/
|
|
22229
22198
|
get _pattern() {
|
|
22230
|
-
return this.pattern ? new RegExp(this.pattern) :
|
|
22199
|
+
return this.pattern ? new RegExp(this.pattern) : L._PATTERN;
|
|
22231
22200
|
}
|
|
22232
22201
|
/**
|
|
22233
22202
|
* Adds the input, form submit, and form reset event listeners.
|
|
@@ -22254,7 +22223,7 @@ let P = class extends v {
|
|
|
22254
22223
|
* Defines and dispatches the validate event.
|
|
22255
22224
|
*/
|
|
22256
22225
|
_dispatchValidate(t, e, r, i) {
|
|
22257
|
-
const s = this.inputId, o = this.rootId, n = this.name, h = new CustomEvent(
|
|
22226
|
+
const s = this.inputId, o = this.rootId, n = this.name, h = new CustomEvent(L.validateEventName, {
|
|
22258
22227
|
detail: { id: s, parentId: o, name: n, value: r, valid: t, type: e, message: i },
|
|
22259
22228
|
bubbles: !0,
|
|
22260
22229
|
composed: !0
|
|
@@ -22262,61 +22231,37 @@ let P = class extends v {
|
|
|
22262
22231
|
this.dispatchEvent(h);
|
|
22263
22232
|
}
|
|
22264
22233
|
/**
|
|
22265
|
-
*
|
|
22266
|
-
* fields and non-empty required fields, otherwise dispatching and displaying
|
|
22267
|
-
* the required error.
|
|
22268
|
-
*/
|
|
22269
|
-
_validateRequired(t) {
|
|
22270
|
-
if (!this.required || t) return !0;
|
|
22271
|
-
const e = this.requiredError;
|
|
22272
|
-
return this._invalid = !0, this._error = e, this._dispatchValidate(!1, "required", t, e), !1;
|
|
22273
|
-
}
|
|
22274
|
-
/**
|
|
22275
|
-
* Handles the minlength condition validation, determining if a valid
|
|
22276
|
-
* `minlength` prop was provided, dispatching and displaying the minlength
|
|
22277
|
-
* error if the value is shorter than accepted.
|
|
22278
|
-
*/
|
|
22279
|
-
_validateMinlength(t) {
|
|
22280
|
-
const { minlength: e } = this._lengths;
|
|
22281
|
-
if (!e || t.length >= e) return !0;
|
|
22282
|
-
const r = this.minlengthError ?? `Name must be at least ${e} characters.`;
|
|
22283
|
-
return this._invalid = !0, this._error = r, this._dispatchValidate(!1, "minlength", t, r), !1;
|
|
22284
|
-
}
|
|
22285
|
-
/**
|
|
22286
|
-
* Handles the maxlength condition validation, determining if a valid
|
|
22287
|
-
* `maxlength` prop was provided, dispatching and displaying the maxlength
|
|
22288
|
-
* error if the value is longer than accepted.
|
|
22289
|
-
*/
|
|
22290
|
-
_validateMaxlength(t) {
|
|
22291
|
-
const { maxlength: e } = this._lengths;
|
|
22292
|
-
if (!e || t.length <= e) return !0;
|
|
22293
|
-
const r = this.maxlengthError ?? `Name must be at most ${e} characters.`;
|
|
22294
|
-
return this._invalid = !0, this._error = r, this._dispatchValidate(!1, "maxlength", t, r), !1;
|
|
22295
|
-
}
|
|
22296
|
-
/**
|
|
22297
|
-
* Handles the format condition validation, testing against `_pattern`, and
|
|
22298
|
-
* dispatching and displaying the format error for an invalid value.
|
|
22234
|
+
* Clears the invalid state and error, and dispatches a valid validate event.
|
|
22299
22235
|
*/
|
|
22300
|
-
|
|
22301
|
-
|
|
22302
|
-
const e = this.formatError;
|
|
22303
|
-
return this._invalid = !0, this._error = e, this._dispatchValidate(!1, "format", t, e), !1;
|
|
22236
|
+
_handleValidateSuccess(t, e = "Valid name.") {
|
|
22237
|
+
this._invalid = !1, this._error = "", this._dispatchValidate(!0, "success", t, e);
|
|
22304
22238
|
}
|
|
22305
22239
|
/**
|
|
22306
|
-
*
|
|
22307
|
-
* validate event, indicating a successfully validated and valid name.
|
|
22240
|
+
* Sets the invalid state and error, and dispatches an invalid validate event.
|
|
22308
22241
|
*/
|
|
22309
|
-
|
|
22310
|
-
this._invalid = !
|
|
22242
|
+
_handleValidateError(t, e, r) {
|
|
22243
|
+
this._invalid = !0, this._error = r, this._dispatchValidate(!1, t, e, r);
|
|
22311
22244
|
}
|
|
22312
22245
|
/**
|
|
22313
|
-
*
|
|
22314
|
-
*
|
|
22246
|
+
* Validates the current value against the applicable rules in sequence,
|
|
22247
|
+
* dispatches the validate event, and returns `true` if the value passes.
|
|
22315
22248
|
*/
|
|
22316
22249
|
_validate() {
|
|
22317
22250
|
const t = this._normalizedValue;
|
|
22318
|
-
|
|
22319
|
-
|
|
22251
|
+
if (this.required && !t)
|
|
22252
|
+
return this._handleValidateError("required", t, this.requiredError), !1;
|
|
22253
|
+
if (!t || this.validation === "simple")
|
|
22254
|
+
return this._handleValidateSuccess(t), !0;
|
|
22255
|
+
const { minlength: e, maxlength: r } = this._lengths;
|
|
22256
|
+
return e && t.length < e ? (this._handleValidateError(
|
|
22257
|
+
"minlength",
|
|
22258
|
+
t,
|
|
22259
|
+
this.minlengthError ?? `Username must be at least ${e} characters.`
|
|
22260
|
+
), !1) : r && t.length > r ? (this._handleValidateError(
|
|
22261
|
+
"maxlength",
|
|
22262
|
+
t,
|
|
22263
|
+
this.maxlengthError ?? `Username must be at most ${r} characters.`
|
|
22264
|
+
), !1) : this._pattern.test(t) ? (this._handleValidateSuccess(t), !0) : (this._handleValidateError("format", t, this.formatError), !1);
|
|
22320
22265
|
}
|
|
22321
22266
|
/**
|
|
22322
22267
|
* Conditionally returns the mark template for the field label. When `caret`
|
|
@@ -22329,7 +22274,7 @@ let P = class extends v {
|
|
|
22329
22274
|
return !this.mark && (!this.caret || !this.required) ? g : d`
|
|
22330
22275
|
<span
|
|
22331
22276
|
id="${this.markId}"
|
|
22332
|
-
part="${
|
|
22277
|
+
part="${L.parts.mark}"
|
|
22333
22278
|
data-content="${this.mark ? "text" : "caret"}"
|
|
22334
22279
|
>
|
|
22335
22280
|
${this.mark ? this.mark : d`*`}
|
|
@@ -22343,7 +22288,7 @@ let P = class extends v {
|
|
|
22343
22288
|
return d`
|
|
22344
22289
|
<rtg-field-label
|
|
22345
22290
|
id="${this.labelId}"
|
|
22346
|
-
part="${
|
|
22291
|
+
part="${L.parts.label}"
|
|
22347
22292
|
for="${this.inputId}"
|
|
22348
22293
|
>
|
|
22349
22294
|
${this.label} ${this._renderMark()}
|
|
@@ -22357,7 +22302,7 @@ let P = class extends v {
|
|
|
22357
22302
|
return this.description ? d`
|
|
22358
22303
|
<rtg-field-description
|
|
22359
22304
|
id="${this.descriptionId}"
|
|
22360
|
-
part="${
|
|
22305
|
+
part="${L.parts.description}"
|
|
22361
22306
|
>
|
|
22362
22307
|
${this.description}
|
|
22363
22308
|
</rtg-field-description>
|
|
@@ -22371,7 +22316,7 @@ let P = class extends v {
|
|
|
22371
22316
|
return this._invalid ? d`
|
|
22372
22317
|
<rtg-field-error
|
|
22373
22318
|
id="${this.errorId}"
|
|
22374
|
-
part="${
|
|
22319
|
+
part="${L.parts.error}"
|
|
22375
22320
|
.errors=${[{ message: this._error }]}
|
|
22376
22321
|
></rtg-field-error>
|
|
22377
22322
|
` : g;
|
|
@@ -22381,7 +22326,7 @@ let P = class extends v {
|
|
|
22381
22326
|
return d`
|
|
22382
22327
|
<rtg-field
|
|
22383
22328
|
id="${this.rootId}"
|
|
22384
|
-
part="${
|
|
22329
|
+
part="${L.parts.root}"
|
|
22385
22330
|
data-content="${this.content}"
|
|
22386
22331
|
?disabled="${this.disabled}"
|
|
22387
22332
|
?invalid="${this._invalid}"
|
|
@@ -22389,7 +22334,7 @@ let P = class extends v {
|
|
|
22389
22334
|
${this.content === "group" ? d`
|
|
22390
22335
|
<rtg-field-content
|
|
22391
22336
|
id="${this.contentId}"
|
|
22392
|
-
part="${
|
|
22337
|
+
part="${L.parts.content}"
|
|
22393
22338
|
>
|
|
22394
22339
|
${this._renderLabel()} ${this._renderDescription()}
|
|
22395
22340
|
</rtg-field-content>
|
|
@@ -22397,7 +22342,7 @@ let P = class extends v {
|
|
|
22397
22342
|
|
|
22398
22343
|
<rtg-input
|
|
22399
22344
|
id="${this.inputId}"
|
|
22400
|
-
part="${
|
|
22345
|
+
part="${L.parts.input}"
|
|
22401
22346
|
type="text"
|
|
22402
22347
|
name="${this.name}"
|
|
22403
22348
|
placeholder="${this.placeholder ?? g}"
|
|
@@ -22414,92 +22359,95 @@ let P = class extends v {
|
|
|
22414
22359
|
`;
|
|
22415
22360
|
}
|
|
22416
22361
|
};
|
|
22417
|
-
|
|
22418
|
-
|
|
22419
|
-
|
|
22420
|
-
|
|
22421
|
-
|
|
22422
|
-
|
|
22423
|
-
|
|
22424
|
-
|
|
22425
|
-
|
|
22426
|
-
|
|
22362
|
+
L._ROOT = "name-field";
|
|
22363
|
+
L._CONTENT = "content";
|
|
22364
|
+
L._LABEL = "label";
|
|
22365
|
+
L._MARK = "mark";
|
|
22366
|
+
L._DESCRIPTION = "description";
|
|
22367
|
+
L._INPUT = "input";
|
|
22368
|
+
L._ERROR = "error";
|
|
22369
|
+
L.TAG = `sb-${L._ROOT}`;
|
|
22370
|
+
L._PATTERN = /^[\p{L} .'-]*$/u;
|
|
22371
|
+
dt([
|
|
22427
22372
|
a({ type: String })
|
|
22428
|
-
],
|
|
22429
|
-
|
|
22373
|
+
], L.prototype, "seed", 2);
|
|
22374
|
+
dt([
|
|
22430
22375
|
a({ attribute: "child-id", type: String })
|
|
22431
|
-
],
|
|
22432
|
-
|
|
22376
|
+
], L.prototype, "childId", 2);
|
|
22377
|
+
dt([
|
|
22433
22378
|
a({ attribute: "field-id", type: String })
|
|
22434
|
-
],
|
|
22435
|
-
|
|
22379
|
+
], L.prototype, "fieldId", 2);
|
|
22380
|
+
dt([
|
|
22436
22381
|
a({ type: String })
|
|
22437
|
-
],
|
|
22438
|
-
|
|
22382
|
+
], L.prototype, "name", 2);
|
|
22383
|
+
dt([
|
|
22439
22384
|
a({ type: String })
|
|
22440
|
-
],
|
|
22441
|
-
|
|
22385
|
+
], L.prototype, "content", 2);
|
|
22386
|
+
dt([
|
|
22442
22387
|
a({ type: String })
|
|
22443
|
-
],
|
|
22444
|
-
|
|
22388
|
+
], L.prototype, "label", 2);
|
|
22389
|
+
dt([
|
|
22445
22390
|
a({ type: String })
|
|
22446
|
-
],
|
|
22447
|
-
|
|
22391
|
+
], L.prototype, "placeholder", 2);
|
|
22392
|
+
dt([
|
|
22448
22393
|
a({ type: String })
|
|
22449
|
-
],
|
|
22450
|
-
|
|
22394
|
+
], L.prototype, "description", 2);
|
|
22395
|
+
dt([
|
|
22451
22396
|
a({ type: String })
|
|
22452
|
-
],
|
|
22453
|
-
|
|
22397
|
+
], L.prototype, "mark", 2);
|
|
22398
|
+
dt([
|
|
22454
22399
|
a({ type: Boolean })
|
|
22455
|
-
],
|
|
22456
|
-
|
|
22400
|
+
], L.prototype, "caret", 2);
|
|
22401
|
+
dt([
|
|
22457
22402
|
a({ type: Boolean })
|
|
22458
|
-
],
|
|
22459
|
-
|
|
22403
|
+
], L.prototype, "disabled", 2);
|
|
22404
|
+
dt([
|
|
22460
22405
|
a({ type: Boolean })
|
|
22461
|
-
],
|
|
22462
|
-
|
|
22406
|
+
], L.prototype, "required", 2);
|
|
22407
|
+
dt([
|
|
22463
22408
|
a({ type: Number })
|
|
22464
|
-
],
|
|
22465
|
-
|
|
22409
|
+
], L.prototype, "minlength", 2);
|
|
22410
|
+
dt([
|
|
22466
22411
|
a({ type: Number })
|
|
22467
|
-
],
|
|
22468
|
-
|
|
22412
|
+
], L.prototype, "maxlength", 2);
|
|
22413
|
+
dt([
|
|
22469
22414
|
a({ type: String })
|
|
22470
|
-
],
|
|
22471
|
-
|
|
22415
|
+
], L.prototype, "pattern", 2);
|
|
22416
|
+
dt([
|
|
22417
|
+
a({ type: String })
|
|
22418
|
+
], L.prototype, "validation", 2);
|
|
22419
|
+
dt([
|
|
22472
22420
|
a({ attribute: "required-error", type: String })
|
|
22473
|
-
],
|
|
22474
|
-
|
|
22421
|
+
], L.prototype, "requiredError", 2);
|
|
22422
|
+
dt([
|
|
22475
22423
|
a({ attribute: "minlength-error", type: String })
|
|
22476
|
-
],
|
|
22477
|
-
|
|
22424
|
+
], L.prototype, "minlengthError", 2);
|
|
22425
|
+
dt([
|
|
22478
22426
|
a({ attribute: "maxlength-error", type: String })
|
|
22479
|
-
],
|
|
22480
|
-
|
|
22427
|
+
], L.prototype, "maxlengthError", 2);
|
|
22428
|
+
dt([
|
|
22481
22429
|
a({ attribute: "format-error", type: String })
|
|
22482
|
-
],
|
|
22483
|
-
|
|
22430
|
+
], L.prototype, "formatError", 2);
|
|
22431
|
+
dt([
|
|
22484
22432
|
x()
|
|
22485
|
-
],
|
|
22486
|
-
|
|
22433
|
+
], L.prototype, "_invalid", 2);
|
|
22434
|
+
dt([
|
|
22487
22435
|
x()
|
|
22488
|
-
],
|
|
22489
|
-
|
|
22436
|
+
], L.prototype, "_error", 2);
|
|
22437
|
+
dt([
|
|
22490
22438
|
x()
|
|
22491
|
-
],
|
|
22492
|
-
|
|
22439
|
+
], L.prototype, "_value", 2);
|
|
22440
|
+
L = dt([
|
|
22493
22441
|
u("sb-name-field")
|
|
22494
|
-
],
|
|
22495
|
-
var Rm = Object.defineProperty, Om = Object.getOwnPropertyDescriptor,
|
|
22442
|
+
], L);
|
|
22443
|
+
var Rm = Object.defineProperty, Om = Object.getOwnPropertyDescriptor, kt = (t, e, r, i) => {
|
|
22496
22444
|
for (var s = i > 1 ? void 0 : i ? Om(e, r) : e, o = t.length - 1, n; o >= 0; o--)
|
|
22497
22445
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
22498
22446
|
return i && s && Rm(e, r, s), s;
|
|
22499
22447
|
};
|
|
22500
22448
|
let U = class extends v {
|
|
22501
22449
|
constructor() {
|
|
22502
|
-
super(...arguments), this.seed = Nt(), this.name = "phone", this.content = "split", this.label = "Phone", this.requiredError = "Phone is a required field.", this.formatError = "Enter a valid phone number.", this._invalid = !1, this._error = "", this._value = "", this._form = null, this._handleInput = (t) => {
|
|
22450
|
+
super(...arguments), this.seed = Nt(), this.name = "phone", this.content = "split", this.label = "Phone", this.validation = "default", this.requiredError = "Phone is a required field.", this.formatError = "Enter a valid phone number.", this._invalid = !1, this._error = "", this._value = "", this._form = null, this._handleInput = (t) => {
|
|
22503
22451
|
const e = t.target;
|
|
22504
22452
|
e.matches(`[part="${U.parts.input}"]>input`) && (this._value = e.value);
|
|
22505
22453
|
}, this._handleFormSubmit = (t) => {
|
|
@@ -22618,36 +22566,24 @@ let U = class extends v {
|
|
|
22618
22566
|
this.dispatchEvent(h);
|
|
22619
22567
|
}
|
|
22620
22568
|
/**
|
|
22621
|
-
*
|
|
22622
|
-
* fields and non-empty required fields, otherwise dispatching and displaying
|
|
22623
|
-
* the required error.
|
|
22569
|
+
* Clears the invalid state and error, and dispatches a valid validate event.
|
|
22624
22570
|
*/
|
|
22625
|
-
|
|
22626
|
-
|
|
22627
|
-
const e = this.requiredError;
|
|
22628
|
-
return this._invalid = !0, this._error = e, this._dispatchValidate(!1, "required", t, e), !1;
|
|
22571
|
+
_handleValidateSuccess(t, e = "Valid phone.") {
|
|
22572
|
+
this._invalid = !1, this._error = "", this._dispatchValidate(!0, "success", t, e);
|
|
22629
22573
|
}
|
|
22630
22574
|
/**
|
|
22631
|
-
*
|
|
22632
|
-
* non-required fields and non-empty fields that satisfy the pattern,
|
|
22633
|
-
* otherwise dispatching and displaying the format error.
|
|
22575
|
+
* Sets the invalid state and error, and dispatches an invalid validate event.
|
|
22634
22576
|
*/
|
|
22635
|
-
|
|
22636
|
-
|
|
22637
|
-
return !0;
|
|
22638
|
-
const e = this.formatError;
|
|
22639
|
-
return this._invalid = !0, this._error = e, this._dispatchValidate(!1, "format", t, e), !1;
|
|
22577
|
+
_handleValidateError(t, e, r) {
|
|
22578
|
+
this._invalid = !0, this._error = r, this._dispatchValidate(!1, t, e, r);
|
|
22640
22579
|
}
|
|
22641
22580
|
/**
|
|
22642
|
-
*
|
|
22643
|
-
*
|
|
22581
|
+
* Validates the current value against the applicable rules in sequence,
|
|
22582
|
+
* dispatches the validate event, and returns `true` if the value passes.
|
|
22644
22583
|
*/
|
|
22645
22584
|
_validate() {
|
|
22646
22585
|
const t = this._normalizedValue;
|
|
22647
|
-
|
|
22648
|
-
if (!e || (e = this._validateFormat(t), !e)) return !1;
|
|
22649
|
-
const r = `Valid phone number${!t && " (optional and empty)"}.`;
|
|
22650
|
-
return this._invalid = !1, this._error = "", this._dispatchValidate(!0, "success", t, r), !0;
|
|
22586
|
+
return this.required && !t ? (this._handleValidateError("required", t, this.requiredError), !1) : !t || this.validation === "simple" ? (this._handleValidateSuccess(t), !0) : U._PATTERN.test(t) ? (this._handleValidateSuccess(t), !0) : (this._handleValidateError("format", t, this.formatError), !1);
|
|
22651
22587
|
}
|
|
22652
22588
|
/**
|
|
22653
22589
|
* Conditionally returns the mark template for the field label. When `caret`
|
|
@@ -22751,75 +22687,78 @@ U._INPUT = "input";
|
|
|
22751
22687
|
U._ERROR = "error";
|
|
22752
22688
|
U.TAG = `sb-${U._ROOT}`;
|
|
22753
22689
|
U._PATTERN = /^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/;
|
|
22754
|
-
|
|
22690
|
+
kt([
|
|
22755
22691
|
a({ type: String })
|
|
22756
22692
|
], U.prototype, "seed", 2);
|
|
22757
|
-
|
|
22693
|
+
kt([
|
|
22758
22694
|
a({ attribute: "child-id", type: String })
|
|
22759
22695
|
], U.prototype, "childId", 2);
|
|
22760
|
-
|
|
22696
|
+
kt([
|
|
22761
22697
|
a({ attribute: "field-id", type: String })
|
|
22762
22698
|
], U.prototype, "fieldId", 2);
|
|
22763
|
-
|
|
22699
|
+
kt([
|
|
22764
22700
|
a({ type: String })
|
|
22765
22701
|
], U.prototype, "name", 2);
|
|
22766
|
-
|
|
22702
|
+
kt([
|
|
22767
22703
|
a({ type: String })
|
|
22768
22704
|
], U.prototype, "content", 2);
|
|
22769
|
-
|
|
22705
|
+
kt([
|
|
22770
22706
|
a({ type: String })
|
|
22771
22707
|
], U.prototype, "label", 2);
|
|
22772
|
-
|
|
22708
|
+
kt([
|
|
22773
22709
|
a({ type: String })
|
|
22774
22710
|
], U.prototype, "placeholder", 2);
|
|
22775
|
-
|
|
22711
|
+
kt([
|
|
22776
22712
|
a({ type: String })
|
|
22777
22713
|
], U.prototype, "description", 2);
|
|
22778
|
-
|
|
22714
|
+
kt([
|
|
22779
22715
|
a({ type: String })
|
|
22780
22716
|
], U.prototype, "mark", 2);
|
|
22781
|
-
|
|
22717
|
+
kt([
|
|
22782
22718
|
a({ type: Boolean })
|
|
22783
22719
|
], U.prototype, "caret", 2);
|
|
22784
|
-
|
|
22720
|
+
kt([
|
|
22785
22721
|
a({ type: Boolean })
|
|
22786
22722
|
], U.prototype, "disabled", 2);
|
|
22787
|
-
|
|
22723
|
+
kt([
|
|
22788
22724
|
a({ type: Boolean })
|
|
22789
22725
|
], U.prototype, "required", 2);
|
|
22790
|
-
|
|
22726
|
+
kt([
|
|
22727
|
+
a({ type: String })
|
|
22728
|
+
], U.prototype, "validation", 2);
|
|
22729
|
+
kt([
|
|
22791
22730
|
a({ attribute: "required-error", type: String })
|
|
22792
22731
|
], U.prototype, "requiredError", 2);
|
|
22793
|
-
|
|
22732
|
+
kt([
|
|
22794
22733
|
a({ attribute: "format-error", type: String })
|
|
22795
22734
|
], U.prototype, "formatError", 2);
|
|
22796
|
-
|
|
22735
|
+
kt([
|
|
22797
22736
|
x()
|
|
22798
22737
|
], U.prototype, "_invalid", 2);
|
|
22799
|
-
|
|
22738
|
+
kt([
|
|
22800
22739
|
x()
|
|
22801
22740
|
], U.prototype, "_error", 2);
|
|
22802
|
-
|
|
22741
|
+
kt([
|
|
22803
22742
|
x()
|
|
22804
22743
|
], U.prototype, "_value", 2);
|
|
22805
|
-
U =
|
|
22744
|
+
U = kt([
|
|
22806
22745
|
u("sb-phone-field")
|
|
22807
22746
|
], U);
|
|
22808
|
-
var Im = Object.defineProperty, Am = Object.getOwnPropertyDescriptor,
|
|
22747
|
+
var Im = Object.defineProperty, Am = Object.getOwnPropertyDescriptor, ct = (t, e, r, i) => {
|
|
22809
22748
|
for (var s = i > 1 ? void 0 : i ? Am(e, r) : e, o = t.length - 1, n; o >= 0; o--)
|
|
22810
22749
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
22811
22750
|
return i && s && Im(e, r, s), s;
|
|
22812
22751
|
};
|
|
22813
|
-
let
|
|
22752
|
+
let P = class extends v {
|
|
22814
22753
|
constructor() {
|
|
22815
|
-
super(...arguments), this.seed = Nt(), this.name = "username", this.content = "split", this.label = "Username", this.requiredError = "Username is a required field.", this.formatError = "Enter a valid username.", this._invalid = !1, this._error = "", this._value = "", this._form = null, this._handleInput = (t) => {
|
|
22754
|
+
super(...arguments), this.seed = Nt(), this.name = "username", this.content = "split", this.label = "Username", this.validation = "default", this.requiredError = "Username is a required field.", this.formatError = "Enter a valid username.", this._invalid = !1, this._error = "", this._value = "", this._form = null, this._handleInput = (t) => {
|
|
22816
22755
|
const e = t.target;
|
|
22817
|
-
e.matches(`[part="${
|
|
22756
|
+
e.matches(`[part="${P.parts.input}"]>input`) && (this._value = e.value);
|
|
22818
22757
|
}, this._handleFormSubmit = (t) => {
|
|
22819
22758
|
this._validate() || t.preventDefault();
|
|
22820
22759
|
}, this._handleFormReset = () => {
|
|
22821
22760
|
const t = this.querySelector(
|
|
22822
|
-
`rtg-input[part="${
|
|
22761
|
+
`rtg-input[part="${P.parts.input}"]`
|
|
22823
22762
|
);
|
|
22824
22763
|
t && (t.value = ""), this._value = "", this._invalid = !1, this._error = "";
|
|
22825
22764
|
};
|
|
@@ -22848,49 +22787,49 @@ let N = class extends v {
|
|
|
22848
22787
|
* derived from the component's part name and `seed`.
|
|
22849
22788
|
*/
|
|
22850
22789
|
get rootId() {
|
|
22851
|
-
return this.childId ?? `sb-${
|
|
22790
|
+
return this.childId ?? `sb-${P.parts.root}-${this.seed}`;
|
|
22852
22791
|
}
|
|
22853
22792
|
/**
|
|
22854
22793
|
* The `id` of the field content element, derived from `rootId` with the
|
|
22855
22794
|
* content part name appended.
|
|
22856
22795
|
*/
|
|
22857
22796
|
get contentId() {
|
|
22858
|
-
return `${this.rootId}-${
|
|
22797
|
+
return `${this.rootId}-${P._CONTENT}`;
|
|
22859
22798
|
}
|
|
22860
22799
|
/**
|
|
22861
22800
|
* The `id` of the field label element, derived from `rootId` with the label
|
|
22862
22801
|
* part name appended.
|
|
22863
22802
|
*/
|
|
22864
22803
|
get labelId() {
|
|
22865
|
-
return `${this.rootId}-${
|
|
22804
|
+
return `${this.rootId}-${P._LABEL}`;
|
|
22866
22805
|
}
|
|
22867
22806
|
/**
|
|
22868
22807
|
* The `id` of the field description element, derived from `rootId` with the
|
|
22869
22808
|
* description part name appended.
|
|
22870
22809
|
*/
|
|
22871
22810
|
get descriptionId() {
|
|
22872
|
-
return `${this.rootId}-${
|
|
22811
|
+
return `${this.rootId}-${P._DESCRIPTION}`;
|
|
22873
22812
|
}
|
|
22874
22813
|
/**
|
|
22875
22814
|
* The `id` of the mark element, derived from `rootId` with the mark part name
|
|
22876
22815
|
* appended.
|
|
22877
22816
|
*/
|
|
22878
22817
|
get markId() {
|
|
22879
|
-
return `${this.rootId}-${
|
|
22818
|
+
return `${this.rootId}-${P._MARK}`;
|
|
22880
22819
|
}
|
|
22881
22820
|
/**
|
|
22882
22821
|
* The `id` of the input element, equal to `fieldId` when provided, otherwise
|
|
22883
22822
|
* derived from `rootId` with the input part name appended.
|
|
22884
22823
|
*/
|
|
22885
22824
|
get inputId() {
|
|
22886
|
-
return this.fieldId ?? `${this.rootId}-${
|
|
22825
|
+
return this.fieldId ?? `${this.rootId}-${P._INPUT}`;
|
|
22887
22826
|
}
|
|
22888
22827
|
/**
|
|
22889
22828
|
* The `id` of the field error element, derived from `rootId` with the error
|
|
22890
22829
|
* part name appended.
|
|
22891
22830
|
*/
|
|
22892
22831
|
get errorId() {
|
|
22893
|
-
return `${this.rootId}-${
|
|
22832
|
+
return `${this.rootId}-${P._ERROR}`;
|
|
22894
22833
|
}
|
|
22895
22834
|
/**
|
|
22896
22835
|
* Returns a the normalized value of `_value` by trimming whitespace and
|
|
@@ -22916,7 +22855,7 @@ let N = class extends v {
|
|
|
22916
22855
|
* `pattern` prop when provided, otherwise falling back to `_PATTERN`.
|
|
22917
22856
|
*/
|
|
22918
22857
|
get _pattern() {
|
|
22919
|
-
return this.pattern ? new RegExp(this.pattern) :
|
|
22858
|
+
return this.pattern ? new RegExp(this.pattern) : P._PATTERN;
|
|
22920
22859
|
}
|
|
22921
22860
|
/**
|
|
22922
22861
|
* Adds the input, form submit, and form reset event listeners.
|
|
@@ -22943,7 +22882,7 @@ let N = class extends v {
|
|
|
22943
22882
|
* Defines and dispatches the validate event.
|
|
22944
22883
|
*/
|
|
22945
22884
|
_dispatchValidate(t, e, r, i) {
|
|
22946
|
-
const s = this.inputId, o = this.rootId, n = this.name, h = new CustomEvent(
|
|
22885
|
+
const s = this.inputId, o = this.rootId, n = this.name, h = new CustomEvent(P.validateEventName, {
|
|
22947
22886
|
detail: { id: s, parentId: o, name: n, value: r, valid: t, type: e, message: i },
|
|
22948
22887
|
bubbles: !0,
|
|
22949
22888
|
composed: !0
|
|
@@ -22951,61 +22890,37 @@ let N = class extends v {
|
|
|
22951
22890
|
this.dispatchEvent(h);
|
|
22952
22891
|
}
|
|
22953
22892
|
/**
|
|
22954
|
-
*
|
|
22955
|
-
* fields and non-empty required fields, otherwise dispatching and displaying
|
|
22956
|
-
* the required error.
|
|
22957
|
-
*/
|
|
22958
|
-
_validateRequired(t) {
|
|
22959
|
-
if (!this.required || t) return !0;
|
|
22960
|
-
const e = this.requiredError;
|
|
22961
|
-
return this._invalid = !0, this._error = e, this._dispatchValidate(!1, "required", t, e), !1;
|
|
22962
|
-
}
|
|
22963
|
-
/**
|
|
22964
|
-
* Handles the minlength condition validation, determining if a valid
|
|
22965
|
-
* `minlength` prop was provided, dispatching and displaying the minlength
|
|
22966
|
-
* error if the value is shorter than accepted.
|
|
22893
|
+
* Clears the invalid state and error, and dispatches a valid validate event.
|
|
22967
22894
|
*/
|
|
22968
|
-
|
|
22969
|
-
|
|
22970
|
-
if (!e || t.length >= e) return !0;
|
|
22971
|
-
const r = this.minlengthError ?? `Username must be at least ${e} characters.`;
|
|
22972
|
-
return this._invalid = !0, this._error = r, this._dispatchValidate(!1, "minlength", t, r), !1;
|
|
22973
|
-
}
|
|
22974
|
-
/**
|
|
22975
|
-
* Handles the maxlength condition validation, determining if a valid
|
|
22976
|
-
* `maxlength` prop was provided, dispatching and displaying the maxlength
|
|
22977
|
-
* error if the value is longer than accepted.
|
|
22978
|
-
*/
|
|
22979
|
-
_validateMaxlength(t) {
|
|
22980
|
-
const { maxlength: e } = this._lengths;
|
|
22981
|
-
if (!e || t.length <= e) return !0;
|
|
22982
|
-
const r = this.maxlengthError ?? `Username must be at most ${e} characters.`;
|
|
22983
|
-
return this._invalid = !0, this._error = r, this._dispatchValidate(!1, "maxlength", t, r), !1;
|
|
22984
|
-
}
|
|
22985
|
-
/**
|
|
22986
|
-
* Handles the format condition validation, testing against `_pattern`, and
|
|
22987
|
-
* dispatching and displaying the format error for an invalid value.
|
|
22988
|
-
*/
|
|
22989
|
-
_validateFormat(t) {
|
|
22990
|
-
if (this._pattern.test(t)) return !0;
|
|
22991
|
-
const e = this.formatError;
|
|
22992
|
-
return this._invalid = !0, this._error = e, this._dispatchValidate(!1, "format", t, e), !1;
|
|
22895
|
+
_handleValidateSuccess(t, e = "Valid username.") {
|
|
22896
|
+
this._invalid = !1, this._error = "", this._dispatchValidate(!0, "success", t, e);
|
|
22993
22897
|
}
|
|
22994
22898
|
/**
|
|
22995
|
-
*
|
|
22996
|
-
* validate event, indicating a successfully validated and valid username.
|
|
22899
|
+
* Sets the invalid state and error, and dispatches an invalid validate event.
|
|
22997
22900
|
*/
|
|
22998
|
-
|
|
22999
|
-
this._invalid = !
|
|
22901
|
+
_handleValidateError(t, e, r) {
|
|
22902
|
+
this._invalid = !0, this._error = r, this._dispatchValidate(!1, t, e, r);
|
|
23000
22903
|
}
|
|
23001
22904
|
/**
|
|
23002
|
-
*
|
|
23003
|
-
*
|
|
22905
|
+
* Validates the current value against the applicable rules in sequence,
|
|
22906
|
+
* dispatches the validate event, and returns `true` if the value passes.
|
|
23004
22907
|
*/
|
|
23005
22908
|
_validate() {
|
|
23006
22909
|
const t = this._normalizedValue;
|
|
23007
|
-
|
|
23008
|
-
|
|
22910
|
+
if (this.required && !t)
|
|
22911
|
+
return this._handleValidateError("required", t, this.requiredError), !1;
|
|
22912
|
+
if (!t || this.validation === "simple")
|
|
22913
|
+
return this._handleValidateSuccess(t), !0;
|
|
22914
|
+
const { minlength: e, maxlength: r } = this._lengths;
|
|
22915
|
+
return e && t.length < e ? (this._handleValidateError(
|
|
22916
|
+
"minlength",
|
|
22917
|
+
t,
|
|
22918
|
+
this.minlengthError ?? `Username must be at least ${e} characters.`
|
|
22919
|
+
), !1) : r && t.length > r ? (this._handleValidateError(
|
|
22920
|
+
"maxlength",
|
|
22921
|
+
t,
|
|
22922
|
+
this.maxlengthError ?? `Username must be at most ${r} characters.`
|
|
22923
|
+
), !1) : this._pattern.test(t) ? (this._handleValidateSuccess(t), !0) : (this._handleValidateError("format", t, this.formatError), !1);
|
|
23009
22924
|
}
|
|
23010
22925
|
/**
|
|
23011
22926
|
* Conditionally returns the mark template for the field label. When `caret`
|
|
@@ -23018,7 +22933,7 @@ let N = class extends v {
|
|
|
23018
22933
|
return !this.mark && (!this.caret || !this.required) ? g : d`
|
|
23019
22934
|
<span
|
|
23020
22935
|
id="${this.markId}"
|
|
23021
|
-
part="${
|
|
22936
|
+
part="${P.parts.mark}"
|
|
23022
22937
|
data-content="${this.mark ? "text" : "caret"}"
|
|
23023
22938
|
>
|
|
23024
22939
|
${this.mark ? this.mark : d`*`}
|
|
@@ -23032,7 +22947,7 @@ let N = class extends v {
|
|
|
23032
22947
|
return d`
|
|
23033
22948
|
<rtg-field-label
|
|
23034
22949
|
id="${this.labelId}"
|
|
23035
|
-
part="${
|
|
22950
|
+
part="${P.parts.label}"
|
|
23036
22951
|
for="${this.inputId}"
|
|
23037
22952
|
>
|
|
23038
22953
|
${this.label} ${this._renderMark()}
|
|
@@ -23046,7 +22961,7 @@ let N = class extends v {
|
|
|
23046
22961
|
return this.description ? d`
|
|
23047
22962
|
<rtg-field-description
|
|
23048
22963
|
id="${this.descriptionId}"
|
|
23049
|
-
part="${
|
|
22964
|
+
part="${P.parts.description}"
|
|
23050
22965
|
>
|
|
23051
22966
|
${this.description}
|
|
23052
22967
|
</rtg-field-description>
|
|
@@ -23060,7 +22975,7 @@ let N = class extends v {
|
|
|
23060
22975
|
return this._invalid ? d`
|
|
23061
22976
|
<rtg-field-error
|
|
23062
22977
|
id="${this.errorId}"
|
|
23063
|
-
part="${
|
|
22978
|
+
part="${P.parts.error}"
|
|
23064
22979
|
.errors=${[{ message: this._error }]}
|
|
23065
22980
|
></rtg-field-error>
|
|
23066
22981
|
` : g;
|
|
@@ -23070,7 +22985,7 @@ let N = class extends v {
|
|
|
23070
22985
|
return d`
|
|
23071
22986
|
<rtg-field
|
|
23072
22987
|
id="${this.rootId}"
|
|
23073
|
-
part="${
|
|
22988
|
+
part="${P.parts.root}"
|
|
23074
22989
|
data-content="${this.content}"
|
|
23075
22990
|
?disabled="${this.disabled}"
|
|
23076
22991
|
?invalid="${this._invalid}"
|
|
@@ -23078,7 +22993,7 @@ let N = class extends v {
|
|
|
23078
22993
|
${this.content === "group" ? d`
|
|
23079
22994
|
<rtg-field-content
|
|
23080
22995
|
id="${this.contentId}"
|
|
23081
|
-
part="${
|
|
22996
|
+
part="${P.parts.content}"
|
|
23082
22997
|
>
|
|
23083
22998
|
${this._renderLabel()} ${this._renderDescription()}
|
|
23084
22999
|
</rtg-field-content>
|
|
@@ -23086,7 +23001,7 @@ let N = class extends v {
|
|
|
23086
23001
|
|
|
23087
23002
|
<rtg-input
|
|
23088
23003
|
id="${this.inputId}"
|
|
23089
|
-
part="${
|
|
23004
|
+
part="${P.parts.input}"
|
|
23090
23005
|
type="text"
|
|
23091
23006
|
name="${this.name}"
|
|
23092
23007
|
placeholder="${this.placeholder ?? g}"
|
|
@@ -23103,94 +23018,97 @@ let N = class extends v {
|
|
|
23103
23018
|
`;
|
|
23104
23019
|
}
|
|
23105
23020
|
};
|
|
23106
|
-
|
|
23107
|
-
|
|
23108
|
-
|
|
23109
|
-
|
|
23110
|
-
|
|
23111
|
-
|
|
23112
|
-
|
|
23113
|
-
|
|
23114
|
-
|
|
23115
|
-
|
|
23021
|
+
P._ROOT = "username-field";
|
|
23022
|
+
P._CONTENT = "content";
|
|
23023
|
+
P._LABEL = "label";
|
|
23024
|
+
P._MARK = "mark";
|
|
23025
|
+
P._DESCRIPTION = "description";
|
|
23026
|
+
P._INPUT = "input";
|
|
23027
|
+
P._ERROR = "error";
|
|
23028
|
+
P.TAG = `sb-${P._ROOT}`;
|
|
23029
|
+
P._PATTERN = /^[a-z0-9_]*$/;
|
|
23030
|
+
ct([
|
|
23116
23031
|
a({ type: String })
|
|
23117
|
-
],
|
|
23118
|
-
|
|
23032
|
+
], P.prototype, "seed", 2);
|
|
23033
|
+
ct([
|
|
23119
23034
|
a({ attribute: "child-id", type: String })
|
|
23120
|
-
],
|
|
23121
|
-
|
|
23035
|
+
], P.prototype, "childId", 2);
|
|
23036
|
+
ct([
|
|
23122
23037
|
a({ attribute: "field-id", type: String })
|
|
23123
|
-
],
|
|
23124
|
-
|
|
23038
|
+
], P.prototype, "fieldId", 2);
|
|
23039
|
+
ct([
|
|
23125
23040
|
a({ type: String })
|
|
23126
|
-
],
|
|
23127
|
-
|
|
23041
|
+
], P.prototype, "name", 2);
|
|
23042
|
+
ct([
|
|
23128
23043
|
a({ type: String })
|
|
23129
|
-
],
|
|
23130
|
-
|
|
23044
|
+
], P.prototype, "content", 2);
|
|
23045
|
+
ct([
|
|
23131
23046
|
a({ type: String })
|
|
23132
|
-
],
|
|
23133
|
-
|
|
23047
|
+
], P.prototype, "label", 2);
|
|
23048
|
+
ct([
|
|
23134
23049
|
a({ type: String })
|
|
23135
|
-
],
|
|
23136
|
-
|
|
23050
|
+
], P.prototype, "placeholder", 2);
|
|
23051
|
+
ct([
|
|
23137
23052
|
a({ type: String })
|
|
23138
|
-
],
|
|
23139
|
-
|
|
23053
|
+
], P.prototype, "description", 2);
|
|
23054
|
+
ct([
|
|
23140
23055
|
a({ type: String })
|
|
23141
|
-
],
|
|
23142
|
-
|
|
23056
|
+
], P.prototype, "mark", 2);
|
|
23057
|
+
ct([
|
|
23143
23058
|
a({ type: Boolean })
|
|
23144
|
-
],
|
|
23145
|
-
|
|
23059
|
+
], P.prototype, "caret", 2);
|
|
23060
|
+
ct([
|
|
23146
23061
|
a({ type: Boolean })
|
|
23147
|
-
],
|
|
23148
|
-
|
|
23062
|
+
], P.prototype, "disabled", 2);
|
|
23063
|
+
ct([
|
|
23149
23064
|
a({ type: Boolean })
|
|
23150
|
-
],
|
|
23151
|
-
|
|
23065
|
+
], P.prototype, "required", 2);
|
|
23066
|
+
ct([
|
|
23152
23067
|
a({ type: Number })
|
|
23153
|
-
],
|
|
23154
|
-
|
|
23068
|
+
], P.prototype, "minlength", 2);
|
|
23069
|
+
ct([
|
|
23155
23070
|
a({ type: Number })
|
|
23156
|
-
],
|
|
23157
|
-
|
|
23071
|
+
], P.prototype, "maxlength", 2);
|
|
23072
|
+
ct([
|
|
23073
|
+
a({ type: String })
|
|
23074
|
+
], P.prototype, "pattern", 2);
|
|
23075
|
+
ct([
|
|
23158
23076
|
a({ type: String })
|
|
23159
|
-
],
|
|
23160
|
-
|
|
23077
|
+
], P.prototype, "validation", 2);
|
|
23078
|
+
ct([
|
|
23161
23079
|
a({ attribute: "required-error", type: String })
|
|
23162
|
-
],
|
|
23163
|
-
|
|
23080
|
+
], P.prototype, "requiredError", 2);
|
|
23081
|
+
ct([
|
|
23164
23082
|
a({ attribute: "minlength-error", type: String })
|
|
23165
|
-
],
|
|
23166
|
-
|
|
23083
|
+
], P.prototype, "minlengthError", 2);
|
|
23084
|
+
ct([
|
|
23167
23085
|
a({ attribute: "maxlength-error", type: String })
|
|
23168
|
-
],
|
|
23169
|
-
|
|
23086
|
+
], P.prototype, "maxlengthError", 2);
|
|
23087
|
+
ct([
|
|
23170
23088
|
a({ attribute: "format-error", type: String })
|
|
23171
|
-
],
|
|
23172
|
-
|
|
23089
|
+
], P.prototype, "formatError", 2);
|
|
23090
|
+
ct([
|
|
23173
23091
|
x()
|
|
23174
|
-
],
|
|
23175
|
-
|
|
23092
|
+
], P.prototype, "_invalid", 2);
|
|
23093
|
+
ct([
|
|
23176
23094
|
x()
|
|
23177
|
-
],
|
|
23178
|
-
|
|
23095
|
+
], P.prototype, "_error", 2);
|
|
23096
|
+
ct([
|
|
23179
23097
|
x()
|
|
23180
|
-
],
|
|
23181
|
-
|
|
23098
|
+
], P.prototype, "_value", 2);
|
|
23099
|
+
P = ct([
|
|
23182
23100
|
u("sb-username-field")
|
|
23183
|
-
],
|
|
23101
|
+
], P);
|
|
23184
23102
|
var Tm = Object.defineProperty, Lm = Object.getOwnPropertyDescriptor, ve = (t, e, r, i) => {
|
|
23185
23103
|
for (var s = i > 1 ? void 0 : i ? Lm(e, r) : e, o = t.length - 1, n; o >= 0; o--)
|
|
23186
23104
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
23187
23105
|
return i && s && Tm(e, r, s), s;
|
|
23188
23106
|
};
|
|
23189
|
-
let
|
|
23107
|
+
let lt = class extends v {
|
|
23190
23108
|
constructor() {
|
|
23191
23109
|
super(...arguments), this.seed = Nt(), this.variant = "default", this.size = "default", this.label = "Submit", this.spinnerAlign = "start", this._loading = !1, this._handleClick = () => {
|
|
23192
23110
|
this.disabled || this.isLoading || this.dispatchEvent(
|
|
23193
|
-
new CustomEvent(
|
|
23111
|
+
new CustomEvent(lt.clickEventName, {
|
|
23194
23112
|
detail: { id: this.rootId, event: this.event },
|
|
23195
23113
|
bubbles: !0,
|
|
23196
23114
|
composed: !0
|
|
@@ -23222,14 +23140,14 @@ let at = class extends v {
|
|
|
23222
23140
|
* derived from the component's part name and `seed`.
|
|
23223
23141
|
*/
|
|
23224
23142
|
get rootId() {
|
|
23225
|
-
return this.childId ?? `sb-${
|
|
23143
|
+
return this.childId ?? `sb-${lt.parts.root}-${this.seed}`;
|
|
23226
23144
|
}
|
|
23227
23145
|
/**
|
|
23228
23146
|
* The `id` of the spinner element, derived from `rootId` with the spinner
|
|
23229
23147
|
* part name appended.
|
|
23230
23148
|
*/
|
|
23231
23149
|
get spinnerId() {
|
|
23232
|
-
return `${this.rootId}-${
|
|
23150
|
+
return `${this.rootId}-${lt._SPINNER}`;
|
|
23233
23151
|
}
|
|
23234
23152
|
/**
|
|
23235
23153
|
* The loading state, derived from the private `_loading` and `loading` prop.
|
|
@@ -23256,7 +23174,7 @@ let at = class extends v {
|
|
|
23256
23174
|
return this.isLoading ? d`
|
|
23257
23175
|
<rtg-spinner
|
|
23258
23176
|
id="${this.spinnerId}"
|
|
23259
|
-
part="${
|
|
23177
|
+
part="${lt.parts.spinner}"
|
|
23260
23178
|
class="rtg-icon-inline-${this.spinnerAlign}"
|
|
23261
23179
|
></rtg-spinner>
|
|
23262
23180
|
` : g;
|
|
@@ -23265,7 +23183,7 @@ let at = class extends v {
|
|
|
23265
23183
|
return d`
|
|
23266
23184
|
<rtg-button
|
|
23267
23185
|
id="${this.rootId}"
|
|
23268
|
-
part="${
|
|
23186
|
+
part="${lt.parts.root}"
|
|
23269
23187
|
data-event="${this.event}"
|
|
23270
23188
|
?data-loading=${this.isLoading}
|
|
23271
23189
|
variant="${this.variant}"
|
|
@@ -23280,49 +23198,49 @@ let at = class extends v {
|
|
|
23280
23198
|
`;
|
|
23281
23199
|
}
|
|
23282
23200
|
};
|
|
23283
|
-
|
|
23284
|
-
|
|
23285
|
-
|
|
23201
|
+
lt._ROOT = "form-submit";
|
|
23202
|
+
lt._SPINNER = "spinner";
|
|
23203
|
+
lt.TAG = `sb-${lt._ROOT}`;
|
|
23286
23204
|
ve([
|
|
23287
23205
|
a({ type: String })
|
|
23288
|
-
],
|
|
23206
|
+
], lt.prototype, "seed", 2);
|
|
23289
23207
|
ve([
|
|
23290
23208
|
a({ attribute: "child-id", type: String })
|
|
23291
|
-
],
|
|
23209
|
+
], lt.prototype, "childId", 2);
|
|
23292
23210
|
ve([
|
|
23293
23211
|
a({ type: String })
|
|
23294
|
-
],
|
|
23212
|
+
], lt.prototype, "variant", 2);
|
|
23295
23213
|
ve([
|
|
23296
23214
|
a({ type: String })
|
|
23297
|
-
],
|
|
23215
|
+
], lt.prototype, "size", 2);
|
|
23298
23216
|
ve([
|
|
23299
23217
|
a({ type: String })
|
|
23300
|
-
],
|
|
23218
|
+
], lt.prototype, "label", 2);
|
|
23301
23219
|
ve([
|
|
23302
23220
|
a({ attribute: "spinner-align", type: String })
|
|
23303
|
-
],
|
|
23221
|
+
], lt.prototype, "spinnerAlign", 2);
|
|
23304
23222
|
ve([
|
|
23305
23223
|
a({ type: Boolean })
|
|
23306
|
-
],
|
|
23224
|
+
], lt.prototype, "disabled", 2);
|
|
23307
23225
|
ve([
|
|
23308
23226
|
a({ type: Boolean })
|
|
23309
|
-
],
|
|
23227
|
+
], lt.prototype, "loading", 2);
|
|
23310
23228
|
ve([
|
|
23311
23229
|
a({ type: String })
|
|
23312
|
-
],
|
|
23230
|
+
], lt.prototype, "event", 2);
|
|
23313
23231
|
ve([
|
|
23314
23232
|
x()
|
|
23315
|
-
],
|
|
23316
|
-
|
|
23233
|
+
], lt.prototype, "_loading", 2);
|
|
23234
|
+
lt = ve([
|
|
23317
23235
|
u("sb-form-submit")
|
|
23318
|
-
],
|
|
23236
|
+
], lt);
|
|
23319
23237
|
const ph = [
|
|
23320
23238
|
D,
|
|
23321
23239
|
U,
|
|
23322
|
-
N,
|
|
23323
|
-
M,
|
|
23324
23240
|
P,
|
|
23325
|
-
|
|
23241
|
+
M,
|
|
23242
|
+
L,
|
|
23243
|
+
I,
|
|
23326
23244
|
j
|
|
23327
23245
|
], Pm = ph.map((t) => t.TAG).join(", "), uc = ph.map((t) => t.validateEventName);
|
|
23328
23246
|
var Nm = Object.defineProperty, zm = Object.getOwnPropertyDescriptor, cs = (t, e, r, i) => {
|
|
@@ -23355,7 +23273,7 @@ let yt = class extends v {
|
|
|
23355
23273
|
const h = e.map((p) => !!p.disabled);
|
|
23356
23274
|
this._setLoading(!0, e, h);
|
|
23357
23275
|
try {
|
|
23358
|
-
await
|
|
23276
|
+
await Ct.processLoginflowEvent({
|
|
23359
23277
|
event: n,
|
|
23360
23278
|
...Object.keys(r).length ? { data: r } : {}
|
|
23361
23279
|
}), this._dispatch(yt.SUCCESS_EVENT, { id: this.rootId, data: r, event: n });
|
|
@@ -23413,21 +23331,21 @@ let yt = class extends v {
|
|
|
23413
23331
|
*/
|
|
23414
23332
|
get _submit() {
|
|
23415
23333
|
const t = this._form;
|
|
23416
|
-
return t ? t.querySelector(
|
|
23334
|
+
return t ? t.querySelector(lt.TAG) : null;
|
|
23417
23335
|
}
|
|
23418
23336
|
/**
|
|
23419
23337
|
* Subscribes to the `sb-form-submit:click` event so the auth event string
|
|
23420
23338
|
* is captured before the native form `submit` event fires.
|
|
23421
23339
|
*/
|
|
23422
23340
|
connectedCallback() {
|
|
23423
|
-
super.connectedCallback(), this.addEventListener(
|
|
23341
|
+
super.connectedCallback(), this.addEventListener(lt.clickEventName, this._handleSubmitClick);
|
|
23424
23342
|
}
|
|
23425
23343
|
/**
|
|
23426
23344
|
* Removes the `sb-form-submit:click` listener.
|
|
23427
23345
|
*/
|
|
23428
23346
|
disconnectedCallback() {
|
|
23429
23347
|
super.disconnectedCallback(), this.removeEventListener(
|
|
23430
|
-
|
|
23348
|
+
lt.clickEventName,
|
|
23431
23349
|
this._handleSubmitClick
|
|
23432
23350
|
);
|
|
23433
23351
|
}
|
|
@@ -23563,7 +23481,7 @@ let Z = class extends v {
|
|
|
23563
23481
|
})
|
|
23564
23482
|
);
|
|
23565
23483
|
try {
|
|
23566
|
-
this.event && await
|
|
23484
|
+
this.event && await Ct.processLoginflowEvent({ event: this.event });
|
|
23567
23485
|
} finally {
|
|
23568
23486
|
this._loading = !1;
|
|
23569
23487
|
}
|
|
@@ -23716,19 +23634,19 @@ var Fm = Object.defineProperty, Bm = Object.getOwnPropertyDescriptor, ye = (t, e
|
|
|
23716
23634
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
23717
23635
|
return i && s && Fm(e, r, s), s;
|
|
23718
23636
|
};
|
|
23719
|
-
let
|
|
23637
|
+
let pt = class extends v {
|
|
23720
23638
|
constructor() {
|
|
23721
23639
|
super(...arguments), this.seed = Nt(), this.variant = "secondary", this.size = "default", this.label = "Use Passkey", this.spinnerAlign = "start", this._loading = !1, this._handleClick = async () => {
|
|
23722
23640
|
if (!(this.disabled || this.isLoading)) {
|
|
23723
23641
|
this._loading = !0, this.dispatchEvent(
|
|
23724
|
-
new CustomEvent(
|
|
23642
|
+
new CustomEvent(pt.CLICK_EVENT, {
|
|
23725
23643
|
detail: { id: this.rootId, event: this.event },
|
|
23726
23644
|
bubbles: !0,
|
|
23727
23645
|
composed: !0
|
|
23728
23646
|
})
|
|
23729
23647
|
);
|
|
23730
23648
|
try {
|
|
23731
|
-
this.event && await
|
|
23649
|
+
this.event && await Ct.processLoginflowEvent({ event: this.event });
|
|
23732
23650
|
} finally {
|
|
23733
23651
|
this._loading = !1;
|
|
23734
23652
|
}
|
|
@@ -23753,13 +23671,13 @@ let ct = class extends v {
|
|
|
23753
23671
|
* derived from the component's part name and `seed`.
|
|
23754
23672
|
*/
|
|
23755
23673
|
get rootId() {
|
|
23756
|
-
return this.childId ?? `sb-${
|
|
23674
|
+
return this.childId ?? `sb-${pt.parts.root}-${this.seed}`;
|
|
23757
23675
|
}
|
|
23758
23676
|
/**
|
|
23759
23677
|
* The `id` of the spinner element, derived from `rootId` and the part name.
|
|
23760
23678
|
*/
|
|
23761
23679
|
get spinnerId() {
|
|
23762
|
-
return `${this.rootId}-${
|
|
23680
|
+
return `${this.rootId}-${pt._SPINNER}`;
|
|
23763
23681
|
}
|
|
23764
23682
|
/**
|
|
23765
23683
|
* The loading state, derived from the private `_loading` and `loading` prop.
|
|
@@ -23786,7 +23704,7 @@ let ct = class extends v {
|
|
|
23786
23704
|
return this.isLoading ? d`
|
|
23787
23705
|
<rtg-spinner
|
|
23788
23706
|
id="${this.spinnerId}"
|
|
23789
|
-
part="${
|
|
23707
|
+
part="${pt.parts.spinner}"
|
|
23790
23708
|
class="rtg-icon-inline-${this.spinnerAlign}"
|
|
23791
23709
|
></rtg-spinner>
|
|
23792
23710
|
` : g;
|
|
@@ -23795,7 +23713,7 @@ let ct = class extends v {
|
|
|
23795
23713
|
return d`
|
|
23796
23714
|
<rtg-button
|
|
23797
23715
|
id="${this.rootId}"
|
|
23798
|
-
part="${
|
|
23716
|
+
part="${pt.parts.root}"
|
|
23799
23717
|
data-event="${this.event ?? g}"
|
|
23800
23718
|
data-loading="${this.isLoading ? "true" : g}"
|
|
23801
23719
|
variant="${this.variant}"
|
|
@@ -23809,43 +23727,43 @@ let ct = class extends v {
|
|
|
23809
23727
|
`;
|
|
23810
23728
|
}
|
|
23811
23729
|
};
|
|
23812
|
-
|
|
23813
|
-
|
|
23814
|
-
|
|
23815
|
-
|
|
23730
|
+
pt._ROOT = "passkey-button";
|
|
23731
|
+
pt._SPINNER = "spinner";
|
|
23732
|
+
pt.TAG = `sb-${pt._ROOT}`;
|
|
23733
|
+
pt.CLICK_EVENT = `${pt.TAG}:click`;
|
|
23816
23734
|
ye([
|
|
23817
23735
|
a({ type: String })
|
|
23818
|
-
],
|
|
23736
|
+
], pt.prototype, "seed", 2);
|
|
23819
23737
|
ye([
|
|
23820
23738
|
a({ attribute: "child-id", type: String })
|
|
23821
|
-
],
|
|
23739
|
+
], pt.prototype, "childId", 2);
|
|
23822
23740
|
ye([
|
|
23823
23741
|
a({ type: String })
|
|
23824
|
-
],
|
|
23742
|
+
], pt.prototype, "variant", 2);
|
|
23825
23743
|
ye([
|
|
23826
23744
|
a({ type: String })
|
|
23827
|
-
],
|
|
23745
|
+
], pt.prototype, "size", 2);
|
|
23828
23746
|
ye([
|
|
23829
23747
|
a({ type: String })
|
|
23830
|
-
],
|
|
23748
|
+
], pt.prototype, "label", 2);
|
|
23831
23749
|
ye([
|
|
23832
23750
|
a({ attribute: "spinner-align", type: String })
|
|
23833
|
-
],
|
|
23751
|
+
], pt.prototype, "spinnerAlign", 2);
|
|
23834
23752
|
ye([
|
|
23835
23753
|
a({ type: Boolean })
|
|
23836
|
-
],
|
|
23754
|
+
], pt.prototype, "disabled", 2);
|
|
23837
23755
|
ye([
|
|
23838
23756
|
a({ type: Boolean })
|
|
23839
|
-
],
|
|
23757
|
+
], pt.prototype, "loading", 2);
|
|
23840
23758
|
ye([
|
|
23841
23759
|
a({ type: String })
|
|
23842
|
-
],
|
|
23760
|
+
], pt.prototype, "event", 2);
|
|
23843
23761
|
ye([
|
|
23844
23762
|
x()
|
|
23845
|
-
],
|
|
23846
|
-
|
|
23763
|
+
], pt.prototype, "_loading", 2);
|
|
23764
|
+
pt = ye([
|
|
23847
23765
|
u("sb-passkey-button")
|
|
23848
|
-
],
|
|
23766
|
+
], pt);
|
|
23849
23767
|
const qm = {
|
|
23850
23768
|
apple: "Apple",
|
|
23851
23769
|
discord: "Discord",
|
|
@@ -23872,7 +23790,7 @@ var Hm = Object.defineProperty, Gm = Object.getOwnPropertyDescriptor, Kt = (t, e
|
|
|
23872
23790
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
23873
23791
|
return i && s && Hm(e, r, s), s;
|
|
23874
23792
|
};
|
|
23875
|
-
let
|
|
23793
|
+
let ht = class extends v {
|
|
23876
23794
|
constructor() {
|
|
23877
23795
|
super(...arguments), this.seed = Nt(), this.content = "icon-label", this.variant = "outline", this.size = "default", this.prompt = "Use", this.iconAlign = "start", this._loading = !1, this._handleClick = () => {
|
|
23878
23796
|
this.disabled || this.isLoading || (this._loading = !0, this._dispatchClick(), this._emitClickEvent());
|
|
@@ -23902,14 +23820,14 @@ let dt = class extends v {
|
|
|
23902
23820
|
* derived from the component's part name, `seed`, and `provider`.
|
|
23903
23821
|
*/
|
|
23904
23822
|
get rootId() {
|
|
23905
|
-
return this.childId ?? `sb-${
|
|
23823
|
+
return this.childId ?? `sb-${ht.parts.root}-${this.provider}-${this.seed}`;
|
|
23906
23824
|
}
|
|
23907
23825
|
/**
|
|
23908
23826
|
* The `id` of the icon (logo and spinner) element, derived from `rootId` with
|
|
23909
23827
|
* the icon part name appended.
|
|
23910
23828
|
*/
|
|
23911
23829
|
get iconId() {
|
|
23912
|
-
return `${this.rootId}-${
|
|
23830
|
+
return `${this.rootId}-${ht._ICON}`;
|
|
23913
23831
|
}
|
|
23914
23832
|
/**
|
|
23915
23833
|
* The `class` given to the icon part handling button alignment.
|
|
@@ -23939,7 +23857,7 @@ let dt = class extends v {
|
|
|
23939
23857
|
* Defines and dispatches the click event.
|
|
23940
23858
|
*/
|
|
23941
23859
|
_dispatchClick() {
|
|
23942
|
-
const t = new CustomEvent(
|
|
23860
|
+
const t = new CustomEvent(ht.clickEventName, {
|
|
23943
23861
|
detail: { id: this.rootId, provider: this.provider, event: this.event },
|
|
23944
23862
|
bubbles: !0,
|
|
23945
23863
|
composed: !0
|
|
@@ -23953,7 +23871,7 @@ let dt = class extends v {
|
|
|
23953
23871
|
if (this.event) {
|
|
23954
23872
|
this._loading || (this._loading = !0);
|
|
23955
23873
|
try {
|
|
23956
|
-
await
|
|
23874
|
+
await Ct.processLoginflowEvent({ event: this.event });
|
|
23957
23875
|
} finally {
|
|
23958
23876
|
this._loading = !1;
|
|
23959
23877
|
}
|
|
@@ -23966,7 +23884,7 @@ let dt = class extends v {
|
|
|
23966
23884
|
return d`
|
|
23967
23885
|
<svg
|
|
23968
23886
|
id="${this.iconId}"
|
|
23969
|
-
part="${
|
|
23887
|
+
part="${ht.parts.icon}"
|
|
23970
23888
|
data-icon="logo"
|
|
23971
23889
|
data-provider="${this.provider}"
|
|
23972
23890
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -23985,7 +23903,7 @@ let dt = class extends v {
|
|
|
23985
23903
|
return d`
|
|
23986
23904
|
<rtg-spinner
|
|
23987
23905
|
id="${this.iconId}"
|
|
23988
|
-
part="${
|
|
23906
|
+
part="${ht.parts.icon}"
|
|
23989
23907
|
data-icon="spinner"
|
|
23990
23908
|
class="${this.iconCn}"
|
|
23991
23909
|
></rtg-spinner>
|
|
@@ -24003,7 +23921,7 @@ let dt = class extends v {
|
|
|
24003
23921
|
return d`
|
|
24004
23922
|
<rtg-button
|
|
24005
23923
|
id="${this.rootId}"
|
|
24006
|
-
part="${
|
|
23924
|
+
part="${ht.parts.root}"
|
|
24007
23925
|
data-provider="${this.provider}"
|
|
24008
23926
|
data-content="${this.content}"
|
|
24009
23927
|
data-event="${this.event}"
|
|
@@ -24020,50 +23938,50 @@ let dt = class extends v {
|
|
|
24020
23938
|
`;
|
|
24021
23939
|
}
|
|
24022
23940
|
};
|
|
24023
|
-
|
|
24024
|
-
|
|
23941
|
+
ht._ROOT = "provider-button";
|
|
23942
|
+
ht._ICON = "icon";
|
|
24025
23943
|
Kt([
|
|
24026
23944
|
a({ type: String })
|
|
24027
|
-
],
|
|
23945
|
+
], ht.prototype, "seed", 2);
|
|
24028
23946
|
Kt([
|
|
24029
23947
|
a({ attribute: "child-id", type: String })
|
|
24030
|
-
],
|
|
23948
|
+
], ht.prototype, "childId", 2);
|
|
24031
23949
|
Kt([
|
|
24032
23950
|
a({ type: String })
|
|
24033
|
-
],
|
|
23951
|
+
], ht.prototype, "provider", 2);
|
|
24034
23952
|
Kt([
|
|
24035
23953
|
a({ type: String })
|
|
24036
|
-
],
|
|
23954
|
+
], ht.prototype, "content", 2);
|
|
24037
23955
|
Kt([
|
|
24038
23956
|
a({ type: String })
|
|
24039
|
-
],
|
|
23957
|
+
], ht.prototype, "variant", 2);
|
|
24040
23958
|
Kt([
|
|
24041
23959
|
a({ type: String })
|
|
24042
|
-
],
|
|
23960
|
+
], ht.prototype, "size", 2);
|
|
24043
23961
|
Kt([
|
|
24044
23962
|
a({ type: String })
|
|
24045
|
-
],
|
|
23963
|
+
], ht.prototype, "prompt", 2);
|
|
24046
23964
|
Kt([
|
|
24047
23965
|
a({ attribute: "icon-align", type: String })
|
|
24048
|
-
],
|
|
23966
|
+
], ht.prototype, "iconAlign", 2);
|
|
24049
23967
|
Kt([
|
|
24050
23968
|
a({ type: String })
|
|
24051
|
-
],
|
|
23969
|
+
], ht.prototype, "label", 2);
|
|
24052
23970
|
Kt([
|
|
24053
23971
|
a({ type: Boolean })
|
|
24054
|
-
],
|
|
23972
|
+
], ht.prototype, "disabled", 2);
|
|
24055
23973
|
Kt([
|
|
24056
23974
|
a({ type: Boolean })
|
|
24057
|
-
],
|
|
23975
|
+
], ht.prototype, "loading", 2);
|
|
24058
23976
|
Kt([
|
|
24059
23977
|
a({ type: String })
|
|
24060
|
-
],
|
|
23978
|
+
], ht.prototype, "event", 2);
|
|
24061
23979
|
Kt([
|
|
24062
23980
|
x()
|
|
24063
|
-
],
|
|
24064
|
-
|
|
23981
|
+
], ht.prototype, "_loading", 2);
|
|
23982
|
+
ht = Kt([
|
|
24065
23983
|
u("sb-provider-button")
|
|
24066
|
-
],
|
|
23984
|
+
], ht);
|
|
24067
23985
|
var Km = Object.defineProperty, Wm = Object.getOwnPropertyDescriptor, Wt = (t, e, r, i) => {
|
|
24068
23986
|
for (var s = i > 1 ? void 0 : i ? Wm(e, r) : e, o = t.length - 1, n; o >= 0; o--)
|
|
24069
23987
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
@@ -25407,7 +25325,7 @@ let sr = class extends v {
|
|
|
25407
25325
|
`;
|
|
25408
25326
|
}
|
|
25409
25327
|
render() {
|
|
25410
|
-
var y, w, E, C, S, k, T,
|
|
25328
|
+
var y, w, E, C, S, k, T, A, z, J, Y, at, gt, jt;
|
|
25411
25329
|
const t = [
|
|
25412
25330
|
{ label: "Username", value: this.personal.username },
|
|
25413
25331
|
{ label: "First name", value: this.personal.first },
|
|
@@ -25425,7 +25343,7 @@ let sr = class extends v {
|
|
|
25425
25343
|
), h = O(
|
|
25426
25344
|
zo,
|
|
25427
25345
|
{},
|
|
25428
|
-
(J = (z = (
|
|
25346
|
+
(J = (z = (A = (T = (k = this.customizations) == null ? void 0 : k.byType) == null ? void 0 : T.userProfile) == null ? void 0 : A.userProfileCard) == null ? void 0 : z.header) == null ? void 0 : J.title,
|
|
25429
25347
|
F.USER_PROFILE_CARD_HEADER_CONTAINER,
|
|
25430
25348
|
this.customizations
|
|
25431
25349
|
), p = this.getLabelStyles(), b = this.isEditing ? r : e;
|
|
@@ -25443,7 +25361,7 @@ let sr = class extends v {
|
|
|
25443
25361
|
customClass=${h.class}
|
|
25444
25362
|
customStyle=${R(h.style)}
|
|
25445
25363
|
>
|
|
25446
|
-
${(Y = this.content) != null && Y.icon ? (
|
|
25364
|
+
${(Y = this.content) != null && Y.icon ? (at = this.content) == null ? void 0 : at.icon : gb()}
|
|
25447
25365
|
|
|
25448
25366
|
<span>
|
|
25449
25367
|
${(gt = this.content) != null && gt.title ? (jt = this.content) == null ? void 0 : jt.title : "Personal Info"}
|
|
@@ -25627,7 +25545,7 @@ let or = class extends v {
|
|
|
25627
25545
|
`;
|
|
25628
25546
|
}
|
|
25629
25547
|
render() {
|
|
25630
|
-
var y, w, E, C, S, k, T,
|
|
25548
|
+
var y, w, E, C, S, k, T, A, z, J, Y, at;
|
|
25631
25549
|
const t = [
|
|
25632
25550
|
{ label: "Location", value: this.locationInfo.location },
|
|
25633
25551
|
{ label: "Zone Info", value: this.locationInfo.zoneInfo }
|
|
@@ -25640,7 +25558,7 @@ let or = class extends v {
|
|
|
25640
25558
|
), h = O(
|
|
25641
25559
|
zo,
|
|
25642
25560
|
{},
|
|
25643
|
-
(J = (z = (
|
|
25561
|
+
(J = (z = (A = (T = (k = this.customizations) == null ? void 0 : k.byType) == null ? void 0 : T.userProfile) == null ? void 0 : A.userProfileCard) == null ? void 0 : z.header) == null ? void 0 : J.title,
|
|
25644
25562
|
F.USER_PROFILE_CARD_HEADER_CONTAINER,
|
|
25645
25563
|
this.customizations
|
|
25646
25564
|
), p = this.getLabelStyles(), b = this.isEditing ? r : e;
|
|
@@ -25660,7 +25578,7 @@ let or = class extends v {
|
|
|
25660
25578
|
>
|
|
25661
25579
|
${(Y = this.content) != null && Y.icon ? this.content.icon : mb()}
|
|
25662
25580
|
<span>
|
|
25663
|
-
${(
|
|
25581
|
+
${(at = this.content) != null && at.title ? this.content.title : "Location"}
|
|
25664
25582
|
</span>
|
|
25665
25583
|
</rtg-card-title>
|
|
25666
25584
|
${this.isEditing ? null : d`
|
|
@@ -25843,7 +25761,7 @@ let nr = class extends v {
|
|
|
25843
25761
|
`;
|
|
25844
25762
|
}
|
|
25845
25763
|
render() {
|
|
25846
|
-
var y, w, E, C, S, k, T,
|
|
25764
|
+
var y, w, E, C, S, k, T, A, z, J, Y, at;
|
|
25847
25765
|
const t = [{ label: "Website", value: this.URLsInfo.website }], e = this.getContainerStyles(!1), r = this.getContainerStyles(!0), { defaultMapped: i, outlineMapped: s, ghostMapped: o } = this.getButtonStyles(), n = O(
|
|
25848
25766
|
No,
|
|
25849
25767
|
{},
|
|
@@ -25853,7 +25771,7 @@ let nr = class extends v {
|
|
|
25853
25771
|
), h = O(
|
|
25854
25772
|
zo,
|
|
25855
25773
|
{},
|
|
25856
|
-
(J = (z = (
|
|
25774
|
+
(J = (z = (A = (T = (k = this.customizations) == null ? void 0 : k.byType) == null ? void 0 : T.userProfile) == null ? void 0 : A.userProfileCard) == null ? void 0 : z.header) == null ? void 0 : J.title,
|
|
25857
25775
|
F.USER_PROFILE_CARD_HEADER_CONTAINER,
|
|
25858
25776
|
this.customizations
|
|
25859
25777
|
), p = this.getLabelStyles(), b = this.isEditing ? r : e;
|
|
@@ -25872,7 +25790,7 @@ let nr = class extends v {
|
|
|
25872
25790
|
customStyle=${R(h.style)}
|
|
25873
25791
|
>
|
|
25874
25792
|
${(Y = this.content) != null && Y.icon ? this.content.icon : bb()}
|
|
25875
|
-
<span>${((
|
|
25793
|
+
<span>${((at = this.content) == null ? void 0 : at.title) ?? "URLs"}</span>
|
|
25876
25794
|
</rtg-card-title>
|
|
25877
25795
|
|
|
25878
25796
|
${this.isEditing ? null : d`
|
|
@@ -25943,7 +25861,7 @@ var Rb = Object.defineProperty, Ob = Object.getOwnPropertyDescriptor, Tt = (t, e
|
|
|
25943
25861
|
(n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
|
|
25944
25862
|
return i && s && Rb(e, r, s), s;
|
|
25945
25863
|
};
|
|
25946
|
-
let
|
|
25864
|
+
let Rt = class extends v {
|
|
25947
25865
|
constructor() {
|
|
25948
25866
|
super(...arguments), this.showAvatarMenu = !1, this.customizations = null, this.showIcons = !0, this.orientation = pe.HORIZONTAL, this.sidebarDisplayType = ne.REGULAR, this.mode = er == null ? void 0 : er.PAGE, this.widgetsLayout = Gt.ROW, this.content = null;
|
|
25949
25867
|
}
|
|
@@ -25991,55 +25909,55 @@ let Et = class extends v {
|
|
|
25991
25909
|
};
|
|
25992
25910
|
Tt([
|
|
25993
25911
|
a({ type: Object })
|
|
25994
|
-
],
|
|
25912
|
+
], Rt.prototype, "account", 2);
|
|
25995
25913
|
Tt([
|
|
25996
25914
|
a({ type: Object })
|
|
25997
|
-
],
|
|
25915
|
+
], Rt.prototype, "personal", 2);
|
|
25998
25916
|
Tt([
|
|
25999
25917
|
a({ type: Object })
|
|
26000
|
-
],
|
|
25918
|
+
], Rt.prototype, "location", 2);
|
|
26001
25919
|
Tt([
|
|
26002
25920
|
a({ type: Object })
|
|
26003
|
-
],
|
|
25921
|
+
], Rt.prototype, "urls", 2);
|
|
26004
25922
|
Tt([
|
|
26005
25923
|
a({ type: Boolean })
|
|
26006
|
-
],
|
|
25924
|
+
], Rt.prototype, "showAvatarMenu", 2);
|
|
26007
25925
|
Tt([
|
|
26008
25926
|
a({ type: Object })
|
|
26009
|
-
],
|
|
25927
|
+
], Rt.prototype, "customizations", 2);
|
|
26010
25928
|
Tt([
|
|
26011
25929
|
a({ type: Boolean })
|
|
26012
|
-
],
|
|
25930
|
+
], Rt.prototype, "showIcons", 2);
|
|
26013
25931
|
Tt([
|
|
26014
25932
|
a({ attribute: !1 })
|
|
26015
|
-
],
|
|
25933
|
+
], Rt.prototype, "modalIcon", 2);
|
|
26016
25934
|
Tt([
|
|
26017
25935
|
a({ type: String })
|
|
26018
|
-
],
|
|
25936
|
+
], Rt.prototype, "orientation", 2);
|
|
26019
25937
|
Tt([
|
|
26020
25938
|
a({ type: String })
|
|
26021
|
-
],
|
|
25939
|
+
], Rt.prototype, "sidebarDisplayType", 2);
|
|
26022
25940
|
Tt([
|
|
26023
25941
|
a({ type: String })
|
|
26024
|
-
],
|
|
25942
|
+
], Rt.prototype, "mode", 2);
|
|
26025
25943
|
Tt([
|
|
26026
25944
|
a({ type: String })
|
|
26027
|
-
],
|
|
25945
|
+
], Rt.prototype, "widgetsLayout", 2);
|
|
26028
25946
|
Tt([
|
|
26029
25947
|
a({ type: Function })
|
|
26030
|
-
],
|
|
25948
|
+
], Rt.prototype, "toggleAvatarMenu", 2);
|
|
26031
25949
|
Tt([
|
|
26032
25950
|
a({ type: Function })
|
|
26033
|
-
],
|
|
25951
|
+
], Rt.prototype, "onAvatarChange", 2);
|
|
26034
25952
|
Tt([
|
|
26035
25953
|
a({ type: Function })
|
|
26036
|
-
],
|
|
25954
|
+
], Rt.prototype, "onAvatarRemove", 2);
|
|
26037
25955
|
Tt([
|
|
26038
25956
|
a({ type: Object })
|
|
26039
|
-
],
|
|
26040
|
-
|
|
25957
|
+
], Rt.prototype, "content", 2);
|
|
25958
|
+
Rt = Tt([
|
|
26041
25959
|
u("sb-profile")
|
|
26042
|
-
],
|
|
25960
|
+
], Rt);
|
|
26043
25961
|
const Ib = "!sb-bg-background", gc = {
|
|
26044
25962
|
vertical: "sb-justify-between sb-w-full",
|
|
26045
25963
|
horizontal: "sb-flex-col !sb-items-start sb-mx-4 md:sb-ml-6"
|
|
@@ -26487,7 +26405,7 @@ let os = class extends v {
|
|
|
26487
26405
|
}
|
|
26488
26406
|
async waitForAuthConfigured(t = 5e3) {
|
|
26489
26407
|
var i;
|
|
26490
|
-
const e =
|
|
26408
|
+
const e = Ct ?? ((i = window.__saasbaseCoreSdk) == null ? void 0 : i.Auth);
|
|
26491
26409
|
if (!e || e.__configured) return;
|
|
26492
26410
|
const r = e.__whenConfigured;
|
|
26493
26411
|
r && await Promise.race([
|
|
@@ -26500,7 +26418,7 @@ let os = class extends v {
|
|
|
26500
26418
|
if (super.connectedCallback(), !this.__flowInitAttempted && (this.__flowInitAttempted = !0, await this.waitForAuthConfigured(), !this.__flowStarted)) {
|
|
26501
26419
|
this.__flowStarted = !0;
|
|
26502
26420
|
try {
|
|
26503
|
-
const e = await
|
|
26421
|
+
const e = await Ct.startLoginflow("signin-flow-passkey");
|
|
26504
26422
|
console.log(
|
|
26505
26423
|
e.isResumed ? "Resumed login flow" : "Started new login flow"
|
|
26506
26424
|
);
|
|
@@ -26508,14 +26426,14 @@ let os = class extends v {
|
|
|
26508
26426
|
if (console.error("Sign-in flow init failed:", e), e && typeof e.message == "string" && e.message.includes("Auth.configure() must be called")) {
|
|
26509
26427
|
this.__saasbaseFailedForConfig = !0;
|
|
26510
26428
|
try {
|
|
26511
|
-
const r =
|
|
26429
|
+
const r = Ct ?? ((t = window.__saasbaseCoreSdk) == null ? void 0 : t.Auth), i = r == null ? void 0 : r.__whenConfigured;
|
|
26512
26430
|
if (i) {
|
|
26513
26431
|
await Promise.race([
|
|
26514
26432
|
i,
|
|
26515
26433
|
new Promise((s) => setTimeout(s, 1e4))
|
|
26516
26434
|
]);
|
|
26517
26435
|
try {
|
|
26518
|
-
const s = await
|
|
26436
|
+
const s = await Ct.startLoginflow("signin-flow-passkey");
|
|
26519
26437
|
console.log(
|
|
26520
26438
|
s.isResumed ? "Resumed login flow" : "Started new login flow"
|
|
26521
26439
|
);
|
|
@@ -26587,7 +26505,7 @@ let ns = class extends v {
|
|
|
26587
26505
|
}
|
|
26588
26506
|
async waitForAuthConfigured(t = 5e3) {
|
|
26589
26507
|
var i;
|
|
26590
|
-
const e =
|
|
26508
|
+
const e = Ct ?? ((i = window.__saasbaseCoreSdk) == null ? void 0 : i.Auth);
|
|
26591
26509
|
if (!e || e.__configured) return;
|
|
26592
26510
|
const r = e.__whenConfigured;
|
|
26593
26511
|
r && await Promise.race([
|
|
@@ -26600,7 +26518,7 @@ let ns = class extends v {
|
|
|
26600
26518
|
if (super.connectedCallback(), !this.__flowInitAttempted && (this.__flowInitAttempted = !0, await this.waitForAuthConfigured(), !this.__flowStarted)) {
|
|
26601
26519
|
this.__flowStarted = !0;
|
|
26602
26520
|
try {
|
|
26603
|
-
const e = await
|
|
26521
|
+
const e = await Ct.startLoginflow("signup-flow");
|
|
26604
26522
|
console.log(
|
|
26605
26523
|
e.isResumed ? "Resumed signup flow" : "Started new signup flow"
|
|
26606
26524
|
);
|
|
@@ -26608,14 +26526,14 @@ let ns = class extends v {
|
|
|
26608
26526
|
if (console.error("Sign-up flow init failed:", e), e && typeof e.message == "string" && e.message.includes("Auth.configure() must be called")) {
|
|
26609
26527
|
this.__saasbaseFailedForConfig = !0;
|
|
26610
26528
|
try {
|
|
26611
|
-
const r =
|
|
26529
|
+
const r = Ct ?? ((t = window.__saasbaseCoreSdk) == null ? void 0 : t.Auth), i = r == null ? void 0 : r.__whenConfigured;
|
|
26612
26530
|
if (i) {
|
|
26613
26531
|
await Promise.race([
|
|
26614
26532
|
i,
|
|
26615
26533
|
new Promise((s) => setTimeout(s, 1e4))
|
|
26616
26534
|
]);
|
|
26617
26535
|
try {
|
|
26618
|
-
const s = await
|
|
26536
|
+
const s = await Ct.startLoginflow("signup-flow");
|
|
26619
26537
|
console.log(
|
|
26620
26538
|
s.isResumed ? "Resumed signup flow" : "Started new signup flow"
|
|
26621
26539
|
);
|
|
@@ -26785,7 +26703,7 @@ let je = class extends v {
|
|
|
26785
26703
|
// --- everything else stays the same ---
|
|
26786
26704
|
animateHeight() {
|
|
26787
26705
|
var h, p;
|
|
26788
|
-
const e = (((p = (h = this.customizations) == null ? void 0 : h.config) == null ? void 0 : p.breakpoints) ??
|
|
26706
|
+
const e = (((p = (h = this.customizations) == null ? void 0 : h.config) == null ? void 0 : p.breakpoints) ?? Ot).sm, r = e ? parseInt(e.toString().replace(/\D/g, ""), 10) : 640;
|
|
26789
26707
|
if (window.innerWidth <= r)
|
|
26790
26708
|
return;
|
|
26791
26709
|
const s = this.renderRoot.querySelector("#root-container");
|
|
@@ -26834,13 +26752,13 @@ let je = class extends v {
|
|
|
26834
26752
|
var r, i;
|
|
26835
26753
|
if (e.element_type === "html")
|
|
26836
26754
|
try {
|
|
26837
|
-
await
|
|
26755
|
+
await Ct.processLoginflowEvent({ event: t, data: {} });
|
|
26838
26756
|
} finally {
|
|
26839
26757
|
this.eventEmitting = !1;
|
|
26840
26758
|
}
|
|
26841
26759
|
else if (e.element_type === "otp")
|
|
26842
26760
|
try {
|
|
26843
|
-
await
|
|
26761
|
+
await Ct.processLoginflowEvent({
|
|
26844
26762
|
event: t,
|
|
26845
26763
|
data: this.formData
|
|
26846
26764
|
});
|
|
@@ -26860,7 +26778,7 @@ let je = class extends v {
|
|
|
26860
26778
|
)) ?? !1)) {
|
|
26861
26779
|
this.loadingButtons = { ...this.loadingButtons, [e.id]: !0 }, this.eventEmitting = !0;
|
|
26862
26780
|
try {
|
|
26863
|
-
await
|
|
26781
|
+
await Ct.processLoginflowEvent({
|
|
26864
26782
|
event: t,
|
|
26865
26783
|
data: this.formData
|
|
26866
26784
|
});
|
|
@@ -26961,7 +26879,7 @@ let lr = class extends v {
|
|
|
26961
26879
|
super.connectedCallback(), fg(), (async () => {
|
|
26962
26880
|
for (; !this.env || !this.env.domain; )
|
|
26963
26881
|
await new Promise((e) => setTimeout(e, 20));
|
|
26964
|
-
|
|
26882
|
+
Ct.configure({
|
|
26965
26883
|
domain: this.env.domain,
|
|
26966
26884
|
appId: this.env.appId,
|
|
26967
26885
|
clientSecret: this.env.clientSecret ?? "",
|
|
@@ -26978,7 +26896,7 @@ let lr = class extends v {
|
|
|
26978
26896
|
}
|
|
26979
26897
|
updated(t) {
|
|
26980
26898
|
var e;
|
|
26981
|
-
super.updated(t), t.has("customizations") && (this.providedCustomizations = this.customizations), t.has("env") && (e = this.env) != null && e.domain &&
|
|
26899
|
+
super.updated(t), t.has("customizations") && (this.providedCustomizations = this.customizations), t.has("env") && (e = this.env) != null && e.domain && Ct.configure({
|
|
26982
26900
|
domain: this.env.domain,
|
|
26983
26901
|
appId: this.env.appId,
|
|
26984
26902
|
clientSecret: this.env.clientSecret ?? "",
|
|
@@ -27001,7 +26919,7 @@ let lr = class extends v {
|
|
|
27001
26919
|
}
|
|
27002
26920
|
}
|
|
27003
26921
|
refreshAuthState() {
|
|
27004
|
-
this.auth = { isAuthenticated:
|
|
26922
|
+
this.auth = { isAuthenticated: Ct.isAuthenticated() };
|
|
27005
26923
|
}
|
|
27006
26924
|
};
|
|
27007
26925
|
ti([
|
|
@@ -27119,13 +27037,13 @@ as = Ko([
|
|
|
27119
27037
|
u("sb-authenticated")
|
|
27120
27038
|
], as);
|
|
27121
27039
|
function ff() {
|
|
27122
|
-
return
|
|
27040
|
+
return Ct;
|
|
27123
27041
|
}
|
|
27124
27042
|
export {
|
|
27125
27043
|
De as BaseElement,
|
|
27126
27044
|
no as LinearLoader,
|
|
27127
27045
|
ss as PreviewComponent,
|
|
27128
|
-
|
|
27046
|
+
Rt as Profile,
|
|
27129
27047
|
je as SaasBaseLayout,
|
|
27130
27048
|
At as SbAccountInfo,
|
|
27131
27049
|
as as SbAuthenticated,
|
|
@@ -27138,11 +27056,11 @@ export {
|
|
|
27138
27056
|
Ji as SbCountdownRenderer,
|
|
27139
27057
|
so as SbDividerRenderer,
|
|
27140
27058
|
D as SbEmailField,
|
|
27141
|
-
|
|
27059
|
+
St as SbError,
|
|
27142
27060
|
lo as SbErrorRenderer,
|
|
27143
27061
|
yt as SbForm,
|
|
27144
27062
|
ir as SbFormSeparator,
|
|
27145
|
-
|
|
27063
|
+
lt as SbFormSubmit,
|
|
27146
27064
|
Z as SbFormSwitch,
|
|
27147
27065
|
es as SbGap,
|
|
27148
27066
|
ho as SbGapRenderer,
|
|
@@ -27156,15 +27074,15 @@ export {
|
|
|
27156
27074
|
or as SbLocationInfo,
|
|
27157
27075
|
rs as SbLogo,
|
|
27158
27076
|
ts as SbLogoRenderer,
|
|
27159
|
-
|
|
27077
|
+
L as SbNameField,
|
|
27160
27078
|
be as SbOtp,
|
|
27161
27079
|
ao as SbOtpRenderer,
|
|
27162
|
-
|
|
27163
|
-
|
|
27080
|
+
pt as SbPasskeyButton,
|
|
27081
|
+
I as SbPasswordField,
|
|
27164
27082
|
sr as SbPersonalInfo,
|
|
27165
27083
|
U as SbPhoneField,
|
|
27166
27084
|
lr as SbProvider,
|
|
27167
|
-
|
|
27085
|
+
ht as SbProviderButton,
|
|
27168
27086
|
wt as SbProviderField,
|
|
27169
27087
|
os as SbSignIn,
|
|
27170
27088
|
ns as SbSignUp,
|
|
@@ -27175,7 +27093,7 @@ export {
|
|
|
27175
27093
|
yo as SbTitle,
|
|
27176
27094
|
nr as SbUrlsInfo,
|
|
27177
27095
|
we as SbUserProfile,
|
|
27178
|
-
|
|
27096
|
+
P as SbUsernameField,
|
|
27179
27097
|
qt as SbWatermark,
|
|
27180
27098
|
go as SbWatermarkRenderer,
|
|
27181
27099
|
ia as SignedIn,
|