@zango-core/components 0.2.0-rc.3 → 0.2.1

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.
Files changed (76) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +29 -0
  3. package/README.md +56 -376
  4. package/dist/components/Accordion/Accordion.d.ts +3 -1
  5. package/dist/components/Accordion/index.d.ts +1 -1
  6. package/dist/components/Alert/Alert.d.ts +14 -0
  7. package/dist/components/Alert/index.d.ts +1 -1
  8. package/dist/components/Avatar/Avatar.d.ts +13 -0
  9. package/dist/components/Avatar/index.d.ts +1 -1
  10. package/dist/components/Badge/Badge.d.ts +8 -1
  11. package/dist/components/Badge/index.d.ts +1 -1
  12. package/dist/components/Button/Button.d.ts +24 -1
  13. package/dist/components/Button/index.d.ts +1 -1
  14. package/dist/components/Card/Card.d.ts +34 -0
  15. package/dist/components/Card/index.d.ts +1 -1
  16. package/dist/components/Checkbox/Checkbox.d.ts +6 -0
  17. package/dist/components/ContextMenu/ContextMenu.d.ts +33 -1
  18. package/dist/components/ContextMenu/index.d.ts +1 -1
  19. package/dist/components/Dialog/index.d.ts +1 -1
  20. package/dist/components/Divider/Divider.d.ts +12 -0
  21. package/dist/components/Divider/index.d.ts +1 -1
  22. package/dist/components/Drawer/Drawer.d.ts +2 -0
  23. package/dist/components/Drawer/index.d.ts +1 -1
  24. package/dist/components/Empty/Empty.d.ts +9 -0
  25. package/dist/components/Empty/index.d.ts +1 -1
  26. package/dist/components/Form/Form.d.ts +34 -0
  27. package/dist/components/Form/index.d.ts +1 -1
  28. package/dist/components/FormWidgets/index.d.ts +4 -4
  29. package/dist/components/InfoSection/InfoSection.d.ts +35 -0
  30. package/dist/components/InfoSection/index.d.ts +1 -1
  31. package/dist/components/Input/Input.d.ts +12 -1
  32. package/dist/components/Layout/Layout.d.ts +36 -0
  33. package/dist/components/Layout/index.d.ts +1 -1
  34. package/dist/components/Loader/Loader.d.ts +0 -1
  35. package/dist/components/Loader/index.d.ts +1 -0
  36. package/dist/components/MobileInput/MobileInput.d.ts +9 -0
  37. package/dist/components/PasswordInput/PasswordInput.d.ts +6 -1
  38. package/dist/components/PhoneNumberInput/PhoneNumberInput.d.ts +45 -0
  39. package/dist/components/PhoneNumberInput/PhoneNumberInput.example.d.ts +7 -5
  40. package/dist/components/PhoneNumberInput/index.d.ts +1 -1
  41. package/dist/components/Progress/Progress.d.ts +18 -0
  42. package/dist/components/Progress/index.d.ts +1 -1
  43. package/dist/components/Result/Result.d.ts +11 -0
  44. package/dist/components/Result/index.d.ts +1 -1
  45. package/dist/components/Segmented/Segmented.d.ts +16 -0
  46. package/dist/components/Segmented/index.d.ts +1 -1
  47. package/dist/components/Select/Select.d.ts +30 -2
  48. package/dist/components/Select/index.d.ts +1 -1
  49. package/dist/components/Space/Space.d.ts +11 -0
  50. package/dist/components/Space/index.d.ts +1 -1
  51. package/dist/components/Spin/Spin.d.ts +10 -0
  52. package/dist/components/Spin/index.d.ts +1 -1
  53. package/dist/components/Tabs/Tabs.d.ts +18 -0
  54. package/dist/components/Tabs/index.d.ts +1 -1
  55. package/dist/components/Tag/Tag.d.ts +11 -0
  56. package/dist/components/Tag/index.d.ts +1 -1
  57. package/dist/components/Textarea/Textarea.d.ts +7 -0
  58. package/dist/components/Timeline/Timeline.d.ts +31 -6
  59. package/dist/components/Timeline/index.d.ts +1 -1
  60. package/dist/components/Toast/Toast.d.ts +29 -0
  61. package/dist/components/Toast/index.d.ts +1 -1
  62. package/dist/components/Typography/Typography.d.ts +26 -1
  63. package/dist/components/Typography/index.d.ts +1 -1
  64. package/dist/demo/App.d.ts +1 -1
  65. package/dist/index.d.ts +45 -46
  66. package/dist/test/axe.d.ts +1 -0
  67. package/dist/test/setup.d.ts +1 -0
  68. package/dist/utils/cn.d.ts +6 -0
  69. package/dist/utils/gradient.d.ts +30 -0
  70. package/dist/zango-components.js +5894 -4281
  71. package/dist/zango-components.js.map +1 -1
  72. package/dist/zango-components.umd.cjs +36 -97
  73. package/dist/zango-components.umd.cjs.map +1 -1
  74. package/package.json +70 -28
  75. package/dist/components/Message/Message.d.ts +0 -35
  76. package/dist/components/Message/index.d.ts +0 -2
