@bergetai/ui 0.1.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +70 -0
- package/dist/chunk-YEGBDRHW.js +127 -0
- package/dist/chunk-YEGBDRHW.js.map +1 -0
- package/dist/index.cjs +2717 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +547 -0
- package/dist/index.d.ts +547 -0
- package/dist/index.js +2496 -0
- package/dist/index.js.map +1 -0
- package/dist/shiki.cjs +165 -0
- package/dist/shiki.cjs.map +1 -0
- package/dist/shiki.d.cts +10 -0
- package/dist/shiki.d.ts +10 -0
- package/dist/shiki.js +11 -0
- package/dist/shiki.js.map +1 -0
- package/dist/styles/index.css +919 -0
- package/package.json +64 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2717 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
Alert: () => Alert2,
|
|
34
|
+
AlertDescription: () => AlertDescription,
|
|
35
|
+
AlertTitle: () => AlertTitle,
|
|
36
|
+
Badge: () => Badge,
|
|
37
|
+
BergetLogo: () => BergetLogo,
|
|
38
|
+
BergetLogotype: () => BergetLogo,
|
|
39
|
+
BergetSymbol: () => BergetLogo,
|
|
40
|
+
Box: () => Box,
|
|
41
|
+
Button: () => Button2,
|
|
42
|
+
Card: () => Card2,
|
|
43
|
+
CardContent: () => CardContent,
|
|
44
|
+
CardDescription: () => CardDescription,
|
|
45
|
+
CardFooter: () => CardFooter,
|
|
46
|
+
CardHeader: () => CardHeader,
|
|
47
|
+
CardTitle: () => CardTitle,
|
|
48
|
+
Checkbox: () => Checkbox2,
|
|
49
|
+
CodeBlock: () => CodeBlock,
|
|
50
|
+
Container: () => Container,
|
|
51
|
+
FeatureCard: () => FeatureCard,
|
|
52
|
+
FeatureCards: () => FeatureCards,
|
|
53
|
+
FeatureList: () => FeatureList,
|
|
54
|
+
Field: () => Field,
|
|
55
|
+
FieldContent: () => FieldContent,
|
|
56
|
+
FieldDescription: () => FieldDescription,
|
|
57
|
+
FieldError: () => FieldError,
|
|
58
|
+
FieldGroup: () => FieldGroup,
|
|
59
|
+
FieldLabel: () => FieldLabel,
|
|
60
|
+
FieldLegend: () => FieldLegend,
|
|
61
|
+
FieldSeparator: () => FieldSeparator,
|
|
62
|
+
FieldSet: () => FieldSet,
|
|
63
|
+
FieldTitle: () => FieldTitle,
|
|
64
|
+
Grid: () => Grid,
|
|
65
|
+
Header: () => Header,
|
|
66
|
+
HeroBlock: () => HeroBlock,
|
|
67
|
+
Icon: () => Icon,
|
|
68
|
+
Input: () => Input2,
|
|
69
|
+
Label: () => Label2,
|
|
70
|
+
LanguageSelect: () => LanguageSelect,
|
|
71
|
+
Link: () => Link,
|
|
72
|
+
List: () => List,
|
|
73
|
+
ListHeader: () => ListHeader,
|
|
74
|
+
ListItem: () => ListItem,
|
|
75
|
+
Section: () => Section,
|
|
76
|
+
SectionHeader: () => SectionHeader,
|
|
77
|
+
Select: () => Select2,
|
|
78
|
+
StatCard: () => StatCard,
|
|
79
|
+
Switch: () => Switch,
|
|
80
|
+
TextArea: () => TextArea,
|
|
81
|
+
Typography: () => Typography,
|
|
82
|
+
alertVariants: () => alertVariants2,
|
|
83
|
+
badgeVariants: () => badgeVariants,
|
|
84
|
+
boxVariants: () => boxVariants,
|
|
85
|
+
buttonVariants: () => buttonVariants2,
|
|
86
|
+
cardVariants: () => cardVariants,
|
|
87
|
+
checkboxVariants: () => checkboxVariants,
|
|
88
|
+
containerVariants: () => containerVariants,
|
|
89
|
+
gridVariants: () => gridVariants,
|
|
90
|
+
linkVariants: () => linkVariants,
|
|
91
|
+
sectionVariants: () => sectionVariants,
|
|
92
|
+
selectVariants: () => selectVariants,
|
|
93
|
+
switchRootVariants: () => switchRootVariants,
|
|
94
|
+
switchThumbVariants: () => switchThumbVariants,
|
|
95
|
+
textAreaVariants: () => textAreaVariants,
|
|
96
|
+
typographyVariants: () => typographyVariants
|
|
97
|
+
});
|
|
98
|
+
module.exports = __toCommonJS(index_exports);
|
|
99
|
+
|
|
100
|
+
// src/components/button/Button.tsx
|
|
101
|
+
var React3 = __toESM(require("react"), 1);
|
|
102
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
103
|
+
|
|
104
|
+
// src/lib/utils.ts
|
|
105
|
+
var import_clsx = require("clsx");
|
|
106
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
107
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
108
|
+
extend: {
|
|
109
|
+
classGroups: {
|
|
110
|
+
rounded: [
|
|
111
|
+
"rounded-berget-none",
|
|
112
|
+
"rounded-berget-xs",
|
|
113
|
+
"rounded-berget-sm",
|
|
114
|
+
"rounded-berget-md",
|
|
115
|
+
"rounded-berget-lg",
|
|
116
|
+
"rounded-berget-full"
|
|
117
|
+
],
|
|
118
|
+
"font-size": ["text-h1", "text-h2", "text-h3", "text-h4", "text-p", "text-mono"]
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
function cn(...inputs) {
|
|
123
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// src/primitives/button.tsx
|
|
127
|
+
var React = __toESM(require("react"), 1);
|
|
128
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
129
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
130
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
131
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
132
|
+
"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",
|
|
133
|
+
{
|
|
134
|
+
variants: {
|
|
135
|
+
variant: {
|
|
136
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
137
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
138
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
139
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
140
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
141
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
142
|
+
},
|
|
143
|
+
size: {
|
|
144
|
+
default: "h-10 px-4 py-2",
|
|
145
|
+
sm: "h-9 rounded-md px-3",
|
|
146
|
+
lg: "h-11 rounded-md px-8",
|
|
147
|
+
icon: "h-10 w-10"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
defaultVariants: {
|
|
151
|
+
variant: "default",
|
|
152
|
+
size: "default"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
var Button = React.forwardRef(
|
|
157
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
158
|
+
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { className: cn(buttonVariants({ variant, size }), className), ref, ...props });
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
Button.displayName = "Button";
|
|
163
|
+
|
|
164
|
+
// src/components/icon/Icon.tsx
|
|
165
|
+
var React2 = __toESM(require("react"), 1);
|
|
166
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
167
|
+
var iconStrokeMap = {
|
|
168
|
+
16: 1.4,
|
|
169
|
+
24: 1.6,
|
|
170
|
+
32: 1.8
|
|
171
|
+
};
|
|
172
|
+
var Icon = React2.forwardRef(
|
|
173
|
+
({
|
|
174
|
+
icon: IconComponent,
|
|
175
|
+
size,
|
|
176
|
+
className,
|
|
177
|
+
"aria-label": ariaLabel,
|
|
178
|
+
"aria-hidden": ariaHidden = true,
|
|
179
|
+
...props
|
|
180
|
+
}, ref) => {
|
|
181
|
+
const strokeWidth = iconStrokeMap[size];
|
|
182
|
+
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
183
|
+
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
185
|
+
IconComponent,
|
|
186
|
+
{
|
|
187
|
+
ref,
|
|
188
|
+
className: cn(sizeClass, className),
|
|
189
|
+
strokeWidth,
|
|
190
|
+
...ariaAttributes,
|
|
191
|
+
...props
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
Icon.displayName = "Icon";
|
|
197
|
+
|
|
198
|
+
// src/components/button/Button.tsx
|
|
199
|
+
var import_lucide_react = require("lucide-react");
|
|
200
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
201
|
+
var buttonVariants2 = (0, import_class_variance_authority2.cva)(
|
|
202
|
+
"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",
|
|
203
|
+
{
|
|
204
|
+
variants: {
|
|
205
|
+
variant: {
|
|
206
|
+
default: "bg-berget-button-default-bg text-berget-button-default-fg shadow-lg hover:bg-berget-button-default-bg/90 hover:shadow-xl",
|
|
207
|
+
primary: "bg-berget-button-primary-bg text-berget-button-primary-fg shadow-lg hover:bg-berget-button-primary-bg/90 hover:shadow-xl",
|
|
208
|
+
secondary: "bg-berget-button-secondary-bg text-berget-button-secondary-fg shadow hover:bg-berget-button-secondary-bg/80 hover:shadow-lg",
|
|
209
|
+
destructive: "bg-berget-button-destructive-bg text-berget-button-destructive-fg shadow-sm hover:bg-berget-button-destructive-bg/80 hover:shadow",
|
|
210
|
+
highlight: "relative overflow-hidden bg-berget-background border border-berget-border-interactive backdrop-blur-[5px] text-foreground hover:bg-berget-background/80 hover:border-berget-border-interactive-elevated hover:shadow-lg",
|
|
211
|
+
icon: "!flex !flex-row !justify-center !items-center !gap-0 !p-0 !w-[44px] !h-[44px] !bg-berget-button-default-bg !text-berget-button-default-fg shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)] !rounded-full"
|
|
212
|
+
},
|
|
213
|
+
size: {
|
|
214
|
+
sm: "h-6 px-3 py-1.5 text-xs [&_svg]:size-4",
|
|
215
|
+
default: "h-8 px-4 py-2 text-sm [&_svg]:size-6",
|
|
216
|
+
lg: "h-10 px-5 py-2.5 text-base [&_svg]:size-6",
|
|
217
|
+
icon: "!w-[44px] !h-[44px] !p-0 [&_svg]:size-5"
|
|
218
|
+
},
|
|
219
|
+
width: {
|
|
220
|
+
default: "w-auto",
|
|
221
|
+
full: "w-full"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
defaultVariants: {
|
|
225
|
+
variant: "default",
|
|
226
|
+
size: "default",
|
|
227
|
+
width: "default"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
var Button2 = React3.forwardRef(
|
|
232
|
+
({
|
|
233
|
+
className,
|
|
234
|
+
variant,
|
|
235
|
+
size,
|
|
236
|
+
width,
|
|
237
|
+
asChild = false,
|
|
238
|
+
isLoading = false,
|
|
239
|
+
type = "button",
|
|
240
|
+
children,
|
|
241
|
+
...props
|
|
242
|
+
}, ref) => {
|
|
243
|
+
const isHighlight = variant === "highlight";
|
|
244
|
+
const isIcon = variant === "icon";
|
|
245
|
+
if (asChild) {
|
|
246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
247
|
+
Button,
|
|
248
|
+
{
|
|
249
|
+
className: cn(buttonVariants2({ variant, size, width }), className),
|
|
250
|
+
ref,
|
|
251
|
+
asChild: true,
|
|
252
|
+
type,
|
|
253
|
+
"aria-disabled": isLoading || void 0,
|
|
254
|
+
"aria-busy": isLoading || void 0,
|
|
255
|
+
...props,
|
|
256
|
+
children
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
261
|
+
Button,
|
|
262
|
+
{
|
|
263
|
+
className: cn(buttonVariants2({ variant, size, width }), className),
|
|
264
|
+
ref,
|
|
265
|
+
type,
|
|
266
|
+
"aria-disabled": isLoading || void 0,
|
|
267
|
+
"aria-busy": isLoading || void 0,
|
|
268
|
+
...props,
|
|
269
|
+
children: [
|
|
270
|
+
isHighlight && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
271
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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" }),
|
|
272
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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" })
|
|
273
|
+
] }),
|
|
274
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
275
|
+
"span",
|
|
276
|
+
{
|
|
277
|
+
className: cn(
|
|
278
|
+
"inline-flex items-center",
|
|
279
|
+
!isIcon && "gap-2",
|
|
280
|
+
isHighlight && "relative z-10"
|
|
281
|
+
),
|
|
282
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
283
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { icon: import_lucide_react.Loader2, size: 16, className: "animate-spin", "aria-hidden": true }),
|
|
284
|
+
!isIcon && children
|
|
285
|
+
] }) : children
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
Button2.displayName = "Button";
|
|
294
|
+
|
|
295
|
+
// src/components/typography/Typography.tsx
|
|
296
|
+
var React4 = __toESM(require("react"), 1);
|
|
297
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
298
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
299
|
+
var typographyVariants = (0, import_class_variance_authority3.cva)("", {
|
|
300
|
+
variants: {
|
|
301
|
+
variant: {
|
|
302
|
+
// Fluid heading scale — use @theme tokens (clamp-based, 390px → 1440px)
|
|
303
|
+
h1: "text-h1 font-h1 leading-h1 tracking-h1 text-balance",
|
|
304
|
+
h2: "text-h2 font-h2 leading-h2 tracking-h2 text-balance",
|
|
305
|
+
h3: "text-h3 font-h3 leading-h3 tracking-h3 text-balance",
|
|
306
|
+
h4: "text-h4 font-h4 leading-h4 tracking-h4 text-balance",
|
|
307
|
+
// Static sans-serif sub-heading
|
|
308
|
+
h5: "text-xl font-xl leading-xl text-balance",
|
|
309
|
+
// Body and UI text — use @theme tokens where available
|
|
310
|
+
large: "text-lg font-lg leading-lg text-pretty",
|
|
311
|
+
body: "text-p font-p leading-p text-pretty",
|
|
312
|
+
small: "text-sm font-sm leading-sm text-pretty",
|
|
313
|
+
xs: "text-xs font-xs leading-xs text-pretty",
|
|
314
|
+
// Monospaced — use @theme token
|
|
315
|
+
mono: "text-mono font-mono leading-mono text-pretty",
|
|
316
|
+
// Inline code / spec labels
|
|
317
|
+
code: "text-xs font-mono"
|
|
318
|
+
},
|
|
319
|
+
color: {
|
|
320
|
+
default: "text-berget-foreground",
|
|
321
|
+
muted: "text-berget-muted-foreground",
|
|
322
|
+
dim: "text-berget-foreground/50"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
defaultVariants: {
|
|
326
|
+
variant: "body",
|
|
327
|
+
color: "default"
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
var defaultElementMap = {
|
|
331
|
+
h1: "h1",
|
|
332
|
+
h2: "h2",
|
|
333
|
+
h3: "h3",
|
|
334
|
+
h4: "h4",
|
|
335
|
+
h5: "h5",
|
|
336
|
+
large: "p",
|
|
337
|
+
body: "p",
|
|
338
|
+
small: "p",
|
|
339
|
+
xs: "p",
|
|
340
|
+
mono: "p",
|
|
341
|
+
code: "span"
|
|
342
|
+
};
|
|
343
|
+
var Typography = React4.forwardRef(
|
|
344
|
+
({ className, variant = "body", color = "default", as, children, ...props }, ref) => {
|
|
345
|
+
const Component = as ?? defaultElementMap[variant ?? "body"] ?? "p";
|
|
346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
347
|
+
Component,
|
|
348
|
+
{
|
|
349
|
+
className: cn(typographyVariants({ variant, color }), className),
|
|
350
|
+
ref,
|
|
351
|
+
...props,
|
|
352
|
+
children
|
|
353
|
+
}
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
);
|
|
357
|
+
Typography.displayName = "Typography";
|
|
358
|
+
|
|
359
|
+
// src/components/card/Card.tsx
|
|
360
|
+
var React6 = __toESM(require("react"), 1);
|
|
361
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
362
|
+
|
|
363
|
+
// src/primitives/card.tsx
|
|
364
|
+
var React5 = __toESM(require("react"), 1);
|
|
365
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
366
|
+
var Card = React5.forwardRef(
|
|
367
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
368
|
+
"div",
|
|
369
|
+
{
|
|
370
|
+
ref,
|
|
371
|
+
className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className),
|
|
372
|
+
...props
|
|
373
|
+
}
|
|
374
|
+
)
|
|
375
|
+
);
|
|
376
|
+
Card.displayName = "Card";
|
|
377
|
+
var CardHeader = React5.forwardRef(
|
|
378
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
379
|
+
);
|
|
380
|
+
CardHeader.displayName = "CardHeader";
|
|
381
|
+
var CardTitle = React5.forwardRef(
|
|
382
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { ref, className: cn("text-2xl leading-none tracking-tight", className), ...props })
|
|
383
|
+
);
|
|
384
|
+
CardTitle.displayName = "CardTitle";
|
|
385
|
+
var CardDescription = React5.forwardRef(
|
|
386
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
387
|
+
);
|
|
388
|
+
CardDescription.displayName = "CardDescription";
|
|
389
|
+
var CardContent = React5.forwardRef(
|
|
390
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
391
|
+
);
|
|
392
|
+
CardContent.displayName = "CardContent";
|
|
393
|
+
var CardFooter = React5.forwardRef(
|
|
394
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
395
|
+
);
|
|
396
|
+
CardFooter.displayName = "CardFooter";
|
|
397
|
+
|
|
398
|
+
// src/components/card/Card.tsx
|
|
399
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
400
|
+
var cardVariants = (0, import_class_variance_authority4.cva)("rounded-berget-sm", {
|
|
401
|
+
variants: {
|
|
402
|
+
variant: {
|
|
403
|
+
outlined: "bg-transparent border border-berget-border",
|
|
404
|
+
filled: "bg-berget-card-filled-bg border border-berget-border"
|
|
405
|
+
},
|
|
406
|
+
padding: {
|
|
407
|
+
none: "p-0",
|
|
408
|
+
sm: "p-3 sm:p-4",
|
|
409
|
+
md: "p-4 sm:p-6",
|
|
410
|
+
lg: "p-6 sm:p-8"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
defaultVariants: {
|
|
414
|
+
variant: "outlined",
|
|
415
|
+
padding: "md"
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
var Card2 = React6.forwardRef(
|
|
419
|
+
({ className, variant, padding, children, ...props }, ref) => {
|
|
420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
421
|
+
Card,
|
|
422
|
+
{
|
|
423
|
+
ref,
|
|
424
|
+
className: cn(cardVariants({ variant, padding }), className),
|
|
425
|
+
...props,
|
|
426
|
+
children
|
|
427
|
+
}
|
|
428
|
+
);
|
|
429
|
+
}
|
|
430
|
+
);
|
|
431
|
+
Card2.displayName = "Card";
|
|
432
|
+
|
|
433
|
+
// src/components/badge/Badge.tsx
|
|
434
|
+
var React7 = __toESM(require("react"), 1);
|
|
435
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
436
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
437
|
+
var badgeVariants = (0, import_class_variance_authority5.cva)(
|
|
438
|
+
"inline-flex items-center whitespace-nowrap rounded-full transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2",
|
|
439
|
+
{
|
|
440
|
+
variants: {
|
|
441
|
+
variant: {
|
|
442
|
+
default: "px-8",
|
|
443
|
+
tag: "px-4",
|
|
444
|
+
semantic: "px-3"
|
|
445
|
+
},
|
|
446
|
+
status: {
|
|
447
|
+
default: "bg-berget-badge-default-bg text-berget-badge-default-fg",
|
|
448
|
+
active: "bg-berget-badge-active-bg text-berget-badge-active-fg",
|
|
449
|
+
tagDefault: "bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg",
|
|
450
|
+
tagActive: "bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg",
|
|
451
|
+
tagGhost: "bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg",
|
|
452
|
+
info: "berget-tint berget-tint-info",
|
|
453
|
+
success: "berget-tint berget-tint-success",
|
|
454
|
+
warning: "berget-tint berget-tint-warning",
|
|
455
|
+
error: "berget-tint berget-tint-error"
|
|
456
|
+
},
|
|
457
|
+
size: {
|
|
458
|
+
sm: "text-xs h-6",
|
|
459
|
+
md: "text-sm h-6"
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
defaultVariants: {
|
|
463
|
+
variant: "default",
|
|
464
|
+
status: "default",
|
|
465
|
+
size: "md"
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
);
|
|
469
|
+
var Badge = React7.forwardRef(
|
|
470
|
+
({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {
|
|
471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cn(badgeVariants({ variant, status, size }), className), ref, ...props, children: [
|
|
472
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { marginRight: children ? `${iconGap * 0.25}rem` : "0" }, children: icon }),
|
|
473
|
+
children
|
|
474
|
+
] });
|
|
475
|
+
}
|
|
476
|
+
);
|
|
477
|
+
Badge.displayName = "Badge";
|
|
478
|
+
|
|
479
|
+
// src/components/alert/Alert.tsx
|
|
480
|
+
var React9 = __toESM(require("react"), 1);
|
|
481
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
482
|
+
|
|
483
|
+
// src/primitives/alert.tsx
|
|
484
|
+
var React8 = __toESM(require("react"), 1);
|
|
485
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
486
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
487
|
+
var alertVariants = (0, import_class_variance_authority6.cva)(
|
|
488
|
+
"relative w-full rounded-lg p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",
|
|
489
|
+
{
|
|
490
|
+
variants: {
|
|
491
|
+
variant: {
|
|
492
|
+
default: "",
|
|
493
|
+
destructive: ""
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
defaultVariants: {
|
|
497
|
+
variant: "default"
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
);
|
|
501
|
+
var Alert = React8.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
502
|
+
Alert.displayName = "Alert";
|
|
503
|
+
var AlertTitle = React8.forwardRef(
|
|
504
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h5", { ref, className: cn("mb-1 leading-none tracking-tight", className), ...props })
|
|
505
|
+
);
|
|
506
|
+
AlertTitle.displayName = "AlertTitle";
|
|
507
|
+
var AlertDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props }));
|
|
508
|
+
AlertDescription.displayName = "AlertDescription";
|
|
509
|
+
|
|
510
|
+
// src/components/alert/Alert.tsx
|
|
511
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
512
|
+
var alertVariants2 = (0, import_class_variance_authority7.cva)("", {
|
|
513
|
+
variants: {
|
|
514
|
+
variant: {
|
|
515
|
+
default: "border-berget-border",
|
|
516
|
+
info: "berget-tint berget-tint-info",
|
|
517
|
+
success: "berget-tint berget-tint-success",
|
|
518
|
+
warning: "berget-tint berget-tint-warning",
|
|
519
|
+
destructive: "berget-tint berget-tint-error"
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
defaultVariants: {
|
|
523
|
+
variant: "default"
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
var Alert2 = React9.forwardRef(
|
|
527
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Alert, { ref, className: cn(alertVariants2({ variant }), className), ...props })
|
|
528
|
+
);
|
|
529
|
+
Alert2.displayName = "Alert";
|
|
530
|
+
|
|
531
|
+
// src/components/input/Input.tsx
|
|
532
|
+
var React11 = __toESM(require("react"), 1);
|
|
533
|
+
|
|
534
|
+
// src/primitives/input.tsx
|
|
535
|
+
var React10 = __toESM(require("react"), 1);
|
|
536
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
537
|
+
var Input = React10.forwardRef(
|
|
538
|
+
({ className, type, ...props }, ref) => {
|
|
539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
540
|
+
"input",
|
|
541
|
+
{
|
|
542
|
+
type,
|
|
543
|
+
className: cn(
|
|
544
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file: file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
545
|
+
className
|
|
546
|
+
),
|
|
547
|
+
ref,
|
|
548
|
+
...props
|
|
549
|
+
}
|
|
550
|
+
);
|
|
551
|
+
}
|
|
552
|
+
);
|
|
553
|
+
Input.displayName = "Input";
|
|
554
|
+
|
|
555
|
+
// src/components/input/Input.tsx
|
|
556
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
557
|
+
var Input2 = React11.forwardRef(
|
|
558
|
+
({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {
|
|
559
|
+
const generatedId = React11.useId();
|
|
560
|
+
const inputId = id || generatedId;
|
|
561
|
+
const errorId = `${inputId}-error`;
|
|
562
|
+
const descriptionId = `${inputId}-description`;
|
|
563
|
+
const inputElement = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
564
|
+
Input,
|
|
565
|
+
{
|
|
566
|
+
ref,
|
|
567
|
+
id: inputId,
|
|
568
|
+
disabled,
|
|
569
|
+
"aria-invalid": !!error,
|
|
570
|
+
"aria-describedby": cn(error && errorId, description && descriptionId),
|
|
571
|
+
className: cn(
|
|
572
|
+
"isolate rounded-berget-xs bg-card focus-visible:border-berget-form-focus-border focus-visible:ring-0 focus-visible:ring-offset-0 hover:bg-berget-surface-hover transition-colors duration-200 px-3 sm:px-4 py-2 sm:py-2.5 text-sm",
|
|
573
|
+
icon && "pl-10",
|
|
574
|
+
actionButton && "pr-12",
|
|
575
|
+
error && "border-berget-destructive-foreground/50 bg-berget-destructive",
|
|
576
|
+
disabled && "cursor-not-allowed",
|
|
577
|
+
className
|
|
578
|
+
),
|
|
579
|
+
...props
|
|
580
|
+
}
|
|
581
|
+
);
|
|
582
|
+
if (!icon && !actionButton) {
|
|
583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
584
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
585
|
+
"label",
|
|
586
|
+
{
|
|
587
|
+
htmlFor: inputId,
|
|
588
|
+
className: cn(
|
|
589
|
+
"text-sm font-sans leading-none",
|
|
590
|
+
disabled ? "text-muted-foreground cursor-not-allowed" : "text-foreground",
|
|
591
|
+
error && "text-berget-destructive-foreground"
|
|
592
|
+
),
|
|
593
|
+
children: label
|
|
594
|
+
}
|
|
595
|
+
),
|
|
596
|
+
inputElement,
|
|
597
|
+
(description || error) && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
598
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
599
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
600
|
+
Typography,
|
|
601
|
+
{
|
|
602
|
+
variant: "xs",
|
|
603
|
+
id: errorId,
|
|
604
|
+
className: "text-berget-destructive-foreground",
|
|
605
|
+
children: error
|
|
606
|
+
}
|
|
607
|
+
)
|
|
608
|
+
] })
|
|
609
|
+
] });
|
|
610
|
+
}
|
|
611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
612
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
613
|
+
"label",
|
|
614
|
+
{
|
|
615
|
+
htmlFor: inputId,
|
|
616
|
+
className: cn(
|
|
617
|
+
"text-sm font-sans leading-none",
|
|
618
|
+
disabled ? "text-muted-foreground cursor-not-allowed" : "text-foreground",
|
|
619
|
+
error && "text-berget-destructive-foreground"
|
|
620
|
+
),
|
|
621
|
+
children: label
|
|
622
|
+
}
|
|
623
|
+
),
|
|
624
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "relative w-full", children: [
|
|
625
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "absolute left-3 top-1/2 -translate-y-1/2", children: icon }),
|
|
626
|
+
inputElement,
|
|
627
|
+
actionButton && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
628
|
+
] }),
|
|
629
|
+
(description || error) && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
630
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
631
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
632
|
+
] })
|
|
633
|
+
] });
|
|
634
|
+
}
|
|
635
|
+
);
|
|
636
|
+
Input2.displayName = "Input";
|
|
637
|
+
|
|
638
|
+
// src/components/checkbox/Checkbox.tsx
|
|
639
|
+
var React13 = __toESM(require("react"), 1);
|
|
640
|
+
var CheckboxPrimitive2 = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
641
|
+
var import_lucide_react3 = require("lucide-react");
|
|
642
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
643
|
+
|
|
644
|
+
// src/primitives/checkbox.tsx
|
|
645
|
+
var React12 = __toESM(require("react"), 1);
|
|
646
|
+
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
647
|
+
var import_lucide_react2 = require("lucide-react");
|
|
648
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
649
|
+
var Checkbox = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
650
|
+
CheckboxPrimitive.Root,
|
|
651
|
+
{
|
|
652
|
+
ref,
|
|
653
|
+
className: cn(
|
|
654
|
+
"peer ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
655
|
+
className
|
|
656
|
+
),
|
|
657
|
+
...props,
|
|
658
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CheckboxPrimitive.Indicator, { className: cn("grid place-content-center"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react2.Check, { className: "h-4 w-4" }) })
|
|
659
|
+
}
|
|
660
|
+
));
|
|
661
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
662
|
+
var CheckboxIndicator = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
663
|
+
CheckboxPrimitive.Indicator,
|
|
664
|
+
{
|
|
665
|
+
ref,
|
|
666
|
+
className: cn("grid place-content-center", className),
|
|
667
|
+
...props,
|
|
668
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react2.Check, { className: "h-4 w-4" })
|
|
669
|
+
}
|
|
670
|
+
));
|
|
671
|
+
CheckboxIndicator.displayName = CheckboxPrimitive.Indicator.displayName;
|
|
672
|
+
|
|
673
|
+
// src/components/checkbox/Checkbox.tsx
|
|
674
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
675
|
+
var checkboxVariants = (0, import_class_variance_authority8.cva)(
|
|
676
|
+
"inline-flex items-center justify-center rounded-md transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
677
|
+
{
|
|
678
|
+
variants: {
|
|
679
|
+
variant: {
|
|
680
|
+
default: "text-foreground border border-berget-border-interactive bg-berget-surface-subtle hover:bg-berget-surface-raised",
|
|
681
|
+
error: "border border-berget-destructive-border bg-berget-destructive text-berget-destructive-foreground hover:bg-berget-destructive/90",
|
|
682
|
+
success: "border border-berget-success-border bg-berget-success text-berget-success-foreground hover:bg-berget-success/90"
|
|
683
|
+
},
|
|
684
|
+
size: {
|
|
685
|
+
sm: "w-4 h-4",
|
|
686
|
+
default: "w-5 h-5",
|
|
687
|
+
lg: "w-6 h-6"
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
defaultVariants: {
|
|
691
|
+
variant: "default",
|
|
692
|
+
size: "default"
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
);
|
|
696
|
+
var Checkbox2 = React13.forwardRef(
|
|
697
|
+
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
698
|
+
const generatedId = React13.useId();
|
|
699
|
+
const checkboxId = id || generatedId;
|
|
700
|
+
const errorId = `${checkboxId}-error`;
|
|
701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
702
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
703
|
+
Checkbox,
|
|
704
|
+
{
|
|
705
|
+
ref,
|
|
706
|
+
id: checkboxId,
|
|
707
|
+
disabled,
|
|
708
|
+
"aria-invalid": !!error,
|
|
709
|
+
"aria-describedby": error ? errorId : void 0,
|
|
710
|
+
className: cn(
|
|
711
|
+
checkboxVariants({ variant, size }),
|
|
712
|
+
"cursor-pointer",
|
|
713
|
+
disabled && "cursor-not-allowed pointer-events-none",
|
|
714
|
+
className
|
|
715
|
+
),
|
|
716
|
+
...props,
|
|
717
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CheckboxPrimitive2.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
718
|
+
import_lucide_react3.Check,
|
|
719
|
+
{
|
|
720
|
+
className: "h-4 w-4 text-current stroke-current",
|
|
721
|
+
style: { color: "currentColor", stroke: "currentColor" }
|
|
722
|
+
}
|
|
723
|
+
) })
|
|
724
|
+
}
|
|
725
|
+
) }),
|
|
726
|
+
(label || description || error) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
727
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
728
|
+
"label",
|
|
729
|
+
{
|
|
730
|
+
htmlFor: checkboxId,
|
|
731
|
+
className: cn(
|
|
732
|
+
"text-sm font-sans leading-none",
|
|
733
|
+
disabled ? "text-white/40 cursor-not-allowed" : variant === "error" ? "text-berget-destructive-foreground cursor-pointer" : variant === "success" ? "text-berget-success-foreground cursor-pointer" : "cursor-pointer",
|
|
734
|
+
error && "text-berget-destructive-foreground"
|
|
735
|
+
),
|
|
736
|
+
children: label
|
|
737
|
+
}
|
|
738
|
+
),
|
|
739
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Typography, { variant: "xs", color: "muted", children: description }),
|
|
740
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
741
|
+
] })
|
|
742
|
+
] });
|
|
743
|
+
}
|
|
744
|
+
);
|
|
745
|
+
Checkbox2.displayName = "Checkbox";
|
|
746
|
+
|
|
747
|
+
// src/components/switch/Switch.tsx
|
|
748
|
+
var React14 = __toESM(require("react"), 1);
|
|
749
|
+
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
750
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
751
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
752
|
+
var switchRootVariants = (0, import_class_variance_authority9.cva)(
|
|
753
|
+
"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",
|
|
754
|
+
{
|
|
755
|
+
variants: {
|
|
756
|
+
variant: {
|
|
757
|
+
default: "data-[state=unchecked]:bg-berget-border data-[state=checked]:bg-berget-secondary",
|
|
758
|
+
primary: "data-[state=unchecked]:bg-berget-border-subtle data-[state=checked]:bg-berget-switch-primary-checked",
|
|
759
|
+
subtle: "data-[state=unchecked]:bg-berget-border-subtle data-[state=checked]:bg-berget-switch-subtle-checked"
|
|
760
|
+
},
|
|
761
|
+
size: {
|
|
762
|
+
sm: "h-5 w-9",
|
|
763
|
+
default: "h-6 w-11",
|
|
764
|
+
lg: "h-7 w-[52px]"
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
defaultVariants: {
|
|
768
|
+
variant: "default",
|
|
769
|
+
size: "default"
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
);
|
|
773
|
+
var switchThumbVariants = (0, import_class_variance_authority9.cva)(
|
|
774
|
+
"pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground",
|
|
775
|
+
{
|
|
776
|
+
variants: {
|
|
777
|
+
size: {
|
|
778
|
+
sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",
|
|
779
|
+
default: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
780
|
+
lg: "h-6 w-6 data-[state=checked]:translate-x-6 data-[state=unchecked]:translate-x-0"
|
|
781
|
+
}
|
|
782
|
+
},
|
|
783
|
+
defaultVariants: {
|
|
784
|
+
size: "default"
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
);
|
|
788
|
+
var Switch = React14.forwardRef(
|
|
789
|
+
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
790
|
+
const generatedId = React14.useId();
|
|
791
|
+
const switchId = id || generatedId;
|
|
792
|
+
const errorId = `${switchId}-error`;
|
|
793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
794
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
795
|
+
SwitchPrimitives.Root,
|
|
796
|
+
{
|
|
797
|
+
ref,
|
|
798
|
+
id: switchId,
|
|
799
|
+
disabled,
|
|
800
|
+
"aria-invalid": !!error,
|
|
801
|
+
"aria-describedby": error ? errorId : void 0,
|
|
802
|
+
className: cn(
|
|
803
|
+
switchRootVariants({ variant, size }),
|
|
804
|
+
disabled && "cursor-not-allowed pointer-events-none",
|
|
805
|
+
className
|
|
806
|
+
),
|
|
807
|
+
...props,
|
|
808
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SwitchPrimitives.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
809
|
+
}
|
|
810
|
+
),
|
|
811
|
+
(label || description || error) && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
812
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
813
|
+
"label",
|
|
814
|
+
{
|
|
815
|
+
htmlFor: switchId,
|
|
816
|
+
className: cn(
|
|
817
|
+
"text-sm font-sans leading-none",
|
|
818
|
+
disabled ? "text-muted-foreground cursor-not-allowed" : error ? "text-berget-destructive-foreground cursor-pointer" : "text-foreground cursor-pointer"
|
|
819
|
+
),
|
|
820
|
+
children: label
|
|
821
|
+
}
|
|
822
|
+
),
|
|
823
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Typography, { variant: "xs", color: "muted", children: description }),
|
|
824
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
825
|
+
] })
|
|
826
|
+
] });
|
|
827
|
+
}
|
|
828
|
+
);
|
|
829
|
+
Switch.displayName = "Switch";
|
|
830
|
+
|
|
831
|
+
// src/components/select/Select.tsx
|
|
832
|
+
var React16 = __toESM(require("react"), 1);
|
|
833
|
+
var import_class_variance_authority10 = require("class-variance-authority");
|
|
834
|
+
|
|
835
|
+
// src/primitives/select.tsx
|
|
836
|
+
var React15 = __toESM(require("react"), 1);
|
|
837
|
+
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
838
|
+
var import_lucide_react4 = require("lucide-react");
|
|
839
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
840
|
+
var Select = SelectPrimitive.Root;
|
|
841
|
+
var SelectValue = SelectPrimitive.Value;
|
|
842
|
+
var SelectTrigger = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
843
|
+
SelectPrimitive.Trigger,
|
|
844
|
+
{
|
|
845
|
+
ref,
|
|
846
|
+
className: cn(
|
|
847
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
848
|
+
className
|
|
849
|
+
),
|
|
850
|
+
...props,
|
|
851
|
+
children: [
|
|
852
|
+
children,
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
854
|
+
]
|
|
855
|
+
}
|
|
856
|
+
));
|
|
857
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
858
|
+
var SelectScrollUpButton = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
859
|
+
SelectPrimitive.ScrollUpButton,
|
|
860
|
+
{
|
|
861
|
+
ref,
|
|
862
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
863
|
+
...props,
|
|
864
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ChevronUp, { className: "h-4 w-4" })
|
|
865
|
+
}
|
|
866
|
+
));
|
|
867
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
868
|
+
var SelectScrollDownButton = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
869
|
+
SelectPrimitive.ScrollDownButton,
|
|
870
|
+
{
|
|
871
|
+
ref,
|
|
872
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
873
|
+
...props,
|
|
874
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4" })
|
|
875
|
+
}
|
|
876
|
+
));
|
|
877
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
878
|
+
var SelectContent = React15.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
879
|
+
SelectPrimitive.Content,
|
|
880
|
+
{
|
|
881
|
+
ref,
|
|
882
|
+
className: cn(
|
|
883
|
+
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
|
|
884
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
885
|
+
className
|
|
886
|
+
),
|
|
887
|
+
position,
|
|
888
|
+
...props,
|
|
889
|
+
children: [
|
|
890
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SelectScrollUpButton, {}),
|
|
891
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
892
|
+
SelectPrimitive.Viewport,
|
|
893
|
+
{
|
|
894
|
+
className: cn(
|
|
895
|
+
"p-1",
|
|
896
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
897
|
+
),
|
|
898
|
+
children
|
|
899
|
+
}
|
|
900
|
+
),
|
|
901
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SelectScrollDownButton, {})
|
|
902
|
+
]
|
|
903
|
+
}
|
|
904
|
+
) }));
|
|
905
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
906
|
+
var SelectLabel = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
907
|
+
SelectPrimitive.Label,
|
|
908
|
+
{
|
|
909
|
+
ref,
|
|
910
|
+
className: cn("py-1.5 pl-8 pr-2 text-sm ", className),
|
|
911
|
+
...props
|
|
912
|
+
}
|
|
913
|
+
));
|
|
914
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
915
|
+
var SelectItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
916
|
+
SelectPrimitive.Item,
|
|
917
|
+
{
|
|
918
|
+
ref,
|
|
919
|
+
className: cn(
|
|
920
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
921
|
+
className
|
|
922
|
+
),
|
|
923
|
+
...props,
|
|
924
|
+
children: [
|
|
925
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Check, { className: "h-4 w-4" }) }) }),
|
|
926
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SelectPrimitive.ItemText, { children })
|
|
927
|
+
]
|
|
928
|
+
}
|
|
929
|
+
));
|
|
930
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
931
|
+
var SelectSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
932
|
+
SelectPrimitive.Separator,
|
|
933
|
+
{
|
|
934
|
+
ref,
|
|
935
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
936
|
+
...props
|
|
937
|
+
}
|
|
938
|
+
));
|
|
939
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
940
|
+
|
|
941
|
+
// src/components/select/Select.tsx
|
|
942
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
943
|
+
var selectVariants = (0, import_class_variance_authority10.cva)(
|
|
944
|
+
"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",
|
|
945
|
+
{
|
|
946
|
+
variants: {
|
|
947
|
+
variant: {
|
|
948
|
+
default: "border-berget-border-interactive hover:bg-berget-surface-hover",
|
|
949
|
+
primary: "border-berget-primary-border bg-berget-primary-tint hover:bg-berget-surface-hover",
|
|
950
|
+
subtle: "border-berget-border-subtle hover:bg-berget-surface-hover",
|
|
951
|
+
muted: "border-berget-border-subtle/50 hover:bg-berget-surface-hover"
|
|
952
|
+
},
|
|
953
|
+
size: {
|
|
954
|
+
sm: "px-3 py-2 text-xs",
|
|
955
|
+
default: "px-4 py-3 text-sm",
|
|
956
|
+
lg: "px-5 py-4 text-base"
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
defaultVariants: {
|
|
960
|
+
variant: "default",
|
|
961
|
+
size: "default"
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
);
|
|
965
|
+
var Select2 = React16.forwardRef(
|
|
966
|
+
({
|
|
967
|
+
className,
|
|
968
|
+
variant,
|
|
969
|
+
size,
|
|
970
|
+
label,
|
|
971
|
+
description,
|
|
972
|
+
error,
|
|
973
|
+
placeholder,
|
|
974
|
+
options,
|
|
975
|
+
id,
|
|
976
|
+
disabled,
|
|
977
|
+
value,
|
|
978
|
+
defaultValue,
|
|
979
|
+
onValueChange,
|
|
980
|
+
name,
|
|
981
|
+
required
|
|
982
|
+
}, ref) => {
|
|
983
|
+
const generatedId = React16.useId();
|
|
984
|
+
const selectId = id || generatedId;
|
|
985
|
+
const errorId = `${selectId}-error`;
|
|
986
|
+
const descriptionId = `${selectId}-description`;
|
|
987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
988
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
989
|
+
"label",
|
|
990
|
+
{
|
|
991
|
+
htmlFor: selectId,
|
|
992
|
+
className: cn(
|
|
993
|
+
"text-sm font-sans leading-none",
|
|
994
|
+
disabled ? "text-muted-foreground cursor-not-allowed" : "text-foreground",
|
|
995
|
+
error && "text-berget-destructive-foreground"
|
|
996
|
+
),
|
|
997
|
+
children: label
|
|
998
|
+
}
|
|
999
|
+
),
|
|
1000
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1001
|
+
Select,
|
|
1002
|
+
{
|
|
1003
|
+
value,
|
|
1004
|
+
defaultValue,
|
|
1005
|
+
onValueChange,
|
|
1006
|
+
disabled,
|
|
1007
|
+
name,
|
|
1008
|
+
required,
|
|
1009
|
+
children: [
|
|
1010
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1011
|
+
SelectTrigger,
|
|
1012
|
+
{
|
|
1013
|
+
ref,
|
|
1014
|
+
id: selectId,
|
|
1015
|
+
"aria-invalid": !!error,
|
|
1016
|
+
"aria-describedby": cn(error && errorId, description && descriptionId),
|
|
1017
|
+
className: cn(
|
|
1018
|
+
selectVariants({ variant, size }),
|
|
1019
|
+
error && "border-berget-destructive-foreground/50 bg-berget-destructive",
|
|
1020
|
+
className
|
|
1021
|
+
),
|
|
1022
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectValue, { placeholder })
|
|
1023
|
+
}
|
|
1024
|
+
),
|
|
1025
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value)) })
|
|
1026
|
+
]
|
|
1027
|
+
}
|
|
1028
|
+
),
|
|
1029
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1030
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1031
|
+
] });
|
|
1032
|
+
}
|
|
1033
|
+
);
|
|
1034
|
+
Select2.displayName = "Select";
|
|
1035
|
+
|
|
1036
|
+
// src/components/text-area/TextArea.tsx
|
|
1037
|
+
var React18 = __toESM(require("react"), 1);
|
|
1038
|
+
var import_class_variance_authority11 = require("class-variance-authority");
|
|
1039
|
+
|
|
1040
|
+
// src/primitives/textarea.tsx
|
|
1041
|
+
var React17 = __toESM(require("react"), 1);
|
|
1042
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1043
|
+
var Textarea = React17.forwardRef(
|
|
1044
|
+
({ className, ...props }, ref) => {
|
|
1045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1046
|
+
"textarea",
|
|
1047
|
+
{
|
|
1048
|
+
className: cn(
|
|
1049
|
+
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1050
|
+
className
|
|
1051
|
+
),
|
|
1052
|
+
ref,
|
|
1053
|
+
...props
|
|
1054
|
+
}
|
|
1055
|
+
);
|
|
1056
|
+
}
|
|
1057
|
+
);
|
|
1058
|
+
Textarea.displayName = "Textarea";
|
|
1059
|
+
|
|
1060
|
+
// src/components/text-area/TextArea.tsx
|
|
1061
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1062
|
+
var textAreaVariants = (0, import_class_variance_authority11.cva)(
|
|
1063
|
+
"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",
|
|
1064
|
+
{
|
|
1065
|
+
variants: {
|
|
1066
|
+
variant: {
|
|
1067
|
+
default: "border-berget-border-interactive hover:bg-berget-surface-hover",
|
|
1068
|
+
primary: "border-berget-primary-border bg-berget-primary-tint hover:bg-berget-surface-hover",
|
|
1069
|
+
subtle: "border-berget-border-subtle hover:bg-berget-surface-hover",
|
|
1070
|
+
muted: "border-berget-border-subtle/50 hover:bg-berget-surface-hover"
|
|
1071
|
+
},
|
|
1072
|
+
size: {
|
|
1073
|
+
sm: "px-3 py-2 sm:px-4 sm:py-2.5 text-xs sm:text-sm",
|
|
1074
|
+
default: "px-4 py-3 sm:py-3.5 text-sm",
|
|
1075
|
+
lg: "px-5 py-4 sm:py-5 text-base sm:text-lg"
|
|
1076
|
+
}
|
|
1077
|
+
},
|
|
1078
|
+
defaultVariants: {
|
|
1079
|
+
variant: "default",
|
|
1080
|
+
size: "default"
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
);
|
|
1084
|
+
var TextArea = React18.forwardRef(
|
|
1085
|
+
({
|
|
1086
|
+
className,
|
|
1087
|
+
variant,
|
|
1088
|
+
size,
|
|
1089
|
+
label,
|
|
1090
|
+
description,
|
|
1091
|
+
error,
|
|
1092
|
+
placeholder,
|
|
1093
|
+
maxLength,
|
|
1094
|
+
showCount,
|
|
1095
|
+
rows,
|
|
1096
|
+
id,
|
|
1097
|
+
disabled,
|
|
1098
|
+
value,
|
|
1099
|
+
icon,
|
|
1100
|
+
secondaryIcon,
|
|
1101
|
+
actionButton,
|
|
1102
|
+
...props
|
|
1103
|
+
}, ref) => {
|
|
1104
|
+
const generatedId = React18.useId();
|
|
1105
|
+
const textareaId = id || generatedId;
|
|
1106
|
+
const errorId = `${textareaId}-error`;
|
|
1107
|
+
const descriptionId = `${textareaId}-description`;
|
|
1108
|
+
const characterCount = typeof value === "string" ? value.length : 0;
|
|
1109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1110
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1111
|
+
"label",
|
|
1112
|
+
{
|
|
1113
|
+
htmlFor: textareaId,
|
|
1114
|
+
className: cn(
|
|
1115
|
+
"text-sm font-sans leading-none",
|
|
1116
|
+
disabled ? "text-muted-foreground cursor-not-allowed" : "text-foreground",
|
|
1117
|
+
error && "text-berget-destructive-foreground"
|
|
1118
|
+
),
|
|
1119
|
+
children: label
|
|
1120
|
+
}
|
|
1121
|
+
),
|
|
1122
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "relative", children: [
|
|
1123
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute left-2 top-1/2 -translate-y-1/2", children: icon }),
|
|
1124
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1125
|
+
Textarea,
|
|
1126
|
+
{
|
|
1127
|
+
ref,
|
|
1128
|
+
id: textareaId,
|
|
1129
|
+
disabled,
|
|
1130
|
+
"aria-invalid": !!error,
|
|
1131
|
+
"aria-describedby": cn(error && errorId, description && descriptionId),
|
|
1132
|
+
className: cn(
|
|
1133
|
+
textAreaVariants({ variant, size }),
|
|
1134
|
+
error && "border-berget-destructive-foreground/50 bg-berget-destructive",
|
|
1135
|
+
disabled && "cursor-not-allowed",
|
|
1136
|
+
icon && "pl-11",
|
|
1137
|
+
secondaryIcon && "pr-20",
|
|
1138
|
+
actionButton && !secondaryIcon && "pr-12",
|
|
1139
|
+
secondaryIcon && actionButton && "pr-20",
|
|
1140
|
+
className
|
|
1141
|
+
),
|
|
1142
|
+
placeholder,
|
|
1143
|
+
maxLength,
|
|
1144
|
+
rows,
|
|
1145
|
+
value,
|
|
1146
|
+
...props
|
|
1147
|
+
}
|
|
1148
|
+
),
|
|
1149
|
+
secondaryIcon && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute right-12 top-1/2 -translate-y-1/2", children: secondaryIcon }),
|
|
1150
|
+
actionButton && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
1151
|
+
] }),
|
|
1152
|
+
(description || error || showCount && maxLength) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1153
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1154
|
+
(error || showCount && maxLength) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
1155
|
+
showCount && maxLength && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1156
|
+
Typography,
|
|
1157
|
+
{
|
|
1158
|
+
variant: "xs",
|
|
1159
|
+
className: cn(
|
|
1160
|
+
characterCount >= maxLength ? "text-berget-destructive-foreground" : "text-muted-foreground"
|
|
1161
|
+
),
|
|
1162
|
+
children: [
|
|
1163
|
+
characterCount,
|
|
1164
|
+
"/",
|
|
1165
|
+
maxLength
|
|
1166
|
+
]
|
|
1167
|
+
}
|
|
1168
|
+
),
|
|
1169
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1170
|
+
Typography,
|
|
1171
|
+
{
|
|
1172
|
+
variant: "xs",
|
|
1173
|
+
id: errorId,
|
|
1174
|
+
className: "text-berget-destructive-foreground",
|
|
1175
|
+
children: error
|
|
1176
|
+
}
|
|
1177
|
+
)
|
|
1178
|
+
] })
|
|
1179
|
+
] })
|
|
1180
|
+
] });
|
|
1181
|
+
}
|
|
1182
|
+
);
|
|
1183
|
+
TextArea.displayName = "TextArea";
|
|
1184
|
+
|
|
1185
|
+
// src/primitives/label.tsx
|
|
1186
|
+
var React19 = __toESM(require("react"), 1);
|
|
1187
|
+
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
1188
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
1189
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1190
|
+
var labelVariants = (0, import_class_variance_authority12.cva)(
|
|
1191
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1192
|
+
);
|
|
1193
|
+
var Label2 = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
1194
|
+
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
1195
|
+
|
|
1196
|
+
// src/primitives/field.tsx
|
|
1197
|
+
var import_react = require("react");
|
|
1198
|
+
var import_class_variance_authority13 = require("class-variance-authority");
|
|
1199
|
+
|
|
1200
|
+
// src/primitives/separator.tsx
|
|
1201
|
+
var React20 = __toESM(require("react"), 1);
|
|
1202
|
+
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
1203
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1204
|
+
var Separator2 = React20.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1205
|
+
SeparatorPrimitive.Root,
|
|
1206
|
+
{
|
|
1207
|
+
ref,
|
|
1208
|
+
decorative,
|
|
1209
|
+
orientation,
|
|
1210
|
+
className: cn(
|
|
1211
|
+
"shrink-0 bg-border",
|
|
1212
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
1213
|
+
className
|
|
1214
|
+
),
|
|
1215
|
+
...props
|
|
1216
|
+
}
|
|
1217
|
+
));
|
|
1218
|
+
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
1219
|
+
|
|
1220
|
+
// src/primitives/field.tsx
|
|
1221
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1222
|
+
function FieldSet({ className, ...props }) {
|
|
1223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1224
|
+
"fieldset",
|
|
1225
|
+
{
|
|
1226
|
+
"data-slot": "field-set",
|
|
1227
|
+
className: cn(
|
|
1228
|
+
"flex flex-col gap-6",
|
|
1229
|
+
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
1230
|
+
className
|
|
1231
|
+
),
|
|
1232
|
+
...props
|
|
1233
|
+
}
|
|
1234
|
+
);
|
|
1235
|
+
}
|
|
1236
|
+
function FieldLegend({
|
|
1237
|
+
className,
|
|
1238
|
+
variant = "legend",
|
|
1239
|
+
...props
|
|
1240
|
+
}) {
|
|
1241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1242
|
+
"legend",
|
|
1243
|
+
{
|
|
1244
|
+
"data-slot": "field-legend",
|
|
1245
|
+
"data-variant": variant,
|
|
1246
|
+
className: cn(
|
|
1247
|
+
"mb-3 font-medium",
|
|
1248
|
+
"data-[variant=legend]:text-base",
|
|
1249
|
+
"data-[variant=label]:text-sm",
|
|
1250
|
+
className
|
|
1251
|
+
),
|
|
1252
|
+
...props
|
|
1253
|
+
}
|
|
1254
|
+
);
|
|
1255
|
+
}
|
|
1256
|
+
function FieldGroup({ className, ...props }) {
|
|
1257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1258
|
+
"div",
|
|
1259
|
+
{
|
|
1260
|
+
"data-slot": "field-group",
|
|
1261
|
+
className: cn(
|
|
1262
|
+
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
1263
|
+
className
|
|
1264
|
+
),
|
|
1265
|
+
...props
|
|
1266
|
+
}
|
|
1267
|
+
);
|
|
1268
|
+
}
|
|
1269
|
+
var fieldVariants = (0, import_class_variance_authority13.cva)("group/field data-[invalid=true]:text-destructive flex w-full gap-3", {
|
|
1270
|
+
variants: {
|
|
1271
|
+
orientation: {
|
|
1272
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
1273
|
+
horizontal: [
|
|
1274
|
+
"flex-row items-center",
|
|
1275
|
+
"[&>[data-slot=field-label]]:flex-auto",
|
|
1276
|
+
"has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start"
|
|
1277
|
+
],
|
|
1278
|
+
responsive: [
|
|
1279
|
+
"@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
|
|
1280
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
1281
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
1282
|
+
]
|
|
1283
|
+
}
|
|
1284
|
+
},
|
|
1285
|
+
defaultVariants: {
|
|
1286
|
+
orientation: "vertical"
|
|
1287
|
+
}
|
|
1288
|
+
});
|
|
1289
|
+
function Field({
|
|
1290
|
+
className,
|
|
1291
|
+
orientation = "vertical",
|
|
1292
|
+
...props
|
|
1293
|
+
}) {
|
|
1294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1295
|
+
"div",
|
|
1296
|
+
{
|
|
1297
|
+
role: "group",
|
|
1298
|
+
"data-slot": "field",
|
|
1299
|
+
"data-orientation": orientation,
|
|
1300
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
1301
|
+
...props
|
|
1302
|
+
}
|
|
1303
|
+
);
|
|
1304
|
+
}
|
|
1305
|
+
function FieldContent({ className, ...props }) {
|
|
1306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1307
|
+
"div",
|
|
1308
|
+
{
|
|
1309
|
+
"data-slot": "field-content",
|
|
1310
|
+
className: cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className),
|
|
1311
|
+
...props
|
|
1312
|
+
}
|
|
1313
|
+
);
|
|
1314
|
+
}
|
|
1315
|
+
function FieldLabel({ className, ...props }) {
|
|
1316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1317
|
+
Label2,
|
|
1318
|
+
{
|
|
1319
|
+
"data-slot": "field-label",
|
|
1320
|
+
className: cn(
|
|
1321
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
1322
|
+
"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",
|
|
1323
|
+
"has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
|
|
1324
|
+
className
|
|
1325
|
+
),
|
|
1326
|
+
...props
|
|
1327
|
+
}
|
|
1328
|
+
);
|
|
1329
|
+
}
|
|
1330
|
+
function FieldTitle({ className, ...props }) {
|
|
1331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1332
|
+
"div",
|
|
1333
|
+
{
|
|
1334
|
+
"data-slot": "field-label",
|
|
1335
|
+
className: cn(
|
|
1336
|
+
"flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
1337
|
+
className
|
|
1338
|
+
),
|
|
1339
|
+
...props
|
|
1340
|
+
}
|
|
1341
|
+
);
|
|
1342
|
+
}
|
|
1343
|
+
function FieldDescription({ className, ...props }) {
|
|
1344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1345
|
+
"p",
|
|
1346
|
+
{
|
|
1347
|
+
"data-slot": "field-description",
|
|
1348
|
+
className: cn(
|
|
1349
|
+
"text-muted-foreground text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
1350
|
+
"nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5",
|
|
1351
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
1352
|
+
className
|
|
1353
|
+
),
|
|
1354
|
+
...props
|
|
1355
|
+
}
|
|
1356
|
+
);
|
|
1357
|
+
}
|
|
1358
|
+
function FieldSeparator({
|
|
1359
|
+
children,
|
|
1360
|
+
className,
|
|
1361
|
+
...props
|
|
1362
|
+
}) {
|
|
1363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1364
|
+
"div",
|
|
1365
|
+
{
|
|
1366
|
+
"data-slot": "field-separator",
|
|
1367
|
+
"data-content": !!children,
|
|
1368
|
+
className: cn(
|
|
1369
|
+
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
1370
|
+
className
|
|
1371
|
+
),
|
|
1372
|
+
...props,
|
|
1373
|
+
children: [
|
|
1374
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
1375
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1376
|
+
"span",
|
|
1377
|
+
{
|
|
1378
|
+
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
1379
|
+
"data-slot": "field-separator-content",
|
|
1380
|
+
children
|
|
1381
|
+
}
|
|
1382
|
+
)
|
|
1383
|
+
]
|
|
1384
|
+
}
|
|
1385
|
+
);
|
|
1386
|
+
}
|
|
1387
|
+
function FieldError({
|
|
1388
|
+
className,
|
|
1389
|
+
children,
|
|
1390
|
+
errors,
|
|
1391
|
+
...props
|
|
1392
|
+
}) {
|
|
1393
|
+
const content = (0, import_react.useMemo)(() => {
|
|
1394
|
+
if (children) {
|
|
1395
|
+
return children;
|
|
1396
|
+
}
|
|
1397
|
+
if (!errors) {
|
|
1398
|
+
return null;
|
|
1399
|
+
}
|
|
1400
|
+
if (errors?.length === 1 && errors[0]?.message) {
|
|
1401
|
+
return errors[0].message;
|
|
1402
|
+
}
|
|
1403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map((error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("li", { children: error.message }, index)) });
|
|
1404
|
+
}, [children, errors]);
|
|
1405
|
+
if (!content) {
|
|
1406
|
+
return null;
|
|
1407
|
+
}
|
|
1408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1409
|
+
"div",
|
|
1410
|
+
{
|
|
1411
|
+
role: "alert",
|
|
1412
|
+
"data-slot": "field-error",
|
|
1413
|
+
className: cn("text-destructive text-sm font-normal", className),
|
|
1414
|
+
...props,
|
|
1415
|
+
children: content
|
|
1416
|
+
}
|
|
1417
|
+
);
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
// src/components/link/Link.tsx
|
|
1421
|
+
var React21 = __toESM(require("react"), 1);
|
|
1422
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
1423
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1424
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1425
|
+
var linkVariants = (0, import_class_variance_authority14.cva)(
|
|
1426
|
+
"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",
|
|
1427
|
+
{
|
|
1428
|
+
variants: {
|
|
1429
|
+
variant: {
|
|
1430
|
+
default: "text-foreground hover:text-foreground/80",
|
|
1431
|
+
primary: "text-berget-secondary hover:text-berget-secondary/80",
|
|
1432
|
+
secondary: "text-berget-accent hover:text-berget-accent/80",
|
|
1433
|
+
ghost: "text-muted-foreground hover:text-foreground",
|
|
1434
|
+
muted: "text-muted-foreground hover:text-muted-foreground/80",
|
|
1435
|
+
code: "text-berget-secondary hover:text-berget-secondary/80 font-mono text-sm bg-berget-primary-tint px-2 py-1 rounded hover:bg-berget-primary-tint-hover"
|
|
1436
|
+
},
|
|
1437
|
+
size: {
|
|
1438
|
+
sm: "text-sm",
|
|
1439
|
+
default: "text-base",
|
|
1440
|
+
lg: "text-lg"
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
defaultVariants: {
|
|
1444
|
+
variant: "default",
|
|
1445
|
+
size: "default"
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
);
|
|
1449
|
+
var Link = React21.forwardRef(
|
|
1450
|
+
({
|
|
1451
|
+
className,
|
|
1452
|
+
variant,
|
|
1453
|
+
size,
|
|
1454
|
+
external = false,
|
|
1455
|
+
icon,
|
|
1456
|
+
showExternalIcon = false,
|
|
1457
|
+
disabled = false,
|
|
1458
|
+
children,
|
|
1459
|
+
...props
|
|
1460
|
+
}, ref) => {
|
|
1461
|
+
const isExternal = external || typeof props.href === "string" && (props.href.startsWith("http://") || props.href.startsWith("https://") || props.href.startsWith("mailto:") || props.href.startsWith("tel:"));
|
|
1462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1463
|
+
"a",
|
|
1464
|
+
{
|
|
1465
|
+
ref,
|
|
1466
|
+
className: cn(linkVariants({ variant, size }), className),
|
|
1467
|
+
...disabled && {
|
|
1468
|
+
"aria-disabled": true,
|
|
1469
|
+
onClick: (e) => e.preventDefault()
|
|
1470
|
+
},
|
|
1471
|
+
...props,
|
|
1472
|
+
...isExternal && !disabled && {
|
|
1473
|
+
rel: "noopener noreferrer",
|
|
1474
|
+
target: "_blank"
|
|
1475
|
+
},
|
|
1476
|
+
children: [
|
|
1477
|
+
children,
|
|
1478
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "inline-flex items-center", children: icon }),
|
|
1479
|
+
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { icon: import_lucide_react5.ExternalLink, size: 16 }) })
|
|
1480
|
+
]
|
|
1481
|
+
}
|
|
1482
|
+
);
|
|
1483
|
+
}
|
|
1484
|
+
);
|
|
1485
|
+
Link.displayName = "Link";
|
|
1486
|
+
|
|
1487
|
+
// src/components/section/Section.tsx
|
|
1488
|
+
var React23 = __toESM(require("react"), 1);
|
|
1489
|
+
var import_class_variance_authority16 = require("class-variance-authority");
|
|
1490
|
+
|
|
1491
|
+
// src/components/container/Container.tsx
|
|
1492
|
+
var React22 = __toESM(require("react"), 1);
|
|
1493
|
+
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
1494
|
+
var import_class_variance_authority15 = require("class-variance-authority");
|
|
1495
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1496
|
+
var containerVariants = (0, import_class_variance_authority15.cva)("w-full mx-auto", {
|
|
1497
|
+
variants: {
|
|
1498
|
+
size: {
|
|
1499
|
+
sm: "max-w-3xl",
|
|
1500
|
+
md: "max-w-5xl",
|
|
1501
|
+
lg: "max-w-7xl",
|
|
1502
|
+
xl: "max-w-screen-xl",
|
|
1503
|
+
full: "max-w-full"
|
|
1504
|
+
},
|
|
1505
|
+
padding: {
|
|
1506
|
+
none: "px-0",
|
|
1507
|
+
sm: "px-4 sm:px-6",
|
|
1508
|
+
md: "px-4 sm:px-6 lg:px-8",
|
|
1509
|
+
lg: "px-4 sm:px-8 lg:px-12"
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
defaultVariants: {
|
|
1513
|
+
size: "lg",
|
|
1514
|
+
padding: "md"
|
|
1515
|
+
}
|
|
1516
|
+
});
|
|
1517
|
+
var Container = React22.forwardRef(
|
|
1518
|
+
({ className, size, padding, asChild = false, children, ...props }, ref) => {
|
|
1519
|
+
const Component = asChild ? import_react_slot2.Slot : "div";
|
|
1520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1521
|
+
Component,
|
|
1522
|
+
{
|
|
1523
|
+
ref,
|
|
1524
|
+
className: cn(containerVariants({ size, padding }), className),
|
|
1525
|
+
...props,
|
|
1526
|
+
children
|
|
1527
|
+
}
|
|
1528
|
+
);
|
|
1529
|
+
}
|
|
1530
|
+
);
|
|
1531
|
+
Container.displayName = "Container";
|
|
1532
|
+
|
|
1533
|
+
// src/components/section/Section.tsx
|
|
1534
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1535
|
+
var sectionVariants = (0, import_class_variance_authority16.cva)("relative", {
|
|
1536
|
+
variants: {
|
|
1537
|
+
padding: {
|
|
1538
|
+
none: "",
|
|
1539
|
+
sm: "py-12",
|
|
1540
|
+
md: "py-16",
|
|
1541
|
+
lg: "py-24",
|
|
1542
|
+
xl: "py-32"
|
|
1543
|
+
},
|
|
1544
|
+
background: {
|
|
1545
|
+
transparent: "",
|
|
1546
|
+
muted: "bg-berget-section-muted-bg"
|
|
1547
|
+
}
|
|
1548
|
+
},
|
|
1549
|
+
defaultVariants: {
|
|
1550
|
+
padding: "lg",
|
|
1551
|
+
background: "transparent"
|
|
1552
|
+
}
|
|
1553
|
+
});
|
|
1554
|
+
var Section = React23.forwardRef(
|
|
1555
|
+
({ className, padding, background, children, ...props }, ref) => {
|
|
1556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1557
|
+
"section",
|
|
1558
|
+
{
|
|
1559
|
+
ref,
|
|
1560
|
+
className: cn(sectionVariants({ padding, background }), className),
|
|
1561
|
+
...props,
|
|
1562
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Container, { children })
|
|
1563
|
+
}
|
|
1564
|
+
);
|
|
1565
|
+
}
|
|
1566
|
+
);
|
|
1567
|
+
Section.displayName = "Section";
|
|
1568
|
+
|
|
1569
|
+
// src/components/section-header/SectionHeader.tsx
|
|
1570
|
+
var React24 = __toESM(require("react"), 1);
|
|
1571
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1572
|
+
var SectionHeader = React24.forwardRef(
|
|
1573
|
+
({
|
|
1574
|
+
className,
|
|
1575
|
+
title,
|
|
1576
|
+
description,
|
|
1577
|
+
descriptionVariant = "large",
|
|
1578
|
+
tagline,
|
|
1579
|
+
action,
|
|
1580
|
+
headingLevel = "h2",
|
|
1581
|
+
id,
|
|
1582
|
+
...props
|
|
1583
|
+
}, ref) => {
|
|
1584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1585
|
+
"div",
|
|
1586
|
+
{
|
|
1587
|
+
id,
|
|
1588
|
+
ref,
|
|
1589
|
+
className: cn("w-full px-fluid-md py-fluid-xl text-center", className),
|
|
1590
|
+
...props,
|
|
1591
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col items-center gap-fluid-lg", children: [
|
|
1592
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "max-w-3xl mx-auto flex flex-col items-center gap-fluid-lg", children: [
|
|
1593
|
+
tagline && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Badge, { variant: "default", className: "text-sm", children: tagline }),
|
|
1594
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col items-center gap-fluid-sm", children: [
|
|
1595
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Typography, { variant: headingLevel, children: title }),
|
|
1596
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Typography, { variant: descriptionVariant, color: "muted", children: description })
|
|
1597
|
+
] })
|
|
1598
|
+
] }),
|
|
1599
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "mt-4", children: action })
|
|
1600
|
+
] })
|
|
1601
|
+
}
|
|
1602
|
+
);
|
|
1603
|
+
}
|
|
1604
|
+
);
|
|
1605
|
+
SectionHeader.displayName = "SectionHeader";
|
|
1606
|
+
|
|
1607
|
+
// src/components/grid/Grid.tsx
|
|
1608
|
+
var React25 = __toESM(require("react"), 1);
|
|
1609
|
+
var import_class_variance_authority17 = require("class-variance-authority");
|
|
1610
|
+
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
1611
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1612
|
+
var gridVariants = (0, import_class_variance_authority17.cva)("grid", {
|
|
1613
|
+
variants: {
|
|
1614
|
+
align: {
|
|
1615
|
+
start: "items-start",
|
|
1616
|
+
center: "items-center",
|
|
1617
|
+
end: "items-end",
|
|
1618
|
+
stretch: "items-stretch"
|
|
1619
|
+
},
|
|
1620
|
+
justify: {
|
|
1621
|
+
start: "justify-start",
|
|
1622
|
+
center: "justify-center",
|
|
1623
|
+
end: "justify-end",
|
|
1624
|
+
between: "justify-between",
|
|
1625
|
+
around: "justify-around",
|
|
1626
|
+
evenly: "justify-evenly"
|
|
1627
|
+
}
|
|
1628
|
+
},
|
|
1629
|
+
defaultVariants: {
|
|
1630
|
+
align: "stretch",
|
|
1631
|
+
justify: "start"
|
|
1632
|
+
}
|
|
1633
|
+
});
|
|
1634
|
+
var Grid = React25.forwardRef(
|
|
1635
|
+
({ className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props }, ref) => {
|
|
1636
|
+
const Component = asChild ? import_react_slot3.Slot : "div";
|
|
1637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1638
|
+
Component,
|
|
1639
|
+
{
|
|
1640
|
+
ref,
|
|
1641
|
+
className: cn(
|
|
1642
|
+
gridVariants({ align, justify }),
|
|
1643
|
+
cols !== void 0 && `grid-cols-${cols}`,
|
|
1644
|
+
rows !== void 0 && `grid-rows-${rows}`,
|
|
1645
|
+
gap !== void 0 && `gap-${gap}`,
|
|
1646
|
+
gapX !== void 0 && `gap-x-${gapX}`,
|
|
1647
|
+
gapY !== void 0 && `gap-y-${gapY}`,
|
|
1648
|
+
className
|
|
1649
|
+
),
|
|
1650
|
+
...props,
|
|
1651
|
+
children
|
|
1652
|
+
}
|
|
1653
|
+
);
|
|
1654
|
+
}
|
|
1655
|
+
);
|
|
1656
|
+
Grid.displayName = "Grid";
|
|
1657
|
+
|
|
1658
|
+
// src/components/box/Box.tsx
|
|
1659
|
+
var React26 = __toESM(require("react"), 1);
|
|
1660
|
+
var import_class_variance_authority18 = require("class-variance-authority");
|
|
1661
|
+
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
1662
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1663
|
+
var boxVariants = (0, import_class_variance_authority18.cva)("flex", {
|
|
1664
|
+
variants: {
|
|
1665
|
+
direction: {
|
|
1666
|
+
row: "flex-row",
|
|
1667
|
+
column: "flex-col",
|
|
1668
|
+
"row-reverse": "flex-row-reverse",
|
|
1669
|
+
"column-reverse": "flex-col-reverse"
|
|
1670
|
+
},
|
|
1671
|
+
align: {
|
|
1672
|
+
start: "items-start",
|
|
1673
|
+
center: "items-center",
|
|
1674
|
+
end: "items-end",
|
|
1675
|
+
stretch: "items-stretch",
|
|
1676
|
+
baseline: "items-baseline"
|
|
1677
|
+
},
|
|
1678
|
+
justify: {
|
|
1679
|
+
start: "justify-start",
|
|
1680
|
+
center: "justify-center",
|
|
1681
|
+
end: "justify-end",
|
|
1682
|
+
between: "justify-between",
|
|
1683
|
+
around: "justify-around",
|
|
1684
|
+
evenly: "justify-evenly"
|
|
1685
|
+
},
|
|
1686
|
+
wrap: {
|
|
1687
|
+
nowrap: "flex-nowrap",
|
|
1688
|
+
wrap: "flex-wrap",
|
|
1689
|
+
"wrap-reverse": "flex-wrap-reverse"
|
|
1690
|
+
}
|
|
1691
|
+
},
|
|
1692
|
+
defaultVariants: {
|
|
1693
|
+
direction: "column",
|
|
1694
|
+
align: "start",
|
|
1695
|
+
justify: "start",
|
|
1696
|
+
wrap: "nowrap"
|
|
1697
|
+
}
|
|
1698
|
+
});
|
|
1699
|
+
var Box = React26.forwardRef(
|
|
1700
|
+
({ className, direction, align, justify, wrap, gap, asChild = false, children, ...props }, ref) => {
|
|
1701
|
+
const Component = asChild ? import_react_slot4.Slot : "div";
|
|
1702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1703
|
+
Component,
|
|
1704
|
+
{
|
|
1705
|
+
ref,
|
|
1706
|
+
className: cn(
|
|
1707
|
+
boxVariants({ direction, align, justify, wrap }),
|
|
1708
|
+
gap !== void 0 && `gap-${gap}`,
|
|
1709
|
+
className
|
|
1710
|
+
),
|
|
1711
|
+
...props,
|
|
1712
|
+
children
|
|
1713
|
+
}
|
|
1714
|
+
);
|
|
1715
|
+
}
|
|
1716
|
+
);
|
|
1717
|
+
Box.displayName = "Box";
|
|
1718
|
+
|
|
1719
|
+
// src/components/berget-logo/BergetLogo.tsx
|
|
1720
|
+
var React27 = __toESM(require("react"), 1);
|
|
1721
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1722
|
+
var BergetLogo = React27.forwardRef(
|
|
1723
|
+
({ variant = "logotype", color = "white", size = 48, className, ...props }, ref) => {
|
|
1724
|
+
const fillColor = color === "white" ? "var(--berget-logo-light)" : "var(--berget-logo-dark)";
|
|
1725
|
+
if (variant === "symbol") {
|
|
1726
|
+
const aspectRatio2 = 463 / 419;
|
|
1727
|
+
const width2 = size * aspectRatio2;
|
|
1728
|
+
const height2 = size;
|
|
1729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1730
|
+
"svg",
|
|
1731
|
+
{
|
|
1732
|
+
ref,
|
|
1733
|
+
width: width2,
|
|
1734
|
+
height: height2,
|
|
1735
|
+
viewBox: "0 0 463 419",
|
|
1736
|
+
fill: "none",
|
|
1737
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1738
|
+
role: "img",
|
|
1739
|
+
"aria-label": "Berget symbol",
|
|
1740
|
+
className: cn("inline-block", className),
|
|
1741
|
+
...props,
|
|
1742
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1743
|
+
"path",
|
|
1744
|
+
{
|
|
1745
|
+
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",
|
|
1746
|
+
style: { fill: fillColor }
|
|
1747
|
+
}
|
|
1748
|
+
)
|
|
1749
|
+
}
|
|
1750
|
+
);
|
|
1751
|
+
}
|
|
1752
|
+
const aspectRatio = 793.63 / 204.37;
|
|
1753
|
+
const width = size * aspectRatio;
|
|
1754
|
+
const height = size;
|
|
1755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1756
|
+
"svg",
|
|
1757
|
+
{
|
|
1758
|
+
ref,
|
|
1759
|
+
width,
|
|
1760
|
+
height,
|
|
1761
|
+
viewBox: "0 0 793.63 204.37",
|
|
1762
|
+
fill: "none",
|
|
1763
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1764
|
+
role: "img",
|
|
1765
|
+
"aria-label": "Berget",
|
|
1766
|
+
className: cn("inline-block", className),
|
|
1767
|
+
...props,
|
|
1768
|
+
children: [
|
|
1769
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("g", { style: { fill: fillColor }, children: [
|
|
1770
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1771
|
+
"path",
|
|
1772
|
+
{
|
|
1773
|
+
className: "berget-logotype-fill",
|
|
1774
|
+
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"
|
|
1775
|
+
}
|
|
1776
|
+
),
|
|
1777
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1778
|
+
"path",
|
|
1779
|
+
{
|
|
1780
|
+
className: "berget-logotype-fill",
|
|
1781
|
+
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"
|
|
1782
|
+
}
|
|
1783
|
+
),
|
|
1784
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1785
|
+
"path",
|
|
1786
|
+
{
|
|
1787
|
+
className: "berget-logotype-fill",
|
|
1788
|
+
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"
|
|
1789
|
+
}
|
|
1790
|
+
),
|
|
1791
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1792
|
+
"path",
|
|
1793
|
+
{
|
|
1794
|
+
className: "berget-logotype-fill",
|
|
1795
|
+
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"
|
|
1796
|
+
}
|
|
1797
|
+
),
|
|
1798
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1799
|
+
"path",
|
|
1800
|
+
{
|
|
1801
|
+
className: "berget-logotype-fill",
|
|
1802
|
+
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"
|
|
1803
|
+
}
|
|
1804
|
+
),
|
|
1805
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1806
|
+
"path",
|
|
1807
|
+
{
|
|
1808
|
+
className: "berget-logotype-fill",
|
|
1809
|
+
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"
|
|
1810
|
+
}
|
|
1811
|
+
),
|
|
1812
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1813
|
+
"path",
|
|
1814
|
+
{
|
|
1815
|
+
className: "berget-logotype-fill",
|
|
1816
|
+
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"
|
|
1817
|
+
}
|
|
1818
|
+
),
|
|
1819
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("path", { className: "berget-logotype-fill", d: "M778.48,172.54v-96.04h15.15v96.04h-15.15Z" })
|
|
1820
|
+
] }),
|
|
1821
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1822
|
+
"path",
|
|
1823
|
+
{
|
|
1824
|
+
style: { fill: fillColor },
|
|
1825
|
+
d: "M99.9,0h24.37l99.9,202.18h-25.14l-44.26-77.52-27.24-41.38-14.84-41.81,2.44,1.3h-6.09l2.44-1.3-61.72,123-25.4,37.71H0L99.9,0Z"
|
|
1826
|
+
}
|
|
1827
|
+
)
|
|
1828
|
+
]
|
|
1829
|
+
}
|
|
1830
|
+
);
|
|
1831
|
+
}
|
|
1832
|
+
);
|
|
1833
|
+
BergetLogo.displayName = "BergetLogo";
|
|
1834
|
+
|
|
1835
|
+
// src/components/header/Header.tsx
|
|
1836
|
+
var React29 = __toESM(require("react"), 1);
|
|
1837
|
+
var import_class_variance_authority19 = require("class-variance-authority");
|
|
1838
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1839
|
+
|
|
1840
|
+
// src/components/language-select/LanguageSelect.tsx
|
|
1841
|
+
var React28 = __toESM(require("react"), 1);
|
|
1842
|
+
var SelectPrimitive2 = __toESM(require("@radix-ui/react-select"), 1);
|
|
1843
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1844
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1845
|
+
var LanguageSelect = React28.forwardRef(({ className, options, value, onValueChange }, ref) => {
|
|
1846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(SelectPrimitive2.Root, { value, onValueChange, children: [
|
|
1847
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1848
|
+
SelectPrimitive2.Trigger,
|
|
1849
|
+
{
|
|
1850
|
+
ref,
|
|
1851
|
+
className: cn(
|
|
1852
|
+
// Base styles
|
|
1853
|
+
"h-8 w-8 p-0 rounded-full",
|
|
1854
|
+
"flex items-center justify-center",
|
|
1855
|
+
// Border and background
|
|
1856
|
+
"border border-berget-border-subtle",
|
|
1857
|
+
"bg-transparent",
|
|
1858
|
+
// Hover effect
|
|
1859
|
+
"hover:bg-berget-surface-hover",
|
|
1860
|
+
// Transitions
|
|
1861
|
+
"transition-all duration-200",
|
|
1862
|
+
// Focus styles - remove all focus rings
|
|
1863
|
+
"focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
1864
|
+
// Disabled state
|
|
1865
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1866
|
+
className
|
|
1867
|
+
),
|
|
1868
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { icon: import_lucide_react6.Globe, size: 16 })
|
|
1869
|
+
}
|
|
1870
|
+
),
|
|
1871
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1872
|
+
SelectPrimitive2.Content,
|
|
1873
|
+
{
|
|
1874
|
+
className: cn(
|
|
1875
|
+
// Positioning and z-index
|
|
1876
|
+
"relative z-50 min-w-[8rem]",
|
|
1877
|
+
// Overflow handling
|
|
1878
|
+
"overflow-y-auto overflow-x-hidden",
|
|
1879
|
+
// Border and background
|
|
1880
|
+
"border border-berget-border bg-berget-background",
|
|
1881
|
+
"text-berget-foreground",
|
|
1882
|
+
// Shadow
|
|
1883
|
+
"shadow-berget-lg",
|
|
1884
|
+
// Rounded corners
|
|
1885
|
+
"rounded-md",
|
|
1886
|
+
// Animations
|
|
1887
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1888
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1889
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
1890
|
+
// Position-based animations
|
|
1891
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
1892
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
1893
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
1894
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
1895
|
+
// Origin for transforms
|
|
1896
|
+
"origin-[--radix-select-content-transform-origin]"
|
|
1897
|
+
),
|
|
1898
|
+
position: "popper",
|
|
1899
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive2.Viewport, { className: "p-1", children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1900
|
+
SelectPrimitive2.Item,
|
|
1901
|
+
{
|
|
1902
|
+
value: option.value,
|
|
1903
|
+
disabled: option.disabled,
|
|
1904
|
+
className: cn(
|
|
1905
|
+
// Layout
|
|
1906
|
+
"relative flex w-full cursor-default",
|
|
1907
|
+
"select-none items-center rounded-sm py-2 px-3",
|
|
1908
|
+
// Text
|
|
1909
|
+
"text-sm outline-none",
|
|
1910
|
+
// Focus/hover styles
|
|
1911
|
+
"focus:bg-berget-primary-tint focus:text-berget-foreground",
|
|
1912
|
+
"hover:bg-berget-primary-tint",
|
|
1913
|
+
// Disabled state
|
|
1914
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
1915
|
+
),
|
|
1916
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive2.ItemText, { children: option.label })
|
|
1917
|
+
},
|
|
1918
|
+
option.value
|
|
1919
|
+
)) })
|
|
1920
|
+
}
|
|
1921
|
+
) })
|
|
1922
|
+
] });
|
|
1923
|
+
});
|
|
1924
|
+
LanguageSelect.displayName = "LanguageSelect";
|
|
1925
|
+
|
|
1926
|
+
// src/components/header/Header.tsx
|
|
1927
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1928
|
+
var headerVariants = (0, import_class_variance_authority19.cva)(
|
|
1929
|
+
"sticky top-0 z-50 header-backdrop backdrop-blur-xl border-b border-berget-border transition-all duration-200",
|
|
1930
|
+
{
|
|
1931
|
+
variants: {
|
|
1932
|
+
variant: {
|
|
1933
|
+
default: "",
|
|
1934
|
+
transparent: "border-transparent bg-transparent backdrop-blur-none"
|
|
1935
|
+
}
|
|
1936
|
+
},
|
|
1937
|
+
defaultVariants: {
|
|
1938
|
+
variant: "default"
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
);
|
|
1942
|
+
var HeaderContext = React29.createContext({
|
|
1943
|
+
isMobileMenuOpen: false,
|
|
1944
|
+
setIsMobileMenuOpen: () => {
|
|
1945
|
+
}
|
|
1946
|
+
});
|
|
1947
|
+
var useHeaderContext = () => React29.useContext(HeaderContext);
|
|
1948
|
+
var HeaderLogo = React29.forwardRef(
|
|
1949
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref, className: cn("flex items-center", className), ...props, children })
|
|
1950
|
+
);
|
|
1951
|
+
HeaderLogo.displayName = "HeaderLogo";
|
|
1952
|
+
var HeaderNav = React29.forwardRef(({ className, links, ...props }, ref) => {
|
|
1953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("nav", { ref, className: cn("hidden md:flex items-center gap-fluid-lg", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ul", { className: "flex items-center gap-fluid-lg", children: links.map((link) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1954
|
+
Link,
|
|
1955
|
+
{
|
|
1956
|
+
href: link.href,
|
|
1957
|
+
variant: link.active ? "primary" : "default",
|
|
1958
|
+
size: "sm",
|
|
1959
|
+
className: cn("relative transition-all duration-200", link.active && "font-medium"),
|
|
1960
|
+
children: [
|
|
1961
|
+
link.icon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { icon: link.icon, size: 16 }) }),
|
|
1962
|
+
link.label
|
|
1963
|
+
]
|
|
1964
|
+
}
|
|
1965
|
+
) }, link.href)) }) });
|
|
1966
|
+
});
|
|
1967
|
+
HeaderNav.displayName = "HeaderNav";
|
|
1968
|
+
var HeaderActions = React29.forwardRef(
|
|
1969
|
+
({
|
|
1970
|
+
className,
|
|
1971
|
+
languageOptions,
|
|
1972
|
+
currentLanguage,
|
|
1973
|
+
onLanguageChange,
|
|
1974
|
+
loginButton,
|
|
1975
|
+
ctaButton,
|
|
1976
|
+
...props
|
|
1977
|
+
}, ref) => {
|
|
1978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { ref, className: cn("hidden md:flex items-center gap-2", className), ...props, children: [
|
|
1979
|
+
languageOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1980
|
+
LanguageSelect,
|
|
1981
|
+
{
|
|
1982
|
+
options: languageOptions,
|
|
1983
|
+
value: currentLanguage,
|
|
1984
|
+
onValueChange: onLanguageChange
|
|
1985
|
+
}
|
|
1986
|
+
),
|
|
1987
|
+
loginButton,
|
|
1988
|
+
ctaButton
|
|
1989
|
+
] });
|
|
1990
|
+
}
|
|
1991
|
+
);
|
|
1992
|
+
HeaderActions.displayName = "HeaderActions";
|
|
1993
|
+
var MobileMenuButton = React29.forwardRef(({ className, ...props }, ref) => {
|
|
1994
|
+
const { isMobileMenuOpen, setIsMobileMenuOpen } = useHeaderContext();
|
|
1995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1996
|
+
"button",
|
|
1997
|
+
{
|
|
1998
|
+
ref,
|
|
1999
|
+
className: cn(
|
|
2000
|
+
"md:hidden flex items-center justify-center w-8 h-8 rounded-full",
|
|
2001
|
+
"cursor-pointer transition-all duration-200",
|
|
2002
|
+
"hover:bg-berget-surface-hover-dark",
|
|
2003
|
+
className
|
|
2004
|
+
),
|
|
2005
|
+
onClick: () => setIsMobileMenuOpen(!isMobileMenuOpen),
|
|
2006
|
+
"aria-label": isMobileMenuOpen ? "Close menu" : "Open menu",
|
|
2007
|
+
"aria-expanded": isMobileMenuOpen,
|
|
2008
|
+
"aria-controls": "mobile-menu",
|
|
2009
|
+
...props,
|
|
2010
|
+
children: isMobileMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { icon: import_lucide_react7.X, size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { icon: import_lucide_react7.Menu, size: 16 })
|
|
2011
|
+
}
|
|
2012
|
+
);
|
|
2013
|
+
});
|
|
2014
|
+
MobileMenuButton.displayName = "MobileMenuButton";
|
|
2015
|
+
var MobileMenu = React29.forwardRef(
|
|
2016
|
+
({
|
|
2017
|
+
className,
|
|
2018
|
+
links,
|
|
2019
|
+
languageOptions,
|
|
2020
|
+
currentLanguage,
|
|
2021
|
+
onLanguageChange,
|
|
2022
|
+
loginButton,
|
|
2023
|
+
ctaButton,
|
|
2024
|
+
...props
|
|
2025
|
+
}, ref) => {
|
|
2026
|
+
const { isMobileMenuOpen, setIsMobileMenuOpen } = useHeaderContext();
|
|
2027
|
+
if (!isMobileMenuOpen) return null;
|
|
2028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2029
|
+
"nav",
|
|
2030
|
+
{
|
|
2031
|
+
ref,
|
|
2032
|
+
id: "mobile-menu",
|
|
2033
|
+
"aria-label": "Mobile navigation menu",
|
|
2034
|
+
className: cn(
|
|
2035
|
+
"md:hidden absolute top-full left-0 right-0 bg-berget-background border-b border-berget-border shadow-berget-lg",
|
|
2036
|
+
className
|
|
2037
|
+
),
|
|
2038
|
+
...props,
|
|
2039
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box, { direction: "column", gap: 0, className: "py-fluid-md", children: [
|
|
2040
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ul", { className: "px-fluid-md pb-fluid-md border-b border-berget-border/50", children: links.map((link) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2041
|
+
Link,
|
|
2042
|
+
{
|
|
2043
|
+
href: link.href,
|
|
2044
|
+
variant: link.active ? "primary" : "default",
|
|
2045
|
+
className: cn(
|
|
2046
|
+
"w-full py-3 px-4 rounded-lg transition-all duration-200 hover:bg-berget-surface-hover",
|
|
2047
|
+
link.active && "bg-berget-primary-tint font-medium"
|
|
2048
|
+
),
|
|
2049
|
+
onClick: () => setIsMobileMenuOpen(false),
|
|
2050
|
+
children: [
|
|
2051
|
+
link.icon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { icon: link.icon, size: 16 }) }),
|
|
2052
|
+
link.label
|
|
2053
|
+
]
|
|
2054
|
+
}
|
|
2055
|
+
) }, link.href)) }),
|
|
2056
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "px-fluid-md py-fluid-md", children: [
|
|
2057
|
+
languageOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mb-fluid-md", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2058
|
+
LanguageSelect,
|
|
2059
|
+
{
|
|
2060
|
+
options: languageOptions,
|
|
2061
|
+
value: currentLanguage,
|
|
2062
|
+
onValueChange: onLanguageChange
|
|
2063
|
+
}
|
|
2064
|
+
) }),
|
|
2065
|
+
loginButton && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mb-fluid-md w-full", children: loginButton }),
|
|
2066
|
+
ctaButton && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-full", children: ctaButton })
|
|
2067
|
+
] })
|
|
2068
|
+
] })
|
|
2069
|
+
}
|
|
2070
|
+
);
|
|
2071
|
+
}
|
|
2072
|
+
);
|
|
2073
|
+
MobileMenu.displayName = "MobileMenu";
|
|
2074
|
+
var Header = React29.forwardRef(
|
|
2075
|
+
({
|
|
2076
|
+
className,
|
|
2077
|
+
variant,
|
|
2078
|
+
logo,
|
|
2079
|
+
links,
|
|
2080
|
+
languageOptions,
|
|
2081
|
+
loginButton,
|
|
2082
|
+
ctaButton,
|
|
2083
|
+
currentLanguage,
|
|
2084
|
+
onLanguageChange,
|
|
2085
|
+
...props
|
|
2086
|
+
}, ref) => {
|
|
2087
|
+
const [isMobileMenuOpen, setIsMobileMenuOpen] = React29.useState(false);
|
|
2088
|
+
React29.useEffect(() => {
|
|
2089
|
+
if (isMobileMenuOpen) {
|
|
2090
|
+
document.body.style.overflow = "hidden";
|
|
2091
|
+
} else {
|
|
2092
|
+
document.body.style.overflow = "unset";
|
|
2093
|
+
}
|
|
2094
|
+
return () => {
|
|
2095
|
+
document.body.style.overflow = "unset";
|
|
2096
|
+
};
|
|
2097
|
+
}, [isMobileMenuOpen]);
|
|
2098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(HeaderContext.Provider, { value: { isMobileMenuOpen, setIsMobileMenuOpen }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("header", { ref, className: cn(headerVariants({ variant }), className), ...props, children: [
|
|
2099
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Container, { size: "xl", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box, { direction: "row", align: "center", justify: "between", className: "h-16", children: [
|
|
2100
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(HeaderLogo, { children: logo || /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(BergetLogo, { variant: "logotype", color: "white", size: 32 }) }),
|
|
2101
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(HeaderNav, { links }),
|
|
2102
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box, { direction: "row", align: "center", gap: 3, children: [
|
|
2103
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2104
|
+
HeaderActions,
|
|
2105
|
+
{
|
|
2106
|
+
languageOptions,
|
|
2107
|
+
currentLanguage,
|
|
2108
|
+
onLanguageChange,
|
|
2109
|
+
loginButton,
|
|
2110
|
+
ctaButton
|
|
2111
|
+
}
|
|
2112
|
+
),
|
|
2113
|
+
ctaButton && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "md:hidden", children: ctaButton }),
|
|
2114
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(MobileMenuButton, {})
|
|
2115
|
+
] })
|
|
2116
|
+
] }) }),
|
|
2117
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2118
|
+
MobileMenu,
|
|
2119
|
+
{
|
|
2120
|
+
links,
|
|
2121
|
+
languageOptions,
|
|
2122
|
+
currentLanguage,
|
|
2123
|
+
onLanguageChange,
|
|
2124
|
+
loginButton,
|
|
2125
|
+
ctaButton
|
|
2126
|
+
}
|
|
2127
|
+
)
|
|
2128
|
+
] }) });
|
|
2129
|
+
}
|
|
2130
|
+
);
|
|
2131
|
+
Header.displayName = "Header";
|
|
2132
|
+
|
|
2133
|
+
// src/components/feature-cards/FeatureCards.tsx
|
|
2134
|
+
var React32 = __toESM(require("react"), 1);
|
|
2135
|
+
var import_class_variance_authority21 = require("class-variance-authority");
|
|
2136
|
+
|
|
2137
|
+
// src/components/list/List.tsx
|
|
2138
|
+
var React31 = __toESM(require("react"), 1);
|
|
2139
|
+
|
|
2140
|
+
// src/components/divider/Divider.tsx
|
|
2141
|
+
var React30 = __toESM(require("react"), 1);
|
|
2142
|
+
var import_class_variance_authority20 = require("class-variance-authority");
|
|
2143
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2144
|
+
var dividerVariants = (0, import_class_variance_authority20.cva)("", {
|
|
2145
|
+
variants: {
|
|
2146
|
+
variant: {
|
|
2147
|
+
default: "bg-berget-separator",
|
|
2148
|
+
subtle: "bg-berget-separator-subtle",
|
|
2149
|
+
strong: "bg-berget-border-interactive",
|
|
2150
|
+
primary: "bg-berget-primary-border",
|
|
2151
|
+
muted: "bg-berget-separator-subtle"
|
|
2152
|
+
},
|
|
2153
|
+
size: {
|
|
2154
|
+
thin: "",
|
|
2155
|
+
medium: "!h-[2px]",
|
|
2156
|
+
thick: "!h-[4px]"
|
|
2157
|
+
}
|
|
2158
|
+
},
|
|
2159
|
+
defaultVariants: {
|
|
2160
|
+
variant: "default",
|
|
2161
|
+
size: "thin"
|
|
2162
|
+
}
|
|
2163
|
+
});
|
|
2164
|
+
var Divider = React30.forwardRef(
|
|
2165
|
+
({
|
|
2166
|
+
className,
|
|
2167
|
+
orientation = "horizontal",
|
|
2168
|
+
variant,
|
|
2169
|
+
size,
|
|
2170
|
+
label,
|
|
2171
|
+
labelPosition = "center",
|
|
2172
|
+
...props
|
|
2173
|
+
}, ref) => {
|
|
2174
|
+
if (label) {
|
|
2175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { ref, className: cn("flex items-center w-full", className), ...props, children: [
|
|
2176
|
+
labelPosition !== "right" && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2177
|
+
Separator2,
|
|
2178
|
+
{
|
|
2179
|
+
orientation: "horizontal",
|
|
2180
|
+
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
2181
|
+
}
|
|
2182
|
+
),
|
|
2183
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Typography, { variant: "small", color: "muted", className: "px-4 whitespace-nowrap", children: label }),
|
|
2184
|
+
labelPosition !== "left" && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2185
|
+
Separator2,
|
|
2186
|
+
{
|
|
2187
|
+
orientation: "horizontal",
|
|
2188
|
+
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
2189
|
+
}
|
|
2190
|
+
)
|
|
2191
|
+
] });
|
|
2192
|
+
}
|
|
2193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2194
|
+
Separator2,
|
|
2195
|
+
{
|
|
2196
|
+
ref,
|
|
2197
|
+
orientation,
|
|
2198
|
+
className: cn(
|
|
2199
|
+
dividerVariants({ variant, size }),
|
|
2200
|
+
orientation === "vertical" && "h-full !w-[1px]",
|
|
2201
|
+
className
|
|
2202
|
+
)
|
|
2203
|
+
}
|
|
2204
|
+
);
|
|
2205
|
+
}
|
|
2206
|
+
);
|
|
2207
|
+
Divider.displayName = "Divider";
|
|
2208
|
+
|
|
2209
|
+
// src/components/list/List.tsx
|
|
2210
|
+
var import_lucide_react8 = require("lucide-react");
|
|
2211
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2212
|
+
var List = React31.forwardRef(
|
|
2213
|
+
({ className, children, ...props }, ref) => {
|
|
2214
|
+
const childrenArray = React31.Children.toArray(children);
|
|
2215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children: childrenArray.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(React31.Fragment, { children: [
|
|
2216
|
+
child,
|
|
2217
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Divider, { variant: "subtle" })
|
|
2218
|
+
] }, index)) });
|
|
2219
|
+
}
|
|
2220
|
+
);
|
|
2221
|
+
List.displayName = "List";
|
|
2222
|
+
var ListItem = React31.forwardRef(
|
|
2223
|
+
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2224
|
+
"div",
|
|
2225
|
+
{
|
|
2226
|
+
ref,
|
|
2227
|
+
className: cn(
|
|
2228
|
+
"flex items-center gap-4 px-4 py-3 sm:px-6 sm:py-4",
|
|
2229
|
+
interactive && "transition-all duration-200 hover:bg-berget-surface-hover cursor-pointer",
|
|
2230
|
+
className
|
|
2231
|
+
),
|
|
2232
|
+
...props,
|
|
2233
|
+
children: [
|
|
2234
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex-shrink-0 flex items-center justify-center", children: icon }),
|
|
2235
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex-1 min-w-0", children })
|
|
2236
|
+
]
|
|
2237
|
+
}
|
|
2238
|
+
)
|
|
2239
|
+
);
|
|
2240
|
+
ListItem.displayName = "ListItem";
|
|
2241
|
+
var ListHeader = React31.forwardRef(
|
|
2242
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2243
|
+
"div",
|
|
2244
|
+
{
|
|
2245
|
+
ref,
|
|
2246
|
+
className: cn("px-4 py-2 sm:px-6 sm:py-3 text-sm text-muted-foreground", className),
|
|
2247
|
+
...props,
|
|
2248
|
+
children
|
|
2249
|
+
}
|
|
2250
|
+
)
|
|
2251
|
+
);
|
|
2252
|
+
ListHeader.displayName = "ListHeader";
|
|
2253
|
+
var FeatureList = React31.forwardRef(
|
|
2254
|
+
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
2255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("li", { className: "flex items-start gap-fluid-md", children: [
|
|
2256
|
+
variant === "bullet" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { icon: import_lucide_react8.Check, size: 24, className: "text-berget-logo-light" }) }),
|
|
2257
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Typography, { variant: "body", color: "muted", children: item })
|
|
2258
|
+
] }, index)) });
|
|
2259
|
+
}
|
|
2260
|
+
);
|
|
2261
|
+
FeatureList.displayName = "FeatureList";
|
|
2262
|
+
|
|
2263
|
+
// src/components/feature-cards/FeatureCards.tsx
|
|
2264
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2265
|
+
var featureCardVariants = (0, import_class_variance_authority21.cva)("", {
|
|
2266
|
+
variants: {
|
|
2267
|
+
variant: {
|
|
2268
|
+
highlight: "",
|
|
2269
|
+
glass: "",
|
|
2270
|
+
solid: ""
|
|
2271
|
+
}
|
|
2272
|
+
},
|
|
2273
|
+
defaultVariants: {
|
|
2274
|
+
variant: "highlight"
|
|
2275
|
+
}
|
|
2276
|
+
});
|
|
2277
|
+
var FeatureCard = React32.forwardRef(
|
|
2278
|
+
({
|
|
2279
|
+
className,
|
|
2280
|
+
variant = "highlight",
|
|
2281
|
+
icon: Icon3,
|
|
2282
|
+
iconColor,
|
|
2283
|
+
title,
|
|
2284
|
+
description,
|
|
2285
|
+
badge,
|
|
2286
|
+
linkText,
|
|
2287
|
+
linkHref,
|
|
2288
|
+
items,
|
|
2289
|
+
columns: _columns,
|
|
2290
|
+
...props
|
|
2291
|
+
}, ref) => {
|
|
2292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2293
|
+
Card2,
|
|
2294
|
+
{
|
|
2295
|
+
ref,
|
|
2296
|
+
variant,
|
|
2297
|
+
className: cn("w-full py-fluid-lg px-fluid-md", className),
|
|
2298
|
+
...props,
|
|
2299
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col items-start gap-fluid-md", children: [
|
|
2300
|
+
(Icon3 || badge) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between w-full", children: [
|
|
2301
|
+
Icon3 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex h-7 w-7 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2302
|
+
Icon3,
|
|
2303
|
+
{
|
|
2304
|
+
className: cn("h-7 w-7", iconColor || "text-foreground"),
|
|
2305
|
+
strokeWidth: 1.5
|
|
2306
|
+
}
|
|
2307
|
+
) }),
|
|
2308
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime33.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_runtime33.jsx)(
|
|
2309
|
+
Typography,
|
|
2310
|
+
{
|
|
2311
|
+
variant: "body",
|
|
2312
|
+
as: "span",
|
|
2313
|
+
className: "text-berget-feature-card-badge-fg",
|
|
2314
|
+
children: badge
|
|
2315
|
+
}
|
|
2316
|
+
) })
|
|
2317
|
+
] }),
|
|
2318
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Typography, { variant: "h3", className: "text-foreground", children: title }),
|
|
2319
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Typography, { variant: "body", className: "text-foreground/80", children: description }),
|
|
2320
|
+
items && items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FeatureList, { items, variant: "bullet" }),
|
|
2321
|
+
linkText && linkHref && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("a", { href: linkHref, className: "text-p font-p leading-p text-berget-accent", children: [
|
|
2322
|
+
linkText,
|
|
2323
|
+
" \u2192"
|
|
2324
|
+
] })
|
|
2325
|
+
] })
|
|
2326
|
+
}
|
|
2327
|
+
);
|
|
2328
|
+
}
|
|
2329
|
+
);
|
|
2330
|
+
FeatureCard.displayName = "FeatureCard";
|
|
2331
|
+
var FeatureCards = React32.forwardRef(
|
|
2332
|
+
({ features, columns = 3, className }, ref) => {
|
|
2333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2334
|
+
"div",
|
|
2335
|
+
{
|
|
2336
|
+
ref,
|
|
2337
|
+
className: cn(
|
|
2338
|
+
"grid gap-fluid-lg p-fluid-md",
|
|
2339
|
+
// Explicit classes so Tailwind compiles them
|
|
2340
|
+
columns === 1 && "grid-cols-1 max-w-md mx-auto",
|
|
2341
|
+
columns === 2 && "grid-cols-1 md:grid-cols-2",
|
|
2342
|
+
columns === 3 && "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
2343
|
+
columns === 4 && "grid-cols-1 md:grid-cols-2 lg:grid-cols-4",
|
|
2344
|
+
className
|
|
2345
|
+
),
|
|
2346
|
+
children: features.map((feature, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FeatureCard, { ...feature }, index))
|
|
2347
|
+
}
|
|
2348
|
+
);
|
|
2349
|
+
}
|
|
2350
|
+
);
|
|
2351
|
+
FeatureCards.displayName = "FeatureCards";
|
|
2352
|
+
|
|
2353
|
+
// src/components/hero-block/HeroBlock.tsx
|
|
2354
|
+
var React33 = __toESM(require("react"), 1);
|
|
2355
|
+
var import_class_variance_authority22 = require("class-variance-authority");
|
|
2356
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2357
|
+
var heroBlockVariants = (0, import_class_variance_authority22.cva)(
|
|
2358
|
+
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
2359
|
+
{
|
|
2360
|
+
variants: {
|
|
2361
|
+
variant: {
|
|
2362
|
+
default: "",
|
|
2363
|
+
moss: "",
|
|
2364
|
+
gradient: ""
|
|
2365
|
+
},
|
|
2366
|
+
withPattern: {
|
|
2367
|
+
true: "",
|
|
2368
|
+
false: ""
|
|
2369
|
+
}
|
|
2370
|
+
},
|
|
2371
|
+
defaultVariants: {
|
|
2372
|
+
variant: "default",
|
|
2373
|
+
withPattern: false
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
);
|
|
2377
|
+
var HeroBlock = React33.forwardRef(
|
|
2378
|
+
({
|
|
2379
|
+
className,
|
|
2380
|
+
variant,
|
|
2381
|
+
withPattern,
|
|
2382
|
+
taglineIcon: TaglineIcon,
|
|
2383
|
+
tagline,
|
|
2384
|
+
title,
|
|
2385
|
+
description,
|
|
2386
|
+
actions,
|
|
2387
|
+
...props
|
|
2388
|
+
}, ref) => {
|
|
2389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2390
|
+
"div",
|
|
2391
|
+
{
|
|
2392
|
+
ref,
|
|
2393
|
+
className: cn(heroBlockVariants({ variant, withPattern }), className),
|
|
2394
|
+
...props,
|
|
2395
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mx-auto text-center max-w-4xl", children: [
|
|
2396
|
+
tagline && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2397
|
+
Badge,
|
|
2398
|
+
{
|
|
2399
|
+
variant: "default",
|
|
2400
|
+
icon: TaglineIcon ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
2401
|
+
iconGap: 2,
|
|
2402
|
+
className: "mb-fluid-md",
|
|
2403
|
+
children: tagline
|
|
2404
|
+
}
|
|
2405
|
+
),
|
|
2406
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Typography, { variant: "h1", className: "mb-fluid-md", children: title }),
|
|
2407
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Typography, { variant: "h3", color: "muted", className: "mb-fluid-lg", children: description }),
|
|
2408
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-wrap gap-fluid-md justify-center", children: actions })
|
|
2409
|
+
] }) })
|
|
2410
|
+
}
|
|
2411
|
+
);
|
|
2412
|
+
}
|
|
2413
|
+
);
|
|
2414
|
+
HeroBlock.displayName = "HeroBlock";
|
|
2415
|
+
|
|
2416
|
+
// src/components/stat-card/StatCard.tsx
|
|
2417
|
+
var React34 = __toESM(require("react"), 1);
|
|
2418
|
+
var import_class_variance_authority23 = require("class-variance-authority");
|
|
2419
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2420
|
+
var statCardVariants = (0, import_class_variance_authority23.cva)("", {
|
|
2421
|
+
variants: {
|
|
2422
|
+
variant: {
|
|
2423
|
+
highlight: "",
|
|
2424
|
+
glass: "",
|
|
2425
|
+
solid: ""
|
|
2426
|
+
}
|
|
2427
|
+
},
|
|
2428
|
+
defaultVariants: {
|
|
2429
|
+
variant: "highlight"
|
|
2430
|
+
}
|
|
2431
|
+
});
|
|
2432
|
+
var StatCard = React34.forwardRef(
|
|
2433
|
+
({
|
|
2434
|
+
className,
|
|
2435
|
+
variant = "highlight",
|
|
2436
|
+
icon: Icon3,
|
|
2437
|
+
iconColor,
|
|
2438
|
+
title,
|
|
2439
|
+
description,
|
|
2440
|
+
stats,
|
|
2441
|
+
badge: _badge,
|
|
2442
|
+
...props
|
|
2443
|
+
}, ref) => {
|
|
2444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2445
|
+
Card2,
|
|
2446
|
+
{
|
|
2447
|
+
ref,
|
|
2448
|
+
variant,
|
|
2449
|
+
className: cn("w-full py-fluid-lg px-fluid-md", className),
|
|
2450
|
+
...props,
|
|
2451
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col h-full gap-fluid-md", children: [
|
|
2452
|
+
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)(
|
|
2453
|
+
Icon3,
|
|
2454
|
+
{
|
|
2455
|
+
className: cn("h-7 w-7", iconColor || "text-berget-foreground"),
|
|
2456
|
+
strokeWidth: 1.5
|
|
2457
|
+
}
|
|
2458
|
+
) }),
|
|
2459
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Typography, { variant: "h3", as: "h3", className: "text-berget-foreground", children: title }),
|
|
2460
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2461
|
+
Typography,
|
|
2462
|
+
{
|
|
2463
|
+
variant: "body",
|
|
2464
|
+
className: "text-berget-foreground/80 leading-relaxed flex-grow",
|
|
2465
|
+
children: description
|
|
2466
|
+
}
|
|
2467
|
+
),
|
|
2468
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Typography, { variant: "small", as: "div", className: "font-medium text-berget-foreground", children: stats })
|
|
2469
|
+
] })
|
|
2470
|
+
}
|
|
2471
|
+
);
|
|
2472
|
+
}
|
|
2473
|
+
);
|
|
2474
|
+
StatCard.displayName = "StatCard";
|
|
2475
|
+
|
|
2476
|
+
// src/components/code-block/CodeBlock.tsx
|
|
2477
|
+
var import_react2 = require("react");
|
|
2478
|
+
var import_lucide_react9 = require("lucide-react");
|
|
2479
|
+
|
|
2480
|
+
// src/lib/shiki.ts
|
|
2481
|
+
var import_core = require("shiki/core");
|
|
2482
|
+
var import_oniguruma = require("shiki/engine/oniguruma");
|
|
2483
|
+
|
|
2484
|
+
// src/lib/shiki-theme.ts
|
|
2485
|
+
var bergetShikiTheme = {
|
|
2486
|
+
name: "berget",
|
|
2487
|
+
type: "dark",
|
|
2488
|
+
colors: {
|
|
2489
|
+
"editor.background": "#1a1a1a",
|
|
2490
|
+
"editor.foreground": "#e7e0d9"
|
|
2491
|
+
},
|
|
2492
|
+
settings: [
|
|
2493
|
+
{
|
|
2494
|
+
settings: {
|
|
2495
|
+
foreground: "#e7e0d9"
|
|
2496
|
+
// sandstone-100
|
|
2497
|
+
}
|
|
2498
|
+
},
|
|
2499
|
+
{
|
|
2500
|
+
scope: ["comment", "punctuation.definition.comment"],
|
|
2501
|
+
settings: {
|
|
2502
|
+
foreground: "#e7e0d980",
|
|
2503
|
+
fontStyle: "italic"
|
|
2504
|
+
}
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
scope: ["keyword", "keyword.control", "keyword.operator.new", "storage", "storage.type"],
|
|
2508
|
+
settings: {
|
|
2509
|
+
foreground: "#57a57f"
|
|
2510
|
+
// moss-400
|
|
2511
|
+
}
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
scope: ["string", "string.quoted", "string.template"],
|
|
2515
|
+
settings: {
|
|
2516
|
+
foreground: "#86c0a2"
|
|
2517
|
+
// moss-300
|
|
2518
|
+
}
|
|
2519
|
+
},
|
|
2520
|
+
{
|
|
2521
|
+
scope: ["entity.name.function", "support.function", "meta.function-call"],
|
|
2522
|
+
settings: {
|
|
2523
|
+
foreground: "#5b9ac1"
|
|
2524
|
+
// fjord-400
|
|
2525
|
+
}
|
|
2526
|
+
},
|
|
2527
|
+
{
|
|
2528
|
+
scope: ["entity.name.type", "entity.name.class", "support.type", "support.class"],
|
|
2529
|
+
settings: {
|
|
2530
|
+
foreground: "#e3a500"
|
|
2531
|
+
// chanterelle-300
|
|
2532
|
+
}
|
|
2533
|
+
},
|
|
2534
|
+
{
|
|
2535
|
+
scope: ["constant.numeric", "constant.language"],
|
|
2536
|
+
settings: {
|
|
2537
|
+
foreground: "#86c0a2"
|
|
2538
|
+
// moss-300
|
|
2539
|
+
}
|
|
2540
|
+
},
|
|
2541
|
+
{
|
|
2542
|
+
scope: ["variable", "variable.other"],
|
|
2543
|
+
settings: {
|
|
2544
|
+
foreground: "#e7e0d9"
|
|
2545
|
+
// sandstone-100
|
|
2546
|
+
}
|
|
2547
|
+
},
|
|
2548
|
+
{
|
|
2549
|
+
scope: ["variable.parameter"],
|
|
2550
|
+
settings: {
|
|
2551
|
+
foreground: "#e7e0d9e6"
|
|
2552
|
+
}
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
scope: ["punctuation", "keyword.operator", "keyword.operator.assignment"],
|
|
2556
|
+
settings: {
|
|
2557
|
+
foreground: "#e7e0d9b3"
|
|
2558
|
+
}
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
scope: ["entity.name.tag", "support.type.property-name"],
|
|
2562
|
+
settings: {
|
|
2563
|
+
foreground: "#57a57f"
|
|
2564
|
+
// moss-400 (for YAML keys, HTML tags)
|
|
2565
|
+
}
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
scope: ["meta.object-literal.key"],
|
|
2569
|
+
settings: {
|
|
2570
|
+
foreground: "#5b9ac1"
|
|
2571
|
+
// fjord-400
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2574
|
+
]
|
|
2575
|
+
};
|
|
2576
|
+
|
|
2577
|
+
// src/lib/shiki.ts
|
|
2578
|
+
var defaultLanguages = [
|
|
2579
|
+
import("shiki/langs/typescript.mjs"),
|
|
2580
|
+
import("shiki/langs/javascript.mjs"),
|
|
2581
|
+
import("shiki/langs/bash.mjs"),
|
|
2582
|
+
import("shiki/langs/yaml.mjs"),
|
|
2583
|
+
import("shiki/langs/json.mjs"),
|
|
2584
|
+
import("shiki/langs/python.mjs"),
|
|
2585
|
+
import("shiki/langs/dockerfile.mjs"),
|
|
2586
|
+
import("shiki/langs/markdown.mjs"),
|
|
2587
|
+
import("shiki/langs/html.mjs"),
|
|
2588
|
+
import("shiki/langs/css.mjs"),
|
|
2589
|
+
import("shiki/langs/shell.mjs")
|
|
2590
|
+
];
|
|
2591
|
+
var highlighterPromise = null;
|
|
2592
|
+
function getHighlighter() {
|
|
2593
|
+
if (!highlighterPromise) {
|
|
2594
|
+
highlighterPromise = (0, import_core.createHighlighterCore)({
|
|
2595
|
+
themes: [bergetShikiTheme],
|
|
2596
|
+
langs: defaultLanguages,
|
|
2597
|
+
engine: (0, import_oniguruma.createOnigurumaEngine)(import("shiki/wasm"))
|
|
2598
|
+
});
|
|
2599
|
+
}
|
|
2600
|
+
return highlighterPromise;
|
|
2601
|
+
}
|
|
2602
|
+
|
|
2603
|
+
// src/components/code-block/CodeBlock.tsx
|
|
2604
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2605
|
+
function CodeBlock({ code, language = "text", title, className }) {
|
|
2606
|
+
const [html, setHtml] = (0, import_react2.useState)(null);
|
|
2607
|
+
const [copied, setCopied] = (0, import_react2.useState)(false);
|
|
2608
|
+
(0, import_react2.useEffect)(() => {
|
|
2609
|
+
getHighlighter().then((highlighter) => {
|
|
2610
|
+
const loadedLangs = highlighter.getLoadedLanguages();
|
|
2611
|
+
const lang = loadedLangs.includes(language) ? language : "text";
|
|
2612
|
+
setHtml(highlighter.codeToHtml(code, { lang, theme: "berget" }));
|
|
2613
|
+
});
|
|
2614
|
+
}, [code, language]);
|
|
2615
|
+
const handleCopy = (0, import_react2.useCallback)(async () => {
|
|
2616
|
+
await navigator.clipboard.writeText(code);
|
|
2617
|
+
setCopied(true);
|
|
2618
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
2619
|
+
}, [code]);
|
|
2620
|
+
const copyButton = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2621
|
+
"button",
|
|
2622
|
+
{
|
|
2623
|
+
onClick: handleCopy,
|
|
2624
|
+
className: "flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors",
|
|
2625
|
+
"aria-label": "Copy code",
|
|
2626
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react9.Check, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react9.Copy, { className: "w-3.5 h-3.5" })
|
|
2627
|
+
}
|
|
2628
|
+
);
|
|
2629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2630
|
+
"div",
|
|
2631
|
+
{
|
|
2632
|
+
className: cn(
|
|
2633
|
+
"rounded-berget-sm border bg-berget-codeblock-bg border-berget-border backdrop-blur-[12px] relative overflow-hidden isolate",
|
|
2634
|
+
className
|
|
2635
|
+
),
|
|
2636
|
+
children: [
|
|
2637
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime36.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_runtime36.jsx)("span", { className: "text-berget-muted-foreground", children: title }) }),
|
|
2638
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "absolute right-2 top-2 z-10", children: copyButton }),
|
|
2639
|
+
html ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2640
|
+
"div",
|
|
2641
|
+
{
|
|
2642
|
+
className: "[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent",
|
|
2643
|
+
dangerouslySetInnerHTML: { __html: html }
|
|
2644
|
+
}
|
|
2645
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("pre", { className: "!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("code", { children: code }) })
|
|
2646
|
+
]
|
|
2647
|
+
}
|
|
2648
|
+
);
|
|
2649
|
+
}
|
|
2650
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2651
|
+
0 && (module.exports = {
|
|
2652
|
+
Alert,
|
|
2653
|
+
AlertDescription,
|
|
2654
|
+
AlertTitle,
|
|
2655
|
+
Badge,
|
|
2656
|
+
BergetLogo,
|
|
2657
|
+
BergetLogotype,
|
|
2658
|
+
BergetSymbol,
|
|
2659
|
+
Box,
|
|
2660
|
+
Button,
|
|
2661
|
+
Card,
|
|
2662
|
+
CardContent,
|
|
2663
|
+
CardDescription,
|
|
2664
|
+
CardFooter,
|
|
2665
|
+
CardHeader,
|
|
2666
|
+
CardTitle,
|
|
2667
|
+
Checkbox,
|
|
2668
|
+
CodeBlock,
|
|
2669
|
+
Container,
|
|
2670
|
+
FeatureCard,
|
|
2671
|
+
FeatureCards,
|
|
2672
|
+
FeatureList,
|
|
2673
|
+
Field,
|
|
2674
|
+
FieldContent,
|
|
2675
|
+
FieldDescription,
|
|
2676
|
+
FieldError,
|
|
2677
|
+
FieldGroup,
|
|
2678
|
+
FieldLabel,
|
|
2679
|
+
FieldLegend,
|
|
2680
|
+
FieldSeparator,
|
|
2681
|
+
FieldSet,
|
|
2682
|
+
FieldTitle,
|
|
2683
|
+
Grid,
|
|
2684
|
+
Header,
|
|
2685
|
+
HeroBlock,
|
|
2686
|
+
Icon,
|
|
2687
|
+
Input,
|
|
2688
|
+
Label,
|
|
2689
|
+
LanguageSelect,
|
|
2690
|
+
Link,
|
|
2691
|
+
List,
|
|
2692
|
+
ListHeader,
|
|
2693
|
+
ListItem,
|
|
2694
|
+
Section,
|
|
2695
|
+
SectionHeader,
|
|
2696
|
+
Select,
|
|
2697
|
+
StatCard,
|
|
2698
|
+
Switch,
|
|
2699
|
+
TextArea,
|
|
2700
|
+
Typography,
|
|
2701
|
+
alertVariants,
|
|
2702
|
+
badgeVariants,
|
|
2703
|
+
boxVariants,
|
|
2704
|
+
buttonVariants,
|
|
2705
|
+
cardVariants,
|
|
2706
|
+
checkboxVariants,
|
|
2707
|
+
containerVariants,
|
|
2708
|
+
gridVariants,
|
|
2709
|
+
linkVariants,
|
|
2710
|
+
sectionVariants,
|
|
2711
|
+
selectVariants,
|
|
2712
|
+
switchRootVariants,
|
|
2713
|
+
switchThumbVariants,
|
|
2714
|
+
textAreaVariants,
|
|
2715
|
+
typographyVariants
|
|
2716
|
+
});
|
|
2717
|
+
//# sourceMappingURL=index.cjs.map
|