@amelharrak/eldo-ui 1.0.5 โ 1.0.8
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/README.md +141 -62
- package/dist/css/eldo.css +765 -228
- package/dist/css/eldo.css.map +1 -1
- package/dist/css/eldo.min.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +80 -60
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/types/components/Accordion.d.ts +0 -3
- package/dist/types/components/Breadcrumb.d.ts +2 -15
- package/dist/types/components/ButtonGroup.d.ts +2 -7
- package/dist/types/components/Card.d.ts +5 -0
- package/dist/types/components/Checkbox.d.ts +3 -10
- package/dist/types/components/CheckboxGroup.d.ts +20 -0
- package/dist/types/components/Combobox.d.ts +15 -0
- package/dist/types/components/Dropdown.d.ts +17 -9
- package/dist/types/components/Input.d.ts +4 -1
- package/dist/types/components/InputGroup.d.ts +18 -0
- package/dist/types/components/ListGroup.d.ts +2 -20
- package/dist/types/components/Navbar.d.ts +2 -11
- package/dist/types/components/Radio.d.ts +7 -2
- package/dist/types/components/RadioGroup.d.ts +21 -0
- package/dist/types/components/Sidebar.d.ts +5 -0
- package/dist/types/components/Slider.d.ts +4 -3
- package/dist/types/components/Spinner.d.ts +5 -2
- package/dist/types/components/Table.d.ts +22 -0
- package/dist/types/components/TableComponents.d.ts +26 -0
- package/dist/types/components/Tag.d.ts +15 -0
- package/dist/types/components/ToastComponents.d.ts +18 -0
- package/dist/types/components/User.d.ts +12 -0
- package/dist/types/components/Widgets.d.ts +12 -0
- package/dist/types/index.d.ts +14 -3
- package/package.json +3 -3
- package/src/scss/components/_checkbox.scss +160 -151
- package/src/scss/components/_forms.scss +18 -0
- package/src/scss/components/_slider.scss +380 -42
- package/src/scss/components/_table.scss +19 -2
- package/src/scss/components/_user.scss +3 -1
- package/src/scss/components/_widgets.scss +68 -0
- package/src/scss/eldo.scss +1 -0
package/README.md
CHANGED
|
@@ -1,47 +1,64 @@
|
|
|
1
|
-
# @amelharrak/eldo-ui
|
|
1
|
+
# @amelharrak/eldo-ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
4
|
|
|
5
|
-

|
|
7
|
-

|
|
5
|
+

