quail-ui 0.5.73 → 0.6.0
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 +26 -4
- package/dist/index.css +1 -1
- package/dist/index.js +1689 -1651
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +8 -8
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ A Vue 3 component library for [Quaily](https://quaily.com).
|
|
|
8
8
|
|
|
9
9
|
- 26+ UI components (Button, Input, Dialog, Menu, Tabs, etc.)
|
|
10
10
|
- 110+ SVG icons
|
|
11
|
-
-
|
|
11
|
+
- Theme support (light, dark, morph)
|
|
12
12
|
- TUI (Terminal UI) mode with monospace fonts
|
|
13
13
|
- Fully typed with TypeScript
|
|
14
14
|
- SCSS with CSS custom properties
|
|
@@ -108,14 +108,36 @@ You can use Quaily UI directly in HTML without any build tools:
|
|
|
108
108
|
| QFence | Alert/notice box |
|
|
109
109
|
| ... | And more |
|
|
110
110
|
|
|
111
|
-
##
|
|
111
|
+
## Theme Switching
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
Quail UI includes three built-in themes:
|
|
114
|
+
|
|
115
|
+
- `light`
|
|
116
|
+
- `dark`
|
|
117
|
+
- `morph`
|
|
118
|
+
|
|
119
|
+
Use the exported theme helpers:
|
|
114
120
|
|
|
115
121
|
```js
|
|
116
|
-
|
|
122
|
+
import { applyTheme, resolveInitialTheme } from 'quail-ui'
|
|
123
|
+
|
|
124
|
+
// Initialize from localStorage / system preference
|
|
125
|
+
const initialTheme = resolveInitialTheme()
|
|
126
|
+
applyTheme(initialTheme)
|
|
127
|
+
|
|
128
|
+
// Switch theme
|
|
129
|
+
applyTheme('light')
|
|
130
|
+
applyTheme('dark')
|
|
131
|
+
applyTheme('morph')
|
|
132
|
+
|
|
133
|
+
// Optional: switch without persisting to localStorage
|
|
134
|
+
applyTheme('morph', false)
|
|
117
135
|
```
|
|
118
136
|
|
|
137
|
+
`applyTheme` updates `document.body.dataset.theme` and toggles `.dark/.light` body classes automatically.
|
|
138
|
+
|
|
139
|
+
For legacy usage, dark mode still works by toggling the `.dark` class on `<body>`.
|
|
140
|
+
|
|
119
141
|
## TUI Mode
|
|
120
142
|
|
|
121
143
|
Enable terminal-style UI with monospace fonts:
|