@sikt/sds-footer 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.css.map +1 -1
- package/dist/cjs/index.d.ts +2 -5
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +2 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
package/dist/cjs/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.sds-
|
|
1
|
+
.sds-footer{background-color:var(--sds-color-layout-background-default);color:var(--sds-color-text-primary);min-height:100px}.sds-footer__content{grid-gap:var(--sds-space-gap-large);display:flex;flex-flow:column;grid-template-columns:auto;justify-content:space-between;margin:0 auto;max-width:var(--sds-space-grid-max-width);padding:var(--sds-space-padding-large)}@media (width >= 720px){.sds-footer__content{flex-flow:row}}.sds-footer__logo-link.sds-typography-link{background-color:unset;color:inherit;display:inline-flex;text-decoration:none}
|
|
2
2
|
/*# sourceMappingURL=index.css.map */
|
package/dist/cjs/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["footer.pcss"],"names":[],"mappings":"AAEA,YACE,2DAA4D,CAC5D,mCAAoC,CACpC,gBAuBF,CArBE,qBAGE,mCAAoC,CAFpC,YAAa,CACb,gBAAiB,CAEjB,0BAA2B,CAC3B,6BAA8B,CAC9B,aAAc,CACd,yCAA0C,CAC1C,sCAKF,CAHE,wBAVF,qBAWI,aAEJ,CADE,CAGF,2CACE,sBAAuB,CACvB,aAAc,CACd,mBAAoB,CACpB,oBACF","file":"index.css","sourcesContent":["@import url(\"@sikt/sds-tokens/dist/css/custom-media.css\");\n\n.sds-footer {\n background-color: var(--sds-color-layout-background-default);\n color: var(--sds-color-text-primary);\n min-height: 100px;\n\n &__content {\n display: flex;\n flex-flow: column;\n grid-gap: var(--sds-space-gap-large);\n grid-template-columns: auto;\n justify-content: space-between;\n margin: 0 auto;\n max-width: var(--sds-space-grid-max-width);\n padding: var(--sds-space-padding-large);\n\n @media (--sds-base-breakpoint-tablet) {\n flex-flow: row;\n }\n }\n\n &__logo-link.sds-typography-link {\n background-color: unset;\n color: inherit;\n display: inline-flex;\n text-decoration: none;\n }\n}\n"]}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HTMLAttributes, ReactNode } from "react";
|
|
3
|
-
|
|
4
|
-
className?: string;
|
|
5
|
-
lang?: "nb" | "nn" | "en" | "se" | "smj" | "sma" | "fkv";
|
|
6
|
-
}
|
|
3
|
+
import { LogoProps } from "@sikt/sds-logo";
|
|
7
4
|
interface FooterProps extends HTMLAttributes<HTMLElement> {
|
|
8
5
|
className?: string;
|
|
9
6
|
children?: ReactNode;
|
|
10
7
|
lang?: LogoProps["lang"];
|
|
11
8
|
logoHref?: string;
|
|
12
9
|
}
|
|
13
|
-
declare const Footer: ({ children, className, lang, logoHref, ...rest }: FooterProps) => JSX.Element;
|
|
10
|
+
declare const Footer: ({ children, className, lang, logoHref, ...rest }: FooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
11
|
export type { FooterProps };
|
|
15
12
|
export { Footer };
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("clsx");function
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("clsx"),s=require("react");function n(e){var r=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}})),r.default=e,Object.freeze(r)}var t=n(s);const a=s.forwardRef((({children:s,className:n,isExternal:t,noIcon:a,...l},o)=>e.jsx("a",{ref:o,className:r("sds-typography-link",t&&"sds-typography-link--external",a&&"sds-typography-link--no-icon",n),...l,children:s})));var l,o;function c(){return c=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},c.apply(this,arguments)}a.displayName="Link";const i=e=>t.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 75 48"},e),l||(l=t.createElement("g",{fill:"currentColor",clipPath:"url(#Logo_svg__a)"},t.createElement("path",{d:"M52.262 1.63c-6.493 0-12.331 2.769-16.409 7.175l9.998 9.998c2.865 2.864 2.865 7.53 0 10.394l-9.998 9.998c4.092 4.406 9.93 7.175 16.409 7.175 12.358 0 22.37-10.012 22.37-22.37S64.62 1.63 52.262 1.63z"}),t.createElement("path",{d:"M29.893 24a22.277 22.277 0 0 1 5.96-15.195l-6.656-6.656c-2.864-2.865-7.53-2.865-10.394 0L2.148 18.804c-2.864 2.864-2.864 7.529 0 10.394l16.655 16.655c2.865 2.864 7.53 2.864 10.394 0l6.657-6.657a22.214 22.214 0 0 1-5.961-15.195z"}))),o||(o=t.createElement("defs",null,t.createElement("clipPath",{id:"Logo_svg__a"},t.createElement("path",{fill:"currentColor",d:"M0 0h75v48H0z"}))))),d={nb:"Kunnskapssektorens<br /> tjenesteleverandør",nn:"Kunnskapssektorens<br /> tenesteleverandør",en:"Norwegian Agency for Shared<br /> Services in Education and Research",se:"Máhttosuorggi<br /> bálvaluslágideaddji",smj:"Máhtudaksuorge<br /> dievnastusbuvtadadiddje",sma:"Maahtoesuerkien<br /> dïenesjedeellije",fkv:"Tietosektorin<br /> palvelu"},u=({variant:s="primary",className:n,lang:t="nb",...a})=>{const l="secondary"===s;return e.jsxs("div",{className:r("sds-logo",`sds-logo--${s}`,n),...a,children:[e.jsx(i,{className:"sds-logo__icon","aria-hidden":!0}),e.jsxs("div",{children:[e.jsx("div",{className:"sds-logo__title",children:"Sikt"}),l&&e.jsx("div",{className:"sds-logo__subtitle",dangerouslySetInnerHTML:{__html:d[t]}})]})]})};exports.Footer=({children:s,className:n,lang:t="nb",logoHref:l="//sikt.no",...o})=>{const c=e.jsx(u,{variant:"secondary",lang:t});return e.jsx("footer",{className:r("sds-footer",n),"data-color-scheme":"dark",...o,children:e.jsxs("div",{className:"sds-footer__content",children:[e.jsx("div",{children:l?e.jsx(a,{href:l,className:"sds-footer__logo-link",children:c}):c}),s]})})};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../core/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../core/dist/index.js","../../../logo/dist/index.js","../../Footer.tsx"],"sourcesContent":["import{jsx as e,jsxs as s}from\"react/jsx-runtime\";import a,{clsx as r}from\"clsx\";import{Children as l,isValidElement as i,cloneElement as c,forwardRef as n}from\"react\";const d=({children:s,className:r,title:l,...i})=>e(\"abbr\",{className:a(\"sds-typography-abbr\",r),tabIndex:0,\"data-title\":l,\"aria-label\":l,...i,children:s}),o=({children:a,aspectRatio:n,figCaption:d,...o})=>s(\"figure\",{className:\"sds-figure\",...o,children:[l.map(a,(e=>{if(i(e))return(e=>{const s={className:r(\"sds-figure__figure\",\"16x9\"===n&&\"sds-figure__figure--ratio-16x9\",e.props.className)};return c(e,s)})(e)})),d&&e(\"figcaption\",{className:\"sds-figure__caption\",children:d})]}),t=({children:s,level:r,variant:l,className:i,...c})=>e(`h${r}`,{className:a(\"sds-typography-heading\",`sds-typography-heading--${l}`,i),...c,children:s}),p=e=>t({...e,level:\"1\"}),h=e=>t({...e,level:\"2\"}),m=e=>t({...e,level:\"3\"}),y=e=>t({...e,level:\"4\"}),g=e=>t({...e,level:\"5\"}),f=e=>t({...e,level:\"6\"}),N=({children:s,variant:r=\"regular\",modifier:l,className:i,as:c=\"p\",...n})=>e(c,{className:a(\"sds-typography-body\",`sds-typography-body--${r}`,l&&`sds-typography-body--${l}`,i),...n,children:s}),u=n((({children:s,className:r,isExternal:l,noIcon:i,...c},n)=>e(\"a\",{ref:n,className:a(\"sds-typography-link\",l&&\"sds-typography-link--external\",i&&\"sds-typography-link--no-icon\",r),...c,children:s})));u.displayName=\"Link\";const b=({children:s,className:r,isFocusable:l,...i})=>e(\"span\",{className:a(\"sds-screen-reader-only\",l&&\"sds-screen-reader-only--focusable\",r),...i,children:s});export{d as Abbreviation,o as Figure,t as Heading,p as Heading1,h as Heading2,m as Heading3,y as Heading4,g as Heading5,f as Heading6,u as Link,N as Paragraph,b as ScreenReaderOnly};\n//# sourceMappingURL=index.js.map\n","import{jsxs as e,jsx as r}from\"react/jsx-runtime\";import t from\"clsx\";import*as a from\"react\";var n,s;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},l.apply(this,arguments)}const o=e=>a.createElement(\"svg\",l({xmlns:\"http://www.w3.org/2000/svg\",fill:\"none\",viewBox:\"0 0 75 48\"},e),n||(n=a.createElement(\"g\",{fill:\"currentColor\",clipPath:\"url(#Logo_svg__a)\"},a.createElement(\"path\",{d:\"M52.262 1.63c-6.493 0-12.331 2.769-16.409 7.175l9.998 9.998c2.865 2.864 2.865 7.53 0 10.394l-9.998 9.998c4.092 4.406 9.93 7.175 16.409 7.175 12.358 0 22.37-10.012 22.37-22.37S64.62 1.63 52.262 1.63z\"}),a.createElement(\"path\",{d:\"M29.893 24a22.277 22.277 0 0 1 5.96-15.195l-6.656-6.656c-2.864-2.865-7.53-2.865-10.394 0L2.148 18.804c-2.864 2.864-2.864 7.529 0 10.394l16.655 16.655c2.865 2.864 7.53 2.864 10.394 0l6.657-6.657a22.214 22.214 0 0 1-5.961-15.195z\"}))),s||(s=a.createElement(\"defs\",null,a.createElement(\"clipPath\",{id:\"Logo_svg__a\"},a.createElement(\"path\",{fill:\"currentColor\",d:\"M0 0h75v48H0z\"}))))),i={nb:\"Kunnskapssektorens<br /> tjenesteleverandør\",nn:\"Kunnskapssektorens<br /> tenesteleverandør\",en:\"Norwegian Agency for Shared<br /> Services in Education and Research\",se:\"Máhttosuorggi<br /> bálvaluslágideaddji\",smj:\"Máhtudaksuorge<br /> dievnastusbuvtadadiddje\",sma:\"Maahtoesuerkien<br /> dïenesjedeellije\",fkv:\"Tietosektorin<br /> palvelu\"},c=({variant:a=\"primary\",className:n,lang:s=\"nb\",...l})=>{const c=\"secondary\"===a;return e(\"div\",{className:t(\"sds-logo\",`sds-logo--${a}`,n),...l,children:[r(o,{className:\"sds-logo__icon\",\"aria-hidden\":!0}),e(\"div\",{children:[r(\"div\",{className:\"sds-logo__title\",children:\"Sikt\"}),c&&r(\"div\",{className:\"sds-logo__subtitle\",dangerouslySetInnerHTML:{__html:i[s]}})]})]})};export{c as Logo};\n//# sourceMappingURL=index.js.map\n","import React, { HTMLAttributes, ReactNode } from \"react\";\nimport clsx from \"clsx\";\nimport { Link } from \"@sikt/sds-core\";\nimport { Logo, LogoProps } from \"@sikt/sds-logo\";\nimport \"./footer.pcss\";\n\nexport interface FooterProps extends HTMLAttributes<HTMLElement> {\n className?: string;\n children?: ReactNode;\n lang?: LogoProps[\"lang\"];\n logoHref?: string;\n}\n\nexport const Footer = ({\n children,\n className,\n lang = \"nb\",\n logoHref = \"//sikt.no\",\n ...rest\n}: FooterProps) => {\n const logoElement = <Logo variant=\"secondary\" lang={lang} />;\n\n return (\n <footer\n className={clsx(\"sds-footer\", className)}\n data-color-scheme=\"dark\"\n {...rest}\n >\n <div className=\"sds-footer__content\">\n <div>\n {logoHref ? (\n <Link href={logoHref} className=\"sds-footer__logo-link\">\n {logoElement}\n </Link>\n ) : (\n logoElement\n )}\n </div>\n {children}\n </div>\n </footer>\n );\n};\n"],"names":["u","n","forwardRef","children","s","className","r","isExternal","l","noIcon","i","c","e","ref","a","Object","assign","bind","arguments","length","t","prototype","hasOwnProperty","call","apply","this","displayName","o","createElement","xmlns","fill","viewBox","clipPath","d","id","nb","nn","en","se","smj","sma","fkv","variant","lang","jsx","dangerouslySetInnerHTML","__html","logoHref","rest","logoElement","_jsx","Logo","clsx","_jsxs","Link","href"],"mappings":"mWAA8K,MAA88BA,EAAEC,EAACC,YAAA,EAAIC,SAASC,EAAEC,UAAUC,EAAEC,WAAWC,EAAEC,OAAOC,KAAKC,GAAGV,IAAIW,MAAE,IAAI,CAACC,IAAIZ,EAAEI,UAAUS,EAAE,sBAAsBN,GAAG,gCAAgCE,GAAG,+BAA+BJ,MAAMK,EAAER,SAASC,MCAjuC,IAAIH,EAAEG,EAAE,SAASI,IAAI,OAAOA,EAAEO,OAAOC,OAAOD,OAAOC,OAAOC,OAAO,SAASL,GAAG,IAAI,IAAIN,EAAE,EAAEA,EAAEY,UAAUC,OAAOb,IAAI,CAAC,IAAIc,EAAEF,UAAUZ,GAAG,IAAI,IAAIQ,KAAKM,EAAEL,OAAOM,UAAUC,eAAeC,KAAKH,EAAEN,KAAKF,EAAEE,GAAGM,EAAEN,GAAI,CAAA,OAAOF,GAAGJ,EAAEgB,MAAMC,KAAKP,UAAW,CDA2/BlB,EAAE0B,YAAY,OCAzgC,MAAMC,EAAEf,GAAGE,EAAEc,cAAc,MAAMpB,EAAE,CAACqB,MAAM,6BAA6BC,KAAK,OAAOC,QAAQ,aAAanB,GAAGX,IAAIA,EAAEa,EAAEc,cAAc,IAAI,CAACE,KAAK,eAAeE,SAAS,qBAAqBlB,EAAEc,cAAc,OAAO,CAACK,EAAE,2MAA2MnB,EAAEc,cAAc,OAAO,CAACK,EAAE,0OAA0O7B,IAAIA,EAAEU,EAAEc,cAAc,OAAO,KAAKd,EAAEc,cAAc,WAAW,CAACM,GAAG,eAAepB,EAAEc,cAAc,OAAO,CAACE,KAAK,eAAeG,EAAE,sBAAsBvB,EAAE,CAACyB,GAAG,8CAA8CC,GAAG,6CAA6CC,GAAG,uEAAuEC,GAAG,0CAA0CC,IAAI,+CAA+CC,IAAI,yCAAyCC,IAAI,+BAA+B9B,EAAE,EAAE+B,QAAQ5B,EAAE,UAAUT,UAAUJ,EAAE0C,KAAKvC,EAAE,QAAQI,MAAM,MAAMG,EAAE,cAAcG,EAAE,OAAOF,EAAAA,KAAE,MAAM,CAACP,UAAUe,EAAE,WAAW,aAAaN,IAAIb,MAAMO,EAAEL,SAAS,CAACG,EAAAA,IAAEqB,EAAE,CAACtB,UAAU,iBAAiB,eAAc,IAAKO,EAAAA,KAAE,MAAM,CAACT,SAAS,CAACG,EAACsC,IAAC,MAAM,CAACvC,UAAU,kBAAkBF,SAAS,SAASQ,GAAGL,MAAE,MAAM,CAACD,UAAU,qBAAqBwC,wBAAwB,CAACC,OAAOpC,EAAEN,WAAW,iBCavzD,EACpBD,WACAE,YACAsC,OAAO,KACPI,WAAW,eACRC,MAEH,MAAMC,EAAcC,EAACN,IAAAO,EAAK,CAAAT,QAAQ,YAAYC,KAAMA,IAEpD,OACEO,EAAAA,IACE,SAAA,CAAA7C,UAAW+C,EAAK,aAAc/C,GACZ,oBAAA,UACd2C,EAAI7C,SAERkD,OAAK,MAAA,CAAAhD,UAAU,gCACb6C,EAAAA,IACG,MAAA,CAAA/C,SAAA4C,EACCG,MAACI,EAAI,CAACC,KAAMR,EAAU1C,UAAU,wBAC7BF,SAAA8C,IACI,IAKV9C,MAGL"}
|
package/dist/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.sds-
|
|
1
|
+
.sds-footer{background-color:var(--sds-color-layout-background-default);color:var(--sds-color-text-primary);min-height:100px}.sds-footer__content{grid-gap:var(--sds-space-gap-large);display:flex;flex-flow:column;grid-template-columns:auto;justify-content:space-between;margin:0 auto;max-width:var(--sds-space-grid-max-width);padding:var(--sds-space-padding-large)}@media (width >= 720px){.sds-footer__content{flex-flow:row}}.sds-footer__logo-link.sds-typography-link{background-color:unset;color:inherit;display:inline-flex;text-decoration:none}
|
|
2
2
|
/*# sourceMappingURL=index.css.map */
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["footer.pcss"],"names":[],"mappings":"AAEA,YACE,2DAA4D,CAC5D,mCAAoC,CACpC,gBAuBF,CArBE,qBAGE,mCAAoC,CAFpC,YAAa,CACb,gBAAiB,CAEjB,0BAA2B,CAC3B,6BAA8B,CAC9B,aAAc,CACd,yCAA0C,CAC1C,sCAKF,CAHE,wBAVF,qBAWI,aAEJ,CADE,CAGF,2CACE,sBAAuB,CACvB,aAAc,CACd,mBAAoB,CACpB,oBACF","file":"index.css","sourcesContent":["@import url(\"@sikt/sds-tokens/dist/css/custom-media.css\");\n\n.sds-footer {\n background-color: var(--sds-color-layout-background-default);\n color: var(--sds-color-text-primary);\n min-height: 100px;\n\n &__content {\n display: flex;\n flex-flow: column;\n grid-gap: var(--sds-space-gap-large);\n grid-template-columns: auto;\n justify-content: space-between;\n margin: 0 auto;\n max-width: var(--sds-space-grid-max-width);\n padding: var(--sds-space-padding-large);\n\n @media (--sds-base-breakpoint-tablet) {\n flex-flow: row;\n }\n }\n\n &__logo-link.sds-typography-link {\n background-color: unset;\n color: inherit;\n display: inline-flex;\n text-decoration: none;\n }\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HTMLAttributes, ReactNode } from "react";
|
|
3
|
-
|
|
4
|
-
className?: string;
|
|
5
|
-
lang?: "nb" | "nn" | "en" | "se" | "smj" | "sma" | "fkv";
|
|
6
|
-
}
|
|
3
|
+
import { LogoProps } from "@sikt/sds-logo";
|
|
7
4
|
interface FooterProps extends HTMLAttributes<HTMLElement> {
|
|
8
5
|
className?: string;
|
|
9
6
|
children?: ReactNode;
|
|
10
7
|
lang?: LogoProps["lang"];
|
|
11
8
|
logoHref?: string;
|
|
12
9
|
}
|
|
13
|
-
declare const Footer: ({ children, className, lang, logoHref, ...rest }: FooterProps) => JSX.Element;
|
|
10
|
+
declare const Footer: ({ children, className, lang, logoHref, ...rest }: FooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
11
|
export type { FooterProps };
|
|
15
12
|
export { Footer };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import a from"clsx";import*as s from"react";import{forwardRef as n}from"react";const t=n((({children:r,className:s,isExternal:n,noIcon:t,...l},o)=>e("a",{ref:o,className:a("sds-typography-link",n&&"sds-typography-link--external",t&&"sds-typography-link--no-icon",s),...l,children:r})));var l,o;function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},i.apply(this,arguments)}t.displayName="Link";const c=e=>s.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 75 48"},e),l||(l=s.createElement("g",{fill:"currentColor",clipPath:"url(#Logo_svg__a)"},s.createElement("path",{d:"M52.262 1.63c-6.493 0-12.331 2.769-16.409 7.175l9.998 9.998c2.865 2.864 2.865 7.53 0 10.394l-9.998 9.998c4.092 4.406 9.93 7.175 16.409 7.175 12.358 0 22.37-10.012 22.37-22.37S64.62 1.63 52.262 1.63z"}),s.createElement("path",{d:"M29.893 24a22.277 22.277 0 0 1 5.96-15.195l-6.656-6.656c-2.864-2.865-7.53-2.865-10.394 0L2.148 18.804c-2.864 2.864-2.864 7.529 0 10.394l16.655 16.655c2.865 2.864 7.53 2.864 10.394 0l6.657-6.657a22.214 22.214 0 0 1-5.961-15.195z"}))),o||(o=s.createElement("defs",null,s.createElement("clipPath",{id:"Logo_svg__a"},s.createElement("path",{fill:"currentColor",d:"M0 0h75v48H0z"}))))),d={nb:"Kunnskapssektorens<br /> tjenesteleverandør",nn:"Kunnskapssektorens<br /> tenesteleverandør",en:"Norwegian Agency for Shared<br /> Services in Education and Research",se:"Máhttosuorggi<br /> bálvaluslágideaddji",smj:"Máhtudaksuorge<br /> dievnastusbuvtadadiddje",sma:"Maahtoesuerkien<br /> dïenesjedeellije",fkv:"Tietosektorin<br /> palvelu"},m=({variant:s="primary",className:n,lang:t="nb",...l})=>{const o="secondary"===s;return r("div",{className:a("sds-logo",`sds-logo--${s}`,n),...l,children:[e(c,{className:"sds-logo__icon","aria-hidden":!0}),r("div",{children:[e("div",{className:"sds-logo__title",children:"Sikt"}),o&&e("div",{className:"sds-logo__subtitle",dangerouslySetInnerHTML:{__html:d[t]}})]})]})},h=({children:s,className:n,lang:l="nb",logoHref:o="//sikt.no",...i})=>{const c=e(m,{variant:"secondary",lang:l});return e("footer",{className:a("sds-footer",n),"data-color-scheme":"dark",...i,children:r("div",{className:"sds-footer__content",children:[e("div",{children:o?e(t,{href:o,className:"sds-footer__logo-link",children:c}):c}),s]})})};export{h as Footer};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../core/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../core/dist/index.js","../../logo/dist/index.js","../Footer.tsx"],"sourcesContent":["import{jsx as e,jsxs as s}from\"react/jsx-runtime\";import a,{clsx as r}from\"clsx\";import{Children as l,isValidElement as i,cloneElement as c,forwardRef as n}from\"react\";const d=({children:s,className:r,title:l,...i})=>e(\"abbr\",{className:a(\"sds-typography-abbr\",r),tabIndex:0,\"data-title\":l,\"aria-label\":l,...i,children:s}),o=({children:a,aspectRatio:n,figCaption:d,...o})=>s(\"figure\",{className:\"sds-figure\",...o,children:[l.map(a,(e=>{if(i(e))return(e=>{const s={className:r(\"sds-figure__figure\",\"16x9\"===n&&\"sds-figure__figure--ratio-16x9\",e.props.className)};return c(e,s)})(e)})),d&&e(\"figcaption\",{className:\"sds-figure__caption\",children:d})]}),t=({children:s,level:r,variant:l,className:i,...c})=>e(`h${r}`,{className:a(\"sds-typography-heading\",`sds-typography-heading--${l}`,i),...c,children:s}),p=e=>t({...e,level:\"1\"}),h=e=>t({...e,level:\"2\"}),m=e=>t({...e,level:\"3\"}),y=e=>t({...e,level:\"4\"}),g=e=>t({...e,level:\"5\"}),f=e=>t({...e,level:\"6\"}),N=({children:s,variant:r=\"regular\",modifier:l,className:i,as:c=\"p\",...n})=>e(c,{className:a(\"sds-typography-body\",`sds-typography-body--${r}`,l&&`sds-typography-body--${l}`,i),...n,children:s}),u=n((({children:s,className:r,isExternal:l,noIcon:i,...c},n)=>e(\"a\",{ref:n,className:a(\"sds-typography-link\",l&&\"sds-typography-link--external\",i&&\"sds-typography-link--no-icon\",r),...c,children:s})));u.displayName=\"Link\";const b=({children:s,className:r,isFocusable:l,...i})=>e(\"span\",{className:a(\"sds-screen-reader-only\",l&&\"sds-screen-reader-only--focusable\",r),...i,children:s});export{d as Abbreviation,o as Figure,t as Heading,p as Heading1,h as Heading2,m as Heading3,y as Heading4,g as Heading5,f as Heading6,u as Link,N as Paragraph,b as ScreenReaderOnly};\n//# sourceMappingURL=index.js.map\n","import{jsxs as e,jsx as r}from\"react/jsx-runtime\";import t from\"clsx\";import*as a from\"react\";var n,s;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},l.apply(this,arguments)}const o=e=>a.createElement(\"svg\",l({xmlns:\"http://www.w3.org/2000/svg\",fill:\"none\",viewBox:\"0 0 75 48\"},e),n||(n=a.createElement(\"g\",{fill:\"currentColor\",clipPath:\"url(#Logo_svg__a)\"},a.createElement(\"path\",{d:\"M52.262 1.63c-6.493 0-12.331 2.769-16.409 7.175l9.998 9.998c2.865 2.864 2.865 7.53 0 10.394l-9.998 9.998c4.092 4.406 9.93 7.175 16.409 7.175 12.358 0 22.37-10.012 22.37-22.37S64.62 1.63 52.262 1.63z\"}),a.createElement(\"path\",{d:\"M29.893 24a22.277 22.277 0 0 1 5.96-15.195l-6.656-6.656c-2.864-2.865-7.53-2.865-10.394 0L2.148 18.804c-2.864 2.864-2.864 7.529 0 10.394l16.655 16.655c2.865 2.864 7.53 2.864 10.394 0l6.657-6.657a22.214 22.214 0 0 1-5.961-15.195z\"}))),s||(s=a.createElement(\"defs\",null,a.createElement(\"clipPath\",{id:\"Logo_svg__a\"},a.createElement(\"path\",{fill:\"currentColor\",d:\"M0 0h75v48H0z\"}))))),i={nb:\"Kunnskapssektorens<br /> tjenesteleverandør\",nn:\"Kunnskapssektorens<br /> tenesteleverandør\",en:\"Norwegian Agency for Shared<br /> Services in Education and Research\",se:\"Máhttosuorggi<br /> bálvaluslágideaddji\",smj:\"Máhtudaksuorge<br /> dievnastusbuvtadadiddje\",sma:\"Maahtoesuerkien<br /> dïenesjedeellije\",fkv:\"Tietosektorin<br /> palvelu\"},c=({variant:a=\"primary\",className:n,lang:s=\"nb\",...l})=>{const c=\"secondary\"===a;return e(\"div\",{className:t(\"sds-logo\",`sds-logo--${a}`,n),...l,children:[r(o,{className:\"sds-logo__icon\",\"aria-hidden\":!0}),e(\"div\",{children:[r(\"div\",{className:\"sds-logo__title\",children:\"Sikt\"}),c&&r(\"div\",{className:\"sds-logo__subtitle\",dangerouslySetInnerHTML:{__html:i[s]}})]})]})};export{c as Logo};\n//# sourceMappingURL=index.js.map\n","import React, { HTMLAttributes, ReactNode } from \"react\";\nimport clsx from \"clsx\";\nimport { Link } from \"@sikt/sds-core\";\nimport { Logo, LogoProps } from \"@sikt/sds-logo\";\nimport \"./footer.pcss\";\n\nexport interface FooterProps extends HTMLAttributes<HTMLElement> {\n className?: string;\n children?: ReactNode;\n lang?: LogoProps[\"lang\"];\n logoHref?: string;\n}\n\nexport const Footer = ({\n children,\n className,\n lang = \"nb\",\n logoHref = \"//sikt.no\",\n ...rest\n}: FooterProps) => {\n const logoElement = <Logo variant=\"secondary\" lang={lang} />;\n\n return (\n <footer\n className={clsx(\"sds-footer\", className)}\n data-color-scheme=\"dark\"\n {...rest}\n >\n <div className=\"sds-footer__content\">\n <div>\n {logoHref ? (\n <Link href={logoHref} className=\"sds-footer__logo-link\">\n {logoElement}\n </Link>\n ) : (\n logoElement\n )}\n </div>\n {children}\n </div>\n </footer>\n );\n};\n"],"names":["u","n","children","s","className","r","isExternal","l","noIcon","i","c","e","ref","a","Object","assign","bind","arguments","length","t","prototype","hasOwnProperty","call","apply","this","displayName","o","createElement","xmlns","fill","viewBox","clipPath","d","id","nb","nn","en","se","smj","sma","fkv","variant","lang","dangerouslySetInnerHTML","__html","Footer","logoHref","rest","logoElement","_jsx","Logo","clsx","_jsxs","Link","href"],"mappings":"iIAA8K,MAA88BA,EAAEC,GAAC,EAAIC,SAASC,EAAEC,UAAUC,EAAEC,WAAWC,EAAEC,OAAOC,KAAKC,GAAGT,IAAIU,EAAE,IAAI,CAACC,IAAIX,EAAEG,UAAUS,EAAE,sBAAsBN,GAAG,gCAAgCE,GAAG,+BAA+BJ,MAAMK,EAAER,SAASC,MCAjuC,IAAIF,EAAEE,EAAE,SAASI,IAAI,OAAOA,EAAEO,OAAOC,OAAOD,OAAOC,OAAOC,OAAO,SAASL,GAAG,IAAI,IAAIN,EAAE,EAAEA,EAAEY,UAAUC,OAAOb,IAAI,CAAC,IAAIc,EAAEF,UAAUZ,GAAG,IAAI,IAAIQ,KAAKM,EAAEL,OAAOM,UAAUC,eAAeC,KAAKH,EAAEN,KAAKF,EAAEE,GAAGM,EAAEN,GAAI,CAAA,OAAOF,GAAGJ,EAAEgB,MAAMC,KAAKP,UAAW,CDA2/BjB,EAAEyB,YAAY,OCAzgC,MAAMC,EAAEf,GAAGE,EAAEc,cAAc,MAAMpB,EAAE,CAACqB,MAAM,6BAA6BC,KAAK,OAAOC,QAAQ,aAAanB,GAAGV,IAAIA,EAAEY,EAAEc,cAAc,IAAI,CAACE,KAAK,eAAeE,SAAS,qBAAqBlB,EAAEc,cAAc,OAAO,CAACK,EAAE,2MAA2MnB,EAAEc,cAAc,OAAO,CAACK,EAAE,0OAA0O7B,IAAIA,EAAEU,EAAEc,cAAc,OAAO,KAAKd,EAAEc,cAAc,WAAW,CAACM,GAAG,eAAepB,EAAEc,cAAc,OAAO,CAACE,KAAK,eAAeG,EAAE,sBAAsBvB,EAAE,CAACyB,GAAG,8CAA8CC,GAAG,6CAA6CC,GAAG,uEAAuEC,GAAG,0CAA0CC,IAAI,+CAA+CC,IAAI,yCAAyCC,IAAI,+BAA+B9B,EAAE,EAAE+B,QAAQ5B,EAAE,UAAUT,UAAUH,EAAEyC,KAAKvC,EAAE,QAAQI,MAAM,MAAMG,EAAE,cAAcG,EAAE,OAAOF,EAAE,MAAM,CAACP,UAAUe,EAAE,WAAW,aAAaN,IAAIZ,MAAMM,EAAEL,SAAS,CAACG,EAAEqB,EAAE,CAACtB,UAAU,iBAAiB,eAAc,IAAKO,EAAE,MAAM,CAACT,SAAS,CAACG,EAAE,MAAM,CAACD,UAAU,kBAAkBF,SAAS,SAASQ,GAAGL,EAAE,MAAM,CAACD,UAAU,qBAAqBuC,wBAAwB,CAACC,OAAOnC,EAAEN,WAAW,ECah0D0C,EAAS,EACpB3C,WACAE,YACAsC,OAAO,KACPI,WAAW,eACRC,MAEH,MAAMC,EAAcC,EAACC,EAAK,CAAAT,QAAQ,YAAYC,KAAMA,IAEpD,OACEO,EACE,SAAA,CAAA7C,UAAW+C,EAAK,aAAc/C,GACZ,oBAAA,UACd2C,EAAI7C,SAERkD,EAAK,MAAA,CAAAhD,UAAU,gCACb6C,EACG,MAAA,CAAA/C,SAAA4C,EACCG,EAACI,EAAI,CAACC,KAAMR,EAAU1C,UAAU,wBAC7BF,SAAA8C,IACI,IAKV9C,MAGL"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sikt/sds-footer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -13,12 +13,14 @@
|
|
|
13
13
|
"build": "rollup -c ../../rollup.config.mjs"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@sikt/sds-core": "^
|
|
16
|
+
"@sikt/sds-core": "^3.0.0",
|
|
17
|
+
"@sikt/sds-logo": "^2.0.0",
|
|
18
|
+
"@sikt/sds-tokens": "^1.0.0"
|
|
17
19
|
},
|
|
18
20
|
"peerDependencies": {
|
|
19
21
|
"@types/react": "^18.0.0",
|
|
20
22
|
"@types/react-dom": "^18.0.0",
|
|
21
|
-
"clsx": "^1.2.
|
|
23
|
+
"clsx": "^1.0.0 || ^2.0.0",
|
|
22
24
|
"react": "^18.0.0",
|
|
23
25
|
"react-dom": "^18.0.0"
|
|
24
26
|
}
|