|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/@amelharrak/eldo-ui)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](https://bundlephobia.com/package/@amelharrak/eldo-ui)
|
|
10
|
+
[](README.md#accessibility)
|
|
11
|
+
[](https://www.typescriptlang.org/)
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
**A modern, lightweight, and accessible React component library.**
|
|
14
|
+
Built for speed, styled for elegance, and engineered for everyone.
|
|
15
|
+
|
|
16
|
+
[Live Demo](https://eldo-ui.com) ยท [Documentation](https://eldo-ui.com/docs) ยท [Report Bug](https://github.com/aelharrak/eldo-ui/issues)
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## ๐ Why Eldo UI?
|
|
23
|
+
|
|
24
|
+
Eldo UI is designed to be the foundational layer for your next React application. It combines the utility of modern component libraries with the flexibility of custom design systems.
|
|
25
|
+
|
|
26
|
+
- **๐งฉ 60+ Components**: Ready-to-use, fully typed, and tree-shakeable.
|
|
27
|
+
- **โฟ 100% Accessible**: Built with WAI-ARIA standards (WCAG 2.1) for inclusion.
|
|
28
|
+
- **โก Lightweight**: <15kB gzipped (minimized bundle) with zero-bloat architecture.
|
|
29
|
+
- **๐จ Themeable**: Built on Sass & CSS Variables for effortless customization.
|
|
30
|
+
- **๐ ๏ธ Developer First**: Type definitions, meaningful props, and consistent APIs.
|
|
31
|
+
- **๐ง Framework Agnostic**: Works seamlessly with Next.js (App Router ready), Vite, Remix, and CRA.
|
|
17
32
|
|
|
18
33
|
## ๐ฆ Installation
|
|
19
34
|
|
|
35
|
+
Install the package via your preferred package manager:
|
|
36
|
+
|
|
20
37
|
```bash
|
|
21
38
|
npm install @amelharrak/eldo-ui
|
|
22
39
|
# or
|
|
23
40
|
yarn add @amelharrak/eldo-ui
|
|
41
|
+
# or
|
|
42
|
+
pnpm add @amelharrak/eldo-ui
|
|
24
43
|
```
|
|
25
44
|
|
|
26
|
-
##
|
|
45
|
+
## ๐ ๏ธ Setup
|
|
27
46
|
|
|
28
47
|
### 1. Import Styles
|
|
29
48
|
|
|
30
|
-
Add the styles to your
|
|
49
|
+
Add the core styles to your application's entry point (`App.js`, `main.tsx`, or `layout.tsx`):
|
|
31
50
|
|
|
32
51
|
```javascript
|
|
33
52
|
import '@amelharrak/eldo-ui/css/eldo.css';
|
|
34
53
|
```
|
|
35
54
|
|
|
36
|
-
### 2.
|
|
37
|
-
|
|
38
|
-
Since `eldo-ui` uses interactive React features, components include the `"use client";` directive automatically. You can use them directly in your Pages or App Router.
|
|
55
|
+
### 2. Usage Example
|
|
39
56
|
|
|
40
|
-
|
|
57
|
+
Everything is exported as named exports. Import what you need:
|
|
41
58
|
|
|
42
59
|
```tsx
|
|
43
|
-
import { Button, Modal, Card } from '@amelharrak/eldo-ui';
|
|
44
60
|
import { useState } from 'react';
|
|
61
|
+
import { Button, Modal, Card, Input } from '@amelharrak/eldo-ui';
|
|
45
62
|
|
|
46
63
|
function App() {
|
|
47
64
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -49,81 +66,143 @@ function App() {
|
|
|
49
66
|
return (
|
|
50
67
|
<div className="p-4">
|
|
51
68
|
<Card>
|
|
69
|
+
<Card.Header>Welcome to Eldo UI</Card.Header>
|
|
52
70
|
<Card.Body>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
71
|
+
<p>Build beautiful apps with ease.</p>
|
|
72
|
+
<div className="d-flex gap-2">
|
|
73
|
+
<Input placeholder="Enter your email..." />
|
|
74
|
+
<Button variant="primary" onClick={() => setIsOpen(true)}>
|
|
75
|
+
Get Started
|
|
76
|
+
</Button>
|
|
77
|
+
</div>
|
|
57
78
|
</Card.Body>
|
|
58
79
|
</Card>
|
|
59
80
|
|
|
60
|
-
<Modal isOpen={isOpen} onClose={() => setIsOpen(false)} title="
|
|
61
|
-
<p>
|
|
81
|
+
<Modal isOpen={isOpen} onClose={() => setIsOpen(false)} title="Success!">
|
|
82
|
+
<p>You have successfully integrated Eldo UI components.</p>
|
|
83
|
+
<Modal.Footer>
|
|
84
|
+
<Button variant="secondary" onClick={() => setIsOpen(false)}>Close</Button>
|
|
85
|
+
<Button variant="primary">Confirm</Button>
|
|
86
|
+
</Modal.Footer>
|
|
62
87
|
</Modal>
|
|
63
88
|
</div>
|
|
64
89
|
);
|
|
65
90
|
}
|
|
66
91
|
```
|
|
67
92
|
|
|
68
|
-
|
|
93
|
+
### 3. Usage with Next.js (App Router)
|
|
94
|
+
|
|
95
|
+
Eldo UI components are compatible with Next.js App Router. For interactive components (using `useState`, `useEffect`), they include the `"use client"` directive, so they just work.
|
|
96
|
+
|
|
97
|
+
```tsx
|
|
98
|
+
// app/page.tsx
|
|
99
|
+
import { Button } from '@amelharrak/eldo-ui';
|
|
100
|
+
|
|
101
|
+
export default function Page() {
|
|
102
|
+
return <Button>Click Me</Button>;
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## โฟ Accessibility (WAI-ARIA)
|
|
107
|
+
|
|
108
|
+
We take accessibility seriously. Every component in Eldo UI has been audited against **WCAG 2.1** success criteria.
|
|
69
109
|
|
|
70
|
-
|
|
110
|
+
- **Keyboard Navigation**: Full support for `Tab`, `Arrow` keys, `Escape`, `Enter`/`Space`.
|
|
111
|
+
- **Focus Management**: Modals and Offcanvas panels utilize focus trapping and restoration.
|
|
112
|
+
- **Semantic HTML**: We use native elements (`<button>`, `<input>`) wherever possible.
|
|
113
|
+
- **ARIA Roles**: Explicit roles (`combobox`, `listbox`, `dialog`, `tablist`) for screen readers.
|
|
71
114
|
|
|
72
|
-
|
|
73
|
-
- **Alert** - Dismissible alerts with variations
|
|
74
|
-
- **Card** (`Header`, `Body`, `Footer`) - Flexible card layouts
|
|
75
|
-
- **Badge**, **Spinner** - Status indicators
|
|
76
|
-
- **Container**, **Row**, **Col**, **Box**, **Text** - Layout primitives
|
|
77
|
-
- **Navbar** (`Brand`, `Toggle`, `Collapse`, `Nav`), **Offcanvas** - Navigation
|
|
78
|
-
- **Breadcrumb**, **Pagination** - Navigation helpers
|
|
115
|
+
> **Status**: โ
100% Compliant (Latest Audit: Jan 2026)
|
|
79
116
|
|
|
80
|
-
|
|
117
|
+
## ๐งฉ Component Library
|
|
81
118
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
- **Timeline** - Process indicators
|
|
90
|
-
- **Scrollspy** - Scroll tracking
|
|
119
|
+
### Layout & Core
|
|
120
|
+
|
|
121
|
+
- `Container`, `Row`, `Col` (Grid System)
|
|
122
|
+
- `Box`, `Stack`, `Spacer`
|
|
123
|
+
- `Button`, `ButtonGroup`
|
|
124
|
+
- `Card` (`Header`, `Body`, `Footer`)
|
|
125
|
+
- `Badge`, `Tag`
|
|
91
126
|
|
|
92
127
|
### Forms
|
|
93
128
|
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
|
|
129
|
+
- `Input`, `Textarea`
|
|
130
|
+
- `Select`, `Combobox` (Autocomplete)
|
|
131
|
+
- `Checkbox`, `Radio`, `Switch`
|
|
132
|
+
- `Slider`, `RangeSlider`
|
|
133
|
+
- `NumberInput`, `InputOTP`
|
|
134
|
+
- `FileUpload`
|
|
135
|
+
|
|
136
|
+
### Navigation
|
|
137
|
+
|
|
138
|
+
- `Navbar`, `Nav`
|
|
139
|
+
- `Sidebar` (Responsive)
|
|
140
|
+
- `Tabs`, `Breadcrumb`
|
|
141
|
+
- `Pagination`, `Steps`
|
|
142
|
+
- `Offcanvas` (Drawer)
|
|
143
|
+
|
|
144
|
+
### Feedback & Overlays
|
|
101
145
|
|
|
102
|
-
|
|
146
|
+
- `Modal` (Dialog)
|
|
147
|
+
- `Alert`, `Toast`, `Toaster`
|
|
148
|
+
- `Tooltip`, `Popover`
|
|
149
|
+
- `Progress`, `Spinner`
|
|
150
|
+
- `Accordion`, `Collapse`
|
|
103
151
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
152
|
+
### Data Display
|
|
153
|
+
|
|
154
|
+
- `Table`
|
|
155
|
+
- `Avatar`, `User`
|
|
156
|
+
- `Timeline`
|
|
157
|
+
- `Stat`
|
|
158
|
+
- `Carousel`
|
|
110
159
|
|
|
111
160
|
## ๐จ Customization
|
|
112
161
|
|
|
113
|
-
|
|
162
|
+
Eldo UI uses **CSS Variables** for runtime theming and **Sass** for build-time customization.
|
|
163
|
+
|
|
164
|
+
### CSS Variables (Quick Fix)
|
|
165
|
+
|
|
166
|
+
Override variables in your global CSS:
|
|
114
167
|
|
|
115
168
|
```css
|
|
116
169
|
:root {
|
|
117
170
|
--eldo-primary: #6366f1;
|
|
171
|
+
--eldo-secondary: #ec4899;
|
|
118
172
|
--eldo-border-radius: 0.5rem;
|
|
119
|
-
--eldo-font-family: 'Inter', sans-serif;
|
|
173
|
+
--eldo-font-family: 'Inter', system-ui, sans-serif;
|
|
120
174
|
}
|
|
121
175
|
```
|
|
122
176
|
|
|
177
|
+
### Sass (Advanced)
|
|
178
|
+
|
|
179
|
+
Import the abstract files to override defaults before compiling:
|
|
180
|
+
|
|
181
|
+
```scss
|
|
182
|
+
// custom.scss
|
|
183
|
+
$primary: #8b5cf6;
|
|
184
|
+
$enable-rounded: true;
|
|
185
|
+
|
|
186
|
+
@import "@amelharrak/eldo-ui/scss/eldo";
|
|
187
|
+
```
|
|
188
|
+
|
|
123
189
|
## ๐ค Contributing
|
|
124
190
|
|
|
125
|
-
|
|
191
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
192
|
+
|
|
193
|
+
1. Fork the repository
|
|
194
|
+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
|
195
|
+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
|
196
|
+
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
197
|
+
5. Open a Pull Request
|
|
198
|
+
|
|
199
|
+
## ๐ค Author
|
|
200
|
+
|
|
201
|
+
**Amine El Harrak**
|
|
202
|
+
|
|
203
|
+
- GitHub: [@aelharrak](https://github.com/aelharrak)
|
|
204
|
+
- Website: [eldo-ui.com](https://eldo-ui.com)
|
|
126
205
|
|
|
127
206
|
## ๐ License
|
|
128
207
|
|
|
129
|
-
MIT
|
|
208
|
+
Distributed under the MIT License. See `LICENSE` for more information.
|