@aseguragonzalez/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/dist/components/AppShell/AppShell.d.ts +17 -0
- package/dist/components/Banner/Banner.d.ts +17 -0
- package/dist/components/BarChart/BarChart.d.ts +17 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +11 -0
- package/dist/components/Card/Card.d.ts +14 -0
- package/dist/components/Carousel/Carousel.d.ts +16 -0
- package/dist/components/CheckboxField/CheckboxField.d.ts +19 -0
- package/dist/components/Container/Container.d.ts +9 -0
- package/dist/components/DataTable/DataTable.d.ts +27 -0
- package/dist/components/DateField/DateField.d.ts +20 -0
- package/dist/components/DonutChart/DonutChart.d.ts +14 -0
- package/dist/components/EmailField/EmailField.d.ts +16 -0
- package/dist/components/Grid/Grid.d.ts +29 -0
- package/dist/components/LineChart/LineChart.d.ts +20 -0
- package/dist/components/Navbar/Navbar.d.ts +20 -0
- package/dist/components/NumberField/NumberField.d.ts +19 -0
- package/dist/components/PageLayout/PageLayout.d.ts +25 -0
- package/dist/components/PasswordField/PasswordField.d.ts +20 -0
- package/dist/components/PhoneField/PhoneField.d.ts +16 -0
- package/dist/components/RadarChart/RadarChart.d.ts +16 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +30 -0
- package/dist/components/ScatterPlot/ScatterPlot.d.ts +20 -0
- package/dist/components/SearchField/SearchField.d.ts +16 -0
- package/dist/components/Section/Section.d.ts +26 -0
- package/dist/components/SelectField/SelectField.d.ts +20 -0
- package/dist/components/Sidebar/Sidebar.d.ts +31 -0
- package/dist/components/Stack/Stack.d.ts +26 -0
- package/dist/components/TextAreaField/TextAreaField.d.ts +18 -0
- package/dist/components/TextField/TextField.d.ts +20 -0
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +18 -0
- package/dist/components/ThemeProvider/useTheme.d.ts +1 -0
- package/dist/components/ToggleField/ToggleField.d.ts +16 -0
- package/dist/components/shared/useFieldIds.d.ts +13 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +123 -0
- package/dist/index.js +264 -228
- package/dist/patterns/AuthLayout/AuthLayout.d.ts +15 -0
- package/dist/patterns/ExampleApp/AppShell.d.ts +9 -0
- package/dist/patterns/ExampleApp/ExampleApp.d.ts +1 -0
- package/dist/patterns/ExampleApp/components/KpiCard.d.ts +9 -0
- package/dist/patterns/ExampleApp/mockData.d.ts +22 -0
- package/dist/patterns/ExampleApp/pages/DashboardPage.d.ts +1 -0
- package/dist/patterns/ExampleApp/pages/SettingsPage.d.ts +1 -0
- package/dist/patterns/ExampleApp/pages/UsersPage.d.ts +1 -0
- package/dist/primitives/Alert/Alert.d.ts +10 -0
- package/dist/primitives/Avatar/Avatar.d.ts +11 -0
- package/dist/primitives/Badge/Badge.d.ts +8 -0
- package/dist/primitives/Button/Button.d.ts +11 -0
- package/dist/primitives/Checkbox/Checkbox.d.ts +7 -0
- package/dist/primitives/DateInput/DateInput.d.ts +13 -0
- package/dist/primitives/Divider/Divider.d.ts +13 -0
- package/dist/primitives/EmailInput/EmailInput.d.ts +12 -0
- package/dist/primitives/ErrorMessage/ErrorMessage.d.ts +12 -0
- package/dist/primitives/Heading/Heading.d.ts +15 -0
- package/dist/primitives/Hint/Hint.d.ts +6 -0
- package/dist/primitives/Label/Label.d.ts +9 -0
- package/dist/primitives/Modal/Modal.d.ts +37 -0
- package/dist/primitives/NumberInput/NumberInput.d.ts +10 -0
- package/dist/primitives/PasswordInput/PasswordInput.d.ts +16 -0
- package/dist/primitives/PhoneInput/PhoneInput.d.ts +12 -0
- package/dist/primitives/ProgressBar/ProgressBar.d.ts +12 -0
- package/dist/primitives/RadioButton/RadioButton.d.ts +7 -0
- package/dist/primitives/SearchInput/SearchInput.d.ts +13 -0
- package/dist/primitives/Select/Select.d.ts +12 -0
- package/dist/primitives/Skeleton/Skeleton.d.ts +15 -0
- package/dist/primitives/Spinner/Spinner.d.ts +7 -0
- package/dist/primitives/Tabs/Tabs.d.ts +31 -0
- package/dist/primitives/Text/Text.d.ts +13 -0
- package/dist/primitives/TextArea/TextArea.d.ts +9 -0
- package/dist/primitives/TextInput/TextInput.d.ts +12 -0
- package/dist/primitives/Toast/Toast.d.ts +28 -0
- package/dist/primitives/Toggle/Toggle.d.ts +13 -0
- package/dist/primitives/Tooltip/Tooltip.d.ts +14 -0
- package/dist/tokens.css +381 -0
- package/package.json +21 -9
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface AuthLayoutProps {
|
|
3
|
+
/** Form or main content rendered in the right panel. */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/** Custom branding content for the left panel. Replaces the default tagline. */
|
|
6
|
+
branding?: ReactNode;
|
|
7
|
+
/** Logo shown at the top of the form panel on mobile, and inside the branding panel on desktop. */
|
|
8
|
+
logo?: ReactNode;
|
|
9
|
+
/** Accessible label for the branding panel (hidden from visual display). */
|
|
10
|
+
brandingLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function AuthLayout({ children, branding, logo, brandingLabel, }: AuthLayoutProps): import("react").JSX.Element;
|
|
13
|
+
export declare namespace AuthLayout {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Page } from './mockData';
|
|
3
|
+
interface AppShellProps {
|
|
4
|
+
currentPage: Page;
|
|
5
|
+
onNavigate: (page: Page) => void;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function AppShell({ currentPage, onNavigate, children }: AppShellProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ExampleApp(): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BadgeVariant } from '../../../primitives/Badge/Badge';
|
|
2
|
+
interface KpiCardProps {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
change?: string;
|
|
6
|
+
changeVariant?: BadgeVariant;
|
|
7
|
+
}
|
|
8
|
+
export declare function KpiCard({ label, value, change, changeVariant }: KpiCardProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BarChartSeries } from '../../components/BarChart/BarChart';
|
|
2
|
+
import type { DonutSegment } from '../../components/DonutChart/DonutChart';
|
|
3
|
+
export type Page = 'dashboard' | 'users' | 'settings';
|
|
4
|
+
export interface User {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
email: string;
|
|
8
|
+
role: string;
|
|
9
|
+
status: string;
|
|
10
|
+
joined: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const USERS: User[];
|
|
13
|
+
export declare const MONTHLY_REVENUE_SERIES: BarChartSeries[];
|
|
14
|
+
export declare const USER_BY_PLAN_SEGMENTS: DonutSegment[];
|
|
15
|
+
export declare const ROLE_OPTIONS: {
|
|
16
|
+
value: string;
|
|
17
|
+
label: string;
|
|
18
|
+
}[];
|
|
19
|
+
export declare const NOTIFICATION_OPTIONS: {
|
|
20
|
+
value: string;
|
|
21
|
+
label: string;
|
|
22
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function DashboardPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SettingsPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function UsersPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type AlertVariant = 'error' | 'warning' | 'success' | 'info';
|
|
2
|
+
export interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
variant: AlertVariant;
|
|
4
|
+
title?: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
onDismiss?: () => void;
|
|
7
|
+
dismissLabel?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Alert: import("react").ForwardRefExoticComponent<AlertProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export { Alert };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
|
+
export type AvatarShape = 'circle' | 'square';
|
|
3
|
+
export interface AvatarProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
/** Full name — used for accessible label and to derive initials. */
|
|
5
|
+
name: string;
|
|
6
|
+
src?: string;
|
|
7
|
+
size?: AvatarSize;
|
|
8
|
+
shape?: AvatarShape;
|
|
9
|
+
}
|
|
10
|
+
declare const Avatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
export { Avatar };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type BadgeVariant = 'neutral' | 'brand' | 'accent' | 'error' | 'warning' | 'success' | 'info';
|
|
2
|
+
export type BadgeSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
variant?: BadgeVariant;
|
|
5
|
+
size?: BadgeSize;
|
|
6
|
+
}
|
|
7
|
+
declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
export { Badge };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'accent' | 'destructive';
|
|
2
|
+
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
loadingText?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type CheckboxSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
size?: CheckboxSize;
|
|
5
|
+
}
|
|
6
|
+
declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export { Checkbox };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type DateInputSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface DateInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
size?: DateInputSize;
|
|
5
|
+
/** ISO 8601 date string (YYYY-MM-DD). */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** ISO 8601 date string (YYYY-MM-DD). */
|
|
8
|
+
min?: string;
|
|
9
|
+
/** ISO 8601 date string (YYYY-MM-DD). */
|
|
10
|
+
max?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const DateInput: import("react").ForwardRefExoticComponent<DateInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
13
|
+
export { DateInput };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type DividerOrientation = 'horizontal' | 'vertical';
|
|
2
|
+
export interface DividerProps extends React.HTMLAttributes<HTMLHRElement> {
|
|
3
|
+
orientation?: DividerOrientation;
|
|
4
|
+
/**
|
|
5
|
+
* When true (default), the divider is purely visual — aria-hidden="true".
|
|
6
|
+
* When false, it acts as a semantic thematic break with role="separator".
|
|
7
|
+
*/
|
|
8
|
+
decorative?: boolean;
|
|
9
|
+
/** Accessible label for semantic dividers (decorative=false). */
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const Divider: import("react").ForwardRefExoticComponent<DividerProps & import("react").RefAttributes<HTMLHRElement>>;
|
|
13
|
+
export { Divider };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type EmailInputSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface EmailInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
size?: EmailInputSize;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Primitive email input — wraps input[type="email"].
|
|
8
|
+
* Does not manage label, hint, or error rendering.
|
|
9
|
+
* Use EmailField for the full accessible field composition.
|
|
10
|
+
*/
|
|
11
|
+
declare const EmailInput: import("react").ForwardRefExoticComponent<EmailInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
12
|
+
export { EmailInput };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ErrorMessageProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
2
|
+
/**
|
|
3
|
+
* Renders a validation error for a form field.
|
|
4
|
+
* Must be connected to the input via aria-describedby on the input side.
|
|
5
|
+
* We do NOT use role="alert" here — the parent TextField sets aria-invalid
|
|
6
|
+
* on the input, which is the correct WCAG pattern for inline form errors.
|
|
7
|
+
*/
|
|
8
|
+
declare function ErrorMessage({ children, className, ...nativeProps }: ErrorMessageProps): import("react").JSX.Element;
|
|
9
|
+
declare namespace ErrorMessage {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
export { ErrorMessage };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
2
|
+
export type HeadingSize = 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
3
|
+
export type HeadingColor = 'default' | 'muted' | 'inherit';
|
|
4
|
+
export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
5
|
+
/** Semantic heading level — determines the rendered HTML element (h1–h6). */
|
|
6
|
+
level: HeadingLevel;
|
|
7
|
+
/**
|
|
8
|
+
* Visual size. Defaults to a size appropriate for the level.
|
|
9
|
+
* Allows decoupling semantic hierarchy from visual hierarchy.
|
|
10
|
+
*/
|
|
11
|
+
size?: HeadingSize;
|
|
12
|
+
color?: HeadingColor;
|
|
13
|
+
}
|
|
14
|
+
declare const Heading: import("react").ForwardRefExoticComponent<HeadingProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
15
|
+
export { Heading };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare function Label({ required, disabled, children, className, ...nativeProps }: LabelProps): import("react").JSX.Element;
|
|
6
|
+
declare namespace Label {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
|
+
export { Label };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type ModalSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface ModalProps {
|
|
3
|
+
/** Whether the modal is open. */
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** Called when the user requests to close (Escape key or backdrop click). */
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
/** Accessible title rendered in the header. Required for ARIA. */
|
|
8
|
+
title: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
/** Accessible description id — set automatically when ModalBody is used. */
|
|
11
|
+
'aria-describedby'?: string;
|
|
12
|
+
size?: ModalSize;
|
|
13
|
+
/** Custom label for the close button. Default: "Close". */
|
|
14
|
+
closeLabel?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ModalHeaderProps {
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
titleId: string;
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
closeLabel: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ModalBodyProps {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
id?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ModalFooterProps {
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export declare function ModalBody({ children, id }: ModalBodyProps): import("react").JSX.Element;
|
|
30
|
+
export declare namespace ModalBody {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function ModalFooter({ children }: ModalFooterProps): import("react").JSX.Element;
|
|
34
|
+
export declare namespace ModalFooter {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const Modal: import("react").ForwardRefExoticComponent<ModalProps & import("react").RefAttributes<HTMLDialogElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type NumberInputSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface NumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
size?: NumberInputSize;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const NumberInput: import("react").ForwardRefExoticComponent<NumberInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
|
+
export { NumberInput };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type PasswordInputSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface PasswordInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
size?: PasswordInputSize;
|
|
5
|
+
/** Accessible label for the "show password" button state. */
|
|
6
|
+
showPasswordLabel?: string;
|
|
7
|
+
/** Accessible label for the "hide password" button state. */
|
|
8
|
+
hidePasswordLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Primitive password input — wraps input[type="password"] with an integrated show/hide toggle.
|
|
12
|
+
* Does not manage label, hint, or error rendering.
|
|
13
|
+
* Use PasswordField for the full accessible field composition.
|
|
14
|
+
*/
|
|
15
|
+
declare const PasswordInput: import("react").ForwardRefExoticComponent<PasswordInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
16
|
+
export { PasswordInput };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type PhoneInputSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface PhoneInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
size?: PhoneInputSize;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Primitive phone input — wraps input[type="tel"].
|
|
8
|
+
* Does not manage label, hint, or error rendering.
|
|
9
|
+
* Use PhoneField for the full accessible field composition.
|
|
10
|
+
*/
|
|
11
|
+
declare const PhoneInput: import("react").ForwardRefExoticComponent<PhoneInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
12
|
+
export { PhoneInput };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ProgressBarVariant = 'default' | 'accent' | 'success' | 'error' | 'warning';
|
|
2
|
+
export type ProgressBarSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface ProgressBarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** Accessible name — required by ARIA for role="progressbar". */
|
|
5
|
+
label: string;
|
|
6
|
+
/** 0–100. Omit for indeterminate state. */
|
|
7
|
+
value?: number;
|
|
8
|
+
variant?: ProgressBarVariant;
|
|
9
|
+
size?: ProgressBarSize;
|
|
10
|
+
}
|
|
11
|
+
declare const ProgressBar: import("react").ForwardRefExoticComponent<ProgressBarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export { ProgressBar };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type RadioButtonSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface RadioButtonProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
size?: RadioButtonSize;
|
|
5
|
+
}
|
|
6
|
+
declare const RadioButton: import("react").ForwardRefExoticComponent<RadioButtonProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export { RadioButton };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type SearchInputSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface SearchInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
size?: SearchInputSize;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Primitive search input — wraps input[type="search"] (implicit role: searchbox).
|
|
8
|
+
* The native browser cancel button is suppressed via CSS for visual consistency.
|
|
9
|
+
* Does not manage label, hint, or error rendering.
|
|
10
|
+
* Use SearchField for the full accessible field composition.
|
|
11
|
+
*/
|
|
12
|
+
declare const SearchInput: import("react").ForwardRefExoticComponent<SearchInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
13
|
+
export { SearchInput };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type SelectSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
size?: SelectSize;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Primitive select — wraps native <select>.
|
|
8
|
+
* Renders inside a wrapper div that provides the custom dropdown arrow.
|
|
9
|
+
* Use SelectField for the full accessible field composition.
|
|
10
|
+
*/
|
|
11
|
+
declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
12
|
+
export { Select };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type SkeletonShape = 'rect' | 'circle' | 'text';
|
|
2
|
+
export interface SkeletonProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
shape?: SkeletonShape;
|
|
4
|
+
/** CSS value for the width. Defaults to 100%. */
|
|
5
|
+
width?: string | number;
|
|
6
|
+
/** CSS value for the height. */
|
|
7
|
+
height?: string | number;
|
|
8
|
+
/**
|
|
9
|
+
* Number of text lines to render. Only applies when shape="text".
|
|
10
|
+
* The last line is rendered at 70% width to mimic natural text endings.
|
|
11
|
+
*/
|
|
12
|
+
lines?: number;
|
|
13
|
+
}
|
|
14
|
+
declare const Skeleton: import("react").ForwardRefExoticComponent<SkeletonProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
15
|
+
export { Skeleton };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type SpinnerSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
size?: SpinnerSize;
|
|
4
|
+
label?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
7
|
+
export { Spinner };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface TabsProps {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
/** Controlled active tab value. */
|
|
4
|
+
value?: string;
|
|
5
|
+
/** Initial active tab for uncontrolled usage. */
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Tabs: import("react").ForwardRefExoticComponent<TabsProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export interface TabListProps {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
/** Accessible label for the tab list — required by ARIA. */
|
|
14
|
+
label: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const TabList: import("react").ForwardRefExoticComponent<TabListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export interface TabProps {
|
|
19
|
+
value: string;
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
declare const Tab: import("react").ForwardRefExoticComponent<TabProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
export interface TabPanelProps {
|
|
26
|
+
value: string;
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
declare const TabPanel: import("react").ForwardRefExoticComponent<TabPanelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
|
+
export { Tabs, TabList, Tab, TabPanel };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type TextSize = 'lg' | 'md' | 'sm' | 'xs';
|
|
2
|
+
export type TextWeight = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
3
|
+
export type TextColor = 'default' | 'muted' | 'disabled' | 'error' | 'success' | 'warning' | 'inherit';
|
|
4
|
+
export type TextAs = 'p' | 'span' | 'div' | 'em' | 'strong' | 'small';
|
|
5
|
+
export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
6
|
+
/** Rendered HTML element. Defaults to 'p'. */
|
|
7
|
+
as?: TextAs;
|
|
8
|
+
size?: TextSize;
|
|
9
|
+
weight?: TextWeight;
|
|
10
|
+
color?: TextColor;
|
|
11
|
+
}
|
|
12
|
+
declare const Text: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<HTMLElement>>;
|
|
13
|
+
export { Text };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type TextAreaSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
size?: TextAreaSize;
|
|
5
|
+
/** Grows to fit content; disables the manual resize handle. */
|
|
6
|
+
autoResize?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const TextArea: import("react").ForwardRefExoticComponent<TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
9
|
+
export { TextArea };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type TextInputSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
size?: TextInputSize;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Primitive text input — wraps input[type="text"].
|
|
8
|
+
* Does not manage label, hint, or error rendering.
|
|
9
|
+
* Use TextField for the full accessible field composition.
|
|
10
|
+
*/
|
|
11
|
+
declare const TextInput: import("react").ForwardRefExoticComponent<TextInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
12
|
+
export { TextInput };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type ToastVariant = 'info' | 'success' | 'error' | 'warning';
|
|
2
|
+
export interface ToastItem {
|
|
3
|
+
id: string;
|
|
4
|
+
message: React.ReactNode;
|
|
5
|
+
variant: ToastVariant;
|
|
6
|
+
/** Auto-dismiss delay in ms. 0 = persist until dismissed. Default: 5000. */
|
|
7
|
+
duration: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ToastOptions {
|
|
10
|
+
message: React.ReactNode;
|
|
11
|
+
variant?: ToastVariant;
|
|
12
|
+
duration?: number;
|
|
13
|
+
}
|
|
14
|
+
interface ToastContextValue {
|
|
15
|
+
show: (opts: ToastOptions) => string;
|
|
16
|
+
dismiss: (id: string) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface ToastProviderProps {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
/** Max toasts visible at once. Default: 5. */
|
|
21
|
+
maxToasts?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function ToastProvider({ children, maxToasts }: ToastProviderProps): import("react").JSX.Element;
|
|
24
|
+
export declare namespace ToastProvider {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function useToast(): ToastContextValue;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type ToggleSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface ToggleProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
size?: ToggleSize;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Primitive toggle switch — wraps input[type="checkbox"] with role="switch".
|
|
8
|
+
* Semantically distinct from Checkbox: activates/deactivates something immediately.
|
|
9
|
+
* Does not manage label, hint, or error rendering.
|
|
10
|
+
* Use ToggleField for the full accessible field composition.
|
|
11
|
+
*/
|
|
12
|
+
declare const Toggle: import("react").ForwardRefExoticComponent<ToggleProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
13
|
+
export { Toggle };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
2
|
+
export interface TooltipProps {
|
|
3
|
+
/** Tooltip content — supplementary info only, never the only means to access critical content. */
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
/** Must be a single focusable element that forwards its ref. */
|
|
6
|
+
children: React.ReactElement;
|
|
7
|
+
placement?: TooltipPlacement;
|
|
8
|
+
/** Delay before showing, in ms. Default: 200. */
|
|
9
|
+
delayMs?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function Tooltip({ content, children, placement, delayMs, }: TooltipProps): import("react").JSX.Element;
|
|
12
|
+
export declare namespace Tooltip {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|