@@ -1,10 +1,12 @@
1
+ import { default as React } from 'react';
2
+
1
3
  /**
2
4
  * Simple usage example for PhoneNumberInput
3
5
  * This can be used as a reference for integrating into existing forms
4
6
  */
5
- export declare const BasicPhoneNumberExample: () => import("react/jsx-runtime").JSX.Element;
6
- export declare const FormIntegrationExample: () => import("react/jsx-runtime").JSX.Element;
7
- export declare const FixedCountryExample: () => import("react/jsx-runtime").JSX.Element;
8
- export declare const ValidationExample: () => import("react/jsx-runtime").JSX.Element;
9
- declare const PhoneNumberInputExamples: () => import("react/jsx-runtime").JSX.Element;
7
+ export declare const BasicPhoneNumberExample: () => React.JSX.Element;
8
+ export declare const FormIntegrationExample: () => React.JSX.Element;
9
+ export declare const FixedCountryExample: () => React.JSX.Element;
10
+ export declare const ValidationExample: () => React.JSX.Element;
11
+ declare const PhoneNumberInputExamples: () => React.JSX.Element;
10
12
  export default PhoneNumberInputExamples;
@@ -1 +1 @@
1
- export { default, type PhoneNumberInputProps, type Country } from './PhoneNumberInput';
1
+ export { type Country, default, type PhoneNumberInputProps } from './PhoneNumberInput';
@@ -1,15 +1,33 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  export interface ProgressProps {
4
+ /** Completion percentage, clamped to 0–100 */
4
5
  percent?: number;
6
+ /** Display variant: horizontal bar or circular gauge */
5
7
  type?: 'line' | 'circle';
8
+ /** Visual status that controls bar color */
6
9
  status?: 'normal' | 'exception' | 'active' | 'success';
10
+ /** Whether to render the percentage label */
7
11
  showInfo?: boolean;
12
+ /** Custom formatter for the progress label */
8
13
  format?: (percent?: number) => React.ReactNode;
14
+ /** Override the bar/arc fill color */
9
15
  strokeColor?: string;
16
+ /** Override the bar height or arc stroke width in pixels */
10
17
  strokeWidth?: number;
18
+ /** Controls the overall size of the component */
11
19
  size?: 'default' | 'small';
20
+ /** Accessible name for the progress bar (defaults to "Progress") */
21
+ 'aria-label'?: string;
22
+ /** References the id of an element that labels the progress bar */
23
+ 'aria-labelledby'?: string;
24
+ /** Additional className applied to the root element */
12
25
  className?: string;
26
+ /** Inline styles applied to the root element */
13
27
  style?: React.CSSProperties;
14
28
  }
29
+ /**
30
+ * Displays completion status as a horizontal bar or circular gauge.
31
+ * Supports normal, active, success, and exception visual states.
32
+ */
15
33
  export declare const Progress: React.FC<ProgressProps>;
@@ -1,2 +1,2 @@
1
- export { Progress } from './Progress';
2
1
  export type { ProgressProps } from './Progress';
