@webority/ui-elements 0.11.1 → 0.11.2
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/ui-elements.global.js +24 -24
- package/dist/ui-elements.js +86 -56
- package/package.json +3 -3
package/dist/ui-elements.js
CHANGED
|
@@ -3106,6 +3106,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3106
3106
|
AR: [
|
|
3107
3107
|
"America/Argentina/Buenos_Aires",
|
|
3108
3108
|
"America/Argentina/Catamarca",
|
|
3109
|
+
"America/Argentina/ComodRivadavia",
|
|
3109
3110
|
"America/Argentina/Cordoba",
|
|
3110
3111
|
"America/Argentina/Jujuy",
|
|
3111
3112
|
"America/Argentina/La_Rioja",
|
|
@@ -3120,7 +3121,8 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3120
3121
|
"America/Catamarca",
|
|
3121
3122
|
"America/Cordoba",
|
|
3122
3123
|
"America/Jujuy",
|
|
3123
|
-
"America/Mendoza"
|
|
3124
|
+
"America/Mendoza",
|
|
3125
|
+
"America/Rosario"
|
|
3124
3126
|
],
|
|
3125
3127
|
AS: [
|
|
3126
3128
|
"Pacific/Pago_Pago",
|
|
@@ -3133,6 +3135,8 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3133
3135
|
"Australia/Adelaide",
|
|
3134
3136
|
"Australia/Brisbane",
|
|
3135
3137
|
"Australia/Broken_Hill",
|
|
3138
|
+
"Australia/Canberra",
|
|
3139
|
+
"Australia/Currie",
|
|
3136
3140
|
"Australia/Darwin",
|
|
3137
3141
|
"Australia/Eucla",
|
|
3138
3142
|
"Australia/Hobart",
|
|
@@ -3180,6 +3184,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3180
3184
|
"America/Maceio",
|
|
3181
3185
|
"America/Manaus",
|
|
3182
3186
|
"America/Noronha",
|
|
3187
|
+
"America/Porto_Acre",
|
|
3183
3188
|
"America/Porto_Velho",
|
|
3184
3189
|
"America/Recife",
|
|
3185
3190
|
"America/Rio_Branco",
|
|
@@ -3194,7 +3199,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3194
3199
|
BW: ["Africa/Gaborone"],
|
|
3195
3200
|
BY: ["Europe/Minsk"],
|
|
3196
3201
|
BZ: ["America/Belize"],
|
|
3197
|
-
CA: /* @__PURE__ */ "America/Atikokan.America/Blanc-Sablon.America/Cambridge_Bay.America/Creston.America/Dawson.America/Dawson_Creek.America/Edmonton.America/Fort_Nelson.America/Glace_Bay.America/Goose_Bay.America/Halifax.America/Inuvik.America/Iqaluit.America/Moncton.America/Rankin_Inlet.America/Regina.America/Resolute.America/St_Johns.America/Swift_Current.America/Toronto.America/Vancouver.America/Whitehorse.America/Winnipeg.Canada/Atlantic.Canada/Central.Canada/Eastern.Canada/Mountain.Canada/Newfoundland.Canada/Pacific.Canada/Saskatchewan.Canada/Yukon".split("."),
|
|
3202
|
+
CA: /* @__PURE__ */ "America/Atikokan.America/Blanc-Sablon.America/Cambridge_Bay.America/Coral_Harbour.America/Creston.America/Dawson.America/Dawson_Creek.America/Edmonton.America/Fort_Nelson.America/Glace_Bay.America/Goose_Bay.America/Halifax.America/Inuvik.America/Iqaluit.America/Moncton.America/Montreal.America/Nipigon.America/Pangnirtung.America/Rainy_River.America/Rankin_Inlet.America/Regina.America/Resolute.America/St_Johns.America/Swift_Current.America/Thunder_Bay.America/Toronto.America/Vancouver.America/Whitehorse.America/Winnipeg.America/Yellowknife.Canada/Atlantic.Canada/Central.Canada/Eastern.Canada/Mountain.Canada/Newfoundland.Canada/Pacific.Canada/Saskatchewan.Canada/Yukon".split("."),
|
|
3198
3203
|
CC: ["Indian/Cocos"],
|
|
3199
3204
|
CD: ["Africa/Kinshasa", "Africa/Lubumbashi"],
|
|
3200
3205
|
CF: ["Africa/Bangui"],
|
|
@@ -3211,7 +3216,13 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3211
3216
|
"Pacific/Easter"
|
|
3212
3217
|
],
|
|
3213
3218
|
CM: ["Africa/Douala"],
|
|
3214
|
-
CN: [
|
|
3219
|
+
CN: [
|
|
3220
|
+
"Asia/Chongqing",
|
|
3221
|
+
"Asia/Harbin",
|
|
3222
|
+
"Asia/Kashgar",
|
|
3223
|
+
"Asia/Shanghai",
|
|
3224
|
+
"Asia/Urumqi"
|
|
3225
|
+
],
|
|
3215
3226
|
CO: ["America/Bogota"],
|
|
3216
3227
|
CR: ["America/Costa_Rica"],
|
|
3217
3228
|
CU: ["America/Havana"],
|
|
@@ -3249,12 +3260,13 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3249
3260
|
"Pacific/Kosrae",
|
|
3250
3261
|
"Pacific/Pohnpei",
|
|
3251
3262
|
"Pacific/Ponape",
|
|
3252
|
-
"Pacific/Truk"
|
|
3263
|
+
"Pacific/Truk",
|
|
3264
|
+
"Pacific/Yap"
|
|
3253
3265
|
],
|
|
3254
3266
|
FO: ["Atlantic/Faeroe", "Atlantic/Faroe"],
|
|
3255
3267
|
FR: ["Europe/Paris"],
|
|
3256
3268
|
GA: ["Africa/Libreville"],
|
|
3257
|
-
GB: ["Europe/London"],
|
|
3269
|
+
GB: ["Europe/Belfast", "Europe/London"],
|
|
3258
3270
|
GD: ["America/Grenada"],
|
|
3259
3271
|
GE: ["Asia/Tbilisi"],
|
|
3260
3272
|
GF: ["America/Cayenne"],
|
|
@@ -3290,7 +3302,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3290
3302
|
"Asia/Ujung_Pandang"
|
|
3291
3303
|
],
|
|
3292
3304
|
IE: ["Europe/Dublin"],
|
|
3293
|
-
IL: ["Asia/Jerusalem"],
|
|
3305
|
+
IL: ["Asia/Jerusalem", "Asia/Tel_Aviv"],
|
|
3294
3306
|
IM: ["Europe/Isle_of_Man"],
|
|
3295
3307
|
IN: ["Asia/Calcutta", "Asia/Kolkata"],
|
|
3296
3308
|
IO: ["Indian/Chagos"],
|
|
@@ -3306,6 +3318,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3306
3318
|
KG: ["Asia/Bishkek"],
|
|
3307
3319
|
KH: ["Asia/Phnom_Penh"],
|
|
3308
3320
|
KI: [
|
|
3321
|
+
"Pacific/Enderbury",
|
|
3309
3322
|
"Pacific/Kanton",
|
|
3310
3323
|
"Pacific/Kiritimati",
|
|
3311
3324
|
"Pacific/Tarawa"
|
|
@@ -3338,15 +3351,16 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3338
3351
|
LY: ["Africa/Tripoli"],
|
|
3339
3352
|
MA: ["Africa/Casablanca"],
|
|
3340
3353
|
MC: ["Europe/Monaco"],
|
|
3341
|
-
MD: ["Europe/Chisinau"],
|
|
3354
|
+
MD: ["Europe/Chisinau", "Europe/Tiraspol"],
|
|
3342
3355
|
ME: ["Europe/Podgorica"],
|
|
3343
3356
|
MF: ["America/Marigot"],
|
|
3344
3357
|
MG: ["Indian/Antananarivo"],
|
|
3345
3358
|
MH: ["Pacific/Kwajalein", "Pacific/Majuro"],
|
|
3346
3359
|
MK: ["Europe/Skopje"],
|
|
3347
|
-
ML: ["Africa/Bamako"],
|
|
3360
|
+
ML: ["Africa/Bamako", "Africa/Timbuktu"],
|
|
3348
3361
|
MM: ["Asia/Rangoon", "Asia/Yangon"],
|
|
3349
3362
|
MN: [
|
|
3363
|
+
"Asia/Choibalsan",
|
|
3350
3364
|
"Asia/Hovd",
|
|
3351
3365
|
"Asia/Ulaanbaatar",
|
|
3352
3366
|
"Asia/Ulan_Bator"
|
|
@@ -3365,6 +3379,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3365
3379
|
"America/Cancun",
|
|
3366
3380
|
"America/Chihuahua",
|
|
3367
3381
|
"America/Ciudad_Juarez",
|
|
3382
|
+
"America/Ensenada",
|
|
3368
3383
|
"America/Hermosillo",
|
|
3369
3384
|
"America/Matamoros",
|
|
3370
3385
|
"America/Mazatlan",
|
|
@@ -3372,6 +3387,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3372
3387
|
"America/Mexico_City",
|
|
3373
3388
|
"America/Monterrey",
|
|
3374
3389
|
"America/Ojinaga",
|
|
3390
|
+
"America/Santa_Isabel",
|
|
3375
3391
|
"America/Tijuana",
|
|
3376
3392
|
"Mexico/BajaNorte",
|
|
3377
3393
|
"Mexico/BajaSur",
|
|
@@ -3427,7 +3443,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3427
3443
|
SG: ["Asia/Singapore"],
|
|
3428
3444
|
SH: ["Atlantic/St_Helena"],
|
|
3429
3445
|
SI: ["Europe/Ljubljana"],
|
|
3430
|
-
SJ: ["Arctic/Longyearbyen"],
|
|
3446
|
+
SJ: ["Arctic/Longyearbyen", "Atlantic/Jan_Mayen"],
|
|
3431
3447
|
SK: ["Europe/Bratislava"],
|
|
3432
3448
|
SL: ["Africa/Freetown"],
|
|
3433
3449
|
SM: ["Europe/San_Marino"],
|
|
@@ -3458,10 +3474,12 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
|
|
|
3458
3474
|
UA: [
|
|
3459
3475
|
"Europe/Kiev",
|
|
3460
3476
|
"Europe/Kyiv",
|
|
3461
|
-
"Europe/Simferopol"
|
|
3477
|
+
"Europe/Simferopol",
|
|
3478
|
+
"Europe/Uzhgorod",
|
|
3479
|
+
"Europe/Zaporozhye"
|
|
3462
3480
|
],
|
|
3463
3481
|
UG: ["Africa/Kampala"],
|
|
3464
|
-
US: /* @__PURE__ */ "America/Adak.America/Anchorage.America/Boise.America/Chicago.America/Denver.America/Detroit.America/Indiana/Indianapolis.America/Indiana/Knox.America/Indiana/Marengo.America/Indiana/Petersburg.America/Indiana/Tell_City.America/Indiana/Vevay.America/Indiana/Vincennes.America/Indiana/Winamac.America/Indianapolis.America/Juneau.America/Kentucky/Louisville.America/Kentucky/Monticello.America/Knox_IN.America/Los_Angeles.America/Louisville.America/Menominee.America/Metlakatla.America/New_York.America/Nome.America/North_Dakota/Beulah.America/North_Dakota/Center.America/North_Dakota/New_Salem.America/Phoenix.America/Sitka.America/Yakutat.Pacific/Honolulu.US/Alaska.US/Aleutian.US/Arizona.US/Central.US/East-Indiana.US/Eastern.US/Hawaii.US/Indiana-Starke.US/Michigan.US/Mountain.US/Pacific".split("."),
|
|
3482
|
+
US: /* @__PURE__ */ "America/Adak.America/Anchorage.America/Atka.America/Boise.America/Chicago.America/Denver.America/Detroit.America/Fort_Wayne.America/Indiana/Indianapolis.America/Indiana/Knox.America/Indiana/Marengo.America/Indiana/Petersburg.America/Indiana/Tell_City.America/Indiana/Vevay.America/Indiana/Vincennes.America/Indiana/Winamac.America/Indianapolis.America/Juneau.America/Kentucky/Louisville.America/Kentucky/Monticello.America/Knox_IN.America/Los_Angeles.America/Louisville.America/Menominee.America/Metlakatla.America/New_York.America/Nome.America/North_Dakota/Beulah.America/North_Dakota/Center.America/North_Dakota/New_Salem.America/Phoenix.America/Shiprock.America/Sitka.America/Yakutat.Pacific/Honolulu.US/Alaska.US/Aleutian.US/Arizona.US/Central.US/East-Indiana.US/Eastern.US/Hawaii.US/Indiana-Starke.US/Michigan.US/Mountain.US/Pacific".split("."),
|
|
3465
3483
|
UY: ["America/Montevideo"],
|
|
3466
3484
|
UZ: ["Asia/Samarkand", "Asia/Tashkent"],
|
|
3467
3485
|
VA: ["Europe/Vatican"],
|
|
@@ -3561,7 +3579,15 @@ function Fe(e) {
|
|
|
3561
3579
|
return null;
|
|
3562
3580
|
}
|
|
3563
3581
|
}
|
|
3564
|
-
function Ie(e) {
|
|
3582
|
+
function Ie(e, t, n) {
|
|
3583
|
+
try {
|
|
3584
|
+
let r = B.parsePhoneNumber(t, e), i = r?.nationalNumber;
|
|
3585
|
+
return !i || r.country !== e || i.length > n || !t.endsWith(i) ? null : i;
|
|
3586
|
+
} catch {
|
|
3587
|
+
return null;
|
|
3588
|
+
}
|
|
3589
|
+
}
|
|
3590
|
+
function Le(e) {
|
|
3565
3591
|
if (!B || !e?.trim().startsWith("+")) return null;
|
|
3566
3592
|
try {
|
|
3567
3593
|
let t = new B.AsYouType();
|
|
@@ -3575,7 +3601,7 @@ function Ie(e) {
|
|
|
3575
3601
|
return null;
|
|
3576
3602
|
}
|
|
3577
3603
|
}
|
|
3578
|
-
var
|
|
3604
|
+
var Re = class extends e {
|
|
3579
3605
|
static formAssociated = !0;
|
|
3580
3606
|
static get observedAttributes() {
|
|
3581
3607
|
return [
|
|
@@ -3625,7 +3651,7 @@ var Le = class extends e {
|
|
|
3625
3651
|
return this._national ? `+${R(this._country)}${this._national}` : "";
|
|
3626
3652
|
}
|
|
3627
3653
|
set value(e) {
|
|
3628
|
-
let t = String(e ?? "").trim(), n =
|
|
3654
|
+
let t = String(e ?? "").trim(), n = Le(t);
|
|
3629
3655
|
if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
|
|
3630
3656
|
else if (t.startsWith("+")) {
|
|
3631
3657
|
let e = t.replace(/[^0-9]/g, ""), n = String(R(this._country));
|
|
@@ -3741,7 +3767,11 @@ var Le = class extends e {
|
|
|
3741
3767
|
o.addEventListener("input", (e) => {
|
|
3742
3768
|
e.stopPropagation();
|
|
3743
3769
|
let t = o.selectionStart ?? o.value.length, n = o.value.slice(0, t).replace(/[^0-9]/g, "").length, r = o.value.replace(/[^0-9]/g, ""), i = Fe(this._country);
|
|
3744
|
-
i && r.length > i
|
|
3770
|
+
if (i && r.length > i) {
|
|
3771
|
+
let e = Ie(this._country, r, i);
|
|
3772
|
+
e ? (n = Math.max(0, n - (r.length - e.length)), r = e) : r = r.slice(0, i);
|
|
3773
|
+
}
|
|
3774
|
+
this._national = r;
|
|
3745
3775
|
let a = V(this._country, this._national);
|
|
3746
3776
|
if (o.value !== a) {
|
|
3747
3777
|
o.value = a;
|
|
@@ -3752,7 +3782,7 @@ var Le = class extends e {
|
|
|
3752
3782
|
}), o.addEventListener("change", (e) => e.stopPropagation()), o.addEventListener("blur", () => {
|
|
3753
3783
|
x(this._national.length > 0 && Pe(this.value) === !1), this.value !== this._committedValue && this._emitChange();
|
|
3754
3784
|
}), o.addEventListener("paste", (e) => {
|
|
3755
|
-
let t =
|
|
3785
|
+
let t = Le(e.clipboardData?.getData("text"));
|
|
3756
3786
|
t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = V(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
|
|
3757
3787
|
}), this._bindGlobal = () => {
|
|
3758
3788
|
this._teardownGlobals?.(), this._onDocClick = (e) => {
|
|
@@ -3775,7 +3805,7 @@ var Le = class extends e {
|
|
|
3775
3805
|
disconnectedCallback() {
|
|
3776
3806
|
this._teardown();
|
|
3777
3807
|
}
|
|
3778
|
-
}, U = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"),
|
|
3808
|
+
}, U = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), ze = class extends e {
|
|
3779
3809
|
static formAssociated = !0;
|
|
3780
3810
|
static get observedAttributes() {
|
|
3781
3811
|
return [
|
|
@@ -3981,7 +4011,7 @@ var Le = class extends e {
|
|
|
3981
4011
|
disconnectedCallback() {
|
|
3982
4012
|
this._teardown();
|
|
3983
4013
|
}
|
|
3984
|
-
}, W = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"),
|
|
4014
|
+
}, W = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), Be = class extends e {
|
|
3985
4015
|
static formAssociated = !0;
|
|
3986
4016
|
static get observedAttributes() {
|
|
3987
4017
|
return [
|
|
@@ -4123,7 +4153,7 @@ var Le = class extends e {
|
|
|
4123
4153
|
aria-valuenow="${this._value}"
|
|
4124
4154
|
aria-valuetext="${this._formatValue(this._value)}"
|
|
4125
4155
|
${a ? "disabled" : ""}
|
|
4126
|
-
aria-label="${
|
|
4156
|
+
aria-label="${Ve(this.getAttribute("aria-label") || "Value")}"
|
|
4127
4157
|
></button>
|
|
4128
4158
|
`}
|
|
4129
4159
|
${this.hasAttribute("show-value") ? n ? `<span class="slider-value">${this._formatValue(this._start)} – ${this._formatValue(this._end)}</span>` : `<span class="slider-value">${this._formatValue(this._value)}</span>` : ""}
|
|
@@ -4226,7 +4256,7 @@ var Le = class extends e {
|
|
|
4226
4256
|
}, G = (e, t) => {
|
|
4227
4257
|
let n = Number.parseFloat(e);
|
|
4228
4258
|
return Number.isFinite(n) ? n : t;
|
|
4229
|
-
},
|
|
4259
|
+
}, Ve = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), He = class extends e {
|
|
4230
4260
|
static formAssociated = !0;
|
|
4231
4261
|
_accessibleName() {
|
|
4232
4262
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Add tags";
|
|
@@ -4311,7 +4341,7 @@ var Le = class extends e {
|
|
|
4311
4341
|
e.innerHTML = "";
|
|
4312
4342
|
return;
|
|
4313
4343
|
}
|
|
4314
|
-
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${
|
|
4344
|
+
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${Ue(e)}</span><button type="button" class="chip-remove" data-remove="${K(e)}" aria-label="Remove ${K(e)}">${p("x")}</button></span>`).join("");
|
|
4315
4345
|
}
|
|
4316
4346
|
}
|
|
4317
4347
|
_wire() {
|
|
@@ -4380,7 +4410,7 @@ var Le = class extends e {
|
|
|
4380
4410
|
disconnectedCallback() {
|
|
4381
4411
|
this._teardown();
|
|
4382
4412
|
}
|
|
4383
|
-
},
|
|
4413
|
+
}, Ue = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), K = (e) => String(e ?? "").replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), q = (e) => String(e).padStart(2, "0"), We = (e, t) => `${q(e)}:${q(t)}`, J = (e) => {
|
|
4384
4414
|
let t = /^(\d{2}):(\d{2})$/.exec(e || "");
|
|
4385
4415
|
return t ? {
|
|
4386
4416
|
h: +t[1],
|
|
@@ -4388,10 +4418,10 @@ var Le = class extends e {
|
|
|
4388
4418
|
} : null;
|
|
4389
4419
|
}, Y = (e, t = "24") => {
|
|
4390
4420
|
if (!e) return "";
|
|
4391
|
-
if (t === "24") return
|
|
4421
|
+
if (t === "24") return We(e.h, e.m);
|
|
4392
4422
|
let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
|
|
4393
4423
|
return `${n}:${q(e.m)} ${r}`;
|
|
4394
|
-
},
|
|
4424
|
+
}, Ge = class extends e {
|
|
4395
4425
|
static formAssociated = !0;
|
|
4396
4426
|
static get observedAttributes() {
|
|
4397
4427
|
return [
|
|
@@ -4476,7 +4506,7 @@ var Le = class extends e {
|
|
|
4476
4506
|
if (!e) return;
|
|
4477
4507
|
let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = J(this._value), i = this._focus, a = "";
|
|
4478
4508
|
for (let e = 0; e < n.length; e++) {
|
|
4479
|
-
let o = n[e], s =
|
|
4509
|
+
let o = n[e], s = We(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
|
|
4480
4510
|
a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${Y(o, t)}</button>`;
|
|
4481
4511
|
}
|
|
4482
4512
|
e.innerHTML = a, this._focusActive();
|
|
@@ -4575,7 +4605,7 @@ var Le = class extends e {
|
|
|
4575
4605
|
disconnectedCallback() {
|
|
4576
4606
|
this._teardown();
|
|
4577
4607
|
}
|
|
4578
|
-
},
|
|
4608
|
+
}, Ke = "wui-wizard-step", qe = class extends e {
|
|
4579
4609
|
static get observedAttributes() {
|
|
4580
4610
|
return [
|
|
4581
4611
|
"active",
|
|
@@ -4609,7 +4639,7 @@ var Le = class extends e {
|
|
|
4609
4639
|
this._beforeNext = typeof e == "function" ? e : null;
|
|
4610
4640
|
}
|
|
4611
4641
|
get _steps() {
|
|
4612
|
-
return [...this.querySelectorAll(`:scope > ${
|
|
4642
|
+
return [...this.querySelectorAll(`:scope > ${Ke}`)];
|
|
4613
4643
|
}
|
|
4614
4644
|
refresh() {
|
|
4615
4645
|
this._rendered && this._renderChrome();
|
|
@@ -4742,7 +4772,7 @@ var Le = class extends e {
|
|
|
4742
4772
|
_reflectActive(e) {
|
|
4743
4773
|
this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
|
|
4744
4774
|
}
|
|
4745
|
-
}, X = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"),
|
|
4775
|
+
}, X = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), Je = class extends e {
|
|
4746
4776
|
static get observedAttributes() {
|
|
4747
4777
|
return [
|
|
4748
4778
|
"label",
|
|
@@ -4756,8 +4786,8 @@ var Le = class extends e {
|
|
|
4756
4786
|
let e = this.closest("wui-wizard");
|
|
4757
4787
|
e && typeof e.refresh == "function" && e.refresh();
|
|
4758
4788
|
}
|
|
4759
|
-
},
|
|
4760
|
-
async function
|
|
4789
|
+
}, Ye = 2e3;
|
|
4790
|
+
async function Xe(e) {
|
|
4761
4791
|
try {
|
|
4762
4792
|
if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
|
|
4763
4793
|
} catch {}
|
|
@@ -4772,14 +4802,14 @@ async function Ye(e) {
|
|
|
4772
4802
|
}
|
|
4773
4803
|
//#endregion
|
|
4774
4804
|
//#region src/fileValidation.js
|
|
4775
|
-
var
|
|
4805
|
+
var Ze = "image/png,image/jpeg,image/webp", Qe = 5, $e = {
|
|
4776
4806
|
"image/png": [".png"],
|
|
4777
4807
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
4778
4808
|
"image/webp": [".webp"],
|
|
4779
4809
|
"image/gif": [".gif"],
|
|
4780
4810
|
"image/svg+xml": [".svg"],
|
|
4781
4811
|
"application/pdf": [".pdf"]
|
|
4782
|
-
},
|
|
4812
|
+
}, et = {
|
|
4783
4813
|
"image/png": "PNG",
|
|
4784
4814
|
"image/jpeg": "JPG",
|
|
4785
4815
|
"image/webp": "WEBP",
|
|
@@ -4793,7 +4823,7 @@ var Xe = "image/png,image/jpeg,image/webp", Ze = 5, Qe = {
|
|
|
4793
4823
|
".gif": "GIF",
|
|
4794
4824
|
".svg": "SVG",
|
|
4795
4825
|
".pdf": "PDF"
|
|
4796
|
-
}, Z = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean),
|
|
4826
|
+
}, Z = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), tt = [
|
|
4797
4827
|
".png",
|
|
4798
4828
|
".jpg",
|
|
4799
4829
|
".jpeg",
|
|
@@ -4804,35 +4834,35 @@ var Xe = "image/png,image/jpeg,image/webp", Ze = 5, Qe = {
|
|
|
4804
4834
|
".avif",
|
|
4805
4835
|
".heic"
|
|
4806
4836
|
];
|
|
4807
|
-
function
|
|
4837
|
+
function nt(e) {
|
|
4808
4838
|
if (!e) return !1;
|
|
4809
4839
|
let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
|
|
4810
4840
|
if (t) return t.startsWith("image/");
|
|
4811
4841
|
let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
|
|
4812
|
-
return
|
|
4842
|
+
return tt.some((e) => r.endsWith(e));
|
|
4813
4843
|
}
|
|
4814
|
-
function
|
|
4844
|
+
function rt(e) {
|
|
4815
4845
|
let t = Z(e);
|
|
4816
|
-
return t.length ? t.every((e) => e.startsWith(".") ?
|
|
4846
|
+
return t.length ? t.every((e) => e.startsWith(".") ? tt.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
|
|
4817
4847
|
}
|
|
4818
|
-
function
|
|
4848
|
+
function it(e) {
|
|
4819
4849
|
let t = [];
|
|
4820
4850
|
for (let n of Z(e)) {
|
|
4821
|
-
let e =
|
|
4851
|
+
let e = et[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
4822
4852
|
t.includes(e) || t.push(e);
|
|
4823
4853
|
}
|
|
4824
4854
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
4825
4855
|
}
|
|
4826
|
-
function
|
|
4856
|
+
function at(e, t) {
|
|
4827
4857
|
let n = Z(t);
|
|
4828
4858
|
if (!n.length) return !0;
|
|
4829
4859
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
4830
|
-
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (
|
|
4860
|
+
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && ($e[e] || []).some((e) => i.endsWith(e)));
|
|
4831
4861
|
}
|
|
4832
|
-
function
|
|
4862
|
+
function ot(e, t = {}) {
|
|
4833
4863
|
if (!e) return null;
|
|
4834
|
-
let n = t.accept === void 0 ?
|
|
4835
|
-
return
|
|
4864
|
+
let n = t.accept === void 0 ? Ze : t.accept, r = t.maxSizeMb || 5;
|
|
4865
|
+
return at(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${it(n)} file.`;
|
|
4836
4866
|
}
|
|
4837
4867
|
//#endregion
|
|
4838
4868
|
//#region src/passwordRules.js
|
|
@@ -4843,15 +4873,15 @@ var Q = {
|
|
|
4843
4873
|
digit: !0,
|
|
4844
4874
|
special: !0,
|
|
4845
4875
|
uniqueChars: 0
|
|
4846
|
-
},
|
|
4847
|
-
function
|
|
4876
|
+
}, st = "Password Requirements";
|
|
4877
|
+
function ct(e) {
|
|
4848
4878
|
return e === !0 || e == null ? { ...Q } : {
|
|
4849
4879
|
...Q,
|
|
4850
4880
|
...e
|
|
4851
4881
|
};
|
|
4852
4882
|
}
|
|
4853
|
-
function
|
|
4854
|
-
let t =
|
|
4883
|
+
function lt(e) {
|
|
4884
|
+
let t = ct(e), n = [];
|
|
4855
4885
|
if (t.minLength > 0 && n.push({
|
|
4856
4886
|
key: "length",
|
|
4857
4887
|
label: `At least ${t.minLength} characters long`,
|
|
@@ -4882,25 +4912,25 @@ function ct(e) {
|
|
|
4882
4912
|
}
|
|
4883
4913
|
return n;
|
|
4884
4914
|
}
|
|
4885
|
-
function
|
|
4915
|
+
function ut(e, t) {
|
|
4886
4916
|
let n = e == null ? "" : String(e);
|
|
4887
|
-
return
|
|
4917
|
+
return lt(t).map((e) => ({
|
|
4888
4918
|
key: e.key,
|
|
4889
4919
|
label: e.label,
|
|
4890
4920
|
met: e.test(n)
|
|
4891
4921
|
}));
|
|
4892
4922
|
}
|
|
4893
|
-
function
|
|
4894
|
-
return
|
|
4923
|
+
function dt(e, t) {
|
|
4924
|
+
return ut(e, t).every((e) => e.met);
|
|
4895
4925
|
}
|
|
4896
4926
|
//#endregion
|
|
4897
4927
|
//#region src/index.js
|
|
4898
4928
|
var $ = (e, t) => {
|
|
4899
4929
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
4900
4930
|
};
|
|
4901
|
-
function
|
|
4902
|
-
$("wui-select",
|
|
4931
|
+
function ft() {
|
|
4932
|
+
$("wui-select", ze), $("wui-phone", Re), $("wui-datepicker", ee), $("wui-date-range", te), $("wui-dock", ne), $("wui-feedback", oe), $("wui-slider", Be), $("wui-timepicker", Ge), $("wui-autocomplete", y), $("wui-multiselect", me), $("wui-taginput", He), $("wui-otp", Ce), $("wui-status-icon", r), $("wui-wizard-step", Je), $("wui-wizard", qe);
|
|
4903
4933
|
}
|
|
4904
|
-
|
|
4934
|
+
ft();
|
|
4905
4935
|
//#endregion
|
|
4906
|
-
export {
|
|
4936
|
+
export { Ye as COPY_FEEDBACK_MS, Ze as DEFAULT_IMAGE_ACCEPT, Qe as DEFAULT_MAX_SIZE_MB, Q as DEFAULT_PASSWORD_RULES, st as DEFAULT_REQUIREMENTS_TITLE, n as STATUS_TONES, y as WuiAutocomplete, ee as WuiDatePicker, te as WuiDateRange, ne as WuiDock, oe as WuiFeedback, me as WuiMultiSelect, Ce as WuiOtp, Re as WuiPhone, ze as WuiSelect, Be as WuiSlider, r as WuiStatusIcon, He as WuiTagInput, Ge as WuiTimePicker, qe as WuiWizard, Je as WuiWizardStep, it as acceptLabel, lt as buildPasswordRules, Xe as copyTextToClipboard, ft as defineWeborityElements, ut as evaluatePassword, p as glyphSvg, nt as isImageFile, rt as isImageOnlyAccept, at as matchesAccept, dt as passwordSatisfies, ot as validateFile };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-elements",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Webority framework-agnostic UI custom elements (<wui-*>) — the single implementation of the interactive components, styled by @webority/theme. Used natively in Razor and wrapped by @webority/ui-react.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"libphonenumber-js": "^1.13.9"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@vitest/coverage-v8": "^
|
|
33
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
34
34
|
"jsdom": "^26.0.0",
|
|
35
35
|
"vite": "^8.0.12",
|
|
36
|
-
"vitest": "^
|
|
36
|
+
"vitest": "^4.1.11"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "vite build && node ../../scripts/sync-rcl-assets.mjs elements",
|