@moveindustries/movement-design-system 1.1.6 → 1.2.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/CHANGELOG.md +27 -0
- package/dist/assets/fonts/NeueHaasUnicaPro.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Black.otf +0 -0
- package/dist/assets/fonts/TWKEverett-BlackItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Bold.otf +0 -0
- package/dist/assets/fonts/TWKEverett-BoldItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Extrabold.otf +0 -0
- package/dist/assets/fonts/TWKEverett-ExtraboldItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Hairline.otf +0 -0
- package/dist/assets/fonts/TWKEverett-HairlineItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Light.otf +0 -0
- package/dist/assets/fonts/TWKEverett-LightItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Medium.otf +0 -0
- package/dist/assets/fonts/TWKEverett-MediumItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Regular.otf +0 -0
- package/dist/assets/fonts/TWKEverett-RegularItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Super.otf +0 -0
- package/dist/assets/fonts/TWKEverett-SuperItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Thin.otf +0 -0
- package/dist/assets/fonts/TWKEverett-ThinItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverett-Ultralight.otf +0 -0
- package/dist/assets/fonts/TWKEverett-UltralightItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Black.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-BlackItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Bold.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-BoldItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Extrabold.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-ExtraboldItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Hairline.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-HairlineItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Light.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-LightItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Medium.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-MediumItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Regular.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-RegularItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Super.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-SuperItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Thin.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-ThinItalic.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-Ultralight.otf +0 -0
- package/dist/assets/fonts/TWKEverettMono-UltralightItalic.otf +0 -0
- package/dist/assets/fonts/oracle/ABCOracle-Bold.woff2 +0 -0
- package/dist/assets/fonts/oracle/ABCOracle-BoldItalic.woff2 +0 -0
- package/dist/assets/fonts/oracle/ABCOracle-Medium.woff2 +0 -0
- package/dist/assets/fonts/oracle/ABCOracle-MediumItalic.woff2 +0 -0
- package/dist/assets/fonts/oracle/ABCOracle-Regular.woff2 +0 -0
- package/dist/assets/fonts/oracle/ABCOracle-RegularItalic.woff2 +0 -0
- package/dist/assets/fonts/recife/RecifeTextWeb-Bold.woff2 +0 -0
- package/dist/assets/fonts/recife/RecifeTextWeb-BoldItalic.woff2 +0 -0
- package/dist/assets/fonts/recife/RecifeTextWeb-Medium.woff2 +0 -0
- package/dist/assets/fonts/recife/RecifeTextWeb-MediumItalic.woff2 +0 -0
- package/dist/assets/fonts/recife/RecifeTextWeb-Regular.woff2 +0 -0
- package/dist/assets/fonts/recife/RecifeTextWeb-RegularItalic.woff2 +0 -0
- package/dist/{button-Dmwbc4J_.cjs → button-DZAlWvkC.cjs} +1 -1
- package/dist/{button-DBoRj4Bh.js → button-Dh2vlJOI.js} +4 -4
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.js +42 -42
- package/dist/components/WalletModal/WalletModal.d.ts.map +1 -1
- package/dist/components/shadcn/button.d.ts +1 -1
- package/dist/components/shadcn/input.d.ts +1 -1
- package/dist/components/shadcn/typography.d.ts +1 -1
- package/dist/components/theme/index.d.ts +0 -2
- package/dist/components/theme/index.d.ts.map +1 -1
- package/dist/{drawer-C7hRQ7X-.js → drawer-CTsbhpbu.js} +38 -38
- package/dist/{drawer-BkuiusSD.cjs → drawer-DjVIwhWw.cjs} +1 -1
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.js +1 -1
- package/dist/fonts.css +38 -279
- package/dist/index.cjs +1 -12
- package/dist/index.d.ts +5 -35
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1581 -4592
- package/dist/movement-design-system.css +1 -1
- package/dist/recipes.css +6 -6
- package/dist/theme.css +97 -129
- package/dist/{dialog-LjNZCtUV.cjs → use-mobile-C12jSU8y.cjs} +2 -2
- package/dist/{dialog-9n6-1DUQ.js → use-mobile-Da0X_fcF.js} +261 -262
- package/dist/wallet.cjs +1 -1
- package/dist/wallet.js +79 -90
- package/package.json +15 -26
- package/dist/components/Branding/Branding.d.ts +0 -31
- package/dist/components/Branding/Branding.d.ts.map +0 -1
- package/dist/components/Branding/index.d.ts +0 -3
- package/dist/components/Branding/index.d.ts.map +0 -1
- package/dist/components/DottedBackground/DottedBackground.d.ts +0 -11
- package/dist/components/DottedBackground/DottedBackground.d.ts.map +0 -1
- package/dist/components/DottedBackground/index.d.ts +0 -2
- package/dist/components/DottedBackground/index.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/GlobalNavMenu.d.ts +0 -87
- package/dist/components/GlobalNavMenu/GlobalNavMenu.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/BridgeIcon.d.ts +0 -2
- package/dist/components/GlobalNavMenu/icons/BridgeIcon.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/DelegatedStakingIcon.d.ts +0 -2
- package/dist/components/GlobalNavMenu/icons/DelegatedStakingIcon.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/ExplorerIcon.d.ts +0 -2
- package/dist/components/GlobalNavMenu/icons/ExplorerIcon.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/GridIcon.d.ts +0 -4
- package/dist/components/GlobalNavMenu/icons/GridIcon.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/MoveDocsIcon.d.ts +0 -2
- package/dist/components/GlobalNavMenu/icons/MoveDocsIcon.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/ParthenonIcon.d.ts +0 -2
- package/dist/components/GlobalNavMenu/icons/ParthenonIcon.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/icons/index.d.ts +0 -7
- package/dist/components/GlobalNavMenu/icons/index.d.ts.map +0 -1
- package/dist/components/GlobalNavMenu/index.d.ts +0 -3
- package/dist/components/GlobalNavMenu/index.d.ts.map +0 -1
- package/dist/components/Logo/Logo.d.ts +0 -3
- package/dist/components/Logo/Logo.d.ts.map +0 -1
- package/dist/components/MultiOutlineText/MultiOutlineText.d.ts +0 -23
- package/dist/components/MultiOutlineText/MultiOutlineText.d.ts.map +0 -1
- package/dist/components/MultiOutlineText/index.d.ts +0 -3
- package/dist/components/MultiOutlineText/index.d.ts.map +0 -1
- package/dist/components/shadcn/alert-dialog.d.ts +0 -15
- package/dist/components/shadcn/alert-dialog.d.ts.map +0 -1
- package/dist/components/shadcn/aspect-ratio.d.ts +0 -4
- package/dist/components/shadcn/aspect-ratio.d.ts.map +0 -1
- package/dist/components/shadcn/button-group.d.ts +0 -12
- package/dist/components/shadcn/button-group.d.ts.map +0 -1
- package/dist/components/shadcn/checkbox.d.ts +0 -5
- package/dist/components/shadcn/checkbox.d.ts.map +0 -1
- package/dist/components/shadcn/crypto-amount-input.d.ts +0 -31
- package/dist/components/shadcn/crypto-amount-input.d.ts.map +0 -1
- package/dist/components/shadcn/empty.d.ts +0 -12
- package/dist/components/shadcn/empty.d.ts.map +0 -1
- package/dist/components/shadcn/field.d.ts +0 -25
- package/dist/components/shadcn/field.d.ts.map +0 -1
- package/dist/components/shadcn/form.d.ts +0 -25
- package/dist/components/shadcn/form.d.ts.map +0 -1
- package/dist/components/shadcn/hover-card.d.ts +0 -7
- package/dist/components/shadcn/hover-card.d.ts.map +0 -1
- package/dist/components/shadcn/input-group.d.ts +0 -17
- package/dist/components/shadcn/input-group.d.ts.map +0 -1
- package/dist/components/shadcn/item.d.ts +0 -24
- package/dist/components/shadcn/item.d.ts.map +0 -1
- package/dist/components/shadcn/list.d.ts +0 -45
- package/dist/components/shadcn/list.d.ts.map +0 -1
- package/dist/components/shadcn/menubar.d.ts +0 -27
- package/dist/components/shadcn/menubar.d.ts.map +0 -1
- package/dist/components/shadcn/navigation-menu.d.ts +0 -15
- package/dist/components/shadcn/navigation-menu.d.ts.map +0 -1
- package/dist/components/shadcn/radio-group.d.ts +0 -6
- package/dist/components/shadcn/radio-group.d.ts.map +0 -1
- package/dist/components/shadcn/scroll-area.d.ts +0 -6
- package/dist/components/shadcn/scroll-area.d.ts.map +0 -1
- package/dist/components/shadcn/separator.d.ts +0 -5
- package/dist/components/shadcn/separator.d.ts.map +0 -1
- package/dist/components/shadcn/sidebar.d.ts +0 -70
- package/dist/components/shadcn/sidebar.d.ts.map +0 -1
- package/dist/components/shadcn/switch.d.ts +0 -5
- package/dist/components/shadcn/switch.d.ts.map +0 -1
- package/dist/components/shadcn/textarea.d.ts +0 -4
- package/dist/components/shadcn/textarea.d.ts.map +0 -1
- package/dist/components/shadcn/toggle.d.ts +0 -10
- package/dist/components/shadcn/toggle.d.ts.map +0 -1
- package/dist/components/theme/theme-switcher.d.ts +0 -33
- package/dist/components/theme/theme-switcher.d.ts.map +0 -1
- package/dist/components/theme/use-theme.d.ts +0 -20
- package/dist/components/theme/use-theme.d.ts.map +0 -1
- package/dist/forms.cjs +0 -1
- package/dist/forms.d.ts +0 -2
- package/dist/forms.d.ts.map +0 -1
- package/dist/forms.js +0 -386
- package/dist/label-CPL77haD.js +0 -23
- package/dist/label-tKsAbVfX.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,33 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [1.2.0] - 2026-06-15
|
|
8
|
+
|
|
9
|
+
Rebrand release: aligns the design system with the cyan brand and ABC Oracle fonts already shipped across the consumer apps, and removes legacy components no app uses. Drop-in for all current consumers — none import a removed export (see migration note).
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **Colors** — Brand palette is now Movement cyan (`#15EDEB`) + neutrals, with proper names: the brand ramp is `--color-cyan-*` and the neutral ramp is `--color-neutrals-*`. The legacy `--primary` / `--ring` / chart / sidebar tokens point at cyan. Feedback colors (`success`/`warning`/`error`/`info`) set to a functional palette. `recipes.css` gradients and the `Button` `glow` variant recolored to cyan.
|
|
14
|
+
- **WalletModal** — Rebuilt to the finalized design: flat `#2d2d2d` card, hairline white border, `24px` radius, flat `#090909` wallet tiles, ABC Oracle type via `var(--font-display)`, no desktop close button. The brand-cyan accents (wallet-tile hover glow, INSTALL pill, "Don't have a wallet?" link) now use the brand token `var(--color-cyan-300)` directly, so the hover highlight is consistently cyan across all sites without per-app overrides. Public API unchanged.
|
|
15
|
+
- **Fonts** — Components reference `var(--font-display | --font-serif | --font-mono)` instead of hardcoded families.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **`/fonts` entry** — now ships ABC Oracle + RecifeText (`@font-face` + `.woff2`). Optional; Next.js apps that self-host via `next/font` can ignore it.
|
|
20
|
+
|
|
21
|
+
### Removed
|
|
22
|
+
|
|
23
|
+
- **Brand ramps** — `moveus-marigold`, `protocol-pink`, `oracle-orange` (cyan + neutrals only now).
|
|
24
|
+
- **Legacy brand-color token names** — `guild-green-*` and `byzantine-blue-*` removed; use `--color-cyan-*` and `--color-neutrals-*`. (The consumer apps define these names locally in their own `tokens.css`/`theme.css`, so this is non-breaking for them.)
|
|
25
|
+
- **Fonts** — TWK Everett / Neue Haas Unica Pro (replaced by ABC Oracle / RecifeText).
|
|
26
|
+
- **Components** (zero consumers): `AlertDialog`, `AspectRatio`, `ButtonGroup`, `Checkbox`, `CryptoAmountInput`, `Empty`, `Field`, `Form`, `HoverCard`, `InputGroup`, `Item`, `List`, `Menubar`, `NavigationMenu`, `RadioGroup`, `ScrollArea`, `Separator`, `Sidebar`, `Switch`, `Textarea`, `Toggle`, `Branding`, `DottedBackground`, `Logo`, `MultiOutlineText`, `ThemeSwitcher` / `ThemeToggle` / `useTheme`, `GlobalNavMenu` (+ `productBlockVariants`, `GlobalNavMenuProps`, `NavMenuItem`).
|
|
27
|
+
- **`/forms` entry point** (the `react-hook-form` form components).
|
|
28
|
+
- Internal `src/blocks/` app-specific composites (never exported).
|
|
29
|
+
|
|
30
|
+
### Migration
|
|
31
|
+
|
|
32
|
+
No consumer currently imports any removed export, so the bump is drop-in. Apps may delete their now-redundant local color/WalletModal/font override CSS, which the design system now provides natively.
|
|
33
|
+
|
|
7
34
|
## [1.1.6] - 2026-03-30
|
|
8
35
|
|
|
9
36
|
### Changed
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime");require("react");const c=require("@radix-ui/react-slot"),d=require("./index-5va-8CrW.cjs"),g=require("./utils-CikHldDD.cjs"),e=d.cva("cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-bold transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive uppercase tracking-wider rounded-full",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/90 active:bg-secondary/80",accent:"bg-accent text-accent-foreground hover:bg-accent/90 active:bg-accent/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 active:bg-destructive/80",success:"bg-success text-success-foreground hover:bg-success/90 active:bg-success/80",warning:"bg-warning text-warning-foreground hover:bg-warning/90 active:bg-warning/80",outline:"border-2 border-primary bg-transparent text-primary hover:bg-primary hover:text-primary-foreground active:bg-primary/90 active:text-primary-foreground",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline",glow:"w-full max-w-[522px] p-3 bg-[#
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime");require("react");const c=require("@radix-ui/react-slot"),d=require("./index-5va-8CrW.cjs"),g=require("./utils-CikHldDD.cjs"),e=d.cva("cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-bold transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive uppercase tracking-wider rounded-full",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/90 active:bg-secondary/80",accent:"bg-accent text-accent-foreground hover:bg-accent/90 active:bg-accent/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 active:bg-destructive/80",success:"bg-success text-success-foreground hover:bg-success/90 active:bg-success/80",warning:"bg-warning text-warning-foreground hover:bg-warning/90 active:bg-warning/80",outline:"border-2 border-primary bg-transparent text-primary hover:bg-primary hover:text-primary-foreground active:bg-primary/90 active:text-primary-foreground",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline",glow:"w-full max-w-[522px] p-3 bg-[#15EDEB] border-0 font-mono text-[#1d1d1d] rounded-lg text-2xl font-bold leading-6 tracking-[-0.06rem] uppercase relative overflow-hidden backdrop-blur-[21px] shadow-[8px_8px_0_0_rgba(0,0,0,0.55)] hover:-translate-y-px hover:bg-white hover:shadow-[-8px_-8px_0_0_rgba(0,0,0,0.55)] active:translate-y-0 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 ease-in-out"},size:{xs:"h-6 px-3 text-xs gap-1.5",sm:"h-8 px-4 text-sm gap-2",default:"h-10 px-6 text-base gap-2",lg:"h-12 px-8 text-lg gap-2.5",xl:"h-14 px-10 text-xl gap-2.5","2xl":"h-16 px-12 text-2xl gap-3",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function u({className:t,variant:r,size:a,asChild:n=!1,...i}){const o=n?c.Slot:"button";return s.jsx(o,{"data-slot":"button",className:g.cn(e({variant:r,size:a,className:t})),...i})}exports.Button=u;exports.buttonVariants=e;
|
|
@@ -3,7 +3,7 @@ import "react";
|
|
|
3
3
|
import { Slot as n } from "@radix-ui/react-slot";
|
|
4
4
|
import { c as s } from "./index-uPOYJZpG.js";
|
|
5
5
|
import { c } from "./utils-eGXXUFl7.js";
|
|
6
|
-
const
|
|
6
|
+
const d = s(
|
|
7
7
|
"cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-bold transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive uppercase tracking-wider rounded-full",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
@@ -17,7 +17,7 @@ const g = s(
|
|
|
17
17
|
outline: "border-2 border-primary bg-transparent text-primary hover:bg-primary hover:text-primary-foreground active:bg-primary/90 active:text-primary-foreground",
|
|
18
18
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
19
19
|
link: "text-primary underline-offset-4 hover:underline",
|
|
20
|
-
glow: "w-full max-w-[522px] p-3 bg-[#
|
|
20
|
+
glow: "w-full max-w-[522px] p-3 bg-[#15EDEB] border-0 font-mono text-[#1d1d1d] rounded-lg text-2xl font-bold leading-6 tracking-[-0.06rem] uppercase relative overflow-hidden backdrop-blur-[21px] shadow-[8px_8px_0_0_rgba(0,0,0,0.55)] hover:-translate-y-px hover:bg-white hover:shadow-[-8px_-8px_0_0_rgba(0,0,0,0.55)] active:translate-y-0 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 ease-in-out"
|
|
21
21
|
},
|
|
22
22
|
size: {
|
|
23
23
|
xs: "h-6 px-3 text-xs gap-1.5",
|
|
@@ -48,12 +48,12 @@ function x({
|
|
|
48
48
|
a ? n : "button",
|
|
49
49
|
{
|
|
50
50
|
"data-slot": "button",
|
|
51
|
-
className: c(
|
|
51
|
+
className: c(d({ variant: r, size: t, className: e })),
|
|
52
52
|
...i
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
export {
|
|
57
57
|
x as B,
|
|
58
|
-
|
|
58
|
+
d as b
|
|
59
59
|
};
|
package/dist/carousel.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react/jsx-runtime"),Y=require("react"),_t=require("lucide-react"),ht=require("./utils-CikHldDD.cjs"),Qt=require("./button-Dmwbc4J_.cjs");function ln(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,s.get?s:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const K=ln(Y);function fn(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ht(t){return fn(t)||Array.isArray(t)}function dn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Pt(t,n){const e=Object.keys(t),s=Object.keys(n);if(e.length!==s.length)return!1;const c=JSON.stringify(Object.keys(t.breakpoints||{})),i=JSON.stringify(Object.keys(n.breakpoints||{}));return c!==i?!1:e.every(o=>{const a=t[o],r=n[o];return typeof a=="function"?`${a}`==`${r}`:!Ht(a)||!Ht(r)?a===r:Pt(a,r)})}function $t(t){return t.concat().sort((n,e)=>n.name>e.name?1:-1).map(n=>n.options)}function pn(t,n){if(t.length!==n.length)return!1;const e=$t(t),s=$t(n);return e.every((c,i)=>{const o=s[i];return Pt(c,o)})}function Dt(t){return typeof t=="number"}function Ot(t){return typeof t=="string"}function xt(t){return typeof t=="boolean"}function Kt(t){return Object.prototype.toString.call(t)==="[object Object]"}function D(t){return Math.abs(t)}function At(t){return Math.sign(t)}function dt(t,n){return D(t-n)}function mn(t,n){if(t===0||n===0||D(t)<=D(n))return 0;const e=dt(D(t),D(n));return D(e/t)}function gn(t){return Math.round(t*100)/100}function pt(t){return mt(t).map(Number)}function V(t){return t[St(t)]}function St(t){return Math.max(0,t.length-1)}function Mt(t,n){return n===St(t)}function Ut(t,n=0){return Array.from(Array(t),(e,s)=>n+s)}function mt(t){return Object.keys(t)}function Jt(t,n){return[t,n].reduce((e,s)=>(mt(s).forEach(c=>{const i=e[c],o=s[c],a=Kt(i)&&Kt(o);e[c]=a?Jt(i,o):o}),e),{})}function wt(t,n){return typeof n.MouseEvent<"u"&&t instanceof n.MouseEvent}function hn(t,n){const e={start:s,center:c,end:i};function s(){return 0}function c(r){return i(r)/2}function i(r){return n-r}function o(r,u){return Ot(t)?e[t](r):t(n,r,u)}return{measure:o}}function gt(){let t=[];function n(c,i,o,a={passive:!0}){let r;if("addEventListener"in c)c.addEventListener(i,o,a),r=()=>c.removeEventListener(i,o,a);else{const u=c;u.addListener(o),r=()=>u.removeListener(o)}return t.push(r),s}function e(){t=t.filter(c=>c())}const s={add:n,clear:e};return s}function Sn(t,n,e,s){const c=gt(),i=1e3/60;let o=null,a=0,r=0;function u(){c.add(t,"visibilitychange",()=>{t.hidden&&f()})}function h(){b(),c.clear()}function d(g){if(!r)return;o||(o=g,e(),e());const l=g-o;for(o=g,a+=l;a>=i;)e(),a-=i;const S=a/i;s(S),r&&(r=n.requestAnimationFrame(d))}function p(){r||(r=n.requestAnimationFrame(d))}function b(){n.cancelAnimationFrame(r),o=null,a=0,r=0}function f(){o=null,a=0}return{init:u,destroy:h,start:p,stop:b,update:e,render:s}}function bn(t,n){const e=n==="rtl",s=t==="y",c=s?"y":"x",i=s?"x":"y",o=!s&&e?-1:1,a=h(),r=d();function u(f){const{height:m,width:g}=f;return s?m:g}function h(){return s?"top":e?"right":"left"}function d(){return s?"bottom":e?"left":"right"}function p(f){return f*o}return{scroll:c,cross:i,startEdge:a,endEdge:r,measureSize:u,direction:p}}function ot(t=0,n=0){const e=D(t-n);function s(u){return u<t}function c(u){return u>n}function i(u){return s(u)||c(u)}function o(u){return i(u)?s(u)?t:n:u}function a(u){return e?u-e*Math.ceil((u-n)/e):u}return{length:e,max:n,min:t,constrain:o,reachedAny:i,reachedMax:c,reachedMin:s,removeOffset:a}}function Xt(t,n,e){const{constrain:s}=ot(0,t),c=t+1;let i=o(n);function o(p){return e?D((c+p)%c):s(p)}function a(){return i}function r(p){return i=o(p),d}function u(p){return h().set(a()+p)}function h(){return Xt(t,a(),e)}const d={get:a,set:r,add:u,clone:h};return d}function yn(t,n,e,s,c,i,o,a,r,u,h,d,p,b,f,m,g,l,S){const{cross:x,direction:L}=t,w=["INPUT","SELECT","TEXTAREA"],C={passive:!1},v=gt(),E=gt(),I=ot(50,225).constrain(b.measure(20)),A={mouse:300,touch:400},T={mouse:500,touch:600},k=f?43:25;let R=!1,q=0,G=0,tt=!1,Z=!1,U=!1,_=!1;function ct(y){if(!S)return;function O(j){(xt(S)||S(y,j))&&at(j)}const M=n;v.add(M,"dragstart",j=>j.preventDefault(),C).add(M,"touchmove",()=>{},C).add(M,"touchend",()=>{}).add(M,"touchstart",O).add(M,"mousedown",O).add(M,"touchcancel",N).add(M,"contextmenu",N).add(M,"click",J,!0)}function H(){v.clear(),E.clear()}function rt(){const y=_?e:n;E.add(y,"touchmove",F,C).add(y,"touchend",N).add(y,"mousemove",F,C).add(y,"mouseup",N)}function st(y){const O=y.nodeName||"";return w.includes(O)}function Q(){return(f?T:A)[_?"mouse":"touch"]}function ut(y,O){const M=d.add(At(y)*-1),j=h.byDistance(y,!f).distance;return f||D(y)<I?j:g&&O?j*.5:h.byIndex(M.get(),0).distance}function at(y){const O=wt(y,s);_=O,U=f&&O&&!y.buttons&&R,R=dt(c.get(),o.get())>=2,!(O&&y.button!==0)&&(st(y.target)||(tt=!0,i.pointerDown(y),u.useFriction(0).useDuration(0),c.set(o),rt(),q=i.readPoint(y),G=i.readPoint(y,x),p.emit("pointerDown")))}function F(y){if(!wt(y,s)&&y.touches.length>=2)return N(y);const M=i.readPoint(y),j=i.readPoint(y,x),$=dt(M,q),X=dt(j,G);if(!Z&&!_&&(!y.cancelable||(Z=$>X,!Z)))return N(y);const nt=i.pointerMove(y);$>m&&(U=!0),u.useFriction(.3).useDuration(.75),a.start(),c.add(L(nt)),y.preventDefault()}function N(y){const M=h.byDistance(0,!1).index!==d.get(),j=i.pointerUp(y)*Q(),$=ut(L(j),M),X=mn(j,$),nt=k-10*X,W=l+X/50;Z=!1,tt=!1,E.clear(),u.useDuration(nt).useFriction(W),r.distance($,!f),_=!1,p.emit("pointerUp")}function J(y){U&&(y.stopPropagation(),y.preventDefault(),U=!1)}function z(){return tt}return{init:ct,destroy:H,pointerDown:z}}function xn(t,n){let s,c;function i(d){return d.timeStamp}function o(d,p){const f=`client${(p||t.scroll)==="x"?"X":"Y"}`;return(wt(d,n)?d:d.touches[0])[f]}function a(d){return s=d,c=d,o(d)}function r(d){const p=o(d)-o(c),b=i(d)-i(s)>170;return c=d,b&&(s=d),p}function u(d){if(!s||!c)return 0;const p=o(c)-o(s),b=i(d)-i(s),f=i(d)-i(c)>170,m=p/b;return b&&!f&&D(m)>.1?m:0}return{pointerDown:a,pointerMove:r,pointerUp:u,readPoint:o}}function vn(){function t(e){const{offsetTop:s,offsetLeft:c,offsetWidth:i,offsetHeight:o}=e;return{top:s,right:c+i,bottom:s+o,left:c,width:i,height:o}}return{measure:t}}function En(t){function n(s){return t*(s/100)}return{measure:n}}function Ln(t,n,e,s,c,i,o){const a=[t].concat(s);let r,u,h=[],d=!1;function p(g){return c.measureSize(o.measure(g))}function b(g){if(!i)return;u=p(t),h=s.map(p);function l(S){for(const x of S){if(d)return;const L=x.target===t,w=s.indexOf(x.target),C=L?u:h[w],v=p(L?t:s[w]);if(D(v-C)>=.5){g.reInit(),n.emit("resize");break}}}r=new ResizeObserver(S=>{(xt(i)||i(g,S))&&l(S)}),e.requestAnimationFrame(()=>{a.forEach(S=>r.observe(S))})}function f(){d=!0,r&&r.disconnect()}return{init:b,destroy:f}}function Cn(t,n,e,s,c,i){let o=0,a=0,r=c,u=i,h=t.get(),d=0;function p(){const C=s.get()-t.get(),v=!r;let E=0;return v?(o=0,e.set(s),t.set(s),E=C):(e.set(t),o+=C/r,o*=u,h+=o,t.add(o),E=h-d),a=At(E),d=h,w}function b(){const C=s.get()-n.get();return D(C)<.001}function f(){return r}function m(){return a}function g(){return o}function l(){return x(c)}function S(){return L(i)}function x(C){return r=C,w}function L(C){return u=C,w}const w={direction:m,duration:f,velocity:g,seek:p,settled:b,useBaseFriction:S,useBaseDuration:l,useFriction:L,useDuration:x};return w}function In(t,n,e,s,c){const i=c.measure(10),o=c.measure(50),a=ot(.1,.99);let r=!1;function u(){return!(r||!t.reachedAny(e.get())||!t.reachedAny(n.get()))}function h(b){if(!u())return;const f=t.reachedMin(n.get())?"min":"max",m=D(t[f]-n.get()),g=e.get()-n.get(),l=a.constrain(m/o);e.subtract(g*l),!b&&D(g)<i&&(e.set(t.constrain(e.get())),s.useDuration(25).useBaseFriction())}function d(b){r=!b}return{shouldConstrain:u,constrain:h,toggleActive:d}}function Tn(t,n,e,s,c){const i=ot(-n+t,0),o=d(),a=h(),r=p();function u(f,m){return dt(f,m)<=1}function h(){const f=o[0],m=V(o),g=o.lastIndexOf(f),l=o.indexOf(m)+1;return ot(g,l)}function d(){return e.map((f,m)=>{const{min:g,max:l}=i,S=i.constrain(f),x=!m,L=Mt(e,m);return x?l:L||u(g,S)?g:u(l,S)?l:S}).map(f=>parseFloat(f.toFixed(3)))}function p(){if(n<=t+c)return[i.max];if(s==="keepSnaps")return o;const{min:f,max:m}=a;return o.slice(f,m)}return{snapsContained:r,scrollContainLimit:a}}function On(t,n,e){const s=n[0],c=e?s-t:V(n);return{limit:ot(c,s)}}function wn(t,n,e,s){const i=n.min+.1,o=n.max+.1,{reachedMin:a,reachedMax:r}=ot(i,o);function u(p){return p===1?r(e.get()):p===-1?a(e.get()):!1}function h(p){if(!u(p))return;const b=t*(p*-1);s.forEach(f=>f.add(b))}return{loop:h}}function Pn(t){const{max:n,length:e}=t;function s(i){const o=i-n;return e?o/-e:0}return{get:s}}function Dn(t,n,e,s,c){const{startEdge:i,endEdge:o}=t,{groupSlides:a}=c,r=d().map(n.measure),u=p(),h=b();function d(){return a(s).map(m=>V(m)[o]-m[0][i]).map(D)}function p(){return s.map(m=>e[i]-m[i]).map(m=>-D(m))}function b(){return a(u).map(m=>m[0]).map((m,g)=>m+r[g])}return{snaps:u,snapsAligned:h}}function An(t,n,e,s,c,i){const{groupSlides:o}=c,{min:a,max:r}=s,u=h();function h(){const p=o(i),b=!t||n==="keepSnaps";return e.length===1?[i]:b?p:p.slice(a,r).map((f,m,g)=>{const l=!m,S=Mt(g,m);if(l){const x=V(g[0])+1;return Ut(x)}if(S){const x=St(i)-V(g)[0]+1;return Ut(x,V(g)[0])}return f})}return{slideRegistry:u}}function Mn(t,n,e,s,c){const{reachedAny:i,removeOffset:o,constrain:a}=s;function r(f){return f.concat().sort((m,g)=>D(m)-D(g))[0]}function u(f){const m=t?o(f):a(f),g=n.map((S,x)=>({diff:h(S-m,0),index:x})).sort((S,x)=>D(S.diff)-D(x.diff)),{index:l}=g[0];return{index:l,distance:m}}function h(f,m){const g=[f,f+e,f-e];if(!t)return f;if(!m)return r(g);const l=g.filter(S=>At(S)===m);return l.length?r(l):V(g)-e}function d(f,m){const g=n[f]-c.get(),l=h(g,m);return{index:f,distance:l}}function p(f,m){const g=c.get()+f,{index:l,distance:S}=u(g),x=!t&&i(g);if(!m||x)return{index:l,distance:f};const L=n[l]-S,w=f+h(L,0);return{index:l,distance:w}}return{byDistance:p,byIndex:d,shortcut:h}}function Nn(t,n,e,s,c,i,o){function a(d){const p=d.distance,b=d.index!==n.get();i.add(p),p&&(s.duration()?t.start():(t.update(),t.render(1),t.update())),b&&(e.set(n.get()),n.set(d.index),o.emit("select"))}function r(d,p){const b=c.byDistance(d,p);a(b)}function u(d,p){const b=n.clone().set(d),f=c.byIndex(b.get(),p);a(f)}return{distance:r,index:u}}function jn(t,n,e,s,c,i,o,a){const r={passive:!0,capture:!0};let u=0;function h(b){if(!a)return;function f(m){if(new Date().getTime()-u>10)return;o.emit("slideFocusStart"),t.scrollLeft=0;const S=e.findIndex(x=>x.includes(m));Dt(S)&&(c.useDuration(0),s.index(S,0),o.emit("slideFocus"))}i.add(document,"keydown",d,!1),n.forEach((m,g)=>{i.add(m,"focus",l=>{(xt(a)||a(b,l))&&f(g)},r)})}function d(b){b.code==="Tab"&&(u=new Date().getTime())}return{init:h}}function ft(t){let n=t;function e(){return n}function s(r){n=o(r)}function c(r){n+=o(r)}function i(r){n-=o(r)}function o(r){return Dt(r)?r:r.get()}return{get:e,set:s,add:c,subtract:i}}function Yt(t,n){const e=t.scroll==="x"?o:a,s=n.style;let c=null,i=!1;function o(p){return`translate3d(${p}px,0px,0px)`}function a(p){return`translate3d(0px,${p}px,0px)`}function r(p){if(i)return;const b=gn(t.direction(p));b!==c&&(s.transform=e(b),c=b)}function u(p){i=!p}function h(){i||(s.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:h,to:r,toggleActive:u}}function kn(t,n,e,s,c,i,o,a,r){const h=pt(c),d=pt(c).reverse(),p=l().concat(S());function b(v,E){return v.reduce((I,A)=>I-c[A],E)}function f(v,E){return v.reduce((I,A)=>b(I,E)>0?I.concat([A]):I,[])}function m(v){return i.map((E,I)=>({start:E-s[I]+.5+v,end:E+n-.5+v}))}function g(v,E,I){const A=m(E);return v.map(T=>{const k=I?0:-e,R=I?e:0,q=I?"end":"start",G=A[T][q];return{index:T,loopPoint:G,slideLocation:ft(-1),translate:Yt(t,r[T]),target:()=>a.get()>G?k:R}})}function l(){const v=o[0],E=f(d,v);return g(E,e,!1)}function S(){const v=n-o[0]-1,E=f(h,v);return g(E,-e,!0)}function x(){return p.every(({index:v})=>{const E=h.filter(I=>I!==v);return b(E,n)<=.1})}function L(){p.forEach(v=>{const{target:E,translate:I,slideLocation:A}=v,T=E();T!==A.get()&&(I.to(T),A.set(T))})}function w(){p.forEach(v=>v.translate.clear())}return{canLoop:x,clear:w,loop:L,loopPoints:p}}function Fn(t,n,e){let s,c=!1;function i(r){if(!e)return;function u(h){for(const d of h)if(d.type==="childList"){r.reInit(),n.emit("slidesChanged");break}}s=new MutationObserver(h=>{c||(xt(e)||e(r,h))&&u(h)}),s.observe(t,{childList:!0})}function o(){s&&s.disconnect(),c=!0}return{init:i,destroy:o}}function zn(t,n,e,s){const c={};let i=null,o=null,a,r=!1;function u(){a=new IntersectionObserver(f=>{r||(f.forEach(m=>{const g=n.indexOf(m.target);c[g]=m}),i=null,o=null,e.emit("slidesInView"))},{root:t.parentElement,threshold:s}),n.forEach(f=>a.observe(f))}function h(){a&&a.disconnect(),r=!0}function d(f){return mt(c).reduce((m,g)=>{const l=parseInt(g),{isIntersecting:S}=c[l];return(f&&S||!f&&!S)&&m.push(l),m},[])}function p(f=!0){if(f&&i)return i;if(!f&&o)return o;const m=d(f);return f&&(i=m),f||(o=m),m}return{init:u,destroy:h,get:p}}function Bn(t,n,e,s,c,i){const{measureSize:o,startEdge:a,endEdge:r}=t,u=e[0]&&c,h=f(),d=m(),p=e.map(o),b=g();function f(){if(!u)return 0;const S=e[0];return D(n[a]-S[a])}function m(){if(!u)return 0;const S=i.getComputedStyle(V(s));return parseFloat(S.getPropertyValue(`margin-${r}`))}function g(){return e.map((S,x,L)=>{const w=!x,C=Mt(L,x);return w?p[x]+h:C?p[x]+d:L[x+1][a]-S[a]}).map(D)}return{slideSizes:p,slideSizesWithGaps:b,startGap:h,endGap:d}}function Vn(t,n,e,s,c,i,o,a,r){const{startEdge:u,endEdge:h,direction:d}=t,p=Dt(e);function b(l,S){return pt(l).filter(x=>x%S===0).map(x=>l.slice(x,x+S))}function f(l){return l.length?pt(l).reduce((S,x,L)=>{const w=V(S)||0,C=w===0,v=x===St(l),E=c[u]-i[w][u],I=c[u]-i[x][h],A=!s&&C?d(o):0,T=!s&&v?d(a):0,k=D(I-T-(E+A));return L&&k>n+r&&S.push(x),v&&S.push(l.length),S},[]).map((S,x,L)=>{const w=Math.max(L[x-1]||0);return l.slice(w,S)}):[]}function m(l){return p?b(l,e):f(l)}return{groupSlides:m}}function Rn(t,n,e,s,c,i,o){const{align:a,axis:r,direction:u,startIndex:h,loop:d,duration:p,dragFree:b,dragThreshold:f,inViewThreshold:m,slidesToScroll:g,skipSnaps:l,containScroll:S,watchResize:x,watchSlides:L,watchDrag:w,watchFocus:C}=i,v=2,E=vn(),I=E.measure(n),A=e.map(E.measure),T=bn(r,u),k=T.measureSize(I),R=En(k),q=hn(a,k),G=!d&&!!S,tt=d||!!S,{slideSizes:Z,slideSizesWithGaps:U,startGap:_,endGap:ct}=Bn(T,I,A,e,tt,c),H=Vn(T,k,g,d,I,A,_,ct,v),{snaps:rt,snapsAligned:st}=Dn(T,q,I,A,H),Q=-V(rt)+V(U),{snapsContained:ut,scrollContainLimit:at}=Tn(k,Q,st,S,v),F=G?ut:st,{limit:N}=On(Q,F,d),J=Xt(St(F),h,d),z=J.clone(),P=pt(e),y=({dragHandler:it,scrollBody:It,scrollBounds:Tt,options:{loop:bt}})=>{bt||Tt.constrain(it.pointerDown()),It.seek()},O=({scrollBody:it,translate:It,location:Tt,offsetLocation:bt,previousLocation:nn,scrollLooper:en,slideLooper:on,dragHandler:rn,animation:sn,eventHandler:zt,scrollBounds:cn,options:{loop:Bt}},Vt)=>{const Rt=it.settled(),un=!cn.shouldConstrain(),qt=Bt?Rt:Rt&&un,Gt=qt&&!rn.pointerDown();Gt&&sn.stop();const an=Tt.get()*Vt+nn.get()*(1-Vt);bt.set(an),Bt&&(en.loop(it.direction()),on.loop()),It.to(bt.get()),Gt&&zt.emit("settle"),qt||zt.emit("scroll")},M=Sn(s,c,()=>y(Ct),it=>O(Ct,it)),j=.68,$=F[J.get()],X=ft($),nt=ft($),W=ft($),et=ft($),lt=Cn(X,W,nt,et,p,j),Et=Mn(d,F,Q,N,et),Lt=Nn(M,J,z,lt,Et,et,o),jt=Pn(N),kt=gt(),Wt=zn(n,e,o,m),{slideRegistry:Ft}=An(G,S,F,at,H,P),tn=jn(t,e,Ft,Lt,lt,kt,o,C),Ct={ownerDocument:s,ownerWindow:c,eventHandler:o,containerRect:I,slideRects:A,animation:M,axis:T,dragHandler:yn(T,t,s,c,et,xn(T,c),X,M,Lt,lt,Et,J,o,R,b,f,l,j,w),eventStore:kt,percentOfView:R,index:J,indexPrevious:z,limit:N,location:X,offsetLocation:W,previousLocation:nt,options:i,resizeHandler:Ln(n,o,c,e,T,x,E),scrollBody:lt,scrollBounds:In(N,W,et,lt,R),scrollLooper:wn(Q,N,W,[X,W,nt,et]),scrollProgress:jt,scrollSnapList:F.map(jt.get),scrollSnaps:F,scrollTarget:Et,scrollTo:Lt,slideLooper:kn(T,k,Q,Z,U,rt,F,W,e),slideFocus:tn,slidesHandler:Fn(n,o,L),slidesInView:Wt,slideIndexes:P,slideRegistry:Ft,slidesToScroll:H,target:et,translate:Yt(T,n)};return Ct}function qn(){let t={},n;function e(u){n=u}function s(u){return t[u]||[]}function c(u){return s(u).forEach(h=>h(n,u)),r}function i(u,h){return t[u]=s(u).concat([h]),r}function o(u,h){return t[u]=s(u).filter(d=>d!==h),r}function a(){t={}}const r={init:e,emit:c,off:o,on:i,clear:a};return r}const Gn={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Hn(t){function n(i,o){return Jt(i,o||{})}function e(i){const o=i.breakpoints||{},a=mt(o).filter(r=>t.matchMedia(r).matches).map(r=>o[r]).reduce((r,u)=>n(r,u),{});return n(i,a)}function s(i){return i.map(o=>mt(o.breakpoints||{})).reduce((o,a)=>o.concat(a),[]).map(t.matchMedia)}return{mergeOptions:n,optionsAtMedia:e,optionsMediaQueries:s}}function $n(t){let n=[];function e(i,o){return n=o.filter(({options:a})=>t.optionsAtMedia(a).active!==!1),n.forEach(a=>a.init(i,t)),o.reduce((a,r)=>Object.assign(a,{[r.name]:r}),{})}function s(){n=n.filter(i=>i.destroy())}return{init:e,destroy:s}}function yt(t,n,e){const s=t.ownerDocument,c=s.defaultView,i=Hn(c),o=$n(i),a=gt(),r=qn(),{mergeOptions:u,optionsAtMedia:h,optionsMediaQueries:d}=i,{on:p,off:b,emit:f}=r,m=T;let g=!1,l,S=u(Gn,yt.globalOptions),x=u(S),L=[],w,C,v;function E(){const{container:P,slides:y}=x;C=(Ot(P)?t.querySelector(P):P)||t.children[0];const M=Ot(y)?C.querySelectorAll(y):y;v=[].slice.call(M||C.children)}function I(P){const y=Rn(t,C,v,s,c,P,r);if(P.loop&&!y.slideLooper.canLoop()){const O=Object.assign({},P,{loop:!1});return I(O)}return y}function A(P,y){g||(S=u(S,P),x=h(S),L=y||L,E(),l=I(x),d([S,...L.map(({options:O})=>O)]).forEach(O=>a.add(O,"change",T)),x.active&&(l.translate.to(l.location.get()),l.animation.init(),l.slidesInView.init(),l.slideFocus.init(z),l.eventHandler.init(z),l.resizeHandler.init(z),l.slidesHandler.init(z),l.options.loop&&l.slideLooper.loop(),C.offsetParent&&v.length&&l.dragHandler.init(z),w=o.init(z,L)))}function T(P,y){const O=H();k(),A(u({startIndex:O},P),y),r.emit("reInit")}function k(){l.dragHandler.destroy(),l.eventStore.clear(),l.translate.clear(),l.slideLooper.clear(),l.resizeHandler.destroy(),l.slidesHandler.destroy(),l.slidesInView.destroy(),l.animation.destroy(),o.destroy(),a.clear()}function R(){g||(g=!0,a.clear(),k(),r.emit("destroy"),r.clear())}function q(P,y,O){!x.active||g||(l.scrollBody.useBaseFriction().useDuration(y===!0?0:x.duration),l.scrollTo.index(P,O||0))}function G(P){const y=l.index.add(1).get();q(y,P,-1)}function tt(P){const y=l.index.add(-1).get();q(y,P,1)}function Z(){return l.index.add(1).get()!==H()}function U(){return l.index.add(-1).get()!==H()}function _(){return l.scrollSnapList}function ct(){return l.scrollProgress.get(l.offsetLocation.get())}function H(){return l.index.get()}function rt(){return l.indexPrevious.get()}function st(){return l.slidesInView.get()}function Q(){return l.slidesInView.get(!1)}function ut(){return w}function at(){return l}function F(){return t}function N(){return C}function J(){return v}const z={canScrollNext:Z,canScrollPrev:U,containerNode:N,internalEngine:at,destroy:R,off:b,on:p,emit:f,plugins:ut,previousScrollSnap:rt,reInit:m,rootNode:F,scrollNext:G,scrollPrev:tt,scrollProgress:ct,scrollSnapList:_,scrollTo:q,selectedScrollSnap:H,slideNodes:J,slidesInView:st,slidesNotInView:Q};return A(n,e),setTimeout(()=>r.emit("init"),0),z}yt.globalOptions=void 0;function Nt(t={},n=[]){const e=Y.useRef(t),s=Y.useRef(n),[c,i]=Y.useState(),[o,a]=Y.useState(),r=Y.useCallback(()=>{c&&c.reInit(e.current,s.current)},[c]);return Y.useEffect(()=>{Pt(e.current,t)||(e.current=t,r())},[t,r]),Y.useEffect(()=>{pn(s.current,n)||(s.current=n,r())},[n,r]),Y.useEffect(()=>{if(dn()&&o){yt.globalOptions=Nt.globalOptions;const u=yt(o,e.current,s.current);return i(u),()=>u.destroy()}else i(void 0)},[o,i]),[a,c]}Nt.globalOptions=void 0;const Zt=K.createContext(null);function vt(){const t=K.useContext(Zt);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}function Kn({orientation:t="horizontal",opts:n,setApi:e,plugins:s,className:c,children:i,...o}){const[a,r]=Nt({...n,axis:t==="horizontal"?"x":"y"},s),[u,h]=K.useState(!1),[d,p]=K.useState(!1),b=K.useCallback(l=>{l&&(h(l.canScrollPrev()),p(l.canScrollNext()))},[]),f=K.useCallback(()=>{r?.scrollPrev()},[r]),m=K.useCallback(()=>{r?.scrollNext()},[r]),g=K.useCallback(l=>{l.key==="ArrowLeft"?(l.preventDefault(),f()):l.key==="ArrowRight"&&(l.preventDefault(),m())},[f,m]);return K.useEffect(()=>{!r||!e||e(r)},[r,e]),K.useEffect(()=>{if(r)return b(r),r.on("reInit",b),r.on("select",b),()=>{r?.off("select",b)}},[r,b]),B.jsx(Zt.Provider,{value:{carouselRef:a,api:r,opts:n,orientation:t||(n?.axis==="y"?"vertical":"horizontal"),scrollPrev:f,scrollNext:m,canScrollPrev:u,canScrollNext:d},children:B.jsx("div",{onKeyDownCapture:g,className:ht.cn("relative",c),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...o,children:i})})}function Un({className:t,...n}){const{carouselRef:e,orientation:s}=vt();return B.jsx("div",{ref:e,className:"overflow-hidden","data-slot":"carousel-content",children:B.jsx("div",{className:ht.cn("flex",s==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...n})})}function _n({className:t,...n}){const{orientation:e}=vt();return B.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:ht.cn("min-w-0 shrink-0 grow-0 basis-full",e==="horizontal"?"pl-4":"pt-4",t),...n})}function Qn({className:t,variant:n="outline",size:e="icon",...s}){const{orientation:c,scrollPrev:i,canScrollPrev:o}=vt();return B.jsxs(Qt.Button,{"data-slot":"carousel-previous",variant:n,size:e,className:ht.cn("absolute size-8 rounded-full",c==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!o,onClick:i,...s,children:[B.jsx(_t.ArrowLeft,{}),B.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function Jn({className:t,variant:n="outline",size:e="icon",...s}){const{orientation:c,scrollNext:i,canScrollNext:o}=vt();return B.jsxs(Qt.Button,{"data-slot":"carousel-next",variant:n,size:e,className:ht.cn("absolute size-8 rounded-full",c==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!o,onClick:i,...s,children:[B.jsx(_t.ArrowRight,{}),B.jsx("span",{className:"sr-only",children:"Next slide"})]})}exports.Carousel=Kn;exports.CarouselContent=Un;exports.CarouselItem=_n;exports.CarouselNext=Jn;exports.CarouselPrevious=Qn;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react/jsx-runtime"),Y=require("react"),Ut=require("lucide-react"),ht=require("./utils-CikHldDD.cjs"),Qt=require("./button-DZAlWvkC.cjs");function ln(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,s.get?s:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const $=ln(Y);function fn(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ht(t){return fn(t)||Array.isArray(t)}function dn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Pt(t,n){const e=Object.keys(t),s=Object.keys(n);if(e.length!==s.length)return!1;const c=JSON.stringify(Object.keys(t.breakpoints||{})),i=JSON.stringify(Object.keys(n.breakpoints||{}));return c!==i?!1:e.every(o=>{const a=t[o],r=n[o];return typeof a=="function"?`${a}`==`${r}`:!Ht(a)||!Ht(r)?a===r:Pt(a,r)})}function _t(t){return t.concat().sort((n,e)=>n.name>e.name?1:-1).map(n=>n.options)}function pn(t,n){if(t.length!==n.length)return!1;const e=_t(t),s=_t(n);return e.every((c,i)=>{const o=s[i];return Pt(c,o)})}function Dt(t){return typeof t=="number"}function Ot(t){return typeof t=="string"}function xt(t){return typeof t=="boolean"}function $t(t){return Object.prototype.toString.call(t)==="[object Object]"}function D(t){return Math.abs(t)}function At(t){return Math.sign(t)}function dt(t,n){return D(t-n)}function mn(t,n){if(t===0||n===0||D(t)<=D(n))return 0;const e=dt(D(t),D(n));return D(e/t)}function gn(t){return Math.round(t*100)/100}function pt(t){return mt(t).map(Number)}function V(t){return t[St(t)]}function St(t){return Math.max(0,t.length-1)}function Mt(t,n){return n===St(t)}function Kt(t,n=0){return Array.from(Array(t),(e,s)=>n+s)}function mt(t){return Object.keys(t)}function Jt(t,n){return[t,n].reduce((e,s)=>(mt(s).forEach(c=>{const i=e[c],o=s[c],a=$t(i)&&$t(o);e[c]=a?Jt(i,o):o}),e),{})}function wt(t,n){return typeof n.MouseEvent<"u"&&t instanceof n.MouseEvent}function hn(t,n){const e={start:s,center:c,end:i};function s(){return 0}function c(r){return i(r)/2}function i(r){return n-r}function o(r,u){return Ot(t)?e[t](r):t(n,r,u)}return{measure:o}}function gt(){let t=[];function n(c,i,o,a={passive:!0}){let r;if("addEventListener"in c)c.addEventListener(i,o,a),r=()=>c.removeEventListener(i,o,a);else{const u=c;u.addListener(o),r=()=>u.removeListener(o)}return t.push(r),s}function e(){t=t.filter(c=>c())}const s={add:n,clear:e};return s}function Sn(t,n,e,s){const c=gt(),i=1e3/60;let o=null,a=0,r=0;function u(){c.add(t,"visibilitychange",()=>{t.hidden&&f()})}function h(){b(),c.clear()}function d(g){if(!r)return;o||(o=g,e(),e());const l=g-o;for(o=g,a+=l;a>=i;)e(),a-=i;const S=a/i;s(S),r&&(r=n.requestAnimationFrame(d))}function p(){r||(r=n.requestAnimationFrame(d))}function b(){n.cancelAnimationFrame(r),o=null,a=0,r=0}function f(){o=null,a=0}return{init:u,destroy:h,start:p,stop:b,update:e,render:s}}function bn(t,n){const e=n==="rtl",s=t==="y",c=s?"y":"x",i=s?"x":"y",o=!s&&e?-1:1,a=h(),r=d();function u(f){const{height:m,width:g}=f;return s?m:g}function h(){return s?"top":e?"right":"left"}function d(){return s?"bottom":e?"left":"right"}function p(f){return f*o}return{scroll:c,cross:i,startEdge:a,endEdge:r,measureSize:u,direction:p}}function ot(t=0,n=0){const e=D(t-n);function s(u){return u<t}function c(u){return u>n}function i(u){return s(u)||c(u)}function o(u){return i(u)?s(u)?t:n:u}function a(u){return e?u-e*Math.ceil((u-n)/e):u}return{length:e,max:n,min:t,constrain:o,reachedAny:i,reachedMax:c,reachedMin:s,removeOffset:a}}function Xt(t,n,e){const{constrain:s}=ot(0,t),c=t+1;let i=o(n);function o(p){return e?D((c+p)%c):s(p)}function a(){return i}function r(p){return i=o(p),d}function u(p){return h().set(a()+p)}function h(){return Xt(t,a(),e)}const d={get:a,set:r,add:u,clone:h};return d}function yn(t,n,e,s,c,i,o,a,r,u,h,d,p,b,f,m,g,l,S){const{cross:x,direction:L}=t,w=["INPUT","SELECT","TEXTAREA"],C={passive:!1},v=gt(),E=gt(),I=ot(50,225).constrain(b.measure(20)),A={mouse:300,touch:400},T={mouse:500,touch:600},k=f?43:25;let R=!1,q=0,G=0,tt=!1,Z=!1,K=!1,U=!1;function ct(y){if(!S)return;function O(j){(xt(S)||S(y,j))&&at(j)}const M=n;v.add(M,"dragstart",j=>j.preventDefault(),C).add(M,"touchmove",()=>{},C).add(M,"touchend",()=>{}).add(M,"touchstart",O).add(M,"mousedown",O).add(M,"touchcancel",N).add(M,"contextmenu",N).add(M,"click",J,!0)}function H(){v.clear(),E.clear()}function rt(){const y=U?e:n;E.add(y,"touchmove",F,C).add(y,"touchend",N).add(y,"mousemove",F,C).add(y,"mouseup",N)}function st(y){const O=y.nodeName||"";return w.includes(O)}function Q(){return(f?T:A)[U?"mouse":"touch"]}function ut(y,O){const M=d.add(At(y)*-1),j=h.byDistance(y,!f).distance;return f||D(y)<I?j:g&&O?j*.5:h.byIndex(M.get(),0).distance}function at(y){const O=wt(y,s);U=O,K=f&&O&&!y.buttons&&R,R=dt(c.get(),o.get())>=2,!(O&&y.button!==0)&&(st(y.target)||(tt=!0,i.pointerDown(y),u.useFriction(0).useDuration(0),c.set(o),rt(),q=i.readPoint(y),G=i.readPoint(y,x),p.emit("pointerDown")))}function F(y){if(!wt(y,s)&&y.touches.length>=2)return N(y);const M=i.readPoint(y),j=i.readPoint(y,x),_=dt(M,q),X=dt(j,G);if(!Z&&!U&&(!y.cancelable||(Z=_>X,!Z)))return N(y);const nt=i.pointerMove(y);_>m&&(K=!0),u.useFriction(.3).useDuration(.75),a.start(),c.add(L(nt)),y.preventDefault()}function N(y){const M=h.byDistance(0,!1).index!==d.get(),j=i.pointerUp(y)*Q(),_=ut(L(j),M),X=mn(j,_),nt=k-10*X,W=l+X/50;Z=!1,tt=!1,E.clear(),u.useDuration(nt).useFriction(W),r.distance(_,!f),U=!1,p.emit("pointerUp")}function J(y){K&&(y.stopPropagation(),y.preventDefault(),K=!1)}function z(){return tt}return{init:ct,destroy:H,pointerDown:z}}function xn(t,n){let s,c;function i(d){return d.timeStamp}function o(d,p){const f=`client${(p||t.scroll)==="x"?"X":"Y"}`;return(wt(d,n)?d:d.touches[0])[f]}function a(d){return s=d,c=d,o(d)}function r(d){const p=o(d)-o(c),b=i(d)-i(s)>170;return c=d,b&&(s=d),p}function u(d){if(!s||!c)return 0;const p=o(c)-o(s),b=i(d)-i(s),f=i(d)-i(c)>170,m=p/b;return b&&!f&&D(m)>.1?m:0}return{pointerDown:a,pointerMove:r,pointerUp:u,readPoint:o}}function vn(){function t(e){const{offsetTop:s,offsetLeft:c,offsetWidth:i,offsetHeight:o}=e;return{top:s,right:c+i,bottom:s+o,left:c,width:i,height:o}}return{measure:t}}function En(t){function n(s){return t*(s/100)}return{measure:n}}function Ln(t,n,e,s,c,i,o){const a=[t].concat(s);let r,u,h=[],d=!1;function p(g){return c.measureSize(o.measure(g))}function b(g){if(!i)return;u=p(t),h=s.map(p);function l(S){for(const x of S){if(d)return;const L=x.target===t,w=s.indexOf(x.target),C=L?u:h[w],v=p(L?t:s[w]);if(D(v-C)>=.5){g.reInit(),n.emit("resize");break}}}r=new ResizeObserver(S=>{(xt(i)||i(g,S))&&l(S)}),e.requestAnimationFrame(()=>{a.forEach(S=>r.observe(S))})}function f(){d=!0,r&&r.disconnect()}return{init:b,destroy:f}}function Cn(t,n,e,s,c,i){let o=0,a=0,r=c,u=i,h=t.get(),d=0;function p(){const C=s.get()-t.get(),v=!r;let E=0;return v?(o=0,e.set(s),t.set(s),E=C):(e.set(t),o+=C/r,o*=u,h+=o,t.add(o),E=h-d),a=At(E),d=h,w}function b(){const C=s.get()-n.get();return D(C)<.001}function f(){return r}function m(){return a}function g(){return o}function l(){return x(c)}function S(){return L(i)}function x(C){return r=C,w}function L(C){return u=C,w}const w={direction:m,duration:f,velocity:g,seek:p,settled:b,useBaseFriction:S,useBaseDuration:l,useFriction:L,useDuration:x};return w}function In(t,n,e,s,c){const i=c.measure(10),o=c.measure(50),a=ot(.1,.99);let r=!1;function u(){return!(r||!t.reachedAny(e.get())||!t.reachedAny(n.get()))}function h(b){if(!u())return;const f=t.reachedMin(n.get())?"min":"max",m=D(t[f]-n.get()),g=e.get()-n.get(),l=a.constrain(m/o);e.subtract(g*l),!b&&D(g)<i&&(e.set(t.constrain(e.get())),s.useDuration(25).useBaseFriction())}function d(b){r=!b}return{shouldConstrain:u,constrain:h,toggleActive:d}}function Tn(t,n,e,s,c){const i=ot(-n+t,0),o=d(),a=h(),r=p();function u(f,m){return dt(f,m)<=1}function h(){const f=o[0],m=V(o),g=o.lastIndexOf(f),l=o.indexOf(m)+1;return ot(g,l)}function d(){return e.map((f,m)=>{const{min:g,max:l}=i,S=i.constrain(f),x=!m,L=Mt(e,m);return x?l:L||u(g,S)?g:u(l,S)?l:S}).map(f=>parseFloat(f.toFixed(3)))}function p(){if(n<=t+c)return[i.max];if(s==="keepSnaps")return o;const{min:f,max:m}=a;return o.slice(f,m)}return{snapsContained:r,scrollContainLimit:a}}function On(t,n,e){const s=n[0],c=e?s-t:V(n);return{limit:ot(c,s)}}function wn(t,n,e,s){const i=n.min+.1,o=n.max+.1,{reachedMin:a,reachedMax:r}=ot(i,o);function u(p){return p===1?r(e.get()):p===-1?a(e.get()):!1}function h(p){if(!u(p))return;const b=t*(p*-1);s.forEach(f=>f.add(b))}return{loop:h}}function Pn(t){const{max:n,length:e}=t;function s(i){const o=i-n;return e?o/-e:0}return{get:s}}function Dn(t,n,e,s,c){const{startEdge:i,endEdge:o}=t,{groupSlides:a}=c,r=d().map(n.measure),u=p(),h=b();function d(){return a(s).map(m=>V(m)[o]-m[0][i]).map(D)}function p(){return s.map(m=>e[i]-m[i]).map(m=>-D(m))}function b(){return a(u).map(m=>m[0]).map((m,g)=>m+r[g])}return{snaps:u,snapsAligned:h}}function An(t,n,e,s,c,i){const{groupSlides:o}=c,{min:a,max:r}=s,u=h();function h(){const p=o(i),b=!t||n==="keepSnaps";return e.length===1?[i]:b?p:p.slice(a,r).map((f,m,g)=>{const l=!m,S=Mt(g,m);if(l){const x=V(g[0])+1;return Kt(x)}if(S){const x=St(i)-V(g)[0]+1;return Kt(x,V(g)[0])}return f})}return{slideRegistry:u}}function Mn(t,n,e,s,c){const{reachedAny:i,removeOffset:o,constrain:a}=s;function r(f){return f.concat().sort((m,g)=>D(m)-D(g))[0]}function u(f){const m=t?o(f):a(f),g=n.map((S,x)=>({diff:h(S-m,0),index:x})).sort((S,x)=>D(S.diff)-D(x.diff)),{index:l}=g[0];return{index:l,distance:m}}function h(f,m){const g=[f,f+e,f-e];if(!t)return f;if(!m)return r(g);const l=g.filter(S=>At(S)===m);return l.length?r(l):V(g)-e}function d(f,m){const g=n[f]-c.get(),l=h(g,m);return{index:f,distance:l}}function p(f,m){const g=c.get()+f,{index:l,distance:S}=u(g),x=!t&&i(g);if(!m||x)return{index:l,distance:f};const L=n[l]-S,w=f+h(L,0);return{index:l,distance:w}}return{byDistance:p,byIndex:d,shortcut:h}}function Nn(t,n,e,s,c,i,o){function a(d){const p=d.distance,b=d.index!==n.get();i.add(p),p&&(s.duration()?t.start():(t.update(),t.render(1),t.update())),b&&(e.set(n.get()),n.set(d.index),o.emit("select"))}function r(d,p){const b=c.byDistance(d,p);a(b)}function u(d,p){const b=n.clone().set(d),f=c.byIndex(b.get(),p);a(f)}return{distance:r,index:u}}function jn(t,n,e,s,c,i,o,a){const r={passive:!0,capture:!0};let u=0;function h(b){if(!a)return;function f(m){if(new Date().getTime()-u>10)return;o.emit("slideFocusStart"),t.scrollLeft=0;const S=e.findIndex(x=>x.includes(m));Dt(S)&&(c.useDuration(0),s.index(S,0),o.emit("slideFocus"))}i.add(document,"keydown",d,!1),n.forEach((m,g)=>{i.add(m,"focus",l=>{(xt(a)||a(b,l))&&f(g)},r)})}function d(b){b.code==="Tab"&&(u=new Date().getTime())}return{init:h}}function ft(t){let n=t;function e(){return n}function s(r){n=o(r)}function c(r){n+=o(r)}function i(r){n-=o(r)}function o(r){return Dt(r)?r:r.get()}return{get:e,set:s,add:c,subtract:i}}function Yt(t,n){const e=t.scroll==="x"?o:a,s=n.style;let c=null,i=!1;function o(p){return`translate3d(${p}px,0px,0px)`}function a(p){return`translate3d(0px,${p}px,0px)`}function r(p){if(i)return;const b=gn(t.direction(p));b!==c&&(s.transform=e(b),c=b)}function u(p){i=!p}function h(){i||(s.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:h,to:r,toggleActive:u}}function kn(t,n,e,s,c,i,o,a,r){const h=pt(c),d=pt(c).reverse(),p=l().concat(S());function b(v,E){return v.reduce((I,A)=>I-c[A],E)}function f(v,E){return v.reduce((I,A)=>b(I,E)>0?I.concat([A]):I,[])}function m(v){return i.map((E,I)=>({start:E-s[I]+.5+v,end:E+n-.5+v}))}function g(v,E,I){const A=m(E);return v.map(T=>{const k=I?0:-e,R=I?e:0,q=I?"end":"start",G=A[T][q];return{index:T,loopPoint:G,slideLocation:ft(-1),translate:Yt(t,r[T]),target:()=>a.get()>G?k:R}})}function l(){const v=o[0],E=f(d,v);return g(E,e,!1)}function S(){const v=n-o[0]-1,E=f(h,v);return g(E,-e,!0)}function x(){return p.every(({index:v})=>{const E=h.filter(I=>I!==v);return b(E,n)<=.1})}function L(){p.forEach(v=>{const{target:E,translate:I,slideLocation:A}=v,T=E();T!==A.get()&&(I.to(T),A.set(T))})}function w(){p.forEach(v=>v.translate.clear())}return{canLoop:x,clear:w,loop:L,loopPoints:p}}function Fn(t,n,e){let s,c=!1;function i(r){if(!e)return;function u(h){for(const d of h)if(d.type==="childList"){r.reInit(),n.emit("slidesChanged");break}}s=new MutationObserver(h=>{c||(xt(e)||e(r,h))&&u(h)}),s.observe(t,{childList:!0})}function o(){s&&s.disconnect(),c=!0}return{init:i,destroy:o}}function zn(t,n,e,s){const c={};let i=null,o=null,a,r=!1;function u(){a=new IntersectionObserver(f=>{r||(f.forEach(m=>{const g=n.indexOf(m.target);c[g]=m}),i=null,o=null,e.emit("slidesInView"))},{root:t.parentElement,threshold:s}),n.forEach(f=>a.observe(f))}function h(){a&&a.disconnect(),r=!0}function d(f){return mt(c).reduce((m,g)=>{const l=parseInt(g),{isIntersecting:S}=c[l];return(f&&S||!f&&!S)&&m.push(l),m},[])}function p(f=!0){if(f&&i)return i;if(!f&&o)return o;const m=d(f);return f&&(i=m),f||(o=m),m}return{init:u,destroy:h,get:p}}function Bn(t,n,e,s,c,i){const{measureSize:o,startEdge:a,endEdge:r}=t,u=e[0]&&c,h=f(),d=m(),p=e.map(o),b=g();function f(){if(!u)return 0;const S=e[0];return D(n[a]-S[a])}function m(){if(!u)return 0;const S=i.getComputedStyle(V(s));return parseFloat(S.getPropertyValue(`margin-${r}`))}function g(){return e.map((S,x,L)=>{const w=!x,C=Mt(L,x);return w?p[x]+h:C?p[x]+d:L[x+1][a]-S[a]}).map(D)}return{slideSizes:p,slideSizesWithGaps:b,startGap:h,endGap:d}}function Vn(t,n,e,s,c,i,o,a,r){const{startEdge:u,endEdge:h,direction:d}=t,p=Dt(e);function b(l,S){return pt(l).filter(x=>x%S===0).map(x=>l.slice(x,x+S))}function f(l){return l.length?pt(l).reduce((S,x,L)=>{const w=V(S)||0,C=w===0,v=x===St(l),E=c[u]-i[w][u],I=c[u]-i[x][h],A=!s&&C?d(o):0,T=!s&&v?d(a):0,k=D(I-T-(E+A));return L&&k>n+r&&S.push(x),v&&S.push(l.length),S},[]).map((S,x,L)=>{const w=Math.max(L[x-1]||0);return l.slice(w,S)}):[]}function m(l){return p?b(l,e):f(l)}return{groupSlides:m}}function Rn(t,n,e,s,c,i,o){const{align:a,axis:r,direction:u,startIndex:h,loop:d,duration:p,dragFree:b,dragThreshold:f,inViewThreshold:m,slidesToScroll:g,skipSnaps:l,containScroll:S,watchResize:x,watchSlides:L,watchDrag:w,watchFocus:C}=i,v=2,E=vn(),I=E.measure(n),A=e.map(E.measure),T=bn(r,u),k=T.measureSize(I),R=En(k),q=hn(a,k),G=!d&&!!S,tt=d||!!S,{slideSizes:Z,slideSizesWithGaps:K,startGap:U,endGap:ct}=Bn(T,I,A,e,tt,c),H=Vn(T,k,g,d,I,A,U,ct,v),{snaps:rt,snapsAligned:st}=Dn(T,q,I,A,H),Q=-V(rt)+V(K),{snapsContained:ut,scrollContainLimit:at}=Tn(k,Q,st,S,v),F=G?ut:st,{limit:N}=On(Q,F,d),J=Xt(St(F),h,d),z=J.clone(),P=pt(e),y=({dragHandler:it,scrollBody:It,scrollBounds:Tt,options:{loop:bt}})=>{bt||Tt.constrain(it.pointerDown()),It.seek()},O=({scrollBody:it,translate:It,location:Tt,offsetLocation:bt,previousLocation:nn,scrollLooper:en,slideLooper:on,dragHandler:rn,animation:sn,eventHandler:zt,scrollBounds:cn,options:{loop:Bt}},Vt)=>{const Rt=it.settled(),un=!cn.shouldConstrain(),qt=Bt?Rt:Rt&&un,Gt=qt&&!rn.pointerDown();Gt&&sn.stop();const an=Tt.get()*Vt+nn.get()*(1-Vt);bt.set(an),Bt&&(en.loop(it.direction()),on.loop()),It.to(bt.get()),Gt&&zt.emit("settle"),qt||zt.emit("scroll")},M=Sn(s,c,()=>y(Ct),it=>O(Ct,it)),j=.68,_=F[J.get()],X=ft(_),nt=ft(_),W=ft(_),et=ft(_),lt=Cn(X,W,nt,et,p,j),Et=Mn(d,F,Q,N,et),Lt=Nn(M,J,z,lt,Et,et,o),jt=Pn(N),kt=gt(),Wt=zn(n,e,o,m),{slideRegistry:Ft}=An(G,S,F,at,H,P),tn=jn(t,e,Ft,Lt,lt,kt,o,C),Ct={ownerDocument:s,ownerWindow:c,eventHandler:o,containerRect:I,slideRects:A,animation:M,axis:T,dragHandler:yn(T,t,s,c,et,xn(T,c),X,M,Lt,lt,Et,J,o,R,b,f,l,j,w),eventStore:kt,percentOfView:R,index:J,indexPrevious:z,limit:N,location:X,offsetLocation:W,previousLocation:nt,options:i,resizeHandler:Ln(n,o,c,e,T,x,E),scrollBody:lt,scrollBounds:In(N,W,et,lt,R),scrollLooper:wn(Q,N,W,[X,W,nt,et]),scrollProgress:jt,scrollSnapList:F.map(jt.get),scrollSnaps:F,scrollTarget:Et,scrollTo:Lt,slideLooper:kn(T,k,Q,Z,K,rt,F,W,e),slideFocus:tn,slidesHandler:Fn(n,o,L),slidesInView:Wt,slideIndexes:P,slideRegistry:Ft,slidesToScroll:H,target:et,translate:Yt(T,n)};return Ct}function qn(){let t={},n;function e(u){n=u}function s(u){return t[u]||[]}function c(u){return s(u).forEach(h=>h(n,u)),r}function i(u,h){return t[u]=s(u).concat([h]),r}function o(u,h){return t[u]=s(u).filter(d=>d!==h),r}function a(){t={}}const r={init:e,emit:c,off:o,on:i,clear:a};return r}const Gn={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Hn(t){function n(i,o){return Jt(i,o||{})}function e(i){const o=i.breakpoints||{},a=mt(o).filter(r=>t.matchMedia(r).matches).map(r=>o[r]).reduce((r,u)=>n(r,u),{});return n(i,a)}function s(i){return i.map(o=>mt(o.breakpoints||{})).reduce((o,a)=>o.concat(a),[]).map(t.matchMedia)}return{mergeOptions:n,optionsAtMedia:e,optionsMediaQueries:s}}function _n(t){let n=[];function e(i,o){return n=o.filter(({options:a})=>t.optionsAtMedia(a).active!==!1),n.forEach(a=>a.init(i,t)),o.reduce((a,r)=>Object.assign(a,{[r.name]:r}),{})}function s(){n=n.filter(i=>i.destroy())}return{init:e,destroy:s}}function yt(t,n,e){const s=t.ownerDocument,c=s.defaultView,i=Hn(c),o=_n(i),a=gt(),r=qn(),{mergeOptions:u,optionsAtMedia:h,optionsMediaQueries:d}=i,{on:p,off:b,emit:f}=r,m=T;let g=!1,l,S=u(Gn,yt.globalOptions),x=u(S),L=[],w,C,v;function E(){const{container:P,slides:y}=x;C=(Ot(P)?t.querySelector(P):P)||t.children[0];const M=Ot(y)?C.querySelectorAll(y):y;v=[].slice.call(M||C.children)}function I(P){const y=Rn(t,C,v,s,c,P,r);if(P.loop&&!y.slideLooper.canLoop()){const O=Object.assign({},P,{loop:!1});return I(O)}return y}function A(P,y){g||(S=u(S,P),x=h(S),L=y||L,E(),l=I(x),d([S,...L.map(({options:O})=>O)]).forEach(O=>a.add(O,"change",T)),x.active&&(l.translate.to(l.location.get()),l.animation.init(),l.slidesInView.init(),l.slideFocus.init(z),l.eventHandler.init(z),l.resizeHandler.init(z),l.slidesHandler.init(z),l.options.loop&&l.slideLooper.loop(),C.offsetParent&&v.length&&l.dragHandler.init(z),w=o.init(z,L)))}function T(P,y){const O=H();k(),A(u({startIndex:O},P),y),r.emit("reInit")}function k(){l.dragHandler.destroy(),l.eventStore.clear(),l.translate.clear(),l.slideLooper.clear(),l.resizeHandler.destroy(),l.slidesHandler.destroy(),l.slidesInView.destroy(),l.animation.destroy(),o.destroy(),a.clear()}function R(){g||(g=!0,a.clear(),k(),r.emit("destroy"),r.clear())}function q(P,y,O){!x.active||g||(l.scrollBody.useBaseFriction().useDuration(y===!0?0:x.duration),l.scrollTo.index(P,O||0))}function G(P){const y=l.index.add(1).get();q(y,P,-1)}function tt(P){const y=l.index.add(-1).get();q(y,P,1)}function Z(){return l.index.add(1).get()!==H()}function K(){return l.index.add(-1).get()!==H()}function U(){return l.scrollSnapList}function ct(){return l.scrollProgress.get(l.offsetLocation.get())}function H(){return l.index.get()}function rt(){return l.indexPrevious.get()}function st(){return l.slidesInView.get()}function Q(){return l.slidesInView.get(!1)}function ut(){return w}function at(){return l}function F(){return t}function N(){return C}function J(){return v}const z={canScrollNext:Z,canScrollPrev:K,containerNode:N,internalEngine:at,destroy:R,off:b,on:p,emit:f,plugins:ut,previousScrollSnap:rt,reInit:m,rootNode:F,scrollNext:G,scrollPrev:tt,scrollProgress:ct,scrollSnapList:U,scrollTo:q,selectedScrollSnap:H,slideNodes:J,slidesInView:st,slidesNotInView:Q};return A(n,e),setTimeout(()=>r.emit("init"),0),z}yt.globalOptions=void 0;function Nt(t={},n=[]){const e=Y.useRef(t),s=Y.useRef(n),[c,i]=Y.useState(),[o,a]=Y.useState(),r=Y.useCallback(()=>{c&&c.reInit(e.current,s.current)},[c]);return Y.useEffect(()=>{Pt(e.current,t)||(e.current=t,r())},[t,r]),Y.useEffect(()=>{pn(s.current,n)||(s.current=n,r())},[n,r]),Y.useEffect(()=>{if(dn()&&o){yt.globalOptions=Nt.globalOptions;const u=yt(o,e.current,s.current);return i(u),()=>u.destroy()}else i(void 0)},[o,i]),[a,c]}Nt.globalOptions=void 0;const Zt=$.createContext(null);function vt(){const t=$.useContext(Zt);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}function $n({orientation:t="horizontal",opts:n,setApi:e,plugins:s,className:c,children:i,...o}){const[a,r]=Nt({...n,axis:t==="horizontal"?"x":"y"},s),[u,h]=$.useState(!1),[d,p]=$.useState(!1),b=$.useCallback(l=>{l&&(h(l.canScrollPrev()),p(l.canScrollNext()))},[]),f=$.useCallback(()=>{r?.scrollPrev()},[r]),m=$.useCallback(()=>{r?.scrollNext()},[r]),g=$.useCallback(l=>{l.key==="ArrowLeft"?(l.preventDefault(),f()):l.key==="ArrowRight"&&(l.preventDefault(),m())},[f,m]);return $.useEffect(()=>{!r||!e||e(r)},[r,e]),$.useEffect(()=>{if(r)return b(r),r.on("reInit",b),r.on("select",b),()=>{r?.off("select",b)}},[r,b]),B.jsx(Zt.Provider,{value:{carouselRef:a,api:r,opts:n,orientation:t||(n?.axis==="y"?"vertical":"horizontal"),scrollPrev:f,scrollNext:m,canScrollPrev:u,canScrollNext:d},children:B.jsx("div",{onKeyDownCapture:g,className:ht.cn("relative",c),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...o,children:i})})}function Kn({className:t,...n}){const{carouselRef:e,orientation:s}=vt();return B.jsx("div",{ref:e,className:"overflow-hidden","data-slot":"carousel-content",children:B.jsx("div",{className:ht.cn("flex",s==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...n})})}function Un({className:t,...n}){const{orientation:e}=vt();return B.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:ht.cn("min-w-0 shrink-0 grow-0 basis-full",e==="horizontal"?"pl-4":"pt-4",t),...n})}function Qn({className:t,variant:n="outline",size:e="icon",...s}){const{orientation:c,scrollPrev:i,canScrollPrev:o}=vt();return B.jsxs(Qt.Button,{"data-slot":"carousel-previous",variant:n,size:e,className:ht.cn("absolute size-8 rounded-full",c==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!o,onClick:i,...s,children:[B.jsx(Ut.ArrowLeft,{}),B.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function Jn({className:t,variant:n="outline",size:e="icon",...s}){const{orientation:c,scrollNext:i,canScrollNext:o}=vt();return B.jsxs(Qt.Button,{"data-slot":"carousel-next",variant:n,size:e,className:ht.cn("absolute size-8 rounded-full",c==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!o,onClick:i,...s,children:[B.jsx(Ut.ArrowRight,{}),B.jsx("span",{className:"sr-only",children:"Next slide"})]})}exports.Carousel=$n;exports.CarouselContent=Kn;exports.CarouselItem=Un;exports.CarouselNext=Jn;exports.CarouselPrevious=Qn;
|
package/dist/carousel.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as X, jsxs as Jt } from "react/jsx-runtime";
|
|
2
2
|
import * as $ from "react";
|
|
3
3
|
import { useRef as qt, useState as $t, useCallback as dn, useEffect as Tt } from "react";
|
|
4
4
|
import { ArrowRight as pn, ArrowLeft as mn } from "lucide-react";
|
|
5
5
|
import { c as gt } from "./utils-eGXXUFl7.js";
|
|
6
|
-
import { B as
|
|
6
|
+
import { B as Xt } from "./button-Dh2vlJOI.js";
|
|
7
7
|
function gn(t) {
|
|
8
8
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
9
9
|
}
|
|
@@ -74,16 +74,16 @@ function ht(t) {
|
|
|
74
74
|
function Mt(t, n) {
|
|
75
75
|
return n === ht(t);
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function _t(t, n = 0) {
|
|
78
78
|
return Array.from(Array(t), (o, i) => n + i);
|
|
79
79
|
}
|
|
80
80
|
function pt(t) {
|
|
81
81
|
return Object.keys(t);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Yt(t, n) {
|
|
84
84
|
return [t, n].reduce((o, i) => (pt(i).forEach((c) => {
|
|
85
85
|
const s = o[c], e = i[c], a = Qt(s) && Qt(e);
|
|
86
|
-
o[c] = a ?
|
|
86
|
+
o[c] = a ? Yt(s, e) : e;
|
|
87
87
|
}), o), {});
|
|
88
88
|
}
|
|
89
89
|
function At(t, n) {
|
|
@@ -268,7 +268,7 @@ function Ln(t, n, o, i, c, s, e, a, r, u, h, d, p, y, f, m, g, l, S) {
|
|
|
268
268
|
mouse: 500,
|
|
269
269
|
touch: 600
|
|
270
270
|
}, F = f ? 43 : 25;
|
|
271
|
-
let j = !1, R = 0, G = 0, W = !1,
|
|
271
|
+
let j = !1, R = 0, G = 0, W = !1, Y = !1, K = !1, U = !1;
|
|
272
272
|
function it(b) {
|
|
273
273
|
if (!S) return;
|
|
274
274
|
function w(k) {
|
|
@@ -277,7 +277,7 @@ function Ln(t, n, o, i, c, s, e, a, r, u, h, d, p, y, f, m, g, l, S) {
|
|
|
277
277
|
const M = n;
|
|
278
278
|
E.add(M, "dragstart", (k) => k.preventDefault(), I).add(M, "touchmove", () => {
|
|
279
279
|
}, I).add(M, "touchend", () => {
|
|
280
|
-
}).add(M, "touchstart", w).add(M, "mousedown", w).add(M, "touchcancel", N).add(M, "contextmenu", N).add(M, "click",
|
|
280
|
+
}).add(M, "touchstart", w).add(M, "mousedown", w).add(M, "touchcancel", N).add(M, "contextmenu", N).add(M, "click", _, !0);
|
|
281
281
|
}
|
|
282
282
|
function H() {
|
|
283
283
|
E.clear(), v.clear();
|
|
@@ -303,17 +303,17 @@ function Ln(t, n, o, i, c, s, e, a, r, u, h, d, p, y, f, m, g, l, S) {
|
|
|
303
303
|
}
|
|
304
304
|
function z(b) {
|
|
305
305
|
if (!At(b, i) && b.touches.length >= 2) return N(b);
|
|
306
|
-
const M = s.readPoint(b), k = s.readPoint(b, x), q = ft(M, R),
|
|
307
|
-
if (!
|
|
306
|
+
const M = s.readPoint(b), k = s.readPoint(b, x), q = ft(M, R), J = ft(k, G);
|
|
307
|
+
if (!Y && !U && (!b.cancelable || (Y = q > J, !Y)))
|
|
308
308
|
return N(b);
|
|
309
309
|
const tt = s.pointerMove(b);
|
|
310
310
|
q > m && (K = !0), u.useFriction(0.3).useDuration(0.75), a.start(), c.add(L(tt)), b.preventDefault();
|
|
311
311
|
}
|
|
312
312
|
function N(b) {
|
|
313
|
-
const M = h.byDistance(0, !1).index !== d.get(), k = s.pointerUp(b) * Q(), q = ct(L(k), M),
|
|
314
|
-
|
|
313
|
+
const M = h.byDistance(0, !1).index !== d.get(), k = s.pointerUp(b) * Q(), q = ct(L(k), M), J = yn(k, q), tt = F - 10 * J, Z = l + J / 50;
|
|
314
|
+
Y = !1, W = !1, v.clear(), u.useDuration(tt).useFriction(Z), r.distance(q, !f), U = !1, p.emit("pointerUp");
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function _(b) {
|
|
317
317
|
K && (b.stopPropagation(), b.preventDefault(), K = !1);
|
|
318
318
|
}
|
|
319
319
|
function B() {
|
|
@@ -582,11 +582,11 @@ function Fn(t, n, o, i, c, s) {
|
|
|
582
582
|
const l = !m, S = Mt(g, m);
|
|
583
583
|
if (l) {
|
|
584
584
|
const x = V(g[0]) + 1;
|
|
585
|
-
return
|
|
585
|
+
return _t(x);
|
|
586
586
|
}
|
|
587
587
|
if (S) {
|
|
588
588
|
const x = ht(s) - V(g)[0] + 1;
|
|
589
|
-
return
|
|
589
|
+
return _t(x, V(g)[0]);
|
|
590
590
|
}
|
|
591
591
|
return f;
|
|
592
592
|
});
|
|
@@ -944,7 +944,7 @@ function $n(t, n, o, i, c, s, e) {
|
|
|
944
944
|
watchDrag: A,
|
|
945
945
|
watchFocus: I
|
|
946
946
|
} = s, E = 2, v = Cn(), C = v.measure(n), O = o.map(v.measure), T = vn(r, u), F = T.measureSize(C), j = Tn(F), R = xn(a, F), G = !d && !!S, W = d || !!S, {
|
|
947
|
-
slideSizes:
|
|
947
|
+
slideSizes: Y,
|
|
948
948
|
slideSizesWithGaps: K,
|
|
949
949
|
startGap: U,
|
|
950
950
|
endGap: it
|
|
@@ -956,7 +956,7 @@ function $n(t, n, o, i, c, s, e) {
|
|
|
956
956
|
scrollContainLimit: ut
|
|
957
957
|
} = Pn(F, Q, rt, S, E), z = G ? ct : rt, {
|
|
958
958
|
limit: N
|
|
959
|
-
} = On(Q, z, d),
|
|
959
|
+
} = On(Q, z, d), _ = Zt(ht(z), h, d), B = _.clone(), D = dt(o), b = ({
|
|
960
960
|
dragHandler: st,
|
|
961
961
|
scrollBody: It,
|
|
962
962
|
scrollBounds: Ct,
|
|
@@ -985,7 +985,7 @@ function $n(t, n, o, i, c, s, e) {
|
|
|
985
985
|
Ht && un.stop();
|
|
986
986
|
const fn = Ct.get() * jt + on.get() * (1 - jt);
|
|
987
987
|
St.set(fn), Vt && (rn.loop(st.direction()), sn.loop()), It.to(St.get()), Ht && Bt.emit("settle"), Gt || Bt.emit("scroll");
|
|
988
|
-
}, M = En(i, c, () => b(Lt), (st) => w(Lt, st)), k = 0.68, q = z[
|
|
988
|
+
}, M = En(i, c, () => b(Lt), (st) => w(Lt, st)), k = 0.68, q = z[_.get()], J = lt(q), tt = lt(q), Z = lt(q), nt = lt(q), at = An(J, Z, tt, nt, p, k), Et = zn(d, z, Q, N, nt), vt = Bn(M, _, B, at, Et, nt, e), kt = Nn(N), Ft = mt(), nn = Gn(n, o, e, m), {
|
|
989
989
|
slideRegistry: zt
|
|
990
990
|
} = Fn(G, S, z, ut, H, D), en = Vn(t, o, zt, vt, at, Ft, e, I), Lt = {
|
|
991
991
|
ownerDocument: i,
|
|
@@ -995,26 +995,26 @@ function $n(t, n, o, i, c, s, e) {
|
|
|
995
995
|
slideRects: O,
|
|
996
996
|
animation: M,
|
|
997
997
|
axis: T,
|
|
998
|
-
dragHandler: Ln(T, t, i, c, nt, In(T, c),
|
|
998
|
+
dragHandler: Ln(T, t, i, c, nt, In(T, c), J, M, vt, at, Et, _, e, j, y, f, l, k, A),
|
|
999
999
|
eventStore: Ft,
|
|
1000
1000
|
percentOfView: j,
|
|
1001
|
-
index:
|
|
1001
|
+
index: _,
|
|
1002
1002
|
indexPrevious: B,
|
|
1003
1003
|
limit: N,
|
|
1004
|
-
location:
|
|
1004
|
+
location: J,
|
|
1005
1005
|
offsetLocation: Z,
|
|
1006
1006
|
previousLocation: tt,
|
|
1007
1007
|
options: s,
|
|
1008
1008
|
resizeHandler: wn(n, e, c, o, T, x, v),
|
|
1009
1009
|
scrollBody: at,
|
|
1010
1010
|
scrollBounds: Dn(N, Z, nt, at, j),
|
|
1011
|
-
scrollLooper: Mn(Q, N, Z, [
|
|
1011
|
+
scrollLooper: Mn(Q, N, Z, [J, Z, tt, nt]),
|
|
1012
1012
|
scrollProgress: kt,
|
|
1013
1013
|
scrollSnapList: z.map(kt.get),
|
|
1014
1014
|
scrollSnaps: z,
|
|
1015
1015
|
scrollTarget: Et,
|
|
1016
1016
|
scrollTo: vt,
|
|
1017
|
-
slideLooper: jn(T, F, Q,
|
|
1017
|
+
slideLooper: jn(T, F, Q, Y, K, ot, z, Z, o),
|
|
1018
1018
|
slideFocus: en,
|
|
1019
1019
|
slidesHandler: Rn(n, e, L),
|
|
1020
1020
|
slidesInView: nn,
|
|
@@ -1079,7 +1079,7 @@ const Un = {
|
|
|
1079
1079
|
};
|
|
1080
1080
|
function Qn(t) {
|
|
1081
1081
|
function n(s, e) {
|
|
1082
|
-
return
|
|
1082
|
+
return Yt(s, e || {});
|
|
1083
1083
|
}
|
|
1084
1084
|
function o(s) {
|
|
1085
1085
|
const e = s.breakpoints || {}, a = pt(e).filter((r) => t.matchMedia(r).matches).map((r) => e[r]).reduce((r, u) => n(r, u), {});
|
|
@@ -1094,7 +1094,7 @@ function Qn(t) {
|
|
|
1094
1094
|
optionsMediaQueries: i
|
|
1095
1095
|
};
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1097
|
+
function _n(t) {
|
|
1098
1098
|
let n = [];
|
|
1099
1099
|
function o(s, e) {
|
|
1100
1100
|
return n = e.filter(({
|
|
@@ -1112,7 +1112,7 @@ function Jn(t) {
|
|
|
1112
1112
|
};
|
|
1113
1113
|
}
|
|
1114
1114
|
function yt(t, n, o) {
|
|
1115
|
-
const i = t.ownerDocument, c = i.defaultView, s = Qn(c), e =
|
|
1115
|
+
const i = t.ownerDocument, c = i.defaultView, s = Qn(c), e = _n(s), a = mt(), r = Kn(), {
|
|
1116
1116
|
mergeOptions: u,
|
|
1117
1117
|
optionsAtMedia: h,
|
|
1118
1118
|
optionsMediaQueries: d
|
|
@@ -1169,7 +1169,7 @@ function yt(t, n, o) {
|
|
|
1169
1169
|
const b = l.index.add(-1).get();
|
|
1170
1170
|
R(b, D, 1);
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function Y() {
|
|
1173
1173
|
return l.index.add(1).get() !== H();
|
|
1174
1174
|
}
|
|
1175
1175
|
function K() {
|
|
@@ -1205,11 +1205,11 @@ function yt(t, n, o) {
|
|
|
1205
1205
|
function N() {
|
|
1206
1206
|
return I;
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1208
|
+
function _() {
|
|
1209
1209
|
return E;
|
|
1210
1210
|
}
|
|
1211
1211
|
const B = {
|
|
1212
|
-
canScrollNext:
|
|
1212
|
+
canScrollNext: Y,
|
|
1213
1213
|
canScrollPrev: K,
|
|
1214
1214
|
containerNode: N,
|
|
1215
1215
|
internalEngine: ut,
|
|
@@ -1227,7 +1227,7 @@ function yt(t, n, o) {
|
|
|
1227
1227
|
scrollSnapList: U,
|
|
1228
1228
|
scrollTo: R,
|
|
1229
1229
|
selectedScrollSnap: H,
|
|
1230
|
-
slideNodes:
|
|
1230
|
+
slideNodes: _,
|
|
1231
1231
|
slidesInView: rt,
|
|
1232
1232
|
slidesNotInView: Q
|
|
1233
1233
|
};
|
|
@@ -1293,7 +1293,7 @@ function te({
|
|
|
1293
1293
|
return y(r), r.on("reInit", y), r.on("select", y), () => {
|
|
1294
1294
|
r?.off("select", y);
|
|
1295
1295
|
};
|
|
1296
|
-
}, [r, y]), /* @__PURE__ */
|
|
1296
|
+
}, [r, y]), /* @__PURE__ */ X(
|
|
1297
1297
|
tn.Provider,
|
|
1298
1298
|
{
|
|
1299
1299
|
value: {
|
|
@@ -1306,7 +1306,7 @@ function te({
|
|
|
1306
1306
|
canScrollPrev: u,
|
|
1307
1307
|
canScrollNext: d
|
|
1308
1308
|
},
|
|
1309
|
-
children: /* @__PURE__ */
|
|
1309
|
+
children: /* @__PURE__ */ X(
|
|
1310
1310
|
"div",
|
|
1311
1311
|
{
|
|
1312
1312
|
onKeyDownCapture: g,
|
|
@@ -1323,13 +1323,13 @@ function te({
|
|
|
1323
1323
|
}
|
|
1324
1324
|
function ne({ className: t, ...n }) {
|
|
1325
1325
|
const { carouselRef: o, orientation: i } = xt();
|
|
1326
|
-
return /* @__PURE__ */
|
|
1326
|
+
return /* @__PURE__ */ X(
|
|
1327
1327
|
"div",
|
|
1328
1328
|
{
|
|
1329
1329
|
ref: o,
|
|
1330
1330
|
className: "overflow-hidden",
|
|
1331
1331
|
"data-slot": "carousel-content",
|
|
1332
|
-
children: /* @__PURE__ */
|
|
1332
|
+
children: /* @__PURE__ */ X(
|
|
1333
1333
|
"div",
|
|
1334
1334
|
{
|
|
1335
1335
|
className: gt(
|
|
@@ -1345,7 +1345,7 @@ function ne({ className: t, ...n }) {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
function ee({ className: t, ...n }) {
|
|
1347
1347
|
const { orientation: o } = xt();
|
|
1348
|
-
return /* @__PURE__ */
|
|
1348
|
+
return /* @__PURE__ */ X(
|
|
1349
1349
|
"div",
|
|
1350
1350
|
{
|
|
1351
1351
|
role: "group",
|
|
@@ -1367,8 +1367,8 @@ function oe({
|
|
|
1367
1367
|
...i
|
|
1368
1368
|
}) {
|
|
1369
1369
|
const { orientation: c, scrollPrev: s, canScrollPrev: e } = xt();
|
|
1370
|
-
return /* @__PURE__ */
|
|
1371
|
-
|
|
1370
|
+
return /* @__PURE__ */ Jt(
|
|
1371
|
+
Xt,
|
|
1372
1372
|
{
|
|
1373
1373
|
"data-slot": "carousel-previous",
|
|
1374
1374
|
variant: n,
|
|
@@ -1382,8 +1382,8 @@ function oe({
|
|
|
1382
1382
|
onClick: s,
|
|
1383
1383
|
...i,
|
|
1384
1384
|
children: [
|
|
1385
|
-
/* @__PURE__ */
|
|
1386
|
-
/* @__PURE__ */
|
|
1385
|
+
/* @__PURE__ */ X(mn, {}),
|
|
1386
|
+
/* @__PURE__ */ X("span", { className: "sr-only", children: "Previous slide" })
|
|
1387
1387
|
]
|
|
1388
1388
|
}
|
|
1389
1389
|
);
|
|
@@ -1395,8 +1395,8 @@ function re({
|
|
|
1395
1395
|
...i
|
|
1396
1396
|
}) {
|
|
1397
1397
|
const { orientation: c, scrollNext: s, canScrollNext: e } = xt();
|
|
1398
|
-
return /* @__PURE__ */
|
|
1399
|
-
|
|
1398
|
+
return /* @__PURE__ */ Jt(
|
|
1399
|
+
Xt,
|
|
1400
1400
|
{
|
|
1401
1401
|
"data-slot": "carousel-next",
|
|
1402
1402
|
variant: n,
|
|
@@ -1410,8 +1410,8 @@ function re({
|
|
|
1410
1410
|
onClick: s,
|
|
1411
1411
|
...i,
|
|
1412
1412
|
children: [
|
|
1413
|
-
/* @__PURE__ */
|
|
1414
|
-
/* @__PURE__ */
|
|
1413
|
+
/* @__PURE__ */ X(pn, {}),
|
|
1414
|
+
/* @__PURE__ */ X("span", { className: "sr-only", children: "Next slide" })
|
|
1415
1415
|
]
|
|
1416
1416
|
}
|
|
1417
1417
|
);
|