@thewhatmatters/wmds 0.4.31 → 0.4.33
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/CHANGELOG.md +40 -0
- package/bin/wmds-check.mjs +38 -0
- package/dist/colors.css +2 -1
- package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +73 -72
- package/dist/components/atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/atoms/Input/Input.js +44 -49
- package/dist/components/atoms/Input/inputShellStyles.js +2 -2
- package/dist/components/atoms/Radio/Radio.d.ts.map +1 -1
- package/dist/components/atoms/Radio/Radio.js +61 -60
- package/dist/components/atoms/Switch/Switch.d.ts.map +1 -1
- package/dist/components/atoms/Switch/Switch.js +31 -30
- package/dist/components/atoms/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.js +56 -55
- package/dist/components/atoms/TextArea/textareaShellStyles.js +2 -2
- package/dist/components/atoms/inputShared/InputStatusBanner.d.ts +5 -0
- package/dist/components/atoms/inputShared/InputStatusBanner.d.ts.map +1 -1
- package/dist/components/atoms/inputShared/InputStatusBanner.js +15 -4
- package/dist/components/molecules/Card/Card.d.ts +10 -1
- package/dist/components/molecules/Card/Card.d.ts.map +1 -1
- package/dist/components/molecules/Card/Card.js +56 -43
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.js +53 -53
- package/dist/components/molecules/CopyField/copyFieldStyles.d.ts.map +1 -1
- package/dist/components/molecules/CopyField/copyFieldStyles.js +1 -1
- package/dist/components/molecules/ErrorSummary/ErrorSummary.d.ts +32 -0
- package/dist/components/molecules/ErrorSummary/ErrorSummary.d.ts.map +1 -0
- package/dist/components/molecules/ErrorSummary/ErrorSummary.js +37 -0
- package/dist/components/molecules/ErrorSummary/errorSummaryStyles.d.ts +12 -0
- package/dist/components/molecules/ErrorSummary/errorSummaryStyles.d.ts.map +1 -0
- package/dist/components/molecules/ErrorSummary/errorSummaryStyles.js +5 -0
- package/dist/components/molecules/IntakeForm/IntakeForm.d.ts.map +1 -1
- package/dist/components/molecules/IntakeForm/IntakeForm.js +4 -6
- package/dist/components/molecules/PromptBar/promptBarStyles.d.ts +3 -2
- package/dist/components/molecules/PromptBar/promptBarStyles.d.ts.map +1 -1
- package/dist/components/molecules/PromptBar/promptBarStyles.js +2 -2
- package/dist/components/molecules/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/molecules/RadioGroup/RadioGroup.js +53 -53
- package/dist/components/molecules/Search/Search.d.ts +5 -0
- package/dist/components/molecules/Search/Search.d.ts.map +1 -1
- package/dist/components/molecules/Search/Search.js +14 -13
- package/dist/components/molecules/Search/searchStyles.d.ts +2 -1
- package/dist/components/molecules/Search/searchStyles.d.ts.map +1 -1
- package/dist/components/molecules/Search/searchStyles.js +4 -4
- package/dist/components/organisms/Carousel/Carousel.d.ts +21 -1
- package/dist/components/organisms/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/Carousel.js +319 -190
- package/dist/components/organisms/Carousel/carouselStyles.d.ts +9 -0
- package/dist/components/organisms/Carousel/carouselStyles.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/carouselStyles.js +12 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +99 -97
- package/dist/lib/compositionAudit.d.ts.map +1 -1
- package/dist/stateColors.css +2 -1
- package/dist/styles.css +1 -1
- package/docs/components.md +2 -1
- package/docs/exports.json +14 -1
- package/docs/patterns/components-accordion--flush.tsx +1 -1
- package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +1 -1
- package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
- package/docs/patterns/components-badge--outline-tags.tsx +1 -1
- package/docs/patterns/components-badge--status-pill.tsx +1 -1
- package/docs/patterns/components-badge--with-avatar.tsx +1 -1
- package/docs/patterns/components-band--page-in-bands.tsx +1 -1
- package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
- package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
- package/docs/patterns/components-button-button--copy-button.tsx +1 -1
- package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
- package/docs/patterns/components-button-button--external-link.tsx +1 -1
- package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
- package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
- package/docs/patterns/components-button-button--link-render.tsx +1 -1
- package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
- package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
- package/docs/patterns/components-button-button--primary-action.tsx +1 -1
- package/docs/patterns/components-button-button--row-hug.tsx +1 -1
- package/docs/patterns/components-button-button--row-layout.tsx +1 -1
- package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
- package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
- package/docs/patterns/components-button-button--with-count.tsx +1 -1
- package/docs/patterns/components-button-button--with-icon.tsx +1 -1
- package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
- package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
- package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
- package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
- package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
- package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
- package/docs/patterns/components-card-card--terminal-frame.tsx +1 -1
- package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
- package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
- package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
- package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
- package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
- package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
- package/docs/patterns/components-chart--revenue-by-line.tsx +1 -1
- package/docs/patterns/components-chart--segmented-ring-pattern.tsx +1 -1
- package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
- package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
- package/docs/patterns/components-copyfield--clipboard-blocked.tsx +1 -1
- package/docs/patterns/components-copyfield--copied.tsx +1 -1
- package/docs/patterns/components-copyfield--copy-key.tsx +1 -1
- package/docs/patterns/components-copyfield--on-navy.tsx +1 -1
- package/docs/patterns/components-descriptionlist--details.tsx +1 -1
- package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-typed-confirmation.tsx +1 -1
- package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
- package/docs/patterns/components-dialog--form-dialog.tsx +3 -3
- package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
- package/docs/patterns/components-displaycontrols--theme-switch.tsx +1 -1
- package/docs/patterns/components-errorsummary--contact-form.tsx +35 -0
- package/docs/patterns/components-field--horizontal-input.tsx +2 -2
- package/docs/patterns/components-field--horizontal-text-area.tsx +2 -2
- package/docs/patterns/components-field--multi-control.tsx +2 -2
- package/docs/patterns/components-filterpanel--panel.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
- package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
- package/docs/patterns/components-herointro--with-actions.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-indexlist--post-index.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
- package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
- package/docs/patterns/components-kbd--command-row.tsx +1 -1
- package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
- package/docs/patterns/components-kbd--shortcut.tsx +1 -1
- package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
- package/docs/patterns/components-linktile--router-link.tsx +1 -1
- package/docs/patterns/components-logview--detail-pane.tsx +1 -1
- package/docs/patterns/components-logview--log-viewer.tsx +1 -1
- package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
- package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
- package/docs/patterns/components-navlist--app-sidebar.tsx +1 -1
- package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
- package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
- package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
- package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
- package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
- package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
- package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
- package/docs/patterns/components-prose--article-body.tsx +1 -1
- package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
- package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
- package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
- package/docs/patterns/components-sheet--bottom-sheet.tsx +3 -3
- package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-header-actions.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet.tsx +1 -1
- package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
- package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
- package/docs/patterns/components-sitenav--compact.tsx +1 -1
- package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
- package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
- package/docs/patterns/components-stat--hero-stat.tsx +1 -1
- package/docs/patterns/components-stat--insights-row.tsx +1 -1
- package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
- package/docs/patterns/components-switch--default.tsx +1 -1
- package/docs/patterns/components-switch--settings-row.tsx +1 -1
- package/docs/patterns/components-tab--settings-pages.tsx +1 -1
- package/docs/patterns/components-table--approvals-with-sheet.tsx +1 -1
- package/docs/patterns/components-table--approvals.tsx +1 -1
- package/docs/patterns/components-table--basic.tsx +1 -1
- package/docs/patterns/components-taskrows--action-details.tsx +1 -1
- package/docs/patterns/components-taskrows--capsules.tsx +1 -1
- package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
- package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
- package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
- package/docs/patterns/components-taskrows--needs-you-table.tsx +1 -1
- package/docs/patterns/components-taskrows--status-list.tsx +1 -1
- package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
- package/docs/patterns/components-textarea--save-status.tsx +1 -1
- package/docs/patterns/components-textlink--external-destination.tsx +1 -1
- package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
- package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
- package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
- package/docs/patterns/components-textsequence--default.tsx +1 -1
- package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
- package/docs/patterns/components-textsequence--shapes.tsx +1 -1
- package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
- package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
- package/docs/patterns/components-tooltip--controlled.tsx +1 -1
- package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
- package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
- package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
- package/docs/patterns/components-tooltip--placement.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
- package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-grid.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-index.tsx +1 -1
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +3 -3
- package/docs/patterns/guides-post-page--post-page.tsx +1 -1
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/guides-resource-detail--detail.tsx +1 -1
- package/docs/patterns/index.json +9 -1
- package/package.json +1 -1
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { motionTransitionProp as t } from "../../../lib/motion.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { IconButton as n } from "../../atoms/IconButton/IconButton.js";
|
|
5
|
+
import { carouselActiveIndex as r, carouselClamp as i, carouselMaxScroll as a, carouselNearestSnap as o, carouselOverflows as s, carouselOverscrollOffset as c, carouselProgress as l, carouselProgressAtPointer as u, carouselSnapPoints as ee, carouselStep as d, carouselThumbShare as te } from "./carouselMath.js";
|
|
6
|
+
import { carouselBreakpoints as f, carouselControlsClasses as ne, carouselCounterClasses as p, carouselCursorClasses as m, carouselDefaultItemWidth as re, carouselExtentClasses as ie, carouselFrameClasses as ae, carouselItemClasses as oe, carouselProgressClasses as se, carouselProgressInControlsClasses as ce, carouselProgressPlacementClasses as le, carouselProgressPlacements as ue, carouselProgressThumbClasses as de, carouselProgressTrackClasses as fe, carouselRootClasses as pe, carouselTrackClasses as me, carouselViewportClasses as he } from "./carouselStyles.js";
|
|
7
|
+
import { Children as ge, createContext as h, isValidElement as _e, useCallback as g, useContext as ve, useEffect as _, useLayoutEffect as ye, useMemo as be, useRef as v, useState as xe } from "react";
|
|
8
|
+
import { Pause as Se, Play as Ce } from "lucide-react";
|
|
9
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
10
|
+
import { animate as we, motion as Te, useMotionValue as x, useMotionValueEvent as Ee, useReducedMotionConfig as De, useSpring as Oe, useTransform as ke } from "motion/react";
|
|
9
11
|
//#region src/components/organisms/Carousel/Carousel.tsx
|
|
10
|
-
var S =
|
|
12
|
+
var S = h(null), Ae = {
|
|
11
13
|
item: (e, t) => `${e} of ${t}`,
|
|
12
14
|
counter: (e, t) => `${e} of ${t}`
|
|
13
|
-
},
|
|
14
|
-
function
|
|
15
|
+
}, je = 120, Me = 10;
|
|
16
|
+
function Ne(e, t) {
|
|
15
17
|
try {
|
|
16
18
|
e.setPointerCapture(t);
|
|
17
19
|
} catch {}
|
|
18
20
|
}
|
|
19
|
-
function
|
|
21
|
+
function Pe(e) {
|
|
20
22
|
if (typeof e == "number") return {
|
|
21
23
|
base: e,
|
|
22
24
|
sm: e,
|
|
23
25
|
md: e,
|
|
24
26
|
lg: e
|
|
25
27
|
};
|
|
26
|
-
let t = e.base ??
|
|
28
|
+
let t = e.base ?? re.base, n = e.sm ?? t, r = e.md ?? n;
|
|
27
29
|
return {
|
|
28
30
|
base: t,
|
|
29
31
|
sm: n,
|
|
@@ -31,135 +33,226 @@ function De(e) {
|
|
|
31
33
|
lg: e.lg ?? r
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
|
-
function
|
|
36
|
+
function Fe(e, t, n) {
|
|
35
37
|
n ? e.style.removeProperty(t) : e.style.setProperty(t, "0px");
|
|
36
38
|
}
|
|
37
|
-
function
|
|
38
|
-
let
|
|
39
|
+
function Ie({ "aria-label": f, "aria-labelledby": oe, itemWidth: ue = re, snap: h = !0, bleed: ve = !1, fade: be = !0, progress: S = "center", counter: Ie = !1, onIndexChange: ze, activeIndex: C, labels: Be, autoplay: Ve = !1, loop: w = !1, cursor: T, children: He, className: Ue }) {
|
|
40
|
+
let E = De() ?? !1, D = v(null), O = v(null), k = v(null), A = v(null), We = v(null), j = v({
|
|
39
41
|
max: 0,
|
|
40
42
|
points: [0],
|
|
41
43
|
offsets: [],
|
|
42
|
-
direction: 1
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
direction: 1,
|
|
45
|
+
loopWidth: 0
|
|
46
|
+
}), M = v(null), N = v(null), P = v(null), F = v(null), I = v(!1), [L, Ge] = xe(null), [Ke, qe] = xe(0), Je = v(void 0), Ye = v(0), Xe = v(void 0), Ze = v(0), Qe = v(ze), $e = v(() => {}), R = Ve === !1 ? 0 : typeof Ve == "object" ? Ve.speed ?? Le : Le, [et, tt] = xe(!1), z = v({
|
|
47
|
+
hover: !1,
|
|
48
|
+
focus: !1,
|
|
49
|
+
offscreen: !1
|
|
50
|
+
}), B = v(null), nt = v({
|
|
51
|
+
position: 0,
|
|
52
|
+
time: 0,
|
|
53
|
+
reset: void 0
|
|
54
|
+
}), rt = x(0), it = Oe(rt, {
|
|
55
|
+
stiffness: 170,
|
|
56
|
+
damping: 26,
|
|
57
|
+
mass: 1
|
|
58
|
+
});
|
|
59
|
+
Ee(it, "change", (e) => {
|
|
60
|
+
D.current?.style.setProperty("--carousel-velocity", (Math.abs(e) < .001 ? 0 : e).toFixed(3));
|
|
61
|
+
});
|
|
62
|
+
let V = x(0), H = x(0), at = ke(H, (e) => -j.current.direction * c(e)), U = g(() => Math.abs(O.current?.scrollLeft ?? 0), []), W = g(() => {
|
|
63
|
+
let e = D.current, t = O.current;
|
|
45
64
|
if (!e || !t) return;
|
|
46
|
-
let { max:
|
|
47
|
-
e.style.setProperty("--carousel-progress", String(
|
|
48
|
-
let e =
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
}, []),
|
|
52
|
-
let t =
|
|
53
|
-
t && (t.scrollLeft =
|
|
65
|
+
let { max: n } = j.current, i = Math.abs(t.scrollLeft);
|
|
66
|
+
e.style.setProperty("--carousel-progress", String(l(i, n))), Fe(t, "--scroll-fade-s", i > 1), Fe(t, "--scroll-fade-e", i < n - 1), window.clearTimeout(Je.current), Je.current = window.setTimeout(() => {
|
|
67
|
+
let e = r(j.current.offsets, Math.abs(t.scrollLeft), j.current.max);
|
|
68
|
+
qe(e), e !== Ye.current && (Ye.current = e, Qe.current?.(e, Ze.current));
|
|
69
|
+
}, je);
|
|
70
|
+
}, []), G = g((e) => {
|
|
71
|
+
let t = O.current;
|
|
72
|
+
t && (t.scrollLeft = j.current.direction * e, W());
|
|
54
73
|
}, [W]);
|
|
55
|
-
|
|
56
|
-
let t =
|
|
57
|
-
|
|
74
|
+
Ee(V, "change", (e) => {
|
|
75
|
+
let t = i(e, 0, j.current.max);
|
|
76
|
+
G(t), H.set(E ? 0 : e - t);
|
|
58
77
|
});
|
|
59
|
-
function
|
|
60
|
-
let t =
|
|
78
|
+
function K(e) {
|
|
79
|
+
let t = O.current;
|
|
61
80
|
t && (e ? t.dataset.moving = "" : delete t.dataset.moving);
|
|
62
81
|
}
|
|
63
|
-
function K() {
|
|
64
|
-
N.current?.stop(), N.current = null, P.current = null;
|
|
65
|
-
}
|
|
66
82
|
function q() {
|
|
67
|
-
|
|
83
|
+
M.current?.stop(), M.current = null, N.current = null;
|
|
68
84
|
}
|
|
69
|
-
function
|
|
70
|
-
|
|
85
|
+
function ot() {
|
|
86
|
+
M.current = null, N.current = null, K(!1);
|
|
87
|
+
}
|
|
88
|
+
function st() {
|
|
89
|
+
M.current != null && (q(), V.jump(U()), K(!1));
|
|
71
90
|
}
|
|
72
91
|
function J(e, n = !0) {
|
|
73
|
-
let
|
|
74
|
-
if (
|
|
75
|
-
|
|
92
|
+
let r = i(e, 0, j.current.max);
|
|
93
|
+
if (q(), V.jump(U()), E || !n) {
|
|
94
|
+
K(!1), V.jump(r);
|
|
76
95
|
return;
|
|
77
96
|
}
|
|
78
|
-
|
|
97
|
+
N.current = r, K(!0), M.current = we(V, r, {
|
|
79
98
|
...t("medium"),
|
|
80
|
-
onComplete:
|
|
99
|
+
onComplete: ot
|
|
81
100
|
});
|
|
82
101
|
}
|
|
83
|
-
|
|
84
|
-
|
|
102
|
+
_(() => {
|
|
103
|
+
Qe.current = ze, $e.current = J;
|
|
85
104
|
});
|
|
86
|
-
function
|
|
87
|
-
let { max: t, points: n } =
|
|
88
|
-
if (
|
|
89
|
-
J(
|
|
105
|
+
function ct(e) {
|
|
106
|
+
let { max: t, points: n } = j.current, r = (e) => o(n, i(e, 0, t));
|
|
107
|
+
if (q(), E) {
|
|
108
|
+
J(h ? r(V.get()) : V.get(), !1);
|
|
90
109
|
return;
|
|
91
110
|
}
|
|
92
|
-
let
|
|
93
|
-
if (e === 0 && s ===
|
|
94
|
-
|
|
111
|
+
let a = V.get(), s = h ? r(a) : i(a, 0, t);
|
|
112
|
+
if (e === 0 && s === a) {
|
|
113
|
+
ot();
|
|
95
114
|
return;
|
|
96
115
|
}
|
|
97
|
-
|
|
116
|
+
K(!0), M.current = we(V, s === a ? a + Math.sign(e) : s, {
|
|
98
117
|
type: "inertia",
|
|
99
118
|
velocity: e,
|
|
100
119
|
min: 0,
|
|
101
120
|
max: t,
|
|
102
|
-
modifyTarget:
|
|
103
|
-
onComplete:
|
|
121
|
+
modifyTarget: h ? r : void 0,
|
|
122
|
+
onComplete: ot
|
|
104
123
|
});
|
|
105
124
|
}
|
|
106
|
-
let Y =
|
|
107
|
-
let e =
|
|
125
|
+
let Y = g(() => {
|
|
126
|
+
let e = D.current, t = O.current, n = k.current;
|
|
108
127
|
if (!e || !t || !n || H.get() !== 0) return;
|
|
109
|
-
if (
|
|
128
|
+
if (ve) {
|
|
110
129
|
let t = e.getBoundingClientRect(), n = Math.max(0, Math.floor(t.left)), r = Math.max(0, Math.floor(document.documentElement.clientWidth - t.right));
|
|
111
130
|
e.style.setProperty("--carousel-bleed-left", `${n}px`), e.style.setProperty("--carousel-bleed-right", `${r}px`);
|
|
112
131
|
} else e.style.removeProperty("--carousel-bleed-left"), e.style.removeProperty("--carousel-bleed-right");
|
|
113
|
-
let r = getComputedStyle(t).direction === "rtl" ? -1 : 1,
|
|
132
|
+
let r = getComputedStyle(t).direction === "rtl" ? -1 : 1, i = t.clientWidth, o = t.scrollWidth, c = a(i, o), l = Array.from(n.querySelectorAll(":scope > [data-carousel-item]:not([data-carousel-clone])")), u = n.querySelector(":scope > [data-carousel-clone]"), d = l[0]?.getBoundingClientRect(), f = d == null ? [] : l.map((e) => {
|
|
114
133
|
let t = e.getBoundingClientRect();
|
|
115
134
|
return r === 1 ? t.left - d.left : d.right - t.right;
|
|
116
|
-
});
|
|
117
|
-
|
|
135
|
+
}), ne = u == null || d == null ? 0 : r === 1 ? u.getBoundingClientRect().left - d.left : d.right - u.getBoundingClientRect().right;
|
|
136
|
+
j.current = {
|
|
118
137
|
max: c,
|
|
119
138
|
direction: r,
|
|
120
|
-
points:
|
|
121
|
-
offsets:
|
|
139
|
+
points: ee(f, c),
|
|
140
|
+
offsets: f,
|
|
141
|
+
loopWidth: ne
|
|
122
142
|
};
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
let
|
|
126
|
-
|
|
143
|
+
let p = A.current;
|
|
144
|
+
p && e.style.setProperty("--carousel-thumb", String(te(i, o, p.clientWidth))), W();
|
|
145
|
+
let m = s(i, o);
|
|
146
|
+
Ge((e) => e === m ? e : m);
|
|
127
147
|
}, [
|
|
128
|
-
|
|
148
|
+
ve,
|
|
129
149
|
H,
|
|
130
150
|
W
|
|
131
151
|
]);
|
|
132
|
-
|
|
152
|
+
ye(() => {
|
|
133
153
|
if (Y(), window.addEventListener("resize", Y), typeof ResizeObserver > "u") return () => window.removeEventListener("resize", Y);
|
|
134
154
|
let e = new ResizeObserver(Y);
|
|
135
155
|
for (let t of [
|
|
156
|
+
D.current,
|
|
136
157
|
O.current,
|
|
137
158
|
k.current,
|
|
138
|
-
A.current
|
|
139
|
-
j.current
|
|
159
|
+
A.current
|
|
140
160
|
]) t && e.observe(t);
|
|
141
161
|
return () => {
|
|
142
162
|
e.disconnect(), window.removeEventListener("resize", Y);
|
|
143
163
|
};
|
|
144
|
-
}, [Y, S]),
|
|
145
|
-
|
|
146
|
-
}, [])
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
164
|
+
}, [Y, S]), _(() => () => {
|
|
165
|
+
M.current?.stop(), window.clearTimeout(Je.current);
|
|
166
|
+
}, []);
|
|
167
|
+
let lt = R > 0 && !E && !et && L === !0;
|
|
168
|
+
_(() => {
|
|
169
|
+
let e = D.current, t = O.current;
|
|
170
|
+
if (!lt || !e || !t) return;
|
|
171
|
+
let n = 0, r = performance.now(), i = 1, a = U(), o = typeof IntersectionObserver > "u" ? null : new IntersectionObserver(([e]) => {
|
|
172
|
+
z.current.offscreen = !(e?.isIntersecting ?? !0);
|
|
173
|
+
});
|
|
174
|
+
o?.observe(e), K(!0);
|
|
175
|
+
let s = (e) => {
|
|
176
|
+
let t = Math.min(.05, (e - r) / 1e3);
|
|
177
|
+
r = e;
|
|
178
|
+
let { hover: o, focus: c, offscreen: l } = z.current;
|
|
179
|
+
if (o || c || l || document.hidden || P.current != null || F.current != null || M.current != null) a = U();
|
|
180
|
+
else {
|
|
181
|
+
let { max: e } = j.current;
|
|
182
|
+
Math.abs(U() - a) > 2 && (a = U()), a += i * R * t;
|
|
183
|
+
let { loopWidth: n } = j.current;
|
|
184
|
+
w && n > 0 ? a >= n && (a -= n) : a >= e ? (a = e, i = -1) : a <= 0 && (a = 0, i = 1), K(!0), G(a);
|
|
185
|
+
}
|
|
186
|
+
n = requestAnimationFrame(s);
|
|
187
|
+
};
|
|
188
|
+
return n = requestAnimationFrame(s), () => {
|
|
189
|
+
cancelAnimationFrame(n), o?.disconnect(), K(!1);
|
|
190
|
+
};
|
|
154
191
|
}, [
|
|
155
|
-
|
|
192
|
+
lt,
|
|
156
193
|
R,
|
|
157
|
-
|
|
194
|
+
w,
|
|
195
|
+
U,
|
|
196
|
+
G
|
|
197
|
+
]);
|
|
198
|
+
function ut() {
|
|
199
|
+
if (!D.current || E) return;
|
|
200
|
+
let e = performance.now(), t = U(), n = nt.current, r = e - n.time;
|
|
201
|
+
r > 0 && r < 200 && Math.abs(t - n.position) < 400 && rt.set(i((t - n.position) / r / 1.5, -1, 1)), n.position = t, n.time = e, window.clearTimeout(n.reset), n.reset = window.setTimeout(() => rt.set(0), 120);
|
|
202
|
+
}
|
|
203
|
+
function dt() {
|
|
204
|
+
ut();
|
|
205
|
+
let { loopWidth: e } = j.current;
|
|
206
|
+
if (w && e > 0 && P.current == null && F.current == null && M.current == null) {
|
|
207
|
+
let t = U();
|
|
208
|
+
if (t >= e) {
|
|
209
|
+
G(t - e);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
W();
|
|
214
|
+
}
|
|
215
|
+
function ft(e) {
|
|
216
|
+
e.pointerType === "mouse" && (z.current.hover = !0);
|
|
217
|
+
}
|
|
218
|
+
function pt() {
|
|
219
|
+
z.current.hover = !1;
|
|
220
|
+
let e = B.current;
|
|
221
|
+
e && delete e.dataset.shown;
|
|
222
|
+
}
|
|
223
|
+
function mt() {
|
|
224
|
+
z.current.focus = !0;
|
|
225
|
+
}
|
|
226
|
+
function ht(e) {
|
|
227
|
+
e.currentTarget.contains(e.relatedTarget) || (z.current.focus = !1);
|
|
228
|
+
}
|
|
229
|
+
function gt(e) {
|
|
230
|
+
let t = B.current, n = D.current;
|
|
231
|
+
if (!t || !n || e.pointerType !== "mouse" || !window.matchMedia("(hover: hover) and (pointer: fine)").matches) return;
|
|
232
|
+
let r = n.getBoundingClientRect();
|
|
233
|
+
t.style.transform = `translate3d(${e.clientX - r.left}px, ${e.clientY - r.top}px, 0) translate(-50%, -50%)`, t.dataset.shown = "", P.current?.active ? t.dataset.dragging = "" : delete t.dataset.dragging;
|
|
234
|
+
}
|
|
235
|
+
function _t() {
|
|
236
|
+
let e = B.current;
|
|
237
|
+
e && delete e.dataset.shown;
|
|
238
|
+
}
|
|
239
|
+
_(() => {
|
|
240
|
+
if (C == null || L == null || C === Xe.current) return;
|
|
241
|
+
let { offsets: e, max: t } = j.current;
|
|
242
|
+
if (e.length === 0) return;
|
|
243
|
+
let n = Xe.current === void 0;
|
|
244
|
+
Xe.current = C;
|
|
245
|
+
let r = e[i(Math.round(C), 0, e.length - 1)];
|
|
246
|
+
$e.current(h ? o(j.current.points, r) : i(r, 0, t), !n);
|
|
247
|
+
}, [
|
|
248
|
+
C,
|
|
249
|
+
L,
|
|
250
|
+
h
|
|
158
251
|
]);
|
|
159
|
-
function
|
|
160
|
-
if (e.pointerType !== "mouse" || e.button !== 0 ||
|
|
161
|
-
let t =
|
|
162
|
-
|
|
252
|
+
function vt(e) {
|
|
253
|
+
if (e.pointerType !== "mouse" || e.button !== 0 || j.current.max <= 0) return;
|
|
254
|
+
let t = M.current != null;
|
|
255
|
+
q(), V.jump(U()), P.current = {
|
|
163
256
|
pointerId: e.pointerId,
|
|
164
257
|
startX: e.clientX,
|
|
165
258
|
startPosition: U(),
|
|
@@ -167,38 +260,38 @@ function C({ "aria-label": p, "aria-labelledby": ne, itemWidth: ae = h, snap: g
|
|
|
167
260
|
interrupted: t
|
|
168
261
|
};
|
|
169
262
|
}
|
|
170
|
-
function
|
|
171
|
-
let t =
|
|
263
|
+
function yt(e) {
|
|
264
|
+
let t = P.current;
|
|
172
265
|
if (!(!t || t.pointerId !== e.pointerId)) {
|
|
173
266
|
if (e.buttons === 0) {
|
|
174
|
-
|
|
267
|
+
bt(e);
|
|
175
268
|
return;
|
|
176
269
|
}
|
|
177
270
|
if (!t.active) {
|
|
178
271
|
if (Math.abs(e.clientX - t.startX) < 4) return;
|
|
179
|
-
t.active = !0, t.startX = e.clientX,
|
|
272
|
+
t.active = !0, t.startX = e.clientX, Ne(e.currentTarget, e.pointerId), e.currentTarget.dataset.dragging = "", window.getSelection()?.removeAllRanges(), K(!0);
|
|
180
273
|
}
|
|
181
|
-
V.set(t.startPosition -
|
|
274
|
+
V.set(t.startPosition - j.current.direction * (e.clientX - t.startX));
|
|
182
275
|
}
|
|
183
276
|
}
|
|
184
|
-
function
|
|
185
|
-
let t =
|
|
277
|
+
function bt(e) {
|
|
278
|
+
let t = P.current;
|
|
186
279
|
if (!t || t.pointerId !== e.pointerId) return;
|
|
187
|
-
if (
|
|
188
|
-
t.interrupted &&
|
|
280
|
+
if (P.current = null, !t.active) {
|
|
281
|
+
t.interrupted && ct(0);
|
|
189
282
|
return;
|
|
190
283
|
}
|
|
191
284
|
let n = e.currentTarget;
|
|
192
|
-
n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), delete n.dataset.dragging,
|
|
193
|
-
|
|
194
|
-
}, 0),
|
|
285
|
+
n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), delete n.dataset.dragging, I.current = !0, window.setTimeout(() => {
|
|
286
|
+
I.current = !1;
|
|
287
|
+
}, 0), ct(e.type === "pointercancel" ? 0 : V.getVelocity());
|
|
195
288
|
}
|
|
196
|
-
function
|
|
197
|
-
|
|
289
|
+
function xt(e) {
|
|
290
|
+
I.current && (I.current = !1, e.preventDefault(), e.stopPropagation());
|
|
198
291
|
}
|
|
199
|
-
function
|
|
292
|
+
function St(e) {
|
|
200
293
|
if (e.target !== e.currentTarget || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
201
|
-
let { max: t, points: n, direction: r } =
|
|
294
|
+
let { max: t, points: n, direction: r } = j.current, i = N.current ?? U(), a;
|
|
202
295
|
switch (e.key) {
|
|
203
296
|
case "ArrowRight":
|
|
204
297
|
a = d(n, i, r);
|
|
@@ -216,133 +309,169 @@ function C({ "aria-label": p, "aria-labelledby": ne, itemWidth: ae = h, snap: g
|
|
|
216
309
|
}
|
|
217
310
|
e.preventDefault(), J(a);
|
|
218
311
|
}
|
|
219
|
-
function
|
|
220
|
-
let t =
|
|
312
|
+
function Ct(e) {
|
|
313
|
+
let t = A.current, n = We.current, { max: r, points: i, direction: a } = j.current;
|
|
221
314
|
if (!t || !n || r <= 0 || e.button !== 0) return;
|
|
222
315
|
e.preventDefault();
|
|
223
|
-
let s = t.getBoundingClientRect(),
|
|
224
|
-
if (e.clientX >=
|
|
225
|
-
|
|
316
|
+
let s = t.getBoundingClientRect(), c = n.getBoundingClientRect();
|
|
317
|
+
if (e.clientX >= c.left - Me && e.clientX <= c.right + Me) {
|
|
318
|
+
q(), V.jump(U()), K(!0), Ne(e.currentTarget, e.pointerId), e.currentTarget.dataset.scrubbing = "", F.current = {
|
|
226
319
|
pointerId: e.pointerId,
|
|
227
320
|
startX: e.clientX,
|
|
228
|
-
startProgress:
|
|
229
|
-
travel: s.width -
|
|
321
|
+
startProgress: l(U(), r),
|
|
322
|
+
travel: s.width - c.width
|
|
230
323
|
};
|
|
231
324
|
return;
|
|
232
325
|
}
|
|
233
|
-
let
|
|
234
|
-
J(
|
|
326
|
+
let ee = a === 1 ? e.clientX - s.left : s.right - e.clientX, d = u(ee, s.width, c.width) * r;
|
|
327
|
+
J(h ? o(i, d) : d);
|
|
235
328
|
}
|
|
236
|
-
function
|
|
237
|
-
let t =
|
|
329
|
+
function wt(e) {
|
|
330
|
+
let t = F.current;
|
|
238
331
|
if (!t || t.pointerId !== e.pointerId || t.travel <= 0) return;
|
|
239
|
-
let { max: n, direction:
|
|
240
|
-
V.set(
|
|
332
|
+
let { max: n, direction: r } = j.current, a = r * (e.clientX - t.startX) / t.travel;
|
|
333
|
+
V.set(i(t.startProgress + a, 0, 1) * n);
|
|
241
334
|
}
|
|
242
|
-
function
|
|
243
|
-
let t =
|
|
335
|
+
function Tt(e) {
|
|
336
|
+
let t = F.current;
|
|
244
337
|
if (!t || t.pointerId !== e.pointerId) return;
|
|
245
|
-
|
|
338
|
+
F.current = null;
|
|
246
339
|
let n = e.currentTarget;
|
|
247
|
-
n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), delete n.dataset.scrubbing,
|
|
340
|
+
n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), delete n.dataset.scrubbing, h ? J(o(j.current.points, U())) : K(!1);
|
|
248
341
|
}
|
|
249
|
-
let
|
|
250
|
-
"--carousel-item": String(
|
|
251
|
-
"--carousel-item-sm": String(
|
|
252
|
-
"--carousel-item-md": String(
|
|
253
|
-
"--carousel-item-lg": String(
|
|
254
|
-
},
|
|
255
|
-
|
|
256
|
-
let
|
|
257
|
-
return /* @__PURE__ */
|
|
258
|
-
ref:
|
|
259
|
-
className: e(
|
|
260
|
-
style:
|
|
342
|
+
let X = Pe(ue), Et = {
|
|
343
|
+
"--carousel-item": String(X.base),
|
|
344
|
+
"--carousel-item-sm": String(X.sm),
|
|
345
|
+
"--carousel-item-md": String(X.md),
|
|
346
|
+
"--carousel-item-lg": String(X.lg)
|
|
347
|
+
}, Dt = Be?.item ?? Ae.item, Z = ge.toArray(He);
|
|
348
|
+
Ze.current = Z.length;
|
|
349
|
+
let Ot = (Be?.counter ?? Ae.counter)(Math.min(Ke, Math.max(Z.length - 1, 0)) + 1, Z.length), kt = L == null ? void 0 : String(L), Q = R > 0 && !E && L === !0, $ = w ? "none" : S, At = Ie && !w;
|
|
350
|
+
return /* @__PURE__ */ b("div", {
|
|
351
|
+
ref: D,
|
|
352
|
+
className: e(pe, T != null && "relative", Ue),
|
|
353
|
+
style: Et,
|
|
261
354
|
"data-carousel": "",
|
|
355
|
+
"data-autoplay": R > 0 ? "" : void 0,
|
|
356
|
+
onPointerEnter: ft,
|
|
357
|
+
onPointerLeave: pt,
|
|
358
|
+
onFocus: mt,
|
|
359
|
+
onBlur: ht,
|
|
262
360
|
children: [
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
-
className:
|
|
265
|
-
children: /* @__PURE__ */
|
|
266
|
-
ref:
|
|
361
|
+
/* @__PURE__ */ y("div", {
|
|
362
|
+
className: ae,
|
|
363
|
+
children: /* @__PURE__ */ y("div", {
|
|
364
|
+
ref: O,
|
|
267
365
|
role: "region",
|
|
268
|
-
"aria-label":
|
|
269
|
-
"aria-labelledby":
|
|
270
|
-
tabIndex:
|
|
366
|
+
"aria-label": f,
|
|
367
|
+
"aria-labelledby": oe,
|
|
368
|
+
tabIndex: L === !1 ? void 0 : 0,
|
|
271
369
|
"data-carousel-viewport": "",
|
|
272
|
-
"data-overflowing":
|
|
273
|
-
className: e(
|
|
370
|
+
"data-overflowing": kt,
|
|
371
|
+
className: e(he, h && "snap-x snap-mandatory data-[moving]:snap-none", be && "scroll-fade-x"),
|
|
274
372
|
style: { "--scroll-fade-s": "0px" },
|
|
275
|
-
onScroll:
|
|
276
|
-
onKeyDown:
|
|
277
|
-
onPointerDown:
|
|
278
|
-
onPointerMove:
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
373
|
+
onScroll: dt,
|
|
374
|
+
onKeyDown: St,
|
|
375
|
+
onPointerDown: vt,
|
|
376
|
+
onPointerMove: (e) => {
|
|
377
|
+
yt(e), T != null && gt(e);
|
|
378
|
+
},
|
|
379
|
+
onPointerLeave: T == null ? void 0 : _t,
|
|
380
|
+
onPointerUp: bt,
|
|
381
|
+
onPointerCancel: bt,
|
|
382
|
+
onClickCapture: xt,
|
|
282
383
|
onDragStart: (e) => e.preventDefault(),
|
|
283
|
-
onWheel:
|
|
284
|
-
onTouchStart:
|
|
285
|
-
children: /* @__PURE__ */
|
|
286
|
-
className:
|
|
287
|
-
children: /* @__PURE__ */
|
|
288
|
-
ref:
|
|
289
|
-
className:
|
|
290
|
-
style: { x:
|
|
291
|
-
children:
|
|
292
|
-
label:
|
|
384
|
+
onWheel: st,
|
|
385
|
+
onTouchStart: st,
|
|
386
|
+
children: /* @__PURE__ */ y("div", {
|
|
387
|
+
className: ie,
|
|
388
|
+
children: /* @__PURE__ */ b(Te.div, {
|
|
389
|
+
ref: k,
|
|
390
|
+
className: me,
|
|
391
|
+
style: { x: at },
|
|
392
|
+
children: [Z.map((e, t) => /* @__PURE__ */ y(Re, {
|
|
393
|
+
label: Dt(t + 1, Z.length),
|
|
394
|
+
children: e
|
|
395
|
+
}, _e(e) && e.key != null ? e.key : t)), w ? Z.map((e, t) => /* @__PURE__ */ y(Re, {
|
|
396
|
+
label: Dt(t + 1, Z.length),
|
|
397
|
+
clone: !0,
|
|
293
398
|
children: e
|
|
294
|
-
},
|
|
399
|
+
}, `loop-${t}`)) : null]
|
|
295
400
|
})
|
|
296
401
|
})
|
|
297
402
|
})
|
|
298
403
|
}),
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
"
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
404
|
+
$ !== "none" || Q ? /* @__PURE__ */ b("div", {
|
|
405
|
+
className: Q ? ne[$] : "contents",
|
|
406
|
+
children: [$ === "none" ? null : /* @__PURE__ */ y("div", {
|
|
407
|
+
"aria-hidden": "true",
|
|
408
|
+
"data-carousel-progress": "",
|
|
409
|
+
"data-overflowing": kt,
|
|
410
|
+
className: e(se, Q ? ce[$] : le[$]),
|
|
411
|
+
onPointerDown: Ct,
|
|
412
|
+
onPointerMove: wt,
|
|
413
|
+
onPointerUp: Tt,
|
|
414
|
+
onPointerCancel: Tt,
|
|
415
|
+
children: /* @__PURE__ */ y("div", {
|
|
416
|
+
ref: A,
|
|
417
|
+
className: fe,
|
|
418
|
+
children: /* @__PURE__ */ y("div", {
|
|
419
|
+
ref: We,
|
|
420
|
+
className: de,
|
|
421
|
+
"data-carousel-progress-thumb": ""
|
|
422
|
+
})
|
|
315
423
|
})
|
|
316
|
-
})
|
|
424
|
+
}), Q ? /* @__PURE__ */ y(n, {
|
|
425
|
+
role: "ghost",
|
|
426
|
+
size: "sm",
|
|
427
|
+
"aria-label": et ? "Play" : "Pause",
|
|
428
|
+
icon: y(et ? Ce : Se, { strokeWidth: 2 }),
|
|
429
|
+
onClick: () => tt((e) => !e),
|
|
430
|
+
"data-carousel-drift-control": ""
|
|
431
|
+
}) : null]
|
|
432
|
+
}) : null,
|
|
433
|
+
T == null ? null : /* @__PURE__ */ y("div", {
|
|
434
|
+
ref: B,
|
|
435
|
+
"aria-hidden": "true",
|
|
436
|
+
className: m,
|
|
437
|
+
"data-carousel-cursor": "",
|
|
438
|
+
children: T
|
|
317
439
|
}),
|
|
318
|
-
|
|
440
|
+
At ? /* @__PURE__ */ y("p", {
|
|
319
441
|
"aria-live": "polite",
|
|
320
442
|
"aria-atomic": "true",
|
|
321
443
|
"data-carousel-counter": "",
|
|
322
|
-
"data-overflowing":
|
|
323
|
-
className:
|
|
324
|
-
children:
|
|
444
|
+
"data-overflowing": kt,
|
|
445
|
+
className: p,
|
|
446
|
+
children: Ot
|
|
325
447
|
}) : null
|
|
326
448
|
]
|
|
327
449
|
});
|
|
328
450
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
451
|
+
var Le = 24;
|
|
452
|
+
function Re({ label: e, clone: t = !1, children: n }) {
|
|
453
|
+
let r = be(() => ({
|
|
454
|
+
label: e,
|
|
455
|
+
clone: t
|
|
456
|
+
}), [e, t]);
|
|
457
|
+
return /* @__PURE__ */ y(S.Provider, {
|
|
458
|
+
value: r,
|
|
459
|
+
children: n
|
|
334
460
|
});
|
|
335
461
|
}
|
|
336
|
-
function
|
|
337
|
-
let r =
|
|
338
|
-
return /* @__PURE__ */
|
|
339
|
-
role: "group",
|
|
340
|
-
"aria-label": r?.label,
|
|
462
|
+
function ze({ children: t, className: n }) {
|
|
463
|
+
let r = ve(S);
|
|
464
|
+
return /* @__PURE__ */ y("div", {
|
|
465
|
+
role: r?.clone ? void 0 : "group",
|
|
466
|
+
"aria-label": r?.clone ? void 0 : r?.label,
|
|
467
|
+
"aria-hidden": r?.clone ? !0 : void 0,
|
|
468
|
+
inert: r?.clone ? !0 : void 0,
|
|
341
469
|
"data-carousel-item": "",
|
|
342
|
-
|
|
470
|
+
"data-carousel-clone": r?.clone ? "" : void 0,
|
|
471
|
+
className: e(oe, n),
|
|
343
472
|
children: t
|
|
344
473
|
});
|
|
345
474
|
}
|
|
346
|
-
var
|
|
475
|
+
var C = Object.assign(Ie, { Item: ze });
|
|
347
476
|
//#endregion
|
|
348
|
-
export {
|
|
477
|
+
export { C as Carousel, f as carouselBreakpoints, re as carouselDefaultItemWidth, ue as carouselProgressPlacements };
|