@macolmenerori/component-library 1.3.1 → 1.4.0-beta.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/dist/MarkdownRender-CKB5xnfI.cjs +2 -0
- package/dist/MarkdownRender-CKB5xnfI.cjs.map +1 -0
- package/dist/MarkdownRender-c_W7bXpS.js +44 -0
- package/dist/MarkdownRender-c_W7bXpS.js.map +1 -0
- package/dist/MonthlyCalendar-BflN-u8m.js +95 -0
- package/dist/MonthlyCalendar-BflN-u8m.js.map +1 -0
- package/dist/MonthlyCalendar-DDXHhlwC.cjs +2 -0
- package/dist/MonthlyCalendar-DDXHhlwC.cjs.map +1 -0
- package/dist/ThemeSwitch-C648hdUm.js +110 -0
- package/dist/ThemeSwitch-C648hdUm.js.map +1 -0
- package/dist/ThemeSwitch-Cn7-KsSv.cjs +2 -0
- package/dist/ThemeSwitch-Cn7-KsSv.cjs.map +1 -0
- package/dist/ThemeSwitch.css +1 -1
- package/dist/chunk-Bmb41Sf3.cjs +1 -0
- package/dist/index.cjs +1 -2
- package/dist/index.js +4 -9
- package/dist/markdown-render.cjs +1 -2
- package/dist/markdown-render.js +2 -5
- package/dist/monthly-calendar.cjs +1 -2
- package/dist/monthly-calendar.js +2 -5
- package/dist/theme-switch-css.d.ts +1 -0
- package/dist/theme-switch.cjs +1 -2
- package/dist/theme-switch.js +2 -5
- package/package.json +18 -9
- package/dist/MarkdownRender-BOGosy9w.cjs +0 -2
- package/dist/MarkdownRender-BOGosy9w.cjs.map +0 -1
- package/dist/MarkdownRender-BmrS3q0l.js +0 -37
- package/dist/MarkdownRender-BmrS3q0l.js.map +0 -1
- package/dist/MonthlyCalendar-D-tD_2xK.cjs +0 -2
- package/dist/MonthlyCalendar-D-tD_2xK.cjs.map +0 -1
- package/dist/MonthlyCalendar-D9jC2b2L.js +0 -116
- package/dist/MonthlyCalendar-D9jC2b2L.js.map +0 -1
- package/dist/ThemeSwitch-C7k1_MA4.cjs +0 -2
- package/dist/ThemeSwitch-C7k1_MA4.cjs.map +0 -1
- package/dist/ThemeSwitch-DbaEio36.js +0 -104
- package/dist/ThemeSwitch-DbaEio36.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/markdown-render.cjs.map +0 -1
- package/dist/markdown-render.js.map +0 -1
- package/dist/monthly-calendar.cjs.map +0 -1
- package/dist/monthly-calendar.js.map +0 -1
- package/dist/theme-switch.cjs.map +0 -1
- package/dist/theme-switch.js.map +0 -1
- /package/dist/types/{components → src/components}/MarkdownRender/MarkdownRender.d.ts +0 -0
- /package/dist/types/{components → src/components}/MarkdownRender/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/MonthlyCalendar/MonthlyCalendar.d.ts +0 -0
- /package/dist/types/{components → src/components}/MonthlyCalendar/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/ThemeSwitch/ThemeSwitch.d.ts +0 -0
- /package/dist/types/{components → src/components}/ThemeSwitch/index.d.ts +0 -0
- /package/dist/types/{index.d.ts → src/index.d.ts} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react`),n=require(`react-markdown`);n=e.t(n);let r=require(`remark-gfm`);r=e.t(r);let i=require(`react/jsx-runtime`);var a=({content:e,className:a,components:o,linkTarget:s,responsiveImages:c,rehypePlugins:l})=>{let u=(0,t.useMemo)(()=>{let e={};return s&&!o?.a&&(e.a=({children:e,...t})=>(0,i.jsx)(`a`,{...t,target:s,rel:s===`_blank`?`noreferrer`:void 0,children:e})),c&&!o?.img&&(e.img=({alt:e,...t})=>(0,i.jsx)(`img`,{alt:e??``,...t,style:{maxWidth:`100%`,height:`auto`,...t.style}})),{...e,...o}},[o,s,c]),d=Object.keys(u).length>0;return(0,i.jsx)(`div`,{className:a,children:(0,i.jsx)(n.default,{remarkPlugins:[r.default],rehypePlugins:l,components:d?u:void 0,children:e})})};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
2
|
+
//# sourceMappingURL=MarkdownRender-CKB5xnfI.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRender-CKB5xnfI.cjs","names":[],"sources":["../src/components/MarkdownRender/MarkdownRender.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport ReactMarkdown, { type Components, type Options } from 'react-markdown';\n\nimport remarkGfm from 'remark-gfm';\n\nexport interface MarkdownProps {\n /** The markdown string to render */\n content: string;\n /** Optional CSS class name for the container */\n className?: string;\n /** Custom component overrides for markdown elements */\n components?: Partial<Components>;\n /** Target for all links (defaults to '_self') */\n linkTarget?: '_blank' | '_self' | '_parent' | '_top';\n /** Make all images responsive (defaults to false) */\n responsiveImages?: boolean;\n /** Optional rehype plugins for HTML processing */\n rehypePlugins?: Options['rehypePlugins'];\n}\n\n/**\n * A component that renders a markdown string as HTML.\n * Supports GitHub Flavored Markdown (GFM) including tables,\n * strikethrough, task lists, and autolinks.\n */\nconst MarkdownRender: React.FC<MarkdownProps> = ({\n content,\n className,\n components,\n linkTarget,\n responsiveImages,\n rehypePlugins\n}) => {\n const mergedComponents = useMemo(() => {\n const generated: Partial<Components> = {};\n\n // Auto-generate link component if linkTarget is set and no custom 'a' provided\n if (linkTarget && !components?.a) {\n generated.a = ({ children, ...props }) => (\n <a {...props} target={linkTarget} rel={linkTarget === '_blank' ? 'noreferrer' : undefined}>\n {children}\n </a>\n );\n }\n\n // Auto-generate image component if responsiveImages and no custom 'img' provided\n if (responsiveImages && !components?.img) {\n generated.img = ({ alt, ...props }) => (\n <img\n alt={alt ?? ''}\n {...props}\n style={{ maxWidth: '100%', height: 'auto', ...props.style }}\n />\n );\n }\n\n // User-provided components override auto-generated ones\n return { ...generated, ...components };\n }, [components, linkTarget, responsiveImages]);\n\n const hasComponents = Object.keys(mergedComponents).length > 0;\n\n return (\n <div className={className}>\n <ReactMarkdown\n remarkPlugins={[remarkGfm]}\n rehypePlugins={rehypePlugins}\n components={hasComponents ? mergedComponents : undefined}\n >\n {content}\n </ReactMarkdown>\n </div>\n );\n};\n\nexport default MarkdownRender;\n"],"mappings":"4KAyBA,IAAM,GAA2C,CAC/C,UACA,YACA,aACA,aACA,mBACA,mBACI,CACJ,IAAM,GAAA,EAAA,EAAA,aAAiC,CACrC,IAAM,EAAiC,EAAE,CAuBzC,OApBI,GAAc,CAAC,GAAY,IAC7B,EAAU,GAAK,CAAE,WAAU,GAAG,MAC5B,EAAA,EAAA,KAAC,IAAD,CAAG,GAAI,EAAO,OAAQ,EAAY,IAAK,IAAe,SAAW,aAAe,IAAA,GAC7E,WACC,CAAA,EAKJ,GAAoB,CAAC,GAAY,MACnC,EAAU,KAAO,CAAE,MAAK,GAAG,MACzB,EAAA,EAAA,KAAC,MAAD,CACE,IAAK,GAAO,GACZ,GAAI,EACJ,MAAO,CAAE,SAAU,OAAQ,OAAQ,OAAQ,GAAG,EAAM,MAAO,CAC3D,CAAA,EAKC,CAAE,GAAG,EAAW,GAAG,EAAY,EACrC,CAAC,EAAY,EAAY,EAAiB,CAAC,CAExC,EAAgB,OAAO,KAAK,EAAiB,CAAC,OAAS,EAE7D,OACE,EAAA,EAAA,KAAC,MAAD,CAAgB,sBACd,EAAA,EAAA,KAAC,EAAA,QAAD,CACE,cAAe,CAAC,EAAA,QAAU,CACX,gBACf,WAAY,EAAgB,EAAmB,IAAA,YAE9C,EACa,CAAA,CACZ,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useMemo as e } from "react";
|
|
2
|
+
import t from "react-markdown";
|
|
3
|
+
import n from "remark-gfm";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/MarkdownRender/MarkdownRender.tsx
|
|
6
|
+
var i = ({ content: i, className: a, components: o, linkTarget: s, responsiveImages: c, rehypePlugins: l }) => {
|
|
7
|
+
let u = e(() => {
|
|
8
|
+
let e = {};
|
|
9
|
+
return s && !o?.a && (e.a = ({ children: e, ...t }) => /* @__PURE__ */ r("a", {
|
|
10
|
+
...t,
|
|
11
|
+
target: s,
|
|
12
|
+
rel: s === "_blank" ? "noreferrer" : void 0,
|
|
13
|
+
children: e
|
|
14
|
+
})), c && !o?.img && (e.img = ({ alt: e, ...t }) => /* @__PURE__ */ r("img", {
|
|
15
|
+
alt: e ?? "",
|
|
16
|
+
...t,
|
|
17
|
+
style: {
|
|
18
|
+
maxWidth: "100%",
|
|
19
|
+
height: "auto",
|
|
20
|
+
...t.style
|
|
21
|
+
}
|
|
22
|
+
})), {
|
|
23
|
+
...e,
|
|
24
|
+
...o
|
|
25
|
+
};
|
|
26
|
+
}, [
|
|
27
|
+
o,
|
|
28
|
+
s,
|
|
29
|
+
c
|
|
30
|
+
]), d = Object.keys(u).length > 0;
|
|
31
|
+
return /* @__PURE__ */ r("div", {
|
|
32
|
+
className: a,
|
|
33
|
+
children: /* @__PURE__ */ r(t, {
|
|
34
|
+
remarkPlugins: [n],
|
|
35
|
+
rehypePlugins: l,
|
|
36
|
+
components: d ? u : void 0,
|
|
37
|
+
children: i
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { i as t };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=MarkdownRender-c_W7bXpS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRender-c_W7bXpS.js","names":[],"sources":["../src/components/MarkdownRender/MarkdownRender.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport ReactMarkdown, { type Components, type Options } from 'react-markdown';\n\nimport remarkGfm from 'remark-gfm';\n\nexport interface MarkdownProps {\n /** The markdown string to render */\n content: string;\n /** Optional CSS class name for the container */\n className?: string;\n /** Custom component overrides for markdown elements */\n components?: Partial<Components>;\n /** Target for all links (defaults to '_self') */\n linkTarget?: '_blank' | '_self' | '_parent' | '_top';\n /** Make all images responsive (defaults to false) */\n responsiveImages?: boolean;\n /** Optional rehype plugins for HTML processing */\n rehypePlugins?: Options['rehypePlugins'];\n}\n\n/**\n * A component that renders a markdown string as HTML.\n * Supports GitHub Flavored Markdown (GFM) including tables,\n * strikethrough, task lists, and autolinks.\n */\nconst MarkdownRender: React.FC<MarkdownProps> = ({\n content,\n className,\n components,\n linkTarget,\n responsiveImages,\n rehypePlugins\n}) => {\n const mergedComponents = useMemo(() => {\n const generated: Partial<Components> = {};\n\n // Auto-generate link component if linkTarget is set and no custom 'a' provided\n if (linkTarget && !components?.a) {\n generated.a = ({ children, ...props }) => (\n <a {...props} target={linkTarget} rel={linkTarget === '_blank' ? 'noreferrer' : undefined}>\n {children}\n </a>\n );\n }\n\n // Auto-generate image component if responsiveImages and no custom 'img' provided\n if (responsiveImages && !components?.img) {\n generated.img = ({ alt, ...props }) => (\n <img\n alt={alt ?? ''}\n {...props}\n style={{ maxWidth: '100%', height: 'auto', ...props.style }}\n />\n );\n }\n\n // User-provided components override auto-generated ones\n return { ...generated, ...components };\n }, [components, linkTarget, responsiveImages]);\n\n const hasComponents = Object.keys(mergedComponents).length > 0;\n\n return (\n <div className={className}>\n <ReactMarkdown\n remarkPlugins={[remarkGfm]}\n rehypePlugins={rehypePlugins}\n components={hasComponents ? mergedComponents : undefined}\n >\n {content}\n </ReactMarkdown>\n </div>\n );\n};\n\nexport default MarkdownRender;\n"],"mappings":";;;;;AAyBA,IAAM,KAA2C,EAC/C,YACA,cACA,eACA,eACA,qBACA,uBACI;CACJ,IAAM,IAAmB,QAAc;EACrC,IAAM,IAAiC,EAAE;AAuBzC,SApBI,KAAc,CAAC,GAAY,MAC7B,EAAU,KAAK,EAAE,aAAU,GAAG,QAC5B,kBAAC,KAAD;GAAG,GAAI;GAAO,QAAQ;GAAY,KAAK,MAAe,WAAW,eAAe,KAAA;GAC7E;GACC,CAAA,GAKJ,KAAoB,CAAC,GAAY,QACnC,EAAU,OAAO,EAAE,QAAK,GAAG,QACzB,kBAAC,OAAD;GACE,KAAK,KAAO;GACZ,GAAI;GACJ,OAAO;IAAE,UAAU;IAAQ,QAAQ;IAAQ,GAAG,EAAM;IAAO;GAC3D,CAAA,GAKC;GAAE,GAAG;GAAW,GAAG;GAAY;IACrC;EAAC;EAAY;EAAY;EAAiB,CAAC,EAExC,IAAgB,OAAO,KAAK,EAAiB,CAAC,SAAS;AAE7D,QACE,kBAAC,OAAD;EAAgB;YACd,kBAAC,GAAD;GACE,eAAe,CAAC,EAAU;GACX;GACf,YAAY,IAAgB,IAAmB,KAAA;aAE9C;GACa,CAAA;EACZ,CAAA"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { useMemo as e } from "react";
|
|
2
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/MonthlyCalendar/MonthlyCalendar.tsx
|
|
4
|
+
var i = {
|
|
5
|
+
dayColor: "#222",
|
|
6
|
+
headerColor: "#555",
|
|
7
|
+
annotationColor: "inherit"
|
|
8
|
+
}, a = {
|
|
9
|
+
dayColor: "#f0f0f0",
|
|
10
|
+
headerColor: "#a0a0b8",
|
|
11
|
+
annotationColor: "#d0d0e0"
|
|
12
|
+
}, o = {
|
|
13
|
+
borderCollapse: "collapse",
|
|
14
|
+
border: "none",
|
|
15
|
+
width: "100%",
|
|
16
|
+
tableLayout: "fixed",
|
|
17
|
+
fontFamily: "sans-serif"
|
|
18
|
+
}, s = {
|
|
19
|
+
border: "none",
|
|
20
|
+
verticalAlign: "top",
|
|
21
|
+
padding: 0,
|
|
22
|
+
position: "relative",
|
|
23
|
+
textAlign: "center"
|
|
24
|
+
}, c = ({ year: c, month: l, annotations: u = [], headers: d, style: f = {}, darkMode: p = !1 }) => {
|
|
25
|
+
let m = p ? a : i, h = e(() => {
|
|
26
|
+
let e = new Date(c, l, 0).getDate(), t = new Date(c, l - 1, 1).getDay(), n = Math.ceil((t + e) / 7) * 7, r = [], i = 1 - t;
|
|
27
|
+
for (let t = 0; t < n / 7; t++) {
|
|
28
|
+
let t = [];
|
|
29
|
+
for (let n = 0; n < 7; n++) t.push(i >= 1 && i <= e ? i : null), i++;
|
|
30
|
+
r.push(t);
|
|
31
|
+
}
|
|
32
|
+
return r;
|
|
33
|
+
}, [c, l]);
|
|
34
|
+
return /* @__PURE__ */ r("table", {
|
|
35
|
+
style: {
|
|
36
|
+
...o,
|
|
37
|
+
...f
|
|
38
|
+
},
|
|
39
|
+
children: [d && /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ n("tr", { children: d.map((e, t) => /* @__PURE__ */ n("th", {
|
|
40
|
+
style: {
|
|
41
|
+
...s,
|
|
42
|
+
fontWeight: 600,
|
|
43
|
+
fontSize: "0.85rem",
|
|
44
|
+
paddingBottom: 6,
|
|
45
|
+
color: m.headerColor
|
|
46
|
+
},
|
|
47
|
+
children: e
|
|
48
|
+
}, t)) }) }), /* @__PURE__ */ n("tbody", { children: h.map((e, i) => /* @__PURE__ */ n("tr", { children: e.map((e, i) => /* @__PURE__ */ n("td", {
|
|
49
|
+
style: s,
|
|
50
|
+
children: /* @__PURE__ */ n("div", {
|
|
51
|
+
style: {
|
|
52
|
+
width: "100%",
|
|
53
|
+
paddingBottom: "100%",
|
|
54
|
+
position: "relative"
|
|
55
|
+
},
|
|
56
|
+
children: /* @__PURE__ */ n("div", {
|
|
57
|
+
style: {
|
|
58
|
+
position: "absolute",
|
|
59
|
+
inset: 0,
|
|
60
|
+
display: "flex",
|
|
61
|
+
flexDirection: "column",
|
|
62
|
+
alignItems: "center",
|
|
63
|
+
justifyContent: "flex-start",
|
|
64
|
+
paddingTop: 6,
|
|
65
|
+
gap: 4,
|
|
66
|
+
overflow: "hidden"
|
|
67
|
+
},
|
|
68
|
+
children: e !== null && /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("span", {
|
|
69
|
+
style: {
|
|
70
|
+
fontFamily: "sans-serif",
|
|
71
|
+
fontSize: "0.95rem",
|
|
72
|
+
fontWeight: 500,
|
|
73
|
+
color: m.dayColor
|
|
74
|
+
},
|
|
75
|
+
children: e
|
|
76
|
+
}), u[e - 1] != null && /* @__PURE__ */ n("div", {
|
|
77
|
+
style: {
|
|
78
|
+
fontSize: "0.75rem",
|
|
79
|
+
lineHeight: 1.2,
|
|
80
|
+
overflow: "hidden",
|
|
81
|
+
width: "100%",
|
|
82
|
+
textAlign: "center",
|
|
83
|
+
color: m.annotationColor
|
|
84
|
+
},
|
|
85
|
+
children: u[e - 1]
|
|
86
|
+
})] })
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
}, i)) }, i)) })]
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { c as t };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=MonthlyCalendar-BflN-u8m.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MonthlyCalendar-BflN-u8m.js","names":[],"sources":["../src/components/MonthlyCalendar/MonthlyCalendar.tsx"],"sourcesContent":["import React, { CSSProperties, ReactNode, useMemo } from 'react';\n\n/**\n * Props for the MonthlyCalendar component\n */\nexport interface MonthlyCalendarProps {\n /** Full four-digit year (e.g. 2026) */\n year: number;\n /** Month to display, 1-based: 1 = January, 12 = December */\n month: number;\n /**\n * Array of React nodes, one per day of the month.\n * annotations[0] maps to Day 1, annotations[1] maps to Day 2, etc.\n * Use null or undefined for days with no annotation.\n */\n annotations?: (ReactNode | null | undefined)[];\n /**\n * Array of exactly 7 strings for the weekday header labels.\n * Omit to hide the header row entirely.\n */\n headers?: [string, string, string, string, string, string, string];\n /**\n * Inline styles merged onto the table element, overriding defaults via shallow spread.\n */\n style?: CSSProperties;\n /**\n * Enables the dark color theme for day numbers, headers, and annotation text.\n * The component does not set its own background — wrap it in a dark container when enabled.\n * @default false\n */\n darkMode?: boolean;\n}\n\n// ─── Theme definitions ───\n\nconst LIGHT_THEME = {\n dayColor: '#222',\n headerColor: '#555',\n annotationColor: 'inherit'\n};\n\nconst DARK_THEME = {\n dayColor: '#f0f0f0',\n headerColor: '#a0a0b8',\n annotationColor: '#d0d0e0'\n};\n\n// ─── Static style objects ───\n\nconst defaultTableStyle: CSSProperties = {\n borderCollapse: 'collapse',\n border: 'none',\n width: '100%',\n tableLayout: 'fixed',\n fontFamily: 'sans-serif'\n};\n\nconst defaultCellStyle: CSSProperties = {\n border: 'none',\n verticalAlign: 'top',\n padding: 0,\n position: 'relative',\n textAlign: 'center'\n};\n\n/**\n * MonthlyCalendar Component\n *\n * A zero-dependency monthly calendar grid rendered as a semantic HTML table.\n * Each day occupies a square cell with an optional annotation slot that accepts\n * any ReactNode (text, images, badges, icons, or entire sub-components).\n *\n * Features built-in light and dark themes, customizable headers, and\n * table-level style overrides. All styling is inline — no CSS files required.\n *\n * @component\n * @example\n * ```tsx\n * <MonthlyCalendar\n * year={2026}\n * month={2}\n * headers={['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']}\n * darkMode={false}\n * />\n * ```\n */\nconst MonthlyCalendar: React.FC<MonthlyCalendarProps> = ({\n year,\n month,\n annotations = [],\n headers,\n style = {},\n darkMode = false\n}) => {\n const theme = darkMode ? DARK_THEME : LIGHT_THEME;\n\n const weeks = useMemo(() => {\n const daysInMonth = new Date(year, month, 0).getDate();\n const startDay = new Date(year, month - 1, 1).getDay(); // 0=Sun\n const totalCells = Math.ceil((startDay + daysInMonth) / 7) * 7;\n const result: (number | null)[][] = [];\n let currentDay = 1 - startDay;\n\n for (let w = 0; w < totalCells / 7; w++) {\n const week: (number | null)[] = [];\n for (let d = 0; d < 7; d++) {\n week.push(currentDay >= 1 && currentDay <= daysInMonth ? currentDay : null);\n currentDay++;\n }\n result.push(week);\n }\n return result;\n }, [year, month]);\n\n const mergedTableStyle = { ...defaultTableStyle, ...style };\n\n return (\n <table style={mergedTableStyle}>\n {headers && (\n <thead>\n <tr>\n {headers.map((h, i) => (\n <th\n key={i}\n style={{\n ...defaultCellStyle,\n fontWeight: 600,\n fontSize: '0.85rem',\n paddingBottom: 6,\n color: theme.headerColor\n }}\n >\n {h}\n </th>\n ))}\n </tr>\n </thead>\n )}\n <tbody>\n {weeks.map((week, wi) => (\n <tr key={wi}>\n {week.map((day, di) => (\n <td key={di} style={defaultCellStyle}>\n <div\n style={{\n width: '100%',\n paddingBottom: '100%',\n position: 'relative'\n }}\n >\n <div\n style={{\n position: 'absolute',\n inset: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'flex-start',\n paddingTop: 6,\n gap: 4,\n overflow: 'hidden'\n }}\n >\n {day !== null && (\n <>\n <span\n style={{\n fontFamily: 'sans-serif',\n fontSize: '0.95rem',\n fontWeight: 500,\n color: theme.dayColor\n }}\n >\n {day}\n </span>\n {annotations[day - 1] != null && (\n <div\n style={{\n fontSize: '0.75rem',\n lineHeight: 1.2,\n overflow: 'hidden',\n width: '100%',\n textAlign: 'center',\n color: theme.annotationColor\n }}\n >\n {annotations[day - 1]}\n </div>\n )}\n </>\n )}\n </div>\n </div>\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n\nexport default MonthlyCalendar;\n"],"mappings":";;;AAmCA,IAAM,IAAc;CAClB,UAAU;CACV,aAAa;CACb,iBAAiB;CAClB,EAEK,IAAa;CACjB,UAAU;CACV,aAAa;CACb,iBAAiB;CAClB,EAIK,IAAmC;CACvC,gBAAgB;CAChB,QAAQ;CACR,OAAO;CACP,aAAa;CACb,YAAY;CACb,EAEK,IAAkC;CACtC,QAAQ;CACR,eAAe;CACf,SAAS;CACT,UAAU;CACV,WAAW;CACZ,EAuBK,KAAmD,EACvD,SACA,UACA,iBAAc,EAAE,EAChB,YACA,WAAQ,EAAE,EACV,cAAW,SACP;CACJ,IAAM,IAAQ,IAAW,IAAa,GAEhC,IAAQ,QAAc;EAC1B,IAAM,IAAc,IAAI,KAAK,GAAM,GAAO,EAAE,CAAC,SAAS,EAChD,IAAW,IAAI,KAAK,GAAM,IAAQ,GAAG,EAAE,CAAC,QAAQ,EAChD,IAAa,KA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;gBAEA,EAAY,IAAM;MACf,CAAA,CAEP,EAAA,CAAA;KAED,CAAA;IACF,CAAA;GACH,EAnDI,EAmDJ,CACL,EACC,EAvDI,EAuDJ,CACL,EACI,CAAA,CACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react`);t=e.t(t);let n=require(`react/jsx-runtime`);var r={dayColor:`#222`,headerColor:`#555`,annotationColor:`inherit`},i={dayColor:`#f0f0f0`,headerColor:`#a0a0b8`,annotationColor:`#d0d0e0`},a={borderCollapse:`collapse`,border:`none`,width:`100%`,tableLayout:`fixed`,fontFamily:`sans-serif`},o={border:`none`,verticalAlign:`top`,padding:0,position:`relative`,textAlign:`center`},s=({year:e,month:s,annotations:c=[],headers:l,style:u={},darkMode:d=!1})=>{let f=d?i:r,p=(0,t.useMemo)(()=>{let t=new Date(e,s,0).getDate(),n=new Date(e,s-1,1).getDay(),r=Math.ceil((n+t)/7)*7,i=[],a=1-n;for(let e=0;e<r/7;e++){let e=[];for(let n=0;n<7;n++)e.push(a>=1&&a<=t?a:null),a++;i.push(e)}return i},[e,s]);return(0,n.jsxs)(`table`,{style:{...a,...u},children:[l&&(0,n.jsx)(`thead`,{children:(0,n.jsx)(`tr`,{children:l.map((e,t)=>(0,n.jsx)(`th`,{style:{...o,fontWeight:600,fontSize:`0.85rem`,paddingBottom:6,color:f.headerColor},children:e},t))})}),(0,n.jsx)(`tbody`,{children:p.map((e,t)=>(0,n.jsx)(`tr`,{children:e.map((e,t)=>(0,n.jsx)(`td`,{style:o,children:(0,n.jsx)(`div`,{style:{width:`100%`,paddingBottom:`100%`,position:`relative`},children:(0,n.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`flex-start`,paddingTop:6,gap:4,overflow:`hidden`},children:e!==null&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`span`,{style:{fontFamily:`sans-serif`,fontSize:`0.95rem`,fontWeight:500,color:f.dayColor},children:e}),c[e-1]!=null&&(0,n.jsx)(`div`,{style:{fontSize:`0.75rem`,lineHeight:1.2,overflow:`hidden`,width:`100%`,textAlign:`center`,color:f.annotationColor},children:c[e-1]})]})})})},t))},t))})]})};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
2
|
+
//# sourceMappingURL=MonthlyCalendar-DDXHhlwC.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MonthlyCalendar-DDXHhlwC.cjs","names":[],"sources":["../src/components/MonthlyCalendar/MonthlyCalendar.tsx"],"sourcesContent":["import React, { CSSProperties, ReactNode, useMemo } from 'react';\n\n/**\n * Props for the MonthlyCalendar component\n */\nexport interface MonthlyCalendarProps {\n /** Full four-digit year (e.g. 2026) */\n year: number;\n /** Month to display, 1-based: 1 = January, 12 = December */\n month: number;\n /**\n * Array of React nodes, one per day of the month.\n * annotations[0] maps to Day 1, annotations[1] maps to Day 2, etc.\n * Use null or undefined for days with no annotation.\n */\n annotations?: (ReactNode | null | undefined)[];\n /**\n * Array of exactly 7 strings for the weekday header labels.\n * Omit to hide the header row entirely.\n */\n headers?: [string, string, string, string, string, string, string];\n /**\n * Inline styles merged onto the table element, overriding defaults via shallow spread.\n */\n style?: CSSProperties;\n /**\n * Enables the dark color theme for day numbers, headers, and annotation text.\n * The component does not set its own background — wrap it in a dark container when enabled.\n * @default false\n */\n darkMode?: boolean;\n}\n\n// ─── Theme definitions ───\n\nconst LIGHT_THEME = {\n dayColor: '#222',\n headerColor: '#555',\n annotationColor: 'inherit'\n};\n\nconst DARK_THEME = {\n dayColor: '#f0f0f0',\n headerColor: '#a0a0b8',\n annotationColor: '#d0d0e0'\n};\n\n// ─── Static style objects ───\n\nconst defaultTableStyle: CSSProperties = {\n borderCollapse: 'collapse',\n border: 'none',\n width: '100%',\n tableLayout: 'fixed',\n fontFamily: 'sans-serif'\n};\n\nconst defaultCellStyle: CSSProperties = {\n border: 'none',\n verticalAlign: 'top',\n padding: 0,\n position: 'relative',\n textAlign: 'center'\n};\n\n/**\n * MonthlyCalendar Component\n *\n * A zero-dependency monthly calendar grid rendered as a semantic HTML table.\n * Each day occupies a square cell with an optional annotation slot that accepts\n * any ReactNode (text, images, badges, icons, or entire sub-components).\n *\n * Features built-in light and dark themes, customizable headers, and\n * table-level style overrides. All styling is inline — no CSS files required.\n *\n * @component\n * @example\n * ```tsx\n * <MonthlyCalendar\n * year={2026}\n * month={2}\n * headers={['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']}\n * darkMode={false}\n * />\n * ```\n */\nconst MonthlyCalendar: React.FC<MonthlyCalendarProps> = ({\n year,\n month,\n annotations = [],\n headers,\n style = {},\n darkMode = false\n}) => {\n const theme = darkMode ? DARK_THEME : LIGHT_THEME;\n\n const weeks = useMemo(() => {\n const daysInMonth = new Date(year, month, 0).getDate();\n const startDay = new Date(year, month - 1, 1).getDay(); // 0=Sun\n const totalCells = Math.ceil((startDay + daysInMonth) / 7) * 7;\n const result: (number | null)[][] = [];\n let currentDay = 1 - startDay;\n\n for (let w = 0; w < totalCells / 7; w++) {\n const week: (number | null)[] = [];\n for (let d = 0; d < 7; d++) {\n week.push(currentDay >= 1 && currentDay <= daysInMonth ? currentDay : null);\n currentDay++;\n }\n result.push(week);\n }\n return result;\n }, [year, month]);\n\n const mergedTableStyle = { ...defaultTableStyle, ...style };\n\n return (\n <table style={mergedTableStyle}>\n {headers && (\n <thead>\n <tr>\n {headers.map((h, i) => (\n <th\n key={i}\n style={{\n ...defaultCellStyle,\n fontWeight: 600,\n fontSize: '0.85rem',\n paddingBottom: 6,\n color: theme.headerColor\n }}\n >\n {h}\n </th>\n ))}\n </tr>\n </thead>\n )}\n <tbody>\n {weeks.map((week, wi) => (\n <tr key={wi}>\n {week.map((day, di) => (\n <td key={di} style={defaultCellStyle}>\n <div\n style={{\n width: '100%',\n paddingBottom: '100%',\n position: 'relative'\n }}\n >\n <div\n style={{\n position: 'absolute',\n inset: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'flex-start',\n paddingTop: 6,\n gap: 4,\n overflow: 'hidden'\n }}\n >\n {day !== null && (\n <>\n <span\n style={{\n fontFamily: 'sans-serif',\n fontSize: '0.95rem',\n fontWeight: 500,\n color: theme.dayColor\n }}\n >\n {day}\n </span>\n {annotations[day - 1] != null && (\n <div\n style={{\n fontSize: '0.75rem',\n lineHeight: 1.2,\n overflow: 'hidden',\n width: '100%',\n textAlign: 'center',\n color: theme.annotationColor\n }}\n >\n {annotations[day - 1]}\n </div>\n )}\n </>\n )}\n </div>\n </div>\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n\nexport default MonthlyCalendar;\n"],"mappings":"2GAmCA,IAAM,EAAc,CAClB,SAAU,OACV,YAAa,OACb,gBAAiB,UAClB,CAEK,EAAa,CACjB,SAAU,UACV,YAAa,UACb,gBAAiB,UAClB,CAIK,EAAmC,CACvC,eAAgB,WAChB,OAAQ,OACR,MAAO,OACP,YAAa,QACb,WAAY,aACb,CAEK,EAAkC,CACtC,OAAQ,OACR,cAAe,MACf,QAAS,EACT,SAAU,WACV,UAAW,SACZ,CAuBK,GAAmD,CACvD,OACA,QACA,cAAc,EAAE,CAChB,UACA,QAAQ,EAAE,CACV,WAAW,MACP,CACJ,IAAM,EAAQ,EAAW,EAAa,EAEhC,GAAA,EAAA,EAAA,aAAsB,CAC1B,IAAM,EAAc,IAAI,KAAK,EAAM,EAAO,EAAE,CAAC,SAAS,CAChD,EAAW,IAAI,KAAK,EAAM,EAAQ,EAAG,EAAE,CAAC,QAAQ,CAChD,EAAa,KAAK,MAAM,EAAW,GAAe,EAAE,CAAG,EACvD,EAA8B,EAAE,CAClC,EAAa,EAAI,EAErB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAa,EAAG,IAAK,CACvC,IAAM,EAA0B,EAAE,CAClC,IAAK,IAAI,EAAI,EAAG,EAAI,EAAG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,CAAA,CACH,CAnDI,EAmDJ,CACL,CACC,CAvDI,EAuDJ,CACL,CACI,CAAA,CACF"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
import './ThemeSwitch.css';var n = {
|
|
4
|
+
sunCore: "ThemeSwitch-module__sunCore___tUhud",
|
|
5
|
+
small: "ThemeSwitch-module__small___YlvWo",
|
|
6
|
+
medium: "ThemeSwitch-module__medium___Q8Rro",
|
|
7
|
+
large: "ThemeSwitch-module__large___BMOxC",
|
|
8
|
+
sunspot1: "ThemeSwitch-module__sunspot1___8RI1V",
|
|
9
|
+
sunspot2: "ThemeSwitch-module__sunspot2___U0whF",
|
|
10
|
+
sunspot3: "ThemeSwitch-module__sunspot3___kWYEI",
|
|
11
|
+
sunRay: "ThemeSwitch-module__sunRay___t1B4U",
|
|
12
|
+
rotateSun: "ThemeSwitch-module__rotateSun___JQByd",
|
|
13
|
+
switchContainer: "ThemeSwitch-module__switchContainer___VENjU",
|
|
14
|
+
dark: "ThemeSwitch-module__dark___a4vSn",
|
|
15
|
+
background: "ThemeSwitch-module__background___Rpodp",
|
|
16
|
+
cloud: "ThemeSwitch-module__cloud___OoOyx",
|
|
17
|
+
light: "ThemeSwitch-module__light___ddTa2",
|
|
18
|
+
cloud1: "ThemeSwitch-module__cloud1___aqGNx",
|
|
19
|
+
floatCloud1: "ThemeSwitch-module__floatCloud1___MdWMj",
|
|
20
|
+
cloud2: "ThemeSwitch-module__cloud2___guY71",
|
|
21
|
+
floatCloud2: "ThemeSwitch-module__floatCloud2___2x6Sp",
|
|
22
|
+
cloud3: "ThemeSwitch-module__cloud3___7-NhR",
|
|
23
|
+
floatCloud3: "ThemeSwitch-module__floatCloud3___FJCbV",
|
|
24
|
+
star: "ThemeSwitch-module__star___Z98bU",
|
|
25
|
+
star1: "ThemeSwitch-module__star1___rhotb",
|
|
26
|
+
star2: "ThemeSwitch-module__star2___pzbNR",
|
|
27
|
+
star3: "ThemeSwitch-module__star3___iK7lJ",
|
|
28
|
+
star4: "ThemeSwitch-module__star4___t5pqN",
|
|
29
|
+
star5: "ThemeSwitch-module__star5___dx42N",
|
|
30
|
+
star6: "ThemeSwitch-module__star6___wur-I",
|
|
31
|
+
star7: "ThemeSwitch-module__star7___KONgd",
|
|
32
|
+
star8: "ThemeSwitch-module__star8___gIYpk",
|
|
33
|
+
twinkle: "ThemeSwitch-module__twinkle___Abun5",
|
|
34
|
+
toggle: "ThemeSwitch-module__toggle___L5FGS",
|
|
35
|
+
sun: "ThemeSwitch-module__sun___s8noI",
|
|
36
|
+
moon: "ThemeSwitch-module__moon___TNpFJ",
|
|
37
|
+
moonCore: "ThemeSwitch-module__moonCore___svwjb",
|
|
38
|
+
crater1: "ThemeSwitch-module__crater1___swpHc",
|
|
39
|
+
crater2: "ThemeSwitch-module__crater2___WQVKR",
|
|
40
|
+
crater3: "ThemeSwitch-module__crater3___F-KJu",
|
|
41
|
+
crater4: "ThemeSwitch-module__crater4___ZsIb7"
|
|
42
|
+
}, r = ({ enableDarkMode: r, setEnableDarkMode: i, size: a = "large" }) => {
|
|
43
|
+
let o = () => {
|
|
44
|
+
i(!r);
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ t("div", {
|
|
47
|
+
className: `${n.switchContainer} ${n[a]} ${r ? n.dark : n.light}`,
|
|
48
|
+
onClick: o,
|
|
49
|
+
role: "button",
|
|
50
|
+
tabIndex: 0,
|
|
51
|
+
"aria-label": `Switch to ${r ? "light" : "dark"} mode`,
|
|
52
|
+
onKeyDown: (e) => {
|
|
53
|
+
(e.key === "Enter" || e.key === " ") && o();
|
|
54
|
+
},
|
|
55
|
+
children: [/* @__PURE__ */ t("div", {
|
|
56
|
+
className: n.background,
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ e("div", { className: `${n.cloud} ${n.cloud1}` }),
|
|
59
|
+
/* @__PURE__ */ e("div", { className: `${n.cloud} ${n.cloud2}` }),
|
|
60
|
+
/* @__PURE__ */ e("div", { className: `${n.cloud} ${n.cloud3}` }),
|
|
61
|
+
/* @__PURE__ */ e("div", { className: `${n.star} ${n.star1}` }),
|
|
62
|
+
/* @__PURE__ */ e("div", { className: `${n.star} ${n.star2}` }),
|
|
63
|
+
/* @__PURE__ */ e("div", { className: `${n.star} ${n.star3}` }),
|
|
64
|
+
/* @__PURE__ */ e("div", { className: `${n.star} ${n.star4}` }),
|
|
65
|
+
/* @__PURE__ */ e("div", { className: `${n.star} ${n.star5}` }),
|
|
66
|
+
/* @__PURE__ */ e("div", { className: `${n.star} ${n.star6}` }),
|
|
67
|
+
/* @__PURE__ */ e("div", { className: `${n.star} ${n.star7}` }),
|
|
68
|
+
/* @__PURE__ */ e("div", { className: `${n.star} ${n.star8}` })
|
|
69
|
+
]
|
|
70
|
+
}), /* @__PURE__ */ t("div", {
|
|
71
|
+
className: n.toggle,
|
|
72
|
+
children: [/* @__PURE__ */ t("div", {
|
|
73
|
+
className: n.sun,
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ t("div", {
|
|
76
|
+
className: n.sunCore,
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ e("div", { className: n.sunspot1 }),
|
|
79
|
+
/* @__PURE__ */ e("div", { className: n.sunspot2 }),
|
|
80
|
+
/* @__PURE__ */ e("div", { className: n.sunspot3 })
|
|
81
|
+
]
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ e("div", { className: n.sunRay }),
|
|
84
|
+
/* @__PURE__ */ e("div", { className: n.sunRay }),
|
|
85
|
+
/* @__PURE__ */ e("div", { className: n.sunRay }),
|
|
86
|
+
/* @__PURE__ */ e("div", { className: n.sunRay }),
|
|
87
|
+
/* @__PURE__ */ e("div", { className: n.sunRay }),
|
|
88
|
+
/* @__PURE__ */ e("div", { className: n.sunRay }),
|
|
89
|
+
/* @__PURE__ */ e("div", { className: n.sunRay }),
|
|
90
|
+
/* @__PURE__ */ e("div", { className: n.sunRay })
|
|
91
|
+
]
|
|
92
|
+
}), /* @__PURE__ */ e("div", {
|
|
93
|
+
className: n.moon,
|
|
94
|
+
children: /* @__PURE__ */ t("div", {
|
|
95
|
+
className: n.moonCore,
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ e("div", { className: n.crater1 }),
|
|
98
|
+
/* @__PURE__ */ e("div", { className: n.crater2 }),
|
|
99
|
+
/* @__PURE__ */ e("div", { className: n.crater3 }),
|
|
100
|
+
/* @__PURE__ */ e("div", { className: n.crater4 })
|
|
101
|
+
]
|
|
102
|
+
})
|
|
103
|
+
})]
|
|
104
|
+
})]
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
//#endregion
|
|
108
|
+
export { r as t };
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=ThemeSwitch-C648hdUm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeSwitch-C648hdUm.js","names":[],"sources":["../src/components/ThemeSwitch/ThemeSwitch.module.css","../src/components/ThemeSwitch/ThemeSwitch.tsx"],"sourcesContent":["/* Sun - Size variants */\n.sunCore {\n position: relative;\n background: radial-gradient(circle, #ffd700, #ffa500);\n border-radius: 50%;\n}\n\n.small .sunCore {\n width: 16px;\n height: 16px;\n box-shadow: inset -1px -1px 2px rgba(255, 140, 0, 0.5);\n}\n\n.medium .sunCore {\n width: 24px;\n height: 24px;\n box-shadow: inset -1.5px -1.5px 3px rgba(255, 140, 0, 0.5);\n}\n\n.large .sunCore {\n width: 32px;\n height: 32px;\n box-shadow: inset -2px -2px 4px rgba(255, 140, 0, 0.5);\n}\n\n/* Sunspots - Size variants */\n.small .sunspot1 {\n position: absolute;\n width: 2px;\n height: 2px;\n background: rgba(255, 140, 0, 0.6);\n border-radius: 50%;\n top: 4px;\n left: 5px;\n}\n\n.small .sunspot2 {\n position: absolute;\n width: 1.5px;\n height: 1.5px;\n background: rgba(255, 140, 0, 0.5);\n border-radius: 50%;\n bottom: 5px;\n right: 4px;\n}\n\n.small .sunspot3 {\n position: absolute;\n width: 1px;\n height: 1px;\n background: rgba(255, 140, 0, 0.4);\n border-radius: 50%;\n top: 6px;\n right: 6px;\n}\n\n.medium .sunspot1 {\n position: absolute;\n width: 3px;\n height: 3px;\n background: rgba(255, 140, 0, 0.6);\n border-radius: 50%;\n top: 6px;\n left: 7.5px;\n}\n\n.medium .sunspot2 {\n position: absolute;\n width: 2.25px;\n height: 2.25px;\n background: rgba(255, 140, 0, 0.5);\n border-radius: 50%;\n bottom: 7.5px;\n right: 6px;\n}\n\n.medium .sunspot3 {\n position: absolute;\n width: 1.5px;\n height: 1.5px;\n background: rgba(255, 140, 0, 0.4);\n border-radius: 50%;\n top: 9px;\n right: 9px;\n}\n\n.large .sunspot1 {\n position: absolute;\n width: 4px;\n height: 4px;\n background: rgba(255, 140, 0, 0.6);\n border-radius: 50%;\n top: 8px;\n left: 10px;\n}\n\n.large .sunspot2 {\n position: absolute;\n width: 3px;\n height: 3px;\n background: rgba(255, 140, 0, 0.5);\n border-radius: 50%;\n bottom: 10px;\n right: 8px;\n}\n\n.large .sunspot3 {\n position: absolute;\n width: 2px;\n height: 2px;\n background: rgba(255, 140, 0, 0.4);\n border-radius: 50%;\n top: 12px;\n right: 12px;\n}\n\n/* Sun rays - Size adjustments */\n.small .sunRay {\n position: absolute;\n background: linear-gradient(90deg, transparent, #ffd700, transparent);\n animation: rotateSun 10s linear infinite;\n}\n\n.small .sunRay:nth-child(2) {\n width: 20px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.small .sunRay:nth-child(3) {\n width: 1px;\n height: 20px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.small .sunRay:nth-child(4) {\n width: 20px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(45deg);\n}\n\n.small .sunRay:nth-child(5) {\n width: 20px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.small .sunRay:nth-child(6),\n.small .sunRay:nth-child(7),\n.small .sunRay:nth-child(8),\n.small .sunRay:nth-child(9) {\n display: none;\n}\n\n.medium .sunRay {\n position: absolute;\n background: linear-gradient(90deg, transparent, #ffd700, transparent);\n animation: rotateSun 10s linear infinite;\n}\n\n.medium .sunRay:nth-child(2) {\n width: 30px;\n height: 1.5px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.medium .sunRay:nth-child(3) {\n width: 1.5px;\n height: 30px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.medium .sunRay:nth-child(4) {\n width: 30px;\n height: 1.5px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(45deg);\n}\n\n.medium .sunRay:nth-child(5) {\n width: 30px;\n height: 1.5px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.medium .sunRay:nth-child(6) {\n width: 26px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(22.5deg);\n}\n\n.medium .sunRay:nth-child(7) {\n width: 26px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-22.5deg);\n}\n\n.medium .sunRay:nth-child(8),\n.medium .sunRay:nth-child(9) {\n display: none;\n}\n\n.large .sunRay {\n position: absolute;\n background: linear-gradient(90deg, transparent, #ffd700, transparent);\n animation: rotateSun 10s linear infinite;\n}\n\n.large .sunRay:nth-child(2) {\n width: 40px;\n height: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.large .sunRay:nth-child(3) {\n width: 2px;\n height: 40px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.large .sunRay:nth-child(4) {\n width: 40px;\n height: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(45deg);\n}\n\n.large .sunRay:nth-child(5) {\n width: 40px;\n height: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.large .sunRay:nth-child(6) {\n width: 35px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(22.5deg);\n}\n\n.large .sunRay:nth-child(7) {\n width: 35px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-22.5deg);\n}\n\n/* Base container styles */\n.switchContainer {\n position: relative;\n background: linear-gradient(135deg, #87ceeb, #add8e6);\n border-radius: 30px;\n cursor: pointer;\n overflow: hidden;\n transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);\n box-shadow:\n inset 0 2px 8px rgba(0, 0, 0, 0.1),\n 0 4px 12px rgba(0, 0, 0, 0.15);\n user-select: none;\n}\n\n/* Size variants */\n.switchContainer.small {\n width: 60px;\n height: 30px;\n border-radius: 15px;\n}\n\n.switchContainer.medium {\n width: 90px;\n height: 45px;\n border-radius: 22.5px;\n}\n\n.switchContainer.large {\n width: 120px;\n height: 60px;\n border-radius: 30px;\n}\n\n.switchContainer:focus {\n outline: 2px solid #4a90e2;\n outline-offset: 2px;\n}\n\n.switchContainer.dark {\n background: linear-gradient(135deg, #1a1a3e, #0a0a1f);\n}\n\n.background {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n pointer-events: none;\n}\n\n/* Clouds - Base styles */\n.cloud {\n position: absolute;\n background: rgba(255, 255, 255, 0.4);\n border-radius: 100px;\n opacity: 0;\n transition: opacity 0.6s ease;\n}\n\n.light .cloud {\n opacity: 1;\n}\n\n.cloud::before,\n.cloud::after {\n content: '';\n position: absolute;\n background: rgba(255, 255, 255, 0.4);\n border-radius: 100px;\n}\n\n/* Cloud 1 - Size variants */\n.small .cloud1 {\n width: 12px;\n height: 4px;\n top: 7px;\n left: 10px;\n}\n\n.small .cloud1::before {\n width: 5px;\n height: 5px;\n top: -2.5px;\n left: 2.5px;\n}\n\n.small .cloud1::after {\n width: 6px;\n height: 4px;\n top: -1.5px;\n right: 2.5px;\n}\n\n.medium .cloud1 {\n width: 19px;\n height: 6px;\n top: 11px;\n left: 15px;\n}\n\n.medium .cloud1::before {\n width: 7.5px;\n height: 7.5px;\n top: -3.75px;\n left: 3.75px;\n}\n\n.medium .cloud1::after {\n width: 9px;\n height: 6px;\n top: -2.25px;\n right: 3.75px;\n}\n\n.large .cloud1 {\n width: 25px;\n height: 8px;\n top: 15px;\n left: 20px;\n}\n\n.large .cloud1::before {\n width: 10px;\n height: 10px;\n top: -5px;\n left: 5px;\n}\n\n.large .cloud1::after {\n width: 12px;\n height: 8px;\n top: -3px;\n right: 5px;\n}\n\n.cloud1 {\n animation: floatCloud1 12s infinite ease-in-out;\n}\n\n/* Cloud 2 - Size variants */\n.small .cloud2 {\n width: 10px;\n height: 3px;\n top: 17px;\n right: 12px;\n}\n\n.small .cloud2::before {\n width: 4px;\n height: 4px;\n top: -2px;\n left: 1.5px;\n}\n\n.medium .cloud2 {\n width: 15px;\n height: 4.5px;\n top: 26px;\n right: 19px;\n}\n\n.medium .cloud2::before {\n width: 6px;\n height: 6px;\n top: -3px;\n left: 2.25px;\n}\n\n.large .cloud2 {\n width: 20px;\n height: 6px;\n top: 35px;\n right: 25px;\n}\n\n.large .cloud2::before {\n width: 8px;\n height: 8px;\n top: -4px;\n left: 3px;\n}\n\n.cloud2 {\n animation: floatCloud2 15s infinite ease-in-out;\n}\n\n/* Cloud 3 - Size variants */\n.small .cloud3 {\n width: 9px;\n height: 2.5px;\n bottom: 9px;\n left: 17px;\n}\n\n.small .cloud3::after {\n width: 5px;\n height: 3px;\n top: -1.5px;\n right: 1.5px;\n}\n\n.medium .cloud3 {\n width: 13.5px;\n height: 3.75px;\n bottom: 13.5px;\n left: 26px;\n}\n\n.medium .cloud3::after {\n width: 7.5px;\n height: 4.5px;\n top: -2.25px;\n right: 2.25px;\n}\n\n.large .cloud3 {\n width: 18px;\n height: 5px;\n bottom: 18px;\n left: 35px;\n}\n\n.large .cloud3::after {\n width: 10px;\n height: 6px;\n top: -3px;\n right: 3px;\n}\n\n.cloud3 {\n animation: floatCloud3 18s infinite ease-in-out;\n}\n\n@keyframes floatCloud1 {\n 0%,\n 100% {\n transform: translateX(0);\n }\n 50% {\n transform: translateX(5px);\n }\n}\n\n@keyframes floatCloud2 {\n 0%,\n 100% {\n transform: translateX(0);\n }\n 50% {\n transform: translateX(-3px);\n }\n}\n\n@keyframes floatCloud3 {\n 0%,\n 100% {\n transform: translateX(0);\n }\n 50% {\n transform: translateX(4px);\n }\n}\n\n/* Stars - Base styles */\n.star {\n position: absolute;\n background: white;\n border-radius: 50%;\n opacity: 0;\n transition: opacity 0.6s ease;\n}\n\n.dark .star {\n opacity: 1;\n}\n\n/* Stars - Size variants */\n.small .star1 {\n width: 1px;\n height: 1px;\n top: 5px;\n left: 12px;\n}\n\n.small .star2 {\n width: 1px;\n height: 1px;\n top: 9px;\n right: 15px;\n}\n\n.small .star3 {\n width: 1px;\n height: 1px;\n bottom: 7px;\n left: 20px;\n}\n\n.small .star4 {\n width: 0.75px;\n height: 0.75px;\n top: 12px;\n left: 7px;\n}\n\n.small .star5 {\n width: 1px;\n height: 1px;\n bottom: 10px;\n right: 17px;\n}\n\n.small .star6 {\n width: 0.5px;\n height: 0.5px;\n top: 17px;\n right: 10px;\n}\n\n.small .star7 {\n width: 0.75px;\n height: 0.75px;\n bottom: 12px;\n left: 10px;\n}\n\n.small .star8 {\n width: 0.5px;\n height: 0.5px;\n top: 6px;\n right: 7px;\n}\n\n.medium .star1 {\n width: 1.5px;\n height: 1.5px;\n top: 7.5px;\n left: 19px;\n}\n\n.medium .star2 {\n width: 1.5px;\n height: 1.5px;\n top: 13.5px;\n right: 22.5px;\n}\n\n.medium .star3 {\n width: 1.5px;\n height: 1.5px;\n bottom: 11px;\n left: 30px;\n}\n\n.medium .star4 {\n width: 1.13px;\n height: 1.13px;\n top: 19px;\n left: 11px;\n}\n\n.medium .star5 {\n width: 1.5px;\n height: 1.5px;\n bottom: 15px;\n right: 26px;\n}\n\n.medium .star6 {\n width: 0.75px;\n height: 0.75px;\n top: 26px;\n right: 15px;\n}\n\n.medium .star7 {\n width: 1.13px;\n height: 1.13px;\n bottom: 19px;\n left: 15px;\n}\n\n.medium .star8 {\n width: 0.75px;\n height: 0.75px;\n top: 9px;\n right: 11px;\n}\n\n.large .star1 {\n width: 2px;\n height: 2px;\n top: 10px;\n left: 25px;\n}\n\n.large .star2 {\n width: 2px;\n height: 2px;\n top: 18px;\n right: 30px;\n}\n\n.large .star3 {\n width: 2px;\n height: 2px;\n bottom: 15px;\n left: 40px;\n}\n\n.large .star4 {\n width: 1.5px;\n height: 1.5px;\n top: 25px;\n left: 15px;\n}\n\n.large .star5 {\n width: 2px;\n height: 2px;\n bottom: 20px;\n right: 35px;\n}\n\n.large .star6 {\n width: 1px;\n height: 1px;\n top: 35px;\n right: 20px;\n}\n\n.large .star7 {\n width: 1.5px;\n height: 1.5px;\n bottom: 25px;\n left: 20px;\n}\n\n.large .star8 {\n width: 1px;\n height: 1px;\n top: 12px;\n right: 15px;\n}\n\n.star1 {\n animation: twinkle 3s infinite;\n}\n\n.star2 {\n animation: twinkle 3s infinite 0.5s;\n}\n\n.star3 {\n animation: twinkle 3s infinite 1s;\n}\n\n.star4 {\n animation: twinkle 3s infinite 1.5s;\n}\n\n.star5 {\n animation: twinkle 3s infinite 2s;\n}\n\n.star6 {\n animation: twinkle 3s infinite 2.5s;\n}\n\n.star7 {\n animation: twinkle 3s infinite 0.8s;\n}\n\n.star8 {\n animation: twinkle 3s infinite 1.3s;\n}\n\n@keyframes twinkle {\n 0%,\n 100% {\n opacity: 0.3;\n }\n 50% {\n opacity: 1;\n }\n}\n\n/* Toggle - Size variants */\n.toggle {\n position: absolute;\n border-radius: 50%;\n transition:\n transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),\n background 0.6s cubic-bezier(0.4, 0, 0.2, 1);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.small .toggle {\n width: 24px;\n height: 24px;\n background: linear-gradient(135deg, #ffd700, #ffa500);\n top: 3px;\n left: 3px;\n box-shadow:\n 0 1px 4px rgba(0, 0, 0, 0.2),\n 0 0 10px rgba(255, 215, 0, 0.3);\n}\n\n.medium .toggle {\n width: 36px;\n height: 36px;\n background: linear-gradient(135deg, #ffd700, #ffa500);\n top: 4.5px;\n left: 4.5px;\n box-shadow:\n 0 1.5px 6px rgba(0, 0, 0, 0.2),\n 0 0 15px rgba(255, 215, 0, 0.3);\n}\n\n.large .toggle {\n width: 48px;\n height: 48px;\n background: linear-gradient(135deg, #ffd700, #ffa500);\n top: 6px;\n left: 6px;\n box-shadow:\n 0 2px 8px rgba(0, 0, 0, 0.2),\n 0 0 20px rgba(255, 215, 0, 0.3);\n}\n\n.dark.small .toggle {\n transform: translateX(30px);\n background: linear-gradient(135deg, #f5f5dc, #d3d3d3);\n box-shadow:\n 0 1px 4px rgba(0, 0, 0, 0.3),\n 0 0 10px rgba(245, 245, 220, 0.2);\n}\n\n.dark.medium .toggle {\n transform: translateX(45px);\n background: linear-gradient(135deg, #f5f5dc, #d3d3d3);\n box-shadow:\n 0 1.5px 6px rgba(0, 0, 0, 0.3),\n 0 0 15px rgba(245, 245, 220, 0.2);\n}\n\n.dark.large .toggle {\n transform: translateX(60px);\n background: linear-gradient(135deg, #f5f5dc, #d3d3d3);\n box-shadow:\n 0 2px 8px rgba(0, 0, 0, 0.3),\n 0 0 20px rgba(245, 245, 220, 0.2);\n}\n\n/* Sun */\n.sun {\n position: absolute;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 1;\n transform: rotate(0deg) scale(1);\n transition:\n opacity 0.6s ease,\n transform 0.6s ease;\n}\n\n.dark .sun {\n opacity: 0;\n transform: rotate(180deg) scale(0.5);\n}\n\n.large .sunRay:nth-child(7) {\n width: 35px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-22.5deg);\n}\n\n.large .sunRay:nth-child(8) {\n width: 35px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(67.5deg);\n}\n\n.large .sunRay:nth-child(9) {\n width: 35px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-67.5deg);\n}\n\n@keyframes rotateSun {\n from {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n to {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n}\n\n/* Moon */\n.moon {\n position: absolute;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transform: rotate(-180deg) scale(0.5);\n transition:\n opacity 0.6s ease,\n transform 0.6s ease;\n}\n\n.dark .moon {\n opacity: 1;\n transform: rotate(0deg) scale(1);\n}\n\n/* Moon - Size variants */\n.moonCore {\n position: relative;\n border-radius: 50%;\n}\n\n.small .moonCore {\n width: 16px;\n height: 16px;\n background: radial-gradient(circle at 30% 30%, #f5f5dc, #c0c0c0);\n box-shadow:\n inset -1.5px -1.5px 4px rgba(0, 0, 0, 0.2),\n inset 1px 1px 4px rgba(255, 255, 255, 0.3);\n}\n\n.medium .moonCore {\n width: 24px;\n height: 24px;\n background: radial-gradient(circle at 30% 30%, #f5f5dc, #c0c0c0);\n box-shadow:\n inset -2.25px -2.25px 6px rgba(0, 0, 0, 0.2),\n inset 1.5px 1.5px 6px rgba(255, 255, 255, 0.3);\n}\n\n.large .moonCore {\n width: 32px;\n height: 32px;\n background: radial-gradient(circle at 30% 30%, #f5f5dc, #c0c0c0);\n box-shadow:\n inset -3px -3px 8px rgba(0, 0, 0, 0.2),\n inset 2px 2px 8px rgba(255, 255, 255, 0.3);\n}\n\n/* Craters - Size variants */\n.small .crater1 {\n position: absolute;\n width: 3px;\n height: 3px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.4), rgba(105, 105, 105, 0.2));\n border-radius: 50%;\n top: 4px;\n left: 5px;\n box-shadow: inset 0.5px 0.5px 1px rgba(0, 0, 0, 0.2);\n}\n\n.small .crater2 {\n position: absolute;\n width: 2px;\n height: 2px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.3), rgba(105, 105, 105, 0.15));\n border-radius: 50%;\n bottom: 4.5px;\n right: 3.5px;\n box-shadow: inset 0.5px 0.5px 0.5px rgba(0, 0, 0, 0.15);\n}\n\n.small .crater3 {\n position: absolute;\n width: 1.5px;\n height: 1.5px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.25), rgba(105, 105, 105, 0.1));\n border-radius: 50%;\n top: 7.5px;\n right: 5.5px;\n box-shadow: inset 0.25px 0.25px 0.5px rgba(0, 0, 0, 0.1);\n}\n\n.small .crater4 {\n position: absolute;\n width: 2.5px;\n height: 2.5px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.35), rgba(105, 105, 105, 0.18));\n border-radius: 50%;\n bottom: 3px;\n left: 4px;\n box-shadow: inset 0.5px 0.5px 0.75px rgba(0, 0, 0, 0.18);\n}\n\n.medium .crater1 {\n position: absolute;\n width: 4.5px;\n height: 4.5px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.4), rgba(105, 105, 105, 0.2));\n border-radius: 50%;\n top: 6px;\n left: 7.5px;\n box-shadow: inset 0.75px 0.75px 1.5px rgba(0, 0, 0, 0.2);\n}\n\n.medium .crater2 {\n position: absolute;\n width: 3px;\n height: 3px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.3), rgba(105, 105, 105, 0.15));\n border-radius: 50%;\n bottom: 6.75px;\n right: 5.25px;\n box-shadow: inset 0.75px 0.75px 0.75px rgba(0, 0, 0, 0.15);\n}\n\n.medium .crater3 {\n position: absolute;\n width: 2.25px;\n height: 2.25px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.25), rgba(105, 105, 105, 0.1));\n border-radius: 50%;\n top: 11.25px;\n right: 8.25px;\n box-shadow: inset 0.375px 0.375px 0.75px rgba(0, 0, 0, 0.1);\n}\n\n.medium .crater4 {\n position: absolute;\n width: 3.75px;\n height: 3.75px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.35), rgba(105, 105, 105, 0.18));\n border-radius: 50%;\n bottom: 4.5px;\n left: 6px;\n box-shadow: inset 0.75px 0.75px 1.125px rgba(0, 0, 0, 0.18);\n}\n\n.large .crater1 {\n position: absolute;\n width: 6px;\n height: 6px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.4), rgba(105, 105, 105, 0.2));\n border-radius: 50%;\n top: 8px;\n left: 10px;\n box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);\n}\n\n.large .crater2 {\n position: absolute;\n width: 4px;\n height: 4px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.3), rgba(105, 105, 105, 0.15));\n border-radius: 50%;\n bottom: 9px;\n right: 7px;\n box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.15);\n}\n\n.large .crater3 {\n position: absolute;\n width: 3px;\n height: 3px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.25), rgba(105, 105, 105, 0.1));\n border-radius: 50%;\n top: 15px;\n right: 11px;\n box-shadow: inset 0.5px 0.5px 1px rgba(0, 0, 0, 0.1);\n}\n\n.large .crater4 {\n position: absolute;\n width: 5px;\n height: 5px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.35), rgba(105, 105, 105, 0.18));\n border-radius: 50%;\n bottom: 6px;\n left: 8px;\n box-shadow: inset 1px 1px 1.5px rgba(0, 0, 0, 0.18);\n}\n","import React from 'react';\n\nimport styles from './ThemeSwitch.module.css';\n\n/**\n * Props for the ThemeSwitch component\n */\nexport interface ThemeSwitchProps {\n /** Whether dark mode is currently enabled */\n enableDarkMode: boolean;\n /** Callback function to update the dark mode state */\n setEnableDarkMode: (value: boolean) => void;\n /** Size variant of the switch. Defaults to 'large' */\n size?: 'small' | 'medium' | 'large';\n}\n\n/**\n * ThemeSwitch Component\n *\n * An animated toggle switch for switching between light and dark themes.\n * Features sun/moon icons with animated clouds (light mode) and stars (dark mode).\n *\n * @component\n * @example\n * ```tsx\n * const [darkMode, setDarkMode] = useState(false);\n * <ThemeSwitch\n * enableDarkMode={darkMode}\n * setEnableDarkMode={setDarkMode}\n * size=\"medium\"\n * />\n * ```\n */\nconst ThemeSwitch: React.FC<ThemeSwitchProps> = ({\n enableDarkMode,\n setEnableDarkMode,\n size = 'large'\n}) => {\n const handleToggle = () => {\n setEnableDarkMode(!enableDarkMode);\n };\n\n return (\n <div\n className={`${styles.switchContainer} ${styles[size]} ${\n enableDarkMode ? styles.dark : styles.light\n }`}\n onClick={handleToggle}\n role=\"button\"\n tabIndex={0}\n aria-label={`Switch to ${enableDarkMode ? 'light' : 'dark'} mode`}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n handleToggle();\n }\n }}\n >\n {/* Background elements */}\n <div className={styles.background}>\n {/* Clouds for light mode */}\n <div className={`${styles.cloud} ${styles.cloud1}`}></div>\n <div className={`${styles.cloud} ${styles.cloud2}`}></div>\n <div className={`${styles.cloud} ${styles.cloud3}`}></div>\n\n {/* Stars for dark mode */}\n <div className={`${styles.star} ${styles.star1}`}></div>\n <div className={`${styles.star} ${styles.star2}`}></div>\n <div className={`${styles.star} ${styles.star3}`}></div>\n <div className={`${styles.star} ${styles.star4}`}></div>\n <div className={`${styles.star} ${styles.star5}`}></div>\n <div className={`${styles.star} ${styles.star6}`}></div>\n <div className={`${styles.star} ${styles.star7}`}></div>\n <div className={`${styles.star} ${styles.star8}`}></div>\n </div>\n\n {/* Toggle circle with sun/moon */}\n <div className={styles.toggle}>\n {/* Sun */}\n <div className={styles.sun}>\n <div className={styles.sunCore}>\n <div className={styles.sunspot1}></div>\n <div className={styles.sunspot2}></div>\n <div className={styles.sunspot3}></div>\n </div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n </div>\n\n {/* Moon */}\n <div className={styles.moon}>\n <div className={styles.moonCore}>\n <div className={styles.crater1}></div>\n <div className={styles.crater2}></div>\n <div className={styles.crater3}></div>\n <div className={styles.crater4}></div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default ThemeSwitch;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCiCM,KAA2C,EAC/C,mBACA,sBACA,UAAO,cACH;CACJ,IAAM,UAAqB;AACzB,IAAkB,CAAC,EAAe;;AAGpC,QACE,kBAAC,OAAD;EACE,WAAW,GAAG,EAAO,gBAAgB,GAAG,EAAO,GAAM,GACnD,IAAiB,EAAO,OAAO,EAAO;EAExC,SAAS;EACT,MAAK;EACL,UAAU;EACV,cAAY,aAAa,IAAiB,UAAU,OAAO;EAC3D,YAAY,MAAM;AAChB,IAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,QACjC,GAAc;;YAVpB,CAeE,kBAAC,OAAD;GAAK,WAAW,EAAO;aAAvB;IAEE,kBAAC,OAAD,EAAK,WAAW,GAAG,EAAO,MAAM,GAAG,EAAO,UAAgB,CAAA;IAC1D,kBAAC,OAAD,EAAK,WAAW,GAAG,EAAO,MAAM,GAAG,EAAO,UAAgB,CAAA;IAC1D,kBAAC,OAAD,EAAK,WAAW,GAAG,EAAO,MAAM,GAAG,EAAO,UAAgB,CAAA;IAG1D,kBAAC,OAAD,EAAK,WAAW,GAAG,EAAO,KAAK,GAAG,EAAO,SAAe,CAAA;IACxD,kBAAC,OAAD,EAAK,WAAW,GAAG,EAAO,KAAK,GAAG,EAAO,SAAe,CAAA;IACxD,kBAAC,OAAD,EAAK,WAAW,GAAG,EAAO,KAAK,GAAG,EAAO,SAAe,CAAA;IACxD,kBAAC,OAAD,EAAK,WAAW,GAAG,EAAO,KAAK,GAAG,EAAO,SAAe,CAAA;IACxD,kBAAC,OAAD,EAAK,WAAW,GAAG,EAAO,KAAK,GAAG,EAAO,SAAe,CAAA;IACxD,kBAAC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 @@
|
|
|
1
|
+
require('./ThemeSwitch.css');const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react`);t=e.t(t);let n=require(`react/jsx-runtime`);var r={sunCore:`ThemeSwitch-module__sunCore___tUhud`,small:`ThemeSwitch-module__small___YlvWo`,medium:`ThemeSwitch-module__medium___Q8Rro`,large:`ThemeSwitch-module__large___BMOxC`,sunspot1:`ThemeSwitch-module__sunspot1___8RI1V`,sunspot2:`ThemeSwitch-module__sunspot2___U0whF`,sunspot3:`ThemeSwitch-module__sunspot3___kWYEI`,sunRay:`ThemeSwitch-module__sunRay___t1B4U`,rotateSun:`ThemeSwitch-module__rotateSun___JQByd`,switchContainer:`ThemeSwitch-module__switchContainer___VENjU`,dark:`ThemeSwitch-module__dark___a4vSn`,background:`ThemeSwitch-module__background___Rpodp`,cloud:`ThemeSwitch-module__cloud___OoOyx`,light:`ThemeSwitch-module__light___ddTa2`,cloud1:`ThemeSwitch-module__cloud1___aqGNx`,floatCloud1:`ThemeSwitch-module__floatCloud1___MdWMj`,cloud2:`ThemeSwitch-module__cloud2___guY71`,floatCloud2:`ThemeSwitch-module__floatCloud2___2x6Sp`,cloud3:`ThemeSwitch-module__cloud3___7-NhR`,floatCloud3:`ThemeSwitch-module__floatCloud3___FJCbV`,star:`ThemeSwitch-module__star___Z98bU`,star1:`ThemeSwitch-module__star1___rhotb`,star2:`ThemeSwitch-module__star2___pzbNR`,star3:`ThemeSwitch-module__star3___iK7lJ`,star4:`ThemeSwitch-module__star4___t5pqN`,star5:`ThemeSwitch-module__star5___dx42N`,star6:`ThemeSwitch-module__star6___wur-I`,star7:`ThemeSwitch-module__star7___KONgd`,star8:`ThemeSwitch-module__star8___gIYpk`,twinkle:`ThemeSwitch-module__twinkle___Abun5`,toggle:`ThemeSwitch-module__toggle___L5FGS`,sun:`ThemeSwitch-module__sun___s8noI`,moon:`ThemeSwitch-module__moon___TNpFJ`,moonCore:`ThemeSwitch-module__moonCore___svwjb`,crater1:`ThemeSwitch-module__crater1___swpHc`,crater2:`ThemeSwitch-module__crater2___WQVKR`,crater3:`ThemeSwitch-module__crater3___F-KJu`,crater4:`ThemeSwitch-module__crater4___ZsIb7`},i=({enableDarkMode:e,setEnableDarkMode:t,size:i=`large`})=>{let a=()=>{t(!e)};return(0,n.jsxs)(`div`,{className:`${r.switchContainer} ${r[i]} ${e?r.dark:r.light}`,onClick:a,role:`button`,tabIndex:0,"aria-label":`Switch to ${e?`light`:`dark`} mode`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&a()},children:[(0,n.jsxs)(`div`,{className:r.background,children:[(0,n.jsx)(`div`,{className:`${r.cloud} ${r.cloud1}`}),(0,n.jsx)(`div`,{className:`${r.cloud} ${r.cloud2}`}),(0,n.jsx)(`div`,{className:`${r.cloud} ${r.cloud3}`}),(0,n.jsx)(`div`,{className:`${r.star} ${r.star1}`}),(0,n.jsx)(`div`,{className:`${r.star} ${r.star2}`}),(0,n.jsx)(`div`,{className:`${r.star} ${r.star3}`}),(0,n.jsx)(`div`,{className:`${r.star} ${r.star4}`}),(0,n.jsx)(`div`,{className:`${r.star} ${r.star5}`}),(0,n.jsx)(`div`,{className:`${r.star} ${r.star6}`}),(0,n.jsx)(`div`,{className:`${r.star} ${r.star7}`}),(0,n.jsx)(`div`,{className:`${r.star} ${r.star8}`})]}),(0,n.jsxs)(`div`,{className:r.toggle,children:[(0,n.jsxs)(`div`,{className:r.sun,children:[(0,n.jsxs)(`div`,{className:r.sunCore,children:[(0,n.jsx)(`div`,{className:r.sunspot1}),(0,n.jsx)(`div`,{className:r.sunspot2}),(0,n.jsx)(`div`,{className:r.sunspot3})]}),(0,n.jsx)(`div`,{className:r.sunRay}),(0,n.jsx)(`div`,{className:r.sunRay}),(0,n.jsx)(`div`,{className:r.sunRay}),(0,n.jsx)(`div`,{className:r.sunRay}),(0,n.jsx)(`div`,{className:r.sunRay}),(0,n.jsx)(`div`,{className:r.sunRay}),(0,n.jsx)(`div`,{className:r.sunRay}),(0,n.jsx)(`div`,{className:r.sunRay})]}),(0,n.jsx)(`div`,{className:r.moon,children:(0,n.jsxs)(`div`,{className:r.moonCore,children:[(0,n.jsx)(`div`,{className:r.crater1}),(0,n.jsx)(`div`,{className:r.crater2}),(0,n.jsx)(`div`,{className:r.crater3}),(0,n.jsx)(`div`,{className:r.crater4})]})})]})]})};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
2
|
+
//# sourceMappingURL=ThemeSwitch-Cn7-KsSv.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeSwitch-Cn7-KsSv.cjs","names":[],"sources":["../src/components/ThemeSwitch/ThemeSwitch.module.css","../src/components/ThemeSwitch/ThemeSwitch.tsx"],"sourcesContent":["/* Sun - Size variants */\n.sunCore {\n position: relative;\n background: radial-gradient(circle, #ffd700, #ffa500);\n border-radius: 50%;\n}\n\n.small .sunCore {\n width: 16px;\n height: 16px;\n box-shadow: inset -1px -1px 2px rgba(255, 140, 0, 0.5);\n}\n\n.medium .sunCore {\n width: 24px;\n height: 24px;\n box-shadow: inset -1.5px -1.5px 3px rgba(255, 140, 0, 0.5);\n}\n\n.large .sunCore {\n width: 32px;\n height: 32px;\n box-shadow: inset -2px -2px 4px rgba(255, 140, 0, 0.5);\n}\n\n/* Sunspots - Size variants */\n.small .sunspot1 {\n position: absolute;\n width: 2px;\n height: 2px;\n background: rgba(255, 140, 0, 0.6);\n border-radius: 50%;\n top: 4px;\n left: 5px;\n}\n\n.small .sunspot2 {\n position: absolute;\n width: 1.5px;\n height: 1.5px;\n background: rgba(255, 140, 0, 0.5);\n border-radius: 50%;\n bottom: 5px;\n right: 4px;\n}\n\n.small .sunspot3 {\n position: absolute;\n width: 1px;\n height: 1px;\n background: rgba(255, 140, 0, 0.4);\n border-radius: 50%;\n top: 6px;\n right: 6px;\n}\n\n.medium .sunspot1 {\n position: absolute;\n width: 3px;\n height: 3px;\n background: rgba(255, 140, 0, 0.6);\n border-radius: 50%;\n top: 6px;\n left: 7.5px;\n}\n\n.medium .sunspot2 {\n position: absolute;\n width: 2.25px;\n height: 2.25px;\n background: rgba(255, 140, 0, 0.5);\n border-radius: 50%;\n bottom: 7.5px;\n right: 6px;\n}\n\n.medium .sunspot3 {\n position: absolute;\n width: 1.5px;\n height: 1.5px;\n background: rgba(255, 140, 0, 0.4);\n border-radius: 50%;\n top: 9px;\n right: 9px;\n}\n\n.large .sunspot1 {\n position: absolute;\n width: 4px;\n height: 4px;\n background: rgba(255, 140, 0, 0.6);\n border-radius: 50%;\n top: 8px;\n left: 10px;\n}\n\n.large .sunspot2 {\n position: absolute;\n width: 3px;\n height: 3px;\n background: rgba(255, 140, 0, 0.5);\n border-radius: 50%;\n bottom: 10px;\n right: 8px;\n}\n\n.large .sunspot3 {\n position: absolute;\n width: 2px;\n height: 2px;\n background: rgba(255, 140, 0, 0.4);\n border-radius: 50%;\n top: 12px;\n right: 12px;\n}\n\n/* Sun rays - Size adjustments */\n.small .sunRay {\n position: absolute;\n background: linear-gradient(90deg, transparent, #ffd700, transparent);\n animation: rotateSun 10s linear infinite;\n}\n\n.small .sunRay:nth-child(2) {\n width: 20px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.small .sunRay:nth-child(3) {\n width: 1px;\n height: 20px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.small .sunRay:nth-child(4) {\n width: 20px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(45deg);\n}\n\n.small .sunRay:nth-child(5) {\n width: 20px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.small .sunRay:nth-child(6),\n.small .sunRay:nth-child(7),\n.small .sunRay:nth-child(8),\n.small .sunRay:nth-child(9) {\n display: none;\n}\n\n.medium .sunRay {\n position: absolute;\n background: linear-gradient(90deg, transparent, #ffd700, transparent);\n animation: rotateSun 10s linear infinite;\n}\n\n.medium .sunRay:nth-child(2) {\n width: 30px;\n height: 1.5px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.medium .sunRay:nth-child(3) {\n width: 1.5px;\n height: 30px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.medium .sunRay:nth-child(4) {\n width: 30px;\n height: 1.5px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(45deg);\n}\n\n.medium .sunRay:nth-child(5) {\n width: 30px;\n height: 1.5px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.medium .sunRay:nth-child(6) {\n width: 26px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(22.5deg);\n}\n\n.medium .sunRay:nth-child(7) {\n width: 26px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-22.5deg);\n}\n\n.medium .sunRay:nth-child(8),\n.medium .sunRay:nth-child(9) {\n display: none;\n}\n\n.large .sunRay {\n position: absolute;\n background: linear-gradient(90deg, transparent, #ffd700, transparent);\n animation: rotateSun 10s linear infinite;\n}\n\n.large .sunRay:nth-child(2) {\n width: 40px;\n height: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.large .sunRay:nth-child(3) {\n width: 2px;\n height: 40px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.large .sunRay:nth-child(4) {\n width: 40px;\n height: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(45deg);\n}\n\n.large .sunRay:nth-child(5) {\n width: 40px;\n height: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.large .sunRay:nth-child(6) {\n width: 35px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(22.5deg);\n}\n\n.large .sunRay:nth-child(7) {\n width: 35px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-22.5deg);\n}\n\n/* Base container styles */\n.switchContainer {\n position: relative;\n background: linear-gradient(135deg, #87ceeb, #add8e6);\n border-radius: 30px;\n cursor: pointer;\n overflow: hidden;\n transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);\n box-shadow:\n inset 0 2px 8px rgba(0, 0, 0, 0.1),\n 0 4px 12px rgba(0, 0, 0, 0.15);\n user-select: none;\n}\n\n/* Size variants */\n.switchContainer.small {\n width: 60px;\n height: 30px;\n border-radius: 15px;\n}\n\n.switchContainer.medium {\n width: 90px;\n height: 45px;\n border-radius: 22.5px;\n}\n\n.switchContainer.large {\n width: 120px;\n height: 60px;\n border-radius: 30px;\n}\n\n.switchContainer:focus {\n outline: 2px solid #4a90e2;\n outline-offset: 2px;\n}\n\n.switchContainer.dark {\n background: linear-gradient(135deg, #1a1a3e, #0a0a1f);\n}\n\n.background {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n pointer-events: none;\n}\n\n/* Clouds - Base styles */\n.cloud {\n position: absolute;\n background: rgba(255, 255, 255, 0.4);\n border-radius: 100px;\n opacity: 0;\n transition: opacity 0.6s ease;\n}\n\n.light .cloud {\n opacity: 1;\n}\n\n.cloud::before,\n.cloud::after {\n content: '';\n position: absolute;\n background: rgba(255, 255, 255, 0.4);\n border-radius: 100px;\n}\n\n/* Cloud 1 - Size variants */\n.small .cloud1 {\n width: 12px;\n height: 4px;\n top: 7px;\n left: 10px;\n}\n\n.small .cloud1::before {\n width: 5px;\n height: 5px;\n top: -2.5px;\n left: 2.5px;\n}\n\n.small .cloud1::after {\n width: 6px;\n height: 4px;\n top: -1.5px;\n right: 2.5px;\n}\n\n.medium .cloud1 {\n width: 19px;\n height: 6px;\n top: 11px;\n left: 15px;\n}\n\n.medium .cloud1::before {\n width: 7.5px;\n height: 7.5px;\n top: -3.75px;\n left: 3.75px;\n}\n\n.medium .cloud1::after {\n width: 9px;\n height: 6px;\n top: -2.25px;\n right: 3.75px;\n}\n\n.large .cloud1 {\n width: 25px;\n height: 8px;\n top: 15px;\n left: 20px;\n}\n\n.large .cloud1::before {\n width: 10px;\n height: 10px;\n top: -5px;\n left: 5px;\n}\n\n.large .cloud1::after {\n width: 12px;\n height: 8px;\n top: -3px;\n right: 5px;\n}\n\n.cloud1 {\n animation: floatCloud1 12s infinite ease-in-out;\n}\n\n/* Cloud 2 - Size variants */\n.small .cloud2 {\n width: 10px;\n height: 3px;\n top: 17px;\n right: 12px;\n}\n\n.small .cloud2::before {\n width: 4px;\n height: 4px;\n top: -2px;\n left: 1.5px;\n}\n\n.medium .cloud2 {\n width: 15px;\n height: 4.5px;\n top: 26px;\n right: 19px;\n}\n\n.medium .cloud2::before {\n width: 6px;\n height: 6px;\n top: -3px;\n left: 2.25px;\n}\n\n.large .cloud2 {\n width: 20px;\n height: 6px;\n top: 35px;\n right: 25px;\n}\n\n.large .cloud2::before {\n width: 8px;\n height: 8px;\n top: -4px;\n left: 3px;\n}\n\n.cloud2 {\n animation: floatCloud2 15s infinite ease-in-out;\n}\n\n/* Cloud 3 - Size variants */\n.small .cloud3 {\n width: 9px;\n height: 2.5px;\n bottom: 9px;\n left: 17px;\n}\n\n.small .cloud3::after {\n width: 5px;\n height: 3px;\n top: -1.5px;\n right: 1.5px;\n}\n\n.medium .cloud3 {\n width: 13.5px;\n height: 3.75px;\n bottom: 13.5px;\n left: 26px;\n}\n\n.medium .cloud3::after {\n width: 7.5px;\n height: 4.5px;\n top: -2.25px;\n right: 2.25px;\n}\n\n.large .cloud3 {\n width: 18px;\n height: 5px;\n bottom: 18px;\n left: 35px;\n}\n\n.large .cloud3::after {\n width: 10px;\n height: 6px;\n top: -3px;\n right: 3px;\n}\n\n.cloud3 {\n animation: floatCloud3 18s infinite ease-in-out;\n}\n\n@keyframes floatCloud1 {\n 0%,\n 100% {\n transform: translateX(0);\n }\n 50% {\n transform: translateX(5px);\n }\n}\n\n@keyframes floatCloud2 {\n 0%,\n 100% {\n transform: translateX(0);\n }\n 50% {\n transform: translateX(-3px);\n }\n}\n\n@keyframes floatCloud3 {\n 0%,\n 100% {\n transform: translateX(0);\n }\n 50% {\n transform: translateX(4px);\n }\n}\n\n/* Stars - Base styles */\n.star {\n position: absolute;\n background: white;\n border-radius: 50%;\n opacity: 0;\n transition: opacity 0.6s ease;\n}\n\n.dark .star {\n opacity: 1;\n}\n\n/* Stars - Size variants */\n.small .star1 {\n width: 1px;\n height: 1px;\n top: 5px;\n left: 12px;\n}\n\n.small .star2 {\n width: 1px;\n height: 1px;\n top: 9px;\n right: 15px;\n}\n\n.small .star3 {\n width: 1px;\n height: 1px;\n bottom: 7px;\n left: 20px;\n}\n\n.small .star4 {\n width: 0.75px;\n height: 0.75px;\n top: 12px;\n left: 7px;\n}\n\n.small .star5 {\n width: 1px;\n height: 1px;\n bottom: 10px;\n right: 17px;\n}\n\n.small .star6 {\n width: 0.5px;\n height: 0.5px;\n top: 17px;\n right: 10px;\n}\n\n.small .star7 {\n width: 0.75px;\n height: 0.75px;\n bottom: 12px;\n left: 10px;\n}\n\n.small .star8 {\n width: 0.5px;\n height: 0.5px;\n top: 6px;\n right: 7px;\n}\n\n.medium .star1 {\n width: 1.5px;\n height: 1.5px;\n top: 7.5px;\n left: 19px;\n}\n\n.medium .star2 {\n width: 1.5px;\n height: 1.5px;\n top: 13.5px;\n right: 22.5px;\n}\n\n.medium .star3 {\n width: 1.5px;\n height: 1.5px;\n bottom: 11px;\n left: 30px;\n}\n\n.medium .star4 {\n width: 1.13px;\n height: 1.13px;\n top: 19px;\n left: 11px;\n}\n\n.medium .star5 {\n width: 1.5px;\n height: 1.5px;\n bottom: 15px;\n right: 26px;\n}\n\n.medium .star6 {\n width: 0.75px;\n height: 0.75px;\n top: 26px;\n right: 15px;\n}\n\n.medium .star7 {\n width: 1.13px;\n height: 1.13px;\n bottom: 19px;\n left: 15px;\n}\n\n.medium .star8 {\n width: 0.75px;\n height: 0.75px;\n top: 9px;\n right: 11px;\n}\n\n.large .star1 {\n width: 2px;\n height: 2px;\n top: 10px;\n left: 25px;\n}\n\n.large .star2 {\n width: 2px;\n height: 2px;\n top: 18px;\n right: 30px;\n}\n\n.large .star3 {\n width: 2px;\n height: 2px;\n bottom: 15px;\n left: 40px;\n}\n\n.large .star4 {\n width: 1.5px;\n height: 1.5px;\n top: 25px;\n left: 15px;\n}\n\n.large .star5 {\n width: 2px;\n height: 2px;\n bottom: 20px;\n right: 35px;\n}\n\n.large .star6 {\n width: 1px;\n height: 1px;\n top: 35px;\n right: 20px;\n}\n\n.large .star7 {\n width: 1.5px;\n height: 1.5px;\n bottom: 25px;\n left: 20px;\n}\n\n.large .star8 {\n width: 1px;\n height: 1px;\n top: 12px;\n right: 15px;\n}\n\n.star1 {\n animation: twinkle 3s infinite;\n}\n\n.star2 {\n animation: twinkle 3s infinite 0.5s;\n}\n\n.star3 {\n animation: twinkle 3s infinite 1s;\n}\n\n.star4 {\n animation: twinkle 3s infinite 1.5s;\n}\n\n.star5 {\n animation: twinkle 3s infinite 2s;\n}\n\n.star6 {\n animation: twinkle 3s infinite 2.5s;\n}\n\n.star7 {\n animation: twinkle 3s infinite 0.8s;\n}\n\n.star8 {\n animation: twinkle 3s infinite 1.3s;\n}\n\n@keyframes twinkle {\n 0%,\n 100% {\n opacity: 0.3;\n }\n 50% {\n opacity: 1;\n }\n}\n\n/* Toggle - Size variants */\n.toggle {\n position: absolute;\n border-radius: 50%;\n transition:\n transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),\n background 0.6s cubic-bezier(0.4, 0, 0.2, 1);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.small .toggle {\n width: 24px;\n height: 24px;\n background: linear-gradient(135deg, #ffd700, #ffa500);\n top: 3px;\n left: 3px;\n box-shadow:\n 0 1px 4px rgba(0, 0, 0, 0.2),\n 0 0 10px rgba(255, 215, 0, 0.3);\n}\n\n.medium .toggle {\n width: 36px;\n height: 36px;\n background: linear-gradient(135deg, #ffd700, #ffa500);\n top: 4.5px;\n left: 4.5px;\n box-shadow:\n 0 1.5px 6px rgba(0, 0, 0, 0.2),\n 0 0 15px rgba(255, 215, 0, 0.3);\n}\n\n.large .toggle {\n width: 48px;\n height: 48px;\n background: linear-gradient(135deg, #ffd700, #ffa500);\n top: 6px;\n left: 6px;\n box-shadow:\n 0 2px 8px rgba(0, 0, 0, 0.2),\n 0 0 20px rgba(255, 215, 0, 0.3);\n}\n\n.dark.small .toggle {\n transform: translateX(30px);\n background: linear-gradient(135deg, #f5f5dc, #d3d3d3);\n box-shadow:\n 0 1px 4px rgba(0, 0, 0, 0.3),\n 0 0 10px rgba(245, 245, 220, 0.2);\n}\n\n.dark.medium .toggle {\n transform: translateX(45px);\n background: linear-gradient(135deg, #f5f5dc, #d3d3d3);\n box-shadow:\n 0 1.5px 6px rgba(0, 0, 0, 0.3),\n 0 0 15px rgba(245, 245, 220, 0.2);\n}\n\n.dark.large .toggle {\n transform: translateX(60px);\n background: linear-gradient(135deg, #f5f5dc, #d3d3d3);\n box-shadow:\n 0 2px 8px rgba(0, 0, 0, 0.3),\n 0 0 20px rgba(245, 245, 220, 0.2);\n}\n\n/* Sun */\n.sun {\n position: absolute;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 1;\n transform: rotate(0deg) scale(1);\n transition:\n opacity 0.6s ease,\n transform 0.6s ease;\n}\n\n.dark .sun {\n opacity: 0;\n transform: rotate(180deg) scale(0.5);\n}\n\n.large .sunRay:nth-child(7) {\n width: 35px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-22.5deg);\n}\n\n.large .sunRay:nth-child(8) {\n width: 35px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(67.5deg);\n}\n\n.large .sunRay:nth-child(9) {\n width: 35px;\n height: 1px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) rotate(-67.5deg);\n}\n\n@keyframes rotateSun {\n from {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n to {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n}\n\n/* Moon */\n.moon {\n position: absolute;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transform: rotate(-180deg) scale(0.5);\n transition:\n opacity 0.6s ease,\n transform 0.6s ease;\n}\n\n.dark .moon {\n opacity: 1;\n transform: rotate(0deg) scale(1);\n}\n\n/* Moon - Size variants */\n.moonCore {\n position: relative;\n border-radius: 50%;\n}\n\n.small .moonCore {\n width: 16px;\n height: 16px;\n background: radial-gradient(circle at 30% 30%, #f5f5dc, #c0c0c0);\n box-shadow:\n inset -1.5px -1.5px 4px rgba(0, 0, 0, 0.2),\n inset 1px 1px 4px rgba(255, 255, 255, 0.3);\n}\n\n.medium .moonCore {\n width: 24px;\n height: 24px;\n background: radial-gradient(circle at 30% 30%, #f5f5dc, #c0c0c0);\n box-shadow:\n inset -2.25px -2.25px 6px rgba(0, 0, 0, 0.2),\n inset 1.5px 1.5px 6px rgba(255, 255, 255, 0.3);\n}\n\n.large .moonCore {\n width: 32px;\n height: 32px;\n background: radial-gradient(circle at 30% 30%, #f5f5dc, #c0c0c0);\n box-shadow:\n inset -3px -3px 8px rgba(0, 0, 0, 0.2),\n inset 2px 2px 8px rgba(255, 255, 255, 0.3);\n}\n\n/* Craters - Size variants */\n.small .crater1 {\n position: absolute;\n width: 3px;\n height: 3px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.4), rgba(105, 105, 105, 0.2));\n border-radius: 50%;\n top: 4px;\n left: 5px;\n box-shadow: inset 0.5px 0.5px 1px rgba(0, 0, 0, 0.2);\n}\n\n.small .crater2 {\n position: absolute;\n width: 2px;\n height: 2px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.3), rgba(105, 105, 105, 0.15));\n border-radius: 50%;\n bottom: 4.5px;\n right: 3.5px;\n box-shadow: inset 0.5px 0.5px 0.5px rgba(0, 0, 0, 0.15);\n}\n\n.small .crater3 {\n position: absolute;\n width: 1.5px;\n height: 1.5px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.25), rgba(105, 105, 105, 0.1));\n border-radius: 50%;\n top: 7.5px;\n right: 5.5px;\n box-shadow: inset 0.25px 0.25px 0.5px rgba(0, 0, 0, 0.1);\n}\n\n.small .crater4 {\n position: absolute;\n width: 2.5px;\n height: 2.5px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.35), rgba(105, 105, 105, 0.18));\n border-radius: 50%;\n bottom: 3px;\n left: 4px;\n box-shadow: inset 0.5px 0.5px 0.75px rgba(0, 0, 0, 0.18);\n}\n\n.medium .crater1 {\n position: absolute;\n width: 4.5px;\n height: 4.5px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.4), rgba(105, 105, 105, 0.2));\n border-radius: 50%;\n top: 6px;\n left: 7.5px;\n box-shadow: inset 0.75px 0.75px 1.5px rgba(0, 0, 0, 0.2);\n}\n\n.medium .crater2 {\n position: absolute;\n width: 3px;\n height: 3px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.3), rgba(105, 105, 105, 0.15));\n border-radius: 50%;\n bottom: 6.75px;\n right: 5.25px;\n box-shadow: inset 0.75px 0.75px 0.75px rgba(0, 0, 0, 0.15);\n}\n\n.medium .crater3 {\n position: absolute;\n width: 2.25px;\n height: 2.25px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.25), rgba(105, 105, 105, 0.1));\n border-radius: 50%;\n top: 11.25px;\n right: 8.25px;\n box-shadow: inset 0.375px 0.375px 0.75px rgba(0, 0, 0, 0.1);\n}\n\n.medium .crater4 {\n position: absolute;\n width: 3.75px;\n height: 3.75px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.35), rgba(105, 105, 105, 0.18));\n border-radius: 50%;\n bottom: 4.5px;\n left: 6px;\n box-shadow: inset 0.75px 0.75px 1.125px rgba(0, 0, 0, 0.18);\n}\n\n.large .crater1 {\n position: absolute;\n width: 6px;\n height: 6px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.4), rgba(105, 105, 105, 0.2));\n border-radius: 50%;\n top: 8px;\n left: 10px;\n box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);\n}\n\n.large .crater2 {\n position: absolute;\n width: 4px;\n height: 4px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.3), rgba(105, 105, 105, 0.15));\n border-radius: 50%;\n bottom: 9px;\n right: 7px;\n box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.15);\n}\n\n.large .crater3 {\n position: absolute;\n width: 3px;\n height: 3px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.25), rgba(105, 105, 105, 0.1));\n border-radius: 50%;\n top: 15px;\n right: 11px;\n box-shadow: inset 0.5px 0.5px 1px rgba(0, 0, 0, 0.1);\n}\n\n.large .crater4 {\n position: absolute;\n width: 5px;\n height: 5px;\n background: radial-gradient(circle, rgba(128, 128, 128, 0.35), rgba(105, 105, 105, 0.18));\n border-radius: 50%;\n bottom: 6px;\n left: 8px;\n box-shadow: inset 1px 1px 1.5px rgba(0, 0, 0, 0.18);\n}\n","import React from 'react';\n\nimport styles from './ThemeSwitch.module.css';\n\n/**\n * Props for the ThemeSwitch component\n */\nexport interface ThemeSwitchProps {\n /** Whether dark mode is currently enabled */\n enableDarkMode: boolean;\n /** Callback function to update the dark mode state */\n setEnableDarkMode: (value: boolean) => void;\n /** Size variant of the switch. Defaults to 'large' */\n size?: 'small' | 'medium' | 'large';\n}\n\n/**\n * ThemeSwitch Component\n *\n * An animated toggle switch for switching between light and dark themes.\n * Features sun/moon icons with animated clouds (light mode) and stars (dark mode).\n *\n * @component\n * @example\n * ```tsx\n * const [darkMode, setDarkMode] = useState(false);\n * <ThemeSwitch\n * enableDarkMode={darkMode}\n * setEnableDarkMode={setDarkMode}\n * size=\"medium\"\n * />\n * ```\n */\nconst ThemeSwitch: React.FC<ThemeSwitchProps> = ({\n enableDarkMode,\n setEnableDarkMode,\n size = 'large'\n}) => {\n const handleToggle = () => {\n setEnableDarkMode(!enableDarkMode);\n };\n\n return (\n <div\n className={`${styles.switchContainer} ${styles[size]} ${\n enableDarkMode ? styles.dark : styles.light\n }`}\n onClick={handleToggle}\n role=\"button\"\n tabIndex={0}\n aria-label={`Switch to ${enableDarkMode ? 'light' : 'dark'} mode`}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n handleToggle();\n }\n }}\n >\n {/* Background elements */}\n <div className={styles.background}>\n {/* Clouds for light mode */}\n <div className={`${styles.cloud} ${styles.cloud1}`}></div>\n <div className={`${styles.cloud} ${styles.cloud2}`}></div>\n <div className={`${styles.cloud} ${styles.cloud3}`}></div>\n\n {/* Stars for dark mode */}\n <div className={`${styles.star} ${styles.star1}`}></div>\n <div className={`${styles.star} ${styles.star2}`}></div>\n <div className={`${styles.star} ${styles.star3}`}></div>\n <div className={`${styles.star} ${styles.star4}`}></div>\n <div className={`${styles.star} ${styles.star5}`}></div>\n <div className={`${styles.star} ${styles.star6}`}></div>\n <div className={`${styles.star} ${styles.star7}`}></div>\n <div className={`${styles.star} ${styles.star8}`}></div>\n </div>\n\n {/* Toggle circle with sun/moon */}\n <div className={styles.toggle}>\n {/* Sun */}\n <div className={styles.sun}>\n <div className={styles.sunCore}>\n <div className={styles.sunspot1}></div>\n <div className={styles.sunspot2}></div>\n <div className={styles.sunspot3}></div>\n </div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n </div>\n\n {/* Moon */}\n <div className={styles.moon}>\n <div className={styles.moonCore}>\n <div className={styles.crater1}></div>\n <div className={styles.crater2}></div>\n <div className={styles.crater3}></div>\n <div className={styles.crater4}></div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default ThemeSwitch;\n"],"mappings":"2yDCiCM,GAA2C,CAC/C,iBACA,oBACA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C,MAAD,CAAK,UAAW,EAAO,QAAe,CAAA,CAClC,GACF,CAAA,CACF,GACF"}
|
package/dist/ThemeSwitch.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ThemeSwitch-module__sunCore___tUhud{position:relative;background:radial-gradient(circle,gold,orange);border-radius:50%}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunCore___tUhud{width:16px;height:16px;box-shadow:inset -1px -1px 2px #ff8c0080}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunCore___tUhud{width:24px;height:24px;box-shadow:inset -1.5px -1.5px 3px #ff8c0080}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunCore___tUhud{width:32px;height:32px;box-shadow:inset -2px -2px 4px #ff8c0080}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunspot1___8RI1V{position:absolute;width:2px;height:2px;background:#ff8c0099;border-radius:50%;top:4px;left:5px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunspot2___U0whF{position:absolute;width:1.5px;height:1.5px;background:#ff8c0080;border-radius:50%;bottom:5px;right:4px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunspot3___kWYEI{position:absolute;width:1px;height:1px;background:#ff8c0066;border-radius:50%;top:6px;right:6px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunspot1___8RI1V{position:absolute;width:3px;height:3px;background:#ff8c0099;border-radius:50%;top:6px;left:7.5px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunspot2___U0whF{position:absolute;width:2.25px;height:2.25px;background:#ff8c0080;border-radius:50%;bottom:7.5px;right:6px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunspot3___kWYEI{position:absolute;width:1.5px;height:1.5px;background:#ff8c0066;border-radius:50%;top:9px;right:9px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunspot1___8RI1V{position:absolute;width:4px;height:4px;background:#ff8c0099;border-radius:50%;top:8px;left:10px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunspot2___U0whF{position:absolute;width:3px;height:3px;background:#ff8c0080;border-radius:50%;bottom:10px;right:8px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunspot3___kWYEI{position:absolute;width:2px;height:2px;background:#ff8c0066;border-radius:50%;top:12px;right:12px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U{position:absolute;background:linear-gradient(90deg,transparent,#ffd700,transparent);animation:ThemeSwitch-module__rotateSun___JQByd 10s linear infinite}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(2){width:20px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%)}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(3){width:1px;height:20px;top:50%;left:50%;transform:translate(-50%,-50%)}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(4){width:20px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(45deg)}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(5){width:20px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-45deg)}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(6),.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(7),.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(8),.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(9){display:none}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U{position:absolute;background:linear-gradient(90deg,transparent,#ffd700,transparent);animation:ThemeSwitch-module__rotateSun___JQByd 10s linear infinite}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(2){width:30px;height:1.5px;top:50%;left:50%;transform:translate(-50%,-50%)}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(3){width:1.5px;height:30px;top:50%;left:50%;transform:translate(-50%,-50%)}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(4){width:30px;height:1.5px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(45deg)}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(5){width:30px;height:1.5px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-45deg)}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(6){width:26px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(22.5deg)}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(7){width:26px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-22.5deg)}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(8),.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(9){display:none}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U{position:absolute;background:linear-gradient(90deg,transparent,#ffd700,transparent);animation:ThemeSwitch-module__rotateSun___JQByd 10s linear infinite}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(2){width:40px;height:2px;top:50%;left:50%;transform:translate(-50%,-50%)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(3){width:2px;height:40px;top:50%;left:50%;transform:translate(-50%,-50%)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(4){width:40px;height:2px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(45deg)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(5){width:40px;height:2px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-45deg)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(6){width:35px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(22.5deg)}.ThemeSwitch-module__switchContainer___VENjU{position:relative;background:linear-gradient(135deg,#87ceeb,#add8e6);border-radius:30px;cursor:pointer;overflow:hidden;transition:background .6s cubic-bezier(.4,0,.2,1);box-shadow:inset 0 2px 8px #0000001a,0 4px 12px #00000026;-webkit-user-select:none;user-select:none}.ThemeSwitch-module__switchContainer___VENjU.ThemeSwitch-module__small___YlvWo{width:60px;height:30px;border-radius:15px}.ThemeSwitch-module__switchContainer___VENjU.ThemeSwitch-module__medium___Q8Rro{width:90px;height:45px;border-radius:22.5px}.ThemeSwitch-module__switchContainer___VENjU.ThemeSwitch-module__large___BMOxC{width:120px;height:60px;border-radius:30px}.ThemeSwitch-module__switchContainer___VENjU:focus{outline:2px solid #4a90e2;outline-offset:2px}.ThemeSwitch-module__switchContainer___VENjU.ThemeSwitch-module__dark___a4vSn{background:linear-gradient(135deg,#1a1a3e,#0a0a1f)}.ThemeSwitch-module__background___Rpodp{position:absolute;width:100%;height:100%;top:0;left:0;pointer-events:none}.ThemeSwitch-module__cloud___OoOyx{position:absolute;background:#fff6;border-radius:100px;opacity:0;transition:opacity .6s ease}.ThemeSwitch-module__light___ddTa2 .ThemeSwitch-module__cloud___OoOyx{opacity:1}.ThemeSwitch-module__cloud___OoOyx:before,.ThemeSwitch-module__cloud___OoOyx:after{content:"";position:absolute;background:#fff6;border-radius:100px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud1___aqGNx{width:12px;height:4px;top:7px;left:10px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud1___aqGNx:before{width:5px;height:5px;top:-2.5px;left:2.5px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud1___aqGNx:after{width:6px;height:4px;top:-1.5px;right:2.5px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud1___aqGNx{width:19px;height:6px;top:11px;left:15px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud1___aqGNx:before{width:7.5px;height:7.5px;top:-3.75px;left:3.75px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud1___aqGNx:after{width:9px;height:6px;top:-2.25px;right:3.75px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud1___aqGNx{width:25px;height:8px;top:15px;left:20px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud1___aqGNx:before{width:10px;height:10px;top:-5px;left:5px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud1___aqGNx:after{width:12px;height:8px;top:-3px;right:5px}.ThemeSwitch-module__cloud1___aqGNx{animation:ThemeSwitch-module__floatCloud1___MdWMj 12s infinite ease-in-out}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud2___guY71{width:10px;height:3px;top:17px;right:12px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud2___guY71:before{width:4px;height:4px;top:-2px;left:1.5px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud2___guY71{width:15px;height:4.5px;top:26px;right:19px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud2___guY71:before{width:6px;height:6px;top:-3px;left:2.25px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud2___guY71{width:20px;height:6px;top:35px;right:25px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud2___guY71:before{width:8px;height:8px;top:-4px;left:3px}.ThemeSwitch-module__cloud2___guY71{animation:ThemeSwitch-module__floatCloud2___2x6Sp 15s infinite ease-in-out}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud3___7-NhR{width:9px;height:2.5px;bottom:9px;left:17px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud3___7-NhR:after{width:5px;height:3px;top:-1.5px;right:1.5px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud3___7-NhR{width:13.5px;height:3.75px;bottom:13.5px;left:26px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud3___7-NhR:after{width:7.5px;height:4.5px;top:-2.25px;right:2.25px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud3___7-NhR{width:18px;height:5px;bottom:18px;left:35px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud3___7-NhR:after{width:10px;height:6px;top:-3px;right:3px}.ThemeSwitch-module__cloud3___7-NhR{animation:ThemeSwitch-module__floatCloud3___FJCbV 18s infinite ease-in-out}@keyframes ThemeSwitch-module__floatCloud1___MdWMj{0%,to{transform:translate(0)}50%{transform:translate(5px)}}@keyframes ThemeSwitch-module__floatCloud2___2x6Sp{0%,to{transform:translate(0)}50%{transform:translate(-3px)}}@keyframes ThemeSwitch-module__floatCloud3___FJCbV{0%,to{transform:translate(0)}50%{transform:translate(4px)}}.ThemeSwitch-module__star___Z98bU{position:absolute;background:#fff;border-radius:50%;opacity:0;transition:opacity .6s ease}.ThemeSwitch-module__dark___a4vSn .ThemeSwitch-module__star___Z98bU{opacity:1}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star1___rhotb{width:1px;height:1px;top:5px;left:12px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star2___pzbNR{width:1px;height:1px;top:9px;right:15px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star3___iK7lJ{width:1px;height:1px;bottom:7px;left:20px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star4___t5pqN{width:.75px;height:.75px;top:12px;left:7px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star5___dx42N{width:1px;height:1px;bottom:10px;right:17px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star6___wur-I{width:.5px;height:.5px;top:17px;right:10px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star7___KONgd{width:.75px;height:.75px;bottom:12px;left:10px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star8___gIYpk{width:.5px;height:.5px;top:6px;right:7px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star1___rhotb{width:1.5px;height:1.5px;top:7.5px;left:19px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star2___pzbNR{width:1.5px;height:1.5px;top:13.5px;right:22.5px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star3___iK7lJ{width:1.5px;height:1.5px;bottom:11px;left:30px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star4___t5pqN{width:1.13px;height:1.13px;top:19px;left:11px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star5___dx42N{width:1.5px;height:1.5px;bottom:15px;right:26px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star6___wur-I{width:.75px;height:.75px;top:26px;right:15px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star7___KONgd{width:1.13px;height:1.13px;bottom:19px;left:15px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star8___gIYpk{width:.75px;height:.75px;top:9px;right:11px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star1___rhotb{width:2px;height:2px;top:10px;left:25px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star2___pzbNR{width:2px;height:2px;top:18px;right:30px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star3___iK7lJ{width:2px;height:2px;bottom:15px;left:40px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star4___t5pqN{width:1.5px;height:1.5px;top:25px;left:15px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star5___dx42N{width:2px;height:2px;bottom:20px;right:35px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star6___wur-I{width:1px;height:1px;top:35px;right:20px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star7___KONgd{width:1.5px;height:1.5px;bottom:25px;left:20px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star8___gIYpk{width:1px;height:1px;top:12px;right:15px}.ThemeSwitch-module__star1___rhotb{animation:ThemeSwitch-module__twinkle___Abun5 3s infinite}.ThemeSwitch-module__star2___pzbNR{animation:ThemeSwitch-module__twinkle___Abun5 3s infinite .5s}.ThemeSwitch-module__star3___iK7lJ{animation:ThemeSwitch-module__twinkle___Abun5 3s infinite 1s}.ThemeSwitch-module__star4___t5pqN{animation:ThemeSwitch-module__twinkle___Abun5 3s infinite 1.5s}.ThemeSwitch-module__star5___dx42N{animation:ThemeSwitch-module__twinkle___Abun5 3s infinite 2s}.ThemeSwitch-module__star6___wur-I{animation:ThemeSwitch-module__twinkle___Abun5 3s infinite 2.5s}.ThemeSwitch-module__star7___KONgd{animation:ThemeSwitch-module__twinkle___Abun5 3s infinite .8s}.ThemeSwitch-module__star8___gIYpk{animation:ThemeSwitch-module__twinkle___Abun5 3s infinite 1.3s}@keyframes ThemeSwitch-module__twinkle___Abun5{0%,to{opacity:.3}50%{opacity:1}}.ThemeSwitch-module__toggle___L5FGS{position:absolute;border-radius:50%;transition:transform .6s cubic-bezier(.4,0,.2,1),background .6s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__toggle___L5FGS{width:24px;height:24px;background:linear-gradient(135deg,gold,orange);top:3px;left:3px;box-shadow:0 1px 4px #0003,0 0 10px #ffd7004d}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__toggle___L5FGS{width:36px;height:36px;background:linear-gradient(135deg,gold,orange);top:4.5px;left:4.5px;box-shadow:0 1.5px 6px #0003,0 0 15px #ffd7004d}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__toggle___L5FGS{width:48px;height:48px;background:linear-gradient(135deg,gold,orange);top:6px;left:6px;box-shadow:0 2px 8px #0003,0 0 20px #ffd7004d}.ThemeSwitch-module__dark___a4vSn.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__toggle___L5FGS{transform:translate(30px);background:linear-gradient(135deg,beige,#d3d3d3);box-shadow:0 1px 4px #0000004d,0 0 10px #f5f5dc33}.ThemeSwitch-module__dark___a4vSn.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__toggle___L5FGS{transform:translate(45px);background:linear-gradient(135deg,beige,#d3d3d3);box-shadow:0 1.5px 6px #0000004d,0 0 15px #f5f5dc33}.ThemeSwitch-module__dark___a4vSn.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__toggle___L5FGS{transform:translate(60px);background:linear-gradient(135deg,beige,#d3d3d3);box-shadow:0 2px 8px #0000004d,0 0 20px #f5f5dc33}.ThemeSwitch-module__sun___s8noI{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;opacity:1;transform:rotate(0) scale(1);transition:opacity .6s ease,transform .6s ease}.ThemeSwitch-module__dark___a4vSn .ThemeSwitch-module__sun___s8noI{opacity:0;transform:rotate(180deg) scale(.5)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(7){width:35px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-22.5deg)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(8){width:35px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(67.5deg)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(9){width:35px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-67.5deg)}@keyframes ThemeSwitch-module__rotateSun___JQByd{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.ThemeSwitch-module__moon___TNpFJ{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;opacity:0;transform:rotate(-180deg) scale(.5);transition:opacity .6s ease,transform .6s ease}.ThemeSwitch-module__dark___a4vSn .ThemeSwitch-module__moon___TNpFJ{opacity:1;transform:rotate(0) scale(1)}.ThemeSwitch-module__moonCore___svwjb{position:relative;border-radius:50%}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__moonCore___svwjb{width:16px;height:16px;background:radial-gradient(circle at 30% 30%,beige,silver);box-shadow:inset -1.5px -1.5px 4px #0003,inset 1px 1px 4px #ffffff4d}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__moonCore___svwjb{width:24px;height:24px;background:radial-gradient(circle at 30% 30%,beige,silver);box-shadow:inset -2.25px -2.25px 6px #0003,inset 1.5px 1.5px 6px #ffffff4d}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__moonCore___svwjb{width:32px;height:32px;background:radial-gradient(circle at 30% 30%,beige,silver);box-shadow:inset -3px -3px 8px #0003,inset 2px 2px 8px #ffffff4d}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__crater1___swpHc{position:absolute;width:3px;height:3px;background:radial-gradient(circle,#80808066,#69696933);border-radius:50%;top:4px;left:5px;box-shadow:inset .5px .5px 1px #0003}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__crater2___WQVKR{position:absolute;width:2px;height:2px;background:radial-gradient(circle,#8080804d,#69696926);border-radius:50%;bottom:4.5px;right:3.5px;box-shadow:inset .5px .5px .5px #00000026}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__crater3___F-KJu{position:absolute;width:1.5px;height:1.5px;background:radial-gradient(circle,#80808040,#6969691a);border-radius:50%;top:7.5px;right:5.5px;box-shadow:inset .25px .25px .5px #0000001a}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__crater4___ZsIb7{position:absolute;width:2.5px;height:2.5px;background:radial-gradient(circle,#80808059,#6969692e);border-radius:50%;bottom:3px;left:4px;box-shadow:inset .5px .5px .75px #0000002e}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__crater1___swpHc{position:absolute;width:4.5px;height:4.5px;background:radial-gradient(circle,#80808066,#69696933);border-radius:50%;top:6px;left:7.5px;box-shadow:inset .75px .75px 1.5px #0003}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__crater2___WQVKR{position:absolute;width:3px;height:3px;background:radial-gradient(circle,#8080804d,#69696926);border-radius:50%;bottom:6.75px;right:5.25px;box-shadow:inset .75px .75px .75px #00000026}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__crater3___F-KJu{position:absolute;width:2.25px;height:2.25px;background:radial-gradient(circle,#80808040,#6969691a);border-radius:50%;top:11.25px;right:8.25px;box-shadow:inset .375px .375px .75px #0000001a}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__crater4___ZsIb7{position:absolute;width:3.75px;height:3.75px;background:radial-gradient(circle,#80808059,#6969692e);border-radius:50%;bottom:4.5px;left:6px;box-shadow:inset .75px .75px 1.125px #0000002e}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__crater1___swpHc{position:absolute;width:6px;height:6px;background:radial-gradient(circle,#80808066,#69696933);border-radius:50%;top:8px;left:10px;box-shadow:inset 1px 1px 2px #0003}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__crater2___WQVKR{position:absolute;width:4px;height:4px;background:radial-gradient(circle,#8080804d,#69696926);border-radius:50%;bottom:9px;right:7px;box-shadow:inset 1px 1px 1px #00000026}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__crater3___F-KJu{position:absolute;width:3px;height:3px;background:radial-gradient(circle,#80808040,#6969691a);border-radius:50%;top:15px;right:11px;box-shadow:inset .5px .5px 1px #0000001a}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__crater4___ZsIb7{position:absolute;width:5px;height:5px;background:radial-gradient(circle,#80808059,#6969692e);border-radius:50%;bottom:6px;left:8px;box-shadow:inset 1px 1px 1.5px #0000002e}
|
|
1
|
+
.ThemeSwitch-module__sunCore___tUhud{background:radial-gradient(circle,gold,orange);border-radius:50%;position:relative}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunCore___tUhud{width:16px;height:16px;box-shadow:inset -1px -1px 2px #ff8c0080}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunCore___tUhud{width:24px;height:24px;box-shadow:inset -1.5px -1.5px 3px #ff8c0080}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunCore___tUhud{width:32px;height:32px;box-shadow:inset -2px -2px 4px #ff8c0080}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunspot1___8RI1V{background:#ff8c0099;border-radius:50%;width:2px;height:2px;position:absolute;top:4px;left:5px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunspot2___U0whF{background:#ff8c0080;border-radius:50%;width:1.5px;height:1.5px;position:absolute;bottom:5px;right:4px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunspot3___kWYEI{background:#ff8c0066;border-radius:50%;width:1px;height:1px;position:absolute;top:6px;right:6px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunspot1___8RI1V{background:#ff8c0099;border-radius:50%;width:3px;height:3px;position:absolute;top:6px;left:7.5px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunspot2___U0whF{background:#ff8c0080;border-radius:50%;width:2.25px;height:2.25px;position:absolute;bottom:7.5px;right:6px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunspot3___kWYEI{background:#ff8c0066;border-radius:50%;width:1.5px;height:1.5px;position:absolute;top:9px;right:9px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunspot1___8RI1V{background:#ff8c0099;border-radius:50%;width:4px;height:4px;position:absolute;top:8px;left:10px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunspot2___U0whF{background:#ff8c0080;border-radius:50%;width:3px;height:3px;position:absolute;bottom:10px;right:8px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunspot3___kWYEI{background:#ff8c0066;border-radius:50%;width:2px;height:2px;position:absolute;top:12px;right:12px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U{background:linear-gradient(90deg,#0000,gold,#0000);animation:10s linear infinite ThemeSwitch-module__rotateSun___JQByd;position:absolute}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(2){width:20px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%)}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(3){width:1px;height:20px;top:50%;left:50%;transform:translate(-50%,-50%)}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(4){width:20px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%)rotate(45deg)}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(5){width:20px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%)rotate(-45deg)}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(6),.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(7),.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(8),.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__sunRay___t1B4U:nth-child(9){display:none}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U{background:linear-gradient(90deg,#0000,gold,#0000);animation:10s linear infinite ThemeSwitch-module__rotateSun___JQByd;position:absolute}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(2){width:30px;height:1.5px;top:50%;left:50%;transform:translate(-50%,-50%)}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(3){width:1.5px;height:30px;top:50%;left:50%;transform:translate(-50%,-50%)}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(4){width:30px;height:1.5px;top:50%;left:50%;transform:translate(-50%,-50%)rotate(45deg)}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(5){width:30px;height:1.5px;top:50%;left:50%;transform:translate(-50%,-50%)rotate(-45deg)}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(6){width:26px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%)rotate(22.5deg)}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(7){width:26px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%)rotate(-22.5deg)}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(8),.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__sunRay___t1B4U:nth-child(9){display:none}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U{background:linear-gradient(90deg,#0000,gold,#0000);animation:10s linear infinite ThemeSwitch-module__rotateSun___JQByd;position:absolute}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(2){width:40px;height:2px;top:50%;left:50%;transform:translate(-50%,-50%)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(3){width:2px;height:40px;top:50%;left:50%;transform:translate(-50%,-50%)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(4){width:40px;height:2px;top:50%;left:50%;transform:translate(-50%,-50%)rotate(45deg)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(5){width:40px;height:2px;top:50%;left:50%;transform:translate(-50%,-50%)rotate(-45deg)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(6){width:35px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%)rotate(22.5deg)}.ThemeSwitch-module__switchContainer___VENjU{cursor:pointer;-webkit-user-select:none;user-select:none;background:linear-gradient(135deg,#87ceeb,#add8e6);border-radius:30px;transition:background .6s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden;box-shadow:inset 0 2px 8px #0000001a,0 4px 12px #00000026}.ThemeSwitch-module__switchContainer___VENjU.ThemeSwitch-module__small___YlvWo{border-radius:15px;width:60px;height:30px}.ThemeSwitch-module__switchContainer___VENjU.ThemeSwitch-module__medium___Q8Rro{border-radius:22.5px;width:90px;height:45px}.ThemeSwitch-module__switchContainer___VENjU.ThemeSwitch-module__large___BMOxC{border-radius:30px;width:120px;height:60px}.ThemeSwitch-module__switchContainer___VENjU:focus{outline-offset:2px;outline:2px solid #4a90e2}.ThemeSwitch-module__switchContainer___VENjU.ThemeSwitch-module__dark___a4vSn{background:linear-gradient(135deg,#1a1a3e,#0a0a1f)}.ThemeSwitch-module__background___Rpodp{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0}.ThemeSwitch-module__cloud___OoOyx{opacity:0;background:#fff6;border-radius:100px;transition:opacity .6s;position:absolute}.ThemeSwitch-module__light___ddTa2 .ThemeSwitch-module__cloud___OoOyx{opacity:1}.ThemeSwitch-module__cloud___OoOyx:before,.ThemeSwitch-module__cloud___OoOyx:after{content:"";background:#fff6;border-radius:100px;position:absolute}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud1___aqGNx{width:12px;height:4px;top:7px;left:10px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud1___aqGNx:before{width:5px;height:5px;top:-2.5px;left:2.5px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud1___aqGNx:after{width:6px;height:4px;top:-1.5px;right:2.5px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud1___aqGNx{width:19px;height:6px;top:11px;left:15px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud1___aqGNx:before{width:7.5px;height:7.5px;top:-3.75px;left:3.75px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud1___aqGNx:after{width:9px;height:6px;top:-2.25px;right:3.75px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud1___aqGNx{width:25px;height:8px;top:15px;left:20px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud1___aqGNx:before{width:10px;height:10px;top:-5px;left:5px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud1___aqGNx:after{width:12px;height:8px;top:-3px;right:5px}.ThemeSwitch-module__cloud1___aqGNx{animation:12s ease-in-out infinite ThemeSwitch-module__floatCloud1___MdWMj}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud2___guY71{width:10px;height:3px;top:17px;right:12px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud2___guY71:before{width:4px;height:4px;top:-2px;left:1.5px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud2___guY71{width:15px;height:4.5px;top:26px;right:19px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud2___guY71:before{width:6px;height:6px;top:-3px;left:2.25px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud2___guY71{width:20px;height:6px;top:35px;right:25px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud2___guY71:before{width:8px;height:8px;top:-4px;left:3px}.ThemeSwitch-module__cloud2___guY71{animation:15s ease-in-out infinite ThemeSwitch-module__floatCloud2___2x6Sp}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud3___7-NhR{width:9px;height:2.5px;bottom:9px;left:17px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__cloud3___7-NhR:after{width:5px;height:3px;top:-1.5px;right:1.5px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud3___7-NhR{width:13.5px;height:3.75px;bottom:13.5px;left:26px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__cloud3___7-NhR:after{width:7.5px;height:4.5px;top:-2.25px;right:2.25px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud3___7-NhR{width:18px;height:5px;bottom:18px;left:35px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__cloud3___7-NhR:after{width:10px;height:6px;top:-3px;right:3px}.ThemeSwitch-module__cloud3___7-NhR{animation:18s ease-in-out infinite ThemeSwitch-module__floatCloud3___FJCbV}@keyframes ThemeSwitch-module__floatCloud1___MdWMj{0%,to{transform:translate(0)}50%{transform:translate(5px)}}@keyframes ThemeSwitch-module__floatCloud2___2x6Sp{0%,to{transform:translate(0)}50%{transform:translate(-3px)}}@keyframes ThemeSwitch-module__floatCloud3___FJCbV{0%,to{transform:translate(0)}50%{transform:translate(4px)}}.ThemeSwitch-module__star___Z98bU{opacity:0;background:#fff;border-radius:50%;transition:opacity .6s;position:absolute}.ThemeSwitch-module__dark___a4vSn .ThemeSwitch-module__star___Z98bU{opacity:1}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star1___rhotb{width:1px;height:1px;top:5px;left:12px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star2___pzbNR{width:1px;height:1px;top:9px;right:15px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star3___iK7lJ{width:1px;height:1px;bottom:7px;left:20px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star4___t5pqN{width:.75px;height:.75px;top:12px;left:7px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star5___dx42N{width:1px;height:1px;bottom:10px;right:17px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star6___wur-I{width:.5px;height:.5px;top:17px;right:10px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star7___KONgd{width:.75px;height:.75px;bottom:12px;left:10px}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__star8___gIYpk{width:.5px;height:.5px;top:6px;right:7px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star1___rhotb{width:1.5px;height:1.5px;top:7.5px;left:19px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star2___pzbNR{width:1.5px;height:1.5px;top:13.5px;right:22.5px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star3___iK7lJ{width:1.5px;height:1.5px;bottom:11px;left:30px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star4___t5pqN{width:1.13px;height:1.13px;top:19px;left:11px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star5___dx42N{width:1.5px;height:1.5px;bottom:15px;right:26px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star6___wur-I{width:.75px;height:.75px;top:26px;right:15px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star7___KONgd{width:1.13px;height:1.13px;bottom:19px;left:15px}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__star8___gIYpk{width:.75px;height:.75px;top:9px;right:11px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star1___rhotb{width:2px;height:2px;top:10px;left:25px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star2___pzbNR{width:2px;height:2px;top:18px;right:30px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star3___iK7lJ{width:2px;height:2px;bottom:15px;left:40px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star4___t5pqN{width:1.5px;height:1.5px;top:25px;left:15px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star5___dx42N{width:2px;height:2px;bottom:20px;right:35px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star6___wur-I{width:1px;height:1px;top:35px;right:20px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star7___KONgd{width:1.5px;height:1.5px;bottom:25px;left:20px}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__star8___gIYpk{width:1px;height:1px;top:12px;right:15px}.ThemeSwitch-module__star1___rhotb{animation:3s infinite ThemeSwitch-module__twinkle___Abun5}.ThemeSwitch-module__star2___pzbNR{animation:3s .5s infinite ThemeSwitch-module__twinkle___Abun5}.ThemeSwitch-module__star3___iK7lJ{animation:3s 1s infinite ThemeSwitch-module__twinkle___Abun5}.ThemeSwitch-module__star4___t5pqN{animation:3s 1.5s infinite ThemeSwitch-module__twinkle___Abun5}.ThemeSwitch-module__star5___dx42N{animation:3s 2s infinite ThemeSwitch-module__twinkle___Abun5}.ThemeSwitch-module__star6___wur-I{animation:3s 2.5s infinite ThemeSwitch-module__twinkle___Abun5}.ThemeSwitch-module__star7___KONgd{animation:3s .8s infinite ThemeSwitch-module__twinkle___Abun5}.ThemeSwitch-module__star8___gIYpk{animation:3s 1.3s infinite ThemeSwitch-module__twinkle___Abun5}@keyframes ThemeSwitch-module__twinkle___Abun5{0%,to{opacity:.3}50%{opacity:1}}.ThemeSwitch-module__toggle___L5FGS{border-radius:50%;justify-content:center;align-items:center;transition:transform .6s cubic-bezier(.4,0,.2,1),background .6s cubic-bezier(.4,0,.2,1);display:flex;position:absolute}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__toggle___L5FGS{background:linear-gradient(135deg,gold,orange);width:24px;height:24px;top:3px;left:3px;box-shadow:0 1px 4px #0003,0 0 10px #ffd7004d}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__toggle___L5FGS{background:linear-gradient(135deg,gold,orange);width:36px;height:36px;top:4.5px;left:4.5px;box-shadow:0 1.5px 6px #0003,0 0 15px #ffd7004d}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__toggle___L5FGS{background:linear-gradient(135deg,gold,orange);width:48px;height:48px;top:6px;left:6px;box-shadow:0 2px 8px #0003,0 0 20px #ffd7004d}.ThemeSwitch-module__dark___a4vSn.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__toggle___L5FGS{background:linear-gradient(135deg,beige,#d3d3d3);transform:translate(30px);box-shadow:0 1px 4px #0000004d,0 0 10px #f5f5dc33}.ThemeSwitch-module__dark___a4vSn.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__toggle___L5FGS{background:linear-gradient(135deg,beige,#d3d3d3);transform:translate(45px);box-shadow:0 1.5px 6px #0000004d,0 0 15px #f5f5dc33}.ThemeSwitch-module__dark___a4vSn.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__toggle___L5FGS{background:linear-gradient(135deg,beige,#d3d3d3);transform:translate(60px);box-shadow:0 2px 8px #0000004d,0 0 20px #f5f5dc33}.ThemeSwitch-module__sun___s8noI{opacity:1;justify-content:center;align-items:center;width:100%;height:100%;transition:opacity .6s,transform .6s;display:flex;position:absolute;transform:rotate(0)scale(1)}.ThemeSwitch-module__dark___a4vSn .ThemeSwitch-module__sun___s8noI{opacity:0;transform:rotate(180deg)scale(.5)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(7){width:35px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%)rotate(-22.5deg)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(8){width:35px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%)rotate(67.5deg)}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__sunRay___t1B4U:nth-child(9){width:35px;height:1px;top:50%;left:50%;transform:translate(-50%,-50%)rotate(-67.5deg)}@keyframes ThemeSwitch-module__rotateSun___JQByd{0%{transform:translate(-50%,-50%)rotate(0)}to{transform:translate(-50%,-50%)rotate(360deg)}}.ThemeSwitch-module__moon___TNpFJ{opacity:0;justify-content:center;align-items:center;width:100%;height:100%;transition:opacity .6s,transform .6s;display:flex;position:absolute;transform:rotate(-180deg)scale(.5)}.ThemeSwitch-module__dark___a4vSn .ThemeSwitch-module__moon___TNpFJ{opacity:1;transform:rotate(0)scale(1)}.ThemeSwitch-module__moonCore___svwjb{border-radius:50%;position:relative}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__moonCore___svwjb{background:radial-gradient(circle at 30% 30%,beige,silver);width:16px;height:16px;box-shadow:inset -1.5px -1.5px 4px #0003,inset 1px 1px 4px #ffffff4d}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__moonCore___svwjb{background:radial-gradient(circle at 30% 30%,beige,silver);width:24px;height:24px;box-shadow:inset -2.25px -2.25px 6px #0003,inset 1.5px 1.5px 6px #ffffff4d}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__moonCore___svwjb{background:radial-gradient(circle at 30% 30%,beige,silver);width:32px;height:32px;box-shadow:inset -3px -3px 8px #0003,inset 2px 2px 8px #ffffff4d}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__crater1___swpHc{background:radial-gradient(circle,#80808066,#69696933);border-radius:50%;width:3px;height:3px;position:absolute;top:4px;left:5px;box-shadow:inset .5px .5px 1px #0003}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__crater2___WQVKR{background:radial-gradient(circle,#8080804d,#69696926);border-radius:50%;width:2px;height:2px;position:absolute;bottom:4.5px;right:3.5px;box-shadow:inset .5px .5px .5px #00000026}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__crater3___F-KJu{background:radial-gradient(circle,#80808040,#6969691a);border-radius:50%;width:1.5px;height:1.5px;position:absolute;top:7.5px;right:5.5px;box-shadow:inset .25px .25px .5px #0000001a}.ThemeSwitch-module__small___YlvWo .ThemeSwitch-module__crater4___ZsIb7{background:radial-gradient(circle,#80808059,#6969692e);border-radius:50%;width:2.5px;height:2.5px;position:absolute;bottom:3px;left:4px;box-shadow:inset .5px .5px .75px #0000002e}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__crater1___swpHc{background:radial-gradient(circle,#80808066,#69696933);border-radius:50%;width:4.5px;height:4.5px;position:absolute;top:6px;left:7.5px;box-shadow:inset .75px .75px 1.5px #0003}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__crater2___WQVKR{background:radial-gradient(circle,#8080804d,#69696926);border-radius:50%;width:3px;height:3px;position:absolute;bottom:6.75px;right:5.25px;box-shadow:inset .75px .75px .75px #00000026}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__crater3___F-KJu{background:radial-gradient(circle,#80808040,#6969691a);border-radius:50%;width:2.25px;height:2.25px;position:absolute;top:11.25px;right:8.25px;box-shadow:inset .375px .375px .75px #0000001a}.ThemeSwitch-module__medium___Q8Rro .ThemeSwitch-module__crater4___ZsIb7{background:radial-gradient(circle,#80808059,#6969692e);border-radius:50%;width:3.75px;height:3.75px;position:absolute;bottom:4.5px;left:6px;box-shadow:inset .75px .75px 1.125px #0000002e}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__crater1___swpHc{background:radial-gradient(circle,#80808066,#69696933);border-radius:50%;width:6px;height:6px;position:absolute;top:8px;left:10px;box-shadow:inset 1px 1px 2px #0003}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__crater2___WQVKR{background:radial-gradient(circle,#8080804d,#69696926);border-radius:50%;width:4px;height:4px;position:absolute;bottom:9px;right:7px;box-shadow:inset 1px 1px 1px #00000026}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__crater3___F-KJu{background:radial-gradient(circle,#80808040,#6969691a);border-radius:50%;width:3px;height:3px;position:absolute;top:15px;right:11px;box-shadow:inset .5px .5px 1px #0000001a}.ThemeSwitch-module__large___BMOxC .ThemeSwitch-module__crater4___ZsIb7{background:radial-gradient(circle,#80808059,#6969692e);border-radius:50%;width:5px;height:5px;position:absolute;bottom:6px;left:8px;box-shadow:inset 1px 1px 1.5px #0000002e}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./MarkdownRender-CKB5xnfI.cjs`),t=require(`./MonthlyCalendar-DDXHhlwC.cjs`),n=require(`./ThemeSwitch-Cn7-KsSv.cjs`);exports.MarkdownRender=e.t,exports.MonthlyCalendar=t.t,exports.ThemeSwitch=n.t;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
5
|
-
o as MarkdownRender,
|
|
6
|
-
t as MonthlyCalendar,
|
|
7
|
-
n as ThemeSwitch
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { t as e } from "./MarkdownRender-c_W7bXpS.js";
|
|
2
|
+
import { t } from "./MonthlyCalendar-BflN-u8m.js";
|
|
3
|
+
import { t as n } from "./ThemeSwitch-C648hdUm.js";
|
|
4
|
+
export { e as MarkdownRender, t as MonthlyCalendar, n as ThemeSwitch };
|
package/dist/markdown-render.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=markdown-render.cjs.map
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./MarkdownRender-CKB5xnfI.cjs`);exports.MarkdownRender=e.t;
|
package/dist/markdown-render.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=monthly-calendar.cjs.map
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./MonthlyCalendar-DDXHhlwC.cjs`);exports.MonthlyCalendar=e.t;
|
package/dist/monthly-calendar.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/theme-switch.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=theme-switch.cjs.map
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./ThemeSwitch-Cn7-KsSv.cjs`);exports.ThemeSwitch=e.t;
|
package/dist/theme-switch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@macolmenerori/component-library",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -37,7 +37,16 @@
|
|
|
37
37
|
"default": "./dist/theme-switch.cjs"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
-
"./theme-switch-css":
|
|
40
|
+
"./theme-switch-css": {
|
|
41
|
+
"import": {
|
|
42
|
+
"types": "./dist/theme-switch-css.d.ts",
|
|
43
|
+
"default": "./dist/ThemeSwitch.css"
|
|
44
|
+
},
|
|
45
|
+
"require": {
|
|
46
|
+
"types": "./dist/theme-switch-css.d.ts",
|
|
47
|
+
"default": "./dist/ThemeSwitch.css"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
41
50
|
"./markdown-render": {
|
|
42
51
|
"import": {
|
|
43
52
|
"types": "./dist/types/components/MarkdownRender/index.d.ts",
|
|
@@ -93,7 +102,7 @@
|
|
|
93
102
|
"@types/node": "^25.0.0",
|
|
94
103
|
"@types/react": "^19.2.2",
|
|
95
104
|
"@types/react-dom": "^19.2.2",
|
|
96
|
-
"@vitejs/plugin-react": "^
|
|
105
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
97
106
|
"eslint": "^9.39.1",
|
|
98
107
|
"eslint-config-prettier": "^10.1.8",
|
|
99
108
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
@@ -101,7 +110,7 @@
|
|
|
101
110
|
"eslint-plugin-prettier": "^5.5.4",
|
|
102
111
|
"eslint-plugin-react": "^7.37.5",
|
|
103
112
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
104
|
-
"eslint-plugin-simple-import-sort": "^
|
|
113
|
+
"eslint-plugin-simple-import-sort": "^13.0.0",
|
|
105
114
|
"eslint-plugin-testing-library": "^7.13.3",
|
|
106
115
|
"jest": "^30.2.0",
|
|
107
116
|
"jest-environment-jsdom": "^30.2.0",
|
|
@@ -109,21 +118,21 @@
|
|
|
109
118
|
"prettier": "^3.6.2",
|
|
110
119
|
"react": "^19.2.0",
|
|
111
120
|
"react-dom": "^19.2.0",
|
|
112
|
-
"typescript": "^
|
|
113
|
-
"typescript-eslint": "^8.
|
|
114
|
-
"vite": "^
|
|
121
|
+
"typescript": "^6.0.2",
|
|
122
|
+
"typescript-eslint": "^8.58.1",
|
|
123
|
+
"vite": "^8.0.5",
|
|
115
124
|
"vite-plugin-dts": "^4.5.4",
|
|
116
125
|
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
117
126
|
},
|
|
118
127
|
"scripts": {
|
|
119
128
|
"dev": "vite",
|
|
120
|
-
"build": "tsc --noEmit && vite build",
|
|
129
|
+
"build": "tsc --noEmit && vite build && cp src/types/theme-switch-css.d.ts dist/theme-switch-css.d.ts",
|
|
121
130
|
"preview": "vite preview",
|
|
122
131
|
"prettify": "prettier -w --log-level=silent src/",
|
|
123
132
|
"lint": "eslint --fix ./src/",
|
|
124
133
|
"test": "echo \"Info: no tests for the moment\" && exit 0",
|
|
125
134
|
"types": "tsc --noEmit",
|
|
126
|
-
"verify": "pnpm
|
|
135
|
+
"verify": "pnpm audit --prod && pnpm lint && pnpm prettify && pnpm types && pnpm test && pnpm build",
|
|
127
136
|
"publish:npm": "pnpm publish --registry https://registry.npmjs.org/ --access public",
|
|
128
137
|
"publish:github": "pnpm publish --registry https://npm.pkg.github.com",
|
|
129
138
|
"release": "npx tsx scripts/release.ts"
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),h=require("react"),j=require("react-markdown"),l=require("remark-gfm"),x=({content:d,className:c,components:e,linkTarget:r,responsiveImages:o,rehypePlugins:u})=>{const a=h.useMemo(()=>{const s={};return r&&!e?.a&&(s.a=({children:i,...t})=>n.jsx("a",{...t,target:r,rel:r==="_blank"?"noreferrer":void 0,children:i})),o&&!e?.img&&(s.img=({alt:i,...t})=>n.jsx("img",{alt:i??"",...t,style:{maxWidth:"100%",height:"auto",...t.style}})),{...s,...e}},[e,r,o]),m=Object.keys(a).length>0;return n.jsx("div",{className:c,children:n.jsx(j,{remarkPlugins:[l],rehypePlugins:u,components:m?a:void 0,children:d})})};exports.MarkdownRender=x;
|
|
2
|
-
//# sourceMappingURL=MarkdownRender-BOGosy9w.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownRender-BOGosy9w.cjs","sources":["../src/components/MarkdownRender/MarkdownRender.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport ReactMarkdown, { type Components, type Options } from 'react-markdown';\n\nimport remarkGfm from 'remark-gfm';\n\nexport interface MarkdownProps {\n /** The markdown string to render */\n content: string;\n /** Optional CSS class name for the container */\n className?: string;\n /** Custom component overrides for markdown elements */\n components?: Partial<Components>;\n /** Target for all links (defaults to '_self') */\n linkTarget?: '_blank' | '_self' | '_parent' | '_top';\n /** Make all images responsive (defaults to false) */\n responsiveImages?: boolean;\n /** Optional rehype plugins for HTML processing */\n rehypePlugins?: Options['rehypePlugins'];\n}\n\n/**\n * A component that renders a markdown string as HTML.\n * Supports GitHub Flavored Markdown (GFM) including tables,\n * strikethrough, task lists, and autolinks.\n */\nconst MarkdownRender: React.FC<MarkdownProps> = ({\n content,\n className,\n components,\n linkTarget,\n responsiveImages,\n rehypePlugins\n}) => {\n const mergedComponents = useMemo(() => {\n const generated: Partial<Components> = {};\n\n // Auto-generate link component if linkTarget is set and no custom 'a' provided\n if (linkTarget && !components?.a) {\n generated.a = ({ children, ...props }) => (\n <a {...props} target={linkTarget} rel={linkTarget === '_blank' ? 'noreferrer' : undefined}>\n {children}\n </a>\n );\n }\n\n // Auto-generate image component if responsiveImages and no custom 'img' provided\n if (responsiveImages && !components?.img) {\n generated.img = ({ alt, ...props }) => (\n <img\n alt={alt ?? ''}\n {...props}\n style={{ maxWidth: '100%', height: 'auto', ...props.style }}\n />\n );\n }\n\n // User-provided components override auto-generated ones\n return { ...generated, ...components };\n }, [components, linkTarget, responsiveImages]);\n\n const hasComponents = Object.keys(mergedComponents).length > 0;\n\n return (\n <div className={className}>\n <ReactMarkdown\n remarkPlugins={[remarkGfm]}\n rehypePlugins={rehypePlugins}\n components={hasComponents ? mergedComponents : undefined}\n >\n {content}\n </ReactMarkdown>\n </div>\n );\n};\n\nexport default MarkdownRender;\n"],"names":["MarkdownRender","content","className","components","linkTarget","responsiveImages","rehypePlugins","mergedComponents","useMemo","generated","children","props","jsx","alt","hasComponents","ReactMarkdown","remarkGfm"],"mappings":"yHAyBMA,EAA0C,CAAC,CAC/C,QAAAC,EACA,UAAAC,EACA,WAAAC,EACA,WAAAC,EACA,iBAAAC,EACA,cAAAC,CACF,IAAM,CACJ,MAAMC,EAAmBC,EAAAA,QAAQ,IAAM,CACrC,MAAMC,EAAiC,CAAA,EAGvC,OAAIL,GAAc,CAACD,GAAY,IAC7BM,EAAU,EAAI,CAAC,CAAE,SAAAC,EAAU,GAAGC,KAC5BC,EAAAA,IAAC,IAAA,CAAG,GAAGD,EAAO,OAAQP,EAAY,IAAKA,IAAe,SAAW,aAAe,OAC7E,SAAAM,EACH,GAKAL,GAAoB,CAACF,GAAY,MACnCM,EAAU,IAAM,CAAC,CAAE,IAAAI,EAAK,GAAGF,KACzBC,EAAAA,IAAC,MAAA,CACC,IAAKC,GAAO,GACX,GAAGF,EACJ,MAAO,CAAE,SAAU,OAAQ,OAAQ,OAAQ,GAAGA,EAAM,KAAA,CAAM,CAAA,GAMzD,CAAE,GAAGF,EAAW,GAAGN,CAAA,CAC5B,EAAG,CAACA,EAAYC,EAAYC,CAAgB,CAAC,EAEvCS,EAAgB,OAAO,KAAKP,CAAgB,EAAE,OAAS,EAE7D,OACEK,EAAAA,IAAC,OAAI,UAAAV,EACH,SAAAU,EAAAA,IAACG,EAAA,CACC,cAAe,CAACC,CAAS,EACzB,cAAAV,EACA,WAAYQ,EAAgBP,EAAmB,OAE9C,SAAAN,CAAA,CAAA,EAEL,CAEJ"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as c } from "react";
|
|
3
|
-
import l from "react-markdown";
|
|
4
|
-
import g from "remark-gfm";
|
|
5
|
-
const y = ({
|
|
6
|
-
content: d,
|
|
7
|
-
className: f,
|
|
8
|
-
components: r,
|
|
9
|
-
linkTarget: e,
|
|
10
|
-
responsiveImages: a,
|
|
11
|
-
rehypePlugins: s
|
|
12
|
-
}) => {
|
|
13
|
-
const n = c(() => {
|
|
14
|
-
const m = {};
|
|
15
|
-
return e && !r?.a && (m.a = ({ children: i, ...t }) => /* @__PURE__ */ o("a", { ...t, target: e, rel: e === "_blank" ? "noreferrer" : void 0, children: i })), a && !r?.img && (m.img = ({ alt: i, ...t }) => /* @__PURE__ */ o(
|
|
16
|
-
"img",
|
|
17
|
-
{
|
|
18
|
-
alt: i ?? "",
|
|
19
|
-
...t,
|
|
20
|
-
style: { maxWidth: "100%", height: "auto", ...t.style }
|
|
21
|
-
}
|
|
22
|
-
)), { ...m, ...r };
|
|
23
|
-
}, [r, e, a]), h = Object.keys(n).length > 0;
|
|
24
|
-
return /* @__PURE__ */ o("div", { className: f, children: /* @__PURE__ */ o(
|
|
25
|
-
l,
|
|
26
|
-
{
|
|
27
|
-
remarkPlugins: [g],
|
|
28
|
-
rehypePlugins: s,
|
|
29
|
-
components: h ? n : void 0,
|
|
30
|
-
children: d
|
|
31
|
-
}
|
|
32
|
-
) });
|
|
33
|
-
};
|
|
34
|
-
export {
|
|
35
|
-
y as M
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=MarkdownRender-BmrS3q0l.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownRender-BmrS3q0l.js","sources":["../src/components/MarkdownRender/MarkdownRender.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport ReactMarkdown, { type Components, type Options } from 'react-markdown';\n\nimport remarkGfm from 'remark-gfm';\n\nexport interface MarkdownProps {\n /** The markdown string to render */\n content: string;\n /** Optional CSS class name for the container */\n className?: string;\n /** Custom component overrides for markdown elements */\n components?: Partial<Components>;\n /** Target for all links (defaults to '_self') */\n linkTarget?: '_blank' | '_self' | '_parent' | '_top';\n /** Make all images responsive (defaults to false) */\n responsiveImages?: boolean;\n /** Optional rehype plugins for HTML processing */\n rehypePlugins?: Options['rehypePlugins'];\n}\n\n/**\n * A component that renders a markdown string as HTML.\n * Supports GitHub Flavored Markdown (GFM) including tables,\n * strikethrough, task lists, and autolinks.\n */\nconst MarkdownRender: React.FC<MarkdownProps> = ({\n content,\n className,\n components,\n linkTarget,\n responsiveImages,\n rehypePlugins\n}) => {\n const mergedComponents = useMemo(() => {\n const generated: Partial<Components> = {};\n\n // Auto-generate link component if linkTarget is set and no custom 'a' provided\n if (linkTarget && !components?.a) {\n generated.a = ({ children, ...props }) => (\n <a {...props} target={linkTarget} rel={linkTarget === '_blank' ? 'noreferrer' : undefined}>\n {children}\n </a>\n );\n }\n\n // Auto-generate image component if responsiveImages and no custom 'img' provided\n if (responsiveImages && !components?.img) {\n generated.img = ({ alt, ...props }) => (\n <img\n alt={alt ?? ''}\n {...props}\n style={{ maxWidth: '100%', height: 'auto', ...props.style }}\n />\n );\n }\n\n // User-provided components override auto-generated ones\n return { ...generated, ...components };\n }, [components, linkTarget, responsiveImages]);\n\n const hasComponents = Object.keys(mergedComponents).length > 0;\n\n return (\n <div className={className}>\n <ReactMarkdown\n remarkPlugins={[remarkGfm]}\n rehypePlugins={rehypePlugins}\n components={hasComponents ? mergedComponents : undefined}\n >\n {content}\n </ReactMarkdown>\n </div>\n );\n};\n\nexport default MarkdownRender;\n"],"names":["MarkdownRender","content","className","components","linkTarget","responsiveImages","rehypePlugins","mergedComponents","useMemo","generated","children","props","jsx","alt","hasComponents","ReactMarkdown","remarkGfm"],"mappings":";;;;AAyBA,MAAMA,IAA0C,CAAC;AAAA,EAC/C,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,eAAAC;AACF,MAAM;AACJ,QAAMC,IAAmBC,EAAQ,MAAM;AACrC,UAAMC,IAAiC,CAAA;AAGvC,WAAIL,KAAc,CAACD,GAAY,MAC7BM,EAAU,IAAI,CAAC,EAAE,UAAAC,GAAU,GAAGC,QAC5B,gBAAAC,EAAC,KAAA,EAAG,GAAGD,GAAO,QAAQP,GAAY,KAAKA,MAAe,WAAW,eAAe,QAC7E,UAAAM,GACH,IAKAL,KAAoB,CAACF,GAAY,QACnCM,EAAU,MAAM,CAAC,EAAE,KAAAI,GAAK,GAAGF,QACzB,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAKC,KAAO;AAAA,QACX,GAAGF;AAAA,QACJ,OAAO,EAAE,UAAU,QAAQ,QAAQ,QAAQ,GAAGA,EAAM,MAAA;AAAA,MAAM;AAAA,IAAA,IAMzD,EAAE,GAAGF,GAAW,GAAGN,EAAA;AAAA,EAC5B,GAAG,CAACA,GAAYC,GAAYC,CAAgB,CAAC,GAEvCS,IAAgB,OAAO,KAAKP,CAAgB,EAAE,SAAS;AAE7D,SACE,gBAAAK,EAAC,SAAI,WAAAV,GACH,UAAA,gBAAAU;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,eAAe,CAACC,CAAS;AAAA,MACzB,eAAAV;AAAA,MACA,YAAYQ,IAAgBP,IAAmB;AAAA,MAE9C,UAAAN;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),C=require("react"),j={dayColor:"#222",headerColor:"#555",annotationColor:"inherit"},b={dayColor:"#f0f0f0",headerColor:"#a0a0b8",annotationColor:"#d0d0e0"},w={borderCollapse:"collapse",border:"none",width:"100%",tableLayout:"fixed",fontFamily:"sans-serif"},y={border:"none",verticalAlign:"top",padding:0,position:"relative",textAlign:"center"},v=({year:s,month:i,annotations:d=[],headers:c,style:p={},darkMode:x=!1})=>{const a=x?b:j,g=C.useMemo(()=>{const t=new Date(s,i,0).getDate(),n=new Date(s,i-1,1).getDay(),o=Math.ceil((n+t)/7)*7,l=[];let r=1-n;for(let h=0;h<o/7;h++){const f=[];for(let u=0;u<7;u++)f.push(r>=1&&r<=t?r:null),r++;l.push(f)}return l},[s,i]),m={...w,...p};return e.jsxs("table",{style:m,children:[c&&e.jsx("thead",{children:e.jsx("tr",{children:c.map((t,n)=>e.jsx("th",{style:{...y,fontWeight:600,fontSize:"0.85rem",paddingBottom:6,color:a.headerColor},children:t},n))})}),e.jsx("tbody",{children:g.map((t,n)=>e.jsx("tr",{children:t.map((o,l)=>e.jsx("td",{style:y,children:e.jsx("div",{style:{width:"100%",paddingBottom:"100%",position:"relative"},children:e.jsx("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",paddingTop:6,gap:4,overflow:"hidden"},children:o!==null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{fontFamily:"sans-serif",fontSize:"0.95rem",fontWeight:500,color:a.dayColor},children:o}),d[o-1]!=null&&e.jsx("div",{style:{fontSize:"0.75rem",lineHeight:1.2,overflow:"hidden",width:"100%",textAlign:"center",color:a.annotationColor},children:d[o-1]})]})})})},l))},n))})]})};exports.MonthlyCalendar=v;
|
|
2
|
-
//# sourceMappingURL=MonthlyCalendar-D-tD_2xK.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MonthlyCalendar-D-tD_2xK.cjs","sources":["../src/components/MonthlyCalendar/MonthlyCalendar.tsx"],"sourcesContent":["import React, { CSSProperties, ReactNode, useMemo } from 'react';\n\n/**\n * Props for the MonthlyCalendar component\n */\nexport interface MonthlyCalendarProps {\n /** Full four-digit year (e.g. 2026) */\n year: number;\n /** Month to display, 1-based: 1 = January, 12 = December */\n month: number;\n /**\n * Array of React nodes, one per day of the month.\n * annotations[0] maps to Day 1, annotations[1] maps to Day 2, etc.\n * Use null or undefined for days with no annotation.\n */\n annotations?: (ReactNode | null | undefined)[];\n /**\n * Array of exactly 7 strings for the weekday header labels.\n * Omit to hide the header row entirely.\n */\n headers?: [string, string, string, string, string, string, string];\n /**\n * Inline styles merged onto the table element, overriding defaults via shallow spread.\n */\n style?: CSSProperties;\n /**\n * Enables the dark color theme for day numbers, headers, and annotation text.\n * The component does not set its own background — wrap it in a dark container when enabled.\n * @default false\n */\n darkMode?: boolean;\n}\n\n// ─── Theme definitions ───\n\nconst LIGHT_THEME = {\n dayColor: '#222',\n headerColor: '#555',\n annotationColor: 'inherit'\n};\n\nconst DARK_THEME = {\n dayColor: '#f0f0f0',\n headerColor: '#a0a0b8',\n annotationColor: '#d0d0e0'\n};\n\n// ─── Static style objects ───\n\nconst defaultTableStyle: CSSProperties = {\n borderCollapse: 'collapse',\n border: 'none',\n width: '100%',\n tableLayout: 'fixed',\n fontFamily: 'sans-serif'\n};\n\nconst defaultCellStyle: CSSProperties = {\n border: 'none',\n verticalAlign: 'top',\n padding: 0,\n position: 'relative',\n textAlign: 'center'\n};\n\n/**\n * MonthlyCalendar Component\n *\n * A zero-dependency monthly calendar grid rendered as a semantic HTML table.\n * Each day occupies a square cell with an optional annotation slot that accepts\n * any ReactNode (text, images, badges, icons, or entire sub-components).\n *\n * Features built-in light and dark themes, customizable headers, and\n * table-level style overrides. All styling is inline — no CSS files required.\n *\n * @component\n * @example\n * ```tsx\n * <MonthlyCalendar\n * year={2026}\n * month={2}\n * headers={['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']}\n * darkMode={false}\n * />\n * ```\n */\nconst MonthlyCalendar: React.FC<MonthlyCalendarProps> = ({\n year,\n month,\n annotations = [],\n headers,\n style = {},\n darkMode = false\n}) => {\n const theme = darkMode ? DARK_THEME : LIGHT_THEME;\n\n const weeks = useMemo(() => {\n const daysInMonth = new Date(year, month, 0).getDate();\n const startDay = new Date(year, month - 1, 1).getDay(); // 0=Sun\n const totalCells = Math.ceil((startDay + daysInMonth) / 7) * 7;\n const result: (number | null)[][] = [];\n let currentDay = 1 - startDay;\n\n for (let w = 0; w < totalCells / 7; w++) {\n const week: (number | null)[] = [];\n for (let d = 0; d < 7; d++) {\n week.push(currentDay >= 1 && currentDay <= daysInMonth ? currentDay : null);\n currentDay++;\n }\n result.push(week);\n }\n return result;\n }, [year, month]);\n\n const mergedTableStyle = { ...defaultTableStyle, ...style };\n\n return (\n <table style={mergedTableStyle}>\n {headers && (\n <thead>\n <tr>\n {headers.map((h, i) => (\n <th\n key={i}\n style={{\n ...defaultCellStyle,\n fontWeight: 600,\n fontSize: '0.85rem',\n paddingBottom: 6,\n color: theme.headerColor\n }}\n >\n {h}\n </th>\n ))}\n </tr>\n </thead>\n )}\n <tbody>\n {weeks.map((week, wi) => (\n <tr key={wi}>\n {week.map((day, di) => (\n <td key={di} style={defaultCellStyle}>\n <div\n style={{\n width: '100%',\n paddingBottom: '100%',\n position: 'relative'\n }}\n >\n <div\n style={{\n position: 'absolute',\n inset: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'flex-start',\n paddingTop: 6,\n gap: 4,\n overflow: 'hidden'\n }}\n >\n {day !== null && (\n <>\n <span\n style={{\n fontFamily: 'sans-serif',\n fontSize: '0.95rem',\n fontWeight: 500,\n color: theme.dayColor\n }}\n >\n {day}\n </span>\n {annotations[day - 1] != null && (\n <div\n style={{\n fontSize: '0.75rem',\n lineHeight: 1.2,\n overflow: 'hidden',\n width: '100%',\n textAlign: 'center',\n color: theme.annotationColor\n }}\n >\n {annotations[day - 1]}\n </div>\n )}\n </>\n )}\n </div>\n </div>\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n\nexport default MonthlyCalendar;\n"],"names":["LIGHT_THEME","DARK_THEME","defaultTableStyle","defaultCellStyle","MonthlyCalendar","year","month","annotations","headers","style","darkMode","theme","weeks","useMemo","daysInMonth","startDay","totalCells","result","currentDay","w","week","d","mergedTableStyle","jsxs","jsx","h","i","wi","day","di","Fragment"],"mappings":"qEAmCMA,EAAc,CAClB,SAAU,OACV,YAAa,OACb,gBAAiB,SACnB,EAEMC,EAAa,CACjB,SAAU,UACV,YAAa,UACb,gBAAiB,SACnB,EAIMC,EAAmC,CACvC,eAAgB,WAChB,OAAQ,OACR,MAAO,OACP,YAAa,QACb,WAAY,YACd,EAEMC,EAAkC,CACtC,OAAQ,OACR,cAAe,MACf,QAAS,EACT,SAAU,WACV,UAAW,QACb,EAuBMC,EAAkD,CAAC,CACvD,KAAAC,EACA,MAAAC,EACA,YAAAC,EAAc,CAAA,EACd,QAAAC,EACA,MAAAC,EAAQ,CAAA,EACR,SAAAC,EAAW,EACb,IAAM,CACJ,MAAMC,EAAQD,EAAWT,EAAaD,EAEhCY,EAAQC,EAAAA,QAAQ,IAAM,CAC1B,MAAMC,EAAc,IAAI,KAAKT,EAAMC,EAAO,CAAC,EAAE,QAAA,EACvCS,EAAW,IAAI,KAAKV,EAAMC,EAAQ,EAAG,CAAC,EAAE,OAAA,EACxCU,EAAa,KAAK,MAAMD,EAAWD,GAAe,CAAC,EAAI,EACvDG,EAA8B,CAAA,EACpC,IAAIC,EAAa,EAAIH,EAErB,QAASI,EAAI,EAAGA,EAAIH,EAAa,EAAGG,IAAK,CACvC,MAAMC,EAA0B,CAAA,EAChC,QAASC,EAAI,EAAGA,EAAI,EAAGA,IACrBD,EAAK,KAAKF,GAAc,GAAKA,GAAcJ,EAAcI,EAAa,IAAI,EAC1EA,IAEFD,EAAO,K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AAA,CAEJ,CAAA,GAjDKC,CAmDT,CACD,GAtDMF,CAuDT,CACD,CAAA,CACH,CAAA,EACF,CAEJ"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { jsxs as y, jsx as e, Fragment as w } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as x } from "react";
|
|
3
|
-
const v = {
|
|
4
|
-
dayColor: "#222",
|
|
5
|
-
headerColor: "#555",
|
|
6
|
-
annotationColor: "inherit"
|
|
7
|
-
}, D = {
|
|
8
|
-
dayColor: "#f0f0f0",
|
|
9
|
-
headerColor: "#a0a0b8",
|
|
10
|
-
annotationColor: "#d0d0e0"
|
|
11
|
-
}, M = {
|
|
12
|
-
borderCollapse: "collapse",
|
|
13
|
-
border: "none",
|
|
14
|
-
width: "100%",
|
|
15
|
-
tableLayout: "fixed",
|
|
16
|
-
fontFamily: "sans-serif"
|
|
17
|
-
}, m = {
|
|
18
|
-
border: "none",
|
|
19
|
-
verticalAlign: "top",
|
|
20
|
-
padding: 0,
|
|
21
|
-
position: "relative",
|
|
22
|
-
textAlign: "center"
|
|
23
|
-
}, A = ({
|
|
24
|
-
year: i,
|
|
25
|
-
month: a,
|
|
26
|
-
annotations: d = [],
|
|
27
|
-
headers: c,
|
|
28
|
-
style: g = {},
|
|
29
|
-
darkMode: u = !1
|
|
30
|
-
}) => {
|
|
31
|
-
const s = u ? D : v, C = x(() => {
|
|
32
|
-
const t = new Date(i, a, 0).getDate(), o = new Date(i, a - 1, 1).getDay(), l = Math.ceil((o + t) / 7) * 7, n = [];
|
|
33
|
-
let r = 1 - o;
|
|
34
|
-
for (let h = 0; h < l / 7; h++) {
|
|
35
|
-
const f = [];
|
|
36
|
-
for (let p = 0; p < 7; p++)
|
|
37
|
-
f.push(r >= 1 && r <= t ? r : null), r++;
|
|
38
|
-
n.push(f);
|
|
39
|
-
}
|
|
40
|
-
return n;
|
|
41
|
-
}, [i, a]), b = { ...M, ...g };
|
|
42
|
-
return /* @__PURE__ */ y("table", { style: b, children: [
|
|
43
|
-
c && /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: c.map((t, o) => /* @__PURE__ */ e(
|
|
44
|
-
"th",
|
|
45
|
-
{
|
|
46
|
-
style: {
|
|
47
|
-
...m,
|
|
48
|
-
fontWeight: 600,
|
|
49
|
-
fontSize: "0.85rem",
|
|
50
|
-
paddingBottom: 6,
|
|
51
|
-
color: s.headerColor
|
|
52
|
-
},
|
|
53
|
-
children: t
|
|
54
|
-
},
|
|
55
|
-
o
|
|
56
|
-
)) }) }),
|
|
57
|
-
/* @__PURE__ */ e("tbody", { children: C.map((t, o) => /* @__PURE__ */ e("tr", { children: t.map((l, n) => /* @__PURE__ */ e("td", { style: m, children: /* @__PURE__ */ e(
|
|
58
|
-
"div",
|
|
59
|
-
{
|
|
60
|
-
style: {
|
|
61
|
-
width: "100%",
|
|
62
|
-
paddingBottom: "100%",
|
|
63
|
-
position: "relative"
|
|
64
|
-
},
|
|
65
|
-
children: /* @__PURE__ */ e(
|
|
66
|
-
"div",
|
|
67
|
-
{
|
|
68
|
-
style: {
|
|
69
|
-
position: "absolute",
|
|
70
|
-
inset: 0,
|
|
71
|
-
display: "flex",
|
|
72
|
-
flexDirection: "column",
|
|
73
|
-
alignItems: "center",
|
|
74
|
-
justifyContent: "flex-start",
|
|
75
|
-
paddingTop: 6,
|
|
76
|
-
gap: 4,
|
|
77
|
-
overflow: "hidden"
|
|
78
|
-
},
|
|
79
|
-
children: l !== null && /* @__PURE__ */ y(w, { children: [
|
|
80
|
-
/* @__PURE__ */ e(
|
|
81
|
-
"span",
|
|
82
|
-
{
|
|
83
|
-
style: {
|
|
84
|
-
fontFamily: "sans-serif",
|
|
85
|
-
fontSize: "0.95rem",
|
|
86
|
-
fontWeight: 500,
|
|
87
|
-
color: s.dayColor
|
|
88
|
-
},
|
|
89
|
-
children: l
|
|
90
|
-
}
|
|
91
|
-
),
|
|
92
|
-
d[l - 1] != null && /* @__PURE__ */ e(
|
|
93
|
-
"div",
|
|
94
|
-
{
|
|
95
|
-
style: {
|
|
96
|
-
fontSize: "0.75rem",
|
|
97
|
-
lineHeight: 1.2,
|
|
98
|
-
overflow: "hidden",
|
|
99
|
-
width: "100%",
|
|
100
|
-
textAlign: "center",
|
|
101
|
-
color: s.annotationColor
|
|
102
|
-
},
|
|
103
|
-
children: d[l - 1]
|
|
104
|
-
}
|
|
105
|
-
)
|
|
106
|
-
] })
|
|
107
|
-
}
|
|
108
|
-
)
|
|
109
|
-
}
|
|
110
|
-
) }, n)) }, o)) })
|
|
111
|
-
] });
|
|
112
|
-
};
|
|
113
|
-
export {
|
|
114
|
-
A as M
|
|
115
|
-
};
|
|
116
|
-
//# sourceMappingURL=MonthlyCalendar-D9jC2b2L.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MonthlyCalendar-D9jC2b2L.js","sources":["../src/components/MonthlyCalendar/MonthlyCalendar.tsx"],"sourcesContent":["import React, { CSSProperties, ReactNode, useMemo } from 'react';\n\n/**\n * Props for the MonthlyCalendar component\n */\nexport interface MonthlyCalendarProps {\n /** Full four-digit year (e.g. 2026) */\n year: number;\n /** Month to display, 1-based: 1 = January, 12 = December */\n month: number;\n /**\n * Array of React nodes, one per day of the month.\n * annotations[0] maps to Day 1, annotations[1] maps to Day 2, etc.\n * Use null or undefined for days with no annotation.\n */\n annotations?: (ReactNode | null | undefined)[];\n /**\n * Array of exactly 7 strings for the weekday header labels.\n * Omit to hide the header row entirely.\n */\n headers?: [string, string, string, string, string, string, string];\n /**\n * Inline styles merged onto the table element, overriding defaults via shallow spread.\n */\n style?: CSSProperties;\n /**\n * Enables the dark color theme for day numbers, headers, and annotation text.\n * The component does not set its own background — wrap it in a dark container when enabled.\n * @default false\n */\n darkMode?: boolean;\n}\n\n// ─── Theme definitions ───\n\nconst LIGHT_THEME = {\n dayColor: '#222',\n headerColor: '#555',\n annotationColor: 'inherit'\n};\n\nconst DARK_THEME = {\n dayColor: '#f0f0f0',\n headerColor: '#a0a0b8',\n annotationColor: '#d0d0e0'\n};\n\n// ─── Static style objects ───\n\nconst defaultTableStyle: CSSProperties = {\n borderCollapse: 'collapse',\n border: 'none',\n width: '100%',\n tableLayout: 'fixed',\n fontFamily: 'sans-serif'\n};\n\nconst defaultCellStyle: CSSProperties = {\n border: 'none',\n verticalAlign: 'top',\n padding: 0,\n position: 'relative',\n textAlign: 'center'\n};\n\n/**\n * MonthlyCalendar Component\n *\n * A zero-dependency monthly calendar grid rendered as a semantic HTML table.\n * Each day occupies a square cell with an optional annotation slot that accepts\n * any ReactNode (text, images, badges, icons, or entire sub-components).\n *\n * Features built-in light and dark themes, customizable headers, and\n * table-level style overrides. All styling is inline — no CSS files required.\n *\n * @component\n * @example\n * ```tsx\n * <MonthlyCalendar\n * year={2026}\n * month={2}\n * headers={['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']}\n * darkMode={false}\n * />\n * ```\n */\nconst MonthlyCalendar: React.FC<MonthlyCalendarProps> = ({\n year,\n month,\n annotations = [],\n headers,\n style = {},\n darkMode = false\n}) => {\n const theme = darkMode ? DARK_THEME : LIGHT_THEME;\n\n const weeks = useMemo(() => {\n const daysInMonth = new Date(year, month, 0).getDate();\n const startDay = new Date(year, month - 1, 1).getDay(); // 0=Sun\n const totalCells = Math.ceil((startDay + daysInMonth) / 7) * 7;\n const result: (number | null)[][] = [];\n let currentDay = 1 - startDay;\n\n for (let w = 0; w < totalCells / 7; w++) {\n const week: (number | null)[] = [];\n for (let d = 0; d < 7; d++) {\n week.push(currentDay >= 1 && currentDay <= daysInMonth ? currentDay : null);\n currentDay++;\n }\n result.push(week);\n }\n return result;\n }, [year, month]);\n\n const mergedTableStyle = { ...defaultTableStyle, ...style };\n\n return (\n <table style={mergedTableStyle}>\n {headers && (\n <thead>\n <tr>\n {headers.map((h, i) => (\n <th\n key={i}\n style={{\n ...defaultCellStyle,\n fontWeight: 600,\n fontSize: '0.85rem',\n paddingBottom: 6,\n color: theme.headerColor\n }}\n >\n {h}\n </th>\n ))}\n </tr>\n </thead>\n )}\n <tbody>\n {weeks.map((week, wi) => (\n <tr key={wi}>\n {week.map((day, di) => (\n <td key={di} style={defaultCellStyle}>\n <div\n style={{\n width: '100%',\n paddingBottom: '100%',\n position: 'relative'\n }}\n >\n <div\n style={{\n position: 'absolute',\n inset: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'flex-start',\n paddingTop: 6,\n gap: 4,\n overflow: 'hidden'\n }}\n >\n {day !== null && (\n <>\n <span\n style={{\n fontFamily: 'sans-serif',\n fontSize: '0.95rem',\n fontWeight: 500,\n color: theme.dayColor\n }}\n >\n {day}\n </span>\n {annotations[day - 1] != null && (\n <div\n style={{\n fontSize: '0.75rem',\n lineHeight: 1.2,\n overflow: 'hidden',\n width: '100%',\n textAlign: 'center',\n color: theme.annotationColor\n }}\n >\n {annotations[day - 1]}\n </div>\n )}\n </>\n )}\n </div>\n </div>\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n\nexport default MonthlyCalendar;\n"],"names":["LIGHT_THEME","DARK_THEME","defaultTableStyle","defaultCellStyle","MonthlyCalendar","year","month","annotations","headers","style","darkMode","theme","weeks","useMemo","daysInMonth","startDay","totalCells","result","currentDay","w","week","d","mergedTableStyle","jsxs","jsx","h","i","wi","day","di","Fragment"],"mappings":";;AAmCA,MAAMA,IAAc;AAAA,EAClB,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iBAAiB;AACnB,GAEMC,IAAa;AAAA,EACjB,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iBAAiB;AACnB,GAIMC,IAAmC;AAAA,EACvC,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AAAA,EACb,YAAY;AACd,GAEMC,IAAkC;AAAA,EACtC,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,SAAS;AAAA,EACT,UAAU;AAAA,EACV,WAAW;AACb,GAuBM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 @@
|
|
|
1
|
-
"use strict";require('./ThemeSwitch.css');const e=require("react/jsx-runtime"),l="ThemeSwitch-module__sunCore___tUhud",m="ThemeSwitch-module__small___YlvWo",d="ThemeSwitch-module__medium___Q8Rro",r="ThemeSwitch-module__large___BMOxC",n="ThemeSwitch-module__sunspot1___8RI1V",u="ThemeSwitch-module__sunspot2___U0whF",i="ThemeSwitch-module__sunspot3___kWYEI",h="ThemeSwitch-module__sunRay___t1B4U",w="ThemeSwitch-module__rotateSun___JQByd",S="ThemeSwitch-module__switchContainer___VENjU",T="ThemeSwitch-module__dark___a4vSn",N="ThemeSwitch-module__background___Rpodp",x="ThemeSwitch-module__cloud___OoOyx",j="ThemeSwitch-module__light___ddTa2",v="ThemeSwitch-module__cloud1___aqGNx",g="ThemeSwitch-module__floatCloud1___MdWMj",$="ThemeSwitch-module__cloud2___guY71",C="ThemeSwitch-module__floatCloud2___2x6Sp",p="ThemeSwitch-module__cloud3___7-NhR",R="ThemeSwitch-module__floatCloud3___FJCbV",y="ThemeSwitch-module__star___Z98bU",k="ThemeSwitch-module__star1___rhotb",b="ThemeSwitch-module__star2___pzbNR",f="ThemeSwitch-module__star3___iK7lJ",I="ThemeSwitch-module__star4___t5pqN",F="ThemeSwitch-module__star5___dx42N",J="ThemeSwitch-module__star6___wur-I",K="ThemeSwitch-module__star7___KONgd",U="ThemeSwitch-module__star8___gIYpk",O="ThemeSwitch-module__twinkle___Abun5",V="ThemeSwitch-module__toggle___L5FGS",W="ThemeSwitch-module__sun___s8noI",Y="ThemeSwitch-module__moon___TNpFJ",q="ThemeSwitch-module__moonCore___svwjb",B="ThemeSwitch-module__crater1___swpHc",E="ThemeSwitch-module__crater2___WQVKR",Q="ThemeSwitch-module__crater3___F-KJu",G="ThemeSwitch-module__crater4___ZsIb7",s={sunCore:l,small:m,medium:d,large:r,sunspot1:n,sunspot2:u,sunspot3:i,sunRay:h,rotateSun:w,switchContainer:S,dark:T,background:N,cloud:x,light:j,cloud1:v,floatCloud1:g,cloud2:$,floatCloud2:C,cloud3:p,floatCloud3:R,star:y,star1:k,star2:b,star3:f,star4:I,star5:F,star6:J,star7:K,star8:U,twinkle:O,toggle:V,sun:W,moon:Y,moonCore:q,crater1:B,crater2:E,crater3:Q,crater4:G},Z=({enableDarkMode:t,setEnableDarkMode:a,size:c="large"})=>{const _=()=>{a(!t)};return e.jsxs("div",{className:`${s.switchContainer} ${s[c]} ${t?s.dark:s.light}`,onClick:_,role:"button",tabIndex:0,"aria-label":`Switch to ${t?"light":"dark"} mode`,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&_()},children:[e.jsxs("div",{className:s.background,children:[e.jsx("div",{className:`${s.cloud} ${s.cloud1}`}),e.jsx("div",{className:`${s.cloud} ${s.cloud2}`}),e.jsx("div",{className:`${s.cloud} ${s.cloud3}`}),e.jsx("div",{className:`${s.star} ${s.star1}`}),e.jsx("div",{className:`${s.star} ${s.star2}`}),e.jsx("div",{className:`${s.star} ${s.star3}`}),e.jsx("div",{className:`${s.star} ${s.star4}`}),e.jsx("div",{className:`${s.star} ${s.star5}`}),e.jsx("div",{className:`${s.star} ${s.star6}`}),e.jsx("div",{className:`${s.star} ${s.star7}`}),e.jsx("div",{className:`${s.star} ${s.star8}`})]}),e.jsxs("div",{className:s.toggle,children:[e.jsxs("div",{className:s.sun,children:[e.jsxs("div",{className:s.sunCore,children:[e.jsx("div",{className:s.sunspot1}),e.jsx("div",{className:s.sunspot2}),e.jsx("div",{className:s.sunspot3})]}),e.jsx("div",{className:s.sunRay}),e.jsx("div",{className:s.sunRay}),e.jsx("div",{className:s.sunRay}),e.jsx("div",{className:s.sunRay}),e.jsx("div",{className:s.sunRay}),e.jsx("div",{className:s.sunRay}),e.jsx("div",{className:s.sunRay}),e.jsx("div",{className:s.sunRay})]}),e.jsx("div",{className:s.moon,children:e.jsxs("div",{className:s.moonCore,children:[e.jsx("div",{className:s.crater1}),e.jsx("div",{className:s.crater2}),e.jsx("div",{className:s.crater3}),e.jsx("div",{className:s.crater4})]})})]})]})};exports.ThemeSwitch=Z;
|
|
2
|
-
//# sourceMappingURL=ThemeSwitch-C7k1_MA4.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeSwitch-C7k1_MA4.cjs","sources":["../src/components/ThemeSwitch/ThemeSwitch.tsx"],"sourcesContent":["import React from 'react';\n\nimport styles from './ThemeSwitch.module.css';\n\n/**\n * Props for the ThemeSwitch component\n */\nexport interface ThemeSwitchProps {\n /** Whether dark mode is currently enabled */\n enableDarkMode: boolean;\n /** Callback function to update the dark mode state */\n setEnableDarkMode: (value: boolean) => void;\n /** Size variant of the switch. Defaults to 'large' */\n size?: 'small' | 'medium' | 'large';\n}\n\n/**\n * ThemeSwitch Component\n *\n * An animated toggle switch for switching between light and dark themes.\n * Features sun/moon icons with animated clouds (light mode) and stars (dark mode).\n *\n * @component\n * @example\n * ```tsx\n * const [darkMode, setDarkMode] = useState(false);\n * <ThemeSwitch\n * enableDarkMode={darkMode}\n * setEnableDarkMode={setDarkMode}\n * size=\"medium\"\n * />\n * ```\n */\nconst ThemeSwitch: React.FC<ThemeSwitchProps> = ({\n enableDarkMode,\n setEnableDarkMode,\n size = 'large'\n}) => {\n const handleToggle = () => {\n setEnableDarkMode(!enableDarkMode);\n };\n\n return (\n <div\n className={`${styles.switchContainer} ${styles[size]} ${\n enableDarkMode ? styles.dark : styles.light\n }`}\n onClick={handleToggle}\n role=\"button\"\n tabIndex={0}\n aria-label={`Switch to ${enableDarkMode ? 'light' : 'dark'} mode`}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n handleToggle();\n }\n }}\n >\n {/* Background elements */}\n <div className={styles.background}>\n {/* Clouds for light mode */}\n <div className={`${styles.cloud} ${styles.cloud1}`}></div>\n <div className={`${styles.cloud} ${styles.cloud2}`}></div>\n <div className={`${styles.cloud} ${styles.cloud3}`}></div>\n\n {/* Stars for dark mode */}\n <div className={`${styles.star} ${styles.star1}`}></div>\n <div className={`${styles.star} ${styles.star2}`}></div>\n <div className={`${styles.star} ${styles.star3}`}></div>\n <div className={`${styles.star} ${styles.star4}`}></div>\n <div className={`${styles.star} ${styles.star5}`}></div>\n <div className={`${styles.star} ${styles.star6}`}></div>\n <div className={`${styles.star} ${styles.star7}`}></div>\n <div className={`${styles.star} ${styles.star8}`}></div>\n </div>\n\n {/* Toggle circle with sun/moon */}\n <div className={styles.toggle}>\n {/* Sun */}\n <div className={styles.sun}>\n <div className={styles.sunCore}>\n <div className={styles.sunspot1}></div>\n <div className={styles.sunspot2}></div>\n <div className={styles.sunspot3}></div>\n </div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n </div>\n\n {/* Moon */}\n <div className={styles.moon}>\n <div className={styles.moonCore}>\n <div className={styles.crater1}></div>\n <div className={styles.crater2}></div>\n <div className={styles.crater3}></div>\n <div className={styles.crater4}></div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default ThemeSwitch;\n"],"names":["ThemeSwitch","enableDarkMode","setEnableDarkMode","size","handleToggle","jsxs","styles","e","jsx"],"mappings":"s4DAiCMA,EAA0C,CAAC,CAC/C,eAAAC,EACA,kBAAAC,EACA,KAAAC,EAAO,OACT,IAAM,CACJ,MAAMC,EAAe,IAAM,CACzBF,EAAkB,CAACD,CAAc,CACnC,EAEA,OACEI,EAAAA,KAAC,MAAA,CACC,UAAW,GAAGC,EAAO,eAAe,IAAIA,EAAOH,CAAI,CAAC,IAClDF,EAAiBK,EAAO,KAAOA,EAAO,KACxC,GACA,QAASF,EACT,KAAK,SACL,SAAU,EACV,aAAY,aAAaH,EAAiB,QAAU,MAAM,QAC1D,UAAYM,GAAM,EACZA,EAAE,MAAQ,SAAWA,EAAE,MAAQ,MACjCH,EAAA,CAEJ,EAGA,SAAA,C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A,IAAC,MAAA,CAAI,UAAWF,EAAO,QAAA,CAAU,EACjCE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,QAAA,CAAU,CAAA,EACnC,EACAE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,MAAA,CAAQ,EAC/BE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,MAAA,CAAQ,EAC/BE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,MAAA,CAAQ,EAC/BE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,MAAA,CAAQ,EAC/BE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,MAAA,CAAQ,EAC/BE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,MAAA,CAAQ,EAC/BE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,MAAA,CAAQ,EAC/BE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,MAAA,CAAQ,CAAA,EACjC,EAGAE,EAAAA,IAAC,OAAI,UAAWF,EAAO,KACrB,SAAAD,EAAAA,KAAC,MAAA,CAAI,UAAWC,EAAO,SACrB,SAAA,CAAAE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,OAAA,CAAS,EAChCE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,OAAA,CAAS,EAChCE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,OAAA,CAAS,EAChCE,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAO,OAAA,CAAS,CAAA,CAAA,CAClC,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CAGN"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import './ThemeSwitch.css';const m = "ThemeSwitch-module__sunCore___tUhud", d = "ThemeSwitch-module__small___YlvWo", r = "ThemeSwitch-module__medium___Q8Rro", n = "ThemeSwitch-module__large___BMOxC", u = "ThemeSwitch-module__sunspot1___8RI1V", i = "ThemeSwitch-module__sunspot2___U0whF", h = "ThemeSwitch-module__sunspot3___kWYEI", w = "ThemeSwitch-module__sunRay___t1B4U", S = "ThemeSwitch-module__rotateSun___JQByd", T = "ThemeSwitch-module__switchContainer___VENjU", N = "ThemeSwitch-module__dark___a4vSn", v = "ThemeSwitch-module__background___Rpodp", g = "ThemeSwitch-module__cloud___OoOyx", $ = "ThemeSwitch-module__light___ddTa2", C = "ThemeSwitch-module__cloud1___aqGNx", p = "ThemeSwitch-module__floatCloud1___MdWMj", y = "ThemeSwitch-module__cloud2___guY71", R = "ThemeSwitch-module__floatCloud2___2x6Sp", k = "ThemeSwitch-module__cloud3___7-NhR", b = "ThemeSwitch-module__floatCloud3___FJCbV", f = "ThemeSwitch-module__star___Z98bU", x = "ThemeSwitch-module__star1___rhotb", I = "ThemeSwitch-module__star2___pzbNR", j = "ThemeSwitch-module__star3___iK7lJ", F = "ThemeSwitch-module__star4___t5pqN", J = "ThemeSwitch-module__star5___dx42N", K = "ThemeSwitch-module__star6___wur-I", U = "ThemeSwitch-module__star7___KONgd", O = "ThemeSwitch-module__star8___gIYpk", V = "ThemeSwitch-module__twinkle___Abun5", W = "ThemeSwitch-module__toggle___L5FGS", Y = "ThemeSwitch-module__sun___s8noI", B = "ThemeSwitch-module__moon___TNpFJ", E = "ThemeSwitch-module__moonCore___svwjb", Q = "ThemeSwitch-module__crater1___swpHc", q = "ThemeSwitch-module__crater2___WQVKR", G = "ThemeSwitch-module__crater3___F-KJu", Z = "ThemeSwitch-module__crater4___ZsIb7", s = {
|
|
3
|
-
sunCore: m,
|
|
4
|
-
small: d,
|
|
5
|
-
medium: r,
|
|
6
|
-
large: n,
|
|
7
|
-
sunspot1: u,
|
|
8
|
-
sunspot2: i,
|
|
9
|
-
sunspot3: h,
|
|
10
|
-
sunRay: w,
|
|
11
|
-
rotateSun: S,
|
|
12
|
-
switchContainer: T,
|
|
13
|
-
dark: N,
|
|
14
|
-
background: v,
|
|
15
|
-
cloud: g,
|
|
16
|
-
light: $,
|
|
17
|
-
cloud1: C,
|
|
18
|
-
floatCloud1: p,
|
|
19
|
-
cloud2: y,
|
|
20
|
-
floatCloud2: R,
|
|
21
|
-
cloud3: k,
|
|
22
|
-
floatCloud3: b,
|
|
23
|
-
star: f,
|
|
24
|
-
star1: x,
|
|
25
|
-
star2: I,
|
|
26
|
-
star3: j,
|
|
27
|
-
star4: F,
|
|
28
|
-
star5: J,
|
|
29
|
-
star6: K,
|
|
30
|
-
star7: U,
|
|
31
|
-
star8: O,
|
|
32
|
-
twinkle: V,
|
|
33
|
-
toggle: W,
|
|
34
|
-
sun: Y,
|
|
35
|
-
moon: B,
|
|
36
|
-
moonCore: E,
|
|
37
|
-
crater1: Q,
|
|
38
|
-
crater2: q,
|
|
39
|
-
crater3: G,
|
|
40
|
-
crater4: Z
|
|
41
|
-
}, A = ({
|
|
42
|
-
enableDarkMode: _,
|
|
43
|
-
setEnableDarkMode: c,
|
|
44
|
-
size: l = "large"
|
|
45
|
-
}) => {
|
|
46
|
-
const o = () => {
|
|
47
|
-
c(!_);
|
|
48
|
-
};
|
|
49
|
-
return /* @__PURE__ */ t(
|
|
50
|
-
"div",
|
|
51
|
-
{
|
|
52
|
-
className: `${s.switchContainer} ${s[l]} ${_ ? s.dark : s.light}`,
|
|
53
|
-
onClick: o,
|
|
54
|
-
role: "button",
|
|
55
|
-
tabIndex: 0,
|
|
56
|
-
"aria-label": `Switch to ${_ ? "light" : "dark"} mode`,
|
|
57
|
-
onKeyDown: (a) => {
|
|
58
|
-
(a.key === "Enter" || a.key === " ") && o();
|
|
59
|
-
},
|
|
60
|
-
children: [
|
|
61
|
-
/* @__PURE__ */ t("div", { className: s.background, children: [
|
|
62
|
-
/* @__PURE__ */ e("div", { className: `${s.cloud} ${s.cloud1}` }),
|
|
63
|
-
/* @__PURE__ */ e("div", { className: `${s.cloud} ${s.cloud2}` }),
|
|
64
|
-
/* @__PURE__ */ e("div", { className: `${s.cloud} ${s.cloud3}` }),
|
|
65
|
-
/* @__PURE__ */ e("div", { className: `${s.star} ${s.star1}` }),
|
|
66
|
-
/* @__PURE__ */ e("div", { className: `${s.star} ${s.star2}` }),
|
|
67
|
-
/* @__PURE__ */ e("div", { className: `${s.star} ${s.star3}` }),
|
|
68
|
-
/* @__PURE__ */ e("div", { className: `${s.star} ${s.star4}` }),
|
|
69
|
-
/* @__PURE__ */ e("div", { className: `${s.star} ${s.star5}` }),
|
|
70
|
-
/* @__PURE__ */ e("div", { className: `${s.star} ${s.star6}` }),
|
|
71
|
-
/* @__PURE__ */ e("div", { className: `${s.star} ${s.star7}` }),
|
|
72
|
-
/* @__PURE__ */ e("div", { className: `${s.star} ${s.star8}` })
|
|
73
|
-
] }),
|
|
74
|
-
/* @__PURE__ */ t("div", { className: s.toggle, children: [
|
|
75
|
-
/* @__PURE__ */ t("div", { className: s.sun, children: [
|
|
76
|
-
/* @__PURE__ */ t("div", { className: s.sunCore, children: [
|
|
77
|
-
/* @__PURE__ */ e("div", { className: s.sunspot1 }),
|
|
78
|
-
/* @__PURE__ */ e("div", { className: s.sunspot2 }),
|
|
79
|
-
/* @__PURE__ */ e("div", { className: s.sunspot3 })
|
|
80
|
-
] }),
|
|
81
|
-
/* @__PURE__ */ e("div", { className: s.sunRay }),
|
|
82
|
-
/* @__PURE__ */ e("div", { className: s.sunRay }),
|
|
83
|
-
/* @__PURE__ */ e("div", { className: s.sunRay }),
|
|
84
|
-
/* @__PURE__ */ e("div", { className: s.sunRay }),
|
|
85
|
-
/* @__PURE__ */ e("div", { className: s.sunRay }),
|
|
86
|
-
/* @__PURE__ */ e("div", { className: s.sunRay }),
|
|
87
|
-
/* @__PURE__ */ e("div", { className: s.sunRay }),
|
|
88
|
-
/* @__PURE__ */ e("div", { className: s.sunRay })
|
|
89
|
-
] }),
|
|
90
|
-
/* @__PURE__ */ e("div", { className: s.moon, children: /* @__PURE__ */ t("div", { className: s.moonCore, children: [
|
|
91
|
-
/* @__PURE__ */ e("div", { className: s.crater1 }),
|
|
92
|
-
/* @__PURE__ */ e("div", { className: s.crater2 }),
|
|
93
|
-
/* @__PURE__ */ e("div", { className: s.crater3 }),
|
|
94
|
-
/* @__PURE__ */ e("div", { className: s.crater4 })
|
|
95
|
-
] }) })
|
|
96
|
-
] })
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
};
|
|
101
|
-
export {
|
|
102
|
-
A as T
|
|
103
|
-
};
|
|
104
|
-
//# sourceMappingURL=ThemeSwitch-DbaEio36.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeSwitch-DbaEio36.js","sources":["../src/components/ThemeSwitch/ThemeSwitch.tsx"],"sourcesContent":["import React from 'react';\n\nimport styles from './ThemeSwitch.module.css';\n\n/**\n * Props for the ThemeSwitch component\n */\nexport interface ThemeSwitchProps {\n /** Whether dark mode is currently enabled */\n enableDarkMode: boolean;\n /** Callback function to update the dark mode state */\n setEnableDarkMode: (value: boolean) => void;\n /** Size variant of the switch. Defaults to 'large' */\n size?: 'small' | 'medium' | 'large';\n}\n\n/**\n * ThemeSwitch Component\n *\n * An animated toggle switch for switching between light and dark themes.\n * Features sun/moon icons with animated clouds (light mode) and stars (dark mode).\n *\n * @component\n * @example\n * ```tsx\n * const [darkMode, setDarkMode] = useState(false);\n * <ThemeSwitch\n * enableDarkMode={darkMode}\n * setEnableDarkMode={setDarkMode}\n * size=\"medium\"\n * />\n * ```\n */\nconst ThemeSwitch: React.FC<ThemeSwitchProps> = ({\n enableDarkMode,\n setEnableDarkMode,\n size = 'large'\n}) => {\n const handleToggle = () => {\n setEnableDarkMode(!enableDarkMode);\n };\n\n return (\n <div\n className={`${styles.switchContainer} ${styles[size]} ${\n enableDarkMode ? styles.dark : styles.light\n }`}\n onClick={handleToggle}\n role=\"button\"\n tabIndex={0}\n aria-label={`Switch to ${enableDarkMode ? 'light' : 'dark'} mode`}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n handleToggle();\n }\n }}\n >\n {/* Background elements */}\n <div className={styles.background}>\n {/* Clouds for light mode */}\n <div className={`${styles.cloud} ${styles.cloud1}`}></div>\n <div className={`${styles.cloud} ${styles.cloud2}`}></div>\n <div className={`${styles.cloud} ${styles.cloud3}`}></div>\n\n {/* Stars for dark mode */}\n <div className={`${styles.star} ${styles.star1}`}></div>\n <div className={`${styles.star} ${styles.star2}`}></div>\n <div className={`${styles.star} ${styles.star3}`}></div>\n <div className={`${styles.star} ${styles.star4}`}></div>\n <div className={`${styles.star} ${styles.star5}`}></div>\n <div className={`${styles.star} ${styles.star6}`}></div>\n <div className={`${styles.star} ${styles.star7}`}></div>\n <div className={`${styles.star} ${styles.star8}`}></div>\n </div>\n\n {/* Toggle circle with sun/moon */}\n <div className={styles.toggle}>\n {/* Sun */}\n <div className={styles.sun}>\n <div className={styles.sunCore}>\n <div className={styles.sunspot1}></div>\n <div className={styles.sunspot2}></div>\n <div className={styles.sunspot3}></div>\n </div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n <div className={styles.sunRay}></div>\n </div>\n\n {/* Moon */}\n <div className={styles.moon}>\n <div className={styles.moonCore}>\n <div className={styles.crater1}></div>\n <div className={styles.crater2}></div>\n <div className={styles.crater3}></div>\n <div className={styles.crater4}></div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default ThemeSwitch;\n"],"names":["ThemeSwitch","enableDarkMode","setEnableDarkMode","size","handleToggle","jsxs","styles","e","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCMA,IAA0C,CAAC;AAAA,EAC/C,gBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,MAAAC,IAAO;AACT,MAAM;AACJ,QAAMC,IAAe,MAAM;AACzB,IAAAF,E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,gBAAAD,EAAC,OAAA,EAAI,WAAWC,EAAO,UACrB,UAAA;AAAA,YAAA,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,QAAA,CAAS;AAAA,YAChC,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,QAAA,CAAS;AAAA,YAChC,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,QAAA,CAAS;AAAA,YAChC,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,QAAA,CAAS;AAAA,UAAA,EAAA,CAClC,EAAA,CACF;AAAA,QAAA,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-render.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-render.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monthly-calendar.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monthly-calendar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme-switch.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/theme-switch.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme-switch.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|