@mattilsynet/design 2.2.10 → 2.2.13
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/mtds/analytics/analytics.js +1 -1
- package/mtds/analytics/analytics.js.map +1 -1
- package/mtds/app/app-observer.js +22 -23
- package/mtds/app/app-observer.js.map +1 -1
- package/mtds/breadcrumbs/breadcrumbs-observer.js +10 -15
- package/mtds/breadcrumbs/breadcrumbs-observer.js.map +1 -1
- package/mtds/button/button.js +9 -8
- package/mtds/button/button.js.map +1 -1
- package/mtds/card/card.stories.d.ts +1 -0
- package/mtds/chart/chart-element.js +15 -6
- package/mtds/chart/chart-element.js.map +1 -1
- package/mtds/chart/chart.css.js +1 -0
- package/mtds/chart/chart.css.js.map +1 -1
- package/mtds/dialog/dialog-observer.js +25 -28
- package/mtds/dialog/dialog-observer.js.map +1 -1
- package/mtds/errorsummary/errorsummary-observer.js +3 -3
- package/mtds/errorsummary/errorsummary-observer.js.map +1 -1
- package/mtds/field/field-observer.js +49 -44
- package/mtds/field/field-observer.js.map +1 -1
- package/mtds/fieldset/fieldset-observer.js +14 -16
- package/mtds/fieldset/fieldset-observer.js.map +1 -1
- package/mtds/index.iife.js +10 -9
- package/mtds/logo/logo-observer.js +11 -12
- package/mtds/logo/logo-observer.js.map +1 -1
- package/mtds/map/map-element.d.ts +1 -1
- package/mtds/map/map-element.js +53 -47
- package/mtds/map/map-element.js.map +1 -1
- package/mtds/map/map.css.js +1 -1
- package/mtds/map/map.css.js.map +1 -1
- package/mtds/map.iife.js +6 -6
- package/mtds/package.json.js +1 -1
- package/mtds/popover/popover-observer.js +8 -3
- package/mtds/popover/popover-observer.js.map +1 -1
- package/mtds/styles.css +1 -1
- package/mtds/styles.json +20 -20
- package/mtds/styles.module.css.js +31 -31
- package/mtds/table/table-observer.js +18 -17
- package/mtds/table/table-observer.js.map +1 -1
- package/mtds/toast/toast-observer.js +4 -3
- package/mtds/toast/toast-observer.js.map +1 -1
- package/mtds/togglegroup/togglegroup-observer.js +1 -1
- package/mtds/togglegroup/togglegroup-observer.js.map +1 -1
- package/mtds/tooltip/tooltip-observer.js +36 -28
- package/mtds/tooltip/tooltip-observer.js.map +1 -1
- package/mtds/utils.d.ts +9 -5
- package/mtds/utils.js +55 -69
- package/mtds/utils.js.map +1 -1
- package/package.json +17 -13
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { UHTMLComboboxElement as E } from "@u-elements/u-combobox";
|
|
2
|
-
import { UHTMLDataListElement as
|
|
3
|
-
import
|
|
4
|
-
import { onLoaded as
|
|
5
|
-
const
|
|
6
|
-
function y(t
|
|
7
|
-
for (const
|
|
8
|
-
if (
|
|
9
|
-
const
|
|
10
|
-
let c = null,
|
|
11
|
-
for (const o of
|
|
12
|
-
o instanceof HTMLLabelElement ?
|
|
13
|
-
if (
|
|
14
|
-
for (const o of
|
|
15
|
-
if (
|
|
16
|
-
d =
|
|
17
|
-
for (const o of
|
|
2
|
+
import { UHTMLDataListElement as I } from "@u-elements/u-datalist";
|
|
3
|
+
import g from "../styles.module.css.js";
|
|
4
|
+
import { IS_BROWSER as T, onLoaded as C, onMutation as M, on as m, QUICK_EVENT as p, isInputLike as h, attr as a, useId as u, anchorPosition as b } from "../utils.js";
|
|
5
|
+
const v = g.field.split(" ")[0], x = g.validation.split(" "), A = x[0], H = T ? document.getElementsByClassName(v) : [], r = (t, n) => t.getPropertyValue(`--mtds-text-${n}`)?.slice(1, -1) || "";
|
|
6
|
+
function y(t) {
|
|
7
|
+
for (const n of H)
|
|
8
|
+
if (n.isConnected) {
|
|
9
|
+
const i = [], e = [], l = [];
|
|
10
|
+
let c = null, s = null, d = !0;
|
|
11
|
+
for (const o of n.getElementsByTagName("*"))
|
|
12
|
+
o instanceof HTMLLabelElement ? i.push(o) : o instanceof E ? c = o : h(o) && !o.hidden ? s = o : o.hasAttribute("data-description") ? e.push(o) : o.classList.contains(A) ? (d = a(o, "data-color") === "success" || !o.clientHeight, l.push(o), e.unshift(o)) : o instanceof HTMLParagraphElement && (e.some((f) => f.contains(o)) || e.push(o));
|
|
13
|
+
if (s) {
|
|
14
|
+
for (const o of i) o.htmlFor = u(s);
|
|
15
|
+
if (t && a(n, "data-validation") === "form") {
|
|
16
|
+
d = s.matches(":valid");
|
|
17
|
+
for (const o of l) a(o, "hidden", d ? "" : null);
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
$(c), S(s), L(s), a(s, "aria-describedby", e.map(u).join(" ") || null), a(s, "aria-invalid", `${!d}`);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -26,48 +26,53 @@ function L(t) {
|
|
|
26
26
|
`${t.scrollHeight}px`
|
|
27
27
|
));
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const { control:
|
|
29
|
+
function $(t) {
|
|
30
|
+
const { control: n, list: i } = t || {};
|
|
31
31
|
if (t && i && !t.hasAttribute("data-sr-added")) {
|
|
32
|
-
const
|
|
33
|
-
a(t, "data-sr-added",
|
|
32
|
+
const e = window.getComputedStyle(t);
|
|
33
|
+
a(t, "data-sr-added", r(e, "combobox-added")), a(t, "data-sr-empty", r(e, "combobox-empty")), a(t, "data-sr-found", r(e, "combobox-found")), a(t, "data-sr-invalid", r(e, "combobox-invalid")), a(t, "data-sr-of", r(e, "combobox-of")), a(t, "data-sr-remove", r(e, "combobox-remove")), a(t, "data-sr-removed", r(e, "combobox-removed")), a(i, "data-sr-plural", r(e, "datalist-plural")), a(i, "data-sr-singular", r(e, "datalist-singular"));
|
|
34
34
|
}
|
|
35
|
-
i &&
|
|
35
|
+
i && n && !i.hasAttribute("popover") && (a(i, "popover", "manual"), a(n, "popovertarget", u(i)));
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
a(
|
|
43
|
-
for (const
|
|
37
|
+
function S(t) {
|
|
38
|
+
const n = t?.nextElementSibling, i = n && a(n, "data-count");
|
|
39
|
+
if (n && i) {
|
|
40
|
+
const e = Number(i) - t.value.length, l = e < 0, c = a(n, "aria-live") === "polite", s = window.getComputedStyle(n || t), d = r(s, "count-over"), o = r(s, "count-under");
|
|
41
|
+
if (c !== l) {
|
|
42
|
+
a(n, "aria-live", l ? "polite" : "off");
|
|
43
|
+
for (const f of x) n.classList.toggle(f, l);
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
n.textContent = (l ? d : o).replace(
|
|
46
46
|
"%d",
|
|
47
|
-
`${Math.abs(
|
|
47
|
+
`${Math.abs(e)}`
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
if (t instanceof
|
|
53
|
-
const
|
|
51
|
+
function F({ target: t, newState: n }) {
|
|
52
|
+
if (t instanceof I) {
|
|
53
|
+
const e = t.getRootNode()?.querySelector(
|
|
54
54
|
`[popovertarget="${t.id}"]`
|
|
55
55
|
);
|
|
56
|
-
|
|
57
|
-
contain({ availableHeight:
|
|
58
|
-
t.style.width = `${
|
|
56
|
+
n === "closed" ? b(t, !1) : e && b(t, e, {
|
|
57
|
+
contain({ availableHeight: l }) {
|
|
58
|
+
t.style.width = `${e.clientWidth}px`, t.style.maxHeight = `${Math.max(50, l)}px`;
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
function N(t) {
|
|
64
|
-
|
|
64
|
+
h(t.target) && (S(t.target), L(t.target));
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
t.type === "invalid" &&
|
|
66
|
+
function D(t) {
|
|
67
|
+
const n = t.target?.closest?.(`.${v}`);
|
|
68
|
+
t.type === "invalid" && n && t.preventDefault(), y(!0);
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
M(
|
|
72
|
-
|
|
70
|
+
C(() => [
|
|
71
|
+
M(() => y()),
|
|
72
|
+
m(document, "input", N, p),
|
|
73
|
+
m(document, "toggle", F, p),
|
|
74
|
+
// Use capture since toggle does not bubble
|
|
75
|
+
m(document, "invalid,submit", D, !0)
|
|
76
|
+
// Use capture as invalid and submit does not bubble
|
|
77
|
+
]);
|
|
73
78
|
//# sourceMappingURL=field-observer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-observer.js","sources":["../../designsystem/field/field-observer.ts"],"sourcesContent":["import { UHTMLComboboxElement } from \"@u-elements/u-combobox\";\nimport { UHTMLDataListElement } from \"@u-elements/u-datalist\";\nimport styles from \"../styles.module.css\";\nimport {\n\tanchorPosition,\n\tattr,\n\tisInputLike,\n\ton,\n\tonLoaded,\n\tonMutation,\n\tQUICK_EVENT,\n\tuseId,\n} from \"../utils\";\n\nconst CSS_FIELD = styles.field.split(\" \")[0];\nconst CSS_VALIDATIONS = styles.validation.split(\" \");\nconst CSS_VALIDATION = CSS_VALIDATIONS[0];\n\nconst getText = (style: CSSStyleDeclaration, key: string) =>\n\tstyle.getPropertyValue(`--mtds-text-${key}`)?.slice(1, -1) || \"\"; // slice to trim quotes\n\nfunction handleFieldMutation(\n\tfields: HTMLCollectionOf<Element>,\n\tvalidate?: boolean,\n) {\n\tfor (const field of fields)\n\t\tif (field.isConnected) {\n\t\t\tconst labels: HTMLLabelElement[] = [];\n\t\t\tconst descs: Element[] = [];\n\t\t\tconst valids: Element[] = [];\n\t\t\tlet combobox: UHTMLComboboxElement | null = null;\n\t\t\tlet input: HTMLInputElement | null = null;\n\t\t\tlet valid = true;\n\n\t\t\tfor (const el of field.getElementsByTagName(\"*\")) {\n\t\t\t\tif (el instanceof HTMLLabelElement) labels.push(el);\n\t\t\t\telse if (el instanceof UHTMLComboboxElement) combobox = el;\n\t\t\t\telse if (isInputLike(el) && !el.hidden) input = el;\n\t\t\t\telse if (el.hasAttribute(\"data-description\")) descs.push(el);\n\t\t\t\telse if (el.classList.contains(CSS_VALIDATION)) {\n\t\t\t\t\tvalid = attr(el, \"data-color\") === \"success\" || !el.clientHeight; // Only set invalid if Validation is visible\n\t\t\t\t\tvalids.push(el);\n\t\t\t\t\tdescs.unshift(el);\n\t\t\t\t} else if (el instanceof HTMLParagraphElement)\n\t\t\t\t\tdescs.some((desc) => desc.contains(el)) || descs.push(el); // Only add if not already inside description\n\t\t\t}\n\n\t\t\tif (input) {\n\t\t\t\tfor (const label of labels) label.htmlFor = useId(input);\n\t\t\t\tif (validate && attr(field, \"data-validation\") === \"form\") {\n\t\t\t\t\tvalid = input.matches(\":valid\");\n\t\t\t\t\tfor (const el of valids) attr(el, \"hidden\", valid ? \"\" : null);\n\t\t\t\t}\n\t\t\t\trenderCombobox(combobox);\n\t\t\t\trenderCounter(input);\n\t\t\t\trenderTextareaSize(input);\n\t\t\t\tattr(input, \"aria-describedby\", descs.map(useId).join(\" \") || null); // Remove if empty\n\t\t\t\tattr(input, \"aria-invalid\", `${!valid}`);\n\t\t\t}\n\t\t}\n}\n\n// iOS does not support field-sizing: content, so we need to manually resize\nfunction renderTextareaSize(textarea: Element) {\n\tif (textarea instanceof HTMLTextAreaElement) {\n\t\ttextarea.style.setProperty(\"--mtds-textarea-height\", \"auto\");\n\t\ttextarea.style.setProperty(\n\t\t\t\"--mtds-textarea-height\",\n\t\t\t`${textarea.scrollHeight}px`,\n\t\t);\n\t}\n}\n\n// Setup translations from CSS custom properties\nfunction renderCombobox(el: UHTMLComboboxElement | null) {\n\tconst { control, list } = el || {};\n\n\tif (el && list && !el.hasAttribute(\"data-sr-added\")) {\n\t\tconst style = window.getComputedStyle(el);\n\t\tattr(el, \"data-sr-added\", getText(style, \"combobox-added\"));\n\t\tattr(el, \"data-sr-empty\", getText(style, \"combobox-empty\"));\n\t\tattr(el, \"data-sr-found\", getText(style, \"combobox-found\"));\n\t\tattr(el, \"data-sr-invalid\", getText(style, \"combobox-invalid\"));\n\t\tattr(el, \"data-sr-of\", getText(style, \"combobox-of\"));\n\t\tattr(el, \"data-sr-remove\", getText(style, \"combobox-remove\"));\n\t\tattr(el, \"data-sr-removed\", getText(style, \"combobox-removed\"));\n\t\tattr(list, \"data-sr-plural\", getText(style, \"datalist-plural\"));\n\t\tattr(list, \"data-sr-singular\", getText(style, \"datalist-singular\"));\n\t}\n\tif (list && control && !list.hasAttribute(\"popover\")) {\n\t\tattr(list, \"popover\", \"manual\");\n\t\tattr(control, \"popovertarget\", useId(list));\n\t}\n}\n\nfunction renderCounter(input: HTMLInputElement) {\n\tconst el = input?.nextElementSibling;\n\tconst limit = el && attr(el, \"data-count\");\n\n\tif (el && limit) {\n\t\tconst remainder = Number(limit) - input.value.length;\n\t\tconst nextInvalid = remainder < 0;\n\t\tconst prevInvalid = attr(el, \"aria-live\") === \"polite\";\n\t\tconst style = window.getComputedStyle(el || input);\n\t\tconst over = getText(style, \"count-over\");\n\t\tconst under = getText(style, \"count-under\");\n\n\t\tif (prevInvalid !== nextInvalid) {\n\t\t\tattr(el, \"aria-live\", nextInvalid ? \"polite\" : \"off\");\n\t\t\tfor (const css of CSS_VALIDATIONS) el.classList.toggle(css, nextInvalid);\n\t\t}\n\t\tel.textContent = (nextInvalid ? over : under).replace(\n\t\t\t\"%d\",\n\t\t\t`${Math.abs(remainder)}`,\n\t\t);\n\t}\n}\n\nfunction handleFieldToggle({ target: el, newState }: Partial<ToggleEvent>) {\n\tif (el instanceof UHTMLDataListElement) {\n\t\tconst root = el.getRootNode() as ShadowRoot | null;\n\t\tconst anchor = root?.querySelector<HTMLElement>(\n\t\t\t`[popovertarget=\"${el.id}\"]`,\n\t\t);\n\n\t\tif (newState === \"closed\") anchorPosition(el, false);\n\t\telse if (anchor)\n\t\t\tanchorPosition(el, anchor, {\n\t\t\t\tcontain({ availableHeight }) {\n\t\t\t\t\tel.style.width = `${anchor.clientWidth}px`;\n\t\t\t\t\tel.style.maxHeight = `${Math.max(50, availableHeight)}px`;\n\t\t\t\t},\n\t\t\t});\n\t}\n}\n// Update when typing\nfunction handleFieldInput(event: Event) {\n\tif (isInputLike(event.target)) {\n\t\trenderCounter(event.target);\n\t\trenderTextareaSize(event.target);\n\t}\n}\n\nfunction handleFieldValdiation(event: Event) {\n\tconst field = (event.target as Element)?.closest?.(`.${CSS_FIELD}`);\n\tif (event.type === \"invalid\" && field) event.preventDefault(); // Prevent browsers from showing default validation bubbles\n\thandleFieldMutation(document.getElementsByClassName(CSS_FIELD), true); // Update state\n}\n\nonLoaded(() => {\n\tonMutation(document.documentElement, CSS_FIELD, handleFieldMutation);\n\ton(document, \"input\", handleFieldInput, QUICK_EVENT);\n\ton(document, \"invalid,submit\", handleFieldValdiation, true); // Use capture as invalid and submit does not bubble\n\ton(document, \"toggle\", handleFieldToggle, QUICK_EVENT); // Use capture since toggle does not bubble\n});\n"],"names":["CSS_FIELD","styles","CSS_VALIDATIONS","CSS_VALIDATION","getText","style","key","handleFieldMutation","fields","validate","field","labels","descs","valids","combobox","input","valid","el","UHTMLComboboxElement","isInputLike","attr","desc","label","useId","renderCombobox","renderCounter","renderTextareaSize","textarea","control","list","limit","remainder","nextInvalid","prevInvalid","over","under","css","handleFieldToggle","newState","UHTMLDataListElement","anchor","anchorPosition","availableHeight","handleFieldInput","event","handleFieldValdiation","onLoaded","onMutation","on","QUICK_EVENT"],"mappings":";;;;AAcA,MAAMA,IAAYC,EAAO,MAAM,MAAM,GAAG,EAAE,CAAC,GACrCC,IAAkBD,EAAO,WAAW,MAAM,GAAG,GAC7CE,IAAiBD,EAAgB,CAAC,GAElCE,IAAU,CAACC,GAA4BC,MAC5CD,EAAM,iBAAiB,eAAeC,CAAG,EAAE,GAAG,MAAM,GAAG,EAAE,KAAK;AAE/D,SAASC,EACRC,GACAC,GACC;AACD,aAAWC,KAASF;AACnB,QAAIE,EAAM,aAAa;AACtB,YAAMC,IAA6B,CAAA,GAC7BC,IAAmB,CAAA,GACnBC,IAAoB,CAAA;AAC1B,UAAIC,IAAwC,MACxCC,IAAiC,MACjCC,IAAQ;AAEZ,iBAAWC,KAAMP,EAAM,qBAAqB,GAAG;AAC9C,QAAIO,aAAc,mBA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IACxE;AACA,IAAAf,EAAG,eAAee,IAAcE,IAAOC,GAAO;AAAA,MAC7C;AAAA,MACA,GAAG,KAAK,IAAIJ,CAAS,CAAC;AAAA,IAAA;AAAA,EAExB;AACD;AAEA,SAASM,EAAkB,EAAE,QAAQpB,GAAI,UAAAqB,KAAkC;AAC1E,MAAIrB,aAAcsB,GAAsB;AAEvC,UAAMC,IADOvB,EAAG,YAAA,GACK;AAAA,MACpB,mBAAmBA,EAAG,EAAE;AAAA,IAAA;AAGzB,IAAIqB,MAAa,WAAUG,EAAexB,GAAI,EAAK,IAC1CuB,KACRC,EAAexB,GAAIuB,GAAQ;AAAA,MAC1B,QAAQ,EAAE,iBAAAE,KAAmB;AAC5B,QAAAzB,EAAG,MAAM,QAAQ,GAAGuB,EAAO,WAAW,MACtCvB,EAAG,MAAM,YAAY,GAAG,KAAK,IAAI,IAAIyB,CAAe,CAAC;AAAA,MACtD;AAAA,IAAA,CACA;AAAA,EACH;AACD;AAEA,SAASC,EAAiBC,GAAc;AACvC,EAAIzB,EAAYyB,EAAM,MAAM,MAC3BnB,EAAcmB,EAAM,MAAM,GAC1BlB,EAAmBkB,EAAM,MAAM;AAEjC;AAEA,SAASC,EAAsBD,GAAc;AAC5C,QAAMlC,IAASkC,EAAM,QAAoB,UAAU,IAAI5C,CAAS,EAAE;AAClE,EAAI4C,EAAM,SAAS,aAAalC,OAAa,eAAA,GAC7CH,EAAoB,SAAS,uBAAuBP,CAAS,GAAG,EAAI;AACrE;AAEA8C,EAAS,MAAM;AACd,EAAAC,EAAW,SAAS,iBAAiB/C,GAAWO,CAAmB,GACnEyC,EAAG,UAAU,SAASL,GAAkBM,CAAW,GACnDD,EAAG,UAAU,kBAAkBH,GAAuB,EAAI,GAC1DG,EAAG,UAAU,UAAUX,GAAmBY,CAAW;AACtD,CAAC;"}
|
|
1
|
+
{"version":3,"file":"field-observer.js","sources":["../../designsystem/field/field-observer.ts"],"sourcesContent":["import { UHTMLComboboxElement } from \"@u-elements/u-combobox\";\nimport { UHTMLDataListElement } from \"@u-elements/u-datalist\";\nimport styles from \"../styles.module.css\";\nimport {\n\tanchorPosition,\n\tattr,\n\tIS_BROWSER,\n\tisInputLike,\n\ton,\n\tonLoaded,\n\tonMutation,\n\tQUICK_EVENT,\n\tuseId,\n} from \"../utils\";\n\nconst CSS_FIELD = styles.field.split(\" \")[0];\nconst CSS_VALIDATIONS = styles.validation.split(\" \");\nconst CSS_VALIDATION = CSS_VALIDATIONS[0];\nconst FIELDS = IS_BROWSER ? document.getElementsByClassName(CSS_FIELD) : [];\n\nconst getText = (style: CSSStyleDeclaration, key: string) =>\n\tstyle.getPropertyValue(`--mtds-text-${key}`)?.slice(1, -1) || \"\"; // slice to trim quotes\n\nfunction handleFieldMutation(validate?: boolean) {\n\tfor (const field of FIELDS)\n\t\tif (field.isConnected) {\n\t\t\tconst labels: HTMLLabelElement[] = [];\n\t\t\tconst descs: Element[] = [];\n\t\t\tconst valids: Element[] = [];\n\t\t\tlet combobox: UHTMLComboboxElement | null = null;\n\t\t\tlet input: HTMLInputElement | null = null;\n\t\t\tlet valid = true;\n\n\t\t\tfor (const el of field.getElementsByTagName(\"*\")) {\n\t\t\t\tif (el instanceof HTMLLabelElement) labels.push(el);\n\t\t\t\telse if (el instanceof UHTMLComboboxElement) combobox = el;\n\t\t\t\telse if (isInputLike(el) && !el.hidden) input = el;\n\t\t\t\telse if (el.hasAttribute(\"data-description\")) descs.push(el);\n\t\t\t\telse if (el.classList.contains(CSS_VALIDATION)) {\n\t\t\t\t\tvalid = attr(el, \"data-color\") === \"success\" || !el.clientHeight; // Only set invalid if Validation is visible\n\t\t\t\t\tvalids.push(el);\n\t\t\t\t\tdescs.unshift(el);\n\t\t\t\t} else if (el instanceof HTMLParagraphElement)\n\t\t\t\t\tdescs.some((desc) => desc.contains(el)) || descs.push(el); // Only add if not already inside description\n\t\t\t}\n\n\t\t\tif (input) {\n\t\t\t\tfor (const label of labels) label.htmlFor = useId(input);\n\t\t\t\tif (validate && attr(field, \"data-validation\") === \"form\") {\n\t\t\t\t\tvalid = input.matches(\":valid\");\n\t\t\t\t\tfor (const el of valids) attr(el, \"hidden\", valid ? \"\" : null);\n\t\t\t\t}\n\t\t\t\trenderCombobox(combobox);\n\t\t\t\trenderCounter(input);\n\t\t\t\trenderTextareaSize(input);\n\t\t\t\tattr(input, \"aria-describedby\", descs.map(useId).join(\" \") || null); // Remove if empty\n\t\t\t\tattr(input, \"aria-invalid\", `${!valid}`);\n\t\t\t}\n\t\t}\n}\n\n// iOS does not support field-sizing: content, so we need to manually resize\nfunction renderTextareaSize(textarea: Element) {\n\tif (textarea instanceof HTMLTextAreaElement) {\n\t\ttextarea.style.setProperty(\"--mtds-textarea-height\", \"auto\");\n\t\ttextarea.style.setProperty(\n\t\t\t\"--mtds-textarea-height\",\n\t\t\t`${textarea.scrollHeight}px`,\n\t\t);\n\t}\n}\n\n// Setup translations from CSS custom properties\nfunction renderCombobox(el: UHTMLComboboxElement | null) {\n\tconst { control, list } = el || {};\n\n\tif (el && list && !el.hasAttribute(\"data-sr-added\")) {\n\t\tconst style = window.getComputedStyle(el);\n\t\tattr(el, \"data-sr-added\", getText(style, \"combobox-added\"));\n\t\tattr(el, \"data-sr-empty\", getText(style, \"combobox-empty\"));\n\t\tattr(el, \"data-sr-found\", getText(style, \"combobox-found\"));\n\t\tattr(el, \"data-sr-invalid\", getText(style, \"combobox-invalid\"));\n\t\tattr(el, \"data-sr-of\", getText(style, \"combobox-of\"));\n\t\tattr(el, \"data-sr-remove\", getText(style, \"combobox-remove\"));\n\t\tattr(el, \"data-sr-removed\", getText(style, \"combobox-removed\"));\n\t\tattr(list, \"data-sr-plural\", getText(style, \"datalist-plural\"));\n\t\tattr(list, \"data-sr-singular\", getText(style, \"datalist-singular\"));\n\t}\n\tif (list && control && !list.hasAttribute(\"popover\")) {\n\t\tattr(list, \"popover\", \"manual\");\n\t\tattr(control, \"popovertarget\", useId(list));\n\t}\n}\n\nfunction renderCounter(input: HTMLInputElement) {\n\tconst el = input?.nextElementSibling;\n\tconst limit = el && attr(el, \"data-count\");\n\n\tif (el && limit) {\n\t\tconst remainder = Number(limit) - input.value.length;\n\t\tconst nextInvalid = remainder < 0;\n\t\tconst prevInvalid = attr(el, \"aria-live\") === \"polite\";\n\t\tconst style = window.getComputedStyle(el || input);\n\t\tconst over = getText(style, \"count-over\");\n\t\tconst under = getText(style, \"count-under\");\n\n\t\tif (prevInvalid !== nextInvalid) {\n\t\t\tattr(el, \"aria-live\", nextInvalid ? \"polite\" : \"off\");\n\t\t\tfor (const css of CSS_VALIDATIONS) el.classList.toggle(css, nextInvalid);\n\t\t}\n\t\tel.textContent = (nextInvalid ? over : under).replace(\n\t\t\t\"%d\",\n\t\t\t`${Math.abs(remainder)}`,\n\t\t);\n\t}\n}\n\nfunction handleFieldToggle({ target: el, newState }: Partial<ToggleEvent>) {\n\tif (el instanceof UHTMLDataListElement) {\n\t\tconst root = el.getRootNode() as ShadowRoot | null;\n\t\tconst anchor = root?.querySelector<HTMLElement>(\n\t\t\t`[popovertarget=\"${el.id}\"]`,\n\t\t);\n\n\t\tif (newState === \"closed\") anchorPosition(el, false);\n\t\telse if (anchor)\n\t\t\tanchorPosition(el, anchor, {\n\t\t\t\tcontain({ availableHeight }) {\n\t\t\t\t\tel.style.width = `${anchor.clientWidth}px`;\n\t\t\t\t\tel.style.maxHeight = `${Math.max(50, availableHeight)}px`;\n\t\t\t\t},\n\t\t\t});\n\t}\n}\n// Update when typing\nfunction handleFieldInput(event: Event) {\n\tif (isInputLike(event.target)) {\n\t\trenderCounter(event.target);\n\t\trenderTextareaSize(event.target);\n\t}\n}\n\nfunction handleFieldValdiation(event: Event) {\n\tconst field = (event.target as Element)?.closest?.(`.${CSS_FIELD}`);\n\tif (event.type === \"invalid\" && field) event.preventDefault(); // Prevent browsers from showing default validation bubbles\n\thandleFieldMutation(true); // Update state\n}\n\nonLoaded(() => [\n\tonMutation(() => handleFieldMutation()),\n\ton(document, \"input\", handleFieldInput, QUICK_EVENT),\n\ton(document, \"toggle\", handleFieldToggle, QUICK_EVENT), // Use capture since toggle does not bubble\n\ton(document, \"invalid,submit\", handleFieldValdiation, true), // Use capture as invalid and submit does not bubble\n]);\n"],"names":["CSS_FIELD","styles","CSS_VALIDATIONS","CSS_VALIDATION","FIELDS","IS_BROWSER","getText","style","key","handleFieldMutation","validate","field","labels","descs","valids","combobox","input","valid","el","UHTMLComboboxElement","isInputLike","attr","desc","label","useId","renderCombobox","renderCounter","renderTextareaSize","textarea","control","list","limit","remainder","nextInvalid","prevInvalid","over","under","css","handleFieldToggle","newState","UHTMLDataListElement","anchor","anchorPosition","availableHeight","handleFieldInput","event","handleFieldValdiation","onLoaded","onMutation","on","QUICK_EVENT"],"mappings":";;;;AAeA,MAAMA,IAAYC,EAAO,MAAM,MAAM,GAAG,EAAE,CAAC,GACrCC,IAAkBD,EAAO,WAAW,MAAM,GAAG,GAC7CE,IAAiBD,EAAgB,CAAC,GAClCE,IAASC,IAAa,SAAS,uBAAuBL,CAAS,IAAI,CAAA,GAEnEM,IAAU,CAACC,GAA4BC,MAC5CD,EAAM,iBAAiB,eAAeC,CAAG,EAAE,GAAG,MAAM,GAAG,EAAE,KAAK;AAE/D,SAASC,EAAoBC,GAAoB;AAChD,aAAWC,KAASP;AACnB,QAAIO,EAAM,aAAa;AACtB,YAAMC,IAA6B,CAAA,GAC7BC,IAAmB,CAAA,GACnBC,IAAoB,CAAA;AAC1B,UAAIC,IAAwC,MACxCC,IAAiC,MACjCC,IAAQ;AAEZ,iBAAWC,KAAMP,EAAM,qBAAqB,GAAG;AAC9C,QAAIO,aAAc,mBAAkBN,EAAO,KAAKM,CAAE,IACzCA,aAAcC,IAAsBJ,IAAWG,IAC/CE,EAAYF,CAAE,KAAK,CAACA,EAAG,SAAQF,IAAQE,IACvCA,EAAG,aAAa,kBAAkB,IAAGL,EAAM,KAAKK,CAAE,IAClDA,EAAG,UAAU,SAASf,CAAc,KAC5Cc,IAAQI,EAAKH,GAAI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AIrB,aAAcsB,GAAsB;AAEvC,UAAMC,IADOvB,EAAG,YAAA,GACK;AAAA,MACpB,mBAAmBA,EAAG,EAAE;AAAA,IAAA;AAGzB,IAAIqB,MAAa,WAAUG,EAAexB,GAAI,EAAK,IAC1CuB,KACRC,EAAexB,GAAIuB,GAAQ;AAAA,MAC1B,QAAQ,EAAE,iBAAAE,KAAmB;AAC5B,QAAAzB,EAAG,MAAM,QAAQ,GAAGuB,EAAO,WAAW,MACtCvB,EAAG,MAAM,YAAY,GAAG,KAAK,IAAI,IAAIyB,CAAe,CAAC;AAAA,MACtD;AAAA,IAAA,CACA;AAAA,EACH;AACD;AAEA,SAASC,EAAiBC,GAAc;AACvC,EAAIzB,EAAYyB,EAAM,MAAM,MAC3BnB,EAAcmB,EAAM,MAAM,GAC1BlB,EAAmBkB,EAAM,MAAM;AAEjC;AAEA,SAASC,EAAsBD,GAAc;AAC5C,QAAMlC,IAASkC,EAAM,QAAoB,UAAU,IAAI7C,CAAS,EAAE;AAClE,EAAI6C,EAAM,SAAS,aAAalC,OAAa,eAAA,GAC7CF,EAAoB,EAAI;AACzB;AAEAsC,EAAS,MAAM;AAAA,EACdC,EAAW,MAAMvC,GAAqB;AAAA,EACtCwC,EAAG,UAAU,SAASL,GAAkBM,CAAW;AAAA,EACnDD,EAAG,UAAU,UAAUX,GAAmBY,CAAW;AAAA;AAAA,EACrDD,EAAG,UAAU,kBAAkBH,GAAuB,EAAI;AAAA;AAC3D,CAAC;"}
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { onLoaded as r, onMutation as f, attr as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
1
|
+
import a from "../styles.module.css.js";
|
|
2
|
+
import { IS_BROWSER as d, onLoaded as r, onMutation as f, attr as s, useId as u, isInputLike as I } from "../utils.js";
|
|
3
|
+
const m = a.fieldset.split(" ")[0], S = a.validation.split(" ")[0], l = "aria-describedby", p = "aria-invalid", E = d ? document.getElementsByClassName(m) : [];
|
|
4
|
+
function A() {
|
|
5
5
|
setTimeout(() => {
|
|
6
|
-
for (const
|
|
7
|
-
if (
|
|
8
|
-
const
|
|
9
|
-
let
|
|
10
|
-
for (const t of
|
|
11
|
-
t.classList.contains(
|
|
12
|
-
for (const t of
|
|
13
|
-
const
|
|
14
|
-
|
|
6
|
+
for (const i of E)
|
|
7
|
+
if (i.isConnected) {
|
|
8
|
+
const o = [];
|
|
9
|
+
let e = null, n = !0;
|
|
10
|
+
for (const t of i.getElementsByTagName("*"))
|
|
11
|
+
t.classList.contains(S) ? (n = s(t, "data-color") === "success" || !t.clientHeight, e = u(t)) : I(t) && o.push(t);
|
|
12
|
+
for (const t of o) {
|
|
13
|
+
const c = s(t, l)?.replace(e || "#", "");
|
|
14
|
+
s(t, l, `${e || ""} ${c || ""}`.trim()), s(t, p, `${!n}`);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
r(
|
|
20
|
-
() => f(document.documentElement, I, L)
|
|
21
|
-
);
|
|
19
|
+
r(() => [f(A, "class")]);
|
|
22
20
|
//# sourceMappingURL=fieldset-observer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fieldset-observer.js","sources":["../../designsystem/fieldset/fieldset-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport {
|
|
1
|
+
{"version":3,"file":"fieldset-observer.js","sources":["../../designsystem/fieldset/fieldset-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport {\n\tattr,\n\tIS_BROWSER,\n\tisInputLike,\n\tonLoaded,\n\tonMutation,\n\tuseId,\n} from \"../utils\";\n\nconst CSS_FIELDSET = styles.fieldset.split(\" \")[0];\nconst CSS_VALIDATION = styles.validation.split(\" \")[0];\nconst ARIA_DESC = \"aria-describedby\";\nconst ARIA_INVALID = \"aria-invalid\";\nconst FIELDSETS = IS_BROWSER\n\t? document.getElementsByClassName(CSS_FIELDSET)\n\t: [];\n\n// Using setTimeout to ensure it runs after field-observer\nfunction handleFieldsetMutation() {\n\tsetTimeout(() => {\n\t\tfor (const fieldset of FIELDSETS)\n\t\t\tif (fieldset.isConnected) {\n\t\t\t\tconst inputs: HTMLInputElement[] = [];\n\t\t\t\tlet validId: string | null = null;\n\t\t\t\tlet valid = true;\n\n\t\t\t\tfor (const el of fieldset.getElementsByTagName(\"*\")) {\n\t\t\t\t\tif (el.classList.contains(CSS_VALIDATION)) {\n\t\t\t\t\t\tvalid = attr(el, \"data-color\") === \"success\" || !el.clientHeight; // Only set invalid if Validation is visible\n\t\t\t\t\t\tvalidId = useId(el);\n\t\t\t\t\t} else if (isInputLike(el)) inputs.push(el);\n\t\t\t\t}\n\n\t\t\t\tfor (const input of inputs) {\n\t\t\t\t\tconst desc = attr(input, ARIA_DESC)?.replace(validId || \"#\", \"\");\n\n\t\t\t\t\tattr(input, ARIA_DESC, `${validId || \"\"} ${desc || \"\"}`.trim());\n\t\t\t\t\tattr(input, ARIA_INVALID, `${!valid}`);\n\t\t\t\t}\n\t\t\t}\n\t});\n}\n\nonLoaded(() => [onMutation(handleFieldsetMutation, \"class\")]);\n"],"names":["CSS_FIELDSET","styles","CSS_VALIDATION","ARIA_DESC","ARIA_INVALID","FIELDSETS","IS_BROWSER","handleFieldsetMutation","fieldset","inputs","validId","valid","el","attr","useId","isInputLike","input","desc","onLoaded","onMutation"],"mappings":";;AAUA,MAAMA,IAAeC,EAAO,SAAS,MAAM,GAAG,EAAE,CAAC,GAC3CC,IAAiBD,EAAO,WAAW,MAAM,GAAG,EAAE,CAAC,GAC/CE,IAAY,oBACZC,IAAe,gBACfC,IAAYC,IACf,SAAS,uBAAuBN,CAAY,IAC5C,CAAA;AAGH,SAASO,IAAyB;AACjC,aAAW,MAAM;AAChB,eAAWC,KAAYH;AACtB,UAAIG,EAAS,aAAa;AACzB,cAAMC,IAA6B,CAAA;AACnC,YAAIC,IAAyB,MACzBC,IAAQ;AAEZ,mBAAWC,KAAMJ,EAAS,qBAAqB,GAAG;AACjD,UAAII,EAAG,UAAU,SAASV,CAAc,KACvCS,IAAQE,EAAKD,GAAI,YAAY,MAAM,aAAa,CAACA,EAAG,cACpDF,IAAUI,EAAMF,CAAE,KACRG,EAAYH,CAAE,KAAGH,EAAO,KAAKG,CAAE;AAG3C,mBAAWI,KAASP,GAAQ;AAC3B,gBAAMQ,IAAOJ,EAAKG,GAAOb,CAAS,GAAG,QAAQO,KAAW,KAAK,EAAE;AAE/D,UAAAG,EAAKG,GAAOb,GAAW,GAAGO,KAAW,EAAE,IAAIO,KAAQ,EAAE,GAAG,KAAA,CAAM,GAC9DJ,EAAKG,GAAOZ,GAAc,GAAG,CAACO,CAAK,EAAE;AAAA,QACtC;AAAA,MACD;AAAA,EACF,CAAC;AACF;AAEAO,EAAS,MAAM,CAACC,EAAWZ,GAAwB,OAAO,CAAC,CAAC;"}
|