@macolmenerori/component-library 0.0.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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Miguel Angel Colmenero Rincon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # @macolmenerori/component-library
2
+
3
+ A modern React component library built with TypeScript, providing reusable UI components for your React applications.
4
+
5
+ ## Features
6
+
7
+ - Built with React 19 and TypeScript
8
+ - Fully typed components with TypeScript declarations
9
+ - ESM and CommonJS support
10
+ - Tree-shakeable exports
11
+ - Strict TypeScript configuration for type safety
12
+
13
+ ## Installation
14
+
15
+ This package is published to GitHub Packages. To install it in your project, you need to configure npm to use GitHub Packages for the `@macolmenerori` scope.
16
+
17
+ Create or update a `.npmrc` file in your project root with the following content:
18
+
19
+ ```
20
+ @macolmenerori:registry=https://npm.pkg.github.com
21
+ ```
22
+
23
+ Then install the package:
24
+
25
+ Using npm:
26
+
27
+ ```bash
28
+ npm install @macolmenerori/component-library
29
+ ```
30
+
31
+ Using pnpm:
32
+
33
+ ```bash
34
+ pnpm add @macolmenerori/component-library
35
+ ```
36
+
37
+ Using yarn:
38
+
39
+ ```bash
40
+ yarn add @macolmenerori/component-library
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ Import components from the library:
46
+
47
+ ```tsx
48
+ import { ThemeSwitch } from '@macolmenerori/component-library';
49
+
50
+ function App() {
51
+ return (
52
+ <div>
53
+ <ThemeSwitch />
54
+ </div>
55
+ );
56
+ }
57
+ ```
58
+
59
+ ## Peer Dependencies
60
+
61
+ This library requires the following peer dependencies:
62
+
63
+ - React: ^18.0.0 or ^19.0.0
64
+ - React DOM: ^18.0.0 or ^19.0.0
65
+
66
+ Make sure these are installed in your project.
67
+
68
+ ## Development
69
+
70
+ This section is for contributors working on the library itself.
71
+
72
+ ### Prerequisites
73
+
74
+ - Node.js >= 22.0.0 and < 23.0.0
75
+ - pnpm 10.19.0
76
+
77
+ ### Setup
78
+
79
+ ```bash
80
+ pnpm install
81
+ ```
82
+
83
+ ### Available Scripts
84
+
85
+ - `pnpm dev` - Start the development server on port 3000
86
+ - `pnpm build` - Build the library for distribution
87
+ - `pnpm preview` - Preview the production build
88
+ - `pnpm prettify` - Format code with Prettier
89
+ - `pnpm lint` - Lint code with ESLint
90
+ - `pnpm types` - Type check with TypeScript
91
+
92
+ ### Building
93
+
94
+ To build the library:
95
+
96
+ ```bash
97
+ pnpm build
98
+ ```
99
+
100
+ This will generate:
101
+
102
+ - ESM bundle at `dist/index.js`
103
+ - CommonJS bundle at `dist/index.cjs`
104
+ - TypeScript declarations at `dist/types/`
105
+
106
+ ### Publishing
107
+
108
+ To publish a new version:
109
+
110
+ 1. Build the library: `pnpm build`
111
+ 2. Publish: `pnpm publish`
112
+
113
+ ## Technology Stack
114
+
115
+ - **React** 19.0.0 - UI library
116
+ - **TypeScript** 5.7.3 - Type safety
117
+ - **Vite** 7.0.5 - Build tool and dev server
118
+ - **ESLint** - Code linting
119
+ - **Prettier** - Code formatting
120
+
121
+ ## License
122
+
123
+ MIT
124
+
125
+ ## Repository
126
+
127
+ [https://github.com/macolmenerori/component-library](https://github.com/macolmenerori/component-library)
package/dist/index.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.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",y="ThemeSwitch-module__floatCloud3___FJCbV",R="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",O="ThemeSwitch-module__star8___gIYpk",U="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:y,star:R,star1:k,star2:b,star3:f,star4:I,star5:F,star6:J,star7:K,star8:O,twinkle:U,toggle:V,sun:W,moon:Y,moonCore:q,crater1:B,crater2:E,crater3:Q,crater4:G},M=({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=M;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.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 */\ninterface 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":"y8DAiCMA,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,CA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ADDED
@@ -0,0 +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}
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="es">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="theme-color" content="#000000" />
7
+ <title>Macolmenerori Component Library</title>
8
+ </head>
9
+ <body>
10
+ <noscript>You need to enable JavaScript to run this app.</noscript>
11
+ <div id="root"></div>
12
+ </body>
13
+ </html>
package/dist/index.js ADDED
@@ -0,0 +1,104 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import './index.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 ThemeSwitch
103
+ };
104
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.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 */\ninterface 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,EAAkB,CAACD,CAAc;AAAA,EACnC;AAEA,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,GAAGC,EAAO,eAAe,IAAIA,EAAOH,CAAI,CAAC,IAClDF,IAAiBK,EAAO,OAAOA,EAAO,KACxC;AAAA,MACA,SAASF;AAAA,MACT,MAAK;AAAA,MACL,UAAU;AAAA,MACV,cAAY,aAAaH,IAAiB,UAAU,MAAM;AAAA,MAC1D,WAAW,CAACM,MAAM;AAChB,SAAIA,EAAE,QAAQ,WAAWA,EAAE,QAAQ,QACjCH,EAAA;AAAA,MAEJ;AAAA,MAGA,UAAA;AAAA,QAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,YAErB,UAAA;AAAA,UAAA,gBAAAE,EAAC,OAAA,EAAI,WAAW,GAAGF,EAAO,KAAK,IAAIA,EAAO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AO,SAAA,CAAU;AAAA,cACjC,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,SAAA,CAAU;AAAA,YAAA,GACnC;AAAA,YACA,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,OAAA,CAAQ;AAAA,YAC/B,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,OAAA,CAAQ;AAAA,YAC/B,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,OAAA,CAAQ;AAAA,YAC/B,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,OAAA,CAAQ;AAAA,YAC/B,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,OAAA,CAAQ;AAAA,YAC/B,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,OAAA,CAAQ;AAAA,YAC/B,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,OAAA,CAAQ;AAAA,YAC/B,gBAAAE,EAAC,OAAA,EAAI,WAAWF,EAAO,OAAA,CAAQ;AAAA,UAAA,GACjC;AAAA,UAGA,gBAAAE,EAAC,SAAI,WAAWF,EAAO,MACrB,UAAA,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;"}
@@ -0,0 +1,34 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * ThemeSwitch Component
5
+ *
6
+ * An animated toggle switch for switching between light and dark themes.
7
+ * Features sun/moon icons with animated clouds (light mode) and stars (dark mode).
8
+ *
9
+ * @component
10
+ * @example
11
+ * ```tsx
12
+ * const [darkMode, setDarkMode] = useState(false);
13
+ * <ThemeSwitch
14
+ * enableDarkMode={darkMode}
15
+ * setEnableDarkMode={setDarkMode}
16
+ * size="medium"
17
+ * />
18
+ * ```
19
+ */
20
+ export declare const ThemeSwitch: default_2.FC<ThemeSwitchProps>;
21
+
22
+ /**
23
+ * Props for the ThemeSwitch component
24
+ */
25
+ declare interface ThemeSwitchProps {
26
+ /** Whether dark mode is currently enabled */
27
+ enableDarkMode: boolean;
28
+ /** Callback function to update the dark mode state */
29
+ setEnableDarkMode: (value: boolean) => void;
30
+ /** Size variant of the switch. Defaults to 'large' */
31
+ size?: 'small' | 'medium' | 'large';
32
+ }
33
+
34
+ export { }
package/package.json ADDED
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "@macolmenerori/component-library",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "description": "",
6
+ "keywords": [],
7
+ "author": "macolmenerori",
8
+ "license": "MIT",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/macolmenerori/component-library.git"
12
+ },
13
+ "engines": {
14
+ "node": ">=24.0.0 <25.0.0"
15
+ },
16
+ "main": "dist/index.cjs",
17
+ "module": "dist/index.js",
18
+ "types": "dist/types/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "import": {
22
+ "types": "./dist/types/index.d.ts",
23
+ "default": "./dist/index.js"
24
+ },
25
+ "require": {
26
+ "types": "./dist/types/index.d.ts",
27
+ "default": "./dist/index.cjs"
28
+ }
29
+ }
30
+ },
31
+ "files": [
32
+ "dist"
33
+ ],
34
+ "publishConfig": {
35
+ "registry": "https://registry.npmjs.org/",
36
+ "access": "public"
37
+ },
38
+ "peerDependencies": {
39
+ "react": "^18.0.0 || ^19.0.0",
40
+ "react-dom": "^18.0.0 || ^19.0.0"
41
+ },
42
+ "devDependencies": {
43
+ "@eslint/js": "^9.39.1",
44
+ "@jest/types": "^30.2.0",
45
+ "@testing-library/jest-dom": "^6.9.1",
46
+ "@testing-library/react": "^16.3.0",
47
+ "@testing-library/user-event": "^14.6.1",
48
+ "@types/jest": "^30.0.0",
49
+ "@types/node": "^24.10.0",
50
+ "@types/react": "^19.2.2",
51
+ "@types/react-dom": "^19.2.2",
52
+ "@vitejs/plugin-react": "^5.1.0",
53
+ "eslint": "^9.39.1",
54
+ "eslint-config-prettier": "^10.1.8",
55
+ "eslint-plugin-jest-dom": "^5.5.0",
56
+ "eslint-plugin-jsx-a11y": "^6.10.2",
57
+ "eslint-plugin-prettier": "^5.5.4",
58
+ "eslint-plugin-react": "^7.37.5",
59
+ "eslint-plugin-react-hooks": "^7.0.1",
60
+ "eslint-plugin-simple-import-sort": "^12.1.1",
61
+ "eslint-plugin-testing-library": "^7.13.3",
62
+ "jest": "^30.2.0",
63
+ "jest-environment-jsdom": "^30.2.0",
64
+ "jest-fixed-jsdom": "^0.0.10",
65
+ "prettier": "^3.6.2",
66
+ "react": "^19.2.0",
67
+ "react-dom": "^19.2.0",
68
+ "typescript": "^5.9.3",
69
+ "typescript-eslint": "^8.46.3",
70
+ "vite": "^7.2.1",
71
+ "vite-plugin-dts": "^4.5.4",
72
+ "vite-plugin-lib-inject-css": "^2.2.2"
73
+ },
74
+ "scripts": {
75
+ "dev": "vite",
76
+ "build": "tsc --noEmit && vite build",
77
+ "preview": "vite preview",
78
+ "prettify": "prettier -w --log-level=silent src/",
79
+ "lint": "eslint --fix ./src/",
80
+ "test": "echo \"Info: no tests for the moment\" && exit 0",
81
+ "types": "tsc --noEmit",
82
+ "verify": "pnpm lint && pnpm prettify && pnpm types && pnpm test && pnpm audit --prod && pnpm build",
83
+ "publish:npm": "pnpm publish --registry https://registry.npmjs.org/ --access public",
84
+ "publish:github": "pnpm publish --registry https://npm.pkg.github.com"
85
+ }
86
+ }