2
+ export { Progress } from './Progress';
@@ -1,12 +1,23 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  export interface ResultProps {
4
+ /** Determines the built-in icon and color scheme */
4
5
  status?: 'success' | 'error' | 'info' | 'warning' | '404' | '403' | '500';
6
+ /** Primary heading text */
5
7
  title?: React.ReactNode;
8
+ /** Secondary descriptive text below the title */
6
9
  subTitle?: React.ReactNode;
10
+ /** Custom icon that replaces the default status icon */
7
11
  icon?: React.ReactNode;
12
+ /** Action elements rendered below the subtitle (e.g. buttons) */
8
13
  extra?: React.ReactNode;
14
+ /** Additional className applied to the root element */
9
15
  className?: string;
16
+ /** Inline styles applied to the root element */
10
17
  style?: React.CSSProperties;
11
18
  }
19
+ /**
20
+ * Full-page result display for operation outcomes such as success, error, or HTTP status codes.
21
+ * Renders a status icon, title, subtitle, and optional action elements.
22
+ */
12
23
  export declare const Result: React.FC<ResultProps>;
@@ -1,2 +1,2 @@
1
- export { Result } from './Result';
2
1
  export type { ResultProps } from './Result';
2
+ export { Result } from './Result';
@@ -1,19 +1,35 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  export interface SegmentedOption {
4
+ /** Display content for the segment button */
4
5
  label: React.ReactNode;
6
+ /** Unique value identifying this option */
5
7
  value: string | number;
8
+ /** Whether this individual option is non-interactive */
6
9
  disabled?: boolean;
10
+ /** Optional icon rendered before the label */
7
11
  icon?: React.ReactNode;
8
12
  }
9
13
  export interface SegmentedProps {
14
+ /** List of segment options; plain strings/numbers are auto-normalized */
10
15
  options: SegmentedOption[] | (string | number)[];
16
+ /** Controlled selected value */
11
17
  value?: string | number;
18
+ /** Initial selected value for uncontrolled usage */
12
19
  defaultValue?: string | number;
20
+ /** Called when the selected value changes */
13
21
  onChange?: (value: string | number) => void;
22
+ /** Whether the entire control is non-interactive */
14
23
  disabled?: boolean;
24
+ /** Controls the padding and font size of segment buttons */
15
25
  size?: 'small' | 'middle' | 'large';
26
+ /** Additional className applied to the root element */
16
27
  className?: string;
28
+ /** Inline styles applied to the root element */
17
29
  style?: React.CSSProperties;
18
30
  }
31
+ /**
32
+ * Segmented control that lets users pick one option from a compact button group.
33
+ * Supports controlled and uncontrolled modes with full keyboard navigation.
34
+ */
19
35
  export declare const Segmented: React.FC<SegmentedProps>;
@@ -1,2 +1,2 @@
1
+ export type { SegmentedOption, SegmentedProps } from './Segmented';
1
2
  export { Segmented } from './Segmented';
2
- export type { SegmentedProps, SegmentedOption } from './Segmented';
@@ -1,27 +1,55 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  export interface SelectOption {
4
+ /** Unique value submitted when this option is selected */
4
5
  value: string | number;
6
+ /** Display content rendered in the trigger and dropdown */
5
7
  label: React.ReactNode;
8
+ /** Whether this option is non-interactive */
6
9
  disabled?: boolean;
7
10
  }
8
11
  export interface SelectProps {
12
+ /** Controlled selected value */
9
13
  value?: string | number;
14
+ /** Initial selected value for uncontrolled usage */
10
15
  defaultValue?: string | number;
16
+ /** Placeholder shown when no option is selected */
11
17
  placeholder?: string;
18
+ /** Option list; mutually exclusive with declarative children */
12
19
  options?: SelectOption[];
13
- onChange?: (value: string | number, option: SelectOption) => void;
20
+ /** Called when the selected value changes; receives `undefined` after a clear */
21
+ onChange?: (value: string | number | undefined, option: SelectOption | null) => void;
22
+ /** Called when an option is explicitly selected */
14
23
  onSelect?: (value: string | number, option: SelectOption) => void;
24
+ /** Whether the control is non-interactive */
15
25
  disabled?: boolean;
26
+ /** Whether a clear button is shown when a value is selected */
16
27
  allowClear?: boolean;
28
+ /** Whether to render a search input inside the dropdown */
17
29
  showSearch?: boolean;
30
+ /** Custom predicate for filtering options when `showSearch` is enabled */
18
31
  filterOption?: (input: string, option?: SelectOption) => boolean;
19
- size?: "small" | "medium" | "large";
32
+ /** Controls the trigger height and font size */
33
+ size?: 'small' | 'medium' | 'large';
34
+ /** Additional className applied to the root wrapper element */
20
35
  className?: string;
36
+ /** Inline styles applied to the root wrapper element */
21
37
  style?: React.CSSProperties;
38
+ /** Additional className applied to the dropdown list */
22
39
  dropdownClassName?: string;
40
+ /** Accessible name for the combobox (recommended when no visible label wraps it) */
41
+ 'aria-label'?: string;
42
+ /** References the id of an element that labels the combobox */
43
+ 'aria-labelledby'?: string;
44
+ /** Marks the combobox invalid for assistive tech (e.g. failed validation) */
45
+ 'aria-invalid'?: boolean;
46
+ /** Declarative `Select.Option` children used instead of the `options` prop */
23
47
  children?: React.ReactNode;
24
48
  }
