@bergetai/ui 0.1.80 → 0.1.82
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.cjs +515 -337
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -15
- package/dist/index.d.ts +40 -15
- package/dist/index.js +518 -343
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +231 -38
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -77,6 +77,8 @@ __export(index_exports, {
|
|
|
77
77
|
Select: () => Select2,
|
|
78
78
|
Switch: () => Switch,
|
|
79
79
|
TextArea: () => TextArea,
|
|
80
|
+
ThemeProvider: () => ThemeProvider,
|
|
81
|
+
ThemeToggle: () => ThemeToggle,
|
|
80
82
|
Typography: () => Typography,
|
|
81
83
|
alertVariants: () => alertVariants2,
|
|
82
84
|
badgeVariants: () => badgeVariants,
|
|
@@ -92,13 +94,95 @@ __export(index_exports, {
|
|
|
92
94
|
switchRootVariants: () => switchRootVariants,
|
|
93
95
|
switchThumbVariants: () => switchThumbVariants,
|
|
94
96
|
textAreaVariants: () => textAreaVariants,
|
|
95
|
-
typographyVariants: () => typographyVariants
|
|
97
|
+
typographyVariants: () => typographyVariants,
|
|
98
|
+
useTheme: () => useTheme
|
|
96
99
|
});
|
|
97
100
|
module.exports = __toCommonJS(index_exports);
|
|
98
101
|
|
|
99
|
-
// src/components/
|
|
100
|
-
var
|
|
101
|
-
var
|
|
102
|
+
// src/components/theme-provider/ThemeProvider.tsx
|
|
103
|
+
var React = __toESM(require("react"), 1);
|
|
104
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
105
|
+
var ThemeProviderContext = React.createContext(void 0);
|
|
106
|
+
var STORAGE_KEY = "berget-theme";
|
|
107
|
+
function getSystemTheme() {
|
|
108
|
+
return window.matchMedia("(prefers-color-scheme: light)").matches ? "light" : "dark";
|
|
109
|
+
}
|
|
110
|
+
function resolveTheme(theme) {
|
|
111
|
+
return {
|
|
112
|
+
theme,
|
|
113
|
+
resolvedTheme: theme === "system" ? getSystemTheme() : theme
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
var ThemeProvider = React.memo(function ThemeProvider2({
|
|
117
|
+
children,
|
|
118
|
+
theme: controlledTheme
|
|
119
|
+
}) {
|
|
120
|
+
const isControlled = controlledTheme !== void 0;
|
|
121
|
+
const [state, setState] = React.useState(() => {
|
|
122
|
+
if (isControlled) {
|
|
123
|
+
return resolveTheme(controlledTheme);
|
|
124
|
+
}
|
|
125
|
+
let theme = "system";
|
|
126
|
+
try {
|
|
127
|
+
const stored = localStorage.getItem(STORAGE_KEY);
|
|
128
|
+
if (stored && ["dark", "light", "system"].includes(stored)) {
|
|
129
|
+
theme = stored;
|
|
130
|
+
}
|
|
131
|
+
} catch {
|
|
132
|
+
}
|
|
133
|
+
return resolveTheme(theme);
|
|
134
|
+
});
|
|
135
|
+
React.useEffect(() => {
|
|
136
|
+
document.documentElement.setAttribute("data-theme", state.resolvedTheme);
|
|
137
|
+
}, [state.resolvedTheme]);
|
|
138
|
+
React.useEffect(() => {
|
|
139
|
+
if (isControlled && state.theme !== controlledTheme) {
|
|
140
|
+
setState(resolveTheme(controlledTheme));
|
|
141
|
+
}
|
|
142
|
+
}, [isControlled, controlledTheme, state.theme]);
|
|
143
|
+
const setTheme = React.useCallback(
|
|
144
|
+
(theme) => {
|
|
145
|
+
if (isControlled) return;
|
|
146
|
+
const next = resolveTheme(theme);
|
|
147
|
+
setState(next);
|
|
148
|
+
try {
|
|
149
|
+
localStorage.setItem(STORAGE_KEY, theme);
|
|
150
|
+
} catch {
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
[isControlled]
|
|
154
|
+
);
|
|
155
|
+
React.useEffect(() => {
|
|
156
|
+
if (isControlled || state.theme !== "system") return;
|
|
157
|
+
const media = window.matchMedia("(prefers-color-scheme: light)");
|
|
158
|
+
const handler = () => {
|
|
159
|
+
setState((prev) => ({
|
|
160
|
+
...prev,
|
|
161
|
+
resolvedTheme: getSystemTheme()
|
|
162
|
+
}));
|
|
163
|
+
};
|
|
164
|
+
media.addEventListener("change", handler);
|
|
165
|
+
return () => media.removeEventListener("change", handler);
|
|
166
|
+
}, [isControlled, state.theme]);
|
|
167
|
+
const value = React.useMemo(
|
|
168
|
+
() => ({
|
|
169
|
+
...state,
|
|
170
|
+
setTheme
|
|
171
|
+
}),
|
|
172
|
+
[state, setTheme]
|
|
173
|
+
);
|
|
174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeProviderContext.Provider, { value, children });
|
|
175
|
+
});
|
|
176
|
+
function useTheme() {
|
|
177
|
+
const context = React.useContext(ThemeProviderContext);
|
|
178
|
+
if (!context) {
|
|
179
|
+
throw new Error("useTheme must be used within a ThemeProvider.");
|
|
180
|
+
}
|
|
181
|
+
return context;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// src/components/theme-provider/ThemeToggle.tsx
|
|
185
|
+
var React2 = __toESM(require("react"), 1);
|
|
102
186
|
|
|
103
187
|
// src/lib/utils.ts
|
|
104
188
|
var import_clsx = require("clsx");
|
|
@@ -122,11 +206,102 @@ function cn(...inputs) {
|
|
|
122
206
|
return twMerge((0, import_clsx.clsx)(inputs));
|
|
123
207
|
}
|
|
124
208
|
|
|
209
|
+
// src/components/theme-provider/ThemeToggle.tsx
|
|
210
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
211
|
+
var ThemeToggle = React2.forwardRef(
|
|
212
|
+
({ className, label = "Toggle theme", size = "md", ...props }, ref) => {
|
|
213
|
+
const { theme, resolvedTheme, setTheme } = useTheme();
|
|
214
|
+
const toggle = React2.useCallback(() => {
|
|
215
|
+
setTheme(theme === "dark" ? "light" : "dark");
|
|
216
|
+
}, [theme, setTheme]);
|
|
217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
218
|
+
"button",
|
|
219
|
+
{
|
|
220
|
+
ref,
|
|
221
|
+
type: "button",
|
|
222
|
+
onClick: toggle,
|
|
223
|
+
"aria-label": label,
|
|
224
|
+
title: `Toggle ${resolvedTheme === "dark" ? "light" : "dark"} mode`,
|
|
225
|
+
className: cn(
|
|
226
|
+
"relative inline-flex items-center justify-center rounded-full cursor-pointer",
|
|
227
|
+
"transition-colors duration-200",
|
|
228
|
+
"hover:bg-berget-surface-hover",
|
|
229
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring",
|
|
230
|
+
size === "sm" && "w-7 h-7",
|
|
231
|
+
size === "md" && "w-9 h-9",
|
|
232
|
+
size === "lg" && "w-11 h-11",
|
|
233
|
+
className
|
|
234
|
+
),
|
|
235
|
+
...props,
|
|
236
|
+
children: [
|
|
237
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
238
|
+
"svg",
|
|
239
|
+
{
|
|
240
|
+
className: cn(
|
|
241
|
+
"absolute transition-all duration-200",
|
|
242
|
+
resolvedTheme === "dark" ? "opacity-100 scale-100 rotate-0" : "opacity-0 scale-0 -rotate-90",
|
|
243
|
+
size === "sm" && "w-3.5 h-3.5",
|
|
244
|
+
size === "md" && "w-4 h-4",
|
|
245
|
+
size === "lg" && "w-5 h-5"
|
|
246
|
+
),
|
|
247
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
248
|
+
fill: "none",
|
|
249
|
+
viewBox: "0 0 24 24",
|
|
250
|
+
stroke: "currentColor",
|
|
251
|
+
strokeWidth: 2,
|
|
252
|
+
children: [
|
|
253
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "4" }),
|
|
254
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
255
|
+
"path",
|
|
256
|
+
{
|
|
257
|
+
strokeLinecap: "round",
|
|
258
|
+
d: "M12 2v2m0 16v2m9-10h-2M5 12H3m15.36 6.36-1.41-1.41M6.05 6.05 4.64 4.64m12.72 0-1.41 1.41M6.05 17.95l-1.41 1.41"
|
|
259
|
+
}
|
|
260
|
+
)
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
),
|
|
264
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
265
|
+
"svg",
|
|
266
|
+
{
|
|
267
|
+
className: cn(
|
|
268
|
+
"absolute transition-all duration-200",
|
|
269
|
+
resolvedTheme === "light" ? "opacity-100 scale-100 rotate-0" : "opacity-0 scale-0 rotate-90",
|
|
270
|
+
size === "sm" && "w-3.5 h-3.5",
|
|
271
|
+
size === "md" && "w-4 h-4",
|
|
272
|
+
size === "lg" && "w-5 h-5"
|
|
273
|
+
),
|
|
274
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
275
|
+
fill: "none",
|
|
276
|
+
viewBox: "0 0 24 24",
|
|
277
|
+
stroke: "currentColor",
|
|
278
|
+
strokeWidth: 2,
|
|
279
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
280
|
+
"path",
|
|
281
|
+
{
|
|
282
|
+
strokeLinecap: "round",
|
|
283
|
+
strokeLinejoin: "round",
|
|
284
|
+
d: "M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
);
|
|
294
|
+
ThemeToggle.displayName = "ThemeToggle";
|
|
295
|
+
|
|
296
|
+
// src/components/button/Button.tsx
|
|
297
|
+
var React5 = __toESM(require("react"), 1);
|
|
298
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
299
|
+
|
|
125
300
|
// src/primitives/button.tsx
|
|
126
|
-
var
|
|
301
|
+
var React3 = __toESM(require("react"), 1);
|
|
127
302
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
128
303
|
var import_class_variance_authority = require("class-variance-authority");
|
|
129
|
-
var
|
|
304
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
130
305
|
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
131
306
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
132
307
|
{
|
|
@@ -152,23 +327,23 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
152
327
|
}
|
|
153
328
|
}
|
|
154
329
|
);
|
|
155
|
-
var Button =
|
|
330
|
+
var Button = React3.forwardRef(
|
|
156
331
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
157
332
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
158
|
-
return /* @__PURE__ */ (0,
|
|
333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Comp, { className: cn(buttonVariants({ variant, size }), className), ref, ...props });
|
|
159
334
|
}
|
|
160
335
|
);
|
|
161
336
|
Button.displayName = "Button";
|
|
162
337
|
|
|
163
338
|
// src/components/icon/Icon.tsx
|
|
164
|
-
var
|
|
165
|
-
var
|
|
339
|
+
var React4 = __toESM(require("react"), 1);
|
|
340
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
166
341
|
var iconStrokeMap = {
|
|
167
342
|
16: 1.4,
|
|
168
343
|
24: 1.6,
|
|
169
344
|
32: 1.8
|
|
170
345
|
};
|
|
171
|
-
var Icon =
|
|
346
|
+
var Icon = React4.forwardRef(
|
|
172
347
|
({
|
|
173
348
|
icon: IconComponent,
|
|
174
349
|
size,
|
|
@@ -180,7 +355,7 @@ var Icon = React2.forwardRef(
|
|
|
180
355
|
const strokeWidth = iconStrokeMap[size];
|
|
181
356
|
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
182
357
|
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
183
|
-
return /* @__PURE__ */ (0,
|
|
358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
184
359
|
IconComponent,
|
|
185
360
|
{
|
|
186
361
|
ref,
|
|
@@ -196,7 +371,7 @@ Icon.displayName = "Icon";
|
|
|
196
371
|
|
|
197
372
|
// src/components/button/Button.tsx
|
|
198
373
|
var import_lucide_react = require("lucide-react");
|
|
199
|
-
var
|
|
374
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
200
375
|
var buttonVariants2 = (0, import_class_variance_authority2.cva)(
|
|
201
376
|
"inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium cursor-pointer transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-berget-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
202
377
|
{
|
|
@@ -227,7 +402,7 @@ var buttonVariants2 = (0, import_class_variance_authority2.cva)(
|
|
|
227
402
|
}
|
|
228
403
|
}
|
|
229
404
|
);
|
|
230
|
-
var Button2 =
|
|
405
|
+
var Button2 = React5.forwardRef(
|
|
231
406
|
({
|
|
232
407
|
className,
|
|
233
408
|
variant,
|
|
@@ -242,7 +417,7 @@ var Button2 = React3.forwardRef(
|
|
|
242
417
|
const isHighlight = variant === "highlight";
|
|
243
418
|
const isIcon = variant === "icon";
|
|
244
419
|
if (asChild) {
|
|
245
|
-
return /* @__PURE__ */ (0,
|
|
420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
246
421
|
Button,
|
|
247
422
|
{
|
|
248
423
|
className: cn(buttonVariants2({ variant, size, width }), className),
|
|
@@ -256,7 +431,7 @@ var Button2 = React3.forwardRef(
|
|
|
256
431
|
}
|
|
257
432
|
);
|
|
258
433
|
}
|
|
259
|
-
return /* @__PURE__ */ (0,
|
|
434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
260
435
|
Button,
|
|
261
436
|
{
|
|
262
437
|
className: cn(buttonVariants2({ variant, size, width }), className),
|
|
@@ -266,11 +441,11 @@ var Button2 = React3.forwardRef(
|
|
|
266
441
|
"aria-busy": isLoading || void 0,
|
|
267
442
|
...props,
|
|
268
443
|
children: [
|
|
269
|
-
isHighlight && /* @__PURE__ */ (0,
|
|
270
|
-
/* @__PURE__ */ (0,
|
|
271
|
-
/* @__PURE__ */ (0,
|
|
444
|
+
isHighlight && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
445
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "absolute inset-0 top-[1px] h-[calc(100%-1px)] w-full bg-[radial-gradient(100%_100%_at_49.87%_0%,color-mix(in_oklch,var(--berget-foreground)_4%,transparent)_0%,transparent_100%)] pointer-events-none" }),
|
|
446
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "absolute top-0 left-0 right-0 h-[1px] bg-[radial-gradient(55.66%_112.5%_at_50%_0%,var(--berget-foreground)_0%,transparent_92.4%)] opacity-[0.3] pointer-events-none" })
|
|
272
447
|
] }),
|
|
273
|
-
/* @__PURE__ */ (0,
|
|
448
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
274
449
|
"span",
|
|
275
450
|
{
|
|
276
451
|
className: cn(
|
|
@@ -278,8 +453,8 @@ var Button2 = React3.forwardRef(
|
|
|
278
453
|
!isIcon && "gap-2",
|
|
279
454
|
isHighlight && "relative z-10"
|
|
280
455
|
),
|
|
281
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
282
|
-
/* @__PURE__ */ (0,
|
|
456
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
457
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { icon: import_lucide_react.Loader2, size: 16, className: "animate-spin", "aria-hidden": true }),
|
|
283
458
|
!isIcon && children
|
|
284
459
|
] }) : children
|
|
285
460
|
}
|
|
@@ -292,9 +467,9 @@ var Button2 = React3.forwardRef(
|
|
|
292
467
|
Button2.displayName = "Button";
|
|
293
468
|
|
|
294
469
|
// src/components/typography/Typography.tsx
|
|
295
|
-
var
|
|
470
|
+
var React6 = __toESM(require("react"), 1);
|
|
296
471
|
var import_class_variance_authority3 = require("class-variance-authority");
|
|
297
|
-
var
|
|
472
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
298
473
|
var typographyVariants = (0, import_class_variance_authority3.cva)("", {
|
|
299
474
|
variants: {
|
|
300
475
|
variant: {
|
|
@@ -339,10 +514,10 @@ var defaultElementMap = {
|
|
|
339
514
|
mono: "p",
|
|
340
515
|
code: "span"
|
|
341
516
|
};
|
|
342
|
-
var Typography =
|
|
517
|
+
var Typography = React6.forwardRef(
|
|
343
518
|
({ className, variant = "body", color = "default", as, children, ...props }, ref) => {
|
|
344
519
|
const Component = as ?? defaultElementMap[variant ?? "body"] ?? "p";
|
|
345
|
-
return /* @__PURE__ */ (0,
|
|
520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
346
521
|
Component,
|
|
347
522
|
{
|
|
348
523
|
className: cn(typographyVariants({ variant, color }), className),
|
|
@@ -356,14 +531,14 @@ var Typography = React4.forwardRef(
|
|
|
356
531
|
Typography.displayName = "Typography";
|
|
357
532
|
|
|
358
533
|
// src/components/card/Card.tsx
|
|
359
|
-
var
|
|
534
|
+
var React8 = __toESM(require("react"), 1);
|
|
360
535
|
var import_class_variance_authority4 = require("class-variance-authority");
|
|
361
536
|
|
|
362
537
|
// src/primitives/card.tsx
|
|
363
|
-
var
|
|
364
|
-
var
|
|
365
|
-
var Card =
|
|
366
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
538
|
+
var React7 = __toESM(require("react"), 1);
|
|
539
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
540
|
+
var Card = React7.forwardRef(
|
|
541
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
367
542
|
"div",
|
|
368
543
|
{
|
|
369
544
|
ref,
|
|
@@ -373,29 +548,29 @@ var Card = React5.forwardRef(
|
|
|
373
548
|
)
|
|
374
549
|
);
|
|
375
550
|
Card.displayName = "Card";
|
|
376
|
-
var CardHeader =
|
|
377
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
551
|
+
var CardHeader = React7.forwardRef(
|
|
552
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
378
553
|
);
|
|
379
554
|
CardHeader.displayName = "CardHeader";
|
|
380
|
-
var CardTitle =
|
|
381
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
555
|
+
var CardTitle = React7.forwardRef(
|
|
556
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { ref, className: cn("text-2xl leading-none tracking-tight", className), ...props })
|
|
382
557
|
);
|
|
383
558
|
CardTitle.displayName = "CardTitle";
|
|
384
|
-
var CardDescription =
|
|
385
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
559
|
+
var CardDescription = React7.forwardRef(
|
|
560
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
386
561
|
);
|
|
387
562
|
CardDescription.displayName = "CardDescription";
|
|
388
|
-
var CardContent =
|
|
389
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
563
|
+
var CardContent = React7.forwardRef(
|
|
564
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
390
565
|
);
|
|
391
566
|
CardContent.displayName = "CardContent";
|
|
392
|
-
var CardFooter =
|
|
393
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
567
|
+
var CardFooter = React7.forwardRef(
|
|
568
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
394
569
|
);
|
|
395
570
|
CardFooter.displayName = "CardFooter";
|
|
396
571
|
|
|
397
572
|
// src/components/card/Card.tsx
|
|
398
|
-
var
|
|
573
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
399
574
|
var cardVariants = (0, import_class_variance_authority4.cva)("rounded-berget-sm", {
|
|
400
575
|
variants: {
|
|
401
576
|
variant: {
|
|
@@ -414,9 +589,9 @@ var cardVariants = (0, import_class_variance_authority4.cva)("rounded-berget-sm"
|
|
|
414
589
|
padding: "md"
|
|
415
590
|
}
|
|
416
591
|
});
|
|
417
|
-
var Card2 =
|
|
592
|
+
var Card2 = React8.forwardRef(
|
|
418
593
|
({ className, variant, padding, children, ...props }, ref) => {
|
|
419
|
-
return /* @__PURE__ */ (0,
|
|
594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
420
595
|
Card,
|
|
421
596
|
{
|
|
422
597
|
ref,
|
|
@@ -430,9 +605,9 @@ var Card2 = React6.forwardRef(
|
|
|
430
605
|
Card2.displayName = "Card";
|
|
431
606
|
|
|
432
607
|
// src/components/badge/Badge.tsx
|
|
433
|
-
var
|
|
608
|
+
var React9 = __toESM(require("react"), 1);
|
|
434
609
|
var import_class_variance_authority5 = require("class-variance-authority");
|
|
435
|
-
var
|
|
610
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
436
611
|
var badgeVariants = (0, import_class_variance_authority5.cva)(
|
|
437
612
|
"inline-flex items-center whitespace-nowrap rounded-full transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2",
|
|
438
613
|
{
|
|
@@ -465,10 +640,10 @@ var badgeVariants = (0, import_class_variance_authority5.cva)(
|
|
|
465
640
|
}
|
|
466
641
|
}
|
|
467
642
|
);
|
|
468
|
-
var Badge =
|
|
643
|
+
var Badge = React9.forwardRef(
|
|
469
644
|
({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {
|
|
470
|
-
return /* @__PURE__ */ (0,
|
|
471
|
-
icon && /* @__PURE__ */ (0,
|
|
645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: cn(badgeVariants({ variant, status, size }), className), ref, ...props, children: [
|
|
646
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: { marginRight: children ? `${iconGap * 0.25}rem` : "0" }, children: icon }),
|
|
472
647
|
children
|
|
473
648
|
] });
|
|
474
649
|
}
|
|
@@ -476,13 +651,13 @@ var Badge = React7.forwardRef(
|
|
|
476
651
|
Badge.displayName = "Badge";
|
|
477
652
|
|
|
478
653
|
// src/components/alert/Alert.tsx
|
|
479
|
-
var
|
|
654
|
+
var React11 = __toESM(require("react"), 1);
|
|
480
655
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
481
656
|
|
|
482
657
|
// src/primitives/alert.tsx
|
|
483
|
-
var
|
|
658
|
+
var React10 = __toESM(require("react"), 1);
|
|
484
659
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
485
|
-
var
|
|
660
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
486
661
|
var alertVariants = (0, import_class_variance_authority6.cva)(
|
|
487
662
|
"relative w-full rounded-lg p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",
|
|
488
663
|
{
|
|
@@ -497,17 +672,17 @@ var alertVariants = (0, import_class_variance_authority6.cva)(
|
|
|
497
672
|
}
|
|
498
673
|
}
|
|
499
674
|
);
|
|
500
|
-
var Alert =
|
|
675
|
+
var Alert = React10.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
501
676
|
Alert.displayName = "Alert";
|
|
502
|
-
var AlertTitle =
|
|
503
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
677
|
+
var AlertTitle = React10.forwardRef(
|
|
678
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h5", { ref, className: cn("mb-1 leading-none tracking-tight", className), ...props })
|
|
504
679
|
);
|
|
505
680
|
AlertTitle.displayName = "AlertTitle";
|
|
506
|
-
var AlertDescription =
|
|
681
|
+
var AlertDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props }));
|
|
507
682
|
AlertDescription.displayName = "AlertDescription";
|
|
508
683
|
|
|
509
684
|
// src/components/alert/Alert.tsx
|
|
510
|
-
var
|
|
685
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
511
686
|
var alertVariants2 = (0, import_class_variance_authority7.cva)("", {
|
|
512
687
|
variants: {
|
|
513
688
|
variant: {
|
|
@@ -522,20 +697,20 @@ var alertVariants2 = (0, import_class_variance_authority7.cva)("", {
|
|
|
522
697
|
variant: "default"
|
|
523
698
|
}
|
|
524
699
|
});
|
|
525
|
-
var Alert2 =
|
|
526
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0,
|
|
700
|
+
var Alert2 = React11.forwardRef(
|
|
701
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Alert, { ref, className: cn(alertVariants2({ variant }), className), ...props })
|
|
527
702
|
);
|
|
528
703
|
Alert2.displayName = "Alert";
|
|
529
704
|
|
|
530
705
|
// src/components/input/Input.tsx
|
|
531
|
-
var
|
|
706
|
+
var React13 = __toESM(require("react"), 1);
|
|
532
707
|
|
|
533
708
|
// src/primitives/input.tsx
|
|
534
|
-
var
|
|
535
|
-
var
|
|
536
|
-
var Input =
|
|
709
|
+
var React12 = __toESM(require("react"), 1);
|
|
710
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
711
|
+
var Input = React12.forwardRef(
|
|
537
712
|
({ className, type, ...props }, ref) => {
|
|
538
|
-
return /* @__PURE__ */ (0,
|
|
713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
539
714
|
"input",
|
|
540
715
|
{
|
|
541
716
|
type,
|
|
@@ -552,14 +727,14 @@ var Input = React10.forwardRef(
|
|
|
552
727
|
Input.displayName = "Input";
|
|
553
728
|
|
|
554
729
|
// src/components/input/Input.tsx
|
|
555
|
-
var
|
|
556
|
-
var Input2 =
|
|
730
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
731
|
+
var Input2 = React13.forwardRef(
|
|
557
732
|
({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {
|
|
558
|
-
const generatedId =
|
|
733
|
+
const generatedId = React13.useId();
|
|
559
734
|
const inputId = id || generatedId;
|
|
560
735
|
const errorId = `${inputId}-error`;
|
|
561
736
|
const descriptionId = `${inputId}-description`;
|
|
562
|
-
const inputElement = /* @__PURE__ */ (0,
|
|
737
|
+
const inputElement = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
563
738
|
Input,
|
|
564
739
|
{
|
|
565
740
|
ref,
|
|
@@ -579,8 +754,8 @@ var Input2 = React11.forwardRef(
|
|
|
579
754
|
}
|
|
580
755
|
);
|
|
581
756
|
if (!icon && !actionButton) {
|
|
582
|
-
return /* @__PURE__ */ (0,
|
|
583
|
-
label && /* @__PURE__ */ (0,
|
|
757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
758
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
584
759
|
"label",
|
|
585
760
|
{
|
|
586
761
|
htmlFor: inputId,
|
|
@@ -593,9 +768,9 @@ var Input2 = React11.forwardRef(
|
|
|
593
768
|
}
|
|
594
769
|
),
|
|
595
770
|
inputElement,
|
|
596
|
-
(description || error) && /* @__PURE__ */ (0,
|
|
597
|
-
description && /* @__PURE__ */ (0,
|
|
598
|
-
error && /* @__PURE__ */ (0,
|
|
771
|
+
(description || error) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
772
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
773
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
599
774
|
Typography,
|
|
600
775
|
{
|
|
601
776
|
variant: "xs",
|
|
@@ -607,8 +782,8 @@ var Input2 = React11.forwardRef(
|
|
|
607
782
|
] })
|
|
608
783
|
] });
|
|
609
784
|
}
|
|
610
|
-
return /* @__PURE__ */ (0,
|
|
611
|
-
label && /* @__PURE__ */ (0,
|
|
785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
786
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
612
787
|
"label",
|
|
613
788
|
{
|
|
614
789
|
htmlFor: inputId,
|
|
@@ -620,14 +795,14 @@ var Input2 = React11.forwardRef(
|
|
|
620
795
|
children: label
|
|
621
796
|
}
|
|
622
797
|
),
|
|
623
|
-
/* @__PURE__ */ (0,
|
|
624
|
-
icon && /* @__PURE__ */ (0,
|
|
798
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "relative w-full", children: [
|
|
799
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "absolute left-3 top-1/2 -translate-y-1/2", children: icon }),
|
|
625
800
|
inputElement,
|
|
626
|
-
actionButton && /* @__PURE__ */ (0,
|
|
801
|
+
actionButton && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
627
802
|
] }),
|
|
628
|
-
(description || error) && /* @__PURE__ */ (0,
|
|
629
|
-
description && /* @__PURE__ */ (0,
|
|
630
|
-
error && /* @__PURE__ */ (0,
|
|
803
|
+
(description || error) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
804
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
805
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
631
806
|
] })
|
|
632
807
|
] });
|
|
633
808
|
}
|
|
@@ -635,17 +810,17 @@ var Input2 = React11.forwardRef(
|
|
|
635
810
|
Input2.displayName = "Input";
|
|
636
811
|
|
|
637
812
|
// src/components/checkbox/Checkbox.tsx
|
|
638
|
-
var
|
|
813
|
+
var React15 = __toESM(require("react"), 1);
|
|
639
814
|
var CheckboxPrimitive2 = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
640
815
|
var import_lucide_react3 = require("lucide-react");
|
|
641
816
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
642
817
|
|
|
643
818
|
// src/primitives/checkbox.tsx
|
|
644
|
-
var
|
|
819
|
+
var React14 = __toESM(require("react"), 1);
|
|
645
820
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
646
821
|
var import_lucide_react2 = require("lucide-react");
|
|
647
|
-
var
|
|
648
|
-
var Checkbox =
|
|
822
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
823
|
+
var Checkbox = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
649
824
|
CheckboxPrimitive.Root,
|
|
650
825
|
{
|
|
651
826
|
ref,
|
|
@@ -654,23 +829,23 @@ var Checkbox = React12.forwardRef(({ className, children, ...props }, ref) => /*
|
|
|
654
829
|
className
|
|
655
830
|
),
|
|
656
831
|
...props,
|
|
657
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
832
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CheckboxPrimitive.Indicator, { className: cn("grid place-content-center"), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react2.Check, { className: "h-4 w-4" }) })
|
|
658
833
|
}
|
|
659
834
|
));
|
|
660
835
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
661
|
-
var CheckboxIndicator =
|
|
836
|
+
var CheckboxIndicator = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
662
837
|
CheckboxPrimitive.Indicator,
|
|
663
838
|
{
|
|
664
839
|
ref,
|
|
665
840
|
className: cn("grid place-content-center", className),
|
|
666
841
|
...props,
|
|
667
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
842
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react2.Check, { className: "h-4 w-4" })
|
|
668
843
|
}
|
|
669
844
|
));
|
|
670
845
|
CheckboxIndicator.displayName = CheckboxPrimitive.Indicator.displayName;
|
|
671
846
|
|
|
672
847
|
// src/components/checkbox/Checkbox.tsx
|
|
673
|
-
var
|
|
848
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
674
849
|
var checkboxVariants = (0, import_class_variance_authority8.cva)(
|
|
675
850
|
"inline-flex items-center justify-center rounded-md transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
676
851
|
{
|
|
@@ -692,13 +867,13 @@ var checkboxVariants = (0, import_class_variance_authority8.cva)(
|
|
|
692
867
|
}
|
|
693
868
|
}
|
|
694
869
|
);
|
|
695
|
-
var Checkbox2 =
|
|
870
|
+
var Checkbox2 = React15.forwardRef(
|
|
696
871
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
697
|
-
const generatedId =
|
|
872
|
+
const generatedId = React15.useId();
|
|
698
873
|
const checkboxId = id || generatedId;
|
|
699
874
|
const errorId = `${checkboxId}-error`;
|
|
700
|
-
return /* @__PURE__ */ (0,
|
|
701
|
-
/* @__PURE__ */ (0,
|
|
875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
876
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
702
877
|
Checkbox,
|
|
703
878
|
{
|
|
704
879
|
ref,
|
|
@@ -713,7 +888,7 @@ var Checkbox2 = React13.forwardRef(
|
|
|
713
888
|
className
|
|
714
889
|
),
|
|
715
890
|
...props,
|
|
716
|
-
children: /* @__PURE__ */ (0,
|
|
891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CheckboxPrimitive2.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
717
892
|
import_lucide_react3.Check,
|
|
718
893
|
{
|
|
719
894
|
className: "h-4 w-4 text-current stroke-current",
|
|
@@ -722,8 +897,8 @@ var Checkbox2 = React13.forwardRef(
|
|
|
722
897
|
) })
|
|
723
898
|
}
|
|
724
899
|
) }),
|
|
725
|
-
(label || description || error) && /* @__PURE__ */ (0,
|
|
726
|
-
label && /* @__PURE__ */ (0,
|
|
900
|
+
(label || description || error) && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
901
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
727
902
|
"label",
|
|
728
903
|
{
|
|
729
904
|
htmlFor: checkboxId,
|
|
@@ -735,8 +910,8 @@ var Checkbox2 = React13.forwardRef(
|
|
|
735
910
|
children: label
|
|
736
911
|
}
|
|
737
912
|
),
|
|
738
|
-
description && /* @__PURE__ */ (0,
|
|
739
|
-
error && /* @__PURE__ */ (0,
|
|
913
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Typography, { variant: "xs", color: "muted", children: description }),
|
|
914
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
740
915
|
] })
|
|
741
916
|
] });
|
|
742
917
|
}
|
|
@@ -744,10 +919,10 @@ var Checkbox2 = React13.forwardRef(
|
|
|
744
919
|
Checkbox2.displayName = "Checkbox";
|
|
745
920
|
|
|
746
921
|
// src/components/switch/Switch.tsx
|
|
747
|
-
var
|
|
922
|
+
var React16 = __toESM(require("react"), 1);
|
|
748
923
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
749
924
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
750
|
-
var
|
|
925
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
751
926
|
var switchRootVariants = (0, import_class_variance_authority9.cva)(
|
|
752
927
|
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
|
|
753
928
|
{
|
|
@@ -784,13 +959,13 @@ var switchThumbVariants = (0, import_class_variance_authority9.cva)(
|
|
|
784
959
|
}
|
|
785
960
|
}
|
|
786
961
|
);
|
|
787
|
-
var Switch =
|
|
962
|
+
var Switch = React16.forwardRef(
|
|
788
963
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
789
|
-
const generatedId =
|
|
964
|
+
const generatedId = React16.useId();
|
|
790
965
|
const switchId = id || generatedId;
|
|
791
966
|
const errorId = `${switchId}-error`;
|
|
792
|
-
return /* @__PURE__ */ (0,
|
|
793
|
-
/* @__PURE__ */ (0,
|
|
967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
968
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
794
969
|
SwitchPrimitives.Root,
|
|
795
970
|
{
|
|
796
971
|
ref,
|
|
@@ -804,11 +979,11 @@ var Switch = React14.forwardRef(
|
|
|
804
979
|
className
|
|
805
980
|
),
|
|
806
981
|
...props,
|
|
807
|
-
children: /* @__PURE__ */ (0,
|
|
982
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SwitchPrimitives.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
808
983
|
}
|
|
809
984
|
),
|
|
810
|
-
(label || description || error) && /* @__PURE__ */ (0,
|
|
811
|
-
label && /* @__PURE__ */ (0,
|
|
985
|
+
(label || description || error) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
986
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
812
987
|
"label",
|
|
813
988
|
{
|
|
814
989
|
htmlFor: switchId,
|
|
@@ -819,8 +994,8 @@ var Switch = React14.forwardRef(
|
|
|
819
994
|
children: label
|
|
820
995
|
}
|
|
821
996
|
),
|
|
822
|
-
description && /* @__PURE__ */ (0,
|
|
823
|
-
error && /* @__PURE__ */ (0,
|
|
997
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typography, { variant: "xs", color: "muted", children: description }),
|
|
998
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
824
999
|
] })
|
|
825
1000
|
] });
|
|
826
1001
|
}
|
|
@@ -828,17 +1003,17 @@ var Switch = React14.forwardRef(
|
|
|
828
1003
|
Switch.displayName = "Switch";
|
|
829
1004
|
|
|
830
1005
|
// src/components/select/Select.tsx
|
|
831
|
-
var
|
|
1006
|
+
var React18 = __toESM(require("react"), 1);
|
|
832
1007
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
833
1008
|
|
|
834
1009
|
// src/primitives/select.tsx
|
|
835
|
-
var
|
|
1010
|
+
var React17 = __toESM(require("react"), 1);
|
|
836
1011
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
837
1012
|
var import_lucide_react4 = require("lucide-react");
|
|
838
|
-
var
|
|
1013
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
839
1014
|
var Select = SelectPrimitive.Root;
|
|
840
1015
|
var SelectValue = SelectPrimitive.Value;
|
|
841
|
-
var SelectTrigger =
|
|
1016
|
+
var SelectTrigger = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
842
1017
|
SelectPrimitive.Trigger,
|
|
843
1018
|
{
|
|
844
1019
|
ref,
|
|
@@ -849,32 +1024,32 @@ var SelectTrigger = React15.forwardRef(({ className, children, ...props }, ref)
|
|
|
849
1024
|
...props,
|
|
850
1025
|
children: [
|
|
851
1026
|
children,
|
|
852
|
-
/* @__PURE__ */ (0,
|
|
1027
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
853
1028
|
]
|
|
854
1029
|
}
|
|
855
1030
|
));
|
|
856
1031
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
857
|
-
var SelectScrollUpButton =
|
|
1032
|
+
var SelectScrollUpButton = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
858
1033
|
SelectPrimitive.ScrollUpButton,
|
|
859
1034
|
{
|
|
860
1035
|
ref,
|
|
861
1036
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
862
1037
|
...props,
|
|
863
|
-
children: /* @__PURE__ */ (0,
|
|
1038
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react4.ChevronUp, { className: "h-4 w-4" })
|
|
864
1039
|
}
|
|
865
1040
|
));
|
|
866
1041
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
867
|
-
var SelectScrollDownButton =
|
|
1042
|
+
var SelectScrollDownButton = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
868
1043
|
SelectPrimitive.ScrollDownButton,
|
|
869
1044
|
{
|
|
870
1045
|
ref,
|
|
871
1046
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
872
1047
|
...props,
|
|
873
|
-
children: /* @__PURE__ */ (0,
|
|
1048
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4" })
|
|
874
1049
|
}
|
|
875
1050
|
));
|
|
876
1051
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
877
|
-
var SelectContent =
|
|
1052
|
+
var SelectContent = React17.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
878
1053
|
SelectPrimitive.Content,
|
|
879
1054
|
{
|
|
880
1055
|
ref,
|
|
@@ -886,8 +1061,8 @@ var SelectContent = React15.forwardRef(({ className, children, position = "poppe
|
|
|
886
1061
|
position,
|
|
887
1062
|
...props,
|
|
888
1063
|
children: [
|
|
889
|
-
/* @__PURE__ */ (0,
|
|
890
|
-
/* @__PURE__ */ (0,
|
|
1064
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectScrollUpButton, {}),
|
|
1065
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
891
1066
|
SelectPrimitive.Viewport,
|
|
892
1067
|
{
|
|
893
1068
|
className: cn(
|
|
@@ -897,12 +1072,12 @@ var SelectContent = React15.forwardRef(({ className, children, position = "poppe
|
|
|
897
1072
|
children
|
|
898
1073
|
}
|
|
899
1074
|
),
|
|
900
|
-
/* @__PURE__ */ (0,
|
|
1075
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectScrollDownButton, {})
|
|
901
1076
|
]
|
|
902
1077
|
}
|
|
903
1078
|
) }));
|
|
904
1079
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
905
|
-
var SelectLabel =
|
|
1080
|
+
var SelectLabel = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
906
1081
|
SelectPrimitive.Label,
|
|
907
1082
|
{
|
|
908
1083
|
ref,
|
|
@@ -911,7 +1086,7 @@ var SelectLabel = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
911
1086
|
}
|
|
912
1087
|
));
|
|
913
1088
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
914
|
-
var SelectItem =
|
|
1089
|
+
var SelectItem = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
915
1090
|
SelectPrimitive.Item,
|
|
916
1091
|
{
|
|
917
1092
|
ref,
|
|
@@ -921,13 +1096,13 @@ var SelectItem = React15.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
921
1096
|
),
|
|
922
1097
|
...props,
|
|
923
1098
|
children: [
|
|
924
|
-
/* @__PURE__ */ (0,
|
|
925
|
-
/* @__PURE__ */ (0,
|
|
1099
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react4.Check, { className: "h-4 w-4" }) }) }),
|
|
1100
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectPrimitive.ItemText, { children })
|
|
926
1101
|
]
|
|
927
1102
|
}
|
|
928
1103
|
));
|
|
929
1104
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
930
|
-
var SelectSeparator =
|
|
1105
|
+
var SelectSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
931
1106
|
SelectPrimitive.Separator,
|
|
932
1107
|
{
|
|
933
1108
|
ref,
|
|
@@ -938,7 +1113,7 @@ var SelectSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
938
1113
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
939
1114
|
|
|
940
1115
|
// src/components/select/Select.tsx
|
|
941
|
-
var
|
|
1116
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
942
1117
|
var selectVariants = (0, import_class_variance_authority10.cva)(
|
|
943
1118
|
"flex w-full items-center justify-between rounded-berget-xs border bg-card px-4 py-3 text-sm transition-colors duration-200 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:border-berget-form-focus-border disabled:cursor-not-allowed disabled:opacity-50",
|
|
944
1119
|
{
|
|
@@ -961,7 +1136,7 @@ var selectVariants = (0, import_class_variance_authority10.cva)(
|
|
|
961
1136
|
}
|
|
962
1137
|
}
|
|
963
1138
|
);
|
|
964
|
-
var Select2 =
|
|
1139
|
+
var Select2 = React18.forwardRef(
|
|
965
1140
|
({
|
|
966
1141
|
className,
|
|
967
1142
|
variant,
|
|
@@ -979,12 +1154,12 @@ var Select2 = React16.forwardRef(
|
|
|
979
1154
|
name,
|
|
980
1155
|
required
|
|
981
1156
|
}, ref) => {
|
|
982
|
-
const generatedId =
|
|
1157
|
+
const generatedId = React18.useId();
|
|
983
1158
|
const selectId = id || generatedId;
|
|
984
1159
|
const errorId = `${selectId}-error`;
|
|
985
1160
|
const descriptionId = `${selectId}-description`;
|
|
986
|
-
return /* @__PURE__ */ (0,
|
|
987
|
-
label && /* @__PURE__ */ (0,
|
|
1161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1162
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
988
1163
|
"label",
|
|
989
1164
|
{
|
|
990
1165
|
htmlFor: selectId,
|
|
@@ -996,7 +1171,7 @@ var Select2 = React16.forwardRef(
|
|
|
996
1171
|
children: label
|
|
997
1172
|
}
|
|
998
1173
|
),
|
|
999
|
-
/* @__PURE__ */ (0,
|
|
1174
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1000
1175
|
Select,
|
|
1001
1176
|
{
|
|
1002
1177
|
value,
|
|
@@ -1006,7 +1181,7 @@ var Select2 = React16.forwardRef(
|
|
|
1006
1181
|
name,
|
|
1007
1182
|
required,
|
|
1008
1183
|
children: [
|
|
1009
|
-
/* @__PURE__ */ (0,
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1010
1185
|
SelectTrigger,
|
|
1011
1186
|
{
|
|
1012
1187
|
ref,
|
|
@@ -1018,30 +1193,30 @@ var Select2 = React16.forwardRef(
|
|
|
1018
1193
|
error && "border-berget-destructive-foreground/50 bg-berget-destructive",
|
|
1019
1194
|
className
|
|
1020
1195
|
),
|
|
1021
|
-
children: /* @__PURE__ */ (0,
|
|
1196
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectValue, { placeholder })
|
|
1022
1197
|
}
|
|
1023
1198
|
),
|
|
1024
|
-
/* @__PURE__ */ (0,
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value)) })
|
|
1025
1200
|
]
|
|
1026
1201
|
}
|
|
1027
1202
|
),
|
|
1028
|
-
description && /* @__PURE__ */ (0,
|
|
1029
|
-
error && /* @__PURE__ */ (0,
|
|
1203
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1204
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1030
1205
|
] });
|
|
1031
1206
|
}
|
|
1032
1207
|
);
|
|
1033
1208
|
Select2.displayName = "Select";
|
|
1034
1209
|
|
|
1035
1210
|
// src/components/text-area/TextArea.tsx
|
|
1036
|
-
var
|
|
1211
|
+
var React20 = __toESM(require("react"), 1);
|
|
1037
1212
|
var import_class_variance_authority11 = require("class-variance-authority");
|
|
1038
1213
|
|
|
1039
1214
|
// src/primitives/textarea.tsx
|
|
1040
|
-
var
|
|
1041
|
-
var
|
|
1042
|
-
var Textarea =
|
|
1215
|
+
var React19 = __toESM(require("react"), 1);
|
|
1216
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1217
|
+
var Textarea = React19.forwardRef(
|
|
1043
1218
|
({ className, ...props }, ref) => {
|
|
1044
|
-
return /* @__PURE__ */ (0,
|
|
1219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1045
1220
|
"textarea",
|
|
1046
1221
|
{
|
|
1047
1222
|
className: cn(
|
|
@@ -1057,7 +1232,7 @@ var Textarea = React17.forwardRef(
|
|
|
1057
1232
|
Textarea.displayName = "Textarea";
|
|
1058
1233
|
|
|
1059
1234
|
// src/components/text-area/TextArea.tsx
|
|
1060
|
-
var
|
|
1235
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1061
1236
|
var textAreaVariants = (0, import_class_variance_authority11.cva)(
|
|
1062
1237
|
"rounded-berget-xs bg-card px-4 py-3 transition-colors duration-200 focus-visible:border-berget-form-focus-border focus-visible:ring-0 focus-visible:ring-offset-0 resize-y",
|
|
1063
1238
|
{
|
|
@@ -1080,7 +1255,7 @@ var textAreaVariants = (0, import_class_variance_authority11.cva)(
|
|
|
1080
1255
|
}
|
|
1081
1256
|
}
|
|
1082
1257
|
);
|
|
1083
|
-
var TextArea =
|
|
1258
|
+
var TextArea = React20.forwardRef(
|
|
1084
1259
|
({
|
|
1085
1260
|
className,
|
|
1086
1261
|
variant,
|
|
@@ -1100,13 +1275,13 @@ var TextArea = React18.forwardRef(
|
|
|
1100
1275
|
actionButton,
|
|
1101
1276
|
...props
|
|
1102
1277
|
}, ref) => {
|
|
1103
|
-
const generatedId =
|
|
1278
|
+
const generatedId = React20.useId();
|
|
1104
1279
|
const textareaId = id || generatedId;
|
|
1105
1280
|
const errorId = `${textareaId}-error`;
|
|
1106
1281
|
const descriptionId = `${textareaId}-description`;
|
|
1107
1282
|
const characterCount = typeof value === "string" ? value.length : 0;
|
|
1108
|
-
return /* @__PURE__ */ (0,
|
|
1109
|
-
label && /* @__PURE__ */ (0,
|
|
1283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1284
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1110
1285
|
"label",
|
|
1111
1286
|
{
|
|
1112
1287
|
htmlFor: textareaId,
|
|
@@ -1118,9 +1293,9 @@ var TextArea = React18.forwardRef(
|
|
|
1118
1293
|
children: label
|
|
1119
1294
|
}
|
|
1120
1295
|
),
|
|
1121
|
-
/* @__PURE__ */ (0,
|
|
1122
|
-
icon && /* @__PURE__ */ (0,
|
|
1123
|
-
/* @__PURE__ */ (0,
|
|
1296
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "relative", children: [
|
|
1297
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "absolute left-2 top-1/2 -translate-y-1/2", children: icon }),
|
|
1298
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1124
1299
|
Textarea,
|
|
1125
1300
|
{
|
|
1126
1301
|
ref,
|
|
@@ -1145,13 +1320,13 @@ var TextArea = React18.forwardRef(
|
|
|
1145
1320
|
...props
|
|
1146
1321
|
}
|
|
1147
1322
|
),
|
|
1148
|
-
secondaryIcon && /* @__PURE__ */ (0,
|
|
1149
|
-
actionButton && /* @__PURE__ */ (0,
|
|
1323
|
+
secondaryIcon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "absolute right-12 top-1/2 -translate-y-1/2", children: secondaryIcon }),
|
|
1324
|
+
actionButton && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
1150
1325
|
] }),
|
|
1151
|
-
(description || error || showCount && maxLength) && /* @__PURE__ */ (0,
|
|
1152
|
-
description && /* @__PURE__ */ (0,
|
|
1153
|
-
(error || showCount && maxLength) && /* @__PURE__ */ (0,
|
|
1154
|
-
showCount && maxLength && /* @__PURE__ */ (0,
|
|
1326
|
+
(description || error || showCount && maxLength) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1327
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1328
|
+
(error || showCount && maxLength) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
1329
|
+
showCount && maxLength && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1155
1330
|
Typography,
|
|
1156
1331
|
{
|
|
1157
1332
|
variant: "xs",
|
|
@@ -1165,7 +1340,7 @@ var TextArea = React18.forwardRef(
|
|
|
1165
1340
|
]
|
|
1166
1341
|
}
|
|
1167
1342
|
),
|
|
1168
|
-
error && /* @__PURE__ */ (0,
|
|
1343
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1169
1344
|
Typography,
|
|
1170
1345
|
{
|
|
1171
1346
|
variant: "xs",
|
|
@@ -1182,14 +1357,14 @@ var TextArea = React18.forwardRef(
|
|
|
1182
1357
|
TextArea.displayName = "TextArea";
|
|
1183
1358
|
|
|
1184
1359
|
// src/primitives/label.tsx
|
|
1185
|
-
var
|
|
1360
|
+
var React21 = __toESM(require("react"), 1);
|
|
1186
1361
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
1187
1362
|
var import_class_variance_authority12 = require("class-variance-authority");
|
|
1188
|
-
var
|
|
1363
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1189
1364
|
var labelVariants = (0, import_class_variance_authority12.cva)(
|
|
1190
1365
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1191
1366
|
);
|
|
1192
|
-
var Label2 =
|
|
1367
|
+
var Label2 = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
1193
1368
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
1194
1369
|
|
|
1195
1370
|
// src/primitives/field.tsx
|
|
@@ -1197,10 +1372,10 @@ var import_react = require("react");
|
|
|
1197
1372
|
var import_class_variance_authority13 = require("class-variance-authority");
|
|
1198
1373
|
|
|
1199
1374
|
// src/primitives/separator.tsx
|
|
1200
|
-
var
|
|
1375
|
+
var React22 = __toESM(require("react"), 1);
|
|
1201
1376
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
1202
|
-
var
|
|
1203
|
-
var Separator2 =
|
|
1377
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1378
|
+
var Separator2 = React22.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1204
1379
|
SeparatorPrimitive.Root,
|
|
1205
1380
|
{
|
|
1206
1381
|
ref,
|
|
@@ -1217,9 +1392,9 @@ var Separator2 = React20.forwardRef(({ className, orientation = "horizontal", de
|
|
|
1217
1392
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
1218
1393
|
|
|
1219
1394
|
// src/primitives/field.tsx
|
|
1220
|
-
var
|
|
1395
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1221
1396
|
function FieldSet({ className, ...props }) {
|
|
1222
|
-
return /* @__PURE__ */ (0,
|
|
1397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1223
1398
|
"fieldset",
|
|
1224
1399
|
{
|
|
1225
1400
|
"data-slot": "field-set",
|
|
@@ -1237,7 +1412,7 @@ function FieldLegend({
|
|
|
1237
1412
|
variant = "legend",
|
|
1238
1413
|
...props
|
|
1239
1414
|
}) {
|
|
1240
|
-
return /* @__PURE__ */ (0,
|
|
1415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1241
1416
|
"legend",
|
|
1242
1417
|
{
|
|
1243
1418
|
"data-slot": "field-legend",
|
|
@@ -1253,7 +1428,7 @@ function FieldLegend({
|
|
|
1253
1428
|
);
|
|
1254
1429
|
}
|
|
1255
1430
|
function FieldGroup({ className, ...props }) {
|
|
1256
|
-
return /* @__PURE__ */ (0,
|
|
1431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1257
1432
|
"div",
|
|
1258
1433
|
{
|
|
1259
1434
|
"data-slot": "field-group",
|
|
@@ -1290,7 +1465,7 @@ function Field({
|
|
|
1290
1465
|
orientation = "vertical",
|
|
1291
1466
|
...props
|
|
1292
1467
|
}) {
|
|
1293
|
-
return /* @__PURE__ */ (0,
|
|
1468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1294
1469
|
"div",
|
|
1295
1470
|
{
|
|
1296
1471
|
role: "group",
|
|
@@ -1302,7 +1477,7 @@ function Field({
|
|
|
1302
1477
|
);
|
|
1303
1478
|
}
|
|
1304
1479
|
function FieldContent({ className, ...props }) {
|
|
1305
|
-
return /* @__PURE__ */ (0,
|
|
1480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1306
1481
|
"div",
|
|
1307
1482
|
{
|
|
1308
1483
|
"data-slot": "field-content",
|
|
@@ -1312,12 +1487,12 @@ function FieldContent({ className, ...props }) {
|
|
|
1312
1487
|
);
|
|
1313
1488
|
}
|
|
1314
1489
|
function FieldLabel({ className, ...props }) {
|
|
1315
|
-
return /* @__PURE__ */ (0,
|
|
1490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1316
1491
|
Label2,
|
|
1317
1492
|
{
|
|
1318
1493
|
"data-slot": "field-label",
|
|
1319
1494
|
className: cn(
|
|
1320
|
-
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:
|
|
1495
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug text-berget-foreground group-data-[disabled=true]/field:text-berget-muted-foreground",
|
|
1321
1496
|
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4",
|
|
1322
1497
|
"has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
|
|
1323
1498
|
className
|
|
@@ -1327,7 +1502,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
1327
1502
|
);
|
|
1328
1503
|
}
|
|
1329
1504
|
function FieldTitle({ className, ...props }) {
|
|
1330
|
-
return /* @__PURE__ */ (0,
|
|
1505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1331
1506
|
"div",
|
|
1332
1507
|
{
|
|
1333
1508
|
"data-slot": "field-label",
|
|
@@ -1340,12 +1515,12 @@ function FieldTitle({ className, ...props }) {
|
|
|
1340
1515
|
);
|
|
1341
1516
|
}
|
|
1342
1517
|
function FieldDescription({ className, ...props }) {
|
|
1343
|
-
return /* @__PURE__ */ (0,
|
|
1518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1344
1519
|
"p",
|
|
1345
1520
|
{
|
|
1346
1521
|
"data-slot": "field-description",
|
|
1347
1522
|
className: cn(
|
|
1348
|
-
"text-muted-foreground text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
1523
|
+
"text-berget-muted-foreground text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
1349
1524
|
"nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5",
|
|
1350
1525
|
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
1351
1526
|
className
|
|
@@ -1359,7 +1534,7 @@ function FieldSeparator({
|
|
|
1359
1534
|
className,
|
|
1360
1535
|
...props
|
|
1361
1536
|
}) {
|
|
1362
|
-
return /* @__PURE__ */ (0,
|
|
1537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1363
1538
|
"div",
|
|
1364
1539
|
{
|
|
1365
1540
|
"data-slot": "field-separator",
|
|
@@ -1370,11 +1545,11 @@ function FieldSeparator({
|
|
|
1370
1545
|
),
|
|
1371
1546
|
...props,
|
|
1372
1547
|
children: [
|
|
1373
|
-
/* @__PURE__ */ (0,
|
|
1374
|
-
children && /* @__PURE__ */ (0,
|
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
1549
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1375
1550
|
"span",
|
|
1376
1551
|
{
|
|
1377
|
-
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
1552
|
+
className: "bg-berget-background text-berget-muted-foreground relative mx-auto block w-fit px-2",
|
|
1378
1553
|
"data-slot": "field-separator-content",
|
|
1379
1554
|
children
|
|
1380
1555
|
}
|
|
@@ -1399,12 +1574,12 @@ function FieldError({
|
|
|
1399
1574
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
1400
1575
|
return errors[0].message;
|
|
1401
1576
|
}
|
|
1402
|
-
return /* @__PURE__ */ (0,
|
|
1577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map((error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("li", { children: error.message }, index)) });
|
|
1403
1578
|
}, [children, errors]);
|
|
1404
1579
|
if (!content) {
|
|
1405
1580
|
return null;
|
|
1406
1581
|
}
|
|
1407
|
-
return /* @__PURE__ */ (0,
|
|
1582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1408
1583
|
"div",
|
|
1409
1584
|
{
|
|
1410
1585
|
role: "alert",
|
|
@@ -1417,10 +1592,10 @@ function FieldError({
|
|
|
1417
1592
|
}
|
|
1418
1593
|
|
|
1419
1594
|
// src/components/link/Link.tsx
|
|
1420
|
-
var
|
|
1595
|
+
var React23 = __toESM(require("react"), 1);
|
|
1421
1596
|
var import_class_variance_authority14 = require("class-variance-authority");
|
|
1422
1597
|
var import_lucide_react5 = require("lucide-react");
|
|
1423
|
-
var
|
|
1598
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1424
1599
|
var linkVariants = (0, import_class_variance_authority14.cva)(
|
|
1425
1600
|
"inline-flex items-center gap-2 transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
|
|
1426
1601
|
{
|
|
@@ -1445,7 +1620,7 @@ var linkVariants = (0, import_class_variance_authority14.cva)(
|
|
|
1445
1620
|
}
|
|
1446
1621
|
}
|
|
1447
1622
|
);
|
|
1448
|
-
var Link =
|
|
1623
|
+
var Link = React23.forwardRef(
|
|
1449
1624
|
({
|
|
1450
1625
|
className,
|
|
1451
1626
|
variant,
|
|
@@ -1458,7 +1633,7 @@ var Link = React21.forwardRef(
|
|
|
1458
1633
|
...props
|
|
1459
1634
|
}, ref) => {
|
|
1460
1635
|
const isExternal = external || typeof props.href === "string" && (props.href.startsWith("http://") || props.href.startsWith("https://") || props.href.startsWith("mailto:") || props.href.startsWith("tel:"));
|
|
1461
|
-
return /* @__PURE__ */ (0,
|
|
1636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1462
1637
|
"a",
|
|
1463
1638
|
{
|
|
1464
1639
|
ref,
|
|
@@ -1474,8 +1649,8 @@ var Link = React21.forwardRef(
|
|
|
1474
1649
|
},
|
|
1475
1650
|
children: [
|
|
1476
1651
|
children,
|
|
1477
|
-
icon && /* @__PURE__ */ (0,
|
|
1478
|
-
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ (0,
|
|
1652
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "inline-flex items-center", children: icon }),
|
|
1653
|
+
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { icon: import_lucide_react5.ExternalLink, size: 16 }) })
|
|
1479
1654
|
]
|
|
1480
1655
|
}
|
|
1481
1656
|
);
|
|
@@ -1484,14 +1659,14 @@ var Link = React21.forwardRef(
|
|
|
1484
1659
|
Link.displayName = "Link";
|
|
1485
1660
|
|
|
1486
1661
|
// src/components/section/Section.tsx
|
|
1487
|
-
var
|
|
1662
|
+
var React25 = __toESM(require("react"), 1);
|
|
1488
1663
|
var import_class_variance_authority16 = require("class-variance-authority");
|
|
1489
1664
|
|
|
1490
1665
|
// src/components/container/Container.tsx
|
|
1491
|
-
var
|
|
1666
|
+
var React24 = __toESM(require("react"), 1);
|
|
1492
1667
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
1493
1668
|
var import_class_variance_authority15 = require("class-variance-authority");
|
|
1494
|
-
var
|
|
1669
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1495
1670
|
var containerVariants = (0, import_class_variance_authority15.cva)("w-full mx-auto", {
|
|
1496
1671
|
variants: {
|
|
1497
1672
|
size: {
|
|
@@ -1513,10 +1688,10 @@ var containerVariants = (0, import_class_variance_authority15.cva)("w-full mx-au
|
|
|
1513
1688
|
padding: "md"
|
|
1514
1689
|
}
|
|
1515
1690
|
});
|
|
1516
|
-
var Container =
|
|
1691
|
+
var Container = React24.forwardRef(
|
|
1517
1692
|
({ className, size, padding, asChild = false, children, ...props }, ref) => {
|
|
1518
1693
|
const Component = asChild ? import_react_slot2.Slot : "div";
|
|
1519
|
-
return /* @__PURE__ */ (0,
|
|
1694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1520
1695
|
Component,
|
|
1521
1696
|
{
|
|
1522
1697
|
ref,
|
|
@@ -1530,7 +1705,7 @@ var Container = React22.forwardRef(
|
|
|
1530
1705
|
Container.displayName = "Container";
|
|
1531
1706
|
|
|
1532
1707
|
// src/components/section/Section.tsx
|
|
1533
|
-
var
|
|
1708
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1534
1709
|
var sectionVariants = (0, import_class_variance_authority16.cva)("relative", {
|
|
1535
1710
|
variants: {
|
|
1536
1711
|
padding: {
|
|
@@ -1550,15 +1725,15 @@ var sectionVariants = (0, import_class_variance_authority16.cva)("relative", {
|
|
|
1550
1725
|
background: "transparent"
|
|
1551
1726
|
}
|
|
1552
1727
|
});
|
|
1553
|
-
var Section =
|
|
1728
|
+
var Section = React25.forwardRef(
|
|
1554
1729
|
({ className, padding, background, children, ...props }, ref) => {
|
|
1555
|
-
return /* @__PURE__ */ (0,
|
|
1730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1556
1731
|
"section",
|
|
1557
1732
|
{
|
|
1558
1733
|
ref,
|
|
1559
1734
|
className: cn(sectionVariants({ padding, background }), className),
|
|
1560
1735
|
...props,
|
|
1561
|
-
children: /* @__PURE__ */ (0,
|
|
1736
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Container, { children })
|
|
1562
1737
|
}
|
|
1563
1738
|
);
|
|
1564
1739
|
}
|
|
@@ -1566,9 +1741,9 @@ var Section = React23.forwardRef(
|
|
|
1566
1741
|
Section.displayName = "Section";
|
|
1567
1742
|
|
|
1568
1743
|
// src/components/section-header/SectionHeader.tsx
|
|
1569
|
-
var
|
|
1570
|
-
var
|
|
1571
|
-
var SectionHeader =
|
|
1744
|
+
var React26 = __toESM(require("react"), 1);
|
|
1745
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1746
|
+
var SectionHeader = React26.forwardRef(
|
|
1572
1747
|
({
|
|
1573
1748
|
className,
|
|
1574
1749
|
title,
|
|
@@ -1580,22 +1755,22 @@ var SectionHeader = React24.forwardRef(
|
|
|
1580
1755
|
id,
|
|
1581
1756
|
...props
|
|
1582
1757
|
}, ref) => {
|
|
1583
|
-
return /* @__PURE__ */ (0,
|
|
1758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1584
1759
|
"div",
|
|
1585
1760
|
{
|
|
1586
1761
|
id,
|
|
1587
1762
|
ref,
|
|
1588
1763
|
className: cn("w-full px-fluid-md py-fluid-xl text-center", className),
|
|
1589
1764
|
...props,
|
|
1590
|
-
children: /* @__PURE__ */ (0,
|
|
1591
|
-
/* @__PURE__ */ (0,
|
|
1592
|
-
tagline && /* @__PURE__ */ (0,
|
|
1593
|
-
/* @__PURE__ */ (0,
|
|
1594
|
-
/* @__PURE__ */ (0,
|
|
1595
|
-
description && /* @__PURE__ */ (0,
|
|
1765
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col items-center gap-fluid-lg", children: [
|
|
1766
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "max-w-3xl mx-auto flex flex-col items-center gap-fluid-lg", children: [
|
|
1767
|
+
tagline && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Badge, { variant: "default", className: "text-sm", children: tagline }),
|
|
1768
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col items-center gap-fluid-sm", children: [
|
|
1769
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Typography, { variant: headingLevel, children: title }),
|
|
1770
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Typography, { variant: descriptionVariant, color: "muted", children: description })
|
|
1596
1771
|
] })
|
|
1597
1772
|
] }),
|
|
1598
|
-
action && /* @__PURE__ */ (0,
|
|
1773
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mt-4", children: action })
|
|
1599
1774
|
] })
|
|
1600
1775
|
}
|
|
1601
1776
|
);
|
|
@@ -1604,10 +1779,10 @@ var SectionHeader = React24.forwardRef(
|
|
|
1604
1779
|
SectionHeader.displayName = "SectionHeader";
|
|
1605
1780
|
|
|
1606
1781
|
// src/components/grid/Grid.tsx
|
|
1607
|
-
var
|
|
1782
|
+
var React27 = __toESM(require("react"), 1);
|
|
1608
1783
|
var import_class_variance_authority17 = require("class-variance-authority");
|
|
1609
1784
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
1610
|
-
var
|
|
1785
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1611
1786
|
var gridVariants = (0, import_class_variance_authority17.cva)("grid", {
|
|
1612
1787
|
variants: {
|
|
1613
1788
|
align: {
|
|
@@ -1630,10 +1805,10 @@ var gridVariants = (0, import_class_variance_authority17.cva)("grid", {
|
|
|
1630
1805
|
justify: "start"
|
|
1631
1806
|
}
|
|
1632
1807
|
});
|
|
1633
|
-
var Grid =
|
|
1808
|
+
var Grid = React27.forwardRef(
|
|
1634
1809
|
({ className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props }, ref) => {
|
|
1635
1810
|
const Component = asChild ? import_react_slot3.Slot : "div";
|
|
1636
|
-
return /* @__PURE__ */ (0,
|
|
1811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1637
1812
|
Component,
|
|
1638
1813
|
{
|
|
1639
1814
|
ref,
|
|
@@ -1655,10 +1830,10 @@ var Grid = React25.forwardRef(
|
|
|
1655
1830
|
Grid.displayName = "Grid";
|
|
1656
1831
|
|
|
1657
1832
|
// src/components/box/Box.tsx
|
|
1658
|
-
var
|
|
1833
|
+
var React28 = __toESM(require("react"), 1);
|
|
1659
1834
|
var import_class_variance_authority18 = require("class-variance-authority");
|
|
1660
1835
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
1661
|
-
var
|
|
1836
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1662
1837
|
var boxVariants = (0, import_class_variance_authority18.cva)("flex", {
|
|
1663
1838
|
variants: {
|
|
1664
1839
|
direction: {
|
|
@@ -1695,10 +1870,10 @@ var boxVariants = (0, import_class_variance_authority18.cva)("flex", {
|
|
|
1695
1870
|
wrap: "nowrap"
|
|
1696
1871
|
}
|
|
1697
1872
|
});
|
|
1698
|
-
var Box =
|
|
1873
|
+
var Box = React28.forwardRef(
|
|
1699
1874
|
({ className, direction, align, justify, wrap, gap, asChild = false, children, ...props }, ref) => {
|
|
1700
1875
|
const Component = asChild ? import_react_slot4.Slot : "div";
|
|
1701
|
-
return /* @__PURE__ */ (0,
|
|
1876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1702
1877
|
Component,
|
|
1703
1878
|
{
|
|
1704
1879
|
ref,
|
|
@@ -1716,16 +1891,16 @@ var Box = React26.forwardRef(
|
|
|
1716
1891
|
Box.displayName = "Box";
|
|
1717
1892
|
|
|
1718
1893
|
// src/components/berget-logo/BergetLogo.tsx
|
|
1719
|
-
var
|
|
1720
|
-
var
|
|
1721
|
-
var BergetLogo =
|
|
1722
|
-
({ variant = "logotype", color = "
|
|
1723
|
-
const fillColor = color === "white" ? "var(--berget-logo-light)" : "var(--berget-logo-dark)";
|
|
1894
|
+
var React29 = __toESM(require("react"), 1);
|
|
1895
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1896
|
+
var BergetLogo = React29.forwardRef(
|
|
1897
|
+
({ variant = "logotype", color = "auto", size = 48, className, ...props }, ref) => {
|
|
1898
|
+
const fillColor = color === "auto" ? "var(--berget-logo-light)" : color === "white" ? "var(--berget-logo-light)" : "var(--berget-logo-dark)";
|
|
1724
1899
|
if (variant === "symbol") {
|
|
1725
1900
|
const aspectRatio2 = 463 / 419;
|
|
1726
1901
|
const width2 = size * aspectRatio2;
|
|
1727
1902
|
const height2 = size;
|
|
1728
|
-
return /* @__PURE__ */ (0,
|
|
1903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1729
1904
|
"svg",
|
|
1730
1905
|
{
|
|
1731
1906
|
ref,
|
|
@@ -1738,7 +1913,7 @@ var BergetLogo = React27.forwardRef(
|
|
|
1738
1913
|
"aria-label": "Berget symbol",
|
|
1739
1914
|
className: cn("inline-block", className),
|
|
1740
1915
|
...props,
|
|
1741
|
-
children: /* @__PURE__ */ (0,
|
|
1916
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1742
1917
|
"path",
|
|
1743
1918
|
{
|
|
1744
1919
|
d: "M208.739 17L255.261 17L446 403L398 403L313.5 255L261.5 176L233.163 96.1677L237.815 98.6522H226.185L230.837 96.1677L113 331L64.5 403L18 403L208.739 17Z",
|
|
@@ -1751,7 +1926,7 @@ var BergetLogo = React27.forwardRef(
|
|
|
1751
1926
|
const aspectRatio = 793.63 / 204.37;
|
|
1752
1927
|
const width = size * aspectRatio;
|
|
1753
1928
|
const height = size;
|
|
1754
|
-
return /* @__PURE__ */ (0,
|
|
1929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1755
1930
|
"svg",
|
|
1756
1931
|
{
|
|
1757
1932
|
ref,
|
|
@@ -1765,59 +1940,59 @@ var BergetLogo = React27.forwardRef(
|
|
|
1765
1940
|
className: cn("inline-block", className),
|
|
1766
1941
|
...props,
|
|
1767
1942
|
children: [
|
|
1768
|
-
/* @__PURE__ */ (0,
|
|
1769
|
-
/* @__PURE__ */ (0,
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("g", { style: { fill: fillColor }, children: [
|
|
1944
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1770
1945
|
"path",
|
|
1771
1946
|
{
|
|
1772
1947
|
className: "berget-logotype-fill",
|
|
1773
1948
|
d: "M268.78,172.54v-96.04h37.74c10.39,0,18.26,2.33,23.6,7,5.33,4.67,8.01,10.52,8.01,17.56,0,6.13-1.72,11-5.15,14.61-3.43,3.61-7.58,6.06-12.44,7.34,3.81.73,7.22,2.2,10.22,4.39,3.01,2.2,5.36,4.94,7.08,8.23,1.72,3.29,2.58,6.86,2.58,10.7,0,4.94-1.27,9.4-3.79,13.38-2.53,3.98-6.22,7.11-11.08,9.4-4.86,2.29-10.82,3.43-17.87,3.43h-38.89ZM283.93,117.66h20.74c5.81,0,10.24-1.3,13.29-3.91,3.05-2.61,4.58-6.19,4.58-10.77s-1.51-8.05-4.51-10.7c-3-2.65-7.55-3.98-13.65-3.98h-20.45v29.36ZM283.93,160.61h21.74c6.1,0,10.84-1.37,14.22-4.11,3.38-2.75,5.08-6.59,5.08-11.53s-1.76-8.85-5.29-11.73-8.29-4.32-14.3-4.32h-21.45v31.69Z"
|
|
1774
1949
|
}
|
|
1775
1950
|
),
|
|
1776
|
-
/* @__PURE__ */ (0,
|
|
1951
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1777
1952
|
"path",
|
|
1778
1953
|
{
|
|
1779
1954
|
className: "berget-logotype-fill",
|
|
1780
1955
|
d: "M382.45,174.19c-6.96,0-13.13-1.49-18.52-4.46-5.39-2.97-9.6-7.11-12.65-12.42-3.05-5.3-4.57-11.48-4.57-18.52s1.5-13.4,4.5-18.79,7.19-9.61,12.58-12.62c5.39-3.02,11.65-4.53,18.81-4.53s13,1.48,18.15,4.46c5.15,2.97,9.16,6.93,12.01,11.87,2.86,4.94,4.29,10.38,4.29,16.33,0,.92-.02,1.9-.07,2.95-.05,1.05-.12,2.22-.22,3.5h-55.19c.48,6.59,2.75,11.59,6.79,15.02,4.05,3.43,8.75,5.14,14.09,5.14,4.29,0,7.89-.93,10.79-2.81,2.91-1.88,5.08-4.41,6.51-7.61h15.16c-1.91,6.4-5.7,11.75-11.37,16.05-5.68,4.3-12.71,6.45-21.09,6.45ZM382.45,114.78c-5.05,0-9.54,1.44-13.44,4.32-3.91,2.88-6.29,7.2-7.15,12.97h40.04c-.29-5.3-2.24-9.51-5.87-12.62-3.62-3.11-8.15-4.67-13.58-4.67Z"
|
|
1781
1956
|
}
|
|
1782
1957
|
),
|
|
1783
|
-
/* @__PURE__ */ (0,
|
|
1958
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1784
1959
|
"path",
|
|
1785
1960
|
{
|
|
1786
1961
|
className: "berget-logotype-fill",
|
|
1787
1962
|
d: "M425.62,172.54v-68.05h13.59l1.29,12.9c2.47-4.48,5.93-8.03,10.37-10.63,4.43-2.61,9.79-3.91,16.08-3.91v15.23h-4.15c-4.19,0-7.93.67-11.22,1.99-3.29,1.33-5.91,3.57-7.86,6.72-1.96,3.16-2.93,7.53-2.93,13.1v32.65h-15.16Z"
|
|
1788
1963
|
}
|
|
1789
1964
|
),
|
|
1790
|
-
/* @__PURE__ */ (0,
|
|
1965
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1791
1966
|
"path",
|
|
1792
1967
|
{
|
|
1793
1968
|
className: "berget-logotype-fill",
|
|
1794
1969
|
d: "M500.25,151.69c-3.72,0-7.14-.41-10.29-1.24l-6.15,5.76c1.05.64,2.34,1.19,3.86,1.65,1.52.46,3.66.87,6.43,1.23,2.76.37,6.53.73,11.29,1.1,9.43.82,16.25,3,20.44,6.52,4.2,3.52,6.29,8.21,6.29,14.06,0,4.02-1.12,7.84-3.35,11.45-2.24,3.61-5.72,6.54-10.44,8.78s-10.74,3.36-18.09,3.36c-9.91,0-17.94-1.8-24.09-5.42-6.15-3.62-9.22-9.08-9.22-16.4,0-2.84.78-5.65,2.35-8.44,1.57-2.79,4.08-5.42,7.51-7.89-2-.83-3.74-1.72-5.22-2.68-1.48-.96-2.79-1.94-3.94-2.95v-3.29l12.3-12.07c-5.53-4.57-8.29-10.56-8.29-17.97,0-4.48,1.12-8.58,3.36-12.28,2.24-3.7,5.5-6.65,9.79-8.85,4.29-2.2,9.43-3.29,15.44-3.29,4.01,0,7.72.55,11.15,1.64h26.45v9.6l-12.58.69c2.28,3.75,3.43,7.91,3.43,12.49s-1.13,8.69-3.36,12.35c-2.24,3.66-5.48,6.59-9.72,8.78-4.25,2.2-9.37,3.29-15.37,3.29ZM481.24,181.19c0,3.93,1.81,6.88,5.44,8.85,3.62,1.97,8.15,2.95,13.58,2.95s9.48-1.07,12.72-3.22c3.24-2.15,4.86-5,4.86-8.57,0-2.65-1.09-4.92-3.29-6.79-2.19-1.87-6.34-3.04-12.44-3.5-4.57-.27-8.63-.68-12.15-1.23-3.34,1.74-5.63,3.61-6.86,5.63-1.25,2.01-1.86,3.98-1.86,5.9ZM500.25,140.3c4.38,0,7.93-1.12,10.66-3.36,2.71-2.24,4.07-5.42,4.07-9.53s-1.36-7.41-4.07-9.6c-2.72-2.2-6.27-3.29-10.66-3.29s-8.08,1.1-10.79,3.29c-2.71,2.2-4.08,5.4-4.08,9.6s1.36,7.3,4.08,9.53c2.71,2.24,6.31,3.36,10.79,3.36Z"
|
|
1795
1970
|
}
|
|
1796
1971
|
),
|
|
1797
|
-
/* @__PURE__ */ (0,
|
|
1972
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1798
1973
|
"path",
|
|
1799
1974
|
{
|
|
1800
1975
|
className: "berget-logotype-fill",
|
|
1801
1976
|
d: "M574.61,174.19c-6.96,0-13.13-1.49-18.52-4.46-5.39-2.97-9.6-7.11-12.65-12.42-3.05-5.3-4.57-11.48-4.57-18.52s1.5-13.4,4.5-18.79c3-5.4,7.19-9.61,12.58-12.62c5.39-3.02,11.65-4.53,18.81-4.53s13,1.48,18.15,4.46c5.15,2.97,9.16,6.93,12.01,11.87,2.86,4.94,4.29,10.38,4.29,16.33,0,.92-.02,1.9-.07,2.95-.05,1.05-.12,2.22-.22,3.5h-55.19c.48,6.59,2.75,11.59,6.79,15.02,4.05,3.43,8.75,5.14,14.09,5.14,4.29,0,7.89-.93,10.79-2.81s5.08-4.41,6.51-7.61h15.16c-1.91,6.4-5.7,11.75-11.37,16.05-5.68,4.3-12.71,6.45-21.09,6.45ZM574.61,114.78c-5.05,0-9.54,1.44-13.44,4.32-3.91,2.88-6.29,7.2-7.15,12.97h40.04c-.29-5.3-2.24-9.51-5.87-12.62-3.62-3.11-8.15-4.67-13.58-4.67Z"
|
|
1802
1977
|
}
|
|
1803
1978
|
),
|
|
1804
|
-
/* @__PURE__ */ (0,
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1805
1980
|
"path",
|
|
1806
1981
|
{
|
|
1807
1982
|
className: "berget-logotype-fill",
|
|
1808
1983
|
d: "M646.23,172.54c-6.96,0-12.49-1.62-16.59-4.87-4.1-3.25-6.15-9.03-6.15-17.36v-33.61h-12.16v-12.21h12.16l1.86-17.29h13.29v17.29h20.02v12.21h-20.02v33.61c0,3.75.84,6.33,2.51,7.75,1.67,1.42,4.55,2.13,8.65,2.13h8.14v12.35h-11.72Z"
|
|
1809
1984
|
}
|
|
1810
1985
|
),
|
|
1811
|
-
/* @__PURE__ */ (0,
|
|
1986
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1812
1987
|
"path",
|
|
1813
1988
|
{
|
|
1814
1989
|
className: "berget-logotype-fill",
|
|
1815
1990
|
d: "M684.4,172.54l36.89-96.04h16.59l36.6,96.04h-16.01l-8.58-23.46h-40.88l-8.58,23.46h-16.01ZM713.28,137.56h32.31l-16.16-43.77-16.16,43.77Z"
|
|
1816
1991
|
}
|
|
1817
1992
|
),
|
|
1818
|
-
/* @__PURE__ */ (0,
|
|
1993
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { className: "berget-logotype-fill", d: "M778.48,172.54v-96.04h15.15v96.04h-15.15Z" })
|
|
1819
1994
|
] }),
|
|
1820
|
-
/* @__PURE__ */ (0,
|
|
1995
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1821
1996
|
"path",
|
|
1822
1997
|
{
|
|
1823
1998
|
style: { fill: fillColor },
|
|
@@ -1832,18 +2007,18 @@ var BergetLogo = React27.forwardRef(
|
|
|
1832
2007
|
BergetLogo.displayName = "BergetLogo";
|
|
1833
2008
|
|
|
1834
2009
|
// src/components/header/Header.tsx
|
|
1835
|
-
var
|
|
2010
|
+
var React31 = __toESM(require("react"), 1);
|
|
1836
2011
|
var import_class_variance_authority19 = require("class-variance-authority");
|
|
1837
2012
|
var import_lucide_react7 = require("lucide-react");
|
|
1838
2013
|
|
|
1839
2014
|
// src/components/language-select/LanguageSelect.tsx
|
|
1840
|
-
var
|
|
2015
|
+
var React30 = __toESM(require("react"), 1);
|
|
1841
2016
|
var SelectPrimitive2 = __toESM(require("@radix-ui/react-select"), 1);
|
|
1842
2017
|
var import_lucide_react6 = require("lucide-react");
|
|
1843
|
-
var
|
|
1844
|
-
var LanguageSelect =
|
|
1845
|
-
return /* @__PURE__ */ (0,
|
|
1846
|
-
/* @__PURE__ */ (0,
|
|
2018
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2019
|
+
var LanguageSelect = React30.forwardRef(({ className, options, value, onValueChange }, ref) => {
|
|
2020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(SelectPrimitive2.Root, { value, onValueChange, children: [
|
|
2021
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1847
2022
|
SelectPrimitive2.Trigger,
|
|
1848
2023
|
{
|
|
1849
2024
|
ref,
|
|
@@ -1864,10 +2039,10 @@ var LanguageSelect = React28.forwardRef(({ className, options, value, onValueCha
|
|
|
1864
2039
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1865
2040
|
className
|
|
1866
2041
|
),
|
|
1867
|
-
children: /* @__PURE__ */ (0,
|
|
2042
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { icon: import_lucide_react6.Globe, size: 16 })
|
|
1868
2043
|
}
|
|
1869
2044
|
),
|
|
1870
|
-
/* @__PURE__ */ (0,
|
|
2045
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1871
2046
|
SelectPrimitive2.Content,
|
|
1872
2047
|
{
|
|
1873
2048
|
className: cn(
|
|
@@ -1895,7 +2070,7 @@ var LanguageSelect = React28.forwardRef(({ className, options, value, onValueCha
|
|
|
1895
2070
|
"origin-[--radix-select-content-transform-origin]"
|
|
1896
2071
|
),
|
|
1897
2072
|
position: "popper",
|
|
1898
|
-
children: /* @__PURE__ */ (0,
|
|
2073
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive2.Viewport, { className: "p-1", children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1899
2074
|
SelectPrimitive2.Item,
|
|
1900
2075
|
{
|
|
1901
2076
|
value: option.value,
|
|
@@ -1912,7 +2087,7 @@ var LanguageSelect = React28.forwardRef(({ className, options, value, onValueCha
|
|
|
1912
2087
|
// Disabled state
|
|
1913
2088
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
1914
2089
|
),
|
|
1915
|
-
children: /* @__PURE__ */ (0,
|
|
2090
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive2.ItemText, { children: option.label })
|
|
1916
2091
|
},
|
|
1917
2092
|
option.value
|
|
1918
2093
|
)) })
|
|
@@ -1923,7 +2098,7 @@ var LanguageSelect = React28.forwardRef(({ className, options, value, onValueCha
|
|
|
1923
2098
|
LanguageSelect.displayName = "LanguageSelect";
|
|
1924
2099
|
|
|
1925
2100
|
// src/components/header/Header.tsx
|
|
1926
|
-
var
|
|
2101
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1927
2102
|
var headerVariants = (0, import_class_variance_authority19.cva)(
|
|
1928
2103
|
"sticky top-0 z-50 header-backdrop backdrop-blur-xl border-b border-berget-border transition-all duration-200",
|
|
1929
2104
|
{
|
|
@@ -1938,18 +2113,18 @@ var headerVariants = (0, import_class_variance_authority19.cva)(
|
|
|
1938
2113
|
}
|
|
1939
2114
|
}
|
|
1940
2115
|
);
|
|
1941
|
-
var HeaderContext =
|
|
2116
|
+
var HeaderContext = React31.createContext({
|
|
1942
2117
|
isMobileMenuOpen: false,
|
|
1943
2118
|
setIsMobileMenuOpen: () => {
|
|
1944
2119
|
}
|
|
1945
2120
|
});
|
|
1946
|
-
var useHeaderContext = () =>
|
|
1947
|
-
var HeaderLogo =
|
|
1948
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2121
|
+
var useHeaderContext = () => React31.useContext(HeaderContext);
|
|
2122
|
+
var HeaderLogo = React31.forwardRef(
|
|
2123
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { ref, className: cn("flex items-center", className), ...props, children })
|
|
1949
2124
|
);
|
|
1950
2125
|
HeaderLogo.displayName = "HeaderLogo";
|
|
1951
|
-
var HeaderNav =
|
|
1952
|
-
return /* @__PURE__ */ (0,
|
|
2126
|
+
var HeaderNav = React31.forwardRef(({ className, links, ...props }, ref) => {
|
|
2127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("nav", { ref, className: cn("hidden md:flex items-center gap-fluid-lg", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: "flex items-center gap-fluid-lg", children: links.map((link) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1953
2128
|
Link,
|
|
1954
2129
|
{
|
|
1955
2130
|
href: link.href,
|
|
@@ -1957,14 +2132,14 @@ var HeaderNav = React29.forwardRef(({ className, links, ...props }, ref) => {
|
|
|
1957
2132
|
size: "sm",
|
|
1958
2133
|
className: cn("relative transition-all duration-200", link.active && "font-medium"),
|
|
1959
2134
|
children: [
|
|
1960
|
-
link.icon && /* @__PURE__ */ (0,
|
|
2135
|
+
link.icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { icon: link.icon, size: 16 }) }),
|
|
1961
2136
|
link.label
|
|
1962
2137
|
]
|
|
1963
2138
|
}
|
|
1964
2139
|
) }, link.href)) }) });
|
|
1965
2140
|
});
|
|
1966
2141
|
HeaderNav.displayName = "HeaderNav";
|
|
1967
|
-
var HeaderActions =
|
|
2142
|
+
var HeaderActions = React31.forwardRef(
|
|
1968
2143
|
({
|
|
1969
2144
|
className,
|
|
1970
2145
|
languageOptions,
|
|
@@ -1974,8 +2149,8 @@ var HeaderActions = React29.forwardRef(
|
|
|
1974
2149
|
ctaButton,
|
|
1975
2150
|
...props
|
|
1976
2151
|
}, ref) => {
|
|
1977
|
-
return /* @__PURE__ */ (0,
|
|
1978
|
-
languageOptions.length > 0 && /* @__PURE__ */ (0,
|
|
2152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { ref, className: cn("hidden md:flex items-center gap-2", className), ...props, children: [
|
|
2153
|
+
languageOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1979
2154
|
LanguageSelect,
|
|
1980
2155
|
{
|
|
1981
2156
|
options: languageOptions,
|
|
@@ -1989,16 +2164,16 @@ var HeaderActions = React29.forwardRef(
|
|
|
1989
2164
|
}
|
|
1990
2165
|
);
|
|
1991
2166
|
HeaderActions.displayName = "HeaderActions";
|
|
1992
|
-
var MobileMenuButton =
|
|
2167
|
+
var MobileMenuButton = React31.forwardRef(({ className, ...props }, ref) => {
|
|
1993
2168
|
const { isMobileMenuOpen, setIsMobileMenuOpen } = useHeaderContext();
|
|
1994
|
-
return /* @__PURE__ */ (0,
|
|
2169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1995
2170
|
"button",
|
|
1996
2171
|
{
|
|
1997
2172
|
ref,
|
|
1998
2173
|
className: cn(
|
|
1999
2174
|
"md:hidden flex items-center justify-center w-8 h-8 rounded-full",
|
|
2000
2175
|
"cursor-pointer transition-all duration-200",
|
|
2001
|
-
"hover:bg-berget-surface-hover
|
|
2176
|
+
"hover:bg-berget-surface-hover",
|
|
2002
2177
|
className
|
|
2003
2178
|
),
|
|
2004
2179
|
onClick: () => setIsMobileMenuOpen(!isMobileMenuOpen),
|
|
@@ -2006,12 +2181,12 @@ var MobileMenuButton = React29.forwardRef(({ className, ...props }, ref) => {
|
|
|
2006
2181
|
"aria-expanded": isMobileMenuOpen,
|
|
2007
2182
|
"aria-controls": "mobile-menu",
|
|
2008
2183
|
...props,
|
|
2009
|
-
children: isMobileMenuOpen ? /* @__PURE__ */ (0,
|
|
2184
|
+
children: isMobileMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { icon: import_lucide_react7.X, size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { icon: import_lucide_react7.Menu, size: 16 })
|
|
2010
2185
|
}
|
|
2011
2186
|
);
|
|
2012
2187
|
});
|
|
2013
2188
|
MobileMenuButton.displayName = "MobileMenuButton";
|
|
2014
|
-
var MobileMenu =
|
|
2189
|
+
var MobileMenu = React31.forwardRef(
|
|
2015
2190
|
({
|
|
2016
2191
|
className,
|
|
2017
2192
|
links,
|
|
@@ -2024,7 +2199,7 @@ var MobileMenu = React29.forwardRef(
|
|
|
2024
2199
|
}, ref) => {
|
|
2025
2200
|
const { isMobileMenuOpen, setIsMobileMenuOpen } = useHeaderContext();
|
|
2026
2201
|
if (!isMobileMenuOpen) return null;
|
|
2027
|
-
return /* @__PURE__ */ (0,
|
|
2202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2028
2203
|
"nav",
|
|
2029
2204
|
{
|
|
2030
2205
|
ref,
|
|
@@ -2035,8 +2210,8 @@ var MobileMenu = React29.forwardRef(
|
|
|
2035
2210
|
className
|
|
2036
2211
|
),
|
|
2037
2212
|
...props,
|
|
2038
|
-
children: /* @__PURE__ */ (0,
|
|
2039
|
-
/* @__PURE__ */ (0,
|
|
2213
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Box, { direction: "column", gap: 0, className: "py-fluid-md", children: [
|
|
2214
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: "px-fluid-md pb-fluid-md border-b border-berget-border/50", children: links.map((link) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2040
2215
|
Link,
|
|
2041
2216
|
{
|
|
2042
2217
|
href: link.href,
|
|
@@ -2047,13 +2222,13 @@ var MobileMenu = React29.forwardRef(
|
|
|
2047
2222
|
),
|
|
2048
2223
|
onClick: () => setIsMobileMenuOpen(false),
|
|
2049
2224
|
children: [
|
|
2050
|
-
link.icon && /* @__PURE__ */ (0,
|
|
2225
|
+
link.icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { icon: link.icon, size: 16 }) }),
|
|
2051
2226
|
link.label
|
|
2052
2227
|
]
|
|
2053
2228
|
}
|
|
2054
2229
|
) }, link.href)) }),
|
|
2055
|
-
/* @__PURE__ */ (0,
|
|
2056
|
-
languageOptions.length > 0 && /* @__PURE__ */ (0,
|
|
2230
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "px-fluid-md py-fluid-md", children: [
|
|
2231
|
+
languageOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "mb-fluid-md", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2057
2232
|
LanguageSelect,
|
|
2058
2233
|
{
|
|
2059
2234
|
options: languageOptions,
|
|
@@ -2061,8 +2236,8 @@ var MobileMenu = React29.forwardRef(
|
|
|
2061
2236
|
onValueChange: onLanguageChange
|
|
2062
2237
|
}
|
|
2063
2238
|
) }),
|
|
2064
|
-
loginButton && /* @__PURE__ */ (0,
|
|
2065
|
-
ctaButton && /* @__PURE__ */ (0,
|
|
2239
|
+
loginButton && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "mb-fluid-md w-full", children: loginButton }),
|
|
2240
|
+
ctaButton && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-full", children: ctaButton })
|
|
2066
2241
|
] })
|
|
2067
2242
|
] })
|
|
2068
2243
|
}
|
|
@@ -2070,7 +2245,7 @@ var MobileMenu = React29.forwardRef(
|
|
|
2070
2245
|
}
|
|
2071
2246
|
);
|
|
2072
2247
|
MobileMenu.displayName = "MobileMenu";
|
|
2073
|
-
var Header =
|
|
2248
|
+
var Header = React31.forwardRef(
|
|
2074
2249
|
({
|
|
2075
2250
|
className,
|
|
2076
2251
|
variant,
|
|
@@ -2083,8 +2258,8 @@ var Header = React29.forwardRef(
|
|
|
2083
2258
|
onLanguageChange,
|
|
2084
2259
|
...props
|
|
2085
2260
|
}, ref) => {
|
|
2086
|
-
const [isMobileMenuOpen, setIsMobileMenuOpen] =
|
|
2087
|
-
|
|
2261
|
+
const [isMobileMenuOpen, setIsMobileMenuOpen] = React31.useState(false);
|
|
2262
|
+
React31.useEffect(() => {
|
|
2088
2263
|
if (isMobileMenuOpen) {
|
|
2089
2264
|
document.body.style.overflow = "hidden";
|
|
2090
2265
|
} else {
|
|
@@ -2094,12 +2269,12 @@ var Header = React29.forwardRef(
|
|
|
2094
2269
|
document.body.style.overflow = "unset";
|
|
2095
2270
|
};
|
|
2096
2271
|
}, [isMobileMenuOpen]);
|
|
2097
|
-
return /* @__PURE__ */ (0,
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2099
|
-
/* @__PURE__ */ (0,
|
|
2100
|
-
/* @__PURE__ */ (0,
|
|
2101
|
-
/* @__PURE__ */ (0,
|
|
2102
|
-
/* @__PURE__ */ (0,
|
|
2272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HeaderContext.Provider, { value: { isMobileMenuOpen, setIsMobileMenuOpen }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("header", { ref, className: cn(headerVariants({ variant }), className), ...props, children: [
|
|
2273
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Container, { size: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Box, { direction: "row", align: "center", justify: "between", className: "h-16", children: [
|
|
2274
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HeaderLogo, { children: logo || /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(BergetLogo, { variant: "logotype", color: "auto", size: 32 }) }),
|
|
2275
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HeaderNav, { links }),
|
|
2276
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Box, { direction: "row", align: "center", gap: 3, children: [
|
|
2277
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2103
2278
|
HeaderActions,
|
|
2104
2279
|
{
|
|
2105
2280
|
languageOptions,
|
|
@@ -2109,11 +2284,11 @@ var Header = React29.forwardRef(
|
|
|
2109
2284
|
ctaButton
|
|
2110
2285
|
}
|
|
2111
2286
|
),
|
|
2112
|
-
ctaButton && /* @__PURE__ */ (0,
|
|
2113
|
-
/* @__PURE__ */ (0,
|
|
2287
|
+
ctaButton && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "md:hidden", children: ctaButton }),
|
|
2288
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(MobileMenuButton, {})
|
|
2114
2289
|
] })
|
|
2115
2290
|
] }) }),
|
|
2116
|
-
/* @__PURE__ */ (0,
|
|
2291
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2117
2292
|
MobileMenu,
|
|
2118
2293
|
{
|
|
2119
2294
|
links,
|
|
@@ -2130,16 +2305,16 @@ var Header = React29.forwardRef(
|
|
|
2130
2305
|
Header.displayName = "Header";
|
|
2131
2306
|
|
|
2132
2307
|
// src/components/feature-cards/FeatureCards.tsx
|
|
2133
|
-
var
|
|
2308
|
+
var React34 = __toESM(require("react"), 1);
|
|
2134
2309
|
var import_class_variance_authority21 = require("class-variance-authority");
|
|
2135
2310
|
|
|
2136
2311
|
// src/components/list/List.tsx
|
|
2137
|
-
var
|
|
2312
|
+
var React33 = __toESM(require("react"), 1);
|
|
2138
2313
|
|
|
2139
2314
|
// src/components/divider/Divider.tsx
|
|
2140
|
-
var
|
|
2315
|
+
var React32 = __toESM(require("react"), 1);
|
|
2141
2316
|
var import_class_variance_authority20 = require("class-variance-authority");
|
|
2142
|
-
var
|
|
2317
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2143
2318
|
var dividerVariants = (0, import_class_variance_authority20.cva)("", {
|
|
2144
2319
|
variants: {
|
|
2145
2320
|
variant: {
|
|
@@ -2160,7 +2335,7 @@ var dividerVariants = (0, import_class_variance_authority20.cva)("", {
|
|
|
2160
2335
|
size: "thin"
|
|
2161
2336
|
}
|
|
2162
2337
|
});
|
|
2163
|
-
var Divider =
|
|
2338
|
+
var Divider = React32.forwardRef(
|
|
2164
2339
|
({
|
|
2165
2340
|
className,
|
|
2166
2341
|
orientation = "horizontal",
|
|
@@ -2171,16 +2346,16 @@ var Divider = React30.forwardRef(
|
|
|
2171
2346
|
...props
|
|
2172
2347
|
}, ref) => {
|
|
2173
2348
|
if (label) {
|
|
2174
|
-
return /* @__PURE__ */ (0,
|
|
2175
|
-
labelPosition !== "right" && /* @__PURE__ */ (0,
|
|
2349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ref, className: cn("flex items-center w-full", className), ...props, children: [
|
|
2350
|
+
labelPosition !== "right" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2176
2351
|
Separator2,
|
|
2177
2352
|
{
|
|
2178
2353
|
orientation: "horizontal",
|
|
2179
2354
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
2180
2355
|
}
|
|
2181
2356
|
),
|
|
2182
|
-
/* @__PURE__ */ (0,
|
|
2183
|
-
labelPosition !== "left" && /* @__PURE__ */ (0,
|
|
2357
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Typography, { variant: "small", color: "muted", className: "px-4 whitespace-nowrap", children: label }),
|
|
2358
|
+
labelPosition !== "left" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2184
2359
|
Separator2,
|
|
2185
2360
|
{
|
|
2186
2361
|
orientation: "horizontal",
|
|
@@ -2189,7 +2364,7 @@ var Divider = React30.forwardRef(
|
|
|
2189
2364
|
)
|
|
2190
2365
|
] });
|
|
2191
2366
|
}
|
|
2192
|
-
return /* @__PURE__ */ (0,
|
|
2367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2193
2368
|
Separator2,
|
|
2194
2369
|
{
|
|
2195
2370
|
ref,
|
|
@@ -2207,19 +2382,19 @@ Divider.displayName = "Divider";
|
|
|
2207
2382
|
|
|
2208
2383
|
// src/components/list/List.tsx
|
|
2209
2384
|
var import_lucide_react8 = require("lucide-react");
|
|
2210
|
-
var
|
|
2211
|
-
var List =
|
|
2385
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2386
|
+
var List = React33.forwardRef(
|
|
2212
2387
|
({ className, children, ...props }, ref) => {
|
|
2213
|
-
const childrenArray =
|
|
2214
|
-
return /* @__PURE__ */ (0,
|
|
2388
|
+
const childrenArray = React33.Children.toArray(children);
|
|
2389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children: childrenArray.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(React33.Fragment, { children: [
|
|
2215
2390
|
child,
|
|
2216
|
-
index < childrenArray.length - 1 && /* @__PURE__ */ (0,
|
|
2391
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Divider, { variant: "subtle" })
|
|
2217
2392
|
] }, index)) });
|
|
2218
2393
|
}
|
|
2219
2394
|
);
|
|
2220
2395
|
List.displayName = "List";
|
|
2221
|
-
var ListItem =
|
|
2222
|
-
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2396
|
+
var ListItem = React33.forwardRef(
|
|
2397
|
+
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2223
2398
|
"div",
|
|
2224
2399
|
{
|
|
2225
2400
|
ref,
|
|
@@ -2230,15 +2405,15 @@ var ListItem = React31.forwardRef(
|
|
|
2230
2405
|
),
|
|
2231
2406
|
...props,
|
|
2232
2407
|
children: [
|
|
2233
|
-
icon && /* @__PURE__ */ (0,
|
|
2234
|
-
/* @__PURE__ */ (0,
|
|
2408
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-shrink-0 flex items-center justify-center", children: icon }),
|
|
2409
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-1 min-w-0", children })
|
|
2235
2410
|
]
|
|
2236
2411
|
}
|
|
2237
2412
|
)
|
|
2238
2413
|
);
|
|
2239
2414
|
ListItem.displayName = "ListItem";
|
|
2240
|
-
var ListHeader =
|
|
2241
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2415
|
+
var ListHeader = React33.forwardRef(
|
|
2416
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2242
2417
|
"div",
|
|
2243
2418
|
{
|
|
2244
2419
|
ref,
|
|
@@ -2249,18 +2424,18 @@ var ListHeader = React31.forwardRef(
|
|
|
2249
2424
|
)
|
|
2250
2425
|
);
|
|
2251
2426
|
ListHeader.displayName = "ListHeader";
|
|
2252
|
-
var FeatureList =
|
|
2427
|
+
var FeatureList = React33.forwardRef(
|
|
2253
2428
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
2254
|
-
return /* @__PURE__ */ (0,
|
|
2255
|
-
variant === "bullet" ? /* @__PURE__ */ (0,
|
|
2256
|
-
/* @__PURE__ */ (0,
|
|
2429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("li", { className: "flex items-start gap-fluid-md", children: [
|
|
2430
|
+
variant === "bullet" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { icon: import_lucide_react8.Check, size: 24, className: "text-berget-logo-light" }) }),
|
|
2431
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Typography, { variant: "body", color: "muted", children: item })
|
|
2257
2432
|
] }, index)) });
|
|
2258
2433
|
}
|
|
2259
2434
|
);
|
|
2260
2435
|
FeatureList.displayName = "FeatureList";
|
|
2261
2436
|
|
|
2262
2437
|
// src/components/feature-cards/FeatureCards.tsx
|
|
2263
|
-
var
|
|
2438
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2264
2439
|
var featureCardVariants = (0, import_class_variance_authority21.cva)("", {
|
|
2265
2440
|
variants: {
|
|
2266
2441
|
variant: {
|
|
@@ -2273,7 +2448,7 @@ var featureCardVariants = (0, import_class_variance_authority21.cva)("", {
|
|
|
2273
2448
|
variant: "highlight"
|
|
2274
2449
|
}
|
|
2275
2450
|
});
|
|
2276
|
-
var FeatureCard =
|
|
2451
|
+
var FeatureCard = React34.forwardRef(
|
|
2277
2452
|
({
|
|
2278
2453
|
className,
|
|
2279
2454
|
variant = "highlight",
|
|
@@ -2288,23 +2463,23 @@ var FeatureCard = React32.forwardRef(
|
|
|
2288
2463
|
columns: _columns,
|
|
2289
2464
|
...props
|
|
2290
2465
|
}, ref) => {
|
|
2291
|
-
return /* @__PURE__ */ (0,
|
|
2466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2292
2467
|
Card2,
|
|
2293
2468
|
{
|
|
2294
2469
|
ref,
|
|
2295
2470
|
variant,
|
|
2296
2471
|
className: cn("w-full py-fluid-lg px-fluid-md", className),
|
|
2297
2472
|
...props,
|
|
2298
|
-
children: /* @__PURE__ */ (0,
|
|
2299
|
-
(Icon3 || badge) && /* @__PURE__ */ (0,
|
|
2300
|
-
Icon3 && /* @__PURE__ */ (0,
|
|
2473
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col items-start gap-fluid-md", children: [
|
|
2474
|
+
(Icon3 || badge) && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-between w-full", children: [
|
|
2475
|
+
Icon3 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex h-7 w-7 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2301
2476
|
Icon3,
|
|
2302
2477
|
{
|
|
2303
2478
|
className: cn("h-7 w-7", iconColor || "text-foreground"),
|
|
2304
2479
|
strokeWidth: 1.5
|
|
2305
2480
|
}
|
|
2306
2481
|
) }),
|
|
2307
|
-
badge && /* @__PURE__ */ (0,
|
|
2482
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex h-6 items-center justify-start px-6 bg-berget-feature-card-badge-bg rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2308
2483
|
Typography,
|
|
2309
2484
|
{
|
|
2310
2485
|
variant: "body",
|
|
@@ -2314,10 +2489,10 @@ var FeatureCard = React32.forwardRef(
|
|
|
2314
2489
|
}
|
|
2315
2490
|
) })
|
|
2316
2491
|
] }),
|
|
2317
|
-
/* @__PURE__ */ (0,
|
|
2318
|
-
/* @__PURE__ */ (0,
|
|
2319
|
-
items && items.length > 0 && /* @__PURE__ */ (0,
|
|
2320
|
-
linkText && linkHref && /* @__PURE__ */ (0,
|
|
2492
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Typography, { variant: "h3", className: "text-foreground", children: title }),
|
|
2493
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Typography, { variant: "body", className: "text-foreground/80", children: description }),
|
|
2494
|
+
items && items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(FeatureList, { items, variant: "bullet" }),
|
|
2495
|
+
linkText && linkHref && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("a", { href: linkHref, className: "text-p font-p leading-p text-berget-accent", children: [
|
|
2321
2496
|
linkText,
|
|
2322
2497
|
" \u2192"
|
|
2323
2498
|
] })
|
|
@@ -2327,9 +2502,9 @@ var FeatureCard = React32.forwardRef(
|
|
|
2327
2502
|
}
|
|
2328
2503
|
);
|
|
2329
2504
|
FeatureCard.displayName = "FeatureCard";
|
|
2330
|
-
var FeatureCards =
|
|
2505
|
+
var FeatureCards = React34.forwardRef(
|
|
2331
2506
|
({ features, columns = 3, className }, ref) => {
|
|
2332
|
-
return /* @__PURE__ */ (0,
|
|
2507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2333
2508
|
"div",
|
|
2334
2509
|
{
|
|
2335
2510
|
ref,
|
|
@@ -2342,7 +2517,7 @@ var FeatureCards = React32.forwardRef(
|
|
|
2342
2517
|
columns === 4 && "grid-cols-1 md:grid-cols-2 lg:grid-cols-4",
|
|
2343
2518
|
className
|
|
2344
2519
|
),
|
|
2345
|
-
children: features.map((feature, index) => /* @__PURE__ */ (0,
|
|
2520
|
+
children: features.map((feature, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(FeatureCard, { ...feature }, index))
|
|
2346
2521
|
}
|
|
2347
2522
|
);
|
|
2348
2523
|
}
|
|
@@ -2350,9 +2525,9 @@ var FeatureCards = React32.forwardRef(
|
|
|
2350
2525
|
FeatureCards.displayName = "FeatureCards";
|
|
2351
2526
|
|
|
2352
2527
|
// src/components/hero-block/HeroBlock.tsx
|
|
2353
|
-
var
|
|
2528
|
+
var React35 = __toESM(require("react"), 1);
|
|
2354
2529
|
var import_class_variance_authority22 = require("class-variance-authority");
|
|
2355
|
-
var
|
|
2530
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2356
2531
|
var heroBlockVariants = (0, import_class_variance_authority22.cva)(
|
|
2357
2532
|
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
2358
2533
|
{
|
|
@@ -2373,7 +2548,7 @@ var heroBlockVariants = (0, import_class_variance_authority22.cva)(
|
|
|
2373
2548
|
}
|
|
2374
2549
|
}
|
|
2375
2550
|
);
|
|
2376
|
-
var HeroBlock =
|
|
2551
|
+
var HeroBlock = React35.forwardRef(
|
|
2377
2552
|
({
|
|
2378
2553
|
className,
|
|
2379
2554
|
variant,
|
|
@@ -2385,26 +2560,26 @@ var HeroBlock = React33.forwardRef(
|
|
|
2385
2560
|
actions,
|
|
2386
2561
|
...props
|
|
2387
2562
|
}, ref) => {
|
|
2388
|
-
return /* @__PURE__ */ (0,
|
|
2563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2389
2564
|
"div",
|
|
2390
2565
|
{
|
|
2391
2566
|
ref,
|
|
2392
2567
|
className: cn(heroBlockVariants({ variant, withPattern }), className),
|
|
2393
2568
|
...props,
|
|
2394
|
-
children: /* @__PURE__ */ (0,
|
|
2395
|
-
tagline && /* @__PURE__ */ (0,
|
|
2569
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "mx-auto text-center max-w-4xl", children: [
|
|
2570
|
+
tagline && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2396
2571
|
Badge,
|
|
2397
2572
|
{
|
|
2398
2573
|
variant: "default",
|
|
2399
|
-
icon: TaglineIcon ? /* @__PURE__ */ (0,
|
|
2574
|
+
icon: TaglineIcon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
2400
2575
|
iconGap: 2,
|
|
2401
2576
|
className: "mb-fluid-md",
|
|
2402
2577
|
children: tagline
|
|
2403
2578
|
}
|
|
2404
2579
|
),
|
|
2405
|
-
/* @__PURE__ */ (0,
|
|
2406
|
-
/* @__PURE__ */ (0,
|
|
2407
|
-
actions && /* @__PURE__ */ (0,
|
|
2580
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Typography, { variant: "h1", className: "mb-fluid-md", children: title }),
|
|
2581
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Typography, { variant: "h3", color: "muted", className: "mb-fluid-lg", children: description }),
|
|
2582
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex flex-wrap gap-fluid-md justify-center", children: actions })
|
|
2408
2583
|
] }) })
|
|
2409
2584
|
}
|
|
2410
2585
|
);
|
|
@@ -2540,7 +2715,7 @@ function getHighlighter() {
|
|
|
2540
2715
|
}
|
|
2541
2716
|
|
|
2542
2717
|
// src/components/code-block/CodeBlock.tsx
|
|
2543
|
-
var
|
|
2718
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2544
2719
|
function CodeBlock({ code, language = "text", title, className }) {
|
|
2545
2720
|
const [html, setHtml] = (0, import_react2.useState)(null);
|
|
2546
2721
|
const [copied, setCopied] = (0, import_react2.useState)(false);
|
|
@@ -2556,16 +2731,16 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
2556
2731
|
setCopied(true);
|
|
2557
2732
|
setTimeout(() => setCopied(false), 2e3);
|
|
2558
2733
|
}, [code]);
|
|
2559
|
-
const copyButton = /* @__PURE__ */ (0,
|
|
2734
|
+
const copyButton = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2560
2735
|
"button",
|
|
2561
2736
|
{
|
|
2562
2737
|
onClick: handleCopy,
|
|
2563
2738
|
className: "flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors",
|
|
2564
2739
|
"aria-label": "Copy code",
|
|
2565
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
2740
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react9.Check, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react9.Copy, { className: "w-3.5 h-3.5" })
|
|
2566
2741
|
}
|
|
2567
2742
|
);
|
|
2568
|
-
return /* @__PURE__ */ (0,
|
|
2743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2569
2744
|
"div",
|
|
2570
2745
|
{
|
|
2571
2746
|
className: cn(
|
|
@@ -2573,15 +2748,15 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
2573
2748
|
className
|
|
2574
2749
|
),
|
|
2575
2750
|
children: [
|
|
2576
|
-
title && /* @__PURE__ */ (0,
|
|
2577
|
-
/* @__PURE__ */ (0,
|
|
2578
|
-
html ? /* @__PURE__ */ (0,
|
|
2751
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "!h-10 flex items-center !px-4 !text-xs !leading-normal border-b border-berget-border bg-berget-codeblock-header-bg", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-berget-muted-foreground", children: title }) }),
|
|
2752
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "absolute right-2 top-2 z-10", children: copyButton }),
|
|
2753
|
+
html ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2579
2754
|
"div",
|
|
2580
2755
|
{
|
|
2581
2756
|
className: "[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent",
|
|
2582
2757
|
dangerouslySetInnerHTML: { __html: html }
|
|
2583
2758
|
}
|
|
2584
|
-
) : /* @__PURE__ */ (0,
|
|
2759
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("code", { children: code }) })
|
|
2585
2760
|
]
|
|
2586
2761
|
}
|
|
2587
2762
|
);
|
|
@@ -2635,6 +2810,8 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
2635
2810
|
Select,
|
|
2636
2811
|
Switch,
|
|
2637
2812
|
TextArea,
|
|
2813
|
+
ThemeProvider,
|
|
2814
|
+
ThemeToggle,
|
|
2638
2815
|
Typography,
|
|
2639
2816
|
alertVariants,
|
|
2640
2817
|
badgeVariants,
|
|
@@ -2650,6 +2827,7 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
2650
2827
|
switchRootVariants,
|
|
2651
2828
|
switchThumbVariants,
|
|
2652
2829
|
textAreaVariants,
|
|
2653
|
-
typographyVariants
|
|
2830
|
+
typographyVariants,
|
|
2831
|
+
useTheme
|
|
2654
2832
|
});
|
|
2655
2833
|
//# sourceMappingURL=index.cjs.map
|