@biblioteksentralen/react 4.0.0-beta.1 → 4.0.0-beta.2

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.
Files changed (108) hide show
  1. package/dist/index.d.mts +106 -15
  2. package/dist/index.d.ts +106 -15
  3. package/dist/index.js +739 -37
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +646 -14
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +3 -12
  8. package/dist/ButtonStyles-CRAk2YIJ.d.mts +0 -3
  9. package/dist/ButtonStyles-CRAk2YIJ.d.ts +0 -3
  10. package/dist/chunk-2KZDHLEJ.mjs +0 -9
  11. package/dist/chunk-2KZDHLEJ.mjs.map +0 -1
  12. package/dist/chunk-3IJ454KG.mjs +0 -185
  13. package/dist/chunk-3IJ454KG.mjs.map +0 -1
  14. package/dist/chunk-5GJBW3WE.mjs +0 -270
  15. package/dist/chunk-5GJBW3WE.mjs.map +0 -1
  16. package/dist/chunk-7MKFY66H.mjs +0 -65
  17. package/dist/chunk-7MKFY66H.mjs.map +0 -1
  18. package/dist/chunk-BCT5QU5W.js +0 -142
  19. package/dist/chunk-BCT5QU5W.js.map +0 -1
  20. package/dist/chunk-BN5W6FVN.mjs +0 -50
  21. package/dist/chunk-BN5W6FVN.mjs.map +0 -1
  22. package/dist/chunk-BRFRPPOW.js +0 -10
  23. package/dist/chunk-BRFRPPOW.js.map +0 -1
  24. package/dist/chunk-BZS3AX26.mjs +0 -6
  25. package/dist/chunk-BZS3AX26.mjs.map +0 -1
  26. package/dist/chunk-CGCBID7S.mjs +0 -41
  27. package/dist/chunk-CGCBID7S.mjs.map +0 -1
  28. package/dist/chunk-J5IF7WUN.js +0 -10
  29. package/dist/chunk-J5IF7WUN.js.map +0 -1
  30. package/dist/chunk-NSYSPEHR.js +0 -86
  31. package/dist/chunk-NSYSPEHR.js.map +0 -1
  32. package/dist/chunk-NYKSRUWF.js +0 -51
  33. package/dist/chunk-NYKSRUWF.js.map +0 -1
  34. package/dist/chunk-O4EXBCND.js +0 -19
  35. package/dist/chunk-O4EXBCND.js.map +0 -1
  36. package/dist/chunk-PLWK7HEC.js +0 -75
  37. package/dist/chunk-PLWK7HEC.js.map +0 -1
  38. package/dist/chunk-PQLTQYZ3.mjs +0 -41
  39. package/dist/chunk-PQLTQYZ3.mjs.map +0 -1
  40. package/dist/chunk-QAW4IRLI.js +0 -55
  41. package/dist/chunk-QAW4IRLI.js.map +0 -1
  42. package/dist/chunk-QBXCCJ24.js +0 -344
  43. package/dist/chunk-QBXCCJ24.js.map +0 -1
  44. package/dist/chunk-QX75QJ7F.mjs +0 -132
  45. package/dist/chunk-QX75QJ7F.mjs.map +0 -1
  46. package/dist/chunk-RZUGRIUF.mjs +0 -76
  47. package/dist/chunk-RZUGRIUF.mjs.map +0 -1
  48. package/dist/chunk-UFIMO32F.js +0 -275
  49. package/dist/chunk-UFIMO32F.js.map +0 -1
  50. package/dist/chunk-VSICUYFB.js +0 -51
  51. package/dist/chunk-VSICUYFB.js.map +0 -1
  52. package/dist/chunk-WYQNSPEX.mjs +0 -6
  53. package/dist/chunk-WYQNSPEX.mjs.map +0 -1
  54. package/dist/components/AlertBS.d.mts +0 -18
  55. package/dist/components/AlertBS.d.ts +0 -18
  56. package/dist/components/AlertBS.js +0 -9
  57. package/dist/components/AlertBS.js.map +0 -1
  58. package/dist/components/AlertBS.mjs +0 -5
  59. package/dist/components/AlertBS.mjs.map +0 -1
  60. package/dist/components/BiblioteksentralenProvider.d.mts +0 -10
  61. package/dist/components/BiblioteksentralenProvider.d.ts +0 -10
  62. package/dist/components/BiblioteksentralenProvider.js +0 -10
  63. package/dist/components/BiblioteksentralenProvider.js.map +0 -1
  64. package/dist/components/BiblioteksentralenProvider.mjs +0 -6
  65. package/dist/components/BiblioteksentralenProvider.mjs.map +0 -1
  66. package/dist/components/ButtonBS.d.mts +0 -16
  67. package/dist/components/ButtonBS.d.ts +0 -16
  68. package/dist/components/ButtonBS.js +0 -8
  69. package/dist/components/ButtonBS.js.map +0 -1
  70. package/dist/components/ButtonBS.mjs +0 -4
  71. package/dist/components/ButtonBS.mjs.map +0 -1
  72. package/dist/components/ConditionalWrapperBS.d.mts +0 -15
  73. package/dist/components/ConditionalWrapperBS.d.ts +0 -15
  74. package/dist/components/ConditionalWrapperBS.js +0 -8
  75. package/dist/components/ConditionalWrapperBS.js.map +0 -1
  76. package/dist/components/ConditionalWrapperBS.mjs +0 -4
  77. package/dist/components/ConditionalWrapperBS.mjs.map +0 -1
  78. package/dist/components/ErrorBoundaryBS.d.mts +0 -21
  79. package/dist/components/ErrorBoundaryBS.d.ts +0 -21
  80. package/dist/components/ErrorBoundaryBS.js +0 -10
  81. package/dist/components/ErrorBoundaryBS.js.map +0 -1
  82. package/dist/components/ErrorBoundaryBS.mjs +0 -6
  83. package/dist/components/ErrorBoundaryBS.mjs.map +0 -1
  84. package/dist/components/HashLinkTargetBS.d.mts +0 -16
  85. package/dist/components/HashLinkTargetBS.d.ts +0 -16
  86. package/dist/components/HashLinkTargetBS.js +0 -10
  87. package/dist/components/HashLinkTargetBS.js.map +0 -1
  88. package/dist/components/HashLinkTargetBS.mjs +0 -6
  89. package/dist/components/HashLinkTargetBS.mjs.map +0 -1
  90. package/dist/components/IconButtonBS.d.mts +0 -16
  91. package/dist/components/IconButtonBS.d.ts +0 -16
  92. package/dist/components/IconButtonBS.js +0 -8
  93. package/dist/components/IconButtonBS.js.map +0 -1
  94. package/dist/components/IconButtonBS.mjs +0 -4
  95. package/dist/components/IconButtonBS.mjs.map +0 -1
  96. package/dist/components/InputBS.d.mts +0 -18
  97. package/dist/components/InputBS.d.ts +0 -18
  98. package/dist/components/InputBS.js +0 -8
  99. package/dist/components/InputBS.js.map +0 -1
  100. package/dist/components/InputBS.mjs +0 -4
  101. package/dist/components/InputBS.mjs.map +0 -1
  102. package/dist/components/withErrorBoundaryBS.d.mts +0 -5
  103. package/dist/components/withErrorBoundaryBS.d.ts +0 -5
  104. package/dist/components/withErrorBoundaryBS.js +0 -11
  105. package/dist/components/withErrorBoundaryBS.js.map +0 -1
  106. package/dist/components/withErrorBoundaryBS.mjs +0 -7
  107. package/dist/components/withErrorBoundaryBS.mjs.map +0 -1
  108. /package/{dist/LICENSE → LICENSE} +0 -0
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/danielwinsvold/Code/js-utils/packages/react/dist/index.js","../src/index.ts"],"names":["Object","defineProperty","exports","value","_createStarExport","obj","keys","filter","key","forEach","hasOwnProperty","enumerable","configurable","get","_chunkNSYSPEHRjs","require","_chunkVSICUYFBjs","_chunkNYKSRUWFjs","_chunkBRFRPPOWjs","_chunkO4EXBCNDjs","_chunkUFIMO32Fjs","_chunkBCT5QU5Wjs","_chunkPLWK7HECjs","_chunkQAW4IRLIjs","_chunkJ5IF7WUNjs","_react","AlertBS","BiblioteksentralenProvider","ButtonBS","ConditionalWrapperBS","ErrorBoundaryBS","HashLinkTargetBS","IconButtonBS","InputBS","colors","withErrorBoundaryBS"],"mappings":"AAAA;AAAAA,OAAAC,cAAA,CAAAC,SAAA,cAAA;IAAAC,OAAA;AAAA;AAAA,SAAAC,kBAAAC,GAAA;IAAAL,OAAAM,IAAA,CAAAD,KAAAE,MAAA,CAAA,SAAAC;eAAAA,QAAA,aAAAA,QAAA;OAAAC,OAAA,CAAA,SAAAD;QAAA,IAAAN,QAAAQ,cAAA,CAAAF,MAAA;YAAA;QAAA;QAAAR,OAAAC,cAAA,CAAAC,SAAAM,KAAA;YAAAG,YAAA;YAAAC,cAAA;YAAAC,KAAA;uBAAAR,GAAA,CAAAG,IAAA;;QAAA;IAAA;AAAA;AAAA;AAGA,IAAAM,mBAAAC,QAAA;AAGA,IAAAC,mBAAAD,QAAA;AAGA,IAAAE,mBAAAF,QAAA;AAGA,IAAAG,mBAAAH,QAAA;AAGA,IAAAI,mBAAAJ,QAAA;AAGA,IAAAK,mBAAAL,QAAA;AAGA,IAAAM,mBAAAN,QAAA;AAGA,IAAAO,mBAAAP,QAAA;AACAA,QAAA;AAGA,IAAAQ,mBAAAR,QAAA;AAGA,IAAAS,mBAAAT,QAAA;AAEA,eAAA;ACjCA,IAAAU,SAAAV,QAAA;AAAAX,kBAAAqB;AD8CAvB,QAAAwB,OAAA,GAAAL,iBAAAK,OAAA;AAAAxB,QAAAyB,0BAAA,GAAAV,iBAAAU,0BAAA;AAAAzB,QAAA0B,QAAA,GAAAV,iBAAAU,QAAA;AAAA1B,QAAA2B,oBAAA,GAAAV,iBAAAU,oBAAA;AAAA3B,QAAA4B,eAAA,GAAAV,iBAAAU,eAAA;AAAA5B,QAAA6B,gBAAA,GAAAT,iBAAAS,gBAAA;AAAA7B,QAAA8B,YAAA,GAAAR,iBAAAQ,YAAA;AAAA9B,QAAA+B,OAAA,GAAAnB,iBAAAmB,OAAA;AAAA/B,QAAAgC,MAAA,GAAAX,iBAAAW,MAAA;AAAAhC,QAAAiC,mBAAA,GAAAnB,iBAAAmB,mBAAA","sourcesContent":["\"use strict\";Object.defineProperty(exports, \"__esModule\", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== \"default\" && key !== \"__esModule\") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }\"use client\";\n\n\nvar _chunkNSYSPEHRjs = require('./chunk-NSYSPEHR.js');\n\n\nvar _chunkVSICUYFBjs = require('./chunk-VSICUYFB.js');\n\n\nvar _chunkNYKSRUWFjs = require('./chunk-NYKSRUWF.js');\n\n\nvar _chunkBRFRPPOWjs = require('./chunk-BRFRPPOW.js');\n\n\nvar _chunkO4EXBCNDjs = require('./chunk-O4EXBCND.js');\n\n\nvar _chunkUFIMO32Fjs = require('./chunk-UFIMO32F.js');\n\n\nvar _chunkBCT5QU5Wjs = require('./chunk-BCT5QU5W.js');\n\n\nvar _chunkPLWK7HECjs = require('./chunk-PLWK7HEC.js');\nrequire('./chunk-QBXCCJ24.js');\n\n\nvar _chunkQAW4IRLIjs = require('./chunk-QAW4IRLI.js');\n\n\nvar _chunkJ5IF7WUNjs = require('./chunk-J5IF7WUN.js');\n\n// src/index.ts\nvar _react = require('@chakra-ui/react'); _createStarExport(_react);\n\n\n\n\n\n\n\n\n\n\n\nexports.AlertBS = _chunkBCT5QU5Wjs.AlertBS; exports.BiblioteksentralenProvider = _chunkNYKSRUWFjs.BiblioteksentralenProvider; exports.ButtonBS = _chunkBRFRPPOWjs.ButtonBS; exports.ConditionalWrapperBS = _chunkO4EXBCNDjs.ConditionalWrapperBS; exports.ErrorBoundaryBS = _chunkUFIMO32Fjs.ErrorBoundaryBS; exports.HashLinkTargetBS = _chunkPLWK7HECjs.HashLinkTargetBS; exports.IconButtonBS = _chunkJ5IF7WUNjs.IconButtonBS; exports.InputBS = _chunkNSYSPEHRjs.InputBS; exports.colors = _chunkQAW4IRLIjs.colors; exports.withErrorBoundaryBS = _chunkVSICUYFBjs.withErrorBoundaryBS;\n","export * from \"@chakra-ui/react\"; // Exports Chakra components first to override some components later\n\n// Exporting our own components with \"BS\" suffix to allow use of both Chakra and Biblioteksentralen components in the same project\nexport { AlertBS } from \"./components/AlertBS\";\nexport { ButtonBS, type ButtonBSProps } from \"./components/ButtonBS\";\nexport { IconButtonBS, type IconButtonBSProps } from \"./components/IconButtonBS\";\nexport { InputBS } from \"./components/InputBS\";\nexport { ConditionalWrapperBS } from \"./components/ConditionalWrapperBS\";\nexport { ErrorBoundaryBS } from \"./components/ErrorBoundaryBS\";\nexport { HashLinkTargetBS } from \"./components/HashLinkTargetBS\";\nexport { withErrorBoundaryBS } from \"./components/withErrorBoundaryBS\";\nexport { BiblioteksentralenProvider } from \"./components/BiblioteksentralenProvider\";\n\nexport { colors } from \"@biblioteksentralen/utils\"; // Re-export colors for convenience\n"]}
1
+ {"version":3,"sources":["/Users/danielwinsvold/Code/js-utils/packages/react/dist/index.js","../../utils/src/date.ts","../../utils/src/colors.ts","../../utils/src/environment.ts","../src/components/AlertBS.tsx","../src/components/ButtonBS.tsx","../src/components/IconButtonBS.tsx","../src/components/InputBS.tsx","../src/components/ConditionalWrapperBS.tsx","../src/components/ErrorBoundaryBS.tsx","../src/styles/chakraTheme/ButtonStyles.ts","../src/styles/chakraTheme/ContainerStyles.ts","../src/styles/chakraTheme/HeadingStyles.ts","../src/styles/chakraTheme/InputStyles.ts","../src/styles/chakraTheme/SpinnerStyles.ts","../src/styles/chakraTheme/sizes.ts","../src/styles/chakraTheme/LinkStyles.ts","../src/styles/chakraTheme/biblioteksentralenChakraTheme.ts","../src/components/HashLinkTargetBS.tsx","../src/components/withErrorBoundaryBS.tsx","../src/components/BiblioteksentralenProvider.tsx"],"names":["Object","defineProperty","exports","value","_interopRequireDefault","obj","__esModule","default","_optionalChain","ops","lastAccessLHS","undefined","i","length","op","fn","args","call","_format","require","_nb","colors","black","grey90","grey80","grey60","grey45","grey30","grey15","grey10","grey05","white","bsRødDark","bsRødMedium","accentPurple","accentPeach","accentGreen","accentBlueDark","accentBlueMedium","accentYellow","lightBlue","lightGreen","lightPeach","lightPurple","statusRed","statusYellow","statusGreen","statusGreenLight","statusRedLight","statusYellowLight","neptune","isDevelopment","process","env","NODE_ENV","_react","_react3","_react4","_reactfeather","colorLookup","info","bg","color","warning","success","error","iconLookup","createElement","Info","strokeWidth","role","AlertCircle","CheckCircle","XCircle","variantStyles","inline","borderColor","backgroundColor","padding","AlertBS","status","children","variant","header","rest","Alert","Root","fontSize","border","display","flexWrap","Indicator","marginX","Content","Title","Description","ButtonBS","Button","IconButtonBS","IconButton","InputBS","props","labelProps","label","helperText","errorMessage","hideLabel","inputProps","formLabel","React","Field","Label","invalid","VisuallyHidden","FieldHelperText","Input","FieldErrorText","ConditionalWrapperBS","condition","wrapper","Wrapper","Fragment","StyledPre","Box","as","paddingTop","wordBreak","whiteSpace","ErrorBoundaryBS","state","hasError","componentDidCatch","errorInfo","setState","console","boundaryName","render","stackTrace","_","_2","_3","componentStack","errormsg","_4","_5","_6","message","getDerivedStateFromError","Component","variants","primary","_hover","secondary","tertiary","defaultConfig","_7","theme","_8","recipes","_9","button","_10","_11","ButtonStyles","defineRecipe","base","borderWidth","fontWeight","_disabled","opacity","size","sm","h","px","textStyle","md","lg","defaultVariants","variants2","subtle","_light","_dark","outline","flushed","_placeholder","animationDuration","container","xl","sizes","variants3","plain","textDecoration","textDecorationColor","underline","_focus","tokens","defineTokens","globalHyphens","hyphens","hyphenateLimitChars","focusStyle","boxShadow","transition","biblioteksentralenChakraTheme","defineConfig","heading","HeadingStyles","input","InputStyles","link","LinkStyles","ContainerStyles","spinner","SpinnerStyles","globalCss","html","scrollBehavior","body","focusOnRelativeParentStyle","_focusWithin","position","content","top","left","height","width","pointerEvents","borderRadius","HashLinkTargetBS","css","focusOnParent","id","tabIndex","spaceAbove","withErrorBoundaryBS","_system","BiblioteksentralenProvider","ChakraProvider","createSystem","customTheme","ColorModeProvider"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,OAAAC,cAAA,CAAAC,SAAA,cAAA;IAAAC,OAAA;AAAA;AAAA,SAAAC,uBAAAC,GAAA;IAAA,OAAAA,OAAAA,IAAAC,UAAA,GAAAD,MAAA;QAAAE,SAAAF;IAAA;AAAA;AAAA,SAAAG,eAAAC,GAAA;IAAA,IAAAC,gBAAAC;IAAA,IAAAR,QAAAM,GAAA,CAAA,EAAA;IAAA,IAAAG,IAAA;IAAA,MAAAA,IAAAH,IAAAI,MAAA,CAAA;QAAA,IAAAC,KAAAL,GAAA,CAAAG,EAAA;QAAA,IAAAG,KAAAN,GAAA,CAAAG,IAAA,EAAA;QAAAA,KAAA;QAAA,IAAA,AAAAE,CAAAA,OAAA,oBAAAA,OAAA,cAA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AAA,GAAAA;AAAA9H,QAAAkO,gBAAA,GAAAA;AAAAlO,QAAAgG,YAAA,GAAAA;AAAAhG,QAAAkG,OAAA,GAAAA;AAAAlG,QAAAwO,mBAAA,GAAAA","sourcesContent":["\"use strict\";Object.defineProperty(exports, \"__esModule\", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }\"use client\";\n\n// ../utils/dist/index.mjs\nvar _format = require('date-fns/format');\nvar _nb = require('date-fns/locale/nb');\nvar colors = {\n black: \"#000000\",\n grey90: \"#181818\",\n grey80: \"#333333\",\n grey60: \"#585858\",\n grey45: \"#8c8c8c\",\n grey30: \"#b2b2b2\",\n grey15: \"#d9d9d9\",\n grey10: \"#e5e5e5\",\n grey05: \"#f2f2f2\",\n white: \"#ffffff\",\n bsR\\u00F8dDark: \"#870010\",\n bsR\\u00F8dMedium: \"#d53d40\",\n accentPurple: \"#331433\",\n accentPeach: \"#ffba99\",\n accentGreen: \"#003b29\",\n accentBlueDark: \"#001740\",\n accentBlueMedium: \"#5996de\",\n accentYellow: \"#ffc970\",\n lightBlue: \"#dbe8ef\",\n lightGreen: \"#dbe0db\",\n lightPeach: \"#f4e7de\",\n lightPurple: \"#ece8f3\",\n statusRed: \"#ad313c\",\n statusYellow: \"#bc5600\",\n statusGreen: \"#24845b\",\n statusGreenLight: \"#edf4f1\",\n statusRedLight: \"#f8efef\",\n statusYellowLight: \"#fff6e4\",\n neptune: {\n \"100\": \"#CFE6E8\",\n \"200\": \"#9FCDD2\",\n \"300\": \"#6FB5BB\",\n \"400\": \"#3F9CA5\",\n \"500\": \"#0F838E\",\n \"600\": \"#0C6972\",\n \"700\": \"#094F55\",\n \"800\": \"#063439\",\n \"900\": \"#031A1C\"\n }\n};\nfunction isDevelopment() {\n return process.env.NODE_ENV === \"development\";\n}\n\n// src/components/AlertBS.tsx\nvar _react = require('@chakra-ui/react');\nvar _react3 = require('react'); var _react4 = _interopRequireDefault(_react3);\nvar _reactfeather = require('react-feather');\nvar colorLookup = {\n info: { bg: colors.lightBlue, color: colors.accentBlueMedium },\n warning: { bg: colors.statusYellowLight, color: colors.statusYellow },\n success: { bg: colors.statusGreenLight, color: colors.statusGreen },\n error: { bg: colors.statusRedLight, color: colors.statusRed }\n};\nvar iconLookup = {\n info: /* @__PURE__ */ _react4.default.createElement(_reactfeather.Info, { strokeWidth: 1.75, role: \"img\", \"aria-label\": \"Informasjon\" }),\n warning: /* @__PURE__ */ _react4.default.createElement(_reactfeather.AlertCircle, { strokeWidth: 1.75, role: \"img\", \"aria-label\": \"Advarsel\" }),\n success: /* @__PURE__ */ _react4.default.createElement(_reactfeather.CheckCircle, { strokeWidth: 1.75, role: \"img\", \"aria-label\": \"Suksess\" }),\n error: /* @__PURE__ */ _react4.default.createElement(_reactfeather.XCircle, { strokeWidth: 1.75, role: \"img\", \"aria-label\": \"Feil\" })\n};\nvar variantStyles = {\n inline: {\n borderColor: \"transparent\",\n backgroundColor: \"transparent\",\n padding: \"0\"\n }\n};\nfunction AlertBS({ status, children, variant, header, ...rest }) {\n const colors2 = colorLookup[status];\n return /* @__PURE__ */ _react4.default.createElement(\n _react.Alert.Root,\n {\n status,\n fontSize: \"md\",\n border: `0.1rem solid`,\n borderColor: colors2.color,\n backgroundColor: colors2.bg,\n display: \"flex\",\n flexWrap: \"wrap\",\n ...variant === \"inline\" ? variantStyles[variant] : {},\n ...rest\n },\n /* @__PURE__ */ _react4.default.createElement(_react.Alert.Indicator, { marginX: \"auto\" }, iconLookup[status]),\n /* @__PURE__ */ _react4.default.createElement(_react.Alert.Content, { color: \"black\" }, header && /* @__PURE__ */ _react4.default.createElement(_react.Alert.Title, null, header), /* @__PURE__ */ _react4.default.createElement(_react.Alert.Description, null, children))\n );\n}\n\n// src/components/ButtonBS.tsx\n\nvar ButtonBS = _react.Button;\n\n// src/components/IconButtonBS.tsx\n\nvar IconButtonBS = _react.IconButton;\n\n// src/components/InputBS.tsx\n\n\nvar InputBS = (props) => {\n const { labelProps, label, helperText, errorMessage, hideLabel, ...inputProps } = props;\n const formLabel = /* @__PURE__ */ _react4.default.createElement(_react.Field.Label, { ...labelProps }, label);\n return /* @__PURE__ */ _react4.default.createElement(_react.Field.Root, { invalid: !!errorMessage }, hideLabel ? /* @__PURE__ */ _react4.default.createElement(_react.VisuallyHidden, null, formLabel) : formLabel, helperText && /* @__PURE__ */ _react4.default.createElement(FieldHelperText, null, helperText), /* @__PURE__ */ _react4.default.createElement(_react.Input, { ...inputProps }), errorMessage && /* @__PURE__ */ _react4.default.createElement(FieldErrorText, null, errorMessage));\n};\n\n// src/components/ConditionalWrapperBS.tsx\n\nvar ConditionalWrapperBS = ({ condition, children, wrapper: Wrapper }) => condition ? /* @__PURE__ */ _react4.default.createElement(Wrapper, null, children) : /* @__PURE__ */ _react4.default.createElement(_react4.default.Fragment, null, children);\n\n// src/components/ErrorBoundaryBS.tsx\n\n\nvar StyledPre = (props) => /* @__PURE__ */ _react4.default.createElement(_react.Box, { as: \"pre\", paddingTop: \"0.5rem\", wordBreak: \"break-all\", whiteSpace: \"pre-wrap\", fontSize: \"0.8rem\", ...props });\nvar ErrorBoundaryBS = class extends _react4.default.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n static getDerivedStateFromError(error) {\n return { hasError: true };\n }\n componentDidCatch(error, errorInfo) {\n this.setState({ hasError: true, error, errorInfo });\n console.error(error, { errorInfo, boundaryName: this.props.boundaryName });\n }\n render() {\n if (this.state.hasError) {\n const stackTrace = _optionalChain([this, 'access', _ => _.state, 'access', _2 => _2.errorInfo, 'optionalAccess', _3 => _3.componentStack]);\n const errormsg = _optionalChain([this, 'access', _4 => _4.state, 'access', _5 => _5.error, 'optionalAccess', _6 => _6.message]);\n const info = this.props.boundaryName;\n return /* @__PURE__ */ _react4.default.createElement(\"div\", null, /* @__PURE__ */ _react4.default.createElement(AlertBS, { status: \"error\" }, /* @__PURE__ */ _react4.default.createElement(\"p\", null, \"Beklager, det skjedde en teknisk feil.\"), isDevelopment() && (stackTrace || errormsg) && /* @__PURE__ */ _react4.default.createElement(\"div\", null, /* @__PURE__ */ _react4.default.createElement(StyledPre, null, errormsg || \"\"), /* @__PURE__ */ _react4.default.createElement(StyledPre, null, info || \"\"), /* @__PURE__ */ _react4.default.createElement(StyledPre, null, stackTrace || \"\"))));\n }\n return this.props.children;\n }\n};\n\n// src/components/HashLinkTargetBS.tsx\n\n\n\n// src/styles/chakraTheme/biblioteksentralenChakraTheme.ts\n\n\n// src/styles/chakraTheme/ButtonStyles.ts\n\nvar variants = {\n primary: {\n backgroundColor: colors.black,\n color: \"white\",\n _hover: {\n backgroundColor: \"hsla(0deg, 0%, 70%, 1)\",\n color: \"black\"\n }\n },\n secondary: {\n borderColor: \"currentColor\",\n color: \"currentColor\",\n backgroundColor: \"transparent\",\n _hover: {\n backgroundColor: \"currentColor/7\"\n }\n },\n tertiary: {\n color: \"currentColor\",\n backgroundColor: \"transparent\",\n _hover: {\n backgroundColor: \"currentColor/7\"\n }\n },\n // Inherit variants from Chakra's default config. Seems like they are overridden by our custom variants by default.\n ..._optionalChain([_react.defaultConfig, 'access', _7 => _7.theme, 'optionalAccess', _8 => _8.recipes, 'optionalAccess', _9 => _9.button, 'optionalAccess', _10 => _10.variants, 'optionalAccess', _11 => _11.variant])\n};\nvar ButtonStyles = _react.defineRecipe.call(void 0, {\n base: {\n borderColor: \"transparent\",\n borderWidth: \"0.1em\",\n fontWeight: 600,\n _disabled: {\n backgroundColor: `${colors.grey45}`,\n color: \"white\",\n opacity: 1\n }\n },\n variants: {\n variant: variants,\n size: {\n sm: {\n h: \"8\",\n px: \"2\",\n textStyle: \"md\"\n },\n md: {\n textStyle: \"md\"\n },\n lg: {\n h: \"12\",\n textStyle: \"lg\"\n }\n }\n },\n defaultVariants: {\n variant: \"primary\",\n size: \"md\"\n }\n});\n\n// src/styles/chakraTheme/ContainerStyles.ts\n\nvar ContainerStyles = _react.defineRecipe.call(void 0, {\n base: {\n px: \".75rem\"\n // Padding left/right\n }\n});\n\n// src/styles/chakraTheme/HeadingStyles.ts\n\nvar HeadingStyles = _react.defineRecipe.call(void 0, {\n base: {\n fontWeight: \"600\"\n }\n});\n\n// src/styles/chakraTheme/InputStyles.ts\n\nvar variants2 = {\n subtle: {\n backgroundColor: { _light: \"gray.200\", _dark: \"whiteAlpha.100\" },\n _hover: {\n bg: { _light: \"gray.300\", _dark: \"whiteAlpha.200\" }\n }\n },\n outline: {\n borderColor: { _light: \"gray.300\", _dark: \"whiteAlpha.300\" },\n _hover: {\n borderColor: { _light: \"gray.400\", _dark: \"whiteAlpha.400\" }\n }\n },\n flushed: {\n borderColor: { _light: \"gray.300\", _dark: \"whiteAlpha.300\" },\n _hover: {\n borderColor: { _light: \"gray.400\", _dark: \"whiteAlpha.400\" }\n }\n }\n};\nvar InputStyles = _react.defineRecipe.call(void 0, {\n base: {\n _placeholder: {\n color: { _light: \"gray.500\", _dark: \"whiteAlpha.500\" }\n }\n },\n variants: {\n variant: variants2\n },\n defaultVariants: {\n variant: \"subtle\"\n }\n});\n\n// src/styles/chakraTheme/SpinnerStyles.ts\n\nvar SpinnerStyles = _react.defineRecipe.call(void 0, {\n base: {\n animationDuration: \".8s\",\n color: colors.accentBlueMedium,\n // Todo: Legg til trackColor: https://chakra-ui.com/docs/components/spinner#track-color\n borderWidth: \".175em\"\n }\n});\n\n// src/styles/chakraTheme/sizes.ts\nvar container = {\n sm: { value: \"40rem\" },\n md: { value: \"48rem\" },\n lg: { value: \"56rem\" },\n // Forsøker 56rem som standardbredde etter testing med Katrine\n xl: { value: \"80rem\" }\n};\nvar sizes = {\n container\n};\n\n// src/styles/chakraTheme/LinkStyles.ts\n\nvar variants3 = {\n plain: {\n color: \"currentColor\",\n textDecoration: \"none\",\n textDecorationColor: \"currentColor\",\n _hover: {\n textDecorationColor: \"currentColor\",\n textDecoration: \"underline\"\n }\n },\n underline: {\n color: \"currentColor\",\n textDecoration: \"underline\",\n textDecorationColor: \"currentColor\",\n _hover: {\n textDecoration: \"none\"\n }\n }\n};\nvar LinkStyles = _react.defineRecipe.call(void 0, {\n base: {\n _focus: {\n outline: \"none\"\n }\n },\n variants: {\n variant: variants3\n },\n defaultVariants: {\n variant: \"underline\"\n }\n});\n\n// src/styles/chakraTheme/biblioteksentralenChakraTheme.ts\nvar tokens = _react.defineTokens.call(void 0, {\n sizes\n});\nvar globalHyphens = {\n hyphens: \"auto\",\n hyphenateLimitChars: \"8 5 3\"\n // minimum word-length / min letters first line / min letters second line\n};\nvar focusStyle = {\n outline: \"none !important\",\n boxShadow: `0 0 0 .05rem ${colors.white}, 0 0 0 .25rem ${colors.accentBlueMedium}, 0 0 0 .3rem ${colors.white} !important`,\n transition: \"box-shadow 0.1s ease-out\"\n // Transition makes the newly focused element \"pop in\" and easier to spot\n};\nvar biblioteksentralenChakraTheme = _react.defineConfig.call(void 0, {\n theme: {\n tokens,\n recipes: {\n heading: HeadingStyles,\n button: ButtonStyles,\n input: InputStyles,\n link: LinkStyles,\n container: ContainerStyles,\n spinner: SpinnerStyles\n }\n },\n globalCss: {\n html: {\n fontSize: { base: \"112.5%\", md: \"120%\" },\n // Sørger for smooth scrolling for interne lenker som scroller til annet sted på siden,\n // men ikke hvis fokus er utenfor viduet, feks ved søk i tekst (ctrl + f)\n \"&:focus-within\": { scrollBehavior: \"smooth !important\" }\n },\n body: {\n ...globalHyphens\n },\n // Felles fokus-styling for alle elementer for å sikre at de har en tydelig og uniform visuell indikasjon når de er i fokus\n \"*:focus-visible\": focusStyle\n }\n});\n\n// src/components/HashLinkTargetBS.tsx\nvar focusOnRelativeParentStyle = {\n _focusWithin: {\n position: \"static\",\n boxShadow: \"none\",\n \"&::after\": {\n content: '\"\"',\n position: \"absolute\",\n top: 0,\n left: 0,\n height: \"100%\",\n width: \"100%\",\n pointerEvents: \"none\",\n borderRadius: \"0.25rem\",\n ...focusStyle\n }\n }\n};\nfunction HashLinkTargetBS(props) {\n return /* @__PURE__ */ _react4.default.createElement(_react.Box, { position: \"relative\", css: props.focusOnParent ? focusOnRelativeParentStyle : void 0 }, /* @__PURE__ */ _react4.default.createElement(\n _react.Box,\n {\n id: props.id,\n tabIndex: props.focusOnParent ? -1 : void 0,\n position: \"absolute\",\n top: `-${props.spaceAbove || \"2.5rem\"}`,\n _focus: {\n boxShadow: \"none !important\"\n }\n }\n ));\n}\n\n// src/components/withErrorBoundaryBS.tsx\n\nvar withErrorBoundaryBS = (Component, boundaryName) => {\n return (props) => /* @__PURE__ */ _react4.default.createElement(ErrorBoundaryBS, { boundaryName }, /* @__PURE__ */ _react4.default.createElement(Component, { ...props }));\n};\n\n// src/components/BiblioteksentralenProvider.tsx\n\n\nvar _system = require('@chakra-ui/system');\nvar BiblioteksentralenProvider = (props) => /* @__PURE__ */ _react4.default.createElement(_react.ChakraProvider, { value: _react.createSystem.call(void 0, _react.defaultConfig, biblioteksentralenChakraTheme, props.customTheme || {}) }, /* @__PURE__ */ _react4.default.createElement(_system.ColorModeProvider, { ...props }));\n\n\n\n\n\n\n\n\n\n\nexports.AlertBS = AlertBS; exports.BiblioteksentralenProvider = BiblioteksentralenProvider; exports.ButtonBS = ButtonBS; exports.ConditionalWrapperBS = ConditionalWrapperBS; exports.ErrorBoundaryBS = ErrorBoundaryBS; exports.HashLinkTargetBS = HashLinkTargetBS; exports.IconButtonBS = IconButtonBS; exports.InputBS = InputBS; exports.withErrorBoundaryBS = withErrorBoundaryBS;\n","import { format } from \"date-fns/format\";\nimport { nb } from \"date-fns/locale/nb\";\n\nexport function formaterDato(dato?: string, dateFnsformat = \"Pp\") {\n if (typeof dato !== \"string\") return \"Ukjent dato\";\n\n try {\n return format(new Date(dato), dateFnsformat, { locale: nb });\n } catch (e) {\n console.error(\"Kunne ikke formattere dato:\" + dato, e);\n return dato;\n }\n}\n","export const colors = {\n black: \"#000000\",\n grey90: \"#181818\",\n grey80: \"#333333\",\n grey60: \"#585858\",\n grey45: \"#8c8c8c\",\n grey30: \"#b2b2b2\",\n grey15: \"#d9d9d9\",\n grey10: \"#e5e5e5\",\n grey05: \"#f2f2f2\",\n white: \"#ffffff\",\n bsRødDark: \"#870010\",\n bsRødMedium: \"#d53d40\",\n accentPurple: \"#331433\",\n accentPeach: \"#ffba99\",\n accentGreen: \"#003b29\",\n accentBlueDark: \"#001740\",\n accentBlueMedium: \"#5996de\",\n accentYellow: \"#ffc970\",\n lightBlue: \"#dbe8ef\",\n lightGreen: \"#dbe0db\",\n lightPeach: \"#f4e7de\",\n lightPurple: \"#ece8f3\",\n statusRed: \"#ad313c\",\n statusYellow: \"#bc5600\",\n statusGreen: \"#24845b\",\n statusGreenLight: \"#edf4f1\",\n statusRedLight: \"#f8efef\",\n statusYellowLight: \"#fff6e4\",\n neptune: {\n \"100\": \"#CFE6E8\",\n \"200\": \"#9FCDD2\",\n \"300\": \"#6FB5BB\",\n \"400\": \"#3F9CA5\",\n \"500\": \"#0F838E\",\n \"600\": \"#0C6972\",\n \"700\": \"#094F55\",\n \"800\": \"#063439\",\n \"900\": \"#031A1C\",\n },\n};\n","export function isDevelopment(): boolean {\n return process.env.NODE_ENV === \"development\";\n}\n\nexport function isClient(): boolean {\n return typeof window !== \"undefined\";\n}\n\nexport function isServer(): boolean {\n return !isClient();\n}\n","import { Modify } from \"@biblioteksentralen/types\";\nimport { colors } from \"@biblioteksentralen/utils\";\nimport { AlertRootProps, Alert as ChakraAlert, SystemStyleObject } from \"@chakra-ui/react\";\nimport React, { ReactNode } from \"react\";\nimport { AlertCircle, CheckCircle, Info, XCircle } from \"react-feather\";\n\ntype Status = \"info\" | \"warning\" | \"success\" | \"error\";\ntype CustomVariants = \"inline\";\ntype Variants = AlertRootProps[\"variant\"] | CustomVariants;\n\nconst colorLookup: Record<Status, { bg: string; color: string }> = {\n info: { bg: colors.lightBlue, color: colors.accentBlueMedium },\n warning: { bg: colors.statusYellowLight, color: colors.statusYellow },\n success: { bg: colors.statusGreenLight, color: colors.statusGreen },\n error: { bg: colors.statusRedLight, color: colors.statusRed },\n};\n\nconst iconLookup: Record<Status, React.ReactElement> = {\n info: <Info strokeWidth={1.75} role=\"img\" aria-label=\"Informasjon\" />,\n warning: <AlertCircle strokeWidth={1.75} role=\"img\" aria-label=\"Advarsel\" />,\n success: <CheckCircle strokeWidth={1.75} role=\"img\" aria-label=\"Suksess\" />,\n error: <XCircle strokeWidth={1.75} role=\"img\" aria-label=\"Feil\" />,\n};\n\ninterface Props extends Modify<AlertRootProps, { variant?: Variants }> {\n children: ReactNode;\n header?: ReactNode;\n status: Status;\n variant?: Variants;\n}\n\nconst variantStyles: Record<CustomVariants, SystemStyleObject> = {\n inline: {\n borderColor: \"transparent\",\n backgroundColor: \"transparent\",\n padding: \"0\",\n },\n};\n\nexport function AlertBS({ status, children, variant, header, ...rest }: Props) {\n const colors = colorLookup[status];\n return (\n <ChakraAlert.Root\n status={status}\n fontSize=\"md\"\n border={`0.1rem solid`}\n borderColor={colors.color}\n backgroundColor={colors.bg}\n display=\"flex\"\n flexWrap=\"wrap\"\n {...(variant === \"inline\" ? variantStyles[variant] : {})}\n {...rest}\n >\n <ChakraAlert.Indicator marginX=\"auto\">{iconLookup[status]}</ChakraAlert.Indicator>\n <ChakraAlert.Content color=\"black\">\n {header && <ChakraAlert.Title>{header}</ChakraAlert.Title>}\n <ChakraAlert.Description>{children}</ChakraAlert.Description>\n </ChakraAlert.Content>\n </ChakraAlert.Root>\n );\n}\n","import { Modify } from \"@biblioteksentralen/types\";\nimport { Button as ChakraButton, ButtonProps as NativeButtonProps } from \"@chakra-ui/react\";\nimport { ComponentWithAs } from \"@chakra-ui/system\";\nimport { CustomButtonVariants } from \"../styles/chakraTheme/ButtonStyles\";\n\n/**\n * Re-exporting chackras Button with a customised types\n * This causes both chakras native variants and our home-made variants to show up in auto-complete\n */\ntype ButtonVariants = NativeButtonProps[\"variant\"] | CustomButtonVariants;\nexport type ButtonBSProps = Modify<NativeButtonProps, { variant?: ButtonVariants }>;\nexport const ButtonBS = ChakraButton as ComponentWithAs<\"button\", ButtonBSProps>;\n","import { Modify } from \"@biblioteksentralen/types\";\nimport { IconButton as ChakraIconButton, IconButtonProps as ChakraIconButtonProps } from \"@chakra-ui/react\";\nimport { ComponentWithAs } from \"@chakra-ui/system\";\nimport { CustomButtonVariants } from \"../styles/chakraTheme/ButtonStyles\";\n\n/**\n * Re-exporting chackras IconButton with a customised types\n * This causes both chakras native variants and our home-made variants to show up in auto-complete\n */\ntype IconButtonVariants = ChakraIconButtonProps[\"variant\"] | CustomButtonVariants;\nexport type IconButtonBSProps = Modify<ChakraIconButtonProps, { variant?: IconButtonVariants }>;\nexport const IconButtonBS = ChakraIconButton as ComponentWithAs<\"button\", IconButtonBSProps>;\n","import { Input as ChakraInput, Field, FieldLabelProps, InputProps, VisuallyHidden } from \"@chakra-ui/react\";\nimport React, { RefObject } from \"react\";\n\ninterface Props extends InputProps {\n label: string;\n hideLabel?: boolean;\n labelProps?: FieldLabelProps;\n helperText?: string;\n errorMessage?: string;\n ref?: RefObject<HTMLInputElement | null>;\n}\n\n/**\n * Creating custom input-component to make sure label is always set (for accessibility)\n * Also handles some common needs (helper text and error message. For more advanced input-components we leave it to the consumers to compose custom input-components based on Chakra\n */\nexport const InputBS = (props: Props) => {\n const { labelProps, label, helperText, errorMessage, hideLabel, ...inputProps } = props;\n\n const formLabel = <Field.Label {...labelProps}>{label}</Field.Label>;\n\n return (\n <Field.Root invalid={!!errorMessage}>\n {hideLabel ? <VisuallyHidden>{formLabel}</VisuallyHidden> : formLabel}\n {/* @ts-expect-error Chakra v3 Field.HelperText and Field.ErrorText don't include children in their types */}\n {helperText && <FieldHelperText>{helperText}</FieldHelperText>}\n <ChakraInput {...inputProps} />\n {/* @ts-expect-error Chakra v3 Field.HelperText and Field.ErrorText don't include children in their types */}\n {errorMessage && <FieldErrorText>{errorMessage}</FieldErrorText>}\n </Field.Root>\n );\n};\n","import React, { FunctionComponent, ReactNode } from \"react\";\n\ntype Props = {\n children: ReactNode;\n wrapper: FunctionComponent<{ children: ReactNode }>;\n condition: boolean;\n};\n\n/**\n * Conditionally wrapps children with a component. If conditions are not met children mounted without the wrapper.\n */\nexport const ConditionalWrapperBS: FunctionComponent<Props> = ({ condition, children, wrapper: Wrapper }) =>\n condition ? <Wrapper>{children}</Wrapper> : <>{children}</>;\n","import { isDevelopment } from \"@biblioteksentralen/utils\";\nimport { Box, BoxProps } from \"@chakra-ui/react\";\nimport React, { ErrorInfo, ReactNode } from \"react\";\nimport { AlertBS } from \"./AlertBS\";\n\ninterface Props {\n boundaryName?: string;\n children: ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n error?: Error;\n errorInfo?: ErrorInfo;\n}\n\nconst StyledPre = (props: BoxProps) => (\n <Box as=\"pre\" paddingTop=\"0.5rem\" wordBreak=\"break-all\" whiteSpace=\"pre-wrap\" fontSize=\"0.8rem\" {...props} />\n);\n\nexport class ErrorBoundaryBS extends React.Component<Props, State> {\n constructor(props: any) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error: any) {\n return { hasError: true };\n }\n\n componentDidCatch(error: any, errorInfo: any) {\n this.setState({ hasError: true, error, errorInfo });\n console.error(error, { errorInfo, boundaryName: this.props.boundaryName });\n }\n\n render() {\n if (this.state.hasError) {\n const stackTrace = this.state.errorInfo?.componentStack;\n const errormsg = this.state.error?.message;\n const info = this.props.boundaryName;\n\n return (\n <div>\n <AlertBS status=\"error\">\n <p>Beklager, det skjedde en teknisk feil.</p>\n {isDevelopment() && (stackTrace || errormsg) && (\n <div>\n <StyledPre>{errormsg || \"\"}</StyledPre>\n <StyledPre>{info || \"\"}</StyledPre>\n <StyledPre>{stackTrace || \"\"}</StyledPre>\n </div>\n )}\n </AlertBS>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n","import { colors } from \"@biblioteksentralen/utils\";\nimport { defaultConfig, defineRecipe, SystemStyleObject } from \"@chakra-ui/react\";\n\nexport type CustomButtonVariants = \"primary\" | \"secondary\" | \"tertiary\";\n\nconst variants: Record<CustomButtonVariants, SystemStyleObject> = {\n primary: {\n backgroundColor: colors.black,\n color: \"white\",\n _hover: {\n backgroundColor: \"hsla(0deg, 0%, 70%, 1)\",\n color: \"black\",\n },\n },\n secondary: {\n borderColor: \"currentColor\",\n color: \"currentColor\",\n backgroundColor: \"transparent\",\n _hover: {\n backgroundColor: \"currentColor/7\",\n },\n },\n tertiary: {\n color: \"currentColor\",\n backgroundColor: \"transparent\",\n _hover: {\n backgroundColor: \"currentColor/7\",\n },\n },\n // Inherit variants from Chakra's default config. Seems like they are overridden by our custom variants by default.\n ...defaultConfig.theme?.recipes?.button?.variants?.variant,\n};\n\nexport const ButtonStyles = defineRecipe({\n base: {\n borderColor: \"transparent\",\n borderWidth: \"0.1em\",\n fontWeight: 600,\n _disabled: {\n backgroundColor: `${colors.grey45}`,\n color: \"white\",\n opacity: 1,\n },\n },\n variants: {\n variant: variants,\n size: {\n sm: {\n h: \"8\",\n px: \"2\",\n textStyle: \"md\",\n },\n md: {\n textStyle: \"md\",\n },\n lg: {\n h: \"12\",\n textStyle: \"lg\",\n },\n },\n },\n defaultVariants: {\n variant: \"primary\",\n size: \"md\",\n },\n});\n","import { defineRecipe } from \"@chakra-ui/react\";\n\nexport const ContainerStyles = defineRecipe({\n base: {\n px: \".75rem\", // Padding left/right\n },\n});\n","import { defineRecipe } from \"@chakra-ui/react\";\n\nexport const HeadingStyles = defineRecipe({\n base: {\n fontWeight: \"600\",\n },\n});\n","import { defineRecipe, SystemStyleObject } from \"@chakra-ui/react\";\n\nconst variants: Record<string, SystemStyleObject> = {\n subtle: {\n backgroundColor: { _light: \"gray.200\", _dark: \"whiteAlpha.100\" },\n _hover: {\n bg: { _light: \"gray.300\", _dark: \"whiteAlpha.200\" },\n },\n },\n outline: {\n borderColor: { _light: \"gray.300\", _dark: \"whiteAlpha.300\" },\n _hover: {\n borderColor: { _light: \"gray.400\", _dark: \"whiteAlpha.400\" },\n },\n },\n flushed: {\n borderColor: { _light: \"gray.300\", _dark: \"whiteAlpha.300\" },\n _hover: {\n borderColor: { _light: \"gray.400\", _dark: \"whiteAlpha.400\" },\n },\n },\n};\n\nexport const InputStyles = defineRecipe({\n base: {\n _placeholder: {\n color: { _light: \"gray.500\", _dark: \"whiteAlpha.500\" },\n },\n },\n variants: {\n variant: variants,\n },\n defaultVariants: {\n variant: \"subtle\",\n },\n});\n","import { colors } from \"@biblioteksentralen/utils\";\nimport { defineRecipe } from \"@chakra-ui/react\";\n\nexport const SpinnerStyles = defineRecipe({\n base: {\n animationDuration: \".8s\",\n color: colors.accentBlueMedium,\n // Todo: Legg til trackColor: https://chakra-ui.com/docs/components/spinner#track-color\n borderWidth: \".175em\",\n },\n});\n","const container = {\n sm: { value: \"40rem\" },\n md: { value: \"48rem\" },\n lg: { value: \"56rem\" }, // Forsøker 56rem som standardbredde etter testing med Katrine\n xl: { value: \"80rem\" },\n};\n\nexport const sizes = {\n container,\n};\n","import { defineRecipe, SystemStyleObject } from \"@chakra-ui/react\";\n\nexport type CustomLinkVariants = \"plain\" | \"underline\";\n\nconst variants: Record<CustomLinkVariants, SystemStyleObject> = {\n plain: {\n color: \"currentColor\",\n textDecoration: \"none\",\n textDecorationColor: \"currentColor\",\n _hover: {\n textDecorationColor: \"currentColor\",\n textDecoration: \"underline\",\n },\n },\n underline: {\n color: \"currentColor\",\n textDecoration: \"underline\",\n textDecorationColor: \"currentColor\",\n _hover: {\n textDecoration: \"none\",\n },\n },\n};\n\nexport const LinkStyles = defineRecipe({\n base: {\n _focus: {\n outline: \"none\",\n },\n },\n variants: {\n variant: variants,\n },\n defaultVariants: {\n variant: \"underline\",\n },\n});\n","import { defineConfig, defineTokens } from \"@chakra-ui/react\";\nimport { ButtonStyles } from \"./ButtonStyles\";\nimport { ContainerStyles } from \"./ContainerStyles\";\nimport { HeadingStyles } from \"./HeadingStyles\";\nimport { InputStyles } from \"./InputStyles\";\nimport { SpinnerStyles } from \"./SpinnerStyles\";\nimport { sizes } from \"./sizes\";\nimport { LinkStyles } from \"./LinkStyles\";\nimport { colors } from \"@biblioteksentralen/utils\";\n\nconst tokens = defineTokens({\n sizes,\n});\n\n// https://blog.logrocket.com/guide-css-word-wrap-overflow-wrap-word-break/\n// https://medium.com/clear-left-thinking/all-you-need-to-know-about-hyphenation-in-css-2baee2d89179\n// Skrur på hyphens auto som default fordi vi har masse mikrotekster og små elementer der layout knekker uten dette, og vi lager stadig nye og glemmer å ta hensyn til dette.\n// Så kan man optionaly sette hyphens: none de stedene man ikke ønsker det, men har ikke sett noe som knekker/blir rart pga dette enda\nconst globalHyphens = {\n hyphens: \"auto\",\n hyphenateLimitChars: \"8 5 3\", // minimum word-length / min letters first line / min letters second line\n};\n\nexport const focusStyle = {\n outline: \"none !important\",\n boxShadow: `0 0 0 .05rem ${colors.white}, 0 0 0 .25rem ${colors.accentBlueMedium}, 0 0 0 .3rem ${colors.white} !important`,\n transition: \"box-shadow 0.1s ease-out\", // Transition makes the newly focused element \"pop in\" and easier to spot\n};\n\nexport const biblioteksentralenChakraTheme = defineConfig({\n theme: {\n tokens,\n recipes: {\n heading: HeadingStyles,\n button: ButtonStyles,\n input: InputStyles,\n link: LinkStyles,\n container: ContainerStyles,\n spinner: SpinnerStyles,\n },\n },\n globalCss: {\n html: {\n fontSize: { base: \"112.5%\", md: \"120%\" },\n // Sørger for smooth scrolling for interne lenker som scroller til annet sted på siden,\n // men ikke hvis fokus er utenfor viduet, feks ved søk i tekst (ctrl + f)\n \"&:focus-within\": { scrollBehavior: \"smooth !important\" },\n },\n body: {\n ...globalHyphens,\n },\n // Felles fokus-styling for alle elementer for å sikre at de har en tydelig og uniform visuell indikasjon når de er i fokus\n \"*:focus-visible\": focusStyle,\n },\n});\n","import { Box } from \"@chakra-ui/react\";\nimport React from \"react\";\nimport { focusStyle } from \"../styles/chakraTheme/biblioteksentralenChakraTheme\";\n\ninterface Props {\n id: string;\n /**\n * angir hvor mye luft til vil ha over HashLinkTarget ved bruk av hash-lenke, eks '4rem'\n */\n spaceAbove?: string;\n /**\n * angir om du vil ha fokusramme rundt komponenten som mounter HashLinkTarget. Da må komponenten du wrapper med ha position: relative | absolute el\n */\n focusOnParent?: boolean;\n}\n\nconst focusOnRelativeParentStyle = {\n _focusWithin: {\n position: \"static\",\n boxShadow: \"none\",\n \"&::after\": {\n content: '\"\"',\n position: \"absolute\",\n top: 0,\n left: 0,\n height: \"100%\",\n width: \"100%\",\n pointerEvents: \"none\",\n borderRadius: \"0.25rem\",\n ...focusStyle,\n },\n },\n};\n\n/*\n * Komponent som sørger for luft over anchors (elementer man kan lenke til med hash-lenker feks <a href=\"#min-overskrift\">Ta meg til overskrift</a>)\n */\nexport function HashLinkTargetBS(props: Props) {\n return (\n <Box position=\"relative\" css={props.focusOnParent ? focusOnRelativeParentStyle : undefined}>\n <Box\n id={props.id}\n tabIndex={props.focusOnParent ? -1 : undefined}\n position=\"absolute\"\n top={`-${props.spaceAbove || \"2.5rem\"}`}\n _focus={{\n boxShadow: \"none !important\",\n }}\n />\n </Box>\n );\n}\n","import React from \"react\";\nimport { ErrorBoundaryBS } from \"./ErrorBoundaryBS\";\n\nexport const withErrorBoundaryBS = <Props,>(Component: React.ComponentType<Props>, boundaryName: string) => {\n return (props: Props & React.JSX.IntrinsicAttributes) => (\n <ErrorBoundaryBS boundaryName={boundaryName}>\n <Component {...props} />\n </ErrorBoundaryBS>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport { ChakraProvider, createSystem, defaultConfig, SystemConfig } from \"@chakra-ui/react\";\nimport { biblioteksentralenChakraTheme } from \"../styles/chakraTheme/biblioteksentralenChakraTheme\";\nimport { ColorModeProvider } from \"@chakra-ui/system\";\n\ninterface Props {\n children: ReactNode;\n customTheme?: SystemConfig;\n}\n\nexport const BiblioteksentralenProvider = (props: Props) => (\n <ChakraProvider value={createSystem(defaultConfig, biblioteksentralenChakraTheme, props.customTheme || {})}>\n <ColorModeProvider {...props} />\n </ChakraProvider>\n);\n"]}