mood-ui 0.5.0 → 0.5.2
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 +135 -46
- package/dist/mood-ui.cjs +3 -3
- package/dist/mood-ui.cjs.map +1 -1
- package/dist/mood-ui.css +1 -1
- package/dist/mood-ui.mjs +146 -65
- package/dist/mood-ui.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,84 +1,173 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# mood-ui
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
**The Vue 3 component library with the best vibes.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/mood-ui)
|
|
8
|
+
[](https://www.npmjs.com/package/mood-ui)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
[](https://vuejs.org)
|
|
11
|
+
[](https://tailwindcss.com)
|
|
12
|
+
|
|
13
|
+
**81+ accessible components** · reactive theming · dark mode · i18n (ES + EN) · built with Vue 3, TypeScript & Tailwind v4.
|
|
14
|
+
|
|
15
|
+
[**→ Live docs & playground**](https://alansinbailarin.github.io/mood-ui) · [npm](https://www.npmjs.com/package/mood-ui) · [Changelog](https://github.com/alansinbailarin/mood-ui/releases)
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Why mood-ui?
|
|
22
|
+
|
|
23
|
+
- **Reactive theming** — change color, radius, size, halo and dark/light mode at runtime. Every component reacts instantly.
|
|
24
|
+
- **Dark mode + surfaces** — 6 dark surface presets (navy, zinc, charcoal…) or tune all 14 semantic tokens yourself.
|
|
25
|
+
- **i18n built-in** — Spanish & English included. Switch globally with `useLocale().set('es')`.
|
|
26
|
+
- **Accessibility first** — WAI-ARIA roles, focus rings, keyboard nav and screen readers covered out of the box.
|
|
27
|
+
- **Tree-shakeable · TypeScript** — import only what you use. Full types, IntelliSense autocomplete, ESM + CJS.
|
|
28
|
+
- **Tailwind v4 native** — CSS vars, design tokens and `@theme inline`. Override from your own config, no hacks needed.
|
|
29
|
+
|
|
30
|
+
---
|
|
6
31
|
|
|
7
32
|
## Install
|
|
8
33
|
|
|
9
34
|
```bash
|
|
10
35
|
npm install mood-ui
|
|
11
|
-
# Peer dependencies your app must have:
|
|
12
|
-
npm install vue@^3.4 @heroicons/vue@^2 gsap@^3
|
|
13
|
-
```
|
|
14
36
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
37
|
+
# Required peer dependencies:
|
|
38
|
+
npm install vue@^3.4
|
|
39
|
+
|
|
40
|
+
# Optional peers (only needed for specific components):
|
|
41
|
+
npm install @heroicons/vue@^2 # icons in Sidebar / Topbar / DropdownMenu
|
|
42
|
+
npm install gsap@^3 # animations in Toast / Drawer
|
|
43
|
+
```
|
|
18
44
|
|
|
19
45
|
## Setup
|
|
20
46
|
|
|
21
|
-
|
|
22
|
-
**once** at your app entry:
|
|
47
|
+
Import the stylesheet once at your app entry:
|
|
23
48
|
|
|
24
49
|
```ts
|
|
25
50
|
// main.ts
|
|
26
|
-
import { createApp } from 'vue'
|
|
27
|
-
import App from './App.vue'
|
|
28
|
-
|
|
29
|
-
import 'mood-ui/style.css';
|
|
51
|
+
import { createApp } from 'vue'
|
|
52
|
+
import App from './App.vue'
|
|
53
|
+
import 'mood-ui/style.css'
|
|
30
54
|
|
|
31
|
-
createApp(App).mount('#app')
|
|
55
|
+
createApp(App).mount('#app')
|
|
32
56
|
```
|
|
33
57
|
|
|
34
|
-
|
|
35
|
-
size, halo, dark mode and the primary palette) to every component:
|
|
58
|
+
Wrap your app in `<ModoProvider>` to expose all design tokens to every component:
|
|
36
59
|
|
|
37
60
|
```vue
|
|
38
61
|
<script setup lang="ts">
|
|
39
|
-
import { ref } from 'vue'
|
|
40
|
-
import { ModoProvider, Button, paletteFromHex } from 'mood-ui'
|
|
62
|
+
import { ref } from 'vue'
|
|
63
|
+
import { ModoProvider, Button, paletteFromHex } from 'mood-ui'
|
|
41
64
|
|
|
42
|
-
const primary = ref('#6366f1')
|
|
65
|
+
const primary = ref('#6366f1')
|
|
43
66
|
</script>
|
|
44
67
|
|
|
45
68
|
<template>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
69
|
+
<ModoProvider
|
|
70
|
+
color="primary"
|
|
71
|
+
radius="medium"
|
|
72
|
+
size="medium"
|
|
73
|
+
:palettes="{ primary: paletteFromHex(primary) }"
|
|
74
|
+
>
|
|
75
|
+
<Button color="primary">Hello mood-ui</Button>
|
|
76
|
+
</ModoProvider>
|
|
54
77
|
</template>
|
|
55
78
|
```
|
|
56
79
|
|
|
57
|
-
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Powerhouse components — free, no license required
|
|
83
|
+
|
|
84
|
+
Most UI libraries charge for these. mood-ui ships them out of the box.
|
|
85
|
+
|
|
86
|
+
### `<Table>` — AG Grid-level features, zero cost
|
|
87
|
+
|
|
88
|
+
```vue
|
|
89
|
+
<Table
|
|
90
|
+
:data="rows"
|
|
91
|
+
:columns="cols"
|
|
92
|
+
virtual <!-- renders 100k rows at constant speed -->
|
|
93
|
+
tree <!-- hierarchical rows with lazy loading -->
|
|
94
|
+
server-side <!-- delegate sort/filter/page to your API -->
|
|
95
|
+
resizable <!-- drag column edges to resize -->
|
|
96
|
+
reorderable <!-- drag headers to reorder -->
|
|
97
|
+
:multi-sort="true" <!-- shift+click for multi-column sort -->
|
|
98
|
+
v-model:state="savedState" <!-- persist everything to localStorage/URL in one line -->
|
|
99
|
+
/>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Full feature list: sorting · multi-sort · single/multi selection · per-column filters · row expansion · client & server-side pagination · column resize & reorder · virtualization (constant render time for 100k+ rows) · tree rows with lazy `loadChildren` · row grouping · state snapshot (`v-model:state`).
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### `<Scheduler>` — FullCalendar-level, zero cost
|
|
107
|
+
|
|
108
|
+
```vue
|
|
109
|
+
<Scheduler
|
|
110
|
+
:resources="rooms"
|
|
111
|
+
:events="bookings"
|
|
112
|
+
:draggable-events="true" <!-- drag events between time slots -->
|
|
113
|
+
:resizable-events="true" <!-- resize event duration -->
|
|
114
|
+
:allow-cross-resource-drag="true"
|
|
115
|
+
:business-hours="officeHours"
|
|
116
|
+
:prevent-overlap="true"
|
|
117
|
+
format="12h"
|
|
118
|
+
/>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Full feature list: resource rows · drag & drop events · resize events · cross-resource drag · range selection · business hours · disabled time ranges · all-day row · current time indicator · keyboard navigation · 12h/24h · readonly mode.
|
|
122
|
+
|
|
123
|
+
---
|
|
58
124
|
|
|
59
|
-
|
|
60
|
-
`NumberInput`, `SearchInput`, `Select`, `MultiSelect`, `Combobox`, `Checkbox`,
|
|
61
|
-
`Radio`, `RadioGroup`, `Switch`, `Slider`, `RangeSlider`, `FileInput`,
|
|
62
|
-
`DateField`, `DateRangeField`, `DateTimeField`.
|
|
125
|
+
### Calendar suite — 5 views included
|
|
63
126
|
|
|
64
|
-
|
|
65
|
-
`Tooltip`, `Toast`, `ToastContainer`, `ConfirmDialog`, `EmptyState`, `ProgressBar`.
|
|
127
|
+
`Calendar` · `MonthView` · `WeekView` · `DayView` · `AgendaView` — all with locale support, min/max dates, disabled dates/weekdays, and full theming via `ModoProvider`.
|
|
66
128
|
|
|
67
|
-
|
|
68
|
-
`PageHeader`, `PopoverPanel`, `Sidebar`, `SidebarRow`, `Topbar`.
|
|
129
|
+
---
|
|
69
130
|
|
|
70
|
-
|
|
131
|
+
## All components
|
|
71
132
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
`
|
|
133
|
+
| Category | Components |
|
|
134
|
+
|---|---|
|
|
135
|
+
| **Forms** | `Button` `ButtonGroup` `FormField` `Input` `Textarea` `PasswordInput` `NumberInput` `SearchInput` `Select` `MultiSelect` `Combobox` `Checkbox` `Radio` `RadioGroup` `Switch` `Slider` `RangeSlider` `FileInput` `DateField` `DateRangeField` `DateTimeField` |
|
|
136
|
+
| **Feedback** | `Badge` `Banner` `Chip` `Drawer` `Loader` `Modal` `Skeleton` `Tooltip` `Toast` `ToastContainer` `ConfirmDialog` `EmptyState` `ProgressBar` |
|
|
137
|
+
| **Layout** | `AppShell` `Canvas` `Container` `Divider` `Stack` `HStack` `VStack` `PageHeader` `PopoverPanel` `Sidebar` `SidebarRow` `Topbar` |
|
|
138
|
+
| **Navigation** | `Tabs` `Breadcrumbs` `DropdownMenu` `Pagination` |
|
|
139
|
+
| **Data display** | `Card` `Typography` `Avatar` `AvatarGroup` `Table` `TableColumn` `TablePagination` `Calendar` `MonthView` `WeekView` `DayView` `AgendaView` `Scheduler` `DateRangePicker` `DateTimePicker` |
|
|
75
140
|
|
|
76
141
|
## Composables
|
|
77
142
|
|
|
78
|
-
`useModoConfig
|
|
79
|
-
|
|
80
|
-
|
|
143
|
+
`useModoConfig` · `useResolvedColor` · `useResolvedRadius` · `useResolvedSize` · `useResolvedTheme` · `useResolvedHalo` · `useColorMode` · `useToast` · `useConfirm` · `useModoLocale` · `useLocaleString`
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Contributing
|
|
148
|
+
|
|
149
|
+
mood-ui is **open source and open to contributions**. Whether it's fixing a bug, proposing a new component, improving docs or just giving feedback — every bit helps.
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# 1. Fork & clone
|
|
153
|
+
git clone https://github.com/alansinbailarin/mood-ui.git
|
|
154
|
+
cd mood-ui
|
|
155
|
+
|
|
156
|
+
# 2. Install dependencies
|
|
157
|
+
npm install
|
|
158
|
+
|
|
159
|
+
# 3. Start the development showroom
|
|
160
|
+
npm run dev
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
- Check [open issues](https://github.com/alansinbailarin/mood-ui/issues) or open a new one to discuss your idea first.
|
|
164
|
+
- Submit changes as a Pull Request against `main`.
|
|
165
|
+
- Follow the existing patterns: Vue 3 + TypeScript + Tailwind v4, one component per file.
|
|
166
|
+
|
|
167
|
+
If mood-ui saves you time, a ⭐ on [GitHub](https://github.com/alansinbailarin/mood-ui) goes a long way — it helps other developers discover the library.
|
|
168
|
+
|
|
169
|
+
---
|
|
81
170
|
|
|
82
171
|
## License
|
|
83
172
|
|
|
84
|
-
MIT © alansinbailarin
|
|
173
|
+
MIT © [alansinbailarin](https://github.com/alansinbailarin)
|