sonahang-ui 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/Carousel/Carousel.d.ts +29 -0
- package/dist/components/Carousel/CarouselControl.d.ts +20 -0
- package/dist/components/Carousel/CarouselDots.d.ts +17 -0
- package/dist/components/Carousel/CarouselNext.d.ts +4 -0
- package/dist/components/Carousel/CarouselPlayPause.d.ts +18 -0
- package/dist/components/Carousel/CarouselPrevious.d.ts +4 -0
- package/dist/components/Carousel/CarouselSlide.d.ts +8 -0
- package/dist/components/Carousel/CarouselSlides.d.ts +15 -0
- package/dist/components/Carousel/carousel.context.d.ts +44 -0
- package/dist/components/Carousel/index.d.ts +14 -0
- package/dist/components/Carousel/useAutoRotate.d.ts +28 -0
- package/dist/index.d.ts +2 -0
- package/dist/sonahang-ui.cjs +3 -3
- package/dist/sonahang-ui.cjs.map +1 -1
- package/dist/sonahang-ui.css +1 -1
- package/dist/sonahang-ui.js +488 -223
- package/dist/sonahang-ui.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -86,7 +86,7 @@ Feedback: `Alert`, `Spinner`, `ProgressBar`, `Tooltip`, `Dialog`, `Drawer`
|
|
|
86
86
|
|
|
87
87
|
Navigation: `Tabs`, `Breadcrumb`, `Pagination`, `Stepper`, `Accordion`
|
|
88
88
|
|
|
89
|
-
Data display: `Avatar`, `Tag`, `Chip`
|
|
89
|
+
Data display: `Avatar`, `Tag`, `Chip`, `Carousel`
|
|
90
90
|
|
|
91
91
|
Every component, every prop, and every state is documented with live controls
|
|
92
92
|
in [Storybook](https://github.com/sonangrai/sonahang-ui) — that's the real
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import "./Carousel.css";
|
|
3
|
+
export type CarouselProps = {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
/** Index of the slide in view — makes the component controlled. */
|
|
6
|
+
index?: number;
|
|
7
|
+
/** Initially visible slide when uncontrolled. Defaults to `0`. */
|
|
8
|
+
defaultIndex?: number;
|
|
9
|
+
/** Fired with the newly visible slide's index. */
|
|
10
|
+
onChange?: (index: number) => void;
|
|
11
|
+
/** Whether the previous/next controls wrap past the ends. Defaults to `true`. */
|
|
12
|
+
loop?: boolean;
|
|
13
|
+
/** Advances on its own until the reader takes over. Defaults to `false`. */
|
|
14
|
+
autoPlay?: boolean;
|
|
15
|
+
/** Milliseconds each slide is shown while auto-rotating. Defaults to `5000`. */
|
|
16
|
+
interval?: number;
|
|
17
|
+
/** Accessible name for the carousel. Worth setting — there's no default. */
|
|
18
|
+
"aria-label"?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
} & Omit<HTMLAttributes<HTMLElement>, "className" | "onChange">;
|
|
21
|
+
/**
|
|
22
|
+
* Root of the carousel: owns which slide is showing and shares it with
|
|
23
|
+
* `CarouselSlides`, the arrows, and the dots through context.
|
|
24
|
+
*
|
|
25
|
+
* A `section` with `aria-roledescription="carousel"`, per the ARIA carousel
|
|
26
|
+
* pattern — a landmark the reader can jump to, described in the words they'd
|
|
27
|
+
* use for it rather than as an anonymous region.
|
|
28
|
+
*/
|
|
29
|
+
export declare function Carousel({ children, index, defaultIndex, onChange, loop, autoPlay, interval, "aria-label": ariaLabel, className, ...props }: CarouselProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import "./Carousel.css";
|
|
3
|
+
export type CarouselControlProps = {
|
|
4
|
+
/** Replaces the default chevron. */
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** Accessible name for the button. */
|
|
7
|
+
"aria-label"?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "className" | "children">;
|
|
10
|
+
type InternalProps = CarouselControlProps & {
|
|
11
|
+
direction: "previous" | "next";
|
|
12
|
+
component: string;
|
|
13
|
+
defaultLabel: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Shared body of the two arrows — they differ only in which way they step and
|
|
17
|
+
* which end they run out at.
|
|
18
|
+
*/
|
|
19
|
+
export declare function CarouselControl({ direction, component, defaultLabel, children, "aria-label": ariaLabel, className, disabled, onClick, ...props }: InternalProps): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
import "./Carousel.css";
|
|
3
|
+
export type CarouselDotsProps = {
|
|
4
|
+
/** Accessible name for the group. Defaults to "Choose slide". */
|
|
5
|
+
"aria-label"?: string;
|
|
6
|
+
/** Names each dot. Defaults to "Slide 1", "Slide 2", … */
|
|
7
|
+
label?: (index: number) => string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, "className">;
|
|
10
|
+
/**
|
|
11
|
+
* One dot per slide, doubling as a position readout and a way to jump.
|
|
12
|
+
*
|
|
13
|
+
* Plain buttons rather than tabs: the slides are groups, not tab panels, and
|
|
14
|
+
* claiming tab semantics here would promise arrow-key behaviour the ARIA
|
|
15
|
+
* carousel pattern doesn't have.
|
|
16
|
+
*/
|
|
17
|
+
export declare function CarouselDots({ "aria-label": ariaLabel, label, className, ...props }: CarouselDotsProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CarouselControlProps } from "./CarouselControl";
|
|
2
|
+
export type CarouselNextProps = CarouselControlProps;
|
|
3
|
+
/** Steps forward one slide. Overlays the right edge of the slides. */
|
|
4
|
+
export declare function CarouselNext(props: CarouselNextProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes } from "react";
|
|
2
|
+
import "./Carousel.css";
|
|
3
|
+
export type CarouselPlayPauseProps = {
|
|
4
|
+
/** Accessible names for the two states. */
|
|
5
|
+
labels?: {
|
|
6
|
+
play?: string;
|
|
7
|
+
pause?: string;
|
|
8
|
+
};
|
|
9
|
+
className?: string;
|
|
10
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "className" | "children">;
|
|
11
|
+
/**
|
|
12
|
+
* Stops and restarts auto-rotation.
|
|
13
|
+
*
|
|
14
|
+
* Worth rendering whenever `autoPlay` is on: movement nobody asked for is
|
|
15
|
+
* hard to read past, and hovering to pause it isn't available to everyone.
|
|
16
|
+
* Renders nothing when there's no rotation to control.
|
|
17
|
+
*/
|
|
18
|
+
export declare function CarouselPlayPause({ labels, className, onClick, ...props }: CarouselPlayPauseProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CarouselControlProps } from "./CarouselControl";
|
|
2
|
+
export type CarouselPreviousProps = CarouselControlProps;
|
|
3
|
+
/** Steps back one slide. Overlays the left edge of the slides. */
|
|
4
|
+
export declare function CarouselPrevious(props: CarouselPreviousProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import "./Carousel.css";
|
|
3
|
+
export type CarouselSlideProps = {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, "className">;
|
|
7
|
+
/** A single slide. Must be rendered inside `CarouselSlides`. */
|
|
8
|
+
export declare function CarouselSlide({ children, className, ...props }: CarouselSlideProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import "./Carousel.css";
|
|
3
|
+
export type CarouselSlidesProps = {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, "className">;
|
|
7
|
+
/**
|
|
8
|
+
* Window onto the slides, and the track that slides beneath it.
|
|
9
|
+
*
|
|
10
|
+
* Slides are declared here but counted by the root, because the arrows and
|
|
11
|
+
* dots sit outside this subtree and still need to know how many there are.
|
|
12
|
+
* Position comes from the same place: a slide can't work out which one it is,
|
|
13
|
+
* so each child is handed its index on the way past.
|
|
14
|
+
*/
|
|
15
|
+
export declare function CarouselSlides({ children, className, onKeyDown, ...props }: CarouselSlidesProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type CarouselContextValue = {
|
|
2
|
+
/** Index of the slide currently in view. */
|
|
3
|
+
index: number;
|
|
4
|
+
/** How many slides `CarouselSlides` is rendering. */
|
|
5
|
+
count: number;
|
|
6
|
+
/** Reported by `CarouselSlides` once it knows how many children it has. */
|
|
7
|
+
setCount: (count: number) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Moves to a slide. `user` navigation also stops auto-rotation for good —
|
|
10
|
+
* once someone takes control, yanking the slide out from under them a few
|
|
11
|
+
* seconds later is hostile.
|
|
12
|
+
*/
|
|
13
|
+
goTo: (index: number, source?: "user" | "auto") => void;
|
|
14
|
+
/** Whether the ends wrap around. */
|
|
15
|
+
loop: boolean;
|
|
16
|
+
/** Prefix for the generated slide ids that the dots point at. */
|
|
17
|
+
baseId: string;
|
|
18
|
+
/** Whether the caller asked for auto-rotation at all. */
|
|
19
|
+
autoPlay: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether rotation is *meant* to be running. Deliberately unaffected by the
|
|
22
|
+
* transient pauses (hover, focus, a hidden tab), so the play/pause button
|
|
23
|
+
* doesn't flip its icon as the pointer crosses the carousel.
|
|
24
|
+
*/
|
|
25
|
+
isPlaying: boolean;
|
|
26
|
+
/** Starts or stops auto-rotation. */
|
|
27
|
+
togglePlaying: () => void;
|
|
28
|
+
};
|
|
29
|
+
export declare const CarouselContext: import("react").Context<CarouselContextValue | undefined>;
|
|
30
|
+
/** Reads the surrounding `Carousel` context, failing loudly rather than silently. */
|
|
31
|
+
export declare function useCarouselContext(component: string): CarouselContextValue;
|
|
32
|
+
/**
|
|
33
|
+
* Position of the slide being rendered. Supplied by `CarouselSlides`, which is
|
|
34
|
+
* the only part that knows the order — a slide can't count its own siblings.
|
|
35
|
+
*/
|
|
36
|
+
export declare const CarouselSlideIndexContext: import("react").Context<number | undefined>;
|
|
37
|
+
export declare function useSlideIndex(component: string): number;
|
|
38
|
+
/** Ids are derived rather than registered, so dot and slide always agree. */
|
|
39
|
+
export declare const slideId: (baseId: string, index: number) => string;
|
|
40
|
+
/**
|
|
41
|
+
* Brings an index into range — wrapping when the carousel loops, clamping when
|
|
42
|
+
* it doesn't. Also guards against a caller passing something out of range.
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveIndex(index: number, count: number, loop: boolean): number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { Carousel } from "./Carousel";
|
|
2
|
+
export type { CarouselProps } from "./Carousel";
|
|
3
|
+
export { CarouselSlides } from "./CarouselSlides";
|
|
4
|
+
export type { CarouselSlidesProps } from "./CarouselSlides";
|
|
5
|
+
export { CarouselSlide } from "./CarouselSlide";
|
|
6
|
+
export type { CarouselSlideProps } from "./CarouselSlide";
|
|
7
|
+
export { CarouselPrevious } from "./CarouselPrevious";
|
|
8
|
+
export type { CarouselPreviousProps } from "./CarouselPrevious";
|
|
9
|
+
export { CarouselNext } from "./CarouselNext";
|
|
10
|
+
export type { CarouselNextProps } from "./CarouselNext";
|
|
11
|
+
export { CarouselDots } from "./CarouselDots";
|
|
12
|
+
export type { CarouselDotsProps } from "./CarouselDots";
|
|
13
|
+
export { CarouselPlayPause } from "./CarouselPlayPause";
|
|
14
|
+
export type { CarouselPlayPauseProps } from "./CarouselPlayPause";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { FocusEvent, MouseEvent } from "react";
|
|
2
|
+
export type AutoRotateOptions = {
|
|
3
|
+
/** Whether rotation is meant to be running. */
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
/** Milliseconds between advances. */
|
|
6
|
+
interval: number;
|
|
7
|
+
/** Called on each tick. Read from a ref, so it needn't be stable. */
|
|
8
|
+
onTick: () => void;
|
|
9
|
+
};
|
|
10
|
+
export type AutoRotateResult = {
|
|
11
|
+
/** Handlers the root spreads to suspend rotation while it's being read. */
|
|
12
|
+
pauseProps: {
|
|
13
|
+
onMouseEnter: (event: MouseEvent<HTMLElement>) => void;
|
|
14
|
+
onMouseLeave: (event: MouseEvent<HTMLElement>) => void;
|
|
15
|
+
onFocus: (event: FocusEvent<HTMLElement>) => void;
|
|
16
|
+
onBlur: (event: FocusEvent<HTMLElement>) => void;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Drives auto-rotation, and suspends it whenever moving the slide would be
|
|
21
|
+
* unwelcome: while the pointer rests on the carousel, while focus is inside
|
|
22
|
+
* it, while the tab is in the background, and entirely when the reader has
|
|
23
|
+
* asked for reduced motion.
|
|
24
|
+
*
|
|
25
|
+
* These are all *transient* — they don't change whether rotation is enabled,
|
|
26
|
+
* only whether it's ticking right now.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useAutoRotate({ enabled, interval, onTick }: AutoRotateOptions): AutoRotateResult;
|
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ export { Breadcrumb, BreadcrumbItem } from './components/Breadcrumb';
|
|
|
54
54
|
export type { BreadcrumbProps, BreadcrumbItemProps } from './components/Breadcrumb';
|
|
55
55
|
export { Tabs, TabList, Tab, TabPanel } from './components/Tabs';
|
|
56
56
|
export type { TabsProps, TabListProps, TabProps, TabPanelProps, TabsOrientation, TabsActivation, } from './components/Tabs';
|
|
57
|
+
export { Carousel, CarouselSlides, CarouselSlide, CarouselPrevious, CarouselNext, CarouselDots, CarouselPlayPause, } from './components/Carousel';
|
|
58
|
+
export type { CarouselProps, CarouselSlidesProps, CarouselSlideProps, CarouselPreviousProps, CarouselNextProps, CarouselDotsProps, CarouselPlayPauseProps, } from './components/Carousel';
|
|
57
59
|
export { Skeleton, skeletonVariants, skeletonAnimations } from './components/Skeleton';
|
|
58
60
|
export type { SkeletonProps, SkeletonVariant, SkeletonAnimation } from './components/Skeleton';
|
|
59
61
|
export { Spinner, spinnerSizes } from './components/Spinner';
|
package/dist/sonahang-ui.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};let n=require("react/jsx-runtime"),r=require("react"),i=require("react-dom");var a=[`display`,`heading-1`,`heading-2`,`heading-3`,`heading-4`,`body-lg`,`body`,`body-sm`,`caption`],o=[`default`,`subtle`,`inverse`,`accent`],s=[`regular`,`medium`,`semibold`,`bold`],c={display:`h1`,"heading-1":`h1`,"heading-2":`h2`,"heading-3":`h3`,"heading-4":`h4`,"body-lg":`p`,body:`p`,"body-sm":`p`,caption:`span`};function l({as:e,variant:t=`body`,color:r=`default`,weight:i,align:a,className:o,style:s,children:l,...u}){let d=e??c[t],f=[`sh-text`,`sh-text--${t}`,`sh-text--color-${r}`,o].filter(Boolean).join(` `);return(0,n.jsx)(d,{className:f,style:{...i?{fontWeight:`var(--font-weight-${i})`}:void 0,...a?{textAlign:a}:void 0,...s},...u,children:l})}function u({variant:e=`primary`,size:t=`md`,fullWidth:n=!1,loading:r=!1,className:i}={}){return[`sh-button`,`sh-button--${e}`,`sh-button--${t}`,n&&`sh-button--full-width`,r&&`sh-button--loading`,i].filter(Boolean).join(` `)}function d({variant:e=`primary`,size:t=`md`,fullWidth:r=!1,icon:i,iconPosition:a=`left`,loading:o=!1,disabled:s,className:c,children:l,...d}){let f=e===`icon`,p=u({variant:e,size:t,fullWidth:r,loading:o,className:c});return(0,n.jsx)(`button`,{className:p,disabled:s||o,"aria-busy":o||void 0,...d,children:(0,n.jsxs)(`span`,{className:`sh-button__content`,children:[o&&(0,n.jsx)(`span`,{className:`sh-button__spinner`,"aria-hidden":`true`}),f?!o&&(0,n.jsx)(`span`,{className:`sh-button__icon`,children:i}):(0,n.jsxs)(n.Fragment,{children:[i&&a===`left`&&!o&&(0,n.jsx)(`span`,{className:`sh-button__icon`,children:i}),l,i&&a===`right`&&(0,n.jsx)(`span`,{className:`sh-button__icon`,children:i})]})]})})}var f=[`primary`,`secondary`,`outline`,`ghost`,`icon`],p=[`sm`,`md`,`lg`],m=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M3 13.5h4l1.5 2.5h7l1.5-2.5h4M3 13.5 5.8 6.2A1.5 1.5 0 0 1 7.2 5.2h9.6a1.5 1.5 0 0 1 1.4 1L21 13.5v3.3a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 16.8Z`,strokeLinecap:`round`,strokeLinejoin:`round`})});function h({title:e,description:t,icon:i,action:a,secondaryAction:o,headingLevel:s=3,size:c=`md`,children:l,className:f,...p}){let h=i===void 0?(0,n.jsx)(m,{}):i,g=h!==!1&&h!==null,_=(e,t)=>{let{label:r,href:i,onClick:a,icon:o,variant:s,target:l,rel:f}=e,p=s??t;return i===void 0?(0,n.jsx)(d,{variant:p,size:c===`sm`?`sm`:`md`,icon:o,onClick:a,children:r}):(0,n.jsx)(`a`,{href:i,target:l,rel:f??(l===`_blank`?`noopener noreferrer`:void 0),onClick:a,className:u({variant:p,size:c===`sm`?`sm`:`md`}),children:(0,n.jsxs)(`span`,{className:`sh-button__content`,children:[o&&(0,n.jsx)(`span`,{className:`sh-button__icon`,children:o}),r]})})};return(0,n.jsxs)(`div`,{className:[`sh-empty-state`,`sh-empty-state--${c}`,f].filter(Boolean).join(` `),...p,children:[g&&(0,n.jsx)(`span`,{className:`sh-empty-state__icon`,children:h}),(0,r.createElement)(`h${s}`,{className:`sh-empty-state__title`},e),t&&(0,n.jsx)(`p`,{className:`sh-empty-state__description`,children:t}),(a||o)&&(0,n.jsxs)(`div`,{className:`sh-empty-state__actions`,children:[a&&_(a,`primary`),o&&_(o,`secondary`)]}),l&&(0,n.jsx)(`div`,{className:`sh-empty-state__extra`,children:l})]})}function g({variant:e=`primary`,className:t,children:r,...i}){let a=[`sh-tag`,`sh-tag--${e}`,t].filter(Boolean).join(` `);return(0,n.jsx)(`span`,{className:a,...i,children:r})}var _=[`primary`,`secondary`,`outline`],v={add:(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M8 3.5v9M3.5 8h9`,strokeLinecap:`round`})}),remove:(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4.5 4.5l7 7M11.5 4.5l-7 7`,strokeLinecap:`round`})})},y={add:`Add`,remove:`Remove`};function b({variant:e=`primary`,action:t,onAction:r,actionLabel:i,disabled:a=!1,className:o,children:s,...c}){let l=[`sh-chip`,`sh-chip--${e}`,t&&`sh-chip--with-action`,a&&`sh-chip--disabled`,o].filter(Boolean).join(` `),u=i??(t?typeof s==`string`?`${y[t]} ${s}`:y[t]:void 0);return(0,n.jsxs)(`span`,{className:l,...c,children:[(0,n.jsx)(`span`,{className:`sh-chip__label`,children:s}),t&&(0,n.jsx)(`button`,{type:`button`,className:`sh-chip__action`,onClick:r,disabled:a,"aria-label":u,children:v[t]})]})}var x=[`primary`,`secondary`,`outline`],S=[`add`,`remove`],C=(0,r.createContext)(void 0);function w(e,t=2){let n=e.trim().split(/\s+/).filter(Boolean);return n.length===0?``:(n.length>t?[n[0],n[n.length-1]]:n).slice(0,t).map(e=>e.charAt(0).toUpperCase()).join(``)}var T=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,className:`sh-avatar__icon`,children:(0,n.jsx)(`path`,{d:`M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Zm0 1.8c-3.6 0-7.2 1.8-7.2 4.05V21h14.4v-3.15c0-2.25-3.6-4.05-7.2-4.05Z`})});function E({src:e,name:t,alt:i,size:a,className:o,children:s,...c}){let[l,u]=(0,r.useState)(void 0),d=(0,r.useContext)(C),f=a??d??`md`,p=!!e&&l!==e,m=t?w(t):``,h=i??t,g=[`sh-avatar`,`sh-avatar--${f}`,o].filter(Boolean).join(` `);return(0,n.jsx)(`span`,{className:g,...!p&&h?{role:`img`,"aria-label":h}:void 0,...c,children:p?(0,n.jsx)(`img`,{className:`sh-avatar__image`,src:e,alt:h??``,onError:()=>u(e)}):s??(0,n.jsx)(`span`,{className:`sh-avatar__fallback`,"aria-hidden":`true`,children:m||(0,n.jsx)(T,{})})})}function D({max:e,size:t=`md`,className:i,children:a,...o}){let s=r.Children.toArray(a).filter(r.isValidElement),c=typeof e==`number`&&e>=0?e:s.length,l=s.slice(0,c),u=s.length-l.length,d=[`sh-avatar-group`,i].filter(Boolean).join(` `);return(0,n.jsx)(C.Provider,{value:t,children:(0,n.jsxs)(`div`,{className:d,...o,children:[l,u>0&&(0,n.jsx)(`span`,{className:`sh-avatar sh-avatar--${t} sh-avatar--overflow`,role:`img`,"aria-label":`${u} more`,children:(0,n.jsxs)(`span`,{className:`sh-avatar__fallback`,"aria-hidden":`true`,children:[`+`,u]})})]})})}var O=[`sm`,`md`,`lg`];function k({label:e,helperText:t,error:i,icon:a,iconPosition:o=`left`,className:s,inputClassName:c,id:l,required:u,disabled:d,"aria-describedby":f,...p}){let m=(0,r.useId)(),h=l??m,g=`${h}-message`,_=!!i,v=i??t,y=[f,v?g:void 0].filter(Boolean).join(` `)||void 0,b=[`sh-input`,_&&`sh-input--invalid`,d&&`sh-input--disabled`,a&&`sh-input--with-icon-${o}`,s].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:b,children:[e&&(0,n.jsxs)(`label`,{className:`sh-input__label`,htmlFor:h,children:[e,u&&(0,n.jsx)(`span`,{className:`sh-input__required`,"aria-hidden":`true`,children:`*`})]}),(0,n.jsxs)(`span`,{className:`sh-input__field`,children:[a&&(0,n.jsx)(`span`,{className:`sh-input__icon`,"aria-hidden":`true`,children:a}),(0,n.jsx)(`input`,{id:h,className:[`sh-input__control`,c].filter(Boolean).join(` `),required:u,disabled:d,"aria-invalid":_||void 0,"aria-describedby":y,...p})]}),v&&(0,n.jsx)(`span`,{id:g,className:`sh-input__message`,children:v})]})}var A=[`numeric`,`alphanumeric`],j={numeric:/[0-9]/,alphanumeric:/[a-zA-Z0-9]/};function M(e,{length:t,type:n=`numeric`}){let r=j[n],i=``;for(let n of e){if(i.length>=t)break;r.test(n)&&(i+=n)}return i}function N({length:e=6,value:t,defaultValue:i=``,onChange:a,onComplete:o,type:s=`numeric`,mask:c=!1,groupSize:l,label:u,helperText:d,error:f,className:p,id:m,required:h,disabled:g,"aria-describedby":_,onFocus:v,onBlur:y,onSelect:b,onClick:x,...S}){let C=(0,r.useId)(),w=m??C,T=`${w}-message`,E=(0,r.useRef)(null),[D,O]=(0,r.useState)(!1),[k,A]=(0,r.useState)(0),[j,N]=(0,r.useState)(()=>M(i,{length:e,type:s})),P=t!==void 0,F=P?M(t,{length:e,type:s}):j,I=!!f,L=f??d,R=[_,L?T:void 0].filter(Boolean).join(` `)||void 0,z=()=>{let e=E.current;if(!e)return;let t=e.value.length;e.setSelectionRange(t,t),A(t)},ee=Array.from({length:e},(e,t)=>F[t]??``),B=D&&!g?Math.min(k,e-1):-1;return(0,n.jsxs)(`div`,{className:[`sh-input-otp`,I&&`sh-input-otp--invalid`,g&&`sh-input-otp--disabled`,p].filter(Boolean).join(` `),children:[u&&(0,n.jsxs)(`label`,{className:`sh-input-otp__label`,htmlFor:w,children:[u,h&&(0,n.jsx)(`span`,{className:`sh-input-otp__required`,"aria-hidden":`true`,children:`*`})]}),(0,n.jsxs)(`div`,{className:`sh-input-otp__field`,children:[(0,n.jsx)(`input`,{ref:E,id:w,className:`sh-input-otp__control`,value:F,required:h,disabled:g,inputMode:s===`numeric`?`numeric`:`text`,autoComplete:`one-time-code`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:!1,"aria-invalid":I||void 0,"aria-describedby":R,onChange:t=>{let n=M(t.target.value,{length:e,type:s});n!==F&&(P||N(n),a?.(n),n.length===e&&o?.(n))},onFocus:e=>{v?.(e),O(!0),z()},onBlur:e=>{y?.(e),O(!1)},onClick:e=>{x?.(e),z()},onSelect:e=>{b?.(e),A(e.currentTarget.selectionStart??F.length)},...S}),(0,n.jsx)(`div`,{className:`sh-input-otp__boxes`,"aria-hidden":`true`,children:ee.map((e,t)=>(0,n.jsxs)(r.Fragment,{children:[l!==void 0&&t>0&&t%l===0&&(0,n.jsx)(`span`,{className:`sh-input-otp__separator`}),(0,n.jsx)(`span`,{className:[`sh-input-otp__slot`,e&&`sh-input-otp__slot--filled`,t===B&&`sh-input-otp__slot--active`].filter(Boolean).join(` `),children:e&&c?`•`:e})]},t))})]}),L&&(0,n.jsx)(`span`,{id:T,className:`sh-input-otp__message`,children:L})]})}var P=(0,r.createContext)(void 0);function F(e){let t=(0,r.useContext)(P);if(!t)throw Error(`<${e}> must be rendered inside <Dropdown>.`);return t}function I({children:e,open:t,defaultOpen:i=!1,onOpenChange:a,placement:o=`bottom`,align:s=`start`,className:c,...l}){let u=(0,r.useId)(),d=(0,r.useRef)(null),f=(0,r.useRef)(null),[p,m]=(0,r.useState)(i),h=t!==void 0,g=h?t:p,[_,v]=(0,r.useState)(null),y=(0,r.useCallback)((e=null)=>{v(e),h||m(!0),a?.(!0)},[h,a]),b=(0,r.useCallback)(({restoreFocus:e=!0}={})=>{v(null),h||m(!1),a?.(!1),e&&d.current?.focus()},[h,a]);return(0,r.useEffect)(()=>{if(!g)return;let e=e=>{f.current?.contains(e.target)||b({restoreFocus:!1})};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[g,b]),(0,r.useEffect)(()=>{if(!g)return;let e=e=>{e.key===`Escape`&&(e.preventDefault(),b())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[g,b]),(0,n.jsx)(P.Provider,{value:{isOpen:g,open:y,close:b,focusOnOpen:_,triggerId:`${u}-trigger`,menuId:`${u}-menu`,triggerRef:d,placement:o,align:s},children:(0,n.jsx)(`div`,{ref:f,className:[`sh-dropdown`,c].filter(Boolean).join(` `),...l,children:e})})}function L({children:e,className:t,onClick:r,onKeyDown:i,...a}){let{isOpen:o,open:s,close:c,triggerId:l,menuId:u,triggerRef:d}=F(`DropdownTrigger`);return(0,n.jsx)(`button`,{ref:d,type:`button`,id:l,className:[`sh-dropdown__trigger`,t].filter(Boolean).join(` `),"aria-haspopup":`menu`,"aria-expanded":o,"aria-controls":o?u:void 0,onClick:e=>{r?.(e),!e.defaultPrevented&&(o?c({restoreFocus:!1}):s(`first`))},onKeyDown:e=>{i?.(e),!(e.defaultPrevented||o)&&(e.key===`ArrowDown`?(e.preventDefault(),s(`first`)):e.key===`ArrowUp`&&(e.preventDefault(),s(`last`)))},...a,children:e})}function R({children:e,className:t,onKeyDown:i,...a}){let{isOpen:o,close:s,focusOnOpen:c,triggerId:l,menuId:u,placement:d,align:f}=F(`DropdownMenu`),p=(0,r.useRef)(null),m=()=>Array.from(p.current?.querySelectorAll(`[role="menuitem"]:not([disabled])`)??[]);return(0,r.useEffect)(()=>{if(!o||!c)return;let e=m();(c===`last`?e[e.length-1]:e[0])?.focus()},[o,c]),o?(0,n.jsx)(`div`,{ref:p,id:u,className:[`sh-dropdown__menu`,`sh-dropdown__menu--${d}`,`sh-dropdown__menu--${f}`,t].filter(Boolean).join(` `),role:`menu`,"aria-labelledby":l,onKeyDown:e=>{if(i?.(e),e.defaultPrevented)return;if(e.key===`Tab`){s({restoreFocus:!1});return}if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=m();if(t.length===0)return;let n=t.indexOf(document.activeElement),r;r=e.key===`Home`?0:e.key===`End`?t.length-1:n===-1?0:e.key===`ArrowDown`?(n+1)%t.length:(n-1+t.length)%t.length,e.preventDefault(),t[r]?.focus()},...a,children:e}):null}function z({children:e,onSelect:t,closeOnSelect:r=!0,icon:i,destructive:a=!1,className:o,onClick:s,...c}){let{close:l}=F(`DropdownItem`);return(0,n.jsxs)(`button`,{type:`button`,role:`menuitem`,className:[`sh-dropdown__item`,a&&`sh-dropdown__item--destructive`,o].filter(Boolean).join(` `),tabIndex:-1,onClick:e=>{s?.(e),!e.defaultPrevented&&(t?.(),r&&l())},...c,children:[i&&(0,n.jsx)(`span`,{className:`sh-dropdown__item-icon`,"aria-hidden":`true`,children:i}),(0,n.jsx)(`span`,{className:`sh-dropdown__item-label`,children:e})]})}function ee({className:e,...t}){return(0,n.jsx)(`div`,{className:[`sh-dropdown__separator`,e].filter(Boolean).join(` `),role:`separator`,...t})}function B(e){let t=e.replace(/\r\n/g,`
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};let n=require("react/jsx-runtime"),r=require("react"),i=require("react-dom");var a=[`display`,`heading-1`,`heading-2`,`heading-3`,`heading-4`,`body-lg`,`body`,`body-sm`,`caption`],o=[`default`,`subtle`,`inverse`,`accent`],s=[`regular`,`medium`,`semibold`,`bold`],c={display:`h1`,"heading-1":`h1`,"heading-2":`h2`,"heading-3":`h3`,"heading-4":`h4`,"body-lg":`p`,body:`p`,"body-sm":`p`,caption:`span`};function l({as:e,variant:t=`body`,color:r=`default`,weight:i,align:a,className:o,style:s,children:l,...u}){let d=e??c[t],f=[`sh-text`,`sh-text--${t}`,`sh-text--color-${r}`,o].filter(Boolean).join(` `);return(0,n.jsx)(d,{className:f,style:{...i?{fontWeight:`var(--font-weight-${i})`}:void 0,...a?{textAlign:a}:void 0,...s},...u,children:l})}function u({variant:e=`primary`,size:t=`md`,fullWidth:n=!1,loading:r=!1,className:i}={}){return[`sh-button`,`sh-button--${e}`,`sh-button--${t}`,n&&`sh-button--full-width`,r&&`sh-button--loading`,i].filter(Boolean).join(` `)}function d({variant:e=`primary`,size:t=`md`,fullWidth:r=!1,icon:i,iconPosition:a=`left`,loading:o=!1,disabled:s,className:c,children:l,...d}){let f=e===`icon`,p=u({variant:e,size:t,fullWidth:r,loading:o,className:c});return(0,n.jsx)(`button`,{className:p,disabled:s||o,"aria-busy":o||void 0,...d,children:(0,n.jsxs)(`span`,{className:`sh-button__content`,children:[o&&(0,n.jsx)(`span`,{className:`sh-button__spinner`,"aria-hidden":`true`}),f?!o&&(0,n.jsx)(`span`,{className:`sh-button__icon`,children:i}):(0,n.jsxs)(n.Fragment,{children:[i&&a===`left`&&!o&&(0,n.jsx)(`span`,{className:`sh-button__icon`,children:i}),l,i&&a===`right`&&(0,n.jsx)(`span`,{className:`sh-button__icon`,children:i})]})]})})}var f=[`primary`,`secondary`,`outline`,`ghost`,`icon`],p=[`sm`,`md`,`lg`],m=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M3 13.5h4l1.5 2.5h7l1.5-2.5h4M3 13.5 5.8 6.2A1.5 1.5 0 0 1 7.2 5.2h9.6a1.5 1.5 0 0 1 1.4 1L21 13.5v3.3a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 16.8Z`,strokeLinecap:`round`,strokeLinejoin:`round`})});function h({title:e,description:t,icon:i,action:a,secondaryAction:o,headingLevel:s=3,size:c=`md`,children:l,className:f,...p}){let h=i===void 0?(0,n.jsx)(m,{}):i,g=h!==!1&&h!==null,_=(e,t)=>{let{label:r,href:i,onClick:a,icon:o,variant:s,target:l,rel:f}=e,p=s??t;return i===void 0?(0,n.jsx)(d,{variant:p,size:c===`sm`?`sm`:`md`,icon:o,onClick:a,children:r}):(0,n.jsx)(`a`,{href:i,target:l,rel:f??(l===`_blank`?`noopener noreferrer`:void 0),onClick:a,className:u({variant:p,size:c===`sm`?`sm`:`md`}),children:(0,n.jsxs)(`span`,{className:`sh-button__content`,children:[o&&(0,n.jsx)(`span`,{className:`sh-button__icon`,children:o}),r]})})};return(0,n.jsxs)(`div`,{className:[`sh-empty-state`,`sh-empty-state--${c}`,f].filter(Boolean).join(` `),...p,children:[g&&(0,n.jsx)(`span`,{className:`sh-empty-state__icon`,children:h}),(0,r.createElement)(`h${s}`,{className:`sh-empty-state__title`},e),t&&(0,n.jsx)(`p`,{className:`sh-empty-state__description`,children:t}),(a||o)&&(0,n.jsxs)(`div`,{className:`sh-empty-state__actions`,children:[a&&_(a,`primary`),o&&_(o,`secondary`)]}),l&&(0,n.jsx)(`div`,{className:`sh-empty-state__extra`,children:l})]})}function g({variant:e=`primary`,className:t,children:r,...i}){let a=[`sh-tag`,`sh-tag--${e}`,t].filter(Boolean).join(` `);return(0,n.jsx)(`span`,{className:a,...i,children:r})}var _=[`primary`,`secondary`,`outline`],v={add:(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M8 3.5v9M3.5 8h9`,strokeLinecap:`round`})}),remove:(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4.5 4.5l7 7M11.5 4.5l-7 7`,strokeLinecap:`round`})})},y={add:`Add`,remove:`Remove`};function b({variant:e=`primary`,action:t,onAction:r,actionLabel:i,disabled:a=!1,className:o,children:s,...c}){let l=[`sh-chip`,`sh-chip--${e}`,t&&`sh-chip--with-action`,a&&`sh-chip--disabled`,o].filter(Boolean).join(` `),u=i??(t?typeof s==`string`?`${y[t]} ${s}`:y[t]:void 0);return(0,n.jsxs)(`span`,{className:l,...c,children:[(0,n.jsx)(`span`,{className:`sh-chip__label`,children:s}),t&&(0,n.jsx)(`button`,{type:`button`,className:`sh-chip__action`,onClick:r,disabled:a,"aria-label":u,children:v[t]})]})}var x=[`primary`,`secondary`,`outline`],S=[`add`,`remove`],C=(0,r.createContext)(void 0);function w(e,t=2){let n=e.trim().split(/\s+/).filter(Boolean);return n.length===0?``:(n.length>t?[n[0],n[n.length-1]]:n).slice(0,t).map(e=>e.charAt(0).toUpperCase()).join(``)}var T=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,className:`sh-avatar__icon`,children:(0,n.jsx)(`path`,{d:`M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Zm0 1.8c-3.6 0-7.2 1.8-7.2 4.05V21h14.4v-3.15c0-2.25-3.6-4.05-7.2-4.05Z`})});function E({src:e,name:t,alt:i,size:a,className:o,children:s,...c}){let[l,u]=(0,r.useState)(void 0),d=(0,r.useContext)(C),f=a??d??`md`,p=!!e&&l!==e,m=t?w(t):``,h=i??t,g=[`sh-avatar`,`sh-avatar--${f}`,o].filter(Boolean).join(` `);return(0,n.jsx)(`span`,{className:g,...!p&&h?{role:`img`,"aria-label":h}:void 0,...c,children:p?(0,n.jsx)(`img`,{className:`sh-avatar__image`,src:e,alt:h??``,onError:()=>u(e)}):s??(0,n.jsx)(`span`,{className:`sh-avatar__fallback`,"aria-hidden":`true`,children:m||(0,n.jsx)(T,{})})})}function D({max:e,size:t=`md`,className:i,children:a,...o}){let s=r.Children.toArray(a).filter(r.isValidElement),c=typeof e==`number`&&e>=0?e:s.length,l=s.slice(0,c),u=s.length-l.length,d=[`sh-avatar-group`,i].filter(Boolean).join(` `);return(0,n.jsx)(C.Provider,{value:t,children:(0,n.jsxs)(`div`,{className:d,...o,children:[l,u>0&&(0,n.jsx)(`span`,{className:`sh-avatar sh-avatar--${t} sh-avatar--overflow`,role:`img`,"aria-label":`${u} more`,children:(0,n.jsxs)(`span`,{className:`sh-avatar__fallback`,"aria-hidden":`true`,children:[`+`,u]})})]})})}var O=[`sm`,`md`,`lg`];function k({label:e,helperText:t,error:i,icon:a,iconPosition:o=`left`,className:s,inputClassName:c,id:l,required:u,disabled:d,"aria-describedby":f,...p}){let m=(0,r.useId)(),h=l??m,g=`${h}-message`,_=!!i,v=i??t,y=[f,v?g:void 0].filter(Boolean).join(` `)||void 0,b=[`sh-input`,_&&`sh-input--invalid`,d&&`sh-input--disabled`,a&&`sh-input--with-icon-${o}`,s].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:b,children:[e&&(0,n.jsxs)(`label`,{className:`sh-input__label`,htmlFor:h,children:[e,u&&(0,n.jsx)(`span`,{className:`sh-input__required`,"aria-hidden":`true`,children:`*`})]}),(0,n.jsxs)(`span`,{className:`sh-input__field`,children:[a&&(0,n.jsx)(`span`,{className:`sh-input__icon`,"aria-hidden":`true`,children:a}),(0,n.jsx)(`input`,{id:h,className:[`sh-input__control`,c].filter(Boolean).join(` `),required:u,disabled:d,"aria-invalid":_||void 0,"aria-describedby":y,...p})]}),v&&(0,n.jsx)(`span`,{id:g,className:`sh-input__message`,children:v})]})}var A=[`numeric`,`alphanumeric`],j={numeric:/[0-9]/,alphanumeric:/[a-zA-Z0-9]/};function M(e,{length:t,type:n=`numeric`}){let r=j[n],i=``;for(let n of e){if(i.length>=t)break;r.test(n)&&(i+=n)}return i}function N({length:e=6,value:t,defaultValue:i=``,onChange:a,onComplete:o,type:s=`numeric`,mask:c=!1,groupSize:l,label:u,helperText:d,error:f,className:p,id:m,required:h,disabled:g,"aria-describedby":_,onFocus:v,onBlur:y,onSelect:b,onClick:x,...S}){let C=(0,r.useId)(),w=m??C,T=`${w}-message`,E=(0,r.useRef)(null),[D,O]=(0,r.useState)(!1),[k,A]=(0,r.useState)(0),[j,N]=(0,r.useState)(()=>M(i,{length:e,type:s})),P=t!==void 0,F=P?M(t,{length:e,type:s}):j,I=!!f,L=f??d,ee=[_,L?T:void 0].filter(Boolean).join(` `)||void 0,R=()=>{let e=E.current;if(!e)return;let t=e.value.length;e.setSelectionRange(t,t),A(t)},te=Array.from({length:e},(e,t)=>F[t]??``),z=D&&!g?Math.min(k,e-1):-1;return(0,n.jsxs)(`div`,{className:[`sh-input-otp`,I&&`sh-input-otp--invalid`,g&&`sh-input-otp--disabled`,p].filter(Boolean).join(` `),children:[u&&(0,n.jsxs)(`label`,{className:`sh-input-otp__label`,htmlFor:w,children:[u,h&&(0,n.jsx)(`span`,{className:`sh-input-otp__required`,"aria-hidden":`true`,children:`*`})]}),(0,n.jsxs)(`div`,{className:`sh-input-otp__field`,children:[(0,n.jsx)(`input`,{ref:E,id:w,className:`sh-input-otp__control`,value:F,required:h,disabled:g,inputMode:s===`numeric`?`numeric`:`text`,autoComplete:`one-time-code`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:!1,"aria-invalid":I||void 0,"aria-describedby":ee,onChange:t=>{let n=M(t.target.value,{length:e,type:s});n!==F&&(P||N(n),a?.(n),n.length===e&&o?.(n))},onFocus:e=>{v?.(e),O(!0),R()},onBlur:e=>{y?.(e),O(!1)},onClick:e=>{x?.(e),R()},onSelect:e=>{b?.(e),A(e.currentTarget.selectionStart??F.length)},...S}),(0,n.jsx)(`div`,{className:`sh-input-otp__boxes`,"aria-hidden":`true`,children:te.map((e,t)=>(0,n.jsxs)(r.Fragment,{children:[l!==void 0&&t>0&&t%l===0&&(0,n.jsx)(`span`,{className:`sh-input-otp__separator`}),(0,n.jsx)(`span`,{className:[`sh-input-otp__slot`,e&&`sh-input-otp__slot--filled`,t===z&&`sh-input-otp__slot--active`].filter(Boolean).join(` `),children:e&&c?`•`:e})]},t))})]}),L&&(0,n.jsx)(`span`,{id:T,className:`sh-input-otp__message`,children:L})]})}var P=(0,r.createContext)(void 0);function F(e){let t=(0,r.useContext)(P);if(!t)throw Error(`<${e}> must be rendered inside <Dropdown>.`);return t}function I({children:e,open:t,defaultOpen:i=!1,onOpenChange:a,placement:o=`bottom`,align:s=`start`,className:c,...l}){let u=(0,r.useId)(),d=(0,r.useRef)(null),f=(0,r.useRef)(null),[p,m]=(0,r.useState)(i),h=t!==void 0,g=h?t:p,[_,v]=(0,r.useState)(null),y=(0,r.useCallback)((e=null)=>{v(e),h||m(!0),a?.(!0)},[h,a]),b=(0,r.useCallback)(({restoreFocus:e=!0}={})=>{v(null),h||m(!1),a?.(!1),e&&d.current?.focus()},[h,a]);return(0,r.useEffect)(()=>{if(!g)return;let e=e=>{f.current?.contains(e.target)||b({restoreFocus:!1})};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[g,b]),(0,r.useEffect)(()=>{if(!g)return;let e=e=>{e.key===`Escape`&&(e.preventDefault(),b())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[g,b]),(0,n.jsx)(P.Provider,{value:{isOpen:g,open:y,close:b,focusOnOpen:_,triggerId:`${u}-trigger`,menuId:`${u}-menu`,triggerRef:d,placement:o,align:s},children:(0,n.jsx)(`div`,{ref:f,className:[`sh-dropdown`,c].filter(Boolean).join(` `),...l,children:e})})}function L({children:e,className:t,onClick:r,onKeyDown:i,...a}){let{isOpen:o,open:s,close:c,triggerId:l,menuId:u,triggerRef:d}=F(`DropdownTrigger`);return(0,n.jsx)(`button`,{ref:d,type:`button`,id:l,className:[`sh-dropdown__trigger`,t].filter(Boolean).join(` `),"aria-haspopup":`menu`,"aria-expanded":o,"aria-controls":o?u:void 0,onClick:e=>{r?.(e),!e.defaultPrevented&&(o?c({restoreFocus:!1}):s(`first`))},onKeyDown:e=>{i?.(e),!(e.defaultPrevented||o)&&(e.key===`ArrowDown`?(e.preventDefault(),s(`first`)):e.key===`ArrowUp`&&(e.preventDefault(),s(`last`)))},...a,children:e})}function ee({children:e,className:t,onKeyDown:i,...a}){let{isOpen:o,close:s,focusOnOpen:c,triggerId:l,menuId:u,placement:d,align:f}=F(`DropdownMenu`),p=(0,r.useRef)(null),m=()=>Array.from(p.current?.querySelectorAll(`[role="menuitem"]:not([disabled])`)??[]);return(0,r.useEffect)(()=>{if(!o||!c)return;let e=m();(c===`last`?e[e.length-1]:e[0])?.focus()},[o,c]),o?(0,n.jsx)(`div`,{ref:p,id:u,className:[`sh-dropdown__menu`,`sh-dropdown__menu--${d}`,`sh-dropdown__menu--${f}`,t].filter(Boolean).join(` `),role:`menu`,"aria-labelledby":l,onKeyDown:e=>{if(i?.(e),e.defaultPrevented)return;if(e.key===`Tab`){s({restoreFocus:!1});return}if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=m();if(t.length===0)return;let n=t.indexOf(document.activeElement),r;r=e.key===`Home`?0:e.key===`End`?t.length-1:n===-1?0:e.key===`ArrowDown`?(n+1)%t.length:(n-1+t.length)%t.length,e.preventDefault(),t[r]?.focus()},...a,children:e}):null}function R({children:e,onSelect:t,closeOnSelect:r=!0,icon:i,destructive:a=!1,className:o,onClick:s,...c}){let{close:l}=F(`DropdownItem`);return(0,n.jsxs)(`button`,{type:`button`,role:`menuitem`,className:[`sh-dropdown__item`,a&&`sh-dropdown__item--destructive`,o].filter(Boolean).join(` `),tabIndex:-1,onClick:e=>{s?.(e),!e.defaultPrevented&&(t?.(),r&&l())},...c,children:[i&&(0,n.jsx)(`span`,{className:`sh-dropdown__item-icon`,"aria-hidden":`true`,children:i}),(0,n.jsx)(`span`,{className:`sh-dropdown__item-label`,children:e})]})}function te({className:e,...t}){return(0,n.jsx)(`div`,{className:[`sh-dropdown__separator`,e].filter(Boolean).join(` `),role:`separator`,...t})}function z(e){let t=e.replace(/\r\n/g,`
|
|
2
2
|
`).split(`
|
|
3
3
|
`);for(;t.length>0&&t[0].trim()===``;)t.shift();for(;t.length>0&&t[t.length-1].trim()===``;)t.pop();if(t.length===0)return``;let n=t.filter(e=>e.trim()!==``).map(e=>e.length-e.trimStart().length),r=Math.min(...n);return t.map(e=>e.slice(r)).join(`
|
|
4
|
-
`)}var
|
|
4
|
+
`)}var ne=()=>(0,n.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,"aria-hidden":`true`,children:[(0,n.jsx)(`rect`,{x:`5.75`,y:`5.75`,width:`8`,height:`8`,rx:`1.5`}),(0,n.jsx)(`path`,{d:`M10.5 3.5A1.5 1.5 0 0 0 9 2H3.5A1.5 1.5 0 0 0 2 3.5V9a1.5 1.5 0 0 0 1.5 1.5`})]}),re=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M3.5 8.5l3 3 6-6.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),ie=2e3;function ae({children:e,filename:t,language:i,showLineNumbers:a=!1,wrap:o=!1,copyable:s=!0,copyLabel:c=`Copy code`,maxHeight:l,className:u,...d}){let f=z(e),p=(0,r.useId)(),[m,h]=(0,r.useState)(`idle`),g=(0,r.useRef)(void 0);(0,r.useEffect)(()=>()=>window.clearTimeout(g.current),[]);let _=async()=>{window.clearTimeout(g.current);try{await navigator.clipboard.writeText(f),h(`copied`)}catch{h(`error`)}g.current=window.setTimeout(()=>h(`idle`),ie)},v=t??i,y=v!==void 0||s;return(0,n.jsxs)(`div`,{className:[`sh-code-block`,o&&`sh-code-block--wrap`,a&&`sh-code-block--numbered`,u].filter(Boolean).join(` `),...d,children:[y&&(0,n.jsxs)(`div`,{className:`sh-code-block__header`,children:[v!==void 0&&(0,n.jsx)(`span`,{id:p,className:`sh-code-block__filename`,children:v}),s&&(0,n.jsx)(`button`,{type:`button`,className:`sh-code-block__copy`,"aria-label":c,onClick:_,children:m===`copied`?(0,n.jsx)(re,{}):(0,n.jsx)(ne,{})})]}),(0,n.jsx)(`pre`,{className:`sh-code-block__pre`,tabIndex:0,role:v===void 0?void 0:`group`,"aria-labelledby":v===void 0?void 0:p,style:l===void 0?void 0:{maxHeight:l},children:(0,n.jsx)(`code`,{className:[`sh-code-block__code`,i&&`language-${i}`].filter(Boolean).join(` `),children:a?f.split(`
|
|
5
5
|
`).map((e,t,r)=>(0,n.jsxs)(`span`,{className:`sh-code-block__line`,children:[e,t<r.length-1?`
|
|
6
|
-
`:``]},t)):f})}),s&&(0,n.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sh-code-block__status`,children:m===`copied`?`Copied`:m===`error`?`Copy failed`:``})]})}function V(e,t){if(!t)return e;let n=t===!0?typeof document>`u`?null:document.body:t;return n?(0,i.createPortal)(e,n):null}var H=0,U=null;function ae(){if(H===0){let{body:e}=document,t=e.style.overflow,n=e.style.paddingRight,r=window.innerWidth-document.documentElement.clientWidth;if(e.style.overflow=`hidden`,r>0){let t=Number.parseFloat(window.getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${t+r}px`}U=()=>{e.style.overflow=t,e.style.paddingRight=n}}H+=1;let e=!1;return()=>{e||(e=!0,--H,H===0&&(U?.(),U=null))}}function W({open:e,onClose:t,closeOnEscape:n,closeOnBackdropClick:i,initialFocus:a,lockScroll:o}){let s=(0,r.useRef)(null),c=(0,r.useRef)(null),l=(0,r.useId)();return(0,r.useEffect)(()=>{let t=s.current;if(t){if(!e){t.open&&t.close();return}return t.open||t.showModal(),a?.current?.focus(),o?ae():void 0}},[e,o]),(0,r.useEffect)(()=>{let e=s.current;if(!e)return;let r=e=>{e.preventDefault(),n&&t()};return e.addEventListener(`cancel`,r),()=>e.removeEventListener(`cancel`,r)},[n,t]),{titleId:`${l}-title`,descriptionId:`${l}-description`,surfaceProps:{ref:s,onMouseDown:e=>{c.current=e.target},onClick:e=>{i&&c.current===e.currentTarget&&e.target===e.currentTarget&&t()}}}}var oe=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4.5 4.5l7 7M11.5 4.5l-7 7`,strokeLinecap:`round`})});function se({open:e,onClose:t,title:r,description:i,children:a,footer:o,size:s=`md`,role:c=`dialog`,closeOnEscape:l=!0,closeOnBackdropClick:u=!0,showClose:d=!0,closeLabel:f=`Close`,initialFocus:p,lockScroll:m=!0,portal:h=!1,className:g,..._}){let{titleId:v,descriptionId:y,surfaceProps:b}=W({open:e,onClose:t,closeOnEscape:l,closeOnBackdropClick:u,initialFocus:p,lockScroll:m});return V((0,n.jsxs)(`dialog`,{role:c,"aria-labelledby":v,"aria-describedby":i?y:void 0,className:[`sh-dialog`,`sh-dialog--${s}`,g].filter(Boolean).join(` `),...b,..._,children:[(0,n.jsxs)(`div`,{className:`sh-dialog__header`,children:[(0,n.jsxs)(`div`,{className:`sh-dialog__heading`,children:[(0,n.jsx)(`h2`,{id:v,className:`sh-dialog__title`,children:r}),i&&(0,n.jsx)(`p`,{id:y,className:`sh-dialog__description`,children:i})]}),d&&(0,n.jsx)(`button`,{type:`button`,className:`sh-dialog__close`,"aria-label":f,onClick:t,children:(0,n.jsx)(oe,{})})]}),a!=null&&a!==!1&&(0,n.jsx)(`div`,{className:`sh-dialog__body`,children:a}),o&&(0,n.jsx)(`div`,{className:`sh-dialog__footer`,children:o})]}),h)}var ce=[`sm`,`md`,`lg`,`fullscreen`],le=[`dialog`,`alertdialog`],ue=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4.5 4.5l7 7M11.5 4.5l-7 7`,strokeLinecap:`round`})});function de({open:e,onClose:t,title:r,description:i,children:a,footer:o,side:s=`right`,size:c=`md`,closeOnEscape:l=!0,closeOnBackdropClick:u=!0,showClose:d=!0,closeLabel:f=`Close`,initialFocus:p,lockScroll:m=!0,portal:h=!1,className:g,..._}){let{titleId:v,descriptionId:y,surfaceProps:b}=W({open:e,onClose:t,closeOnEscape:l,closeOnBackdropClick:u,initialFocus:p,lockScroll:m});return V((0,n.jsxs)(`dialog`,{"aria-labelledby":v,"aria-describedby":i?y:void 0,className:[`sh-drawer`,`sh-drawer--${s}`,`sh-drawer--${c}`,g].filter(Boolean).join(` `),...b,..._,children:[(0,n.jsxs)(`div`,{className:`sh-drawer__header`,children:[(0,n.jsxs)(`div`,{className:`sh-drawer__heading`,children:[(0,n.jsx)(`h2`,{id:v,className:`sh-drawer__title`,children:r}),i&&(0,n.jsx)(`p`,{id:y,className:`sh-drawer__description`,children:i})]}),d&&(0,n.jsx)(`button`,{type:`button`,className:`sh-drawer__close`,"aria-label":f,onClick:t,children:(0,n.jsx)(ue,{})})]}),a!=null&&a!==!1&&(0,n.jsx)(`div`,{className:`sh-drawer__body`,children:a}),o&&(0,n.jsx)(`div`,{className:`sh-drawer__footer`,children:o})]}),h)}var fe=[`left`,`right`,`top`,`bottom`],pe=[`sm`,`md`,`lg`,`full`],G=[`top`,`bottom`,`right`,`left`];function me({trigger:e,tip:t,viewport:n,gap:r=8}){let i={top:e.top,bottom:n.height-e.bottom,left:e.left,right:n.width-e.right},a={top:t.height+r,bottom:t.height+r,left:t.width+r,right:t.width+r};return G.find(e=>i[e]>=a[e])||G.reduce((e,t)=>i[t]-a[t]>i[e]-a[e]?t:e)}var he=typeof window>`u`?r.useEffect:r.useLayoutEffect;function ge({children:e,content:t,placement:i=`top`,delay:a=150,open:o,defaultOpen:s=!1,onOpenChange:c,disabled:l=!1,className:u,...d}){let f=(0,r.useId)(),p=(0,r.useRef)(void 0),m=(0,r.useRef)(null),h=(0,r.useRef)(null),g=(0,r.useRef)(!1),[_,v]=(0,r.useState)(s),y=o!==void 0,b=y?o:_,x=!l&&t!=null&&t!==``,S=()=>{p.current!==void 0&&(window.clearTimeout(p.current),p.current=void 0)},C=(0,r.useCallback)(e=>{y||v(e),c?.(e)},[y,c]),w=()=>{!x||b||g.current||(S(),a>0?p.current=window.setTimeout(()=>C(!0),a):C(!0))},T=()=>{S(),b&&C(!1)};(0,r.useEffect)(()=>S,[]);let[E,D]=(0,r.useState)(`top`),O=i===`auto`,k=O?E:i;if(he(()=>{if(!O||!b||!x)return;let e=()=>{let e=m.current,t=h.current;!e||!t||D(me({trigger:e.getBoundingClientRect(),tip:{width:t.offsetWidth,height:t.offsetHeight},viewport:{width:window.innerWidth,height:window.innerHeight}}))};return e(),window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[O,b,x]),(0,r.useEffect)(()=>{if(!b||!x)return;let e=e=>{e.key===`Escape`&&C(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[b,x,C]),!(0,r.isValidElement)(e))throw Error(`<Tooltip> expects a single element child to describe.`);let A=x?(0,r.cloneElement)(e,{"aria-describedby":[e.props[`aria-describedby`],f].filter(Boolean).join(` `)}):e;return(0,n.jsxs)(`span`,{ref:m,className:[`sh-tooltip`,u].filter(Boolean).join(` `),onMouseEnter:w,onMouseLeave:()=>{g.current=!1,T()},onFocus:w,onBlur:()=>{g.current=!1,T()},onMouseDown:()=>{g.current=!0,T()},...d,children:[A,x&&(0,n.jsx)(`span`,{ref:h,id:f,role:`tooltip`,className:[`sh-tooltip__tip`,`sh-tooltip__tip--${k}`,b&&`sh-tooltip__tip--open`].filter(Boolean).join(` `),children:t})]})}var _e=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4 6.5 8 10.5l4-4`,strokeLinecap:`round`,strokeLinejoin:`round`})}),ve=e=>`options`in e;function ye({label:e,helperText:t,error:i,options:a,placeholder:o,icon:s,className:c,selectClassName:l,children:u,id:d,required:f,disabled:p,multiple:m,"aria-describedby":h,...g}){let _=(0,r.useId)(),v=d??_,y=`${v}-message`,b=!!i,x=i??t,S=[h,x?y:void 0].filter(Boolean).join(` `)||void 0,C=[`sh-select`,b&&`sh-select--invalid`,p&&`sh-select--disabled`,s&&`sh-select--with-icon`,m&&`sh-select--multiple`,c].filter(Boolean).join(` `),w=e=>(0,n.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value);return(0,n.jsxs)(`div`,{className:C,children:[e&&(0,n.jsxs)(`label`,{className:`sh-select__label`,htmlFor:v,children:[e,f&&(0,n.jsx)(`span`,{className:`sh-select__required`,"aria-hidden":`true`,children:`*`})]}),(0,n.jsxs)(`span`,{className:`sh-select__field`,children:[s&&(0,n.jsx)(`span`,{className:`sh-select__icon`,"aria-hidden":`true`,children:s}),(0,n.jsxs)(`select`,{...g,id:v,className:[`sh-select__control`,l].filter(Boolean).join(` `),required:f,disabled:p,multiple:m,"aria-invalid":b||void 0,"aria-describedby":S,children:[o&&(0,n.jsx)(`option`,{value:``,disabled:!0,children:o}),a?a.map(e=>ve(e)?(0,n.jsx)(`optgroup`,{label:e.label,children:e.options.map(w)},e.label):w(e)):u]}),!m&&(0,n.jsx)(`span`,{className:`sh-select__chevron`,"aria-hidden":`true`,children:(0,n.jsx)(_e,{})})]}),x&&(0,n.jsx)(`span`,{id:y,className:`sh-select__message`,children:x})]})}function be({label:e,helperText:t,error:i,resize:a=`vertical`,className:o,textareaClassName:s,id:c,rows:l=3,required:u,disabled:d,"aria-describedby":f,...p}){let m=(0,r.useId)(),h=c??m,g=`${h}-message`,_=!!i,v=i??t,y=[f,v?g:void 0].filter(Boolean).join(` `)||void 0,b=[`sh-textarea`,_&&`sh-textarea--invalid`,d&&`sh-textarea--disabled`,o].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:b,children:[e&&(0,n.jsxs)(`label`,{className:`sh-textarea__label`,htmlFor:h,children:[e,u&&(0,n.jsx)(`span`,{className:`sh-textarea__required`,"aria-hidden":`true`,children:`*`})]}),(0,n.jsx)(`textarea`,{id:h,className:[`sh-textarea__control`,`sh-textarea__control--resize-${a}`,s].filter(Boolean).join(` `),rows:l,required:u,disabled:d,"aria-invalid":_||void 0,"aria-describedby":y,...p}),v&&(0,n.jsx)(`span`,{id:g,className:`sh-textarea__message`,children:v})]})}var xe=(0,r.createContext)(void 0);function Se({value:e,label:t,indeterminate:i=!1,className:a,inputClassName:o,name:s,checked:c,disabled:l,onChange:u,ref:d,...f}){let p=(0,r.useContext)(xe),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{m.current&&(m.current.indeterminate=i)},[i]);let h=e=>{m.current=e,typeof d==`function`?d(e):d&&(d.current=e)},g=s??p?.name,_=p&&e!==void 0?p.value.includes(e):c,v=l??p?.disabled,y=t=>{p&&e!==void 0&&p.onToggle(e,t.target.checked),u?.(t)},b=[`sh-checkbox`,v&&`sh-checkbox--disabled`,a].filter(Boolean).join(` `);return(0,n.jsxs)(`label`,{className:b,children:[(0,n.jsx)(`input`,{...f,type:`checkbox`,ref:h,className:[`sh-checkbox__input`,o].filter(Boolean).join(` `),name:g,value:e,checked:_,disabled:v,onChange:y}),t&&(0,n.jsx)(`span`,{className:`sh-checkbox__label`,children:t})]})}function Ce({children:e,value:t,defaultValue:i,onChange:a,label:o,helperText:s,error:c,name:l,orientation:u=`vertical`,disabled:d=!1,"aria-label":f,className:p}){let m=(0,r.useId)(),h=(0,r.useId)(),g=(0,r.useId)(),_=l??m,[v,y]=(0,r.useState)(i??[]),b=t!==void 0,x=b?t:v,S=(e,t)=>{let n=t?[...x,e]:x.filter(t=>t!==e);b||y(n),a?.(n)},C=!!c,w=c??s,T=[`sh-checkbox-group`,C&&`sh-checkbox-group--invalid`,p].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:T,children:[o&&(0,n.jsx)(`span`,{className:`sh-checkbox-group__label`,id:h,children:o}),(0,n.jsx)(`div`,{className:`sh-checkbox-group__options sh-checkbox-group__options--${u}`,role:`group`,"aria-label":o?void 0:f,"aria-labelledby":o?h:void 0,"aria-describedby":w?g:void 0,"aria-invalid":C||void 0,children:(0,n.jsx)(xe.Provider,{value:{name:_,value:x,onToggle:S,disabled:d},children:e})}),w&&(0,n.jsx)(`span`,{id:g,className:`sh-checkbox-group__message`,children:w})]})}var we=(0,r.createContext)(void 0);function Te({value:e,label:t,className:i,inputClassName:a,name:o,checked:s,disabled:c,onChange:l,...u}){let d=(0,r.useContext)(we),f=o??d?.name,p=d?d.value===e:s,m=c??d?.disabled,h=t=>{d&&e!==void 0&&d.onSelect(e),l?.(t)},g=[`sh-radio`,m&&`sh-radio--disabled`,i].filter(Boolean).join(` `);return(0,n.jsxs)(`label`,{className:g,children:[(0,n.jsx)(`input`,{type:`radio`,className:[`sh-radio__input`,a].filter(Boolean).join(` `),name:f,value:e,checked:p,disabled:m,onChange:h,...u}),t&&(0,n.jsx)(`span`,{className:`sh-radio__label`,children:t})]})}function Ee({children:e,value:t,defaultValue:i,onChange:a,label:o,helperText:s,error:c,name:l,orientation:u=`vertical`,disabled:d=!1,"aria-label":f,className:p}){let m=(0,r.useId)(),h=(0,r.useId)(),g=(0,r.useId)(),_=l??m,[v,y]=(0,r.useState)(i),b=t!==void 0,x=b?t:v,S=e=>{b||y(e),a?.(e)},C=!!c,w=c??s,T=[`sh-radio-group`,C&&`sh-radio-group--invalid`,p].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:T,children:[o&&(0,n.jsx)(`span`,{className:`sh-radio-group__label`,id:h,children:o}),(0,n.jsx)(`div`,{className:`sh-radio-group__options sh-radio-group__options--${u}`,role:`radiogroup`,"aria-label":o?void 0:f,"aria-labelledby":o?h:void 0,"aria-describedby":w?g:void 0,"aria-invalid":C||void 0,children:(0,n.jsx)(we.Provider,{value:{name:_,value:x,onSelect:S,disabled:d},children:e})}),w&&(0,n.jsx)(`span`,{id:g,className:`sh-radio-group__message`,children:w})]})}var K=(e,t)=>t<e?[]:Array.from({length:t-e+1},(t,n)=>e+n);function De({page:e,count:t,siblingCount:n=1,boundaryCount:r=1}){if(t<=0)return[];let i=K(1,Math.min(r,t)),a=K(Math.max(t-r+1,r+1),t),o=Math.max(Math.min(e-n,t-r-n*2-1),r+2),s=Math.min(Math.max(e+n,r+n*2+2),a.length>0?a[0]-2:t-1);return[...i,...o>r+2?[`ellipsis`]:r+1<t-r?[r+1]:[],...K(o,s),...s<t-r-1?[`ellipsis`]:t-r>r?[t-r]:[],...a]}var Oe=({direction:e})=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:e===`left`?`M10 3.5 5.5 8l4.5 4.5`:`M6 3.5 10.5 8 6 12.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),ke=({direction:e})=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:e===`left`?`M8 3.5 3.5 8 8 12.5M13 3.5 8.5 8l4.5 4.5`:`M8 3.5 12.5 8 8 12.5M3 3.5 7.5 8 3 12.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Ae={first:`First page`,previous:`Previous page`,next:`Next page`,last:`Last page`,page:e=>`Page ${e}`};function je({count:e,page:t,defaultPage:i=1,onChange:a,siblingCount:o=1,boundaryCount:s=1,showFirstLast:c=!1,hidePrevNext:l=!1,disabled:u=!1,labels:d,"aria-label":f=`Pagination`,className:p,...m}){let[h,g]=(0,r.useState)(i),_=t!==void 0,v=_?t:h,y={...Ae,...d},b=t=>{t<1||t>e||t===v||(_||g(t),a?.(t))},x=De({page:v,count:e,siblingCount:o,boundaryCount:s});if(e<=0)return null;let S=(t,r,i,a)=>(0,n.jsx)(`li`,{className:`sh-pagination__item`,children:(0,n.jsx)(`button`,{type:`button`,className:`sh-pagination__control`,onClick:()=>b(i),disabled:u||i<1||i>e||i===v,"aria-label":r,children:a})},t);return(0,n.jsx)(`nav`,{className:[`sh-pagination`,p].filter(Boolean).join(` `),"aria-label":f,...m,children:(0,n.jsxs)(`ul`,{className:`sh-pagination__list`,children:[c&&S(`first`,y.first,1,(0,n.jsx)(ke,{direction:`left`})),!l&&S(`prev`,y.previous,v-1,(0,n.jsx)(Oe,{direction:`left`})),x.map((e,t)=>e===`ellipsis`?(0,n.jsx)(`li`,{className:`sh-pagination__item`,children:(0,n.jsx)(`span`,{className:`sh-pagination__ellipsis`,"aria-hidden":`true`,children:`…`})},`ellipsis-${t}`):(0,n.jsx)(`li`,{className:`sh-pagination__item`,children:(0,n.jsx)(`button`,{type:`button`,className:[`sh-pagination__page`,e===v&&`sh-pagination__page--current`].filter(Boolean).join(` `),onClick:()=>b(e),disabled:u,"aria-label":y.page(e),"aria-current":e===v?`page`:void 0,children:e})},e)),!l&&S(`next`,y.next,v+1,(0,n.jsx)(Oe,{direction:`right`})),c&&S(`last`,y.last,e,(0,n.jsx)(ke,{direction:`right`}))]})})}var Me=(0,r.createContext)(void 0);function Ne(e){let t=(0,r.useContext)(Me);if(!t)throw Error(`<${e}> must be rendered inside <Accordion>.`);return t}var Pe=(e,t)=>`${e}-trigger-${t}`,Fe=(e,t)=>`${e}-panel-${t}`;function Ie({children:e,type:t=`single`,value:i,defaultValue:a,onChange:o,collapsible:s=!0,headingLevel:c=3,className:l,...u}){let d=(0,r.useId)(),[f,p]=(0,r.useState)(a??[]),m=i!==void 0,h=m?i:f;return(0,n.jsx)(Me.Provider,{value:{value:h,toggle:e=>{let n=h.includes(e),r;r=t===`multiple`?n?h.filter(t=>t!==e):[...h,e]:n?s?[]:h:[e],m||p(r),o?.(r)},baseId:d,headingLevel:c},children:(0,n.jsx)(`div`,{className:[`sh-accordion`,l].filter(Boolean).join(` `),...u,children:e})})}var Le=()=>(0,n.jsx)(`svg`,{className:`sh-accordion__chevron`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4 6.5 8 10.5l4-4`,strokeLinecap:`round`,strokeLinejoin:`round`})});function Re({value:e,title:t,children:i,disabled:a=!1,className:o,...s}){let{value:c,toggle:l,baseId:u,headingLevel:d}=Ne(`AccordionItem`),f=c.includes(e),p=(0,n.jsxs)(`button`,{type:`button`,id:Pe(u,e),className:`sh-accordion__trigger`,"aria-expanded":f,"aria-controls":Fe(u,e),disabled:a,onClick:()=>l(e),children:[(0,n.jsx)(`span`,{className:`sh-accordion__title`,children:t}),(0,n.jsx)(Le,{})]});return(0,n.jsxs)(`div`,{className:[`sh-accordion__item`,f&&`sh-accordion__item--open`,a&&`sh-accordion__item--disabled`,o].filter(Boolean).join(` `),...s,children:[(0,r.createElement)(`h${d}`,{className:`sh-accordion__heading`},p),(0,n.jsx)(`div`,{id:Fe(u,e),className:`sh-accordion__panel`,role:`region`,"aria-labelledby":Pe(u,e),children:(0,n.jsx)(`div`,{className:`sh-accordion__panel-inner`,children:(0,n.jsx)(`div`,{className:`sh-accordion__content`,children:i})})})]})}var ze=(0,r.createContext)(void 0);function Be(e){let t=(0,r.useContext)(ze);if(!t)throw Error(`<${e}> must be rendered inside <Stepper>.`);return t}function Ve({children:e,activeStep:t=0,orientation:i=`horizontal`,"aria-label":a=`Progress`,className:o,...s}){let c=r.Children.toArray(e).filter(r.isValidElement),l=e=>e<t?`complete`:e===t?`current`:`upcoming`;return(0,n.jsx)(`ol`,{className:[`sh-stepper`,`sh-stepper--${i}`,o].filter(Boolean).join(` `),"aria-label":a,...s,children:c.map((e,t)=>(0,n.jsx)(ze.Provider,{value:{index:t,isLast:t===c.length-1,status:l(t),orientation:i},children:e},e.key??t))})}var He=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:2,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M3.5 8.5l3 3 6-6.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Ue=()=>(0,n.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:2,"aria-hidden":`true`,children:[(0,n.jsx)(`path`,{d:`M8 4.5v4.5`,strokeLinecap:`round`}),(0,n.jsx)(`circle`,{cx:`8`,cy:`11.6`,r:`0.9`,fill:`currentColor`,stroke:`none`})]});function We({title:e,description:t,status:r,icon:i,onClick:a,disabled:o=!1,className:s}){let{index:c,isLast:l,status:u,orientation:d}=Be(`Step`),f=r??u,p=i??(f===`complete`?(0,n.jsx)(He,{}):f===`error`?(0,n.jsx)(Ue,{}):c+1),m=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`span`,{className:`sh-step__indicator`,children:p}),(0,n.jsxs)(`span`,{className:`sh-step__text`,children:[(0,n.jsx)(`span`,{className:`sh-step__title`,children:e}),t&&(0,n.jsx)(`span`,{className:`sh-step__description`,children:t})]})]});return(0,n.jsxs)(`li`,{className:[`sh-step`,`sh-step--${f}`,`sh-step--${d}`,l&&`sh-step--last`,s].filter(Boolean).join(` `),children:[a?(0,n.jsx)(`button`,{type:`button`,className:`sh-step__body sh-step__body--interactive`,onClick:a,disabled:o,"aria-current":f===`current`?`step`:void 0,children:m}):(0,n.jsx)(`span`,{className:`sh-step__body`,"aria-current":f===`current`?`step`:void 0,children:m}),!l&&(0,n.jsx)(`span`,{className:`sh-step__connector`,"aria-hidden":`true`})]})}var Ge=(0,r.createContext)(void 0);function Ke(e){let t=(0,r.useContext)(Ge);if(!t)throw Error(`<${e}> must be rendered inside <Breadcrumb>.`);return t}var qe=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,children:(0,n.jsx)(`path`,{d:`M6 3.5 10.5 8 6 12.5`,strokeLinecap:`round`,strokeLinejoin:`round`})});function Je({children:e,separator:t=(0,n.jsx)(qe,{}),"aria-label":i=`Breadcrumb`,className:a,...o}){let s=r.Children.toArray(e).filter(r.isValidElement);return(0,n.jsx)(`nav`,{className:[`sh-breadcrumb`,a].filter(Boolean).join(` `),"aria-label":i,...o,children:(0,n.jsx)(`ol`,{className:`sh-breadcrumb__list`,children:s.map((e,r)=>(0,n.jsx)(Ge.Provider,{value:{isLast:r===s.length-1,separator:t},children:e},e.key??r))})})}function Ye({children:e,href:t,current:r,className:i,...a}){let{isLast:o,separator:s}=Ke(`BreadcrumbItem`),c=r??o;return(0,n.jsxs)(`li`,{className:[`sh-breadcrumb__item`,i].filter(Boolean).join(` `),children:[c?(0,n.jsx)(`span`,{className:`sh-breadcrumb__current`,"aria-current":`page`,children:e}):t?(0,n.jsx)(`a`,{className:`sh-breadcrumb__link`,href:t,...a,children:e}):(0,n.jsx)(`span`,{className:`sh-breadcrumb__text`,children:e}),!o&&(0,n.jsx)(`span`,{className:`sh-breadcrumb__separator`,"aria-hidden":`true`,children:s})]})}var Xe=(0,r.createContext)(void 0);function q(e){let t=(0,r.useContext)(Xe);if(!t)throw Error(`<${e}> must be rendered inside <Tabs>.`);return t}var Ze=(e,t)=>`${e}-tab-${t}`,Qe=(e,t)=>`${e}-panel-${t}`;function $e({children:e,value:t,defaultValue:i,onChange:a,orientation:o=`horizontal`,activation:s=`automatic`,className:c,...l}){let u=(0,r.useId)(),[d,f]=(0,r.useState)(i),p=t!==void 0,m=p?t:d,h=e=>{p||f(e),a?.(e)},g=[`sh-tabs`,`sh-tabs--${o}`,c].filter(Boolean).join(` `);return(0,n.jsx)(Xe.Provider,{value:{value:m,select:h,baseId:u,orientation:o,activation:s},children:(0,n.jsx)(`div`,{className:g,...l,children:e})})}var et=typeof window>`u`?r.useEffect:r.useLayoutEffect;function tt({children:e,className:t,onKeyDown:i,...a}){let{value:o,orientation:s,activation:c,select:l}=q(`TabList`),u=(0,r.useRef)(null),[d,f]=(0,r.useState)(null),p=s===`vertical`;return et(()=>{let e=u.current;if(!e)return;let t=Array.from(e.querySelectorAll(`[role="tab"]`)).find(e=>e.dataset.value===o);if(!t){f(null);return}let n=()=>{let e=p?t.offsetTop:t.offsetLeft,n=p?t.offsetHeight:t.offsetWidth;f(t=>({offset:e,size:n,animated:t!==null}))};if(n(),typeof ResizeObserver>`u`)return;let r=new ResizeObserver(n);return r.observe(e),r.observe(t),()=>r.disconnect()},[o,p]),(0,n.jsxs)(`div`,{ref:u,className:[`sh-tabs__list`,t].filter(Boolean).join(` `),role:`tablist`,"aria-orientation":s,onKeyDown:e=>{if(i?.(e),e.defaultPrevented||!u.current)return;let t=p?`ArrowDown`:`ArrowRight`;if(![t,p?`ArrowUp`:`ArrowLeft`,`Home`,`End`].includes(e.key))return;let n=Array.from(u.current.querySelectorAll(`[role="tab"]:not([disabled])`));if(n.length===0)return;let r=n.indexOf(document.activeElement),a;a=e.key===`Home`?0:e.key===`End`?n.length-1:r===-1?0:e.key===t?(r+1)%n.length:(r-1+n.length)%n.length;let o=n[a];if(o&&(e.preventDefault(),o.focus(),c===`automatic`)){let e=o.dataset.value;e!==void 0&&l(e)}},...a,children:[e,d&&(0,n.jsx)(`span`,{className:[`sh-tabs__indicator`,d.animated&&`sh-tabs__indicator--animated`].filter(Boolean).join(` `),"aria-hidden":`true`,style:{"--sh-tabs-indicator-offset":`${d.offset}px`,"--sh-tabs-indicator-size":`${d.size}px`}})]})}function nt({value:e,children:t,className:r,disabled:i,onClick:a,...o}){let{value:s,select:c,baseId:l}=q(`Tab`),u=s===e,d=[`sh-tabs__tab`,u&&`sh-tabs__tab--selected`,r].filter(Boolean).join(` `);return(0,n.jsx)(`button`,{type:`button`,role:`tab`,id:Ze(l,e),className:d,"data-value":e,"aria-selected":u,"aria-controls":Qe(l,e),tabIndex:u?0:-1,disabled:i,onClick:t=>{a?.(t),t.defaultPrevented||c(e)},...o,children:t})}function rt({value:e,children:t,keepMounted:r=!1,className:i,...a}){let{value:o,baseId:s}=q(`TabPanel`),c=o===e;return!c&&!r?null:(0,n.jsx)(`div`,{id:Qe(s,e),className:[`sh-tabs__panel`,i].filter(Boolean).join(` `),role:`tabpanel`,"aria-labelledby":Ze(s,e),hidden:!c,tabIndex:0,...a,children:t})}var it=e=>typeof e==`number`?`${e}px`:e;function at({variant:e=`text`,width:t,height:r,lines:i=1,animation:a=`pulse`,className:o,...s}){let c=[`sh-skeleton`,`sh-skeleton--${e}`,`sh-skeleton--${a}`].join(` `),l={width:it(t),height:it(r??(e===`circular`?t:void 0))};return e===`text`&&i>1?(0,n.jsx)(`div`,{className:[`sh-skeleton-lines`,o].filter(Boolean).join(` `),"aria-hidden":`true`,...s,children:Array.from({length:i},(e,t)=>(0,n.jsx)(`span`,{className:c,style:t===i-1?{...l,width:`60%`}:l},t))}):(0,n.jsx)(`span`,{className:[c,o].filter(Boolean).join(` `),style:l,"aria-hidden":`true`,...s})}var ot=[`text`,`rectangular`,`circular`],st=[`pulse`,`wave`,`none`];function ct({size:e=`md`,label:t=`Loading`,showLabel:i=!1,className:a,...o}){let s=(0,r.useId)(),c=[`sh-spinner`,`sh-spinner--${e}`,i&&`sh-spinner--with-label`,a].filter(Boolean).join(` `);return(0,n.jsxs)(`span`,{className:c,role:`status`,"aria-labelledby":s,...o,children:[(0,n.jsx)(`span`,{className:`sh-spinner__ring`,"aria-hidden":`true`}),(0,n.jsx)(`span`,{id:s,className:i?`sh-spinner__label`:`sh-spinner__label--visually-hidden`,children:t})]})}var lt=[`sm`,`md`,`lg`];function ut({value:e,max:t=100,label:i,showValue:a=!1,formatValue:o,size:s=`md`,"aria-label":c,className:l,...u}){let d=(0,r.useId)(),f=e===void 0,p=t>0?t:0,m=f?0:Math.min(Math.max(e,0),p),h=p===0?0:m/p*100,g=o?o(m,p):`${Math.round(h)}%`,_=[`sh-progress`,`sh-progress--${s}`,f&&`sh-progress--indeterminate`,l].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:_,...u,children:[(i||a&&!f)&&(0,n.jsxs)(`span`,{className:`sh-progress__header`,children:[i&&(0,n.jsx)(`span`,{className:`sh-progress__label`,id:d,children:i}),a&&!f&&(0,n.jsx)(`span`,{className:`sh-progress__value`,children:g})]}),(0,n.jsx)(`div`,{className:`sh-progress__track`,role:`progressbar`,"aria-label":i?void 0:c,"aria-labelledby":i?d:void 0,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":f?void 0:m,"aria-valuetext":f?void 0:o?g:void 0,children:(0,n.jsx)(`div`,{className:`sh-progress__bar`,style:{"--sh-progress-fill":`${h}%`}})})]})}var dt=[`sm`,`md`,`lg`],ft={success:(0,n.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,"aria-hidden":`true`,children:[(0,n.jsx)(`circle`,{cx:`10`,cy:`10`,r:`7.5`}),(0,n.jsx)(`path`,{d:`M6.75 10.25l2.25 2.25 4.25-4.75`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),info:(0,n.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,"aria-hidden":`true`,children:[(0,n.jsx)(`circle`,{cx:`10`,cy:`10`,r:`7.5`}),(0,n.jsx)(`path`,{d:`M10 9v4.5`,strokeLinecap:`round`}),(0,n.jsx)(`circle`,{cx:`10`,cy:`6.4`,r:`0.9`,fill:`currentColor`,stroke:`none`})]}),warning:(0,n.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,"aria-hidden":`true`,children:[(0,n.jsx)(`path`,{d:`M10 2.8 18 16.5H2L10 2.8Z`,strokeLinejoin:`round`}),(0,n.jsx)(`path`,{d:`M10 8v3.5`,strokeLinecap:`round`}),(0,n.jsx)(`circle`,{cx:`10`,cy:`13.9`,r:`0.9`,fill:`currentColor`,stroke:`none`})]}),error:(0,n.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,"aria-hidden":`true`,children:[(0,n.jsx)(`circle`,{cx:`10`,cy:`10`,r:`7.5`}),(0,n.jsx)(`path`,{d:`M7.5 7.5l5 5M12.5 7.5l-5 5`,strokeLinecap:`round`})]})},pt=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4.5 4.5l7 7M11.5 4.5l-7 7`,strokeLinecap:`round`})}),mt={success:`status`,info:`status`,warning:`alert`,error:`alert`};function ht({variant:e=`info`,title:t,children:r,icon:i,onDismiss:a,dismissLabel:o=`Dismiss`,role:s,className:c,...l}){let u=[`sh-alert`,`sh-alert--${e}`,c].filter(Boolean).join(` `),d=i===void 0?ft[e]:i;return(0,n.jsxs)(`div`,{className:u,role:s??mt[e],...l,children:[d!==!1&&(0,n.jsx)(`span`,{className:`sh-alert__icon`,children:d}),(0,n.jsxs)(`div`,{className:`sh-alert__content`,children:[t&&(0,n.jsx)(`p`,{className:`sh-alert__title`,children:t}),r&&(0,n.jsx)(`div`,{className:`sh-alert__body`,children:r})]}),a&&(0,n.jsx)(`button`,{type:`button`,className:`sh-alert__dismiss`,onClick:a,"aria-label":o,children:(0,n.jsx)(pt,{})})]})}var gt=[`success`,`info`,`warning`,`error`];function J(e,t){if(!t)return!0;let n=t.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean);if(n.length===0)return!0;let r=e.name.toLowerCase(),i=e.type.toLowerCase();return n.some(e=>e.startsWith(`.`)?r.endsWith(e):e.endsWith(`/*`)?i.startsWith(e.slice(0,-1)):i===e)}function _t(e){if(e<1024)return`${e} B`;let t=[`KB`,`MB`,`GB`,`TB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${Math.round(n*10)/10} ${t[r]}`}var vt=()=>(0,n.jsxs)(`svg`,{className:`sh-filedrop__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,n.jsx)(`path`,{d:`M12 16V4m0 0L8 8m4-4 4 4`}),(0,n.jsx)(`path`,{d:`M4 15v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3`})]}),yt=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4.5 4.5l7 7M11.5 4.5l-7 7`,strokeLinecap:`round`})});function bt({label:e,helperText:t,error:i,placeholder:a=`Drag files here, or click to browse`,accept:o,multiple:s=!1,value:c,defaultValue:l,onChange:u,onReject:d,hideFileList:f=!1,disabled:p=!1,name:m,"aria-label":h,className:g,inputClassName:_}){let v=(0,r.useId)(),y=(0,r.useId)(),[b,x]=(0,r.useState)(l??[]),S=c!==void 0,C=S?c:b,[w,T]=(0,r.useState)(!1),E=(0,r.useRef)(0),D=!!i,O=i??t,k=e=>{S||x(e),u?.(e)},A=e=>{let t=e.filter(e=>J(e,o)),n=e.filter(e=>!J(e,o));n.length>0&&d?.(n),t.length!==0&&k(s?[...C,...t]:[t[0]])},j=e=>{A(Array.from(e.target.files??[])),e.target.value=``},M=e=>{p||(e.preventDefault(),E.current+=1,T(!0))},N=e=>{p||e.preventDefault()},P=e=>{p||(e.preventDefault(),--E.current,E.current<=0&&(E.current=0,T(!1)))},F=e=>{p||(e.preventDefault(),E.current=0,T(!1),A(Array.from(e.dataTransfer?.files??[])))},I=e=>{k(C.filter((t,n)=>n!==e))},L=[`sh-filedrop`,D&&`sh-filedrop--invalid`,p&&`sh-filedrop--disabled`,w&&`sh-filedrop--dragging`,g].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:L,children:[e&&(0,n.jsx)(`label`,{className:`sh-filedrop__label`,htmlFor:v,children:e}),(0,n.jsxs)(`label`,{className:`sh-filedrop__dropzone`,onDragEnter:M,onDragOver:N,onDragLeave:P,onDrop:F,children:[(0,n.jsx)(`input`,{id:v,type:`file`,className:[`sh-filedrop__input`,_].filter(Boolean).join(` `),accept:o,multiple:s,disabled:p,name:m,onChange:j,"aria-label":e?void 0:h,"aria-invalid":D||void 0,"aria-describedby":O?y:void 0}),(0,n.jsxs)(`span`,{className:`sh-filedrop__prompt`,"aria-hidden":`true`,children:[(0,n.jsx)(vt,{}),(0,n.jsx)(`span`,{className:`sh-filedrop__placeholder`,children:a}),o&&(0,n.jsx)(`span`,{className:`sh-filedrop__accept`,children:o})]})]}),!f&&C.length>0&&(0,n.jsx)(`ul`,{className:`sh-filedrop__files`,children:C.map((e,t)=>(0,n.jsxs)(`li`,{className:`sh-filedrop__file`,children:[(0,n.jsx)(`span`,{className:`sh-filedrop__file-name`,children:e.name}),(0,n.jsx)(`span`,{className:`sh-filedrop__file-size`,children:_t(e.size)}),(0,n.jsx)(`button`,{type:`button`,className:`sh-filedrop__file-remove`,onClick:()=>I(t),disabled:p,"aria-label":`Remove ${e.name}`,children:(0,n.jsx)(yt,{})})]},`${e.name}-${t}`))}),O&&(0,n.jsx)(`span`,{id:y,className:`sh-filedrop__message`,children:O})]})}function xt({label:e,helperText:t,error:i,value:a,defaultValue:o,onChange:s,min:c=0,max:l=100,step:u=1,showValue:d=!1,formatValue:f,className:p,inputClassName:m,id:h,disabled:g,"aria-describedby":_,...v}){let y=(0,r.useId)(),b=h??y,x=`${b}-message`,[S,C]=(0,r.useState)(o??c),w=a!==void 0,T=w?a:S,E=!!i,D=i??t,O=[_,D?x:void 0].filter(Boolean).join(` `)||void 0,k=e=>{let t=Number(e.target.value);w||C(t),s?.(t)},A=l===c?0:(T-c)/(l-c)*100,j=f?f(T):String(T),M=[`sh-range`,E&&`sh-range--invalid`,g&&`sh-range--disabled`,p].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:M,children:[(e||d)&&(0,n.jsxs)(`span`,{className:`sh-range__header`,children:[e&&(0,n.jsx)(`label`,{className:`sh-range__label`,htmlFor:b,children:e}),d&&(0,n.jsx)(`span`,{className:`sh-range__value`,children:j})]}),(0,n.jsx)(`input`,{...v,type:`range`,id:b,className:[`sh-range__input`,m].filter(Boolean).join(` `),style:{"--sh-range-fill":`${A}%`},min:c,max:l,step:u,value:T,disabled:g,onChange:k,"aria-invalid":E||void 0,"aria-describedby":O,"aria-valuetext":f?j:void 0}),D&&(0,n.jsx)(`span`,{id:x,className:`sh-range__message`,children:D})]})}function St({label:e,helperText:t,error:i,value:a,defaultValue:o,onChange:s,min:c=0,max:l=100,step:u=1,minGap:d=0,showValue:f=!1,formatValue:p,name:m,disabled:h=!1,"aria-label":g,className:_}){let v=(0,r.useId)(),y=(0,r.useId)(),[b,x]=(0,r.useState)(o??[c,l]),S=a!==void 0,[C,w]=S?a:b,T=!!i,E=i??t,D=e=>{S||x(e),s?.(e)},O=e=>{D([Math.min(Number(e.target.value),w-d),w])},k=e=>{D([C,Math.max(Number(e.target.value),C+d)])},A=e=>l===c?0:(e-c)/(l-c)*100,j=A(C),M=A(w),N=e=>p?p(e):String(e),P=C>(c+l)/2,F=[`sh-minmax`,T&&`sh-minmax--invalid`,h&&`sh-minmax--disabled`,P&&`sh-minmax--from-on-top`,_].filter(Boolean).join(` `),I=e?void 0:g,L=t=>e||g?`${e??g} ${t}`:t;return(0,n.jsxs)(`div`,{className:F,style:{"--sh-minmax-from":`${j}%`,"--sh-minmax-to":`${M}%`},children:[(e||f)&&(0,n.jsxs)(`span`,{className:`sh-minmax__header`,children:[e&&(0,n.jsx)(`span`,{className:`sh-minmax__label`,id:v,children:e}),f&&(0,n.jsxs)(`span`,{className:`sh-minmax__value`,children:[N(C),` – `,N(w)]})]}),(0,n.jsxs)(`div`,{className:`sh-minmax__rail`,role:`group`,"aria-label":I,"aria-labelledby":e?v:void 0,"aria-describedby":E?y:void 0,"aria-invalid":T||void 0,children:[(0,n.jsx)(`span`,{className:`sh-minmax__track`,"aria-hidden":`true`,children:(0,n.jsx)(`span`,{className:`sh-minmax__fill`})}),(0,n.jsx)(`input`,{type:`range`,className:`sh-minmax__input sh-minmax__input--from`,name:m?`${m}-min`:void 0,min:c,max:l,step:u,value:C,disabled:h,onChange:O,"aria-label":L(`minimum`),"aria-valuetext":p?N(C):void 0}),(0,n.jsx)(`input`,{type:`range`,className:`sh-minmax__input sh-minmax__input--to`,name:m?`${m}-max`:void 0,min:c,max:l,step:u,value:w,disabled:h,onChange:k,"aria-label":L(`maximum`),"aria-valuetext":p?N(w):void 0})]}),E&&(0,n.jsx)(`span`,{id:y,className:`sh-minmax__message`,children:E})]})}var Ct=(0,r.createContext)(void 0);function wt({value:e,label:t,labelPosition:i,className:a,inputClassName:o,name:s,checked:c,disabled:l,onChange:u,...d}){let f=(0,r.useContext)(Ct),p=s??f?.name,m=f&&e!==void 0?f.value.includes(e):c,h=l??f?.disabled,g=i??f?.labelPosition??`right`,_=t=>{f&&e!==void 0&&f.onToggle(e,t.target.checked),u?.(t)},v=[`sh-switch`,`sh-switch--label-${g}`,h&&`sh-switch--disabled`,a].filter(Boolean).join(` `);return(0,n.jsxs)(`label`,{className:v,children:[(0,n.jsx)(`input`,{...d,type:`checkbox`,role:`switch`,className:[`sh-switch__input`,o].filter(Boolean).join(` `),name:p,value:e,checked:m,disabled:h,onChange:_}),(0,n.jsx)(`span`,{className:`sh-switch__track`,"aria-hidden":`true`,children:(0,n.jsx)(`span`,{className:`sh-switch__thumb`})}),t&&(0,n.jsx)(`span`,{className:`sh-switch__label`,children:t})]})}function Tt({children:e,value:t,defaultValue:i,onChange:a,label:o,helperText:s,error:c,name:l,orientation:u=`vertical`,labelPosition:d,disabled:f=!1,"aria-label":p,className:m}){let h=(0,r.useId)(),g=(0,r.useId)(),_=(0,r.useId)(),v=l??h,[y,b]=(0,r.useState)(i??[]),x=t!==void 0,S=x?t:y,C=(e,t)=>{let n=t?[...S,e]:S.filter(t=>t!==e);x||b(n),a?.(n)},w=!!c,T=c??s,E=[`sh-switch-group`,w&&`sh-switch-group--invalid`,m].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:E,children:[o&&(0,n.jsx)(`span`,{className:`sh-switch-group__label`,id:g,children:o}),(0,n.jsx)(`div`,{className:`sh-switch-group__options sh-switch-group__options--${u}`,role:`group`,"aria-label":o?void 0:p,"aria-labelledby":o?g:void 0,"aria-describedby":T?_:void 0,"aria-invalid":w||void 0,children:(0,n.jsx)(Ct.Provider,{value:{name:v,value:S,onToggle:C,disabled:f,labelPosition:d},children:e})}),T&&(0,n.jsx)(`span`,{id:_,className:`sh-switch-group__message`,children:T})]})}function Et({options:e,value:t,defaultValue:i,onChange:a,label:o,name:s,fullWidth:c=!1,disabled:l=!1,"aria-label":u,className:d}){let f=(0,r.useId)(),p=(0,r.useId)(),m=s??f,[h,g]=(0,r.useState)(i),_=t!==void 0,v=_?t:h,y=e=>{_||g(e),a?.(e)},b=e.findIndex(e=>e.value===v),x=[`sh-segmented`,c&&`sh-segmented--full-width`,l&&`sh-segmented--disabled`,b<0&&`sh-segmented--unselected`,d].filter(Boolean).join(` `),S={"--sh-segmented-count":e.length,"--sh-segmented-index":Math.max(b,0)};return(0,n.jsxs)(`div`,{className:`sh-segmented-field`,children:[o&&(0,n.jsx)(`span`,{className:`sh-segmented__group-label`,id:p,children:o}),(0,n.jsx)(`div`,{className:x,style:S,role:`radiogroup`,"aria-label":o?void 0:u,"aria-labelledby":o?p:void 0,children:e.map(e=>{let t=l||e.disabled;return(0,n.jsxs)(`label`,{className:[`sh-segmented__item`,t&&`sh-segmented__item--disabled`].filter(Boolean).join(` `),children:[(0,n.jsx)(`input`,{className:`sh-segmented__input`,type:`radio`,name:m,value:e.value,checked:v===e.value,disabled:t,onChange:()=>y(e.value)}),(0,n.jsx)(`span`,{className:`sh-segmented__label`,children:e.label})]},e.value)})})]})}var Dt=t({accent:()=>Y,accentFill:()=>Q,colorVar:()=>jt,danger:()=>Z,neutral:()=>X,palette:()=>Ot,paletteVar:()=>$,semanticColors:()=>At}),Y={50:`#f6f0ff`,100:`#ece0ff`,200:`#d9c2ff`,300:`#c19dff`,400:`#a672ff`,500:`#8b47fa`,600:`#7429e0`,700:`#5d1fb8`,800:`#461890`,900:`#331269`,950:`#1f0b40`},X={0:`#ffffff`,50:`#f8f7fa`,100:`#efedf3`,200:`#e2dfe8`,300:`#cac6d3`,400:`#a29cae`,500:`#79728a`,600:`#5a5468`,700:`#423d4d`,800:`#2c2836`,900:`#1a1720`,950:`#0d0b12`},Z={50:`#fef3f2`,100:`#fee4e2`,200:`#fecdca`,300:`#fda29b`,400:`#f97066`,500:`#f04438`,600:`#d92d20`,700:`#b42318`,800:`#912018`,900:`#7a271a`,950:`#55160c`},Ot={accent:Y,neutral:X,danger:Z},Q={bg:Y[700],text:Y[100]},kt={"accent-fill-bg":Q.bg,"accent-fill-text":Q.text},At={light:{"bg-canvas":X[0],"bg-surface":X[50],"bg-subtle":X[100],text:X[900],"text-subtle":X[600],"text-inverse":X[0],border:X[200],"border-strong":X[300],accent:Y[600],"accent-hover":Y[700],"accent-subtle-bg":Y[50],"accent-subtle-text":Y[700],...kt,danger:Z[700],"danger-border":Z[500],scrim:`rgb(0 0 0 / 0.45)`,"accent-tint-1":Y[50],"accent-tint-2":Y[100],"accent-tint-3":Y[200],"accent-tint-4":Y[300],"accent-on-tint":Y[900]},dark:{"bg-canvas":X[950],"bg-surface":X[900],"bg-subtle":X[800],text:X[50],"text-subtle":X[400],"text-inverse":X[950],border:X[700],"border-strong":X[600],accent:Y[400],"accent-hover":Y[300],"accent-subtle-bg":Y[900],"accent-subtle-text":Y[200],...kt,danger:Z[300],"danger-border":Z[400],scrim:`rgb(0 0 0 / 0.65)`,"accent-tint-1":Y[950],"accent-tint-2":Y[900],"accent-tint-3":Y[800],"accent-tint-4":Y[700],"accent-on-tint":Y[100]}};function jt(e){return`var(--color-${e})`}function $(e,t){return`var(--color-${e}-${String(t)})`}exports.Accordion=Ie,exports.AccordionItem=Re,exports.Alert=ht,exports.Avatar=E,exports.AvatarGroup=D,exports.Breadcrumb=Je,exports.BreadcrumbItem=Ye,exports.Button=d,exports.Checkbox=Se,exports.CheckboxGroup=Ce,exports.Chip=b,exports.CodeBlock=ie,exports.Dialog=se,exports.Drawer=de,exports.Dropdown=I,exports.DropdownItem=z,exports.DropdownMenu=R,exports.DropdownSeparator=ee,exports.DropdownTrigger=L,exports.EmptyState=h,exports.FileDrop=bt,exports.Input=k,exports.InputOtp=N,exports.MinMaxSlider=St,exports.Pagination=je,exports.ProgressBar=ut,exports.Radio=Te,exports.RadioGroup=Ee,exports.RangeSlider=xt,exports.SegmentedControl=Et,exports.Select=ye,exports.Skeleton=at,exports.Spinner=ct,exports.Step=We,exports.Stepper=Ve,exports.Switch=wt,exports.SwitchGroup=Tt,exports.Tab=nt,exports.TabList=tt,exports.TabPanel=rt,exports.Tabs=$e,exports.Tag=g,exports.Text=l,exports.Textarea=be,exports.Tooltip=ge,exports.accentFill=Q,exports.alertVariants=gt,exports.avatarSizes=O,exports.buttonClassNames=u,exports.buttonSizes=p,exports.buttonVariants=f,exports.chipActions=S,exports.chipVariants=x,Object.defineProperty(exports,"colorTokens",{enumerable:!0,get:function(){return Dt}}),exports.colorVar=jt,exports.dedentCode=B,exports.dialogRoles=le,exports.dialogSizes=ce,exports.drawerSides=fe,exports.drawerSizes=pe,exports.formatFileSize=_t,exports.getPaginationRange=De,exports.isFileAccepted=J,exports.otpTypes=A,exports.palette=Ot,exports.paletteVar=$,exports.progressBarSizes=dt,exports.resolveTooltipPlacement=me,exports.sanitizeOtpValue=M,exports.semanticColors=At,exports.skeletonAnimations=st,exports.skeletonVariants=ot,exports.spinnerSizes=lt,exports.tagVariants=_,exports.textColors=o,exports.textVariants=a,exports.textWeights=s;
|
|
6
|
+
`:``]},t)):f})}),s&&(0,n.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sh-code-block__status`,children:m===`copied`?`Copied`:m===`error`?`Copy failed`:``})]})}function oe(e,t){if(!t)return e;let n=t===!0?typeof document>`u`?null:document.body:t;return n?(0,i.createPortal)(e,n):null}var B=0,V=null;function se(){if(B===0){let{body:e}=document,t=e.style.overflow,n=e.style.paddingRight,r=window.innerWidth-document.documentElement.clientWidth;if(e.style.overflow=`hidden`,r>0){let t=Number.parseFloat(window.getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${t+r}px`}V=()=>{e.style.overflow=t,e.style.paddingRight=n}}B+=1;let e=!1;return()=>{e||(e=!0,--B,B===0&&(V?.(),V=null))}}function ce({open:e,onClose:t,closeOnEscape:n,closeOnBackdropClick:i,initialFocus:a,lockScroll:o}){let s=(0,r.useRef)(null),c=(0,r.useRef)(null),l=(0,r.useId)();return(0,r.useEffect)(()=>{let t=s.current;if(t){if(!e){t.open&&t.close();return}return t.open||t.showModal(),a?.current?.focus(),o?se():void 0}},[e,o]),(0,r.useEffect)(()=>{let e=s.current;if(!e)return;let r=e=>{e.preventDefault(),n&&t()};return e.addEventListener(`cancel`,r),()=>e.removeEventListener(`cancel`,r)},[n,t]),{titleId:`${l}-title`,descriptionId:`${l}-description`,surfaceProps:{ref:s,onMouseDown:e=>{c.current=e.target},onClick:e=>{i&&c.current===e.currentTarget&&e.target===e.currentTarget&&t()}}}}var le=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4.5 4.5l7 7M11.5 4.5l-7 7`,strokeLinecap:`round`})});function ue({open:e,onClose:t,title:r,description:i,children:a,footer:o,size:s=`md`,role:c=`dialog`,closeOnEscape:l=!0,closeOnBackdropClick:u=!0,showClose:d=!0,closeLabel:f=`Close`,initialFocus:p,lockScroll:m=!0,portal:h=!1,className:g,..._}){let{titleId:v,descriptionId:y,surfaceProps:b}=ce({open:e,onClose:t,closeOnEscape:l,closeOnBackdropClick:u,initialFocus:p,lockScroll:m});return oe((0,n.jsxs)(`dialog`,{role:c,"aria-labelledby":v,"aria-describedby":i?y:void 0,className:[`sh-dialog`,`sh-dialog--${s}`,g].filter(Boolean).join(` `),...b,..._,children:[(0,n.jsxs)(`div`,{className:`sh-dialog__header`,children:[(0,n.jsxs)(`div`,{className:`sh-dialog__heading`,children:[(0,n.jsx)(`h2`,{id:v,className:`sh-dialog__title`,children:r}),i&&(0,n.jsx)(`p`,{id:y,className:`sh-dialog__description`,children:i})]}),d&&(0,n.jsx)(`button`,{type:`button`,className:`sh-dialog__close`,"aria-label":f,onClick:t,children:(0,n.jsx)(le,{})})]}),a!=null&&a!==!1&&(0,n.jsx)(`div`,{className:`sh-dialog__body`,children:a}),o&&(0,n.jsx)(`div`,{className:`sh-dialog__footer`,children:o})]}),h)}var de=[`sm`,`md`,`lg`,`fullscreen`],fe=[`dialog`,`alertdialog`],pe=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4.5 4.5l7 7M11.5 4.5l-7 7`,strokeLinecap:`round`})});function me({open:e,onClose:t,title:r,description:i,children:a,footer:o,side:s=`right`,size:c=`md`,closeOnEscape:l=!0,closeOnBackdropClick:u=!0,showClose:d=!0,closeLabel:f=`Close`,initialFocus:p,lockScroll:m=!0,portal:h=!1,className:g,..._}){let{titleId:v,descriptionId:y,surfaceProps:b}=ce({open:e,onClose:t,closeOnEscape:l,closeOnBackdropClick:u,initialFocus:p,lockScroll:m});return oe((0,n.jsxs)(`dialog`,{"aria-labelledby":v,"aria-describedby":i?y:void 0,className:[`sh-drawer`,`sh-drawer--${s}`,`sh-drawer--${c}`,g].filter(Boolean).join(` `),...b,..._,children:[(0,n.jsxs)(`div`,{className:`sh-drawer__header`,children:[(0,n.jsxs)(`div`,{className:`sh-drawer__heading`,children:[(0,n.jsx)(`h2`,{id:v,className:`sh-drawer__title`,children:r}),i&&(0,n.jsx)(`p`,{id:y,className:`sh-drawer__description`,children:i})]}),d&&(0,n.jsx)(`button`,{type:`button`,className:`sh-drawer__close`,"aria-label":f,onClick:t,children:(0,n.jsx)(pe,{})})]}),a!=null&&a!==!1&&(0,n.jsx)(`div`,{className:`sh-drawer__body`,children:a}),o&&(0,n.jsx)(`div`,{className:`sh-drawer__footer`,children:o})]}),h)}var he=[`left`,`right`,`top`,`bottom`],ge=[`sm`,`md`,`lg`,`full`],_e=[`top`,`bottom`,`right`,`left`];function ve({trigger:e,tip:t,viewport:n,gap:r=8}){let i={top:e.top,bottom:n.height-e.bottom,left:e.left,right:n.width-e.right},a={top:t.height+r,bottom:t.height+r,left:t.width+r,right:t.width+r};return _e.find(e=>i[e]>=a[e])||_e.reduce((e,t)=>i[t]-a[t]>i[e]-a[e]?t:e)}var ye=typeof window>`u`?r.useEffect:r.useLayoutEffect;function be({children:e,content:t,placement:i=`top`,delay:a=150,open:o,defaultOpen:s=!1,onOpenChange:c,disabled:l=!1,className:u,...d}){let f=(0,r.useId)(),p=(0,r.useRef)(void 0),m=(0,r.useRef)(null),h=(0,r.useRef)(null),g=(0,r.useRef)(!1),[_,v]=(0,r.useState)(s),y=o!==void 0,b=y?o:_,x=!l&&t!=null&&t!==``,S=()=>{p.current!==void 0&&(window.clearTimeout(p.current),p.current=void 0)},C=(0,r.useCallback)(e=>{y||v(e),c?.(e)},[y,c]),w=()=>{!x||b||g.current||(S(),a>0?p.current=window.setTimeout(()=>C(!0),a):C(!0))},T=()=>{S(),b&&C(!1)};(0,r.useEffect)(()=>S,[]);let[E,D]=(0,r.useState)(`top`),O=i===`auto`,k=O?E:i;if(ye(()=>{if(!O||!b||!x)return;let e=()=>{let e=m.current,t=h.current;!e||!t||D(ve({trigger:e.getBoundingClientRect(),tip:{width:t.offsetWidth,height:t.offsetHeight},viewport:{width:window.innerWidth,height:window.innerHeight}}))};return e(),window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[O,b,x]),(0,r.useEffect)(()=>{if(!b||!x)return;let e=e=>{e.key===`Escape`&&C(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[b,x,C]),!(0,r.isValidElement)(e))throw Error(`<Tooltip> expects a single element child to describe.`);let A=x?(0,r.cloneElement)(e,{"aria-describedby":[e.props[`aria-describedby`],f].filter(Boolean).join(` `)}):e;return(0,n.jsxs)(`span`,{ref:m,className:[`sh-tooltip`,u].filter(Boolean).join(` `),onMouseEnter:w,onMouseLeave:()=>{g.current=!1,T()},onFocus:w,onBlur:()=>{g.current=!1,T()},onMouseDown:()=>{g.current=!0,T()},...d,children:[A,x&&(0,n.jsx)(`span`,{ref:h,id:f,role:`tooltip`,className:[`sh-tooltip__tip`,`sh-tooltip__tip--${k}`,b&&`sh-tooltip__tip--open`].filter(Boolean).join(` `),children:t})]})}var xe=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4 6.5 8 10.5l4-4`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Se=e=>`options`in e;function Ce({label:e,helperText:t,error:i,options:a,placeholder:o,icon:s,className:c,selectClassName:l,children:u,id:d,required:f,disabled:p,multiple:m,"aria-describedby":h,...g}){let _=(0,r.useId)(),v=d??_,y=`${v}-message`,b=!!i,x=i??t,S=[h,x?y:void 0].filter(Boolean).join(` `)||void 0,C=[`sh-select`,b&&`sh-select--invalid`,p&&`sh-select--disabled`,s&&`sh-select--with-icon`,m&&`sh-select--multiple`,c].filter(Boolean).join(` `),w=e=>(0,n.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value);return(0,n.jsxs)(`div`,{className:C,children:[e&&(0,n.jsxs)(`label`,{className:`sh-select__label`,htmlFor:v,children:[e,f&&(0,n.jsx)(`span`,{className:`sh-select__required`,"aria-hidden":`true`,children:`*`})]}),(0,n.jsxs)(`span`,{className:`sh-select__field`,children:[s&&(0,n.jsx)(`span`,{className:`sh-select__icon`,"aria-hidden":`true`,children:s}),(0,n.jsxs)(`select`,{...g,id:v,className:[`sh-select__control`,l].filter(Boolean).join(` `),required:f,disabled:p,multiple:m,"aria-invalid":b||void 0,"aria-describedby":S,children:[o&&(0,n.jsx)(`option`,{value:``,disabled:!0,children:o}),a?a.map(e=>Se(e)?(0,n.jsx)(`optgroup`,{label:e.label,children:e.options.map(w)},e.label):w(e)):u]}),!m&&(0,n.jsx)(`span`,{className:`sh-select__chevron`,"aria-hidden":`true`,children:(0,n.jsx)(xe,{})})]}),x&&(0,n.jsx)(`span`,{id:y,className:`sh-select__message`,children:x})]})}function we({label:e,helperText:t,error:i,resize:a=`vertical`,className:o,textareaClassName:s,id:c,rows:l=3,required:u,disabled:d,"aria-describedby":f,...p}){let m=(0,r.useId)(),h=c??m,g=`${h}-message`,_=!!i,v=i??t,y=[f,v?g:void 0].filter(Boolean).join(` `)||void 0,b=[`sh-textarea`,_&&`sh-textarea--invalid`,d&&`sh-textarea--disabled`,o].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:b,children:[e&&(0,n.jsxs)(`label`,{className:`sh-textarea__label`,htmlFor:h,children:[e,u&&(0,n.jsx)(`span`,{className:`sh-textarea__required`,"aria-hidden":`true`,children:`*`})]}),(0,n.jsx)(`textarea`,{id:h,className:[`sh-textarea__control`,`sh-textarea__control--resize-${a}`,s].filter(Boolean).join(` `),rows:l,required:u,disabled:d,"aria-invalid":_||void 0,"aria-describedby":y,...p}),v&&(0,n.jsx)(`span`,{id:g,className:`sh-textarea__message`,children:v})]})}var Te=(0,r.createContext)(void 0);function Ee({value:e,label:t,indeterminate:i=!1,className:a,inputClassName:o,name:s,checked:c,disabled:l,onChange:u,ref:d,...f}){let p=(0,r.useContext)(Te),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{m.current&&(m.current.indeterminate=i)},[i]);let h=e=>{m.current=e,typeof d==`function`?d(e):d&&(d.current=e)},g=s??p?.name,_=p&&e!==void 0?p.value.includes(e):c,v=l??p?.disabled,y=t=>{p&&e!==void 0&&p.onToggle(e,t.target.checked),u?.(t)},b=[`sh-checkbox`,v&&`sh-checkbox--disabled`,a].filter(Boolean).join(` `);return(0,n.jsxs)(`label`,{className:b,children:[(0,n.jsx)(`input`,{...f,type:`checkbox`,ref:h,className:[`sh-checkbox__input`,o].filter(Boolean).join(` `),name:g,value:e,checked:_,disabled:v,onChange:y}),t&&(0,n.jsx)(`span`,{className:`sh-checkbox__label`,children:t})]})}function De({children:e,value:t,defaultValue:i,onChange:a,label:o,helperText:s,error:c,name:l,orientation:u=`vertical`,disabled:d=!1,"aria-label":f,className:p}){let m=(0,r.useId)(),h=(0,r.useId)(),g=(0,r.useId)(),_=l??m,[v,y]=(0,r.useState)(i??[]),b=t!==void 0,x=b?t:v,S=(e,t)=>{let n=t?[...x,e]:x.filter(t=>t!==e);b||y(n),a?.(n)},C=!!c,w=c??s,T=[`sh-checkbox-group`,C&&`sh-checkbox-group--invalid`,p].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:T,children:[o&&(0,n.jsx)(`span`,{className:`sh-checkbox-group__label`,id:h,children:o}),(0,n.jsx)(`div`,{className:`sh-checkbox-group__options sh-checkbox-group__options--${u}`,role:`group`,"aria-label":o?void 0:f,"aria-labelledby":o?h:void 0,"aria-describedby":w?g:void 0,"aria-invalid":C||void 0,children:(0,n.jsx)(Te.Provider,{value:{name:_,value:x,onToggle:S,disabled:d},children:e})}),w&&(0,n.jsx)(`span`,{id:g,className:`sh-checkbox-group__message`,children:w})]})}var Oe=(0,r.createContext)(void 0);function ke({value:e,label:t,className:i,inputClassName:a,name:o,checked:s,disabled:c,onChange:l,...u}){let d=(0,r.useContext)(Oe),f=o??d?.name,p=d?d.value===e:s,m=c??d?.disabled,h=t=>{d&&e!==void 0&&d.onSelect(e),l?.(t)},g=[`sh-radio`,m&&`sh-radio--disabled`,i].filter(Boolean).join(` `);return(0,n.jsxs)(`label`,{className:g,children:[(0,n.jsx)(`input`,{type:`radio`,className:[`sh-radio__input`,a].filter(Boolean).join(` `),name:f,value:e,checked:p,disabled:m,onChange:h,...u}),t&&(0,n.jsx)(`span`,{className:`sh-radio__label`,children:t})]})}function Ae({children:e,value:t,defaultValue:i,onChange:a,label:o,helperText:s,error:c,name:l,orientation:u=`vertical`,disabled:d=!1,"aria-label":f,className:p}){let m=(0,r.useId)(),h=(0,r.useId)(),g=(0,r.useId)(),_=l??m,[v,y]=(0,r.useState)(i),b=t!==void 0,x=b?t:v,S=e=>{b||y(e),a?.(e)},C=!!c,w=c??s,T=[`sh-radio-group`,C&&`sh-radio-group--invalid`,p].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:T,children:[o&&(0,n.jsx)(`span`,{className:`sh-radio-group__label`,id:h,children:o}),(0,n.jsx)(`div`,{className:`sh-radio-group__options sh-radio-group__options--${u}`,role:`radiogroup`,"aria-label":o?void 0:f,"aria-labelledby":o?h:void 0,"aria-describedby":w?g:void 0,"aria-invalid":C||void 0,children:(0,n.jsx)(Oe.Provider,{value:{name:_,value:x,onSelect:S,disabled:d},children:e})}),w&&(0,n.jsx)(`span`,{id:g,className:`sh-radio-group__message`,children:w})]})}var H=(e,t)=>t<e?[]:Array.from({length:t-e+1},(t,n)=>e+n);function je({page:e,count:t,siblingCount:n=1,boundaryCount:r=1}){if(t<=0)return[];let i=H(1,Math.min(r,t)),a=H(Math.max(t-r+1,r+1),t),o=Math.max(Math.min(e-n,t-r-n*2-1),r+2),s=Math.min(Math.max(e+n,r+n*2+2),a.length>0?a[0]-2:t-1);return[...i,...o>r+2?[`ellipsis`]:r+1<t-r?[r+1]:[],...H(o,s),...s<t-r-1?[`ellipsis`]:t-r>r?[t-r]:[],...a]}var Me=({direction:e})=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:e===`left`?`M10 3.5 5.5 8l4.5 4.5`:`M6 3.5 10.5 8 6 12.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),U=({direction:e})=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:e===`left`?`M8 3.5 3.5 8 8 12.5M13 3.5 8.5 8l4.5 4.5`:`M8 3.5 12.5 8 8 12.5M3 3.5 7.5 8 3 12.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Ne={first:`First page`,previous:`Previous page`,next:`Next page`,last:`Last page`,page:e=>`Page ${e}`};function Pe({count:e,page:t,defaultPage:i=1,onChange:a,siblingCount:o=1,boundaryCount:s=1,showFirstLast:c=!1,hidePrevNext:l=!1,disabled:u=!1,labels:d,"aria-label":f=`Pagination`,className:p,...m}){let[h,g]=(0,r.useState)(i),_=t!==void 0,v=_?t:h,y={...Ne,...d},b=t=>{t<1||t>e||t===v||(_||g(t),a?.(t))},x=je({page:v,count:e,siblingCount:o,boundaryCount:s});if(e<=0)return null;let S=(t,r,i,a)=>(0,n.jsx)(`li`,{className:`sh-pagination__item`,children:(0,n.jsx)(`button`,{type:`button`,className:`sh-pagination__control`,onClick:()=>b(i),disabled:u||i<1||i>e||i===v,"aria-label":r,children:a})},t);return(0,n.jsx)(`nav`,{className:[`sh-pagination`,p].filter(Boolean).join(` `),"aria-label":f,...m,children:(0,n.jsxs)(`ul`,{className:`sh-pagination__list`,children:[c&&S(`first`,y.first,1,(0,n.jsx)(U,{direction:`left`})),!l&&S(`prev`,y.previous,v-1,(0,n.jsx)(Me,{direction:`left`})),x.map((e,t)=>e===`ellipsis`?(0,n.jsx)(`li`,{className:`sh-pagination__item`,children:(0,n.jsx)(`span`,{className:`sh-pagination__ellipsis`,"aria-hidden":`true`,children:`…`})},`ellipsis-${t}`):(0,n.jsx)(`li`,{className:`sh-pagination__item`,children:(0,n.jsx)(`button`,{type:`button`,className:[`sh-pagination__page`,e===v&&`sh-pagination__page--current`].filter(Boolean).join(` `),onClick:()=>b(e),disabled:u,"aria-label":y.page(e),"aria-current":e===v?`page`:void 0,children:e})},e)),!l&&S(`next`,y.next,v+1,(0,n.jsx)(Me,{direction:`right`})),c&&S(`last`,y.last,e,(0,n.jsx)(U,{direction:`right`}))]})})}var W=(0,r.createContext)(void 0);function Fe(e){let t=(0,r.useContext)(W);if(!t)throw Error(`<${e}> must be rendered inside <Accordion>.`);return t}var G=(e,t)=>`${e}-trigger-${t}`,Ie=(e,t)=>`${e}-panel-${t}`;function Le({children:e,type:t=`single`,value:i,defaultValue:a,onChange:o,collapsible:s=!0,headingLevel:c=3,className:l,...u}){let d=(0,r.useId)(),[f,p]=(0,r.useState)(a??[]),m=i!==void 0,h=m?i:f;return(0,n.jsx)(W.Provider,{value:{value:h,toggle:e=>{let n=h.includes(e),r;r=t===`multiple`?n?h.filter(t=>t!==e):[...h,e]:n?s?[]:h:[e],m||p(r),o?.(r)},baseId:d,headingLevel:c},children:(0,n.jsx)(`div`,{className:[`sh-accordion`,l].filter(Boolean).join(` `),...u,children:e})})}var Re=()=>(0,n.jsx)(`svg`,{className:`sh-accordion__chevron`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4 6.5 8 10.5l4-4`,strokeLinecap:`round`,strokeLinejoin:`round`})});function ze({value:e,title:t,children:i,disabled:a=!1,className:o,...s}){let{value:c,toggle:l,baseId:u,headingLevel:d}=Fe(`AccordionItem`),f=c.includes(e),p=(0,n.jsxs)(`button`,{type:`button`,id:G(u,e),className:`sh-accordion__trigger`,"aria-expanded":f,"aria-controls":Ie(u,e),disabled:a,onClick:()=>l(e),children:[(0,n.jsx)(`span`,{className:`sh-accordion__title`,children:t}),(0,n.jsx)(Re,{})]});return(0,n.jsxs)(`div`,{className:[`sh-accordion__item`,f&&`sh-accordion__item--open`,a&&`sh-accordion__item--disabled`,o].filter(Boolean).join(` `),...s,children:[(0,r.createElement)(`h${d}`,{className:`sh-accordion__heading`},p),(0,n.jsx)(`div`,{id:Ie(u,e),className:`sh-accordion__panel`,role:`region`,"aria-labelledby":G(u,e),children:(0,n.jsx)(`div`,{className:`sh-accordion__panel-inner`,children:(0,n.jsx)(`div`,{className:`sh-accordion__content`,children:i})})})]})}var Be=(0,r.createContext)(void 0);function Ve(e){let t=(0,r.useContext)(Be);if(!t)throw Error(`<${e}> must be rendered inside <Stepper>.`);return t}function He({children:e,activeStep:t=0,orientation:i=`horizontal`,"aria-label":a=`Progress`,className:o,...s}){let c=r.Children.toArray(e).filter(r.isValidElement),l=e=>e<t?`complete`:e===t?`current`:`upcoming`;return(0,n.jsx)(`ol`,{className:[`sh-stepper`,`sh-stepper--${i}`,o].filter(Boolean).join(` `),"aria-label":a,...s,children:c.map((e,t)=>(0,n.jsx)(Be.Provider,{value:{index:t,isLast:t===c.length-1,status:l(t),orientation:i},children:e},e.key??t))})}var Ue=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:2,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M3.5 8.5l3 3 6-6.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),We=()=>(0,n.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:2,"aria-hidden":`true`,children:[(0,n.jsx)(`path`,{d:`M8 4.5v4.5`,strokeLinecap:`round`}),(0,n.jsx)(`circle`,{cx:`8`,cy:`11.6`,r:`0.9`,fill:`currentColor`,stroke:`none`})]});function Ge({title:e,description:t,status:r,icon:i,onClick:a,disabled:o=!1,className:s}){let{index:c,isLast:l,status:u,orientation:d}=Ve(`Step`),f=r??u,p=i??(f===`complete`?(0,n.jsx)(Ue,{}):f===`error`?(0,n.jsx)(We,{}):c+1),m=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`span`,{className:`sh-step__indicator`,children:p}),(0,n.jsxs)(`span`,{className:`sh-step__text`,children:[(0,n.jsx)(`span`,{className:`sh-step__title`,children:e}),t&&(0,n.jsx)(`span`,{className:`sh-step__description`,children:t})]})]});return(0,n.jsxs)(`li`,{className:[`sh-step`,`sh-step--${f}`,`sh-step--${d}`,l&&`sh-step--last`,s].filter(Boolean).join(` `),children:[a?(0,n.jsx)(`button`,{type:`button`,className:`sh-step__body sh-step__body--interactive`,onClick:a,disabled:o,"aria-current":f===`current`?`step`:void 0,children:m}):(0,n.jsx)(`span`,{className:`sh-step__body`,"aria-current":f===`current`?`step`:void 0,children:m}),!l&&(0,n.jsx)(`span`,{className:`sh-step__connector`,"aria-hidden":`true`})]})}var Ke=(0,r.createContext)(void 0);function qe(e){let t=(0,r.useContext)(Ke);if(!t)throw Error(`<${e}> must be rendered inside <Breadcrumb>.`);return t}var Je=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,children:(0,n.jsx)(`path`,{d:`M6 3.5 10.5 8 6 12.5`,strokeLinecap:`round`,strokeLinejoin:`round`})});function Ye({children:e,separator:t=(0,n.jsx)(Je,{}),"aria-label":i=`Breadcrumb`,className:a,...o}){let s=r.Children.toArray(e).filter(r.isValidElement);return(0,n.jsx)(`nav`,{className:[`sh-breadcrumb`,a].filter(Boolean).join(` `),"aria-label":i,...o,children:(0,n.jsx)(`ol`,{className:`sh-breadcrumb__list`,children:s.map((e,r)=>(0,n.jsx)(Ke.Provider,{value:{isLast:r===s.length-1,separator:t},children:e},e.key??r))})})}function Xe({children:e,href:t,current:r,className:i,...a}){let{isLast:o,separator:s}=qe(`BreadcrumbItem`),c=r??o;return(0,n.jsxs)(`li`,{className:[`sh-breadcrumb__item`,i].filter(Boolean).join(` `),children:[c?(0,n.jsx)(`span`,{className:`sh-breadcrumb__current`,"aria-current":`page`,children:e}):t?(0,n.jsx)(`a`,{className:`sh-breadcrumb__link`,href:t,...a,children:e}):(0,n.jsx)(`span`,{className:`sh-breadcrumb__text`,children:e}),!o&&(0,n.jsx)(`span`,{className:`sh-breadcrumb__separator`,"aria-hidden":`true`,children:s})]})}var Ze=(0,r.createContext)(void 0);function K(e){let t=(0,r.useContext)(Ze);if(!t)throw Error(`<${e}> must be rendered inside <Tabs>.`);return t}var Qe=(e,t)=>`${e}-tab-${t}`,$e=(e,t)=>`${e}-panel-${t}`;function et({children:e,value:t,defaultValue:i,onChange:a,orientation:o=`horizontal`,activation:s=`automatic`,className:c,...l}){let u=(0,r.useId)(),[d,f]=(0,r.useState)(i),p=t!==void 0,m=p?t:d,h=e=>{p||f(e),a?.(e)},g=[`sh-tabs`,`sh-tabs--${o}`,c].filter(Boolean).join(` `);return(0,n.jsx)(Ze.Provider,{value:{value:m,select:h,baseId:u,orientation:o,activation:s},children:(0,n.jsx)(`div`,{className:g,...l,children:e})})}var tt=typeof window>`u`?r.useEffect:r.useLayoutEffect;function nt({children:e,className:t,onKeyDown:i,...a}){let{value:o,orientation:s,activation:c,select:l}=K(`TabList`),u=(0,r.useRef)(null),[d,f]=(0,r.useState)(null),p=s===`vertical`;return tt(()=>{let e=u.current;if(!e)return;let t=Array.from(e.querySelectorAll(`[role="tab"]`)).find(e=>e.dataset.value===o);if(!t){f(null);return}let n=()=>{let e=p?t.offsetTop:t.offsetLeft,n=p?t.offsetHeight:t.offsetWidth;f(t=>({offset:e,size:n,animated:t!==null}))};if(n(),typeof ResizeObserver>`u`)return;let r=new ResizeObserver(n);return r.observe(e),r.observe(t),()=>r.disconnect()},[o,p]),(0,n.jsxs)(`div`,{ref:u,className:[`sh-tabs__list`,t].filter(Boolean).join(` `),role:`tablist`,"aria-orientation":s,onKeyDown:e=>{if(i?.(e),e.defaultPrevented||!u.current)return;let t=p?`ArrowDown`:`ArrowRight`;if(![t,p?`ArrowUp`:`ArrowLeft`,`Home`,`End`].includes(e.key))return;let n=Array.from(u.current.querySelectorAll(`[role="tab"]:not([disabled])`));if(n.length===0)return;let r=n.indexOf(document.activeElement),a;a=e.key===`Home`?0:e.key===`End`?n.length-1:r===-1?0:e.key===t?(r+1)%n.length:(r-1+n.length)%n.length;let o=n[a];if(o&&(e.preventDefault(),o.focus(),c===`automatic`)){let e=o.dataset.value;e!==void 0&&l(e)}},...a,children:[e,d&&(0,n.jsx)(`span`,{className:[`sh-tabs__indicator`,d.animated&&`sh-tabs__indicator--animated`].filter(Boolean).join(` `),"aria-hidden":`true`,style:{"--sh-tabs-indicator-offset":`${d.offset}px`,"--sh-tabs-indicator-size":`${d.size}px`}})]})}function rt({value:e,children:t,className:r,disabled:i,onClick:a,...o}){let{value:s,select:c,baseId:l}=K(`Tab`),u=s===e,d=[`sh-tabs__tab`,u&&`sh-tabs__tab--selected`,r].filter(Boolean).join(` `);return(0,n.jsx)(`button`,{type:`button`,role:`tab`,id:Qe(l,e),className:d,"data-value":e,"aria-selected":u,"aria-controls":$e(l,e),tabIndex:u?0:-1,disabled:i,onClick:t=>{a?.(t),t.defaultPrevented||c(e)},...o,children:t})}function it({value:e,children:t,keepMounted:r=!1,className:i,...a}){let{value:o,baseId:s}=K(`TabPanel`),c=o===e;return!c&&!r?null:(0,n.jsx)(`div`,{id:$e(s,e),className:[`sh-tabs__panel`,i].filter(Boolean).join(` `),role:`tabpanel`,"aria-labelledby":Qe(s,e),hidden:!c,tabIndex:0,...a,children:t})}var at=(0,r.createContext)(void 0);function q(e){let t=(0,r.useContext)(at);if(!t)throw Error(`<${e}> must be rendered inside <Carousel>.`);return t}var ot=(0,r.createContext)(void 0);function st(e){let t=(0,r.useContext)(ot);if(t===void 0)throw Error(`<${e}> must be rendered inside <CarouselSlides>.`);return t}var ct=(e,t)=>`${e}-slide-${t}`;function lt(e,t,n){return t<=0?0:n?(Math.trunc(e)%t+t)%t:Math.min(Math.max(Math.trunc(e),0),t-1)}var ut=`(prefers-reduced-motion: reduce)`,dt=()=>typeof window<`u`&&typeof window.matchMedia==`function`;function ft(e){if(!dt())return()=>{};let t=window.matchMedia(ut);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)}var pt=()=>dt()&&window.matchMedia(ut).matches;function mt(e){return typeof document>`u`?()=>{}:(document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e))}var ht=()=>typeof document<`u`&&document.hidden;function gt({enabled:e,interval:t,onTick:n}){let[i,a]=(0,r.useState)(!1),[o,s]=(0,r.useState)(!1),c=(0,r.useSyncExternalStore)(ft,pt,()=>!1),l=(0,r.useSyncExternalStore)(mt,ht,()=>!1),u=(0,r.useRef)(n);(0,r.useEffect)(()=>{u.current=n});let d=e&&!i&&!o&&!l&&!c;return(0,r.useEffect)(()=>{if(!d)return;let e=setInterval(()=>u.current(),t);return()=>clearInterval(e)},[d,t]),{pauseProps:{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>s(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||s(!1)}}}}function _t({children:e,index:t,defaultIndex:i=0,onChange:a,loop:o=!0,autoPlay:s=!1,interval:c=5e3,"aria-label":l,className:u,...d}){let f=(0,r.useId)(),[p,m]=(0,r.useState)(i),[h,g]=(0,r.useState)(0),[_,v]=(0,r.useState)(!1),y=t!==void 0,b=y?t:p,x=h>0?lt(b,h,!1):b,S=s&&!_,C=(e,t=`user`)=>{t===`user`&&s&&v(!0);let n=lt(e,h,o);n!==x&&(y||m(n),a?.(n))},{pauseProps:w}=gt({enabled:S&&h>1,interval:c,onTick:()=>C(x+1,`auto`)}),T=[`sh-carousel`,u].filter(Boolean).join(` `);return(0,n.jsx)(at.Provider,{value:{index:x,count:h,setCount:g,goTo:C,loop:o,baseId:f,autoPlay:s,isPlaying:S,togglePlaying:()=>v(e=>!e)},children:(0,n.jsx)(`section`,{className:T,"aria-roledescription":`carousel`,"aria-label":l,...d,onMouseEnter:e=>{d.onMouseEnter?.(e),w.onMouseEnter(e)},onMouseLeave:e=>{d.onMouseLeave?.(e),w.onMouseLeave(e)},onFocus:e=>{d.onFocus?.(e),w.onFocus(e)},onBlur:e=>{d.onBlur?.(e),w.onBlur(e)},children:e})})}var vt=typeof window>`u`?r.useEffect:r.useLayoutEffect;function yt({children:e,className:t,onKeyDown:i,...a}){let{index:o,count:s,setCount:c,goTo:l,isPlaying:u}=q(`CarouselSlides`),d=r.Children.toArray(e);return vt(()=>{c(d.length)},[d.length,c]),(0,n.jsx)(`div`,{className:[`sh-carousel__viewport`,t].filter(Boolean).join(` `),"aria-live":u?`off`:`polite`,"aria-atomic":`false`,tabIndex:0,onKeyDown:e=>{if(i?.(e),e.defaultPrevented||s<=1)return;let t={ArrowLeft:o-1,ArrowRight:o+1,Home:0,End:s-1}[e.key];t!==void 0&&(e.preventDefault(),l(t,`user`))},...a,children:(0,n.jsx)(`div`,{className:`sh-carousel__track`,style:{"--sh-carousel-index":o},children:d.map((e,t)=>(0,n.jsx)(ot.Provider,{value:t,children:e},(0,r.isValidElement)(e)?e.key:t))})})}function bt({children:e,className:t,...r}){let{index:i,count:a,baseId:o}=q(`CarouselSlide`),s=st(`CarouselSlide`),c=s===i,l=[`sh-carousel__slide`,c&&`sh-carousel__slide--current`,t].filter(Boolean).join(` `);return(0,n.jsx)(`div`,{id:ct(o,s),className:l,role:`group`,"aria-roledescription":`slide`,"aria-label":`${s+1} of ${a}`,inert:!c,...r,children:e})}var xt=({direction:e})=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:e===`left`?`M10 3.5 5.5 8l4.5 4.5`:`M6 3.5 10.5 8 6 12.5`,strokeLinecap:`round`,strokeLinejoin:`round`})});function St({direction:e,component:t,defaultLabel:r,children:i,"aria-label":a=r,className:o,disabled:s,onClick:c,...l}){let{index:u,count:d,loop:f,goTo:p}=q(t),m=e===`next`,h=!f&&(m?u>=d-1:u<=0),g=[`sh-carousel__control`,`sh-carousel__control--${e}`,o].filter(Boolean).join(` `);return(0,n.jsx)(`button`,{type:`button`,className:g,"aria-label":a,disabled:s||h||d<=1,onClick:e=>{c?.(e),e.defaultPrevented||p(m?u+1:u-1,`user`)},...l,children:i??(0,n.jsx)(xt,{direction:m?`right`:`left`})})}function Ct(e){return(0,n.jsx)(St,{direction:`previous`,component:`CarouselPrevious`,defaultLabel:`Previous slide`,...e})}function wt(e){return(0,n.jsx)(St,{direction:`next`,component:`CarouselNext`,defaultLabel:`Next slide`,...e})}function Tt({"aria-label":e=`Choose slide`,label:t=e=>`Slide ${e+1}`,className:r,...i}){let{index:a,count:o,goTo:s,baseId:c}=q(`CarouselDots`);return o<=1?null:(0,n.jsx)(`div`,{className:[`sh-carousel__dots`,r].filter(Boolean).join(` `),role:`group`,"aria-label":e,...i,children:Array.from({length:o},(e,r)=>{let i=r===a;return(0,n.jsx)(`button`,{type:`button`,className:[`sh-carousel__dot`,i&&`sh-carousel__dot--current`].filter(Boolean).join(` `),"aria-label":t(r),"aria-current":i?`true`:void 0,"aria-controls":ct(c,r),onClick:()=>s(r,`user`)},r)})})}var Et=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M5.5 3.4a.6.6 0 0 1 .92-.51l6.1 4.1a.6.6 0 0 1 0 1l-6.1 4.1a.6.6 0 0 1-.92-.5Z`})}),Dt=()=>(0,n.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`currentColor`,"aria-hidden":`true`,children:[(0,n.jsx)(`rect`,{x:`4`,y:`3`,width:`3`,height:`10`,rx:`1`}),(0,n.jsx)(`rect`,{x:`9`,y:`3`,width:`3`,height:`10`,rx:`1`})]});function Ot({labels:e,className:t,onClick:r,...i}){let{autoPlay:a,isPlaying:o,togglePlaying:s,count:c}=q(`CarouselPlayPause`);if(!a||c<=1)return null;let l={play:`Start slide rotation`,pause:`Stop slide rotation`,...e};return(0,n.jsx)(`button`,{type:`button`,className:[`sh-carousel__play-pause`,t].filter(Boolean).join(` `),"aria-label":o?l.pause:l.play,onClick:e=>{r?.(e),e.defaultPrevented||s()},...i,children:o?(0,n.jsx)(Dt,{}):(0,n.jsx)(Et,{})})}var kt=e=>typeof e==`number`?`${e}px`:e;function At({variant:e=`text`,width:t,height:r,lines:i=1,animation:a=`pulse`,className:o,...s}){let c=[`sh-skeleton`,`sh-skeleton--${e}`,`sh-skeleton--${a}`].join(` `),l={width:kt(t),height:kt(r??(e===`circular`?t:void 0))};return e===`text`&&i>1?(0,n.jsx)(`div`,{className:[`sh-skeleton-lines`,o].filter(Boolean).join(` `),"aria-hidden":`true`,...s,children:Array.from({length:i},(e,t)=>(0,n.jsx)(`span`,{className:c,style:t===i-1?{...l,width:`60%`}:l},t))}):(0,n.jsx)(`span`,{className:[c,o].filter(Boolean).join(` `),style:l,"aria-hidden":`true`,...s})}var jt=[`text`,`rectangular`,`circular`],Mt=[`pulse`,`wave`,`none`];function Nt({size:e=`md`,label:t=`Loading`,showLabel:i=!1,className:a,...o}){let s=(0,r.useId)(),c=[`sh-spinner`,`sh-spinner--${e}`,i&&`sh-spinner--with-label`,a].filter(Boolean).join(` `);return(0,n.jsxs)(`span`,{className:c,role:`status`,"aria-labelledby":s,...o,children:[(0,n.jsx)(`span`,{className:`sh-spinner__ring`,"aria-hidden":`true`}),(0,n.jsx)(`span`,{id:s,className:i?`sh-spinner__label`:`sh-spinner__label--visually-hidden`,children:t})]})}var Pt=[`sm`,`md`,`lg`];function Ft({value:e,max:t=100,label:i,showValue:a=!1,formatValue:o,size:s=`md`,"aria-label":c,className:l,...u}){let d=(0,r.useId)(),f=e===void 0,p=t>0?t:0,m=f?0:Math.min(Math.max(e,0),p),h=p===0?0:m/p*100,g=o?o(m,p):`${Math.round(h)}%`,_=[`sh-progress`,`sh-progress--${s}`,f&&`sh-progress--indeterminate`,l].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:_,...u,children:[(i||a&&!f)&&(0,n.jsxs)(`span`,{className:`sh-progress__header`,children:[i&&(0,n.jsx)(`span`,{className:`sh-progress__label`,id:d,children:i}),a&&!f&&(0,n.jsx)(`span`,{className:`sh-progress__value`,children:g})]}),(0,n.jsx)(`div`,{className:`sh-progress__track`,role:`progressbar`,"aria-label":i?void 0:c,"aria-labelledby":i?d:void 0,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":f?void 0:m,"aria-valuetext":f?void 0:o?g:void 0,children:(0,n.jsx)(`div`,{className:`sh-progress__bar`,style:{"--sh-progress-fill":`${h}%`}})})]})}var It=[`sm`,`md`,`lg`],Lt={success:(0,n.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,"aria-hidden":`true`,children:[(0,n.jsx)(`circle`,{cx:`10`,cy:`10`,r:`7.5`}),(0,n.jsx)(`path`,{d:`M6.75 10.25l2.25 2.25 4.25-4.75`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),info:(0,n.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,"aria-hidden":`true`,children:[(0,n.jsx)(`circle`,{cx:`10`,cy:`10`,r:`7.5`}),(0,n.jsx)(`path`,{d:`M10 9v4.5`,strokeLinecap:`round`}),(0,n.jsx)(`circle`,{cx:`10`,cy:`6.4`,r:`0.9`,fill:`currentColor`,stroke:`none`})]}),warning:(0,n.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,"aria-hidden":`true`,children:[(0,n.jsx)(`path`,{d:`M10 2.8 18 16.5H2L10 2.8Z`,strokeLinejoin:`round`}),(0,n.jsx)(`path`,{d:`M10 8v3.5`,strokeLinecap:`round`}),(0,n.jsx)(`circle`,{cx:`10`,cy:`13.9`,r:`0.9`,fill:`currentColor`,stroke:`none`})]}),error:(0,n.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,"aria-hidden":`true`,children:[(0,n.jsx)(`circle`,{cx:`10`,cy:`10`,r:`7.5`}),(0,n.jsx)(`path`,{d:`M7.5 7.5l5 5M12.5 7.5l-5 5`,strokeLinecap:`round`})]})},Rt=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4.5 4.5l7 7M11.5 4.5l-7 7`,strokeLinecap:`round`})}),zt={success:`status`,info:`status`,warning:`alert`,error:`alert`};function Bt({variant:e=`info`,title:t,children:r,icon:i,onDismiss:a,dismissLabel:o=`Dismiss`,role:s,className:c,...l}){let u=[`sh-alert`,`sh-alert--${e}`,c].filter(Boolean).join(` `),d=i===void 0?Lt[e]:i;return(0,n.jsxs)(`div`,{className:u,role:s??zt[e],...l,children:[d!==!1&&(0,n.jsx)(`span`,{className:`sh-alert__icon`,children:d}),(0,n.jsxs)(`div`,{className:`sh-alert__content`,children:[t&&(0,n.jsx)(`p`,{className:`sh-alert__title`,children:t}),r&&(0,n.jsx)(`div`,{className:`sh-alert__body`,children:r})]}),a&&(0,n.jsx)(`button`,{type:`button`,className:`sh-alert__dismiss`,onClick:a,"aria-label":o,children:(0,n.jsx)(Rt,{})})]})}var Vt=[`success`,`info`,`warning`,`error`];function J(e,t){if(!t)return!0;let n=t.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean);if(n.length===0)return!0;let r=e.name.toLowerCase(),i=e.type.toLowerCase();return n.some(e=>e.startsWith(`.`)?r.endsWith(e):e.endsWith(`/*`)?i.startsWith(e.slice(0,-1)):i===e)}function Ht(e){if(e<1024)return`${e} B`;let t=[`KB`,`MB`,`GB`,`TB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${Math.round(n*10)/10} ${t[r]}`}var Ut=()=>(0,n.jsxs)(`svg`,{className:`sh-filedrop__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,n.jsx)(`path`,{d:`M12 16V4m0 0L8 8m4-4 4 4`}),(0,n.jsx)(`path`,{d:`M4 15v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3`})]}),Wt=()=>(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,"aria-hidden":`true`,children:(0,n.jsx)(`path`,{d:`M4.5 4.5l7 7M11.5 4.5l-7 7`,strokeLinecap:`round`})});function Gt({label:e,helperText:t,error:i,placeholder:a=`Drag files here, or click to browse`,accept:o,multiple:s=!1,value:c,defaultValue:l,onChange:u,onReject:d,hideFileList:f=!1,disabled:p=!1,name:m,"aria-label":h,className:g,inputClassName:_}){let v=(0,r.useId)(),y=(0,r.useId)(),[b,x]=(0,r.useState)(l??[]),S=c!==void 0,C=S?c:b,[w,T]=(0,r.useState)(!1),E=(0,r.useRef)(0),D=!!i,O=i??t,k=e=>{S||x(e),u?.(e)},A=e=>{let t=e.filter(e=>J(e,o)),n=e.filter(e=>!J(e,o));n.length>0&&d?.(n),t.length!==0&&k(s?[...C,...t]:[t[0]])},j=e=>{A(Array.from(e.target.files??[])),e.target.value=``},M=e=>{p||(e.preventDefault(),E.current+=1,T(!0))},N=e=>{p||e.preventDefault()},P=e=>{p||(e.preventDefault(),--E.current,E.current<=0&&(E.current=0,T(!1)))},F=e=>{p||(e.preventDefault(),E.current=0,T(!1),A(Array.from(e.dataTransfer?.files??[])))},I=e=>{k(C.filter((t,n)=>n!==e))},L=[`sh-filedrop`,D&&`sh-filedrop--invalid`,p&&`sh-filedrop--disabled`,w&&`sh-filedrop--dragging`,g].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:L,children:[e&&(0,n.jsx)(`label`,{className:`sh-filedrop__label`,htmlFor:v,children:e}),(0,n.jsxs)(`label`,{className:`sh-filedrop__dropzone`,onDragEnter:M,onDragOver:N,onDragLeave:P,onDrop:F,children:[(0,n.jsx)(`input`,{id:v,type:`file`,className:[`sh-filedrop__input`,_].filter(Boolean).join(` `),accept:o,multiple:s,disabled:p,name:m,onChange:j,"aria-label":e?void 0:h,"aria-invalid":D||void 0,"aria-describedby":O?y:void 0}),(0,n.jsxs)(`span`,{className:`sh-filedrop__prompt`,"aria-hidden":`true`,children:[(0,n.jsx)(Ut,{}),(0,n.jsx)(`span`,{className:`sh-filedrop__placeholder`,children:a}),o&&(0,n.jsx)(`span`,{className:`sh-filedrop__accept`,children:o})]})]}),!f&&C.length>0&&(0,n.jsx)(`ul`,{className:`sh-filedrop__files`,children:C.map((e,t)=>(0,n.jsxs)(`li`,{className:`sh-filedrop__file`,children:[(0,n.jsx)(`span`,{className:`sh-filedrop__file-name`,children:e.name}),(0,n.jsx)(`span`,{className:`sh-filedrop__file-size`,children:Ht(e.size)}),(0,n.jsx)(`button`,{type:`button`,className:`sh-filedrop__file-remove`,onClick:()=>I(t),disabled:p,"aria-label":`Remove ${e.name}`,children:(0,n.jsx)(Wt,{})})]},`${e.name}-${t}`))}),O&&(0,n.jsx)(`span`,{id:y,className:`sh-filedrop__message`,children:O})]})}function Kt({label:e,helperText:t,error:i,value:a,defaultValue:o,onChange:s,min:c=0,max:l=100,step:u=1,showValue:d=!1,formatValue:f,className:p,inputClassName:m,id:h,disabled:g,"aria-describedby":_,...v}){let y=(0,r.useId)(),b=h??y,x=`${b}-message`,[S,C]=(0,r.useState)(o??c),w=a!==void 0,T=w?a:S,E=!!i,D=i??t,O=[_,D?x:void 0].filter(Boolean).join(` `)||void 0,k=e=>{let t=Number(e.target.value);w||C(t),s?.(t)},A=l===c?0:(T-c)/(l-c)*100,j=f?f(T):String(T),M=[`sh-range`,E&&`sh-range--invalid`,g&&`sh-range--disabled`,p].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:M,children:[(e||d)&&(0,n.jsxs)(`span`,{className:`sh-range__header`,children:[e&&(0,n.jsx)(`label`,{className:`sh-range__label`,htmlFor:b,children:e}),d&&(0,n.jsx)(`span`,{className:`sh-range__value`,children:j})]}),(0,n.jsx)(`input`,{...v,type:`range`,id:b,className:[`sh-range__input`,m].filter(Boolean).join(` `),style:{"--sh-range-fill":`${A}%`},min:c,max:l,step:u,value:T,disabled:g,onChange:k,"aria-invalid":E||void 0,"aria-describedby":O,"aria-valuetext":f?j:void 0}),D&&(0,n.jsx)(`span`,{id:x,className:`sh-range__message`,children:D})]})}function qt({label:e,helperText:t,error:i,value:a,defaultValue:o,onChange:s,min:c=0,max:l=100,step:u=1,minGap:d=0,showValue:f=!1,formatValue:p,name:m,disabled:h=!1,"aria-label":g,className:_}){let v=(0,r.useId)(),y=(0,r.useId)(),[b,x]=(0,r.useState)(o??[c,l]),S=a!==void 0,[C,w]=S?a:b,T=!!i,E=i??t,D=e=>{S||x(e),s?.(e)},O=e=>{D([Math.min(Number(e.target.value),w-d),w])},k=e=>{D([C,Math.max(Number(e.target.value),C+d)])},A=e=>l===c?0:(e-c)/(l-c)*100,j=A(C),M=A(w),N=e=>p?p(e):String(e),P=C>(c+l)/2,F=[`sh-minmax`,T&&`sh-minmax--invalid`,h&&`sh-minmax--disabled`,P&&`sh-minmax--from-on-top`,_].filter(Boolean).join(` `),I=e?void 0:g,L=t=>e||g?`${e??g} ${t}`:t;return(0,n.jsxs)(`div`,{className:F,style:{"--sh-minmax-from":`${j}%`,"--sh-minmax-to":`${M}%`},children:[(e||f)&&(0,n.jsxs)(`span`,{className:`sh-minmax__header`,children:[e&&(0,n.jsx)(`span`,{className:`sh-minmax__label`,id:v,children:e}),f&&(0,n.jsxs)(`span`,{className:`sh-minmax__value`,children:[N(C),` – `,N(w)]})]}),(0,n.jsxs)(`div`,{className:`sh-minmax__rail`,role:`group`,"aria-label":I,"aria-labelledby":e?v:void 0,"aria-describedby":E?y:void 0,"aria-invalid":T||void 0,children:[(0,n.jsx)(`span`,{className:`sh-minmax__track`,"aria-hidden":`true`,children:(0,n.jsx)(`span`,{className:`sh-minmax__fill`})}),(0,n.jsx)(`input`,{type:`range`,className:`sh-minmax__input sh-minmax__input--from`,name:m?`${m}-min`:void 0,min:c,max:l,step:u,value:C,disabled:h,onChange:O,"aria-label":L(`minimum`),"aria-valuetext":p?N(C):void 0}),(0,n.jsx)(`input`,{type:`range`,className:`sh-minmax__input sh-minmax__input--to`,name:m?`${m}-max`:void 0,min:c,max:l,step:u,value:w,disabled:h,onChange:k,"aria-label":L(`maximum`),"aria-valuetext":p?N(w):void 0})]}),E&&(0,n.jsx)(`span`,{id:y,className:`sh-minmax__message`,children:E})]})}var Y=(0,r.createContext)(void 0);function Jt({value:e,label:t,labelPosition:i,className:a,inputClassName:o,name:s,checked:c,disabled:l,onChange:u,...d}){let f=(0,r.useContext)(Y),p=s??f?.name,m=f&&e!==void 0?f.value.includes(e):c,h=l??f?.disabled,g=i??f?.labelPosition??`right`,_=t=>{f&&e!==void 0&&f.onToggle(e,t.target.checked),u?.(t)},v=[`sh-switch`,`sh-switch--label-${g}`,h&&`sh-switch--disabled`,a].filter(Boolean).join(` `);return(0,n.jsxs)(`label`,{className:v,children:[(0,n.jsx)(`input`,{...d,type:`checkbox`,role:`switch`,className:[`sh-switch__input`,o].filter(Boolean).join(` `),name:p,value:e,checked:m,disabled:h,onChange:_}),(0,n.jsx)(`span`,{className:`sh-switch__track`,"aria-hidden":`true`,children:(0,n.jsx)(`span`,{className:`sh-switch__thumb`})}),t&&(0,n.jsx)(`span`,{className:`sh-switch__label`,children:t})]})}function Yt({children:e,value:t,defaultValue:i,onChange:a,label:o,helperText:s,error:c,name:l,orientation:u=`vertical`,labelPosition:d,disabled:f=!1,"aria-label":p,className:m}){let h=(0,r.useId)(),g=(0,r.useId)(),_=(0,r.useId)(),v=l??h,[y,b]=(0,r.useState)(i??[]),x=t!==void 0,S=x?t:y,C=(e,t)=>{let n=t?[...S,e]:S.filter(t=>t!==e);x||b(n),a?.(n)},w=!!c,T=c??s,E=[`sh-switch-group`,w&&`sh-switch-group--invalid`,m].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:E,children:[o&&(0,n.jsx)(`span`,{className:`sh-switch-group__label`,id:g,children:o}),(0,n.jsx)(`div`,{className:`sh-switch-group__options sh-switch-group__options--${u}`,role:`group`,"aria-label":o?void 0:p,"aria-labelledby":o?g:void 0,"aria-describedby":T?_:void 0,"aria-invalid":w||void 0,children:(0,n.jsx)(Y.Provider,{value:{name:v,value:S,onToggle:C,disabled:f,labelPosition:d},children:e})}),T&&(0,n.jsx)(`span`,{id:_,className:`sh-switch-group__message`,children:T})]})}function Xt({options:e,value:t,defaultValue:i,onChange:a,label:o,name:s,fullWidth:c=!1,disabled:l=!1,"aria-label":u,className:d}){let f=(0,r.useId)(),p=(0,r.useId)(),m=s??f,[h,g]=(0,r.useState)(i),_=t!==void 0,v=_?t:h,y=e=>{_||g(e),a?.(e)},b=e.findIndex(e=>e.value===v),x=[`sh-segmented`,c&&`sh-segmented--full-width`,l&&`sh-segmented--disabled`,b<0&&`sh-segmented--unselected`,d].filter(Boolean).join(` `),S={"--sh-segmented-count":e.length,"--sh-segmented-index":Math.max(b,0)};return(0,n.jsxs)(`div`,{className:`sh-segmented-field`,children:[o&&(0,n.jsx)(`span`,{className:`sh-segmented__group-label`,id:p,children:o}),(0,n.jsx)(`div`,{className:x,style:S,role:`radiogroup`,"aria-label":o?void 0:u,"aria-labelledby":o?p:void 0,children:e.map(e=>{let t=l||e.disabled;return(0,n.jsxs)(`label`,{className:[`sh-segmented__item`,t&&`sh-segmented__item--disabled`].filter(Boolean).join(` `),children:[(0,n.jsx)(`input`,{className:`sh-segmented__input`,type:`radio`,name:m,value:e.value,checked:v===e.value,disabled:t,onChange:()=>y(e.value)}),(0,n.jsx)(`span`,{className:`sh-segmented__label`,children:e.label})]},e.value)})})]})}var Zt=t({accent:()=>X,accentFill:()=>$,colorVar:()=>tn,danger:()=>Q,neutral:()=>Z,palette:()=>Qt,paletteVar:()=>nn,semanticColors:()=>en}),X={50:`#f6f0ff`,100:`#ece0ff`,200:`#d9c2ff`,300:`#c19dff`,400:`#a672ff`,500:`#8b47fa`,600:`#7429e0`,700:`#5d1fb8`,800:`#461890`,900:`#331269`,950:`#1f0b40`},Z={0:`#ffffff`,50:`#f8f7fa`,100:`#efedf3`,200:`#e2dfe8`,300:`#cac6d3`,400:`#a29cae`,500:`#79728a`,600:`#5a5468`,700:`#423d4d`,800:`#2c2836`,900:`#1a1720`,950:`#0d0b12`},Q={50:`#fef3f2`,100:`#fee4e2`,200:`#fecdca`,300:`#fda29b`,400:`#f97066`,500:`#f04438`,600:`#d92d20`,700:`#b42318`,800:`#912018`,900:`#7a271a`,950:`#55160c`},Qt={accent:X,neutral:Z,danger:Q},$={bg:X[700],text:X[100]},$t={"accent-fill-bg":$.bg,"accent-fill-text":$.text},en={light:{"bg-canvas":Z[0],"bg-surface":Z[50],"bg-subtle":Z[100],text:Z[900],"text-subtle":Z[600],"text-inverse":Z[0],border:Z[200],"border-strong":Z[300],accent:X[600],"accent-hover":X[700],"accent-subtle-bg":X[50],"accent-subtle-text":X[700],...$t,danger:Q[700],"danger-border":Q[500],scrim:`rgb(0 0 0 / 0.45)`,"accent-tint-1":X[50],"accent-tint-2":X[100],"accent-tint-3":X[200],"accent-tint-4":X[300],"accent-on-tint":X[900]},dark:{"bg-canvas":Z[950],"bg-surface":Z[900],"bg-subtle":Z[800],text:Z[50],"text-subtle":Z[400],"text-inverse":Z[950],border:Z[700],"border-strong":Z[600],accent:X[400],"accent-hover":X[300],"accent-subtle-bg":X[900],"accent-subtle-text":X[200],...$t,danger:Q[300],"danger-border":Q[400],scrim:`rgb(0 0 0 / 0.65)`,"accent-tint-1":X[950],"accent-tint-2":X[900],"accent-tint-3":X[800],"accent-tint-4":X[700],"accent-on-tint":X[100]}};function tn(e){return`var(--color-${e})`}function nn(e,t){return`var(--color-${e}-${String(t)})`}exports.Accordion=Le,exports.AccordionItem=ze,exports.Alert=Bt,exports.Avatar=E,exports.AvatarGroup=D,exports.Breadcrumb=Ye,exports.BreadcrumbItem=Xe,exports.Button=d,exports.Carousel=_t,exports.CarouselDots=Tt,exports.CarouselNext=wt,exports.CarouselPlayPause=Ot,exports.CarouselPrevious=Ct,exports.CarouselSlide=bt,exports.CarouselSlides=yt,exports.Checkbox=Ee,exports.CheckboxGroup=De,exports.Chip=b,exports.CodeBlock=ae,exports.Dialog=ue,exports.Drawer=me,exports.Dropdown=I,exports.DropdownItem=R,exports.DropdownMenu=ee,exports.DropdownSeparator=te,exports.DropdownTrigger=L,exports.EmptyState=h,exports.FileDrop=Gt,exports.Input=k,exports.InputOtp=N,exports.MinMaxSlider=qt,exports.Pagination=Pe,exports.ProgressBar=Ft,exports.Radio=ke,exports.RadioGroup=Ae,exports.RangeSlider=Kt,exports.SegmentedControl=Xt,exports.Select=Ce,exports.Skeleton=At,exports.Spinner=Nt,exports.Step=Ge,exports.Stepper=He,exports.Switch=Jt,exports.SwitchGroup=Yt,exports.Tab=rt,exports.TabList=nt,exports.TabPanel=it,exports.Tabs=et,exports.Tag=g,exports.Text=l,exports.Textarea=we,exports.Tooltip=be,exports.accentFill=$,exports.alertVariants=Vt,exports.avatarSizes=O,exports.buttonClassNames=u,exports.buttonSizes=p,exports.buttonVariants=f,exports.chipActions=S,exports.chipVariants=x,Object.defineProperty(exports,"colorTokens",{enumerable:!0,get:function(){return Zt}}),exports.colorVar=tn,exports.dedentCode=z,exports.dialogRoles=fe,exports.dialogSizes=de,exports.drawerSides=he,exports.drawerSizes=ge,exports.formatFileSize=Ht,exports.getPaginationRange=je,exports.isFileAccepted=J,exports.otpTypes=A,exports.palette=Qt,exports.paletteVar=nn,exports.progressBarSizes=It,exports.resolveTooltipPlacement=ve,exports.sanitizeOtpValue=M,exports.semanticColors=en,exports.skeletonAnimations=Mt,exports.skeletonVariants=jt,exports.spinnerSizes=Pt,exports.tagVariants=_,exports.textColors=o,exports.textVariants=a,exports.textWeights=s;
|
|
7
7
|
//# sourceMappingURL=sonahang-ui.cjs.map
|