@lemontech/sour-theme 1.0.0
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/README.md +125 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +297 -0
- package/dist/theme/antdTheme.d.ts +2 -0
- package/dist/theme/index.d.ts +8 -0
- package/dist/theme/tokens.d.ts +20 -0
- package/package.json +89 -0
package/README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Sour Theme
|
|
2
|
+
|
|
3
|
+
Design System basado en Ant Design que exporta tema y tokens reutilizables.
|
|
4
|
+
|
|
5
|
+
## ¿Qué es?
|
|
6
|
+
|
|
7
|
+
Librería de diseño que proporciona:
|
|
8
|
+
- **Tema (antdTheme)**: Configuración completa de Ant Design personalizada
|
|
9
|
+
- **Tokens**: Sistema de tokens de diseño (colores, espaciado, tipografía, etc.)
|
|
10
|
+
|
|
11
|
+
Para ser consumidos en cualquier proyecto React que use Ant Design.
|
|
12
|
+
|
|
13
|
+
## Requisitos
|
|
14
|
+
|
|
15
|
+
- Node >= 20.19.0
|
|
16
|
+
- pnpm >= 9.0.0
|
|
17
|
+
|
|
18
|
+
## Desarrollo
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
nvm install node
|
|
22
|
+
nvm use
|
|
23
|
+
pnpm install
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Storybook (Demos)
|
|
27
|
+
|
|
28
|
+
Storybook muestra componentes de ejemplo que demuestran los cambios aplicados al tema.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pnpm storybook
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Build estático:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pnpm build-storybook
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Tailwind CSS
|
|
41
|
+
|
|
42
|
+
- Tailwind está habilitado globalmente en `src/index.css`.
|
|
43
|
+
- Storybook también carga esos estilos desde `.storybook/preview.ts`.
|
|
44
|
+
|
|
45
|
+
## Build como librería
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pnpm build:lib
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Genera en `dist/`:
|
|
52
|
+
|
|
53
|
+
- `index.js` (ESM)
|
|
54
|
+
- `index.cjs` (CommonJS)
|
|
55
|
+
- `index.d.ts` (tipos)
|
|
56
|
+
|
|
57
|
+
## API Exportada
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
export {
|
|
61
|
+
theme, // Configuración completa del tema de Ant Design
|
|
62
|
+
tokens // Sistema de tokens de diseño reutilizables
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**`theme`**: Objeto con la configuración completa del tema de Ant Design con personalizaciones.
|
|
67
|
+
|
|
68
|
+
**`tokens`**: Objeto que agrupa todos los tokens de diseño: `color`, `spacing`, `radius`, `fontSize`, `lineHeight`, `letterSpacing`, `lineWidth`, `fontWeight`, `fontFamily`.
|
|
69
|
+
|
|
70
|
+
## Instalación y Uso
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install sour-theme antd @ant-design/icons react react-dom
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Aplicar el tema globalmente
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
import { theme } from 'sour-theme'
|
|
80
|
+
import { ConfigProvider } from 'antd'
|
|
81
|
+
|
|
82
|
+
export default function App() {
|
|
83
|
+
return (
|
|
84
|
+
<ConfigProvider theme={theme}>
|
|
85
|
+
{/* Tu aplicación aquí */}
|
|
86
|
+
</ConfigProvider>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Usar los tokens
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
import { tokens } from 'sour-theme'
|
|
95
|
+
|
|
96
|
+
const { color, spacing, fontSize } = tokens
|
|
97
|
+
|
|
98
|
+
const Component = () => {
|
|
99
|
+
return (
|
|
100
|
+
<div style={{
|
|
101
|
+
color: color.blue[500],
|
|
102
|
+
padding: spacing.m,
|
|
103
|
+
fontSize: fontSize.s,
|
|
104
|
+
}}>
|
|
105
|
+
Componente con tokens del tema
|
|
106
|
+
</div>
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Cambios de Tema
|
|
112
|
+
|
|
113
|
+
El tema incluye personalizaciones específicas en componentes. Por ejemplo:
|
|
114
|
+
|
|
115
|
+
- **Tag**: `borderRadiusSM` modificado de `4px` a `16px`
|
|
116
|
+
|
|
117
|
+
Puedes ver más detalles en Storybook (ejecutar `pnpm storybook`).
|
|
118
|
+
|
|
119
|
+
## Publicar en npm
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
npm login
|
|
123
|
+
pnpm build:lib
|
|
124
|
+
npm publish --access public
|
|
125
|
+
```
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x='"Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',a={zero:0,xxs:4,xs:8,s:16,m:24,l:32,xl:40,xxl:48},o={xxxs:12,xxs:14,xs:16,s:20,m:24,l:32,xl:40,xxl:48,xxxl:64},i={xxxs:18/o.xxxs,xxs:21/o.xxs,xs:24/o.xs,s:30/o.s,m:36/o.m,l:48/o.l,xl:60/o.xl,xxl:72/o.xxl,xxxl:96/o.xxxl},g={xxxs:.25,xxs:.1,xs:.1,s:0,m:0,l:.25,xl:0,xxl:.5,xxxl:1.5},t={s:4,m:8,l:16},b={xs:1,s:2,m:3,l:8},s={grey:{0:"#fafafa",50:"#f2f2f2",100:"#e3e3e3",200:"#d3d3d3",300:"#b3b3b3",400:"#9c9b9b",500:"#7b7a7a",600:"#5e5e5e",700:"#424242",800:"#303030",900:"#262626"},blue:{0:"#f5faff",50:"#e0f0ff",100:"#cde4f9",200:"#a7cdf1",300:"#7cb3e7",400:"#62a2df",500:"#4681b9",600:"#3f6a92",700:"#2f4d69",800:"#223649",900:"#1b2937"},green:{0:"#f5fffa",50:"#ebfff6",100:"#cdf3e3",200:"#99e1c3",300:"#66cca1",400:"#39bc84",500:"#329f71",600:"#2a7e5b",700:"#26664b",800:"#1e4836",900:"#19382c"},yellow:{0:"#fffdf5",50:"#fffbeb",100:"#fbf1c6",200:"#f6df83",300:"#f3ce3a",400:"#d8ae03",500:"#b28f00",600:"#8a6f00",700:"#685403",800:"#483a04",900:"#3b3107"},red:{0:"#fff5f5",50:"#ffe1e0",100:"#fcccca",200:"#f8a4a0",300:"#f37872",400:"#ef5b53",500:"#cd433c",600:"#b12d25",700:"#861e18",800:"#601410",900:"#450f0c"},charcoal:{0:"#f1efef",50:"#e2dfdf",100:"#cdc6c8",200:"#a99ea0",300:"#87787c",400:"#695d60",500:"#51484a",600:"#41393b",700:"#312b2c",800:"#231f20",900:"#1b1819"},lemon:{0:"#f9fcf7",50:"#e9f4e1",100:"#cbe7bb",200:"#abd991",300:"#8bca68",400:"#6cb940",500:"#5d9f37",600:"#4b812d",700:"#355b20",800:"#254016",900:"#1a2d10"},orange:{0:"#fff9f5",50:"#feede1",100:"#fdd4b9",200:"#fcb688",300:"#fb9756",400:"#fa7b29",500:"#db5a05",600:"#a94504",700:"#773103",800:"#502102",900:"#3c1801"},purple:{0:"#faf6fe",50:"#f0e3fd",100:"#dfc2fa",200:"#c693f6",300:"#ab60f1",400:"#8f2ced",500:"#7112ca",600:"#540d96",700:"#3f0a71",800:"#2c0750",900:"#22053d"},azure:{0:"#f5fbff",50:"#e0f3ff",100:"#bde5ff",200:"#85ceff",300:"#52baff",400:"#059cff",500:"#007bcc",600:"#005c99",700:"#00406b",800:"#003152",900:"#00253d"}},d={light:300,regular:400,semibold:600,bold:700},H={fontFamily:x,spacing:a,fontSize:o,lineHeight:i,letterSpacing:g,radius:t,lineWidth:b,color:s,fontWeight:d},{green:r,yellow:c,red:l,azure:f,grey:e,blue:n}=s,S={token:{fontFamily:x,fontWeightStrong:d.semibold,fontSizeSM:o.xxxs,fontSize:o.xxs,fontSizeLG:o.xs,fontSizeXL:o.s,fontSizeHeading5:o.xs,fontSizeHeading4:o.s,fontSizeHeading3:o.m,fontSizeHeading2:o.l,fontSizeHeading1:o.xl,lineHeightSM:i.xxxs,lineHeight:i.xxs,lineHeightLG:i.xs,lineHeightHeading5:i.xs,lineHeightHeading4:i.s,lineHeightHeading3:i.m,lineHeightHeading2:i.l,lineHeightHeading1:i.xl,colorPrimary:n[500],colorPrimaryBg:n[50],colorPrimaryBgHover:n[100],colorPrimaryBorder:n[200],colorPrimaryBorderHover:n[300],colorPrimaryHover:n[400],colorPrimaryActive:n[600],colorPrimaryTextHover:n[700],colorPrimaryText:n[800],colorPrimaryTextActive:n[900],colorSuccess:r[500],colorSuccessBg:r[50],colorSuccessBgHover:r[100],colorSuccessBorder:r[200],colorSuccessBorderHover:r[300],colorSuccessHover:r[400],colorSuccessActive:r[600],colorSuccessTextHover:r[700],colorSuccessText:r[800],colorSuccessTextActive:r[900],colorWarning:c[500],colorWarningBg:c[50],colorWarningBgHover:c[100],colorWarningBorder:c[200],colorWarningBorderHover:c[300],colorWarningHover:c[400],colorWarningActive:c[600],colorWarningTextHover:c[700],colorWarningText:c[800],colorWarningTextActive:c[900],colorError:l[500],colorErrorBg:l[50],colorErrorBgHover:l[100],colorErrorBorder:l[200],colorErrorBorderHover:l[300],colorErrorHover:l[400],colorErrorActive:l[600],colorErrorTextHover:l[700],colorErrorText:l[800],colorErrorTextActive:l[900],colorInfo:f[500],colorInfoBg:f[50],colorInfoBgHover:f[100],colorInfoBorder:f[200],colorInfoBorderHover:f[300],colorInfoHover:f[400],colorInfoActive:f[600],colorInfoTextHover:f[700],colorInfoText:f[800],colorInfoTextActive:f[900],colorBgLayout:e[0],colorBgContainer:"#FFFFFF",colorBgElevated:"#FFFFFF",colorBorder:e[200],colorBorderSecondary:e[100],colorFill:e[100],colorFillSecondary:e[50],colorFillTertiary:e[0],colorFillQuaternary:e[0],colorText:e[900],colorTextSecondary:e[600],colorTextTertiary:e[400],colorTextQuaternary:e[300],colorTextDisabled:e[300],colorTextPlaceholder:e[400],sizeXXS:a.xxs,sizeXS:a.xs,sizeLG:a.m,sizeXL:a.l,sizeXXL:a.xxl},components:{Tag:{borderRadiusSM:t.l}}};exports.theme=S;exports.tokens=H;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
const i = '"Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif', x = {
|
|
2
|
+
zero: 0,
|
|
3
|
+
xxs: 4,
|
|
4
|
+
xs: 8,
|
|
5
|
+
s: 16,
|
|
6
|
+
m: 24,
|
|
7
|
+
l: 32,
|
|
8
|
+
xl: 40,
|
|
9
|
+
xxl: 48
|
|
10
|
+
}, o = {
|
|
11
|
+
xxxs: 12,
|
|
12
|
+
xxs: 14,
|
|
13
|
+
xs: 16,
|
|
14
|
+
s: 20,
|
|
15
|
+
m: 24,
|
|
16
|
+
l: 32,
|
|
17
|
+
xl: 40,
|
|
18
|
+
xxl: 48,
|
|
19
|
+
xxxl: 64
|
|
20
|
+
}, a = {
|
|
21
|
+
xxxs: 18 / o.xxxs,
|
|
22
|
+
xxs: 21 / o.xxs,
|
|
23
|
+
xs: 24 / o.xs,
|
|
24
|
+
s: 30 / o.s,
|
|
25
|
+
m: 36 / o.m,
|
|
26
|
+
l: 48 / o.l,
|
|
27
|
+
xl: 60 / o.xl,
|
|
28
|
+
xxl: 72 / o.xxl,
|
|
29
|
+
xxxl: 96 / o.xxxl
|
|
30
|
+
}, g = {
|
|
31
|
+
xxxs: 0.25,
|
|
32
|
+
xxs: 0.1,
|
|
33
|
+
xs: 0.1,
|
|
34
|
+
s: 0,
|
|
35
|
+
m: 0,
|
|
36
|
+
l: 0.25,
|
|
37
|
+
xl: 0,
|
|
38
|
+
xxl: 0.5,
|
|
39
|
+
xxxl: 1.5
|
|
40
|
+
}, t = {
|
|
41
|
+
s: 4,
|
|
42
|
+
m: 8,
|
|
43
|
+
l: 16
|
|
44
|
+
}, b = {
|
|
45
|
+
xs: 1,
|
|
46
|
+
s: 2,
|
|
47
|
+
m: 3,
|
|
48
|
+
l: 8
|
|
49
|
+
}, s = {
|
|
50
|
+
grey: {
|
|
51
|
+
0: "#fafafa",
|
|
52
|
+
50: "#f2f2f2",
|
|
53
|
+
100: "#e3e3e3",
|
|
54
|
+
200: "#d3d3d3",
|
|
55
|
+
300: "#b3b3b3",
|
|
56
|
+
400: "#9c9b9b",
|
|
57
|
+
500: "#7b7a7a",
|
|
58
|
+
600: "#5e5e5e",
|
|
59
|
+
700: "#424242",
|
|
60
|
+
800: "#303030",
|
|
61
|
+
900: "#262626"
|
|
62
|
+
},
|
|
63
|
+
blue: {
|
|
64
|
+
0: "#f5faff",
|
|
65
|
+
50: "#e0f0ff",
|
|
66
|
+
100: "#cde4f9",
|
|
67
|
+
200: "#a7cdf1",
|
|
68
|
+
300: "#7cb3e7",
|
|
69
|
+
400: "#62a2df",
|
|
70
|
+
500: "#4681b9",
|
|
71
|
+
600: "#3f6a92",
|
|
72
|
+
700: "#2f4d69",
|
|
73
|
+
800: "#223649",
|
|
74
|
+
900: "#1b2937"
|
|
75
|
+
},
|
|
76
|
+
green: {
|
|
77
|
+
0: "#f5fffa",
|
|
78
|
+
50: "#ebfff6",
|
|
79
|
+
100: "#cdf3e3",
|
|
80
|
+
200: "#99e1c3",
|
|
81
|
+
300: "#66cca1",
|
|
82
|
+
400: "#39bc84",
|
|
83
|
+
500: "#329f71",
|
|
84
|
+
600: "#2a7e5b",
|
|
85
|
+
700: "#26664b",
|
|
86
|
+
800: "#1e4836",
|
|
87
|
+
900: "#19382c"
|
|
88
|
+
},
|
|
89
|
+
yellow: {
|
|
90
|
+
0: "#fffdf5",
|
|
91
|
+
50: "#fffbeb",
|
|
92
|
+
100: "#fbf1c6",
|
|
93
|
+
200: "#f6df83",
|
|
94
|
+
300: "#f3ce3a",
|
|
95
|
+
400: "#d8ae03",
|
|
96
|
+
500: "#b28f00",
|
|
97
|
+
600: "#8a6f00",
|
|
98
|
+
700: "#685403",
|
|
99
|
+
800: "#483a04",
|
|
100
|
+
900: "#3b3107"
|
|
101
|
+
},
|
|
102
|
+
red: {
|
|
103
|
+
0: "#fff5f5",
|
|
104
|
+
50: "#ffe1e0",
|
|
105
|
+
100: "#fcccca",
|
|
106
|
+
200: "#f8a4a0",
|
|
107
|
+
300: "#f37872",
|
|
108
|
+
400: "#ef5b53",
|
|
109
|
+
500: "#cd433c",
|
|
110
|
+
600: "#b12d25",
|
|
111
|
+
700: "#861e18",
|
|
112
|
+
800: "#601410",
|
|
113
|
+
900: "#450f0c"
|
|
114
|
+
},
|
|
115
|
+
charcoal: {
|
|
116
|
+
0: "#f1efef",
|
|
117
|
+
50: "#e2dfdf",
|
|
118
|
+
100: "#cdc6c8",
|
|
119
|
+
200: "#a99ea0",
|
|
120
|
+
300: "#87787c",
|
|
121
|
+
400: "#695d60",
|
|
122
|
+
500: "#51484a",
|
|
123
|
+
600: "#41393b",
|
|
124
|
+
700: "#312b2c",
|
|
125
|
+
800: "#231f20",
|
|
126
|
+
900: "#1b1819"
|
|
127
|
+
},
|
|
128
|
+
lemon: {
|
|
129
|
+
0: "#f9fcf7",
|
|
130
|
+
50: "#e9f4e1",
|
|
131
|
+
100: "#cbe7bb",
|
|
132
|
+
200: "#abd991",
|
|
133
|
+
300: "#8bca68",
|
|
134
|
+
400: "#6cb940",
|
|
135
|
+
500: "#5d9f37",
|
|
136
|
+
600: "#4b812d",
|
|
137
|
+
700: "#355b20",
|
|
138
|
+
800: "#254016",
|
|
139
|
+
900: "#1a2d10"
|
|
140
|
+
},
|
|
141
|
+
orange: {
|
|
142
|
+
0: "#fff9f5",
|
|
143
|
+
50: "#feede1",
|
|
144
|
+
100: "#fdd4b9",
|
|
145
|
+
200: "#fcb688",
|
|
146
|
+
300: "#fb9756",
|
|
147
|
+
400: "#fa7b29",
|
|
148
|
+
500: "#db5a05",
|
|
149
|
+
600: "#a94504",
|
|
150
|
+
700: "#773103",
|
|
151
|
+
800: "#502102",
|
|
152
|
+
900: "#3c1801"
|
|
153
|
+
},
|
|
154
|
+
purple: {
|
|
155
|
+
0: "#faf6fe",
|
|
156
|
+
50: "#f0e3fd",
|
|
157
|
+
100: "#dfc2fa",
|
|
158
|
+
200: "#c693f6",
|
|
159
|
+
300: "#ab60f1",
|
|
160
|
+
400: "#8f2ced",
|
|
161
|
+
500: "#7112ca",
|
|
162
|
+
600: "#540d96",
|
|
163
|
+
700: "#3f0a71",
|
|
164
|
+
800: "#2c0750",
|
|
165
|
+
900: "#22053d"
|
|
166
|
+
},
|
|
167
|
+
azure: {
|
|
168
|
+
0: "#f5fbff",
|
|
169
|
+
50: "#e0f3ff",
|
|
170
|
+
100: "#bde5ff",
|
|
171
|
+
200: "#85ceff",
|
|
172
|
+
300: "#52baff",
|
|
173
|
+
400: "#059cff",
|
|
174
|
+
500: "#007bcc",
|
|
175
|
+
600: "#005c99",
|
|
176
|
+
700: "#00406b",
|
|
177
|
+
800: "#003152",
|
|
178
|
+
900: "#00253d"
|
|
179
|
+
}
|
|
180
|
+
}, d = {
|
|
181
|
+
light: 300,
|
|
182
|
+
regular: 400,
|
|
183
|
+
semibold: 600,
|
|
184
|
+
bold: 700
|
|
185
|
+
}, H = {
|
|
186
|
+
fontFamily: i,
|
|
187
|
+
spacing: x,
|
|
188
|
+
fontSize: o,
|
|
189
|
+
lineHeight: a,
|
|
190
|
+
letterSpacing: g,
|
|
191
|
+
radius: t,
|
|
192
|
+
lineWidth: b,
|
|
193
|
+
color: s,
|
|
194
|
+
fontWeight: d
|
|
195
|
+
}, { green: r, yellow: c, red: l, azure: f, grey: e, blue: n } = s, S = {
|
|
196
|
+
token: {
|
|
197
|
+
fontFamily: i,
|
|
198
|
+
fontWeightStrong: d.semibold,
|
|
199
|
+
fontSizeSM: o.xxxs,
|
|
200
|
+
fontSize: o.xxs,
|
|
201
|
+
// 14px (base)
|
|
202
|
+
fontSizeLG: o.xs,
|
|
203
|
+
fontSizeXL: o.s,
|
|
204
|
+
fontSizeHeading5: o.xs,
|
|
205
|
+
fontSizeHeading4: o.s,
|
|
206
|
+
fontSizeHeading3: o.m,
|
|
207
|
+
fontSizeHeading2: o.l,
|
|
208
|
+
fontSizeHeading1: o.xl,
|
|
209
|
+
lineHeightSM: a.xxxs,
|
|
210
|
+
lineHeight: a.xxs,
|
|
211
|
+
lineHeightLG: a.xs,
|
|
212
|
+
lineHeightHeading5: a.xs,
|
|
213
|
+
lineHeightHeading4: a.s,
|
|
214
|
+
lineHeightHeading3: a.m,
|
|
215
|
+
lineHeightHeading2: a.l,
|
|
216
|
+
lineHeightHeading1: a.xl,
|
|
217
|
+
colorPrimary: n[500],
|
|
218
|
+
colorPrimaryBg: n[50],
|
|
219
|
+
colorPrimaryBgHover: n[100],
|
|
220
|
+
colorPrimaryBorder: n[200],
|
|
221
|
+
colorPrimaryBorderHover: n[300],
|
|
222
|
+
colorPrimaryHover: n[400],
|
|
223
|
+
colorPrimaryActive: n[600],
|
|
224
|
+
colorPrimaryTextHover: n[700],
|
|
225
|
+
colorPrimaryText: n[800],
|
|
226
|
+
colorPrimaryTextActive: n[900],
|
|
227
|
+
colorSuccess: r[500],
|
|
228
|
+
colorSuccessBg: r[50],
|
|
229
|
+
colorSuccessBgHover: r[100],
|
|
230
|
+
colorSuccessBorder: r[200],
|
|
231
|
+
colorSuccessBorderHover: r[300],
|
|
232
|
+
colorSuccessHover: r[400],
|
|
233
|
+
colorSuccessActive: r[600],
|
|
234
|
+
colorSuccessTextHover: r[700],
|
|
235
|
+
colorSuccessText: r[800],
|
|
236
|
+
colorSuccessTextActive: r[900],
|
|
237
|
+
colorWarning: c[500],
|
|
238
|
+
colorWarningBg: c[50],
|
|
239
|
+
colorWarningBgHover: c[100],
|
|
240
|
+
colorWarningBorder: c[200],
|
|
241
|
+
colorWarningBorderHover: c[300],
|
|
242
|
+
colorWarningHover: c[400],
|
|
243
|
+
colorWarningActive: c[600],
|
|
244
|
+
colorWarningTextHover: c[700],
|
|
245
|
+
colorWarningText: c[800],
|
|
246
|
+
colorWarningTextActive: c[900],
|
|
247
|
+
colorError: l[500],
|
|
248
|
+
colorErrorBg: l[50],
|
|
249
|
+
colorErrorBgHover: l[100],
|
|
250
|
+
colorErrorBorder: l[200],
|
|
251
|
+
colorErrorBorderHover: l[300],
|
|
252
|
+
colorErrorHover: l[400],
|
|
253
|
+
colorErrorActive: l[600],
|
|
254
|
+
colorErrorTextHover: l[700],
|
|
255
|
+
colorErrorText: l[800],
|
|
256
|
+
colorErrorTextActive: l[900],
|
|
257
|
+
colorInfo: f[500],
|
|
258
|
+
colorInfoBg: f[50],
|
|
259
|
+
colorInfoBgHover: f[100],
|
|
260
|
+
colorInfoBorder: f[200],
|
|
261
|
+
colorInfoBorderHover: f[300],
|
|
262
|
+
colorInfoHover: f[400],
|
|
263
|
+
colorInfoActive: f[600],
|
|
264
|
+
colorInfoTextHover: f[700],
|
|
265
|
+
colorInfoText: f[800],
|
|
266
|
+
colorInfoTextActive: f[900],
|
|
267
|
+
colorBgLayout: e[0],
|
|
268
|
+
colorBgContainer: "#FFFFFF",
|
|
269
|
+
colorBgElevated: "#FFFFFF",
|
|
270
|
+
colorBorder: e[200],
|
|
271
|
+
colorBorderSecondary: e[100],
|
|
272
|
+
colorFill: e[100],
|
|
273
|
+
colorFillSecondary: e[50],
|
|
274
|
+
colorFillTertiary: e[0],
|
|
275
|
+
colorFillQuaternary: e[0],
|
|
276
|
+
colorText: e[900],
|
|
277
|
+
colorTextSecondary: e[600],
|
|
278
|
+
colorTextTertiary: e[400],
|
|
279
|
+
colorTextQuaternary: e[300],
|
|
280
|
+
colorTextDisabled: e[300],
|
|
281
|
+
colorTextPlaceholder: e[400],
|
|
282
|
+
sizeXXS: x.xxs,
|
|
283
|
+
sizeXS: x.xs,
|
|
284
|
+
sizeLG: x.m,
|
|
285
|
+
sizeXL: x.l,
|
|
286
|
+
sizeXXL: x.xxl
|
|
287
|
+
},
|
|
288
|
+
components: {
|
|
289
|
+
Tag: {
|
|
290
|
+
borderRadiusSM: t.l
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
export {
|
|
295
|
+
S as theme,
|
|
296
|
+
H as tokens
|
|
297
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design System - Tokens y Configuración
|
|
3
|
+
*
|
|
4
|
+
* Este archivo re-exporta todos los tokens agnósticos de diseño
|
|
5
|
+
* para su uso en aplicaciones y frameworks externos.
|
|
6
|
+
*/
|
|
7
|
+
export { fontFamily, spacing, fontSize, lineHeight, letterSpacing, radius, lineWidth, color, fontWeight, } from "./tokens";
|
|
8
|
+
export { antdTheme } from "./antdTheme";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const fontFamily = "\"Open Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif";
|
|
2
|
+
export declare const spacing: Record<string, number>;
|
|
3
|
+
export declare const fontSize: Record<string, number>;
|
|
4
|
+
export declare const lineHeight: Record<string, number>;
|
|
5
|
+
export declare const letterSpacing: Record<string, number>;
|
|
6
|
+
export declare const radius: Record<string, number>;
|
|
7
|
+
export declare const lineWidth: Record<string, number>;
|
|
8
|
+
export declare const color: Record<string, Record<string, string>>;
|
|
9
|
+
export declare const fontWeight: Record<string, number>;
|
|
10
|
+
export declare const tokens: {
|
|
11
|
+
fontFamily: string;
|
|
12
|
+
spacing: Record<string, number>;
|
|
13
|
+
fontSize: Record<string, number>;
|
|
14
|
+
lineHeight: Record<string, number>;
|
|
15
|
+
letterSpacing: Record<string, number>;
|
|
16
|
+
radius: Record<string, number>;
|
|
17
|
+
lineWidth: Record<string, number>;
|
|
18
|
+
color: Record<string, Record<string, string>>;
|
|
19
|
+
fontWeight: Record<string, number>;
|
|
20
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lemontech/sour-theme",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Tema para antd personalizado para proyectos de Lemontech",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.cjs",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"sideEffects": [
|
|
12
|
+
"**/*.css"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js",
|
|
21
|
+
"require": "./dist/index.cjs"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"antd",
|
|
29
|
+
"react",
|
|
30
|
+
"design-system",
|
|
31
|
+
"ui-library",
|
|
32
|
+
"wrapper"
|
|
33
|
+
],
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=14.0.0"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"antd": "^6.3.1"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@ant-design/icons": ">=6.0.0",
|
|
42
|
+
"antd": ">=6.0.0",
|
|
43
|
+
"react": ">=18.0.0",
|
|
44
|
+
"react-dom": ">=18.0.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@chromatic-com/storybook": "^5.0.1",
|
|
48
|
+
"@eslint/js": "^9.39.1",
|
|
49
|
+
"@storybook/addon-a11y": "^10.2.15",
|
|
50
|
+
"@storybook/addon-docs": "^10.2.15",
|
|
51
|
+
"@storybook/addon-onboarding": "^10.2.15",
|
|
52
|
+
"@storybook/addon-vitest": "^10.2.15",
|
|
53
|
+
"@storybook/react-vite": "^10.2.15",
|
|
54
|
+
"@tailwindcss/postcss": "^4.2.1",
|
|
55
|
+
"@types/node": "^24.10.1",
|
|
56
|
+
"@types/react": "^19.2.7",
|
|
57
|
+
"@types/react-dom": "^19.2.3",
|
|
58
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
59
|
+
"@ant-design/icons": "^6.1.0",
|
|
60
|
+
"@vitest/browser-playwright": "^4.0.18",
|
|
61
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
62
|
+
"autoprefixer": "^10.4.27",
|
|
63
|
+
"eslint": "^9.39.1",
|
|
64
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
65
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
66
|
+
"eslint-plugin-storybook": "^10.2.15",
|
|
67
|
+
"globals": "^16.5.0",
|
|
68
|
+
"playwright": "^1.58.2",
|
|
69
|
+
"postcss": "^8.5.8",
|
|
70
|
+
"react": "^19.2.0",
|
|
71
|
+
"react-dom": "^19.2.0",
|
|
72
|
+
"storybook": "^10.2.15",
|
|
73
|
+
"tailwindcss": "^4.2.1",
|
|
74
|
+
"typescript": "~5.9.3",
|
|
75
|
+
"typescript-eslint": "^8.48.0",
|
|
76
|
+
"vite": "^7.3.1",
|
|
77
|
+
"vitest": "^4.0.18"
|
|
78
|
+
},
|
|
79
|
+
"scripts": {
|
|
80
|
+
"clean": "rm -rf dist",
|
|
81
|
+
"build": "tsc -b && vite build",
|
|
82
|
+
"build:lib": "npm run clean && tsc -p tsconfig.lib.json && rm -rf dist/providers && vite build --config vite.lib.config.ts",
|
|
83
|
+
"build:all": "npm run build && npm run build:lib",
|
|
84
|
+
"pack:check": "npm pack --dry-run",
|
|
85
|
+
"lint": "eslint .",
|
|
86
|
+
"storybook": "storybook dev -p 6006",
|
|
87
|
+
"build-storybook": "storybook build"
|
|
88
|
+
}
|
|
89
|
+
}
|