@generation/icons 1.1.7 → 1.1.9

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.
@@ -1,11 +1,8 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
1
5
  :root {
2
- color-scheme: light dark;
3
- color: #303135;
4
- background-color: #ffffff;
5
6
  font-family: 'azo-sans-web', sans-serif;
6
7
  font-size: 16px;
7
8
  }
8
-
9
- body {
10
- margin: 0;
11
- }
@@ -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
+ };
@@ -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 './styles.css';
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 Gallery = () => (
26
- <div className="gallery">
27
- ${iconNames
28
- .map(
29
- (icon) => `
30
- <div className="gallery-item">
31
- <div className="gallery-svg">
32
- <${icon} />
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
- <span>${icon}</span>
35
- </div>`
36
- )
37
- .join('\n ')}
38
- </div>
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
  `;
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ const FolderUserFill = (props) => (
3
+ <svg
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ width="1em"
6
+ height="1em"
7
+ fill="none"
8
+ viewBox="0 0 20 16"
9
+ {...props}
10
+ >
11
+ <path
12
+ fill="#000"
13
+ d="M18 2h-8L8 0H2C.9 0 .01.9.01 2L0 14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-5 3c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m4 8H9v-1c0-1.33 2.67-2 4-2s4 .67 4 2z"
14
+ />
15
+ </svg>
16
+ );
17
+ export default FolderUserFill;
@@ -169,6 +169,7 @@ export { default as Flagged } from './Flagged';
169
169
  export { default as FolderDescriptionFill } from './FolderDescriptionFill';
170
170
  export { default as FolderShared } from './FolderShared';
171
171
  export { default as FolderUser } from './FolderUser';
172
+ export { default as FolderUserFill } from './FolderUserFill';
172
173
  export { default as Forward } from './Forward';
173
174
  export { default as GraduationCapFill } from './GraduationCapFill';
174
175
  export { default as GraduationCapFillOut } from './GraduationCapFillOut';
@@ -1,13 +0,0 @@
1
- #root {
2
- max-width: 1280px;
3
- margin: 0 auto;
4
- padding: 2rem;
5
- }
6
-
7
- .title {
8
- margin-bottom: 2rem;
9
- text-align: center;
10
- font-weight: 400;
11
- font-size: 24px;
12
- left: 20px;
13
- }
@@ -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
- }