mood-ui 0.8.0 → 0.8.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/LICENSE +21 -0
- package/README.md +173 -0
- package/dist/mood-ui.cjs +1 -1
- package/dist/mood-ui.cjs.map +1 -1
- package/dist/mood-ui.css +1 -1
- package/dist/mood-ui.mjs +17 -10
- package/dist/mood-ui.mjs.map +1 -1
- package/dist/types/composables/useColorMode.d.ts +11 -11
- package/package.json +1 -1
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
export type ColorMode = "light" | "dark" | "system";
|
|
12
12
|
export interface ColorModeOptions {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* Additional class to toggle on `<html>` when the resolved mode is
|
|
15
|
+
* `'dark'`. The lib **always** toggles its own internal `'dark'`
|
|
16
|
+
* class as well — its compiled CSS (Tailwind v4 `dark:` variants)
|
|
17
|
+
* is keyed off `.dark` and cannot work without it. Use this option
|
|
18
|
+
* when your application's CSS keys off a different class, e.g.
|
|
19
|
+
* `useColorMode({ darkClass: 'appdark' })`. With that call, `<html>`
|
|
20
|
+
* will carry both `appdark` (for your rules) and `dark` (for the
|
|
21
|
+
* lib's rules) whenever the resolved mode is dark.
|
|
16
22
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* dark-mode rules keep firing.
|
|
21
|
-
*
|
|
22
|
-
* Note: mood-ui's own dark-mode CSS is compiled against `.dark`. If
|
|
23
|
-
* you need both your `appdark` selectors AND the lib's dark variants
|
|
24
|
-
* to work, configure Tailwind so `dark:` resolves to your custom
|
|
25
|
-
* selector, or keep both classes in sync via `darkClassExtras`.
|
|
23
|
+
* Calling this with a new value swaps the previous extra class for
|
|
24
|
+
* the new one immediately; the lib's internal `dark` is never
|
|
25
|
+
* removed.
|
|
26
26
|
*/
|
|
27
27
|
darkClass?: string;
|
|
28
28
|
}
|