@classic-homes/theme-react 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +35 -1
- package/dist/index.d.ts +35 -1
- package/dist/index.js +81 -2
- package/dist/index.mjs +75 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -60,10 +60,44 @@ declare const DialogFooter: {
|
|
|
60
60
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
61
61
|
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
62
62
|
|
|
63
|
+
/**
|
|
64
|
+
* PageHeader - Hero/page header component
|
|
65
|
+
*
|
|
66
|
+
* A flexible page header component for hero sections and page titles.
|
|
67
|
+
* Supports multiple layout variants and optional action buttons.
|
|
68
|
+
*
|
|
69
|
+
* Features:
|
|
70
|
+
* - Multiple variants: default, hero, centered
|
|
71
|
+
* - Optional subtitle with branded styling
|
|
72
|
+
* - Optional actions slot for CTA buttons
|
|
73
|
+
* - Consistent typography using design tokens
|
|
74
|
+
*/
|
|
75
|
+
declare const pageHeaderContainerVariants: (props?: ({
|
|
76
|
+
variant?: "default" | "hero" | "centered" | null | undefined;
|
|
77
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
78
|
+
declare const pageHeaderTitleVariants: (props?: ({
|
|
79
|
+
variant?: "default" | "hero" | "centered" | null | undefined;
|
|
80
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
81
|
+
declare const pageHeaderSubtitleVariants: (props?: ({
|
|
82
|
+
variant?: "default" | "hero" | "centered" | null | undefined;
|
|
83
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
84
|
+
declare const pageHeaderActionsVariants: (props?: ({
|
|
85
|
+
variant?: "default" | "hero" | "centered" | null | undefined;
|
|
86
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
87
|
+
interface PageHeaderProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof pageHeaderContainerVariants> {
|
|
88
|
+
/** Main title text */
|
|
89
|
+
title: string;
|
|
90
|
+
/** Optional subtitle text */
|
|
91
|
+
subtitle?: string;
|
|
92
|
+
/** Optional action buttons/content */
|
|
93
|
+
actions?: React.ReactNode;
|
|
94
|
+
}
|
|
95
|
+
declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
96
|
+
|
|
63
97
|
/**
|
|
64
98
|
* Utility function to merge Tailwind CSS classes
|
|
65
99
|
* Uses clsx for conditional classes and tailwind-merge to handle conflicts
|
|
66
100
|
*/
|
|
67
101
|
declare function cn(...inputs: ClassValue[]): string;
|
|
68
102
|
|
|
69
|
-
export { Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input, type InputProps, Label, Separator, badgeVariants, buttonVariants, cn };
|
|
103
|
+
export { Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input, type InputProps, Label, PageHeader, type PageHeaderProps, Separator, badgeVariants, buttonVariants, cn, pageHeaderActionsVariants, pageHeaderContainerVariants, pageHeaderSubtitleVariants, pageHeaderTitleVariants };
|
package/dist/index.d.ts
CHANGED
|
@@ -60,10 +60,44 @@ declare const DialogFooter: {
|
|
|
60
60
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
61
61
|
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
62
62
|
|
|
63
|
+
/**
|
|
64
|
+
* PageHeader - Hero/page header component
|
|
65
|
+
*
|
|
66
|
+
* A flexible page header component for hero sections and page titles.
|
|
67
|
+
* Supports multiple layout variants and optional action buttons.
|
|
68
|
+
*
|
|
69
|
+
* Features:
|
|
70
|
+
* - Multiple variants: default, hero, centered
|
|
71
|
+
* - Optional subtitle with branded styling
|
|
72
|
+
* - Optional actions slot for CTA buttons
|
|
73
|
+
* - Consistent typography using design tokens
|
|
74
|
+
*/
|
|
75
|
+
declare const pageHeaderContainerVariants: (props?: ({
|
|
76
|
+
variant?: "default" | "hero" | "centered" | null | undefined;
|
|
77
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
78
|
+
declare const pageHeaderTitleVariants: (props?: ({
|
|
79
|
+
variant?: "default" | "hero" | "centered" | null | undefined;
|
|
80
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
81
|
+
declare const pageHeaderSubtitleVariants: (props?: ({
|
|
82
|
+
variant?: "default" | "hero" | "centered" | null | undefined;
|
|
83
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
84
|
+
declare const pageHeaderActionsVariants: (props?: ({
|
|
85
|
+
variant?: "default" | "hero" | "centered" | null | undefined;
|
|
86
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
87
|
+
interface PageHeaderProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof pageHeaderContainerVariants> {
|
|
88
|
+
/** Main title text */
|
|
89
|
+
title: string;
|
|
90
|
+
/** Optional subtitle text */
|
|
91
|
+
subtitle?: string;
|
|
92
|
+
/** Optional action buttons/content */
|
|
93
|
+
actions?: React.ReactNode;
|
|
94
|
+
}
|
|
95
|
+
declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
96
|
+
|
|
63
97
|
/**
|
|
64
98
|
* Utility function to merge Tailwind CSS classes
|
|
65
99
|
* Uses clsx for conditional classes and tailwind-merge to handle conflicts
|
|
66
100
|
*/
|
|
67
101
|
declare function cn(...inputs: ClassValue[]): string;
|
|
68
102
|
|
|
69
|
-
export { Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input, type InputProps, Label, Separator, badgeVariants, buttonVariants, cn };
|
|
103
|
+
export { Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input, type InputProps, Label, PageHeader, type PageHeaderProps, Separator, badgeVariants, buttonVariants, cn, pageHeaderActionsVariants, pageHeaderContainerVariants, pageHeaderSubtitleVariants, pageHeaderTitleVariants };
|
package/dist/index.js
CHANGED
|
@@ -53,10 +53,15 @@ __export(index_exports, {
|
|
|
53
53
|
DialogTrigger: () => DialogTrigger,
|
|
54
54
|
Input: () => Input,
|
|
55
55
|
Label: () => Label,
|
|
56
|
+
PageHeader: () => PageHeader,
|
|
56
57
|
Separator: () => Separator,
|
|
57
58
|
badgeVariants: () => badgeVariants,
|
|
58
59
|
buttonVariants: () => buttonVariants,
|
|
59
|
-
cn: () => cn
|
|
60
|
+
cn: () => cn,
|
|
61
|
+
pageHeaderActionsVariants: () => pageHeaderActionsVariants,
|
|
62
|
+
pageHeaderContainerVariants: () => pageHeaderContainerVariants,
|
|
63
|
+
pageHeaderSubtitleVariants: () => pageHeaderSubtitleVariants,
|
|
64
|
+
pageHeaderTitleVariants: () => pageHeaderTitleVariants
|
|
60
65
|
});
|
|
61
66
|
module.exports = __toCommonJS(index_exports);
|
|
62
67
|
|
|
@@ -325,6 +330,75 @@ var DialogDescription = React7.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
325
330
|
}
|
|
326
331
|
));
|
|
327
332
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
333
|
+
|
|
334
|
+
// src/components/PageHeader.tsx
|
|
335
|
+
var React8 = __toESM(require("react"));
|
|
336
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
337
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
338
|
+
var pageHeaderContainerVariants = (0, import_class_variance_authority4.cva)("", {
|
|
339
|
+
variants: {
|
|
340
|
+
variant: {
|
|
341
|
+
default: "",
|
|
342
|
+
hero: "",
|
|
343
|
+
centered: "text-center"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
defaultVariants: {
|
|
347
|
+
variant: "default"
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
var pageHeaderTitleVariants = (0, import_class_variance_authority4.cva)("text-foreground", {
|
|
351
|
+
variants: {
|
|
352
|
+
variant: {
|
|
353
|
+
default: "text-3xl font-bold mb-2",
|
|
354
|
+
hero: "text-5xl font-black uppercase tracking-tight mb-2",
|
|
355
|
+
centered: "text-4xl font-bold mb-3"
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
defaultVariants: {
|
|
359
|
+
variant: "default"
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
var pageHeaderSubtitleVariants = (0, import_class_variance_authority4.cva)("text-muted-foreground", {
|
|
363
|
+
variants: {
|
|
364
|
+
variant: {
|
|
365
|
+
default: "text-lg",
|
|
366
|
+
hero: "text-lg font-serif italic",
|
|
367
|
+
centered: "text-xl max-w-2xl mx-auto"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
defaultVariants: {
|
|
371
|
+
variant: "default"
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
var pageHeaderActionsVariants = (0, import_class_variance_authority4.cva)("flex gap-4", {
|
|
375
|
+
variants: {
|
|
376
|
+
variant: {
|
|
377
|
+
default: "mt-4",
|
|
378
|
+
hero: "mt-6",
|
|
379
|
+
centered: "mt-6 justify-center"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
defaultVariants: {
|
|
383
|
+
variant: "default"
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
var PageHeader = React8.forwardRef(
|
|
387
|
+
({ className, variant, title, subtitle, actions, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
388
|
+
"header",
|
|
389
|
+
{
|
|
390
|
+
ref,
|
|
391
|
+
className: cn(pageHeaderContainerVariants({ variant }), className),
|
|
392
|
+
...props,
|
|
393
|
+
children: [
|
|
394
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h1", { className: pageHeaderTitleVariants({ variant }), children: title }),
|
|
395
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: pageHeaderSubtitleVariants({ variant }), children: subtitle }),
|
|
396
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: pageHeaderActionsVariants({ variant }), children: actions })
|
|
397
|
+
]
|
|
398
|
+
}
|
|
399
|
+
)
|
|
400
|
+
);
|
|
401
|
+
PageHeader.displayName = "PageHeader";
|
|
328
402
|
// Annotate the CommonJS export names for ESM import in node:
|
|
329
403
|
0 && (module.exports = {
|
|
330
404
|
Avatar,
|
|
@@ -350,8 +424,13 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
|
350
424
|
DialogTrigger,
|
|
351
425
|
Input,
|
|
352
426
|
Label,
|
|
427
|
+
PageHeader,
|
|
353
428
|
Separator,
|
|
354
429
|
badgeVariants,
|
|
355
430
|
buttonVariants,
|
|
356
|
-
cn
|
|
431
|
+
cn,
|
|
432
|
+
pageHeaderActionsVariants,
|
|
433
|
+
pageHeaderContainerVariants,
|
|
434
|
+
pageHeaderSubtitleVariants,
|
|
435
|
+
pageHeaderTitleVariants
|
|
357
436
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -263,6 +263,75 @@ var DialogDescription = React7.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
263
263
|
}
|
|
264
264
|
));
|
|
265
265
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
266
|
+
|
|
267
|
+
// src/components/PageHeader.tsx
|
|
268
|
+
import * as React8 from "react";
|
|
269
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
270
|
+
import { jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
271
|
+
var pageHeaderContainerVariants = cva4("", {
|
|
272
|
+
variants: {
|
|
273
|
+
variant: {
|
|
274
|
+
default: "",
|
|
275
|
+
hero: "",
|
|
276
|
+
centered: "text-center"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
defaultVariants: {
|
|
280
|
+
variant: "default"
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
var pageHeaderTitleVariants = cva4("text-foreground", {
|
|
284
|
+
variants: {
|
|
285
|
+
variant: {
|
|
286
|
+
default: "text-3xl font-bold mb-2",
|
|
287
|
+
hero: "text-5xl font-black uppercase tracking-tight mb-2",
|
|
288
|
+
centered: "text-4xl font-bold mb-3"
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
defaultVariants: {
|
|
292
|
+
variant: "default"
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
var pageHeaderSubtitleVariants = cva4("text-muted-foreground", {
|
|
296
|
+
variants: {
|
|
297
|
+
variant: {
|
|
298
|
+
default: "text-lg",
|
|
299
|
+
hero: "text-lg font-serif italic",
|
|
300
|
+
centered: "text-xl max-w-2xl mx-auto"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
defaultVariants: {
|
|
304
|
+
variant: "default"
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
var pageHeaderActionsVariants = cva4("flex gap-4", {
|
|
308
|
+
variants: {
|
|
309
|
+
variant: {
|
|
310
|
+
default: "mt-4",
|
|
311
|
+
hero: "mt-6",
|
|
312
|
+
centered: "mt-6 justify-center"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
defaultVariants: {
|
|
316
|
+
variant: "default"
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
var PageHeader = React8.forwardRef(
|
|
320
|
+
({ className, variant, title, subtitle, actions, ...props }, ref) => /* @__PURE__ */ jsxs2(
|
|
321
|
+
"header",
|
|
322
|
+
{
|
|
323
|
+
ref,
|
|
324
|
+
className: cn(pageHeaderContainerVariants({ variant }), className),
|
|
325
|
+
...props,
|
|
326
|
+
children: [
|
|
327
|
+
/* @__PURE__ */ jsx9("h1", { className: pageHeaderTitleVariants({ variant }), children: title }),
|
|
328
|
+
subtitle && /* @__PURE__ */ jsx9("p", { className: pageHeaderSubtitleVariants({ variant }), children: subtitle }),
|
|
329
|
+
actions && /* @__PURE__ */ jsx9("div", { className: pageHeaderActionsVariants({ variant }), children: actions })
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
)
|
|
333
|
+
);
|
|
334
|
+
PageHeader.displayName = "PageHeader";
|
|
266
335
|
export {
|
|
267
336
|
Avatar,
|
|
268
337
|
AvatarFallback,
|
|
@@ -287,8 +356,13 @@ export {
|
|
|
287
356
|
DialogTrigger,
|
|
288
357
|
Input,
|
|
289
358
|
Label,
|
|
359
|
+
PageHeader,
|
|
290
360
|
Separator,
|
|
291
361
|
badgeVariants,
|
|
292
362
|
buttonVariants,
|
|
293
|
-
cn
|
|
363
|
+
cn,
|
|
364
|
+
pageHeaderActionsVariants,
|
|
365
|
+
pageHeaderContainerVariants,
|
|
366
|
+
pageHeaderSubtitleVariants,
|
|
367
|
+
pageHeaderTitleVariants
|
|
294
368
|
};
|