@generation/icons 1.1.6 → 1.1.8
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/.circleci/config.yml +11 -29
- package/package.json +1 -1
- package/packages/demo/package-lock.json +1098 -38
- package/packages/demo/package.json +4 -1
- package/packages/demo/postcss.config.js +7 -0
- package/packages/demo/src/App.jsx +1 -9
- package/packages/demo/src/components/Gallery/Gallery.jsx +439 -2589
- package/packages/demo/src/index.css +4 -7
- package/packages/demo/tailwind.config.js +130 -0
- package/scripts/create-full.mjs +71 -17
- package/packages/demo/src/App.css +0 -13
- package/packages/demo/src/components/Gallery/styles.css +0 -38
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
content: [
|
|
4
|
+
"./index.html",
|
|
5
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
6
|
+
],
|
|
7
|
+
theme: {
|
|
8
|
+
extend: {
|
|
9
|
+
colors: {
|
|
10
|
+
blue: {
|
|
11
|
+
'01': '#006AEB',
|
|
12
|
+
'02': '#005CC4',
|
|
13
|
+
},
|
|
14
|
+
charcoal: '#303135',
|
|
15
|
+
current: 'currentColor',
|
|
16
|
+
green: {
|
|
17
|
+
'00': '#01836B',
|
|
18
|
+
},
|
|
19
|
+
gray: {
|
|
20
|
+
'00': '#303135',
|
|
21
|
+
'01': '#474747',
|
|
22
|
+
'02': '#737373',
|
|
23
|
+
'03': '#999999',
|
|
24
|
+
'04': '#DDDDDD',
|
|
25
|
+
'05': '#F3F3F3',
|
|
26
|
+
'06': '#FAFAFA',
|
|
27
|
+
},
|
|
28
|
+
orange: {
|
|
29
|
+
'00': '#E95400',
|
|
30
|
+
},
|
|
31
|
+
red: {
|
|
32
|
+
'00': '#D91222',
|
|
33
|
+
},
|
|
34
|
+
transparent: 'transparent',
|
|
35
|
+
white: '#FFFFFF',
|
|
36
|
+
},
|
|
37
|
+
screens: {
|
|
38
|
+
// => @media (min-width: 6768px) { ... }
|
|
39
|
+
// VALERIA DIJO QUE ESTO ESTABA BIEN
|
|
40
|
+
sm: '480px',
|
|
41
|
+
md: '768px',
|
|
42
|
+
lg: '1024px',
|
|
43
|
+
xl: '1280px', // Esta es la vista de 1440px
|
|
44
|
+
},
|
|
45
|
+
fontSize: {
|
|
46
|
+
'title-sm-bold': [
|
|
47
|
+
'20px',
|
|
48
|
+
{
|
|
49
|
+
lineHeight: '28px',
|
|
50
|
+
letterSpacing: '0',
|
|
51
|
+
fontWeight: '700',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
'title-md-bold': [
|
|
55
|
+
'24px',
|
|
56
|
+
{
|
|
57
|
+
lineHeight: '28px',
|
|
58
|
+
letterSpacing: '0',
|
|
59
|
+
fontWeight: '700',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
'title-lg-bold': [
|
|
63
|
+
'28px',
|
|
64
|
+
{
|
|
65
|
+
lineHeight: '32px',
|
|
66
|
+
letterSpacing: '0',
|
|
67
|
+
fontWeight: '700',
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
'body-xs-bold': [
|
|
71
|
+
'12px',
|
|
72
|
+
{
|
|
73
|
+
lineHeight: '16px',
|
|
74
|
+
letterSpacing: '0',
|
|
75
|
+
fontWeight: '700',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
'body-xs-regular': [
|
|
79
|
+
'12px',
|
|
80
|
+
{
|
|
81
|
+
lineHeight: '16px',
|
|
82
|
+
letterSpacing: '0',
|
|
83
|
+
fontWeight: '400',
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
'body-sm-bold': [
|
|
87
|
+
'14px',
|
|
88
|
+
{
|
|
89
|
+
lineHeight: '20px',
|
|
90
|
+
letterSpacing: '0',
|
|
91
|
+
fontWeight: '700',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
'body-sm-regular': [
|
|
95
|
+
'14px',
|
|
96
|
+
{
|
|
97
|
+
lineHeight: '20px',
|
|
98
|
+
letterSpacing: '0',
|
|
99
|
+
fontWeight: '400',
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
'body-md-regular': [
|
|
103
|
+
'16px',
|
|
104
|
+
{
|
|
105
|
+
lineHeight: '24px',
|
|
106
|
+
letterSpacing: '0',
|
|
107
|
+
fontWeight: '400',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
'body-md-bold': [
|
|
111
|
+
'16px',
|
|
112
|
+
{
|
|
113
|
+
lineHeight: '24px',
|
|
114
|
+
letterSpacing: '0',
|
|
115
|
+
fontWeight: '700',
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
'body-lg-bold': [
|
|
119
|
+
'20px',
|
|
120
|
+
{
|
|
121
|
+
lineHeight: '26px',
|
|
122
|
+
letterSpacing: '0',
|
|
123
|
+
fontWeight: '700',
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
plugins: [],
|
|
130
|
+
};
|
package/scripts/create-full.mjs
CHANGED
|
@@ -14,29 +14,83 @@ const iconNames = Array.from(
|
|
|
14
14
|
(match) => match[1]
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
-
// Construir el contenido del archivo Gallery.jsx
|
|
17
|
+
// Construir el contenido del archivo Gallery.jsx con toggle y búsqueda
|
|
18
18
|
const galleryContent = `
|
|
19
|
-
import React from 'react';
|
|
20
|
-
import '
|
|
19
|
+
import React, { useState } from 'react';
|
|
20
|
+
import { Code } from '../Code';
|
|
21
21
|
import {
|
|
22
22
|
${iconNames.join(',\n ')}
|
|
23
23
|
} from '@generation/icons';
|
|
24
24
|
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
const icons = {
|
|
26
|
+
${iconNames.map((icon) => `${icon}`).join(',\n ')}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const Gallery = () => {
|
|
30
|
+
const [searchTerm, setSearchTerm] = useState('');
|
|
31
|
+
const [isDarkMode, setIsDarkMode] = useState(false);
|
|
32
|
+
|
|
33
|
+
// Filtrar iconos según el término de búsqueda
|
|
34
|
+
const filteredIcons = Object.entries(icons).filter(([name]) =>
|
|
35
|
+
name.toLowerCase().includes(searchTerm.toLowerCase())
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
// Estilos dinámicos según el modo (oscuro o claro)
|
|
39
|
+
const containerClass = isDarkMode ? 'bg-black text-white' : 'bg-white text-black';
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<div className={\`p-8 min-h-screen transition-colors duration-300 \${containerClass}\`}>
|
|
43
|
+
<div className="text-blue-01 text-title-lg-bold py-2 text-center">Generation Icons</div>
|
|
44
|
+
<div>
|
|
45
|
+
<Code />
|
|
33
46
|
</div>
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
<div className="flex justify-between items-center mb-6">
|
|
48
|
+
<input
|
|
49
|
+
type="text"
|
|
50
|
+
className="w-full max-w-md p-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 text-charcoal"
|
|
51
|
+
placeholder="Search icons..."
|
|
52
|
+
value={searchTerm}
|
|
53
|
+
onChange={(e) => setSearchTerm(e.target.value)}
|
|
54
|
+
/>
|
|
55
|
+
<button
|
|
56
|
+
className={\`relative inline-flex items-center cursor-pointer\`}
|
|
57
|
+
onClick={() => setIsDarkMode((prev) => !prev)}
|
|
58
|
+
>
|
|
59
|
+
<span className="sr-only">Modo Oscuro</span>
|
|
60
|
+
<span
|
|
61
|
+
className={\`block w-14 h-8 rounded-full \${isDarkMode ? 'bg-green-500' : 'bg-blue-500'}\`}
|
|
62
|
+
></span>
|
|
63
|
+
<span
|
|
64
|
+
className={\`absolute left-1 top-1 w-6 h-6 bg-white rounded-full transition-transform duration-300 ease-in-out transform \${isDarkMode ? 'translate-x-6' : 'translate-x-0'}\`}
|
|
65
|
+
></span>
|
|
66
|
+
</button>
|
|
67
|
+
</div>
|
|
68
|
+
<div
|
|
69
|
+
className="grid gap-4 text-center"
|
|
70
|
+
style={{
|
|
71
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(90px, 1fr))',
|
|
72
|
+
gridAutoRows: 'auto',
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
{filteredIcons.length > 0 ? (
|
|
76
|
+
filteredIcons.map(([name, IconComponent]) => (
|
|
77
|
+
<div
|
|
78
|
+
key={name}
|
|
79
|
+
className="flex flex-col items-center justify-center gap-1 text-center"
|
|
80
|
+
>
|
|
81
|
+
<div className={\`min-h-[64px] flex items-center justify-center border-2 border-transparent rounded shadow-md w-full text-[32px] \${isDarkMode ? 'bg-gray-900' : 'bg-white'}\`}>
|
|
82
|
+
<IconComponent />
|
|
83
|
+
</div>
|
|
84
|
+
<span className="text-[10px]">{name}</span>
|
|
85
|
+
</div>
|
|
86
|
+
))
|
|
87
|
+
) : (
|
|
88
|
+
<p className="col-span-full text-gray-500">No se encontraron iconos</p>
|
|
89
|
+
)}
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
};
|
|
40
94
|
|
|
41
95
|
export default Gallery;
|
|
42
96
|
`;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.gallery {
|
|
2
|
-
display: grid;
|
|
3
|
-
grid-template-columns: repeat(auto-fill, minmax(90px,1fr));
|
|
4
|
-
grid-auto-rows: auto;
|
|
5
|
-
text-align: center;
|
|
6
|
-
row-gap: 1rem;
|
|
7
|
-
column-gap: 1rem;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.gallery-item {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
gap: 0.25rem;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
align-items: center;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.gallery-item > span {
|
|
19
|
-
font-size: 9px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.gallery-item > span::selection {
|
|
23
|
-
color: red;
|
|
24
|
-
background: yellow;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.gallery-svg {
|
|
28
|
-
min-height: 64px;
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
background: #ffffff;
|
|
33
|
-
border-radius: 2px;
|
|
34
|
-
box-shadow: 0 1px 3px #0000001a, 0 1px 2px #0000000f;
|
|
35
|
-
border: 2px solid transparent;
|
|
36
|
-
width: 100%;
|
|
37
|
-
font-size: 2rem;
|
|
38
|
-
}
|