eidos-ui 1.0.0 → 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.
- package/README.md +134 -84
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# eidos-ui
|
|
2
4
|
|
|
3
|
-
A modern, accessible React component library built with TypeScript, SCSS, and CSS custom properties
|
|
5
|
+
**A modern, accessible React component library built with TypeScript, SCSS, and CSS custom properties.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/eidos-ui)
|
|
8
|
+
[](https://www.npmjs.com/package/eidos-ui)
|
|
9
|
+
[](./LICENSE)
|
|
10
|
+
[](https://www.typescriptlang.org/)
|
|
11
|
+
|
|
12
|
+
</div>
|
|
4
13
|
|
|
5
14
|
> **This package starts fresh at `0.1.0`.** It was previously published as `@pmealha/eidos-ui`
|
|
6
15
|
> (versions `0.1.1` through `5.0.0`), which reached `5.x` well before the API was actually stable -
|
|
@@ -8,33 +17,33 @@ A modern, accessible React component library built with TypeScript, SCSS, and CS
|
|
|
8
17
|
> will not receive further updates; install `eidos-ui` instead. See [CHANGELOG.md](./CHANGELOG.md) for
|
|
9
18
|
> what's changed release to release from here on.
|
|
10
19
|
|
|
11
|
-
##
|
|
20
|
+
## Features
|
|
12
21
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
| | |
|
|
23
|
+
| ------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
24
|
+
| **Themeable** | Every design token is a CSS custom property, so palette, spacing, and radii can be overridden without touching source. |
|
|
25
|
+
| **Type-safe** | Written in TypeScript with full prop typings exported for every component. |
|
|
26
|
+
| **Tree-shakeable** | Per-component entry points (`eidos-ui/button`, `eidos-ui/table`, ...) keep bundles lean. |
|
|
27
|
+
| **Icon-agnostic** | Works with any icon library - Lucide, MUI Icons, Font Awesome, Remix Icons, or your own. |
|
|
28
|
+
| **Accessible** | Built with keyboard navigation and ARIA semantics in mind. |
|
|
29
|
+
| **Optimized build** | Bundled with tsup, shipping both ESM and CJS with source maps and `.d.ts` files. |
|
|
20
30
|
|
|
21
|
-
##
|
|
31
|
+
## Installation
|
|
22
32
|
|
|
23
33
|
```bash
|
|
24
34
|
npm install eidos-ui
|
|
25
35
|
```
|
|
26
36
|
|
|
27
|
-
**Optional
|
|
37
|
+
**Optional** - for component-based icons (recommended over string-based icon fonts):
|
|
28
38
|
|
|
29
39
|
```bash
|
|
30
40
|
npm install lucide-react
|
|
31
|
-
# or use MUI Icons, Heroicons, etc.
|
|
32
41
|
```
|
|
33
42
|
|
|
34
|
-
##
|
|
43
|
+
## Quick Start
|
|
35
44
|
|
|
36
45
|
```tsx
|
|
37
|
-
import { Button, Tooltip
|
|
46
|
+
import { Button, Tooltip } from 'eidos-ui';
|
|
38
47
|
import 'eidos-ui/styles';
|
|
39
48
|
|
|
40
49
|
function App() {
|
|
@@ -52,50 +61,126 @@ function App() {
|
|
|
52
61
|
}
|
|
53
62
|
```
|
|
54
63
|
|
|
55
|
-
### With
|
|
64
|
+
### With icons
|
|
56
65
|
|
|
57
66
|
```tsx
|
|
58
|
-
//
|
|
67
|
+
// Component icons (tree-shakeable)
|
|
59
68
|
import { Plus, Download } from 'lucide-react';
|
|
69
|
+
|
|
60
70
|
<Button icon={Plus} />
|
|
61
71
|
<Button preIcon={Download}>Download</Button>
|
|
62
72
|
|
|
63
|
-
//
|
|
64
|
-
<Button icon="fa fa-plus" />
|
|
73
|
+
// String-based icons (icon font classes)
|
|
74
|
+
<Button icon="fa fa-plus" /> // Font Awesome
|
|
65
75
|
<Button icon="ri-add-line" /> // Remix Icons
|
|
66
76
|
```
|
|
67
77
|
|
|
68
|
-
##
|
|
78
|
+
## Components
|
|
79
|
+
|
|
80
|
+
These are the same groups used in Storybook, so the README and the docs sidebar stay in sync.
|
|
81
|
+
|
|
82
|
+
<table>
|
|
83
|
+
<tr><td valign="top">
|
|
84
|
+
|
|
85
|
+
**Layout**
|
|
86
|
+
|
|
87
|
+
- PageLayout
|
|
88
|
+
- Header
|
|
89
|
+
- Footer
|
|
90
|
+
- Navigation
|
|
91
|
+
- Toolbar
|
|
92
|
+
- Breadcrumb
|
|
93
|
+
|
|
94
|
+
**Elements**
|
|
95
|
+
|
|
96
|
+
- Button
|
|
97
|
+
- ButtonGroup
|
|
98
|
+
- SplitButton
|
|
99
|
+
- Avatar
|
|
100
|
+
- Badge
|
|
101
|
+
- Card
|
|
102
|
+
- Chip
|
|
103
|
+
- Divider
|
|
104
|
+
- EmptyState
|
|
105
|
+
- Kbd
|
|
106
|
+
- Pill
|
|
107
|
+
- SegmentedControl
|
|
108
|
+
|
|
109
|
+
</td><td valign="top">
|
|
110
|
+
|
|
111
|
+
**Forms**
|
|
112
|
+
|
|
113
|
+
- Input
|
|
114
|
+
- Textarea
|
|
115
|
+
- NumberInput
|
|
116
|
+
- Select
|
|
117
|
+
- Combobox
|
|
118
|
+
- Checkbox
|
|
119
|
+
- Radio
|
|
120
|
+
- Switch
|
|
121
|
+
- Slider
|
|
122
|
+
- ColorPicker
|
|
123
|
+
- DatePicker
|
|
124
|
+
- OTPInput
|
|
125
|
+
- TagInput
|
|
126
|
+
- FileUpload
|
|
127
|
+
- InlineEdit
|
|
128
|
+
|
|
129
|
+
**Navigation**
|
|
130
|
+
|
|
131
|
+
- Tabs
|
|
132
|
+
- Stepper
|
|
133
|
+
- Accordion
|
|
134
|
+
- Pagination
|
|
135
|
+
- TreeView
|
|
136
|
+
|
|
137
|
+
</td><td valign="top">
|
|
138
|
+
|
|
139
|
+
**Data**
|
|
140
|
+
|
|
141
|
+
- Table
|
|
142
|
+
- DataGrid
|
|
143
|
+
- Timeline
|
|
144
|
+
- VirtualList
|
|
145
|
+
|
|
146
|
+
**Overlays**
|
|
147
|
+
|
|
148
|
+
- Modal
|
|
149
|
+
- Drawer
|
|
150
|
+
- Snackbar
|
|
151
|
+
- Tooltip
|
|
152
|
+
- Popover
|
|
153
|
+
- Menu
|
|
154
|
+
- ContextMenu
|
|
155
|
+
- CommandPalette
|
|
156
|
+
- Dropdown
|
|
157
|
+
|
|
158
|
+
**Feedback**
|
|
69
159
|
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
- **Dropdown** - Customizable dropdown menus
|
|
75
|
-
- **Input** - Text input with validation and icons
|
|
76
|
-
- **Menu** - Navigation and action menus
|
|
77
|
-
- **Modal** - Dialog overlays with customizable actions
|
|
78
|
-
- **Select** - Dropdown selection with search
|
|
79
|
-
- **Snackbar** - Toast notifications with actions
|
|
80
|
-
- **Spinner** - Loading indicators
|
|
81
|
-
- **Table** - Data tables with sorting, filtering, and pagination
|
|
82
|
-
- **Tooltip** - Contextual hints with smart positioning
|
|
160
|
+
- Alert
|
|
161
|
+
- Progress
|
|
162
|
+
- Skeleton
|
|
163
|
+
- Spinner
|
|
83
164
|
|
|
84
|
-
|
|
165
|
+
</td></tr>
|
|
166
|
+
</table>
|
|
85
167
|
|
|
86
|
-
|
|
168
|
+
Full props and interactive examples for every component live in Storybook - see [Documentation](#documentation).
|
|
169
|
+
|
|
170
|
+
## Documentation
|
|
171
|
+
|
|
172
|
+
Run Storybook locally for the full interactive component reference, including a searchable "Releases" page mirroring [CHANGELOG.md](./CHANGELOG.md):
|
|
87
173
|
|
|
88
174
|
```bash
|
|
175
|
+
git clone https://github.com/PedroMealha/eidos-ui.git
|
|
176
|
+
cd eidos-ui
|
|
177
|
+
npm install
|
|
89
178
|
npm run storybook
|
|
90
179
|
```
|
|
91
180
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
## 🎨 Customization
|
|
181
|
+
## Theming
|
|
95
182
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
All design tokens are customizable via CSS custom properties:
|
|
183
|
+
All design tokens are exposed as CSS custom properties, so themes can be overridden globally without touching component source.
|
|
99
184
|
|
|
100
185
|
```css
|
|
101
186
|
:root {
|
|
@@ -112,64 +197,29 @@ All design tokens are customizable via CSS custom properties:
|
|
|
112
197
|
}
|
|
113
198
|
```
|
|
114
199
|
|
|
115
|
-
|
|
200
|
+
Individual component styles can also be targeted directly, following each component's `eidos-<name>` BEM-style class names:
|
|
116
201
|
|
|
117
202
|
```css
|
|
118
|
-
|
|
119
|
-
--primary-color: #818cf8;
|
|
120
|
-
--background: #1e293b;
|
|
121
|
-
--text-color: #f1f5f9;
|
|
122
|
-
}
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Override Component Styles
|
|
126
|
-
|
|
127
|
-
```css
|
|
128
|
-
.eidos-button {
|
|
203
|
+
.eidos-button--filled.eidos-button--primary {
|
|
129
204
|
border-radius: 20px;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.eidos-button--primary {
|
|
133
205
|
background: linear-gradient(to right, #6366f1, #8b5cf6);
|
|
134
206
|
}
|
|
135
207
|
```
|
|
136
208
|
|
|
137
|
-
##
|
|
209
|
+
## TypeScript
|
|
138
210
|
|
|
139
|
-
|
|
211
|
+
Every component ships with exported prop types:
|
|
140
212
|
|
|
141
213
|
```tsx
|
|
142
214
|
import type { ButtonProps, TooltipProps } from 'eidos-ui';
|
|
143
215
|
|
|
144
|
-
const MyButton: React.FC<ButtonProps> = (props) => {
|
|
145
|
-
return <Button {...props} />;
|
|
146
|
-
};
|
|
216
|
+
const MyButton: React.FC<ButtonProps> = (props) => <Button {...props} />;
|
|
147
217
|
```
|
|
148
218
|
|
|
149
|
-
##
|
|
150
|
-
|
|
151
|
-
The library supports multiple icon approaches:
|
|
152
|
-
|
|
153
|
-
1. **Component Icons** (Lucide, MUI, Heroicons) - Recommended for tree-shaking
|
|
154
|
-
2. **String-based Icons** (Font Awesome, Remix Icons) - Great for dynamic icons
|
|
155
|
-
|
|
156
|
-
```tsx
|
|
157
|
-
// Component-based (tree-shakeable)
|
|
158
|
-
import { Plus } from 'lucide-react';
|
|
159
|
-
<Button icon={Plus} />
|
|
160
|
-
|
|
161
|
-
// String-based (requires icon CSS to be loaded)
|
|
162
|
-
<Button icon="fa fa-plus" />
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
## 📄 License
|
|
166
|
-
|
|
167
|
-
MIT
|
|
168
|
-
|
|
169
|
-
## 👤 Author
|
|
219
|
+
## Contributing
|
|
170
220
|
|
|
171
|
-
|
|
221
|
+
This is currently a personal project without an established external contribution process. Bug reports and suggestions are welcome via [GitHub Issues](https://github.com/PedroMealha/eidos-ui/issues).
|
|
172
222
|
|
|
173
|
-
|
|
223
|
+
## License
|
|
174
224
|
|
|
175
|
-
|
|
225
|
+
[MIT](./LICENSE) © Pedro Mealha
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eidos-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A modern React component library with TypeScript and SCSS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -105,6 +105,10 @@
|
|
|
105
105
|
},
|
|
106
106
|
"repository": {
|
|
107
107
|
"type": "git",
|
|
108
|
-
"url": "git+https://github.com/
|
|
108
|
+
"url": "git+https://github.com/PedroMealha/eidos-ui.git"
|
|
109
|
+
},
|
|
110
|
+
"homepage": "https://github.com/PedroMealha/eidos-ui#readme",
|
|
111
|
+
"bugs": {
|
|
112
|
+
"url": "https://github.com/PedroMealha/eidos-ui/issues"
|
|
109
113
|
}
|
|
110
114
|
}
|