49
+ /**
50
+ * Accessible dropdown select with optional search filtering and clear button.
51
+ * Accepts options via the `options` prop or declarative `Select.Option` children.
52
+ */
25
53
  export declare const Select: React.FC<SelectProps> & {
26
54
  Option: React.FC<{
27
55
  value: string | number;
@@ -1,2 +1,2 @@
1
+ export type { SelectOption, SelectProps } from './Select';
1
2
  export { Select } from './Select';
2
- export type { SelectProps, SelectOption } from './Select';
@@ -1,12 +1,23 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  export interface SpaceProps {
4
+ /** Child elements to space */
4
5
  children: React.ReactNode;
6
+ /** Flex direction for child arrangement */
5
7
  direction?: 'horizontal' | 'vertical';
8
+ /** Gap between children; named sizes map to 8/16/24 px */
6
9
  size?: 'small' | 'medium' | 'large' | number;
10
+ /** Cross-axis alignment of children */
7
11
  align?: 'start' | 'end' | 'center' | 'baseline';
12
+ /** Whether children wrap to the next line when they overflow */
8
13
  wrap?: boolean;
14
+ /** Additional className applied to the root element */
9
15
  className?: string;
16
+ /** Inline styles applied to the root element */
10
17
  style?: React.CSSProperties;
11
18
  }
19
+ /**
20
+ * Flex container that adds consistent spacing between its children.
21
+ * Supports horizontal and vertical directions, alignment, and wrapping.
22
+ */
12
23
  export declare const Space: React.FC<SpaceProps>;
@@ -1,2 +1,2 @@
1
- export { Space } from './Space';
2
1
  export type { SpaceProps } from './Space';
2
+ export { Space } from './Space';
@@ -1,11 +1,21 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  export interface SpinProps {
4
+ /** Whether the spinner is active */
4
5
  spinning?: boolean;
6
+ /** Controls the spinner diameter */
5
7
  size?: 'small' | 'default' | 'large';
8
+ /** Loading message displayed beneath the spinner */
6
9
  tip?: string;
10
+ /** Content to overlay with the spinner when spinning */
7
11
  children?: React.ReactNode;
12
+ /** Additional className applied to the root element */
8
13
  className?: string;
14
+ /** Inline styles applied to the root element */
9
15
  style?: React.CSSProperties;
10
16
  }
17
+ /**
18
+ * Animated loading spinner with an optional overlay for wrapping content.
19
+ * When `children` are provided, a semi-transparent overlay covers them while `spinning` is true.
20
+ */
11
21
  export declare const Spin: React.FC<SpinProps>;
@@ -1,2 +1,2 @@
1
- export { Spin } from './Spin';
2
1
  export type { SpinProps } from './Spin';
2
+ export { Spin } from './Spin';
@@ -1,21 +1,39 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  export interface TabItem {
4
+ /** Unique identifier for the tab */
4
5
  key: string;
6
+ /** Tab header label */
5
7
  label: React.ReactNode;
8
+ /** Content rendered when this tab is active */
6
9
  children: React.ReactNode;
10
+ /** Whether the tab is non-interactive */
7
11
  disabled?: boolean;
8
12
  }
9
13
  export interface TabsProps {
14
+ /** Controlled active tab key */
10
15
  activeKey?: string;
16
+ /** Initial active tab key when uncontrolled */
11
17
  defaultActiveKey?: string;
18
+ /** Array of tab descriptors */
12
19
  items: TabItem[];
20
+ /** Callback fired when the active tab changes */
13
21
  onChange?: (activeKey: string) => void;
22
+ /** Visual style of the tab strip */
14
23
  type?: 'line' | 'card';
24
+ /** Size of the tab buttons */
15
25
  size?: 'small' | 'default' | 'large';
26
+ /** Position of the tab strip relative to its panel */
16
27
  tabPosition?: 'top' | 'bottom' | 'left' | 'right';
28
+ /** Additional class names for the root element */
17
29
  className?: string;
30
+ /** Additional class names for the tab panel */
18
31
  contentClassName?: string;
32
+ /** Inline styles for the root element */
19
33
  style?: React.CSSProperties;
20
34
  }
35
+ /**
36
+ * Tab navigation component supporting controlled and uncontrolled modes, line and card visual styles,
37
+ * and all four tab positions. Implements the WAI-ARIA tabs pattern with full keyboard navigation.
38
+ */
21
39
  export declare const Tabs: React.FC<TabsProps>;
@@ -1,2 +1,2 @@
1
+ export type { TabItem, TabsProps } from './Tabs';
1
2
  export { Tabs } from './Tabs';
2
- export type { TabsProps, TabItem } from './Tabs';
@@ -1,12 +1,23 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  export interface TagProps {
4
+ /** Tag label content */
4
5
  children: React.ReactNode;
6
+ /** Preset semantic color or any valid CSS color value */
5
7
  color?: string | 'success' | 'processing' | 'error' | 'warning' | 'default';
8
+ /** Whether a close button is rendered */
6
9
  closable?: boolean;
10
+ /** Callback fired when the close button is clicked */
7
11
  onClose?: (e: React.MouseEvent) => void;
12
+ /** Additional class names */
8
13
  className?: string;
14
+ /** Inline styles */
9
15
  style?: React.CSSProperties;
16
+ /** Optional icon rendered before the label */
10
17
  icon?: React.ReactNode;
11
18
  }
19
+ /**
20
+ * Small inline label used to categorize content or indicate status.
21
+ * Supports preset semantic colors, arbitrary CSS color values, and an optional close button.
22
+ */
12
23
  export declare const Tag: React.FC<TagProps>;
@@ -1,2 +1,2 @@
1
- export { Tag } from './Tag';
2
1
  export type { TagProps } from './Tag';
2
+ export { Tag } from './Tag';
@@ -1,7 +1,14 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
4
+ /** Whether the textarea is in an error state, applying error border styling */
4
5
  error?: boolean;
6
+ /** Helper or error message displayed below the textarea */
7
+ helperText?: string;
5
8
  }
9
+ /**
10
+ * Multi-line text input built on the native textarea element with consistent Zango styling.
11
+ * Supports an error state, helper/error text, all standard textarea attributes, and ref forwarding.
12
+ */
6
13
  declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
7
14
  export default Textarea;
@@ -1,30 +1,55 @@
1
1
  export interface TimelineEvent {
2
+ /** Unique identifier for the event */
2
3
  id: string;
3
- type: "status_change" | "consultation" | "prescription" | "vitals" | "custom";
4
+ /** Semantic category of the event */
5
+ type: 'status_change' | 'consultation' | 'prescription' | 'vitals' | 'custom';
6
+ /** Primary event label */
4
7
  title: string;
8
+ /** Secondary label rendered after the title */
5
9
  subtitle?: string;
10
+ /** Additional descriptive text below the title */
6
11
  description?: string;
12
+ /** Formatted time string displayed on the event card */
7
13
  timestamp: string;
14
+ /** Formatted date string displayed on the event card */
8
15
  date: string;
9
- icon?: "user" | "activity" | "file" | "calendar" | "clock" | "custom";
16
+ /** Built-in icon name to use for the event marker */
17
+ icon?: 'user' | 'activity' | 'file' | 'calendar' | 'clock' | 'custom';
18
+ /** URL of a custom image used as the event marker */
10
19
  iconUrl?: string;
11
- metadata?: Record<string, any>;
20
+ /** Arbitrary key–value pairs rendered as a metadata table */
21
+ metadata?: Record<string, unknown>;
12
22
  }
13
23
  export interface TimelineSection {
24
+ /** Human-readable date label displayed as the section header */
14
25
  date: string;
26
+ /** Ordered list of events belonging to this date group */
15
27
  events: TimelineEvent[];
16
28
  }
17
29
  interface TimelineProps {
18
30
  sections: TimelineSection[];
19
31
  className?: string;
20
32
  }
33
+ /**
34
+ * Renders a single timeline event card with an icon marker, title, optional subtitle and description,
35
+ * metadata table, and a timestamp badge.
36
+ */
21
37
  export declare function TimelineEventItem({ event }: {
22
38
  event: TimelineEvent;
23
- }): import("react/jsx-runtime").JSX.Element;
39
+ }): import("react").JSX.Element;
40
+ /**
41
+ * Renders a date-grouped section of timeline events with a pill-style date header
42
+ * and a stacked list of TimelineEventItem cards.
43
+ */
24
44
  export declare function TimelineSection({ section }: {
25
45
  section: TimelineSection;
26
- }): import("react/jsx-runtime").JSX.Element;
27
- export declare function Timeline({ sections, className }: TimelineProps): import("react/jsx-runtime").JSX.Element;
46
+ }): import("react").JSX.Element;
47
+ /**
48
+ * Top-level timeline component that renders an ordered list of date-grouped event sections.
49
+ */
50
+ export declare function Timeline({ sections, className }: TimelineProps): import("react").JSX.Element;
51
+ /** Returns a locale date string formatted as "Month Day, Year" (e.g. "June 30, 2026"). */
28
52
  export declare function formatTimelineDate(date: Date | string): string;
