@ecohouse/ui 0.1.3 → 0.1.5
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 +33 -13
- package/dist/index.cjs +1182 -104
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +206 -5
- package/dist/index.d.ts +206 -5
- package/dist/index.js +1171 -107
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Avatar/Avatar.stories.tsx +133 -0
- package/src/components/Avatar/Avatar.tsx +337 -0
- package/src/components/Avatar/index.ts +2 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +172 -0
- package/src/components/DatePicker/DatePicker.tsx +628 -0
- package/src/components/DatePicker/index.ts +7 -0
- package/src/components/Select/Select.tsx +1 -1
- package/src/components/index.ts +11 -0
- package/src/icons/Calendar/CalendarIcon.tsx +21 -0
- package/src/icons/Calendar/CalendarIcon.web.tsx +27 -0
- package/src/icons/Calendar/calendarPath.ts +3 -0
- package/src/icons/Calendar/index.ts +1 -0
- package/src/icons/CalendarOutline/CalendarOutlineIcon.tsx +25 -0
- package/src/icons/CalendarOutline/CalendarOutlineIcon.web.tsx +31 -0
- package/src/icons/CalendarOutline/calendarOutlinePath.ts +3 -0
- package/src/icons/CalendarOutline/index.ts +1 -0
- package/src/icons/ChevronLeft/ChevronLeftIcon.tsx +21 -0
- package/src/icons/ChevronLeft/ChevronLeftIcon.web.tsx +27 -0
- package/src/icons/ChevronLeft/chevronLeftPath.ts +2 -0
- package/src/icons/ChevronLeft/index.ts +1 -0
- package/src/icons/Heart/HeartIcon.tsx +23 -0
- package/src/icons/Heart/HeartIcon.web.tsx +29 -0
- package/src/icons/Heart/heartPath.ts +3 -0
- package/src/icons/Heart/index.ts +1 -0
- package/src/icons/HelpCircle/HelpCircleIcon.tsx +25 -0
- package/src/icons/HelpCircle/HelpCircleIcon.web.tsx +31 -0
- package/src/icons/HelpCircle/helpCirclePath.ts +3 -0
- package/src/icons/HelpCircle/index.ts +1 -0
- package/src/icons/LayoutGrid/LayoutGridIcon.tsx +25 -0
- package/src/icons/LayoutGrid/LayoutGridIcon.web.tsx +31 -0
- package/src/icons/LayoutGrid/index.ts +1 -0
- package/src/icons/LayoutGrid/layoutGridPath.ts +3 -0
- package/src/icons/LogOut/LogOutIcon.tsx +21 -0
- package/src/icons/LogOut/LogOutIcon.web.tsx +27 -0
- package/src/icons/LogOut/index.ts +1 -0
- package/src/icons/LogOut/logOutPath.ts +3 -0
- package/src/icons/Settings/SettingsIcon.tsx +21 -0
- package/src/icons/Settings/SettingsIcon.web.tsx +27 -0
- package/src/icons/Settings/index.ts +1 -0
- package/src/icons/Settings/settingsPath.ts +3 -0
- package/src/icons/Video/VideoIcon.tsx +24 -0
- package/src/icons/Video/VideoIcon.web.tsx +30 -0
- package/src/icons/Video/index.ts +1 -0
- package/src/icons/Video/videoPath.ts +5 -0
- package/src/icons/index.ts +9 -0
- package/src/icons/registry.ts +33 -3
- package/src/index.ts +30 -1
- package/src/primitives/MenuItem/MenuItem.stories.tsx +98 -0
- package/src/primitives/MenuItem/MenuItem.tsx +138 -0
- package/src/primitives/MenuItem/index.ts +2 -0
- package/src/primitives/index.ts +2 -0
- package/src/theme/colors.ts +2 -0
- package/src/theme/index.ts +2 -0
- package/src/theme/typography.ts +65 -0
- package/src/utils/dateUtils.ts +86 -0
package/README.md
CHANGED
|
@@ -4,11 +4,27 @@ Cross-platform UI component library for EcoHouse. Built with React Native primit
|
|
|
4
4
|
|
|
5
5
|
## Components
|
|
6
6
|
|
|
7
|
-
| Component
|
|
8
|
-
|
|
|
9
|
-
| `Button`
|
|
10
|
-
| `Input`
|
|
11
|
-
| `
|
|
7
|
+
| Component | Description |
|
|
8
|
+
| ------------ | ----------------------------------------------------------------------------- |
|
|
9
|
+
| `Button` | Pill CTA — `primary` / `secondary`, sizes `lg` / `sm`, optional arrow badge |
|
|
10
|
+
| `Input` | Text field with label, hint, left/right icons, error & disabled states |
|
|
11
|
+
| `Checkbox` | Square checkbox with optional label, controlled or uncontrolled |
|
|
12
|
+
| `Toggle` | Animated on/off switch with optional label |
|
|
13
|
+
| `Select` | Single/multi-select dropdown with search and keyboard navigation |
|
|
14
|
+
| `DatePicker` | Single/range calendar dropdown with month navigation and min/max bounds |
|
|
15
|
+
| `Textarea` | Multi-line text field, same label/hint/state chrome as `Input` |
|
|
16
|
+
| `Avatar` | Logged-in user chip (image/name/email) with an optional account dropdown menu |
|
|
17
|
+
| `Icon` | Dynamic icon by name from the registry (`<Icon name="user" />`) |
|
|
18
|
+
|
|
19
|
+
## Primitives
|
|
20
|
+
|
|
21
|
+
Small reusable building blocks (Storybook: **Primitives /***):
|
|
22
|
+
|
|
23
|
+
| Component | Description |
|
|
24
|
+
| ---------- | ----------------------------------------------------------------------- |
|
|
25
|
+
| `MenuItem` | Option row (icon + label + action) — used in Avatar menus or standalone |
|
|
26
|
+
|
|
27
|
+
Full props: [`docs/components.md`](./docs/components.md).
|
|
12
28
|
|
|
13
29
|
Named icon exports (`UserIcon`, `HomeIcon`, …) are also available. Full icon list: [`docs/icons.md`](./docs/icons.md).
|
|
14
30
|
|
|
@@ -135,6 +151,8 @@ Same API on web and mobile.
|
|
|
135
151
|
|
|
136
152
|
## API
|
|
137
153
|
|
|
154
|
+
Quick reference for `Button`, `Input`, and `Icon` below. Full API for `Checkbox`, `Toggle`, `Select`, `DatePicker`, `Textarea`, `Avatar`, and `MenuItem` lives in [`docs/components.md`](./docs/components.md).
|
|
155
|
+
|
|
138
156
|
### `Button`
|
|
139
157
|
|
|
140
158
|
Pill CTA — sizes `lg` (44px) / `sm` (32px). Secondary fill uses `colors.grey500`.
|
|
@@ -201,14 +219,16 @@ More: [`docs/icons.md`](./docs/icons.md), [`docs/components.md`](./docs/componen
|
|
|
201
219
|
import { colors, grey, fonts, buttonTypography, inputTypography } from "@ecohouse/ui";
|
|
202
220
|
```
|
|
203
221
|
|
|
204
|
-
| Token | Value | Use
|
|
205
|
-
| ------------------- | --------------- |
|
|
206
|
-
| `primary` | `#B46436` | Brand / active left icon |
|
|
207
|
-
| `primaryMuted` | `#B464360F` | Input active border
|
|
208
|
-
| `
|
|
209
|
-
| `
|
|
210
|
-
| `
|
|
211
|
-
| `
|
|
222
|
+
| Token | Value | Use |
|
|
223
|
+
| ------------------- | --------------- | ----------------------------------------- |
|
|
224
|
+
| `primary` | `#B46436` | Brand / active left icon / open chevron |
|
|
225
|
+
| `primaryMuted` | `#B464360F` | Input active border |
|
|
226
|
+
| `primaryHover` | `#B4643633` | DatePicker in-range day background |
|
|
227
|
+
| `red` | `#A63E3E` | Error text / icons / `LogOutIcon` default |
|
|
228
|
+
| `redMuted` | `#A63E3E0F` | Input error border / subtle danger row |
|
|
229
|
+
| `redHover` | `#A63E3E33` | Danger row hover background |
|
|
230
|
+
| `black` / `white` | `#000` / `#fff` | Surfaces / labels |
|
|
231
|
+
| `grey0` … `grey950` | Grey scale | e.g. `grey700` = `#171717` |
|
|
212
232
|
|
|
213
233
|
```tsx
|
|
214
234
|
colors.primary;
|