@oslokommune/punkt-react 5.0.2 → 5.0.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/CHANGELOG.md +37 -0
- package/dist/index.d.ts +1 -0
- package/dist/punkt-react.es.js +2 -1
- package/dist/punkt-react.umd.js +5 -5
- package/package.json +3 -3
- package/src/components/button/Button.tsx +1 -1
- package/src/components/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,43 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [5.0.4](https://github.com/oslokommune/punkt/compare/5.0.3...5.0.4) (2023-06-01)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* Fiks størrelser på ikoner og ikon i knapper (#907).
|
|
18
|
+
* Fiks størrelser på ikoner og visning av ikon i knapper.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Chores
|
|
22
|
+
Ingen
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## [5.0.3](https://github.com/oslokommune/punkt/compare/5.0.2...5.0.3) (2023-06-01)
|
|
28
|
+
|
|
29
|
+
### ⚠ BREAKING CHANGES
|
|
30
|
+
Ingen
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
Ingen
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
* [903](https://github.com/oslokommune/punkt/issues/903) Fiks eksport av icon.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Chores
|
|
40
|
+
Ingen
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
|
|
8
45
|
## [5.0.2](https://github.com/oslokommune/punkt/compare/5.0.1...5.0.2) (2023-05-31)
|
|
9
46
|
|
|
10
47
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { PktButton } from './button/Button';
|
|
|
3
3
|
export { PktFooter } from './footer/Footer';
|
|
4
4
|
export { PktFooterSimple } from './footerSimple/FooterSimple';
|
|
5
5
|
export { PktHeader } from './header/Header';
|
|
6
|
+
export { PktIcon } from './icon/Icon';
|
|
6
7
|
export { PktInput } from './input/Input';
|
|
7
8
|
export { PktLinkCard } from './linkcard/LinkCard';
|
|
8
9
|
export { PktMessagebox } from './messagebox/Messagebox';
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -709,7 +709,7 @@ const N = ({ name: o, path: l, className: i = "", ...c }) => {
|
|
|
709
709
|
k && `pkt-btn--${k}`
|
|
710
710
|
].filter(Boolean).join(" ");
|
|
711
711
|
return /* @__PURE__ */ d("button", { ...h, className: y, type: _, ref: w, children: [
|
|
712
|
-
/* @__PURE__ */ a(N, { className: "pkt-btn__icon", name: i }),
|
|
712
|
+
k !== "label-only" && /* @__PURE__ */ a(N, { className: "pkt-btn__icon", name: i }),
|
|
713
713
|
/* @__PURE__ */ a("span", { className: "pkt-btn__text", children: o }),
|
|
714
714
|
k === "icons-right-and-left" && /* @__PURE__ */ a(N, { className: "pkt-btn__icon", name: c })
|
|
715
715
|
] });
|
|
@@ -1026,6 +1026,7 @@ export {
|
|
|
1026
1026
|
Cr as PktFooter,
|
|
1027
1027
|
Or as PktFooterSimple,
|
|
1028
1028
|
Fr as PktHeader,
|
|
1029
|
+
N as PktIcon,
|
|
1029
1030
|
yr as PktInput,
|
|
1030
1031
|
Er as PktLinkCard,
|
|
1031
1032
|
$r as PktMessagebox,
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(b,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(b=typeof globalThis<"u"?globalThis:b||self,E(b["punkt-react"]={},b.React))})(this,function(b,E){"use strict";function Me(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var z={exports:{}},Y={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
*/var oe;function Le(){return oe||(oe=1,process.env.NODE_ENV!=="production"&&function(){var o=E,l=Symbol.for("react.element"),i=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),k=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),me=Symbol.iterator,tt="@@iterator";function rt(e){if(e===null||typeof e!="object")return null;var t=me&&e[me]||e[tt];return typeof t=="function"?t:null}var I=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];at("error",e,r)}}function at(e,t,r){{var s=I.ReactDebugCurrentFrame,m=s.getStackAddendum();m!==""&&(t+="%s",r=r.concat([m]));var v=r.map(function(p){return String(p)});v.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,v)}}var nt=!1,ot=!1,lt=!1,it=!1,st=!1,he;he=Symbol.for("react.module.reference");function ct(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===n||st||e===f||e===T||e===R||it||e===D||nt||ot||lt||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===j||e.$$typeof===_||e.$$typeof===k||e.$$typeof===h||e.$$typeof===he||e.getModuleId!==void 0))}function ut(e,t,r){var s=e.displayName;if(s)return s;var m=t.displayName||t.name||"";return m!==""?r+"("+m+")":r}function _e(e){return e.displayName||"Context"}function C(e){if(e==null)return null;if(typeof e.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case i:return"Portal";case n:return"Profiler";case f:return"StrictMode";case T:return"Suspense";case R:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case k:var t=e;return _e(t)+".Consumer";case _:var r=e;return _e(r._context)+".Provider";case h:return ut(e,e.render,"ForwardRef");case j:var s=e.displayName||null;return s!==null?s:C(e.type)||"Memo";case S:{var m=e,v=m._payload,p=m._init;try{return C(p(v))}catch{return null}}}return null}var F=Object.assign,$=0,ve,ke,be,ge,Ne,ye,Re;function Ee(){}Ee.__reactDisabledLog=!0;function ft(){{if($===0){ve=console.log,ke=console.info,be=console.warn,ge=console.error,Ne=console.group,ye=console.groupCollapsed,Re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ee,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function pt(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:ve}),info:F({},e,{value:ke}),warn:F({},e,{value:be}),error:F({},e,{value:ge}),group:F({},e,{value:Ne}),groupCollapsed:F({},e,{value:ye}),groupEnd:F({},e,{value:Re})})}$<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var X=I.ReactCurrentDispatcher,Z;function B(e,t,r){{if(Z===void 0)try{throw Error()}catch(m){var s=m.stack.trim().match(/\n( *(at )?)/);Z=s&&s[1]||""}return`
|
|
18
18
|
`+Z+e}}var Q=!1,V;{var dt=typeof WeakMap=="function"?WeakMap:Map;V=new dt}function we(e,t){if(!e||Q)return"";{var r=V.get(e);if(r!==void 0)return r}var s;Q=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var v;v=X.current,X.current=null,ft();try{if(t){var p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(O){s=O}Reflect.construct(e,[],p)}else{try{p.call()}catch(O){s=O}e.call(p.prototype)}}else{try{throw Error()}catch(O){s=O}e()}}catch(O){if(O&&s&&typeof O.stack=="string"){for(var u=O.stack.split(`
|
|
19
19
|
`),P=s.stack.split(`
|
|
20
|
-
`),
|
|
21
|
-
`+u[
|
|
20
|
+
`),g=u.length-1,N=P.length-1;g>=1&&N>=0&&u[g]!==P[N];)N--;for(;g>=1&&N>=0;g--,N--)if(u[g]!==P[N]){if(g!==1||N!==1)do if(g--,N--,N<0||u[g]!==P[N]){var x=`
|
|
21
|
+
`+u[g].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,x),x}while(g>=1&&N>=0);break}}}finally{Q=!1,X.current=v,pt(),Error.prepareStackTrace=m}var W=e?e.displayName||e.name:"",Ye=W?B(W):"";return typeof e=="function"&&V.set(e,Ye),Ye}function mt(e,t,r){return we(e,!1)}function ht(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function U(e,t,r){if(e==null)return"";if(typeof e=="function")return we(e,ht(e));if(typeof e=="string")return B(e);switch(e){case T:return B("Suspense");case R:return B("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case h:return mt(e.render);case j:return U(e.type,t,r);case S:{var s=e,m=s._payload,v=s._init;try{return U(v(m),t,r)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,Pe={},Te=I.ReactDebugCurrentFrame;function G(e){if(e){var t=e._owner,r=U(e.type,e._source,t?t.type:null);Te.setExtraStackFrame(r)}else Te.setExtraStackFrame(null)}function _t(e,t,r,s,m){{var v=Function.call.bind(H);for(var p in e)if(v(e,p)){var u=void 0;try{if(typeof e[p]!="function"){var P=Error((s||"React class")+": "+r+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw P.name="Invariant Violation",P}u=e[p](t,p,s,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(g){u=g}u&&!(u instanceof Error)&&(G(m),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",r,p,typeof u),G(null)),u instanceof Error&&!(u.message in Pe)&&(Pe[u.message]=!0,G(m),w("Failed %s type: %s",r,u.message),G(null))}}}var vt=Array.isArray;function q(e){return vt(e)}function kt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function bt(e){try{return xe(e),!1}catch{return!0}}function xe(e){return""+e}function je(e){if(bt(e))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",kt(e)),xe(e)}var L=I.ReactCurrentOwner,gt={key:!0,ref:!0,__self:!0,__source:!0},Se,Ce,ee;ee={};function Nt(e){if(H.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function yt(e){if(H.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function Rt(e,t){if(typeof e.ref=="string"&&L.current&&t&&L.current.stateNode!==t){var r=C(L.current.type);ee[r]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(L.current.type),e.ref),ee[r]=!0)}}function Et(e,t){{var r=function(){Se||(Se=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function wt(e,t){{var r=function(){Ce||(Ce=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var Pt=function(e,t,r,s,m,v,p){var u={$$typeof:l,type:e,key:t,ref:r,props:p,_owner:v};return u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:m}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function Tt(e,t,r,s,m){{var v,p={},u=null,P=null;r!==void 0&&(je(r),u=""+r),yt(t)&&(je(t.key),u=""+t.key),Nt(t)&&(P=t.ref,Rt(t,m));for(v in t)H.call(t,v)&&!gt.hasOwnProperty(v)&&(p[v]=t[v]);if(e&&e.defaultProps){var g=e.defaultProps;for(v in g)p[v]===void 0&&(p[v]=g[v])}if(u||P){var N=typeof e=="function"?e.displayName||e.name||"Unknown":e;u&&Et(p,N),P&&wt(p,N)}return Pt(e,u,P,m,s,L.current,p)}}var te=I.ReactCurrentOwner,Oe=I.ReactDebugCurrentFrame;function A(e){if(e){var t=e._owner,r=U(e.type,e._source,t?t.type:null);Oe.setExtraStackFrame(r)}else Oe.setExtraStackFrame(null)}var re;re=!1;function ae(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function Fe(){{if(te.current){var e=C(te.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function xt(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),r=e.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+t+":"+r+"."}return""}}var De={};function jt(e){{var t=Fe();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+r+">.")}return t}}function Ie(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=jt(t);if(De[r])return;De[r]=!0;var s="";e&&e._owner&&e._owner!==te.current&&(s=" It was passed a child from "+C(e._owner.type)+"."),A(e),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,s),A(null)}}function Ae(e,t){{if(typeof e!="object")return;if(q(e))for(var r=0;r<e.length;r++){var s=e[r];ae(s)&&Ie(s,t)}else if(ae(e))e._store&&(e._store.validated=!0);else if(e){var m=rt(e);if(typeof m=="function"&&m!==e.entries)for(var v=m.call(e),p;!(p=v.next()).done;)ae(p.value)&&Ie(p.value,t)}}}function St(e){{var t=e.type;if(t==null||typeof t=="string")return;var r;if(typeof t=="function")r=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===h||t.$$typeof===j))r=t.propTypes;else return;if(r){var s=C(t);_t(r,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!re){re=!0;var m=C(t);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",m||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ct(e){{for(var t=Object.keys(e.props),r=0;r<t.length;r++){var s=t[r];if(s!=="children"&&s!=="key"){A(e),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),A(null);break}}e.ref!==null&&(A(e),w("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function We(e,t,r,s,m,v){{var p=ct(e);if(!p){var u="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var P=xt(m);P?u+=P:u+=Fe();var b;e===null?b="null":q(e)?b="array":e!==void 0&&e.$$typeof===l?(b="<"+(C(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):b=typeof e,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",b,u)}var N=Tt(e,t,r,m,v);if(N==null)return N;if(p){var x=t.children;if(x!==void 0)if(s)if(q(x)){for(var W=0;W<x.length;W++)Ae(x[W],e);Object.freeze&&Object.freeze(x)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ae(x,e)}return e===c?Ct(N):St(N),N}}function Ot(e,t,r){return We(e,t,r,!0)}function Ft(e,t,r){return We(e,t,r,!1)}var Dt=Ft,It=Ot;M.Fragment=c,M.jsx=Dt,M.jsxs=It}()),M}process.env.NODE_ENV==="production"?z.exports=$e():z.exports=Le();var J=z.exports;const le=J.Fragment,a=J.jsx,d=J.jsxs,K={},ie='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Be(o,l){return K[o]?Promise.resolve(K[o]):fetch(l+o+".svg").then(i=>i.ok?i.text():(console.error("Missing icon: "+l+o+".svg"),ie)).then(i=>(i!==ie&&(K[o]=i),i))}const y=({name:o,path:l,className:i="",...c})=>{const f="https://punkt-cdn.oslo.kommune.no/5.0/icons/",[n,_]=E.useState(null);return E.useEffect(()=>{if(!o)return;Be(o,l||f).then(h=>_(h))},[o,l,f]),n?a("span",{className:`pkt-icon ${i}`,dangerouslySetInnerHTML:{__html:n},...c}):null},Ve=E.forwardRef(({children:o,className:l,skin:i="info",closeAlert:c=!1,onClose:f,title:n,date:_,ariaLive:k="polite",...h},T)=>{const R=[l,"pkt-alert",i&&`pkt-alert--${i}`].filter(Boolean).join(" "),[j,S]=E.useState(!0),D=()=>{S(!1),f&&f()};return j?d("div",{...h,className:R,"aria-live":k,ref:T,children:[a(y,{className:"pkt-alert__icon",name:i==="info"?"alert-information":`alert-${i}`}),c&&a("div",{className:"pkt-alert__close",children:a("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:D,children:a(y,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),n&&a("div",{className:"pkt-alert__title",children:n}),a("div",{className:"pkt-alert__text",children:o}),_&&d("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",_]})]}):null}),se=E.forwardRef(({children:o,className:l,iconName:i="user",secondIconName:c="user",size:f="medium",skin:n="primary",type:_="button",variant:k="label-only",...h},T)=>{const R=[l,"pkt-btn",f&&`pkt-btn--${f}`,n&&`pkt-btn--${n}`,k&&`pkt-btn--${k}`].filter(Boolean).join(" ");return d("button",{...h,className:R,type:_,ref:T,children:[a(y,{className:"pkt-btn__icon",name:i}),a("span",{className:"pkt-btn__text",children:o}),k==="icons-right-and-left"&&a(y,{className:"pkt-btn__icon",name:c})]})});se.displayName="PktButton";const Ue=({columnOne:o,columnTwo:l,socialLinks:i})=>{var c,f;return a("footer",{className:"pkt-footer","data-mode":"dark",children:d("div",{className:"pkt-footer__container",children:[d("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[d("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[a("h2",{className:"pkt-footer__title",children:o.title}),d("ul",{className:"pkt-footer__list",children:[o.text&&a("li",{className:"pkt-footer__text",children:o.text}),(c=o.links)==null?void 0:c.map((n,_)=>a("li",{className:"pkt-footer__list-item",children:d("a",{className:`pkt-footer__link ${n.external?"pkt-link--external":""}`,href:n.href,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:[a(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),n.text]})},`links-${_}`))]})]}),d("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[a("h2",{className:"pkt-footer__title",children:l.title}),d("ul",{className:"pkt-footer__list",children:[l.text&&a("li",{className:"pkt-footer__text",children:l.text}),(f=l.links)==null?void 0:f.map((n,_)=>a("li",{className:"pkt-footer__list-item",children:d("a",{className:`pkt-footer__link ${n.external?"pkt-link--external":""}`,href:n.href,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:[a(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),n.text]})},`links-${_}`))]})]}),d("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[a("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),d("ul",{className:"pkt-footer__list",children:[a("li",{className:"pkt-footer__list-item",children:d("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[a(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),a("li",{className:"pkt-footer__list-item",children:d("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[a(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),i&&d("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[a("div",{className:"pkt-footer__social-languages",children:i.filter(n=>n.language).map((n,_)=>a("div",{className:"pkt-footer__social-language",children:a("a",{href:n.href,"aria-label":`til ${n.language} versjon av nettsiden`,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:n.language})},`sociallinks-language-${_}`))}),a("div",{className:"pkt-footer__social-icons",children:i.filter(n=>n.iconName).map((n,_)=>a(E.Fragment,{children:a("a",{href:n.href,"aria-label":`til ${n.iconName}`,className:"pkt-footer__social-icon-link",target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:a(y,{className:"pkt-footer__social-icon",name:n.iconName})})},`sociallinks-${_}`))})]})]})})},He=({links:o=[]})=>a("footer",{className:"pkt-footer-simple","data-mode":"dark",children:a("div",{className:"pkt-footer-simple__container",children:d("ul",{className:"pkt-footer-simple__list",children:[o.map((l,i)=>a("li",{className:"pkt-footer-simple__list-item",children:d("a",{className:`pkt-footer-simple__link ${l.external?" pkt-link--external":""}`,href:l.href,target:l.openInNewTab?"_blank":"_self",rel:l.openInNewTab?"noopener noreferrer":void 0,children:[a(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),l.text]})},i)),a("li",{className:"pkt-footer-simple__list-item",children:d("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[a(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),a("li",{className:"pkt-footer-simple__list-item",children:d("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[a(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})}),Ge=({className:o,logoLink:l="https://www.oslo.kommune.no/",isLoggedIn:i=!1,representing:c="",canChangeRepresentation:f=!1,showLogInButton:n=!0,onLogIn:_,onLogOut:k,onChangeRepresentation:h})=>{const T=[o,"pkt-header"].filter(Boolean).join(" ");return d("header",{id:"pkt-header",className:T,"aria-label":"Topp",children:[a("div",{className:"pkt-header__logo",children:a("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:l,children:a(y,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true"})})}),d("div",{className:"pkt-header__actions",children:[i&&f&&d("button",{className:"pkt-btn pkt-btn--secondary pkt-btn--icon-right","aria-label":`Bytt bruker fra ${c}`,onClick:h,children:[a(y,{name:"user",className:"pkt-btn__icon pkt-show-tablet-up"}),a("span",{className:"pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15",children:"Endre"}),a("span",{className:"pkt-btn__text pkt-hide-tablet-up",children:"Endre"}),a("span",{className:"pkt-btn__text--representing pkt-hide pkt-show-tablet-up",children:c})]}),i&&!f&&d("div",{className:"pkt-header__action",children:[a("span",{className:"pkt-header__action-text",children:a("span",{className:"pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text",children:c})}),a(y,{className:"pkt-header__action-icon pkt-show-phablet-up",name:"user"})]}),n&&i&&d("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg ut",onClick:k,children:[a(y,{className:"pkt-btn__icon pkt-show-tablet-up",name:"exit"}),a("span",{className:"pkt-btn__text",children:"Logg ut"})]}),n&&!i&&d("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg inn",onClick:_,children:[a(y,{className:"pkt-btn__icon",name:"user"}),a("span",{className:"pkt-btn__text",children:"Logg inn"})]})]})]})},ce=E.forwardRef(({label:o,id:l,children:i,...c},f)=>d("div",{className:"pkt-form-group",children:[a("label",{htmlFor:l,className:"pkt-form-label",children:o}),a("input",{className:"pkt-form-input",id:l,...c,ref:f}),i]}));ce.displayName="PktInput";const ue=E.forwardRef(({children:o,className:l,iconName:i="user",openInNewTab:c=!1,skin:f="normal",href:n="#",external:_=!1,title:k},h)=>{const T=[l,"pkt-linkcard",f&&`pkt-linkcard--${f}`].filter(Boolean).join(" ");return d("a",{href:n,className:`pkt-linkcard pkt-link ${T}`,target:c?"_blank":"_self",rel:c?"noopener noreferrer":void 0,ref:h,children:[a(y,{className:"pkt-link__icon",name:i}),d("div",{className:"pkt-linkcard__content",children:[a("div",{className:`pkt-linkcard__title ${_?"pkt-link pkt-link--external":""}`,children:k}),a("div",{className:"pkt-linkcard__text",children:o})]})]})});ue.displayName="PktLinkCard";const ze=({children:o,skin:l="beige",title:i,...c})=>{const f=["pkt-messagebox",l&&`pkt-messagebox--${l}`].filter(Boolean).join(" ");return d("div",{...c,className:f,children:[a("div",{className:"pkt-messagebox__title",children:i}),a("div",{className:"pkt-messagebox__text",children:o})]})},fe=E.forwardRef(({id:o,name:l,label:i,value:c,...f},n)=>d("div",{className:"pkt-form-group",children:[a("input",{type:"radio",className:"pkt-form-check-input",id:o,name:l,value:c,ref:n,...f}),a("label",{className:"pkt-form-label",htmlFor:o,children:i})]}));fe.displayName="PktRadio";const Je=({label:o,children:l})=>d(le,{children:[a("p",{children:o}),a("div",{className:"pkt-form-group",children:l})]});var pe={exports:{}};/*!
|
|
27
|
+
Check the top-level render call using <`+r+">.")}return t}}function Ie(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=jt(t);if(De[r])return;De[r]=!0;var s="";e&&e._owner&&e._owner!==te.current&&(s=" It was passed a child from "+C(e._owner.type)+"."),A(e),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,s),A(null)}}function Ae(e,t){{if(typeof e!="object")return;if(q(e))for(var r=0;r<e.length;r++){var s=e[r];ae(s)&&Ie(s,t)}else if(ae(e))e._store&&(e._store.validated=!0);else if(e){var m=rt(e);if(typeof m=="function"&&m!==e.entries)for(var v=m.call(e),p;!(p=v.next()).done;)ae(p.value)&&Ie(p.value,t)}}}function St(e){{var t=e.type;if(t==null||typeof t=="string")return;var r;if(typeof t=="function")r=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===h||t.$$typeof===j))r=t.propTypes;else return;if(r){var s=C(t);_t(r,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!re){re=!0;var m=C(t);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",m||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ct(e){{for(var t=Object.keys(e.props),r=0;r<t.length;r++){var s=t[r];if(s!=="children"&&s!=="key"){A(e),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),A(null);break}}e.ref!==null&&(A(e),w("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function We(e,t,r,s,m,v){{var p=ct(e);if(!p){var u="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var P=xt(m);P?u+=P:u+=Fe();var g;e===null?g="null":q(e)?g="array":e!==void 0&&e.$$typeof===l?(g="<"+(C(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):g=typeof e,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",g,u)}var N=Tt(e,t,r,m,v);if(N==null)return N;if(p){var x=t.children;if(x!==void 0)if(s)if(q(x)){for(var W=0;W<x.length;W++)Ae(x[W],e);Object.freeze&&Object.freeze(x)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ae(x,e)}return e===c?Ct(N):St(N),N}}function Ot(e,t,r){return We(e,t,r,!0)}function Ft(e,t,r){return We(e,t,r,!1)}var Dt=Ft,It=Ot;M.Fragment=c,M.jsx=Dt,M.jsxs=It}()),M}process.env.NODE_ENV==="production"?z.exports=$e():z.exports=Le();var J=z.exports;const le=J.Fragment,a=J.jsx,d=J.jsxs,K={},ie='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Be(o,l){return K[o]?Promise.resolve(K[o]):fetch(l+o+".svg").then(i=>i.ok?i.text():(console.error("Missing icon: "+l+o+".svg"),ie)).then(i=>(i!==ie&&(K[o]=i),i))}const y=({name:o,path:l,className:i="",...c})=>{const f="https://punkt-cdn.oslo.kommune.no/5.0/icons/",[n,_]=E.useState(null);return E.useEffect(()=>{if(!o)return;Be(o,l||f).then(h=>_(h))},[o,l,f]),n?a("span",{className:`pkt-icon ${i}`,dangerouslySetInnerHTML:{__html:n},...c}):null},Ve=E.forwardRef(({children:o,className:l,skin:i="info",closeAlert:c=!1,onClose:f,title:n,date:_,ariaLive:k="polite",...h},T)=>{const R=[l,"pkt-alert",i&&`pkt-alert--${i}`].filter(Boolean).join(" "),[j,S]=E.useState(!0),D=()=>{S(!1),f&&f()};return j?d("div",{...h,className:R,"aria-live":k,ref:T,children:[a(y,{className:"pkt-alert__icon",name:i==="info"?"alert-information":`alert-${i}`}),c&&a("div",{className:"pkt-alert__close",children:a("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:D,children:a(y,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),n&&a("div",{className:"pkt-alert__title",children:n}),a("div",{className:"pkt-alert__text",children:o}),_&&d("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",_]})]}):null}),se=E.forwardRef(({children:o,className:l,iconName:i="user",secondIconName:c="user",size:f="medium",skin:n="primary",type:_="button",variant:k="label-only",...h},T)=>{const R=[l,"pkt-btn",f&&`pkt-btn--${f}`,n&&`pkt-btn--${n}`,k&&`pkt-btn--${k}`].filter(Boolean).join(" ");return d("button",{...h,className:R,type:_,ref:T,children:[k!=="label-only"&&a(y,{className:"pkt-btn__icon",name:i}),a("span",{className:"pkt-btn__text",children:o}),k==="icons-right-and-left"&&a(y,{className:"pkt-btn__icon",name:c})]})});se.displayName="PktButton";const Ue=({columnOne:o,columnTwo:l,socialLinks:i})=>{var c,f;return a("footer",{className:"pkt-footer","data-mode":"dark",children:d("div",{className:"pkt-footer__container",children:[d("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[d("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[a("h2",{className:"pkt-footer__title",children:o.title}),d("ul",{className:"pkt-footer__list",children:[o.text&&a("li",{className:"pkt-footer__text",children:o.text}),(c=o.links)==null?void 0:c.map((n,_)=>a("li",{className:"pkt-footer__list-item",children:d("a",{className:`pkt-footer__link ${n.external?"pkt-link--external":""}`,href:n.href,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:[a(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),n.text]})},`links-${_}`))]})]}),d("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[a("h2",{className:"pkt-footer__title",children:l.title}),d("ul",{className:"pkt-footer__list",children:[l.text&&a("li",{className:"pkt-footer__text",children:l.text}),(f=l.links)==null?void 0:f.map((n,_)=>a("li",{className:"pkt-footer__list-item",children:d("a",{className:`pkt-footer__link ${n.external?"pkt-link--external":""}`,href:n.href,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:[a(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),n.text]})},`links-${_}`))]})]}),d("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[a("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),d("ul",{className:"pkt-footer__list",children:[a("li",{className:"pkt-footer__list-item",children:d("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[a(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),a("li",{className:"pkt-footer__list-item",children:d("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[a(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),i&&d("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[a("div",{className:"pkt-footer__social-languages",children:i.filter(n=>n.language).map((n,_)=>a("div",{className:"pkt-footer__social-language",children:a("a",{href:n.href,"aria-label":`til ${n.language} versjon av nettsiden`,target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:n.language})},`sociallinks-language-${_}`))}),a("div",{className:"pkt-footer__social-icons",children:i.filter(n=>n.iconName).map((n,_)=>a(E.Fragment,{children:a("a",{href:n.href,"aria-label":`til ${n.iconName}`,className:"pkt-footer__social-icon-link",target:n.openInNewTab?"_blank":"_self",rel:n.openInNewTab?"noopener noreferrer":void 0,children:a(y,{className:"pkt-footer__social-icon",name:n.iconName})})},`sociallinks-${_}`))})]})]})})},He=({links:o=[]})=>a("footer",{className:"pkt-footer-simple","data-mode":"dark",children:a("div",{className:"pkt-footer-simple__container",children:d("ul",{className:"pkt-footer-simple__list",children:[o.map((l,i)=>a("li",{className:"pkt-footer-simple__list-item",children:d("a",{className:`pkt-footer-simple__link ${l.external?" pkt-link--external":""}`,href:l.href,target:l.openInNewTab?"_blank":"_self",rel:l.openInNewTab?"noopener noreferrer":void 0,children:[a(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),l.text]})},i)),a("li",{className:"pkt-footer-simple__list-item",children:d("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[a(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),a("li",{className:"pkt-footer-simple__list-item",children:d("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[a(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})}),Ge=({className:o,logoLink:l="https://www.oslo.kommune.no/",isLoggedIn:i=!1,representing:c="",canChangeRepresentation:f=!1,showLogInButton:n=!0,onLogIn:_,onLogOut:k,onChangeRepresentation:h})=>{const T=[o,"pkt-header"].filter(Boolean).join(" ");return d("header",{id:"pkt-header",className:T,"aria-label":"Topp",children:[a("div",{className:"pkt-header__logo",children:a("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:l,children:a(y,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true"})})}),d("div",{className:"pkt-header__actions",children:[i&&f&&d("button",{className:"pkt-btn pkt-btn--secondary pkt-btn--icon-right","aria-label":`Bytt bruker fra ${c}`,onClick:h,children:[a(y,{name:"user",className:"pkt-btn__icon pkt-show-tablet-up"}),a("span",{className:"pkt-header__action-change pkt-hide pkt-show-tablet-up ml-size-15",children:"Endre"}),a("span",{className:"pkt-btn__text pkt-hide-tablet-up",children:"Endre"}),a("span",{className:"pkt-btn__text--representing pkt-hide pkt-show-tablet-up",children:c})]}),i&&!f&&d("div",{className:"pkt-header__action",children:[a("span",{className:"pkt-header__action-text",children:a("span",{className:"pkt-btn__text pkt-header__action-textrow text-row-inline pkt-truncate-text",children:c})}),a(y,{className:"pkt-header__action-icon pkt-show-phablet-up",name:"user"})]}),n&&i&&d("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg ut",onClick:k,children:[a(y,{className:"pkt-btn__icon pkt-show-tablet-up",name:"exit"}),a("span",{className:"pkt-btn__text",children:"Logg ut"})]}),n&&!i&&d("button",{className:"pkt-btn pkt-btn--tertiary pkt-btn--icon-right","aria-label":"Logg inn",onClick:_,children:[a(y,{className:"pkt-btn__icon",name:"user"}),a("span",{className:"pkt-btn__text",children:"Logg inn"})]})]})]})},ce=E.forwardRef(({label:o,id:l,children:i,...c},f)=>d("div",{className:"pkt-form-group",children:[a("label",{htmlFor:l,className:"pkt-form-label",children:o}),a("input",{className:"pkt-form-input",id:l,...c,ref:f}),i]}));ce.displayName="PktInput";const ue=E.forwardRef(({children:o,className:l,iconName:i="user",openInNewTab:c=!1,skin:f="normal",href:n="#",external:_=!1,title:k},h)=>{const T=[l,"pkt-linkcard",f&&`pkt-linkcard--${f}`].filter(Boolean).join(" ");return d("a",{href:n,className:`pkt-linkcard pkt-link ${T}`,target:c?"_blank":"_self",rel:c?"noopener noreferrer":void 0,ref:h,children:[a(y,{className:"pkt-link__icon",name:i}),d("div",{className:"pkt-linkcard__content",children:[a("div",{className:`pkt-linkcard__title ${_?"pkt-link pkt-link--external":""}`,children:k}),a("div",{className:"pkt-linkcard__text",children:o})]})]})});ue.displayName="PktLinkCard";const ze=({children:o,skin:l="beige",title:i,...c})=>{const f=["pkt-messagebox",l&&`pkt-messagebox--${l}`].filter(Boolean).join(" ");return d("div",{...c,className:f,children:[a("div",{className:"pkt-messagebox__title",children:i}),a("div",{className:"pkt-messagebox__text",children:o})]})},fe=E.forwardRef(({id:o,name:l,label:i,value:c,...f},n)=>d("div",{className:"pkt-form-group",children:[a("input",{type:"radio",className:"pkt-form-check-input",id:o,name:l,value:c,ref:n,...f}),a("label",{className:"pkt-form-label",htmlFor:o,children:i})]}));fe.displayName="PktRadio";const Je=({label:o,children:l})=>d(le,{children:[a("p",{children:o}),a("div",{className:"pkt-form-group",children:l})]});var pe={exports:{}};/*!
|
|
28
28
|
Copyright (c) 2018 Jed Watson.
|
|
29
29
|
Licensed under the MIT License (MIT), see
|
|
30
30
|
http://jedwatson.github.io/classnames
|
|
31
|
-
*/(function(o){(function(){var l={}.hasOwnProperty;function i(){for(var c=[],f=0;f<arguments.length;f++){var n=arguments[f];if(n){var _=typeof n;if(_==="string"||_==="number")c.push(n);else if(Array.isArray(n)){if(n.length){var k=i.apply(null,n);k&&c.push(k)}}else if(_==="object"){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){c.push(n.toString());continue}for(var h in n)l.call(n,h)&&n[h]&&c.push(h)}}}return c.join(" ")}o.exports?(i.default=i,o.exports=i):window.classNames=i})()})(pe);var Ke=pe.exports;const Xe=Me(Ke),Ze=({isResponsive:o,children:l})=>o?a("div",{className:"pkt-table-container",children:l}):a(le,{children:l}),Qe=({isResponsive:o,modifiers:{info:l=!1,success:i=!1,strong:c=!1,shadow:f=!1}={},children:n})=>a(Ze,{isResponsive:o,children:a("table",{className:Xe("pkt-table",{"pkt-table--info":l,"pkt-table--success":i,"pkt-table--strong":c,"pkt-table--shadow":f}),children:n})}),qe=({children:o})=>a("td",{className:"pkt-table__th",children:o}),et=({children:o})=>a("th",{className:"pkt-table__th",children:o}),de=E.forwardRef(({id:o,label:l,...i},c)=>d("div",{className:"pkt-form-group",children:[a("label",{htmlFor:o,className:"pkt-form-label",children:l}),a("textarea",{className:"pkt-form-textarea",id:o,ref:c,...i})]}));de.displayName="PktTextarea",
|
|
31
|
+
*/(function(o){(function(){var l={}.hasOwnProperty;function i(){for(var c=[],f=0;f<arguments.length;f++){var n=arguments[f];if(n){var _=typeof n;if(_==="string"||_==="number")c.push(n);else if(Array.isArray(n)){if(n.length){var k=i.apply(null,n);k&&c.push(k)}}else if(_==="object"){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){c.push(n.toString());continue}for(var h in n)l.call(n,h)&&n[h]&&c.push(h)}}}return c.join(" ")}o.exports?(i.default=i,o.exports=i):window.classNames=i})()})(pe);var Ke=pe.exports;const Xe=Me(Ke),Ze=({isResponsive:o,children:l})=>o?a("div",{className:"pkt-table-container",children:l}):a(le,{children:l}),Qe=({isResponsive:o,modifiers:{info:l=!1,success:i=!1,strong:c=!1,shadow:f=!1}={},children:n})=>a(Ze,{isResponsive:o,children:a("table",{className:Xe("pkt-table",{"pkt-table--info":l,"pkt-table--success":i,"pkt-table--strong":c,"pkt-table--shadow":f}),children:n})}),qe=({children:o})=>a("td",{className:"pkt-table__th",children:o}),et=({children:o})=>a("th",{className:"pkt-table__th",children:o}),de=E.forwardRef(({id:o,label:l,...i},c)=>d("div",{className:"pkt-form-group",children:[a("label",{htmlFor:o,className:"pkt-form-label",children:l}),a("textarea",{className:"pkt-form-textarea",id:o,ref:c,...i})]}));de.displayName="PktTextarea",b.PktAlert=Ve,b.PktButton=se,b.PktFooter=Ue,b.PktFooterSimple=He,b.PktHeader=Ge,b.PktIcon=y,b.PktInput=ce,b.PktLinkCard=ue,b.PktMessagebox=ze,b.PktRadio=fe,b.PktRadioGroup=Je,b.PktTable=Qe,b.PktTableData=qe,b.PktTableHeader=et,b.PktTextarea=de,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@oslokommune/punkt-assets": "^5.0.2",
|
|
35
|
-
"@oslokommune/punkt-css": "^5.0.
|
|
35
|
+
"@oslokommune/punkt-css": "^5.0.4",
|
|
36
36
|
"@testing-library/jest-dom": "^5.16.5",
|
|
37
37
|
"@testing-library/react": "^14.0.0",
|
|
38
38
|
"@testing-library/user-event": "^14.4.3",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
91
91
|
},
|
|
92
92
|
"license": "MIT",
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "ceec529d5abb4946db492477a696cff656370c10"
|
|
94
94
|
}
|
|
@@ -41,7 +41,7 @@ export const PktButton = forwardRef(
|
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
43
|
<button {...props} className={classes} type={type} ref={ref}>
|
|
44
|
-
<PktIcon className="pkt-btn__icon" name={iconName}></PktIcon>
|
|
44
|
+
{variant !== 'label-only' && <PktIcon className="pkt-btn__icon" name={iconName}></PktIcon>}
|
|
45
45
|
<span className="pkt-btn__text">{children}</span>
|
|
46
46
|
{variant === 'icons-right-and-left' && (
|
|
47
47
|
<PktIcon className="pkt-btn__icon" name={secondIconName}></PktIcon>
|
package/src/components/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { PktButton } from './button/Button'
|
|
|
3
3
|
export { PktFooter} from './footer/Footer'
|
|
4
4
|
export { PktFooterSimple} from './footerSimple/FooterSimple'
|
|
5
5
|
export { PktHeader } from './header/Header'
|
|
6
|
+
export { PktIcon } from './icon/Icon'
|
|
6
7
|
export { PktInput } from './input/Input'
|
|
7
8
|
export { PktLinkCard } from './linkcard/LinkCard'
|
|
8
9
|
export { PktMessagebox } from './messagebox/Messagebox'
|