@fellesdatakatalog/ui 1.0.14 → 1.0.15

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("classnames"),r=require("react"),l=require("@digdir/designsystemet-react");let o=0;const n=r.useId;function a(e){var t;if(void 0!==n){return n().replace(/(:)/g,"")}return null!==(t=function(e){const[t,l]=r.useState(e),n=e||t;return r.useEffect(()=>{null==t&&(o+=1,l(`aksel-icon-${o}`))},[t]),n}(e))&&void 0!==t?t:""}const i=r.forwardRef((e,t)=>{var{title:l,titleId:o}=e,n=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(l=Object.getOwnPropertySymbols(e);o<l.length;o++)t.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(e,l[o])&&(r[l[o]]=e[l[o]])}return r}(e,["title","titleId"]);let i=a();return i=l?o||"title-"+i:void 0,r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",focusable:!1,role:"img",ref:t,"aria-labelledby":i},n),l?r.createElement("title",{id:i},l):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.25 3A.75.75 0 0 1 7 2.25h10a.75.75 0 0 1 .75.75v6.25H21a.75.75 0 0 1 .75.75v11a.75.75 0 0 1-.75.75H3a.75.75 0 0 1-.75-.75V10A.75.75 0 0 1 3 9.25h3.25zm11.5 17.25v-9.5h2.5v9.5zm-1.5-16.5v16.5h-8.5V3.75zm-10 7v9.5h-2.5v-9.5zm3.75-5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m3 0a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m-2.25 6.75a.75.75 0 0 0-1.5 0v2a.75.75 0 0 0 1.5 0zm2.25-.75a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75",clipRule:"evenodd"}))});const c=r.forwardRef((e,t)=>{var{title:l,titleId:o}=e,n=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(l=Object.getOwnPropertySymbols(e);o<l.length;o++)t.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(e,l[o])&&(r[l[o]]=e[l[o]])}return r}(e,["title","titleId"]);let i=a();return i=l?o||"title-"+i:void 0,r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",focusable:!1,role:"img",ref:t,"aria-labelledby":i},n),l?r.createElement("title",{id:i},l):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 21.75c5.385 0 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25 2.25 6.615 2.25 12s4.365 9.75 9.75 9.75m4.954-12.475a.813.813 0 0 0-1.24-1.05l-5.389 6.368L7.7 11.967a.812.812 0 0 0-1.15 1.15l3.25 3.25a.81.81 0 0 0 1.195-.05z",clipRule:"evenodd"}))});const s=r.forwardRef((e,t)=>{var{title:l,titleId:o}=e,n=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(l=Object.getOwnPropertySymbols(e);o<l.length;o++)t.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(e,l[o])&&(r[l[o]]=e[l[o]])}return r}(e,["title","titleId"]);let i=a();return i=l?o||"title-"+i:void 0,r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",focusable:!1,role:"img",ref:t,"aria-labelledby":i},n),l?r.createElement("title",{id:i},l):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.25 3.5c0-.69.56-1.25 1.25-1.25H14a.75.75 0 0 1 .53.22l5 5c.141.14.22.331.22.53v8.5c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25zm6.25 5.25c-.69 0-1.25-.56-1.25-1.25V3.75h-3.5v12.5h8.5v-7.5zm.25-3.94 2.44 2.44h-2.44zM6.502 7.75H5.75v12.5h8.5v-.748a.75.75 0 0 1 1.5 0v.998c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25v-13c0-.69.56-1.25 1.25-1.25h1.002a.75.75 0 1 1 0 1.5",clipRule:"evenodd"}))}),d="_orgLogo_8xxnq_1",p=({className:r,orgLogoSrc:l,...o})=>e.jsx("div",{className:t(d,r),...o,children:l?e.jsx("img",{"aria-hidden":!0,src:l,alt:""}):e.jsx(i,{"aria-hidden":!0})}),v="_appBar_w0gn2_1",f="_wrapper_1dyfs_1",m=({children:r,className:l,...o})=>e.jsx("div",{className:t(f,l),...o,children:r}),u="_wrapper_m33an_1",h="_helptext_1o0ls_1",g=r.forwardRef(function({placement:t="right",children:r,...o},n){return e.jsxs(l.Popover.TriggerContext,{children:[e.jsx(l.Popover.Trigger,{className:h,ref:n,variant:"tertiary","data-color":"info",...o}),e.jsx(l.Popover,{placement:t,"data-color":"info",children:r})]})});exports.AppBar=()=>e.jsx("div",{className:v,children:e.jsx(p,{})}),exports.CopyButton=({copyLabel:t,copiedLabel:o,copyOnClick:n,...a})=>{const[i,d]=r.useState(!1);return e.jsx(l.Tooltip,{content:i?e.jsxs(m,{children:[e.jsx(c,{color:"#D1F4E1",fontSize:"1.2em"}),o]}):t,placement:"top",children:e.jsxs(l.Button,{"data-size":"sm",variant:"secondary",onClick:()=>{return e=n,d(!0),void navigator.clipboard.writeText(e);var e},onMouseOver:()=>d(!1),...a,children:[e.jsx(s,{"aria-hidden":!0}),e.jsx("span",{className:"sr-only",children:t})]})})},exports.HStack=m,exports.HelpText=g,exports.OrgLogo=p,exports.VStack=({children:t,...r})=>e.jsx("div",{className:u,...r,children:t});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("classnames"),r=require("react"),l=require("@digdir/designsystemet-react");let a=0;const n=r.useId;function i(e){var t;if(void 0!==n){return n().replace(/(:)/g,"")}return null!==(t=function(e){const[t,l]=r.useState(e),n=e||t;return r.useEffect(()=>{null==t&&(a+=1,l(`aksel-icon-${a}`))},[t]),n}(e))&&void 0!==t?t:""}const o=r.forwardRef((e,t)=>{var{title:l,titleId:a}=e,n=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(l=Object.getOwnPropertySymbols(e);a<l.length;a++)t.indexOf(l[a])<0&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(r[l[a]]=e[l[a]])}return r}(e,["title","titleId"]);let o=i();return o=l?a||"title-"+o:void 0,r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",focusable:!1,role:"img",ref:t,"aria-labelledby":o},n),l?r.createElement("title",{id:o},l):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.25 3A.75.75 0 0 1 7 2.25h10a.75.75 0 0 1 .75.75v6.25H21a.75.75 0 0 1 .75.75v11a.75.75 0 0 1-.75.75H3a.75.75 0 0 1-.75-.75V10A.75.75 0 0 1 3 9.25h3.25zm11.5 17.25v-9.5h2.5v9.5zm-1.5-16.5v16.5h-8.5V3.75zm-10 7v9.5h-2.5v-9.5zm3.75-5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m3 0a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m-2.25 6.75a.75.75 0 0 0-1.5 0v2a.75.75 0 0 0 1.5 0zm2.25-.75a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75",clipRule:"evenodd"}))});const s=r.forwardRef((e,t)=>{var{title:l,titleId:a}=e,n=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(l=Object.getOwnPropertySymbols(e);a<l.length;a++)t.indexOf(l[a])<0&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(r[l[a]]=e[l[a]])}return r}(e,["title","titleId"]);let o=i();return o=l?a||"title-"+o:void 0,r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",focusable:!1,role:"img",ref:t,"aria-labelledby":o},n),l?r.createElement("title",{id:o},l):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 21.75c5.385 0 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25 2.25 6.615 2.25 12s4.365 9.75 9.75 9.75m4.954-12.475a.813.813 0 0 0-1.24-1.05l-5.389 6.368L7.7 11.967a.812.812 0 0 0-1.15 1.15l3.25 3.25a.81.81 0 0 0 1.195-.05z",clipRule:"evenodd"}))});const d=r.forwardRef((e,t)=>{var{title:l,titleId:a}=e,n=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(l=Object.getOwnPropertySymbols(e);a<l.length;a++)t.indexOf(l[a])<0&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(r[l[a]]=e[l[a]])}return r}(e,["title","titleId"]);let o=i();return o=l?a||"title-"+o:void 0,r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",focusable:!1,role:"img",ref:t,"aria-labelledby":o},n),l?r.createElement("title",{id:o},l):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.25 3.5c0-.69.56-1.25 1.25-1.25H14a.75.75 0 0 1 .53.22l5 5c.141.14.22.331.22.53v8.5c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25zm6.25 5.25c-.69 0-1.25-.56-1.25-1.25V3.75h-3.5v12.5h8.5v-7.5zm.25-3.94 2.44 2.44h-2.44zM6.502 7.75H5.75v12.5h8.5v-.748a.75.75 0 0 1 1.5 0v.998c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25v-13c0-.69.56-1.25 1.25-1.25h1.002a.75.75 0 1 1 0 1.5",clipRule:"evenodd"}))}),c="_orgLogo_eki51_1",p=({className:r,orgLogoSrc:l,...a})=>e.jsx("div",{className:t(c,r),...a,children:l?e.jsx("img",{"aria-hidden":!0,src:l,alt:""}):e.jsx(o,{"aria-hidden":!0})}),u="_appBar_w0gn2_1",v="_wrapper_1dyfs_1",m=({children:r,className:l,...a})=>e.jsx("div",{className:t(v,l),...a,children:r}),h="_wrapper_m33an_1",g="_helptext_1o0ls_1",x=r.forwardRef(function({placement:t="right",children:r,...a},n){return e.jsxs(l.Popover.TriggerContext,{children:[e.jsx(l.Popover.Trigger,{className:g,ref:n,variant:"tertiary","data-color":"info",...a}),e.jsx(l.Popover,{placement:t,"data-color":"info",children:r})]})}),f="_tagList_1n3j5_1";exports.AppBar=()=>e.jsx("div",{className:u,children:e.jsx(p,{})}),exports.CheckboxGroup=({legend:t,description:r,options:a,value:n,onChange:i,error:o,disabled:s,readOnly:d,required:c,name:p,className:u})=>{const{getCheckboxProps:v,validationMessageProps:m}=l.useCheckboxGroup({value:n,onChange:i?e=>i(e):void 0,error:o,disabled:s,readOnly:d,required:c,name:p});return e.jsxs(l.Fieldset,{className:u,children:[t&&e.jsx(l.Fieldset.Legend,{children:t}),r&&e.jsx(l.Fieldset.Description,{children:r}),a.map(t=>e.jsx(l.Checkbox,{label:t.label,description:t.description,disabled:t.disabled,...v({value:t.value,allowIndeterminate:t.allowIndeterminate})},t.value)),o&&e.jsx(l.ValidationMessage,{...m})]})},exports.CopyButton=({copyLabel:t,copiedLabel:a,copyOnClick:n,...i})=>{const[o,c]=r.useState(!1);return e.jsx(l.Tooltip,{content:o?e.jsxs(m,{children:[e.jsx(s,{color:"#D1F4E1",fontSize:"1.2em"}),a]}):t,placement:"top",children:e.jsxs(l.Button,{"data-size":"sm",variant:"secondary",onClick:()=>{return e=n,c(!0),void navigator.clipboard.writeText(e);var e},onMouseOver:()=>c(!1),...i,children:[e.jsx(d,{"aria-hidden":!0}),e.jsx("span",{className:"sr-only",children:t})]})})},exports.HStack=m,exports.HelpText=x,exports.OrgLogo=p,exports.RadioGroup=({legend:t,description:r,options:a,value:n,onChange:i,error:o,disabled:s,readOnly:d,required:c,name:p,className:u})=>{const{getRadioProps:v,validationMessageProps:m}=l.useRadioGroup({value:n,onChange:i?e=>i(e):void 0,error:o,disabled:s,readOnly:d,required:c,name:p});return e.jsxs(l.Fieldset,{className:u,children:[t&&e.jsx(l.Fieldset.Legend,{children:t}),r&&e.jsx(l.Fieldset.Description,{children:r}),a.map(t=>e.jsx(l.Radio,{label:t.label,description:t.description,disabled:t.disabled,...v(t.value)},t.value)),o&&e.jsx(l.ValidationMessage,{...m})]})},exports.TagList=({children:a,className:n,maxTags:i,"data-size":o,...s})=>{const d=r.Children.toArray(a);return d.length?e.jsxs("ul",{className:t(f,n),...s,children:[d.filter(e=>Boolean(e)).slice(0,i??d.length).map((t,l)=>{const a=r.isValidElement(t)&&null!=t.key?t.key:l;return e.jsx("li",{children:t},a)}),i&&i<d.length&&e.jsx("li",{children:e.jsx(l.Tag,{"data-size":o||"sm",children:e.jsxs("span",{children:["+",d.length-i]})})})]}):null},exports.VStack=({children:t,...r})=>e.jsx("div",{className:h,...r,children:t});
2
2
  //# sourceMappingURL=shared-ui.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared-ui.cjs","sources":["../node_modules/@navikt/aksel-icons/dist/react/esm/util/useId.js","../node_modules/@navikt/aksel-icons/dist/react/esm/Buildings3.js","../node_modules/@navikt/aksel-icons/dist/react/esm/CheckmarkCircleFill.js","../node_modules/@navikt/aksel-icons/dist/react/esm/Files.js","../src/components/org-logo/index.tsx","../src/components/hstack/index.tsx","../src/components/helptext/index.tsx","../src/components/app-bar/index.tsx","../src/components/copy-button/index.tsx","../src/components/vstack/index.tsx"],"sourcesContent":["//https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/useId.ts\nimport React, { useEffect, useState } from \"react\";\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = useState(idOverride);\n const id = idOverride || defaultId;\n useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`aksel-icon-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\nconst maybeReactUseId = React[\"useId\" + \"\" // Workaround for https://github.com/webpack/webpack/issues/14814\n];\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport function useId(idOverride) {\n var _a;\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride !== null && idOverride !== void 0 ? idOverride : reactId.replace(/(:)/g, \"\");\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `useId` is invariant at runtime.\n return (_a = useGlobalId(idOverride)) !== null && _a !== void 0 ? _a : \"\";\n}\n//# sourceMappingURL=useId.js.map","\"use client\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { forwardRef } from \"react\";\nimport { useId } from \"./util/useId.js\";\nconst SvgBuildings3 = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"none\", viewBox: \"0 0 24 24\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M6.25 3A.75.75 0 0 1 7 2.25h10a.75.75 0 0 1 .75.75v6.25H21a.75.75 0 0 1 .75.75v11a.75.75 0 0 1-.75.75H3a.75.75 0 0 1-.75-.75V10A.75.75 0 0 1 3 9.25h3.25zm11.5 17.25v-9.5h2.5v9.5zm-1.5-16.5v16.5h-8.5V3.75zm-10 7v9.5h-2.5v-9.5zm3.75-5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m3 0a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m-2.25 6.75a.75.75 0 0 0-1.5 0v2a.75.75 0 0 0 1.5 0zm2.25-.75a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75\", clipRule: \"evenodd\" }));\n});\nexport default SvgBuildings3;\n//# sourceMappingURL=Buildings3.js.map","\"use client\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { forwardRef } from \"react\";\nimport { useId } from \"./util/useId.js\";\nconst SvgCheckmarkCircleFill = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"none\", viewBox: \"0 0 24 24\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M12 21.75c5.385 0 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25 2.25 6.615 2.25 12s4.365 9.75 9.75 9.75m4.954-12.475a.813.813 0 0 0-1.24-1.05l-5.389 6.368L7.7 11.967a.812.812 0 0 0-1.15 1.15l3.25 3.25a.81.81 0 0 0 1.195-.05z\", clipRule: \"evenodd\" }));\n});\nexport default SvgCheckmarkCircleFill;\n//# sourceMappingURL=CheckmarkCircleFill.js.map","\"use client\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { forwardRef } from \"react\";\nimport { useId } from \"./util/useId.js\";\nconst SvgFiles = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"none\", viewBox: \"0 0 24 24\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8.25 3.5c0-.69.56-1.25 1.25-1.25H14a.75.75 0 0 1 .53.22l5 5c.141.14.22.331.22.53v8.5c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25zm6.25 5.25c-.69 0-1.25-.56-1.25-1.25V3.75h-3.5v12.5h8.5v-7.5zm.25-3.94 2.44 2.44h-2.44zM6.502 7.75H5.75v12.5h8.5v-.748a.75.75 0 0 1 1.5 0v.998c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25v-13c0-.69.56-1.25 1.25-1.25h1.002a.75.75 0 1 1 0 1.5\", clipRule: \"evenodd\" }));\n});\nexport default SvgFiles;\n//# sourceMappingURL=Files.js.map","import React from 'react';\nimport cn from 'classnames';\nimport { Buildings3Icon } from '@navikt/aksel-icons';\nimport styles from './styles.module.scss';\n\nexport type OrgLogoProps = {\n orgLogoSrc?: string | null;\n className?: string;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nconst OrgLogo = ({ className, orgLogoSrc, ...props }: OrgLogoProps) => {\n return (\n <div className={cn(styles.orgLogo, className)} {...props}>\n {orgLogoSrc ? (\n <img\n aria-hidden\n src={orgLogoSrc}\n alt=''\n />\n ) : (\n <Buildings3Icon aria-hidden />\n )}\n </div>\n );\n};\n\nexport { OrgLogo };\n","import React from 'react';\nimport cn from 'classnames';\n\nimport styles from './hstack.module.scss';\n\nconst HStack = ({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div\n className={cn(styles.wrapper, className)}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nexport default HStack;\n","import React from 'react';\nimport { Popover } from '@digdir/designsystemet-react';\nimport styles from './helptext.module.scss';\n\nexport type HelpTextProps = {\n /**\n * Required descriptive label for screen readers.\n **/\n \"aria-label\": string;\n /**\n * Placement of the Popover.\n * @default 'right'\n */\n placement?: \"right\" | \"bottom\" | \"left\" | \"top\";\n } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"color\">;\n \n export const HelpText = React.forwardRef<HTMLButtonElement, HelpTextProps>(\n function HelpText(\n { placement = \"right\", children, ...rest },\n ref\n ) {\n return (\n <Popover.TriggerContext>\n <Popover.Trigger\n className={styles.helptext}\n ref={ref}\n variant=\"tertiary\"\n data-color=\"info\"\n {...rest}\n />\n <Popover placement={placement} data-color=\"info\">\n {children}\n </Popover>\n </Popover.TriggerContext>\n );\n }\n );","import { OrgLogo } from '../org-logo';\nimport styles from './styles.module.scss';\n\nconst AppBar = () => {\n return (\n <div className={styles.appBar}>\n <OrgLogo />\n </div>\n );\n};\n\nexport { AppBar };","'use client';\n\nimport { useState } from 'react';\nimport { Button, type ButtonProps, Tooltip } from '@digdir/designsystemet-react';\nimport { FilesIcon, CheckmarkCircleFillIcon } from '@navikt/aksel-icons';\nimport HStack from '../hstack';\n\ntype CopyButtonProps = {\n copyLabel: string;\n copiedLabel: string;\n copyOnClick: string;\n} & ButtonProps & React.HTMLAttributes<HTMLButtonElement>;\n\nconst CopyButton = ({ copyLabel, copiedLabel, copyOnClick, ...props }: CopyButtonProps) => {\n const [clicked, setClicked] = useState(false);\n\n const copyToClipboard = (text: string) => {\n setClicked(true);\n navigator.clipboard.writeText(text);\n };\n\n return (\n <Tooltip\n // @ts-expect-error: ignore complaint that Element cannot be set as content\n content={\n clicked ? (\n <HStack>\n <CheckmarkCircleFillIcon\n color='#D1F4E1'\n fontSize='1.2em'\n />\n {copiedLabel}\n </HStack>\n ) : (\n copyLabel\n )\n }\n placement='top'\n >\n <Button\n data-size='sm'\n variant='secondary'\n onClick={() => copyToClipboard(copyOnClick)}\n onMouseOver={() => setClicked(false)}\n {...props}\n >\n <FilesIcon aria-hidden />\n <span className={'sr-only'}>{copyLabel}</span>\n </Button>\n </Tooltip>\n );\n};\n\nexport default CopyButton;\n","import React from 'react';\n\nimport styles from './vstack.module.scss';\n\nconst VStack = ({ children, ...props }: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div\n className={styles.wrapper}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nexport default VStack;\n"],"names":["globalId","maybeReactUseId","React","useId","idOverride","_a","replace","defaultId","setDefaultId","useState","id","useEffect","useGlobalId","SvgBuildings3","forwardRef","ref","title","titleId","_titleId","props","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","__rest","createElement","assign","xmlns","width","height","fill","viewBox","focusable","role","fillRule","d","clipRule","SvgCheckmarkCircleFill","SvgFiles","OrgLogo","className","orgLogoSrc","jsx","cn","styles","children","src","alt","Buildings3Icon","HStack","HelpText","placement","rest","Popover","TriggerContext","Trigger","variant","copyLabel","copiedLabel","copyOnClick","clicked","setClicked","Tooltip","content","jsxs","CheckmarkCircleFillIcon","color","fontSize","Button","onClick","copyToClipboard","text","navigator","clipboard","writeText","onMouseOver","FilesIcon"],"mappings":"0MAEA,IAAIA,EAAW,EAgBf,MAAMC,EAAkBC,EACxB,MAOO,SAASC,EAAMC,GAClB,IAAIC,EACJ,QAAwB,IAApBJ,EAA+B,CAE/B,OADgBA,IAC2DK,QAAQ,OAAQ,GAC/F,CAEA,OAA0C,QAAlCD,EA9BZ,SAAqBD,GACjB,MAAOG,EAAWC,G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,EAAAA,QAAA,CAAQF,YAAsB,aAAW,OACvCN,eAIT,kBChCW,UAEN,MAAA,CAAIL,UAAWI,EACZC,SAAAH,EAAAA,IAACH,2BCOM,EAAGkB,YAAWC,cAAaC,iBAAgBjD,MAC1D,MAAOkD,EAASC,GAAc7D,EAAAA,UAAS,GAOvC,OACI0C,EAAAA,IAACoB,EAAAA,QAAA,CAEGC,QACIH,EACII,EAAAA,KAACf,EAAA,CACGJ,SAAA,CAAAH,EAAAA,IAACuB,EAAA,CACGC,MAAM,UACNC,SAAS,UAEZT,KAGLD,EAGRN,UAAU,MAEVN,SAAAmB,EAAAA,KAACI,EAAAA,OAAA,CACG,YAAU,KACVZ,QAAQ,YACRa,QAAS,KAAMC,OA1BFC,EA0BkBZ,EAzBvCE,GAAW,QACXW,UAAUC,UAAUC,UAAUH,GAFV,IAACA,GA2BbI,YAAa,IAAMd,GAAW,MAC1BnD,EAEJmC,SAAA,GAAAH,IAACkC,EAAA,CAAU,eAAW,IACtBlC,EAAAA,IAAC,OAAA,CAAKF,UAAW,UAAYK,SAAAY,+EC3C9B,EAAGZ,cAAanC,KAEvBgC,EAAAA,IAAC,MAAA,CACGF,UAAWI,KACPlC,EAEHmC","x_google_ignoreList":[0,1,2,3]}
