mood-ui 0.8.0 → 0.8.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/LICENSE +21 -0
- package/README.md +173 -0
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 alansinbailarin
|
|
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
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# mood-ui
|
|
4
|
+
|
|
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://mood-ui.com) · [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
|
+
---
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install mood-ui
|
|
36
|
+
|
|
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
|
+
```
|
|
44
|
+
|
|
45
|
+
## Setup
|
|
46
|
+
|
|
47
|
+
Import the stylesheet once at your app entry:
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
// main.ts
|
|
51
|
+
import { createApp } from "vue";
|
|
52
|
+
import App from "./App.vue";
|
|
53
|
+
import "mood-ui/style.css";
|
|
54
|
+
|
|
55
|
+
createApp(App).mount("#app");
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Wrap your app in `<ModoProvider>` to expose all design tokens to every component:
|
|
59
|
+
|
|
60
|
+
```vue
|
|
61
|
+
<script setup lang="ts">
|
|
62
|
+
import { ref } from "vue";
|
|
63
|
+
import { ModoProvider, Button, paletteFromHex } from "mood-ui";
|
|
64
|
+
|
|
65
|
+
const primary = ref("#6366f1");
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<template>
|
|
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>
|
|
77
|
+
</template>
|
|
78
|
+
```
|
|
79
|
+
|
|
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
|
+
---
|
|
124
|
+
|
|
125
|
+
### Calendar suite — 5 views included
|
|
126
|
+
|
|
127
|
+
`Calendar` · `MonthView` · `WeekView` · `DayView` · `AgendaView` — all with locale support, min/max dates, disabled dates/weekdays, and full theming via `ModoProvider`.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## All components
|
|
132
|
+
|
|
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` |
|
|
140
|
+
|
|
141
|
+
## Composables
|
|
142
|
+
|
|
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
|
+
---
|
|
170
|
+
|
|
171
|
+
## License
|
|
172
|
+
|
|
173
|
+
MIT © [alansinbailarin](https://github.com/alansinbailarin)
|