asterui 0.12.54 → 0.12.55
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/dist/components/Button.js +25 -25
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Card.d.ts +1 -3
- package/dist/components/Card.js +74 -75
- package/dist/components/Card.js.map +1 -1
- package/dist/components/Chart.js +57 -88
- package/dist/components/Chart.js.map +1 -1
- package/dist/components/CopyButton.js +76 -77
- package/dist/components/CopyButton.js.map +1 -1
- package/dist/components/Drawer.js +9 -9
- package/dist/components/Drawer.js.map +1 -1
- package/dist/components/ThemeProvider.d.ts +50 -0
- package/dist/components/ThemeProvider.js +128 -0
- package/dist/components/ThemeProvider.js.map +1 -0
- package/dist/components/Watermark.js +86 -94
- package/dist/components/Watermark.js.map +1 -1
- package/dist/contexts/SizeContext.d.ts +22 -0
- package/dist/contexts/SizeContext.js +15 -0
- package/dist/contexts/SizeContext.js.map +1 -0
- package/dist/hooks/useTheme.d.ts +26 -16
- package/dist/hooks/useTheme.js +101 -40
- package/dist/hooks/useTheme.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +235 -229
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/contexts/IconSizeContext.d.ts +0 -2
- package/dist/contexts/IconSizeContext.js +0 -6
- package/dist/contexts/IconSizeContext.js.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as i, useContext as n } from "react";
|
|
3
|
+
const e = i(void 0);
|
|
4
|
+
function c({ size: t, children: o }) {
|
|
5
|
+
return /* @__PURE__ */ r(e.Provider, { value: t, children: o });
|
|
6
|
+
}
|
|
7
|
+
function f() {
|
|
8
|
+
return n(e);
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
e as SizeContext,
|
|
12
|
+
c as SizeProvider,
|
|
13
|
+
f as useSize
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=SizeContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SizeContext.js","sources":["../../src/contexts/SizeContext.tsx"],"sourcesContent":["import React, { createContext, useContext } from 'react'\n\nexport type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\nexport const SizeContext = createContext<Size | undefined>(undefined)\n\nexport interface SizeProviderProps {\n /** Size to provide to child components */\n size: Size\n /** Child components */\n children: React.ReactNode\n}\n\n/**\n * Provides size context to child components.\n *\n * Used by Button, CopyButton, and other sized components to transmit\n * their size to child icons, allowing icons to automatically match\n * the parent component's size.\n */\nexport function SizeProvider({ size, children }: SizeProviderProps) {\n return (\n <SizeContext.Provider value={size}>\n {children}\n </SizeContext.Provider>\n )\n}\n\n/**\n * Hook to access the current size context.\n * Returns undefined if not within a SizeProvider.\n */\nexport function useSize(): Size | undefined {\n return useContext(SizeContext)\n}\n"],"names":["SizeContext","createContext","SizeProvider","size","children","useSize","useContext"],"mappings":";;AAIO,MAAMA,IAAcC,EAAgC,MAAS;AAgB7D,SAASC,EAAa,EAAE,MAAAC,GAAM,UAAAC,KAA+B;AAClE,2BACGJ,EAAY,UAAZ,EAAqB,OAAOG,GAC1B,UAAAC,GACH;AAEJ;AAMO,SAASC,IAA4B;AAC1C,SAAOC,EAAWN,CAAW;AAC/B;"}
|
package/dist/hooks/useTheme.d.ts
CHANGED
|
@@ -1,29 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
background: string;
|
|
4
|
-
/** Base content/text color (--bc / base-content) */
|
|
5
|
-
foreground: string;
|
|
6
|
-
/** Primary color (--p / primary) */
|
|
7
|
-
primary: string;
|
|
8
|
-
/** Primary content color (--pc / primary-content) */
|
|
9
|
-
primaryContent: string;
|
|
10
|
-
}
|
|
1
|
+
import { ThemeColors } from '../components/ThemeProvider';
|
|
2
|
+
export type { ThemeColors };
|
|
11
3
|
export interface UseThemeReturn {
|
|
4
|
+
/** The theme setting (what user selected). Only available with ThemeProvider. */
|
|
5
|
+
theme: string | undefined;
|
|
6
|
+
/** The actual applied theme. Only available with ThemeProvider. */
|
|
7
|
+
resolvedTheme: string | undefined;
|
|
12
8
|
/** Whether dark mode is active */
|
|
13
9
|
isDark: boolean;
|
|
10
|
+
/** Set the theme. Only available with ThemeProvider. */
|
|
11
|
+
setTheme: ((theme: string) => void) | undefined;
|
|
14
12
|
/** Computed theme colors as hex values */
|
|
15
13
|
colors: ThemeColors;
|
|
14
|
+
/** The system preference. Only available with ThemeProvider. */
|
|
15
|
+
systemTheme: 'light' | 'dark' | undefined;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Hook to detect current theme and get computed colors
|
|
18
|
+
* Hook to detect current theme and get computed colors.
|
|
19
|
+
*
|
|
20
|
+
* When used within a ThemeProvider, returns full theme control including
|
|
21
|
+
* setTheme, theme selection, and resolved theme.
|
|
19
22
|
*
|
|
20
|
-
*
|
|
21
|
-
* and
|
|
23
|
+
* When used standalone (without ThemeProvider), provides read-only access
|
|
24
|
+
* to isDark and colors based on the current data-theme attribute and
|
|
25
|
+
* system preference.
|
|
22
26
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
27
|
+
* @example
|
|
28
|
+
* // With ThemeProvider (full control)
|
|
29
|
+
* const { theme, setTheme, resolvedTheme, isDark, colors } = useTheme()
|
|
30
|
+
* setTheme('dark')
|
|
31
|
+
* setTheme('system')
|
|
25
32
|
*
|
|
26
|
-
*
|
|
33
|
+
* @example
|
|
34
|
+
* // Without ThemeProvider (read-only)
|
|
35
|
+
* const { isDark, colors } = useTheme()
|
|
36
|
+
* // colors.primary, colors.foreground, etc.
|
|
27
37
|
*/
|
|
28
38
|
export declare function useTheme(): UseThemeReturn;
|
|
29
39
|
export default useTheme;
|
package/dist/hooks/useTheme.js
CHANGED
|
@@ -1,56 +1,117 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { useState as i, useEffect as u, useMemo as m } from "react";
|
|
2
|
+
import { useHasThemeProvider as d, useThemeContext as l } from "../components/ThemeProvider.js";
|
|
3
|
+
const h = /* @__PURE__ */ new Set([
|
|
4
|
+
"dark",
|
|
5
|
+
"synthwave",
|
|
6
|
+
"halloween",
|
|
7
|
+
"forest",
|
|
8
|
+
"black",
|
|
9
|
+
"luxury",
|
|
10
|
+
"dracula",
|
|
11
|
+
"business",
|
|
12
|
+
"night",
|
|
13
|
+
"coffee",
|
|
14
|
+
"dim",
|
|
15
|
+
"sunset"
|
|
16
|
+
]);
|
|
17
|
+
function g(r) {
|
|
18
|
+
if (typeof document > "u") return "#000000";
|
|
19
|
+
const e = document.createElement("canvas");
|
|
20
|
+
e.width = e.height = 1;
|
|
21
|
+
const t = e.getContext("2d");
|
|
22
|
+
if (!t) return "#000000";
|
|
23
|
+
t.fillStyle = r, t.fillRect(0, 0, 1, 1);
|
|
24
|
+
const [n, o, s] = t.getImageData(0, 0, 1, 1).data;
|
|
25
|
+
return `#${((1 << 24) + (n << 16) + (o << 8) + s).toString(16).slice(1)}`;
|
|
10
26
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
27
|
+
function a() {
|
|
28
|
+
if (typeof document > "u")
|
|
29
|
+
return {
|
|
30
|
+
background: "#ffffff",
|
|
31
|
+
foreground: "#000000",
|
|
32
|
+
primary: "#6366f1",
|
|
33
|
+
primaryContent: "#ffffff",
|
|
34
|
+
secondary: "#f000b8",
|
|
35
|
+
accent: "#37cdbe",
|
|
36
|
+
info: "#3abff8",
|
|
37
|
+
success: "#36d399",
|
|
38
|
+
warning: "#fbbd23",
|
|
39
|
+
error: "#f87272"
|
|
40
|
+
};
|
|
41
|
+
const r = getComputedStyle(document.documentElement), e = (t, n) => {
|
|
42
|
+
const o = r.getPropertyValue(t).trim();
|
|
43
|
+
return o ? g(o) : n;
|
|
44
|
+
};
|
|
13
45
|
return {
|
|
14
|
-
background:
|
|
15
|
-
foreground: e
|
|
16
|
-
primary:
|
|
17
|
-
primaryContent:
|
|
46
|
+
background: e("--color-base-100", "#ffffff"),
|
|
47
|
+
foreground: e("--color-base-content", "#000000"),
|
|
48
|
+
primary: e("--color-primary", "#6366f1"),
|
|
49
|
+
primaryContent: e("--color-primary-content", "#ffffff"),
|
|
50
|
+
secondary: e("--color-secondary", "#f000b8"),
|
|
51
|
+
accent: e("--color-accent", "#37cdbe"),
|
|
52
|
+
info: e("--color-info", "#3abff8"),
|
|
53
|
+
success: e("--color-success", "#36d399"),
|
|
54
|
+
warning: e("--color-warning", "#fbbd23"),
|
|
55
|
+
error: e("--color-error", "#f87272")
|
|
18
56
|
};
|
|
19
57
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
58
|
+
function y() {
|
|
59
|
+
return typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
60
|
+
}
|
|
61
|
+
function b() {
|
|
62
|
+
return typeof document > "u" ? null : document.documentElement.getAttribute("data-theme");
|
|
63
|
+
}
|
|
64
|
+
function k() {
|
|
65
|
+
if (d()) {
|
|
66
|
+
const e = l();
|
|
67
|
+
return {
|
|
68
|
+
theme: e.theme,
|
|
69
|
+
resolvedTheme: e.resolvedTheme,
|
|
70
|
+
isDark: e.isDark,
|
|
71
|
+
setTheme: e.setTheme,
|
|
72
|
+
colors: e.colors,
|
|
73
|
+
systemTheme: e.systemTheme
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return T();
|
|
77
|
+
}
|
|
78
|
+
function T() {
|
|
79
|
+
const [r, e] = i(() => ({
|
|
22
80
|
isDark: !1,
|
|
23
|
-
colors:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
requestAnimationFrame(() => {
|
|
34
|
-
r({
|
|
35
|
-
isDark: f,
|
|
36
|
-
colors: u()
|
|
81
|
+
colors: a()
|
|
82
|
+
}));
|
|
83
|
+
return u(() => {
|
|
84
|
+
const t = () => {
|
|
85
|
+
const s = b(), f = y();
|
|
86
|
+
let c = !1;
|
|
87
|
+
s ? c = h.has(s) : c = f === "dark", requestAnimationFrame(() => {
|
|
88
|
+
e({
|
|
89
|
+
isDark: c,
|
|
90
|
+
colors: a()
|
|
37
91
|
});
|
|
38
92
|
});
|
|
39
93
|
};
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
94
|
+
t();
|
|
95
|
+
const n = new MutationObserver(t);
|
|
96
|
+
n.observe(document.documentElement, {
|
|
43
97
|
attributes: !0,
|
|
44
98
|
attributeFilter: ["data-theme", "class"]
|
|
45
99
|
});
|
|
46
|
-
const
|
|
47
|
-
return
|
|
48
|
-
|
|
100
|
+
const o = window.matchMedia("(prefers-color-scheme: dark)");
|
|
101
|
+
return o.addEventListener("change", t), () => {
|
|
102
|
+
n.disconnect(), o.removeEventListener("change", t);
|
|
49
103
|
};
|
|
50
|
-
}, []),
|
|
104
|
+
}, []), m(() => ({
|
|
105
|
+
theme: void 0,
|
|
106
|
+
resolvedTheme: void 0,
|
|
107
|
+
isDark: r.isDark,
|
|
108
|
+
setTheme: void 0,
|
|
109
|
+
colors: r.colors,
|
|
110
|
+
systemTheme: void 0
|
|
111
|
+
}), [r.isDark, r.colors]);
|
|
51
112
|
}
|
|
52
113
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
114
|
+
k as default,
|
|
115
|
+
k as useTheme
|
|
55
116
|
};
|
|
56
117
|
//# sourceMappingURL=useTheme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.js","sources":["../../src/hooks/useTheme.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nexport
|
|
1
|
+
{"version":3,"file":"useTheme.js","sources":["../../src/hooks/useTheme.ts"],"sourcesContent":["import { useEffect, useState, useMemo } from 'react'\nimport { useHasThemeProvider, useThemeContext, type ThemeColors } from '../components/ThemeProvider'\n\nexport type { ThemeColors }\n\n// Common dark themes in DaisyUI\nconst DARK_THEMES = new Set([\n 'dark', 'synthwave', 'halloween', 'forest', 'black', 'luxury', 'dracula',\n 'business', 'night', 'coffee', 'dim', 'sunset'\n])\n\nexport interface UseThemeReturn {\n /** The theme setting (what user selected). Only available with ThemeProvider. */\n theme: string | undefined\n /** The actual applied theme. Only available with ThemeProvider. */\n resolvedTheme: string | undefined\n /** Whether dark mode is active */\n isDark: boolean\n /** Set the theme. Only available with ThemeProvider. */\n setTheme: ((theme: string) => void) | undefined\n /** Computed theme colors as hex values */\n colors: ThemeColors\n /** The system preference. Only available with ThemeProvider. */\n systemTheme: 'light' | 'dark' | undefined\n}\n\n// Convert any CSS color to hex\nfunction colorToHex(color: string): string {\n if (typeof document === 'undefined') return '#000000'\n const canvas = document.createElement('canvas')\n canvas.width = canvas.height = 1\n const ctx = canvas.getContext('2d')\n if (!ctx) return '#000000'\n ctx.fillStyle = color\n ctx.fillRect(0, 0, 1, 1)\n const [r, g, b] = ctx.getImageData(0, 0, 1, 1).data\n return `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`\n}\n\nfunction getThemeColors(): ThemeColors {\n if (typeof document === 'undefined') {\n return {\n background: '#ffffff',\n foreground: '#000000',\n primary: '#6366f1',\n primaryContent: '#ffffff',\n secondary: '#f000b8',\n accent: '#37cdbe',\n info: '#3abff8',\n success: '#36d399',\n warning: '#fbbd23',\n error: '#f87272',\n }\n }\n\n const style = getComputedStyle(document.documentElement)\n const getColor = (varName: string, fallback: string): string => {\n const value = style.getPropertyValue(varName).trim()\n return value ? colorToHex(value) : fallback\n }\n\n return {\n background: getColor('--color-base-100', '#ffffff'),\n foreground: getColor('--color-base-content', '#000000'),\n primary: getColor('--color-primary', '#6366f1'),\n primaryContent: getColor('--color-primary-content', '#ffffff'),\n secondary: getColor('--color-secondary', '#f000b8'),\n accent: getColor('--color-accent', '#37cdbe'),\n info: getColor('--color-info', '#3abff8'),\n success: getColor('--color-success', '#36d399'),\n warning: getColor('--color-warning', '#fbbd23'),\n error: getColor('--color-error', '#f87272'),\n }\n}\n\nfunction getSystemTheme(): 'light' | 'dark' {\n if (typeof window === 'undefined') return 'light'\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'\n}\n\nfunction getCurrentTheme(): string | null {\n if (typeof document === 'undefined') return null\n return document.documentElement.getAttribute('data-theme')\n}\n\n/**\n * Hook to detect current theme and get computed colors.\n *\n * When used within a ThemeProvider, returns full theme control including\n * setTheme, theme selection, and resolved theme.\n *\n * When used standalone (without ThemeProvider), provides read-only access\n * to isDark and colors based on the current data-theme attribute and\n * system preference.\n *\n * @example\n * // With ThemeProvider (full control)\n * const { theme, setTheme, resolvedTheme, isDark, colors } = useTheme()\n * setTheme('dark')\n * setTheme('system')\n *\n * @example\n * // Without ThemeProvider (read-only)\n * const { isDark, colors } = useTheme()\n * // colors.primary, colors.foreground, etc.\n */\nexport function useTheme(): UseThemeReturn {\n const hasProvider = useHasThemeProvider()\n\n // If we have a provider, use its context\n if (hasProvider) {\n // This is safe because hasProvider is stable after initial render\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const context = useThemeContext()\n return {\n theme: context.theme,\n resolvedTheme: context.resolvedTheme,\n isDark: context.isDark,\n setTheme: context.setTheme,\n colors: context.colors,\n systemTheme: context.systemTheme,\n }\n }\n\n // Standalone mode - no provider\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useThemeStandalone()\n}\n\n/**\n * Standalone theme detection (no ThemeProvider)\n */\nfunction useThemeStandalone(): UseThemeReturn {\n const [state, setState] = useState<{ isDark: boolean; colors: ThemeColors }>(() => ({\n isDark: false,\n colors: getThemeColors(),\n }))\n\n useEffect(() => {\n const updateTheme = () => {\n const currentTheme = getCurrentTheme()\n const systemTheme = getSystemTheme()\n\n // Determine if dark based on data-theme or system preference\n let isDark = false\n if (currentTheme) {\n isDark = DARK_THEMES.has(currentTheme)\n } else {\n isDark = systemTheme === 'dark'\n }\n\n // Update colors after a frame\n requestAnimationFrame(() => {\n setState({\n isDark,\n colors: getThemeColors(),\n })\n })\n }\n\n updateTheme()\n\n // Watch for theme changes via attribute mutation\n const observer = new MutationObserver(updateTheme)\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['data-theme', 'class']\n })\n\n // Watch for system preference changes\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')\n mediaQuery.addEventListener('change', updateTheme)\n\n return () => {\n observer.disconnect()\n mediaQuery.removeEventListener('change', updateTheme)\n }\n }, [])\n\n return useMemo(() => ({\n theme: undefined,\n resolvedTheme: undefined,\n isDark: state.isDark,\n setTheme: undefined,\n colors: state.colors,\n systemTheme: undefined,\n }), [state.isDark, state.colors])\n}\n\nexport default useTheme\n"],"names":["DARK_THEMES","colorToHex","color","canvas","ctx","r","g","b","getThemeColors","style","getColor","varName","fallback","value","getSystemTheme","getCurrentTheme","useTheme","useHasThemeProvider","context","useThemeContext","useThemeStandalone","state","setState","useState","useEffect","updateTheme","currentTheme","systemTheme","isDark","observer","mediaQuery","useMemo"],"mappings":";;AAMA,MAAMA,wBAAkB,IAAI;AAAA,EAC1B;AAAA,EAAQ;AAAA,EAAa;AAAA,EAAa;AAAA,EAAU;AAAA,EAAS;AAAA,EAAU;AAAA,EAC/D;AAAA,EAAY;AAAA,EAAS;AAAA,EAAU;AAAA,EAAO;AACxC,CAAC;AAkBD,SAASC,EAAWC,GAAuB;AACzC,MAAI,OAAO,WAAa,IAAa,QAAO;AAC5C,QAAMC,IAAS,SAAS,cAAc,QAAQ;AAC9C,EAAAA,EAAO,QAAQA,EAAO,SAAS;AAC/B,QAAMC,IAAMD,EAAO,WAAW,IAAI;AAClC,MAAI,CAACC,EAAK,QAAO;AACjB,EAAAA,EAAI,YAAYF,GAChBE,EAAI,SAAS,GAAG,GAAG,GAAG,CAAC;AACvB,QAAM,CAACC,GAAGC,GAAGC,CAAC,IAAIH,EAAI,a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CAACA,EAAM,QAAQA,EAAM,MAAM,CAAC;AAClC;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export { Breadcrumb } from './components/Breadcrumb';
|
|
|
14
14
|
export type { BreadcrumbProps, BreadcrumbItemProps } from './components/Breadcrumb';
|
|
15
15
|
export { Button } from './components/Button';
|
|
16
16
|
export type { ButtonProps } from './components/Button';
|
|
17
|
-
export {
|
|
18
|
-
export type {
|
|
17
|
+
export { SizeContext, SizeProvider, useSize } from './contexts/SizeContext';
|
|
18
|
+
export type { Size } from './contexts/SizeContext';
|
|
19
19
|
export { CopyButton } from './components/CopyButton';
|
|
20
20
|
export type { CopyButtonProps, CopyButtonPosition } from './components/CopyButton';
|
|
21
21
|
export { Checkbox } from './components/Checkbox';
|
|
@@ -174,6 +174,8 @@ export { Tag, CheckableTag, TagLiveRegion } from './components/Tag';
|
|
|
174
174
|
export type { TagProps, CheckableTagProps, TagSize, TagColor, TagVariant } from './components/Tag';
|
|
175
175
|
export { ThemeController } from './components/ThemeController';
|
|
176
176
|
export type { ThemeControllerSwapProps, ThemeControllerDropdownProps, ThemeControllerToggleProps } from './components/ThemeController';
|
|
177
|
+
export { ThemeProvider, useThemeContext, useHasThemeProvider } from './components/ThemeProvider';
|
|
178
|
+
export type { ThemeProviderProps, ThemeContextValue } from './components/ThemeProvider';
|
|
177
179
|
export { TimePicker } from './components/TimePicker';
|
|
178
180
|
export type { TimePickerProps } from './components/TimePicker';
|
|
179
181
|
export { Timeline } from './components/Timeline';
|