1
+ {"version":3,"file":"shared-ui.cjs","sources":["../node_modules/@navikt/aksel-icons/dist/react/esm/util/useId.js","../node_modules/@navikt/aksel-icons/dist/react/esm/Buildings3.js","../node_modules/@navikt/aksel-icons/dist/react/esm/CheckmarkCircleFill.js","../node_modules/@navikt/aksel-icons/dist/react/esm/Files.js","../src/components/org-logo/index.tsx","../src/components/hstack/index.tsx","../src/components/helptext/index.tsx","../src/components/app-bar/index.tsx","../src/components/checkbox-group/index.tsx","../src/components/copy-button/index.tsx","../src/components/radio-group/index.tsx","../src/components/tag-list/index.tsx","../src/components/vstack/index.tsx"],"sourcesContent":["//https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/useId.ts\nimport React, { useEffect, useState } from \"react\";\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = useState(idOverride);\n const id = idOverride || defaultId;\n useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`aksel-icon-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\nconst maybeReactUseId = React[\"useId\" + \"\" // Workaround for https://github.com/webpack/webpack/issues/14814\n];\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport function useId(idOverride) {\n var _a;\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride !== null && idOverride !== void 0 ? idOverride : reactId.replace(/(:)/g, \"\");\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `useId` is invariant at runtime.\n return (_a = useGlobalId(idOverride)) !== null && _a !== void 0 ? _a : \"\";\n}\n//# sourceMappingURL=useId.js.map","\"use client\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { forwardRef } from \"react\";\nimport { useId } from \"./util/useId.js\";\nconst SvgBuildings3 = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"none\", viewBox: \"0 0 24 24\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M6.25 3A.75.75 0 0 1 7 2.25h10a.75.75 0 0 1 .75.75v6.25H21a.75.75 0 0 1 .75.75v11a.75.75 0 0 1-.75.75H3a.75.75 0 0 1-.75-.75V10A.75.75 0 0 1 3 9.25h3.25zm11.5 17.25v-9.5h2.5v9.5zm-1.5-16.5v16.5h-8.5V3.75zm-10 7v9.5h-2.5v-9.5zm3.75-5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m3 0a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m-2.25 6.75a.75.75 0 0 0-1.5 0v2a.75.75 0 0 0 1.5 0zm2.25-.75a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75\", clipRule: \"evenodd\" }));\n});\nexport default SvgBuildings3;\n//# sourceMappingURL=Buildings3.js.map","\"use client\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { forwardRef } from \"react\";\nimport { useId } from \"./util/useId.js\";\nconst SvgCheckmarkCircleFill = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"none\", viewBox: \"0 0 24 24\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M12 21.75c5.385 0 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25 2.25 6.615 2.25 12s4.365 9.75 9.75 9.75m4.954-12.475a.813.813 0 0 0-1.24-1.05l-5.389 6.368L7.7 11.967a.812.812 0 0 0-1.15 1.15l3.25 3.25a.81.81 0 0 0 1.195-.05z\", clipRule: \"evenodd\" }));\n});\nexport default SvgCheckmarkCircleFill;\n//# sourceMappingURL=CheckmarkCircleFill.js.map","\"use client\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { forwardRef } from \"react\";\nimport { useId } from \"./util/useId.js\";\nconst SvgFiles = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"none\", viewBox: \"0 0 24 24\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8.25 3.5c0-.69.56-1.25 1.25-1.25H14a.75.75 0 0 1 .53.22l5 5c.141.14.22.331.22.53v8.5c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25zm6.25 5.25c-.69 0-1.25-.56-1.25-1.25V3.75h-3.5v12.5h8.5v-7.5zm.25-3.94 2.44 2.44h-2.44zM6.502 7.75H5.75v12.5h8.5v-.748a.75.75 0 0 1 1.5 0v.998c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25v-13c0-.69.56-1.25 1.25-1.25h1.002a.75.75 0 1 1 0 1.5\", clipRule: \"evenodd\" }));\n});\nexport default SvgFiles;\n//# sourceMappingURL=Files.js.map","import React from 'react';\nimport cn from 'classnames';\nimport { Buildings3Icon } from '@navikt/aksel-icons';\nimport styles from './styles.module.scss';\n\nexport type OrgLogoProps = {\n orgLogoSrc?: string | null;\n className?: string;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nconst OrgLogo = ({ className, orgLogoSrc, ...props }: OrgLogoProps) => {\n return (\n <div className={cn(styles.orgLogo, className)} {...props}>\n {orgLogoSrc ? (\n <img\n aria-hidden\n src={orgLogoSrc}\n alt=''\n />\n ) : (\n <Buildings3Icon aria-hidden />\n )}\n </div>\n );\n};\n\nexport { OrgLogo };\n","import React from 'react';\nimport cn from 'classnames';\n\nimport styles from './hstack.module.scss';\n\nconst HStack = ({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div\n className={cn(styles.wrapper, className)}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nexport default HStack;\n","import React from 'react';\nimport { Popover } from '@digdir/designsystemet-react';\nimport styles from './helptext.module.scss';\n\nexport type HelpTextProps = {\n /**\n * Required descriptive label for screen readers.\n **/\n \"aria-label\": string;\n /**\n * Placement of the Popover.\n * @default 'right'\n */\n placement?: \"right\" | \"bottom\" | \"left\" | \"top\";\n } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"color\">;\n \n export const HelpText = React.forwardRef<HTMLButtonElement, HelpTextProps>(\n function HelpText(\n { placement = \"right\", children, ...rest },\n ref\n ) {\n return (\n <Popover.TriggerContext>\n <Popover.Trigger\n className={styles.helptext}\n ref={ref}\n variant=\"tertiary\"\n data-color=\"info\"\n {...rest}\n />\n <Popover placement={placement} data-color=\"info\">\n {children}\n </Popover>\n </Popover.TriggerContext>\n );\n }\n );","import { OrgLogo } from '../org-logo';\nimport styles from './styles.module.scss';\n\nconst AppBar = () => {\n return (\n <div className={styles.appBar}>\n <OrgLogo />\n </div>\n );\n};\n\nexport { AppBar };","import React, { type ReactNode } from 'react';\nimport {\n Fieldset,\n Checkbox,\n ValidationMessage,\n type UseCheckboxGroupProps,\n useCheckboxGroup,\n} from '@digdir/designsystemet-react';\n\nexport interface CheckboxGroupProps extends Omit<UseCheckboxGroupProps, 'value' | 'onChange'> {\n /**\n * The legend text for the fieldset\n */\n legend?: ReactNode;\n /**\n * Optional description text for the fieldset\n */\n description?: ReactNode;\n /**\n * Array of checkbox options\n */\n options: Array<{\n value: string;\n label: string;\n description?: string;\n disabled?: boolean;\n allowIndeterminate?: boolean;\n }>;\n /**\n * Controlled value - array of selected checkbox values\n */\n value?: string[];\n /**\n * Callback when the selected values change\n */\n onChange?: (value: string[]) => void;\n /**\n * Optional className for the fieldset\n */\n className?: string;\n}\n\n/**\n * CheckboxGroup component that wraps multiple Checkbox components in a Fieldset.\n * Handles state management, onChange, and value automatically.\n *\n * @example\n * <CheckboxGroup\n * legend=\"Hvordan vil du kontaktes?\"\n * description=\"Velg alle relevante alternativer\"\n * options={[\n * { value: 'epost', label: 'E-post' },\n * { value: 'telefon', label: 'Telefon' },\n * { value: 'sms', label: 'SMS' },\n * ]}\n * value={selectedValues}\n * onChange={(values) => setSelectedValues(values)}\n * />\n */\nexport const CheckboxGroup = ({\n legend,\n description,\n options,\n value,\n onChange,\n error,\n disabled,\n readOnly,\n required,\n name,\n className,\n}: CheckboxGroupProps) => {\n const { getCheckboxProps, validationMessageProps } = useCheckboxGroup({\n value,\n onChange: onChange ? (nextValue) => onChange(nextValue) : undefined,\n error,\n disabled,\n readOnly,\n required,\n name,\n });\n\n return (\n <Fieldset className={className}>\n {legend && <Fieldset.Legend>{legend}</Fieldset.Legend>}\n {description && <Fieldset.Description>{description}</Fieldset.Description>}\n {options.map((option) => (\n <Checkbox\n key={option.value}\n label={option.label}\n description={option.description}\n disabled={option.disabled}\n {...getCheckboxProps({\n value: option.value,\n allowIndeterminate: option.allowIndeterminate,\n })}\n />\n ))}\n {error && <ValidationMessage {...validationMessageProps} />}\n </Fieldset>\n );\n};\n\nexport default CheckboxGroup;\n\n","'use client';\n\nimport { useState } from 'react';\nimport { Button, type ButtonProps, Tooltip } from '@digdir/designsystemet-react';\nimport { FilesIcon, CheckmarkCircleFillIcon } from '@navikt/aksel-icons';\nimport HStack from '../hstack';\n\ntype CopyButtonProps = {\n copyLabel: string;\n copiedLabel: string;\n copyOnClick: string;\n} & ButtonProps & React.HTMLAttributes<HTMLButtonElement>;\n\nconst CopyButton = ({ copyLabel, copiedLabel, copyOnClick, ...props }: CopyButtonProps) => {\n const [clicked, setClicked] = useState(false);\n\n const copyToClipboard = (text: string) => {\n setClicked(true);\n navigator.clipboard.writeText(text);\n };\n\n return (\n <Tooltip\n // @ts-expect-error: ignore complaint that Element cannot be set as content\n content={\n clicked ? (\n <HStack>\n <CheckmarkCircleFillIcon\n color='#D1F4E1'\n fontSize='1.2em'\n />\n {copiedLabel}\n </HStack>\n ) : (\n copyLabel\n )\n }\n placement='top'\n >\n <Button\n data-size='sm'\n variant='secondary'\n onClick={() => copyToClipboard(copyOnClick)}\n onMouseOver={() => setClicked(false)}\n {...props}\n >\n <FilesIcon aria-hidden />\n <span className={'sr-only'}>{copyLabel}</span>\n </Button>\n </Tooltip>\n );\n};\n\nexport default CopyButton;\n","import React, { type ReactNode } from 'react';\nimport {\n Fieldset,\n Radio,\n ValidationMessage,\n type UseRadioGroupProps,\n useRadioGroup,\n} from '@digdir/designsystemet-react';\n\nexport interface RadioGroupProps extends Omit<UseRadioGroupProps, 'value' | 'onChange'> {\n /**\n * The legend text for the fieldset\n */\n legend?: ReactNode;\n /**\n * Optional description text for the fieldset\n */\n description?: ReactNode;\n /**\n * Array of radio options\n */\n options: Array<{\n value: string;\n label: string;\n description?: string;\n disabled?: boolean;\n }>;\n /**\n * Controlled value - the selected radio value\n */\n value?: string;\n /**\n * Callback when the selected value changes\n */\n onChange?: (value: string) => void;\n /**\n * Optional className for the fieldset\n */\n className?: string;\n}\n\n/**\n * RadioGroup component that wraps multiple Radio components in a Fieldset.\n * Handles state management, onChange, and value automatically.\n *\n * @example\n * <RadioGroup\n * legend=\"Hvilken iskremsmak er best?\"\n * description=\"Velg din favorittsmak\"\n * options={[\n * { value: 'vanilje', label: 'Vanilje' },\n * { value: 'jordbær', label: 'Jordbær' },\n * { value: 'sjokolade', label: 'Sjokolade' },\n * ]}\n * value={selectedValue}\n * onChange={(value) => setSelectedValue(value)}\n * />\n */\nexport const RadioGroup = ({\n legend,\n description,\n options,\n value,\n onChange,\n error,\n disabled,\n readOnly,\n required,\n name,\n className,\n}: RadioGroupProps) => {\n const { getRadioProps, validationMessageProps } = useRadioGroup({\n value,\n onChange: onChange ? (nextValue) => onChange(nextValue) : undefined,\n error,\n disabled,\n readOnly,\n required,\n name,\n });\n\n return (\n <Fieldset className={className}>\n {legend && <Fieldset.Legend>{legend}</Fieldset.Legend>}\n {description && <Fieldset.Description>{description}</Fieldset.Description>}\n {options.map((option) => (\n <Radio\n key={option.value}\n label={option.label}\n description={option.description}\n disabled={option.disabled}\n {...getRadioProps(option.value)}\n />\n ))}\n {error && <ValidationMessage {...validationMessageProps} />}\n </Fieldset>\n );\n};\n\nexport default RadioGroup;\n\n","import React from 'react';\nimport cn from 'classnames';\nimport { Tag } from '@digdir/designsystemet-react';\nimport styles from './styles.module.scss';\n\nexport type TagListProps = {\n maxTags?: number;\n 'data-size'?: string;\n};\n\nconst TagList = ({ children, className, maxTags, 'data-size': dataSize, ...props }: TagListProps & React.HTMLAttributes<HTMLUListElement>) => {\n const childArray = React.Children.toArray(children);\n if (!childArray.length) return null;\n return (\n <ul\n className={cn(styles.tagList, className)}\n {...props}\n >\n {childArray\n .filter((child) => Boolean(child))\n .slice(0, maxTags ?? childArray.length)\n .map((child, i) => {\n const key = React.isValidElement(child) && child.key != null \n ? child.key \n : i;\n return <li key={key}>{child}</li>;\n })}\n {maxTags && maxTags < childArray.length && (\n <li>\n <Tag data-size={dataSize || 'sm'}>\n <span>+{childArray.length - maxTags}</span>\n </Tag>\n </li>\n )}\n </ul>\n );\n};\n\nexport default TagList;\n","import React from 'react';\n\nimport styles from './vstack.module.scss';\n\nconst VStack = ({ children, ...props }: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div\n className={styles.wrapper}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nexport default VStack;\n"],"names":["globalId","maybeReactUseId","React","useId","idOverride","_a","replace","defaultId","setDefaultId","useState","id","useEffect","useGlobalId","SvgBuildings3","forwardRef","ref","title","titleId","_titleId","props","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","__rest","createElement","assign","xmlns","width","height","fill","viewBox","focusable","role","fillRule","d","clipRule","SvgCheckmarkCircleFill","SvgFiles","OrgLogo","className","orgLogoSrc","jsx","cn","styles","children","src","alt","Buildings3Icon","HStack","HelpText","placement","rest","Popover","TriggerContext","Trigger","variant","legend","description","options","value","onChange","error","disabled","readOnly","required","name","getCheckboxProps","validationMessageProps","useCheckboxGroup","nextValue","Fieldset","Legend","Description","map","option","Checkbox","label","allowIndeterminate","ValidationMessage","copyLabel","copiedLabel","copyOnClick","clicked","setClicked","Tooltip","content","jsxs","CheckmarkCircleFillIcon","color","fontSize","Button","onClick","copyToClipboard","text","navigator","clipboard","writeText","onMouseOver","FilesIcon","getRadioProps","useRadioGroup","Radio","maxTags","dataSize","childArray","Children","toArray","filter","child","Boolean","slice","key","isValidElement","Tag"],"mappings":"0MAEA,IAAIA,EAAW,EAgBf,MAAMC,EAAkBC,E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AgE,GAANG,KAEvBT,GAAWA,EAAUE,EAAWnF,UAC7BoB,IAAC,KAAA,CACGG,SAAAH,EAAAA,IAACwE,EAAAA,IAAA,CAAI,YAAWV,GAAY,KACxB3D,SAAA0C,OAAC,OAAA,CAAK1C,SAAA,CAAA,IAAE4D,EAAWnF,OAASiF,YAlBjB,qBCRpB,EAAG1D,cAAanC,KAEvBgC,EAAAA,IAAC,MAAA,CACGF,UAAWI,KACPlC,EAEHmC","x_google_ignoreList":[0,1,2,3]}
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import cn from "classnames";
3
3
  import React, { useState, useEffect, forwardRef } from "react";
