@sigx/daisyui 0.1.6
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 +235 -0
- package/dist/buttons/Button.d.ts +18 -0
- package/dist/buttons/Button.d.ts.map +1 -0
- package/dist/buttons/ButtonGroup.d.ts +18 -0
- package/dist/buttons/ButtonGroup.d.ts.map +1 -0
- package/dist/buttons/index.d.ts +5 -0
- package/dist/buttons/index.d.ts.map +1 -0
- package/dist/buttons/index.js +2 -0
- package/dist/buttons-Dtj_5Uc3.js +61 -0
- package/dist/buttons-Dtj_5Uc3.js.map +1 -0
- package/dist/data/Table.d.ts +92 -0
- package/dist/data/Table.d.ts.map +1 -0
- package/dist/data/index.d.ts +3 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +2 -0
- package/dist/data-wxNpnX83.js +153 -0
- package/dist/data-wxNpnX83.js.map +1 -0
- package/dist/feedback/Accordion.d.ts +87 -0
- package/dist/feedback/Accordion.d.ts.map +1 -0
- package/dist/feedback/Badge.d.ts +73 -0
- package/dist/feedback/Badge.d.ts.map +1 -0
- package/dist/feedback/Countdown.d.ts +33 -0
- package/dist/feedback/Countdown.d.ts.map +1 -0
- package/dist/feedback/Diff.d.ts +43 -0
- package/dist/feedback/Diff.d.ts.map +1 -0
- package/dist/feedback/FileInput.d.ts +28 -0
- package/dist/feedback/FileInput.d.ts.map +1 -0
- package/dist/feedback/Indicator.d.ts +47 -0
- package/dist/feedback/Indicator.d.ts.map +1 -0
- package/dist/feedback/Kbd.d.ts +31 -0
- package/dist/feedback/Kbd.d.ts.map +1 -0
- package/dist/feedback/Modal.d.ts +51 -0
- package/dist/feedback/Modal.d.ts.map +1 -0
- package/dist/feedback/RadialProgress.d.ts +35 -0
- package/dist/feedback/RadialProgress.d.ts.map +1 -0
- package/dist/feedback/Rating.d.ts +34 -0
- package/dist/feedback/Rating.d.ts.map +1 -0
- package/dist/feedback/Skeleton.d.ts +24 -0
- package/dist/feedback/Skeleton.d.ts.map +1 -0
- package/dist/feedback/Steps.d.ts +60 -0
- package/dist/feedback/Steps.d.ts.map +1 -0
- package/dist/feedback/Swap.d.ts +53 -0
- package/dist/feedback/Swap.d.ts.map +1 -0
- package/dist/feedback/Timeline.d.ts +76 -0
- package/dist/feedback/Timeline.d.ts.map +1 -0
- package/dist/feedback/Toast.d.ts +30 -0
- package/dist/feedback/Toast.d.ts.map +1 -0
- package/dist/feedback/index.d.ts +31 -0
- package/dist/feedback/index.d.ts.map +1 -0
- package/dist/feedback/index.js +2 -0
- package/dist/feedback-DFutN-Kz.js +817 -0
- package/dist/feedback-DFutN-Kz.js.map +1 -0
- package/dist/forms/Checkbox.d.ts +15 -0
- package/dist/forms/Checkbox.d.ts.map +1 -0
- package/dist/forms/FormField.d.ts +16 -0
- package/dist/forms/FormField.d.ts.map +1 -0
- package/dist/forms/Input.d.ts +19 -0
- package/dist/forms/Input.d.ts.map +1 -0
- package/dist/forms/Radio.d.ts +78 -0
- package/dist/forms/Radio.d.ts.map +1 -0
- package/dist/forms/Range.d.ts +15 -0
- package/dist/forms/Range.d.ts.map +1 -0
- package/dist/forms/Select.d.ts +28 -0
- package/dist/forms/Select.d.ts.map +1 -0
- package/dist/forms/Textarea.d.ts +17 -0
- package/dist/forms/Textarea.d.ts.map +1 -0
- package/dist/forms/Toggle.d.ts +15 -0
- package/dist/forms/Toggle.d.ts.map +1 -0
- package/dist/forms/index.d.ts +17 -0
- package/dist/forms/index.d.ts.map +1 -0
- package/dist/forms/index.js +2 -0
- package/dist/forms-CuvlRMro.js +362 -0
- package/dist/forms-CuvlRMro.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/layout/Card.d.ts +65 -0
- package/dist/layout/Card.d.ts.map +1 -0
- package/dist/layout/Carousel.d.ts +56 -0
- package/dist/layout/Carousel.d.ts.map +1 -0
- package/dist/layout/Chat.d.ts +54 -0
- package/dist/layout/Chat.d.ts.map +1 -0
- package/dist/layout/Container.d.ts +17 -0
- package/dist/layout/Container.d.ts.map +1 -0
- package/dist/layout/Divider.d.ts +22 -0
- package/dist/layout/Divider.d.ts.map +1 -0
- package/dist/layout/Flex.d.ts +59 -0
- package/dist/layout/Flex.d.ts.map +1 -0
- package/dist/layout/Footer.d.ts +25 -0
- package/dist/layout/Footer.d.ts.map +1 -0
- package/dist/layout/Hero.d.ts +52 -0
- package/dist/layout/Hero.d.ts.map +1 -0
- package/dist/layout/Join.d.ts +40 -0
- package/dist/layout/Join.d.ts.map +1 -0
- package/dist/layout/Link.d.ts +20 -0
- package/dist/layout/Link.d.ts.map +1 -0
- package/dist/layout/Mask.d.ts +26 -0
- package/dist/layout/Mask.d.ts.map +1 -0
- package/dist/layout/Mockup.d.ts +95 -0
- package/dist/layout/Mockup.d.ts.map +1 -0
- package/dist/layout/Stack.d.ts +45 -0
- package/dist/layout/Stack.d.ts.map +1 -0
- package/dist/layout/index.d.ts +46 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +2 -0
- package/dist/layout-0aaJX4B2.js +554 -0
- package/dist/layout-0aaJX4B2.js.map +1 -0
- package/dist/navigation/Breadcrumbs.d.ts +22 -0
- package/dist/navigation/Breadcrumbs.d.ts.map +1 -0
- package/dist/navigation/Drawer.d.ts +25 -0
- package/dist/navigation/Drawer.d.ts.map +1 -0
- package/dist/navigation/Dropdown.d.ts +40 -0
- package/dist/navigation/Dropdown.d.ts.map +1 -0
- package/dist/navigation/MenuComponent.d.ts +54 -0
- package/dist/navigation/MenuComponent.d.ts.map +1 -0
- package/dist/navigation/Navbar.d.ts +23 -0
- package/dist/navigation/Navbar.d.ts.map +1 -0
- package/dist/navigation/Pagination.d.ts +12 -0
- package/dist/navigation/Pagination.d.ts.map +1 -0
- package/dist/navigation/Tabs.d.ts +35 -0
- package/dist/navigation/Tabs.d.ts.map +1 -0
- package/dist/navigation/index.d.ts +15 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +2 -0
- package/dist/navigation-4cwyfLvr.js +285 -0
- package/dist/navigation-4cwyfLvr.js.map +1 -0
- package/dist/shared/styles.d.ts +79 -0
- package/dist/shared/styles.d.ts.map +1 -0
- package/dist/styles-DFkMxi90.js +126 -0
- package/dist/styles-DFkMxi90.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +73 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme-D9CUMvuT.js +118 -0
- package/dist/theme-D9CUMvuT.js.map +1 -0
- package/dist/typography/Text.d.ts +47 -0
- package/dist/typography/Text.d.ts.map +1 -0
- package/dist/typography/index.d.ts +3 -0
- package/dist/typography/index.d.ts.map +1 -0
- package/dist/typography/index.js +2 -0
- package/dist/typography-CU1RMGKA.js +112 -0
- package/dist/typography-CU1RMGKA.js.map +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { DefineProp, DefineSlot } from 'sigx';
|
|
2
|
+
/**
|
|
3
|
+
* Built-in DaisyUI themes
|
|
4
|
+
*/
|
|
5
|
+
export type DaisyTheme = 'light' | 'cupcake' | 'bumblebee' | 'emerald' | 'corporate' | 'retro' | 'cyberpunk' | 'valentine' | 'garden' | 'lofi' | 'pastel' | 'fantasy' | 'wireframe' | 'cmyk' | 'autumn' | 'acid' | 'lemonade' | 'winter' | 'nord' | 'dark' | 'synthwave' | 'halloween' | 'forest' | 'aqua' | 'black' | 'luxury' | 'dracula' | 'business' | 'night' | 'coffee' | 'dim' | 'sunset';
|
|
6
|
+
/**
|
|
7
|
+
* Theme configuration options
|
|
8
|
+
*/
|
|
9
|
+
export interface ThemeConfig {
|
|
10
|
+
/** Default theme to use */
|
|
11
|
+
defaultTheme?: DaisyTheme | string;
|
|
12
|
+
/** List of themes to include (for custom CSS generation) */
|
|
13
|
+
themes?: (DaisyTheme | string)[];
|
|
14
|
+
/** Whether to enable dark mode detection */
|
|
15
|
+
darkMode?: boolean;
|
|
16
|
+
/** Custom theme definitions */
|
|
17
|
+
customThemes?: Record<string, Record<string, string>>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get the current theme from the document
|
|
21
|
+
*/
|
|
22
|
+
export declare function getCurrentTheme(): string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Set the theme on the document
|
|
25
|
+
*/
|
|
26
|
+
export declare function setTheme(theme: DaisyTheme | string): void;
|
|
27
|
+
/**
|
|
28
|
+
* Get the preferred theme from localStorage or system preference
|
|
29
|
+
*/
|
|
30
|
+
export declare function getPreferredTheme(defaultTheme?: DaisyTheme | string): DaisyTheme | string;
|
|
31
|
+
/**
|
|
32
|
+
* Initialize theme based on user preference or default
|
|
33
|
+
*/
|
|
34
|
+
export declare function initializeTheme(config?: ThemeConfig): void;
|
|
35
|
+
/**
|
|
36
|
+
* Toggle between light and dark themes
|
|
37
|
+
*/
|
|
38
|
+
export declare function toggleDarkMode(lightTheme?: DaisyTheme, darkTheme?: DaisyTheme): void;
|
|
39
|
+
export type ThemeProviderProps = DefineProp<'theme', DaisyTheme | string, false> & DefineProp<'defaultTheme', DaisyTheme | string, false> & DefineProp<'darkMode', boolean, false> & DefineProp<'class', string, false> & DefineSlot<'default'>;
|
|
40
|
+
/**
|
|
41
|
+
* ThemeProvider component that wraps your app and manages theme state.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <ThemeProvider defaultTheme="cupcake" darkMode>
|
|
46
|
+
* <App />
|
|
47
|
+
* </ThemeProvider>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare const ThemeProvider: import("@sigx/runtime-core").ComponentFactory<ThemeProviderProps, void, {
|
|
51
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
52
|
+
}>;
|
|
53
|
+
export type ThemeSelectorProps = DefineProp<'themes', (DaisyTheme | string)[], false> & DefineProp<'class', string, false>;
|
|
54
|
+
/**
|
|
55
|
+
* A dropdown selector for switching themes.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```tsx
|
|
59
|
+
* <ThemeSelector themes={['light', 'dark', 'cupcake', 'cyberpunk']} />
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare const ThemeSelector: import("@sigx/runtime-core").ComponentFactory<ThemeSelectorProps, void, {}>;
|
|
63
|
+
export type ThemeToggleProps = DefineProp<'lightTheme', DaisyTheme | string, false> & DefineProp<'darkTheme', DaisyTheme | string, false> & DefineProp<'class', string, false>;
|
|
64
|
+
/**
|
|
65
|
+
* A toggle button for switching between light and dark themes.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* <ThemeToggle lightTheme="light" darkTheme="dark" />
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare const ThemeToggle: import("@sigx/runtime-core").ComponentFactory<ThemeToggleProps, void, {}>;
|
|
73
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,UAAU,EAAU,MAAM,MAAM,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,UAAU,GAEhB,OAAO,GACP,SAAS,GACT,WAAW,GACX,SAAS,GACT,WAAW,GACX,OAAO,GACP,WAAW,GACX,WAAW,GACX,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,SAAS,GACT,WAAW,GACX,MAAM,GACN,QAAQ,GACR,MAAM,GACN,UAAU,GACV,QAAQ,GACR,MAAM,GAEN,MAAM,GACN,WAAW,GACX,WAAW,GACX,QAAQ,GACR,MAAM,GACN,OA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,CAAC;AAMH,MAAM,MAAM,kBAAkB,GACxB,UAAU,CAAC,QAAQ,EAAE,CAAC,UAAU,GAAG,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GACpD,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAWzC;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,6EAqBxB,CAAC;AAMH,MAAM,MAAM,gBAAgB,GACtB,UAAU,CAAC,YAAY,EAAE,UAAU,GAAG,MAAM,EAAE,KAAK,CAAC,GACpD,UAAU,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM,EAAE,KAAK,CAAC,GACnD,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAEzC;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,2EAwCtB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ThemeProvider, ThemeSelector, ThemeToggle, getCurrentTheme, setTheme, getPreferredTheme, initializeTheme, toggleDarkMode } from './ThemeProvider';
|
|
2
|
+
export type { DaisyTheme, ThemeConfig, ThemeProviderProps, ThemeSelectorProps, ThemeToggleProps } from './ThemeProvider';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EACb,aAAa,EACb,WAAW,EACX,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,cAAc,EACjB,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACR,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EACnB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as getPreferredTheme, c as toggleDarkMode, i as getCurrentTheme, n as ThemeSelector, o as initializeTheme, r as ThemeToggle, s as setTheme, t as ThemeProvider } from "../theme-D9CUMvuT.js";
|
|
2
|
+
export { ThemeProvider, ThemeSelector, ThemeToggle, getCurrentTheme, getPreferredTheme, initializeTheme, setTheme, toggleDarkMode };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { component, signal } from "sigx";
|
|
2
|
+
import { jsx } from "sigx/jsx-runtime";
|
|
3
|
+
function getCurrentTheme() {
|
|
4
|
+
if (typeof document === "undefined") return null;
|
|
5
|
+
return document.documentElement.getAttribute("data-theme");
|
|
6
|
+
}
|
|
7
|
+
function setTheme(theme) {
|
|
8
|
+
if (typeof document === "undefined") return;
|
|
9
|
+
document.documentElement.setAttribute("data-theme", theme);
|
|
10
|
+
if (typeof localStorage !== "undefined") localStorage.setItem("daisy-theme", theme);
|
|
11
|
+
}
|
|
12
|
+
function getPreferredTheme(defaultTheme = "light") {
|
|
13
|
+
if (typeof window === "undefined") return defaultTheme;
|
|
14
|
+
const stored = localStorage.getItem("daisy-theme");
|
|
15
|
+
if (stored) return stored;
|
|
16
|
+
if (window.matchMedia?.("(prefers-color-scheme: dark)").matches) return "dark";
|
|
17
|
+
return defaultTheme;
|
|
18
|
+
}
|
|
19
|
+
function initializeTheme(config) {
|
|
20
|
+
setTheme(getPreferredTheme(config?.defaultTheme));
|
|
21
|
+
if (config?.darkMode && typeof window !== "undefined") window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (e) => {
|
|
22
|
+
if (!localStorage.getItem("daisy-theme")) setTheme(e.matches ? "dark" : config.defaultTheme ?? "light");
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function toggleDarkMode(lightTheme = "light", darkTheme = "dark") {
|
|
26
|
+
setTheme(getCurrentTheme() === darkTheme ? lightTheme : darkTheme);
|
|
27
|
+
}
|
|
28
|
+
const ThemeProvider = component(({ props, slots }) => {
|
|
29
|
+
if (typeof document !== "undefined") {
|
|
30
|
+
setTheme(props.theme ?? getPreferredTheme(props.defaultTheme));
|
|
31
|
+
if (props.darkMode && typeof window !== "undefined") window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (e) => {
|
|
32
|
+
if (!localStorage.getItem("daisy-theme")) setTheme(e.matches ? "dark" : props.defaultTheme ?? "light");
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return () => /* @__PURE__ */ jsx("div", {
|
|
36
|
+
class: props.class,
|
|
37
|
+
children: slots.default?.()
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
var defaultThemes = [
|
|
41
|
+
"light",
|
|
42
|
+
"dark",
|
|
43
|
+
"cupcake",
|
|
44
|
+
"bumblebee",
|
|
45
|
+
"emerald",
|
|
46
|
+
"corporate",
|
|
47
|
+
"synthwave",
|
|
48
|
+
"retro",
|
|
49
|
+
"cyberpunk",
|
|
50
|
+
"valentine",
|
|
51
|
+
"halloween",
|
|
52
|
+
"garden",
|
|
53
|
+
"forest",
|
|
54
|
+
"aqua",
|
|
55
|
+
"lofi",
|
|
56
|
+
"pastel",
|
|
57
|
+
"fantasy",
|
|
58
|
+
"wireframe",
|
|
59
|
+
"black",
|
|
60
|
+
"luxury",
|
|
61
|
+
"dracula",
|
|
62
|
+
"cmyk",
|
|
63
|
+
"autumn",
|
|
64
|
+
"business",
|
|
65
|
+
"acid",
|
|
66
|
+
"lemonade",
|
|
67
|
+
"night",
|
|
68
|
+
"coffee",
|
|
69
|
+
"winter",
|
|
70
|
+
"dim",
|
|
71
|
+
"nord",
|
|
72
|
+
"sunset"
|
|
73
|
+
];
|
|
74
|
+
const ThemeSelector = component(({ props }) => {
|
|
75
|
+
const themes = () => props.themes ?? defaultThemes;
|
|
76
|
+
const handleChange = (e) => {
|
|
77
|
+
const select = e.target;
|
|
78
|
+
setTheme(select.value);
|
|
79
|
+
};
|
|
80
|
+
const capitalize = (s) => s.charAt(0).toUpperCase() + s.slice(1);
|
|
81
|
+
return () => /* @__PURE__ */ jsx("select", {
|
|
82
|
+
class: `select select-bordered ${props.class ?? ""}`,
|
|
83
|
+
onChange: handleChange,
|
|
84
|
+
value: getCurrentTheme() ?? "light",
|
|
85
|
+
children: themes().map((theme) => /* @__PURE__ */ jsx("option", {
|
|
86
|
+
value: theme,
|
|
87
|
+
children: capitalize(theme)
|
|
88
|
+
}))
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
const ThemeToggle = component(({ props }) => {
|
|
92
|
+
const lightTheme = () => props.lightTheme ?? "light";
|
|
93
|
+
const darkTheme = () => props.darkTheme ?? "dark";
|
|
94
|
+
const isDark = signal(getCurrentTheme() === (props.darkTheme ?? "dark"));
|
|
95
|
+
const handleToggle = () => {
|
|
96
|
+
toggleDarkMode(lightTheme(), darkTheme());
|
|
97
|
+
isDark.value = getCurrentTheme() === darkTheme();
|
|
98
|
+
};
|
|
99
|
+
return () => /* @__PURE__ */ jsx("button", {
|
|
100
|
+
class: props.class ?? "btn btn-ghost btn-circle text-base-content",
|
|
101
|
+
onClick: handleToggle,
|
|
102
|
+
"aria-label": "Toggle theme",
|
|
103
|
+
children: isDark.value ? /* @__PURE__ */ jsx("svg", {
|
|
104
|
+
class: "w-6 h-6",
|
|
105
|
+
fill: "currentColor",
|
|
106
|
+
viewBox: "0 0 24 24",
|
|
107
|
+
children: /* @__PURE__ */ jsx("path", { d: "M5.64,17l-.71.71a1,1,0,0,0,0,1.41,1,1,0,0,0,1.41,0l.71-.71A1,1,0,0,0,5.64,17ZM5,12a1,1,0,0,0-1-1H3a1,1,0,0,0,0,2H4A1,1,0,0,0,5,12Zm7-7a1,1,0,0,0,1-1V3a1,1,0,0,0-2,0V4A1,1,0,0,0,12,5ZM5.64,7.05a1,1,0,0,0,.7.29,1,1,0,0,0,.71-.29,1,1,0,0,0,0-1.41l-.71-.71A1,1,0,0,0,4.93,6.34Zm12,.29a1,1,0,0,0,.7-.29l.71-.71a1,1,0,1,0-1.41-1.41L17,5.64a1,1,0,0,0,0,1.41A1,1,0,0,0,17.66,7.34ZM21,11H20a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Zm-9,8a1,1,0,0,0-1,1v1a1,1,0,0,0,2,0V20A1,1,0,0,0,12,19ZM18.36,17A1,1,0,0,0,17,18.36l.71.71a1,1,0,0,0,1.41,0,1,1,0,0,0,0-1.41ZM12,6.5A5.5,5.5,0,1,0,17.5,12,5.51,5.51,0,0,0,12,6.5Zm0,9A3.5,3.5,0,1,1,15.5,12,3.5,3.5,0,0,1,12,15.5Z" })
|
|
108
|
+
}) : /* @__PURE__ */ jsx("svg", {
|
|
109
|
+
class: "w-6 h-6",
|
|
110
|
+
fill: "currentColor",
|
|
111
|
+
viewBox: "0 0 24 24",
|
|
112
|
+
children: /* @__PURE__ */ jsx("path", { d: "M21.64,13a1,1,0,0,0-1.05-.14,8.05,8.05,0,0,1-3.37.73A8.15,8.15,0,0,1,9.08,5.49a8.59,8.59,0,0,1,.25-2A1,1,0,0,0,8,2.36,10.14,10.14,0,1,0,22,14.05,1,1,0,0,0,21.64,13Zm-9.5,6.69A8.14,8.14,0,0,1,7.08,5.22v.27A10.15,10.15,0,0,0,17.22,15.63a9.79,9.79,0,0,0,2.1-.22A8.11,8.11,0,0,1,12.14,19.73Z" })
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
export { getPreferredTheme as a, toggleDarkMode as c, getCurrentTheme as i, ThemeSelector as n, initializeTheme as o, ThemeToggle as r, setTheme as s, ThemeProvider as t };
|
|
117
|
+
|
|
118
|
+
//# sourceMappingURL=theme-D9CUMvuT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-D9CUMvuT.js","names":[],"sources":["../src/theme/ThemeProvider.tsx"],"sourcesContent":["import { component, DefineProp, DefineSlot, signal } from 'sigx';\r\n\r\n/**\r\n * Built-in DaisyUI themes\r\n */\r\nexport type DaisyTheme = \r\n // Light themes\r\n | 'light'\r\n | 'cupcake'\r\n | 'bumblebee'\r\n | 'emerald'\r\n | 'corporate'\r\n | 'retro'\r\n | 'cyberpunk'\r\n | 'valentine'\r\n | 'garden'\r\n | 'lofi'\r\n | 'pastel'\r\n | 'fantasy'\r\n | 'wireframe'\r\n | 'cmyk'\r\n | 'autumn'\r\n | 'acid'\r\n | 'lemonade'\r\n | 'winter'\r\n | 'nord'\r\n // Dark themes\r\n | 'dark'\r\n | 'synthwave'\r\n | 'halloween'\r\n | 'forest'\r\n | 'aqua'\r\n | 'black'\r\n | 'luxury'\r\n | 'dracula'\r\n | 'business'\r\n | 'night'\r\n | 'coffee'\r\n | 'dim'\r\n | 'sunset';\r\n\r\n/**\r\n * Theme configuration options\r\n */\r\nexport interface ThemeConfig {\r\n /** Default theme to use */\r\n defaultTheme?: DaisyTheme | string;\r\n /** List of themes to include (for custom CSS generation) */\r\n themes?: (DaisyTheme | string)[];\r\n /** Whether to enable dark mode detection */\r\n darkMode?: boolean;\r\n /** Custom theme definitions */\r\n customThemes?: Record<string, Record<string, string>>;\r\n}\r\n\r\n/**\r\n * Get the current theme from the document\r\n */\r\nexport function getCurrentTheme(): string | null {\r\n if (typeof document === 'undefined') return null;\r\n return document.documentElement.getAttribute('data-theme');\r\n}\r\n\r\n/**\r\n * Set the theme on the document\r\n */\r\nexport function setTheme(theme: DaisyTheme | string): void {\r\n if (typeof document === 'undefined') return;\r\n document.documentElement.setAttribute('data-theme', theme);\r\n \r\n // Persist to localStorage\r\n if (typeof localStorage !== 'undefined') {\r\n localStorage.setItem('daisy-theme', theme);\r\n }\r\n}\r\n\r\n/**\r\n * Get the preferred theme from localStorage or system preference\r\n */\r\nexport function getPreferredTheme(defaultTheme: DaisyTheme | string = 'light'): DaisyTheme | string {\r\n if (typeof window === 'undefined') return defaultTheme;\r\n \r\n // Check localStorage first\r\n const stored = localStorage.getItem('daisy-theme');\r\n if (stored) return stored;\r\n \r\n // Check system preference\r\n if (window.matchMedia?.('(prefers-color-scheme: dark)').matches) {\r\n return 'dark';\r\n }\r\n \r\n return defaultTheme;\r\n}\r\n\r\n/**\r\n * Initialize theme based on user preference or default\r\n */\r\nexport function initializeTheme(config?: ThemeConfig): void {\r\n const theme = getPreferredTheme(config?.defaultTheme);\r\n setTheme(theme);\r\n \r\n // Listen for system theme changes if darkMode is enabled\r\n if (config?.darkMode && typeof window !== 'undefined') {\r\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\r\n // Only auto-switch if user hasn't manually selected a theme\r\n const stored = localStorage.getItem('daisy-theme');\r\n if (!stored) {\r\n setTheme(e.matches ? 'dark' : (config.defaultTheme ?? 'light'));\r\n }\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Toggle between light and dark themes\r\n */\r\nexport function toggleDarkMode(lightTheme: DaisyTheme = 'light', darkTheme: DaisyTheme = 'dark'): void {\r\n const current = getCurrentTheme();\r\n setTheme(current === darkTheme ? lightTheme : darkTheme);\r\n}\r\n\r\n// ============================================\r\n// ThemeProvider Component\r\n// ============================================\r\n\r\nexport type ThemeProviderProps = \r\n & DefineProp<'theme', DaisyTheme | string, false>\r\n & DefineProp<'defaultTheme', DaisyTheme | string, false>\r\n & DefineProp<'darkMode', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\n/**\r\n * ThemeProvider component that wraps your app and manages theme state.\r\n * \r\n * @example\r\n * ```tsx\r\n * <ThemeProvider defaultTheme=\"cupcake\" darkMode>\r\n * <App />\r\n * </ThemeProvider>\r\n * ```\r\n */\r\nexport const ThemeProvider = component<ThemeProviderProps>(({ props, slots }) => {\r\n // Initialize theme on mount\r\n if (typeof document !== 'undefined') {\r\n const theme = props.theme ?? getPreferredTheme(props.defaultTheme);\r\n setTheme(theme);\r\n \r\n // Set up dark mode listener if enabled\r\n if (props.darkMode && typeof window !== 'undefined') {\r\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\r\n const stored = localStorage.getItem('daisy-theme');\r\n if (!stored) {\r\n setTheme(e.matches ? 'dark' : (props.defaultTheme ?? 'light'));\r\n }\r\n });\r\n }\r\n }\r\n\r\n return () => (\r\n <div class={props.class}>\r\n {slots.default?.()}\r\n </div>\r\n );\r\n});\r\n\r\n// ============================================\r\n// ThemeSelector Component\r\n// ============================================\r\n\r\nexport type ThemeSelectorProps = \r\n & DefineProp<'themes', (DaisyTheme | string)[], false>\r\n & DefineProp<'class', string, false>;\r\n\r\nconst defaultThemes: DaisyTheme[] = [\r\n 'light', 'dark', 'cupcake', 'bumblebee', 'emerald', 'corporate', \r\n 'synthwave', 'retro', 'cyberpunk', 'valentine', 'halloween', \r\n 'garden', 'forest', 'aqua', 'lofi', 'pastel', 'fantasy', \r\n 'wireframe', 'black', 'luxury', 'dracula', 'cmyk', 'autumn',\r\n 'business', 'acid', 'lemonade', 'night', 'coffee', 'winter',\r\n 'dim', 'nord', 'sunset'\r\n];\r\n\r\n/**\r\n * A dropdown selector for switching themes.\r\n * \r\n * @example\r\n * ```tsx\r\n * <ThemeSelector themes={['light', 'dark', 'cupcake', 'cyberpunk']} />\r\n * ```\r\n */\r\nexport const ThemeSelector = component<ThemeSelectorProps>(({ props }) => {\r\n const themes = () => props.themes ?? defaultThemes;\r\n \r\n const handleChange = (e: Event) => {\r\n const select = e.target as HTMLSelectElement;\r\n setTheme(select.value);\r\n };\r\n\r\n const capitalize = (s: string) => s.charAt(0).toUpperCase() + s.slice(1);\r\n\r\n return () => (\r\n <select \r\n class={`select select-bordered ${props.class ?? ''}`}\r\n onChange={handleChange}\r\n value={getCurrentTheme() ?? 'light'}\r\n >\r\n {themes().map(theme => (\r\n <option value={theme}>{capitalize(theme)}</option>\r\n ))}\r\n </select>\r\n );\r\n});\r\n\r\n// ============================================\r\n// ThemeToggle Component (Light/Dark toggle)\r\n// ============================================\r\n\r\nexport type ThemeToggleProps = \r\n & DefineProp<'lightTheme', DaisyTheme | string, false>\r\n & DefineProp<'darkTheme', DaisyTheme | string, false>\r\n & DefineProp<'class', string, false>;\r\n\r\n/**\r\n * A toggle button for switching between light and dark themes.\r\n * \r\n * @example\r\n * ```tsx\r\n * <ThemeToggle lightTheme=\"light\" darkTheme=\"dark\" />\r\n * ```\r\n */\r\nexport const ThemeToggle = component<ThemeToggleProps>(({ props }) => {\r\n const lightTheme = () => props.lightTheme ?? 'light';\r\n const darkTheme = () => props.darkTheme ?? 'dark';\r\n \r\n // Use a signal to track theme state for reactivity\r\n const isDark = signal(getCurrentTheme() === (props.darkTheme ?? 'dark'));\r\n \r\n const handleToggle = () => {\r\n toggleDarkMode(lightTheme() as DaisyTheme, darkTheme() as DaisyTheme);\r\n // Update the signal to trigger re-render\r\n isDark.value = getCurrentTheme() === darkTheme();\r\n };\r\n\r\n return () => (\r\n <button \r\n class={props.class ?? 'btn btn-ghost btn-circle text-base-content'}\r\n onClick={handleToggle}\r\n aria-label=\"Toggle theme\"\r\n >\r\n {isDark.value ? (\r\n /* Sun icon - show in dark mode to switch to light */\r\n <svg \r\n class=\"w-6 h-6\" \r\n fill=\"currentColor\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path d=\"M5.64,17l-.71.71a1,1,0,0,0,0,1.41,1,1,0,0,0,1.41,0l.71-.71A1,1,0,0,0,5.64,17ZM5,12a1,1,0,0,0-1-1H3a1,1,0,0,0,0,2H4A1,1,0,0,0,5,12Zm7-7a1,1,0,0,0,1-1V3a1,1,0,0,0-2,0V4A1,1,0,0,0,12,5ZM5.64,7.05a1,1,0,0,0,.7.29,1,1,0,0,0,.71-.29,1,1,0,0,0,0-1.41l-.71-.71A1,1,0,0,0,4.93,6.34Zm12,.29a1,1,0,0,0,.7-.29l.71-.71a1,1,0,1,0-1.41-1.41L17,5.64a1,1,0,0,0,0,1.41A1,1,0,0,0,17.66,7.34ZM21,11H20a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Zm-9,8a1,1,0,0,0-1,1v1a1,1,0,0,0,2,0V20A1,1,0,0,0,12,19ZM18.36,17A1,1,0,0,0,17,18.36l.71.71a1,1,0,0,0,1.41,0,1,1,0,0,0,0-1.41ZM12,6.5A5.5,5.5,0,1,0,17.5,12,5.51,5.51,0,0,0,12,6.5Zm0,9A3.5,3.5,0,1,1,15.5,12,3.5,3.5,0,0,1,12,15.5Z\"/>\r\n </svg>\r\n ) : (\r\n /* Moon icon - show in light mode to switch to dark */\r\n <svg \r\n class=\"w-6 h-6\" \r\n fill=\"currentColor\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path d=\"M21.64,13a1,1,0,0,0-1.05-.14,8.05,8.05,0,0,1-3.37.73A8.15,8.15,0,0,1,9.08,5.49a8.59,8.59,0,0,1,.25-2A1,1,0,0,0,8,2.36,10.14,10.14,0,1,0,22,14.05,1,1,0,0,0,21.64,13Zm-9.5,6.69A8.14,8.14,0,0,1,7.08,5.22v.27A10.15,10.15,0,0,0,17.22,15.63a9.79,9.79,0,0,0,2.1-.22A8.11,8.11,0,0,1,12.14,19.73Z\"/>\r\n </svg>\r\n )}\r\n </button>\r\n );\r\n});\r\n"],"mappings":";;AA0DA,SAAgB,kBAAiC;AAC7C,KAAI,OAAO,aAAa,YAAa,QAAO;AAC5C,QAAO,SAAS,gBAAgB,aAAa,aAAa;;AAM9D,SAAgB,SAAS,OAAkC;AACvD,KAAI,OAAO,aAAa,YAAa;AACrC,UAAS,gBAAgB,aAAa,cAAc,MAAM;AAG1D,KAAI,OAAO,iBAAiB,YACxB,cAAa,QAAQ,eAAe,MAAM;;AAOlD,SAAgB,kBAAkB,eAAoC,SAA8B;AAChG,KAAI,OAAO,WAAW,YAAa,QAAO;CAG1C,MAAM,SAAS,aAAa,QAAQ,cAAc;AAClD,KAAI,OAAQ,QAAO;AAGnB,KAAI,OAAO,aAAa,+BAA+B,CAAC,QACpD,QAAO;AAGX,QAAO;;AAMX,SAAgB,gBAAgB,QAA4B;AAExD,UADc,kBAAkB,QAAQ,aAAa,CACtC;AAGf,KAAI,QAAQ,YAAY,OAAO,WAAW,YACtC,QAAO,WAAW,+BAA+B,CAAC,iBAAiB,WAAW,MAAM;AAGhF,MAAI,CADW,aAAa,QAAQ,cAAc,CAE9C,UAAS,EAAE,UAAU,SAAU,OAA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M,kBAAkB,MAAM,aAAa;CAG3C,MAAM,SAAS,OAAO,iBAAiB,MAAM,MAAM,aAAa,QAAQ;CAExE,MAAM,qBAAqB;AACvB,iBAAe,YAAY,EAAgB,WAAW,CAAe;AAErE,SAAO,QAAQ,iBAAiB,KAAK,WAAW;;AAGpD,cACI,oBAAC,UAAA;EACG,OAAO,MAAM,SAAS;EACtB,SAAS;EACT,cAAW;YAEV,OAAO,QAEJ,oBAAC,OAAA;GACG,OAAM;GACN,MAAK;GACL,SAAQ;aAER,oBAAC,QAAA,EAAK,GAAE,moBAAA,CAAmoB;IACzoB,GAGN,oBAAC,OAAA;GACG,OAAM;GACN,MAAK;GACL,SAAQ;aAER,oBAAC,QAAA,EAAK,GAAE,mSAAA,CAAmS;IACzS;GAEL;EAEf"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { DefineProp, DefineSlot } from 'sigx';
|
|
2
|
+
import { Spacing } from '../shared/styles';
|
|
3
|
+
export type TextSize = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';
|
|
4
|
+
export type TextWeight = 'thin' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold';
|
|
5
|
+
export type TextColor = 'base' | 'muted' | 'faint' | 'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error' | 'primary-content' | 'secondary-content' | 'accent-content' | 'neutral-content' | 'info-content' | 'success-content' | 'warning-content' | 'error-content';
|
|
6
|
+
export type TextAlign = 'left' | 'center' | 'right' | 'justify';
|
|
7
|
+
export type TextElement = 'span' | 'p' | 'div' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
8
|
+
export type TextProps = DefineProp<'as', TextElement, false> & DefineProp<'size', TextSize, false> & DefineProp<'weight', TextWeight, false> & DefineProp<'color', TextColor, false> & DefineProp<'align', TextAlign, false> & DefineProp<'italic', boolean, false> & DefineProp<'underline', boolean, false> & DefineProp<'lineThrough', boolean, false> & DefineProp<'uppercase', boolean, false> & DefineProp<'lowercase', boolean, false> & DefineProp<'capitalize', boolean, false> & DefineProp<'truncate', boolean | number, false> & DefineProp<'nowrap', boolean, false> & DefineProp<'margin', Spacing, false> & DefineProp<'class', string, false> & DefineSlot<'default'>;
|
|
9
|
+
/**
|
|
10
|
+
* Text component for typography with consistent styling.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* // Basic usage
|
|
15
|
+
* <Text>Default text</Text>
|
|
16
|
+
*
|
|
17
|
+
* // With size and weight
|
|
18
|
+
* <Text size="lg" weight="bold">Large bold text</Text>
|
|
19
|
+
*
|
|
20
|
+
* // With color
|
|
21
|
+
* <Text color="muted">Muted text</Text>
|
|
22
|
+
* <Text color="primary">Primary colored text</Text>
|
|
23
|
+
*
|
|
24
|
+
* // As different elements
|
|
25
|
+
* <Text as="h1" size="3xl" weight="bold">Heading</Text>
|
|
26
|
+
* <Text as="p" margin={{ bottom: "4" }}>Paragraph with margin</Text>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const Text: import("@sigx/runtime-core").ComponentFactory<TextProps, void, {
|
|
30
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
31
|
+
}>;
|
|
32
|
+
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
33
|
+
export type HeadingProps = DefineProp<'level', HeadingLevel, false> & DefineProp<'size', TextSize, false> & DefineProp<'weight', TextWeight, false> & DefineProp<'color', TextColor, false> & DefineProp<'align', TextAlign, false> & DefineProp<'margin', Spacing, false> & DefineProp<'class', string, false> & DefineSlot<'default'>;
|
|
34
|
+
/**
|
|
35
|
+
* Heading component for semantic headings with default sizes.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <Heading level={1}>Page Title</Heading>
|
|
40
|
+
* <Heading level={2}>Section Title</Heading>
|
|
41
|
+
* <Heading level={3} size="xl">Custom sized heading</Heading>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare const Heading: import("@sigx/runtime-core").ComponentFactory<HeadingProps, void, {
|
|
45
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
46
|
+
}>;
|
|
47
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/typography/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACzD,OAAO,EAAE,OAAO,EAAkB,MAAM,kBAAkB,CAAC;AAM3D,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAkB1F,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;AAgBpG,MAAM,MAAM,SAAS,GACf,MAAM,GAAG,OAAO,GAAG,OAAO,GAC1B,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAC9C,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GACxC,iBAAiB,GAAG,mBAAmB,GAAG,gBAAgB,GAAG,iBAAiB,GAC9E,cAAc,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,eAAe,CAAC;AA4B/E,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAahE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,GAAG,GAAG,KAAK,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI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,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,CAAC,GACvC,UAAU,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,GACrC,UAAU,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,GACrC,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,GACpC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,SAAS,CAAC,CAAC;AAW5B;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO;;EAoBlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/typography/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACvC,YAAY,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,YAAY,EACZ,YAAY,GACf,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { s as resolveSpacing } from "./styles-DFkMxi90.js";
|
|
2
|
+
import { component } from "sigx";
|
|
3
|
+
import { jsx } from "sigx/jsx-runtime";
|
|
4
|
+
var sizeClasses = {
|
|
5
|
+
"xs": "text-xs",
|
|
6
|
+
"sm": "text-sm",
|
|
7
|
+
"base": "text-base",
|
|
8
|
+
"lg": "text-lg",
|
|
9
|
+
"xl": "text-xl",
|
|
10
|
+
"2xl": "text-2xl",
|
|
11
|
+
"3xl": "text-3xl",
|
|
12
|
+
"4xl": "text-4xl",
|
|
13
|
+
"5xl": "text-5xl"
|
|
14
|
+
};
|
|
15
|
+
var weightClasses = {
|
|
16
|
+
"thin": "font-thin",
|
|
17
|
+
"light": "font-light",
|
|
18
|
+
"normal": "font-normal",
|
|
19
|
+
"medium": "font-medium",
|
|
20
|
+
"semibold": "font-semibold",
|
|
21
|
+
"bold": "font-bold",
|
|
22
|
+
"extrabold": "font-extrabold"
|
|
23
|
+
};
|
|
24
|
+
var colorClasses = {
|
|
25
|
+
"base": "text-base-content",
|
|
26
|
+
"muted": "text-base-content/60",
|
|
27
|
+
"faint": "text-base-content/40",
|
|
28
|
+
"primary": "text-primary",
|
|
29
|
+
"secondary": "text-secondary",
|
|
30
|
+
"accent": "text-accent",
|
|
31
|
+
"neutral": "text-neutral",
|
|
32
|
+
"info": "text-info",
|
|
33
|
+
"success": "text-success",
|
|
34
|
+
"warning": "text-warning",
|
|
35
|
+
"error": "text-error",
|
|
36
|
+
"primary-content": "text-primary-content",
|
|
37
|
+
"secondary-content": "text-secondary-content",
|
|
38
|
+
"accent-content": "text-accent-content",
|
|
39
|
+
"neutral-content": "text-neutral-content",
|
|
40
|
+
"info-content": "text-info-content",
|
|
41
|
+
"success-content": "text-success-content",
|
|
42
|
+
"warning-content": "text-warning-content",
|
|
43
|
+
"error-content": "text-error-content"
|
|
44
|
+
};
|
|
45
|
+
var alignClasses = {
|
|
46
|
+
"left": "text-left",
|
|
47
|
+
"center": "text-center",
|
|
48
|
+
"right": "text-right",
|
|
49
|
+
"justify": "text-justify"
|
|
50
|
+
};
|
|
51
|
+
const Text = component(({ props, slots }) => {
|
|
52
|
+
const getClasses = () => {
|
|
53
|
+
const classes = [];
|
|
54
|
+
if (props.size) classes.push(sizeClasses[props.size]);
|
|
55
|
+
if (props.weight) classes.push(weightClasses[props.weight]);
|
|
56
|
+
if (props.color) classes.push(colorClasses[props.color]);
|
|
57
|
+
if (props.align) classes.push(alignClasses[props.align]);
|
|
58
|
+
if (props.italic) classes.push("italic");
|
|
59
|
+
if (props.underline) classes.push("underline");
|
|
60
|
+
if (props.lineThrough) classes.push("line-through");
|
|
61
|
+
if (props.uppercase) classes.push("uppercase");
|
|
62
|
+
if (props.lowercase) classes.push("lowercase");
|
|
63
|
+
if (props.capitalize) classes.push("capitalize");
|
|
64
|
+
if (props.truncate === true || props.truncate === 1) classes.push("truncate");
|
|
65
|
+
else if (typeof props.truncate === "number" && props.truncate > 1) {
|
|
66
|
+
const clampClass = {
|
|
67
|
+
2: "line-clamp-2",
|
|
68
|
+
3: "line-clamp-3",
|
|
69
|
+
4: "line-clamp-4",
|
|
70
|
+
5: "line-clamp-5",
|
|
71
|
+
6: "line-clamp-6"
|
|
72
|
+
}[props.truncate];
|
|
73
|
+
if (clampClass) classes.push(clampClass);
|
|
74
|
+
}
|
|
75
|
+
if (props.nowrap) classes.push("whitespace-nowrap");
|
|
76
|
+
classes.push(...resolveSpacing(props.margin, "m"));
|
|
77
|
+
if (props.class) classes.push(props.class);
|
|
78
|
+
return classes.length > 0 ? classes.join(" ") : void 0;
|
|
79
|
+
};
|
|
80
|
+
return () => {
|
|
81
|
+
return /* @__PURE__ */ jsx(props.as ?? "span", {
|
|
82
|
+
class: getClasses(),
|
|
83
|
+
children: slots.default?.()
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
var defaultHeadingSizes = {
|
|
88
|
+
1: "4xl",
|
|
89
|
+
2: "3xl",
|
|
90
|
+
3: "2xl",
|
|
91
|
+
4: "xl",
|
|
92
|
+
5: "lg",
|
|
93
|
+
6: "base"
|
|
94
|
+
};
|
|
95
|
+
const Heading = component(({ props, slots }) => {
|
|
96
|
+
return () => {
|
|
97
|
+
const level = props.level ?? 2;
|
|
98
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
99
|
+
as: `h${level}`,
|
|
100
|
+
size: props.size ?? defaultHeadingSizes[level],
|
|
101
|
+
weight: props.weight ?? "bold",
|
|
102
|
+
color: props.color,
|
|
103
|
+
align: props.align,
|
|
104
|
+
margin: props.margin,
|
|
105
|
+
class: props.class,
|
|
106
|
+
children: slots.default?.()
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
});
|
|
110
|
+
export { Text as n, Heading as t };
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=typography-CU1RMGKA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography-CU1RMGKA.js","names":[],"sources":["../src/typography/Text.tsx"],"sourcesContent":["import { component, DefineProp, DefineSlot } from 'sigx';\r\nimport { Spacing, resolveSpacing } from '../shared/styles';\r\n\r\n// ============================================================================\r\n// Text Size\r\n// ============================================================================\r\n\r\nexport type TextSize = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';\r\n\r\nconst sizeClasses: Record<TextSize, string> = {\r\n 'xs': 'text-xs',\r\n 'sm': 'text-sm',\r\n 'base': 'text-base',\r\n 'lg': 'text-lg',\r\n 'xl': 'text-xl',\r\n '2xl': 'text-2xl',\r\n '3xl': 'text-3xl',\r\n '4xl': 'text-4xl',\r\n '5xl': 'text-5xl',\r\n};\r\n\r\n// ============================================================================\r\n// Text Weight\r\n// ============================================================================\r\n\r\nexport type TextWeight = 'thin' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold';\r\n\r\nconst weightClasses: Record<TextWeight, string> = {\r\n 'thin': 'font-thin',\r\n 'light': 'font-light',\r\n 'normal': 'font-normal',\r\n 'medium': 'font-medium',\r\n 'semibold': 'font-semibold',\r\n 'bold': 'font-bold',\r\n 'extrabold': 'font-extrabold',\r\n};\r\n\r\n// ============================================================================\r\n// Text Color\r\n// ============================================================================\r\n\r\nexport type TextColor = \r\n | 'base' | 'muted' | 'faint'\r\n | 'primary' | 'secondary' | 'accent' | 'neutral'\r\n | 'info' | 'success' | 'warning' | 'error'\r\n | 'primary-content' | 'secondary-content' | 'accent-content' | 'neutral-content'\r\n | 'info-content' | 'success-content' | 'warning-content' | 'error-content';\r\n\r\nconst colorClasses: Record<TextColor, string> = {\r\n 'base': 'text-base-content',\r\n 'muted': 'text-base-content/60',\r\n 'faint': 'text-base-content/40',\r\n 'primary': 'text-primary',\r\n 'secondary': 'text-secondary',\r\n 'accent': 'text-accent',\r\n 'neutral': 'text-neutral',\r\n 'info': 'text-info',\r\n 'success': 'text-success',\r\n 'warning': 'text-warning',\r\n 'error': 'text-error',\r\n 'primary-content': 'text-primary-content',\r\n 'secondary-content': 'text-secondary-content',\r\n 'accent-content': 'text-accent-content',\r\n 'neutral-content': 'text-neutral-content',\r\n 'info-content': 'text-info-content',\r\n 'success-content': 'text-success-content',\r\n 'warning-content': 'text-warning-content',\r\n 'error-content': 'text-error-content',\r\n};\r\n\r\n// ============================================================================\r\n// Text Align\r\n// ============================================================================\r\n\r\nexport type TextAlign = 'left' | 'center' | 'right' | 'justify';\r\n\r\nconst alignClasses: Record<TextAlign, string> = {\r\n 'left': 'text-left',\r\n 'center': 'text-center',\r\n 'right': 'text-right',\r\n 'justify': 'text-justify',\r\n};\r\n\r\n// ============================================================================\r\n// Text Element\r\n// ============================================================================\r\n\r\nexport type TextElement = 'span' | 'p' | 'div' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\r\n\r\n// ============================================================================\r\n// Text Props\r\n// ============================================================================\r\n\r\nexport type TextProps = \r\n & DefineProp<'as', TextElement, false>\r\n & DefineProp<'size', TextSize, false>\r\n & DefineProp<'weight', TextWeight, false>\r\n & DefineProp<'color', TextColor, false>\r\n & DefineProp<'align', TextAlign, false>\r\n & DefineProp<'italic', boolean, false>\r\n & DefineProp<'underline', boolean, false>\r\n & DefineProp<'lineThrough', boolean, false>\r\n & DefineProp<'uppercase', boolean, false>\r\n & DefineProp<'lowercase', boolean, false>\r\n & DefineProp<'capitalize', boolean, false>\r\n & DefineProp<'truncate', boolean | number, false>\r\n & DefineProp<'nowrap', boolean, false>\r\n & DefineProp<'margin', Spacing, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\n/**\r\n * Text component for typography with consistent styling.\r\n * \r\n * @example\r\n * ```tsx\r\n * // Basic usage\r\n * <Text>Default text</Text>\r\n * \r\n * // With size and weight\r\n * <Text size=\"lg\" weight=\"bold\">Large bold text</Text>\r\n * \r\n * // With color\r\n * <Text color=\"muted\">Muted text</Text>\r\n * <Text color=\"primary\">Primary colored text</Text>\r\n * \r\n * // As different elements\r\n * <Text as=\"h1\" size=\"3xl\" weight=\"bold\">Heading</Text>\r\n * <Text as=\"p\" margin={{ bottom: \"4\" }}>Paragraph with margin</Text>\r\n * ```\r\n */\r\nexport const Text = component<TextProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes: string[] = [];\r\n \r\n // Size\r\n if (props.size) {\r\n classes.push(sizeClasses[props.size]);\r\n }\r\n \r\n // Weight\r\n if (props.weight) {\r\n classes.push(weightClasses[props.weight]);\r\n }\r\n \r\n // Color\r\n if (props.color) {\r\n classes.push(colorClasses[props.color]);\r\n }\r\n \r\n // Align\r\n if (props.align) {\r\n classes.push(alignClasses[props.align]);\r\n }\r\n \r\n // Style modifiers\r\n if (props.italic) classes.push('italic');\r\n if (props.underline) classes.push('underline');\r\n if (props.lineThrough) classes.push('line-through');\r\n if (props.uppercase) classes.push('uppercase');\r\n if (props.lowercase) classes.push('lowercase');\r\n if (props.capitalize) classes.push('capitalize');\r\n \r\n // Truncation - single line or multi-line\r\n if (props.truncate === true || props.truncate === 1) {\r\n classes.push('truncate');\r\n } else if (typeof props.truncate === 'number' && props.truncate > 1) {\r\n // Use explicit class names to avoid Tailwind purging\r\n const lineClampClasses: Record<number, string> = {\r\n 2: 'line-clamp-2',\r\n 3: 'line-clamp-3',\r\n 4: 'line-clamp-4',\r\n 5: 'line-clamp-5',\r\n 6: 'line-clamp-6',\r\n };\r\n const clampClass = lineClampClasses[props.truncate];\r\n if (clampClass) {\r\n classes.push(clampClass);\r\n }\r\n }\r\n \r\n if (props.nowrap) classes.push('whitespace-nowrap');\r\n \r\n // Margin\r\n classes.push(...resolveSpacing(props.margin, 'm'));\r\n \r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.length > 0 ? classes.join(' ') : undefined;\r\n };\r\n\r\n return () => {\r\n const Tag = props.as ?? 'span';\r\n const className = getClasses();\r\n \r\n return (\r\n <Tag class={className}>\r\n {slots.default?.()}\r\n </Tag>\r\n );\r\n };\r\n});\r\n\r\n// ============================================================================\r\n// Heading Component (convenience wrapper)\r\n// ============================================================================\r\n\r\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\r\n\r\nexport type HeadingProps = \r\n & DefineProp<'level', HeadingLevel, false>\r\n & DefineProp<'size', TextSize, false>\r\n & DefineProp<'weight', TextWeight, false>\r\n & DefineProp<'color', TextColor, false>\r\n & DefineProp<'align', TextAlign, false>\r\n & DefineProp<'margin', Spacing, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\nconst defaultHeadingSizes: Record<HeadingLevel, TextSize> = {\r\n 1: '4xl',\r\n 2: '3xl',\r\n 3: '2xl',\r\n 4: 'xl',\r\n 5: 'lg',\r\n 6: 'base',\r\n};\r\n\r\n/**\r\n * Heading component for semantic headings with default sizes.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Heading level={1}>Page Title</Heading>\r\n * <Heading level={2}>Section Title</Heading>\r\n * <Heading level={3} size=\"xl\">Custom sized heading</Heading>\r\n * ```\r\n */\r\nexport const Heading = component<HeadingProps>(({ props, slots }) => {\r\n return () => {\r\n const level = props.level ?? 2;\r\n const tag = `h${level}` as TextElement;\r\n const size = props.size ?? defaultHeadingSizes[level];\r\n \r\n return (\r\n <Text \r\n as={tag}\r\n size={size}\r\n weight={props.weight ?? 'bold'}\r\n color={props.color}\r\n align={props.align}\r\n margin={props.margin}\r\n class={props.class}\r\n >\r\n {slots.default?.()}\r\n </Text>\r\n );\r\n };\r\n});\r\n"],"mappings":";;;AASA,IAAM,cAAwC;CAC1C,MAAM;CACN,MAAM;CACN,QAAQ;CACR,MAAM;CACN,MAAM;CACN,OAAO;CACP,OAAO;CACP,OAAO;CACP,OAAO;CACV;AAQD,IAAM,gBAA4C;CAC9C,QAAQ;CACR,SAAS;CACT,UAAU;CACV,UAAU;CACV,YAAY;CACZ,QAAQ;CACR,aAAa;CAChB;AAaD,IAAM,eAA0C;CAC5C,Q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AAI,CAAC;AAElD,MAAI,MAAM,MAAO,SAAQ,KAAK,MAAM,MAAM;AAE1C,SAAO,QAAQ,SAAS,IAAI,QAAQ,KAAK,IAAI,GAAG,KAAA;;AAGpD,cAAa;AAIT,SACI,oBAJQ,MAAM,MAAM,QAInB;GAAI,OAHS,YAAY;aAIrB,MAAM,WAAW;IAChB;;EAGhB;AAkBF,IAAM,sBAAsD;CACxD,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACN;AAYD,MAAa,UAAU,WAAyB,EAAE,OAAO,YAAY;AACjE,cAAa;EACT,MAAM,QAAQ,MAAM,SAAS;AAI7B,SACI,oBAAC,MAAA;GACG,IALI,IAAI;GAMF,MALD,MAAM,QAAQ,oBAAoB;GAMvC,QAAQ,MAAM,UAAU;GACxB,OAAO,MAAM;GACb,OAAO,MAAM;GACb,QAAQ,MAAM;GACd,OAAO,MAAM;aAEZ,MAAM,WAAW;IACf;;EAGjB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sigx/daisyui",
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"description": "DaisyUI component library for SignalX - Beautiful, accessible UI components with full theme support",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./theme": {
|
|
14
|
+
"import": "./dist/theme/index.js",
|
|
15
|
+
"types": "./dist/theme/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./buttons": {
|
|
18
|
+
"import": "./dist/buttons/index.js",
|
|
19
|
+
"types": "./dist/buttons/index.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./forms": {
|
|
22
|
+
"import": "./dist/forms/index.js",
|
|
23
|
+
"types": "./dist/forms/index.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./layout": {
|
|
26
|
+
"import": "./dist/layout/index.js",
|
|
27
|
+
"types": "./dist/layout/index.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./feedback": {
|
|
30
|
+
"import": "./dist/feedback/index.js",
|
|
31
|
+
"types": "./dist/feedback/index.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./navigation": {
|
|
34
|
+
"import": "./dist/navigation/index.js",
|
|
35
|
+
"types": "./dist/navigation/index.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./data": {
|
|
38
|
+
"import": "./dist/data/index.js",
|
|
39
|
+
"types": "./dist/data/index.d.ts"
|
|
40
|
+
},
|
|
41
|
+
"./typography": {
|
|
42
|
+
"import": "./dist/typography/index.js",
|
|
43
|
+
"types": "./dist/typography/index.d.ts"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"dist"
|
|
48
|
+
],
|
|
49
|
+
"keywords": [
|
|
50
|
+
"SignalX",
|
|
51
|
+
"daisyui",
|
|
52
|
+
"components",
|
|
53
|
+
"ui",
|
|
54
|
+
"tailwindcss"
|
|
55
|
+
],
|
|
56
|
+
"author": "Andreas Ekdahl",
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "git+https://github.com/signalxjs/core.git",
|
|
61
|
+
"directory": "packages/daisyui"
|
|
62
|
+
},
|
|
63
|
+
"homepage": "https://github.com/signalxjs",
|
|
64
|
+
"bugs": {
|
|
65
|
+
"url": "https://github.com/signalxjs/core/issues"
|
|
66
|
+
},
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"sigx": ">=0.1.0",
|
|
69
|
+
"daisyui": ">=5.0.0",
|
|
70
|
+
"tailwindcss": ">=4.0.0"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"@sigx/reactivity": "^0.1.6",
|
|
74
|
+
"@sigx/runtime-dom": "^0.1.6",
|
|
75
|
+
"@sigx/runtime-core": "^0.1.6"
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"typescript": "^5.9.3",
|
|
79
|
+
"vite": "^8.0.0-beta.9",
|
|
80
|
+
"@sigx/vite": "^0.1.6",
|
|
81
|
+
"sigx": "^0.1.6"
|
|
82
|
+
},
|
|
83
|
+
"scripts": {
|
|
84
|
+
"build": "vite build && tsc --emitDeclarationOnly",
|
|
85
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
86
|
+
"dev": "vite build --watch"
|
|
87
|
+
}
|
|
88
|
+
}
|