@blakesteve/roster 5.6.0 → 5.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/README.md +190 -5
- package/dist/components/atoms/Avatar/Avatar.cjs +1 -1
- package/dist/components/atoms/Avatar/Avatar.d.ts +4 -0
- package/dist/components/atoms/Avatar/Avatar.js +1 -1
- package/dist/components/atoms/AvatarStrip/AvatarStrip.cjs +1 -1
- package/dist/components/atoms/AvatarStrip/AvatarStrip.d.ts +10 -1
- package/dist/components/atoms/AvatarStrip/AvatarStrip.js +34 -30
- package/dist/components/atoms/Button/button-variants.cjs +1 -1
- package/dist/components/atoms/Button/button-variants.js +5 -3
- package/dist/components/atoms/Eyebrow/eyebrow-variants.cjs +1 -1
- package/dist/components/atoms/Eyebrow/eyebrow-variants.js +8 -4
- package/dist/components/atoms/LoadingDots/LoadingDots.cjs +1 -0
- package/dist/components/atoms/LoadingDots/LoadingDots.d.ts +20 -0
- package/dist/components/atoms/LoadingDots/LoadingDots.js +43 -0
- package/dist/components/atoms/MultiSelect/MultiSelect.cjs +1 -1
- package/dist/components/atoms/MultiSelect/MultiSelect.d.ts +3 -1
- package/dist/components/atoms/MultiSelect/MultiSelect.js +87 -89
- package/dist/components/atoms/Progress/Progress.cjs +1 -0
- package/dist/components/atoms/Progress/Progress.d.ts +62 -0
- package/dist/components/atoms/Progress/Progress.js +107 -0
- package/dist/components/atoms/Progress/progress-values.cjs +1 -0
- package/dist/components/atoms/Progress/progress-values.d.ts +26 -0
- package/dist/components/atoms/Progress/progress-values.js +12 -0
- package/dist/components/atoms/Skeleton/Skeleton.cjs +1 -0
- package/dist/components/atoms/Skeleton/Skeleton.d.ts +79 -0
- package/dist/components/atoms/Skeleton/Skeleton.js +80 -0
- package/dist/components/atoms/Stat/Stat.cjs +1 -1
- package/dist/components/atoms/Stat/Stat.js +19 -19
- package/dist/components/atoms/Stat/stat-variants.cjs +1 -1
- package/dist/components/atoms/Stat/stat-variants.d.ts +1 -0
- package/dist/components/atoms/Stat/stat-variants.js +10 -7
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.d.ts +10 -1
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +31 -29
- package/dist/components/molecules/CallToAction/CallToAction.cjs +1 -1
- package/dist/components/molecules/CallToAction/CallToAction.d.ts +8 -1
- package/dist/components/molecules/CallToAction/CallToAction.js +34 -29
- package/dist/components/molecules/Carousel/Carousel.cjs +1 -1
- package/dist/components/molecules/Carousel/Carousel.d.ts +7 -0
- package/dist/components/molecules/Carousel/Carousel.js +155 -155
- package/dist/components/molecules/ErrorState/ErrorState.cjs +1 -1
- package/dist/components/molecules/ErrorState/ErrorState.d.ts +8 -1
- package/dist/components/molecules/ErrorState/ErrorState.js +44 -39
- package/dist/components/molecules/FileUpload/FileUpload.cjs +1 -1
- package/dist/components/molecules/FileUpload/FileUpload.js +122 -142
- package/dist/components/molecules/MediaPreview/MediaPreview.cjs +1 -1
- package/dist/components/molecules/MediaPreview/MediaPreview.d.ts +3 -1
- package/dist/components/molecules/MediaPreview/MediaPreview.js +13 -12
- package/dist/components/molecules/Pagination/Pagination.cjs +1 -1
- package/dist/components/molecules/Pagination/Pagination.d.ts +1 -0
- package/dist/components/molecules/Pagination/Pagination.js +47 -46
- package/dist/components/molecules/ProgressField/ProgressField.cjs +1 -0
- package/dist/components/molecules/ProgressField/ProgressField.d.ts +24 -0
- package/dist/components/molecules/ProgressField/ProgressField.js +32 -0
- package/dist/components/molecules/SkeletonPresets/SkeletonPresets.cjs +1 -0
- package/dist/components/molecules/SkeletonPresets/SkeletonPresets.d.ts +55 -0
- package/dist/components/molecules/SkeletonPresets/SkeletonPresets.js +45 -0
- package/dist/components/molecules/StepProgress/StepProgress.cjs +1 -0
- package/dist/components/molecules/StepProgress/StepProgress.d.ts +37 -0
- package/dist/components/molecules/StepProgress/StepProgress.js +90 -0
- package/dist/components/organisms/Countdown/Countdown.cjs +1 -1
- package/dist/components/organisms/Countdown/Countdown.d.ts +13 -0
- package/dist/components/organisms/Countdown/Countdown.js +54 -47
- package/dist/components/organisms/DataTable/DataTable.cjs +1 -1
- package/dist/components/organisms/DataTable/DataTable.d.ts +5 -3
- package/dist/components/organisms/DataTable/DataTable.js +27 -26
- package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
- package/dist/components/organisms/Dialog/Dialog.d.ts +9 -2
- package/dist/components/organisms/Dialog/Dialog.js +25 -23
- package/dist/components/organisms/Footer/Footer.cjs +1 -1
- package/dist/components/organisms/Footer/Footer.d.ts +9 -0
- package/dist/components/organisms/Footer/Footer.js +21 -23
- package/dist/components/organisms/ModerationQueue/ModerationQueue.cjs +1 -1
- package/dist/components/organisms/ModerationQueue/ModerationQueue.d.ts +40 -1
- package/dist/components/organisms/ModerationQueue/ModerationQueue.js +262 -237
- package/dist/components/organisms/ModerationQueue/QueueEditDialog.cjs +1 -1
- package/dist/components/organisms/ModerationQueue/QueueEditDialog.d.ts +1 -1
- package/dist/components/organisms/ModerationQueue/QueueEditDialog.js +23 -21
- package/dist/components/organisms/ModerationQueue/QueueEditSheet.cjs +1 -1
- package/dist/components/organisms/ModerationQueue/QueueEditSheet.d.ts +1 -1
- package/dist/components/organisms/ModerationQueue/QueueEditSheet.js +22 -20
- package/dist/components/organisms/ModerationQueue/queue-actions.d.ts +29 -10
- package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
- package/dist/components/organisms/Navbar/Navbar.d.ts +38 -3
- package/dist/components/organisms/Navbar/Navbar.js +210 -187
- package/dist/components/organisms/Navbar/navbar-variants.cjs +1 -1
- package/dist/components/organisms/Navbar/navbar-variants.js +4 -2
- package/dist/components/organisms/Sheet/Sheet.cjs +1 -1
- package/dist/components/organisms/Sheet/Sheet.d.ts +8 -1
- package/dist/components/organisms/Sheet/Sheet.js +65 -63
- package/dist/index.d.ts +6 -0
- package/dist/lib/labels.cjs +1 -0
- package/dist/lib/labels.d.ts +7 -0
- package/dist/lib/labels.js +12 -0
- package/dist/meta.json +3 -3
- package/dist/roster.cjs +1 -1
- package/dist/roster.css +1 -1
- package/dist/roster.js +174 -157
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A text size a line stands in for: its font size and line height, so one
|
|
4
|
+
* line of skeleton is exactly one line of the text that replaces it.
|
|
5
|
+
* `inherit` takes whatever the surrounding text is.
|
|
6
|
+
*/
|
|
7
|
+
declare const LINE_SIZE: {
|
|
8
|
+
readonly sm: "rst:text-xs";
|
|
9
|
+
readonly md: "rst:text-sm";
|
|
10
|
+
readonly lg: "rst:text-base";
|
|
11
|
+
readonly inherit: "";
|
|
12
|
+
};
|
|
13
|
+
declare const CIRCLE_SIZE: {
|
|
14
|
+
readonly xs: "rst:h-6 rst:w-6";
|
|
15
|
+
readonly sm: "rst:h-8 rst:w-8";
|
|
16
|
+
readonly md: "rst:h-10 rst:w-10";
|
|
17
|
+
readonly lg: "rst:h-12 rst:w-12";
|
|
18
|
+
readonly xl: "rst:h-16 rst:w-16";
|
|
19
|
+
};
|
|
20
|
+
declare const RADIUS: {
|
|
21
|
+
readonly sm: "rst:rounded-sm";
|
|
22
|
+
readonly md: "rst:rounded-md";
|
|
23
|
+
readonly lg: "rst:rounded-lg";
|
|
24
|
+
readonly xl: "rst:rounded-xl";
|
|
25
|
+
readonly full: "rst:rounded-full";
|
|
26
|
+
};
|
|
27
|
+
export interface SkeletonProps {
|
|
28
|
+
/**
|
|
29
|
+
* - `"line"`: a line of text, one line box tall at its `size`.
|
|
30
|
+
* - `"block"`: an image, a chart, any box: `height` sets it.
|
|
31
|
+
* - `"circle"`: an avatar, at Avatar's sizes.
|
|
32
|
+
*/
|
|
33
|
+
shape?: "line" | "block" | "circle";
|
|
34
|
+
/**
|
|
35
|
+
* For a line, the text it stands in for: `sm` (12px on 16), `md` (14px on
|
|
36
|
+
* 20), `lg` (16px on 24), or `inherit`. For a circle, Avatar's sizes.
|
|
37
|
+
*/
|
|
38
|
+
size?: keyof typeof LINE_SIZE | keyof typeof CIRCLE_SIZE;
|
|
39
|
+
/** How many lines, for a paragraph. The last is shorter, as a last line is. */
|
|
40
|
+
lines?: number;
|
|
41
|
+
/** The width: a line's, or the last line's when there are several. */
|
|
42
|
+
width?: CSSProperties["width"];
|
|
43
|
+
/** A block's height. */
|
|
44
|
+
height?: CSSProperties["height"];
|
|
45
|
+
/** A block's corners, from the radius scale. */
|
|
46
|
+
radius?: keyof typeof RADIUS;
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A placeholder in the shape of what's loading.
|
|
51
|
+
*
|
|
52
|
+
* Hidden from screen readers, always: a skeleton is a picture of content that
|
|
53
|
+
* isn't there yet. The region it stands in for says it's busy; use
|
|
54
|
+
* `SkeletonRegion`, which does that, or set `aria-busy` on it yourself.
|
|
55
|
+
*/
|
|
56
|
+
declare function Skeleton({ shape, size, lines, width, height, radius, className }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export interface SkeletonRegionProps {
|
|
58
|
+
/** While true, the skeleton shows and the region says it's busy. */
|
|
59
|
+
loading: boolean;
|
|
60
|
+
/** What shows while loading. */
|
|
61
|
+
skeleton: ReactNode;
|
|
62
|
+
/** What a screen reader hears while loading: "Loading the schedule". */
|
|
63
|
+
label?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Say `label` (the default). Off for all but one when several regions load
|
|
66
|
+
* together, a grid of cards say, or wrap them in one region instead.
|
|
67
|
+
*/
|
|
68
|
+
announce?: boolean;
|
|
69
|
+
children?: ReactNode;
|
|
70
|
+
className?: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The region a skeleton stands in for: `aria-busy` while loading, the
|
|
74
|
+
* skeleton hidden from screen readers, and `label` said once, politely.
|
|
75
|
+
* When `loading` turns false the content replaces the skeleton in the same
|
|
76
|
+
* box, so a skeleton drawn at the content's size means nothing moves.
|
|
77
|
+
*/
|
|
78
|
+
declare function SkeletonRegion({ loading, skeleton, label, announce, children, className }: SkeletonRegionProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
export { Skeleton, SkeletonRegion };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as s, jsxs as p, Fragment as g } from "react/jsx-runtime";
|
|
3
|
+
import { useState as y, useEffect as S } from "react";
|
|
4
|
+
import { cn as a } from "../../../lib/utils.js";
|
|
5
|
+
const f = {
|
|
6
|
+
sm: "rst:text-xs",
|
|
7
|
+
md: "rst:text-sm",
|
|
8
|
+
lg: "rst:text-base",
|
|
9
|
+
inherit: ""
|
|
10
|
+
}, k = {
|
|
11
|
+
xs: "rst:h-6 rst:w-6",
|
|
12
|
+
sm: "rst:h-8 rst:w-8",
|
|
13
|
+
md: "rst:h-10 rst:w-10",
|
|
14
|
+
lg: "rst:h-12 rst:w-12",
|
|
15
|
+
xl: "rst:h-16 rst:w-16"
|
|
16
|
+
}, x = {
|
|
17
|
+
sm: "rst:rounded-sm",
|
|
18
|
+
md: "rst:rounded-md",
|
|
19
|
+
lg: "rst:rounded-lg",
|
|
20
|
+
xl: "rst:rounded-xl",
|
|
21
|
+
full: "rst:rounded-full"
|
|
22
|
+
}, h = "rst:animate-skeleton rst:forced-colors:outline-solid rst:forced-colors:outline-1";
|
|
23
|
+
function E({ shape: t = "line", size: r, lines: d = 1, width: e, height: u, radius: c, className: o }) {
|
|
24
|
+
if (t === "circle") {
|
|
25
|
+
const l = r && r in k ? r : "md";
|
|
26
|
+
return /* @__PURE__ */ s(
|
|
27
|
+
"span",
|
|
28
|
+
{
|
|
29
|
+
"aria-hidden": "true",
|
|
30
|
+
className: a("rst:block rst:shrink-0 rst:rounded-full rst:border rst:border-transparent", k[l], h, o),
|
|
31
|
+
"data-skeleton": "circle"
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
if (t === "block")
|
|
36
|
+
return /* @__PURE__ */ s(
|
|
37
|
+
"span",
|
|
38
|
+
{
|
|
39
|
+
"aria-hidden": "true",
|
|
40
|
+
className: a("rst:block rst:w-full", x[c ?? "lg"], h, o),
|
|
41
|
+
style: { height: u ?? "8rem", width: e },
|
|
42
|
+
"data-skeleton": "block"
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
const m = r && r in f ? r : "md", n = Math.max(1, Math.floor(d)), b = (l) => {
|
|
46
|
+
const i = l === n - 1;
|
|
47
|
+
return /* @__PURE__ */ p(
|
|
48
|
+
"span",
|
|
49
|
+
{
|
|
50
|
+
className: a("rst:relative rst:block", n > 1 && !i && "rst:w-full"),
|
|
51
|
+
style: { width: n > 1 ? i ? e ?? "60%" : void 0 : e },
|
|
52
|
+
children: [
|
|
53
|
+
" ",
|
|
54
|
+
/* @__PURE__ */ s(
|
|
55
|
+
"span",
|
|
56
|
+
{
|
|
57
|
+
className: a("rst:absolute rst:inset-x-0 rst:top-1/2 rst:h-[0.7em] rst:-translate-y-1/2", x[c ?? "sm"], h)
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
l
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
return /* @__PURE__ */ s("span", { "aria-hidden": "true", className: a("rst:block", f[m], o), "data-skeleton": "line", children: Array.from({ length: n }, (l, i) => b(i)) });
|
|
66
|
+
}
|
|
67
|
+
function L({ loading: t, skeleton: r, label: d = "Loading", announce: e = !0, children: u, className: c }) {
|
|
68
|
+
const [o, m] = y("");
|
|
69
|
+
return S(() => {
|
|
70
|
+
const n = setTimeout(() => m(t && e ? d : ""), t ? 50 : 0);
|
|
71
|
+
return () => clearTimeout(n);
|
|
72
|
+
}, [t, d, e]), /* @__PURE__ */ p(g, { children: [
|
|
73
|
+
/* @__PURE__ */ s("span", { role: "status", className: "rst:sr-only", "data-skeleton-status": "", children: o }),
|
|
74
|
+
/* @__PURE__ */ s("div", { "aria-busy": t || void 0, className: c, "data-skeleton-region": t ? "loading" : "ready", children: t ? /* @__PURE__ */ s("div", { "aria-hidden": "true", children: r }) : u })
|
|
75
|
+
] });
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
E as Skeleton,
|
|
79
|
+
L as SkeletonRegion
|
|
80
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),w=require("react"),t=require("../../../lib/utils.cjs"),x=require("./stat-variants.cjs"),d=require("../Eyebrow/Eyebrow.cjs"),o=x.statSourceClass,j=w.forwardRef(({value:e,label:n,source:r,size:m,colorScheme:u,semantics:h="definition",className:c,...i},l)=>{const a=x.statValueVariants({size:m,colorScheme:u});return h==="standalone"?s.jsxs("div",{ref:l,className:t.cn("rst:flex rst:flex-col rst:gap-[3px]",c),...i,children:[s.jsx("span",{className:a,children:e}),s.jsx(d.Eyebrow,{size:"xs",children:n}),r&&s.jsx("span",{className:o,children:r})]}):s.jsxs("div",{ref:l,className:t.cn("rst:grid rst:content-start rst:gap-[3px]",c),...i,children:[s.jsx("dt",{className:"rst:relative rst:col-start-1 rst:row-start-2 rst:flex",children:s.jsx(d.Eyebrow,{size:"xs",children:n})}),r?s.jsxs("dd",{className:t.cn("rst:m-0",a,"rst:col-start-1 rst:row-span-3 rst:row-start-1 rst:grid rst:grid-rows-subgrid"),children:[s.jsx("span",{className:"rst:row-start-1",children:e}),s.jsx("span",{className:t.cn(o,"rst:row-start-3"),children:r})]}):s.jsx("dd",{className:t.cn("rst:m-0 rst:col-start-1 rst:row-start-1",a),children:e})]})});j.displayName="Stat";exports.Stat=j;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
2
|
+
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import x from "react";
|
|
4
4
|
import { cn as r } from "../../../lib/utils.js";
|
|
5
|
-
import { statValueVariants as
|
|
6
|
-
import { Eyebrow as
|
|
7
|
-
const m =
|
|
8
|
-
({ value: a, label:
|
|
9
|
-
const e =
|
|
10
|
-
return
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
|
|
5
|
+
import { statValueVariants as w, statSourceClass as N } from "./stat-variants.js";
|
|
6
|
+
import { Eyebrow as o } from "../Eyebrow/Eyebrow.js";
|
|
7
|
+
const m = N, g = x.forwardRef(
|
|
8
|
+
({ value: a, label: l, source: t, size: p, colorScheme: f, semantics: h = "definition", className: n, ...c }, d) => {
|
|
9
|
+
const e = w({ size: p, colorScheme: f });
|
|
10
|
+
return h === "standalone" ? /* @__PURE__ */ i("div", { ref: d, className: r("rst:flex rst:flex-col rst:gap-[3px]", n), ...c, children: [
|
|
11
|
+
/* @__PURE__ */ s("span", { className: e, children: a }),
|
|
12
|
+
/* @__PURE__ */ s(o, { size: "xs", children: l }),
|
|
13
|
+
t && /* @__PURE__ */ s("span", { className: m, children: t })
|
|
14
14
|
] }) : (
|
|
15
15
|
/* `content-start`: a Stat in a row of taller siblings is stretched to
|
|
16
16
|
their height, and a grid shares that height out among its auto rows,
|
|
17
17
|
which pushed the label of a Stat without a source down to meet
|
|
18
18
|
nothing. The flex column this replaced never did. */
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
|
|
19
|
+
/* @__PURE__ */ i("div", { ref: d, className: r("rst:grid rst:content-start rst:gap-[3px]", n), ...c, children: [
|
|
20
|
+
/* @__PURE__ */ s("dt", { className: "rst:relative rst:col-start-1 rst:row-start-2 rst:flex", children: /* @__PURE__ */ s(o, { size: "xs", children: l }) }),
|
|
21
|
+
t ? /* @__PURE__ */ i(
|
|
22
22
|
"dd",
|
|
23
23
|
{
|
|
24
24
|
className: r(
|
|
@@ -27,16 +27,16 @@ const m = "rst:block rst:font-mono rst:text-[0.53125rem] rst:font-normal rst:nor
|
|
|
27
27
|
"rst:col-start-1 rst:row-span-3 rst:row-start-1 rst:grid rst:grid-rows-subgrid"
|
|
28
28
|
),
|
|
29
29
|
children: [
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ s("span", { className: "rst:row-start-1", children: a }),
|
|
31
|
+
/* @__PURE__ */ s("span", { className: r(m, "rst:row-start-3"), children: t })
|
|
32
32
|
]
|
|
33
33
|
}
|
|
34
|
-
) : /* @__PURE__ */
|
|
34
|
+
) : /* @__PURE__ */ s("dd", { className: r("rst:m-0 rst:col-start-1 rst:row-start-1", e), children: a })
|
|
35
35
|
] })
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
|
-
|
|
39
|
+
g.displayName = "Stat";
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
g as Stat
|
|
42
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../node_modules/class-variance-authority/dist/index.cjs"),r=t.cva("rst:block rst:font-bold rst:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../node_modules/class-variance-authority/dist/index.cjs"),r=t.cva("rst:block rst:font-bold rst:tracking-[-0.04em] rst:tabular-nums",{variants:{size:{sm:"rst:text-xl rst:leading-none",md:"rst:text-[clamp(1.5rem,3.6vw,2.25rem)] rst:leading-none",lg:"rst:text-[clamp(2rem,5vw,3rem)] rst:leading-none"},colorScheme:{primary:"rst:text-primary-600 rst:dark:text-primary-400",success:"rst:text-success-600 rst:dark:text-success-400",error:"rst:text-error-600 rst:dark:text-error-400",amber:"rst:text-amber-600 rst:dark:text-amber-400",neutral:"rst:text-gray-900 rst:dark:text-gray-100",current:"rst:text-current"}},defaultVariants:{size:"md",colorScheme:"neutral"}}),e="rst:block rst:font-mono rst:text-[0.53125rem] rst:font-normal rst:normal-nums rst:leading-none rst:tracking-[0.06em] rst:text-gray-500 rst:opacity-75 rst:dark:text-gray-400";exports.statSourceClass=e;exports.statValueVariants=r;
|
|
@@ -7,3 +7,4 @@ export declare const statValueVariants: (props?: ({
|
|
|
7
7
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
8
8
|
colorScheme?: "primary" | "amber" | "success" | "error" | "neutral" | "current" | null | undefined;
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
+
export declare const statSourceClass = "rst:block rst:font-mono rst:text-[0.53125rem] rst:font-normal rst:normal-nums rst:leading-none rst:tracking-[0.06em] rst:text-gray-500 rst:opacity-75 rst:dark:text-gray-400";
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { cva as
|
|
2
|
-
const e = /* @__PURE__ */
|
|
3
|
-
"rst:block rst:font-bold rst:
|
|
1
|
+
import { cva as t } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
2
|
+
const e = /* @__PURE__ */ t(
|
|
3
|
+
"rst:block rst:font-bold rst:tracking-[-0.04em] rst:tabular-nums",
|
|
4
4
|
{
|
|
5
5
|
variants: {
|
|
6
|
+
/* `leading-none` after each size, as in Eyebrow: before it,
|
|
7
|
+
tailwind-merge drops it in favor of the size. */
|
|
6
8
|
size: {
|
|
7
|
-
sm: "rst:text-xl",
|
|
8
|
-
md: "rst:text-[clamp(1.5rem,3.6vw,2.25rem)]",
|
|
9
|
-
lg: "rst:text-[clamp(2rem,5vw,3rem)]"
|
|
9
|
+
sm: "rst:text-xl rst:leading-none",
|
|
10
|
+
md: "rst:text-[clamp(1.5rem,3.6vw,2.25rem)] rst:leading-none",
|
|
11
|
+
lg: "rst:text-[clamp(2rem,5vw,3rem)] rst:leading-none"
|
|
10
12
|
},
|
|
11
13
|
colorScheme: {
|
|
12
14
|
primary: "rst:text-primary-600 rst:dark:text-primary-400",
|
|
@@ -19,7 +21,8 @@ const e = /* @__PURE__ */ r(
|
|
|
19
21
|
},
|
|
20
22
|
defaultVariants: { size: "md", colorScheme: "neutral" }
|
|
21
23
|
}
|
|
22
|
-
);
|
|
24
|
+
), s = "rst:block rst:font-mono rst:text-[0.53125rem] rst:font-normal rst:normal-nums rst:leading-none rst:tracking-[0.06em] rst:text-gray-500 rst:opacity-75 rst:dark:text-gray-400";
|
|
23
25
|
export {
|
|
26
|
+
s as statSourceClass,
|
|
24
27
|
e as statValueVariants
|
|
25
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");const p=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),g=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),r=require("../../../lib/utils.cjs"),q=require("../../../lib/labels.cjs"),m=require("./breadcrumb-variants.cjs"),v=require("../../atoms/Link/Link.cjs"),y={nav:"Breadcrumb",home:"Home"},L=({items:c,separator:d,showHomeIcon:u,homeHref:x="/",linkComponent:h,currentClassName:b,labels:f,variant:t,className:j,...N})=>{const l=q.withLabels(y,f),i=h??v.Link,o=d??e.jsx("span",{className:"rst:text-gray-300 rst:dark:text-gray-600 rst:text-sm rst:transition-colors",children:"/"});return e.jsx("nav",{"aria-label":l.nav,className:r.cn("rst:flex",j),...N,children:e.jsxs("ol",{className:"rst:flex rst:items-center rst:space-x-2",children:[u&&e.jsxs("li",{className:"rst:flex rst:items-center",children:[e.jsx(i,{href:x,className:r.cn(m.breadcrumbVariants({variant:t}),"rst:hover:no-underline"),"aria-label":l.home,children:e.jsx(p.FontAwesomeIcon,{icon:g.faHome,className:"rst:h-4 rst:w-4"})}),e.jsx("span",{className:"rst:ml-2 rst:flex rst:select-none rst:items-center","aria-hidden":"true",children:o})]}),c.map((s,a)=>{const n=a===c.length-1;return e.jsxs("li",{className:"rst:flex rst:items-center",children:[a>0&&e.jsx("span",{className:"rst:mr-2 rst:flex rst:select-none rst:items-center","aria-hidden":"true",children:o}),n||!s.href?e.jsx("span",{className:r.cn("rst:font-semibold rst:text-sm rst:cursor-default rst:transition-colors",t==="inverse"?"rst:text-white":"rst:text-gray-900 rst:dark:text-gray-100",n&&b,s.className),"aria-current":n?"page":void 0,children:s.label}):e.jsx(i,{href:s.href,className:r.cn(m.breadcrumbVariants({variant:t}),"rst:hover:underline",s.className),children:s.label})]},a)})]})})};exports.Breadcrumbs=L;
|
|
@@ -22,6 +22,13 @@ export type BreadcrumbItem = {
|
|
|
22
22
|
/** Applied to this crumb only. */
|
|
23
23
|
className?: string;
|
|
24
24
|
};
|
|
25
|
+
/** Every word Breadcrumbs says of its own. Pass any of them in `labels` to replace it. */
|
|
26
|
+
export interface BreadcrumbsLabels {
|
|
27
|
+
/** The trail's name. */
|
|
28
|
+
nav: string;
|
|
29
|
+
/** The home icon's name, with `showHomeIcon`. */
|
|
30
|
+
home: string;
|
|
31
|
+
}
|
|
25
32
|
export interface BreadcrumbsProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof breadcrumbVariants> {
|
|
26
33
|
items: BreadcrumbItem[];
|
|
27
34
|
separator?: React.ReactNode;
|
|
@@ -48,6 +55,8 @@ export interface BreadcrumbsProps extends React.HTMLAttributes<HTMLElement>, Var
|
|
|
48
55
|
linkComponent?: React.ComponentType<BreadcrumbLinkProps>;
|
|
49
56
|
/** Applied to the current (last) crumb, for a per-page accent. */
|
|
50
57
|
currentClassName?: string;
|
|
58
|
+
/** The component's own words, replaced; any left out stay English. */
|
|
59
|
+
labels?: Partial<BreadcrumbsLabels>;
|
|
51
60
|
}
|
|
52
|
-
declare const Breadcrumbs: ({ items, separator, showHomeIcon, homeHref, linkComponent, currentClassName, variant, className, ...props }: BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
declare const Breadcrumbs: ({ items, separator, showHomeIcon, homeHref, linkComponent, currentClassName, labels, variant, className, ...props }: BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
62
|
export { Breadcrumbs };
|
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as
|
|
2
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
|
-
import { FontAwesomeIcon as
|
|
5
|
-
import { faHome as
|
|
4
|
+
import { FontAwesomeIcon as v } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
|
|
5
|
+
import { faHome as L } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
|
|
6
6
|
import { cn as e } from "../../../lib/utils.js";
|
|
7
|
-
import {
|
|
7
|
+
import { withLabels as w } from "../../../lib/labels.js";
|
|
8
|
+
import { breadcrumbVariants as h } from "./breadcrumb-variants.js";
|
|
8
9
|
import { Link as y } from "../../atoms/Link/Link.js";
|
|
9
|
-
const
|
|
10
|
+
const k = { nav: "Breadcrumb", home: "Home" }, V = ({
|
|
10
11
|
items: c,
|
|
11
12
|
separator: d,
|
|
12
|
-
showHomeIcon:
|
|
13
|
-
homeHref:
|
|
14
|
-
linkComponent:
|
|
15
|
-
currentClassName:
|
|
13
|
+
showHomeIcon: f,
|
|
14
|
+
homeHref: p = "/",
|
|
15
|
+
linkComponent: x,
|
|
16
|
+
currentClassName: u,
|
|
17
|
+
labels: N,
|
|
16
18
|
variant: t,
|
|
17
|
-
className:
|
|
18
|
-
...
|
|
19
|
+
className: b,
|
|
20
|
+
...g
|
|
19
21
|
}) => {
|
|
20
|
-
const o =
|
|
21
|
-
return /* @__PURE__ */ r("nav", { "aria-label":
|
|
22
|
-
|
|
22
|
+
const o = w(k, N), m = x ?? y, i = d ?? /* @__PURE__ */ r("span", { className: "rst:text-gray-300 rst:dark:text-gray-600 rst:text-sm rst:transition-colors", children: "/" });
|
|
23
|
+
return /* @__PURE__ */ r("nav", { "aria-label": o.nav, className: e("rst:flex", b), ...g, children: /* @__PURE__ */ l("ol", { className: "rst:flex rst:items-center rst:space-x-2", children: [
|
|
24
|
+
f && /* @__PURE__ */ l("li", { className: "rst:flex rst:items-center", children: [
|
|
23
25
|
/* @__PURE__ */ r(
|
|
24
|
-
|
|
26
|
+
m,
|
|
25
27
|
{
|
|
26
|
-
href:
|
|
28
|
+
href: p,
|
|
27
29
|
className: e(
|
|
28
|
-
|
|
30
|
+
h({ variant: t }),
|
|
29
31
|
"rst:hover:no-underline"
|
|
30
32
|
),
|
|
31
|
-
"aria-label":
|
|
32
|
-
children: /* @__PURE__ */ r(
|
|
33
|
+
"aria-label": o.home,
|
|
34
|
+
children: /* @__PURE__ */ r(v, { icon: L, className: "rst:h-4 rst:w-4" })
|
|
33
35
|
}
|
|
34
36
|
),
|
|
35
37
|
/* @__PURE__ */ r(
|
|
@@ -37,42 +39,42 @@ const I = ({
|
|
|
37
39
|
{
|
|
38
40
|
className: "rst:ml-2 rst:flex rst:select-none rst:items-center",
|
|
39
41
|
"aria-hidden": "true",
|
|
40
|
-
children:
|
|
42
|
+
children: i
|
|
41
43
|
}
|
|
42
44
|
)
|
|
43
45
|
] }),
|
|
44
46
|
c.map((s, a) => {
|
|
45
|
-
const
|
|
47
|
+
const n = a === c.length - 1;
|
|
46
48
|
return (
|
|
47
49
|
/* Keyed by index: `href` is optional now, and a trail can legally
|
|
48
50
|
repeat one. */
|
|
49
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ l("li", { className: "rst:flex rst:items-center", children: [
|
|
50
52
|
a > 0 && /* @__PURE__ */ r(
|
|
51
53
|
"span",
|
|
52
54
|
{
|
|
53
55
|
className: "rst:mr-2 rst:flex rst:select-none rst:items-center",
|
|
54
56
|
"aria-hidden": "true",
|
|
55
|
-
children:
|
|
57
|
+
children: i
|
|
56
58
|
}
|
|
57
59
|
),
|
|
58
|
-
|
|
60
|
+
n || !s.href ? /* @__PURE__ */ r(
|
|
59
61
|
"span",
|
|
60
62
|
{
|
|
61
63
|
className: e(
|
|
62
64
|
"rst:font-semibold rst:text-sm rst:cursor-default rst:transition-colors",
|
|
63
65
|
t === "inverse" ? "rst:text-white" : "rst:text-gray-900 rst:dark:text-gray-100",
|
|
64
|
-
|
|
66
|
+
n && u,
|
|
65
67
|
s.className
|
|
66
68
|
),
|
|
67
|
-
"aria-current":
|
|
69
|
+
"aria-current": n ? "page" : void 0,
|
|
68
70
|
children: s.label
|
|
69
71
|
}
|
|
70
72
|
) : /* @__PURE__ */ r(
|
|
71
|
-
|
|
73
|
+
m,
|
|
72
74
|
{
|
|
73
75
|
href: s.href,
|
|
74
76
|
className: e(
|
|
75
|
-
|
|
77
|
+
h({ variant: t }),
|
|
76
78
|
"rst:hover:underline",
|
|
77
79
|
s.className
|
|
78
80
|
),
|
|
@@ -85,5 +87,5 @@ const I = ({
|
|
|
85
87
|
] }) });
|
|
86
88
|
};
|
|
87
89
|
export {
|
|
88
|
-
|
|
90
|
+
V as Breadcrumbs
|
|
89
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime");require("react");const d=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),x=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),u=require("../../../lib/utils.cjs"),h=require("../../../lib/labels.cjs"),f=require("./call-to-action-variants.cjs"),g=require("../../atoms/Button/Button.cjs"),j={dismiss:"Dismiss"},w=({title:i,description:t,action:r,icon:e,variant:a,onDismiss:l,labels:c,className:n,...o})=>{const m=h.withLabels(j,c);return s.jsx("div",{className:u.cn(f.ctaVariants({variant:a}),n),...o,children:s.jsxs("div",{className:"rst:flex rst:flex-col rst:gap-4 rst:@[32rem]:flex-row rst:@[32rem]:items-center rst:@[32rem]:justify-between",children:[s.jsxs("div",{className:"rst:flex rst:flex-col rst:items-center rst:gap-4 rst:@[32rem]:flex-row rst:@[32rem]:items-start",children:[e&&s.jsx("div",{className:"rst:shrink-0 rst:text-current rst:@[32rem]:mt-1",children:e}),s.jsxs("div",{className:"rst:flex rst:min-w-0 rst:flex-col rst:gap-1.5 rst:w-full",children:[s.jsx("h3",{className:"rst:text-lg rst:font-bold rst:leading-tight rst:tracking-tight rst:text-current",children:i}),t&&s.jsx("div",{className:"rst:max-w-prose rst:text-sm rst:leading-relaxed rst:text-current rst:opacity-90 rst:dark:opacity-80",children:t})]})]}),r&&s.jsx("div",{className:"rst:flex rst:w-full rst:shrink-0 rst:pt-2 rst:[&>*]:w-full rst:@[32rem]:w-auto rst:@[32rem]:pt-0 rst:@[32rem]:[&>*]:w-auto",children:r}),l&&s.jsx("div",{className:"rst:absolute rst:right-2 rst:top-2",children:s.jsx(g.Button,{variant:"ghost",size:"sm",className:"rst:h-8 rst:w-8 rst:rounded-full rst:p-0 rst:opacity-60 rst:hover:opacity-100 rst:dark:hover:bg-black/20",onClick:l,"aria-label":m.dismiss,children:s.jsx(d.FontAwesomeIcon,{icon:x.faXmark,className:"rst:h-4 rst:w-4"})})})]})})};exports.CallToAction=w;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { ctaVariants } from './call-to-action-variants';
|
|
4
|
+
/** Every word CallToAction says of its own. Pass any of them in `labels` to replace it. */
|
|
5
|
+
export interface CallToActionLabels {
|
|
6
|
+
/** The dismiss button's name, with `onDismiss`. */
|
|
7
|
+
dismiss: string;
|
|
8
|
+
}
|
|
4
9
|
export interface CallToActionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof ctaVariants> {
|
|
5
10
|
title: React.ReactNode;
|
|
6
11
|
description?: React.ReactNode;
|
|
7
12
|
action?: React.ReactNode;
|
|
8
13
|
icon?: React.ReactNode;
|
|
9
14
|
onDismiss?: () => void;
|
|
15
|
+
/** The component's own words, replaced; any left out stay English. */
|
|
16
|
+
labels?: Partial<CallToActionLabels>;
|
|
10
17
|
}
|
|
11
|
-
declare const CallToAction: ({ title, description, action, icon, variant, onDismiss, className, ...props }: CallToActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare const CallToAction: ({ title, description, action, icon, variant, onDismiss, labels, className, ...props }: CallToActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
19
|
export { CallToAction };
|
|
@@ -1,41 +1,46 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
|
-
import { FontAwesomeIcon as
|
|
5
|
-
import { faXmark as
|
|
6
|
-
import { cn as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
4
|
+
import { FontAwesomeIcon as f } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
|
|
5
|
+
import { faXmark as h } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
|
|
6
|
+
import { cn as p } from "../../../lib/utils.js";
|
|
7
|
+
import { withLabels as x } from "../../../lib/labels.js";
|
|
8
|
+
import { ctaVariants as u } from "./call-to-action-variants.js";
|
|
9
|
+
import { Button as w } from "../../atoms/Button/Button.js";
|
|
10
|
+
const g = { dismiss: "Dismiss" }, B = ({
|
|
10
11
|
title: i,
|
|
11
12
|
description: s,
|
|
12
13
|
action: e,
|
|
13
14
|
icon: l,
|
|
14
15
|
variant: m,
|
|
15
16
|
onDismiss: a,
|
|
17
|
+
labels: o,
|
|
16
18
|
className: c,
|
|
17
|
-
...
|
|
18
|
-
}) =>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/* @__PURE__ */ t("div", { className: "rst:flex rst:
|
|
22
|
-
/* @__PURE__ */ r("
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
19
|
+
...n
|
|
20
|
+
}) => {
|
|
21
|
+
const d = x(g, o);
|
|
22
|
+
return /* @__PURE__ */ r("div", { className: p(u({ variant: m }), c), ...n, children: /* @__PURE__ */ t("div", { className: "rst:flex rst:flex-col rst:gap-4 rst:@[32rem]:flex-row rst:@[32rem]:items-center rst:@[32rem]:justify-between", children: [
|
|
23
|
+
/* @__PURE__ */ t("div", { className: "rst:flex rst:flex-col rst:items-center rst:gap-4 rst:@[32rem]:flex-row rst:@[32rem]:items-start", children: [
|
|
24
|
+
l && /* @__PURE__ */ r("div", { className: "rst:shrink-0 rst:text-current rst:@[32rem]:mt-1", children: l }),
|
|
25
|
+
/* @__PURE__ */ t("div", { className: "rst:flex rst:min-w-0 rst:flex-col rst:gap-1.5 rst:w-full", children: [
|
|
26
|
+
/* @__PURE__ */ r("h3", { className: "rst:text-lg rst:font-bold rst:leading-tight rst:tracking-tight rst:text-current", children: i }),
|
|
27
|
+
s && /* @__PURE__ */ r("div", { className: "rst:max-w-prose rst:text-sm rst:leading-relaxed rst:text-current rst:opacity-90 rst:dark:opacity-80", children: s })
|
|
28
|
+
] })
|
|
29
|
+
] }),
|
|
30
|
+
e && /* @__PURE__ */ r("div", { className: "rst:flex rst:w-full rst:shrink-0 rst:pt-2 rst:[&>*]:w-full rst:@[32rem]:w-auto rst:@[32rem]:pt-0 rst:@[32rem]:[&>*]:w-auto", children: e }),
|
|
31
|
+
a && /* @__PURE__ */ r("div", { className: "rst:absolute rst:right-2 rst:top-2", children: /* @__PURE__ */ r(
|
|
32
|
+
w,
|
|
33
|
+
{
|
|
34
|
+
variant: "ghost",
|
|
35
|
+
size: "sm",
|
|
36
|
+
className: "rst:h-8 rst:w-8 rst:rounded-full rst:p-0 rst:opacity-60 rst:hover:opacity-100 rst:dark:hover:bg-black/20",
|
|
37
|
+
onClick: a,
|
|
38
|
+
"aria-label": d.dismiss,
|
|
39
|
+
children: /* @__PURE__ */ r(f, { icon: h, className: "rst:h-4 rst:w-4" })
|
|
40
|
+
}
|
|
41
|
+
) })
|
|
42
|
+
] }) });
|
|
43
|
+
};
|
|
39
44
|
export {
|
|
40
|
-
|
|
45
|
+
B as CallToAction
|
|
41
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),Fe=require("react"),qe=require("../../atoms/Button/Button.cjs"),T=require("../../../lib/utils.cjs"),$e=require("../../../internal/motion.cjs"),u=require("./carousel-math.cjs"),U=require("./carousel-layout.cjs");function Be(a){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const d in a)if(d!=="default"){const b=Object.getOwnPropertyDescriptor(a,d);Object.defineProperty(i,d,b.get?b:{enumerable:!0,get:()=>a[d]})}}return i.default=a,Object.freeze(i)}const n=Be(Fe),ze=a=>Math.min(3e3,500+a*.35),He='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable]:not([contenteditable="false"])',V=a=>typeof a=="number"?`${a}px`:a;function ne(a){const i=parseFloat(a);return Number.isFinite(i)?i:0}const Ue="rst:hidden rst:[@media(any-hover:hover)]:inline-flex",Ve="rst:hidden rst:[@media(any-hover:hover)]:flex";function se({direction:a}){return l.jsx("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 20 20",className:"rst:h-5 rst:w-5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:a==="prev"?"M12.5 4.5 7 10l5.5 5.5":"M7.5 4.5 13 10l-5.5 5.5"})})}const oe={overflowing:null,canScrollPrev:!1,canScrollNext:!1,index:0},We=n.forwardRef(function({"aria-label":i,"aria-labelledby":d,children:b,itemWidth:I,perView:k,gap:W=12,gutter:X=16,bleed:le=!1,snap:L="start",snapStrictness:ce="mandatory",oneAtATime:ae=!1,arrows:j="hover",arrowPlacement:M="controls",renderArrows:P,prevLabel:ie,nextLabel:ue,prevIcon:de,nextIcon:fe,arrowButtonProps:ge,fade:ve=!1,scrollbar:pe=!1,showPosition:G=!1,onIndexChange:J,onScrollStateChange:K,itemClassName:me,listClassName:xe,className:be,style:he,...Se},ye){const v=n.useRef(null),Q=`${n.useId()}-list`,Y=n.Children.toArray(b),E=Y.length,[o,we]=n.useState(oe),Z=n.useRef(oe),[Ne,Te]=n.useState(""),[Ie,Pe]=n.useState(!1),O=n.useRef({onIndexChange:J,onScrollStateChange:K});n.useEffect(()=>{O.current={onIndexChange:J,onScrollStateChange:K}});const f=n.useCallback(()=>{const e=v.current;if(!e)return null;const t=e.getBoundingClientRect(),r=getComputedStyle(e),s=t.left+e.clientLeft-e.scrollLeft;return{items:Array.from(e.children).map(g=>{const x=g.getBoundingClientRect();return{start:x.left-s,end:x.right-s}}),scrollLeft:e.scrollLeft,clientWidth:e.clientWidth,scrollWidth:e.scrollWidth,paddingStart:ne(r.scrollPaddingInlineStart||r.scrollPaddingLeft),paddingEnd:ne(r.scrollPaddingInlineEnd||r.scrollPaddingRight),align:L}},[L]),h=n.useCallback(()=>{const e=f();if(!e)return;const t={overflowing:u.overflows(e),canScrollPrev:u.canScrollPrev(e),canScrollNext:u.canScrollNext(e),index:e.items.length?u.currentIndex(e):0},r=Z.current;r.overflowing===t.overflowing&&r.canScrollPrev===t.canScrollPrev&&r.canScrollNext===t.canScrollNext&&r.index===t.index||(Z.current=t,we(t),r.index!==t.index&&O.current.onIndexChange?.(t.index),(r.canScrollPrev!==t.canScrollPrev||r.canScrollNext!==t.canScrollNext)&&O.current.onScrollStateChange?.({canScrollPrev:t.canScrollPrev,canScrollNext:t.canScrollNext}))},[f]),Ee=JSON.stringify([W,X,I,k]);n.useLayoutEffect(()=>{const e=v.current;if(!e)return;h();let t=0;const r=()=>{t||(t=requestAnimationFrame(()=>{t=0,h()}))};e.addEventListener("scroll",r,{passive:!0});const s=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>h()),c=()=>{s?.observe(e),Array.from(e.children).forEach(x=>s?.observe(x))};c();const g=typeof MutationObserver>"u"?null:new MutationObserver(()=>{c(),h()});return g?.observe(e,{childList:!0}),()=>{e.removeEventListener("scroll",r),s?.disconnect(),g?.disconnect(),t&&cancelAnimationFrame(t)}},[h,E,Ee]),n.useLayoutEffect(()=>{const e=v.current;if(e&&(Pe(!e.querySelector(He)),d)){const t=d.split(/\s+/).map(r=>document.getElementById(r)?.textContent?.trim()??"").filter(Boolean).join(" ");Te(t)}},[b,d]);const S=n.useRef(null),p=n.useCallback(()=>{const e=v.current,t=S.current;t&&(S.current=null,window.clearTimeout(t.timer),e?.removeEventListener("scrollend",t.done),e&&(e.style.scrollSnapType="",delete e.dataset.settling))},[]),m=n.useCallback((e,t)=>{const r=v.current;if(!r)return;if(p(),t!=="smooth"||$e.prefersReducedMotion()||Math.abs(r.scrollLeft-e)<1){r.style.scrollSnapType="none",r.scrollTo({left:e,behavior:"instant"}),r.style.scrollSnapType="";return}r.style.scrollSnapType="none",r.dataset.settling="";const c=()=>p();S.current={timer:window.setTimeout(c,ze(Math.abs(r.scrollLeft-e))),done:c,target:e},r.addEventListener("scrollend",c,{once:!0}),r.scrollTo({left:e,behavior:"smooth"})},[p]),C=n.useCallback(e=>{const t=f();if(!t)return;const r=S.current?{...t,scrollLeft:S.current.target}:t;m(u.pageTarget(r,e),"smooth")},[f,m]);n.useImperativeHandle(ye,()=>({scrollToIndex:(e,t)=>{const r=f();if(!r||!r.items.length)return;const s=Math.min(Math.max(0,Math.round(e)),r.items.length-1);m(u.snapPosition(r,s),t?.behavior??"smooth")},scrollPrev:()=>C(-1),scrollNext:()=>C(1)}),[f,C,m]),n.useEffect(()=>p,[p]);const D=n.useRef(null),_=n.useRef(null),A=n.useRef(null);n.useLayoutEffect(()=>{const e=A.current;if(!e)return;const t=e==="prev"?D.current:_.current,r=e==="prev"?_.current:D.current,s=e==="prev"?!o.canScrollPrev:!o.canScrollNext,c=document.activeElement;s&&(c!==t&&c!==document.body&&c!==null||r&&!r.disabled&&r.focus())},[o.canScrollPrev,o.canScrollNext]);const y=n.useRef(null),w=n.useRef(!1),Ce=e=>{e.pointerType!=="mouse"||e.button!==0||o.overflowing&&(p(),w.current=!1,y.current={pointerId:e.pointerId,x0:e.clientX,scroll0:e.currentTarget.scrollLeft,dragging:!1})},Re=e=>{const t=y.current;if(!t||e.pointerId!==t.pointerId)return;const r=e.currentTarget,s=e.clientX-t.x0;if(!t.dragging){if(Math.abs(s)<=u.CAROUSEL_DRAG_THRESHOLD)return;t.dragging=!0,r.dataset.dragging="",r.style.scrollSnapType="none",window.getSelection?.()?.removeAllRanges();try{r.setPointerCapture(e.pointerId)}catch{}}r.scrollLeft=t.scroll0-s},F=e=>{const t=y.current;if(!t||e.pointerId!==t.pointerId||(y.current=null,!t.dragging))return;const r=e.currentTarget;delete r.dataset.dragging,w.current=e.type==="pointerup",window.setTimeout(()=>{w.current=!1},0);const s=f();s?m(u.snapPosition(s,u.nearestIndex(s)),"smooth"):r.style.scrollSnapType=""},ke=e=>{!w.current||e.detail===0||(w.current=!1,e.preventDefault(),e.stopPropagation())},Le=e=>{o.overflowing&&e.preventDefault()},je=e=>{const t=e.currentTarget,r=e.target;if(r===t||y.current?.dragging)return;let s=!1;try{s=r.matches(":focus-visible")}catch{s=!1}if(!s)return;const c=r.closest("[data-carousel-item]");if(!c||c.parentElement!==t)return;const g=f();if(!g)return;const x=Array.prototype.indexOf.call(t.children,c);m(u.snapPosition(g,x),"instant")},[Me,Oe]=n.useState(0);n.useEffect(()=>{const e=window.setTimeout(()=>Oe(o.index),150);return()=>window.clearTimeout(e)},[o.index]);const ee=i??Ne,te=e=>ee?`${e} ${ee}`:e,q=j!=="none"&&o.overflowing!==!1,De=j==="hover"?Ue:"rst:inline-flex",re=e=>{const t=e==="prev",{className:r,...s}=ge??{};return l.jsx(qe.Button,{type:"button",variant:"outline",colorScheme:"neutral",size:"icon",...s,"aria-label":t?ie??te("Previous"):ue??te("Next"),"aria-controls":Q,disabled:t?!o.canScrollPrev:!o.canScrollNext,onClick:()=>C(t?-1:1),ref:t?D:_,onFocus:()=>{A.current=e},onBlur:c=>{c.relatedTarget&&(A.current=null)},"data-carousel-arrow":e,className:T.cn("rst:size-11 rst:shrink-0 rst:rounded-full",M==="overlay"&&!P&&"rst:bg-[var(--roster-popover-bg)] rst:elevation-raised rst:hover:bg-[var(--roster-popover-bg)] rst:disabled:invisible",De,r),children:t?de??l.jsx(se,{direction:"prev"}):fe??l.jsx(se,{direction:"next"})})},R=q?re("prev"):null,$=q?re("next"):null,N=G&&E?l.jsxs("p",{"aria-live":"polite",className:"rst:font-ui rst:m-0 rst:text-sm rst:tabular-nums rst:opacity-75","data-carousel-position":"",children:[Me+1," of ",E]}):null;let B=null;P?B=P({prev:R,next:$,position:N}):M==="controls"&&(R||N)&&(B=l.jsxs("div",{className:T.cn("rst:mb-2 rst:items-center rst:justify-end rst:gap-2",!N&&j==="hover"?Ve:"rst:flex"),"data-carousel-controls":"",children:[N&&l.jsx("div",{className:"rst:mr-auto",children:N}),R,$]}));const z=ve&&o.overflowing&&(o.canScrollPrev||o.canScrollNext)?`linear-gradient(to right, ${o.canScrollPrev?"transparent, black 48px":"black"}, ${o.canScrollNext?"black calc(100% - 48px), transparent":"black"})`:void 0,H=I===void 0&&k!==void 0,_e={"--rst-cv-gap":V(W),"--rst-cv-gutter":V(X),...H?U.perViewVars(k):{},...z?{maskImage:z,WebkitMaskImage:z}:{}},Ae=I!==void 0?{width:V(I)}:H?{width:U.FLUID_ITEM_WIDTH}:void 0;return l.jsxs("div",{className:T.cn("rst:min-w-0",be),style:he,...Se,children:[B,l.jsxs("div",{className:"rst:relative",children:[l.jsx("ul",{ref:v,id:Q,role:"list","aria-label":i,"aria-labelledby":i?void 0:d,tabIndex:Ie&&o.overflowing?0:void 0,"data-overflowing":o.overflowing?"":void 0,onPointerDown:Ce,onPointerMove:Re,onPointerUp:F,onPointerCancel:F,onLostPointerCapture:F,onClickCapture:ke,onDragStart:Le,onFocus:je,style:_e,className:T.cn("rst:m-0 rst:flex rst:list-none rst:overflow-x-auto rst:overflow-y-hidden","rst:gap-(--rst-cv-gap) rst:px-(--rst-cv-gutter) rst:py-1 rst:scroll-px-(--rst-cv-gutter)","rst:overscroll-x-contain",ce==="mandatory"?"rst:snap-x rst:snap-mandatory":"rst:snap-x rst:snap-proximity",le&&"rst:-mx-(--rst-cv-gutter)",!pe&&"rst:[scrollbar-width:none] rst:[&::-webkit-scrollbar]:hidden",H&&U.FLUID_CLASSES,"rst:data-overflowing:cursor-grab rst:data-dragging:cursor-grabbing rst:data-dragging:select-none","rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-inset",xe),children:Y.map((e,t)=>l.jsx("li",{"data-carousel-item":"","aria-label":G?`${t+1} of ${E}`:void 0,style:Ae,className:T.cn("rst:shrink-0",L==="start"?"rst:snap-start":"rst:snap-center",ae&&"rst:snap-always",me),children:e},n.isValidElement(e)&&e.key!=null?e.key:t))}),!P&&M==="overlay"&&q&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"rst:pointer-events-none rst:absolute rst:inset-y-0 rst:start-1 rst:flex rst:items-center",children:l.jsx("div",{className:"rst:pointer-events-auto",children:R})}),l.jsx("div",{className:"rst:pointer-events-none rst:absolute rst:inset-y-0 rst:end-1 rst:flex rst:items-center",children:l.jsx("div",{className:"rst:pointer-events-auto",children:$})})]})]})]})});exports.Carousel=We;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),Be=require("react"),$e=require("../../atoms/Button/Button.cjs"),T=require("../../../lib/utils.cjs"),ze=require("../../../lib/labels.cjs"),He=require("../../../internal/motion.cjs"),d=require("./carousel-math.cjs"),U=require("./carousel-layout.cjs");function Ue(o){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const f in o)if(f!=="default"){const x=Object.getOwnPropertyDescriptor(o,f);Object.defineProperty(a,f,x.get?x:{enumerable:!0,get:()=>o[f]})}}return a.default=o,Object.freeze(a)}const n=Ue(Be),Ve={position:(o,a)=>`${o} of ${a}`},We=o=>Math.min(3e3,500+o*.35),Xe='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable]:not([contenteditable="false"])',V=o=>typeof o=="number"?`${o}px`:o;function se(o){const a=parseFloat(o);return Number.isFinite(a)?a:0}const Ge="rst:hidden rst:[@media(any-hover:hover)]:inline-flex",Je="rst:hidden rst:[@media(any-hover:hover)]:flex";function oe({direction:o}){return c.jsx("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 20 20",className:"rst:h-5 rst:w-5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:o==="prev"?"M12.5 4.5 7 10l5.5 5.5":"M7.5 4.5 13 10l-5.5 5.5"})})}const le={overflowing:null,canScrollPrev:!1,canScrollNext:!1,index:0},Ke=n.forwardRef(function({"aria-label":a,"aria-labelledby":f,children:x,itemWidth:I,perView:R,gap:W=12,gutter:X=16,bleed:ce=!1,snap:k="start",snapStrictness:ie="mandatory",oneAtATime:ae=!1,arrows:j="hover",arrowPlacement:M="controls",renderArrows:L,prevLabel:ue,nextLabel:de,prevIcon:fe,nextIcon:ge,arrowButtonProps:ve,fade:pe=!1,scrollbar:me=!1,showPosition:G=!1,labels:be,onIndexChange:J,onScrollStateChange:K,itemClassName:xe,listClassName:he,className:Se,style:ye,...we},Ne){const Q=ze.withLabels(Ve,be),p=n.useRef(null),Y=`${n.useId()}-list`,Z=n.Children.toArray(x),E=Z.length,[l,Te]=n.useState(le),ee=n.useRef(le),[Ie,Le]=n.useState(""),[Ee,Pe]=n.useState(!1),O=n.useRef({onIndexChange:J,onScrollStateChange:K});n.useEffect(()=>{O.current={onIndexChange:J,onScrollStateChange:K}});const g=n.useCallback(()=>{const e=p.current;if(!e)return null;const t=e.getBoundingClientRect(),r=getComputedStyle(e),s=t.left+e.clientLeft-e.scrollLeft;return{items:Array.from(e.children).map(u=>{const b=u.getBoundingClientRect();return{start:b.left-s,end:b.right-s}}),scrollLeft:e.scrollLeft,clientWidth:e.clientWidth,scrollWidth:e.scrollWidth,paddingStart:se(r.scrollPaddingInlineStart||r.scrollPaddingLeft),paddingEnd:se(r.scrollPaddingInlineEnd||r.scrollPaddingRight),align:k}},[k]),h=n.useCallback(()=>{const e=g();if(!e)return;const t={overflowing:d.overflows(e),canScrollPrev:d.canScrollPrev(e),canScrollNext:d.canScrollNext(e),index:e.items.length?d.currentIndex(e):0},r=ee.current;r.overflowing===t.overflowing&&r.canScrollPrev===t.canScrollPrev&&r.canScrollNext===t.canScrollNext&&r.index===t.index||(ee.current=t,Te(t),r.index!==t.index&&O.current.onIndexChange?.(t.index),(r.canScrollPrev!==t.canScrollPrev||r.canScrollNext!==t.canScrollNext)&&O.current.onScrollStateChange?.({canScrollPrev:t.canScrollPrev,canScrollNext:t.canScrollNext}))},[g]),Ce=JSON.stringify([W,X,I,R]);n.useLayoutEffect(()=>{const e=p.current;if(!e)return;h();let t=0;const r=()=>{t||(t=requestAnimationFrame(()=>{t=0,h()}))};e.addEventListener("scroll",r,{passive:!0});const s=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>h()),i=()=>{s?.observe(e),Array.from(e.children).forEach(b=>s?.observe(b))};i();const u=typeof MutationObserver>"u"?null:new MutationObserver(()=>{i(),h()});return u?.observe(e,{childList:!0}),()=>{e.removeEventListener("scroll",r),s?.disconnect(),u?.disconnect(),t&&cancelAnimationFrame(t)}},[h,E,Ce]),n.useLayoutEffect(()=>{const e=p.current;if(e&&(Pe(!e.querySelector(Xe)),f)){const t=f.split(/\s+/).map(r=>document.getElementById(r)?.textContent?.trim()??"").filter(Boolean).join(" ");Le(t)}},[x,f]);const S=n.useRef(null),v=n.useCallback(()=>{const e=p.current,t=S.current;t&&(S.current=null,window.clearTimeout(t.timer),e?.removeEventListener("scrollend",t.done),e&&(e.style.scrollSnapType="",delete e.dataset.settling))},[]),m=n.useCallback((e,t)=>{const r=p.current;if(!r)return;if(v(),t!=="smooth"||He.prefersReducedMotion()||Math.abs(r.scrollLeft-e)<1){r.style.scrollSnapType="none",r.scrollTo({left:e,behavior:"instant"}),r.style.scrollSnapType="";return}r.style.scrollSnapType="none",r.dataset.settling="";const i=r.scrollLeft,u=()=>{Math.abs(r.scrollLeft-i)<.5||v()};S.current={timer:window.setTimeout(v,We(Math.abs(r.scrollLeft-e))),done:u,target:e},r.addEventListener("scrollend",u),r.scrollTo({left:e,behavior:"smooth"})},[v]),P=n.useCallback(e=>{const t=g();if(!t)return;const r=S.current?{...t,scrollLeft:S.current.target}:t;m(d.pageTarget(r,e),"smooth")},[g,m]);n.useImperativeHandle(Ne,()=>({scrollToIndex:(e,t)=>{const r=g();if(!r||!r.items.length)return;const s=Math.min(Math.max(0,Math.round(e)),r.items.length-1);m(d.snapPosition(r,s),t?.behavior??"smooth")},scrollPrev:()=>P(-1),scrollNext:()=>P(1)}),[g,P,m]),n.useEffect(()=>v,[v]);const D=n.useRef(null),_=n.useRef(null),A=n.useRef(null);n.useLayoutEffect(()=>{const e=A.current;if(!e)return;const t=e==="prev"?D.current:_.current,r=e==="prev"?_.current:D.current,s=e==="prev"?!l.canScrollPrev:!l.canScrollNext,i=document.activeElement;s&&(i!==t&&i!==document.body&&i!==null||r&&!r.disabled&&r.focus())},[l.canScrollPrev,l.canScrollNext]);const y=n.useRef(null),w=n.useRef(!1),Re=e=>{e.pointerType!=="mouse"||e.button!==0||l.overflowing&&(v(),w.current=!1,y.current={pointerId:e.pointerId,x0:e.clientX,scroll0:e.currentTarget.scrollLeft,dragging:!1})},ke=e=>{const t=y.current;if(!t||e.pointerId!==t.pointerId)return;const r=e.currentTarget,s=e.clientX-t.x0;if(!t.dragging){if(Math.abs(s)<=d.CAROUSEL_DRAG_THRESHOLD)return;t.dragging=!0,r.dataset.dragging="",r.style.scrollSnapType="none",window.getSelection?.()?.removeAllRanges();try{r.setPointerCapture(e.pointerId)}catch{}}r.scrollLeft=t.scroll0-s},F=e=>{const t=y.current;if(!t||e.pointerId!==t.pointerId||(y.current=null,!t.dragging))return;const r=e.currentTarget;delete r.dataset.dragging,w.current=e.type==="pointerup",window.setTimeout(()=>{w.current=!1},0);const s=g();s?m(d.snapPosition(s,d.nearestIndex(s)),"smooth"):r.style.scrollSnapType=""},je=e=>{!w.current||e.detail===0||(w.current=!1,e.preventDefault(),e.stopPropagation())},Me=e=>{l.overflowing&&e.preventDefault()},Oe=e=>{const t=e.currentTarget,r=e.target;if(r===t||y.current?.dragging)return;let s=!1;try{s=r.matches(":focus-visible")}catch{s=!1}if(!s)return;const i=r.closest("[data-carousel-item]");if(!i||i.parentElement!==t)return;const u=g();if(!u)return;const b=Array.prototype.indexOf.call(t.children,i);m(d.snapPosition(u,b),"instant")},[De,_e]=n.useState(0);n.useEffect(()=>{const e=window.setTimeout(()=>_e(l.index),150);return()=>window.clearTimeout(e)},[l.index]);const te=a??Ie,re=e=>te?`${e} ${te}`:e,q=j!=="none"&&l.overflowing!==!1,Ae=j==="hover"?Ge:"rst:inline-flex",ne=e=>{const t=e==="prev",{className:r,...s}=ve??{};return c.jsx($e.Button,{type:"button",variant:"outline",colorScheme:"neutral",size:"icon",...s,"aria-label":t?ue??re("Previous"):de??re("Next"),"aria-controls":Y,disabled:t?!l.canScrollPrev:!l.canScrollNext,onClick:()=>P(t?-1:1),ref:t?D:_,onFocus:()=>{A.current=e},onBlur:i=>{i.relatedTarget&&(A.current=null)},"data-carousel-arrow":e,className:T.cn("rst:size-11 rst:shrink-0 rst:rounded-full",M==="overlay"&&!L&&"rst:bg-[var(--roster-popover-bg)] rst:elevation-raised rst:hover:bg-[var(--roster-popover-bg)] rst:disabled:invisible",Ae,r),children:t?fe??c.jsx(oe,{direction:"prev"}):ge??c.jsx(oe,{direction:"next"})})},C=q?ne("prev"):null,B=q?ne("next"):null,N=G&&E?c.jsx("p",{"aria-live":"polite",className:"rst:font-ui rst:m-0 rst:text-sm rst:tabular-nums rst:opacity-75","data-carousel-position":"",children:Q.position(De+1,E)}):null;let $=null;L?$=L({prev:C,next:B,position:N}):M==="controls"&&(C||N)&&($=c.jsxs("div",{className:T.cn("rst:mb-2 rst:items-center rst:justify-end rst:gap-2",!N&&j==="hover"?Je:"rst:flex"),"data-carousel-controls":"",children:[N&&c.jsx("div",{className:"rst:mr-auto",children:N}),C,B]}));const z=pe&&l.overflowing&&(l.canScrollPrev||l.canScrollNext)?`linear-gradient(to right, ${l.canScrollPrev?"transparent, black 48px":"black"}, ${l.canScrollNext?"black calc(100% - 48px), transparent":"black"})`:void 0,H=I===void 0&&R!==void 0,Fe={"--rst-cv-gap":V(W),"--rst-cv-gutter":V(X),...H?U.perViewVars(R):{},...z?{maskImage:z,WebkitMaskImage:z}:{}},qe=I!==void 0?{width:V(I)}:H?{width:U.FLUID_ITEM_WIDTH}:void 0;return c.jsxs("div",{className:T.cn("rst:min-w-0",Se),style:ye,...we,children:[$,c.jsxs("div",{className:"rst:relative",children:[c.jsx("ul",{ref:p,id:Y,role:"list","aria-label":a,"aria-labelledby":a?void 0:f,tabIndex:Ee&&l.overflowing?0:void 0,"data-overflowing":l.overflowing?"":void 0,onPointerDown:Re,onPointerMove:ke,onPointerUp:F,onPointerCancel:F,onLostPointerCapture:F,onClickCapture:je,onDragStart:Me,onFocus:Oe,style:Fe,className:T.cn("rst:m-0 rst:flex rst:list-none rst:overflow-x-auto rst:overflow-y-hidden","rst:gap-(--rst-cv-gap) rst:px-(--rst-cv-gutter) rst:py-1 rst:scroll-px-(--rst-cv-gutter)","rst:overscroll-x-contain",ie==="mandatory"?"rst:snap-x rst:snap-mandatory":"rst:snap-x rst:snap-proximity",ce&&"rst:-mx-(--rst-cv-gutter)",!me&&"rst:[scrollbar-width:none] rst:[&::-webkit-scrollbar]:hidden",H&&U.FLUID_CLASSES,"rst:data-overflowing:cursor-grab rst:data-dragging:cursor-grabbing rst:data-dragging:select-none","rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-inset",he),children:Z.map((e,t)=>c.jsx("li",{"data-carousel-item":"","aria-label":G?Q.position(t+1,E):void 0,style:qe,className:T.cn("rst:shrink-0",k==="start"?"rst:snap-start":"rst:snap-center",ae&&"rst:snap-always",xe),children:e},n.isValidElement(e)&&e.key!=null?e.key:t))}),!L&&M==="overlay"&&q&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"rst:pointer-events-none rst:absolute rst:inset-y-0 rst:start-1 rst:flex rst:items-center",children:c.jsx("div",{className:"rst:pointer-events-auto",children:C})}),c.jsx("div",{className:"rst:pointer-events-none rst:absolute rst:inset-y-0 rst:end-1 rst:flex rst:items-center",children:c.jsx("div",{className:"rst:pointer-events-auto",children:B})})]})]})]})});exports.Carousel=Ke;
|