@nldd/design-system 0.21.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +157 -2
- package/dist/cdn/autoloader.js +22 -22
- package/dist/cdn/chunks/{avatar-group-rknt4FBO.js → avatar-group-GinEMPm9.js} +1 -1
- package/dist/cdn/chunks/{combo-box-DyBQSaQl.js → combo-box-OywRKaWj.js} +1 -1
- package/dist/cdn/chunks/{date-field-Clti_wKN.js → date-field-vmZLo80s.js} +79 -71
- package/dist/cdn/chunks/{date-picker-2TCQLd5D.js → date-picker-CXDzSBoL.js} +1 -1
- package/dist/cdn/chunks/{document-tab-bar-CUc4WWY3.js → document-tab-bar-A2DFWrP9.js} +1 -1
- package/dist/cdn/chunks/{file-field-Bff6_1pp.js → file-field-DQ52qq5L.js} +1 -1
- package/dist/cdn/chunks/{identity-Cg1l0HhB.js → identity-BLXecYsZ.js} +1 -1
- package/dist/cdn/chunks/{menu-BOu_pD1Q.js → menu-BtxzRedh.js} +1 -1
- package/dist/cdn/chunks/{menu-bar-0NFXvq-v.js → menu-bar-BU3Hjk1b.js} +2 -2
- package/dist/cdn/chunks/{menu-bar-item-DGSC_ETi.js → menu-bar-item-C7LQ0NI_.js} +1 -1
- package/dist/cdn/chunks/{popover-C-CVVtfl.js → popover-CGbeEv_-.js} +31 -31
- package/dist/cdn/chunks/{return-focus-Xmagtk6r.js → return-focus-BzZWhXhc.js} +21 -16
- package/dist/cdn/chunks/{sheet-BdVCqm2H.js → sheet-CqN7ViYV.js} +1 -1
- package/dist/cdn/chunks/{sidebar-section-DP4jnS7g.js → sidebar-section-CFPBdETU.js} +1 -1
- package/dist/cdn/chunks/{split-button-BeXnOUTt.js → split-button-DH19p8So.js} +1 -1
- package/dist/cdn/chunks/{tab-bar-DmslEoPD.js → tab-bar-CA8K1XjU.js} +1 -1
- package/dist/cdn/chunks/{time-field-Cj5WojfO.js → time-field--5K0YTcr.js} +85 -75
- package/dist/cdn/chunks/{token-field-hvDB3l6O.js → token-field-BpyxOGmU.js} +1 -1
- package/dist/cdn/chunks/{toolbar-iNd1VmuG.js → toolbar-C24LqAzK.js} +1 -1
- package/dist/cdn/chunks/{top-navigation-bar-D1hjWIF3.js → top-navigation-bar-C_kLPVKD.js} +3 -3
- package/dist/cdn/chunks/{window-t5iFkMLY.js → window-CxV6ELE9.js} +1 -1
- package/dist/components/content/blockquote/blockquote.d.ts +1 -0
- package/dist/components/content/blockquote/blockquote.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.js +1 -0
- package/dist/components/content/blockquote/blockquote.js.map +1 -1
- package/dist/components/content/identity/identity.d.ts +1 -0
- package/dist/components/content/identity/identity.d.ts.map +1 -1
- package/dist/components/content/identity/identity.js +1 -0
- package/dist/components/content/identity/identity.js.map +1 -1
- package/dist/components/content/image/image.d.ts +1 -0
- package/dist/components/content/image/image.d.ts.map +1 -1
- package/dist/components/content/image/image.js +1 -0
- package/dist/components/content/image/image.js.map +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts +1 -0
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +1 -0
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/text/text.d.ts +1 -0
- package/dist/components/content/text/text.d.ts.map +1 -1
- package/dist/components/content/text/text.js +1 -0
- package/dist/components/content/text/text.js.map +1 -1
- package/dist/components/content/title/title.d.ts +1 -0
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +1 -0
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/forms/form/form.d.ts.map +1 -1
- package/dist/components/forms/form/form.js +1 -0
- package/dist/components/forms/form/form.js.map +1 -1
- package/dist/components/forms/form-field/form-field.d.ts +1 -0
- package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.js +1 -0
- package/dist/components/forms/form-field/form-field.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.d.ts +9 -4
- package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.js +20 -7
- package/dist/components/inputs/date-field/date-field.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.template.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.template.js +1 -0
- package/dist/components/inputs/date-field/date-field.template.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts +1 -0
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +1 -0
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.d.ts +4 -0
- package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.js +17 -2
- package/dist/components/inputs/time-field/time-field.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.template.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.template.js +1 -0
- package/dist/components/inputs/time-field/time-field.template.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +1 -0
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +1 -0
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +4 -2
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/nldd.min.js +668 -666
- package/dist/utilities/return-focus.d.ts +14 -0
- package/dist/utilities/return-focus.d.ts.map +1 -1
- package/dist/utilities/return-focus.js +26 -8
- package/dist/utilities/return-focus.js.map +1 -1
- package/lint/data.generated.json +1 -1
- package/lint/engine.js +53 -1
- package/lint/format.js +6 -5
- package/lint/frontends.js +224 -16
- package/lint/linter.js +5 -3
- package/lint/main.js +36 -9
- package/lint/project.js +73 -4
- package/lint/rule-data.js +17 -2
- package/lint/tree.js +3 -0
- package/package.json +1 -1
|
@@ -7,16 +7,18 @@ import { t as u } from "./shadow-resets-6SToDsPu.js";
|
|
|
7
7
|
import { t as d } from "./translations-wxBSz213.js";
|
|
8
8
|
import { t as f } from "./described-by-mixin-daRE7orX.js";
|
|
9
9
|
import "./icon-button-rKiIHs7A.js";
|
|
10
|
-
import { n as p } from "./
|
|
11
|
-
import "./
|
|
10
|
+
import { n as p } from "./input-modality-XE0B7yCn.js";
|
|
11
|
+
import { n as m } from "./breakpoints-Cwor8TRP.js";
|
|
12
|
+
import { n as h, r as g } from "./return-focus-BzZWhXhc.js";
|
|
13
|
+
import "./popover-CGbeEv_-.js";
|
|
12
14
|
import "./container-rrbwk0z4.js";
|
|
13
15
|
import "./top-title-bar-iNFB2zQL.js";
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { n as
|
|
17
|
-
import { t as
|
|
16
|
+
import { t as _ } from "./form-associated-mixin--GIbl98p.js";
|
|
17
|
+
import { t as v } from "./implicit-submission-Csbcor_E.js";
|
|
18
|
+
import { n as y, r as b } from "./date-picker-CXDzSBoL.js";
|
|
19
|
+
import { t as x } from "./date-field.i18n-BTzc0E9a.js";
|
|
18
20
|
// src/components/inputs/date-field/date-field.styles.ts
|
|
19
|
-
var
|
|
21
|
+
var S = e(m.mdMin), C = t`
|
|
20
22
|
:host {
|
|
21
23
|
box-sizing: border-box;
|
|
22
24
|
}
|
|
@@ -264,13 +266,13 @@ var y = e(p.mdMin), b = t`
|
|
|
264
266
|
|
|
265
267
|
/* The sheet's title bar only makes sense on a small screen, where the popover
|
|
266
268
|
becomes a bottom sheet. It shows by default and is hidden from md up. */
|
|
267
|
-
@media (min-width: ${
|
|
269
|
+
@media (min-width: ${S}) {
|
|
268
270
|
.date-field__picker-button nldd-top-title-bar {
|
|
269
271
|
display: none;
|
|
270
272
|
}
|
|
271
273
|
}
|
|
272
|
-
`,
|
|
273
|
-
function
|
|
274
|
+
`, w = "calc(var(--semantics-controls-md-min-size) * 7 + var(--primitives-space-16) * 2)";
|
|
275
|
+
function T(e) {
|
|
274
276
|
let t = e.invalid ? "invalid" : e.valid ? "valid" : "";
|
|
275
277
|
return t ? a`
|
|
276
278
|
<div class="date-field__validation-icon-area">
|
|
@@ -283,7 +285,7 @@ function S(e) {
|
|
|
283
285
|
</div>
|
|
284
286
|
` : o;
|
|
285
287
|
}
|
|
286
|
-
function
|
|
288
|
+
function E(e) {
|
|
287
289
|
if (e.noPicker || e.readonly) return o;
|
|
288
290
|
let t = e.size === "sm" ? "xs" : "sm";
|
|
289
291
|
return a`
|
|
@@ -295,6 +297,7 @@ function C(e) {
|
|
|
295
297
|
text=${e._t("components.date-field.to-pick-date-action")}
|
|
296
298
|
tooltip-timing="never"
|
|
297
299
|
?disabled=${e.disabled}
|
|
300
|
+
@mousedown=${e._handlePickerPress}
|
|
298
301
|
@click=${e._handlePickerClick}
|
|
299
302
|
></nldd-icon-button>
|
|
300
303
|
<nldd-popover
|
|
@@ -332,7 +335,7 @@ function C(e) {
|
|
|
332
335
|
</div>
|
|
333
336
|
`;
|
|
334
337
|
}
|
|
335
|
-
function
|
|
338
|
+
function D(e, t, n) {
|
|
336
339
|
let r = e.range ? [e._fieldLabel, e._t(n > 0 ? "components.date-field.range-to-lowercase-label" : "components.date-field.range-from-lowercase-label")].join(", ") : e._fieldLabel;
|
|
337
340
|
return a`
|
|
338
341
|
<input class="date-field__input"
|
|
@@ -353,7 +356,7 @@ function w(e, t, n) {
|
|
|
353
356
|
>
|
|
354
357
|
`;
|
|
355
358
|
}
|
|
356
|
-
function
|
|
359
|
+
function O(e) {
|
|
357
360
|
return a`
|
|
358
361
|
<span class="date-field__separator"
|
|
359
362
|
aria-hidden="true"
|
|
@@ -362,7 +365,7 @@ function T(e) {
|
|
|
362
365
|
</span>
|
|
363
366
|
`;
|
|
364
367
|
}
|
|
365
|
-
function
|
|
368
|
+
function k(e) {
|
|
366
369
|
return a`
|
|
367
370
|
<div class="date-field"
|
|
368
371
|
role=${e.range ? "group" : o}
|
|
@@ -370,54 +373,54 @@ function E(e) {
|
|
|
370
373
|
@focusout=${e._handleFieldBlur}
|
|
371
374
|
>
|
|
372
375
|
${e._texts.map((t, n) => a`
|
|
373
|
-
${n > 0 ?
|
|
374
|
-
${
|
|
376
|
+
${n > 0 ? O(e) : o}
|
|
377
|
+
${D(e, t, n)}
|
|
375
378
|
`)}
|
|
376
379
|
<div class="date-field__input-fade"></div>
|
|
377
|
-
${
|
|
378
|
-
${
|
|
380
|
+
${T(e)}
|
|
381
|
+
${E(e)}
|
|
379
382
|
</div>
|
|
380
383
|
`;
|
|
381
384
|
}
|
|
382
|
-
function
|
|
385
|
+
function A(e) {
|
|
383
386
|
let t = e.trim();
|
|
384
387
|
if (t === "") return null;
|
|
385
388
|
let n = /^(\d{4})[-/.](\d{1,2})[-/.](\d{1,2})$/.exec(t);
|
|
386
|
-
if (n) return
|
|
389
|
+
if (n) return b(Number(n[1]), Number(n[2]), Number(n[3]));
|
|
387
390
|
let r = /^(\d{1,2})[-/.](\d{1,2})[-/.](\d{4})$/.exec(t);
|
|
388
|
-
if (r) return
|
|
391
|
+
if (r) return b(Number(r[3]), Number(r[2]), Number(r[1]));
|
|
389
392
|
let i = /^(\d{2})(?:\s*[./-]\s*|\s+)?(\d{2})(?:\s*[./-]\s*|\s+)?(\d{4})$/.exec(t);
|
|
390
|
-
return i ?
|
|
393
|
+
return i ? b(Number(i[3]), Number(i[2]), Number(i[1])) : null;
|
|
391
394
|
}
|
|
392
|
-
function
|
|
395
|
+
function j(e) {
|
|
393
396
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
|
|
394
397
|
return t ? `${t[3]}-${t[2]}-${t[1]}` : "";
|
|
395
398
|
}
|
|
396
|
-
function
|
|
399
|
+
function M(e, t) {
|
|
397
400
|
let n = e ? e.split("/") : [];
|
|
398
401
|
return Array.from({ length: t }, (e, t) => n[t] ?? "");
|
|
399
402
|
}
|
|
400
|
-
function
|
|
403
|
+
function N(e) {
|
|
401
404
|
return e.every((e) => e === "") ? "" : e.join("/");
|
|
402
405
|
}
|
|
403
|
-
function
|
|
406
|
+
function P(e, t) {
|
|
404
407
|
return {
|
|
405
|
-
min: e ?
|
|
406
|
-
max: t ?
|
|
408
|
+
min: e ? y(e) : "",
|
|
409
|
+
max: t ? y(t) : ""
|
|
407
410
|
};
|
|
408
411
|
}
|
|
409
|
-
function
|
|
410
|
-
let n =
|
|
412
|
+
function F(e, t) {
|
|
413
|
+
let n = A(e);
|
|
411
414
|
return !n || t.min && n < t.min || t.max && n > t.max ? "" : n;
|
|
412
415
|
}
|
|
413
|
-
function
|
|
416
|
+
function I(e) {
|
|
414
417
|
let [t, n] = e;
|
|
415
418
|
return e.length !== 2 || !t || !n || t <= n ? null : [n, t];
|
|
416
419
|
}
|
|
417
|
-
function
|
|
420
|
+
function L(e, t, n) {
|
|
418
421
|
for (let n of e) {
|
|
419
422
|
if (!n.trim()) continue;
|
|
420
|
-
let e =
|
|
423
|
+
let e = A(n);
|
|
421
424
|
if (!e) return { flag: "badInput" };
|
|
422
425
|
if (t.min && e < t.min) return {
|
|
423
426
|
flag: "rangeUnderflow",
|
|
@@ -432,15 +435,15 @@ function P(e, t, n) {
|
|
|
432
435
|
return n && r?.trim() && i.some((e) => !e.trim()) ? { flag: "valueMissing" } : null;
|
|
433
436
|
}
|
|
434
437
|
// src/components/inputs/date-field/date-field.ts
|
|
435
|
-
var
|
|
438
|
+
var R = class extends f(_(i)) {
|
|
436
439
|
constructor(...e) {
|
|
437
|
-
super(...e), this._initialValue = "", this.size = "md", this.value = "", this.range = !1, this.min = "", this.max = "", this.noPicker = !1, this.inputId = "", this.placeholder = "", this.invalid = !1, this.valid = !1, this.disabled = !1, this.readonly = !1, this.required = !1, this.name = "", this.autocomplete = "", this.accessibleLabel = "", this.width = "", this.translations = {}, this._texts = [""], this._hasSlottedPicker = !1, this._pickerOpen = !1, this._focusOnClose = null, this._pickerPopoverWidth =
|
|
440
|
+
super(...e), this._initialValue = "", this.size = "md", this.value = "", this.range = !1, this.min = "", this.max = "", this.noPicker = !1, this.inputId = "", this.placeholder = "", this.invalid = !1, this.valid = !1, this.disabled = !1, this.readonly = !1, this.required = !1, this.name = "", this.autocomplete = "", this.accessibleLabel = "", this.width = "", this.translations = {}, this._texts = [""], this._hasSlottedPicker = !1, this._pickerOpen = !1, this._focusOnClose = null, this._pickerPopoverWidth = w;
|
|
438
441
|
}
|
|
439
442
|
get _endCount() {
|
|
440
443
|
return this.range ? 2 : 1;
|
|
441
444
|
}
|
|
442
445
|
get _ends() {
|
|
443
|
-
return
|
|
446
|
+
return M(this.value, this._endCount);
|
|
444
447
|
}
|
|
445
448
|
get _startValue() {
|
|
446
449
|
return this._ends[0] ?? "";
|
|
@@ -450,18 +453,18 @@ var F = class extends f(m(i)) {
|
|
|
450
453
|
}
|
|
451
454
|
_setEnd(e, t) {
|
|
452
455
|
let n = this._ends;
|
|
453
|
-
n[e] = t, this.value =
|
|
456
|
+
n[e] = t, this.value = N(n);
|
|
454
457
|
}
|
|
455
458
|
_sortRange() {
|
|
456
|
-
let e =
|
|
457
|
-
return e ? (this.value =
|
|
459
|
+
let e = I(this._ends);
|
|
460
|
+
return e ? (this.value = N(e), !0) : !1;
|
|
458
461
|
}
|
|
459
462
|
_handleFieldBlur(e) {
|
|
460
463
|
let t = e.relatedTarget;
|
|
461
464
|
t && this.shadowRoot?.contains(t) || this._sortRange() && this._emit("change");
|
|
462
465
|
}
|
|
463
466
|
_commit(e) {
|
|
464
|
-
return
|
|
467
|
+
return F(e, P(this.min, this.max));
|
|
465
468
|
}
|
|
466
469
|
get _slottedPicker() {
|
|
467
470
|
return (this.shadowRoot?.querySelector("slot[name=\"picker\"]"))?.assignedElements({ flatten: !0 }).find((e) => e.localName === "nldd-date-picker") ?? null;
|
|
@@ -478,11 +481,11 @@ var F = class extends f(m(i)) {
|
|
|
478
481
|
}
|
|
479
482
|
willUpdate(e) {
|
|
480
483
|
if (!e.has("value") && !e.has("range")) return;
|
|
481
|
-
e.has("range") && (this.value =
|
|
484
|
+
e.has("range") && (this.value = N(this._ends));
|
|
482
485
|
let t = this._ends;
|
|
483
486
|
this._texts = t.map((e, t) => {
|
|
484
487
|
let n = this._texts[t] ?? "";
|
|
485
|
-
return this._commit(n) === e ? n :
|
|
488
|
+
return this._commit(n) === e ? n : j(e);
|
|
486
489
|
});
|
|
487
490
|
}
|
|
488
491
|
updated(e) {
|
|
@@ -494,13 +497,13 @@ var F = class extends f(m(i)) {
|
|
|
494
497
|
t && n && t.anchorElement !== n && (t.anchorElement = n), this._syncSlottedPicker();
|
|
495
498
|
}
|
|
496
499
|
formResetCallback() {
|
|
497
|
-
this._texts =
|
|
500
|
+
this._texts = M(this._initialValue, this._endCount).map(j), this.value = this._initialValue;
|
|
498
501
|
}
|
|
499
502
|
formStateRestoreCallback(e) {
|
|
500
503
|
typeof e == "string" && (this.value = e);
|
|
501
504
|
}
|
|
502
505
|
_t(e) {
|
|
503
|
-
return d(this.translations,
|
|
506
|
+
return d(this.translations, x, e);
|
|
504
507
|
}
|
|
505
508
|
get _fieldLabel() {
|
|
506
509
|
return this.accessibleLabel || this._t(this.range ? "components.date-field.default-range-label" : "components.date-field.default-label");
|
|
@@ -514,13 +517,18 @@ var F = class extends f(m(i)) {
|
|
|
514
517
|
get _pickerLabel() {
|
|
515
518
|
return this.accessibleLabel || this._t("components.date-field.to-pick-date-action");
|
|
516
519
|
}
|
|
520
|
+
_handlePickerPress(e) {
|
|
521
|
+
e.preventDefault();
|
|
522
|
+
}
|
|
517
523
|
_handlePickerClick() {
|
|
518
524
|
this._pickerOpen ? this._popover?.hide() : this._popover?.show();
|
|
519
525
|
}
|
|
520
526
|
_applyCloseFocus() {
|
|
521
|
-
let e = this._focusOnClose;
|
|
522
|
-
if (this._focusOnClose = null, e === "trigger")
|
|
523
|
-
|
|
527
|
+
let e = this._focusOnClose ?? (g(this) ? "trigger" : null);
|
|
528
|
+
if (this._focusOnClose = null, e === "trigger") {
|
|
529
|
+
let e = this._pickerTrigger;
|
|
530
|
+
e && h(e);
|
|
531
|
+
} else if (e === "last-input") {
|
|
524
532
|
let e = this._inputs;
|
|
525
533
|
this._focusAtEnd(e[e.length - 1]);
|
|
526
534
|
}
|
|
@@ -534,7 +542,7 @@ var F = class extends f(m(i)) {
|
|
|
534
542
|
_fitPopoverToSlottedPicker() {
|
|
535
543
|
let e = this._slottedPicker;
|
|
536
544
|
if (!e) {
|
|
537
|
-
this._pickerPopoverWidth =
|
|
545
|
+
this._pickerPopoverWidth = w;
|
|
538
546
|
return;
|
|
539
547
|
}
|
|
540
548
|
let t = e.getBoundingClientRect().width;
|
|
@@ -545,7 +553,7 @@ var F = class extends f(m(i)) {
|
|
|
545
553
|
let t = e.detail;
|
|
546
554
|
if (this.range) {
|
|
547
555
|
if (typeof t?.start != "string" || typeof t?.end != "string") return;
|
|
548
|
-
this.value =
|
|
556
|
+
this.value = N([t.start, t.end]), this._focusOnClose = p() ? "trigger" : "last-input";
|
|
549
557
|
} else {
|
|
550
558
|
if (typeof t?.value != "string") return;
|
|
551
559
|
this.value = t.value, this._focusOnClose = "trigger";
|
|
@@ -562,7 +570,7 @@ var F = class extends f(m(i)) {
|
|
|
562
570
|
e.setSelectionRange(t, t);
|
|
563
571
|
}
|
|
564
572
|
_handleInputKeydown(e, t) {
|
|
565
|
-
|
|
573
|
+
v(this, e) || t !== 0 && e.key === "Backspace" && e.target.value === "" && (e.preventDefault(), this._focusAtEnd(this._inputs[t - 1]));
|
|
566
574
|
}
|
|
567
575
|
_setText(e, t) {
|
|
568
576
|
let n = [...this._texts];
|
|
@@ -576,13 +584,13 @@ var F = class extends f(m(i)) {
|
|
|
576
584
|
_handleChange(e, t = 0) {
|
|
577
585
|
e.stopPropagation();
|
|
578
586
|
let n = e.target.value, r = this._commit(n);
|
|
579
|
-
this._setText(t, r ?
|
|
587
|
+
this._setText(t, r ? j(r) : n), this._setEnd(t, r), this._emit("change");
|
|
580
588
|
}
|
|
581
589
|
formValue() {
|
|
582
590
|
return this.value;
|
|
583
591
|
}
|
|
584
592
|
ownValidity() {
|
|
585
|
-
let e =
|
|
593
|
+
let e = L(this._texts, P(this.min, this.max), this.required);
|
|
586
594
|
return e ? {
|
|
587
595
|
flags: { [e.flag]: !0 },
|
|
588
596
|
message: this._problemMessage(e)
|
|
@@ -591,8 +599,8 @@ var F = class extends f(m(i)) {
|
|
|
591
599
|
_problemMessage(e) {
|
|
592
600
|
switch (e.flag) {
|
|
593
601
|
case "badInput": return this._t("components.date-field.bad-input-error-text");
|
|
594
|
-
case "rangeUnderflow": return this._t("components.date-field.range-underflow-error-text").replace("{date}",
|
|
595
|
-
case "rangeOverflow": return this._t("components.date-field.range-overflow-error-text").replace("{date}",
|
|
602
|
+
case "rangeUnderflow": return this._t("components.date-field.range-underflow-error-text").replace("{date}", j(e.bound));
|
|
603
|
+
case "rangeOverflow": return this._t("components.date-field.range-overflow-error-text").replace("{date}", j(e.bound));
|
|
596
604
|
case "valueMissing": return this._t("components.date-field.range-incomplete-error-text");
|
|
597
605
|
}
|
|
598
606
|
}
|
|
@@ -604,51 +612,51 @@ var F = class extends f(m(i)) {
|
|
|
604
612
|
}));
|
|
605
613
|
}
|
|
606
614
|
render() {
|
|
607
|
-
return
|
|
615
|
+
return k(this);
|
|
608
616
|
}
|
|
609
|
-
},
|
|
617
|
+
}, z = (R.shadowRootOptions = {
|
|
610
618
|
...i.shadowRootOptions,
|
|
611
619
|
delegatesFocus: !0
|
|
612
|
-
},
|
|
620
|
+
}, R.styles = C, R.isFormInput = !0, R.blocksImplicitSubmission = !0, R);
|
|
613
621
|
s([n({
|
|
614
622
|
reflect: !0,
|
|
615
623
|
converter: l("md")
|
|
616
|
-
})],
|
|
624
|
+
})], z.prototype, "size", void 0), s([n({ type: String })], z.prototype, "value", void 0), s([n({
|
|
617
625
|
type: Boolean,
|
|
618
626
|
reflect: !0
|
|
619
|
-
})],
|
|
627
|
+
})], z.prototype, "range", void 0), s([n({ type: String })], z.prototype, "min", void 0), s([n({ type: String })], z.prototype, "max", void 0), s([n({
|
|
620
628
|
type: Boolean,
|
|
621
629
|
reflect: !0,
|
|
622
630
|
attribute: "no-picker"
|
|
623
|
-
})],
|
|
631
|
+
})], z.prototype, "noPicker", void 0), s([n({
|
|
624
632
|
type: String,
|
|
625
633
|
attribute: "input-id"
|
|
626
|
-
})],
|
|
634
|
+
})], z.prototype, "inputId", void 0), s([n({
|
|
627
635
|
reflect: !0,
|
|
628
636
|
converter: l("")
|
|
629
|
-
})],
|
|
637
|
+
})], z.prototype, "placeholder", void 0), s([n({
|
|
630
638
|
type: Boolean,
|
|
631
639
|
reflect: !0
|
|
632
|
-
})],
|
|
640
|
+
})], z.prototype, "invalid", void 0), s([n({
|
|
633
641
|
type: Boolean,
|
|
634
642
|
reflect: !0
|
|
635
|
-
})],
|
|
643
|
+
})], z.prototype, "valid", void 0), s([n({
|
|
636
644
|
type: Boolean,
|
|
637
645
|
reflect: !0
|
|
638
|
-
})],
|
|
646
|
+
})], z.prototype, "disabled", void 0), s([n({
|
|
639
647
|
type: Boolean,
|
|
640
648
|
reflect: !0
|
|
641
|
-
})],
|
|
649
|
+
})], z.prototype, "readonly", void 0), s([n({
|
|
642
650
|
type: Boolean,
|
|
643
651
|
reflect: !0
|
|
644
|
-
})],
|
|
652
|
+
})], z.prototype, "required", void 0), s([n({
|
|
645
653
|
reflect: !0,
|
|
646
654
|
converter: l("")
|
|
647
|
-
})],
|
|
655
|
+
})], z.prototype, "name", void 0), s([n({ type: String })], z.prototype, "autocomplete", void 0), s([n({
|
|
648
656
|
type: String,
|
|
649
657
|
attribute: "accessible-label"
|
|
650
|
-
})],
|
|
658
|
+
})], z.prototype, "accessibleLabel", void 0), s([n({
|
|
651
659
|
reflect: !0,
|
|
652
660
|
converter: l("")
|
|
653
|
-
})],
|
|
654
|
-
export {
|
|
661
|
+
})], z.prototype, "width", void 0), s([n({ type: Object })], z.prototype, "translations", void 0), s([r()], z.prototype, "_texts", void 0), s([r()], z.prototype, "_hasSlottedPicker", void 0), s([r()], z.prototype, "_pickerOpen", void 0), s([r()], z.prototype, "_pickerPopoverWidth", void 0), z = s([c("nldd-date-field")], z);
|
|
662
|
+
export { z as NLDDDateField };
|
|
@@ -13,7 +13,7 @@ import { t as m } from "./defer-focus-F73ud2D9.js";
|
|
|
13
13
|
import "./icon-button-rKiIHs7A.js";
|
|
14
14
|
import { n as h } from "./input-modality-XE0B7yCn.js";
|
|
15
15
|
import { n as g } from "./breakpoints-Cwor8TRP.js";
|
|
16
|
-
import "./menu-
|
|
16
|
+
import "./menu-BtxzRedh.js";
|
|
17
17
|
import { n as _, r as v, t as y } from "./date-picker.i18n-Dsc_M5QK.js";
|
|
18
18
|
// src/utilities/resolve-date-bound.ts
|
|
19
19
|
function b(e, t, n) {
|
|
@@ -12,7 +12,7 @@ import "./tooltip-BsAHJjci.js";
|
|
|
12
12
|
import { n as p } from "./input-modality-XE0B7yCn.js";
|
|
13
13
|
import { t as m } from "./carried-context-DlMSujiJ.js";
|
|
14
14
|
import { t as h } from "./sanitize-url-CBuGmY0W.js";
|
|
15
|
-
import "./menu-
|
|
15
|
+
import "./menu-BtxzRedh.js";
|
|
16
16
|
import { t as g } from "./document-tab-bar.i18n-DKrA9TnB.js";
|
|
17
17
|
// src/components/navigation/document-tab-bar/document-tab-bar.styles.ts
|
|
18
18
|
var _ = e`
|
|
@@ -13,7 +13,7 @@ import { t as p } from "./described-by-mixin-daRE7orX.js";
|
|
|
13
13
|
import { t as m } from "./defer-focus-F73ud2D9.js";
|
|
14
14
|
import "./icon-button-rKiIHs7A.js";
|
|
15
15
|
import "./tooltip-BsAHJjci.js";
|
|
16
|
-
import "./menu-
|
|
16
|
+
import "./menu-BtxzRedh.js";
|
|
17
17
|
import { t as h } from "./form-associated-mixin--GIbl98p.js";
|
|
18
18
|
import { t as g } from "./file-field.i18n-pDM7Utud.js";
|
|
19
19
|
// src/components/inputs/file-field/file-field.styles.ts
|
|
@@ -5,7 +5,7 @@ import { t as l } from "./reflect-non-default-Bu3rpCvg.js";
|
|
|
5
5
|
import { n as u, t as d } from "./shadow-resets-6SToDsPu.js";
|
|
6
6
|
import { n as f } from "./breakpoints-Cwor8TRP.js";
|
|
7
7
|
import "./avatar-ASqePVhU.js";
|
|
8
|
-
import "./avatar-group-
|
|
8
|
+
import "./avatar-group-GinEMPm9.js";
|
|
9
9
|
// src/components/content/identity/identity.styles.ts
|
|
10
10
|
var p = e(f.smMax), m = t`
|
|
11
11
|
:host {
|
|
@@ -18,7 +18,7 @@ import { n as w } from "./breakpoints-Cwor8TRP.js";
|
|
|
18
18
|
import "./spacer-cell-DuVOgIj8.js";
|
|
19
19
|
import "./text-cell-BkEsGI3g.js";
|
|
20
20
|
import "./inline-dialog-WlqtPBPJ.js";
|
|
21
|
-
import { t as T } from "./return-focus-
|
|
21
|
+
import { t as T } from "./return-focus-BzZWhXhc.js";
|
|
22
22
|
function E(e, t) {
|
|
23
23
|
let n = document;
|
|
24
24
|
for (let r = 0; r < 20; r++) {
|
|
@@ -7,9 +7,9 @@ import { r as u } from "./element-state-B-44fVqq.js";
|
|
|
7
7
|
import { t as d } from "./shadow-resets-6SToDsPu.js";
|
|
8
8
|
import { t as f } from "./with-translations-XX14GKFh.js";
|
|
9
9
|
import { t as p } from "./carried-context-DlMSujiJ.js";
|
|
10
|
-
import "./menu-
|
|
10
|
+
import "./menu-BtxzRedh.js";
|
|
11
11
|
import { t as m } from "./list-items-Du0RCWsY.js";
|
|
12
|
-
import "./menu-bar-item-
|
|
12
|
+
import "./menu-bar-item-C7LQ0NI_.js";
|
|
13
13
|
import { t as h } from "./menu-bar.i18n-BoMu4Eoz.js";
|
|
14
14
|
// src/components/navigation/menu-bar/menu-bar.styles.ts
|
|
15
15
|
var g = e`
|
|
@@ -7,7 +7,7 @@ import { t as l } from "./shadow-resets-6SToDsPu.js";
|
|
|
7
7
|
import { t as u } from "./defer-focus-F73ud2D9.js";
|
|
8
8
|
import "./tooltip-BsAHJjci.js";
|
|
9
9
|
import { t as d } from "./sanitize-url-CBuGmY0W.js";
|
|
10
|
-
import "./menu-
|
|
10
|
+
import "./menu-BtxzRedh.js";
|
|
11
11
|
// src/components/navigation/menu-bar-item/menu-bar-item.styles.ts
|
|
12
12
|
var f = e`
|
|
13
13
|
:host {
|
|
@@ -8,11 +8,11 @@ import { t as u } from "./translations-wxBSz213.js";
|
|
|
8
8
|
import { a as d, n as f, o as p, r as m, t as h } from "./floating-ui.dom-B8J1rV2c.js";
|
|
9
9
|
import { n as g } from "./input-modality-XE0B7yCn.js";
|
|
10
10
|
import { n as _ } from "./breakpoints-Cwor8TRP.js";
|
|
11
|
-
import {
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
11
|
+
import { n as v, t as y } from "./return-focus-BzZWhXhc.js";
|
|
12
|
+
import { t as b } from "./popover.i18n-DmFBHUvB.js";
|
|
13
|
+
import { t as x } from "./dismiss-from-title-bar-C6mP7sWP.js";
|
|
14
14
|
// src/components/layout/popover/popover.styles.ts
|
|
15
|
-
var
|
|
15
|
+
var S = t(_.smMax), C = t(_.mdMin), w = n`
|
|
16
16
|
:host {
|
|
17
17
|
box-sizing: border-box;
|
|
18
18
|
}
|
|
@@ -39,7 +39,7 @@ var x = t(_.smMax), S = t(_.mdMin), C = n`
|
|
|
39
39
|
-webkit-user-select: text;
|
|
40
40
|
user-select: text;
|
|
41
41
|
|
|
42
|
-
@media (max-width: ${
|
|
42
|
+
@media (max-width: ${S}) {
|
|
43
43
|
position: fixed;
|
|
44
44
|
inset: auto 0 0 0;
|
|
45
45
|
border-radius: var(--semantics-overlays-corner-radius) var(--semantics-overlays-corner-radius) 0 0;
|
|
@@ -53,7 +53,7 @@ var x = t(_.smMax), S = t(_.mdMin), C = n`
|
|
|
53
53
|
overlay var(--semantics-sheets-bottom-animation-duration) allow-discrete;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
@media (min-width: ${
|
|
56
|
+
@media (min-width: ${C}) {
|
|
57
57
|
position: absolute;
|
|
58
58
|
inset: unset;
|
|
59
59
|
border-radius: var(--semantics-overlays-corner-radius);
|
|
@@ -89,7 +89,7 @@ var x = t(_.smMax), S = t(_.mdMin), C = n`
|
|
|
89
89
|
keeps it laid out so its size can be measured. The sm bottom-sheet is CSS-animated
|
|
90
90
|
and positioned, so it is excluded. The positioned attribute is set once
|
|
91
91
|
reposition() finishes and cleared on every re-open. */
|
|
92
|
-
@media (min-width: ${
|
|
92
|
+
@media (min-width: ${C}) {
|
|
93
93
|
:host(:popover-open:not([positioned])) {
|
|
94
94
|
visibility: hidden;
|
|
95
95
|
}
|
|
@@ -102,7 +102,7 @@ var x = t(_.smMax), S = t(_.mdMin), C = n`
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
:host(:popover-open) {
|
|
105
|
-
@media (max-width: ${
|
|
105
|
+
@media (max-width: ${S}) {
|
|
106
106
|
transform: translateY(0);
|
|
107
107
|
|
|
108
108
|
@starting-style {
|
|
@@ -112,13 +112,13 @@ var x = t(_.smMax), S = t(_.mdMin), C = n`
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
:host::backdrop {
|
|
115
|
-
@media (max-width: ${
|
|
115
|
+
@media (max-width: ${S}) {
|
|
116
116
|
background-color: var(--semantics-overlays-backdrop-color);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
:host([sm-full-height]) {
|
|
121
|
-
@media (max-width: ${
|
|
121
|
+
@media (max-width: ${S}) {
|
|
122
122
|
height: calc(100dvh - var(--semantics-sheets-bottom-top-inset));
|
|
123
123
|
}
|
|
124
124
|
}
|
|
@@ -133,14 +133,14 @@ var x = t(_.smMax), S = t(_.mdMin), C = n`
|
|
|
133
133
|
}
|
|
134
134
|
`;
|
|
135
135
|
// src/components/layout/popover/popover.template.ts
|
|
136
|
-
function
|
|
136
|
+
function T() {
|
|
137
137
|
return a`<slot></slot>`;
|
|
138
138
|
}
|
|
139
139
|
// src/components/layout/popover/popover.ts
|
|
140
|
-
var
|
|
140
|
+
var E = /* @__PURE__ */ e({ NLDDPopover: () => k }), D = class extends i {
|
|
141
141
|
constructor(...e) {
|
|
142
|
-
super(...e), this.smFullHeight = !1, this.anchor = "", this.anchorElement = null, this.placement = "bottom-start", this.top = void 0, this.right = void 0, this.bottom = void 0, this.left = void 0, this.centered = !1, this.accessibleLabel = "", this.translations = {}, this.open = !1, this._isOpen = !1, this._focusReturn = new
|
|
143
|
-
|
|
142
|
+
super(...e), this.smFullHeight = !1, this.anchor = "", this.anchorElement = null, this.placement = "bottom-start", this.top = void 0, this.right = void 0, this.bottom = void 0, this.left = void 0, this.centered = !1, this.accessibleLabel = "", this.translations = {}, this.open = !1, this._isOpen = !1, this._focusReturn = new y(), this._pointerdownOnAnchorWhileOpen = !1, this._cleanupAutoUpdate = null, this._smQuery = null, this._wasOnSm = !1, this._previousAnchorEl = null, this._handleDismiss = (e) => {
|
|
143
|
+
x(e) && (e.stopPropagation(), this.hide());
|
|
144
144
|
}, this._handleViewportChange = () => {
|
|
145
145
|
this._isOpen ? this.reposition() : this._wasOnSm = this._smQuery?.matches ?? !1;
|
|
146
146
|
}, this._swallowNextClick = !1, this._handleDocumentPointerdown = (e) => {
|
|
@@ -204,10 +204,10 @@ var T = /* @__PURE__ */ e({ NLDDPopover: () => O }), E = class extends i {
|
|
|
204
204
|
let e = this.matches(":popover-open");
|
|
205
205
|
this.open && !e && !this._isOpen ? (this.show(), this.matches(":popover-open") || (this.open = !1)) : !this.open && e && this.hidePopover();
|
|
206
206
|
}
|
|
207
|
-
e.has("width") && (this.width && !
|
|
207
|
+
e.has("width") && (this.width && !O.CONTENT_WIDTHS.test(this.width.trim()) ? this.style.setProperty("--_popover-default-width", this.width) : this.style.removeProperty("--_popover-default-width")), (e.has("accessibleLabel") || e.has("translations")) && this.setAttribute("aria-label", this._resolvedAccessibleLabel), (e.has("anchor") || e.has("anchorElement")) && this._updateAnchorAria(this._isOpen), (e.has("top") || e.has("left") || e.has("right") || e.has("bottom") || e.has("centered")) && (!this.top && !this.centered && this.style.removeProperty("top"), !this.left && !this.centered && this.style.removeProperty("left"), this.right || this.style.removeProperty("right"), this.bottom || this.style.removeProperty("bottom"), this._isOpen && this.reposition());
|
|
208
208
|
}
|
|
209
209
|
_t(e) {
|
|
210
|
-
return u(this.translations,
|
|
210
|
+
return u(this.translations, b, e);
|
|
211
211
|
}
|
|
212
212
|
get _resolvedAccessibleLabel() {
|
|
213
213
|
return this.accessibleLabel || this._t("components.popover.accessible-label");
|
|
@@ -277,7 +277,7 @@ var T = /* @__PURE__ */ e({ NLDDPopover: () => O }), E = class extends i {
|
|
|
277
277
|
_manageFocus() {
|
|
278
278
|
this.classList.toggle("is-pointer-focus", g());
|
|
279
279
|
let e = this.querySelector("[autofocus]");
|
|
280
|
-
e ? e
|
|
280
|
+
e ? v(e) : this.focus();
|
|
281
281
|
}
|
|
282
282
|
_getFocusables() {
|
|
283
283
|
let e = [], t = (n) => {
|
|
@@ -293,42 +293,42 @@ var T = /* @__PURE__ */ e({ NLDDPopover: () => O }), E = class extends i {
|
|
|
293
293
|
})).sort((e, t) => e.order - t.order || e.i - t.i).map((e) => e.el);
|
|
294
294
|
}
|
|
295
295
|
render() {
|
|
296
|
-
return
|
|
296
|
+
return T();
|
|
297
297
|
}
|
|
298
|
-
},
|
|
298
|
+
}, O = D, k = (D.styles = w, D.CONTENT_WIDTHS = /^(auto|fit-content|min-content|max-content)\b/, D);
|
|
299
299
|
o([r({
|
|
300
300
|
type: String,
|
|
301
301
|
reflect: !0
|
|
302
|
-
})],
|
|
302
|
+
})], k.prototype, "width", void 0), o([r({
|
|
303
303
|
type: Boolean,
|
|
304
304
|
reflect: !0,
|
|
305
305
|
attribute: "sm-full-height"
|
|
306
|
-
})],
|
|
306
|
+
})], k.prototype, "smFullHeight", void 0), o([r({
|
|
307
307
|
reflect: !0,
|
|
308
308
|
converter: c("")
|
|
309
|
-
})],
|
|
309
|
+
})], k.prototype, "anchor", void 0), o([r({ attribute: !1 })], k.prototype, "anchorElement", void 0), o([r({
|
|
310
310
|
reflect: !0,
|
|
311
311
|
converter: c("bottom-start")
|
|
312
|
-
})],
|
|
312
|
+
})], k.prototype, "placement", void 0), o([r({
|
|
313
313
|
type: String,
|
|
314
314
|
reflect: !0
|
|
315
|
-
})],
|
|
315
|
+
})], k.prototype, "top", void 0), o([r({
|
|
316
316
|
type: String,
|
|
317
317
|
reflect: !0
|
|
318
|
-
})],
|
|
318
|
+
})], k.prototype, "right", void 0), o([r({
|
|
319
319
|
type: String,
|
|
320
320
|
reflect: !0
|
|
321
|
-
})],
|
|
321
|
+
})], k.prototype, "bottom", void 0), o([r({
|
|
322
322
|
type: String,
|
|
323
323
|
reflect: !0
|
|
324
|
-
})],
|
|
324
|
+
})], k.prototype, "left", void 0), o([r({
|
|
325
325
|
type: Boolean,
|
|
326
326
|
reflect: !0
|
|
327
|
-
})],
|
|
327
|
+
})], k.prototype, "centered", void 0), o([r({
|
|
328
328
|
type: String,
|
|
329
329
|
attribute: "accessible-label"
|
|
330
|
-
})],
|
|
330
|
+
})], k.prototype, "accessibleLabel", void 0), o([r({ type: Object })], k.prototype, "translations", void 0), o([r({
|
|
331
331
|
type: Boolean,
|
|
332
332
|
reflect: !0
|
|
333
|
-
})],
|
|
334
|
-
export {
|
|
333
|
+
})], k.prototype, "open", void 0), k = O = o([s("nldd-popover")], k);
|
|
334
|
+
export { E as t };
|