@mattilsynet/design 3.1.15 → 3.1.16
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/atlas/atlas-element.js +1 -1
- package/mtds/card/card.d.ts +5 -5
- package/mtds/card/card.js.map +1 -1
- package/mtds/index.iife.js +1 -1
- package/mtds/package.json.js +1 -1
- package/mtds/styles.css +1 -1
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ class c extends C {
|
|
|
20
20
|
}
|
|
21
21
|
constructor() {
|
|
22
22
|
super(), this.attachShadow({ mode: "open" }).append(p("figure")), v(this, `@layer leaflet{${f}}
|
|
23
|
-
@layer mt.v3-1-
|
|
23
|
+
@layer mt.v3-1-16design{${k}`);
|
|
24
24
|
}
|
|
25
25
|
connectedCallback() {
|
|
26
26
|
const t = this.shadowRoot?.lastElementChild, o = a(this, "data-cluster") ?? "false", e = new i.TileLayer(S, {
|
package/mtds/card/card.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import { PolymorphicComponentPropWithRef, Sizes } from '../react-types';
|
|
3
|
-
type
|
|
4
|
-
"data-pad"?: Sizes
|
|
3
|
+
export type CardProps<Href, As extends React.ElementType = Href extends string ? "a" : "div"> = PolymorphicComponentPropWithRef<As, {
|
|
4
|
+
"data-pad"?: Sizes | `${Sizes}-${Sizes}`;
|
|
5
5
|
"data-radius"?: "sm" | "md" | "lg" | "xl";
|
|
6
6
|
"data-clickdelegatefor"?: string;
|
|
7
7
|
href?: Href;
|
|
8
|
-
}
|
|
9
|
-
export type CardProps<Href, As extends React.ElementType = Href extends string ? "a" : "div"> = PolymorphicComponentPropWithRef<As, CardBaseProps<Href>>;
|
|
8
|
+
}>;
|
|
10
9
|
type CardComponent = <Href, As extends React.ElementType = Href extends string ? "a" : "div">(props: CardProps<Href, As>) => JSX.Element;
|
|
11
10
|
export declare const Card: CardComponent;
|
|
12
11
|
export type GroupProps<As extends React.ElementType = "div"> = PolymorphicComponentPropWithRef<As, {
|
|
13
|
-
"data-pad"?: Sizes
|
|
12
|
+
"data-pad"?: Sizes | `${Sizes}-${Sizes}`;
|
|
13
|
+
"data-radius"?: "sm" | "md" | "lg" | "xl";
|
|
14
14
|
}>;
|
|
15
15
|
type GroupComponent = <As extends React.ElementType = "div">(props: GroupProps<As>) => JSX.Element;
|
|
16
16
|
export declare const Group: GroupComponent;
|
package/mtds/card/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sources":["../../designsystem/card/card.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n\tSizes,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\
|
|
1
|
+
{"version":3,"file":"card.js","sources":["../../designsystem/card/card.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n\tSizes,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type CardProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"div\",\n> = PolymorphicComponentPropWithRef<\n\tAs,\n\t{\n\t\t\"data-pad\"?: Sizes | `${Sizes}-${Sizes}`;\n\t\t\"data-radius\"?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n\t\t\"data-clickdelegatefor\"?: string;\n\t\thref?: Href;\n\t}\n>;\n\ntype CardComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"div\",\n>(\n\tprops: CardProps<Href, As>,\n) => JSX.Element;\n\nexport const Card: CardComponent = forwardRef<null>(function Card<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"div\",\n>({ as, className, ...rest }: CardProps<Href, As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || (rest.href ? \"a\" : \"div\");\n\n\treturn <Tag className={clsx(styles.card, className)} ref={ref} {...rest} />;\n}) as CardComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type GroupProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\n\t\t\t\"data-pad\"?: Sizes | `${Sizes}-${Sizes}`;\n\t\t\t\"data-radius\"?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n\t\t}\n\t>;\n\ntype GroupComponent = <As extends React.ElementType = \"div\">(\n\tprops: GroupProps<As>,\n) => JSX.Element;\n\nexport const Group: GroupComponent = forwardRef<null>(function Group<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: GroupProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\tif (Tag === \"button\" && !rest.type) Object.assign(rest, { type: \"button\" }); // Default type for button to avoid accidental submits\n\treturn <Tag className={clsx(styles.group, className)} ref={ref} {...rest} />;\n}) as GroupComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Card","forwardRef","as","className","rest","ref","Tag","jsx","clsx","styles","Group"],"mappings":";;;;AA6BO,MAAMA,IAAsBC,EAAiB,SAGlD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA6BC,GAA0B;AAC5E,QAAMC,IAAMJ,MAAOE,EAAK,OAAO,MAAM;AAErC,SAAO,gBAAAG,EAACD,GAAA,EAAI,WAAWE,EAAKC,EAAO,MAAMN,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC1E,CAAC,GAeYM,IAAwBT,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAwBC,GAA0B;AACvE,QAAMC,IAAMJ,KAAM;AAClB,SAAII,MAAQ,YAAY,CAACF,EAAK,QAAM,OAAO,OAAOA,GAAM,EAAE,MAAM,SAAA,CAAU,GACnE,gBAAAG,EAACD,GAAA,EAAI,WAAWE,EAAKC,EAAO,OAAON,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC3E,CAAC;"}
|
package/mtds/index.iife.js
CHANGED
|
@@ -196,7 +196,7 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
|
|
|
196
196
|
::slotted([role="option"]:focus) { ${_l} }
|
|
197
197
|
::slotted([role="option"][aria-hidden="true"]),
|
|
198
198
|
::slotted([role="option"][disabled]),
|
|
199
|
-
::slotted([role="option"][hidden]) { display: none !important }`,rc=oc(Vn),zi,Fi=0,ac=Mn||Oe,Bi="click,focusout,input,keydown,mousedown,mouseup",Gi="focus,focusin,blur,focusout",Re={singular:"%d hit",plural:"%d hits"},Hi=class extends Pi{constructor(){super(),this._texts=Kl({},Re),this._value="",this._of="/",$l(this,Vn)}static get observedAttributes(){return["id",...Object.keys(Re).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Vi(this),L(this,"role","listbox"),L(this,"tabindex","-1"),Ft(this._root,"focusin",this),Ft(this._root,"focus",this,!0),In(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Me(this._root||this,"focus",this,!0),Me(this._root||this,"focusin",this),In(this,!1),Un(this),this._root=void 0}attributeChangedCallback(t,e,n){const o=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(Re[o])this._texts[o]=n||Re[o];else if(this._root){this._input&&Dn(this,this._input);for(const r of this._root.querySelectorAll(i))Dn(this,r)}}handleEvent(t){const{target:e,type:n}=t;t.defaultPrevented||(n==="click"&&cc(this,t),(n==="focus"||n==="focusin")&&sc(this,t),(n==="blur"||n==="focusout")&&lc(this,t),n==="keydown"&&dc(this,t),n==="mousedown"&&this.contains(e)&&Pn(t),(n==="mutation"||n==="input")&&(clearTimeout(Fi),Fi=setTimeout(ji,0,this,t)))}get options(){var t;if(!this._options){const e=(t=this.querySelector('[role="option"],option'))==null?void 0:t.nodeName;e&&(this._options=this.getElementsByTagName(e))}return this._options||this.getElementsByTagName("option")}},Ji=t=>t?.disabled||t?.readOnly||!1,Gt=(t,e)=>{var n,o,i;if(t.hidden!==e)return;t.hidden=Ji(t?._input)||!e,(n=In(t))==null||n.takeRecords();const r=t.isConnected&&t.popover&&((o=t._input)==null?void 0:o.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&Dn(t,t._input,e),r&&L(t,"popover","manual"),r&&t.togglePopover(e),e&&ji(t)},Un=t=>{t._input&&(Me(t._input||t,Gi,t),Me(t._root||t,Bi,t),Gt(t,!1),t._input=void 0)},Dn=(t,e,n=!1)=>{t.popover&&L(e,"popovertarget",Rn(t)),Ft(e,Gi,t,!0),L(e,"aria-autocomplete","list"),L(e,"aria-controls",Rn(t)),L(e,"aria-expanded",`${!ac||n}`),L(e,"autocomplete","off"),L(e,"role",Ji(e)?null:"combobox")},sc=(t,e)=>{var n;const o=e.target instanceof HTMLInputElement;o&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&o&&e.target.list===t&&(t._input&&Un(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),L(t,Yl,Rn((n=t._input.labels)==null?void 0:n[0])),Ft(t._root||t,Bi,t),Gt(t,L(t._input,"inputmode")!=="none"),Di())},lc=(t,e)=>{!Oe&&!Pn()&&t._input&&setTimeout(Xi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Xi=t=>{var e;const n=((e=t._root)==null?void 0:e.activeElement)||null,o=t._input;o&&o!==n&&!t.contains(n)&&(o.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n})),Un(t))},cc=(t,{target:e})=>{var n;if(!t._input||t._input===e)return Gt(t,!0);for(const o of t.options)if(o.contains(e))return L(t,"aria-multiselectable")!=="true"&&((n=t._input)==null||n.focus(),Gt(t,!1)),nc(t._input,o.value);Oe&&Xi(t)},dc=(t,e)=>{var n;const{key:o,target:i,altKey:r,ctrlKey:a,shiftKey:s,metaKey:c}=e,l=o==="Escape"||o==="Esc";if(r||a||c||s||o==="Tab")return;l&&!t.hidden&&e?.preventDefault(),Gt(t,!l);const d=[...t.options].filter(f=>L(f,"aria-hidden")!=="true"&&f.offsetHeight),u=d.indexOf(i);let p=-1;if(o==="ArrowDown"&&(p=(u+1)%d.length),o==="ArrowUp"&&(p=(~u?u:d.length)-1),~u&&((o==="Home"||o==="PageUp")&&(p=0),(o==="End"||o==="PageDown")&&(p=d.length-1),o==="Enter"))return d[u].click(),e.preventDefault();if(d[p])for(const f of d)f.tabIndex=-1;d[p]&&e.preventDefault(),(n=d[p]||t._input)==null||n.focus(),!d[p]&&o==="ArrowUp"&&setTimeout(()=>{var f;return(f=t._input)==null?void 0:f.setSelectionRange(999,999)})},ji=(t,e)=>{const{_texts:n,_root:o,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",s=!t.hasAttribute("data-nofilter"),c=[],l=[];for(const p of r)(p.disabled||p.hidden||s&&!p.label.toLowerCase().includes(a)?c:l).push(p);for(const p of c)L(p,"aria-hidden","true");for(const p of l)L(p,"aria-hidden","false");const d=l.length;clearTimeout(zi),e?.type==="input"&&a!==t._value&&(zi=setTimeout(()=>{const p=`${!d&&t.innerText.trim()||`${n[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&o?.activeElement===i&&Di(p),t._value=a},1e3));let u=0;if(Mn)for(const p of l)L(p,"title",`${++u} ${t._of} ${d}`)};zt&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Vi(this).getElementById(L(this,"list")||"")}}),Ui.define("u-datalist",Hi),ct()&&!Bl()&&Gl();const uc="3.1.15",Zi="_alert_1d3iq_1 _ds-alert_s9m4f_3",Ki="_app_1d3iq_1",Yi="_sticky_1d3iq_1",Qi="_avatar_1d3iq_1 _ds-avatar_s9m4f_1",_i="_badge_1d3iq_1",$i="_breadcrumbs_1d3iq_1 _ds-breadcrumbs_s9m4f_5",tr="_button_1d3iq_1 _ds-button_s9m4f_1",er="_card_1d3iq_1",nr="_group_1d3iq_1",or="_chip_1d3iq_1 _ds-chip_s9m4f_5",ir="_details_1d3iq_1 _ds-details_s9m4f_3",rr="_dialog_1d3iq_1 _ds-dialog_s9m4f_5",ar="__drawer_1d3iq_1",sr="_divider_1d3iq_1",lr="_errorsummary_1d3iq_1 _ds-error-summary_s9m4f_5",cr="_field_1d3iq_1 _ds-field_s9m4f_1",dr="_suggestion_1d3iq_1 _ds-suggestion_s9m4f_5",ur="_affixes_1d3iq_1 _ds-field-affixes_s9m4f_3",mr="_fieldset_1d3iq_1 _ds-fieldset_s9m4f_3",pr="_fileupload_1d3iq_1",fr="_helptext_1d3iq_1 _ds-focus_s9m4f_1",hr="_input_1d3iq_1 _ds-input_s9m4f_1",gr="_law_1d3iq_1",vr="_grid_1d3iq_1",br="_flex_1d3iq_1",wr="_link_1d3iq_1",yr="_logo_1d3iq_1",xr="__logo_1d3iq_1",Sr="_pagination_1d3iq_1 _ds-pagination_s9m4f_5",Er="_popover_1d3iq_1 _ds-popover_s9m4f_3",kr="_progress_1d3iq_1",Tr="__indeterminate_1d3iq_1",Ar="_skeleton_1d3iq_1 _ds-skeleton_s9m4f_5",Lr="__skeleton_1d3iq_1",Cr="_spinner_1d3iq_1",Or="_steps_1d3iq_1",Mr="_table_1d3iq_1 _ds-table_s9m4f_5",Ir="__scrollShadow_1d3iq_1",Rr="_tabs_1d3iq_1 _ds-tabs_s9m4f_5",Nr="__scrollMask_1d3iq_1",qr="_tag_1d3iq_1 _ds-tag_s9m4f_5",Pr="_toast_1d3iq_1",Wr="__toastClose_1d3iq_1",Vr="__toastOpen_1d3iq_1",Ur="__toastTimeout_1d3iq_1",Dr="_togglegroup_1d3iq_1 _ds-toggle-group_s9m4f_5",zr="__tooltip_1d3iq_1 _ds-tooltip_s9m4f_5",Fr="_heading_1d3iq_1 _ds-heading_s9m4f_1",Br="_ingress_1d3iq_1",Gr="_muted_1d3iq_1",Hr="_info_1d3iq_1",Jr="_prose_1d3iq_1",Xr="_validation_1d3iq_1 _ds-validation-message_s9m4f_1",jr="_body_1d3iq_161",Zr="__checked_1d3iq_1",C={alert:Zi,app:Ki,sticky:Yi,avatar:Qi,badge:_i,breadcrumbs:$i,button:tr,card:er,group:nr,chip:or,details:ir,dialog:rr,_drawer:ar,divider:sr,errorsummary:lr,field:cr,suggestion:dr,affixes:ur,fieldset:mr,fileupload:pr,helptext:fr,input:hr,law:gr,grid:vr,flex:br,link:wr,logo:yr,_logo:xr,pagination:Sr,popover:Er,progress:kr,_indeterminate:Tr,skeleton:Ar,_skeleton:Lr,spinner:Cr,steps:Or,table:Mr,_scrollShadow:Ir,tabs:Rr,_scrollMask:Nr,tag:qr,toast:Pr,_toastClose:Wr,_toastOpen:Vr,_toastTimeout:Ur,togglegroup:Dr,_tooltip:zr,heading:Fr,ingress:Br,muted:Gr,info:Hr,prose:Jr,validation:Xr,body:jr,_checked:Zr},mc=Object.freeze(Object.defineProperty({__proto__:null,_checked:Zr,_drawer:ar,_indeterminate:Tr,_logo:xr,_scrollMask:Nr,_scrollShadow:Ir,_skeleton:Lr,_toastClose:Wr,_toastOpen:Vr,_toastTimeout:Ur,_tooltip:zr,affixes:ur,alert:Zi,app:Ki,avatar:Qi,badge:_i,body:jr,breadcrumbs:$i,button:tr,card:er,chip:or,default:C,details:ir,dialog:rr,divider:sr,errorsummary:lr,field:cr,fieldset:mr,fileupload:pr,flex:br,grid:vr,group:nr,heading:Fr,helptext:fr,info:Hr,ingress:Br,input:hr,law:gr,link:wr,logo:yr,muted:Gr,pagination:Sr,popover:Er,progress:kr,prose:Jr,skeleton:Ar,spinner:Cr,steps:Or,sticky:Yi,suggestion:dr,table:Mr,tabs:Rr,tag:qr,toast:Pr,togglegroup:Dr,validation:Xr},Symbol.toStringTag,{value:"Module"}));function Kr(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Kr(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function pc(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Kr(t))&&(o&&(o+=" "),o+=e);return o}const Ht={capture:!0,passive:!0},J=()=>typeof window<"u"&&typeof document<"u",bt=t=>J()?document.getElementsByClassName(C[t].split(" ")[0]):[];function Rt(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const v=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),R=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>Yr(t,...e)},Yr=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},it=(t,e)=>{if(!J())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const n=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(o=>o()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?R(window,"load",n):document.fonts?.ready?.then(n)||setTimeout(n,0)},Ne=(t,e,n)=>{let o=0;const i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{o||(o=requestAnimationFrame(i))});return a.observe(t,n),i(),r},M=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))v(o,i,r);return o},fc=typeof HTMLElement>"u"?class{}:HTMLElement,hc=(t,e)=>!J()||window.customElements.get(t)||window.customElements.define(t,e),gc=typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets,vc=(t,e)=>{if(!gc)return;t.shadowRoot||t.attachShadow({mode:"open"}).append(M("slot"));const n=new CSSStyleSheet;n.replaceSync(e),t.shadowRoot.adoptedStyleSheets=[n]},bc=`[data-command="toggle-app-expanded"],.${C.app.split(" ")[0]} > [command="show-modal"]`,wc=`.${C.breadcrumbs.split(" ")[0]}`,yc=`.${C.card.split(" ")[0]}`,Qr=`.${C.chip.split(" ")[0]}`,xc=`.${C.helptext.split(" ")[0]}`,Sc=`.${C.pagination.split(" ")[0]}`,Ec='summary,u-summary,a,button,[role="tab"],[role="button"]',zn="mattilsynet.matomo.cloud",kc=["setCustomUrl","setDocumentTitle","setReferrerUrl"],X="mtds-analytics-banner",Tc="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function _r(t,e={}){if(J()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${zn}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&Ac();const a=r?`https://cdn.matomo.cloud/${zn}/container_${r}.js`:`https://cdn.matomo.cloud/${zn}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(M("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;kc.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function Ac(){if(document.getElementById(X)||window.localStorage.getItem(X))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${X}" data-analytics="ignore"><style>
|
|
199
|
+
::slotted([role="option"][hidden]) { display: none !important }`,rc=oc(Vn),zi,Fi=0,ac=Mn||Oe,Bi="click,focusout,input,keydown,mousedown,mouseup",Gi="focus,focusin,blur,focusout",Re={singular:"%d hit",plural:"%d hits"},Hi=class extends Pi{constructor(){super(),this._texts=Kl({},Re),this._value="",this._of="/",$l(this,Vn)}static get observedAttributes(){return["id",...Object.keys(Re).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Vi(this),L(this,"role","listbox"),L(this,"tabindex","-1"),Ft(this._root,"focusin",this),Ft(this._root,"focus",this,!0),In(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Me(this._root||this,"focus",this,!0),Me(this._root||this,"focusin",this),In(this,!1),Un(this),this._root=void 0}attributeChangedCallback(t,e,n){const o=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(Re[o])this._texts[o]=n||Re[o];else if(this._root){this._input&&Dn(this,this._input);for(const r of this._root.querySelectorAll(i))Dn(this,r)}}handleEvent(t){const{target:e,type:n}=t;t.defaultPrevented||(n==="click"&&cc(this,t),(n==="focus"||n==="focusin")&&sc(this,t),(n==="blur"||n==="focusout")&&lc(this,t),n==="keydown"&&dc(this,t),n==="mousedown"&&this.contains(e)&&Pn(t),(n==="mutation"||n==="input")&&(clearTimeout(Fi),Fi=setTimeout(ji,0,this,t)))}get options(){var t;if(!this._options){const e=(t=this.querySelector('[role="option"],option'))==null?void 0:t.nodeName;e&&(this._options=this.getElementsByTagName(e))}return this._options||this.getElementsByTagName("option")}},Ji=t=>t?.disabled||t?.readOnly||!1,Gt=(t,e)=>{var n,o,i;if(t.hidden!==e)return;t.hidden=Ji(t?._input)||!e,(n=In(t))==null||n.takeRecords();const r=t.isConnected&&t.popover&&((o=t._input)==null?void 0:o.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&Dn(t,t._input,e),r&&L(t,"popover","manual"),r&&t.togglePopover(e),e&&ji(t)},Un=t=>{t._input&&(Me(t._input||t,Gi,t),Me(t._root||t,Bi,t),Gt(t,!1),t._input=void 0)},Dn=(t,e,n=!1)=>{t.popover&&L(e,"popovertarget",Rn(t)),Ft(e,Gi,t,!0),L(e,"aria-autocomplete","list"),L(e,"aria-controls",Rn(t)),L(e,"aria-expanded",`${!ac||n}`),L(e,"autocomplete","off"),L(e,"role",Ji(e)?null:"combobox")},sc=(t,e)=>{var n;const o=e.target instanceof HTMLInputElement;o&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&o&&e.target.list===t&&(t._input&&Un(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),L(t,Yl,Rn((n=t._input.labels)==null?void 0:n[0])),Ft(t._root||t,Bi,t),Gt(t,L(t._input,"inputmode")!=="none"),Di())},lc=(t,e)=>{!Oe&&!Pn()&&t._input&&setTimeout(Xi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Xi=t=>{var e;const n=((e=t._root)==null?void 0:e.activeElement)||null,o=t._input;o&&o!==n&&!t.contains(n)&&(o.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n})),Un(t))},cc=(t,{target:e})=>{var n;if(!t._input||t._input===e)return Gt(t,!0);for(const o of t.options)if(o.contains(e))return L(t,"aria-multiselectable")!=="true"&&((n=t._input)==null||n.focus(),Gt(t,!1)),nc(t._input,o.value);Oe&&Xi(t)},dc=(t,e)=>{var n;const{key:o,target:i,altKey:r,ctrlKey:a,shiftKey:s,metaKey:c}=e,l=o==="Escape"||o==="Esc";if(r||a||c||s||o==="Tab")return;l&&!t.hidden&&e?.preventDefault(),Gt(t,!l);const d=[...t.options].filter(f=>L(f,"aria-hidden")!=="true"&&f.offsetHeight),u=d.indexOf(i);let p=-1;if(o==="ArrowDown"&&(p=(u+1)%d.length),o==="ArrowUp"&&(p=(~u?u:d.length)-1),~u&&((o==="Home"||o==="PageUp")&&(p=0),(o==="End"||o==="PageDown")&&(p=d.length-1),o==="Enter"))return d[u].click(),e.preventDefault();if(d[p])for(const f of d)f.tabIndex=-1;d[p]&&e.preventDefault(),(n=d[p]||t._input)==null||n.focus(),!d[p]&&o==="ArrowUp"&&setTimeout(()=>{var f;return(f=t._input)==null?void 0:f.setSelectionRange(999,999)})},ji=(t,e)=>{const{_texts:n,_root:o,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",s=!t.hasAttribute("data-nofilter"),c=[],l=[];for(const p of r)(p.disabled||p.hidden||s&&!p.label.toLowerCase().includes(a)?c:l).push(p);for(const p of c)L(p,"aria-hidden","true");for(const p of l)L(p,"aria-hidden","false");const d=l.length;clearTimeout(zi),e?.type==="input"&&a!==t._value&&(zi=setTimeout(()=>{const p=`${!d&&t.innerText.trim()||`${n[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&o?.activeElement===i&&Di(p),t._value=a},1e3));let u=0;if(Mn)for(const p of l)L(p,"title",`${++u} ${t._of} ${d}`)};zt&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Vi(this).getElementById(L(this,"list")||"")}}),Ui.define("u-datalist",Hi),ct()&&!Bl()&&Gl();const uc="3.1.16",Zi="_alert_1d3iq_1 _ds-alert_s9m4f_3",Ki="_app_1d3iq_1",Yi="_sticky_1d3iq_1",Qi="_avatar_1d3iq_1 _ds-avatar_s9m4f_1",_i="_badge_1d3iq_1",$i="_breadcrumbs_1d3iq_1 _ds-breadcrumbs_s9m4f_5",tr="_button_1d3iq_1 _ds-button_s9m4f_1",er="_card_1d3iq_1",nr="_group_1d3iq_1",or="_chip_1d3iq_1 _ds-chip_s9m4f_5",ir="_details_1d3iq_1 _ds-details_s9m4f_3",rr="_dialog_1d3iq_1 _ds-dialog_s9m4f_5",ar="__drawer_1d3iq_1",sr="_divider_1d3iq_1",lr="_errorsummary_1d3iq_1 _ds-error-summary_s9m4f_5",cr="_field_1d3iq_1 _ds-field_s9m4f_1",dr="_suggestion_1d3iq_1 _ds-suggestion_s9m4f_5",ur="_affixes_1d3iq_1 _ds-field-affixes_s9m4f_3",mr="_fieldset_1d3iq_1 _ds-fieldset_s9m4f_3",pr="_fileupload_1d3iq_1",fr="_helptext_1d3iq_1 _ds-focus_s9m4f_1",hr="_input_1d3iq_1 _ds-input_s9m4f_1",gr="_law_1d3iq_1",vr="_grid_1d3iq_1",br="_flex_1d3iq_1",wr="_link_1d3iq_1",yr="_logo_1d3iq_1",xr="__logo_1d3iq_1",Sr="_pagination_1d3iq_1 _ds-pagination_s9m4f_5",Er="_popover_1d3iq_1 _ds-popover_s9m4f_3",kr="_progress_1d3iq_1",Tr="__indeterminate_1d3iq_1",Ar="_skeleton_1d3iq_1 _ds-skeleton_s9m4f_5",Lr="__skeleton_1d3iq_1",Cr="_spinner_1d3iq_1",Or="_steps_1d3iq_1",Mr="_table_1d3iq_1 _ds-table_s9m4f_5",Ir="__scrollShadow_1d3iq_1",Rr="_tabs_1d3iq_1 _ds-tabs_s9m4f_5",Nr="__scrollMask_1d3iq_1",qr="_tag_1d3iq_1 _ds-tag_s9m4f_5",Pr="_toast_1d3iq_1",Wr="__toastClose_1d3iq_1",Vr="__toastOpen_1d3iq_1",Ur="__toastTimeout_1d3iq_1",Dr="_togglegroup_1d3iq_1 _ds-toggle-group_s9m4f_5",zr="__tooltip_1d3iq_1 _ds-tooltip_s9m4f_5",Fr="_heading_1d3iq_1 _ds-heading_s9m4f_1",Br="_ingress_1d3iq_1",Gr="_muted_1d3iq_1",Hr="_info_1d3iq_1",Jr="_prose_1d3iq_1",Xr="_validation_1d3iq_1 _ds-validation-message_s9m4f_1",jr="_body_1d3iq_161",Zr="__checked_1d3iq_1",C={alert:Zi,app:Ki,sticky:Yi,avatar:Qi,badge:_i,breadcrumbs:$i,button:tr,card:er,group:nr,chip:or,details:ir,dialog:rr,_drawer:ar,divider:sr,errorsummary:lr,field:cr,suggestion:dr,affixes:ur,fieldset:mr,fileupload:pr,helptext:fr,input:hr,law:gr,grid:vr,flex:br,link:wr,logo:yr,_logo:xr,pagination:Sr,popover:Er,progress:kr,_indeterminate:Tr,skeleton:Ar,_skeleton:Lr,spinner:Cr,steps:Or,table:Mr,_scrollShadow:Ir,tabs:Rr,_scrollMask:Nr,tag:qr,toast:Pr,_toastClose:Wr,_toastOpen:Vr,_toastTimeout:Ur,togglegroup:Dr,_tooltip:zr,heading:Fr,ingress:Br,muted:Gr,info:Hr,prose:Jr,validation:Xr,body:jr,_checked:Zr},mc=Object.freeze(Object.defineProperty({__proto__:null,_checked:Zr,_drawer:ar,_indeterminate:Tr,_logo:xr,_scrollMask:Nr,_scrollShadow:Ir,_skeleton:Lr,_toastClose:Wr,_toastOpen:Vr,_toastTimeout:Ur,_tooltip:zr,affixes:ur,alert:Zi,app:Ki,avatar:Qi,badge:_i,body:jr,breadcrumbs:$i,button:tr,card:er,chip:or,default:C,details:ir,dialog:rr,divider:sr,errorsummary:lr,field:cr,fieldset:mr,fileupload:pr,flex:br,grid:vr,group:nr,heading:Fr,helptext:fr,info:Hr,ingress:Br,input:hr,law:gr,link:wr,logo:yr,muted:Gr,pagination:Sr,popover:Er,progress:kr,prose:Jr,skeleton:Ar,spinner:Cr,steps:Or,sticky:Yi,suggestion:dr,table:Mr,tabs:Rr,tag:qr,toast:Pr,togglegroup:Dr,validation:Xr},Symbol.toStringTag,{value:"Module"}));function Kr(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Kr(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function pc(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Kr(t))&&(o&&(o+=" "),o+=e);return o}const Ht={capture:!0,passive:!0},J=()=>typeof window<"u"&&typeof document<"u",bt=t=>J()?document.getElementsByClassName(C[t].split(" ")[0]):[];function Rt(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const v=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),R=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>Yr(t,...e)},Yr=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},it=(t,e)=>{if(!J())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const n=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(o=>o()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?R(window,"load",n):document.fonts?.ready?.then(n)||setTimeout(n,0)},Ne=(t,e,n)=>{let o=0;const i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{o||(o=requestAnimationFrame(i))});return a.observe(t,n),i(),r},M=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))v(o,i,r);return o},fc=typeof HTMLElement>"u"?class{}:HTMLElement,hc=(t,e)=>!J()||window.customElements.get(t)||window.customElements.define(t,e),gc=typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets,vc=(t,e)=>{if(!gc)return;t.shadowRoot||t.attachShadow({mode:"open"}).append(M("slot"));const n=new CSSStyleSheet;n.replaceSync(e),t.shadowRoot.adoptedStyleSheets=[n]},bc=`[data-command="toggle-app-expanded"],.${C.app.split(" ")[0]} > [command="show-modal"]`,wc=`.${C.breadcrumbs.split(" ")[0]}`,yc=`.${C.card.split(" ")[0]}`,Qr=`.${C.chip.split(" ")[0]}`,xc=`.${C.helptext.split(" ")[0]}`,Sc=`.${C.pagination.split(" ")[0]}`,Ec='summary,u-summary,a,button,[role="tab"],[role="button"]',zn="mattilsynet.matomo.cloud",kc=["setCustomUrl","setDocumentTitle","setReferrerUrl"],X="mtds-analytics-banner",Tc="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function _r(t,e={}){if(J()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${zn}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&Ac();const a=r?`https://cdn.matomo.cloud/${zn}/container_${r}.js`:`https://cdn.matomo.cloud/${zn}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(M("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;kc.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function Ac(){if(document.getElementById(X)||window.localStorage.getItem(X))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${X}" data-analytics="ignore"><style>
|
|
200
200
|
#${X}[open] { box-sizing: border-box; display: flex; align-items: center; background: #116e6b; border-radius: .5em; border: 0; box-shadow: 0 .25em .5em rgba(0,0,0,.3); color: #fff; font-size: .875em; inset: auto auto 1em 1em; max-width: calc(100vw - 2em); outline: 0; padding: .5em; position: fixed; z-index: 99999 }
|
|
201
201
|
#${X} button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; width: 1.5em; height: 1.5em; font: 300 1.5em/1.35 sans-serif; border-radius: .25em; place-content: center; transition: .2s; transition-property: background, scale }
|
|
202
202
|
#${X} button:focus-visible { outline: 2px solid }
|
package/mtds/package.json.js
CHANGED