53
+ /** Returns a 12-hour time string with AM/PM (e.g. "2:30 PM"). */
29
54
  export declare function formatTimelineTime(date: Date | string): string;
30
55
  export {};
@@ -1,2 +1,2 @@
1
- export { Timeline, TimelineSection, TimelineEventItem, formatTimelineDate, formatTimelineTime } from './Timeline';
2
1
  export type { TimelineEvent, TimelineSection as TimelineSectionType } from './Timeline';
2
+ export { formatTimelineDate, formatTimelineTime, Timeline, TimelineEventItem, TimelineSection, } from './Timeline';
@@ -3,34 +3,63 @@ import { default as React } from 'react';
3
3
  export type ToastVariant = 'success' | 'error' | 'warning' | 'info' | 'default';
4
4
  export type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
5
5
  export interface ToastAction {
6
+ /** Button label text */
6
7
  label: string;
8
+ /** Callback fired when the action button is clicked */
7
9
  onClick: () => void;
8
10
  }
9
11
  export interface ToastOptions {
12
+ /** Main toast heading */
10
13
  title: string;
14
+ /** Supporting text shown below the title */
11
15
  description?: string;
16
+ /** Visual style variant */
12
17
  variant?: ToastVariant;
18
+ /** Auto-dismiss delay in milliseconds */
13
19
  duration?: number;
20
+ /** Custom icon rendered beside the title */
14
21
  icon?: React.ReactNode;
22
+ /** Primary action button config */
15
23
  primaryAction?: ToastAction;
24
+ /** Secondary/cancel action button config */
16
25
  secondaryAction?: ToastAction;
26
+ /** Whether to render an explicit close button */
17
27
  closeButton?: boolean;
28
+ /** Overrides the Toaster's position for this single toast */
29
+ position?: ToastPosition;
18
30
  }
