@justin_evo/evo-ui 1.0.2 β 1.2.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 +70 -70
- package/dist/Nav/Nav.d.ts +15 -0
- package/dist/TopNav/TopNav.d.ts +19 -0
- package/dist/evo-ui.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +3300 -3157
- package/package.json +1 -1
- package/src/Nav/Nav.tsx +96 -14
- package/src/RichTextArea/RichTextArea.tsx +20 -3
- package/src/TopNav/TopNav.tsx +169 -0
- package/src/css/checkbox.module.scss +8 -5
- package/src/css/nav.module.scss +170 -15
- package/src/css/topnav.module.scss +172 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Justin Khor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
# Evo UI
|
|
2
|
-
|
|
3
|
-
**A high-performance, enterprise-grade React UI component library.**
|
|
4
|
-
|
|
5
|
-
Evo UI ships 30+ accessible, themeable React components β with built-in light &
|
|
6
|
-
dark mode, full TypeScript types, `forwardRef` + native attribute pass-through,
|
|
7
|
-
and **zero runtime dependencies**.
|
|
8
|
-
|
|
9
|
-
- π **Documentation:** https://elevora-ui-document-3fb80.web.app
|
|
10
|
-
- π» **GitHub:** https://github.com/jinchuen/evo
|
|
11
|
-
- π¦ **npm:** https://www.npmjs.com/package/@justin_evo/evo-ui
|
|
12
|
-
|
|
13
|
-
## Installation
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm install @justin_evo/evo-ui
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
`react` and `react-dom` (>= 17) are peer dependencies. Evo UI itself has no
|
|
20
|
-
runtime dependencies.
|
|
21
|
-
|
|
22
|
-
## Quick start
|
|
23
|
-
|
|
24
|
-
```jsx
|
|
25
|
-
// Import the stylesheet once in your app entry (includes the light/dark theme tokens)
|
|
26
|
-
import '@justin_evo/evo-ui/dist/evo-ui.css'
|
|
27
|
-
|
|
28
|
-
import { EvoThemeProvider, EvoButton } from '@justin_evo/evo-ui'
|
|
29
|
-
|
|
30
|
-
export default function App() {
|
|
31
|
-
return (
|
|
32
|
-
<EvoThemeProvider defaultTheme="system">
|
|
33
|
-
<EvoButton variant="solid" severity="primary">Hello Evo</EvoButton>
|
|
34
|
-
</EvoThemeProvider>
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Why Evo UI
|
|
40
|
-
|
|
41
|
-
- π **Light & dark mode** out of the box β CSS-variable theming, no runtime cost.
|
|
42
|
-
- π± **Mobile-ready** β β₯ 44px touch targets, responsive down to 375px.
|
|
43
|
-
- π‘ **Fully typed** β ships `.d.ts`; every component forwards `ref` and native attributes.
|
|
44
|
-
- π§© **Composable, orthogonal APIs** β e.g. `<Form.Field><Form.Label /></Form.Field>`.
|
|
45
|
-
- πͺΆ **Zero runtime dependencies.**
|
|
46
|
-
|
|
47
|
-
## Components
|
|
48
|
-
|
|
49
|
-
Full props, variants, and live examples for every component live in the
|
|
50
|
-
[documentation](https://elevora-ui-document-3fb80.web.app).
|
|
51
|
-
|
|
52
|
-
| Category | Components |
|
|
53
|
-
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
54
|
-
| **Theming** | `EvoThemeProvider`, `EvoThemeToggle` |
|
|
55
|
-
| **Layout & structure** | `EvoStack`, `EvoGrid`, `EvoDivider`, `EvoContainer`, `EvoCard` |
|
|
56
|
-
| **Navigation** | `EvoTabs`, `EvoBreadcrumb`, `EvoNav`, `EvoTopNav`, `EvoPagination`, `EvoCommandPalette` |
|
|
57
|
-
| **Forms & inputs** | `EvoInput`, `EvoRichTextArea`, `EvoSelect`, `EvoTreeSelect`, `EvoAutoComplete`, `EvoCheckbox`, `EvoRadio`, `EvoToggle`, `EvoForm` |
|
|
58
|
-
| **Feedback & overlays**| `EvoModal`, `EvoNotification`, `EvoTooltip`, `EvoAlert` |
|
|
59
|
-
| **Data display** | `EvoBadge`, `EvoSkeleton`, `EvoTable` |
|
|
60
|
-
| **General** | `EvoButton` |
|
|
61
|
-
| **Media** | `EvoImageCropper` |
|
|
62
|
-
|
|
63
|
-
## Documentation
|
|
64
|
-
|
|
65
|
-
Browse the full component catalogue, prop tables, and copy-paste examples at
|
|
66
|
-
**https://elevora-ui-document-3fb80.web.app**.
|
|
67
|
-
|
|
68
|
-
## License
|
|
69
|
-
|
|
70
|
-
MIT Β© Justin Khor
|
|
1
|
+
# Evo UI
|
|
2
|
+
|
|
3
|
+
**A high-performance, enterprise-grade React UI component library.**
|
|
4
|
+
|
|
5
|
+
Evo UI ships 30+ accessible, themeable React components β with built-in light &
|
|
6
|
+
dark mode, full TypeScript types, `forwardRef` + native attribute pass-through,
|
|
7
|
+
and **zero runtime dependencies**.
|
|
8
|
+
|
|
9
|
+
- π **Documentation:** https://elevora-ui-document-3fb80.web.app
|
|
10
|
+
- π» **GitHub:** https://github.com/jinchuen/evo
|
|
11
|
+
- π¦ **npm:** https://www.npmjs.com/package/@justin_evo/evo-ui
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @justin_evo/evo-ui
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`react` and `react-dom` (>= 17) are peer dependencies. Evo UI itself has no
|
|
20
|
+
runtime dependencies.
|
|
21
|
+
|
|
22
|
+
## Quick start
|
|
23
|
+
|
|
24
|
+
```jsx
|
|
25
|
+
// Import the stylesheet once in your app entry (includes the light/dark theme tokens)
|
|
26
|
+
import '@justin_evo/evo-ui/dist/evo-ui.css'
|
|
27
|
+
|
|
28
|
+
import { EvoThemeProvider, EvoButton } from '@justin_evo/evo-ui'
|
|
29
|
+
|
|
30
|
+
export default function App() {
|
|
31
|
+
return (
|
|
32
|
+
<EvoThemeProvider defaultTheme="system">
|
|
33
|
+
<EvoButton variant="solid" severity="primary">Hello Evo</EvoButton>
|
|
34
|
+
</EvoThemeProvider>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Why Evo UI
|
|
40
|
+
|
|
41
|
+
- π **Light & dark mode** out of the box β CSS-variable theming, no runtime cost.
|
|
42
|
+
- π± **Mobile-ready** β β₯ 44px touch targets, responsive down to 375px.
|
|
43
|
+
- π‘ **Fully typed** β ships `.d.ts`; every component forwards `ref` and native attributes.
|
|
44
|
+
- π§© **Composable, orthogonal APIs** β e.g. `<Form.Field><Form.Label /></Form.Field>`.
|
|
45
|
+
- πͺΆ **Zero runtime dependencies.**
|
|
46
|
+
|
|
47
|
+
## Components
|
|
48
|
+
|
|
49
|
+
Full props, variants, and live examples for every component live in the
|
|
50
|
+
[documentation](https://elevora-ui-document-3fb80.web.app).
|
|
51
|
+
|
|
52
|
+
| Category | Components |
|
|
53
|
+
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
54
|
+
| **Theming** | `EvoThemeProvider`, `EvoThemeToggle` |
|
|
55
|
+
| **Layout & structure** | `EvoStack`, `EvoGrid`, `EvoDivider`, `EvoContainer`, `EvoCard` |
|
|
56
|
+
| **Navigation** | `EvoTabs`, `EvoBreadcrumb`, `EvoNav`, `EvoTopNav`, `EvoPagination`, `EvoCommandPalette` |
|
|
57
|
+
| **Forms & inputs** | `EvoInput`, `EvoRichTextArea`, `EvoSelect`, `EvoTreeSelect`, `EvoAutoComplete`, `EvoCheckbox`, `EvoRadio`, `EvoToggle`, `EvoForm` |
|
|
58
|
+
| **Feedback & overlays**| `EvoModal`, `EvoNotification`, `EvoTooltip`, `EvoAlert` |
|
|
59
|
+
| **Data display** | `EvoBadge`, `EvoSkeleton`, `EvoTable` |
|
|
60
|
+
| **General** | `EvoButton` |
|
|
61
|
+
| **Media** | `EvoImageCropper` |
|
|
62
|
+
|
|
63
|
+
## Documentation
|
|
64
|
+
|
|
65
|
+
Browse the full component catalogue, prop tables, and copy-paste examples at
|
|
66
|
+
**https://elevora-ui-document-3fb80.web.app**.
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
MIT Β© Justin Khor
|
package/dist/Nav/Nav.d.ts
CHANGED
|
@@ -11,6 +11,9 @@ export interface EvoNavProps extends Omit<HTMLAttributes<HTMLElement>, 'children
|
|
|
11
11
|
onDrawerOpenChange?: (open: boolean) => void;
|
|
12
12
|
/** Hide the built-in hamburger trigger (use when wiring a trigger yourself). */
|
|
13
13
|
hideTrigger?: boolean;
|
|
14
|
+
/** Collapse to an icon-only rail: labels hide, icons center, and each row
|
|
15
|
+
* shows a native tooltip from its `tooltip` prop. @default false */
|
|
16
|
+
collapsed?: boolean;
|
|
14
17
|
/** Accessible label for the <nav> landmark. @default 'Main navigation' */
|
|
15
18
|
'aria-label'?: string;
|
|
16
19
|
}
|
|
@@ -18,6 +21,16 @@ export interface EvoNavGroupProps {
|
|
|
18
21
|
label: string;
|
|
19
22
|
children: ReactNode;
|
|
20
23
|
className?: string;
|
|
24
|
+
/** Render the heading as a disclosure that expands/collapses the group. */
|
|
25
|
+
collapsible?: boolean;
|
|
26
|
+
/** Uncontrolled initial open state (collapsible only). @default true */
|
|
27
|
+
defaultOpen?: boolean;
|
|
28
|
+
/** Controlled open state (collapsible only). */
|
|
29
|
+
open?: boolean;
|
|
30
|
+
/** Called when the group expands or collapses. */
|
|
31
|
+
onOpenChange?: (open: boolean) => void;
|
|
32
|
+
/** Small count chip shown after the label. */
|
|
33
|
+
count?: number;
|
|
21
34
|
}
|
|
22
35
|
interface EvoNavRowProps {
|
|
23
36
|
children: ReactNode;
|
|
@@ -27,6 +40,8 @@ interface EvoNavRowProps {
|
|
|
27
40
|
/** Render as <a href> instead of <button>. */
|
|
28
41
|
href?: string;
|
|
29
42
|
onClick?: (event: ReactMouseEvent | ReactKeyboardEvent) => void;
|
|
43
|
+
/** Tooltip text shown (via native title) when the nav is collapsed to a rail. */
|
|
44
|
+
tooltip?: string;
|
|
30
45
|
/** Controlled expand state (only when row has SubItem children). */
|
|
31
46
|
open?: boolean;
|
|
32
47
|
/** Uncontrolled initial expand state. */
|
package/dist/TopNav/TopNav.d.ts
CHANGED
|
@@ -6,6 +6,14 @@ export interface EvoTopNavProps extends Omit<React.HTMLAttributes<HTMLElement>,
|
|
|
6
6
|
onOpenChange?: (open: boolean) => void;
|
|
7
7
|
/** Width in px below which Menu collapses into the drawer. @default 768 */
|
|
8
8
|
collapseBelow?: number;
|
|
9
|
+
/** Staggered mount animation for the bar's contents. @default 'none' */
|
|
10
|
+
entrance?: 'none' | 'rise' | 'fade';
|
|
11
|
+
/** Pin the bar with position: sticky; top: 0. @default false */
|
|
12
|
+
sticky?: boolean;
|
|
13
|
+
/** On-scroll treatment of a sticky bar. @default 'none' */
|
|
14
|
+
scrollBehavior?: 'none' | 'elevate' | 'shrink' | 'hide';
|
|
15
|
+
/** Render a thin scroll-progress accent line along the bottom edge. @default false */
|
|
16
|
+
showProgress?: boolean;
|
|
9
17
|
className?: string;
|
|
10
18
|
}
|
|
11
19
|
export interface EvoTopNavBrandProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -35,6 +43,15 @@ export interface EvoTopNavToggleProps extends Omit<React.ButtonHTMLAttributes<HT
|
|
|
35
43
|
icon?: React.ReactNode;
|
|
36
44
|
className?: string;
|
|
37
45
|
}
|
|
46
|
+
export interface EvoTopNavSearchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
47
|
+
/** Placeholder text shown inside the trigger. @default 'Searchβ¦' */
|
|
48
|
+
placeholder?: string;
|
|
49
|
+
/** Opt-in global hotkey, e.g. 'mod+k' (mod = β on macOS, Ctrl elsewhere). Default: none. */
|
|
50
|
+
shortcut?: string;
|
|
51
|
+
/** Override the kbd hint. @default platform-aware βK / Ctrl K */
|
|
52
|
+
shortcutHint?: React.ReactNode;
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
38
55
|
export interface EvoTopNavDropdownProps {
|
|
39
56
|
label: React.ReactNode;
|
|
40
57
|
icon?: React.ReactNode;
|
|
@@ -62,6 +79,7 @@ declare const EvoTopNavMenu: React.ForwardRefExoticComponent<EvoTopNavMenuProps
|
|
|
62
79
|
declare const EvoTopNavItem: React.ForwardRefExoticComponent<EvoTopNavItemProps & React.RefAttributes<HTMLElement>>;
|
|
63
80
|
declare const EvoTopNavActions: React.ForwardRefExoticComponent<EvoTopNavActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
64
81
|
declare const EvoTopNavToggle: React.ForwardRefExoticComponent<EvoTopNavToggleProps & React.RefAttributes<HTMLButtonElement>>;
|
|
82
|
+
declare const EvoTopNavSearch: React.ForwardRefExoticComponent<EvoTopNavSearchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
65
83
|
declare const EvoTopNavDropdown: React.FC<EvoTopNavDropdownProps>;
|
|
66
84
|
declare const EvoTopNavDropdownItem: React.ForwardRefExoticComponent<EvoTopNavDropdownItemProps & React.RefAttributes<HTMLElement>>;
|
|
67
85
|
export declare const EvoTopNav: React.ForwardRefExoticComponent<EvoTopNavProps & React.RefAttributes<HTMLElement>> & {
|
|
@@ -70,6 +88,7 @@ export declare const EvoTopNav: React.ForwardRefExoticComponent<EvoTopNavProps &
|
|
|
70
88
|
Item: typeof EvoTopNavItem;
|
|
71
89
|
Actions: typeof EvoTopNavActions;
|
|
72
90
|
Toggle: typeof EvoTopNavToggle;
|
|
91
|
+
Search: typeof EvoTopNavSearch;
|
|
73
92
|
Dropdown: typeof EvoTopNavDropdown;
|
|
74
93
|
DropdownItem: typeof EvoTopNavDropdownItem;
|
|
75
94
|
};
|