@mattilsynet/design 0.5.2 → 0.5.4
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/button/button.stories.d.ts +1 -1
- package/mtds/field/field-observer.js +31 -28
- package/mtds/field/field-observer.js.map +1 -1
- package/mtds/index.iife.js +2 -2
- package/mtds/index.iife.js.map +1 -1
- package/mtds/input/input.stories.d.ts +3 -1
- package/mtds/layout/layout.d.ts +1 -1
- package/mtds/layout/layout.js.map +1 -1
- package/mtds/styles.css +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ export declare const Nowrap: Story;
|
|
|
15
15
|
export declare const Pressed: Story;
|
|
16
16
|
export declare const WithArrows: Story;
|
|
17
17
|
export declare const WithIcons: Story;
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const WithSpinner: Story;
|
|
19
19
|
export declare const WithMenu: Story;
|
|
20
20
|
export declare const WithTooltip: Story;
|
|
21
21
|
export declare const InMenu: Story;
|
|
@@ -1,48 +1,51 @@
|
|
|
1
1
|
import m from "../styles.module.css.js";
|
|
2
|
-
import { onMutation as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
for (const n of
|
|
6
|
-
const
|
|
2
|
+
import { onMutation as p, on as u, QUICK_EVENT as v, isInputLike as h, attr as l, off as d, useId as c } from "../utils.js";
|
|
3
|
+
const r = m.field.split(" ")[0], _ = "--mtds-text-count-over", P = "--mtds-text-count-under", S = m.validation.split(" "), x = S[0];
|
|
4
|
+
function A(e) {
|
|
5
|
+
for (const n of e) {
|
|
6
|
+
const i = [], s = [];
|
|
7
7
|
let o = null, a = !0;
|
|
8
|
-
for (const
|
|
9
|
-
|
|
8
|
+
for (const t of n.getElementsByTagName("*"))
|
|
9
|
+
t instanceof HTMLLabelElement ? i.push(t) : h(t) ? o = t : t.classList.contains(x) ? (a = l(t, "data-color") === "success", s.unshift(c(t))) : t instanceof HTMLParagraphElement && s.push(c(t));
|
|
10
10
|
if (o) {
|
|
11
|
-
for (const
|
|
12
|
-
|
|
11
|
+
for (const t of i) t.htmlFor = c(o);
|
|
12
|
+
I(o), E(o), l(o, "aria-describedby", s.join(" ")), l(o, "aria-invalid", `${!a}`);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
16
|
+
function g({ target: e }) {
|
|
17
|
+
h(e) && (I(e), E(e));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
function E(e) {
|
|
20
|
+
e instanceof HTMLTextAreaElement && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
21
|
+
}
|
|
22
|
+
function I(e) {
|
|
23
|
+
var s, o;
|
|
24
|
+
const n = e == null ? void 0 : e.nextElementSibling, i = n && l(n, "data-count");
|
|
25
|
+
if (n && i) {
|
|
26
|
+
const a = Number(i) - e.value.length, t = a < 0, b = l(n, "aria-live") === "polite", f = window.getComputedStyle(n || e), L = ((s = f.getPropertyValue(_)) == null ? void 0 : s.slice(1, -1)) || "", y = ((o = f.getPropertyValue(P)) == null ? void 0 : o.slice(1, -1)) || "";
|
|
27
|
+
if (b !== t) {
|
|
28
|
+
l(n, "aria-live", t ? "polite" : "off");
|
|
29
|
+
for (const C of S) n.classList.toggle(C, t);
|
|
27
30
|
}
|
|
28
|
-
n.textContent = (
|
|
31
|
+
n.textContent = (t ? L : y).replace(
|
|
29
32
|
"%d",
|
|
30
33
|
`${Math.abs(a)}`
|
|
31
34
|
);
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
|
-
function
|
|
35
|
-
var n,
|
|
36
|
-
(
|
|
37
|
+
function T(e) {
|
|
38
|
+
var n, i;
|
|
39
|
+
(i = (n = e.target) == null ? void 0 : n.closest) != null && i.call(n, `.${r}`) && e.preventDefault();
|
|
37
40
|
}
|
|
38
|
-
function V(
|
|
39
|
-
|
|
41
|
+
function V(e) {
|
|
42
|
+
p(e, r, A), u(e, "input", g, v), u(e, "invalid", T, !0);
|
|
40
43
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
44
|
+
function D(e) {
|
|
45
|
+
p(e, r, !1), d(e, "input", g, v), d(e, "invalid", T, !0);
|
|
43
46
|
}
|
|
44
47
|
export {
|
|
45
48
|
V as observe,
|
|
46
|
-
|
|
49
|
+
D as unobserve
|
|
47
50
|
};
|
|
48
51
|
//# sourceMappingURL=field-observer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-observer.js","sources":["../../designsystem/field/field-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport {\n QUICK_EVENT,\n attr,\n isInputLike,\n off,\n on,\n onMutation,\n useId,\n} from \"../utils\";\n\nconst CSS_FIELD = styles.field.split(\" \")[0];\nconst CSS_PROPERTY_OVER = \"--mtds-text-count-over\";\nconst CSS_PROPERTY_UNDER = \"--mtds-text-count-under\";\nconst CSS_VALIDATIONS = styles.validation.split(\" \");\nconst CSS_VALIDATION = CSS_VALIDATIONS[0];\n\nfunction renderAria(fields: HTMLCollectionOf<Element>) {\n for (const field of fields) {\n const labels: HTMLLabelElement[] = [];\n const descs: string[] = [];\n let input: HTMLInputElement | null = null;\n let valid = true;\n\n for (const el of field.getElementsByTagName(\"*\")) {\n if (el instanceof HTMLLabelElement) labels.push(el);\n else if (isInputLike(el)) input = el;\n else if (el.classList.contains(CSS_VALIDATION)) {\n // Must be before instanceof HTMLParagraphElement since validation can also be a <p>\n valid = attr(el, \"data-color\") === \"success\";\n descs.unshift(useId(el));\n } else if (el instanceof HTMLParagraphElement) descs.push(useId(el));\n }\n\n if (input) {\n for (const label of labels) label.htmlFor = useId(input);\n renderCounter(input);\n attr(input, \"aria-describedby\", descs.join(\" \"));\n attr(input, \"aria-invalid\", `${!valid}`);\n }\n }\n}\nfunction handleInput({ target }: Event) {\n if (isInputLike(target)) renderCounter(target);\n}\n\nfunction renderCounter(input: HTMLInputElement) {\n const el = input?.nextElementSibling;\n const limit = el && attr(el, \"data-count\");\n\n if (el && limit) {\n const remainder = Number(limit) - input.value.length;\n const nextInvalid = remainder < 0;\n const prevInvalid = attr(el, \"aria-live\") === \"polite\";\n const style = window.getComputedStyle(el || input);\n const over = style.getPropertyValue(CSS_PROPERTY_OVER)?.slice(1, -1) || \"\"; // slice to trim quotes\n const under =\n style.getPropertyValue(CSS_PROPERTY_UNDER)?.slice(1, -1) || \"\"; // slice to trim quotes\n\n if (prevInvalid !== nextInvalid) {\n attr(el, \"aria-live\", nextInvalid ? \"polite\" : \"off\");\n for (const css of CSS_VALIDATIONS) el.classList.toggle(css, nextInvalid);\n }\n el.textContent = (nextInvalid ? over : under).replace(\n \"%d\",\n `${Math.abs(remainder)}`\n );\n }\n}\n\n// Prevent browsers from showing default validation bubbles\nfunction handleInvalid(event: Event) {\n if ((event.target as Element)?.closest?.(`.${CSS_FIELD}`))\n event.preventDefault();\n}\n\nexport function observe(el: Element) {\n onMutation(el, CSS_FIELD, renderAria);\n on(el, \"input\", handleInput, QUICK_EVENT);\n on(el, \"invalid\", handleInvalid, true); // Use capture as invalid does noe buttle\n}\n\nexport function unobserve(el: Element) {\n onMutation(el, CSS_FIELD, false);\n off(el, \"input\", handleInput, QUICK_EVENT);\n off(el, \"invalid\", handleInvalid, true);\n}\n"],"names":["CSS_FIELD","styles","CSS_PROPERTY_OVER","CSS_PROPERTY_UNDER","CSS_VALIDATIONS","CSS_VALIDATION","renderAria","fields","field","labels","descs","input","valid","el","isInputLike","attr","useId","label","renderCounter","handleInput","target","limit","remainder","nextInvalid","prevInvalid","style","over","_a","under","_b","css","handleInvalid","event","observe","onMutation","on","QUICK_EVENT","unobserve","off"],"mappings":";;AAWA,MAAMA,IAAYC,EAAO,MAAM,MAAM,GAAG,EAAE,CAAC,GACrCC,IAAoB,0BACpBC,IAAqB,2BACrBC,IAAkBH,EAAO,WAAW,MAAM,GAAG,GAC7CI,IAAiBD,EAAgB,CAAC;AAExC,SAASE,EAAWC,GAAmC;AACrD,aAAWC,KAASD,GAAQ;AAC1B,UAAME,IAA6B,CAAC,GAC9BC,IAAkB,CAAC;AACzB,QAAIC,IAAiC,MACjCC,IAAQ;AAEZ,eAAWC,KAAML,EAAM,qBAAqB,GAAG;AAC7C,MAAIK,aAAc,mBAAyBJ,EAAA,KAAKI,CAAE,IACzCC,EAAYD,CAAE,IAAWF,IAAAE,IACzBA,EAAG,UAAU,SAASR,CAAc,KAEnCO,IAAAG,EAAKF,GAAI,YAAY,MAAM,WAC7BH,EAAA,QAAQM,EAAMH,CAAE,CAAC,KACdA,aAAc,0BAA4B,KAAKG,EAAMH,CAAE,CAAC;AAGrE,QAAIF,GAAO;AACT,iBAAWM,KAASR,EAAc,CAAAQ,EAAA,UAAUD,EAAML,CAAK;AACvD,MAAAO,EAAcP,CAAK,
|
|
1
|
+
{"version":3,"file":"field-observer.js","sources":["../../designsystem/field/field-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport {\n QUICK_EVENT,\n attr,\n isInputLike,\n off,\n on,\n onMutation,\n useId,\n} from \"../utils\";\n\nconst CSS_FIELD = styles.field.split(\" \")[0];\nconst CSS_PROPERTY_OVER = \"--mtds-text-count-over\";\nconst CSS_PROPERTY_UNDER = \"--mtds-text-count-under\";\nconst CSS_VALIDATIONS = styles.validation.split(\" \");\nconst CSS_VALIDATION = CSS_VALIDATIONS[0];\n\nfunction renderAria(fields: HTMLCollectionOf<Element>) {\n for (const field of fields) {\n const labels: HTMLLabelElement[] = [];\n const descs: string[] = [];\n let input: HTMLInputElement | null = null;\n let valid = true;\n\n for (const el of field.getElementsByTagName(\"*\")) {\n if (el instanceof HTMLLabelElement) labels.push(el);\n else if (isInputLike(el)) input = el;\n else if (el.classList.contains(CSS_VALIDATION)) {\n // Must be before instanceof HTMLParagraphElement since validation can also be a <p>\n valid = attr(el, \"data-color\") === \"success\";\n descs.unshift(useId(el));\n } else if (el instanceof HTMLParagraphElement) descs.push(useId(el));\n }\n\n if (input) {\n for (const label of labels) label.htmlFor = useId(input);\n renderCounter(input);\n renderTextareaSize(input);\n attr(input, \"aria-describedby\", descs.join(\" \"));\n attr(input, \"aria-invalid\", `${!valid}`);\n }\n }\n}\nfunction handleInput({ target }: Event) {\n if (isInputLike(target)) {\n renderCounter(target);\n renderTextareaSize(target);\n }\n}\n\n// iOS does not support field-sizing: content, so we need to manually resize\nfunction renderTextareaSize(textarea: Element) {\n if (textarea instanceof HTMLTextAreaElement) {\n textarea.style.height = \"auto\";\n textarea.style.height = `${textarea.scrollHeight}px`;\n }\n}\n\nfunction renderCounter(input: HTMLInputElement) {\n const el = input?.nextElementSibling;\n const limit = el && attr(el, \"data-count\");\n\n if (el && limit) {\n const remainder = Number(limit) - input.value.length;\n const nextInvalid = remainder < 0;\n const prevInvalid = attr(el, \"aria-live\") === \"polite\";\n const style = window.getComputedStyle(el || input);\n const over = style.getPropertyValue(CSS_PROPERTY_OVER)?.slice(1, -1) || \"\"; // slice to trim quotes\n const under =\n style.getPropertyValue(CSS_PROPERTY_UNDER)?.slice(1, -1) || \"\"; // slice to trim quotes\n\n if (prevInvalid !== nextInvalid) {\n attr(el, \"aria-live\", nextInvalid ? \"polite\" : \"off\");\n for (const css of CSS_VALIDATIONS) el.classList.toggle(css, nextInvalid);\n }\n el.textContent = (nextInvalid ? over : under).replace(\n \"%d\",\n `${Math.abs(remainder)}`\n );\n }\n}\n\n// Prevent browsers from showing default validation bubbles\nfunction handleInvalid(event: Event) {\n if ((event.target as Element)?.closest?.(`.${CSS_FIELD}`))\n event.preventDefault();\n}\n\nexport function observe(el: Element) {\n onMutation(el, CSS_FIELD, renderAria);\n on(el, \"input\", handleInput, QUICK_EVENT);\n on(el, \"invalid\", handleInvalid, true); // Use capture as invalid does noe buttle\n}\n\nexport function unobserve(el: Element) {\n onMutation(el, CSS_FIELD, false);\n off(el, \"input\", handleInput, QUICK_EVENT);\n off(el, \"invalid\", handleInvalid, true);\n}\n"],"names":["CSS_FIELD","styles","CSS_PROPERTY_OVER","CSS_PROPERTY_UNDER","CSS_VALIDATIONS","CSS_VALIDATION","renderAria","fields","field","labels","descs","input","valid","el","isInputLike","attr","useId","label","renderCounter","renderTextareaSize","handleInput","target","textarea","limit","remainder","nextInvalid","prevInvalid","style","over","_a","under","_b","css","handleInvalid","event","observe","onMutation","on","QUICK_EVENT","unobserve","off"],"mappings":";;AAWA,MAAMA,IAAYC,EAAO,MAAM,MAAM,GAAG,EAAE,CAAC,GACrCC,IAAoB,0BACpBC,IAAqB,2BACrBC,IAAkBH,EAAO,WAAW,MAAM,GAAG,GAC7CI,IAAiBD,EAAgB,CAAC;AAExC,SAASE,EAAWC,GAAmC;AACrD,aAAWC,KAASD,GAAQ;AAC1B,UAAME,IAA6B,CAAC,GAC9BC,IAAkB,CAAC;AACzB,QAAIC,IAAiC,MACjCC,IAAQ;AAEZ,eAAWC,KAAML,EAAM,qBAAqB,GAAG;AAC7C,MAAIK,aAAc,mBAAyBJ,EAAA,KAAKI,CAAE,IACzCC,EAAYD,CAAE,IAAWF,IAAAE,IACzBA,EAAG,UAAU,SAASR,CAAc,KAEnCO,IAAAG,EAAKF,GAAI,YAAY,MAAM,WAC7BH,EAAA,QAAQM,EAAMH,CAAE,CAAC,KACdA,aAAc,0BAA4B,KAAKG,EAAMH,CAAE,CAAC;AAGrE,QAAIF,GAAO;AACT,iBAAWM,KAASR,EAAc,CAAAQ,EAAA,UAAUD,EAAML,CAAK;AACvD,MAAAO,EAAcP,CAAK,GACnBQ,EAAmBR,CAAK,GACxBI,EAAKJ,GAAO,oBAAoBD,EAAM,KAAK,GAAG,CAAC,GAC/CK,EAAKJ,GAAO,gBAAgB,GAAG,CAACC,CAAK,EAAE;AAAA,IAAA;AAAA,EACzC;AAEJ;AACA,SAASQ,EAAY,EAAE,QAAAC,KAAiB;AAClC,EAAAP,EAAYO,CAAM,MACpBH,EAAcG,CAAM,GACpBF,EAAmBE,CAAM;AAE7B;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AU1B,GAAa;AAC1B,EAAAuB,EAAAvB,GAAIb,GAAW,EAAK,GAC3BwC,EAAA3B,GAAI,SAASO,GAAakB,CAAW,GACrCE,EAAA3B,GAAI,WAAWoB,GAAe,EAAI;AACxC;"}
|
package/mtds/index.iife.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var mtds=function(y){"use strict";const
|
|
1
|
+
var mtds=function(y){"use strict";const H="_alert_1p6jx_1 _ds-alert_194o1_1",N="_avatar_1p6jx_1 _ds-avatar_194o1_1",R="_badge_1p6jx_1",V="_breadcrumbs_1p6jx_1 _ds-breadcrumbs_194o1_1",U="_button_1p6jx_1 _ds-button_194o1_1",Y="_card_1p6jx_1",F="_group_1p6jx_1",W="_chip_1p6jx_1 _ds-chip_194o1_1",q="_details_1p6jx_1 _ds-details_194o1_1",G="_dialog_1p6jx_1 _ds-dialog_194o1_1",z="_divider_1p6jx_1",X="_errorsummary_1p6jx_1 _ds-error-summary_194o1_1",K="_field_1p6jx_1 _ds-field_194o1_1",Q="_affixes_1p6jx_1 _ds-field-affixes_194o1_1",J="_count_1p6jx_1",Z="_fieldset_1p6jx_1 _ds-fieldset_194o1_1",tt="_heading_1p6jx_1 _ds-heading_194o1_1",et="_typostack_1p6jx_1",ot="_input_1p6jx_1 _ds-input_194o1_1",nt="_grid_1p6jx_1",st="_flex_1p6jx_1",it="_app_1p6jx_1",ct="_link_1p6jx_1",at="_logo_1p6jx_1",lt="_pagination_1p6jx_1 _ds-pagination_194o1_1",rt="_popover_1p6jx_1",dt="_skeleton_1p6jx_1 _ds-skeleton_194o1_1",ut="_spinner_1p6jx_1",ft="_table_1p6jx_1 _ds-table_194o1_1",pt="__scrollShadow_1p6jx_1",_t="_tabs_1p6jx_1 _ds-tabs_194o1_1",mt="_tag_1p6jx_1 _ds-tag_194o1_1",ht="__tooltip_1p6jx_1",bt="_validation_1p6jx_1 _ds-validation-message_194o1_1",gt="_body_1p6jx_141",d={alert:H,avatar:N,badge:R,breadcrumbs:V,button:U,card:Y,group:F,chip:W,details:q,dialog:G,divider:z,errorsummary:X,field:K,affixes:Q,count:J,fieldset:Z,heading:tt,typostack:et,input:ot,grid:nt,flex:st,app:it,link:ct,logo:at,pagination:lt,popover:rt,skeleton:dt,spinner:ut,table:ft,_scrollShadow:pt,tabs:_t,tag:mt,_tooltip:ht,validation:bt,body:gt},zt=Object.freeze(Object.defineProperty({__proto__:null,_scrollShadow:pt,_tooltip:ht,affixes:Q,alert:H,app:it,avatar:N,badge:R,body:gt,breadcrumbs:V,button:U,card:Y,chip:W,count:J,default:d,details:q,dialog:G,divider:z,errorsummary:X,field:K,fieldset:Z,flex:st,grid:nt,group:F,heading:tt,input:ot,link:ct,logo:at,pagination:lt,popover:rt,skeleton:dt,spinner:ut,table:ft,tabs:_t,tag:mt,typostack:et,validation:bt},Symbol.toStringTag,{value:"Module"})),Xt=(t,e,o)=>{const n=(o-1)/2,s=Math.max(Math.min(t-Math.floor(n),e-o+1),1),c=Math.min(Math.max(t+Math.ceil(n),o),e),i=Array.from({length:c+1-s},(r,p)=>p+s);return o>4&&s>1&&i.splice(0,2,1,0),o>3&&c<e&&i.splice(-2,2,0,e),i},Kt=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Xt(t,e,o).map((n,s)=>({current:n===t&&"page",key:`key-${n}-${s}`,page:n}))}),x=typeof window<"u"&&typeof document<"u",l={capture:!0,passive:!0};function a(t,e,o){return o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}let Qt=0;const Jt=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function k(t){return t.id||(t.id=`${Jt}${++Qt}`),t.id}const vt=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,e[`${t}EventListener`](...o)},u=(t,...e)=>vt("add",t,e),w=(t,...e)=>vt("remove",t,e),L=new Map,_=x?document.createElement("div"):null;_&&a(_,"style","position:absolute;padding:1px;top:0;left:0px"),x&&u(window,"load,resize,scroll",()=>{for(const[t,e]of L)e()},l);const T={top:0,right:1,bottom:2,left:3};function E(t,e,o){var Gt;if(!e||!e.isConnected||!t.isConnected)return L.delete(t);if(_!=null&&_.isConnected||document.body.append(_||""),!L.has(t)){const Ve=T[o]??T.bottom;return(Gt=L.set(t,()=>E(t,e,Ve)).get(t))==null?void 0:Gt()}const{offsetWidth:n,offsetHeight:s}=t,{offsetWidth:c,offsetHeight:i}=e,{width:r,height:p,left:S,top:$}=e.getBoundingClientRect(),h=Math.round(S-(c-r)/2),g=Math.round($-(i-p)/2),Ae=h-n>0,Oe=c+c+n<window.innerWidth,De=g-s>0,Pe=g+i+s<window.innerHeight,Be=o===T.bottom&&Oe||!Ae,He=o===T.bottom&&Pe||!De,Ne=Math.min(Math.max(10,h-(n-c)/2),window.innerWidth-n-10),Re=Math.min(Math.max(10,g-(s-i)/2),window.innerHeight-s-10),qt=o===T.top||o===T.bottom;t.style.left=`${Math.round(qt?Ne:Be?h+c:h-n)}px`,t.style.top=`${Math.round(qt?He?g+i:g-s:Re)}px`,_==null||_.style.setProperty("translate",`${Math.round(window.scrollX+h+c+n+30)} ${Math.round(window.scrollY+g+i+s+30)}px`)}function Zt(t){let e=0;const o=()=>setTimeout(n,200),n=()=>{t([],s),e=0},s=new MutationObserver(()=>{e||(e=requestAnimationFrame(o))});return s}const C=new WeakMap,te=t=>{var o;const e=C.get(t);if(!e||!t.isConnected)(o=e==null?void 0:e.observer)==null||o.disconnect(),C.delete(t);else for(const[,n]of e.collections)n()},b=(t,e,o)=>{const n=t.getElementsByClassName(e);let s=C.get(t);s||(s={collections:new Map,observer:Zt(()=>te(t))},s.observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),C.set(t,s)),o?s.collections.set(e,()=>o(n)):s.collections.delete(e)},j=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),ee=d._tooltip.split(" "),yt="aria-describedby",wt="Escape",M="aria-labelledby",oe="--mtds-tooltip-position",ne=300,I="mtds-tooltip";let m=null,Tt=Number.NEGATIVE_INFINITY,St=0,f=null;function A({target:t,type:e,key:o}){if(e==="keydown"&&o!==wt)return;const n=Tt+ne-Date.now();clearTimeout(St),St=setTimeout(se,Math.max(n,0),o===wt?null:t)}function se(t){var r;if(Tt=Date.now(),!f||t===f)return;let e=((r=t==null?void 0:t.closest)==null?void 0:r.call(t,"[data-tooltip]"))||null;if(e===m)return;const o=e&&a(e,"data-tooltip")||"",n=e&&a(e,"data-tooltip-position")||window.getComputedStyle(e||document.body).getPropertyValue(oe)||"top";(!o||o==="false"||o==="true"||n==="none")&&(e=null),e&&(f.textContent=o);const c=m&&a(m,M)===I,i=!!(e!=null&&e.innerText.trim())||(e==null?void 0:e.hasAttribute(M))||(e==null?void 0:e.hasAttribute("aria-label"));m==null||m.removeAttribute(c?M:yt),E(f,!1),m=e,m&&a(m,i?yt:M,I),f.togglePopover(!!e),E(f,e,n)}x&&!document.getElementById(I)&&(f=document.body.appendChild(document.createElement("div")),f.classList.add(...ee),f.id=I,a(f,"popover","manual"),u(document,"blur,focus,mouseout,mouseover",A,l),u(window,"keydown",A,l),u(window,"blur",A,l));var xt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Et;xt&&/^Mac/i.test(((Et=navigator.userAgentData)==null?void 0:Et.platform)||navigator.platform);var ie=":host(:not([hidden])) { display: block }",$t=typeof HTMLElement>"u"?class{}:HTMLElement;function v(t,e,o){var n;return o===void 0?(n=t.getAttribute(e))!=null?n:null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var kt=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},Lt=(t,...e)=>kt("add",t,e),Ct=(t,...e)=>kt("remove",t,e),ce=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},ae=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},O=(t,e,o)=>{const n=document.createElement(t);if(e&&(n.textContent=e),o)for(const[s,c]of Object.entries(o))v(n,s,c);return n},Mt={define:(t,e)=>!xt||window.customElements.get(t)||window.customElements.define(t,e)},le=class extends $t{constructor(){super(),this._content=null,this.attachShadow({mode:"open"}).append(O("slot",null,{name:"summary"}),O("slot",null,{part:"details-content"}),O("style",`${ie}
|
|
2
2
|
::slotted(u-summary) { cursor: pointer; display: list-item; counter-increment: list-item 0; list-style: disclosure-closed inside }
|
|
3
3
|
::slotted(u-summary[aria-expanded="true"]) { list-style-type: disclosure-open }
|
|
4
|
-
:host > [part="details-content"]:not([hidden=""]) { display: block }`))}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],Lt(this._content,"beforematch",this),Lt(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&Ct(this._content,"beforematch",this),Ct(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,o){const n="onbeforematch"in this?"until-found":!0,s=this.open;for(const c of this.children)c.nodeName==="U-SUMMARY"&&v(c,"aria-expanded",`${s}`);if(this._content&&(v(this._content,"aria-hidden",`${!s}`),this._content.hidden=s?!1:n),s&&this.name){const c=
|
|
4
|
+
:host > [part="details-content"]:not([hidden=""]) { display: block }`))}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],Lt(this._content,"beforematch",this),Lt(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&Ct(this._content,"beforematch",this),Ct(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,o){const n="onbeforematch"in this?"until-found":!0,s=this.open;for(const c of this.children)c.nodeName==="U-SUMMARY"&&v(c,"aria-expanded",`${s}`);if(this._content&&(v(this._content,"aria-hidden",`${!s}`),this._content.hidden=s?!1:n),s&&this.name){const c=ae(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const i of c)i!==this&&(i.open=!1)}t==="open"&&e===null!=(o===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){const e=this.querySelector(":scope > u-summary"),o=e==null?void 0:e.contains(t.target);t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),o&&t.type==="keydown"&&ce(t),o&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){v(this,"open",t?"":null)}get name(){return v(this,"name")||""}set name(t){v(this,"name",t)}},re=class extends $t{connectedCallback(){v(this,"role","button"),this.slot="summary",this.tabIndex=0}};Mt.define("u-details",le),Mt.define("u-summary",re);const It=({clientX:t,clientY:e,target:o})=>{var n;if(o instanceof HTMLDialogElement&&a(o,"data-closedby")==="any"){const{top:s,right:c,bottom:i,left:r}=o.getBoundingClientRect();s<=e&&e<=i&&r<=t&&t<=c||o.close()}else o instanceof Element&&o.closest('button[data-command="close"]')&&((n=o==null?void 0:o.closest("dialog"))==null||n.close())};function de(t){u(t,"click",It,l)}function ue(t){w(t,"click",It,l)}const D=d.field.split(" ")[0],fe="--mtds-text-count-over",pe="--mtds-text-count-under",jt=d.validation.split(" "),_e=jt[0];function me(t){for(const e of t){const o=[],n=[];let s=null,c=!0;for(const i of e.getElementsByTagName("*"))i instanceof HTMLLabelElement?o.push(i):j(i)?s=i:i.classList.contains(_e)?(c=a(i,"data-color")==="success",n.unshift(k(i))):i instanceof HTMLParagraphElement&&n.push(k(i));if(s){for(const i of o)i.htmlFor=k(s);Dt(s),Ot(s),a(s,"aria-describedby",n.join(" ")),a(s,"aria-invalid",`${!c}`)}}}function At({target:t}){j(t)&&(Dt(t),Ot(t))}function Ot(t){t instanceof HTMLTextAreaElement&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Dt(t){var n,s;const e=t==null?void 0:t.nextElementSibling,o=e&&a(e,"data-count");if(e&&o){const c=Number(o)-t.value.length,i=c<0,r=a(e,"aria-live")==="polite",p=window.getComputedStyle(e||t),S=((n=p.getPropertyValue(fe))==null?void 0:n.slice(1,-1))||"",$=((s=p.getPropertyValue(pe))==null?void 0:s.slice(1,-1))||"";if(r!==i){a(e,"aria-live",i?"polite":"off");for(const h of jt)e.classList.toggle(h,i)}e.textContent=(i?S:$).replace("%d",`${Math.abs(c)}`)}}function Pt(t){var e,o;(o=(e=t.target)==null?void 0:e.closest)!=null&&o.call(e,`.${D}`)&&t.preventDefault()}function he(t){b(t,D,me),u(t,"input",At,l),u(t,"invalid",Pt,!0)}function be(t){b(t,D,!1),w(t,"input",At,l),w(t,"invalid",Pt,!0)}const Bt=d.fieldset.split(" ")[0],ge=d.validation.split(" ")[0];function ve(t){for(const e of t){const o=[];let n=null;for(const s of e.getElementsByTagName("*"))s.classList.contains(ge)?n=k(s):j(s)&&o.push(s);for(const s of o)a(s,"aria-describedby",n),a(s,"aria-invalid",`${!!n}`)}}const ye=t=>b(t,Bt,ve),we=t=>b(t,Bt,!1),Ht=d.app.split(" ")[0],Te=`.${Ht} > header + :not(main) > button:empty:first-child`,Nt=({target:t})=>{const e=(t==null?void 0:t.nodeName)==="BUTTON"&&(t==null?void 0:t.closest(Te));if(!e)return;const o=e.closest(`.${Ht} > *`),n=()=>o&&a(o,"data-expanded",`${a(o,"data-expanded")==="false"}`);document.startViewTransition?document.startViewTransition(()=>n()):n()};function Se(t){u(t,"click",Nt,l)}function xe(t){w(t,"click",Nt,l)}const P=d.logo.split(" ")[0];let B;function Rt(t){var i,r,p;const e=(i=t[0])==null?void 0:i.firstElementChild;if(!e)return;if(!B){const{head:S}=((r=window.top)==null?void 0:r.document)||document,$=S.getElementsByTagName("link[rel~='icon']"),h=document.createElement("link");for(const g of $)g.remove();B=S.appendChild(Object.assign(h,{rel:"icon"}))}const o=(p=e.parentElement)==null?void 0:p.hasAttribute("data-color"),n=window.getComputedStyle(e),s=n.getPropertyValue("color"),c=n.getPropertyValue("background-color");B.href=`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${o?"none":c}' width='51' height='51' x='2' y='2' stroke='${s}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${o?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${encodeURIComponent(e.outerHTML.replace(/(fill|width|height|xmlns)=\S+/gi,"").replace("<svg",`<svg width="40" height="40" fill="${s}"`))}</g></svg>`}x&&setTimeout(()=>Rt(document.getElementsByClassName(P)),300);const Ee=t=>b(t,P,Rt),$e=t=>b(t,P,!1),Vt=d.popover.split(" ")[0];function ke(t){u(t,"toggle",Ut,l),u(t,"click",Yt)}function Le(t){w(t,"toggle",Ut,l),w(t,"click",Yt)}function Ut({target:t,newState:e}){var o;if(t instanceof HTMLElement&&t.classList.contains(Vt)){const n=(o=t.getRootNode())==null?void 0:o.querySelector(`[popovertarget="${t.id}"]`);e==="closed"?E(t,!1):n&&E(t,n,a(t,"data-position")||"bottom")}}function Yt({target:t}){var o,n;const e=(o=t==null?void 0:t.closest)==null?void 0:o.call(t,"a");if(e){const s=e.getRootNode(),c=((n=s.getElementById)==null?void 0:n.call(s,a(e,"popovertarget")||""))||e.closest(`.${Vt}`),i=a(e,"popovertargetaction")||"toggle";c==null||c.togglePopover(i==="show"||(i==="hide"?!1:void 0))}}const Ft=d.table.split(" ")[0];function Ce(t){for(const e of t){const o=[];a(e,"role","table"),e.caption&&a(e.caption,"role","caption");for(const n of[e.tHead,e.tFoot,...e.tBodies])if(n){a(n,"role","rowgroup");const s=n.nodeName==="TBODY";for(const c of n.rows){a(c,"role","row");for(const i of c.cells)s?a(i,"data-th",o[i.cellIndex]||":empty"):o.push(i.innerText.trim()),i.nodeName==="TD"?a(i,"role","cell"):(a(i,"role",s?"rowheader":"columnheader"),a(i,"scope",s?"row":"col"))}}}}const Me=t=>b(t,Ft,Ce),Ie=t=>b(t,Ft,!1);if(x){const t=document.readyState==="loading",e=()=>Wt(document.body);t?document.addEventListener("DOMContentLoaded",e):e()}function Wt(t){de(t),he(t),ye(t),Se(t),Ee(t),ke(t),Me(t)}function je(t){ue(t),be(t),we(t),xe(t),$e(t),Le(t),Ie(t)}return y.observe=Wt,y.pagination=Kt,y.styles=zt,y.unobserve=je,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),y}({});
|
|
5
5
|
//# sourceMappingURL=index.iife.js.map
|
package/mtds/index.iife.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.iife.js","sources":["../designsystem/pagination/pagination-helper.ts","../designsystem/utils.ts","../designsystem/tooltip/tooltip-observer.ts","../node_modules/@u-elements/u-details/dist/u-details.js","../designsystem/dialog/dialog-observer.ts","../designsystem/field/field-observer.ts","../designsystem/fieldset/fieldset-observer.ts","../designsystem/layout/layout-observer.ts","../designsystem/logo/logo-observer.ts","../designsystem/popover/popover-observer.ts","../designsystem/table/table-observer.ts","../designsystem/index.ts"],"sourcesContent":["const getSteps = (now: number, max: number, show: number) => {\n const offset = (show - 1) / 2;\n const start = Math.max(Math.min(now - Math.floor(offset), max - show + 1), 1);\n const end = Math.min(Math.max(now + Math.ceil(offset), show), max);\n const pages = Array.from({ length: end + 1 - start }, (_, i) => i + start);\n\n if (show > 4 && start > 1) pages.splice(0, 2, 1, 0);\n if (show > 3 && end < max) pages.splice(-2, 2, 0, max);\n return pages;\n};\n\nexport const pagination = ({ current = 1, total = 10, show = 7 }) => ({\n prev: current > 1 ? current - 1 : 0,\n next: current < total ? current + 1 : 0,\n pages: getSteps(current, total, show).map((page, index) => ({\n current: page === current && (\"page\" as const),\n key: `key-${page}-${index}`,\n page,\n })),\n});\n","export const IS_BROWSER = typeof window !== 'undefined' && typeof document !== 'undefined';\nexport const QUICK_EVENT = { capture: true, passive: true };\n\n/**\n * attr\n * @description Utility to quickly get, set and remove attributes\n * @param el The Element to use as EventTarget\n * @param name The attribute name to get, set or remove, or a object to set multiple attributes\n * @param value A valid attribute value or null to remove attribute\n */\nexport function attr(\n\tel: Element,\n\tname: string,\n\tvalue?: string | null,\n): string | null {\n\tif (value === undefined) return el.getAttribute(name) ?? null; // Fallback to null only if el is undefined\n\tif (value === null) el.removeAttribute(name);\n\telse if (el.getAttribute(name) !== value) el.setAttribute(name, value);\n\treturn null;\n}\n\n/**\n * useId\n * @return A generated unique ID\n */\nlet id = 0;\nconst UUID = `${Date.now().toString(36)}${Math.random().toString(36).slice(2, 5)}`;\nexport function useId (el: Element) {\n if (!el.id) el.id = `${UUID}${++id}`;\n\treturn el.id;\n};\n\n// Internal helper for on / off\nconst events = (\n\taction: \"add\" | \"remove\",\n\telement: Node | Window,\n\trest: Parameters<typeof Element.prototype.addEventListener>,\n): void => {\n\tfor (const type of rest[0].split(\",\")) {\n\t\trest[0] = type;\n\t\telement[`${action}EventListener`](...rest);\n\t}\n};\n\n/**\n * on\n * @param element The Element to use as EventTarget\n * @param types A comma separated string of event types\n * @param listener An event listener function or listener object\n */\nexport const on = (\n\telement: Node | Window,\n\t...rest: Parameters<typeof Element.prototype.addEventListener>\n): void => events(\"add\", element, rest);\n\n/**\n * off\n * @param element The Element to use as EventTarget\n * @param types A comma separated string of event types\n * @param listener An event listener function or listener object\n */\nexport const off = (\n\telement: Node | Window,\n\t...rest: Parameters<typeof Element.prototype.removeEventListener>\n): void => events(\"remove\", element, rest);\n\n\nconst TARGETS = new Map<Element, () => void>(); // Store current open poppers and their update functions\nconst SCROLLER = IS_BROWSER ? document.createElement('div') : null // Used to ensure we have scrollability under\nif (SCROLLER) attr(SCROLLER, 'style', 'position:absolute;padding:1px;top:0;left:0px');\n\nif (IS_BROWSER){\n\ton(window, 'load,resize,scroll', () => {\n\t\tfor (const [_, update] of TARGETS) update();\n\t}, QUICK_EVENT);}\n\t\n/**\n * anchorPosition\n * @param target The Element to position\n * @param anchor The Element to use as anchor\n */\nconst POSITION = { top: 0, right: 1, bottom: 2, left: 3 }; // Speed up by using a const map\n\nexport function anchorPosition (target: HTMLElement, anchor: HTMLElement | null | false, position?: string | number) {\n\tif (!anchor || !anchor.isConnected || !target.isConnected) return TARGETS.delete(target); // Stop watchning if anchor is removed from DOM\n\tif (!SCROLLER?.isConnected) document.body.append(SCROLLER || ''); // Ensure we have t´he scroller\n\tif (!TARGETS.has(target)) { // Setup new target or update position\n\t\tconst place = POSITION[position as keyof typeof POSITION] ?? POSITION.bottom; // Use CSS property to store position for more flexibility\n\t\treturn TARGETS.set(target, () => anchorPosition(target, anchor, place)).get(target)?.(); // Start watching if not already watching\n\t}\n\n const { offsetWidth: targetW, offsetHeight: targetH } = target;\n const { offsetWidth: anchorW, offsetHeight: anchorH } = anchor;\n const { width, height, left, top } = anchor.getBoundingClientRect();\n\tconst anchorX = Math.round(left - (anchorW - width) / 2); // Correct for CSS transform scale\n const anchorY = Math.round(top - (anchorH - height) / 2); // Correct for CSS transform scale\n\n\tconst hasSpaceLeft = anchorX - targetW > 0\n\tconst hasSpaceRight = anchorW + anchorW + targetW < window.innerWidth;\n\tconst hasSpaceOver = anchorY - targetH > 0\n\tconst hasSpaceUnder = anchorY + anchorH + targetH < window.innerHeight;\n\tconst positionRight = (position === POSITION.bottom && hasSpaceRight) || !hasSpaceLeft // Always position right when no hasSpaceLeft, as no OS scrolls further up than 0\n\tconst positionUnder = (position === POSITION.bottom && hasSpaceUnder) || !hasSpaceOver // Always position under when no hasSpaceOver, as no OS scrolls further up than 0\n\tconst centerX = Math.min(Math.max(10, anchorX - (targetW - anchorW) / 2), window.innerWidth - targetW - 10);\n\tconst centerY = Math.min(Math.max(10, anchorY - (targetH - anchorH) / 2), window.innerHeight - targetH - 10);\n\tconst isVertical = position === POSITION.top || position === POSITION.bottom;\n\n\ttarget.style.left = `${Math.round(isVertical ? centerX : (positionRight ? anchorX + anchorW : anchorX - targetW))}px`\n target.style.top = `${Math.round(isVertical ? (positionUnder ? anchorY + anchorH : anchorY - targetH) : centerY)}px`\n SCROLLER?.style.setProperty('translate', `${Math.round(window.scrollX + anchorX + anchorW + targetW + 30)} ${Math.round(window.scrollY + anchorY + anchorH + targetH + 30)}px`);\n}\n\n/**\n * Speed up MutationObserver by debouncing and only running when page is visible\n * @return new MutaionObserver\n */\nexport function createOptimizedMutationObserver(callback: MutationCallback) {\n let queue = 0;\n\n\tconst onFrame = () => setTimeout(onTimer, 200); // Use both requestAnimationFrame and setTimeout to debounce and only run when visible\n\tconst onTimer = () => {\n\t\tcallback([], observer);\n\t\tqueue = 0;\n\t};\n const observer = new MutationObserver(() => {\n if (!queue) queue = requestAnimationFrame(onFrame);\n });\n\n return observer;\n}\n\ntype Mutator = { observer: MutationObserver, collections: Map<string, () => void> };\nconst MUTATORS = new WeakMap<Element, Mutator>();\nconst MUTATORS_CALLBACK = (element: Element) => {\n\tconst mutator = MUTATORS.get(element);\n\n\tif (!mutator || !element.isConnected) {\n\t\tmutator?.observer?.disconnect();\n\t\tMUTATORS.delete(element);\n\t} else for(const [, callback] of mutator.collections) callback();\n};\n\n/**\n * onMutation\n * @description Utility to quickly observe mutations on a specific class name\n * @param element The Element to use as EventTarget\n * @param className The class name to observe\n * @param callback The callback to run when mutations are detected or false to stop observing\n */\nexport const onMutation = (\n\telement: Element,\n\tclassName: string,\n\tcallback: ((collection: HTMLCollection) => void) | false\n) => {\n\tconst collection = element.getElementsByClassName(className);\n\tlet mutator = MUTATORS.get(element);\n\n\tif (!mutator) {\n\t\tmutator = { collections: new Map(), observer: createOptimizedMutationObserver(() => MUTATORS_CALLBACK(element)) };\n\t\tmutator.observer.observe(element, { childList: true, subtree: true, attributes: true, attributeFilter: ['class'] });\n\t\tMUTATORS.set(element, mutator);\n\t}\n\tif (callback) mutator.collections.set(className, () => callback(collection));\n\telse mutator.collections.delete(className);\n}\n\nexport const isInputLike = (el: unknown): el is HTMLInputElement =>\n\tel instanceof HTMLElement && 'validity' in el && !(el instanceof HTMLButtonElement);\n\n// Make React support popover=\"\"target attribute\n// https://github.com/facebook/react/issues/27479\ntype Popover = \"\" | \"auto\" | \"manual\" | undefined;\ndeclare global {\n\tnamespace React.JSX {\n\t\tinterface IntrinsicAttributes {\n\t\t\tpopovertargetaction?: string;\n\t\t\tpopovertarget?: string;\n\t\t\tpopover?: Popover;\n\t\t}\n\t}\n\tnamespace React {\n\t\tinterface HTMLAttributes<T> {\n\t\t\tpopovertargetaction?: string;\n\t\t\tpopovertarget?: string;\n\t\t\tpopover?: Popover;\n\t\t}\n\t}\n}","import styles from \"../styles.module.css\";\nimport { IS_BROWSER, QUICK_EVENT, anchorPosition, attr, on } from \"../utils\";\n\nconst CSS_TOOLTIP = styles._tooltip.split(\" \");\nconst DESCRIBEDBY = \"aria-describedby\";\nconst ESC = \"Escape\";\nconst LABELLEDBY = \"aria-labelledby\";\nconst POSITION_CSS_PROPERTY = \"--mtds-tooltip-position\";\nconst THROTTLE_DELAY = 300;\nconst TOOLTIP_ID = \"mtds-tooltip\";\n\nlet ANCHOR: HTMLElement | null = null;\nlet LAST_CALL = Number.NEGATIVE_INFINITY;\nlet THROTTLE: number | ReturnType<typeof setTimeout> = 0;\nlet TOOLTIP: HTMLElement | null = null;\n\nfunction handleMove({ target, type, key }: Event & { key?: string }) {\n if (type === \"keydown\" && key !== ESC) return; // Allow ESC dismiss to follow https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/\n const wait = LAST_CALL + THROTTLE_DELAY - Date.now();\n clearTimeout(THROTTLE);\n THROTTLE = setTimeout(\n handleMoveThrottled,\n Math.max(wait, 0),\n key === ESC ? null : target\n );\n}\n\n// Using a throttled function to avoid performance issues\nfunction handleMoveThrottled(target: Element | null) {\n LAST_CALL = Date.now();\n\n if (!TOOLTIP || target === TOOLTIP) return; // Allow tooltip to be hovered, following https://www.w3.org/TR/WCAG21/#content-on-hover-or-focus\n let anchor = target?.closest?.<HTMLElement>(\"[data-tooltip]\") || null;\n\n // No need to update\n if (anchor === ANCHOR) return;\n\n const content = (anchor && attr(anchor, \"data-tooltip\")) || \"\";\n const position =\n (anchor && attr(anchor, \"data-tooltip-position\")) ||\n window\n .getComputedStyle(anchor || document.body)\n .getPropertyValue(POSITION_CSS_PROPERTY) ||\n \"top\";\n\n const isHidden =\n !content ||\n content === \"false\" ||\n content === \"true\" ||\n position === \"none\";\n\n if (isHidden) anchor = null; // Do not show tooltip if boolish value\n if (anchor) TOOLTIP.textContent = content; // Only update content if new anchor\n\n const hadLabel = ANCHOR && attr(ANCHOR, LABELLEDBY) === TOOLTIP_ID;\n const hasLabel =\n Boolean(anchor?.innerText.trim()) ||\n anchor?.hasAttribute(LABELLEDBY) ||\n anchor?.hasAttribute(\"aria-label\");\n\n ANCHOR?.removeAttribute(hadLabel ? LABELLEDBY : DESCRIBEDBY); // Unlink previous anchor\n anchorPosition(TOOLTIP, false); // Reset anchor position\n\n ANCHOR = anchor; // Store new anchor - might be null if no new anchor\n if (ANCHOR) attr(ANCHOR, hasLabel ? DESCRIBEDBY : LABELLEDBY, TOOLTIP_ID); // Use tooltip as description if allready has label\n TOOLTIP.togglePopover(!!anchor);\n anchorPosition(TOOLTIP, anchor, position);\n}\n\n// Initialize if in browser and not already initialized\nif (IS_BROWSER && !document.getElementById(TOOLTIP_ID)) {\n TOOLTIP = document.body.appendChild(document.createElement(\"div\"));\n TOOLTIP.classList.add(...CSS_TOOLTIP);\n TOOLTIP.id = TOOLTIP_ID;\n attr(TOOLTIP, \"popover\", \"manual\");\n on(document, \"blur,focus,mouseout,mouseover\", handleMove, QUICK_EVENT);\n on(window, \"keydown\", handleMove, QUICK_EVENT);\n on(window, \"blur\", handleMove, QUICK_EVENT);\n}\n","// ../utils.ts\nvar IS_BROWSER = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.navigator !== \"undefined\";\nvar _a;\nIS_BROWSER && // @ts-expect-error Typescript has not implemented userAgentData yet https://stackoverflow.com/a/71392474\n/^Mac/i.test(((_a = navigator.userAgentData) == null ? void 0 : _a.platform) || navigator.platform);\nvar DISPLAY_BLOCK = \":host(:not([hidden])) { display: block }\";\nvar UHTMLElement = typeof HTMLElement === \"undefined\" ? class {\n} : HTMLElement;\nfunction attr(el, name, value) {\n var _a2;\n if (value === void 0) return (_a2 = el.getAttribute(name)) != null ? _a2 : null;\n if (value === null) el.removeAttribute(name);\n else if (el.getAttribute(name) !== value) el.setAttribute(name, value);\n return null;\n}\nvar events = (action, element, rest) => {\n for (const type of rest[0].split(\",\")) {\n rest[0] = type;\n Element.prototype[`${action}EventListener`].apply(element, rest);\n }\n};\nvar on = (element, ...rest) => events(\"add\", element, rest);\nvar off = (element, ...rest) => events(\"remove\", element, rest);\nvar asButton = (event) => {\n const isClick = \"key\" in event && (event.key === \" \" || event.key === \"Enter\");\n if (isClick) event.preventDefault();\n if (isClick && event.target instanceof HTMLElement) event.target.click();\n return isClick;\n};\nvar getRoot = (node) => {\n var _a2;\n const root = ((_a2 = node.getRootNode) == null ? void 0 : _a2.call(node)) || node.ownerDocument;\n return root instanceof Document || root instanceof ShadowRoot ? root : document;\n};\nvar createElement = (tagName, text, attrs) => {\n const el = document.createElement(tagName);\n if (text) el.textContent = text;\n if (attrs) for (const [key, val] of Object.entries(attrs)) attr(el, key, val);\n return el;\n};\nvar customElements = {\n define: (name, instance) => !IS_BROWSER || window.customElements.get(name) || window.customElements.define(name, instance)\n};\n\n// u-details.ts\nvar UHTMLDetailsElement = class extends UHTMLElement {\n constructor() {\n super();\n // Using underscore instead of private fields for backwards compatibility\n this._content = null;\n this.attachShadow({ mode: \"open\" }).append(\n createElement(\"slot\", null, { name: \"summary\" }),\n createElement(\"slot\", null, { part: \"details-content\" }),\n createElement(\n \"style\",\n `${DISPLAY_BLOCK}\n ::slotted(u-summary) { cursor: pointer; display: list-item; counter-increment: list-item 0; list-style: disclosure-closed inside }\n ::slotted(u-summary[aria-expanded=\"true\"]) { list-style-type: disclosure-open }\n\t\t\t\t:host > [part=\"details-content\"]:not([hidden=\"\"]) { display: block }`\n )\n );\n }\n // Using ES2015 syntax for backwards compatibility\n static get observedAttributes() {\n return [\"open\"];\n }\n connectedCallback() {\n var _a2;\n this._content = (_a2 = this.shadowRoot) == null ? void 0 : _a2.children[1];\n on(this._content, \"beforematch\", this);\n on(this, \"click,keydown\", this);\n this.attributeChangedCallback();\n }\n disconnectedCallback() {\n if (this._content) off(this._content, \"beforematch\", this);\n off(this, \"click,keydown\", this);\n this._content = null;\n }\n attributeChangedCallback(prop, prev, next) {\n const hide = \"onbeforematch\" in this ? \"until-found\" : true;\n const open = this.open;\n for (const el of this.children)\n if (el.nodeName === \"U-SUMMARY\") attr(el, \"aria-expanded\", `${open}`);\n if (this._content) {\n attr(this._content, \"aria-hidden\", `${!open}`);\n this._content.hidden = open ? false : hide;\n }\n if (open && this.name) {\n const uDetailsList = getRoot(this).querySelectorAll(\n `${this.nodeName}[name=\"${this.name}\"]`\n );\n for (const uDetails of uDetailsList)\n if (uDetails !== this) uDetails.open = false;\n }\n if (prop === \"open\" && prev === null !== (next === null))\n this.dispatchEvent(new Event(\"toggle\"));\n }\n handleEvent(event) {\n const summary = this.querySelector(\":scope > u-summary\");\n const isSummary = summary == null ? void 0 : summary.contains(event.target);\n if (event.defaultPrevented) return;\n if (event.type === \"beforematch\") this.open = true;\n if (isSummary && event.type === \"keydown\") asButton(event);\n if (isSummary && event.type === \"click\") this.open = !this.open;\n }\n get open() {\n return this.hasAttribute(\"open\");\n }\n set open(value) {\n attr(this, \"open\", value ? \"\" : null);\n }\n get name() {\n return attr(this, \"name\") || \"\";\n }\n set name(value) {\n attr(this, \"name\", value);\n }\n};\nvar UHTMLSummaryElement = class extends UHTMLElement {\n connectedCallback() {\n attr(this, \"role\", \"button\");\n this.slot = \"summary\";\n this.tabIndex = 0;\n }\n};\ncustomElements.define(\"u-details\", UHTMLDetailsElement);\ncustomElements.define(\"u-summary\", UHTMLSummaryElement);\n\nexport { UHTMLDetailsElement, UHTMLSummaryElement };\n","import { QUICK_EVENT, attr, off, on } from '../utils';\n\nconst handleClick = ({ clientX: x, clientY: y, target: el }: MouseEvent) => {\n if (el instanceof HTMLDialogElement && attr(el, 'data-closedby') === 'any') {\n const { top, right, bottom, left } = el.getBoundingClientRect();\n const isInside = top <= y && y <= bottom && left <= x && x <= right;\n \n if (!isInside) el.close();\n } else if (el instanceof Element && el.closest('button[data-command=\"close\"]')) {\n el?.closest('dialog')?.close();\n }\n};\n\nexport function observe(el: Element) {\n on(el, 'click', handleClick as EventListener, QUICK_EVENT);\n}\n\nexport function unobserve(el: Element) {\n off(el, 'click', handleClick as EventListener, QUICK_EVENT);\n}","import styles from \"../styles.module.css\";\nimport {\n QUICK_EVENT,\n attr,\n isInputLike,\n off,\n on,\n onMutation,\n useId,\n} from \"../utils\";\n\nconst CSS_FIELD = styles.field.split(\" \")[0];\nconst CSS_PROPERTY_OVER = \"--mtds-text-count-over\";\nconst CSS_PROPERTY_UNDER = \"--mtds-text-count-under\";\nconst CSS_VALIDATIONS = styles.validation.split(\" \");\nconst CSS_VALIDATION = CSS_VALIDATIONS[0];\n\nfunction renderAria(fields: HTMLCollectionOf<Element>) {\n for (const field of fields) {\n const labels: HTMLLabelElement[] = [];\n const descs: string[] = [];\n let input: HTMLInputElement | null = null;\n let valid = true;\n\n for (const el of field.getElementsByTagName(\"*\")) {\n if (el instanceof HTMLLabelElement) labels.push(el);\n else if (isInputLike(el)) input = el;\n else if (el.classList.contains(CSS_VALIDATION)) {\n // Must be before instanceof HTMLParagraphElement since validation can also be a <p>\n valid = attr(el, \"data-color\") === \"success\";\n descs.unshift(useId(el));\n } else if (el instanceof HTMLParagraphElement) descs.push(useId(el));\n }\n\n if (input) {\n for (const label of labels) label.htmlFor = useId(input);\n renderCounter(input);\n attr(input, \"aria-describedby\", descs.join(\" \"));\n attr(input, \"aria-invalid\", `${!valid}`);\n }\n }\n}\nfunction handleInput({ target }: Event) {\n if (isInputLike(target)) renderCounter(target);\n}\n\nfunction renderCounter(input: HTMLInputElement) {\n const el = input?.nextElementSibling;\n const limit = el && attr(el, \"data-count\");\n\n if (el && limit) {\n const remainder = Number(limit) - input.value.length;\n const nextInvalid = remainder < 0;\n const prevInvalid = attr(el, \"aria-live\") === \"polite\";\n const style = window.getComputedStyle(el || input);\n const over = style.getPropertyValue(CSS_PROPERTY_OVER)?.slice(1, -1) || \"\"; // slice to trim quotes\n const under =\n style.getPropertyValue(CSS_PROPERTY_UNDER)?.slice(1, -1) || \"\"; // slice to trim quotes\n\n if (prevInvalid !== nextInvalid) {\n attr(el, \"aria-live\", nextInvalid ? \"polite\" : \"off\");\n for (const css of CSS_VALIDATIONS) el.classList.toggle(css, nextInvalid);\n }\n el.textContent = (nextInvalid ? over : under).replace(\n \"%d\",\n `${Math.abs(remainder)}`\n );\n }\n}\n\n// Prevent browsers from showing default validation bubbles\nfunction handleInvalid(event: Event) {\n if ((event.target as Element)?.closest?.(`.${CSS_FIELD}`))\n event.preventDefault();\n}\n\nexport function observe(el: Element) {\n onMutation(el, CSS_FIELD, renderAria);\n on(el, \"input\", handleInput, QUICK_EVENT);\n on(el, \"invalid\", handleInvalid, true); // Use capture as invalid does noe buttle\n}\n\nexport function unobserve(el: Element) {\n onMutation(el, CSS_FIELD, false);\n off(el, \"input\", handleInput, QUICK_EVENT);\n off(el, \"invalid\", handleInvalid, true);\n}\n","import styles from \"../styles.module.css\";\nimport { attr, isInputLike, onMutation, useId } from \"../utils\";\nconst CSS_FIELDSET = styles.fieldset.split(\" \")[0];\nconst CSS_VALIDATION = styles.validation.split(\" \")[0];\n\nfunction process(fieldsets: HTMLCollectionOf<Element>) {\n for (const fieldset of fieldsets) {\n const inputs: HTMLInputElement[] = [];\n let validationId: string | null = null;\n\n for (const el of fieldset.getElementsByTagName(\"*\")) {\n if (el.classList.contains(CSS_VALIDATION)) validationId = useId(el);\n else if (isInputLike(el)) inputs.push(el);\n }\n\n for (const input of inputs) {\n attr(input, \"aria-describedby\", validationId);\n attr(input, \"aria-invalid\", `${!!validationId}`);\n }\n }\n}\n\nexport const observe = (el: Element) => onMutation(el, CSS_FIELDSET, process);\nexport const unobserve = (el: Element) => onMutation(el, CSS_FIELDSET, false);\n","import styles from \"../styles.module.css\";\nimport { QUICK_EVENT, attr, off, on } from \"../utils\";\n\nconst CSS_APP = styles.app.split(\" \")[0];\nconst CSS_TOGGLE = `.${CSS_APP} > header + :not(main) > button:empty:first-child`;\n\nconst handleToggleClick = ({ target: el }: Event) => {\n const btn =\n (el as Element)?.nodeName === \"BUTTON\" &&\n (el as Element)?.closest(CSS_TOGGLE);\n\n if (!btn) return;\n\n const nav = btn.closest(`.${CSS_APP} > *`);\n const toggle = () =>\n nav &&\n attr(nav, \"data-expanded\", `${attr(nav, \"data-expanded\") === \"false\"}`);\n\n if (!document.startViewTransition) toggle();\n else document.startViewTransition(() => toggle());\n};\n\nexport function observe(el: Element) {\n on(el, \"click\", handleToggleClick, QUICK_EVENT);\n}\n\nexport function unobserve(el: Element) {\n off(el, \"click\", handleToggleClick, QUICK_EVENT);\n}\n","import styles from \"../styles.module.css\";\nimport { IS_BROWSER, onMutation } from \"../utils\";\nconst CSS_LOGO = styles.logo.split(\" \")[0];\nlet FAVICON: HTMLLinkElement;\n\nfunction process(logos: HTMLCollectionOf<Element>) {\n const svg = logos[0]?.firstElementChild;\n\n if (!svg) return;\n if (!FAVICON) {\n const { head } = window.top?.document || document;\n const oldIcon = head.getElementsByTagName(\"link[rel~='icon']\");\n const newIcon = document.createElement(\"link\");\n\n for (const icon of oldIcon) icon.remove();\n FAVICON = head.appendChild(Object.assign(newIcon, { rel: \"icon\" }));\n }\n\n const isDot = svg.parentElement?.hasAttribute(\"data-color\");\n const style = window.getComputedStyle(svg);\n const text = style.getPropertyValue(\"color\");\n const back = style.getPropertyValue(\"background-color\");\n\n FAVICON.href = `data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${isDot ? \"none\" : back}' width='51' height='51' x='2' y='2' stroke='${text}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${isDot ? 0.6 : 0}' stroke-width='2.3' rx='25.5'/><g transform=\"translate(7.5 7.5)\">${encodeURIComponent(svg.outerHTML.replace(/(fill|width|height|xmlns)=\\S+/gi, \"\").replace(\"<svg\", `<svg width=\"40\" height=\"40\" fill=\"${text}\"`))}</g></svg>`;\n}\n\n// Force a update even if not active tab\nif (IS_BROWSER)\n setTimeout(() => process(document.getElementsByClassName(CSS_LOGO)), 300);\n\nexport const observe = (el: Element) => onMutation(el, CSS_LOGO, process);\nexport const unobserve = (el: Element) => onMutation(el, CSS_LOGO, false);\n","import styles from \"../styles.module.css\";\nimport { QUICK_EVENT, anchorPosition, attr, off, on } from \"../utils\";\n\nconst CSS_POPOVER = styles.popover.split(\" \")[0];\n\nexport function observe(el: Node) {\n on(el, \"toggle\", handleToggle, QUICK_EVENT); // Use capture since toggle does not bubble\n on(el, \"click\", handleLinkClick); // Allow `<a>` to use `popovertarget` as well\n}\nexport function unobserve(el: Node) {\n off(el, \"toggle\", handleToggle, QUICK_EVENT); // Use capture since toggle does not bubble\n off(el, \"click\", handleLinkClick);\n}\n\nfunction handleToggle({ target: el, newState }: Event & { newState?: string }) {\n if (el instanceof HTMLElement && el.classList.contains(CSS_POPOVER)) {\n const anchor = (el.getRootNode() as ShadowRoot)?.querySelector<HTMLElement>(\n `[popovertarget=\"${el.id}\"]`\n );\n\n if (newState === \"closed\") anchorPosition(el, false);\n else if (anchor)\n anchorPosition(el, anchor, attr(el, \"data-position\") || \"bottom\");\n }\n}\n\n// Polyfill popovertarget for <a> (not supported by native)\n// and automatically assume popovertarget is the closest parent popover\n// but respect the popovertarget and popovertargetaction attribute\nfunction handleLinkClick({ target }: Event) {\n const link = (target as Element)?.closest?.(\"a\");\n if (link) {\n const root = link.getRootNode() as ShadowRoot;\n const target =\n root.getElementById?.(attr(link, \"popovertarget\") || \"\") ||\n link.closest(`.${CSS_POPOVER}`);\n const action = attr(link, \"popovertargetaction\") || \"toggle\";\n\n target?.togglePopover(\n action === \"show\" || (action === \"hide\" ? false : undefined)\n );\n }\n}\n","import styles from \"../styles.module.css\";\nimport { attr, onMutation } from \"../utils\";\nconst CSS_TABLE = styles.table.split(\" \")[0];\n\nfunction process(tables: HTMLCollectionOf<Element>) {\n for (const table of tables as HTMLCollectionOf<HTMLTableElement>) {\n const ths: string[] = []; // Add data-th=\"\" to each cell to support data-mobile designs\n\n attr(table, \"role\", \"table\"); // Add helping role=\"\" to ensure screen readers understand the table regardless of CSS display\n if (table.caption) attr(table.caption, \"role\", \"caption\");\n for (const group of [table.tHead, table.tFoot, ...table.tBodies])\n if (group) {\n attr(group, \"role\", \"rowgroup\");\n const isTbody = group.nodeName === \"TBODY\";\n\n for (const row of group.rows) {\n attr(row, \"role\", \"row\");\n for (const cell of row.cells) {\n if (isTbody) attr(cell, \"data-th\", ths[cell.cellIndex] || \":empty\");\n else ths.push(cell.innerText.trim()); // Using innerText to only include visible text\n if (cell.nodeName === \"TD\") attr(cell, \"role\", \"cell\");\n else {\n attr(cell, \"role\", isTbody ? \"rowheader\" : \"columnheader\");\n attr(cell, \"scope\", isTbody ? \"row\" : \"col\");\n }\n }\n }\n }\n }\n}\n\nexport const observe = (el: Element) => onMutation(el, CSS_TABLE, process);\nexport const unobserve = (el: Element) => onMutation(el, CSS_TABLE, false);\n","export * as styles from \"./styles.module.css\";\nexport { pagination } from \"./pagination/pagination-helper\";\nimport \"./tooltip/tooltip-observer\"; // Load data-tooltip behaviour\nimport \"@u-elements/u-details\"; // Polyfill for <details> element\nimport * as dialog from \"./dialog/dialog-observer\";\nimport * as field from \"./field/field-observer\";\nimport * as fieldset from \"./fieldset/fieldset-observer\";\nimport * as layout from \"./layout/layout-observer\";\nimport * as logo from \"./logo/logo-observer\";\nimport * as popover from \"./popover/popover-observer\";\nimport * as table from \"./table/table-observer\";\nimport { IS_BROWSER } from \"./utils\";\n\n// Automatic observe on browser\nif (IS_BROWSER) {\n const isLoading = document.readyState === \"loading\"; // Check if the page is still loading - might happen if the script is in <head>\n const onLoaded = () => observe(document.body);\n\n if (isLoading) document.addEventListener(\"DOMContentLoaded\", onLoaded);\n else onLoaded();\n}\n\nexport function observe(el: Element) {\n dialog.observe(el);\n field.observe(el);\n fieldset.observe(el);\n layout.observe(el);\n logo.observe(el);\n popover.observe(el);\n table.observe(el);\n}\n\nexport function unobserve(el: Element) {\n dialog.unobserve(el);\n field.unobserve(el);\n fieldset.unobserve(el);\n layout.unobserve(el);\n logo.unobserve(el);\n popover.unobserve(el);\n table.unobserve(el);\n}\n"],"names":["getSteps","now","max","show","offset","start","end","pages","_","i","pagination","current","total","page","index","IS_BROWSER","QUICK_EVENT","attr","el","name","value","id","UUID","useId","events","action","element","rest","type","on","off","TARGETS","SCROLLER","update","POSITION","anchorPosition","target","anchor","position","place","_a","targetW","targetH","anchorW","anchorH","width","height","left","top","anchorX","anchorY","hasSpaceLeft","hasSpaceRight","hasSpaceOver","hasSpaceUnder","positionRight","positionUnder","centerX","centerY","isVertical","createOptimizedMutationObserver","callback","queue","onFrame","onTimer","observer","MUTATORS","MUTATORS_CALLBACK","mutator","onMutation","className","collection","isInputLike","CSS_TOOLTIP","styles","DESCRIBEDBY","ESC","LABELLEDBY","POSITION_CSS_PROPERTY","THROTTLE_DELAY","TOOLTIP_ID","ANCHOR","LAST_CALL","THROTTLE","TOOLTIP","handleMove","key","wait","handleMoveThrottled","content","hadLabel","hasLabel","DISPLAY_BLOCK","UHTMLElement","_a2","asButton","event","isClick","getRoot","node","root","createElement","tagName","text","attrs","val","customElements","instance","UHTMLDetailsElement","prop","prev","next","hide","open","uDetailsList","uDetails","summary","isSummary","UHTMLSummaryElement","handleClick","x","y","right","bottom","observe","unobserve","CSS_FIELD","CSS_PROPERTY_OVER","CSS_PROPERTY_UNDER","CSS_VALIDATIONS","CSS_VALIDATION","renderAria","fields","field","labels","descs","input","valid","label","renderCounter","handleInput","limit","remainder","nextInvalid","prevInvalid","style","over","under","_b","css","handleInvalid","CSS_FIELDSET","process","fieldsets","fieldset","inputs","validationId","CSS_APP","CSS_TOGGLE","handleToggleClick","btn","nav","toggle","CSS_LOGO","FAVICON","logos","svg","head","oldIcon","newIcon","icon","isDot","_c","back","CSS_POPOVER","handleToggle","handleLinkClick","newState","link","CSS_TABLE","tables","table","ths","group","isTbody","row","cell","isLoading","onLoaded","dialog.observe","field.observe","fieldset.observe","layout.observe","logo.observe","popover.observe","table.observe","dialog.unobserve","field.unobserve","fieldset.unobserve","layout.unobserve","logo.unobserve","popover.unobserve","table.unobserve"],"mappings":"46DAAMA,GAAW,CAACC,EAAaC,EAAaC,IAAiB,CACrD,MAAAC,GAAUD,EAAO,GAAK,EACtBE,EAAQ,KAAK,IAAI,KAAK,IAAIJ,EAAM,KAAK,MAAMG,CAAM,EAAGF,EAAMC,EAAO,CAAC,EAAG,CAAC,EACtEG,EAAM,KAAK,IAAI,KAAK,IAAIL,EAAM,KAAK,KAAKG,CAAM,EAAGD,CAAI,EAAGD,CAAG,EAC3DK,EAAQ,MAAM,KAAK,CAAE,OAAQD,EAAM,EAAID,CAAS,EAAA,CAACG,EAAGC,IAAMA,EAAIJ,CAAK,EAErE,OAAAF,EAAO,GAAKE,EAAQ,KAAS,OAAO,EAAG,EAAG,EAAG,CAAC,EAC9CF,EAAO,GAAKG,EAAMJ,KAAW,OAAO,GAAI,EAAG,EAAGA,CAAG,EAC9CK,CACT,EAEaG,GAAa,CAAC,CAAE,QAAAC,EAAU,EAAG,MAAAC,EAAQ,GAAI,KAAAT,EAAO,MAAS,CACpE,KAAMQ,EAAU,EAAIA,EAAU,EAAI,EAClC,KAAMA,EAAUC,EAAQD,EAAU,EAAI,EACtC,MAAOX,GAASW,EAASC,EAAOT,CAAI,EAAE,IAAI,CAACU,EAAMC,KAAW,CAC1D,QAASD,IAASF,GAAY,OAC9B,IAAK,OAAOE,CAAI,IAAIC,CAAK,GACzB,KAAAD,CAAA,EACA,CACJ,GCnBaE,EAAa,OAAO,OAAW,KAAe,OAAO,SAAa,IAClEC,EAAc,CAAE,QAAS,GAAM,QAAS,EAAK,EAS1C,SAAAC,EACfC,EACAC,EACAC,EACgB,CAChB,OAAIA,IAAU,OAAkBF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CAChB,CAEO,SAAShE,GAAQ1G,EAAa,CACnC2K,GAAe3K,CAAE,EACjB4K,GAAc5K,CAAE,EAChB6K,GAAiB7K,CAAE,EACnB8K,GAAe9K,CAAE,EACjB+K,GAAa/K,CAAE,EACfgL,GAAgBhL,CAAE,EAClBiL,GAAcjL,CAAE,CAClB,CAEO,SAAS2G,GAAU3G,EAAa,CACrCkL,GAAiBlL,CAAE,EACnBmL,GAAgBnL,CAAE,EAClBoL,GAAmBpL,CAAE,EACrBqL,GAAiBrL,CAAE,EACnBsL,GAAetL,CAAE,EACjBuL,GAAkBvL,CAAE,EACpBwL,GAAgBxL,CAAE,CACpB","x_google_ignoreList":[3]}
|
|
1
|
+
{"version":3,"file":"index.iife.js","sources":["../designsystem/pagination/pagination-helper.ts","../designsystem/utils.ts","../designsystem/tooltip/tooltip-observer.ts","../node_modules/@u-elements/u-details/dist/u-details.js","../designsystem/dialog/dialog-observer.ts","../designsystem/field/field-observer.ts","../designsystem/fieldset/fieldset-observer.ts","../designsystem/layout/layout-observer.ts","../designsystem/logo/logo-observer.ts","../designsystem/popover/popover-observer.ts","../designsystem/table/table-observer.ts","../designsystem/index.ts"],"sourcesContent":["const getSteps = (now: number, max: number, show: number) => {\n const offset = (show - 1) / 2;\n const start = Math.max(Math.min(now - Math.floor(offset), max - show + 1), 1);\n const end = Math.min(Math.max(now + Math.ceil(offset), show), max);\n const pages = Array.from({ length: end + 1 - start }, (_, i) => i + start);\n\n if (show > 4 && start > 1) pages.splice(0, 2, 1, 0);\n if (show > 3 && end < max) pages.splice(-2, 2, 0, max);\n return pages;\n};\n\nexport const pagination = ({ current = 1, total = 10, show = 7 }) => ({\n prev: current > 1 ? current - 1 : 0,\n next: current < total ? current + 1 : 0,\n pages: getSteps(current, total, show).map((page, index) => ({\n current: page === current && (\"page\" as const),\n key: `key-${page}-${index}`,\n page,\n })),\n});\n","export const IS_BROWSER = typeof window !== 'undefined' && typeof document !== 'undefined';\nexport const QUICK_EVENT = { capture: true, passive: true };\n\n/**\n * attr\n * @description Utility to quickly get, set and remove attributes\n * @param el The Element to use as EventTarget\n * @param name The attribute name to get, set or remove, or a object to set multiple attributes\n * @param value A valid attribute value or null to remove attribute\n */\nexport function attr(\n\tel: Element,\n\tname: string,\n\tvalue?: string | null,\n): string | null {\n\tif (value === undefined) return el.getAttribute(name) ?? null; // Fallback to null only if el is undefined\n\tif (value === null) el.removeAttribute(name);\n\telse if (el.getAttribute(name) !== value) el.setAttribute(name, value);\n\treturn null;\n}\n\n/**\n * useId\n * @return A generated unique ID\n */\nlet id = 0;\nconst UUID = `${Date.now().toString(36)}${Math.random().toString(36).slice(2, 5)}`;\nexport function useId (el: Element) {\n if (!el.id) el.id = `${UUID}${++id}`;\n\treturn el.id;\n};\n\n// Internal helper for on / off\nconst events = (\n\taction: \"add\" | \"remove\",\n\telement: Node | Window,\n\trest: Parameters<typeof Element.prototype.addEventListener>,\n): void => {\n\tfor (const type of rest[0].split(\",\")) {\n\t\trest[0] = type;\n\t\telement[`${action}EventListener`](...rest);\n\t}\n};\n\n/**\n * on\n * @param element The Element to use as EventTarget\n * @param types A comma separated string of event types\n * @param listener An event listener function or listener object\n */\nexport const on = (\n\telement: Node | Window,\n\t...rest: Parameters<typeof Element.prototype.addEventListener>\n): void => events(\"add\", element, rest);\n\n/**\n * off\n * @param element The Element to use as EventTarget\n * @param types A comma separated string of event types\n * @param listener An event listener function or listener object\n */\nexport const off = (\n\telement: Node | Window,\n\t...rest: Parameters<typeof Element.prototype.removeEventListener>\n): void => events(\"remove\", element, rest);\n\n\nconst TARGETS = new Map<Element, () => void>(); // Store current open poppers and their update functions\nconst SCROLLER = IS_BROWSER ? document.createElement('div') : null // Used to ensure we have scrollability under\nif (SCROLLER) attr(SCROLLER, 'style', 'position:absolute;padding:1px;top:0;left:0px');\n\nif (IS_BROWSER){\n\ton(window, 'load,resize,scroll', () => {\n\t\tfor (const [_, update] of TARGETS) update();\n\t}, QUICK_EVENT);}\n\t\n/**\n * anchorPosition\n * @param target The Element to position\n * @param anchor The Element to use as anchor\n */\nconst POSITION = { top: 0, right: 1, bottom: 2, left: 3 }; // Speed up by using a const map\n\nexport function anchorPosition (target: HTMLElement, anchor: HTMLElement | null | false, position?: string | number) {\n\tif (!anchor || !anchor.isConnected || !target.isConnected) return TARGETS.delete(target); // Stop watchning if anchor is removed from DOM\n\tif (!SCROLLER?.isConnected) document.body.append(SCROLLER || ''); // Ensure we have t´he scroller\n\tif (!TARGETS.has(target)) { // Setup new target or update position\n\t\tconst place = POSITION[position as keyof typeof POSITION] ?? POSITION.bottom; // Use CSS property to store position for more flexibility\n\t\treturn TARGETS.set(target, () => anchorPosition(target, anchor, place)).get(target)?.(); // Start watching if not already watching\n\t}\n\n const { offsetWidth: targetW, offsetHeight: targetH } = target;\n const { offsetWidth: anchorW, offsetHeight: anchorH } = anchor;\n const { width, height, left, top } = anchor.getBoundingClientRect();\n\tconst anchorX = Math.round(left - (anchorW - width) / 2); // Correct for CSS transform scale\n const anchorY = Math.round(top - (anchorH - height) / 2); // Correct for CSS transform scale\n\n\tconst hasSpaceLeft = anchorX - targetW > 0\n\tconst hasSpaceRight = anchorW + anchorW + targetW < window.innerWidth;\n\tconst hasSpaceOver = anchorY - targetH > 0\n\tconst hasSpaceUnder = anchorY + anchorH + targetH < window.innerHeight;\n\tconst positionRight = (position === POSITION.bottom && hasSpaceRight) || !hasSpaceLeft // Always position right when no hasSpaceLeft, as no OS scrolls further up than 0\n\tconst positionUnder = (position === POSITION.bottom && hasSpaceUnder) || !hasSpaceOver // Always position under when no hasSpaceOver, as no OS scrolls further up than 0\n\tconst centerX = Math.min(Math.max(10, anchorX - (targetW - anchorW) / 2), window.innerWidth - targetW - 10);\n\tconst centerY = Math.min(Math.max(10, anchorY - (targetH - anchorH) / 2), window.innerHeight - targetH - 10);\n\tconst isVertical = position === POSITION.top || position === POSITION.bottom;\n\n\ttarget.style.left = `${Math.round(isVertical ? centerX : (positionRight ? anchorX + anchorW : anchorX - targetW))}px`\n target.style.top = `${Math.round(isVertical ? (positionUnder ? anchorY + anchorH : anchorY - targetH) : centerY)}px`\n SCROLLER?.style.setProperty('translate', `${Math.round(window.scrollX + anchorX + anchorW + targetW + 30)} ${Math.round(window.scrollY + anchorY + anchorH + targetH + 30)}px`);\n}\n\n/**\n * Speed up MutationObserver by debouncing and only running when page is visible\n * @return new MutaionObserver\n */\nexport function createOptimizedMutationObserver(callback: MutationCallback) {\n let queue = 0;\n\n\tconst onFrame = () => setTimeout(onTimer, 200); // Use both requestAnimationFrame and setTimeout to debounce and only run when visible\n\tconst onTimer = () => {\n\t\tcallback([], observer);\n\t\tqueue = 0;\n\t};\n const observer = new MutationObserver(() => {\n if (!queue) queue = requestAnimationFrame(onFrame);\n });\n\n return observer;\n}\n\ntype Mutator = { observer: MutationObserver, collections: Map<string, () => void> };\nconst MUTATORS = new WeakMap<Element, Mutator>();\nconst MUTATORS_CALLBACK = (element: Element) => {\n\tconst mutator = MUTATORS.get(element);\n\n\tif (!mutator || !element.isConnected) {\n\t\tmutator?.observer?.disconnect();\n\t\tMUTATORS.delete(element);\n\t} else for(const [, callback] of mutator.collections) callback();\n};\n\n/**\n * onMutation\n * @description Utility to quickly observe mutations on a specific class name\n * @param element The Element to use as EventTarget\n * @param className The class name to observe\n * @param callback The callback to run when mutations are detected or false to stop observing\n */\nexport const onMutation = (\n\telement: Element,\n\tclassName: string,\n\tcallback: ((collection: HTMLCollection) => void) | false\n) => {\n\tconst collection = element.getElementsByClassName(className);\n\tlet mutator = MUTATORS.get(element);\n\n\tif (!mutator) {\n\t\tmutator = { collections: new Map(), observer: createOptimizedMutationObserver(() => MUTATORS_CALLBACK(element)) };\n\t\tmutator.observer.observe(element, { childList: true, subtree: true, attributes: true, attributeFilter: ['class'] });\n\t\tMUTATORS.set(element, mutator);\n\t}\n\tif (callback) mutator.collections.set(className, () => callback(collection));\n\telse mutator.collections.delete(className);\n}\n\nexport const isInputLike = (el: unknown): el is HTMLInputElement =>\n\tel instanceof HTMLElement && 'validity' in el && !(el instanceof HTMLButtonElement);\n\n// Make React support popover=\"\"target attribute\n// https://github.com/facebook/react/issues/27479\ntype Popover = \"\" | \"auto\" | \"manual\" | undefined;\ndeclare global {\n\tnamespace React.JSX {\n\t\tinterface IntrinsicAttributes {\n\t\t\tpopovertargetaction?: string;\n\t\t\tpopovertarget?: string;\n\t\t\tpopover?: Popover;\n\t\t}\n\t}\n\tnamespace React {\n\t\tinterface HTMLAttributes<T> {\n\t\t\tpopovertargetaction?: string;\n\t\t\tpopovertarget?: string;\n\t\t\tpopover?: Popover;\n\t\t}\n\t}\n}","import styles from \"../styles.module.css\";\nimport { IS_BROWSER, QUICK_EVENT, anchorPosition, attr, on } from \"../utils\";\n\nconst CSS_TOOLTIP = styles._tooltip.split(\" \");\nconst DESCRIBEDBY = \"aria-describedby\";\nconst ESC = \"Escape\";\nconst LABELLEDBY = \"aria-labelledby\";\nconst POSITION_CSS_PROPERTY = \"--mtds-tooltip-position\";\nconst THROTTLE_DELAY = 300;\nconst TOOLTIP_ID = \"mtds-tooltip\";\n\nlet ANCHOR: HTMLElement | null = null;\nlet LAST_CALL = Number.NEGATIVE_INFINITY;\nlet THROTTLE: number | ReturnType<typeof setTimeout> = 0;\nlet TOOLTIP: HTMLElement | null = null;\n\nfunction handleMove({ target, type, key }: Event & { key?: string }) {\n if (type === \"keydown\" && key !== ESC) return; // Allow ESC dismiss to follow https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/\n const wait = LAST_CALL + THROTTLE_DELAY - Date.now();\n clearTimeout(THROTTLE);\n THROTTLE = setTimeout(\n handleMoveThrottled,\n Math.max(wait, 0),\n key === ESC ? null : target\n );\n}\n\n// Using a throttled function to avoid performance issues\nfunction handleMoveThrottled(target: Element | null) {\n LAST_CALL = Date.now();\n\n if (!TOOLTIP || target === TOOLTIP) return; // Allow tooltip to be hovered, following https://www.w3.org/TR/WCAG21/#content-on-hover-or-focus\n let anchor = target?.closest?.<HTMLElement>(\"[data-tooltip]\") || null;\n\n // No need to update\n if (anchor === ANCHOR) return;\n\n const content = (anchor && attr(anchor, \"data-tooltip\")) || \"\";\n const position =\n (anchor && attr(anchor, \"data-tooltip-position\")) ||\n window\n .getComputedStyle(anchor || document.body)\n .getPropertyValue(POSITION_CSS_PROPERTY) ||\n \"top\";\n\n const isHidden =\n !content ||\n content === \"false\" ||\n content === \"true\" ||\n position === \"none\";\n\n if (isHidden) anchor = null; // Do not show tooltip if boolish value\n if (anchor) TOOLTIP.textContent = content; // Only update content if new anchor\n\n const hadLabel = ANCHOR && attr(ANCHOR, LABELLEDBY) === TOOLTIP_ID;\n const hasLabel =\n Boolean(anchor?.innerText.trim()) ||\n anchor?.hasAttribute(LABELLEDBY) ||\n anchor?.hasAttribute(\"aria-label\");\n\n ANCHOR?.removeAttribute(hadLabel ? LABELLEDBY : DESCRIBEDBY); // Unlink previous anchor\n anchorPosition(TOOLTIP, false); // Reset anchor position\n\n ANCHOR = anchor; // Store new anchor - might be null if no new anchor\n if (ANCHOR) attr(ANCHOR, hasLabel ? DESCRIBEDBY : LABELLEDBY, TOOLTIP_ID); // Use tooltip as description if allready has label\n TOOLTIP.togglePopover(!!anchor);\n anchorPosition(TOOLTIP, anchor, position);\n}\n\n// Initialize if in browser and not already initialized\nif (IS_BROWSER && !document.getElementById(TOOLTIP_ID)) {\n TOOLTIP = document.body.appendChild(document.createElement(\"div\"));\n TOOLTIP.classList.add(...CSS_TOOLTIP);\n TOOLTIP.id = TOOLTIP_ID;\n attr(TOOLTIP, \"popover\", \"manual\");\n on(document, \"blur,focus,mouseout,mouseover\", handleMove, QUICK_EVENT);\n on(window, \"keydown\", handleMove, QUICK_EVENT);\n on(window, \"blur\", handleMove, QUICK_EVENT);\n}\n","// ../utils.ts\nvar IS_BROWSER = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.navigator !== \"undefined\";\nvar _a;\nIS_BROWSER && // @ts-expect-error Typescript has not implemented userAgentData yet https://stackoverflow.com/a/71392474\n/^Mac/i.test(((_a = navigator.userAgentData) == null ? void 0 : _a.platform) || navigator.platform);\nvar DISPLAY_BLOCK = \":host(:not([hidden])) { display: block }\";\nvar UHTMLElement = typeof HTMLElement === \"undefined\" ? class {\n} : HTMLElement;\nfunction attr(el, name, value) {\n var _a2;\n if (value === void 0) return (_a2 = el.getAttribute(name)) != null ? _a2 : null;\n if (value === null) el.removeAttribute(name);\n else if (el.getAttribute(name) !== value) el.setAttribute(name, value);\n return null;\n}\nvar events = (action, element, rest) => {\n for (const type of rest[0].split(\",\")) {\n rest[0] = type;\n Element.prototype[`${action}EventListener`].apply(element, rest);\n }\n};\nvar on = (element, ...rest) => events(\"add\", element, rest);\nvar off = (element, ...rest) => events(\"remove\", element, rest);\nvar asButton = (event) => {\n const isClick = \"key\" in event && (event.key === \" \" || event.key === \"Enter\");\n if (isClick) event.preventDefault();\n if (isClick && event.target instanceof HTMLElement) event.target.click();\n return isClick;\n};\nvar getRoot = (node) => {\n var _a2;\n const root = ((_a2 = node.getRootNode) == null ? void 0 : _a2.call(node)) || node.ownerDocument;\n return root instanceof Document || root instanceof ShadowRoot ? root : document;\n};\nvar createElement = (tagName, text, attrs) => {\n const el = document.createElement(tagName);\n if (text) el.textContent = text;\n if (attrs) for (const [key, val] of Object.entries(attrs)) attr(el, key, val);\n return el;\n};\nvar customElements = {\n define: (name, instance) => !IS_BROWSER || window.customElements.get(name) || window.customElements.define(name, instance)\n};\n\n// u-details.ts\nvar UHTMLDetailsElement = class extends UHTMLElement {\n constructor() {\n super();\n // Using underscore instead of private fields for backwards compatibility\n this._content = null;\n this.attachShadow({ mode: \"open\" }).append(\n createElement(\"slot\", null, { name: \"summary\" }),\n createElement(\"slot\", null, { part: \"details-content\" }),\n createElement(\n \"style\",\n `${DISPLAY_BLOCK}\n ::slotted(u-summary) { cursor: pointer; display: list-item; counter-increment: list-item 0; list-style: disclosure-closed inside }\n ::slotted(u-summary[aria-expanded=\"true\"]) { list-style-type: disclosure-open }\n\t\t\t\t:host > [part=\"details-content\"]:not([hidden=\"\"]) { display: block }`\n )\n );\n }\n // Using ES2015 syntax for backwards compatibility\n static get observedAttributes() {\n return [\"open\"];\n }\n connectedCallback() {\n var _a2;\n this._content = (_a2 = this.shadowRoot) == null ? void 0 : _a2.children[1];\n on(this._content, \"beforematch\", this);\n on(this, \"click,keydown\", this);\n this.attributeChangedCallback();\n }\n disconnectedCallback() {\n if (this._content) off(this._content, \"beforematch\", this);\n off(this, \"click,keydown\", this);\n this._content = null;\n }\n attributeChangedCallback(prop, prev, next) {\n const hide = \"onbeforematch\" in this ? \"until-found\" : true;\n const open = this.open;\n for (const el of this.children)\n if (el.nodeName === \"U-SUMMARY\") attr(el, \"aria-expanded\", `${open}`);\n if (this._content) {\n attr(this._content, \"aria-hidden\", `${!open}`);\n this._content.hidden = open ? false : hide;\n }\n if (open && this.name) {\n const uDetailsList = getRoot(this).querySelectorAll(\n `${this.nodeName}[name=\"${this.name}\"]`\n );\n for (const uDetails of uDetailsList)\n if (uDetails !== this) uDetails.open = false;\n }\n if (prop === \"open\" && prev === null !== (next === null))\n this.dispatchEvent(new Event(\"toggle\"));\n }\n handleEvent(event) {\n const summary = this.querySelector(\":scope > u-summary\");\n const isSummary = summary == null ? void 0 : summary.contains(event.target);\n if (event.defaultPrevented) return;\n if (event.type === \"beforematch\") this.open = true;\n if (isSummary && event.type === \"keydown\") asButton(event);\n if (isSummary && event.type === \"click\") this.open = !this.open;\n }\n get open() {\n return this.hasAttribute(\"open\");\n }\n set open(value) {\n attr(this, \"open\", value ? \"\" : null);\n }\n get name() {\n return attr(this, \"name\") || \"\";\n }\n set name(value) {\n attr(this, \"name\", value);\n }\n};\nvar UHTMLSummaryElement = class extends UHTMLElement {\n connectedCallback() {\n attr(this, \"role\", \"button\");\n this.slot = \"summary\";\n this.tabIndex = 0;\n }\n};\ncustomElements.define(\"u-details\", UHTMLDetailsElement);\ncustomElements.define(\"u-summary\", UHTMLSummaryElement);\n\nexport { UHTMLDetailsElement, UHTMLSummaryElement };\n","import { QUICK_EVENT, attr, off, on } from '../utils';\n\nconst handleClick = ({ clientX: x, clientY: y, target: el }: MouseEvent) => {\n if (el instanceof HTMLDialogElement && attr(el, 'data-closedby') === 'any') {\n const { top, right, bottom, left } = el.getBoundingClientRect();\n const isInside = top <= y && y <= bottom && left <= x && x <= right;\n \n if (!isInside) el.close();\n } else if (el instanceof Element && el.closest('button[data-command=\"close\"]')) {\n el?.closest('dialog')?.close();\n }\n};\n\nexport function observe(el: Element) {\n on(el, 'click', handleClick as EventListener, QUICK_EVENT);\n}\n\nexport function unobserve(el: Element) {\n off(el, 'click', handleClick as EventListener, QUICK_EVENT);\n}","import styles from \"../styles.module.css\";\nimport {\n QUICK_EVENT,\n attr,\n isInputLike,\n off,\n on,\n onMutation,\n useId,\n} from \"../utils\";\n\nconst CSS_FIELD = styles.field.split(\" \")[0];\nconst CSS_PROPERTY_OVER = \"--mtds-text-count-over\";\nconst CSS_PROPERTY_UNDER = \"--mtds-text-count-under\";\nconst CSS_VALIDATIONS = styles.validation.split(\" \");\nconst CSS_VALIDATION = CSS_VALIDATIONS[0];\n\nfunction renderAria(fields: HTMLCollectionOf<Element>) {\n for (const field of fields) {\n const labels: HTMLLabelElement[] = [];\n const descs: string[] = [];\n let input: HTMLInputElement | null = null;\n let valid = true;\n\n for (const el of field.getElementsByTagName(\"*\")) {\n if (el instanceof HTMLLabelElement) labels.push(el);\n else if (isInputLike(el)) input = el;\n else if (el.classList.contains(CSS_VALIDATION)) {\n // Must be before instanceof HTMLParagraphElement since validation can also be a <p>\n valid = attr(el, \"data-color\") === \"success\";\n descs.unshift(useId(el));\n } else if (el instanceof HTMLParagraphElement) descs.push(useId(el));\n }\n\n if (input) {\n for (const label of labels) label.htmlFor = useId(input);\n renderCounter(input);\n renderTextareaSize(input);\n attr(input, \"aria-describedby\", descs.join(\" \"));\n attr(input, \"aria-invalid\", `${!valid}`);\n }\n }\n}\nfunction handleInput({ target }: Event) {\n if (isInputLike(target)) {\n renderCounter(target);\n renderTextareaSize(target);\n }\n}\n\n// iOS does not support field-sizing: content, so we need to manually resize\nfunction renderTextareaSize(textarea: Element) {\n if (textarea instanceof HTMLTextAreaElement) {\n textarea.style.height = \"auto\";\n textarea.style.height = `${textarea.scrollHeight}px`;\n }\n}\n\nfunction renderCounter(input: HTMLInputElement) {\n const el = input?.nextElementSibling;\n const limit = el && attr(el, \"data-count\");\n\n if (el && limit) {\n const remainder = Number(limit) - input.value.length;\n const nextInvalid = remainder < 0;\n const prevInvalid = attr(el, \"aria-live\") === \"polite\";\n const style = window.getComputedStyle(el || input);\n const over = style.getPropertyValue(CSS_PROPERTY_OVER)?.slice(1, -1) || \"\"; // slice to trim quotes\n const under =\n style.getPropertyValue(CSS_PROPERTY_UNDER)?.slice(1, -1) || \"\"; // slice to trim quotes\n\n if (prevInvalid !== nextInvalid) {\n attr(el, \"aria-live\", nextInvalid ? \"polite\" : \"off\");\n for (const css of CSS_VALIDATIONS) el.classList.toggle(css, nextInvalid);\n }\n el.textContent = (nextInvalid ? over : under).replace(\n \"%d\",\n `${Math.abs(remainder)}`\n );\n }\n}\n\n// Prevent browsers from showing default validation bubbles\nfunction handleInvalid(event: Event) {\n if ((event.target as Element)?.closest?.(`.${CSS_FIELD}`))\n event.preventDefault();\n}\n\nexport function observe(el: Element) {\n onMutation(el, CSS_FIELD, renderAria);\n on(el, \"input\", handleInput, QUICK_EVENT);\n on(el, \"invalid\", handleInvalid, true); // Use capture as invalid does noe buttle\n}\n\nexport function unobserve(el: Element) {\n onMutation(el, CSS_FIELD, false);\n off(el, \"input\", handleInput, QUICK_EVENT);\n off(el, \"invalid\", handleInvalid, true);\n}\n","import styles from \"../styles.module.css\";\nimport { attr, isInputLike, onMutation, useId } from \"../utils\";\nconst CSS_FIELDSET = styles.fieldset.split(\" \")[0];\nconst CSS_VALIDATION = styles.validation.split(\" \")[0];\n\nfunction process(fieldsets: HTMLCollectionOf<Element>) {\n for (const fieldset of fieldsets) {\n const inputs: HTMLInputElement[] = [];\n let validationId: string | null = null;\n\n for (const el of fieldset.getElementsByTagName(\"*\")) {\n if (el.classList.contains(CSS_VALIDATION)) validationId = useId(el);\n else if (isInputLike(el)) inputs.push(el);\n }\n\n for (const input of inputs) {\n attr(input, \"aria-describedby\", validationId);\n attr(input, \"aria-invalid\", `${!!validationId}`);\n }\n }\n}\n\nexport const observe = (el: Element) => onMutation(el, CSS_FIELDSET, process);\nexport const unobserve = (el: Element) => onMutation(el, CSS_FIELDSET, false);\n","import styles from \"../styles.module.css\";\nimport { QUICK_EVENT, attr, off, on } from \"../utils\";\n\nconst CSS_APP = styles.app.split(\" \")[0];\nconst CSS_TOGGLE = `.${CSS_APP} > header + :not(main) > button:empty:first-child`;\n\nconst handleToggleClick = ({ target: el }: Event) => {\n const btn =\n (el as Element)?.nodeName === \"BUTTON\" &&\n (el as Element)?.closest(CSS_TOGGLE);\n\n if (!btn) return;\n\n const nav = btn.closest(`.${CSS_APP} > *`);\n const toggle = () =>\n nav &&\n attr(nav, \"data-expanded\", `${attr(nav, \"data-expanded\") === \"false\"}`);\n\n if (!document.startViewTransition) toggle();\n else document.startViewTransition(() => toggle());\n};\n\nexport function observe(el: Element) {\n on(el, \"click\", handleToggleClick, QUICK_EVENT);\n}\n\nexport function unobserve(el: Element) {\n off(el, \"click\", handleToggleClick, QUICK_EVENT);\n}\n","import styles from \"../styles.module.css\";\nimport { IS_BROWSER, onMutation } from \"../utils\";\nconst CSS_LOGO = styles.logo.split(\" \")[0];\nlet FAVICON: HTMLLinkElement;\n\nfunction process(logos: HTMLCollectionOf<Element>) {\n const svg = logos[0]?.firstElementChild;\n\n if (!svg) return;\n if (!FAVICON) {\n const { head } = window.top?.document || document;\n const oldIcon = head.getElementsByTagName(\"link[rel~='icon']\");\n const newIcon = document.createElement(\"link\");\n\n for (const icon of oldIcon) icon.remove();\n FAVICON = head.appendChild(Object.assign(newIcon, { rel: \"icon\" }));\n }\n\n const isDot = svg.parentElement?.hasAttribute(\"data-color\");\n const style = window.getComputedStyle(svg);\n const text = style.getPropertyValue(\"color\");\n const back = style.getPropertyValue(\"background-color\");\n\n FAVICON.href = `data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${isDot ? \"none\" : back}' width='51' height='51' x='2' y='2' stroke='${text}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${isDot ? 0.6 : 0}' stroke-width='2.3' rx='25.5'/><g transform=\"translate(7.5 7.5)\">${encodeURIComponent(svg.outerHTML.replace(/(fill|width|height|xmlns)=\\S+/gi, \"\").replace(\"<svg\", `<svg width=\"40\" height=\"40\" fill=\"${text}\"`))}</g></svg>`;\n}\n\n// Force a update even if not active tab\nif (IS_BROWSER)\n setTimeout(() => process(document.getElementsByClassName(CSS_LOGO)), 300);\n\nexport const observe = (el: Element) => onMutation(el, CSS_LOGO, process);\nexport const unobserve = (el: Element) => onMutation(el, CSS_LOGO, false);\n","import styles from \"../styles.module.css\";\nimport { QUICK_EVENT, anchorPosition, attr, off, on } from \"../utils\";\n\nconst CSS_POPOVER = styles.popover.split(\" \")[0];\n\nexport function observe(el: Node) {\n on(el, \"toggle\", handleToggle, QUICK_EVENT); // Use capture since toggle does not bubble\n on(el, \"click\", handleLinkClick); // Allow `<a>` to use `popovertarget` as well\n}\nexport function unobserve(el: Node) {\n off(el, \"toggle\", handleToggle, QUICK_EVENT); // Use capture since toggle does not bubble\n off(el, \"click\", handleLinkClick);\n}\n\nfunction handleToggle({ target: el, newState }: Event & { newState?: string }) {\n if (el instanceof HTMLElement && el.classList.contains(CSS_POPOVER)) {\n const anchor = (el.getRootNode() as ShadowRoot)?.querySelector<HTMLElement>(\n `[popovertarget=\"${el.id}\"]`\n );\n\n if (newState === \"closed\") anchorPosition(el, false);\n else if (anchor)\n anchorPosition(el, anchor, attr(el, \"data-position\") || \"bottom\");\n }\n}\n\n// Polyfill popovertarget for <a> (not supported by native)\n// and automatically assume popovertarget is the closest parent popover\n// but respect the popovertarget and popovertargetaction attribute\nfunction handleLinkClick({ target }: Event) {\n const link = (target as Element)?.closest?.(\"a\");\n if (link) {\n const root = link.getRootNode() as ShadowRoot;\n const target =\n root.getElementById?.(attr(link, \"popovertarget\") || \"\") ||\n link.closest(`.${CSS_POPOVER}`);\n const action = attr(link, \"popovertargetaction\") || \"toggle\";\n\n target?.togglePopover(\n action === \"show\" || (action === \"hide\" ? false : undefined)\n );\n }\n}\n","import styles from \"../styles.module.css\";\nimport { attr, onMutation } from \"../utils\";\nconst CSS_TABLE = styles.table.split(\" \")[0];\n\nfunction process(tables: HTMLCollectionOf<Element>) {\n for (const table of tables as HTMLCollectionOf<HTMLTableElement>) {\n const ths: string[] = []; // Add data-th=\"\" to each cell to support data-mobile designs\n\n attr(table, \"role\", \"table\"); // Add helping role=\"\" to ensure screen readers understand the table regardless of CSS display\n if (table.caption) attr(table.caption, \"role\", \"caption\");\n for (const group of [table.tHead, table.tFoot, ...table.tBodies])\n if (group) {\n attr(group, \"role\", \"rowgroup\");\n const isTbody = group.nodeName === \"TBODY\";\n\n for (const row of group.rows) {\n attr(row, \"role\", \"row\");\n for (const cell of row.cells) {\n if (isTbody) attr(cell, \"data-th\", ths[cell.cellIndex] || \":empty\");\n else ths.push(cell.innerText.trim()); // Using innerText to only include visible text\n if (cell.nodeName === \"TD\") attr(cell, \"role\", \"cell\");\n else {\n attr(cell, \"role\", isTbody ? \"rowheader\" : \"columnheader\");\n attr(cell, \"scope\", isTbody ? \"row\" : \"col\");\n }\n }\n }\n }\n }\n}\n\nexport const observe = (el: Element) => onMutation(el, CSS_TABLE, process);\nexport const unobserve = (el: Element) => onMutation(el, CSS_TABLE, false);\n","export * as styles from \"./styles.module.css\";\nexport { pagination } from \"./pagination/pagination-helper\";\nimport \"./tooltip/tooltip-observer\"; // Load data-tooltip behaviour\nimport \"@u-elements/u-details\"; // Polyfill for <details> element\nimport * as dialog from \"./dialog/dialog-observer\";\nimport * as field from \"./field/field-observer\";\nimport * as fieldset from \"./fieldset/fieldset-observer\";\nimport * as layout from \"./layout/layout-observer\";\nimport * as logo from \"./logo/logo-observer\";\nimport * as popover from \"./popover/popover-observer\";\nimport * as table from \"./table/table-observer\";\nimport { IS_BROWSER } from \"./utils\";\n\n// Automatic observe on browser\nif (IS_BROWSER) {\n const isLoading = document.readyState === \"loading\"; // Check if the page is still loading - might happen if the script is in <head>\n const onLoaded = () => observe(document.body);\n\n if (isLoading) document.addEventListener(\"DOMContentLoaded\", onLoaded);\n else onLoaded();\n}\n\nexport function observe(el: Element) {\n dialog.observe(el);\n field.observe(el);\n fieldset.observe(el);\n layout.observe(el);\n logo.observe(el);\n popover.observe(el);\n table.observe(el);\n}\n\nexport function unobserve(el: Element) {\n dialog.unobserve(el);\n field.unobserve(el);\n fieldset.unobserve(el);\n layout.unobserve(el);\n logo.unobserve(el);\n popover.unobserve(el);\n table.unobserve(el);\n}\n"],"names":["getSteps","now","max","show","offset","start","end","pages","_","i","pagination","current","total","page","index","IS_BROWSER","QUICK_EVENT","attr","el","name","value","id","UUID","useId","events","action","element","rest","type","on","off","TARGETS","SCROLLER","update","POSITION","anchorPosition","target","anchor","position","place","_a","targetW","targetH","anchorW","anchorH","width","height","left","top","anchorX","anchorY","hasSpaceLeft","hasSpaceRight","hasSpaceOver","hasSpaceUnder","positionRight","positionUnder","centerX","centerY","isVertical","createOptimizedMutationObserver","callback","queue","onFrame","onTimer","observer","MUTATORS","MUTATORS_CALLBACK","mutator","onMutation","className","collection","isInputLike","CSS_TOOLTIP","styles","DESCRIBEDBY","ESC","LABELLEDBY","POSITION_CSS_PROPERTY","THROTTLE_DELAY","TOOLTIP_ID","ANCHOR","LAST_CALL","THROTTLE","TOOLTIP","handleMove","key","wait","handleMoveThrottled","content","hadLabel","hasLabel","DISPLAY_BLOCK","UHTMLElement","_a2","asButton","event","isClick","getRoot","node","root","createElement","tagName","text","attrs","val","customElements","instance","UHTMLDetailsElement","prop","prev","next","hide","open","uDetailsList","uDetails","summary","isSummary","UHTMLSummaryElement","handleClick","x","y","right","bottom","observe","unobserve","CSS_FIELD","CSS_PROPERTY_OVER","CSS_PROPERTY_UNDER","CSS_VALIDATIONS","CSS_VALIDATION","renderAria","fields","field","labels","descs","input","valid","label","renderCounter","renderTextareaSize","handleInput","textarea","limit","remainder","nextInvalid","prevInvalid","style","over","under","_b","css","handleInvalid","CSS_FIELDSET","process","fieldsets","fieldset","inputs","validationId","CSS_APP","CSS_TOGGLE","handleToggleClick","btn","nav","toggle","CSS_LOGO","FAVICON","logos","svg","head","oldIcon","newIcon","icon","isDot","_c","back","CSS_POPOVER","handleToggle","handleLinkClick","newState","link","CSS_TABLE","tables","table","ths","group","isTbody","row","cell","isLoading","onLoaded","dialog.observe","field.observe","fieldset.observe","layout.observe","logo.observe","popover.observe","table.observe","dialog.unobserve","field.unobserve","fieldset.unobserve","layout.unobserve","logo.unobserve","popover.unobserve","table.unobserve"],"mappings":"46DAAMA,GAAW,CAACC,EAAaC,EAAaC,IAAiB,CACrD,MAAAC,GAAUD,EAAO,GAAK,EACtBE,EAAQ,KAAK,IAAI,KAAK,IAAIJ,EAAM,KAAK,MAAMG,CAAM,EAAGF,EAAMC,EAAO,CAAC,EAAG,CAAC,EACtEG,EAAM,KAAK,IAAI,KAAK,IAAIL,EAAM,KAAK,KAAKG,CAAM,EAAGD,CAAI,EAAGD,CAAG,EAC3DK,EAAQ,MAAM,KAAK,CAAE,OAAQD,EAAM,EAAID,CAAS,EAAA,CAACG,EAAGC,IAAMA,EAAIJ,CAAK,EAErE,OAAAF,EAAO,GAAKE,EAAQ,KAAS,OAAO,EAAG,EAAG,EAAG,CAAC,EAC9CF,EAAO,GAAKG,EAAMJ,KAAW,OAAO,GAAI,EAAG,EAAGA,CAAG,EAC9CK,CACT,EAEaG,GAAa,CAAC,CAAE,QAAAC,EAAU,EAAG,MAAAC,EAAQ,GAAI,KAAAT,EAAO,MAAS,CACpE,KAAMQ,EAAU,EAAIA,EAAU,EAAI,EAClC,KAAMA,EAAUC,EAAQD,EAAU,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,EACzDJ,EAAA,KAAKI,EAAK,UAAU,MAAM,EAC/BA,EAAK,WAAa,KAAW3K,EAAA2K,EAAM,OAAQ,MAAM,GAEnD3K,EAAK2K,EAAM,OAAQF,EAAU,YAAc,cAAc,EACzDzK,EAAK2K,EAAM,QAASF,EAAU,MAAQ,KAAK,EAE/C,CACF,CACF,CAEN,CAEO,MAAM9D,GAAW1G,GAAgBmD,EAAWnD,EAAImK,GAAW3B,EAAO,EAC5D7B,GAAa3G,GAAgBmD,EAAWnD,EAAImK,GAAW,EAAK,EClBzE,GAAItK,EAAY,CACR,MAAA8K,EAAY,SAAS,aAAe,UACpCC,EAAW,IAAMlE,GAAQ,SAAS,IAAI,EAExCiE,EAAW,SAAS,iBAAiB,mBAAoBC,CAAQ,EACvDA,EAAA,CAChB,CAEO,SAASlE,GAAQ1G,EAAa,CACnC6K,GAAe7K,CAAE,EACjB8K,GAAc9K,CAAE,EAChB+K,GAAiB/K,CAAE,EACnBgL,GAAehL,CAAE,EACjBiL,GAAajL,CAAE,EACfkL,GAAgBlL,CAAE,EAClBmL,GAAcnL,CAAE,CAClB,CAEO,SAAS2G,GAAU3G,EAAa,CACrCoL,GAAiBpL,CAAE,EACnBqL,GAAgBrL,CAAE,EAClBsL,GAAmBtL,CAAE,EACrBuL,GAAiBvL,CAAE,EACnBwL,GAAexL,CAAE,EACjByL,GAAkBzL,CAAE,EACpB0L,GAAgB1L,CAAE,CACpB","x_google_ignoreList":[3]}
|
|
@@ -11,10 +11,12 @@ export declare const Default: Story;
|
|
|
11
11
|
export declare const React: Story;
|
|
12
12
|
export declare const Variants: Story;
|
|
13
13
|
export declare const Select: Story;
|
|
14
|
+
export declare const Textarea: Story;
|
|
14
15
|
export declare const Checkbox: Story;
|
|
15
16
|
export declare const Radio: Story;
|
|
16
17
|
export declare const Switch: Story;
|
|
17
18
|
export declare const Sizes: Story;
|
|
18
19
|
export declare const ReadOnly: Story;
|
|
19
20
|
export declare const Disabled: Story;
|
|
20
|
-
export declare const
|
|
21
|
+
export declare const TypeSearch: Story;
|
|
22
|
+
export declare const TypeDate: Story;
|
package/mtds/layout/layout.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { PolymorphicComponentPropWithRef } from '../react-types';
|
|
|
3
3
|
type SharedProps = {
|
|
4
4
|
"data-align"?: "stretch" | "start" | "center" | "end";
|
|
5
5
|
"data-center"?: "sm" | "md" | "lg" | "xl" | "2xl";
|
|
6
|
-
"data-gap"?: "none" | "xs" | "sm" | "md" | "lg" | false;
|
|
6
|
+
"data-gap"?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | false;
|
|
7
7
|
"data-justify"?: "start" | "center" | "end" | "space-between" | "space-around" | "space-evenly";
|
|
8
8
|
"data-justify-content"?: "start" | "center" | "end" | "space-between" | "space-around" | "space-evenly";
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sources":["../../designsystem/layout/layout.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type JSX, forwardRef } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype SharedProps = {\n\t\"data-align\"?: \"stretch\" | \"start\" | \"center\" | \"end\";\n\t\"data-center\"?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n\t\"data-gap\"?: \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | false;\n\t\"data-justify\"?:\n\t\t| \"start\"\n\t\t| \"center\"\n\t\t| \"end\"\n\t\t| \"space-between\"\n\t\t| \"space-around\"\n\t\t| \"space-evenly\";\n\t\"data-justify-content\"?:\n\t\t| \"start\"\n\t\t| \"center\"\n\t\t| \"end\"\n\t\t| \"space-between\"\n\t\t| \"space-around\"\n\t\t| \"space-evenly\";\n};\n\nexport type FlexProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, SharedProps>;\n\nexport type GridProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\tSharedProps & {\n\t\t\t\"data-grid\"?:\n\t\t\t\t| \"1\"\n\t\t\t\t| \"2\"\n\t\t\t\t| \"3\"\n\t\t\t\t| \"4\"\n\t\t\t\t| \"5\"\n\t\t\t\t| \"6\"\n\t\t\t\t| \"7\"\n\t\t\t\t| \"8\"\n\t\t\t\t| \"9\"\n\t\t\t\t| \"10\"\n\t\t\t\t| \"11\"\n\t\t\t\t| \"12\"\n\t\t\t\t| \"fit\"\n\t\t\t\t| \"fit-lg\"\n\t\t\t\t| \"fit-md\"\n\t\t\t\t| \"fit-sm\"\n\t\t\t\t| \"fit-xs\"\n\t\t\t\t| \"lg\"\n\t\t\t\t| \"md\"\n\t\t\t\t| \"sm\"\n\t\t\t\t| \"xs\"\n\t\t\t\t| 1\n\t\t\t\t| 2\n\t\t\t\t| 3\n\t\t\t\t| 4\n\t\t\t\t| 5\n\t\t\t\t| 6\n\t\t\t\t| 7\n\t\t\t\t| 8\n\t\t\t\t| 9\n\t\t\t\t| 10\n\t\t\t\t| 11\n\t\t\t\t| 12;\n\t\t}\n\t>;\n\ntype FlexComponent = <As extends React.ElementType = \"div\">(\n\tprops: FlexProps<As>,\n) => JSX.Element;\n\ntype GridComponent = <As extends React.ElementType = \"div\">(\n\tprops: GridProps<As>,\n) => JSX.Element;\n\nexport const Flex: FlexComponent = forwardRef<null>(function Flex<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: FlexProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\n\treturn <Tag className={clsx(styles.flex, className)} ref={ref} {...rest} />;\n}) as FlexComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport const Grid: GridComponent = forwardRef<null>(function Grid<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: GridProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\n\treturn <Tag className={clsx(styles.grid, className)} ref={ref} {...rest} />;\n}) as GridComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Flex","forwardRef","as","className","rest","ref","jsx","clsx","styles","Grid"],"mappings":";;;;AAgFa,MAAAA,IAAsBC,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAkBC,GAA0B;AAG/D,SAAA,gBAAAC,EAFKJ,KAAM,OAEN,EAAA,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC1E,CAAC,GAEYK,IAAsBR,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAkBC,GAA0B;AAG/D,SAAA,gBAAAC,EAFKJ,KAAM,OAEN,EAAA,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC1E,CAAC;"}
|
|
1
|
+
{"version":3,"file":"layout.js","sources":["../../designsystem/layout/layout.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type JSX, forwardRef } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype SharedProps = {\n\t\"data-align\"?: \"stretch\" | \"start\" | \"center\" | \"end\";\n\t\"data-center\"?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n\t\"data-gap\"?: \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | false;\n\t\"data-justify\"?:\n\t\t| \"start\"\n\t\t| \"center\"\n\t\t| \"end\"\n\t\t| \"space-between\"\n\t\t| \"space-around\"\n\t\t| \"space-evenly\";\n\t\"data-justify-content\"?:\n\t\t| \"start\"\n\t\t| \"center\"\n\t\t| \"end\"\n\t\t| \"space-between\"\n\t\t| \"space-around\"\n\t\t| \"space-evenly\";\n};\n\nexport type FlexProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, SharedProps>;\n\nexport type GridProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\tSharedProps & {\n\t\t\t\"data-grid\"?:\n\t\t\t\t| \"1\"\n\t\t\t\t| \"2\"\n\t\t\t\t| \"3\"\n\t\t\t\t| \"4\"\n\t\t\t\t| \"5\"\n\t\t\t\t| \"6\"\n\t\t\t\t| \"7\"\n\t\t\t\t| \"8\"\n\t\t\t\t| \"9\"\n\t\t\t\t| \"10\"\n\t\t\t\t| \"11\"\n\t\t\t\t| \"12\"\n\t\t\t\t| \"fit\"\n\t\t\t\t| \"fit-lg\"\n\t\t\t\t| \"fit-md\"\n\t\t\t\t| \"fit-sm\"\n\t\t\t\t| \"fit-xs\"\n\t\t\t\t| \"lg\"\n\t\t\t\t| \"md\"\n\t\t\t\t| \"sm\"\n\t\t\t\t| \"xs\"\n\t\t\t\t| 1\n\t\t\t\t| 2\n\t\t\t\t| 3\n\t\t\t\t| 4\n\t\t\t\t| 5\n\t\t\t\t| 6\n\t\t\t\t| 7\n\t\t\t\t| 8\n\t\t\t\t| 9\n\t\t\t\t| 10\n\t\t\t\t| 11\n\t\t\t\t| 12;\n\t\t}\n\t>;\n\ntype FlexComponent = <As extends React.ElementType = \"div\">(\n\tprops: FlexProps<As>,\n) => JSX.Element;\n\ntype GridComponent = <As extends React.ElementType = \"div\">(\n\tprops: GridProps<As>,\n) => JSX.Element;\n\nexport const Flex: FlexComponent = forwardRef<null>(function Flex<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: FlexProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\n\treturn <Tag className={clsx(styles.flex, className)} ref={ref} {...rest} />;\n}) as FlexComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport const Grid: GridComponent = forwardRef<null>(function Grid<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: GridProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\n\treturn <Tag className={clsx(styles.grid, className)} ref={ref} {...rest} />;\n}) as GridComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Flex","forwardRef","as","className","rest","ref","jsx","clsx","styles","Grid"],"mappings":";;;;AAgFa,MAAAA,IAAsBC,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAkBC,GAA0B;AAG/D,SAAA,gBAAAC,EAFKJ,KAAM,OAEN,EAAA,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC1E,CAAC,GAEYK,IAAsBR,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAAkBC,GAA0B;AAG/D,SAAA,gBAAAC,EAFKJ,KAAM,OAEN,EAAA,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC1E,CAAC;"}
|