19
31
  export interface ToasterProps {
32
+ /** Screen position for the toast stack */
20
33
  position?: ToastPosition;
34
+ /** Default auto-dismiss delay in milliseconds */
21
35
  duration?: number;
36
+ /** Vertical gap in pixels between stacked toasts */
22
37
  gap?: number;
38
+ /** Maximum number of toasts shown simultaneously */
23
39
  visibleToasts?: number;
40
+ /** Whether each toast renders a close button */
24
41
  closeButton?: boolean;
42
+ /** Whether to apply Sonner's rich semantic colors */
25
43
  richColors?: boolean;
44
+ /** Whether toasts expand to show all items instead of stacking */
26
45
  expand?: boolean;
46
+ /** Additional class names for the toaster container */
27
47
  className?: string;
48
+ /** Per-toast className and style overrides */
28
49
  toastOptions?: {
29
50
  className?: string;
30
51
  style?: React.CSSProperties;
31
52
  };
32
53
  }
54
+ /**
55
+ * Provider component that must be rendered once near the root of the application to mount the
56
+ * Sonner toast portal. Configure default position, duration, and appearance via props.
57
+ */
33
58
  export declare const Toaster: React.FC<ToasterProps>;
59
+ /**
60
+ * Imperative API for triggering toasts programmatically. Call toast.success(), toast.error(),
61
+ * toast.warning(), toast.info(), or toast.custom() with a title string or ToastOptions object.
62
+ */
34
63
  export declare const toast: {
35
64
  success: (options: ToastOptions | string) => string | number;
36
65
  error: (options: ToastOptions | string) => string | number;
@@ -1,2 +1,2 @@
1
+ export type { ToastAction, ToasterProps, ToastOptions, ToastPosition, ToastVariant, } from './Toast';
1
2
  export { Toaster, toast } from './Toast';
2
- export type { ToastVariant, ToastPosition, ToastAction, ToastOptions, ToasterProps } from './Toast';
@@ -1,29 +1,54 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  export interface TypographyProps {
4
+ /** Content to render inside the typography wrapper */
4
5
  children: React.ReactNode;
6
+ /** Additional class names */
5
7
  className?: string;
8
+ /** Inline styles */
6
9
  style?: React.CSSProperties;
7
10
  }
8
11
  export interface TitleProps extends TypographyProps {
9
- level?: 1 | 2 | 3 | 4 | 5;
12
+ /** Semantic heading level rendered as h1–h6. Choose by document outline, not size. */
13
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
14
+ /**
15
+ * Visual size, decoupled from `level`, so a semantically-correct heading can
16
+ * look larger or smaller than its level implies. Defaults to matching `level`.
17
+ */
18
+ size?: 1 | 2 | 3 | 4 | 5 | 6;
19
+ /** Semantic color variant */
10
20
  type?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
11
21
  }
12
22
  export interface TextProps extends TypographyProps {
23
+ /** Semantic color variant */
13
24
  type?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
25
+ /** Renders text as bold */
14
26
  strong?: boolean;
27
+ /** Renders text as italic */
15
28
  italic?: boolean;
29
+ /** Renders text with an underline */
16
30
  underline?: boolean;
31
+ /** Applies reduced opacity and a not-allowed cursor */
17
32
  disabled?: boolean;
33
+ /** Wraps content in a highlighted mark element */
18
34
  mark?: boolean;
35
+ /** Wraps content in a monospace code element */
19
36
  code?: boolean;
37
+ /** Reserved for future copy-to-clipboard support */
20
38
  copyable?: boolean;
39
+ /** Truncates overflowing text with an ellipsis */
21
40
  ellipsis?: boolean;
22
41
  }
23
42
  export interface ParagraphProps extends TypographyProps {
43
+ /** Semantic color variant */
24
44
  type?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
45
+ /** Truncates overflowing text with an ellipsis */
25
46
  ellipsis?: boolean;
26
47
  }
48
+ /**
49
+ * Top-level typography container that groups related text content. Sub-components Typography.Title,
50
+ * Typography.Text, and Typography.Paragraph handle specific text rendering scenarios.
51
+ */
27
52
  export declare const Typography: React.FC<TypographyProps> & {
28
53
  Title: React.FC<TitleProps>;
29
54
  Text: React.FC<TextProps>;
@@ -1,2 +1,2 @@
1
+ export type { ParagraphProps, TextProps, TitleProps, TypographyProps } from './Typography';
1
2
  export { Typography } from './Typography';
2
- export type { TypographyProps, TitleProps, TextProps, ParagraphProps } from './Typography';
@@ -1,2 +1,2 @@
1
- declare function App(): import("react/jsx-runtime").JSX.Element;
1
+ declare function App(): import("react").JSX.Element;
2
2
  export default App;