@krizaka/ui 3.84.0 → 3.85.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/app-header/search.js +1 -1
- package/dist/app-shell.js +16 -25
- package/dist/app-shell.js.map +1 -1
- package/dist/bird-plate.js +1 -1
- package/dist/card-grid.js +1 -1
- package/dist/{chunk-DJ5ZPPWL.js → chunk-7P7I5OQV.js} +2 -2
- package/dist/{chunk-27AWSJTK.js → chunk-EDQLPCM4.js} +2 -2
- package/dist/chunk-FYPYJ6MW.js +60 -0
- package/dist/chunk-FYPYJ6MW.js.map +1 -0
- package/dist/chunk-QHVV2JGF.js +144 -0
- package/dist/chunk-QHVV2JGF.js.map +1 -0
- package/dist/chunk-S2O4NSN5.js +72 -0
- package/dist/{chunk-GFRUTPGG.js.map → chunk-S2O4NSN5.js.map} +1 -1
- package/dist/chunk-TN5JJ6JI.js +60 -0
- package/dist/chunk-TN5JJ6JI.js.map +1 -0
- package/dist/{chunk-XVXFMVG3.js → chunk-TVLRE7S3.js} +2 -2
- package/dist/chunk-VYZFQE3P.js +518 -0
- package/dist/chunk-VYZFQE3P.js.map +1 -0
- package/dist/{chunk-7MQNG35Q.js → chunk-ZKKMYIDN.js} +3 -2
- package/dist/chunk-ZKKMYIDN.js.map +1 -0
- package/dist/code-block.js +2 -2
- package/dist/cover-hero.js +3 -3
- package/dist/filter-bar.d.ts +3 -3
- package/dist/flock.js +1 -1
- package/dist/grade-stamp.js +2 -2
- package/dist/map.d.ts +6 -6
- package/dist/mascot-quote.js +1 -1
- package/dist/media-carousel.d.ts +113 -0
- package/dist/media-carousel.js +122 -0
- package/dist/media-carousel.js.map +1 -0
- package/dist/media-player.d.ts +177 -0
- package/dist/media-player.js +14 -0
- package/dist/media-player.js.map +1 -0
- package/dist/player-lightbox-ETBQWDOT.js +148 -0
- package/dist/player-lightbox-ETBQWDOT.js.map +1 -0
- package/dist/rail-nav.js +3 -3
- package/dist/retro-tv-playlist.d.ts +2 -0
- package/dist/retro-tv.js +1 -1
- package/dist/site-cahier.js +4 -4
- package/dist/taped-photo.js +2 -2
- package/dist/toc.js +1 -1
- package/dist/versus-card.js +1 -1
- package/dist/video-player.d.ts +3 -1
- package/dist/video-player.js +1 -1
- package/dist/virtual.d.ts +3 -3
- package/dist/wall.js +2 -2
- package/package.json +33 -5
- package/registry/app-frame.json +1 -1
- package/registry/examples/media-gallery/carousel.d.ts +4 -0
- package/registry/examples/media-gallery/carousel.js +22 -0
- package/registry/examples/media-gallery/carousel.tsx +20 -0
- package/registry/examples/media-gallery/player.d.ts +4 -0
- package/registry/examples/media-gallery/player.js +15 -0
- package/registry/examples/media-gallery/player.tsx +13 -0
- package/registry/index.json +15 -11
- package/registry/map.json +1 -1
- package/registry/media-gallery.json +57 -6
- package/registry/nav-bar.json +1 -1
- package/registry/rail-nav.json +1 -1
- package/registry/retro-tv.json +14 -0
- package/registry/shop.json +1 -1
- package/registry/site-footer.json +1 -1
- package/registry/video-player.json +15 -1
- package/dist/chunk-7MQNG35Q.js.map +0 -1
- package/dist/chunk-GFRUTPGG.js +0 -43
- /package/dist/{chunk-DJ5ZPPWL.js.map → chunk-7P7I5OQV.js.map} +0 -0
- /package/dist/{chunk-27AWSJTK.js.map → chunk-EDQLPCM4.js.map} +0 -0
- /package/dist/{chunk-XVXFMVG3.js.map → chunk-TVLRE7S3.js.map} +0 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
/** What `loadHls` resolves to: the module of hls.js (only the members the player uses are typed). */
|
|
5
|
+
type HlsModule = {
|
|
6
|
+
default: {
|
|
7
|
+
new (config?: Record<string, unknown>): {
|
|
8
|
+
loadSource(url: string): void;
|
|
9
|
+
attachMedia(media: HTMLMediaElement): void;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
startLoad(): void;
|
|
12
|
+
recoverMediaError(): void;
|
|
13
|
+
on(event: string, listener: (event: string, data: {
|
|
14
|
+
fatal?: boolean;
|
|
15
|
+
type?: string;
|
|
16
|
+
}) => void): void;
|
|
17
|
+
};
|
|
18
|
+
isSupported(): boolean;
|
|
19
|
+
Events: {
|
|
20
|
+
ERROR: string;
|
|
21
|
+
};
|
|
22
|
+
ErrorTypes: {
|
|
23
|
+
NETWORK_ERROR: string;
|
|
24
|
+
MEDIA_ERROR: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
type VideoTrack = {
|
|
29
|
+
/** The WebVTT file. */
|
|
30
|
+
src: string;
|
|
31
|
+
/** Its language, BCP 47 (`"fr"`). */
|
|
32
|
+
srcLang: string;
|
|
33
|
+
/** Its name in the menu ("Français"), passed translated. */
|
|
34
|
+
label: string;
|
|
35
|
+
/** `subtitles` (default) or `captions` (with the sounds, for deaf viewers). */
|
|
36
|
+
kind?: "subtitles" | "captions";
|
|
37
|
+
/** Shown from the start. */
|
|
38
|
+
default?: boolean;
|
|
39
|
+
};
|
|
40
|
+
type VideoPlayerLabels = {
|
|
41
|
+
play: string;
|
|
42
|
+
pause: string;
|
|
43
|
+
mute: string;
|
|
44
|
+
unmute: string;
|
|
45
|
+
volume: string;
|
|
46
|
+
seek: string;
|
|
47
|
+
/** The speed button: `(rate) => "Speed " + rate + "×"`. */
|
|
48
|
+
speed: (rate: number) => string;
|
|
49
|
+
/** The captions button: `(track) => "Subtitles: " + (track ?? "off")`, the track's label or `null` when off. */
|
|
50
|
+
captions: (track: string | null) => string;
|
|
51
|
+
fullscreen: string;
|
|
52
|
+
exitFullscreen: string;
|
|
53
|
+
pictureInPicture: string;
|
|
54
|
+
/** Read while the video waits for data. */
|
|
55
|
+
loading: string;
|
|
56
|
+
/** The video cannot play. */
|
|
57
|
+
error: string;
|
|
58
|
+
/** Tries again (resolves a signed `src` again). */
|
|
59
|
+
retry: string;
|
|
60
|
+
/** The seek slider's value: `(time, duration) => "1:05 of 3:20"`. */
|
|
61
|
+
time: (time: string, duration: string) => string;
|
|
62
|
+
};
|
|
63
|
+
type VideoPlayerProps = {
|
|
64
|
+
/** The address of the video (MP4, WebM, or an HLS `.m3u8`), or a function that resolves a signed one when needed. */
|
|
65
|
+
src: string | (() => Promise<string>);
|
|
66
|
+
/** `auto` (default): HLS when the address ends in `.m3u8`. */
|
|
67
|
+
type?: "auto" | "hls" | "file";
|
|
68
|
+
/** Loads hls.js when the browser cannot play HLS itself: `() => import("hls.js")`. Without it, HLS needs Safari. */
|
|
69
|
+
loadHls?: () => Promise<HlsModule>;
|
|
70
|
+
/** The accessible name of the player ("Video: Sunset over Montréal"), passed translated. */
|
|
71
|
+
title: string;
|
|
72
|
+
/** The picture shown before playback. */
|
|
73
|
+
poster?: string;
|
|
74
|
+
/** Starts playing, muted (browsers refuse sound without a gesture), once on screen and again each time it comes back — not under reduced motion. */
|
|
75
|
+
autoPlay?: boolean;
|
|
76
|
+
/** Starts muted. */
|
|
77
|
+
muted?: boolean;
|
|
78
|
+
/** Starts playing as soon as it mounts, with sound: for a player opened by a press (a lightbox), never for one that was already on the page. */
|
|
79
|
+
playOnMount?: boolean;
|
|
80
|
+
/** Plays again from the start at the end. */
|
|
81
|
+
loop?: boolean;
|
|
82
|
+
/** How much to fetch before playback: `none` (a list of many videos), `metadata` (default), `auto`. */
|
|
83
|
+
preload?: "none" | "metadata" | "auto";
|
|
84
|
+
/** Subtitles or captions (WebVTT): the C key and a button cycle through them. */
|
|
85
|
+
tracks?: readonly VideoTrack[];
|
|
86
|
+
/** The speeds offered by the speed button. Default `[0.5, 1, 1.25, 1.5, 2]`. */
|
|
87
|
+
playbackRates?: readonly number[];
|
|
88
|
+
/** Pauses when less than a quarter of the player is on screen. Default `true`. */
|
|
89
|
+
pauseWhenHidden?: boolean;
|
|
90
|
+
/** Shows the controls (default). `false`: a bare video (a background loop) — give it no sound. */
|
|
91
|
+
controls?: boolean;
|
|
92
|
+
/** Covers the video and hides the controls: a gate (sign in, unlock, age check) drawn by the app. */
|
|
93
|
+
overlay?: React.ReactNode;
|
|
94
|
+
/** The width / height ratio of the frame. Default `"16 / 9"`; `"9 / 16"` for a vertical video. */
|
|
95
|
+
aspectRatio?: string;
|
|
96
|
+
/** Called when playback starts. */
|
|
97
|
+
onPlay?: () => void;
|
|
98
|
+
/** Called when playback pauses. */
|
|
99
|
+
onPause?: () => void;
|
|
100
|
+
/** Called at the end. */
|
|
101
|
+
onEnded?: () => void;
|
|
102
|
+
/** Called as the time moves, in seconds (a few times a second). */
|
|
103
|
+
onTimeUpdate?: (time: number) => void;
|
|
104
|
+
/** Called when the video cannot play (a network failure, an expired address). */
|
|
105
|
+
onError?: (error: unknown) => void;
|
|
106
|
+
/** The words, passed translated; English by default. */
|
|
107
|
+
labels?: Partial<VideoPlayerLabels>;
|
|
108
|
+
/** Classes merged on the root. */
|
|
109
|
+
className?: string;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
declare const mediaPlayer: tailwind_variants.TVReturnType<{
|
|
113
|
+
[key: string]: {
|
|
114
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
115
|
+
caption?: tailwind_variants.ClassValue;
|
|
116
|
+
image?: tailwind_variants.ClassValue;
|
|
117
|
+
poster?: tailwind_variants.ClassValue;
|
|
118
|
+
play?: tailwind_variants.ClassValue;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
} | {
|
|
122
|
+
[x: string]: {
|
|
123
|
+
[x: string]: tailwind_variants.ClassValue | {
|
|
124
|
+
caption?: tailwind_variants.ClassValue;
|
|
125
|
+
image?: tailwind_variants.ClassValue;
|
|
126
|
+
poster?: tailwind_variants.ClassValue;
|
|
127
|
+
play?: tailwind_variants.ClassValue;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
} | {}, {
|
|
131
|
+
poster: string;
|
|
132
|
+
image: string;
|
|
133
|
+
play: string;
|
|
134
|
+
caption: string;
|
|
135
|
+
}, undefined, {
|
|
136
|
+
[key: string]: {
|
|
137
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
138
|
+
caption?: tailwind_variants.ClassValue;
|
|
139
|
+
image?: tailwind_variants.ClassValue;
|
|
140
|
+
poster?: tailwind_variants.ClassValue;
|
|
141
|
+
play?: tailwind_variants.ClassValue;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
} | {}, {
|
|
145
|
+
poster: string;
|
|
146
|
+
image: string;
|
|
147
|
+
play: string;
|
|
148
|
+
caption: string;
|
|
149
|
+
}, tailwind_variants.TVReturnTypeLike<unknown, {
|
|
150
|
+
poster: string;
|
|
151
|
+
image: string;
|
|
152
|
+
play: string;
|
|
153
|
+
caption: string;
|
|
154
|
+
}>>;
|
|
155
|
+
type MediaPlayerProps = Pick<VideoPlayerProps, "src" | "poster" | "title" | "tracks" | "loadHls" | "labels" | "onPlay" | "onPause" | "onEnded" | "onError"> & {
|
|
156
|
+
/** `inline`: the player itself. `lightbox`: a poster that opens it in a dialog. Default `inline`. */
|
|
157
|
+
mode?: "inline" | "lightbox";
|
|
158
|
+
/** `9 / 16` frame for a vertical film; default `16 / 9`. */
|
|
159
|
+
vertical?: boolean;
|
|
160
|
+
/** The poster's words in the lightbox ("Play the film"), passed translated. Required for `lightbox`. */
|
|
161
|
+
playLabel?: string;
|
|
162
|
+
/** The close button's words, passed translated. Default `Close`. */
|
|
163
|
+
closeLabel?: string;
|
|
164
|
+
/** What the poster shows, in words (the `alt` of its image); default is empty (decorative: `playLabel` names the button). */
|
|
165
|
+
posterAlt?: string;
|
|
166
|
+
/** A line over the foot of the poster (« Fig. 1a »). */
|
|
167
|
+
caption?: string;
|
|
168
|
+
/** Called when the lightbox opens or closes. */
|
|
169
|
+
onOpenChange?: (open: boolean) => void;
|
|
170
|
+
/** Classes merged on the player or the poster. */
|
|
171
|
+
className?: string;
|
|
172
|
+
};
|
|
173
|
+
/** A video in one frame: inline, in a lightbox (a press opens it with sound), 16:9 or vertical. */
|
|
174
|
+
declare function MediaPlayer({ mode, vertical, playLabel, closeLabel, posterAlt, caption, onOpenChange, className, ...player }: MediaPlayerProps): React.JSX.Element;
|
|
175
|
+
|
|
176
|
+
export { MediaPlayer, mediaPlayer };
|
|
177
|
+
export type { MediaPlayerProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
MediaPlayer,
|
|
4
|
+
mediaPlayer
|
|
5
|
+
} from "./chunk-FYPYJ6MW.js";
|
|
6
|
+
import "./chunk-VYZFQE3P.js";
|
|
7
|
+
import "./chunk-TN5JJ6JI.js";
|
|
8
|
+
import "./chunk-S2O4NSN5.js";
|
|
9
|
+
import "./chunk-NSLXEDIS.js";
|
|
10
|
+
export {
|
|
11
|
+
MediaPlayer,
|
|
12
|
+
mediaPlayer
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=media-player.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
IconButton
|
|
4
|
+
} from "./chunk-QHVV2JGF.js";
|
|
5
|
+
import {
|
|
6
|
+
VideoPlayer
|
|
7
|
+
} from "./chunk-VYZFQE3P.js";
|
|
8
|
+
import "./chunk-TN5JJ6JI.js";
|
|
9
|
+
import "./chunk-S2O4NSN5.js";
|
|
10
|
+
import "./chunk-NSLXEDIS.js";
|
|
11
|
+
|
|
12
|
+
// src/dialog/dialog.tsx
|
|
13
|
+
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
14
|
+
import { tv } from "tailwind-variants";
|
|
15
|
+
|
|
16
|
+
// src/dialog/return-focus.ts
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
function useReturnFocus(onCloseAutoFocus) {
|
|
19
|
+
const [opener] = React.useState(() => typeof document === "undefined" ? null : document.activeElement);
|
|
20
|
+
return React.useCallback(
|
|
21
|
+
(event) => {
|
|
22
|
+
onCloseAutoFocus?.(event);
|
|
23
|
+
if (event.defaultPrevented) return;
|
|
24
|
+
if (opener instanceof HTMLElement && opener !== document.body && opener.isConnected) {
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
opener.focus();
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
[opener, onCloseAutoFocus]
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// src/dialog/dialog.tsx
|
|
34
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
35
|
+
var dialog = tv({
|
|
36
|
+
slots: {
|
|
37
|
+
overlay: "kz-overlay fixed inset-0 z-50 bg-overlay",
|
|
38
|
+
content: "kz-dialog fixed z-50 flex flex-col overflow-hidden border border-border-default bg-surface-1 text-fg shadow-lg focus:outline-hidden",
|
|
39
|
+
close: "absolute right-3 top-3 h-9 w-9",
|
|
40
|
+
header: "flex flex-col gap-1 px-5 pb-2 pr-14 pt-5",
|
|
41
|
+
title: "text-base font-bold text-fg",
|
|
42
|
+
description: "text-sm text-fg-secondary",
|
|
43
|
+
body: "min-h-0 flex-1 overflow-y-auto px-5 pb-5",
|
|
44
|
+
footer: "flex flex-wrap items-center justify-end gap-2 border-t border-border-subtle px-5 py-4 pb-[max(1rem,env(safe-area-inset-bottom))]"
|
|
45
|
+
},
|
|
46
|
+
variants: {
|
|
47
|
+
placement: {
|
|
48
|
+
center: { content: "left-1/2 top-1/2 max-h-[85dvh] w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl" },
|
|
49
|
+
/* A sheet: anchored at the bottom on a phone, centred from `sm` up. */
|
|
50
|
+
bottom: {
|
|
51
|
+
content: "inset-x-0 bottom-0 max-h-[92dvh] rounded-t-[1.75rem] sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:w-full sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-[1.75rem]"
|
|
52
|
+
},
|
|
53
|
+
right: { content: "inset-y-0 right-0 h-full w-full max-w-md rounded-none border-y-0 border-r-0" },
|
|
54
|
+
/* A navigation drawer: full height, from the left, clear of the notch. */
|
|
55
|
+
left: { content: "inset-y-0 left-0 h-full w-full max-w-md rounded-none border-y-0 border-l-0 pl-[env(safe-area-inset-left)]" }
|
|
56
|
+
},
|
|
57
|
+
size: { sm: { content: "sm:max-w-sm" }, md: { content: "sm:max-w-md" }, lg: { content: "sm:max-w-2xl" } }
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: { placement: "center", size: "md" }
|
|
60
|
+
});
|
|
61
|
+
var s = dialog();
|
|
62
|
+
function CloseIcon() {
|
|
63
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M18 6 6 18M6 6l12 12" }) });
|
|
64
|
+
}
|
|
65
|
+
var prevent = (event) => event.preventDefault();
|
|
66
|
+
function ReturnFocusContent({ onCloseAutoFocus, ...props }) {
|
|
67
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Content, { onCloseAutoFocus: useReturnFocus(onCloseAutoFocus), ...props });
|
|
68
|
+
}
|
|
69
|
+
function DialogContent({
|
|
70
|
+
placement,
|
|
71
|
+
size,
|
|
72
|
+
closeLabel,
|
|
73
|
+
hideClose,
|
|
74
|
+
dismissible = true,
|
|
75
|
+
container,
|
|
76
|
+
className,
|
|
77
|
+
children,
|
|
78
|
+
onEscapeKeyDown,
|
|
79
|
+
onPointerDownOutside,
|
|
80
|
+
onInteractOutside,
|
|
81
|
+
...props
|
|
82
|
+
}) {
|
|
83
|
+
const v = dialog({ placement, size });
|
|
84
|
+
return /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { container, children: [
|
|
85
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: v.overlay() }),
|
|
86
|
+
/* @__PURE__ */ jsxs(
|
|
87
|
+
ReturnFocusContent,
|
|
88
|
+
{
|
|
89
|
+
"data-placement": placement ?? "center",
|
|
90
|
+
"data-dismissible": dismissible ? void 0 : "false",
|
|
91
|
+
className: v.content({ className }),
|
|
92
|
+
onEscapeKeyDown: dismissible ? onEscapeKeyDown : chain(onEscapeKeyDown, prevent),
|
|
93
|
+
onPointerDownOutside: dismissible ? onPointerDownOutside : chain(onPointerDownOutside, prevent),
|
|
94
|
+
onInteractOutside: dismissible ? onInteractOutside : chain(onInteractOutside, prevent),
|
|
95
|
+
...props,
|
|
96
|
+
children: [
|
|
97
|
+
children,
|
|
98
|
+
!hideClose && /* @__PURE__ */ jsx(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { label: closeLabel, variant: "ghost", shape: "pill", className: v.close(), children: /* @__PURE__ */ jsx(CloseIcon, {}) }) })
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
] });
|
|
103
|
+
}
|
|
104
|
+
function chain(handler, then) {
|
|
105
|
+
return (event) => {
|
|
106
|
+
handler?.(event);
|
|
107
|
+
then(event);
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function DialogHeader({ className, ...props }) {
|
|
111
|
+
return /* @__PURE__ */ jsx("div", { className: s.header({ className }), ...props });
|
|
112
|
+
}
|
|
113
|
+
function DialogTitle({ className, ...props }) {
|
|
114
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Title, { className: s.title({ className }), ...props });
|
|
115
|
+
}
|
|
116
|
+
function DialogDescription({ className, ...props }) {
|
|
117
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Description, { className: s.description({ className }), ...props });
|
|
118
|
+
}
|
|
119
|
+
function DialogBody({ className, ...props }) {
|
|
120
|
+
return /* @__PURE__ */ jsx("div", { className: s.body({ className }), ...props });
|
|
121
|
+
}
|
|
122
|
+
function DialogFooter({ className, ...props }) {
|
|
123
|
+
return /* @__PURE__ */ jsx("div", { className: s.footer({ className }), ...props });
|
|
124
|
+
}
|
|
125
|
+
var Dialog = {
|
|
126
|
+
Root: DialogPrimitive.Root,
|
|
127
|
+
Trigger: DialogPrimitive.Trigger,
|
|
128
|
+
Close: DialogPrimitive.Close,
|
|
129
|
+
Content: DialogContent,
|
|
130
|
+
Header: DialogHeader,
|
|
131
|
+
Title: DialogTitle,
|
|
132
|
+
Description: DialogDescription,
|
|
133
|
+
Body: DialogBody,
|
|
134
|
+
Footer: DialogFooter
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
// src/media-gallery/player-lightbox.tsx
|
|
138
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
139
|
+
function PlayerLightbox({ player, ratio, vertical, closeLabel, onClose }) {
|
|
140
|
+
return /* @__PURE__ */ jsx2(Dialog.Root, { open: true, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxs2(Dialog.Content, { size: vertical ? "sm" : "lg", closeLabel, className: "bg-media p-0", children: [
|
|
141
|
+
/* @__PURE__ */ jsx2(Dialog.Title, { className: "sr-only", children: player.title }),
|
|
142
|
+
/* @__PURE__ */ jsx2(VideoPlayer, { ...player, aspectRatio: ratio, playOnMount: true, pauseWhenHidden: false })
|
|
143
|
+
] }) });
|
|
144
|
+
}
|
|
145
|
+
export {
|
|
146
|
+
PlayerLightbox as default
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=player-lightbox-ETBQWDOT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/dialog/dialog.tsx","../src/dialog/return-focus.ts","../src/media-gallery/player-lightbox.tsx"],"sourcesContent":["// Client (a portal). Radix does the focus trap, the scroll lock, Escape, the outside click, aria-modal, the\n// aria-labelledby / aria-describedby wiring and the focus return: this file only holds the shape.\nimport { Dialog as DialogPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { IconButton } from \"../button/button\";\nimport { useReturnFocus } from \"./return-focus\";\n\nexport const dialog = tv({\n slots: {\n overlay: \"kz-overlay fixed inset-0 z-50 bg-overlay\",\n content:\n \"kz-dialog fixed z-50 flex flex-col overflow-hidden border border-border-default bg-surface-1 text-fg shadow-lg focus:outline-hidden\",\n close: \"absolute right-3 top-3 h-9 w-9\",\n header: \"flex flex-col gap-1 px-5 pb-2 pr-14 pt-5\",\n title: \"text-base font-bold text-fg\",\n description: \"text-sm text-fg-secondary\",\n body: \"min-h-0 flex-1 overflow-y-auto px-5 pb-5\",\n footer:\n \"flex flex-wrap items-center justify-end gap-2 border-t border-border-subtle px-5 py-4 pb-[max(1rem,env(safe-area-inset-bottom))]\",\n },\n variants: {\n placement: {\n center: { content: \"left-1/2 top-1/2 max-h-[85dvh] w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl\" },\n /* A sheet: anchored at the bottom on a phone, centred from `sm` up. */\n bottom: {\n content:\n \"inset-x-0 bottom-0 max-h-[92dvh] rounded-t-[1.75rem] sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:w-full \" +\n \"sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-[1.75rem]\",\n },\n right: { content: \"inset-y-0 right-0 h-full w-full max-w-md rounded-none border-y-0 border-r-0\" },\n /* A navigation drawer: full height, from the left, clear of the notch. */\n left: { content: \"inset-y-0 left-0 h-full w-full max-w-md rounded-none border-y-0 border-l-0 pl-[env(safe-area-inset-left)]\" },\n },\n size: { sm: { content: \"sm:max-w-sm\" }, md: { content: \"sm:max-w-md\" }, lg: { content: \"sm:max-w-2xl\" } },\n },\n defaultVariants: { placement: \"center\", size: \"md\" },\n});\nconst s = dialog();\n\nexport type DialogVariants = VariantProps<typeof dialog>;\n\nfunction CloseIcon() {\n return (\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n );\n}\n\ntype CloseButtonProps =\n | {\n /** The accessible name of the close button — passed translated. */\n closeLabel: string;\n /** Leaves the close button out (the content brings its own way out, or none: see `dismissible`). */\n hideClose?: false;\n }\n | { closeLabel?: string; hideClose: true };\n\nexport type DialogContentProps = React.ComponentProps<typeof DialogPrimitive.Content> &\n DialogVariants &\n CloseButtonProps & {\n /**\n * center · bottom (a sheet on a phone, centred from `sm` up) · right (a side panel, full height) · left (a\n * navigation drawer, full height).\n * @default \"center\"\n */\n placement?: DialogVariants[\"placement\"];\n /**\n * sm · md · lg: the width of the dialog.\n * @default \"md\"\n */\n size?: DialogVariants[\"size\"];\n /**\n * `false`: Escape and a click outside do not close it (a gate the user must answer: age, terms). It still closes\n * through `open` / `onOpenChange` and any `Dialog.Close` inside. Default `true`.\n */\n dismissible?: boolean;\n /** The element the portal renders into (default: document.body). */\n container?: HTMLElement | null;\n };\n\nconst prevent = (event: Event) => event.preventDefault();\n\n/** Radix's content, mounted only while open: it remembers the opener then and gives focus back on close (WCAG 2.4.3). */\nfunction ReturnFocusContent({ onCloseAutoFocus, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>) {\n return <DialogPrimitive.Content onCloseAutoFocus={useReturnFocus(onCloseAutoFocus)} {...props} />;\n}\n\n/** The dialog itself, portalled over a dimmed overlay, with a close button. Give it a `Dialog.Title`. */\nexport function DialogContent({\n placement,\n size,\n closeLabel,\n hideClose,\n dismissible = true,\n container,\n className,\n children,\n onEscapeKeyDown,\n onPointerDownOutside,\n onInteractOutside,\n ...props\n}: DialogContentProps) {\n const v = dialog({ placement, size });\n return (\n <DialogPrimitive.Portal container={container}>\n <DialogPrimitive.Overlay className={v.overlay()} />\n <ReturnFocusContent\n data-placement={placement ?? \"center\"}\n data-dismissible={dismissible ? undefined : \"false\"}\n className={v.content({ className })}\n onEscapeKeyDown={dismissible ? onEscapeKeyDown : chain(onEscapeKeyDown, prevent)}\n onPointerDownOutside={dismissible ? onPointerDownOutside : chain(onPointerDownOutside, prevent)}\n onInteractOutside={dismissible ? onInteractOutside : chain(onInteractOutside, prevent)}\n {...props}\n >\n {children}\n {!hideClose && (\n <DialogPrimitive.Close asChild>\n <IconButton label={closeLabel as string} variant=\"ghost\" shape=\"pill\" className={v.close()}>\n <CloseIcon />\n </IconButton>\n </DialogPrimitive.Close>\n )}\n </ReturnFocusContent>\n </DialogPrimitive.Portal>\n );\n}\n\nfunction chain<E extends Event>(handler: ((event: E) => void) | undefined, then: (event: E) => void) {\n return (event: E) => {\n handler?.(event);\n then(event);\n };\n}\n\nexport function DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={s.header({ className })} {...props} />;\n}\n\nexport function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return <DialogPrimitive.Title className={s.title({ className })} {...props} />;\n}\n\nexport function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return <DialogPrimitive.Description className={s.description({ className })} {...props} />;\n}\n\nexport function DialogBody({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={s.body({ className })} {...props} />;\n}\n\nexport function DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={s.footer({ className })} {...props} />;\n}\n\n/** `Dialog.Root/Trigger/Content/Header/Title/Description/Body/Footer/Close`. `open`/`defaultOpen` + `onOpenChange`. */\nexport const Dialog = {\n Root: DialogPrimitive.Root,\n Trigger: DialogPrimitive.Trigger,\n Close: DialogPrimitive.Close,\n Content: DialogContent,\n Header: DialogHeader,\n Title: DialogTitle,\n Description: DialogDescription,\n Body: DialogBody,\n Footer: DialogFooter,\n};\n\n/** `Omit` that keeps the close-button union (`closeLabel` required unless `hideClose`). */\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;\n\nexport type SheetProps = DistributiveOmit<DialogContentProps, \"placement\">;\n\n/** A sheet is a dialog anchored at the bottom (centred from `sm` up): `Dialog.Content placement=\"bottom\"`. */\nexport function Sheet(props: SheetProps) {\n return <DialogContent placement=\"bottom\" {...props} />;\n}\n","// Client. WCAG 2.4.3: when a dialog closes, focus goes back to what opened it. Radix only does it for `Dialog.Trigger`;\n// most app dialogs are controlled (`open` / `onOpenChange`) and opened by a plain button, so on Escape focus fell to\n// <body>. The content remembers the focused element when it mounts (it is still the opener: Radix moves focus in an\n// effect) and gives it back on close, unless the consumer's `onCloseAutoFocus` prevented the default.\nimport * as React from \"react\";\n\n/** The handler for `onCloseAutoFocus`: yours first, then focus back on the opener if it is still on the page. */\nexport function useReturnFocus(onCloseAutoFocus?: (event: Event) => void) {\n const [opener] = React.useState<Element | null>(() => (typeof document === \"undefined\" ? null : document.activeElement));\n return React.useCallback(\n (event: Event) => {\n onCloseAutoFocus?.(event);\n if (event.defaultPrevented) return;\n if (opener instanceof HTMLElement && opener !== document.body && opener.isConnected) {\n event.preventDefault();\n opener.focus();\n }\n },\n [opener, onCloseAutoFocus],\n );\n}\n","// Client. The lightbox's dialog and its player: loaded by `MediaPlayer` only when the poster is pressed.\nimport * as React from \"react\";\n\nimport { Dialog } from \"../dialog\";\nimport { VideoPlayer, type VideoPlayerProps } from \"../video-player\";\n\nexport type PlayerLightboxProps = {\n player: Omit<VideoPlayerProps, \"aspectRatio\" | \"className\">;\n ratio: string;\n vertical: boolean;\n closeLabel: string;\n onClose: () => void;\n};\n\n/** The open dialog holding the player, started by the press that opened it. */\nexport default function PlayerLightbox({ player, ratio, vertical, closeLabel, onClose }: Readonly<PlayerLightboxProps>) {\n return (\n <Dialog.Root open onOpenChange={(open) => !open && onClose()}>\n <Dialog.Content size={vertical ? \"sm\" : \"lg\"} closeLabel={closeLabel} className=\"bg-media p-0\">\n <Dialog.Title className=\"sr-only\">{player.title}</Dialog.Title>\n <VideoPlayer {...player} aspectRatio={ratio} playOnMount pauseWhenHidden={false} />\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAEA,SAAS,UAAU,uBAAuB;AAE1C,SAAS,UAA6B;;;ACAtC,YAAY,WAAW;AAGhB,SAAS,eAAe,kBAA2C;AACxE,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AEJ;","names":["jsx","jsxs"]}
|
package/dist/rail-nav.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Tooltip
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EDQLPCM4.js";
|
|
5
5
|
import {
|
|
6
6
|
ChevronGlyph
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-S2O4NSN5.js";
|
|
8
8
|
import {
|
|
9
9
|
cn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NSLXEDIS.js";
|
|
11
11
|
|
|
12
12
|
// src/rail-nav/rail-nav.tsx
|
|
13
13
|
import { Slot } from "radix-ui";
|
|
@@ -74,6 +74,8 @@ type VideoPlayerProps = {
|
|
|
74
74
|
autoPlay?: boolean;
|
|
75
75
|
/** Starts muted. */
|
|
76
76
|
muted?: boolean;
|
|
77
|
+
/** Starts playing as soon as it mounts, with sound: for a player opened by a press (a lightbox), never for one that was already on the page. */
|
|
78
|
+
playOnMount?: boolean;
|
|
77
79
|
/** Plays again from the start at the end. */
|
|
78
80
|
loop?: boolean;
|
|
79
81
|
/** How much to fetch before playback: `none` (a list of many videos), `metadata` (default), `auto`. */
|
package/dist/retro-tv.js
CHANGED
package/dist/site-cahier.js
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Page,
|
|
4
4
|
SectionBackdrop
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7P7I5OQV.js";
|
|
6
6
|
import {
|
|
7
7
|
ArrowGlyph
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-S2O4NSN5.js";
|
|
9
9
|
import {
|
|
10
10
|
BlockLink
|
|
11
11
|
} from "./chunk-ENOS6ETI.js";
|
|
12
12
|
import {
|
|
13
13
|
TapedPhoto
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TVLRE7S3.js";
|
|
15
15
|
import {
|
|
16
16
|
Mascot
|
|
17
17
|
} from "./chunk-DRTIE44Z.js";
|
|
18
18
|
import {
|
|
19
19
|
cn
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-NSLXEDIS.js";
|
|
21
21
|
|
|
22
22
|
// src/page-hero/page-hero.tsx
|
|
23
23
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/dist/taped-photo.js
CHANGED
package/dist/toc.js
CHANGED
package/dist/versus-card.js
CHANGED
package/dist/video-player.d.ts
CHANGED
|
@@ -167,6 +167,8 @@ type VideoPlayerProps = {
|
|
|
167
167
|
autoPlay?: boolean;
|
|
168
168
|
/** Starts muted. */
|
|
169
169
|
muted?: boolean;
|
|
170
|
+
/** Starts playing as soon as it mounts, with sound: for a player opened by a press (a lightbox), never for one that was already on the page. */
|
|
171
|
+
playOnMount?: boolean;
|
|
170
172
|
/** Plays again from the start at the end. */
|
|
171
173
|
loop?: boolean;
|
|
172
174
|
/** How much to fetch before playback: `none` (a list of many videos), `metadata` (default), `auto`. */
|
|
@@ -199,7 +201,7 @@ type VideoPlayerProps = {
|
|
|
199
201
|
className?: string;
|
|
200
202
|
};
|
|
201
203
|
/** A video player with accessible controls, HLS on demand, signed sources, subtitles, speed, full screen. */
|
|
202
|
-
declare function VideoPlayer({ src, type, loadHls, title, poster, autoPlay, muted: initiallyMuted, loop, preload, tracks, playbackRates, pauseWhenHidden, controls, overlay, aspectRatio, onPlay, onPause, onEnded, onTimeUpdate, onError, labels: given, className, }: VideoPlayerProps): React.JSX.Element;
|
|
204
|
+
declare function VideoPlayer({ src, type, loadHls, title, poster, autoPlay, muted: initiallyMuted, playOnMount, loop, preload, tracks, playbackRates, pauseWhenHidden, controls, overlay, aspectRatio, onPlay, onPause, onEnded, onTimeUpdate, onError, labels: given, className, }: VideoPlayerProps): React.JSX.Element;
|
|
203
205
|
|
|
204
206
|
export { VideoPlayer, videoPlayer, videoPlayerLabels };
|
|
205
207
|
export type { HlsModule, VideoPlayerLabels, VideoPlayerProps, VideoTrack };
|
package/dist/video-player.js
CHANGED
package/dist/virtual.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import * as React from 'react';
|
|
|
6
6
|
declare const virtual: tailwind_variants.TVReturnType<{
|
|
7
7
|
[key: string]: {
|
|
8
8
|
[key: string]: tailwind_variants.ClassValue | {
|
|
9
|
-
list?: tailwind_variants.ClassValue;
|
|
10
9
|
viewport?: tailwind_variants.ClassValue;
|
|
10
|
+
list?: tailwind_variants.ClassValue;
|
|
11
11
|
item?: tailwind_variants.ClassValue;
|
|
12
12
|
row?: tailwind_variants.ClassValue;
|
|
13
13
|
empty?: tailwind_variants.ClassValue;
|
|
@@ -16,8 +16,8 @@ declare const virtual: tailwind_variants.TVReturnType<{
|
|
|
16
16
|
} | {
|
|
17
17
|
[x: string]: {
|
|
18
18
|
[x: string]: tailwind_variants.ClassValue | {
|
|
19
|
-
list?: tailwind_variants.ClassValue;
|
|
20
19
|
viewport?: tailwind_variants.ClassValue;
|
|
20
|
+
list?: tailwind_variants.ClassValue;
|
|
21
21
|
item?: tailwind_variants.ClassValue;
|
|
22
22
|
row?: tailwind_variants.ClassValue;
|
|
23
23
|
empty?: tailwind_variants.ClassValue;
|
|
@@ -32,8 +32,8 @@ declare const virtual: tailwind_variants.TVReturnType<{
|
|
|
32
32
|
}, undefined, {
|
|
33
33
|
[key: string]: {
|
|
34
34
|
[key: string]: tailwind_variants.ClassValue | {
|
|
35
|
-
list?: tailwind_variants.ClassValue;
|
|
36
35
|
viewport?: tailwind_variants.ClassValue;
|
|
36
|
+
list?: tailwind_variants.ClassValue;
|
|
37
37
|
item?: tailwind_variants.ClassValue;
|
|
38
38
|
row?: tailwind_variants.ClassValue;
|
|
39
39
|
empty?: tailwind_variants.ClassValue;
|
package/dist/wall.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krizaka/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.85.0",
|
|
4
4
|
"description": "The Krizaka front-end platform's components: the primitives (button, card, dialog, toast, menu, field, tabs, chip, switch, slider, command palette, theme, countdown…) on the semantic --kz-* tokens, the animated marks (Krizaka, Orazaka, Yomizaka, Akinaza) and the motion signature — web and /native.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"krizaka",
|
|
@@ -517,6 +517,14 @@
|
|
|
517
517
|
"types": "./dist/media-gallery.d.ts",
|
|
518
518
|
"import": "./dist/media-gallery.js"
|
|
519
519
|
},
|
|
520
|
+
"./media-player": {
|
|
521
|
+
"types": "./dist/media-player.d.ts",
|
|
522
|
+
"import": "./dist/media-player.js"
|
|
523
|
+
},
|
|
524
|
+
"./media-carousel": {
|
|
525
|
+
"types": "./dist/media-carousel.d.ts",
|
|
526
|
+
"import": "./dist/media-carousel.js"
|
|
527
|
+
},
|
|
520
528
|
"./sticky-action": {
|
|
521
529
|
"types": "./dist/sticky-action.d.ts",
|
|
522
530
|
"import": "./dist/sticky-action.js"
|
|
@@ -993,7 +1001,7 @@
|
|
|
993
1001
|
],
|
|
994
1002
|
"peerDependencies": {
|
|
995
1003
|
"@krizaka/query": ">=0.3.0",
|
|
996
|
-
"@krizaka/tailwind": ">=3.
|
|
1004
|
+
"@krizaka/tailwind": ">=3.85.0",
|
|
997
1005
|
"@maplibre/maplibre-react-native": ">=11",
|
|
998
1006
|
"@shopify/flash-list": ">=2",
|
|
999
1007
|
"expo-camera": ">=16",
|
|
@@ -2175,6 +2183,26 @@
|
|
|
2175
2183
|
"clsx"
|
|
2176
2184
|
]
|
|
2177
2185
|
},
|
|
2186
|
+
{
|
|
2187
|
+
"name": "./media-player (VideoPlayer inline; the lightbox dialog is a lazy chunk, counted here)",
|
|
2188
|
+
"path": "dist/media-player.js",
|
|
2189
|
+
"limit": "29.9 kB",
|
|
2190
|
+
"gzip": true,
|
|
2191
|
+
"ignore": [
|
|
2192
|
+
"tailwind-variants",
|
|
2193
|
+
"clsx"
|
|
2194
|
+
]
|
|
2195
|
+
},
|
|
2196
|
+
{
|
|
2197
|
+
"name": "./media-carousel",
|
|
2198
|
+
"path": "dist/media-carousel.js",
|
|
2199
|
+
"limit": "31 kB",
|
|
2200
|
+
"gzip": true,
|
|
2201
|
+
"ignore": [
|
|
2202
|
+
"tailwind-variants",
|
|
2203
|
+
"clsx"
|
|
2204
|
+
]
|
|
2205
|
+
},
|
|
2178
2206
|
{
|
|
2179
2207
|
"name": "./media-gallery",
|
|
2180
2208
|
"path": "dist/media-gallery.js",
|
|
@@ -3425,9 +3453,9 @@
|
|
|
3425
3453
|
"sonner": "^2.0.8",
|
|
3426
3454
|
"tailwind-variants": "^3.3.1",
|
|
3427
3455
|
"zod": "^4.6.7",
|
|
3428
|
-
"@krizaka/
|
|
3429
|
-
"@krizaka/tokens": "^3.
|
|
3430
|
-
"@krizaka/
|
|
3456
|
+
"@krizaka/pacer": "^0.2.0",
|
|
3457
|
+
"@krizaka/tokens": "^3.85.0",
|
|
3458
|
+
"@krizaka/intl": "^0.4.1"
|
|
3431
3459
|
},
|
|
3432
3460
|
"scripts": {
|
|
3433
3461
|
"build": "node -e \"const fs=require('node:fs');fs.rmSync('dist',{recursive:true,force:true});for(const f of fs.readdirSync('registry/examples',{recursive:true}))if(/\\.(js|d\\.ts)$/.test(f))fs.rmSync('registry/examples/'+f)\" && tsup && node -e \"require('node:fs').copyFileSync('src/motion.css','dist/motion.css');require('node:fs').copyFileSync('src/blocks.css','dist/blocks.css');require('node:fs').copyFileSync('src/story.css','dist/story.css')\" && node scripts/build-registry.mjs",
|
package/registry/app-frame.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/media-gallery/carousel.tsx
|
|
4
|
+
import { MediaCarousel } from "@krizaka/ui/media-carousel";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var PIC = (a, b) => `data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 500'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='${a}'/><stop offset='1' stop-color='${b}'/></linearGradient></defs><rect width='800' height='500' fill='url(#g)'/></svg>`)}`;
|
|
7
|
+
function MediaCarouselExample() {
|
|
8
|
+
return /* @__PURE__ */ jsx("div", { className: "max-w-xl", children: /* @__PURE__ */ jsx(
|
|
9
|
+
MediaCarousel,
|
|
10
|
+
{
|
|
11
|
+
label: "Realisations",
|
|
12
|
+
slides: [
|
|
13
|
+
{ id: "a", src: PIC("#1d3f6b", "#4d7fb8"), alt: "The brand film", caption: "Fig. 1a", film: { src: "https://krizaka-assets.b-cdn.net/org/v1/films/film/le-monde-de-krizaka-16x9.b1c7c4ee51.mp4", title: "Film: the world of Krizaka", playLabel: "Play the film" } },
|
|
14
|
+
{ id: "b", src: PIC("#23496f", "#6b9bc9"), alt: "A lease read in a minute", caption: "Fig. 1b" },
|
|
15
|
+
{ id: "c", src: PIC("#2a3f5c", "#7aa5d6"), alt: "A return prepared, never filed", caption: "Fig. 1c" }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
) });
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
MediaCarouselExample as default
|
|
22
|
+
};
|