4
- import { Tooltip, Button, Popover } from "@digdir/designsystemet-react";
4
+ import { Tooltip, Button, Popover, Tag, useRadioGroup, Fieldset, Radio, ValidationMessage, useCheckboxGroup, Checkbox } from "@digdir/designsystemet-react";
5
5
  let globalId = 0;
6
6
  function useGlobalId(idOverride) {
7
7
  const [defaultId, setDefaultId] = useState(idOverride);
@@ -92,12 +92,12 @@ const SvgFiles = forwardRef((_a, ref) => {
92
92
  React.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M8.25 3.5c0-.69.56-1.25 1.25-1.25H14a.75.75 0 0 1 .53.22l5 5c.141.14.22.331.22.53v8.5c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25zm6.25 5.25c-.69 0-1.25-.56-1.25-1.25V3.75h-3.5v12.5h8.5v-7.5zm.25-3.94 2.44 2.44h-2.44zM6.502 7.75H5.75v12.5h8.5v-.748a.75.75 0 0 1 1.5 0v.998c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25v-13c0-.69.56-1.25 1.25-1.25h1.002a.75.75 0 1 1 0 1.5", clipRule: "evenodd" })
93
93
  );
94
94
  });
95
- const orgLogo = "_orgLogo_8xxnq_1";
96
- const styles$4 = {
95
+ const orgLogo = "_orgLogo_eki51_1";
96
+ const styles$5 = {
97
97
  orgLogo
98
98
  };
99
99
  const OrgLogo = ({ className, orgLogoSrc, ...props }) => {
100
- return /* @__PURE__ */ jsx("div", { className: cn(styles$4.orgLogo, className), ...props, children: orgLogoSrc ? /* @__PURE__ */ jsx(
100
+ return /* @__PURE__ */ jsx("div", { className: cn(styles$5.orgLogo, className), ...props, children: orgLogoSrc ? /* @__PURE__ */ jsx(
101
101
  "img",
102
102
  {
103
103
  "aria-hidden": true,
@@ -107,21 +107,21 @@ const OrgLogo = ({ className, orgLogoSrc, ...props }) => {
107
107
  ) : /* @__PURE__ */ jsx(SvgBuildings3, { "aria-hidden": true }) });
108
108
  };
109
109
  const appBar = "_appBar_w0gn2_1";
110
- const styles$3 = {
110
+ const styles$4 = {
111
111
  appBar
112
112
  };
113
113
  const AppBar = () => {
114
- return /* @__PURE__ */ jsx("div", { className: styles$3.appBar, children: /* @__PURE__ */ jsx(OrgLogo, {}) });
114
+ return /* @__PURE__ */ jsx("div", { className: styles$4.appBar, children: /* @__PURE__ */ jsx(OrgLogo, {}) });
115
115
  };
116
116
  const wrapper$1 = "_wrapper_1dyfs_1";
117
- const styles$2 = {
117
+ const styles$3 = {
118
118
  wrapper: wrapper$1
119
119
  };
120
120
  const HStack = ({ children, className, ...props }) => {
121
121
  return /* @__PURE__ */ jsx(
122
122
  "div",
123
123
  {
124
- className: cn(styles$2.wrapper, className),
124
+ className: cn(styles$3.wrapper, className),
125
125
  ...props,
126
126
  children
127
127
  }
@@ -165,21 +165,21 @@ const CopyButton = ({ copyLabel, copiedLabel, copyOnClick, ...props }) => {
165
165
  );
166
166
  };
167
167
  const wrapper = "_wrapper_m33an_1";
168
- const styles$1 = {
168
+ const styles$2 = {
169
169
  wrapper
170
170
  };
171
171
  const VStack = ({ children, ...props }) => {
172
172
  return /* @__PURE__ */ jsx(
173
173
  "div",
174
174
  {
175
- className: styles$1.wrapper,
175
+ className: styles$2.wrapper,
176
176
  ...props,
177
177
  children
178
178
  }
179
179
  );
180
180
  };
181
181
  const helptext = "_helptext_1o0ls_1";
182
- const styles = {
182
+ const styles$1 = {
183
183
  helptext
184
184
  };
185
185
  const HelpText = React.forwardRef(
@@ -188,7 +188,7 @@ const HelpText = React.forwardRef(
188
188
  /* @__PURE__ */ jsx(
189
189
  Popover.Trigger,
190
190
  {
191
- className: styles.helptext,
191
+ className: styles$1.helptext,
192
192
  ref,
193
193
  variant: "tertiary",
194
194
  "data-color": "info",
@@ -199,12 +199,119 @@ const HelpText = React.forwardRef(
199
199
  ] });
200
200
  }
201
201
  );
202
+ const tagList = "_tagList_1n3j5_1";
203
+ const styles = {
204
+ tagList
205
+ };
206
+ const TagList = ({ children, className, maxTags, "data-size": dataSize, ...props }) => {
207
+ const childArray = React.Children.toArray(children);
208
+ if (!childArray.length) return null;
209
+ return /* @__PURE__ */ jsxs(
210
+ "ul",
211
+ {
212
+ className: cn(styles.tagList, className),
213
+ ...props,
214
+ children: [
215
+ childArray.filter((child) => Boolean(child)).slice(0, maxTags ?? childArray.length).map((child, i) => {
216
+ const key = React.isValidElement(child) && child.key != null ? child.key : i;
217
+ return /* @__PURE__ */ jsx("li", { children: child }, key);
218
+ }),
219
+ maxTags && maxTags < childArray.length && /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Tag, { "data-size": dataSize || "sm", children: /* @__PURE__ */ jsxs("span", { children: [
220
+ "+",
221
+ childArray.length - maxTags
222
+ ] }) }) })
223
+ ]
224
+ }
225
+ );
226
+ };
227
+ const RadioGroup = ({
228
+ legend,
229
+ description,
230
+ options,
231
+ value,
232
+ onChange,
233
+ error,
234
+ disabled,
235
+ readOnly,
236
+ required,
237
+ name,
238
+ className
239
+ }) => {
240
+ const { getRadioProps, validationMessageProps } = useRadioGroup({
241
+ value,
242
+ onChange: onChange ? (nextValue) => onChange(nextValue) : void 0,
243
+ error,
244
+ disabled,
245
+ readOnly,
246
+ required,
247
+ name
248
+ });
249
+ return /* @__PURE__ */ jsxs(Fieldset, { className, children: [
250
+ legend && /* @__PURE__ */ jsx(Fieldset.Legend, { children: legend }),
251
+ description && /* @__PURE__ */ jsx(Fieldset.Description, { children: description }),
252
+ options.map((option) => /* @__PURE__ */ jsx(
253
+ Radio,
254
+ {
255
+ label: option.label,
256
+ description: option.description,
257
+ disabled: option.disabled,
258
+ ...getRadioProps(option.value)
259
+ },
260
+ option.value
261
+ )),
262
+ error && /* @__PURE__ */ jsx(ValidationMessage, { ...validationMessageProps })
263
+ ] });
264
+ };
265
+ const CheckboxGroup = ({
266
+ legend,
267
+ description,
268
+ options,
269
+ value,
270
+ onChange,
271
+ error,
272
+ disabled,
273
+ readOnly,
274
+ required,
275
+ name,
276
+ className
277
+ }) => {
278
+ const { getCheckboxProps, validationMessageProps } = useCheckboxGroup({
279
+ value,
280
+ onChange: onChange ? (nextValue) => onChange(nextValue) : void 0,
281
+ error,
282
+ disabled,
283
+ readOnly,
284
+ required,
285
+ name
286
+ });
287
+ return /* @__PURE__ */ jsxs(Fieldset, { className, children: [
288
+ legend && /* @__PURE__ */ jsx(Fieldset.Legend, { children: legend }),
289
+ description && /* @__PURE__ */ jsx(Fieldset.Description, { children: description }),
290
+ options.map((option) => /* @__PURE__ */ jsx(
291
+ Checkbox,
292
+ {
293
+ label: option.label,
294
+ description: option.description,
295
+ disabled: option.disabled,
296
+ ...getCheckboxProps({
297
+ value: option.value,
298
+ allowIndeterminate: option.allowIndeterminate
299
+ })
300
+ },
301
+ option.value
302
+ )),
303
+ error && /* @__PURE__ */ jsx(ValidationMessage, { ...validationMessageProps })
304
+ ] });
305
+ };
202
306
  export {
203
307
  AppBar,
308
+ CheckboxGroup,
204
309
  CopyButton,
205
310
  HStack,
206
311
  HelpText,
207
312
  OrgLogo,
313
+ RadioGroup,
314
+ TagList,
208
315
  VStack
209
316
  };
210
317
  //# sourceMappingURL=shared-ui.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared-ui.es.js","sources":["../node_modules/@navikt/aksel-icons/dist/react/esm/util/useId.js","../node_modules/@navikt/aksel-icons/dist/react/esm/Buildings3.js","../node_modules/@navikt/aksel-icons/dist/react/esm/CheckmarkCircleFill.js","../node_modules/@navikt/aksel-icons/dist/react/esm/Files.js","../src/components/org-logo/index.tsx","../src/components/app-bar/index.tsx","../src/components/hstack/index.tsx","../src/components/copy-button/index.tsx","../src/components/vstack/index.tsx","../src/components/helptext/index.tsx"],"sourcesContent":["//https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/useId.ts\nimport React, { useEffect, useState } from \"react\";\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = useState(idOverride);\n const id = idOverride || defaultId;\n useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`aksel-icon-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\nconst maybeReactUseId = React[\"useId\" + \"\" // Workaround for https://github.com/webpack/webpack/issues/14814\n];\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport function useId(idOverride) {\n var _a;\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride !== null && idOverride !== void 0 ? idOverride : reactId.replace(/(:)/g, \"\");\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `useId` is invariant at runtime.\n return (_a = useGlobalId(idOverride)) !== null && _a !== void 0 ? _a : \"\";\n}\n//# sourceMappingURL=useId.js.map","\"use client\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { forwardRef } from \"react\";\nimport { useId } from \"./util/useId.js\";\nconst SvgBuildings3 = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"none\", viewBox: \"0 0 24 24\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M6.25 3A.75.75 0 0 1 7 2.25h10a.75.75 0 0 1 .75.75v6.25H21a.75.75 0 0 1 .75.75v11a.75.75 0 0 1-.75.75H3a.75.75 0 0 1-.75-.75V10A.75.75 0 0 1 3 9.25h3.25zm11.5 17.25v-9.5h2.5v9.5zm-1.5-16.5v16.5h-8.5V3.75zm-10 7v9.5h-2.5v-9.5zm3.75-5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m3 0a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m-2.25 6.75a.75.75 0 0 0-1.5 0v2a.75.75 0 0 0 1.5 0zm2.25-.75a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75\", clipRule: \"evenodd\" }));\n});\nexport default SvgBuildings3;\n//# sourceMappingURL=Buildings3.js.map","\"use client\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { forwardRef } from \"react\";\nimport { useId } from \"./util/useId.js\";\nconst SvgCheckmarkCircleFill = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"none\", viewBox: \"0 0 24 24\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M12 21.75c5.385 0 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25 2.25 6.615 2.25 12s4.365 9.75 9.75 9.75m4.954-12.475a.813.813 0 0 0-1.24-1.05l-5.389 6.368L7.7 11.967a.812.812 0 0 0-1.15 1.15l3.25 3.25a.81.81 0 0 0 1.195-.05z\", clipRule: \"evenodd\" }));\n});\nexport default SvgCheckmarkCircleFill;\n//# sourceMappingURL=CheckmarkCircleFill.js.map","\"use client\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { forwardRef } from \"react\";\nimport { useId } from \"./util/useId.js\";\nconst SvgFiles = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"none\", viewBox: \"0 0 24 24\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8.25 3.5c0-.69.56-1.25 1.25-1.25H14a.75.75 0 0 1 .53.22l5 5c.141.14.22.331.22.53v8.5c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25zm6.25 5.25c-.69 0-1.25-.56-1.25-1.25V3.75h-3.5v12.5h8.5v-7.5zm.25-3.94 2.44 2.44h-2.44zM6.502 7.75H5.75v12.5h8.5v-.748a.75.75 0 0 1 1.5 0v.998c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25v-13c0-.69.56-1.25 1.25-1.25h1.002a.75.75 0 1 1 0 1.5\", clipRule: \"evenodd\" }));\n});\nexport default SvgFiles;\n//# sourceMappingURL=Files.js.map","import React from 'react';\nimport cn from 'classnames';\nimport { Buildings3Icon } from '@navikt/aksel-icons';\nimport styles from './styles.module.scss';\n\nexport type OrgLogoProps = {\n orgLogoSrc?: string | null;\n className?: string;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nconst OrgLogo = ({ className, orgLogoSrc, ...props }: OrgLogoProps) => {\n return (\n <div className={cn(styles.orgLogo, className)} {...props}>\n {orgLogoSrc ? (\n <img\n aria-hidden\n src={orgLogoSrc}\n alt=''\n />\n ) : (\n <Buildings3Icon aria-hidden />\n )}\n </div>\n );\n};\n\nexport { OrgLogo };\n","import { OrgLogo } from '../org-logo';\nimport styles from './styles.module.scss';\n\nconst AppBar = () => {\n return (\n <div className={styles.appBar}>\n <OrgLogo />\n </div>\n );\n};\n\nexport { AppBar };","import React from 'react';\nimport cn from 'classnames';\n\nimport styles from './hstack.module.scss';\n\nconst HStack = ({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div\n className={cn(styles.wrapper, className)}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nexport default HStack;\n","'use client';\n\nimport { useState } from 'react';\nimport { Button, type ButtonProps, Tooltip } from '@digdir/designsystemet-react';\nimport { FilesIcon, CheckmarkCircleFillIcon } from '@navikt/aksel-icons';\nimport HStack from '../hstack';\n\ntype CopyButtonProps = {\n copyLabel: string;\n copiedLabel: string;\n copyOnClick: string;\n} & ButtonProps & React.HTMLAttributes<HTMLButtonElement>;\n\nconst CopyButton = ({ copyLabel, copiedLabel, copyOnClick, ...props }: CopyButtonProps) => {\n const [clicked, setClicked] = useState(false);\n\n const copyToClipboard = (text: string) => {\n setClicked(true);\n navigator.clipboard.writeText(text);\n };\n\n return (\n <Tooltip\n // @ts-expect-error: ignore complaint that Element cannot be set as content\n content={\n clicked ? (\n <HStack>\n <CheckmarkCircleFillIcon\n color='#D1F4E1'\n fontSize='1.2em'\n />\n {copiedLabel}\n </HStack>\n ) : (\n copyLabel\n )\n }\n placement='top'\n >\n <Button\n data-size='sm'\n variant='secondary'\n onClick={() => copyToClipboard(copyOnClick)}\n onMouseOver={() => setClicked(false)}\n {...props}\n >\n <FilesIcon aria-hidden />\n <span className={'sr-only'}>{copyLabel}</span>\n </Button>\n </Tooltip>\n );\n};\n\nexport default CopyButton;\n","import React from 'react';\n\nimport styles from './vstack.module.scss';\n\nconst VStack = ({ children, ...props }: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div\n className={styles.wrapper}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nexport default VStack;\n","import React from 'react';\nimport { Popover } from '@digdir/designsystemet-react';\nimport styles from './helptext.module.scss';\n\nexport type HelpTextProps = {\n /**\n * Required descriptive label for screen readers.\n **/\n \"aria-label\": string;\n /**\n * Placement of the Popover.\n * @default 'right'\n */\n placement?: \"right\" | \"bottom\" | \"left\" | \"top\";\n } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"color\">;\n \n export const HelpText = React.forwardRef<HTMLButtonElement, HelpTextProps>(\n function HelpText(\n { placement = \"right\", children, ...rest },\n ref\n ) {\n return (\n <Popover.TriggerContext>\n <Popover.Trigger\n className={styles.helptext}\n ref={ref}\n variant=\"tertiary\"\n data-color=\"info\"\n {...rest}\n />\n <Popover placement={placement} data-color=\"info\">\n {children}\n </Popover>\n </Popover.TriggerContext>\n );\n }\n );"],"names":["__rest","styles","Buildings3Icon","CheckmarkCircleFillIcon","FilesIcon","HelpText"],"mappings":";;;;AAEA,IAAI,WAAW;AACf,SAAS,YAAY,YAAY;AAC7B,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,UAAU;AACrD,QAAM,KAAK,cAAc;AACzB,YAAU,MAAM;AACZ,QAAI,aAAa,MAAM;AAKnB,kBAAY;AACZ,mBAAa,cAAc,QAAQ,EAAE;AAAA,IACzC;AAAA,EACJ,GAAG,CAAC,SAAS,CAAC;AACd,SAAO;AACX;AACA,MAAM,kBAAkB;AAAA,EAAM;AAAA;AAC9B;AAOO,SAAS,MAAM,YAAY;AAC9B,MAAI;AACJ,MAAI,oBAAoB,QAAW;AAC/B,UAAM,UAAU,gBAAe;AAC/B,WAAmE,QAAQ,QAAQ,QAAQ,EAAE;AAAA,EACjG;AAEA,UAAQ,KAAK,YAAY,UAAU,OAAO,QAAQ,OAAO,SAAS,KAAK;AAC3E;ACjCA,IAAIA,WAAkC,SAAU,GAAG,GAAG;AAClD,MAAI,IAAI,CAAA;AACR,WAAS,KAAK,EAAG,KAAI,OAAO,UAAU,eAAe,KAAK,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI;AAC9E,MAAE,CAAC,IAAI,EAAE,CAAC;AACd,MAAI,KAAK,QAAQ,OAAO,OAAO,0BAA0B;AACrD,aAAS,IAAI,GAAG,IAAI,OAAO,sBAAsB,CAAC,GAAG,IAAI,EAAE,QAAQ,KAAK;AACpE,UAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,IA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;","x_google_ignoreList":[0,1,2,3]}
1
+ {"version":3,"file":"shared-ui.es.js","sources":["../node_modules/@navikt/aksel-icons/dist/react/esm/util/useId.js","../node_modules/@navikt/aksel-icons/dist/react/esm/Buildings3.js","../node_modules/@navikt/aksel-icons/dist/react/esm/CheckmarkCircleFill.js","../node_modules/@navikt/aksel-icons/dist/react/esm/Files.js","../src/components/org-logo/index.tsx","../src/components/app-bar/index.tsx","../src/components/hstack/index.tsx","../src/components/copy-button/index.tsx","../src/components/vstack/index.tsx","../src/components/helptext/index.tsx","../src/components/tag-list/index.tsx","../src/components/radio-group/index.tsx","../src/components/checkbox-group/index.tsx"],"sourcesContent":["//https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/useId.ts\nimport React, { useEffect, useState } from \"react\";\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = useState(idOverride);\n const id = idOverride || defaultId;\n useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`aksel-icon-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\nconst maybeReactUseId = React[\"useId\" + \"\" // Workaround for https://github.com/webpack/webpack/issues/14814\n];\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport function useId(idOverride) {\n var _a;\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride !== null && idOverride !== void 0 ? idOverride : reactId.replace(/(:)/g, \"\");\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `useId` is invariant at runtime.\n return (_a = useGlobalId(idOverride)) !== null && _a !== void 0 ? _a : \"\";\n}\n//# sourceMappingURL=useId.js.map","\"use client\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { forwardRef } from \"react\";\nimport { useId } from \"./util/useId.js\";\nconst SvgBuildings3 = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"none\", viewBox: \"0 0 24 24\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M6.25 3A.75.75 0 0 1 7 2.25h10a.75.75 0 0 1 .75.75v6.25H21a.75.75 0 0 1 .75.75v11a.75.75 0 0 1-.75.75H3a.75.75 0 0 1-.75-.75V10A.75.75 0 0 1 3 9.25h3.25zm11.5 17.25v-9.5h2.5v9.5zm-1.5-16.5v16.5h-8.5V3.75zm-10 7v9.5h-2.5v-9.5zm3.75-5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m3 0a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75m-2.25 6.75a.75.75 0 0 0-1.5 0v2a.75.75 0 0 0 1.5 0zm2.25-.75a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75\", clipRule: \"evenodd\" }));\n});\nexport default SvgBuildings3;\n//# sourceMappingURL=Buildings3.js.map","\"use client\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { forwardRef } from \"react\";\nimport { useId } from \"./util/useId.js\";\nconst SvgCheckmarkCircleFill = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"none\", viewBox: \"0 0 24 24\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M12 21.75c5.385 0 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25 2.25 6.615 2.25 12s4.365 9.75 9.75 9.75m4.954-12.475a.813.813 0 0 0-1.24-1.05l-5.389 6.368L7.7 11.967a.812.812 0 0 0-1.15 1.15l3.25 3.25a.81.81 0 0 0 1.195-.05z\", clipRule: \"evenodd\" }));\n});\nexport default SvgCheckmarkCircleFill;\n//# sourceMappingURL=CheckmarkCircleFill.js.map","\"use client\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { forwardRef } from \"react\";\nimport { useId } from \"./util/useId.js\";\nconst SvgFiles = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"none\", viewBox: \"0 0 24 24\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8.25 3.5c0-.69.56-1.25 1.25-1.25H14a.75.75 0 0 1 .53.22l5 5c.141.14.22.331.22.53v8.5c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25zm6.25 5.25c-.69 0-1.25-.56-1.25-1.25V3.75h-3.5v12.5h8.5v-7.5zm.25-3.94 2.44 2.44h-2.44zM6.502 7.75H5.75v12.5h8.5v-.748a.75.75 0 0 1 1.5 0v.998c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25v-13c0-.69.56-1.25 1.25-1.25h1.002a.75.75 0 1 1 0 1.5\", clipRule: \"evenodd\" }));\n});\nexport default SvgFiles;\n//# sourceMappingURL=Files.js.map","import React from 'react';\nimport cn from 'classnames';\nimport { Buildings3Icon } from '@navikt/aksel-icons';\nimport styles from './styles.module.scss';\n\nexport type OrgLogoProps = {\n orgLogoSrc?: string | null;\n className?: string;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nconst OrgLogo = ({ className, orgLogoSrc, ...props }: OrgLogoProps) => {\n return (\n <div className={cn(styles.orgLogo, className)} {...props}>\n {orgLogoSrc ? (\n <img\n aria-hidden\n src={orgLogoSrc}\n alt=''\n />\n ) : (\n <Buildings3Icon aria-hidden />\n )}\n </div>\n );\n};\n\nexport { OrgLogo };\n","import { OrgLogo } from '../org-logo';\nimport styles from './styles.module.scss';\n\nconst AppBar = () => {\n return (\n <div className={styles.appBar}>\n <OrgLogo />\n </div>\n );\n};\n\nexport { AppBar };","import React from 'react';\nimport cn from 'classnames';\n\nimport styles from './hstack.module.scss';\n\nconst HStack = ({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div\n className={cn(styles.wrapper, className)}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nexport default HStack;\n","'use client';\n\nimport { useState } from 'react';\nimport { Button, type ButtonProps, Tooltip } from '@digdir/designsystemet-react';\nimport { FilesIcon, CheckmarkCircleFillIcon } from '@navikt/aksel-icons';\nimport HStack from '../hstack';\n\ntype CopyButtonProps = {\n copyLabel: string;\n copiedLabel: string;\n copyOnClick: string;\n} & ButtonProps & React.HTMLAttributes<HTMLButtonElement>;\n\nconst CopyButton = ({ copyLabel, copiedLabel, copyOnClick, ...props }: CopyButtonProps) => {\n const [clicked, setClicked] = useState(false);\n\n const copyToClipboard = (text: string) => {\n setClicked(true);\n navigator.clipboard.writeText(text);\n };\n\n return (\n <Tooltip\n // @ts-expect-error: ignore complaint that Element cannot be set as content\n content={\n clicked ? (\n <HStack>\n <CheckmarkCircleFillIcon\n color='#D1F4E1'\n fontSize='1.2em'\n />\n {copiedLabel}\n </HStack>\n ) : (\n copyLabel\n )\n }\n placement='top'\n >\n <Button\n data-size='sm'\n variant='secondary'\n onClick={() => copyToClipboard(copyOnClick)}\n onMouseOver={() => setClicked(false)}\n {...props}\n >\n <FilesIcon aria-hidden />\n <span className={'sr-only'}>{copyLabel}</span>\n </Button>\n </Tooltip>\n );\n};\n\nexport default CopyButton;\n","import React from 'react';\n\nimport styles from './vstack.module.scss';\n\nconst VStack = ({ children, ...props }: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div\n className={styles.wrapper}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nexport default VStack;\n","import React from 'react';\nimport { Popover } from '@digdir/designsystemet-react';\nimport styles from './helptext.module.scss';\n\nexport type HelpTextProps = {\n /**\n * Required descriptive label for screen readers.\n **/\n \"aria-label\": string;\n /**\n * Placement of the Popover.\n * @default 'right'\n */\n placement?: \"right\" | \"bottom\" | \"left\" | \"top\";\n } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"color\">;\n \n export const HelpText = React.forwardRef<HTMLButtonElement, HelpTextProps>(\n function HelpText(\n { placement = \"right\", children, ...rest },\n ref\n ) {\n return (\n <Popover.TriggerContext>\n <Popover.Trigger\n className={styles.helptext}\n ref={ref}\n variant=\"tertiary\"\n data-color=\"info\"\n {...rest}\n />\n <Popover placement={placement} data-color=\"info\">\n {children}\n </Popover>\n </Popover.TriggerContext>\n );\n }\n );","import React from 'react';\nimport cn from 'classnames';\nimport { Tag } from '@digdir/designsystemet-react';\nimport styles from './styles.module.scss';\n\nexport type TagListProps = {\n maxTags?: number;\n 'data-size'?: string;\n};\n\nconst TagList = ({ children, className, maxTags, 'data-size': dataSize, ...props }: TagListProps & React.HTMLAttributes<HTMLUListElement>) => {\n const childArray = React.Children.toArray(children);\n if (!childArray.length) return null;\n return (\n <ul\n className={cn(styles.tagList, className)}\n {...props}\n >\n {childArray\n .filter((child) => Boolean(child))\n .slice(0, maxTags ?? childArray.length)\n .map((child, i) => {\n const key = React.isValidElement(child) && child.key != null \n ? child.key \n : i;\n return <li key={key}>{child}</li>;\n })}\n {maxTags && maxTags < childArray.length && (\n <li>\n <Tag data-size={dataSize || 'sm'}>\n <span>+{childArray.length - maxTags}</span>\n </Tag>\n </li>\n )}\n </ul>\n );\n};\n\nexport default TagList;\n","import React, { type ReactNode } from 'react';\nimport {\n Fieldset,\n Radio,\n ValidationMessage,\n type UseRadioGroupProps,\n useRadioGroup,\n} from '@digdir/designsystemet-react';\n\nexport interface RadioGroupProps extends Omit<UseRadioGroupProps, 'value' | 'onChange'> {\n /**\n * The legend text for the fieldset\n */\n legend?: ReactNode;\n /**\n * Optional description text for the fieldset\n */\n description?: ReactNode;\n /**\n * Array of radio options\n */\n options: Array<{\n value: string;\n label: string;\n description?: string;\n disabled?: boolean;\n }>;\n /**\n * Controlled value - the selected radio value\n */\n value?: string;\n /**\n * Callback when the selected value changes\n */\n onChange?: (value: string) => void;\n /**\n * Optional className for the fieldset\n */\n className?: string;\n}\n\n/**\n * RadioGroup component that wraps multiple Radio components in a Fieldset.\n * Handles state management, onChange, and value automatically.\n *\n * @example\n * <RadioGroup\n * legend=\"Hvilken iskremsmak er best?\"\n * description=\"Velg din favorittsmak\"\n * options={[\n * { value: 'vanilje', label: 'Vanilje' },\n * { value: 'jordbær', label: 'Jordbær' },\n * { value: 'sjokolade', label: 'Sjokolade' },\n * ]}\n * value={selectedValue}\n * onChange={(value) => setSelectedValue(value)}\n * />\n */\nexport const RadioGroup = ({\n legend,\n description,\n options,\n value,\n onChange,\n error,\n disabled,\n readOnly,\n required,\n name,\n className,\n}: RadioGroupProps) => {\n const { getRadioProps, validationMessageProps } = useRadioGroup({\n value,\n onChange: onChange ? (nextValue) => onChange(nextValue) : undefined,\n error,\n disabled,\n readOnly,\n required,\n name,\n });\n\n return (\n <Fieldset className={className}>\n {legend && <Fieldset.Legend>{legend}</Fieldset.Legend>}\n {description && <Fieldset.Description>{description}</Fieldset.Description>}\n {options.map((option) => (\n <Radio\n key={option.value}\n label={option.label}\n description={option.description}\n disabled={option.disabled}\n {...getRadioProps(option.value)}\n />\n ))}\n {error && <ValidationMessage {...validationMessageProps} />}\n </Fieldset>\n );\n};\n\nexport default RadioGroup;\n\n","import React, { type ReactNode } from 'react';\nimport {\n Fieldset,\n Checkbox,\n ValidationMessage,\n type UseCheckboxGroupProps,\n useCheckboxGroup,\n} from '@digdir/designsystemet-react';\n\nexport interface CheckboxGroupProps extends Omit<UseCheckboxGroupProps, 'value' | 'onChange'> {\n /**\n * The legend text for the fieldset\n */\n legend?: ReactNode;\n /**\n * Optional description text for the fieldset\n */\n description?: ReactNode;\n /**\n * Array of checkbox options\n */\n options: Array<{\n value: string;\n label: string;\n description?: string;\n disabled?: boolean;\n allowIndeterminate?: boolean;\n }>;\n /**\n * Controlled value - array of selected checkbox values\n */\n value?: string[];\n /**\n * Callback when the selected values change\n */\n onChange?: (value: string[]) => void;\n /**\n * Optional className for the fieldset\n */\n className?: string;\n}\n\n/**\n * CheckboxGroup component that wraps multiple Checkbox components in a Fieldset.\n * Handles state management, onChange, and value automatically.\n *\n * @example\n * <CheckboxGroup\n * legend=\"Hvordan vil du kontaktes?\"\n * description=\"Velg alle relevante alternativer\"\n * options={[\n * { value: 'epost', label: 'E-post' },\n * { value: 'telefon', label: 'Telefon' },\n * { value: 'sms', label: 'SMS' },\n * ]}\n * value={selectedValues}\n * onChange={(values) => setSelectedValues(values)}\n * />\n */\nexport const CheckboxGroup = ({\n legend,\n description,\n options,\n value,\n onChange,\n error,\n disabled,\n readOnly,\n required,\n name,\n className,\n}: CheckboxGroupProps) => {\n const { getCheckboxProps, validationMessageProps } = useCheckboxGroup({\n value,\n onChange: onChange ? (nextValue) => onChange(nextValue) : undefined,\n error,\n disabled,\n readOnly,\n required,\n name,\n });\n\n return (\n <Fieldset className={className}>\n {legend && <Fieldset.Legend>{legend}</Fieldset.Legend>}\n {description && <Fieldset.Description>{description}</Fieldset.Description>}\n {options.map((option) => (\n <Checkbox\n key={option.value}\n label={option.label}\n description={option.description}\n disabled={option.disabled}\n {...getCheckboxProps({\n value: option.value,\n allowIndeterminate: option.allowIndeterminate,\n })}\n />\n ))}\n {error && <ValidationMessage {...validationMessageProps} />}\n </Fieldset>\n );\n};\n\nexport default CheckboxGroup;\n\n"],"names":["__rest","styles","Buildings3Icon","CheckmarkCircleFillIcon","FilesIcon","HelpText"],"mappings":";;;;AAEA,IAAI,WAAW;AACf,SAAS,YAAY,YAAY;AAC7B,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,UAAU;AACrD,QAAM,KAAK,cAAc;AACzB,YAAU,MAAM;AACZ,QAAI,aAAa,MAAM;AAKnB,kBAAY;AACZ,mBAAa,cA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QAAM,EAAE,kBAAkB,uBAAA,IAA2B,iBAAiB;AAAA,IACpE;AAAA,IACA,UAAU,WAAW,CAAC,cAAc,SAAS,SAAS,IAAI;AAAA,IAC1D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAED,SACE,qBAAC,YAAS,WACP,UAAA;AAAA,IAAA,UAAU,oBAAC,SAAS,QAAT,EAAiB,UAAA,QAAO;AAAA,IACnC,eAAe,oBAAC,SAAS,aAAT,EAAsB,UAAA,aAAY;AAAA,IAClD,QAAQ,IAAI,CAAC,WACZ;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,OAAO,OAAO;AAAA,QACd,aAAa,OAAO;AAAA,QACpB,UAAU,OAAO;AAAA,QAChB,GAAG,iBAAiB;AAAA,UACnB,OAAO,OAAO;AAAA,UACd,oBAAoB,OAAO;AAAA,QAAA,CAC5B;AAAA,MAAA;AAAA,MAPI,OAAO;AAAA,IAAA,CASf;AAAA,IACA,SAAS,oBAAC,mBAAA,EAAmB,GAAG,uBAAA,CAAwB;AAAA,EAAA,GAC3D;AAEJ;","x_google_ignoreList":[0,1,2,3]}
package/dist/styles.css CHANGED
@@ -1 +1 @@
1
- ._orgLogo_8xxnq_1{display:flex;min-width:1.5rem;min-height:1.5rem;overflow:hidden;align-items:center;justify-content:center;position:relative}._orgLogo_8xxnq_1 svg,._orgLogo_8xxnq_1 img{width:100%;height:100%;object-fit:contain}._orgLogo_8xxnq_1 svg{color:var(--color-text)}._appBar_w0gn2_1{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:1rem}._wrapper_1dyfs_1{display:flex;align-items:center;gap:.5rem}._wrapper_m33an_1{display:flex;flex-direction:column;gap:.5rem}._helptext_1o0ls_1{--dsc-helptext-icon-size: 65%;--dsc-helptext-icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 8 14'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M4 11a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM4 0c2.2 0 4 1.66 4 3.7 0 .98-.42 1.9-1.17 2.6l-.6.54-.29.29c-.48.46-.87.93-.94 1.41V9.5H3v-.81c0-1.26.84-2.22 1.68-3L5.42 5C5.8 4.65 6 4.2 6 3.7 6 2.66 5.1 1.83 4 1.83c-1.06 0-1.92.75-2 1.7v.15H0C0 1.66 1.8 0 4 0Z' clip-rule='evenodd'/%3E%3C/svg%3E");--dsc-helptext-size: var(--custom-helptext-size, var(--ds-size-7));border-radius:var(--ds-border-radius-full);border:max(1px,var(--ds-size-1) / 2) solid;box-sizing:border-box;height:var(--dsc-helptext-size);min-height:0;min-width:0;padding:0;position:relative;width:var(--dsc-helptext-size)}@media (forced-colors: active){._helptext_1o0ls_1{color:ButtonText}}._helptext_1o0ls_1:before{content:"";border-radius:inherit;background:currentcolor;-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-image:var(--dsc-helptext-icon-url);mask-image:var(--dsc-helptext-icon-url);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:var(--dsc-helptext-icon-size) var(--dsc-helptext-icon-size),cover;mask-size:var(--dsc-helptext-icon-size) var(--dsc-helptext-icon-size),cover;scale:1.1;width:100%;height:100%}@media (forced-colors: active){._helptext_1o0ls_1:before{background:ButtonText}}._helptext_1o0ls_1:has(+:popover-open):before{-webkit-mask-image:var(--dsc-helptext-icon-url),linear-gradient(currentcolor,currentcolor);mask-image:var(--dsc-helptext-icon-url),linear-gradient(currentcolor,currentcolor)}@media print{._helptext_1o0ls_1{display:none}}
1
+ ._orgLogo_eki51_1{display:flex;width:1em;height:1em;overflow:hidden;align-items:center;justify-content:center;position:relative}._orgLogo_eki51_1 svg,._orgLogo_eki51_1 img{width:100%;height:100%;object-fit:contain}._orgLogo_eki51_1 svg{color:var(--color-text)}._appBar_w0gn2_1{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:1rem}._wrapper_1dyfs_1{display:flex;align-items:center;gap:.5rem}._wrapper_m33an_1{display:flex;flex-direction:column;gap:.5rem}._helptext_1o0ls_1{--dsc-helptext-icon-size: 65%;--dsc-helptext-icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 8 14'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M4 11a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM4 0c2.2 0 4 1.66 4 3.7 0 .98-.42 1.9-1.17 2.6l-.6.54-.29.29c-.48.46-.87.93-.94 1.41V9.5H3v-.81c0-1.26.84-2.22 1.68-3L5.42 5C5.8 4.65 6 4.2 6 3.7 6 2.66 5.1 1.83 4 1.83c-1.06 0-1.92.75-2 1.7v.15H0C0 1.66 1.8 0 4 0Z' clip-rule='evenodd'/%3E%3C/svg%3E");--dsc-helptext-size: var(--custom-helptext-size, var(--ds-size-7));border-radius:var(--ds-border-radius-full);border:max(1px,var(--ds-size-1) / 2) solid;box-sizing:border-box;height:var(--dsc-helptext-size);min-height:0;min-width:0;padding:0;position:relative;width:var(--dsc-helptext-size)}@media (forced-colors: active){._helptext_1o0ls_1{color:ButtonText}}._helptext_1o0ls_1:before{content:"";border-radius:inherit;background:currentcolor;-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-image:var(--dsc-helptext-icon-url);mask-image:var(--dsc-helptext-icon-url);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:var(--dsc-helptext-icon-size) var(--dsc-helptext-icon-size),cover;mask-size:var(--dsc-helptext-icon-size) var(--dsc-helptext-icon-size),cover;scale:1.1;width:100%;height:100%}@media (forced-colors: active){._helptext_1o0ls_1:before{background:ButtonText}}._helptext_1o0ls_1:has(+:popover-open):before{-webkit-mask-image:var(--dsc-helptext-icon-url),linear-gradient(currentcolor,currentcolor);mask-image:var(--dsc-helptext-icon-url),linear-gradient(currentcolor,currentcolor)}@media print{._helptext_1o0ls_1{display:none}}._tagList_1n3j5_1{display:flex;gap:.5rem;font-weight:400;font-size:.8em;align-items:center;flex-wrap:wrap}
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import CheckboxGroup from '.';
3
+ declare const meta: Meta<typeof CheckboxGroup>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CheckboxGroup>;
6
+ export declare const Primary: Story;
7
+ export declare const Uncontrolled: Story;
8
+ export declare const WithError: Story;
9
+ export declare const Disabled: Story;
10
+ export declare const ReadOnly: Story;
11
+ export declare const WithIndeterminate: Story;
12
+ export declare const WithDescriptions: Story;
@@ -0,0 +1,53 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type UseCheckboxGroupProps } from '@digdir/designsystemet-react';
3
+ export interface CheckboxGroupProps extends Omit<UseCheckboxGroupProps, 'value' | 'onChange'> {
4
+ /**
5
+ * The legend text for the fieldset
6
+ */
7
+ legend?: ReactNode;
8
+ /**
9
+ * Optional description text for the fieldset
10
+ */
11
+ description?: ReactNode;
12
+ /**
13
+ * Array of checkbox options
14
+ */
15
+ options: Array<{
16
+ value: string;
17
+ label: string;
18
+ description?: string;
19
+ disabled?: boolean;
20
+ allowIndeterminate?: boolean;
21
+ }>;
22
+ /**
23
+ * Controlled value - array of selected checkbox values
24
+ */
25
+ value?: string[];
26
+ /**
27
+ * Callback when the selected values change
28
+ */
29
+ onChange?: (value: string[]) => void;
30
+ /**
31
+ * Optional className for the fieldset
32
+ */
33
+ className?: string;
34
+ }
35
+ /**
36
+ * CheckboxGroup component that wraps multiple Checkbox components in a Fieldset.
37
+ * Handles state management, onChange, and value automatically.
38
+ *
39
+ * @example
40
+ * <CheckboxGroup
41
+ * legend="Hvordan vil du kontaktes?"
42
+ * description="Velg alle relevante alternativer"
43
+ * options={[
44
+ * { value: 'epost', label: 'E-post' },
45
+ * { value: 'telefon', label: 'Telefon' },
46
+ * { value: 'sms', label: 'SMS' },
47
+ * ]}
48
+ * value={selectedValues}
49
+ * onChange={(values) => setSelectedValues(values)}
50
+ * />
51
+ */
52
+ export declare const CheckboxGroup: ({ legend, description, options, value, onChange, error, disabled, readOnly, required, name, className, }: CheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
53
+ export default CheckboxGroup;
@@ -0,0 +1,52 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type UseRadioGroupProps } from '@digdir/designsystemet-react';
3
+ export interface RadioGroupProps extends Omit<UseRadioGroupProps, 'value' | 'onChange'> {
4
+ /**
5
+ * The legend text for the fieldset
6
+ */
7
+ legend?: ReactNode;
8
+ /**
9
+ * Optional description text for the fieldset
10
+ */
11
+ description?: ReactNode;
12
+ /**
13
+ * Array of radio options
14
+ */
15
+ options: Array<{
16
+ value: string;
17
+ label: string;
18
+ description?: string;
19
+ disabled?: boolean;
20
+ }>;
21
+ /**
22
+ * Controlled value - the selected radio value
23
+ */
24
+ value?: string;
25
+ /**
26
+ * Callback when the selected value changes
27
+ */
28
+ onChange?: (value: string) => void;
29
+ /**
30
+ * Optional className for the fieldset
31
+ */
32
+ className?: string;
33
+ }
34
+ /**
35
+ * RadioGroup component that wraps multiple Radio components in a Fieldset.
36
+ * Handles state management, onChange, and value automatically.
37
+ *
38
+ * @example
39
+ * <RadioGroup
40
+ * legend="Hvilken iskremsmak er best?"
41
+ * description="Velg din favorittsmak"
42
+ * options={[
43
+ * { value: 'vanilje', label: 'Vanilje' },
44
+ * { value: 'jordbær', label: 'Jordbær' },
45
+ * { value: 'sjokolade', label: 'Sjokolade' },
46
+ * ]}
47
+ * value={selectedValue}
48
+ * onChange={(value) => setSelectedValue(value)}
49
+ * />
50
+ */
51
+ export declare const RadioGroup: ({ legend, description, options, value, onChange, error, disabled, readOnly, required, name, className, }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
52
+ export default RadioGroup;
@@ -0,0 +1,11 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import RadioGroup from '.';
3
+ declare const meta: Meta<typeof RadioGroup>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof RadioGroup>;
6
+ export declare const Primary: Story;
7
+ export declare const Uncontrolled: Story;
8
+ export declare const WithError: Story;
9
+ export declare const Disabled: Story;
10
+ export declare const ReadOnly: Story;
11
+ export declare const WithDescriptions: Story;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export type TagListProps = {
3
+ maxTags?: number;
4
+ 'data-size'?: string;
5
+ };
6
+ declare const TagList: ({ children, className, maxTags, "data-size": dataSize, ...props }: TagListProps & React.HTMLAttributes<HTMLUListElement>) => import("react/jsx-runtime").JSX.Element | null;
7
+ export default TagList;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import TagList from '.';
3
+ declare const meta: Meta<typeof TagList>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TagList>;
6
+ export declare const Primary: Story;
7
+ export declare const WithMaxTags: Story;
@@ -4,3 +4,8 @@ export { default as CopyButton } from './components/copy-button';
4
4
  export { default as HStack } from './components/hstack';
5
5
  export { default as VStack } from './components/vstack';
6
6
  export { HelpText } from './components/helptext';
7
+ export { default as TagList } from './components/tag-list';
8
+ export { default as RadioGroup } from './components/radio-group';
9
+ export { default as CheckboxGroup } from './components/checkbox-group';
10
+ export type { RadioGroupProps } from './components/radio-group';
11
+ export type { CheckboxGroupProps } from './components/checkbox-group';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fellesdatakatalog/ui",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "React UI components for Felles Datakatalog",
5
5
  "main": "dist/shared-ui.cjs",
6
6
  "module": "dist/shared-ui.es.js",
@@ -24,6 +24,7 @@
24
24
  "scripts": {
25
25
  "build": "vite build && npm run build:types",
26
26
  "build:types": "tsc --emitDeclarationOnly",
27
+ "watch": "concurrently \"vite build --watch\" \"tsc --watch --emitDeclarationOnly\"",
27
28
  "test": "vitest",
28
29
  "storybook": "storybook dev -p 6006",
29
30
  "build-storybook": "storybook build",
@@ -61,6 +62,7 @@
61
62
  "@vitejs/plugin-react": "^4.7.0",
62
63
  "@vitest/browser": "^3.2.4",
63
64
  "@vitest/coverage-v8": "^3.2.4",
65
+ "concurrently": "^9.2.1",
64
66
  "playwright": "^1.54.1",
65
67
  "react": "^19.1.1",
66
68
  "react-dom": "^19.1.1",