@obosbbl/grunnmuren-react 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/Alert/Alert.d.ts +9 -0
- package/dist/Alert/index.d.ts +1 -0
- package/dist/Banner/Banner.d.ts +11 -0
- package/dist/Banner/BannerImage.d.ts +6 -0
- package/dist/Banner/index.d.ts +2 -0
- package/dist/Button/Button.d.ts +14 -0
- package/dist/Button/ButtonColorContext.d.ts +3 -0
- package/dist/Button/index.d.ts +2 -0
- package/dist/Card/Card.d.ts +8 -0
- package/dist/Card/CardContent.d.ts +5 -0
- package/dist/Card/CardImage.d.ts +7 -0
- package/dist/Card/CardLinkOverlay.d.ts +4 -0
- package/dist/Card/CardList.d.ts +7 -0
- package/dist/Card/index.d.ts +5 -0
- package/dist/Checkbox/Checkbox.d.ts +9 -0
- package/dist/Checkbox/index.d.ts +1 -0
- package/dist/Footer/Footer.d.ts +7 -0
- package/dist/Footer/index.d.ts +1 -0
- package/dist/Form/Form.d.ts +9 -0
- package/dist/Form/FormError.d.ts +4 -0
- package/dist/Form/FormErrorMessage.d.ts +5 -0
- package/dist/Form/FormHelperText.d.ts +5 -0
- package/dist/Form/FormLabel.d.ts +6 -0
- package/dist/Form/FormSuccess.d.ts +6 -0
- package/dist/Form/index.d.ts +6 -0
- package/dist/Hero/Hero.d.ts +21 -0
- package/dist/Hero/HeroActions.d.ts +7 -0
- package/dist/Hero/HeroContent.d.ts +9 -0
- package/dist/Hero/HeroImage.d.ts +8 -0
- package/dist/Hero/index.d.ts +4 -0
- package/dist/Hero/utils.d.ts +2 -0
- package/dist/IconLegacy/IconLegacy.d.ts +20 -0
- package/dist/IconLegacy/index.d.ts +1 -0
- package/dist/Input/Input.d.ts +8 -0
- package/dist/Input/index.d.ts +1 -0
- package/dist/Link/Link.d.ts +8 -0
- package/dist/Link/index.d.ts +1 -0
- package/dist/Navbar/Navbar.d.ts +6 -0
- package/dist/Navbar/NavbarCollapsible.d.ts +6 -0
- package/dist/Navbar/NavbarContent.d.ts +7 -0
- package/dist/Navbar/NavbarContext.d.ts +6 -0
- package/dist/Navbar/NavbarExpandedMobileContent.d.ts +9 -0
- package/dist/Navbar/NavbarItem.d.ts +7 -0
- package/dist/Navbar/NavbarItems.d.ts +6 -0
- package/dist/Navbar/NavbarMenuButton.d.ts +5 -0
- package/dist/Navbar/index.d.ts +6 -0
- package/dist/Select/Select.d.ts +7 -0
- package/dist/Select/index.d.ts +1 -0
- package/dist/Snackbar/Snackbar.d.ts +8 -0
- package/dist/Snackbar/SnackbarButton.d.ts +6 -0
- package/dist/Snackbar/SnackbarContent.d.ts +5 -0
- package/dist/Snackbar/index.d.ts +3 -0
- package/dist/TextArea/TextArea.d.ts +11 -0
- package/dist/TextArea/index.d.ts +1 -0
- package/dist/TextField/TextField.d.ts +12 -0
- package/dist/TextField/index.d.ts +1 -0
- package/dist/grunnmuren.es.js +1078 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/useBlockBackgroundColor.d.ts +2 -0
- package/dist/hooks/useComposedRefs.d.ts +25 -0
- package/dist/hooks/useFallbackId.d.ts +4 -0
- package/dist/hooks/useFormControlValidity.d.ts +14 -0
- package/dist/hooks/useMedia.d.ts +1 -0
- package/dist/hooks/usePrefersReducedMotion.d.ts +1 -0
- package/dist/hooks/useScreenMaxWidthMd.d.ts +1 -0
- package/dist/index.d.ts +16 -0
- package/package.json +51 -0
|
@@ -0,0 +1,1078 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import classNames from "clsx";
|
|
33
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
34
|
+
import { useCallback, useState, useEffect, useId, forwardRef, useContext, createContext, useMemo, useRef } from "react";
|
|
35
|
+
var __defProp2 = Object.defineProperty;
|
|
36
|
+
var __defProps2 = Object.defineProperties;
|
|
37
|
+
var __getOwnPropDescs2 = Object.getOwnPropertyDescriptors;
|
|
38
|
+
var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
|
|
39
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
40
|
+
var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
|
|
41
|
+
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
42
|
+
var __spreadValues2 = (a, b) => {
|
|
43
|
+
for (var prop in b || (b = {}))
|
|
44
|
+
if (__hasOwnProp2.call(b, prop))
|
|
45
|
+
__defNormalProp2(a, prop, b[prop]);
|
|
46
|
+
if (__getOwnPropSymbols2)
|
|
47
|
+
for (var prop of __getOwnPropSymbols2(b)) {
|
|
48
|
+
if (__propIsEnum2.call(b, prop))
|
|
49
|
+
__defNormalProp2(a, prop, b[prop]);
|
|
50
|
+
}
|
|
51
|
+
return a;
|
|
52
|
+
};
|
|
53
|
+
var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
|
|
54
|
+
const Close = (props) => /* @__PURE__ */ jsx("svg", __spreadProps2(__spreadValues2({
|
|
55
|
+
width: "1.25em",
|
|
56
|
+
height: "1.25em",
|
|
57
|
+
fill: "none",
|
|
58
|
+
viewBox: "0 0 29 29",
|
|
59
|
+
role: "img",
|
|
60
|
+
"aria-hidden": props["aria-label"] == null
|
|
61
|
+
}, props), {
|
|
62
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
63
|
+
fill: "currentColor",
|
|
64
|
+
d: "M29 4.35585L24.6441 0L14.5 10.1431L4.35585 0L0 4.35585L10.1431 14.5L0 24.6441L4.35585 29L14.5 18.8569L24.6441 29L29 24.6441L18.8569 14.5L29 4.35585Z"
|
|
65
|
+
})
|
|
66
|
+
}));
|
|
67
|
+
const InfoCircle = (props) => /* @__PURE__ */ jsx("svg", __spreadProps2(__spreadValues2({
|
|
68
|
+
width: "1.25em",
|
|
69
|
+
height: "1.25em",
|
|
70
|
+
fill: "none",
|
|
71
|
+
viewBox: "0 0 32 32",
|
|
72
|
+
role: "img",
|
|
73
|
+
"aria-hidden": props["aria-label"] == null
|
|
74
|
+
}, props), {
|
|
75
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
76
|
+
fill: "currentColor",
|
|
77
|
+
d: "M16 0C12.8355 0 9.74207 0.938384 7.11088 2.69649C4.4797 4.45459 2.42894 6.95345 1.21793 9.87707C0.0069325 12.8007 -0.309921 16.0177 0.307443 19.1214C0.924806 22.2251 2.44866 25.0761 4.6863 27.3137C6.92394 29.5513 9.77487 31.0752 12.8786 31.6926C15.9823 32.3099 19.1993 31.9931 22.1229 30.7821C25.0466 29.5711 27.5454 27.5203 29.3035 24.8891C31.0616 22.2579 32 19.1645 32 16C32 11.7565 30.3143 7.68687 27.3137 4.68629C24.3131 1.68571 20.2435 0 16 0ZM18 26H14V15H18V26ZM18 11H14V7H18V11Z"
|
|
78
|
+
})
|
|
79
|
+
}));
|
|
80
|
+
const Mail = (props) => /* @__PURE__ */ jsx("svg", __spreadProps2(__spreadValues2({
|
|
81
|
+
width: "1.25em",
|
|
82
|
+
height: "1.25em",
|
|
83
|
+
fill: "none",
|
|
84
|
+
viewBox: "0 0 28 22",
|
|
85
|
+
role: "img",
|
|
86
|
+
"aria-hidden": props["aria-label"] == null
|
|
87
|
+
}, props), {
|
|
88
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
89
|
+
fill: "currentColor",
|
|
90
|
+
fillRule: "evenodd",
|
|
91
|
+
d: "M28 4L15.984 10.866C15.3797 11.2112 14.6959 11.3927 14 11.3927C13.3041 11.3927 12.6203 11.2112 12.016 10.866L0 4C0 2.93913 0.421427 1.92172 1.17157 1.17157C1.92172 0.421427 2.93913 0 4 0H24C25.0609 0 26.0783 0.421427 26.8284 1.17157C27.5786 1.92172 28 2.93913 28 4ZM0 9L12 16H16L28 9V18C28 19.0609 27.5786 20.0783 26.8284 20.8284C26.0783 21.5786 25.0609 22 24 22H4C2.93913 22 1.92172 21.5786 1.17157 20.8284C0.421427 20.0783 0 19.0609 0 18V9Z",
|
|
92
|
+
clipRule: "evenodd"
|
|
93
|
+
})
|
|
94
|
+
}));
|
|
95
|
+
const MapPin = (props) => /* @__PURE__ */ jsx("svg", __spreadProps2(__spreadValues2({
|
|
96
|
+
width: "1.25em",
|
|
97
|
+
height: "1.25em",
|
|
98
|
+
fill: "none",
|
|
99
|
+
viewBox: "0 0 22 35",
|
|
100
|
+
role: "img",
|
|
101
|
+
"aria-hidden": props["aria-label"] == null
|
|
102
|
+
}, props), {
|
|
103
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
104
|
+
fill: "currentColor",
|
|
105
|
+
fillRule: "evenodd",
|
|
106
|
+
d: "M2.51 17.205L2.28 16.915H2.24C1.09834 15.315 0.41945 13.4314 0.277819 11.471C0.136187 9.51058 0.537288 7.54902 1.43711 5.80154C2.33694 4.05407 3.70071 2.58821 5.37881 1.56481C7.0569 0.541404 8.98446 0 10.95 0C12.9155 0 14.8431 0.541404 16.5212 1.56481C18.1993 2.58821 19.5631 4.05407 20.4629 5.80154C21.3627 7.54902 21.7638 9.51058 21.6222 11.471C21.4806 13.4314 20.8017 15.315 19.66 16.915L19.43 17.215L19.43 17.215C19.33 17.345 19.23 17.475 19.12 17.595L14.12 24.015C13.828 24.6005 13.3785 25.0931 12.8221 25.4374C12.2657 25.7816 11.6243 25.964 10.97 25.964C10.3157 25.964 9.67431 25.7816 9.11789 25.4374C8.56147 25.0931 8.11202 24.6005 7.82 24.015L2.82 17.605C2.74304 17.514 2.67097 17.4182 2.60037 17.3243C2.57007 17.284 2.54004 17.244 2.51 17.205ZM14 8.00497H8V14.005H14V8.00497ZM4 30.005H18L22 34.005H0L4 30.005Z",
|
|
107
|
+
clipRule: "evenodd"
|
|
108
|
+
})
|
|
109
|
+
}));
|
|
110
|
+
const MenuAlt = (props) => /* @__PURE__ */ jsx("svg", __spreadProps2(__spreadValues2({
|
|
111
|
+
width: "1.25em",
|
|
112
|
+
height: "1.25em",
|
|
113
|
+
fill: "none",
|
|
114
|
+
viewBox: "0 0 28 26",
|
|
115
|
+
role: "img",
|
|
116
|
+
"aria-hidden": props["aria-label"] == null
|
|
117
|
+
}, props), {
|
|
118
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
119
|
+
fill: "currentColor",
|
|
120
|
+
fillRule: "evenodd",
|
|
121
|
+
d: "M0 0H28V6H0V0ZM0 20H28V26H0V20Z",
|
|
122
|
+
clipRule: "evenodd"
|
|
123
|
+
})
|
|
124
|
+
}));
|
|
125
|
+
const Mobile = (props) => /* @__PURE__ */ jsx("svg", __spreadProps2(__spreadValues2({
|
|
126
|
+
width: "1.25em",
|
|
127
|
+
height: "1.25em",
|
|
128
|
+
fill: "none",
|
|
129
|
+
viewBox: "0 0 22 32",
|
|
130
|
+
role: "img",
|
|
131
|
+
"aria-hidden": props["aria-label"] == null
|
|
132
|
+
}, props), {
|
|
133
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
134
|
+
fill: "currentColor",
|
|
135
|
+
d: "M18 0H4C2.93914 0 1.92172 0.421427 1.17157 1.17157C0.421427 1.92172 0 2.93913 0 4V28C0 29.0609 0.421427 30.0783 1.17157 30.8284C1.92172 31.5786 2.93914 32 4 32H18C19.0609 32 20.0783 31.5786 20.8284 30.8284C21.5786 30.0783 22 29.0609 22 28V4C22 2.93913 21.5786 1.92172 20.8284 1.17157C20.0783 0.421427 19.0609 0 18 0ZM13.036 28H9.036V24H13.036V28ZM16.036 20H6.036V6H16.036V20Z"
|
|
136
|
+
})
|
|
137
|
+
}));
|
|
138
|
+
const Warning = (props) => /* @__PURE__ */ jsx("svg", __spreadProps2(__spreadValues2({
|
|
139
|
+
width: "1.25em",
|
|
140
|
+
height: "1.25em",
|
|
141
|
+
fill: "none",
|
|
142
|
+
viewBox: "0 0 32 30",
|
|
143
|
+
role: "img",
|
|
144
|
+
"aria-hidden": props["aria-label"] == null
|
|
145
|
+
}, props), {
|
|
146
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
147
|
+
fill: "currentColor",
|
|
148
|
+
d: "M31.549 24.132L20.12 2.155C19.7824 1.50555 19.273 0.961197 18.6474 0.581216C18.0218 0.201234 17.304 0.000197802 16.572 0H15.428C14.696 0.000197802 13.9782 0.201234 13.3526 0.581216C12.727 0.961197 12.2176 1.50555 11.88 2.155L0.451 24.132C0.154748 24.7022 6.05376e-05 25.3354 0 25.978V26C0 27.0609 0.421427 28.0783 1.17157 28.8284C1.92172 29.5786 2.93913 30 4 30H28C29.0609 30 30.0783 29.5786 30.8284 28.8284C31.5786 28.0783 32 27.0609 32 26V25.978C31.9999 25.3354 31.8453 24.7022 31.549 24.132ZM18 26H14V22H18V26ZM18 18H14V7H18V18Z"
|
|
149
|
+
})
|
|
150
|
+
}));
|
|
151
|
+
const Alert = (props) => {
|
|
152
|
+
const _a = props, {
|
|
153
|
+
className,
|
|
154
|
+
children,
|
|
155
|
+
heading,
|
|
156
|
+
severity = "alert"
|
|
157
|
+
} = _a, rest = __objRest(_a, [
|
|
158
|
+
"className",
|
|
159
|
+
"children",
|
|
160
|
+
"heading",
|
|
161
|
+
"severity"
|
|
162
|
+
]);
|
|
163
|
+
return /* @__PURE__ */ jsx("section", __spreadProps(__spreadValues({
|
|
164
|
+
className: classNames(className, "p-4 md:py-8", {
|
|
165
|
+
"bg-orange-light": severity === "info",
|
|
166
|
+
"bg-red-light": severity === "alert"
|
|
167
|
+
}),
|
|
168
|
+
role: "alert"
|
|
169
|
+
}, rest), {
|
|
170
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
171
|
+
className: "flex justify-center",
|
|
172
|
+
children: [/* @__PURE__ */ jsx(AlertIcon, {
|
|
173
|
+
className: "mr-4 flex-none md:mr-8 md:text-2xl",
|
|
174
|
+
severity
|
|
175
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
176
|
+
className: "w-prose flex-initial",
|
|
177
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
178
|
+
className: "h4 mb-2",
|
|
179
|
+
children: heading
|
|
180
|
+
}), children]
|
|
181
|
+
})]
|
|
182
|
+
})
|
|
183
|
+
}));
|
|
184
|
+
};
|
|
185
|
+
const AlertIcon = ({
|
|
186
|
+
severity,
|
|
187
|
+
className
|
|
188
|
+
}) => {
|
|
189
|
+
if (severity === "alert") {
|
|
190
|
+
return /* @__PURE__ */ jsx(Warning, {
|
|
191
|
+
className: classNames(className, "text-red")
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
return /* @__PURE__ */ jsx(InfoCircle, {
|
|
195
|
+
className: classNames(className, "text-orange")
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
function assignRef(ref, value) {
|
|
199
|
+
if (ref == null)
|
|
200
|
+
return;
|
|
201
|
+
if (isFunction(ref)) {
|
|
202
|
+
ref(value);
|
|
203
|
+
} else {
|
|
204
|
+
try {
|
|
205
|
+
ref.current = value;
|
|
206
|
+
} catch (error) {
|
|
207
|
+
throw new Error(`Cannot assign value "${value}" to ref "${ref}"`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
function useComposedRefs(...refs) {
|
|
212
|
+
return useCallback((node) => {
|
|
213
|
+
for (const ref of refs) {
|
|
214
|
+
assignRef(ref, node);
|
|
215
|
+
}
|
|
216
|
+
}, refs);
|
|
217
|
+
}
|
|
218
|
+
function isFunction(value) {
|
|
219
|
+
return !!(value && {}.toString.call(value) == "[object Function]");
|
|
220
|
+
}
|
|
221
|
+
const QUERY = "(prefers-reduced-motion: no-preference)";
|
|
222
|
+
const usePrefersReducedMotion = () => !useMedia(QUERY);
|
|
223
|
+
function useBlockBackgroundColor(blockBgColor) {
|
|
224
|
+
switch (blockBgColor) {
|
|
225
|
+
case "gray":
|
|
226
|
+
return "bg-gray-concrete";
|
|
227
|
+
case "green":
|
|
228
|
+
return "bg-green-lightest";
|
|
229
|
+
case "yellow":
|
|
230
|
+
return "bg-yellow";
|
|
231
|
+
case "blue":
|
|
232
|
+
return "bg-blue-lightest";
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
function useMedia(query) {
|
|
236
|
+
const [matches, setMatches] = useState(false);
|
|
237
|
+
useEffect(() => {
|
|
238
|
+
const mediaQueryList = window.matchMedia(query);
|
|
239
|
+
setMatches(mediaQueryList.matches);
|
|
240
|
+
const listener = (event) => {
|
|
241
|
+
setMatches(event.matches);
|
|
242
|
+
};
|
|
243
|
+
mediaQueryList.addEventListener("change", listener);
|
|
244
|
+
return () => {
|
|
245
|
+
mediaQueryList.removeEventListener("change", listener);
|
|
246
|
+
};
|
|
247
|
+
}, [query]);
|
|
248
|
+
return matches;
|
|
249
|
+
}
|
|
250
|
+
const useScreenMaxWidthMd = () => useMedia("(max-width: 767.9px)");
|
|
251
|
+
function useFormControlValidity(ref) {
|
|
252
|
+
const [validity, setValidity] = useState("indeterminate");
|
|
253
|
+
const onBlur = (event) => {
|
|
254
|
+
const isValid = event.target.checkValidity();
|
|
255
|
+
if (isValid) {
|
|
256
|
+
setValidity("valid");
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
const onInput = (event) => {
|
|
260
|
+
if (validity !== "indeterminate") {
|
|
261
|
+
const isValid = event.target.checkValidity();
|
|
262
|
+
if (isValid) {
|
|
263
|
+
setValidity("valid");
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
const onInvalid = () => {
|
|
268
|
+
setValidity("invalid");
|
|
269
|
+
};
|
|
270
|
+
useEffect(() => {
|
|
271
|
+
const { current } = ref;
|
|
272
|
+
current == null ? void 0 : current.addEventListener("blur", onBlur);
|
|
273
|
+
current == null ? void 0 : current.addEventListener("input", onInput);
|
|
274
|
+
current == null ? void 0 : current.addEventListener("invalid", onInvalid);
|
|
275
|
+
return () => {
|
|
276
|
+
current == null ? void 0 : current.removeEventListener("blur", onBlur);
|
|
277
|
+
current == null ? void 0 : current.removeEventListener("input", onInput);
|
|
278
|
+
current == null ? void 0 : current.removeEventListener("invalid", onInvalid);
|
|
279
|
+
};
|
|
280
|
+
});
|
|
281
|
+
return { validity };
|
|
282
|
+
}
|
|
283
|
+
function useFallbackId(id) {
|
|
284
|
+
const generatedId = useId();
|
|
285
|
+
return id != null ? id : generatedId;
|
|
286
|
+
}
|
|
287
|
+
const Banner = (props) => {
|
|
288
|
+
const _a = props, {
|
|
289
|
+
bgColor: bgColorProp,
|
|
290
|
+
className,
|
|
291
|
+
children,
|
|
292
|
+
heading,
|
|
293
|
+
image
|
|
294
|
+
} = _a, rest = __objRest(_a, [
|
|
295
|
+
"bgColor",
|
|
296
|
+
"className",
|
|
297
|
+
"children",
|
|
298
|
+
"heading",
|
|
299
|
+
"image"
|
|
300
|
+
]);
|
|
301
|
+
const bgColor = useBlockBackgroundColor(bgColorProp);
|
|
302
|
+
return /* @__PURE__ */ jsx("article", __spreadProps(__spreadValues({
|
|
303
|
+
className: classNames(className, bgColor, "py-8 px-4 md:py-14")
|
|
304
|
+
}, rest), {
|
|
305
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
306
|
+
className: "<md:flex-wrap container flex gap-4 md:flex-row md:gap-12",
|
|
307
|
+
children: [image, /* @__PURE__ */ jsxs("div", {
|
|
308
|
+
className: "w-prose",
|
|
309
|
+
children: [heading && /* @__PURE__ */ jsx("h2", {
|
|
310
|
+
className: "mb-4",
|
|
311
|
+
children: heading
|
|
312
|
+
}), children]
|
|
313
|
+
})]
|
|
314
|
+
})
|
|
315
|
+
}));
|
|
316
|
+
};
|
|
317
|
+
const BannerImage = (props) => {
|
|
318
|
+
return /* @__PURE__ */ jsx("img", __spreadValues({
|
|
319
|
+
loading: "lazy",
|
|
320
|
+
decoding: "async",
|
|
321
|
+
className: "w-24 flex-none self-center md:w-40 md:self-start"
|
|
322
|
+
}, props));
|
|
323
|
+
};
|
|
324
|
+
const buttonVariations = {
|
|
325
|
+
"standard-primary": "bg-green border-green text-white",
|
|
326
|
+
"standard-secondary": "bg-white border-green text-black",
|
|
327
|
+
"light-green-primary": "bg-green-light border-green-light text-black",
|
|
328
|
+
"light-green-secondary": "bg-transparent border-green-light text-green-light",
|
|
329
|
+
"white-primary": "bg-white border-white text-black",
|
|
330
|
+
"white-secondary": "bg-transparent border-white text-white"
|
|
331
|
+
};
|
|
332
|
+
const Button = forwardRef((props, ref) => {
|
|
333
|
+
const _a = props, {
|
|
334
|
+
className,
|
|
335
|
+
color: colorFromProp,
|
|
336
|
+
href,
|
|
337
|
+
type = "button",
|
|
338
|
+
variant = "primary"
|
|
339
|
+
} = _a, rest = __objRest(_a, [
|
|
340
|
+
"className",
|
|
341
|
+
"color",
|
|
342
|
+
"href",
|
|
343
|
+
"type",
|
|
344
|
+
"variant"
|
|
345
|
+
]);
|
|
346
|
+
const colorFromContext = useContext(ButtonColorContext);
|
|
347
|
+
const color = colorFromProp != null ? colorFromProp : colorFromContext;
|
|
348
|
+
const buttonVariation = buttonVariations[`${color}-${variant}`];
|
|
349
|
+
const classes = classNames(className, buttonVariation, "button relative no-underline inline-block border-solid border-2 px-6 py-2 rounded-xl transition-all duration-200 font-medium w-fit disabled:pointer-events-none disabled:text-black disabled:bg-gray-light disabled:border-gray-light hover:rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-black ring-offset-2");
|
|
350
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
351
|
+
children: href ? /* @__PURE__ */ jsx("a", __spreadProps(__spreadValues({}, rest), {
|
|
352
|
+
href,
|
|
353
|
+
ref,
|
|
354
|
+
className: classes
|
|
355
|
+
})) : /* @__PURE__ */ jsx("button", __spreadProps(__spreadValues({}, rest), {
|
|
356
|
+
type,
|
|
357
|
+
ref,
|
|
358
|
+
className: classes
|
|
359
|
+
}))
|
|
360
|
+
});
|
|
361
|
+
});
|
|
362
|
+
const ButtonColorContext = createContext("standard");
|
|
363
|
+
const Card = (props) => {
|
|
364
|
+
const _a = props, {
|
|
365
|
+
as: Component = "div",
|
|
366
|
+
className,
|
|
367
|
+
bgColor = "white"
|
|
368
|
+
} = _a, rest = __objRest(_a, [
|
|
369
|
+
"as",
|
|
370
|
+
"className",
|
|
371
|
+
"bgColor"
|
|
372
|
+
]);
|
|
373
|
+
return /* @__PURE__ */ jsx(Component, __spreadValues({
|
|
374
|
+
className: classNames(className, "relative overflow-hidden rounded-3xl", {
|
|
375
|
+
"border-gray-concrete border-2 border-solid bg-white": bgColor === "white",
|
|
376
|
+
"bg-gray-light": bgColor === "gray"
|
|
377
|
+
})
|
|
378
|
+
}, rest));
|
|
379
|
+
};
|
|
380
|
+
const CardImage = (props) => {
|
|
381
|
+
const _a = props, {
|
|
382
|
+
className
|
|
383
|
+
} = _a, rest = __objRest(_a, [
|
|
384
|
+
"className"
|
|
385
|
+
]);
|
|
386
|
+
return /* @__PURE__ */ jsx("img", __spreadValues({
|
|
387
|
+
className: classNames(className, "w-full object-cover"),
|
|
388
|
+
loading: "lazy"
|
|
389
|
+
}, rest));
|
|
390
|
+
};
|
|
391
|
+
const CardList = (props) => {
|
|
392
|
+
const _a = props, {
|
|
393
|
+
bgColor: bgColorProp,
|
|
394
|
+
className
|
|
395
|
+
} = _a, rest = __objRest(_a, [
|
|
396
|
+
"bgColor",
|
|
397
|
+
"className"
|
|
398
|
+
]);
|
|
399
|
+
const bgColor = useBlockBackgroundColor(bgColorProp);
|
|
400
|
+
return /* @__PURE__ */ jsx("div", {
|
|
401
|
+
className: classNames(bgColor, className),
|
|
402
|
+
children: /* @__PURE__ */ jsx("div", __spreadValues({
|
|
403
|
+
className: "container grid grid-cols-1 gap-12 py-16 md:grid-cols-2 md:py-20 lg:py-24"
|
|
404
|
+
}, rest))
|
|
405
|
+
});
|
|
406
|
+
};
|
|
407
|
+
const CardContent = (props) => {
|
|
408
|
+
const _a = props, {
|
|
409
|
+
className
|
|
410
|
+
} = _a, rest = __objRest(_a, [
|
|
411
|
+
"className"
|
|
412
|
+
]);
|
|
413
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({
|
|
414
|
+
className: classNames(className, "p-8 md:p-10")
|
|
415
|
+
}, rest));
|
|
416
|
+
};
|
|
417
|
+
const CardLinkOverlay = forwardRef((props, ref) => {
|
|
418
|
+
return /* @__PURE__ */ jsx("a", __spreadValues({
|
|
419
|
+
className: "no-underline before:absolute before:top-0 before:left-0 before:block before:h-full before:w-full before:content-[''] hover:underline",
|
|
420
|
+
ref
|
|
421
|
+
}, props));
|
|
422
|
+
});
|
|
423
|
+
const Checkbox = forwardRef((props, ref) => {
|
|
424
|
+
const _a = props, {
|
|
425
|
+
children,
|
|
426
|
+
className
|
|
427
|
+
} = _a, rest = __objRest(_a, [
|
|
428
|
+
"children",
|
|
429
|
+
"className"
|
|
430
|
+
]);
|
|
431
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
432
|
+
className: classNames(className, "inline-flex cursor-pointer items-center"),
|
|
433
|
+
children: [/* @__PURE__ */ jsx("input", __spreadValues({
|
|
434
|
+
className: "checkbox border-gray-dark checked:bg-green checked:border-green mr-3 grid h-[1.25em] w-[1.25em] cursor-pointer appearance-none place-content-center rounded border-2 border-solid bg-white text-white focus:outline-none focus:ring-2 focus:ring-black",
|
|
435
|
+
ref,
|
|
436
|
+
type: "checkbox"
|
|
437
|
+
}, rest)), children]
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
const Footer = (props) => {
|
|
441
|
+
const _a = props, {
|
|
442
|
+
className,
|
|
443
|
+
children
|
|
444
|
+
} = _a, rest = __objRest(_a, [
|
|
445
|
+
"className",
|
|
446
|
+
"children"
|
|
447
|
+
]);
|
|
448
|
+
return /* @__PURE__ */ jsx(ButtonColorContext.Provider, {
|
|
449
|
+
value: "white",
|
|
450
|
+
children: /* @__PURE__ */ jsx("footer", __spreadProps(__spreadValues({
|
|
451
|
+
className: classNames(className, "bg-blue py-12 text-white")
|
|
452
|
+
}, rest), {
|
|
453
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
454
|
+
className: "container",
|
|
455
|
+
children
|
|
456
|
+
})
|
|
457
|
+
}))
|
|
458
|
+
});
|
|
459
|
+
};
|
|
460
|
+
const Form = (props) => {
|
|
461
|
+
const _a = props, {
|
|
462
|
+
heading,
|
|
463
|
+
children,
|
|
464
|
+
className
|
|
465
|
+
} = _a, rest = __objRest(_a, [
|
|
466
|
+
"heading",
|
|
467
|
+
"children",
|
|
468
|
+
"className"
|
|
469
|
+
]);
|
|
470
|
+
return /* @__PURE__ */ jsxs("form", __spreadProps(__spreadValues({
|
|
471
|
+
className: classNames(className, "border-blue-dark block overflow-hidden rounded-t-3xl rounded-b-lg border-2")
|
|
472
|
+
}, rest), {
|
|
473
|
+
children: [heading && /* @__PURE__ */ jsx(FormHeading, {
|
|
474
|
+
children: heading
|
|
475
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
476
|
+
className: "p-6 md:p-10",
|
|
477
|
+
children
|
|
478
|
+
})]
|
|
479
|
+
}));
|
|
480
|
+
};
|
|
481
|
+
const FormHeading = (props) => {
|
|
482
|
+
const _a = props, {
|
|
483
|
+
className
|
|
484
|
+
} = _a, rest = __objRest(_a, [
|
|
485
|
+
"className"
|
|
486
|
+
]);
|
|
487
|
+
return /* @__PURE__ */ jsx("h2", __spreadValues({
|
|
488
|
+
className: classNames(className, "bg-blue-dark p-6 text-xl font-bold text-white md:px-10 md:py-8 md:text-2xl")
|
|
489
|
+
}, rest));
|
|
490
|
+
};
|
|
491
|
+
const FormError = (props) => {
|
|
492
|
+
const _a = props, {
|
|
493
|
+
className
|
|
494
|
+
} = _a, rest = __objRest(_a, [
|
|
495
|
+
"className"
|
|
496
|
+
]);
|
|
497
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({
|
|
498
|
+
"aria-live": "polite",
|
|
499
|
+
className: classNames(className, "border-red bg-red-light rounded-lg border-2 p-6 text-sm")
|
|
500
|
+
}, rest), {
|
|
501
|
+
children: "Beklager! Noe gikk dessverre galt under innesendingen av skjemaet. Pr\xF8v gjerne igjen om en stund."
|
|
502
|
+
}));
|
|
503
|
+
};
|
|
504
|
+
const FormErrorMessage = (props) => {
|
|
505
|
+
const _a = props, {
|
|
506
|
+
children,
|
|
507
|
+
className
|
|
508
|
+
} = _a, rest = __objRest(_a, [
|
|
509
|
+
"children",
|
|
510
|
+
"className"
|
|
511
|
+
]);
|
|
512
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({
|
|
513
|
+
className: classNames(className, "bg-red-light text-red flex items-center gap-2 rounded-lg py-1 px-4 text-sm"),
|
|
514
|
+
"aria-live": "polite"
|
|
515
|
+
}, rest), {
|
|
516
|
+
children: [/* @__PURE__ */ jsx(Warning, {
|
|
517
|
+
className: "text-red flex-shrink-0"
|
|
518
|
+
}), children]
|
|
519
|
+
}));
|
|
520
|
+
};
|
|
521
|
+
const FormHelperText = (props) => {
|
|
522
|
+
const _a = props, {
|
|
523
|
+
className,
|
|
524
|
+
children
|
|
525
|
+
} = _a, rest = __objRest(_a, [
|
|
526
|
+
"className",
|
|
527
|
+
"children"
|
|
528
|
+
]);
|
|
529
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({
|
|
530
|
+
className: classNames(className, "text-gray-dark text-sm")
|
|
531
|
+
}, rest), {
|
|
532
|
+
children
|
|
533
|
+
}));
|
|
534
|
+
};
|
|
535
|
+
const FormLabel = (props) => {
|
|
536
|
+
const _a = props, {
|
|
537
|
+
className,
|
|
538
|
+
children,
|
|
539
|
+
isRequired
|
|
540
|
+
} = _a, rest = __objRest(_a, [
|
|
541
|
+
"className",
|
|
542
|
+
"children",
|
|
543
|
+
"isRequired"
|
|
544
|
+
]);
|
|
545
|
+
return /* @__PURE__ */ jsxs("label", __spreadProps(__spreadValues({
|
|
546
|
+
className: classNames(className, "block cursor-pointer font-medium")
|
|
547
|
+
}, rest), {
|
|
548
|
+
children: [children, isRequired && /* @__PURE__ */ jsx("span", {
|
|
549
|
+
"aria-hidden": true,
|
|
550
|
+
className: "ml-px select-none",
|
|
551
|
+
children: "*"
|
|
552
|
+
})]
|
|
553
|
+
}));
|
|
554
|
+
};
|
|
555
|
+
const FormSuccess = (props) => {
|
|
556
|
+
const _a = props, {
|
|
557
|
+
className,
|
|
558
|
+
heading,
|
|
559
|
+
text
|
|
560
|
+
} = _a, rest = __objRest(_a, [
|
|
561
|
+
"className",
|
|
562
|
+
"heading",
|
|
563
|
+
"text"
|
|
564
|
+
]);
|
|
565
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({
|
|
566
|
+
className: classNames(className, "bg-gray-concrete flex flex-col gap-8 p-8 text-center")
|
|
567
|
+
}, rest), {
|
|
568
|
+
children: [/* @__PURE__ */ jsx("img", {
|
|
569
|
+
className: "mx-auto",
|
|
570
|
+
alt: "Innsending fullf\xF8rt",
|
|
571
|
+
height: "220",
|
|
572
|
+
width: "247",
|
|
573
|
+
src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAmUAAAIgCAMAAADzxO7KAAABzlBMVEVHcEwfq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Aep84eqc8fq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9AeqM4fq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9Afq9AZT5oZQpMaU50cfrYZQZIZT5oYMYgdjL4aWqEen8kaWaAbc68bWJ8fqM4ZPY8chLkcerMYLocZQZIZP5AceLIenccemcUdkcEfq9AYKYQfqc4ensgeoMoYK4UepcwYLIYep80eosschboemMUcgLcYOI0aX6QZRpUdjr8ZQpMbcq4bcK0enMcYMYgdlMMZP5EbbKsaWaAcerMYNYsdiLsYO44ZSZcaXaIemsYbaaodjL4ZS5gdlsQdksEcfLQYLoccgrgcdLAdir0aW6EZPY8cdrEaUZsaU5wbYaUbZ6gYM4ocfrUaT5oZTZkceLIbY6YbZacaV58dkMAaVZ4bbqwZSJYeocobbawbZqccdbAZS5cYMIjVwWULAAAAVnRSTlMA1yjL8xjn+wQMg7NI738kY0y/MLcco9+fCDTH63sQICybQNPjRKw4zxRgXPe724prVHOTPJdYd6fDUG9nj3mcPFRIaPUb16u4sivTvfOVydqq5+Oo36+JttwAABVySURBVHja7d1nd1RXlsZxgkAE5wA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JSx0azXUt/sSrO0IDWa2YpmzCY8JhlxcbXrniRFIlJOajdbaF/tsAEqf5TXJUnL0Xxfp/RgvV+FvrU2lwdLhEbUeKOZNDOzRoVHJWnEZQk2oRE13mhe1LKZPfmcDLcSGoHyO1Gn7j6zuPqldFuzxyQjLg4vzUxopquQt57h+XWXyp+4OBz77bQUemxm0wmXyp/QCBw7duxDKTRtZl0uD5YIjcCxY8eOnXmjW4nOvo5BQiPg5+afJU24LI4lNAJP/D4zE/MJjSAuDlv+OO2zw5fQCBQ3mi7tJaER2OFrQiPg32h+TmgE3L1/nLg4uDvxMpU/3F2vJzQC7n4gNAJBajQJjcCejeZbxMXB3dkyNZrExWEfr75LaATcXStDo0loBJ7hNUIj4O9HQiNQ8Y0mcXFwbzQJjcCBfHCa0Ai4u1Nyo0loBA7sM0Ij4O9L4uLg32iep/KHf6P5EaERqMBGk9AIuDeahEagBLeIi4O/c8TFwd8nhEbAv9H8lNAIuHv7gI0moRE4ghu3CY1AZTSaxMXBvdEkNAJH9Q2hEfBvNE8SGgF3p04TGgF3l+uIi4O7u1T+8PcKoRF4YY0moRFwbzQJjUB5G82PiYuDuzfriIuDu+8IjYC/9wiNgL8LhEbA3TtXCI3A82w0iYuDe6NJaAT8vF5PaATc3SM0Av4uERoBd2e+JS4O/o3mJSp/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQzf4fvVAR8mmt7fEAAAAASUVORK5CYII="
|
|
574
|
+
}), heading && /* @__PURE__ */ jsx("h2", {
|
|
575
|
+
className: "text-blue text-2xl",
|
|
576
|
+
children: heading
|
|
577
|
+
}), text && /* @__PURE__ */ jsx("p", {
|
|
578
|
+
className: "text-lg",
|
|
579
|
+
children: text
|
|
580
|
+
})]
|
|
581
|
+
}));
|
|
582
|
+
};
|
|
583
|
+
function usesGridAreaPlacement(contentPosition) {
|
|
584
|
+
return contentPosition !== "vertical-split" && contentPosition !== "below-center" && contentPosition !== "below-left";
|
|
585
|
+
}
|
|
586
|
+
const HeroContext = createContext({
|
|
587
|
+
bgColor: "white",
|
|
588
|
+
contentPosition: "below-center",
|
|
589
|
+
hasImage: false
|
|
590
|
+
});
|
|
591
|
+
const Hero = (props) => {
|
|
592
|
+
const _a = props, {
|
|
593
|
+
bgColor = "white",
|
|
594
|
+
children,
|
|
595
|
+
className,
|
|
596
|
+
contentPosition: contentPositionProp = "below-center",
|
|
597
|
+
image
|
|
598
|
+
} = _a, rest = __objRest(_a, [
|
|
599
|
+
"bgColor",
|
|
600
|
+
"children",
|
|
601
|
+
"className",
|
|
602
|
+
"contentPosition",
|
|
603
|
+
"image"
|
|
604
|
+
]);
|
|
605
|
+
const hasImage = image != null;
|
|
606
|
+
const contentPosition = hasImage ? contentPositionProp : "below-center";
|
|
607
|
+
const context = useMemo(() => ({
|
|
608
|
+
bgColor,
|
|
609
|
+
contentPosition,
|
|
610
|
+
hasImage
|
|
611
|
+
}), [bgColor, contentPosition, hasImage]);
|
|
612
|
+
return /* @__PURE__ */ jsx(ButtonColorContext.Provider, {
|
|
613
|
+
value: bgColor === "white" ? "standard" : "light-green",
|
|
614
|
+
children: /* @__PURE__ */ jsx(HeroContext.Provider, {
|
|
615
|
+
value: context,
|
|
616
|
+
children: /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({
|
|
617
|
+
className: classNames(className, "<md:px-0 container md:grid", {
|
|
618
|
+
"md:grid-cols-[50%,50%]": contentPosition === "vertical-split"
|
|
619
|
+
}),
|
|
620
|
+
style: usesGridAreaPlacement(contentPosition) ? {
|
|
621
|
+
gridTemplateAreas: '"hero"'
|
|
622
|
+
} : void 0
|
|
623
|
+
}, rest), {
|
|
624
|
+
children: [image, children]
|
|
625
|
+
}))
|
|
626
|
+
})
|
|
627
|
+
});
|
|
628
|
+
};
|
|
629
|
+
const HeroImage = (props) => {
|
|
630
|
+
const {
|
|
631
|
+
contentPosition
|
|
632
|
+
} = useContext(HeroContext);
|
|
633
|
+
return /* @__PURE__ */ jsxs("picture", {
|
|
634
|
+
className: classNames("aspect-w-6 aspect-h-7 block", {
|
|
635
|
+
"sm:aspect-w-8 sm:aspect-h-4": contentPosition !== "vertical-split",
|
|
636
|
+
"sm:aspect-w-8 sm:aspect-h-8": contentPosition === "vertical-split"
|
|
637
|
+
}),
|
|
638
|
+
style: contentPosition !== "vertical-split" && contentPosition !== "below-center" && contentPosition !== "below-left" ? {
|
|
639
|
+
gridArea: "hero"
|
|
640
|
+
} : void 0,
|
|
641
|
+
children: [/* @__PURE__ */ jsx("source", {
|
|
642
|
+
media: "(min-width: 768px)",
|
|
643
|
+
srcSet: props.mdSrc
|
|
644
|
+
}), /* @__PURE__ */ jsx("img", {
|
|
645
|
+
className: classNames("overflow-hidden rounded-t-3xl object-cover md:rounded-3xl", {
|
|
646
|
+
"md:rounded-l-none": contentPosition === "vertical-split"
|
|
647
|
+
}),
|
|
648
|
+
decoding: "async",
|
|
649
|
+
src: props.src,
|
|
650
|
+
alt: props.alt
|
|
651
|
+
})]
|
|
652
|
+
});
|
|
653
|
+
};
|
|
654
|
+
const HeroContent = (props) => {
|
|
655
|
+
const {
|
|
656
|
+
bgColor,
|
|
657
|
+
contentPosition,
|
|
658
|
+
hasImage
|
|
659
|
+
} = useContext(HeroContext);
|
|
660
|
+
const _a = props, {
|
|
661
|
+
children,
|
|
662
|
+
className,
|
|
663
|
+
heading,
|
|
664
|
+
description
|
|
665
|
+
} = _a, rest = __objRest(_a, [
|
|
666
|
+
"children",
|
|
667
|
+
"className",
|
|
668
|
+
"heading",
|
|
669
|
+
"description"
|
|
670
|
+
]);
|
|
671
|
+
const usesGridArea = usesGridAreaPlacement(contentPosition);
|
|
672
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({
|
|
673
|
+
className: classNames(className, "<md:mx-4 relative grid grid-flow-row grid-cols-[minmax(auto,_37rem)] content-center gap-6 rounded-3xl py-10 px-6 text-center md:p-12", {
|
|
674
|
+
"<md:-mt-18": hasImage,
|
|
675
|
+
"text-white": bgColor !== "white",
|
|
676
|
+
"bg-green-dark": bgColor === "green",
|
|
677
|
+
"bg-blue-dark": bgColor === "blue",
|
|
678
|
+
"bg-white": bgColor === "white",
|
|
679
|
+
"md:-order-1 md:mt-0 md:justify-center md:rounded-r-none md:text-left": contentPosition === "vertical-split",
|
|
680
|
+
"justify-center md:mx-auto md:w-4/5": contentPosition === "below-center",
|
|
681
|
+
"md:-mt-18": hasImage && contentPosition === "below-center",
|
|
682
|
+
"md:ml-[8%] md:-mt-32 md:max-w-[58%] md:text-left": contentPosition === "below-left",
|
|
683
|
+
"md:my-9 md:mx-32 md:w-2/5": usesGridArea,
|
|
684
|
+
"self-end justify-self-start": contentPosition === "bottom-left",
|
|
685
|
+
"self-start justify-self-start": contentPosition === "top-left",
|
|
686
|
+
"self-start justify-self-end": contentPosition === "top-right",
|
|
687
|
+
"self-end justify-self-end": contentPosition === "bottom-right",
|
|
688
|
+
"self-center justify-self-center": contentPosition === "center"
|
|
689
|
+
})
|
|
690
|
+
}, rest), {
|
|
691
|
+
style: usesGridArea ? {
|
|
692
|
+
gridArea: "hero"
|
|
693
|
+
} : void 0,
|
|
694
|
+
children: [/* @__PURE__ */ jsx("h1", {
|
|
695
|
+
children: heading
|
|
696
|
+
}), description && /* @__PURE__ */ jsx("p", {
|
|
697
|
+
className: "text-lg md:text-xl",
|
|
698
|
+
children: description
|
|
699
|
+
}), children]
|
|
700
|
+
}));
|
|
701
|
+
};
|
|
702
|
+
const HeroActions = (props) => {
|
|
703
|
+
const _a = props, {
|
|
704
|
+
className
|
|
705
|
+
} = _a, rest = __objRest(_a, [
|
|
706
|
+
"className"
|
|
707
|
+
]);
|
|
708
|
+
const {
|
|
709
|
+
contentPosition
|
|
710
|
+
} = useContext(HeroContext);
|
|
711
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({
|
|
712
|
+
className: classNames(className, "grid items-center justify-center justify-items-center gap-4 md:grid-flow-col", {
|
|
713
|
+
"md:justify-start": contentPosition === "vertical-split" || contentPosition === "below-left"
|
|
714
|
+
})
|
|
715
|
+
}, rest));
|
|
716
|
+
};
|
|
717
|
+
const IconLegacy = (props) => {
|
|
718
|
+
var _b;
|
|
719
|
+
const _a = props, {
|
|
720
|
+
className,
|
|
721
|
+
name
|
|
722
|
+
} = _a, rest = __objRest(_a, [
|
|
723
|
+
"className",
|
|
724
|
+
"name"
|
|
725
|
+
]);
|
|
726
|
+
const IconComponent = (_b = iconMap[name]) != null ? _b : IconFallback;
|
|
727
|
+
return /* @__PURE__ */ jsx(IconComponent, __spreadValues({
|
|
728
|
+
className: classNames(className, "inline")
|
|
729
|
+
}, rest));
|
|
730
|
+
};
|
|
731
|
+
const IconFallback = (props) => /* @__PURE__ */ jsx("svg", __spreadValues({
|
|
732
|
+
"aria-hidden": props["aria-label"] == null,
|
|
733
|
+
height: "1.25em",
|
|
734
|
+
width: "1.25em"
|
|
735
|
+
}, props));
|
|
736
|
+
const iconMap = {
|
|
737
|
+
mapmarker: MapPin,
|
|
738
|
+
smartphone: Mobile,
|
|
739
|
+
envelope: Mail
|
|
740
|
+
};
|
|
741
|
+
const Input = forwardRef((props, ref) => {
|
|
742
|
+
const _a = props, {
|
|
743
|
+
className,
|
|
744
|
+
isInvalid,
|
|
745
|
+
size,
|
|
746
|
+
prefix,
|
|
747
|
+
as,
|
|
748
|
+
type
|
|
749
|
+
} = _a, rest = __objRest(_a, [
|
|
750
|
+
"className",
|
|
751
|
+
"isInvalid",
|
|
752
|
+
"size",
|
|
753
|
+
"prefix",
|
|
754
|
+
"as",
|
|
755
|
+
"type"
|
|
756
|
+
]);
|
|
757
|
+
const Component = as != null ? as : "input";
|
|
758
|
+
const inputType = (type != null ? type : Component === "input") ? "text" : void 0;
|
|
759
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
760
|
+
className: classNames(className, "relative flex items-center rounded-md border-[1px] border-b-[3px] focus-within:-ml-[2px] focus-within:-mt-[2px] focus-within:border-[3px] focus-within:shadow", {
|
|
761
|
+
"border-gray-dark focus-within:border-blue": !isInvalid,
|
|
762
|
+
"border-red focus-within:border-red": isInvalid,
|
|
763
|
+
"w-fit": size != null,
|
|
764
|
+
"w-full": size == null
|
|
765
|
+
}),
|
|
766
|
+
children: [prefix && /* @__PURE__ */ jsx("span", {
|
|
767
|
+
className: "text-gray pl-4",
|
|
768
|
+
children: prefix
|
|
769
|
+
}), /* @__PURE__ */ jsx(Component, __spreadValues({
|
|
770
|
+
"aria-invalid": isInvalid,
|
|
771
|
+
ref,
|
|
772
|
+
className: "focus:none placeholder-gray w-full rounded-md border-none px-4 py-3 outline-none",
|
|
773
|
+
size,
|
|
774
|
+
type: inputType
|
|
775
|
+
}, rest))]
|
|
776
|
+
});
|
|
777
|
+
});
|
|
778
|
+
const Link = (props) => {
|
|
779
|
+
let iconClass = "";
|
|
780
|
+
if (props.icon) {
|
|
781
|
+
iconClass = "inline-flex items-center gap-2";
|
|
782
|
+
}
|
|
783
|
+
return /* @__PURE__ */ jsxs("a", {
|
|
784
|
+
className: iconClass,
|
|
785
|
+
href: props.href,
|
|
786
|
+
children: [props.icon, props.children]
|
|
787
|
+
});
|
|
788
|
+
};
|
|
789
|
+
const NavbarContext = createContext({
|
|
790
|
+
setIsExpanded: () => {
|
|
791
|
+
},
|
|
792
|
+
isExpanded: false,
|
|
793
|
+
collapsibleId: ""
|
|
794
|
+
});
|
|
795
|
+
const Navbar = (props) => {
|
|
796
|
+
const _a = props, {
|
|
797
|
+
className,
|
|
798
|
+
children
|
|
799
|
+
} = _a, rest = __objRest(_a, [
|
|
800
|
+
"className",
|
|
801
|
+
"children"
|
|
802
|
+
]);
|
|
803
|
+
const collapsibleId = useId();
|
|
804
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
805
|
+
const expandedContext = useMemo(() => ({
|
|
806
|
+
isExpanded,
|
|
807
|
+
setIsExpanded,
|
|
808
|
+
collapsibleId
|
|
809
|
+
}), [isExpanded, collapsibleId]);
|
|
810
|
+
return /* @__PURE__ */ jsx(ButtonColorContext.Provider, {
|
|
811
|
+
value: "white",
|
|
812
|
+
children: /* @__PURE__ */ jsx(NavbarContext.Provider, {
|
|
813
|
+
value: expandedContext,
|
|
814
|
+
children: /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({
|
|
815
|
+
className: classNames(className, "bg-blue py-6 text-white md:py-8")
|
|
816
|
+
}, rest), {
|
|
817
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
818
|
+
className: "container",
|
|
819
|
+
children
|
|
820
|
+
})
|
|
821
|
+
}))
|
|
822
|
+
})
|
|
823
|
+
});
|
|
824
|
+
};
|
|
825
|
+
const NavbarItems = (props) => {
|
|
826
|
+
const _a = props, {
|
|
827
|
+
className,
|
|
828
|
+
children
|
|
829
|
+
} = _a, rest = __objRest(_a, [
|
|
830
|
+
"className",
|
|
831
|
+
"children"
|
|
832
|
+
]);
|
|
833
|
+
const {
|
|
834
|
+
isExpanded
|
|
835
|
+
} = useContext(NavbarContext);
|
|
836
|
+
return /* @__PURE__ */ jsx("nav", __spreadProps(__spreadValues({
|
|
837
|
+
className: classNames(className, "my-8 flex flex-col md:mb-0 md:flex md:flex-row md:flex-wrap md:gap-x-8", {
|
|
838
|
+
hidden: !isExpanded
|
|
839
|
+
})
|
|
840
|
+
}, rest), {
|
|
841
|
+
children
|
|
842
|
+
}));
|
|
843
|
+
};
|
|
844
|
+
const NavbarItem = forwardRef((props, ref) => {
|
|
845
|
+
const _a = props, {
|
|
846
|
+
active,
|
|
847
|
+
className,
|
|
848
|
+
children
|
|
849
|
+
} = _a, rest = __objRest(_a, [
|
|
850
|
+
"active",
|
|
851
|
+
"className",
|
|
852
|
+
"children"
|
|
853
|
+
]);
|
|
854
|
+
return /* @__PURE__ */ jsx("a", __spreadProps(__spreadValues({
|
|
855
|
+
"aria-current": active ? "page" : void 0,
|
|
856
|
+
className: classNames(className, "border-b border-[#0156E0] py-3 no-underline md:border-b-2 md:border-transparent md:py-2 md:hover:border-white", {
|
|
857
|
+
"fake-font-bold md:bg-blue-dark md:-mx-3 md:rounded-t-lg md:px-3": active
|
|
858
|
+
}),
|
|
859
|
+
ref
|
|
860
|
+
}, rest), {
|
|
861
|
+
children
|
|
862
|
+
}));
|
|
863
|
+
});
|
|
864
|
+
const NavbarMenuButton = () => {
|
|
865
|
+
const {
|
|
866
|
+
isExpanded,
|
|
867
|
+
setIsExpanded,
|
|
868
|
+
collapsibleId
|
|
869
|
+
} = useContext(NavbarContext);
|
|
870
|
+
let Icon = MenuAlt;
|
|
871
|
+
let buttonText = "Meny";
|
|
872
|
+
if (isExpanded) {
|
|
873
|
+
Icon = Close;
|
|
874
|
+
buttonText = "Lukk";
|
|
875
|
+
}
|
|
876
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
877
|
+
"aria-controls": collapsibleId,
|
|
878
|
+
"aria-expanded": isExpanded,
|
|
879
|
+
className: "inline-flex items-center gap-2 md:hidden",
|
|
880
|
+
onClick: () => setIsExpanded((val) => !val),
|
|
881
|
+
children: [buttonText, " ", /* @__PURE__ */ jsx(Icon, {})]
|
|
882
|
+
});
|
|
883
|
+
};
|
|
884
|
+
const NavbarContent = (props) => {
|
|
885
|
+
const _a = props, {
|
|
886
|
+
className,
|
|
887
|
+
children,
|
|
888
|
+
logo
|
|
889
|
+
} = _a, rest = __objRest(_a, [
|
|
890
|
+
"className",
|
|
891
|
+
"children",
|
|
892
|
+
"logo"
|
|
893
|
+
]);
|
|
894
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({
|
|
895
|
+
className: classNames(className, "flex items-center justify-between gap-8")
|
|
896
|
+
}, rest), {
|
|
897
|
+
children: [logo, /* @__PURE__ */ jsx("div", {
|
|
898
|
+
className: "hidden md:block",
|
|
899
|
+
children
|
|
900
|
+
}), /* @__PURE__ */ jsx(NavbarMenuButton, {})]
|
|
901
|
+
}));
|
|
902
|
+
};
|
|
903
|
+
const NavbarCollapsible = (props) => {
|
|
904
|
+
const _a = props, {
|
|
905
|
+
className,
|
|
906
|
+
children
|
|
907
|
+
} = _a, rest = __objRest(_a, [
|
|
908
|
+
"className",
|
|
909
|
+
"children"
|
|
910
|
+
]);
|
|
911
|
+
const {
|
|
912
|
+
collapsibleId,
|
|
913
|
+
isExpanded
|
|
914
|
+
} = useContext(NavbarContext);
|
|
915
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, rest), {
|
|
916
|
+
"aria-hidden": !isExpanded,
|
|
917
|
+
className: classNames(className, "md:-mb-8 md:block", {
|
|
918
|
+
hidden: !isExpanded
|
|
919
|
+
}),
|
|
920
|
+
id: collapsibleId,
|
|
921
|
+
children
|
|
922
|
+
}));
|
|
923
|
+
};
|
|
924
|
+
const NavbarExpandedMobileContent = (props) => {
|
|
925
|
+
const {
|
|
926
|
+
isExpanded
|
|
927
|
+
} = useContext(NavbarContext);
|
|
928
|
+
const isMobileScreen = useScreenMaxWidthMd();
|
|
929
|
+
if (!isExpanded || !isMobileScreen)
|
|
930
|
+
return null;
|
|
931
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
932
|
+
children: props.children
|
|
933
|
+
});
|
|
934
|
+
};
|
|
935
|
+
const Snackbar = (props) => {
|
|
936
|
+
const {
|
|
937
|
+
heading,
|
|
938
|
+
children,
|
|
939
|
+
closeSnackbar
|
|
940
|
+
} = props;
|
|
941
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
942
|
+
return /* @__PURE__ */ jsx("div", {
|
|
943
|
+
className: "container max-w-[59rem]",
|
|
944
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
945
|
+
className: "bg-orange-light rounded-lg p-4",
|
|
946
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
947
|
+
className: "snackbar grid items-center",
|
|
948
|
+
children: [/* @__PURE__ */ jsx(InfoCircle, {
|
|
949
|
+
className: "text-orange snackbar-icon mr-4 md:mr-8 md:text-2xl"
|
|
950
|
+
}), /* @__PURE__ */ jsx("h3", {
|
|
951
|
+
className: classNames("snackbar-header min-w-0 max-w-prose text-base font-medium", {
|
|
952
|
+
"overflow-hidden overflow-ellipsis whitespace-nowrap": !isExpanded
|
|
953
|
+
}),
|
|
954
|
+
children: heading
|
|
955
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
956
|
+
className: "snackbar-actions <md:mt-3 flex justify-end gap-4 md:ml-4",
|
|
957
|
+
children: [/* @__PURE__ */ jsx(SnackbarButton, {
|
|
958
|
+
"aria-expanded": isExpanded,
|
|
959
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
960
|
+
children: isExpanded ? "Les mindre" : "Les mer"
|
|
961
|
+
}), /* @__PURE__ */ jsx(SnackbarButton, {
|
|
962
|
+
onClick: closeSnackbar,
|
|
963
|
+
children: "Ok"
|
|
964
|
+
})]
|
|
965
|
+
}), isExpanded && children]
|
|
966
|
+
})
|
|
967
|
+
})
|
|
968
|
+
});
|
|
969
|
+
};
|
|
970
|
+
const SnackbarButton = (props) => /* @__PURE__ */ jsx("button", __spreadProps(__spreadValues({
|
|
971
|
+
className: classNames(props.className, "focus-visible:ring-offset flex-shrink-0 underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black")
|
|
972
|
+
}, props), {
|
|
973
|
+
children: props.children
|
|
974
|
+
}));
|
|
975
|
+
const SnackbarContent = (props) => {
|
|
976
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({
|
|
977
|
+
className: "snackbar-content my-4 max-h-[50vh] max-w-prose overflow-y-auto"
|
|
978
|
+
}, props), {
|
|
979
|
+
children: props.children
|
|
980
|
+
}));
|
|
981
|
+
};
|
|
982
|
+
const TextArea = forwardRef((props, ref) => {
|
|
983
|
+
const _a = props, {
|
|
984
|
+
description,
|
|
985
|
+
error,
|
|
986
|
+
id: idProp,
|
|
987
|
+
label,
|
|
988
|
+
required
|
|
989
|
+
} = _a, rest = __objRest(_a, [
|
|
990
|
+
"description",
|
|
991
|
+
"error",
|
|
992
|
+
"id",
|
|
993
|
+
"label",
|
|
994
|
+
"required"
|
|
995
|
+
]);
|
|
996
|
+
const ownRef = useRef(null);
|
|
997
|
+
const {
|
|
998
|
+
validity
|
|
999
|
+
} = useFormControlValidity(ownRef);
|
|
1000
|
+
const id = useFallbackId(idProp);
|
|
1001
|
+
const helpTextId = id + "-help";
|
|
1002
|
+
const errorMsgId = id + "-err-msg";
|
|
1003
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1004
|
+
className: "grid gap-2",
|
|
1005
|
+
children: [/* @__PURE__ */ jsx(FormLabel, {
|
|
1006
|
+
htmlFor: id,
|
|
1007
|
+
isRequired: required,
|
|
1008
|
+
children: label
|
|
1009
|
+
}), /* @__PURE__ */ jsx(Input, __spreadProps(__spreadValues({
|
|
1010
|
+
as: "textarea",
|
|
1011
|
+
ref: useComposedRefs(ownRef, ref),
|
|
1012
|
+
id,
|
|
1013
|
+
required
|
|
1014
|
+
}, rest), {
|
|
1015
|
+
isInvalid: !!error || validity === "invalid",
|
|
1016
|
+
"aria-describedby": classNames({
|
|
1017
|
+
[errorMsgId]: !!error,
|
|
1018
|
+
[helpTextId]: description
|
|
1019
|
+
})
|
|
1020
|
+
})), description && /* @__PURE__ */ jsx(FormHelperText, {
|
|
1021
|
+
id: helpTextId,
|
|
1022
|
+
children: description
|
|
1023
|
+
}), error && /* @__PURE__ */ jsx(FormErrorMessage, {
|
|
1024
|
+
id: errorMsgId,
|
|
1025
|
+
children: error
|
|
1026
|
+
})]
|
|
1027
|
+
});
|
|
1028
|
+
});
|
|
1029
|
+
const TextField = forwardRef((props, ref) => {
|
|
1030
|
+
const _a = props, {
|
|
1031
|
+
description,
|
|
1032
|
+
error,
|
|
1033
|
+
id: idProp,
|
|
1034
|
+
label,
|
|
1035
|
+
required,
|
|
1036
|
+
type = "text"
|
|
1037
|
+
} = _a, rest = __objRest(_a, [
|
|
1038
|
+
"description",
|
|
1039
|
+
"error",
|
|
1040
|
+
"id",
|
|
1041
|
+
"label",
|
|
1042
|
+
"required",
|
|
1043
|
+
"type"
|
|
1044
|
+
]);
|
|
1045
|
+
const ownRef = useRef(null);
|
|
1046
|
+
const {
|
|
1047
|
+
validity
|
|
1048
|
+
} = useFormControlValidity(ownRef);
|
|
1049
|
+
const id = useFallbackId(idProp);
|
|
1050
|
+
const helpTextId = id + "-help";
|
|
1051
|
+
const errorMsgId = id + "-err";
|
|
1052
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1053
|
+
className: "grid gap-2",
|
|
1054
|
+
children: [/* @__PURE__ */ jsx(FormLabel, {
|
|
1055
|
+
htmlFor: id,
|
|
1056
|
+
isRequired: required,
|
|
1057
|
+
children: label
|
|
1058
|
+
}), /* @__PURE__ */ jsx(Input, __spreadProps(__spreadValues({
|
|
1059
|
+
id,
|
|
1060
|
+
required,
|
|
1061
|
+
ref: useComposedRefs(ownRef, ref),
|
|
1062
|
+
type
|
|
1063
|
+
}, rest), {
|
|
1064
|
+
isInvalid: !!error || validity === "invalid",
|
|
1065
|
+
"aria-describedby": classNames({
|
|
1066
|
+
[errorMsgId]: !!error,
|
|
1067
|
+
[helpTextId]: description
|
|
1068
|
+
})
|
|
1069
|
+
})), description && /* @__PURE__ */ jsx(FormHelperText, {
|
|
1070
|
+
id: helpTextId,
|
|
1071
|
+
children: description
|
|
1072
|
+
}), error && /* @__PURE__ */ jsx(FormErrorMessage, {
|
|
1073
|
+
id: errorMsgId,
|
|
1074
|
+
children: error
|
|
1075
|
+
})]
|
|
1076
|
+
});
|
|
1077
|
+
});
|
|
1078
|
+
export { Alert, Banner, BannerImage, Button, ButtonColorContext, Card, CardContent, CardImage, CardLinkOverlay, CardList, Checkbox, Footer, Form, FormError, FormErrorMessage, FormHeading, FormHelperText, FormLabel, FormSuccess, Hero, HeroActions, HeroContent, HeroContext, HeroImage, IconLegacy, Input, Link, Navbar, NavbarCollapsible, NavbarContent, NavbarExpandedMobileContent, NavbarItem, NavbarItems, Snackbar, SnackbarButton, SnackbarContent, TextArea, TextField, assignRef, useBlockBackgroundColor, useComposedRefs, useFallbackId, useFormControlValidity, useMedia, usePrefersReducedMotion, useScreenMaxWidthMd };
|