@lukeashford/aurelius 2.7.0 → 2.8.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/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 +1 -0
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -78,6 +78,7 @@ Input.displayName = "Input";
|
|
|
78
78
|
|
|
79
79
|
// src/components/Card.tsx
|
|
80
80
|
import React3 from "react";
|
|
81
|
+
import ReactPlayer from "react-player";
|
|
81
82
|
import { Check } from "lucide-react";
|
|
82
83
|
var VARIANT_STYLES = {
|
|
83
84
|
default: "bg-charcoal shadow-sm border border-gold/30",
|
|
@@ -111,7 +112,13 @@ var CardBase = React3.forwardRef(
|
|
|
111
112
|
...props
|
|
112
113
|
},
|
|
113
114
|
children,
|
|
114
|
-
selected && /* @__PURE__ */ React3.createElement(
|
|
115
|
+
selected && /* @__PURE__ */ React3.createElement(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
className: "absolute top-3 right-3 flex items-center justify-center h-6 w-6 rounded-full bg-gold text-obsidian"
|
|
119
|
+
},
|
|
120
|
+
/* @__PURE__ */ React3.createElement(Check, { className: "h-4 w-4" })
|
|
121
|
+
)
|
|
115
122
|
);
|
|
116
123
|
}
|
|
117
124
|
);
|
|
@@ -161,7 +168,16 @@ var CardFooter = React3.forwardRef(
|
|
|
161
168
|
);
|
|
162
169
|
CardFooter.displayName = "CardFooter";
|
|
163
170
|
var CardMedia = React3.forwardRef(
|
|
164
|
-
({
|
|
171
|
+
({
|
|
172
|
+
src,
|
|
173
|
+
alt = "",
|
|
174
|
+
aspect = "video",
|
|
175
|
+
position = "top",
|
|
176
|
+
isVideo = false,
|
|
177
|
+
className,
|
|
178
|
+
children,
|
|
179
|
+
...props
|
|
180
|
+
}, ref) => {
|
|
165
181
|
const aspectClass = {
|
|
166
182
|
video: "aspect-video",
|
|
167
183
|
square: "aspect-square",
|
|
@@ -172,7 +188,7 @@ var CardMedia = React3.forwardRef(
|
|
|
172
188
|
{
|
|
173
189
|
ref,
|
|
174
190
|
className: cx(
|
|
175
|
-
"overflow-hidden",
|
|
191
|
+
"overflow-hidden relative",
|
|
176
192
|
aspectClass,
|
|
177
193
|
position === "top" && "border-b border-ash",
|
|
178
194
|
position === "bottom" && "border-t border-ash",
|
|
@@ -180,7 +196,16 @@ var CardMedia = React3.forwardRef(
|
|
|
180
196
|
),
|
|
181
197
|
...props
|
|
182
198
|
},
|
|
183
|
-
src ? /* @__PURE__ */ React3.createElement(
|
|
199
|
+
src ? isVideo ? /* @__PURE__ */ React3.createElement(
|
|
200
|
+
ReactPlayer,
|
|
201
|
+
{
|
|
202
|
+
src,
|
|
203
|
+
width: "100%",
|
|
204
|
+
height: "100%",
|
|
205
|
+
className: "absolute top-0 left-0",
|
|
206
|
+
controls: true
|
|
207
|
+
}
|
|
208
|
+
) : /* @__PURE__ */ React3.createElement("img", { src, alt, className: "w-full h-full object-cover" }) : children
|
|
184
209
|
);
|
|
185
210
|
}
|
|
186
211
|
);
|
|
@@ -3302,21 +3327,91 @@ var ImageCard = React45.forwardRef(
|
|
|
3302
3327
|
},
|
|
3303
3328
|
overlay
|
|
3304
3329
|
)
|
|
3305
|
-
), (title || subtitle || children) && /* @__PURE__ */ React45.createElement("div", { className: cx("px-4
|
|
3330
|
+
), (title || subtitle || children) && /* @__PURE__ */ React45.createElement("div", { className: cx("px-4 py-4", contentClassName) }, title && /* @__PURE__ */ React45.createElement("h4", { className: "text-lg font-semibold leading-tight" }, title), subtitle && /* @__PURE__ */ React45.createElement("p", { className: "text-sm text-silver leading-normal" }, subtitle), children));
|
|
3306
3331
|
}
|
|
3307
3332
|
);
|
|
3308
3333
|
ImageCard.displayName = "ImageCard";
|
|
3309
3334
|
|
|
3310
|
-
// src/components/
|
|
3335
|
+
// src/components/VideoCard.tsx
|
|
3311
3336
|
import React46 from "react";
|
|
3337
|
+
import ReactPlayer2 from "react-player";
|
|
3338
|
+
var ASPECT_RATIO_PRESETS2 = {
|
|
3339
|
+
video: "16 / 9",
|
|
3340
|
+
cinema: "21 / 9",
|
|
3341
|
+
square: "1 / 1"
|
|
3342
|
+
};
|
|
3343
|
+
function resolveAspectRatio2(ratio) {
|
|
3344
|
+
if (ratio in ASPECT_RATIO_PRESETS2) {
|
|
3345
|
+
return ASPECT_RATIO_PRESETS2[ratio];
|
|
3346
|
+
}
|
|
3347
|
+
return ratio.replace("/", " / ");
|
|
3348
|
+
}
|
|
3349
|
+
var VideoCard = React46.forwardRef(
|
|
3350
|
+
({
|
|
3351
|
+
src,
|
|
3352
|
+
title,
|
|
3353
|
+
subtitle,
|
|
3354
|
+
aspectRatio = "video",
|
|
3355
|
+
playing = false,
|
|
3356
|
+
controls = true,
|
|
3357
|
+
light = false,
|
|
3358
|
+
volume,
|
|
3359
|
+
muted = false,
|
|
3360
|
+
loop = false,
|
|
3361
|
+
mediaClassName,
|
|
3362
|
+
contentClassName,
|
|
3363
|
+
className,
|
|
3364
|
+
children,
|
|
3365
|
+
playerProps,
|
|
3366
|
+
...props
|
|
3367
|
+
}, ref) => {
|
|
3368
|
+
const hasAspectRatio = aspectRatio !== void 0;
|
|
3369
|
+
return /* @__PURE__ */ React46.createElement(Card, { ref, className: cx("p-0 overflow-hidden group w-full", className), ...props }, /* @__PURE__ */ React46.createElement(
|
|
3370
|
+
"div",
|
|
3371
|
+
{
|
|
3372
|
+
className: cx(
|
|
3373
|
+
"relative bg-black overflow-hidden",
|
|
3374
|
+
mediaClassName
|
|
3375
|
+
),
|
|
3376
|
+
style: { aspectRatio: resolveAspectRatio2(aspectRatio) }
|
|
3377
|
+
},
|
|
3378
|
+
/* @__PURE__ */ React46.createElement(
|
|
3379
|
+
ReactPlayer2,
|
|
3380
|
+
{
|
|
3381
|
+
src,
|
|
3382
|
+
playing,
|
|
3383
|
+
controls,
|
|
3384
|
+
light,
|
|
3385
|
+
volume,
|
|
3386
|
+
muted,
|
|
3387
|
+
loop,
|
|
3388
|
+
width: "100%",
|
|
3389
|
+
height: "100%",
|
|
3390
|
+
className: "absolute top-0 left-0",
|
|
3391
|
+
...playerProps
|
|
3392
|
+
}
|
|
3393
|
+
)
|
|
3394
|
+
), (title || subtitle || children) && /* @__PURE__ */ React46.createElement("div", { className: cx("px-4 py-4", contentClassName) }, title && /* @__PURE__ */ React46.createElement("h4", { className: "text-lg font-semibold leading-tight" }, title), subtitle && /* @__PURE__ */ React46.createElement(
|
|
3395
|
+
"p",
|
|
3396
|
+
{
|
|
3397
|
+
className: "text-sm text-silver leading-normal mt-1"
|
|
3398
|
+
},
|
|
3399
|
+
subtitle
|
|
3400
|
+
), children));
|
|
3401
|
+
}
|
|
3402
|
+
);
|
|
3403
|
+
VideoCard.displayName = "VideoCard";
|
|
3404
|
+
|
|
3405
|
+
// src/components/SectionHeading.tsx
|
|
3406
|
+
import React47 from "react";
|
|
3312
3407
|
var levelStyles = {
|
|
3313
3408
|
h2: "text-2xl mb-4",
|
|
3314
3409
|
h3: "text-xl mb-3"
|
|
3315
3410
|
};
|
|
3316
|
-
var SectionHeading =
|
|
3411
|
+
var SectionHeading = React47.forwardRef(
|
|
3317
3412
|
({ level = "h2", children, className, ...rest }, ref) => {
|
|
3318
3413
|
const Component = level;
|
|
3319
|
-
return /* @__PURE__ */
|
|
3414
|
+
return /* @__PURE__ */ React47.createElement(
|
|
3320
3415
|
Component,
|
|
3321
3416
|
{
|
|
3322
3417
|
ref,
|
|
@@ -3417,6 +3512,7 @@ export {
|
|
|
3417
3512
|
Textarea,
|
|
3418
3513
|
ToastProvider,
|
|
3419
3514
|
Tooltip,
|
|
3515
|
+
VideoCard,
|
|
3420
3516
|
useToast,
|
|
3421
3517
|
version
|
|
3422
3518
|
};
|