@lukeashford/aurelius 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -5
- package/dist/index.d.mts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +105 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +104 -8
- package/dist/index.mjs.map +1 -1
- package/llms.md +29 -4
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -55,11 +55,30 @@ while staying within design system constraints.
|
|
|
55
55
|
### 1. Install
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
+
# For Vite projects (Recommended)
|
|
58
59
|
npm install @lukeashford/aurelius
|
|
59
|
-
npm install -D tailwindcss
|
|
60
|
+
npm install -D tailwindcss @tailwindcss/vite eslint @typescript-eslint/parser eslint-plugin-better-tailwindcss @poupe/eslint-plugin-tailwindcss @eslint/css tailwind-csstree
|
|
61
|
+
|
|
62
|
+
# For other projects
|
|
63
|
+
# npm install -D tailwindcss @tailwindcss/postcss postcss ...
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 2. Configure (Vite)
|
|
67
|
+
|
|
68
|
+
If you are using Vite, add the Tailwind CSS plugin to your `vite.config.ts`:
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
import {defineConfig} from 'vite'
|
|
72
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
73
|
+
|
|
74
|
+
export default defineConfig({
|
|
75
|
+
plugins: [
|
|
76
|
+
tailwindcss(),
|
|
77
|
+
],
|
|
78
|
+
})
|
|
60
79
|
```
|
|
61
80
|
|
|
62
|
-
###
|
|
81
|
+
### 3. Import the design system
|
|
63
82
|
|
|
64
83
|
Create or update your `index.css`:
|
|
65
84
|
|
|
@@ -78,7 +97,7 @@ Then import it in your entry file:
|
|
|
78
97
|
import './index.css'
|
|
79
98
|
```
|
|
80
99
|
|
|
81
|
-
###
|
|
100
|
+
### 4. Configure ESLint (simplest form)
|
|
82
101
|
|
|
83
102
|
Aurelius ships with a default ESLint config you can re-export in one line. It enforces design system
|
|
84
103
|
constraints — if ESLint complains, you're leaving the rails.
|
|
@@ -106,7 +125,7 @@ export default createAureliusESLintConfig({
|
|
|
106
125
|
- **CSS files:** Tailwind v4 CSS best practices, valid `@apply` directives, no arbitrary value
|
|
107
126
|
overuse, and proper theme token usage
|
|
108
127
|
|
|
109
|
-
###
|
|
128
|
+
### 5. Update package.json scripts
|
|
110
129
|
|
|
111
130
|
Add a lint script and wire it into your workflow:
|
|
112
131
|
|
|
@@ -123,7 +142,7 @@ Add a lint script and wire it into your workflow:
|
|
|
123
142
|
If your project already has CI (or you're asked to add one), include `npm run lint` in that
|
|
124
143
|
pipeline so lint failures block merges.
|
|
125
144
|
|
|
126
|
-
###
|
|
145
|
+
### 6. Use components
|
|
127
146
|
|
|
128
147
|
```tsx
|
|
129
148
|
import {Button, Card, Input} from '@lukeashford/aurelius'
|
package/dist/index.d.mts
CHANGED
|
@@ -39,6 +39,7 @@ interface CardMediaProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
39
39
|
alt?: string;
|
|
40
40
|
aspect?: 'video' | 'square' | 'wide';
|
|
41
41
|
position?: 'top' | 'bottom';
|
|
42
|
+
isVideo?: boolean;
|
|
42
43
|
}
|
|
43
44
|
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>> & {
|
|
44
45
|
Header: React.ForwardRefExoticComponent<CardHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -571,6 +572,25 @@ interface ImageCardProps extends Omit<CardProps, 'title'> {
|
|
|
571
572
|
}
|
|
572
573
|
declare const ImageCard: React.ForwardRefExoticComponent<ImageCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
573
574
|
|
|
575
|
+
type VideoAspectRatioPreset = 'video' | 'cinema' | 'square';
|
|
576
|
+
type VideoAspectRatio = VideoAspectRatioPreset | `${number}/${number}`;
|
|
577
|
+
interface VideoCardProps extends Omit<CardProps, 'title'> {
|
|
578
|
+
src: string;
|
|
579
|
+
title?: React.ReactNode;
|
|
580
|
+
subtitle?: React.ReactNode;
|
|
581
|
+
aspectRatio?: VideoAspectRatio;
|
|
582
|
+
playing?: boolean;
|
|
583
|
+
controls?: boolean;
|
|
584
|
+
light?: boolean | string;
|
|
585
|
+
volume?: number;
|
|
586
|
+
muted?: boolean;
|
|
587
|
+
loop?: boolean;
|
|
588
|
+
mediaClassName?: string;
|
|
589
|
+
contentClassName?: string;
|
|
590
|
+
playerProps?: any;
|
|
591
|
+
}
|
|
592
|
+
declare const VideoCard: React.ForwardRefExoticComponent<VideoCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
593
|
+
|
|
574
594
|
type SectionHeadingLevel = 'h2' | 'h3';
|
|
575
595
|
interface SectionHeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
576
596
|
level?: SectionHeadingLevel;
|
|
@@ -589,4 +609,4 @@ declare const SectionHeading: React.ForwardRefExoticComponent<SectionHeadingProp
|
|
|
589
609
|
|
|
590
610
|
declare const version = "2.0.0";
|
|
591
611
|
|
|
592
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, type AspectRatio, type AspectRatioPreset, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, type CardVariant, ChatHistory, type ChatHistoryItem, type ChatHistoryProps, Checkbox, type CheckboxProps, Col, type ColOffset, type ColOrder, type ColProps, type ColSpan, ColorSwatch, type ColorSwatchProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, Divider, type DividerProps, Drawer, type DrawerPosition, type DrawerProps, HelperText, type HelperTextProps, ImageCard, type ImageCardProps, Input, type InputAddonProps, type InputElementProps, InputGroup, type InputGroupProps, InputLeftAddon, InputLeftElement, type InputProps, InputRightAddon, InputRightElement, InputWrapper, type InputWrapperProps, Label, type LabelProps, List, ListItem, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MarkdownContent, type MarkdownContentProps, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, Message, type MessageProps, type MessageVariant, Modal, type ModalProps, Navbar, NavbarBrand, type NavbarBrandProps, NavbarContent, type NavbarContentProps, NavbarDivider, NavbarItem, type NavbarItemProps, NavbarLink, type NavbarLinkProps, type NavbarProps, Pagination, type PaginationProps, Popover, type PopoverAlign, type PopoverPosition, type PopoverProps, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, Radio, type RadioProps, Row, type RowAlign, type RowGutter, type RowJustify, type RowProps, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stack, type StackDirection, type StackGap, type StackProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Textarea, type TextareaProps, type ToastData, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipProps, useToast, version };
|
|
612
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, type AspectRatio, type AspectRatioPreset, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, type CardVariant, ChatHistory, type ChatHistoryItem, type ChatHistoryProps, Checkbox, type CheckboxProps, Col, type ColOffset, type ColOrder, type ColProps, type ColSpan, ColorSwatch, type ColorSwatchProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, Divider, type DividerProps, Drawer, type DrawerPosition, type DrawerProps, HelperText, type HelperTextProps, ImageCard, type ImageCardProps, Input, type InputAddonProps, type InputElementProps, InputGroup, type InputGroupProps, InputLeftAddon, InputLeftElement, type InputProps, InputRightAddon, InputRightElement, InputWrapper, type InputWrapperProps, Label, type LabelProps, List, ListItem, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MarkdownContent, type MarkdownContentProps, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, Message, type MessageProps, type MessageVariant, Modal, type ModalProps, Navbar, NavbarBrand, type NavbarBrandProps, NavbarContent, type NavbarContentProps, NavbarDivider, NavbarItem, type NavbarItemProps, NavbarLink, type NavbarLinkProps, type NavbarProps, Pagination, type PaginationProps, Popover, type PopoverAlign, type PopoverPosition, type PopoverProps, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, Radio, type RadioProps, Row, type RowAlign, type RowGutter, type RowJustify, type RowProps, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stack, type StackDirection, type StackGap, type StackProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Textarea, type TextareaProps, type ToastData, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipProps, type VideoAspectRatio, type VideoAspectRatioPreset, VideoCard, type VideoCardProps, useToast, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ interface CardMediaProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
39
39
|
alt?: string;
|
|
40
40
|
aspect?: 'video' | 'square' | 'wide';
|
|
41
41
|
position?: 'top' | 'bottom';
|
|
42
|
+
isVideo?: boolean;
|
|
42
43
|
}
|
|
43
44
|
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>> & {
|
|
44
45
|
Header: React.ForwardRefExoticComponent<CardHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -571,6 +572,25 @@ interface ImageCardProps extends Omit<CardProps, 'title'> {
|
|
|
571
572
|
}
|
|
572
573
|
declare const ImageCard: React.ForwardRefExoticComponent<ImageCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
573
574
|
|
|
575
|
+
type VideoAspectRatioPreset = 'video' | 'cinema' | 'square';
|
|
576
|
+
type VideoAspectRatio = VideoAspectRatioPreset | `${number}/${number}`;
|
|
577
|
+
interface VideoCardProps extends Omit<CardProps, 'title'> {
|
|
578
|
+
src: string;
|
|
579
|
+
title?: React.ReactNode;
|
|
580
|
+
subtitle?: React.ReactNode;
|
|
581
|
+
aspectRatio?: VideoAspectRatio;
|
|
582
|
+
playing?: boolean;
|
|
583
|
+
controls?: boolean;
|
|
584
|
+
light?: boolean | string;
|
|
585
|
+
volume?: number;
|
|
586
|
+
muted?: boolean;
|
|
587
|
+
loop?: boolean;
|
|
588
|
+
mediaClassName?: string;
|
|
589
|
+
contentClassName?: string;
|
|
590
|
+
playerProps?: any;
|
|
591
|
+
}
|
|
592
|
+
declare const VideoCard: React.ForwardRefExoticComponent<VideoCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
593
|
+
|
|
574
594
|
type SectionHeadingLevel = 'h2' | 'h3';
|
|
575
595
|
interface SectionHeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
576
596
|
level?: SectionHeadingLevel;
|
|
@@ -589,4 +609,4 @@ declare const SectionHeading: React.ForwardRefExoticComponent<SectionHeadingProp
|
|
|
589
609
|
|
|
590
610
|
declare const version = "2.0.0";
|
|
591
611
|
|
|
592
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, type AspectRatio, type AspectRatioPreset, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, type CardVariant, ChatHistory, type ChatHistoryItem, type ChatHistoryProps, Checkbox, type CheckboxProps, Col, type ColOffset, type ColOrder, type ColProps, type ColSpan, ColorSwatch, type ColorSwatchProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, Divider, type DividerProps, Drawer, type DrawerPosition, type DrawerProps, HelperText, type HelperTextProps, ImageCard, type ImageCardProps, Input, type InputAddonProps, type InputElementProps, InputGroup, type InputGroupProps, InputLeftAddon, InputLeftElement, type InputProps, InputRightAddon, InputRightElement, InputWrapper, type InputWrapperProps, Label, type LabelProps, List, ListItem, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MarkdownContent, type MarkdownContentProps, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, Message, type MessageProps, type MessageVariant, Modal, type ModalProps, Navbar, NavbarBrand, type NavbarBrandProps, NavbarContent, type NavbarContentProps, NavbarDivider, NavbarItem, type NavbarItemProps, NavbarLink, type NavbarLinkProps, type NavbarProps, Pagination, type PaginationProps, Popover, type PopoverAlign, type PopoverPosition, type PopoverProps, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, Radio, type RadioProps, Row, type RowAlign, type RowGutter, type RowJustify, type RowProps, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stack, type StackDirection, type StackGap, type StackProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Textarea, type TextareaProps, type ToastData, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipProps, useToast, version };
|
|
612
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, type AspectRatio, type AspectRatioPreset, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, type CardVariant, ChatHistory, type ChatHistoryItem, type ChatHistoryProps, Checkbox, type CheckboxProps, Col, type ColOffset, type ColOrder, type ColProps, type ColSpan, ColorSwatch, type ColorSwatchProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, Divider, type DividerProps, Drawer, type DrawerPosition, type DrawerProps, HelperText, type HelperTextProps, ImageCard, type ImageCardProps, Input, type InputAddonProps, type InputElementProps, InputGroup, type InputGroupProps, InputLeftAddon, InputLeftElement, type InputProps, InputRightAddon, InputRightElement, InputWrapper, type InputWrapperProps, Label, type LabelProps, List, ListItem, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MarkdownContent, type MarkdownContentProps, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, Message, type MessageProps, type MessageVariant, Modal, type ModalProps, Navbar, NavbarBrand, type NavbarBrandProps, NavbarContent, type NavbarContentProps, NavbarDivider, NavbarItem, type NavbarItemProps, NavbarLink, type NavbarLinkProps, type NavbarProps, Pagination, type PaginationProps, Popover, type PopoverAlign, type PopoverPosition, type PopoverProps, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, Radio, type RadioProps, Row, type RowAlign, type RowGutter, type RowJustify, type RowProps, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stack, type StackDirection, type StackGap, type StackProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Textarea, type TextareaProps, type ToastData, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipProps, type VideoAspectRatio, type VideoAspectRatioPreset, VideoCard, type VideoCardProps, useToast, version };
|
package/dist/index.js
CHANGED
|
@@ -111,6 +111,7 @@ __export(index_exports, {
|
|
|
111
111
|
Textarea: () => Textarea,
|
|
112
112
|
ToastProvider: () => ToastProvider,
|
|
113
113
|
Tooltip: () => Tooltip,
|
|
114
|
+
VideoCard: () => VideoCard,
|
|
114
115
|
useToast: () => useToast,
|
|
115
116
|
version: () => version
|
|
116
117
|
});
|
|
@@ -196,6 +197,7 @@ Input.displayName = "Input";
|
|
|
196
197
|
|
|
197
198
|
// src/components/Card.tsx
|
|
198
199
|
var import_react3 = __toESM(require("react"));
|
|
200
|
+
var import_react_player = __toESM(require("react-player"));
|
|
199
201
|
var import_lucide_react = require("lucide-react");
|
|
200
202
|
var VARIANT_STYLES = {
|
|
201
203
|
default: "bg-charcoal shadow-sm border border-gold/30",
|
|
@@ -229,7 +231,13 @@ var CardBase = import_react3.default.forwardRef(
|
|
|
229
231
|
...props
|
|
230
232
|
},
|
|
231
233
|
children,
|
|
232
|
-
selected && /* @__PURE__ */ import_react3.default.createElement(
|
|
234
|
+
selected && /* @__PURE__ */ import_react3.default.createElement(
|
|
235
|
+
"div",
|
|
236
|
+
{
|
|
237
|
+
className: "absolute top-3 right-3 flex items-center justify-center h-6 w-6 rounded-full bg-gold text-obsidian"
|
|
238
|
+
},
|
|
239
|
+
/* @__PURE__ */ import_react3.default.createElement(import_lucide_react.Check, { className: "h-4 w-4" })
|
|
240
|
+
)
|
|
233
241
|
);
|
|
234
242
|
}
|
|
235
243
|
);
|
|
@@ -279,7 +287,16 @@ var CardFooter = import_react3.default.forwardRef(
|
|
|
279
287
|
);
|
|
280
288
|
CardFooter.displayName = "CardFooter";
|
|
281
289
|
var CardMedia = import_react3.default.forwardRef(
|
|
282
|
-
({
|
|
290
|
+
({
|
|
291
|
+
src,
|
|
292
|
+
alt = "",
|
|
293
|
+
aspect = "video",
|
|
294
|
+
position = "top",
|
|
295
|
+
isVideo = false,
|
|
296
|
+
className,
|
|
297
|
+
children,
|
|
298
|
+
...props
|
|
299
|
+
}, ref) => {
|
|
283
300
|
const aspectClass = {
|
|
284
301
|
video: "aspect-video",
|
|
285
302
|
square: "aspect-square",
|
|
@@ -290,7 +307,7 @@ var CardMedia = import_react3.default.forwardRef(
|
|
|
290
307
|
{
|
|
291
308
|
ref,
|
|
292
309
|
className: cx(
|
|
293
|
-
"overflow-hidden",
|
|
310
|
+
"overflow-hidden relative",
|
|
294
311
|
aspectClass,
|
|
295
312
|
position === "top" && "border-b border-ash",
|
|
296
313
|
position === "bottom" && "border-t border-ash",
|
|
@@ -298,7 +315,16 @@ var CardMedia = import_react3.default.forwardRef(
|
|
|
298
315
|
),
|
|
299
316
|
...props
|
|
300
317
|
},
|
|
301
|
-
src ? /* @__PURE__ */ import_react3.default.createElement(
|
|
318
|
+
src ? isVideo ? /* @__PURE__ */ import_react3.default.createElement(
|
|
319
|
+
import_react_player.default,
|
|
320
|
+
{
|
|
321
|
+
src,
|
|
322
|
+
width: "100%",
|
|
323
|
+
height: "100%",
|
|
324
|
+
className: "absolute top-0 left-0",
|
|
325
|
+
controls: true
|
|
326
|
+
}
|
|
327
|
+
) : /* @__PURE__ */ import_react3.default.createElement("img", { src, alt, className: "w-full h-full object-cover" }) : children
|
|
302
328
|
);
|
|
303
329
|
}
|
|
304
330
|
);
|
|
@@ -3412,21 +3438,91 @@ var ImageCard = import_react45.default.forwardRef(
|
|
|
3412
3438
|
},
|
|
3413
3439
|
overlay
|
|
3414
3440
|
)
|
|
3415
|
-
), (title || subtitle || children) && /* @__PURE__ */ import_react45.default.createElement("div", { className: cx("px-4
|
|
3441
|
+
), (title || subtitle || children) && /* @__PURE__ */ import_react45.default.createElement("div", { className: cx("px-4 py-4", contentClassName) }, title && /* @__PURE__ */ import_react45.default.createElement("h4", { className: "text-lg font-semibold leading-tight" }, title), subtitle && /* @__PURE__ */ import_react45.default.createElement("p", { className: "text-sm text-silver leading-normal" }, subtitle), children));
|
|
3416
3442
|
}
|
|
3417
3443
|
);
|
|
3418
3444
|
ImageCard.displayName = "ImageCard";
|
|
3419
3445
|
|
|
3420
|
-
// src/components/
|
|
3446
|
+
// src/components/VideoCard.tsx
|
|
3421
3447
|
var import_react46 = __toESM(require("react"));
|
|
3448
|
+
var import_react_player2 = __toESM(require("react-player"));
|
|
3449
|
+
var ASPECT_RATIO_PRESETS2 = {
|
|
3450
|
+
video: "16 / 9",
|
|
3451
|
+
cinema: "21 / 9",
|
|
3452
|
+
square: "1 / 1"
|
|
3453
|
+
};
|
|
3454
|
+
function resolveAspectRatio2(ratio) {
|
|
3455
|
+
if (ratio in ASPECT_RATIO_PRESETS2) {
|
|
3456
|
+
return ASPECT_RATIO_PRESETS2[ratio];
|
|
3457
|
+
}
|
|
3458
|
+
return ratio.replace("/", " / ");
|
|
3459
|
+
}
|
|
3460
|
+
var VideoCard = import_react46.default.forwardRef(
|
|
3461
|
+
({
|
|
3462
|
+
src,
|
|
3463
|
+
title,
|
|
3464
|
+
subtitle,
|
|
3465
|
+
aspectRatio = "video",
|
|
3466
|
+
playing = false,
|
|
3467
|
+
controls = true,
|
|
3468
|
+
light = false,
|
|
3469
|
+
volume,
|
|
3470
|
+
muted = false,
|
|
3471
|
+
loop = false,
|
|
3472
|
+
mediaClassName,
|
|
3473
|
+
contentClassName,
|
|
3474
|
+
className,
|
|
3475
|
+
children,
|
|
3476
|
+
playerProps,
|
|
3477
|
+
...props
|
|
3478
|
+
}, ref) => {
|
|
3479
|
+
const hasAspectRatio = aspectRatio !== void 0;
|
|
3480
|
+
return /* @__PURE__ */ import_react46.default.createElement(Card, { ref, className: cx("p-0 overflow-hidden group w-full", className), ...props }, /* @__PURE__ */ import_react46.default.createElement(
|
|
3481
|
+
"div",
|
|
3482
|
+
{
|
|
3483
|
+
className: cx(
|
|
3484
|
+
"relative bg-black overflow-hidden",
|
|
3485
|
+
mediaClassName
|
|
3486
|
+
),
|
|
3487
|
+
style: { aspectRatio: resolveAspectRatio2(aspectRatio) }
|
|
3488
|
+
},
|
|
3489
|
+
/* @__PURE__ */ import_react46.default.createElement(
|
|
3490
|
+
import_react_player2.default,
|
|
3491
|
+
{
|
|
3492
|
+
src,
|
|
3493
|
+
playing,
|
|
3494
|
+
controls,
|
|
3495
|
+
light,
|
|
3496
|
+
volume,
|
|
3497
|
+
muted,
|
|
3498
|
+
loop,
|
|
3499
|
+
width: "100%",
|
|
3500
|
+
height: "100%",
|
|
3501
|
+
className: "absolute top-0 left-0",
|
|
3502
|
+
...playerProps
|
|
3503
|
+
}
|
|
3504
|
+
)
|
|
3505
|
+
), (title || subtitle || children) && /* @__PURE__ */ import_react46.default.createElement("div", { className: cx("px-4 py-4", contentClassName) }, title && /* @__PURE__ */ import_react46.default.createElement("h4", { className: "text-lg font-semibold leading-tight" }, title), subtitle && /* @__PURE__ */ import_react46.default.createElement(
|
|
3506
|
+
"p",
|
|
3507
|
+
{
|
|
3508
|
+
className: "text-sm text-silver leading-normal mt-1"
|
|
3509
|
+
},
|
|
3510
|
+
subtitle
|
|
3511
|
+
), children));
|
|
3512
|
+
}
|
|
3513
|
+
);
|
|
3514
|
+
VideoCard.displayName = "VideoCard";
|
|
3515
|
+
|
|
3516
|
+
// src/components/SectionHeading.tsx
|
|
3517
|
+
var import_react47 = __toESM(require("react"));
|
|
3422
3518
|
var levelStyles = {
|
|
3423
3519
|
h2: "text-2xl mb-4",
|
|
3424
3520
|
h3: "text-xl mb-3"
|
|
3425
3521
|
};
|
|
3426
|
-
var SectionHeading =
|
|
3522
|
+
var SectionHeading = import_react47.default.forwardRef(
|
|
3427
3523
|
({ level = "h2", children, className, ...rest }, ref) => {
|
|
3428
3524
|
const Component = level;
|
|
3429
|
-
return /* @__PURE__ */
|
|
3525
|
+
return /* @__PURE__ */ import_react47.default.createElement(
|
|
3430
3526
|
Component,
|
|
3431
3527
|
{
|
|
3432
3528
|
ref,
|
|
@@ -3528,6 +3624,7 @@ var version = "2.0.0";
|
|
|
3528
3624
|
Textarea,
|
|
3529
3625
|
ToastProvider,
|
|
3530
3626
|
Tooltip,
|
|
3627
|
+
VideoCard,
|
|
3531
3628
|
useToast,
|
|
3532
3629
|
version
|
|
3533
3630
|
});
|