@mercury-fx/ui 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +44 -0
- package/dist/components/actions/Button/Button.d.ts +17 -0
- package/dist/components/actions/Button/index.d.ts +1 -0
- package/dist/components/actions/IconButton/IconButton.d.ts +24 -0
- package/dist/components/actions/IconButton/index.d.ts +1 -0
- package/dist/components/actions/Link/Link.d.ts +26 -0
- package/dist/components/actions/Link/index.d.ts +1 -0
- package/dist/components/data-display/Avatar/Avatar.d.ts +8 -0
- package/dist/components/data-display/Avatar/index.d.ts +1 -0
- package/dist/components/data-display/Badge/Badge.d.ts +8 -0
- package/dist/components/data-display/Badge/index.d.ts +1 -0
- package/dist/components/data-display/Blockquote/Blockquote.d.ts +18 -0
- package/dist/components/data-display/Blockquote/index.d.ts +1 -0
- package/dist/components/data-display/Card/Card.d.ts +9 -0
- package/dist/components/data-display/Card/index.d.ts +1 -0
- package/dist/components/data-display/Chart/Chart.d.ts +41 -0
- package/dist/components/data-display/Chart/index.d.ts +1 -0
- package/dist/components/data-display/Checklist/Checklist.d.ts +14 -0
- package/dist/components/data-display/Checklist/index.d.ts +1 -0
- package/dist/components/data-display/Chip/Chip.d.ts +13 -0
- package/dist/components/data-display/Chip/index.d.ts +1 -0
- package/dist/components/data-display/Code/Code.d.ts +22 -0
- package/dist/components/data-display/Code/index.d.ts +1 -0
- package/dist/components/data-display/DataList/DataList.d.ts +27 -0
- package/dist/components/data-display/DataList/index.d.ts +1 -0
- package/dist/components/data-display/Kbd/Kbd.d.ts +14 -0
- package/dist/components/data-display/Kbd/index.d.ts +1 -0
- package/dist/components/data-display/ListRow/ListRow.d.ts +16 -0
- package/dist/components/data-display/ListRow/index.d.ts +1 -0
- package/dist/components/data-display/Stat/Stat.d.ts +16 -0
- package/dist/components/data-display/Stat/index.d.ts +1 -0
- package/dist/components/data-display/Table/Table.d.ts +14 -0
- package/dist/components/data-display/Table/index.d.ts +1 -0
- package/dist/components/data-display/Tag/Tag.d.ts +9 -0
- package/dist/components/data-display/Tag/index.d.ts +1 -0
- package/dist/components/feedback/Alert/Alert.d.ts +11 -0
- package/dist/components/feedback/Alert/index.d.ts +1 -0
- package/dist/components/feedback/Callout/Callout.d.ts +26 -0
- package/dist/components/feedback/Callout/index.d.ts +1 -0
- package/dist/components/feedback/PasswordStrength/PasswordStrength.d.ts +13 -0
- package/dist/components/feedback/PasswordStrength/index.d.ts +1 -0
- package/dist/components/feedback/Progress/Progress.d.ts +9 -0
- package/dist/components/feedback/Progress/index.d.ts +1 -0
- package/dist/components/feedback/Skeleton/Skeleton.d.ts +19 -0
- package/dist/components/feedback/Skeleton/index.d.ts +1 -0
- package/dist/components/feedback/Spinner/Spinner.d.ts +18 -0
- package/dist/components/feedback/Spinner/index.d.ts +1 -0
- package/dist/components/foundations/Divider/Divider.d.ts +11 -0
- package/dist/components/foundations/Divider/index.d.ts +1 -0
- package/dist/components/foundations/Heading/Heading.d.ts +26 -0
- package/dist/components/foundations/Heading/index.d.ts +1 -0
- package/dist/components/foundations/Icon/Icon.d.ts +9 -0
- package/dist/components/foundations/Icon/index.d.ts +1 -0
- package/dist/components/foundations/Separator/Separator.d.ts +20 -0
- package/dist/components/foundations/Separator/index.d.ts +1 -0
- package/dist/components/foundations/Text/Text.d.ts +19 -0
- package/dist/components/foundations/Text/index.d.ts +1 -0
- package/dist/components/inputs/AuthCode/AuthCode.d.ts +10 -0
- package/dist/components/inputs/AuthCode/index.d.ts +1 -0
- package/dist/components/inputs/Calendar/Calendar.d.ts +24 -0
- package/dist/components/inputs/Calendar/index.d.ts +1 -0
- package/dist/components/inputs/DateField/DateField.d.ts +25 -0
- package/dist/components/inputs/DateField/index.d.ts +1 -0
- package/dist/components/inputs/Input/Input.d.ts +9 -0
- package/dist/components/inputs/Input/index.d.ts +1 -0
- package/dist/components/inputs/Label/Label.d.ts +20 -0
- package/dist/components/inputs/Label/index.d.ts +1 -0
- package/dist/components/inputs/MoneyInput/MoneyInput.d.ts +12 -0
- package/dist/components/inputs/MoneyInput/index.d.ts +1 -0
- package/dist/components/inputs/Search/Search.d.ts +7 -0
- package/dist/components/inputs/Search/index.d.ts +1 -0
- package/dist/components/inputs/Select/Select.d.ts +14 -0
- package/dist/components/inputs/Select/index.d.ts +1 -0
- package/dist/components/inputs/Textarea/Textarea.d.ts +9 -0
- package/dist/components/inputs/Textarea/index.d.ts +1 -0
- package/dist/components/layout/AspectRatio/AspectRatio.d.ts +14 -0
- package/dist/components/layout/AspectRatio/index.d.ts +1 -0
- package/dist/components/layout/AuthLayout/AuthLayout.d.ts +30 -0
- package/dist/components/layout/AuthLayout/index.d.ts +1 -0
- package/dist/components/layout/Box/Box.d.ts +35 -0
- package/dist/components/layout/Box/index.d.ts +1 -0
- package/dist/components/layout/Center/Center.d.ts +13 -0
- package/dist/components/layout/Center/index.d.ts +1 -0
- package/dist/components/layout/Cluster/Cluster.d.ts +18 -0
- package/dist/components/layout/Cluster/index.d.ts +1 -0
- package/dist/components/layout/Collapsible/Collapsible.d.ts +26 -0
- package/dist/components/layout/Collapsible/index.d.ts +1 -0
- package/dist/components/layout/Container/Container.d.ts +19 -0
- package/dist/components/layout/Container/index.d.ts +1 -0
- package/dist/components/layout/Flex/Flex.d.ts +24 -0
- package/dist/components/layout/Flex/index.d.ts +1 -0
- package/dist/components/layout/Grid/Grid.d.ts +26 -0
- package/dist/components/layout/Grid/index.d.ts +1 -0
- package/dist/components/layout/GridItem/GridItem.d.ts +19 -0
- package/dist/components/layout/GridItem/index.d.ts +1 -0
- package/dist/components/layout/ScrollArea/ScrollArea.d.ts +22 -0
- package/dist/components/layout/ScrollArea/index.d.ts +1 -0
- package/dist/components/layout/Section/Section.d.ts +18 -0
- package/dist/components/layout/Section/index.d.ts +1 -0
- package/dist/components/layout/Sidebar/Sidebar.d.ts +21 -0
- package/dist/components/layout/Sidebar/index.d.ts +1 -0
- package/dist/components/layout/Spacer/Spacer.d.ts +15 -0
- package/dist/components/layout/Spacer/index.d.ts +1 -0
- package/dist/components/layout/Stack/Stack.d.ts +20 -0
- package/dist/components/layout/Stack/index.d.ts +1 -0
- package/dist/components/layout/scales.d.ts +20 -0
- package/dist/components/navigation/Accordion/Accordion.d.ts +17 -0
- package/dist/components/navigation/Accordion/index.d.ts +1 -0
- package/dist/components/navigation/Menubar/Menubar.d.ts +53 -0
- package/dist/components/navigation/Menubar/index.d.ts +1 -0
- package/dist/components/navigation/Pagination/Pagination.d.ts +14 -0
- package/dist/components/navigation/Pagination/index.d.ts +1 -0
- package/dist/components/navigation/TabNav/TabNav.d.ts +38 -0
- package/dist/components/navigation/TabNav/index.d.ts +1 -0
- package/dist/components/navigation/Tabs/Tabs.d.ts +12 -0
- package/dist/components/navigation/Tabs/index.d.ts +1 -0
- package/dist/components/overlay/AlertDialog/AlertDialog.d.ts +33 -0
- package/dist/components/overlay/AlertDialog/index.d.ts +1 -0
- package/dist/components/overlay/ContextMenu/ContextMenu.d.ts +40 -0
- package/dist/components/overlay/ContextMenu/index.d.ts +1 -0
- package/dist/components/overlay/Dialog/Dialog.d.ts +33 -0
- package/dist/components/overlay/Dialog/index.d.ts +1 -0
- package/dist/components/overlay/Dropdown/Dropdown.d.ts +48 -0
- package/dist/components/overlay/Dropdown/index.d.ts +1 -0
- package/dist/components/overlay/HoverCard/HoverCard.d.ts +35 -0
- package/dist/components/overlay/HoverCard/index.d.ts +1 -0
- package/dist/components/overlay/LinkPreview/LinkPreview.d.ts +33 -0
- package/dist/components/overlay/LinkPreview/index.d.ts +1 -0
- package/dist/components/overlay/Modal/Modal.d.ts +10 -0
- package/dist/components/overlay/Modal/index.d.ts +1 -0
- package/dist/components/overlay/Popover/Popover.d.ts +35 -0
- package/dist/components/overlay/Popover/index.d.ts +1 -0
- package/dist/components/overlay/Tooltip/Tooltip.d.ts +6 -0
- package/dist/components/overlay/Tooltip/index.d.ts +1 -0
- package/dist/components/overlay/_overlay/Portal.d.ts +14 -0
- package/dist/components/selection/Checkbox/Checkbox.d.ts +12 -0
- package/dist/components/selection/Checkbox/index.d.ts +1 -0
- package/dist/components/selection/CheckboxCards/CheckboxCards.d.ts +20 -0
- package/dist/components/selection/CheckboxCards/index.d.ts +1 -0
- package/dist/components/selection/CheckboxGroup/CheckboxGroup.d.ts +17 -0
- package/dist/components/selection/CheckboxGroup/index.d.ts +1 -0
- package/dist/components/selection/Radio/Radio.d.ts +11 -0
- package/dist/components/selection/Radio/index.d.ts +1 -0
- package/dist/components/selection/RadioCards/RadioCards.d.ts +20 -0
- package/dist/components/selection/RadioCards/index.d.ts +1 -0
- package/dist/components/selection/RadioGroup/RadioGroup.d.ts +18 -0
- package/dist/components/selection/RadioGroup/index.d.ts +1 -0
- package/dist/components/selection/Segmented/Segmented.d.ts +13 -0
- package/dist/components/selection/Segmented/index.d.ts +1 -0
- package/dist/components/selection/Slider/Slider.d.ts +13 -0
- package/dist/components/selection/Slider/index.d.ts +1 -0
- package/dist/components/selection/Switch/Switch.d.ts +10 -0
- package/dist/components/selection/Switch/index.d.ts +1 -0
- package/dist/components/selection/Toggle/Toggle.d.ts +36 -0
- package/dist/components/selection/Toggle/index.d.ts +1 -0
- package/dist/index.d.ts +93 -0
- package/dist/mercury-ui.css +1 -0
- package/dist/mercury-ui.js +4049 -0
- package/package.json +58 -0
- package/src/styles/additions.css +1030 -0
- package/src/styles/fonts/DMMono-Italic.woff2 +0 -0
- package/src/styles/fonts/DMMono-Light.woff2 +0 -0
- package/src/styles/fonts/DMMono-LightItalic.woff2 +0 -0
- package/src/styles/fonts/DMMono-Medium.woff2 +0 -0
- package/src/styles/fonts/DMMono-MediumItalic.woff2 +0 -0
- package/src/styles/fonts/DMMono-Regular.woff2 +0 -0
- package/src/styles/fonts/DMSans-Bold.woff2 +0 -0
- package/src/styles/fonts/DMSans-BoldItalic.woff2 +0 -0
- package/src/styles/fonts/DMSans-Italic.woff2 +0 -0
- package/src/styles/fonts/DMSans-Medium.woff2 +0 -0
- package/src/styles/fonts/DMSans-MediumItalic.woff2 +0 -0
- package/src/styles/fonts/DMSans-Regular.woff2 +0 -0
- package/src/styles/fonts/DMSerifDisplay-Italic.woff2 +0 -0
- package/src/styles/fonts/DMSerifDisplay-Regular.woff2 +0 -0
- package/src/styles/index.css +5 -0
- package/src/styles/layout.css +55 -0
- package/src/styles/mercury.css +676 -0
- package/src/styles/tokens.css +438 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Icon";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type SeparatorOrientation = "horizontal" | "vertical";
|
|
3
|
+
export interface SeparatorProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
orientation?: SeparatorOrientation;
|
|
5
|
+
/** Optional centered label (horizontal only) — e.g. "or". */
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
/** Length: width for horizontal, height for vertical. Defaults to filling the container. */
|
|
8
|
+
size?: number | string;
|
|
9
|
+
/** Purely visual (default). Set `false` when it genuinely separates groups for AT. */
|
|
10
|
+
decorative?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Separator — a thin rule that divides content, horizontal or vertical, with an
|
|
14
|
+
* optional inline label. The Claude-Design sibling of `Divider`, with a richer
|
|
15
|
+
* `orientation` / `label` / `size` / `decorative` surface. The rule reads
|
|
16
|
+
* `--border-secondary` via `.mx-separator`; a custom `size` rides the
|
|
17
|
+
* `--mx-sep-size` custom property (no inline color).
|
|
18
|
+
*/
|
|
19
|
+
export declare function Separator({ orientation, label, size, decorative, className, style, ...rest }: SeparatorProps): import("react").JSX.Element;
|
|
20
|
+
export default Separator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Separator";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type TextVariant = "display" | "h1" | "h2" | "h3" | "h4" | "lead" | "body" | "small" | "muted" | "code" | "quote";
|
|
3
|
+
export interface TextProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
/** Typographic role — selects the element + the `.mx-text--<variant>` recipe. Default `body`. */
|
|
5
|
+
variant?: TextVariant;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/** Ink from an accent ramp (reads `--<ramp>-11`). Overrides the variant ink. */
|
|
8
|
+
accent?: "iris" | "indigo" | "green" | "orange" | "plum" | "red";
|
|
9
|
+
italic?: boolean;
|
|
10
|
+
align?: "left" | "center" | "right";
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Text — one typography primitive across Mercury's three families. Big headings ride
|
|
14
|
+
* DM Mono (`--font-secondary`); `display` rides DM Serif Display (`--font-display`);
|
|
15
|
+
* body copy rides DM Sans (`--font-primary`). Every variant resolves its ink from the
|
|
16
|
+
* `--fg-*` token families via `.mx-text--<variant>` — no inline color.
|
|
17
|
+
*/
|
|
18
|
+
export declare function Text({ variant, children, accent, italic, align, className, ...rest }: TextProps): import("react").JSX.Element;
|
|
19
|
+
export default Text;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Text";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface AuthCodeProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
onComplete?: (value: string) => void;
|
|
5
|
+
length?: number;
|
|
6
|
+
allow?: "numeric" | "alphanumeric";
|
|
7
|
+
error?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function AuthCode({ value, onChange, onComplete, length, allow, error, disabled }: AuthCodeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AuthCode";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { DateValue } from "@mercury-fx/core";
|
|
2
|
+
export interface CalendarProps {
|
|
3
|
+
/** Controlled selected day (a DateValue from @mercury-fx/core). */
|
|
4
|
+
value?: DateValue;
|
|
5
|
+
/** Initial selected day when uncontrolled. */
|
|
6
|
+
defaultValue?: DateValue;
|
|
7
|
+
/** Fires when a day is chosen. */
|
|
8
|
+
onChange?: (value: DateValue) => void;
|
|
9
|
+
/** BCP-47 locale for labels + week order (default "en"). */
|
|
10
|
+
locale?: string;
|
|
11
|
+
/** First column of the week, 0=Sun..6=Sat (default 0). */
|
|
12
|
+
firstDayOfWeek?: number;
|
|
13
|
+
/** Selected-day fill + today ring from an accent ramp. */
|
|
14
|
+
accent?: "iris" | "indigo" | "green" | "orange" | "plum" | "red";
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Calendar — a month-grid day picker. The grid, month paging, and value model
|
|
19
|
+
* come from @mercury-fx/core's useCalendar (over the owned internal/date-time
|
|
20
|
+
* machinery); this is the presentational @mercury-fx/ui home. INV-6: date types
|
|
21
|
+
* cross through @mercury-fx/core, never @internationalized/date directly. The nav
|
|
22
|
+
* chevrons are the live Icon (chevron-right; the prev control is flipped in CSS).
|
|
23
|
+
*/
|
|
24
|
+
export declare function Calendar({ value, defaultValue, onChange, locale, firstDayOfWeek, accent, className, }: CalendarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Calendar";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DateValue } from "@mercury-fx/core";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export interface DateFieldProps {
|
|
4
|
+
/** Controlled date value (a `DateValue` from `@mercury-fx/core`). Pass `undefined` for uncontrolled. */
|
|
5
|
+
value?: DateValue;
|
|
6
|
+
/** Initial value when uncontrolled. */
|
|
7
|
+
defaultValue?: DateValue;
|
|
8
|
+
/** Fires on each committed segment edit; `undefined` when the field is cleared. */
|
|
9
|
+
onChange?: (value: DateValue | undefined) => void;
|
|
10
|
+
/** Label above the segmented field. */
|
|
11
|
+
label?: ReactNode;
|
|
12
|
+
/** BCP-47 locale for segment ordering + literals (default `"en"`, via the hook). */
|
|
13
|
+
locale?: string;
|
|
14
|
+
/** Fades the field and blocks entry. */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* DateField — a segmented mm/dd/yyyy date entry. The value model, segment list,
|
|
20
|
+
* and keyboard arithmetic come from `@mercury-fx/core`'s `useDateField` (over the
|
|
21
|
+
* owned `internal/date-time` machinery); this component is the presentational
|
|
22
|
+
* `@mercury-fx/ui` home that renders the segments. INV-6: date types cross through
|
|
23
|
+
* `@mercury-fx/core`, never `@internationalized/date` directly.
|
|
24
|
+
*/
|
|
25
|
+
export declare function DateField({ value, defaultValue, onChange, label, locale, disabled, className, }: DateFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DateField";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
3
|
+
label?: string;
|
|
4
|
+
hint?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
leading?: ReactNode;
|
|
7
|
+
trailing?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Input";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { LabelHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type LabelSize = "sm" | "md" | "lg";
|
|
3
|
+
export interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
optional?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
size?: LabelSize;
|
|
9
|
+
/** Accent ramp for the required asterisk (reads `--<ramp>-11`). Default `red`. */
|
|
10
|
+
accent?: "iris" | "indigo" | "green" | "orange" | "plum" | "red";
|
|
11
|
+
hint?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Label — the form-caption primitive: semibold, tight tracking, with an accent-tinted
|
|
15
|
+
* required marker, a muted `(optional)` tag, and an optional hint line. Styled through
|
|
16
|
+
* `.mx-label` token classes; the required `*` reads `--<ramp>-11` (default `--red-11`)
|
|
17
|
+
* via the accent class — no inline color.
|
|
18
|
+
*/
|
|
19
|
+
export declare function Label({ children, required, optional, disabled, size, accent, hint, className, ...rest }: LabelProps): import("react").JSX.Element;
|
|
20
|
+
export default Label;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Label";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from "react";
|
|
2
|
+
export interface MoneyInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
3
|
+
/** The currency prefix rendered as a leading affix (e.g. `$` or `USD`). */
|
|
4
|
+
currency?: string;
|
|
5
|
+
/** Field label (like Input). */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Helper text below the field (like Input). */
|
|
8
|
+
hint?: string;
|
|
9
|
+
/** Error text + `aria-invalid` (like Input). */
|
|
10
|
+
error?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const MoneyInput: import("react").ForwardRefExoticComponent<MoneyInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./MoneyInput";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from "react";
|
|
2
|
+
export interface SearchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
onSearch?: (value: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function Search({ value, onChange, onSearch, placeholder, className, disabled, ...rest }: SearchProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Search";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SelectHTMLAttributes } from "react";
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "size"> {
|
|
8
|
+
label?: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
options: SelectOption[];
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Select";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TextareaHTMLAttributes } from "react";
|
|
2
|
+
export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
hint?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
resizable?: boolean;
|
|
7
|
+
size?: "sm" | "md" | "lg";
|
|
8
|
+
}
|
|
9
|
+
export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Textarea";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface AspectRatioProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** width / height — e.g. `16/9`, `1`, `4/3`. Default `16/9`. */
|
|
4
|
+
ratio?: number;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* AspectRatio — constrains its content to a fixed width-to-height ratio (media
|
|
9
|
+
* embeds, image frames, video). The box fills its container's width and derives
|
|
10
|
+
* its height from `ratio`; the child fills it absolutely. Structure lives in
|
|
11
|
+
* `.mx-aspect`; the ratio itself is a non-color dynamic inline style.
|
|
12
|
+
*/
|
|
13
|
+
export declare function AspectRatio({ ratio, children, className, style, ...rest }: AspectRatioProps): import("react").JSX.Element;
|
|
14
|
+
export default AspectRatio;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AspectRatio";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* AuthLayout — the branded split-screen shell for authentication flows.
|
|
4
|
+
* Left: a brand panel (hidden on narrow widths). Right: a centred form column
|
|
5
|
+
* with an eyebrow / heading / subheading and a footer slot. Fills its parent
|
|
6
|
+
* (height: 100%), so it works framed in a demo or as a full page.
|
|
7
|
+
*
|
|
8
|
+
* The brand panel is prop-driven with Mercury defaults; pass `brand` to
|
|
9
|
+
* replace its body wholesale.
|
|
10
|
+
*/
|
|
11
|
+
export interface AuthLayoutProps {
|
|
12
|
+
eyebrow?: string;
|
|
13
|
+
heading?: ReactNode;
|
|
14
|
+
subheading?: ReactNode;
|
|
15
|
+
/** The form body. */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
/** Footer row under the form (e.g. "New here? Create an account"). */
|
|
18
|
+
footer?: ReactNode;
|
|
19
|
+
/** Replace the brand-panel body entirely. */
|
|
20
|
+
brand?: ReactNode;
|
|
21
|
+
brandName?: string;
|
|
22
|
+
brandBadge?: string;
|
|
23
|
+
brandLogo?: ReactNode;
|
|
24
|
+
brandTagline?: ReactNode;
|
|
25
|
+
brandFeatures?: string[];
|
|
26
|
+
brandStatus?: string;
|
|
27
|
+
brandVersion?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function AuthLayout({ eyebrow, heading, subheading, children, footer, brand, brandName, brandBadge, brandLogo, brandTagline, brandFeatures, brandStatus, brandVersion, className, }: AuthLayoutProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AuthLayout";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes } from "react";
|
|
2
|
+
import type { RadiusScale, SpaceScale } from "../scales";
|
|
3
|
+
/** Semantic surface tokens → `rgb(var(--bg-<v>))`. */
|
|
4
|
+
export type BoxSurface = "primary" | "secondary" | "tertiary" | "brand" | "brand-subtle" | "elevated";
|
|
5
|
+
/** Elevation tokens → `var(--shadow-<v>)`. */
|
|
6
|
+
export type BoxShadow = "100" | "200" | "300" | "400" | "500" | "600";
|
|
7
|
+
export interface BoxProps extends HTMLAttributes<HTMLElement> {
|
|
8
|
+
/** Render as this element/component. Default `div`. */
|
|
9
|
+
as?: ElementType;
|
|
10
|
+
/** Padding, all sides → `var(--space-N)`. */
|
|
11
|
+
p?: SpaceScale;
|
|
12
|
+
/** Padding, inline (left+right). */
|
|
13
|
+
px?: SpaceScale;
|
|
14
|
+
/** Padding, block (top+bottom). */
|
|
15
|
+
py?: SpaceScale;
|
|
16
|
+
pt?: SpaceScale;
|
|
17
|
+
pr?: SpaceScale;
|
|
18
|
+
pb?: SpaceScale;
|
|
19
|
+
pl?: SpaceScale;
|
|
20
|
+
/** Background surface → `rgb(var(--bg-<v>))`. */
|
|
21
|
+
bg?: BoxSurface;
|
|
22
|
+
/** Corner radius → `var(--radius-N)`. */
|
|
23
|
+
radius?: RadiusScale;
|
|
24
|
+
/** A 1px secondary border. */
|
|
25
|
+
border?: boolean;
|
|
26
|
+
/** Elevation → `var(--shadow-N)`. */
|
|
27
|
+
shadow?: BoxShadow;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Box — the polymorphic styled block: padding, surface, radius, border, shadow,
|
|
31
|
+
* every value token-resolved. The base primitive the other Layout components
|
|
32
|
+
* compose over (a `Card`-like surface without `Card`'s semantics).
|
|
33
|
+
*/
|
|
34
|
+
export declare function Box({ as, p, px, py, pt, pr, pb, pl, bg, radius, border, shadow, className, style, ...rest }: BoxProps): import("react").JSX.Element;
|
|
35
|
+
export default Box;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Box";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes } from "react";
|
|
2
|
+
export interface CenterProps extends HTMLAttributes<HTMLElement> {
|
|
3
|
+
/** Render as this element/component. Default `div`. */
|
|
4
|
+
as?: ElementType;
|
|
5
|
+
/** Centre inline (`inline-grid`) rather than as a block. */
|
|
6
|
+
inline?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Center — places its child dead-centre on both axes (`place-items:center`).
|
|
10
|
+
* Presentational; the frame for empty-states, spinners, a centred CTA.
|
|
11
|
+
*/
|
|
12
|
+
export declare function Center({ as, inline, className, style, ...rest }: CenterProps): import("react").JSX.Element;
|
|
13
|
+
export default Center;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Center";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes } from "react";
|
|
2
|
+
import type { Align, Justify, SpaceScale } from "../scales";
|
|
3
|
+
export interface ClusterProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
/** Render as this element/component. Default `div`. */
|
|
5
|
+
as?: ElementType;
|
|
6
|
+
/** Gap between items → `var(--space-N)`. */
|
|
7
|
+
gap?: SpaceScale;
|
|
8
|
+
/** Cross-axis alignment → `align-items`. */
|
|
9
|
+
align?: Align;
|
|
10
|
+
/** Main-axis distribution → `justify-content`. */
|
|
11
|
+
justify?: Justify;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Cluster — a horizontal group that wraps: items flow left-to-right and wrap to
|
|
15
|
+
* the next line with one shared gap. Presentational; a chip/tag/action toolbar.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Cluster({ as, gap, align, justify, className, style, ...rest }: ClusterProps): import("react").JSX.Element;
|
|
18
|
+
export default Cluster;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Cluster";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface CollapsibleProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
3
|
+
/** The always-visible header label. */
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** Uncontrolled initial open state. Default `false`. */
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
/** Controlled open state — pair with `onOpenChange`. */
|
|
9
|
+
open?: boolean;
|
|
10
|
+
/** Called with the next open state on toggle. */
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
/** Wrap in a bordered card. Default `true`. */
|
|
13
|
+
bordered?: boolean;
|
|
14
|
+
/** Accent ramp tinting the toggle when open (bg `--<ramp>-3`, ink `--<ramp>-11`). Default `iris`. */
|
|
15
|
+
accent?: "iris" | "indigo" | "green" | "orange" | "plum" | "red";
|
|
16
|
+
/** Container width — number (px) or any length string. Default `360`. */
|
|
17
|
+
width?: number | string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Collapsible — a single disclosure: a header with a round toggle that reveals its
|
|
21
|
+
* body on a grid-rows height animation. Controlled (`open` + `onOpenChange`) or
|
|
22
|
+
* uncontrolled (`defaultOpen`). Distinct from Accordion (a managed set of disclosures);
|
|
23
|
+
* compose Collapsibles freely for an unmanaged group. The chevron is the live `Icon`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function Collapsible({ title, children, defaultOpen, open: openProp, onOpenChange, bordered, accent, width, className, style, ...rest }: CollapsibleProps): import("react").JSX.Element;
|
|
26
|
+
export default Collapsible;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Collapsible";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes } from "react";
|
|
2
|
+
import type { SpaceScale } from "../scales";
|
|
3
|
+
export type ContainerSize = "sm" | "md" | "lg" | "xl";
|
|
4
|
+
export interface ContainerProps extends HTMLAttributes<HTMLElement> {
|
|
5
|
+
/** Render as this element/component. Default `div`. */
|
|
6
|
+
as?: ElementType;
|
|
7
|
+
/** Max reading width. Default `lg` (1024px). */
|
|
8
|
+
size?: ContainerSize;
|
|
9
|
+
/** Horizontal padding → `var(--space-N)`. */
|
|
10
|
+
padding?: SpaceScale;
|
|
11
|
+
/** Centre horizontally (`margin-inline: auto`). Default `true`. */
|
|
12
|
+
center?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Container — a max-width reading column, centred by default. Retires the
|
|
16
|
+
* `maxWidth + margin:0 auto` inline objects (e.g. `Confirm.stories.tsx:26` `sheet`).
|
|
17
|
+
*/
|
|
18
|
+
export declare function Container({ as, size, padding, center, className, style, ...rest }: ContainerProps): import("react").JSX.Element;
|
|
19
|
+
export default Container;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Container";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes } from "react";
|
|
2
|
+
import type { Align, Justify, SpaceScale } from "../scales";
|
|
3
|
+
export type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
|
|
4
|
+
export interface FlexProps extends HTMLAttributes<HTMLElement> {
|
|
5
|
+
/** Render as this element/component. Default `div`. */
|
|
6
|
+
as?: ElementType;
|
|
7
|
+
/** Flex main axis. Default `row` (the `.mx-flex` base). */
|
|
8
|
+
direction?: FlexDirection;
|
|
9
|
+
/** Gap between children → `var(--space-N)`. */
|
|
10
|
+
gap?: SpaceScale;
|
|
11
|
+
/** Cross-axis alignment → `align-items`. */
|
|
12
|
+
align?: Align;
|
|
13
|
+
/** Main-axis distribution → `justify-content`. */
|
|
14
|
+
justify?: Justify;
|
|
15
|
+
/** Allow items to wrap onto multiple lines. */
|
|
16
|
+
wrap?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Flex — a one-dimensional flex row (or column via `direction`), with `gap`,
|
|
20
|
+
* `align`, `justify`, `wrap`. Presentational; retires the horizontal
|
|
21
|
+
* `display:flex` inline objects (e.g. `Confirm.stories.tsx:33` `headerRow`).
|
|
22
|
+
*/
|
|
23
|
+
export declare function Flex({ as, direction, gap, align, justify, wrap, className, style, ...rest }: FlexProps): import("react").JSX.Element;
|
|
24
|
+
export default Flex;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Flex";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes } from "react";
|
|
2
|
+
import type { Align, Justify, SpaceScale } from "../scales";
|
|
3
|
+
export type GridFlow = "row" | "column" | "dense" | "row dense" | "column dense";
|
|
4
|
+
export interface GridProps extends HTMLAttributes<HTMLElement> {
|
|
5
|
+
/** Render as this element/component. Default `div`. */
|
|
6
|
+
as?: ElementType;
|
|
7
|
+
/** Equal columns (→ `repeat(n, minmax(0, 1fr))`) or a raw template string. */
|
|
8
|
+
cols?: number | string;
|
|
9
|
+
/** Equal rows or a raw template string. */
|
|
10
|
+
rows?: number | string;
|
|
11
|
+
/** Gap between cells → `var(--space-N)`. */
|
|
12
|
+
gap?: SpaceScale;
|
|
13
|
+
/** Auto-placement flow → `grid-auto-flow`. */
|
|
14
|
+
flow?: GridFlow;
|
|
15
|
+
/** Cell block alignment → `align-items`. */
|
|
16
|
+
align?: Align;
|
|
17
|
+
/** Cell inline alignment → `justify-items`. */
|
|
18
|
+
justify?: Justify;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Grid — a two-dimensional CSS grid; `cols`/`rows` accept a count (equal tracks)
|
|
22
|
+
* or a raw template string. Presentational; retires the ad-hoc grid/column
|
|
23
|
+
* shells (e.g. a KPI row, a two-up `splitRow`).
|
|
24
|
+
*/
|
|
25
|
+
export declare function Grid({ as, cols, rows, gap, flow, align, justify, className, style, ...rest }: GridProps): import("react").JSX.Element;
|
|
26
|
+
export default Grid;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Grid";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes } from "react";
|
|
2
|
+
export interface GridItemProps extends HTMLAttributes<HTMLElement> {
|
|
3
|
+
/** Render as this element/component. Default `div`. */
|
|
4
|
+
as?: ElementType;
|
|
5
|
+
/** Column span → `grid-column-end: span n`. */
|
|
6
|
+
colSpan?: number;
|
|
7
|
+
/** Row span → `grid-row-end: span n`. */
|
|
8
|
+
rowSpan?: number;
|
|
9
|
+
/** Start column line → `grid-column-start`. */
|
|
10
|
+
colStart?: number;
|
|
11
|
+
/** Start row line → `grid-row-start`. */
|
|
12
|
+
rowStart?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* GridItem — a placement child for `Grid`: span columns/rows or pin to a start
|
|
16
|
+
* line. Presentational; the wide/tall cell of a KPI or table grid.
|
|
17
|
+
*/
|
|
18
|
+
export declare function GridItem({ as, colSpan, rowSpan, colStart, rowStart, className, style, ...rest }: GridItemProps): import("react").JSX.Element;
|
|
19
|
+
export default GridItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GridItem";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type ScrollAreaScrollbars = "vertical" | "horizontal" | "both";
|
|
3
|
+
export type ScrollAreaSize = "sm" | "md" | "lg";
|
|
4
|
+
export interface ScrollAreaProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** Which axes scroll. Default `vertical`. */
|
|
7
|
+
scrollbars?: ScrollAreaScrollbars;
|
|
8
|
+
/** Scrollbar thickness. Default `md`. */
|
|
9
|
+
size?: ScrollAreaSize;
|
|
10
|
+
/** Cap height — needed for `vertical`/`both` to scroll. Number → px. */
|
|
11
|
+
maxHeight?: number | string;
|
|
12
|
+
/** Container width. Number → px. */
|
|
13
|
+
width?: number | string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* ScrollArea — a scroll container with Mercury's thin, rounded custom scrollbars.
|
|
17
|
+
* `scrollbars` picks the axes; `size` picks the bar thickness. The scrollbar
|
|
18
|
+
* styling lives in `.mx-scrollarea` (webkit pseudo-elements reading neutral border
|
|
19
|
+
* tokens); only the `maxHeight`/`width` caps are non-color dynamic inline styles.
|
|
20
|
+
*/
|
|
21
|
+
export declare function ScrollArea({ children, scrollbars, size, maxHeight, width, className, style, ...rest }: ScrollAreaProps): import("react").JSX.Element;
|
|
22
|
+
export default ScrollArea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ScrollArea";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes } from "react";
|
|
2
|
+
import type { SpaceScale } from "../scales";
|
|
3
|
+
export interface SectionProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
/** Render as this element/component. Default `section`. */
|
|
5
|
+
as?: ElementType;
|
|
6
|
+
/** Vertical gap between blocks → `var(--space-N)`. */
|
|
7
|
+
gap?: SpaceScale;
|
|
8
|
+
/** Block padding (top+bottom) → `var(--space-N)`. */
|
|
9
|
+
py?: SpaceScale;
|
|
10
|
+
/** Inline padding (left+right) → `var(--space-N)`. */
|
|
11
|
+
px?: SpaceScale;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Section — a semantic, padded page block: a vertical `Stack` that renders as a
|
|
15
|
+
* real `<section>` by default. Presentational; the page's structural rhythm.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Section({ as, gap, py, px, className, style, ...rest }: SectionProps): import("react").JSX.Element;
|
|
18
|
+
export default Section;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Section";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { SpaceScale } from "../scales";
|
|
3
|
+
export type SidebarSide = "left" | "right";
|
|
4
|
+
export interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
5
|
+
/** Render as this element/component. Default `div`. */
|
|
6
|
+
as?: ElementType;
|
|
7
|
+
/** The fixed-width rail content. */
|
|
8
|
+
aside?: ReactNode;
|
|
9
|
+
/** Which side the rail sits on. Default `left`. */
|
|
10
|
+
side?: SidebarSide;
|
|
11
|
+
/** The rail's fixed width — a layout dimension (px number or a CSS length). Default 272. */
|
|
12
|
+
sideWidth?: number | string;
|
|
13
|
+
/** Gap between rail and main → `var(--space-N)`. */
|
|
14
|
+
gap?: SpaceScale;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Sidebar — a fixed-width rail beside a growing main column. Presentational;
|
|
18
|
+
* the two-column app shell (retires the `economy` `.ecn-body` rail+main).
|
|
19
|
+
*/
|
|
20
|
+
export declare function Sidebar({ as, aside, side, sideWidth, gap, children, className, style, ...rest }: SidebarProps): import("react").JSX.Element;
|
|
21
|
+
export default Sidebar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Sidebar";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes } from "react";
|
|
2
|
+
import type { SpaceScale } from "../scales";
|
|
3
|
+
export interface SpacerProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
/** Render as this element/component. Default `div`. */
|
|
5
|
+
as?: ElementType;
|
|
6
|
+
/** A fixed spacer of `var(--space-N)`; omit to grow and fill the free space. */
|
|
7
|
+
size?: SpaceScale;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Spacer — flexible empty space inside a flex row/column. Grows to fill by
|
|
11
|
+
* default (`.mx-spacer` = `flex:1 1 0%`); `size` makes it a fixed gap. Pushes
|
|
12
|
+
* siblings apart in an action bar / toolbar.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Spacer({ as, size, className, style, ...rest }: SpacerProps): import("react").JSX.Element;
|
|
15
|
+
export default Spacer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Spacer";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes } from "react";
|
|
2
|
+
import type { Align, Justify, SpaceScale } from "../scales";
|
|
3
|
+
export interface StackProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
/** Render as this element/component. Default `div`. */
|
|
5
|
+
as?: ElementType;
|
|
6
|
+
/** Vertical gap between children → `var(--space-N)`. */
|
|
7
|
+
gap?: SpaceScale;
|
|
8
|
+
/** Cross-axis (horizontal) alignment → `align-items`. */
|
|
9
|
+
align?: Align;
|
|
10
|
+
/** Main-axis (vertical) distribution → `justify-content`. */
|
|
11
|
+
justify?: Justify;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Stack — a vertical flow: children stack top-to-bottom, separated by `gap`.
|
|
15
|
+
* Presentational; the flex direction lives in `.mx-stack`, spacing/alignment are
|
|
16
|
+
* inline token-resolved values. Retires the `flex-direction:column` inline objects
|
|
17
|
+
* (e.g. `apps/storybook/stories/scenes/Confirm.stories.tsx:25` `sheet`).
|
|
18
|
+
*/
|
|
19
|
+
export declare function Stack({ as, gap, align, justify, className, style, ...rest }: StackProps): import("react").JSX.Element;
|
|
20
|
+
export default Stack;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Stack";
|