@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.
- package/dist/index.d.mts +106 -15
- package/dist/index.d.ts +106 -15
- package/dist/index.js +739 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +646 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -12
- package/dist/ButtonStyles-CRAk2YIJ.d.mts +0 -3
- package/dist/ButtonStyles-CRAk2YIJ.d.ts +0 -3
- package/dist/chunk-2KZDHLEJ.mjs +0 -9
- package/dist/chunk-2KZDHLEJ.mjs.map +0 -1
- package/dist/chunk-3IJ454KG.mjs +0 -185
- package/dist/chunk-3IJ454KG.mjs.map +0 -1
- package/dist/chunk-5GJBW3WE.mjs +0 -270
- package/dist/chunk-5GJBW3WE.mjs.map +0 -1
- package/dist/chunk-7MKFY66H.mjs +0 -65
- package/dist/chunk-7MKFY66H.mjs.map +0 -1
- package/dist/chunk-BCT5QU5W.js +0 -142
- package/dist/chunk-BCT5QU5W.js.map +0 -1
- package/dist/chunk-BN5W6FVN.mjs +0 -50
- package/dist/chunk-BN5W6FVN.mjs.map +0 -1
- package/dist/chunk-BRFRPPOW.js +0 -10
- package/dist/chunk-BRFRPPOW.js.map +0 -1
- package/dist/chunk-BZS3AX26.mjs +0 -6
- package/dist/chunk-BZS3AX26.mjs.map +0 -1
- package/dist/chunk-CGCBID7S.mjs +0 -41
- package/dist/chunk-CGCBID7S.mjs.map +0 -1
- package/dist/chunk-J5IF7WUN.js +0 -10
- package/dist/chunk-J5IF7WUN.js.map +0 -1
- package/dist/chunk-NSYSPEHR.js +0 -86
- package/dist/chunk-NSYSPEHR.js.map +0 -1
- package/dist/chunk-NYKSRUWF.js +0 -51
- package/dist/chunk-NYKSRUWF.js.map +0 -1
- package/dist/chunk-O4EXBCND.js +0 -19
- package/dist/chunk-O4EXBCND.js.map +0 -1
- package/dist/chunk-PLWK7HEC.js +0 -75
- package/dist/chunk-PLWK7HEC.js.map +0 -1
- package/dist/chunk-PQLTQYZ3.mjs +0 -41
- package/dist/chunk-PQLTQYZ3.mjs.map +0 -1
- package/dist/chunk-QAW4IRLI.js +0 -55
- package/dist/chunk-QAW4IRLI.js.map +0 -1
- package/dist/chunk-QBXCCJ24.js +0 -344
- package/dist/chunk-QBXCCJ24.js.map +0 -1
- package/dist/chunk-QX75QJ7F.mjs +0 -132
- package/dist/chunk-QX75QJ7F.mjs.map +0 -1
- package/dist/chunk-RZUGRIUF.mjs +0 -76
- package/dist/chunk-RZUGRIUF.mjs.map +0 -1
- package/dist/chunk-UFIMO32F.js +0 -275
- package/dist/chunk-UFIMO32F.js.map +0 -1
- package/dist/chunk-VSICUYFB.js +0 -51
- package/dist/chunk-VSICUYFB.js.map +0 -1
- package/dist/chunk-WYQNSPEX.mjs +0 -6
- package/dist/chunk-WYQNSPEX.mjs.map +0 -1
- package/dist/components/AlertBS.d.mts +0 -18
- package/dist/components/AlertBS.d.ts +0 -18
- package/dist/components/AlertBS.js +0 -9
- package/dist/components/AlertBS.js.map +0 -1
- package/dist/components/AlertBS.mjs +0 -5
- package/dist/components/AlertBS.mjs.map +0 -1
- package/dist/components/BiblioteksentralenProvider.d.mts +0 -10
- package/dist/components/BiblioteksentralenProvider.d.ts +0 -10
- package/dist/components/BiblioteksentralenProvider.js +0 -10
- package/dist/components/BiblioteksentralenProvider.js.map +0 -1
- package/dist/components/BiblioteksentralenProvider.mjs +0 -6
- package/dist/components/BiblioteksentralenProvider.mjs.map +0 -1
- package/dist/components/ButtonBS.d.mts +0 -16
- package/dist/components/ButtonBS.d.ts +0 -16
- package/dist/components/ButtonBS.js +0 -8
- package/dist/components/ButtonBS.js.map +0 -1
- package/dist/components/ButtonBS.mjs +0 -4
- package/dist/components/ButtonBS.mjs.map +0 -1
- package/dist/components/ConditionalWrapperBS.d.mts +0 -15
- package/dist/components/ConditionalWrapperBS.d.ts +0 -15
- package/dist/components/ConditionalWrapperBS.js +0 -8
- package/dist/components/ConditionalWrapperBS.js.map +0 -1
- package/dist/components/ConditionalWrapperBS.mjs +0 -4
- package/dist/components/ConditionalWrapperBS.mjs.map +0 -1
- package/dist/components/ErrorBoundaryBS.d.mts +0 -21
- package/dist/components/ErrorBoundaryBS.d.ts +0 -21
- package/dist/components/ErrorBoundaryBS.js +0 -10
- package/dist/components/ErrorBoundaryBS.js.map +0 -1
- package/dist/components/ErrorBoundaryBS.mjs +0 -6
- package/dist/components/ErrorBoundaryBS.mjs.map +0 -1
- package/dist/components/HashLinkTargetBS.d.mts +0 -16
- package/dist/components/HashLinkTargetBS.d.ts +0 -16
- package/dist/components/HashLinkTargetBS.js +0 -10
- package/dist/components/HashLinkTargetBS.js.map +0 -1
- package/dist/components/HashLinkTargetBS.mjs +0 -6
- package/dist/components/HashLinkTargetBS.mjs.map +0 -1
- package/dist/components/IconButtonBS.d.mts +0 -16
- package/dist/components/IconButtonBS.d.ts +0 -16
- package/dist/components/IconButtonBS.js +0 -8
- package/dist/components/IconButtonBS.js.map +0 -1
- package/dist/components/IconButtonBS.mjs +0 -4
- package/dist/components/IconButtonBS.mjs.map +0 -1
- package/dist/components/InputBS.d.mts +0 -18
- package/dist/components/InputBS.d.ts +0 -18
- package/dist/components/InputBS.js +0 -8
- package/dist/components/InputBS.js.map +0 -1
- package/dist/components/InputBS.mjs +0 -4
- package/dist/components/InputBS.mjs.map +0 -1
- package/dist/components/withErrorBoundaryBS.d.mts +0 -5
- package/dist/components/withErrorBoundaryBS.d.ts +0 -5
- package/dist/components/withErrorBoundaryBS.js +0 -11
- package/dist/components/withErrorBoundaryBS.js.map +0 -1
- package/dist/components/withErrorBoundaryBS.mjs +0 -7
- package/dist/components/withErrorBoundaryBS.mjs.map +0 -1
- /package/{dist/LICENSE → LICENSE} +0 -0
package/dist/chunk-PLWK7HEC.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function _define_property(obj, key, value) {
|
|
3
|
-
if (key in obj) {
|
|
4
|
-
Object.defineProperty(obj, key, {
|
|
5
|
-
value: value,
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true
|
|
9
|
-
});
|
|
10
|
-
} else {
|
|
11
|
-
obj[key] = value;
|
|
12
|
-
}
|
|
13
|
-
return obj;
|
|
14
|
-
}
|
|
15
|
-
function _object_spread(target) {
|
|
16
|
-
for(var i = 1; i < arguments.length; i++){
|
|
17
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
18
|
-
var ownKeys = Object.keys(source);
|
|
19
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
20
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
21
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
ownKeys.forEach(function(key) {
|
|
25
|
-
_define_property(target, key, source[key]);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
}
|
|
30
|
-
Object.defineProperty(exports, "__esModule", {
|
|
31
|
-
value: true
|
|
32
|
-
});
|
|
33
|
-
function _interopRequireDefault(obj) {
|
|
34
|
-
return obj && obj.__esModule ? obj : {
|
|
35
|
-
default: obj
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
"use client";
|
|
39
|
-
var _chunkQBXCCJ24js = require("./chunk-QBXCCJ24.js");
|
|
40
|
-
// src/components/HashLinkTargetBS.tsx
|
|
41
|
-
var _react = require("@chakra-ui/react");
|
|
42
|
-
var _react3 = require("react");
|
|
43
|
-
var _react4 = _interopRequireDefault(_react3);
|
|
44
|
-
var focusOnRelativeParentStyle = {
|
|
45
|
-
_focusWithin: {
|
|
46
|
-
position: "static",
|
|
47
|
-
boxShadow: "none",
|
|
48
|
-
"&::after": _object_spread({
|
|
49
|
-
content: '""',
|
|
50
|
-
position: "absolute",
|
|
51
|
-
top: 0,
|
|
52
|
-
left: 0,
|
|
53
|
-
height: "100%",
|
|
54
|
-
width: "100%",
|
|
55
|
-
pointerEvents: "none",
|
|
56
|
-
borderRadius: "0.25rem"
|
|
57
|
-
}, _chunkQBXCCJ24js.focusStyle)
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
function HashLinkTargetBS(props) {
|
|
61
|
-
return /* @__PURE__ */ _react4.default.createElement(_react.Box, {
|
|
62
|
-
position: "relative",
|
|
63
|
-
css: props.focusOnParent ? focusOnRelativeParentStyle : void 0
|
|
64
|
-
}, /* @__PURE__ */ _react4.default.createElement(_react.Box, {
|
|
65
|
-
id: props.id,
|
|
66
|
-
tabIndex: props.focusOnParent ? -1 : void 0,
|
|
67
|
-
position: "absolute",
|
|
68
|
-
top: "-".concat(props.spaceAbove || "2.5rem"),
|
|
69
|
-
_focus: {
|
|
70
|
-
boxShadow: "none !important"
|
|
71
|
-
}
|
|
72
|
-
}));
|
|
73
|
-
}
|
|
74
|
-
exports.HashLinkTargetBS = HashLinkTargetBS;
|
|
75
|
-
//# sourceMappingURL=chunk-PLWK7HEC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/danielwinsvold/Code/js-utils/packages/react/dist/chunk-PLWK7HEC.js","../src/components/HashLinkTargetBS.tsx"],"names":["Object","defineProperty","exports","value","_interopRequireDefault","obj","__esModule","default","_chunkQBXCCJ24js","require","_react","_react3","_react4","focusOnRelativeParentStyle","_focusWithin","position","boxShadow","content","top","left","height","width","pointerEvents","borderRadius","focusStyle","HashLinkTargetBS","props","createElement","Box","css","focusOnParent","id","tabIndex","spaceAbove","_focus"],"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;AAGA,IAAAG,mBAAAC,QAAA;AAEA,sCAAA;ACLA,IAAAC,SAAAD,QAAA;AACA,IAAAE,UAAAF,QAAA;AAAA,IAAAG,UAAAR,uBAAAO;AAeA,IAAME,6BAA6B;IACjCC,cAAc;QACZC,UAAU;QACVC,WAAW;QACX,YAAY;YACVC,SAAS;YACTF,UAAU;YACVG,KAAK;YACLC,MAAM;YACNC,QAAQ;YACRC,OAAO;YACPC,eAAe;YACfC,cAAc;WACXf,iBAAAgB,UAAA;IAEP;AACF;AAKO,SAASC,iBAAiBC,KAAA;IAC/B,OAAA,aAAA,GACEd,QAAAL,OAAA,CAAAoB,aAAA,CAACjB,OAAAkB,GAAA,EAAA;QAAIb,UAAS;QAAWc,KAAKH,MAAMI,aAAA,GAAgBjB,6BAA6B,KAAA;IAAA,GAAA,aAAA,GAC/ED,QAAAL,OAAA,CAAAoB,aAAA,CAACjB,OAAAkB,GAAA,EAAA;QACCG,IAAIL,MAAMK,EAAA;QACVC,UAAUN,MAAMI,aAAA,GAAgB,CAAA,IAAK,KAAA;QACrCf,UAAS;QACTG,KAAK,IAAgC,OAA5BQ,MAAMO,UAAA,IAAc;QACrBC,QAAA;YACKlB,WAAA;QACb;IAAA;AAIR;ADT4Cd,QAAAuB,gBAAA,GAAAA","sourcesContent":["\"use strict\";Object.defineProperty(exports, \"__esModule\", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\"use client\";\n\n\nvar _chunkQBXCCJ24js = require('./chunk-QBXCCJ24.js');\n\n// src/components/HashLinkTargetBS.tsx\nvar _react = require('@chakra-ui/react');\nvar _react3 = require('react'); var _react4 = _interopRequireDefault(_react3);\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 ..._chunkQBXCCJ24js.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\n\nexports.HashLinkTargetBS = HashLinkTargetBS;\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"]}
|
package/dist/chunk-PQLTQYZ3.mjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
function _define_property(obj, key, value) {
|
|
3
|
-
if (key in obj) {
|
|
4
|
-
Object.defineProperty(obj, key, {
|
|
5
|
-
value: value,
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true
|
|
9
|
-
});
|
|
10
|
-
} else {
|
|
11
|
-
obj[key] = value;
|
|
12
|
-
}
|
|
13
|
-
return obj;
|
|
14
|
-
}
|
|
15
|
-
function _object_spread(target) {
|
|
16
|
-
for(var i = 1; i < arguments.length; i++){
|
|
17
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
18
|
-
var ownKeys = Object.keys(source);
|
|
19
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
20
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
21
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
ownKeys.forEach(function(key) {
|
|
25
|
-
_define_property(target, key, source[key]);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
}
|
|
30
|
-
import { biblioteksentralenChakraTheme } from "./chunk-5GJBW3WE.mjs";
|
|
31
|
-
// src/components/BiblioteksentralenProvider.tsx
|
|
32
|
-
import React from "react";
|
|
33
|
-
import { ChakraProvider, createSystem, defaultConfig } from "@chakra-ui/react";
|
|
34
|
-
import { ColorModeProvider } from "@chakra-ui/system";
|
|
35
|
-
var BiblioteksentralenProvider = function(props) {
|
|
36
|
-
return /* @__PURE__ */ React.createElement(ChakraProvider, {
|
|
37
|
-
value: createSystem(defaultConfig, biblioteksentralenChakraTheme, props.customTheme || {})
|
|
38
|
-
}, /* @__PURE__ */ React.createElement(ColorModeProvider, _object_spread({}, props)));
|
|
39
|
-
};
|
|
40
|
-
export { BiblioteksentralenProvider };
|
|
41
|
-
//# sourceMappingURL=chunk-PQLTQYZ3.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/danielwinsvold/Code/js-utils/packages/react/dist/chunk-PQLTQYZ3.mjs","../src/components/BiblioteksentralenProvider.tsx"],"names":["biblioteksentralenChakraTheme","React","ChakraProvider","createSystem","defaultConfig","ColorModeProvider","BiblioteksentralenProvider","props","createElement","value","customTheme"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SACEA,6BAA6B,QACxB,uBAAuB;AAE9B,gDAAgD;ACLhD,OAAOC,WAA0B,QAAA;AACjC,SAASC,cAAA,EAAgBC,YAAA,EAAcC,aAAA,QAAmC,mBAAA;AAE1E,SAASC,iBAAA,QAAyB,oBAAA;AAO3B,IAAMC,6BAA6B,SAACC;WACzC,aAAA,GAAAN,MAAAO,aAAA,CAACN,gBAAA;QAAeO,OAAON,aAAaC,eAAeJ,+BAA+BO,MAAMG,WAAA,IAAe,CAAC;IAAC,GACvG,aAAA,GAAAT,MAAAO,aAAA,CAACH,mBAAA,mBAAsBE;;ADD3B,SACED,0BAA0B,GAC1B","sourcesContent":["\"use client\";\nimport {\n biblioteksentralenChakraTheme\n} from \"./chunk-5GJBW3WE.mjs\";\n\n// src/components/BiblioteksentralenProvider.tsx\nimport React from \"react\";\nimport { ChakraProvider, createSystem, defaultConfig } from \"@chakra-ui/react\";\nimport { ColorModeProvider } from \"@chakra-ui/system\";\nvar BiblioteksentralenProvider = (props) => /* @__PURE__ */ React.createElement(ChakraProvider, { value: createSystem(defaultConfig, biblioteksentralenChakraTheme, props.customTheme || {}) }, /* @__PURE__ */ React.createElement(ColorModeProvider, { ...props }));\n\nexport {\n BiblioteksentralenProvider\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"]}
|
package/dist/chunk-QAW4IRLI.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
"use client";
|
|
6
|
-
// ../utils/dist/index.mjs
|
|
7
|
-
var _format = require("date-fns/format");
|
|
8
|
-
var _nb = require("date-fns/locale/nb");
|
|
9
|
-
var colors = {
|
|
10
|
-
black: "#000000",
|
|
11
|
-
grey90: "#181818",
|
|
12
|
-
grey80: "#333333",
|
|
13
|
-
grey60: "#585858",
|
|
14
|
-
grey45: "#8c8c8c",
|
|
15
|
-
grey30: "#b2b2b2",
|
|
16
|
-
grey15: "#d9d9d9",
|
|
17
|
-
grey10: "#e5e5e5",
|
|
18
|
-
grey05: "#f2f2f2",
|
|
19
|
-
white: "#ffffff",
|
|
20
|
-
bsRødDark: "#870010",
|
|
21
|
-
bsRødMedium: "#d53d40",
|
|
22
|
-
accentPurple: "#331433",
|
|
23
|
-
accentPeach: "#ffba99",
|
|
24
|
-
accentGreen: "#003b29",
|
|
25
|
-
accentBlueDark: "#001740",
|
|
26
|
-
accentBlueMedium: "#5996de",
|
|
27
|
-
accentYellow: "#ffc970",
|
|
28
|
-
lightBlue: "#dbe8ef",
|
|
29
|
-
lightGreen: "#dbe0db",
|
|
30
|
-
lightPeach: "#f4e7de",
|
|
31
|
-
lightPurple: "#ece8f3",
|
|
32
|
-
statusRed: "#ad313c",
|
|
33
|
-
statusYellow: "#bc5600",
|
|
34
|
-
statusGreen: "#24845b",
|
|
35
|
-
statusGreenLight: "#edf4f1",
|
|
36
|
-
statusRedLight: "#f8efef",
|
|
37
|
-
statusYellowLight: "#fff6e4",
|
|
38
|
-
neptune: {
|
|
39
|
-
"100": "#CFE6E8",
|
|
40
|
-
"200": "#9FCDD2",
|
|
41
|
-
"300": "#6FB5BB",
|
|
42
|
-
"400": "#3F9CA5",
|
|
43
|
-
"500": "#0F838E",
|
|
44
|
-
"600": "#0C6972",
|
|
45
|
-
"700": "#094F55",
|
|
46
|
-
"800": "#063439",
|
|
47
|
-
"900": "#031A1C"
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
function isDevelopment() {
|
|
51
|
-
return process.env.NODE_ENV === "development";
|
|
52
|
-
}
|
|
53
|
-
exports.colors = colors;
|
|
54
|
-
exports.isDevelopment = isDevelopment;
|
|
55
|
-
//# sourceMappingURL=chunk-QAW4IRLI.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/danielwinsvold/Code/js-utils/packages/react/dist/chunk-QAW4IRLI.js","../../utils/src/date.ts","../../utils/src/colors.ts","../../utils/src/environment.ts"],"names":["Object","defineProperty","exports","value","_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"],"mappings":"AAAA;AAAAA,OAAAC,cAAA,CAAAC,SAAA,cAAA;IAAAC,OAAA;AAAA;AAAA;AAEA,0BAAA;ACFA,IAAAC,UAAAC,QAAA;AACA,IAAAC,MAAAD,QAAA;ACDO,IAAME,SAAS;IACpBC,OAAO;IACPC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,OAAO;IACPC,WAAW;IACXC,aAAa;IACbC,cAAc;IACdC,aAAa;IACbC,aAAa;IACbC,gBAAgB;IAChBC,kBAAkB;IAClBC,cAAc;IACdC,WAAW;IACXC,YAAY;IACZC,YAAY;IACZC,aAAa;IACbC,WAAW;IACXC,cAAc;IACdC,aAAa;IACbC,kBAAkB;IAClBC,gBAAgB;IAChBC,mBAAmB;IACnBC,SAAS;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;IACT;AACF;ACxCO,SAASC;IACd,OAAOC,QAAQC,GAAA,CAAIC,QAAA,KAAa;AAClC;AHmDAtC,QAAAK,MAAA,GAAAA;AAAAL,QAAAmC,aAAA,GAAAA","sourcesContent":["\"use strict\";Object.defineProperty(exports, \"__esModule\", {value: true});\"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\n\n\nexports.colors = colors; exports.isDevelopment = isDevelopment;\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"]}
|
package/dist/chunk-QBXCCJ24.js
DELETED
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function _array_like_to_array(arr, len) {
|
|
3
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
-
return arr2;
|
|
6
|
-
}
|
|
7
|
-
function _array_without_holes(arr) {
|
|
8
|
-
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
9
|
-
}
|
|
10
|
-
function _define_property(obj, key, value) {
|
|
11
|
-
if (key in obj) {
|
|
12
|
-
Object.defineProperty(obj, key, {
|
|
13
|
-
value: value,
|
|
14
|
-
enumerable: true,
|
|
15
|
-
configurable: true,
|
|
16
|
-
writable: true
|
|
17
|
-
});
|
|
18
|
-
} else {
|
|
19
|
-
obj[key] = value;
|
|
20
|
-
}
|
|
21
|
-
return obj;
|
|
22
|
-
}
|
|
23
|
-
function _iterable_to_array(iter) {
|
|
24
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
25
|
-
}
|
|
26
|
-
function _non_iterable_spread() {
|
|
27
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
28
|
-
}
|
|
29
|
-
function _object_spread(target) {
|
|
30
|
-
for(var i = 1; i < arguments.length; i++){
|
|
31
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
32
|
-
var ownKeys = Object.keys(source);
|
|
33
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
34
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
35
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
|
-
ownKeys.forEach(function(key) {
|
|
39
|
-
_define_property(target, key, source[key]);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
return target;
|
|
43
|
-
}
|
|
44
|
-
function _to_consumable_array(arr) {
|
|
45
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
46
|
-
}
|
|
47
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
48
|
-
if (!o) return;
|
|
49
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
50
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
51
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
52
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
53
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
54
|
-
}
|
|
55
|
-
Object.defineProperty(exports, "__esModule", {
|
|
56
|
-
value: true
|
|
57
|
-
});
|
|
58
|
-
function _optionalChain(ops) {
|
|
59
|
-
var lastAccessLHS = undefined;
|
|
60
|
-
var value = ops[0];
|
|
61
|
-
var i = 1;
|
|
62
|
-
while(i < ops.length){
|
|
63
|
-
var op = ops[i];
|
|
64
|
-
var fn = ops[i + 1];
|
|
65
|
-
i += 2;
|
|
66
|
-
if ((op === "optionalAccess" || op === "optionalCall") && value == null) {
|
|
67
|
-
return undefined;
|
|
68
|
-
}
|
|
69
|
-
if (op === "access" || op === "optionalAccess") {
|
|
70
|
-
lastAccessLHS = value;
|
|
71
|
-
value = fn(value);
|
|
72
|
-
} else if (op === "call" || op === "optionalCall") {
|
|
73
|
-
var _value;
|
|
74
|
-
value = fn(function() {
|
|
75
|
-
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
76
|
-
args[_key] = arguments[_key];
|
|
77
|
-
}
|
|
78
|
-
return (_value = value).call.apply(_value, [
|
|
79
|
-
lastAccessLHS
|
|
80
|
-
].concat(_to_consumable_array(args)));
|
|
81
|
-
});
|
|
82
|
-
lastAccessLHS = undefined;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return value;
|
|
86
|
-
}
|
|
87
|
-
"use client";
|
|
88
|
-
var _chunkQAW4IRLIjs = require("./chunk-QAW4IRLI.js");
|
|
89
|
-
// src/styles/chakraTheme/biblioteksentralenChakraTheme.ts
|
|
90
|
-
var _react = require("@chakra-ui/react");
|
|
91
|
-
// src/styles/chakraTheme/ButtonStyles.ts
|
|
92
|
-
var variants = _object_spread({
|
|
93
|
-
primary: {
|
|
94
|
-
backgroundColor: _chunkQAW4IRLIjs.colors.black,
|
|
95
|
-
color: "white",
|
|
96
|
-
_hover: {
|
|
97
|
-
backgroundColor: "hsla(0deg, 0%, 70%, 1)",
|
|
98
|
-
color: "black"
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
secondary: {
|
|
102
|
-
borderColor: "currentColor",
|
|
103
|
-
color: "currentColor",
|
|
104
|
-
backgroundColor: "transparent",
|
|
105
|
-
_hover: {
|
|
106
|
-
backgroundColor: "currentColor/7"
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
tertiary: {
|
|
110
|
-
color: "currentColor",
|
|
111
|
-
backgroundColor: "transparent",
|
|
112
|
-
_hover: {
|
|
113
|
-
backgroundColor: "currentColor/7"
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}, _optionalChain([
|
|
117
|
-
_react.defaultConfig,
|
|
118
|
-
"access",
|
|
119
|
-
function(_) {
|
|
120
|
-
return _.theme;
|
|
121
|
-
},
|
|
122
|
-
"optionalAccess",
|
|
123
|
-
function(_2) {
|
|
124
|
-
return _2.recipes;
|
|
125
|
-
},
|
|
126
|
-
"optionalAccess",
|
|
127
|
-
function(_3) {
|
|
128
|
-
return _3.button;
|
|
129
|
-
},
|
|
130
|
-
"optionalAccess",
|
|
131
|
-
function(_4) {
|
|
132
|
-
return _4.variants;
|
|
133
|
-
},
|
|
134
|
-
"optionalAccess",
|
|
135
|
-
function(_5) {
|
|
136
|
-
return _5.variant;
|
|
137
|
-
}
|
|
138
|
-
]));
|
|
139
|
-
var ButtonStyles = _react.defineRecipe.call(void 0, {
|
|
140
|
-
base: {
|
|
141
|
-
borderColor: "transparent",
|
|
142
|
-
borderWidth: "0.1em",
|
|
143
|
-
fontWeight: 600,
|
|
144
|
-
_disabled: {
|
|
145
|
-
backgroundColor: "".concat(_chunkQAW4IRLIjs.colors.grey45),
|
|
146
|
-
color: "white",
|
|
147
|
-
opacity: 1
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
variants: {
|
|
151
|
-
variant: variants,
|
|
152
|
-
size: {
|
|
153
|
-
sm: {
|
|
154
|
-
h: "8",
|
|
155
|
-
px: "2",
|
|
156
|
-
textStyle: "md"
|
|
157
|
-
},
|
|
158
|
-
md: {
|
|
159
|
-
textStyle: "md"
|
|
160
|
-
},
|
|
161
|
-
lg: {
|
|
162
|
-
h: "12",
|
|
163
|
-
textStyle: "lg"
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
defaultVariants: {
|
|
168
|
-
variant: "primary",
|
|
169
|
-
size: "md"
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
// src/styles/chakraTheme/ContainerStyles.ts
|
|
173
|
-
var ContainerStyles = _react.defineRecipe.call(void 0, {
|
|
174
|
-
base: {
|
|
175
|
-
px: ".75rem"
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
// src/styles/chakraTheme/HeadingStyles.ts
|
|
179
|
-
var HeadingStyles = _react.defineRecipe.call(void 0, {
|
|
180
|
-
base: {
|
|
181
|
-
fontWeight: "600"
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
// src/styles/chakraTheme/InputStyles.ts
|
|
185
|
-
var variants2 = {
|
|
186
|
-
subtle: {
|
|
187
|
-
backgroundColor: {
|
|
188
|
-
_light: "gray.200",
|
|
189
|
-
_dark: "whiteAlpha.100"
|
|
190
|
-
},
|
|
191
|
-
_hover: {
|
|
192
|
-
bg: {
|
|
193
|
-
_light: "gray.300",
|
|
194
|
-
_dark: "whiteAlpha.200"
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
outline: {
|
|
199
|
-
borderColor: {
|
|
200
|
-
_light: "gray.300",
|
|
201
|
-
_dark: "whiteAlpha.300"
|
|
202
|
-
},
|
|
203
|
-
_hover: {
|
|
204
|
-
borderColor: {
|
|
205
|
-
_light: "gray.400",
|
|
206
|
-
_dark: "whiteAlpha.400"
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
flushed: {
|
|
211
|
-
borderColor: {
|
|
212
|
-
_light: "gray.300",
|
|
213
|
-
_dark: "whiteAlpha.300"
|
|
214
|
-
},
|
|
215
|
-
_hover: {
|
|
216
|
-
borderColor: {
|
|
217
|
-
_light: "gray.400",
|
|
218
|
-
_dark: "whiteAlpha.400"
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
var InputStyles = _react.defineRecipe.call(void 0, {
|
|
224
|
-
base: {
|
|
225
|
-
_placeholder: {
|
|
226
|
-
color: {
|
|
227
|
-
_light: "gray.500",
|
|
228
|
-
_dark: "whiteAlpha.500"
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
variants: {
|
|
233
|
-
variant: variants2
|
|
234
|
-
},
|
|
235
|
-
defaultVariants: {
|
|
236
|
-
variant: "subtle"
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
// src/styles/chakraTheme/SpinnerStyles.ts
|
|
240
|
-
var SpinnerStyles = _react.defineRecipe.call(void 0, {
|
|
241
|
-
base: {
|
|
242
|
-
animationDuration: ".8s",
|
|
243
|
-
color: _chunkQAW4IRLIjs.colors.accentBlueMedium,
|
|
244
|
-
// Todo: Legg til trackColor: https://chakra-ui.com/docs/components/spinner#track-color
|
|
245
|
-
borderWidth: ".175em"
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
// src/styles/chakraTheme/sizes.ts
|
|
249
|
-
var container = {
|
|
250
|
-
sm: {
|
|
251
|
-
value: "40rem"
|
|
252
|
-
},
|
|
253
|
-
md: {
|
|
254
|
-
value: "48rem"
|
|
255
|
-
},
|
|
256
|
-
lg: {
|
|
257
|
-
value: "56rem"
|
|
258
|
-
},
|
|
259
|
-
// Forsøker 56rem som standardbredde etter testing med Katrine
|
|
260
|
-
xl: {
|
|
261
|
-
value: "80rem"
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
var sizes = {
|
|
265
|
-
container: container
|
|
266
|
-
};
|
|
267
|
-
// src/styles/chakraTheme/LinkStyles.ts
|
|
268
|
-
var variants3 = {
|
|
269
|
-
plain: {
|
|
270
|
-
color: "currentColor",
|
|
271
|
-
textDecoration: "none",
|
|
272
|
-
textDecorationColor: "currentColor",
|
|
273
|
-
_hover: {
|
|
274
|
-
textDecorationColor: "currentColor",
|
|
275
|
-
textDecoration: "underline"
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
underline: {
|
|
279
|
-
color: "currentColor",
|
|
280
|
-
textDecoration: "underline",
|
|
281
|
-
textDecorationColor: "currentColor",
|
|
282
|
-
_hover: {
|
|
283
|
-
textDecoration: "none"
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
};
|
|
287
|
-
var LinkStyles = _react.defineRecipe.call(void 0, {
|
|
288
|
-
base: {
|
|
289
|
-
_focus: {
|
|
290
|
-
outline: "none"
|
|
291
|
-
}
|
|
292
|
-
},
|
|
293
|
-
variants: {
|
|
294
|
-
variant: variants3
|
|
295
|
-
},
|
|
296
|
-
defaultVariants: {
|
|
297
|
-
variant: "underline"
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
// src/styles/chakraTheme/biblioteksentralenChakraTheme.ts
|
|
301
|
-
var tokens = _react.defineTokens.call(void 0, {
|
|
302
|
-
sizes: sizes
|
|
303
|
-
});
|
|
304
|
-
var globalHyphens = {
|
|
305
|
-
hyphens: "auto",
|
|
306
|
-
hyphenateLimitChars: "8 5 3"
|
|
307
|
-
};
|
|
308
|
-
var focusStyle = {
|
|
309
|
-
outline: "none !important",
|
|
310
|
-
boxShadow: "0 0 0 .05rem ".concat(_chunkQAW4IRLIjs.colors.white, ", 0 0 0 .25rem ").concat(_chunkQAW4IRLIjs.colors.accentBlueMedium, ", 0 0 0 .3rem ").concat(_chunkQAW4IRLIjs.colors.white, " !important"),
|
|
311
|
-
transition: "box-shadow 0.1s ease-out"
|
|
312
|
-
};
|
|
313
|
-
var biblioteksentralenChakraTheme = _react.defineConfig.call(void 0, {
|
|
314
|
-
theme: {
|
|
315
|
-
tokens: tokens,
|
|
316
|
-
recipes: {
|
|
317
|
-
heading: HeadingStyles,
|
|
318
|
-
button: ButtonStyles,
|
|
319
|
-
input: InputStyles,
|
|
320
|
-
link: LinkStyles,
|
|
321
|
-
container: ContainerStyles,
|
|
322
|
-
spinner: SpinnerStyles
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
globalCss: {
|
|
326
|
-
html: {
|
|
327
|
-
fontSize: {
|
|
328
|
-
base: "112.5%",
|
|
329
|
-
md: "120%"
|
|
330
|
-
},
|
|
331
|
-
// Sørger for smooth scrolling for interne lenker som scroller til annet sted på siden,
|
|
332
|
-
// men ikke hvis fokus er utenfor viduet, feks ved søk i tekst (ctrl + f)
|
|
333
|
-
"&:focus-within": {
|
|
334
|
-
scrollBehavior: "smooth !important"
|
|
335
|
-
}
|
|
336
|
-
},
|
|
337
|
-
body: _object_spread({}, globalHyphens),
|
|
338
|
-
// Felles fokus-styling for alle elementer for å sikre at de har en tydelig og uniform visuell indikasjon når de er i fokus
|
|
339
|
-
"*:focus-visible": focusStyle
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
exports.focusStyle = focusStyle;
|
|
343
|
-
exports.biblioteksentralenChakraTheme = biblioteksentralenChakraTheme;
|
|
344
|
-
//# sourceMappingURL=chunk-QBXCCJ24.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/danielwinsvold/Code/js-utils/packages/react/dist/chunk-QBXCCJ24.js","../src/styles/chakraTheme/biblioteksentralenChakraTheme.ts","../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"],"names":["Object","defineProperty","exports","value","_optionalChain","ops","lastAccessLHS","undefined","i","length","op","fn","args","call","_chunkQAW4IRLIjs","require","_react","variants","primary","backgroundColor","colors","black","color","_hover","secondary","borderColor","tertiary","defaultConfig","_","theme","_2","recipes","_3","button","_4","_5","variant","ButtonStyles","defineRecipe","base","borderWidth","fontWeight","_disabled","grey45","opacity","size","sm","h","px","textStyle","md","lg","defaultVariants","variants2","subtle","_light","_dark","bg","outline","flushed","_placeholder","animationDuration","accentBlueMedium","container","xl","sizes","variants3","plain","textDecoration","textDecorationColor","underline","_focus","tokens","defineTokens","globalHyphens","hyphens","hyphenateLimitChars","focusStyle","boxShadow","white","transition","biblioteksentralenChakraTheme","defineConfig","heading","HeadingStyles","input","InputStyles","link","LinkStyles","ContainerStyles","spinner","SpinnerStyles","globalCss","html","fontSize","scrollBehavior","body"],"mappings":"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","sourcesContent":["\"use strict\";Object.defineProperty(exports, \"__esModule\", {value: true}); 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\nvar _chunkQAW4IRLIjs = require('./chunk-QAW4IRLI.js');\n\n// src/styles/chakraTheme/biblioteksentralenChakraTheme.ts\nvar _react = require('@chakra-ui/react');\n\n// src/styles/chakraTheme/ButtonStyles.ts\n\nvar variants = {\n primary: {\n backgroundColor: _chunkQAW4IRLIjs.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', _ => _.theme, 'optionalAccess', _2 => _2.recipes, 'optionalAccess', _3 => _3.button, 'optionalAccess', _4 => _4.variants, 'optionalAccess', _5 => _5.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: `${_chunkQAW4IRLIjs.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: _chunkQAW4IRLIjs.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 ${_chunkQAW4IRLIjs.colors.white}, 0 0 0 .25rem ${_chunkQAW4IRLIjs.colors.accentBlueMedium}, 0 0 0 .3rem ${_chunkQAW4IRLIjs.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\n\n\nexports.focusStyle = focusStyle; exports.biblioteksentralenChakraTheme = biblioteksentralenChakraTheme;\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 { 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"]}
|