@justin_evo/evo-ui 1.0.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 (110) hide show
  1. package/dist/Alert/Alert.d.ts +11 -0
  2. package/dist/AutoComplete/AutoComplete.d.ts +95 -0
  3. package/dist/Badge/Badge.d.ts +23 -0
  4. package/dist/Breadcrumb/Breadcrumb.d.ts +16 -0
  5. package/dist/Button/Button.d.ts +54 -0
  6. package/dist/Card/Card.d.ts +60 -0
  7. package/dist/Checkbox/Checkbox.d.ts +16 -0
  8. package/dist/CommandPalette/CommandPalette.d.ts +17 -0
  9. package/dist/Container/Container.d.ts +10 -0
  10. package/dist/Divider/Divider.d.ts +7 -0
  11. package/dist/Form/Form.d.ts +61 -0
  12. package/dist/Grid/Grid.d.ts +23 -0
  13. package/dist/ImageCropper/ImageCropper.d.ts +111 -0
  14. package/dist/Input/Input.d.ts +12 -0
  15. package/dist/Modal/Modal.d.ts +26 -0
  16. package/dist/Nav/Nav.d.ts +63 -0
  17. package/dist/Notification/Notification.d.ts +186 -0
  18. package/dist/Pagination/Pagination.d.ts +10 -0
  19. package/dist/Radio/Radio.d.ts +20 -0
  20. package/dist/RichTextArea/RichTextArea.d.ts +70 -0
  21. package/dist/Select/Select.d.ts +44 -0
  22. package/dist/Skeleton/Skeleton.d.ts +23 -0
  23. package/dist/Stack/Stack.d.ts +16 -0
  24. package/dist/Table/Table.d.ts +77 -0
  25. package/dist/Tabs/Tabs.d.ts +28 -0
  26. package/dist/Theme/ThemeProvider.d.ts +96 -0
  27. package/dist/Theme/ThemeToggle.d.ts +22 -0
  28. package/dist/Toggle/Toggle.d.ts +11 -0
  29. package/dist/Tooltip/Tooltip.d.ts +10 -0
  30. package/dist/TopNav/TopNav.d.ts +76 -0
  31. package/dist/TreeSelect/TreeSelect.d.ts +50 -0
  32. package/dist/declarations.d.ts +6 -0
  33. package/dist/evo-ui.css +1 -0
  34. package/dist/index.cjs.js +1 -0
  35. package/dist/index.d.ts +31 -0
  36. package/dist/index.es.js +5688 -0
  37. package/package.json +52 -0
  38. package/src/Alert/Alert.tsx +49 -0
  39. package/src/AutoComplete/AutoComplete.tsx +810 -0
  40. package/src/Badge/Badge.tsx +53 -0
  41. package/src/Breadcrumb/Breadcrumb.tsx +53 -0
  42. package/src/Button/Button.tsx +125 -0
  43. package/src/Card/Card.tsx +257 -0
  44. package/src/Checkbox/Checkbox.tsx +59 -0
  45. package/src/CommandPalette/CommandPalette.tsx +185 -0
  46. package/src/Container/Container.tsx +31 -0
  47. package/src/Divider/Divider.tsx +31 -0
  48. package/src/Form/Form.tsx +185 -0
  49. package/src/Grid/Grid.tsx +66 -0
  50. package/src/ImageCropper/ImageCropper.tsx +911 -0
  51. package/src/Input/Input.tsx +74 -0
  52. package/src/Modal/Modal.tsx +77 -0
  53. package/src/Nav/Nav.tsx +626 -0
  54. package/src/Notification/Notification.tsx +1503 -0
  55. package/src/Pagination/Pagination.tsx +76 -0
  56. package/src/Radio/Radio.tsx +69 -0
  57. package/src/RichTextArea/RichTextArea.tsx +869 -0
  58. package/src/Select/Select.tsx +515 -0
  59. package/src/Skeleton/Skeleton.tsx +70 -0
  60. package/src/Stack/Stack.tsx +52 -0
  61. package/src/Table/Table.tsx +335 -0
  62. package/src/Tabs/Tabs.tsx +90 -0
  63. package/src/Theme/ThemeProvider.tsx +253 -0
  64. package/src/Theme/ThemeToggle.tsx +79 -0
  65. package/src/Toggle/Toggle.tsx +48 -0
  66. package/src/Tooltip/Tooltip.tsx +38 -0
  67. package/src/TopNav/TopNav.tsx +994 -0
  68. package/src/TreeSelect/TreeSelect.tsx +825 -0
  69. package/src/css/alert.module.scss +93 -0
  70. package/src/css/autocomplete.module.scss +416 -0
  71. package/src/css/badge.module.scss +82 -0
  72. package/src/css/base/_color.scss +159 -0
  73. package/src/css/base/_theme.scss +237 -0
  74. package/src/css/base/_variables.scss +161 -0
  75. package/src/css/breadcrumb.module.scss +50 -0
  76. package/src/css/button.module.scss +385 -0
  77. package/src/css/card.module.scss +217 -0
  78. package/src/css/checkbox.module.scss +120 -0
  79. package/src/css/commandpalette.module.scss +211 -0
  80. package/src/css/container.module.scss +18 -0
  81. package/src/css/divider.module.scss +41 -0
  82. package/src/css/form.module.scss +245 -0
  83. package/src/css/imagecropper.module.scss +397 -0
  84. package/src/css/input.module.scss +89 -0
  85. package/src/css/modal.module.scss +105 -0
  86. package/src/css/nav.module.scss +339 -0
  87. package/src/css/notification.module.scss +691 -0
  88. package/src/css/pagination.module.scss +63 -0
  89. package/src/css/radio.module.scss +89 -0
  90. package/src/css/richtextarea.module.scss +307 -0
  91. package/src/css/select.module.scss +525 -0
  92. package/src/css/skeleton.module.scss +30 -0
  93. package/src/css/table.module.scss +386 -0
  94. package/src/css/tabs.module.scss +63 -0
  95. package/src/css/theme-toggle.module.scss +83 -0
  96. package/src/css/toggle.module.scss +54 -0
  97. package/src/css/tooltip.module.scss +97 -0
  98. package/src/css/topnav.module.scss +396 -0
  99. package/src/css/treeselect.module.scss +558 -0
  100. package/src/css/utilities/_borders.scss +111 -0
  101. package/src/css/utilities/_colors.scss +66 -0
  102. package/src/css/utilities/_effects.scss +216 -0
  103. package/src/css/utilities/_layout.scss +181 -0
  104. package/src/css/utilities/_position.scss +75 -0
  105. package/src/css/utilities/_sizing.scss +138 -0
  106. package/src/css/utilities/_spacing.scss +99 -0
  107. package/src/css/utilities/_typography.scss +121 -0
  108. package/src/css/utilities/index.scss +24 -0
  109. package/src/declarations.d.ts +6 -0
  110. package/src/index.ts +60 -0
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ type AlertType = 'success' | 'error' | 'warning' | 'info';
3
+ interface EvoAlertProps {
4
+ type?: AlertType;
5
+ title?: string;
6
+ children: React.ReactNode;
7
+ dismissible?: boolean;
8
+ className?: string;
9
+ }
10
+ export declare const EvoAlert: ({ type, title, children, dismissible, className, }: EvoAlertProps) => import("react/jsx-runtime").JSX.Element | null;
11
+ export {};
@@ -0,0 +1,95 @@
1
+ import { default as React } from 'react';
2
+ export interface AutoCompleteOption {
3
+ /** Stable, unique identifier returned by `onChange`. */
4
+ value: string;
5
+ /** Human-readable text shown in the list and the input. */
6
+ label: string;
7
+ /** Optional secondary line under the label. */
8
+ description?: string;
9
+ /** Optional leading icon. */
10
+ icon?: React.ReactNode;
11
+ /** When true, the option is not selectable or keyboard-reachable. */
12
+ disabled?: boolean;
13
+ }
14
+ /** Pluggable persistence layer for the `recents` feature. */
15
+ export interface RecentsStorage {
16
+ /** Return the stored option values, most-recent first. */
17
+ get: () => string[];
18
+ /** Persist the option values, most-recent first. */
19
+ set: (values: string[]) => void;
20
+ }
21
+ export interface RecentsConfig {
22
+ /** Max remembered selections. Default 5. */
23
+ max?: number;
24
+ /** Where recents live. Default: in-memory (per `id`/`name`). */
25
+ storage?: RecentsStorage;
26
+ /** Section heading shown above recents. Default "Recent". */
27
+ label?: string;
28
+ }
29
+ export interface EvoAutoCompleteProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange' | 'value' | 'defaultValue'> {
30
+ /** The options to match against. In async mode, the already-filtered set. */
31
+ options: AutoCompleteOption[];
32
+ /** Selected option value (controlled). */
33
+ value?: string | null;
34
+ /** Selected option value (uncontrolled initial). */
35
+ defaultValue?: string | null;
36
+ /** Fires when a selection is made or cleared. */
37
+ onChange?: (value: string | null, option: AutoCompleteOption | null) => void;
38
+ /** The input's text (controlled — pair with `onInputChange`). */
39
+ inputValue?: string;
40
+ /** Fires when the typed text changes. Debounced by `debounce`. */
41
+ onInputChange?: (query: string) => void;
42
+ /** Field label. */
43
+ label?: string;
44
+ placeholder?: string;
45
+ helperText?: string;
46
+ /** Error message — also flips the field into the error state. */
47
+ error?: string;
48
+ size?: 'sm' | 'md' | 'lg';
49
+ fullWidth?: boolean;
50
+ disabled?: boolean;
51
+ /** Show a clear (✕) button when there is a value. Default true. */
52
+ clearable?: boolean;
53
+ /** Render a spinner row instead of results (for async fetches). */
54
+ loading?: boolean;
55
+ /** Debounce, in ms, applied to `onInputChange`. Default 0. */
56
+ debounce?: number;
57
+ /** Minimum query length before results show. Default 0. */
58
+ minChars?: number;
59
+ /** Cap on rendered rows — protects against huge lists. Default 50. */
60
+ maxResults?: number;
61
+ /**
62
+ * Filtering strategy:
63
+ * - omitted → case-insensitive substring match on `label`.
64
+ * - function → custom predicate.
65
+ * - `false` → caller pre-filters (async mode); render `options` as-is.
66
+ */
67
+ filter?: false | ((option: AutoCompleteOption, query: string) => boolean);
68
+ /** Bold the matched substring in each row. Default true. */
69
+ highlightMatch?: boolean;
70
+ /** Open the menu when the input receives focus. Default true. */
71
+ openOnFocus?: boolean;
72
+ /** Message shown when a non-empty query has no matches. */
73
+ emptyMessage?: React.ReactNode;
74
+ /** 🆕 Offer a nearest-match correction when a query has zero results. */
75
+ smartRecovery?: boolean;
76
+ /** 🆕 Remember recent selections and surface them on empty focus. */
77
+ recents?: boolean | RecentsConfig;
78
+ /** Custom row renderer. Overrides icon/label/description layout. */
79
+ renderOption?: (option: AutoCompleteOption, state: {
80
+ active: boolean;
81
+ query: string;
82
+ }) => React.ReactNode;
83
+ id?: string;
84
+ name?: string;
85
+ className?: string;
86
+ }
87
+ /**
88
+ * A `RecentsStorage` backed by `localStorage` — survives reloads.
89
+ * SSR-safe: no-ops when `window` is unavailable.
90
+ *
91
+ * @example
92
+ * <EvoAutoComplete recents={{ storage: evoLocalRecents('country-picker') }} />
93
+ */
94
+ export declare const evoLocalRecents: (key: string) => RecentsStorage;
95
+ export declare const EvoAutoComplete: React.ForwardRefExoticComponent<EvoAutoCompleteProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ type BadgeSeverity = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
3
+ type BadgeVariant = 'solid' | 'outline' | 'subtle';
4
+ type BadgeSize = 'sm' | 'md' | 'lg';
5
+ interface EvoBadgeProps {
6
+ children: React.ReactNode;
7
+ severity?: BadgeSeverity;
8
+ variant?: BadgeVariant;
9
+ size?: BadgeSize;
10
+ dot?: boolean;
11
+ removable?: boolean;
12
+ onRemove?: () => void;
13
+ className?: string;
14
+ }
15
+ interface EvoBadgeGroupProps {
16
+ children: React.ReactNode;
17
+ className?: string;
18
+ }
19
+ export declare const EvoBadge: {
20
+ ({ children, severity, variant, size, dot, removable, onRemove, className, }: EvoBadgeProps): import("react/jsx-runtime").JSX.Element;
21
+ Group: ({ children, className }: EvoBadgeGroupProps) => import("react/jsx-runtime").JSX.Element;
22
+ };
23
+ export {};
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ interface EvoBreadcrumbItemProps {
3
+ children: React.ReactNode;
4
+ href?: string;
5
+ current?: boolean;
6
+ }
7
+ interface EvoBreadcrumbProps {
8
+ children: React.ReactNode;
9
+ separator?: React.ReactNode;
10
+ className?: string;
11
+ }
12
+ export declare const EvoBreadcrumb: {
13
+ ({ children, separator, className }: EvoBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
14
+ Item: ({ children, href, current }: EvoBreadcrumbItemProps) => import("react/jsx-runtime").JSX.Element;
15
+ };
16
+ export {};
@@ -0,0 +1,54 @@
1
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ type Variant = 'solid' | 'outline' | 'ghost' | 'soft';
3
+ type Severity = 'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'info';
4
+ type Size = 'sm' | 'md' | 'lg';
5
+ type Shape = 'default' | 'rounded' | 'square';
6
+ /**
7
+ * Configuration properties for the EvoButton component.
8
+ *
9
+ * Extends every native `<button>` attribute (type, form, name, autoFocus,
10
+ * aria-*, onMouseEnter, …) so consumers don't have to ask for them one by one.
11
+ */
12
+ export interface EvoButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
13
+ /** Text shown inside the button. Convenience shorthand for `children`. */
14
+ label?: string;
15
+ /**
16
+ * Visual style of the button.
17
+ * - `solid` — filled background (default).
18
+ * - `outline` — bordered, transparent background.
19
+ * - `ghost` — no border or background until hover.
20
+ * - `soft` — tinted background using the severity's soft token.
21
+ * @default 'solid'
22
+ */
23
+ variant?: Variant;
24
+ /**
25
+ * Semantic color theme.
26
+ * @default 'primary'
27
+ */
28
+ severity?: Severity;
29
+ /** @default 'md' */
30
+ size?: Size;
31
+ /**
32
+ * Border-radius shape, orthogonal to `variant`.
33
+ * - `default` — normal radius.
34
+ * - `rounded` — pill / fully rounded edges.
35
+ * - `square` — equal width/height; use for icon-only buttons.
36
+ * @default 'default'
37
+ */
38
+ shape?: Shape;
39
+ /** Icon rendered before the label. */
40
+ iconLeft?: ReactNode;
41
+ /** Icon rendered after the label. */
42
+ iconRight?: ReactNode;
43
+ /**
44
+ * When true, replaces icons with a spinner and disables interaction.
45
+ * `aria-busy` is set automatically.
46
+ */
47
+ loading?: boolean;
48
+ /** Optional text shown next to the spinner while `loading` is true. */
49
+ loadingText?: string;
50
+ /** Stretch to fill the parent's width. */
51
+ fullWidth?: boolean;
52
+ }
53
+ export declare const EvoButton: import('react').ForwardRefExoticComponent<EvoButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
54
+ export {};
@@ -0,0 +1,60 @@
1
+ import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
2
+ export type EvoCardVariant = 'elevated' | 'outlined' | 'ghost';
3
+ export type EvoCardOrientation = 'vertical' | 'horizontal' | 'responsive';
4
+ export type EvoCardHeadingLevel = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
5
+ interface EvoCardRootBase {
6
+ variant?: EvoCardVariant;
7
+ orientation?: EvoCardOrientation;
8
+ children: ReactNode;
9
+ }
10
+ interface EvoCardRootStaticProps extends EvoCardRootBase, Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
11
+ interactive?: false;
12
+ href?: never;
13
+ }
14
+ interface EvoCardRootButtonProps extends EvoCardRootBase, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'type'> {
15
+ interactive: true;
16
+ href?: never;
17
+ /** @default 'button' (never auto-submits) */
18
+ type?: 'button' | 'submit' | 'reset';
19
+ }
20
+ interface EvoCardRootAnchorProps extends EvoCardRootBase, Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children' | 'href'> {
21
+ interactive: true;
22
+ href: string;
23
+ }
24
+ export type EvoCardRootProps = EvoCardRootStaticProps | EvoCardRootButtonProps | EvoCardRootAnchorProps;
25
+ export declare const EvoCardRoot: import('react').ForwardRefExoticComponent<EvoCardRootProps & import('react').RefAttributes<HTMLElement>>;
26
+ export type EvoCardHeaderProps = HTMLAttributes<HTMLDivElement>;
27
+ export type EvoCardBodyProps = HTMLAttributes<HTMLDivElement>;
28
+ export type EvoCardFooterProps = HTMLAttributes<HTMLDivElement>;
29
+ export declare const EvoCardHeader: import('react').ForwardRefExoticComponent<EvoCardHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
30
+ export declare const EvoCardBody: import('react').ForwardRefExoticComponent<EvoCardBodyProps & import('react').RefAttributes<HTMLDivElement>>;
31
+ export declare const EvoCardFooter: import('react').ForwardRefExoticComponent<EvoCardFooterProps & import('react').RefAttributes<HTMLDivElement>>;
32
+ export interface EvoCardTitleProps extends HTMLAttributes<HTMLHeadingElement> {
33
+ /** Semantic level. Visual size is fixed by the stylesheet. @default 'h3' */
34
+ as?: EvoCardHeadingLevel;
35
+ children: ReactNode;
36
+ }
37
+ export declare const EvoCardTitle: import('react').ForwardRefExoticComponent<EvoCardTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
38
+ export type EvoCardDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
39
+ export declare const EvoCardDescription: import('react').ForwardRefExoticComponent<EvoCardDescriptionProps & import('react').RefAttributes<HTMLParagraphElement>>;
40
+ export interface EvoCardMediaProps extends HTMLAttributes<HTMLDivElement> {
41
+ /** Convenience: renders an <img>. Omit and pass children for custom media. */
42
+ src?: string;
43
+ /** Required when `src` is set. Empty string marks the image as decorative. */
44
+ alt?: string;
45
+ /** e.g. 16/9 or '4/3'. Applied when no explicit dimensions are given. */
46
+ aspectRatio?: number | string;
47
+ children?: ReactNode;
48
+ }
49
+ export declare const EvoCardMedia: import('react').ForwardRefExoticComponent<EvoCardMediaProps & import('react').RefAttributes<HTMLDivElement>>;
50
+ type EvoCardComponent = typeof EvoCardRoot & {
51
+ Root: typeof EvoCardRoot;
52
+ Header: typeof EvoCardHeader;
53
+ Title: typeof EvoCardTitle;
54
+ Description: typeof EvoCardDescription;
55
+ Body: typeof EvoCardBody;
56
+ Footer: typeof EvoCardFooter;
57
+ Media: typeof EvoCardMedia;
58
+ };
59
+ export declare const EvoCard: EvoCardComponent;
60
+ export {};
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ interface EvoCheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
3
+ label?: string;
4
+ helperText?: string;
5
+ indeterminate?: boolean;
6
+ }
7
+ interface EvoCheckboxGroupProps {
8
+ children: React.ReactNode;
9
+ label?: string;
10
+ className?: string;
11
+ }
12
+ export declare const EvoCheckbox: {
13
+ ({ label, helperText, indeterminate, className, disabled, id, ...rest }: EvoCheckboxProps): import("react/jsx-runtime").JSX.Element;
14
+ Group: ({ children, label, className }: EvoCheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
15
+ };
16
+ export {};
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ export interface CommandPaletteItem {
3
+ label: string;
4
+ description?: string;
5
+ group?: string;
6
+ icon?: React.ReactNode;
7
+ shortcut?: string[];
8
+ onSelect: () => void;
9
+ }
10
+ interface EvoCommandPaletteProps {
11
+ items: CommandPaletteItem[];
12
+ placeholder?: string;
13
+ open?: boolean;
14
+ onClose?: () => void;
15
+ }
16
+ export declare const EvoCommandPalette: ({ items, placeholder, open: controlledOpen, onClose, }: EvoCommandPaletteProps) => import("react/jsx-runtime").JSX.Element | null;
17
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ type ContainerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
3
+ interface EvoContainerProps {
4
+ children: React.ReactNode;
5
+ size?: ContainerSize;
6
+ centered?: boolean;
7
+ className?: string;
8
+ }
9
+ export declare const EvoContainer: ({ children, size, centered, className, }: EvoContainerProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ interface EvoDividerProps {
2
+ orientation?: 'horizontal' | 'vertical';
3
+ label?: string;
4
+ className?: string;
5
+ }
6
+ export declare const EvoDivider: ({ orientation, label, className }: EvoDividerProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,61 @@
1
+ import { default as React } from 'react';
2
+ type FormSize = 'sm' | 'md' | 'lg';
3
+ type FormLayout = 'vertical' | 'horizontal';
4
+ interface FormContextType {
5
+ disabled?: boolean;
6
+ size?: FormSize;
7
+ layout?: FormLayout;
8
+ }
9
+ export declare const useFormContext: () => FormContextType;
10
+ interface EvoFormProps extends React.FormHTMLAttributes<HTMLFormElement> {
11
+ children: React.ReactNode;
12
+ disabled?: boolean;
13
+ size?: FormSize;
14
+ layout?: FormLayout;
15
+ maxWidth?: number | string;
16
+ className?: string;
17
+ }
18
+ export declare const EvoForm: {
19
+ ({ children, disabled, size, layout, maxWidth, className, style, ...rest }: EvoFormProps): import("react/jsx-runtime").JSX.Element;
20
+ Header: ({ title, description, badge, children, className }: EvoFormHeaderProps) => import("react/jsx-runtime").JSX.Element;
21
+ Section: ({ title, description, variant, children, className, }: EvoFormSectionProps) => import("react/jsx-runtime").JSX.Element;
22
+ Row: ({ children, gap, align, className }: EvoFormRowProps) => import("react/jsx-runtime").JSX.Element;
23
+ Field: ({ children, label, description, error, required, htmlFor, className, }: EvoFormFieldProps) => import("react/jsx-runtime").JSX.Element;
24
+ Actions: ({ children, align, divider, className, }: EvoFormActionsProps) => import("react/jsx-runtime").JSX.Element;
25
+ };
26
+ interface EvoFormHeaderProps {
27
+ title?: React.ReactNode;
28
+ description?: React.ReactNode;
29
+ badge?: React.ReactNode;
30
+ children?: React.ReactNode;
31
+ className?: string;
32
+ }
33
+ interface EvoFormSectionProps {
34
+ title?: React.ReactNode;
35
+ description?: React.ReactNode;
36
+ variant?: 'stacked' | 'split';
37
+ children: React.ReactNode;
38
+ className?: string;
39
+ }
40
+ interface EvoFormRowProps {
41
+ children: React.ReactNode;
42
+ gap?: 'sm' | 'md' | 'lg';
43
+ align?: 'start' | 'center' | 'end';
44
+ className?: string;
45
+ }
46
+ interface EvoFormFieldProps {
47
+ children: React.ReactNode;
48
+ label?: React.ReactNode;
49
+ description?: React.ReactNode;
50
+ error?: React.ReactNode;
51
+ required?: boolean;
52
+ htmlFor?: string;
53
+ className?: string;
54
+ }
55
+ interface EvoFormActionsProps {
56
+ children: React.ReactNode;
57
+ align?: 'left' | 'right' | 'between' | 'center';
58
+ divider?: boolean;
59
+ className?: string;
60
+ }
61
+ export {};
@@ -0,0 +1,23 @@
1
+ import { default as React, CSSProperties } from 'react';
2
+ interface EvoGridProps {
3
+ children: React.ReactNode;
4
+ cols?: number | string;
5
+ rows?: number | string;
6
+ gap?: number | string;
7
+ colGap?: number | string;
8
+ rowGap?: number | string;
9
+ className?: string;
10
+ style?: CSSProperties;
11
+ }
12
+ interface EvoGridItemProps {
13
+ children: React.ReactNode;
14
+ colSpan?: number;
15
+ rowSpan?: number;
16
+ className?: string;
17
+ style?: CSSProperties;
18
+ }
19
+ export declare const EvoGrid: {
20
+ ({ children, cols, rows, gap, colGap, rowGap, className, style, }: EvoGridProps): import("react/jsx-runtime").JSX.Element;
21
+ Item: ({ children, colSpan, rowSpan, className, style }: EvoGridItemProps) => import("react/jsx-runtime").JSX.Element;
22
+ };
23
+ export {};
@@ -0,0 +1,111 @@
1
+ /** Output of a crop operation, in the source image's natural pixel space. */
2
+ export interface EvoCropArea {
3
+ /** Left offset in source image pixels. */
4
+ x: number;
5
+ /** Top offset in source image pixels. */
6
+ y: number;
7
+ /** Width in source image pixels. */
8
+ width: number;
9
+ /** Height in source image pixels. */
10
+ height: number;
11
+ /** Rotation applied (0, 90, 180, 270). */
12
+ rotation: number;
13
+ /** Natural dimensions of the source image — handy for callers. */
14
+ sourceWidth: number;
15
+ sourceHeight: number;
16
+ }
17
+ /** Options for producing a cropped image from the current state. */
18
+ export interface EvoCropOutputOptions {
19
+ /** Output MIME type. @default 'image/png' */
20
+ type?: 'image/png' | 'image/jpeg' | 'image/webp';
21
+ /** Quality, 0–1, for lossy formats. @default 0.92 */
22
+ quality?: number;
23
+ /** Cap the output width. Height scales to keep the crop's aspect. */
24
+ maxWidth?: number;
25
+ /** Cap the output height. Width scales to keep the crop's aspect. */
26
+ maxHeight?: number;
27
+ }
28
+ /** Imperative handle returned via `ref`. */
29
+ export interface EvoImageCropperHandle {
30
+ /** Current crop in source image pixels. */
31
+ getCrop: () => EvoCropArea | null;
32
+ /** Cropped image as a Blob. */
33
+ getCroppedBlob: (opts?: EvoCropOutputOptions) => Promise<Blob>;
34
+ /** Cropped image as a data URL. */
35
+ getCroppedDataURL: (opts?: EvoCropOutputOptions) => Promise<string>;
36
+ /** Cropped image as a fresh, detached canvas (caller owns it). */
37
+ getCroppedCanvas: (opts?: Pick<EvoCropOutputOptions, 'maxWidth' | 'maxHeight'>) => HTMLCanvasElement | null;
38
+ /** Reset crop, zoom, pan, and rotation back to their defaults. */
39
+ reset: () => void;
40
+ /** Rotate by ±90° (or set to a specific 90° multiple). */
41
+ rotate: (deg?: 90 | -90 | 0 | 180 | 270) => void;
42
+ /** Set zoom directly. Clamped to [minZoom, maxZoom]. */
43
+ setZoom: (zoom: number) => void;
44
+ }
45
+ export interface EvoImageCropperProps {
46
+ /** Source image URL or data URL. Required. */
47
+ src: string;
48
+ /**
49
+ * Locks the crop rectangle to this width/height ratio.
50
+ * Omit for a free-form crop. Use `1` for a square, `16/9` for widescreen, etc.
51
+ */
52
+ aspectRatio?: number;
53
+ /** Render the crop rect as a circle (avatars). Implies `aspectRatio: 1`. */
54
+ circular?: boolean;
55
+ /** Show a rule-of-thirds grid inside the crop rectangle. @default true */
56
+ showGrid?: boolean;
57
+ /** Show the bottom controls toolbar (zoom, rotate, presets). @default true */
58
+ showControls?: boolean;
59
+ /** Show aspect ratio preset chips above the canvas. Ignored if `circular`. */
60
+ ratioPresets?: Array<{
61
+ label: string;
62
+ value: number | null;
63
+ }>;
64
+ /**
65
+ * Minimum zoom level (relative to fit-to-stage = 1). @default 1
66
+ * @example minZoom={0.5} allows zooming out below fit.
67
+ */
68
+ minZoom?: number;
69
+ /** Maximum zoom level. @default 4 */
70
+ maxZoom?: number;
71
+ /** Initial zoom. @default 1 */
72
+ defaultZoom?: number;
73
+ /** Initial rotation in degrees. Snapped to multiples of 90. @default 0 */
74
+ defaultRotation?: number;
75
+ /**
76
+ * Initial crop rectangle as percentages of the stage (0–100).
77
+ * Omit to start with the crop covering 80% of the visible image.
78
+ */
79
+ defaultCrop?: {
80
+ x: number;
81
+ y: number;
82
+ width: number;
83
+ height: number;
84
+ };
85
+ /** Stage (canvas area) height. @default 360 */
86
+ height?: number | string;
87
+ /** Background under the image. @default 'checker' */
88
+ background?: 'checker' | 'surface' | 'transparent';
89
+ /** Optional label rendered above the cropper. */
90
+ label?: string;
91
+ /** Optional helper text rendered below the cropper. */
92
+ helperText?: string;
93
+ /** Fires whenever the resulting crop changes. */
94
+ onChange?: (crop: EvoCropArea) => void;
95
+ /** Fires once the image has loaded and is ready to crop. */
96
+ onReady?: (info: {
97
+ naturalWidth: number;
98
+ naturalHeight: number;
99
+ }) => void;
100
+ /** Fires if the image fails to load. */
101
+ onError?: (error: Error) => void;
102
+ /** Disable all interaction. */
103
+ disabled?: boolean;
104
+ /** Stretch to the parent's width. @default true */
105
+ fullWidth?: boolean;
106
+ /** Extra class on the root element. */
107
+ className?: string;
108
+ /** Accessible label for the cropper region. */
109
+ ariaLabel?: string;
110
+ }
111
+ export declare const EvoImageCropper: import('react').ForwardRefExoticComponent<EvoImageCropperProps & import('react').RefAttributes<EvoImageCropperHandle>>;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ interface EvoInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
3
+ label?: string;
4
+ helperText?: string;
5
+ error?: string;
6
+ size?: 'sm' | 'md' | 'lg';
7
+ leadingAdornment?: React.ReactNode;
8
+ trailingAdornment?: React.ReactNode;
9
+ fullWidth?: boolean;
10
+ }
11
+ export declare const EvoInput: ({ label, helperText, error, size, leadingAdornment, trailingAdornment, fullWidth, className, id, ...rest }: EvoInputProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,26 @@
1
+ import { default as React } from 'react';
2
+ type ModalSize = 'sm' | 'md' | 'lg' | 'fullscreen';
3
+ interface EvoModalProps {
4
+ open: boolean;
5
+ onClose: () => void;
6
+ children: React.ReactNode;
7
+ size?: ModalSize;
8
+ className?: string;
9
+ }
10
+ interface EvoModalHeaderProps {
11
+ children: React.ReactNode;
12
+ onClose?: () => void;
13
+ }
14
+ interface EvoModalBodyProps {
15
+ children: React.ReactNode;
16
+ }
17
+ interface EvoModalFooterProps {
18
+ children: React.ReactNode;
19
+ }
20
+ export declare const EvoModal: {
21
+ ({ open, onClose, children, size, className }: EvoModalProps): React.ReactPortal | null;
22
+ Header: ({ children, onClose }: EvoModalHeaderProps) => import("react/jsx-runtime").JSX.Element;
23
+ Body: ({ children }: EvoModalBodyProps) => import("react/jsx-runtime").JSX.Element;
24
+ Footer: ({ children }: EvoModalFooterProps) => import("react/jsx-runtime").JSX.Element;
25
+ };
26
+ export {};
@@ -0,0 +1,63 @@
1
+ import { ButtonHTMLAttributes, HTMLAttributes, KeyboardEvent as ReactKeyboardEvent, MouseEvent as ReactMouseEvent, ReactNode } from 'react';
2
+ export interface EvoNavProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
3
+ children: ReactNode;
4
+ /** Below this viewport width (px), nav collapses to a drawer. @default 768 */
5
+ breakpoint?: number;
6
+ /** Controlled drawer open state (mobile only). */
7
+ drawerOpen?: boolean;
8
+ /** Uncontrolled initial drawer state. @default false */
9
+ defaultDrawerOpen?: boolean;
10
+ /** Called when the drawer opens or closes. */
11
+ onDrawerOpenChange?: (open: boolean) => void;
12
+ /** Hide the built-in hamburger trigger (use when wiring a trigger yourself). */
13
+ hideTrigger?: boolean;
14
+ /** Accessible label for the <nav> landmark. @default 'Main navigation' */
15
+ 'aria-label'?: string;
16
+ }
17
+ export interface EvoNavGroupProps {
18
+ label: string;
19
+ children: ReactNode;
20
+ className?: string;
21
+ }
22
+ interface EvoNavRowProps {
23
+ children: ReactNode;
24
+ icon?: ReactNode;
25
+ /** Marks this row as the current page (sets aria-current="page"). */
26
+ active?: boolean;
27
+ /** Render as <a href> instead of <button>. */
28
+ href?: string;
29
+ onClick?: (event: ReactMouseEvent | ReactKeyboardEvent) => void;
30
+ /** Controlled expand state (only when row has SubItem children). */
31
+ open?: boolean;
32
+ /** Uncontrolled initial expand state. */
33
+ defaultOpen?: boolean;
34
+ onOpenChange?: (open: boolean) => void;
35
+ disabled?: boolean;
36
+ className?: string;
37
+ }
38
+ export interface EvoNavItemProps extends EvoNavRowProps {
39
+ }
40
+ export interface EvoNavSubItemProps extends EvoNavRowProps {
41
+ }
42
+ export interface EvoNavSkeletonProps {
43
+ /** @default 4 */
44
+ count?: number;
45
+ }
46
+ export interface EvoNavQuickActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
47
+ /** @default 'Create New' */
48
+ label?: string;
49
+ icon?: ReactNode;
50
+ }
51
+ export declare const EvoNavItem: import('react').ForwardRefExoticComponent<EvoNavItemProps & import('react').RefAttributes<HTMLLIElement>>;
52
+ export declare const EvoNavSubItem: import('react').ForwardRefExoticComponent<EvoNavSubItemProps & import('react').RefAttributes<HTMLLIElement>>;
53
+ export declare const EvoNavGroup: import('react').ForwardRefExoticComponent<EvoNavGroupProps & import('react').RefAttributes<HTMLLIElement>>;
54
+ export declare const EvoNavSkeleton: ({ count }: EvoNavSkeletonProps) => import("react/jsx-runtime").JSX.Element;
55
+ export declare const EvoNavQuickAction: import('react').ForwardRefExoticComponent<EvoNavQuickActionProps & import('react').RefAttributes<HTMLButtonElement>>;
56
+ export declare const EvoNav: import('react').ForwardRefExoticComponent<EvoNavProps & import('react').RefAttributes<HTMLElement>> & {
57
+ Group: import('react').ForwardRefExoticComponent<EvoNavGroupProps & import('react').RefAttributes<HTMLLIElement>>;
58
+ Item: import('react').ForwardRefExoticComponent<EvoNavItemProps & import('react').RefAttributes<HTMLLIElement>>;
59
+ SubItem: import('react').ForwardRefExoticComponent<EvoNavSubItemProps & import('react').RefAttributes<HTMLLIElement>>;
60
+ Skeleton: ({ count }: EvoNavSkeletonProps) => import("react/jsx-runtime").JSX.Element;
61
+ QuickAction: import('react').ForwardRefExoticComponent<EvoNavQuickActionProps & import('react').RefAttributes<HTMLButtonElement>>;
62
+ };
63
+ export {};