sanitas-ui-design-system 1.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/README.md +159 -0
- package/dist/Button-3zP54AO8.js +60 -0
- package/dist/Button-3zP54AO8.js.map +1 -0
- package/dist/FFClanProBold.TTF +0 -0
- package/dist/FFClanProMedium.TTF +0 -0
- package/dist/FFClanProRegular.TTF +0 -0
- package/dist/FFClanProThin.TTF +0 -0
- package/dist/assets/Button.css +1 -0
- package/dist/icons/index.d.ts +7 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +5 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/index.css +1 -0
- package/dist/styles/index.css.d.ts +11 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/tokens/index.d.ts +3 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +119 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/tokens/tokens.d.ts +237 -0
- package/dist/tokens/tokens.d.ts.map +1 -0
- package/dist/types/css-modules.d.ts +15 -0
- package/dist/ui/components/Button/Button.d.ts +28 -0
- package/dist/ui/components/Button/Button.d.ts.map +1 -0
- package/dist/ui/components/Button/index.d.ts +3 -0
- package/dist/ui/components/Button/index.d.ts.map +1 -0
- package/dist/ui/components/index.d.ts +3 -0
- package/dist/ui/components/index.d.ts.map +1 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +5 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/vite-env.d.ts +27 -0
- package/package.json +88 -0
package/README.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Sanitas UI - Design System
|
|
2
|
+
|
|
3
|
+
Sistema de diseño compartido para los microfrontends de Sanitas.
|
|
4
|
+
|
|
5
|
+
## Instalación
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @sanitas/ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Uso
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Button } from '@sanitas/ui/ui'
|
|
15
|
+
import '@sanitas/ui/styles'
|
|
16
|
+
|
|
17
|
+
export const App = () => {
|
|
18
|
+
return (
|
|
19
|
+
<Button variant="primary" size="large">
|
|
20
|
+
Ingresar
|
|
21
|
+
</Button>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Componentes Disponibles
|
|
27
|
+
|
|
28
|
+
- **Button** - Botón con soporte para navegación SPA y enlaces externos
|
|
29
|
+
|
|
30
|
+
## Principios de Clean Code
|
|
31
|
+
|
|
32
|
+
Este proyecto sigue estrictamente los principios de Clean Code:
|
|
33
|
+
|
|
34
|
+
### 1. Nombres Descriptivos
|
|
35
|
+
- Variables y funciones con nombres que revelan intención
|
|
36
|
+
- Constantes en SCREAMING_SNAKE_CASE
|
|
37
|
+
- Tipos exportados con nombres claros
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
// ✅ Bien
|
|
41
|
+
const DEFAULT_VARIANT = 'primary'
|
|
42
|
+
export type ButtonVariant = 'primary' | 'secondary' | ...
|
|
43
|
+
|
|
44
|
+
// ❌ Mal
|
|
45
|
+
const d = 'primary'
|
|
46
|
+
type BV = 'primary' | 'secondary' | ...
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 2. Funciones Pequeñas
|
|
50
|
+
- Una función = una responsabilidad
|
|
51
|
+
- Funciones especializadas en lugar de condicionales complejos
|
|
52
|
+
|
|
53
|
+
```tsx
|
|
54
|
+
// ✅ Bien
|
|
55
|
+
const isRouterLinkButton = (props: ButtonProps): props is ButtonAsRouterLink => {
|
|
56
|
+
return 'to' in props && Boolean(props.to)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// ❌ Mal
|
|
60
|
+
if ('to' in props && props.to && RouterLink) { ... }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 3. DRY (Don't Repeat Yourself)
|
|
64
|
+
- Constantes extraídas y reutilizables
|
|
65
|
+
- Maps para evitar if-else repetitivos
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
// ✅ Bien
|
|
69
|
+
const VARIANT_CLASS_MAP: Record<ButtonVariant, string> = {
|
|
70
|
+
primary: 'isPrimary',
|
|
71
|
+
secondary: 'isSecondary',
|
|
72
|
+
// ...
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// ❌ Mal
|
|
76
|
+
if (variant === 'primary') return 'isPrimary'
|
|
77
|
+
if (variant === 'secondary') return 'isSecondary'
|
|
78
|
+
// ...
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 4. Código Auto-documentado
|
|
82
|
+
- Eliminar comentarios redundantes
|
|
83
|
+
- El código debe explicarse por sí mismo
|
|
84
|
+
|
|
85
|
+
```tsx
|
|
86
|
+
// ✅ Bien
|
|
87
|
+
const buildClassNames = (variant, size, fullWidth, loading, className) => { ... }
|
|
88
|
+
|
|
89
|
+
// ❌ Mal
|
|
90
|
+
// Construye los nombres de clase
|
|
91
|
+
const getClasses = (v, s, fw, l, cn) => { ... }
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 5. Type Safety
|
|
95
|
+
- TypeScript con tipos estrictos
|
|
96
|
+
- Type guards para discriminated unions
|
|
97
|
+
- Exports de tipos reutilizables
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
export type ButtonProps = ButtonAsButton | ButtonAsLink | ButtonAsRouterLink
|
|
101
|
+
export type ButtonVariant = 'primary' | 'secondary' | ...
|
|
102
|
+
export type ButtonSize = 'small' | 'medium' | 'large'
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 6. Single Responsibility
|
|
106
|
+
- Cada módulo tiene una sola razón para cambiar
|
|
107
|
+
- Separación de concerns (UI, tokens, theme)
|
|
108
|
+
|
|
109
|
+
### 7. Imports Explícitos
|
|
110
|
+
- Barrel exports para mejor tree-shaking
|
|
111
|
+
- Subpaths optimizados
|
|
112
|
+
|
|
113
|
+
```tsx
|
|
114
|
+
// ✅ Recomendado
|
|
115
|
+
import { Button } from '@sanitas/ui/ui'
|
|
116
|
+
import { tokens } from '@sanitas/ui/tokens'
|
|
117
|
+
|
|
118
|
+
// ✅ También válido
|
|
119
|
+
import { Button, tokens } from '@sanitas/ui'
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Estructura del Proyecto
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
src/
|
|
126
|
+
├── ui/ # Componentes de UI
|
|
127
|
+
│ └── components/ # Componentes React
|
|
128
|
+
│ └── Button/
|
|
129
|
+
├── tokens/ # Design tokens
|
|
130
|
+
├── theme/ # Tema visual
|
|
131
|
+
├── icons/ # Iconos
|
|
132
|
+
└── styles/ # Estilos globales
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Desarrollo
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Instalar dependencias
|
|
139
|
+
pnpm install
|
|
140
|
+
|
|
141
|
+
# Modo desarrollo
|
|
142
|
+
pnpm dev
|
|
143
|
+
|
|
144
|
+
# Build
|
|
145
|
+
pnpm build
|
|
146
|
+
|
|
147
|
+
# Storybook
|
|
148
|
+
pnpm storybook
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Contribuir
|
|
152
|
+
|
|
153
|
+
Al agregar nuevos componentes:
|
|
154
|
+
|
|
155
|
+
1. Seguir los principios de Clean Code
|
|
156
|
+
2. Crear tests unitarios
|
|
157
|
+
3. Documentar en Storybook
|
|
158
|
+
4. Exportar tipos TypeScript
|
|
159
|
+
5. Usar tokens del design system
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as o, jsxs as A, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
const f = () => {
|
|
3
|
+
try {
|
|
4
|
+
return require("@tanstack/react-router").Link;
|
|
5
|
+
} catch {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
}, d = f(), B = "primary", _ = "medium", E = "button", N = "buttonIcon", g = {
|
|
9
|
+
primary: "isPrimary",
|
|
10
|
+
secondary: "isSecondary",
|
|
11
|
+
success: "isSuccess",
|
|
12
|
+
danger: "isDanger",
|
|
13
|
+
outline: "isOutline",
|
|
14
|
+
ghost: "isGhost",
|
|
15
|
+
white: "isWhite",
|
|
16
|
+
icon: "isIcon"
|
|
17
|
+
}, k = {
|
|
18
|
+
small: "isSmall",
|
|
19
|
+
medium: "isMedium",
|
|
20
|
+
large: "isLarge"
|
|
21
|
+
}, R = (n, t, e, r, s) => [
|
|
22
|
+
E,
|
|
23
|
+
g[n],
|
|
24
|
+
k[t],
|
|
25
|
+
e && "isFullWidth",
|
|
26
|
+
r && "isLoading",
|
|
27
|
+
s
|
|
28
|
+
].filter(Boolean).join(" "), P = ({ icon: n, children: t }) => /* @__PURE__ */ A(S, { children: [
|
|
29
|
+
n && /* @__PURE__ */ o("span", { className: N, children: n }),
|
|
30
|
+
t
|
|
31
|
+
] }), b = (n) => "to" in n && !!n.to, C = (n) => "href" in n && !!n.href, I = (n, t, e) => d ? /* @__PURE__ */ o(d, { to: n, className: t, children: e }) : (process.env.NODE_ENV === "development" && console.warn('Button: La prop "to" requiere @tanstack/react-router instalado'), null), y = (n, t, e, r) => {
|
|
32
|
+
const { target: s, rel: i, ...a } = r;
|
|
33
|
+
return /* @__PURE__ */ o("a", { href: n, className: t, target: s, rel: i, ...a, children: e });
|
|
34
|
+
}, T = (n, t, e, r, s) => /* @__PURE__ */ o("button", { className: n, disabled: e || r, ...s, children: t }), D = (n) => {
|
|
35
|
+
const {
|
|
36
|
+
variant: t = B,
|
|
37
|
+
size: e = _,
|
|
38
|
+
fullWidth: r = !1,
|
|
39
|
+
loading: s = !1,
|
|
40
|
+
children: i,
|
|
41
|
+
icon: a,
|
|
42
|
+
className: m = "",
|
|
43
|
+
...u
|
|
44
|
+
} = n, c = R(t, e, r, s, m), l = /* @__PURE__ */ o(P, { icon: a, children: i });
|
|
45
|
+
if (b(n))
|
|
46
|
+
return I(n.to, c, l);
|
|
47
|
+
if (C(n))
|
|
48
|
+
return y(
|
|
49
|
+
n.href,
|
|
50
|
+
c,
|
|
51
|
+
l,
|
|
52
|
+
u
|
|
53
|
+
);
|
|
54
|
+
const { disabled: L, ...h } = u;
|
|
55
|
+
return T(c, l, L || !1, s, h);
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
D as B
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=Button-3zP54AO8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button-3zP54AO8.js","sources":["../src/ui/components/Button/Button.tsx"],"sourcesContent":["import React from 'react'\r\nimport './Button.css'\r\n\r\nconst loadReactRouterLink = (): any => {\r\n try {\r\n return require('@tanstack/react-router').Link\r\n } catch {\r\n return null\r\n }\r\n}\r\n\r\nconst RouterLink = loadReactRouterLink()\r\n\r\nconst DEFAULT_VARIANT = 'primary'\r\nconst DEFAULT_SIZE = 'medium'\r\nconst BASE_BUTTON_CLASS = 'button'\r\nconst ICON_WRAPPER_CLASS = 'buttonIcon'\r\n\r\nexport type ButtonVariant = 'primary' | 'secondary' | 'success' | 'danger' | 'outline' | 'ghost' | 'white' | 'icon'\r\nexport type ButtonSize = 'small' | 'medium' | 'large'\r\n\r\ntype BaseButtonProps = {\r\n variant?: ButtonVariant\r\n size?: ButtonSize\r\n fullWidth?: boolean\r\n loading?: boolean\r\n children: React.ReactNode\r\n icon?: React.ReactNode\r\n className?: string\r\n}\r\n\r\ntype ButtonAsButton = BaseButtonProps &\r\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof BaseButtonProps> & {\r\n href?: never\r\n to?: never\r\n }\r\n\r\ntype ButtonAsLink = BaseButtonProps &\r\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof BaseButtonProps> & {\r\n href: string\r\n to?: never\r\n }\r\n\r\ntype ButtonAsRouterLink = BaseButtonProps & {\r\n to: string\r\n href?: never\r\n}\r\n\r\nexport type ButtonProps = ButtonAsButton | ButtonAsLink | ButtonAsRouterLink\r\n\r\nconst VARIANT_CLASS_MAP: Record<ButtonVariant, string> = {\r\n primary: 'isPrimary',\r\n secondary: 'isSecondary',\r\n success: 'isSuccess',\r\n danger: 'isDanger',\r\n outline: 'isOutline',\r\n ghost: 'isGhost',\r\n white: 'isWhite',\r\n icon: 'isIcon',\r\n}\r\n\r\nconst SIZE_CLASS_MAP: Record<ButtonSize, string> = {\r\n small: 'isSmall',\r\n medium: 'isMedium',\r\n large: 'isLarge',\r\n}\r\n\r\nconst buildClassNames = (\r\n variant: ButtonVariant,\r\n size: ButtonSize,\r\n fullWidth: boolean,\r\n loading: boolean,\r\n className: string\r\n): string => {\r\n const classes = [\r\n BASE_BUTTON_CLASS,\r\n VARIANT_CLASS_MAP[variant],\r\n SIZE_CLASS_MAP[size],\r\n fullWidth && 'isFullWidth',\r\n loading && 'isLoading',\r\n className,\r\n ]\r\n\r\n return classes.filter(Boolean).join(' ')\r\n}\r\n\r\nconst ButtonContent: React.FC<{ icon?: React.ReactNode; children: React.ReactNode }> = ({ icon, children }) => (\r\n <>\r\n {icon && <span className={ICON_WRAPPER_CLASS}>{icon}</span>}\r\n {children}\r\n </>\r\n)\r\n\r\nconst isRouterLinkButton = (props: ButtonProps): props is ButtonAsRouterLink => {\r\n return 'to' in props && Boolean(props.to)\r\n}\r\n\r\nconst isExternalLinkButton = (props: ButtonProps): props is ButtonAsLink => {\r\n return 'href' in props && Boolean(props.href)\r\n}\r\n\r\nconst renderRouterLink = (to: string, className: string, content: React.ReactNode) => {\r\n if (!RouterLink) {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.warn('Button: La prop \"to\" requiere @tanstack/react-router instalado')\r\n }\r\n return null\r\n }\r\n\r\n return (\r\n <RouterLink to={to} className={className}>\r\n {content}\r\n </RouterLink>\r\n )\r\n}\r\n\r\nconst renderExternalLink = (\r\n href: string,\r\n className: string,\r\n content: React.ReactNode,\r\n linkProps: React.AnchorHTMLAttributes<HTMLAnchorElement>\r\n) => {\r\n const { target, rel, ...restLinkProps } = linkProps\r\n return (\r\n <a href={href} className={className} target={target} rel={rel} {...restLinkProps}>\r\n {content}\r\n </a>\r\n )\r\n}\r\n\r\nconst renderButton = (\r\n className: string,\r\n content: React.ReactNode,\r\n disabled: boolean,\r\n loading: boolean,\r\n buttonProps: React.ButtonHTMLAttributes<HTMLButtonElement>\r\n) => {\r\n return (\r\n <button className={className} disabled={disabled || loading} {...buttonProps}>\r\n {content}\r\n </button>\r\n )\r\n}\r\n\r\nexport const Button: React.FC<ButtonProps> = (props) => {\r\n const {\r\n variant = DEFAULT_VARIANT,\r\n size = DEFAULT_SIZE,\r\n fullWidth = false,\r\n loading = false,\r\n children,\r\n icon,\r\n className = '',\r\n ...restProps\r\n } = props\r\n\r\n const classNames = buildClassNames(variant, size, fullWidth, loading, className)\r\n const content = <ButtonContent icon={icon}>{children}</ButtonContent>\r\n\r\n if (isRouterLinkButton(props)) {\r\n return renderRouterLink(props.to, classNames, content)\r\n }\r\n\r\n if (isExternalLinkButton(props)) {\r\n return renderExternalLink(\r\n props.href,\r\n classNames,\r\n content,\r\n restProps as React.AnchorHTMLAttributes<HTMLAnchorElement>\r\n )\r\n }\r\n\r\n const { disabled, ...buttonProps } = restProps as React.ButtonHTMLAttributes<HTMLButtonElement>\r\n return renderButton(classNames, content, disabled || false, loading, buttonProps)\r\n}\r\n"],"names":["loadReactRouterLink","RouterLink","DEFAULT_VARIANT","DEFAULT_SIZE","BASE_BUTTON_CLASS","ICON_WRAPPER_CLASS","VARIANT_CLASS_MAP","SIZE_CLASS_MAP","buildClassNames","variant","size","fullWidth","loading","className","ButtonContent","icon","children","jsxs","Fragment","jsx","isRouterLinkButton","props","isExternalLinkButton","renderRouterLink","to","content","renderExternalLink","href","linkProps","target","rel","restLinkProps","renderButton","disabled","buttonProps","Button","restProps","classNames"],"mappings":";AAGA,MAAMA,IAAsB,MAAW;AACrC,MAAI;AACF,WAAO,QAAQ,wBAAwB,EAAE;AAAA,EAC3C,QAAQ;AACN,WAAO;AAAA,EACT;AACF,GAEMC,IAAaD,EAAA,GAEbE,IAAkB,WAClBC,IAAe,UACfC,IAAoB,UACpBC,IAAqB,cAkCrBC,IAAmD;AAAA,EACvD,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AACR,GAEMC,IAA6C;AAAA,EACjD,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT,GAEMC,IAAkB,CACtBC,GACAC,GACAC,GACAC,GACAC,MAEgB;AAAA,EACdT;AAAA,EACAE,EAAkBG,CAAO;AAAA,EACzBF,EAAeG,CAAI;AAAA,EACnBC,KAAa;AAAA,EACbC,KAAW;AAAA,EACXC;AAAA,EAGa,OAAO,OAAO,EAAE,KAAK,GAAG,GAGnCC,IAAiF,CAAC,EAAE,MAAAC,GAAM,UAAAC,EAAA,MAC9F,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,EAAAH,KAAQ,gBAAAI,EAAC,QAAA,EAAK,WAAWd,GAAqB,UAAAU,GAAK;AAAA,EACnDC;AAAA,GACH,GAGII,IAAqB,CAACC,MACnB,QAAQA,KAAS,EAAQA,EAAM,IAGlCC,IAAuB,CAACD,MACrB,UAAUA,KAAS,EAAQA,EAAM,MAGpCE,IAAmB,CAACC,GAAYX,GAAmBY,MAClDxB,IAQH,gBAAAkB,EAAClB,GAAA,EAAW,IAAAuB,GAAQ,WAAAX,GACjB,UAAAY,GACH,KATI,QAAQ,IAAI,aAAa,iBAC3B,QAAQ,KAAK,gEAAgE,GAExE,OAULC,IAAqB,CACzBC,GACAd,GACAY,GACAG,MACG;AACH,QAAM,EAAE,QAAAC,GAAQ,KAAAC,GAAK,GAAGC,MAAkBH;AAC1C,SACE,gBAAAT,EAAC,OAAE,MAAAQ,GAAY,WAAAd,GAAsB,QAAAgB,GAAgB,KAAAC,GAAW,GAAGC,GAChE,UAAAN,EAAA,CACH;AAEJ,GAEMO,IAAe,CACnBnB,GACAY,GACAQ,GACArB,GACAsB,MAGE,gBAAAf,EAAC,YAAO,WAAAN,GAAsB,UAAUoB,KAAYrB,GAAU,GAAGsB,GAC9D,UAAAT,EAAA,CACH,GAISU,IAAgC,CAACd,MAAU;AACtD,QAAM;AAAA,IACJ,SAAAZ,IAAUP;AAAA,IACV,MAAAQ,IAAOP;AAAA,IACP,WAAAQ,IAAY;AAAA,IACZ,SAAAC,IAAU;AAAA,IACV,UAAAI;AAAA,IACA,MAAAD;AAAA,IACA,WAAAF,IAAY;AAAA,IACZ,GAAGuB;AAAA,EAAA,IACDf,GAEEgB,IAAa7B,EAAgBC,GAASC,GAAMC,GAAWC,GAASC,CAAS,GACzEY,IAAU,gBAAAN,EAACL,GAAA,EAAc,MAAAC,GAAa,UAAAC,EAAA,CAAS;AAErD,MAAII,EAAmBC,CAAK;AAC1B,WAAOE,EAAiBF,EAAM,IAAIgB,GAAYZ,CAAO;AAGvD,MAAIH,EAAqBD,CAAK;AAC5B,WAAOK;AAAA,MACLL,EAAM;AAAA,MACNgB;AAAA,MACAZ;AAAA,MACAW;AAAA,IAAA;AAIJ,QAAM,EAAE,UAAAH,GAAU,GAAGC,EAAA,IAAgBE;AACrC,SAAOJ,EAAaK,GAAYZ,GAASQ,KAAY,IAAOrB,GAASsB,CAAW;AAClF;"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.button{font-family:var(--font-family);font-weight:var(--font-weight-medium);border:2px solid transparent;border-radius:var(--radius-3xl);cursor:pointer;transition:all var(--transition-base);display:inline-flex;align-items:center;justify-content:center;gap:var(--spacing-2);text-decoration:none;outline:none}.button:focus-visible{outline:2px solid var(--celeste);outline-offset:2px}.button:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.isPrimary{background-color:var(--azul);color:var(--blanco);border:2px solid var(--azul)}.isPrimary:hover:not(:disabled){background-color:var(--blanco);color:var(--azul)}.isPrimary:active:not(:disabled){background-color:var(--gray-lighter)}.isSecondary{background-color:var(--celeste);color:var(--blanco);border:2px solid var(--celeste)}.isSecondary:hover:not(:disabled){background-color:var(--blanco);color:var(--celeste)}.isSecondary:active:not(:disabled){background-color:var(--gray-lighter)}.isSuccess{background-color:var(--verde);color:var(--blanco);border:2px solid var(--verde)}.isSuccess:hover:not(:disabled){background-color:var(--blanco);color:var(--verde)}.isSuccess:active:not(:disabled){background-color:var(--gray-lighter)}.isDanger{background-color:var(--rojo);color:var(--blanco);border:2px solid var(--rojo)}.isDanger:hover:not(:disabled){background-color:var(--blanco);color:var(--rojo)}.isDanger:active:not(:disabled){background-color:var(--gray-lighter)}.isOutline{background-color:transparent;color:var(--azul);border:2px solid var(--azul)}.isOutline:hover:not(:disabled){background-color:var(--azul);color:var(--blanco)}.isGhost{background-color:transparent;color:var(--azul)}.isGhost:hover:not(:disabled){background-color:#002f871a}.isWhite{background-color:var(--blanco);color:var(--azul);border:1px solid var(--blanco)}.isWhite:hover:not(:disabled){background-color:var(--gray-light);box-shadow:var(--shadow-md)}.isIcon{background-color:transparent;color:var(--azul);padding:var(--spacing-2);min-height:auto;display:inline-flex;align-items:center;gap:var(--spacing-2)}.isIcon:hover:not(:disabled){background-color:#002f870d}.isSmall{padding:var(--spacing-1) var(--spacing-3);font-size:var(--font-size-sm);min-height:32px}.isMedium{padding:var(--spacing-2) var(--spacing-4);font-size:var(--font-size-base);min-height:40px}.isLarge{padding:var(--spacing-3) var(--spacing-6);font-size:var(--font-size-lg);min-height:48px}.isFullWidth{width:100%}.isLoading{position:relative;color:transparent;pointer-events:none}.isLoading:after{content:"";position:absolute;width:16px;height:16px;top:50%;left:50%;margin-left:-8px;margin-top:-8px;border:2px solid var(--blanco);border-radius:50%;border-top-color:transparent;animation:button-spin .6s linear infinite}@keyframes button-spin{to{transform:rotate(360deg)}}.buttonIcon{display:inline-flex;align-items:center;justify-content:center}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icons/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,eAAO,MAAM,eAAe,2CAAiC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/icons/index.ts"],"sourcesContent":["/**\r\n * Icons - Sanitas UI\r\n * Placeholder para iconos personalizados\r\n * Puedes usar lucide-react, heroicons, o crear tus propios iconos\r\n */\r\n\r\n// Agregar iconos personalizados aquí\r\n// Ejemplo con re-export de lucide-react:\r\n// export { Home, User, Settings } from 'lucide-react'\r\n\r\nexport const iconPlaceholder = '⚠️ Icons not implemented yet'\r\n"],"names":["iconPlaceholder"],"mappings":"AAUO,MAAMA,IAAkB;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAE3B,cAAc,MAAM,CAAA;AACpB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components;:root{--azul: #002f87;--celeste: #00b4e3;--verde: #00b189;--verde-claro: #80bc00;--verde-jade: #52bd98;--lila: #6b6f8c;--hover-btn: #002365;--blanco: #fff;--white: white;--black: black;--negro-claro: #1d1d1b;--border: #ccd0de;--gray-blue: #f2f3f6;--gray-light: #f8f8f8;--gray-lighter: #f0f0f0;--rojo: #e74c3c;--danger: #e74c3c;--spacing-0: 0px;--spacing-1: .25rem;--spacing-2: .5rem;--spacing-3: .75rem;--spacing-4: 1rem;--spacing-5: 1.25rem;--spacing-6: 1.5rem;--spacing-8: 2rem;--spacing-10: 2.5rem;--spacing-12: 3rem;--spacing-16: 4rem;--font-family: "Clan Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-size-xs: .75rem;--font-size-sm: .875rem;--font-size-base: 1rem;--font-size-lg: 1.125rem;--font-size-xl: 1.25rem;--font-size-2xl: 1.5rem;--font-size-3xl: 1.875rem;--font-size-4xl: 2.25rem;--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--radius-none: 0px;--radius-sm: .125rem;--radius-base: .25rem;--radius-md: .375rem;--radius-lg: .5rem;--radius-xl: .75rem;--radius-2xl: 1rem;--radius-3xl: 3rem;--radius-full: 9999px;--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);--shadow-base: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--transition-fast: .15s;--transition-base: .2s;--transition-slow: .3s}@font-face{font-family:FF Clan Pro;src:url(/fonts/FFClanProThin.TTF) format("truetype");font-weight:100;font-style:normal;font-display:swap}@font-face{font-family:FF Clan Pro;src:url(/fonts/FFClanProRegular.TTF) format("truetype");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:FF Clan Pro;src:url(/fonts/FFClanProMedium.TTF) format("truetype");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:FF Clan Pro;src:url(/fonts/FFClanProBold.TTF) format("truetype");font-weight:700;font-style:normal;font-display:swap}*,*:before,*:after{box-sizing:border-box}body{font-family:FF Clan Pro,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:var(--font-size-base);line-height:1.5;color:var(--negro-claro);background-color:var(--blanco);margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}html{font-size:calc(.75rem + .20833333333333331vw)}@media screen and (max-width:1920px){html{font-size:calc(.75rem + .20833333333333337vw)}}@media screen and (max-width:1440px){html{font-size:calc(.6876951092611863rem + .20811654526534862vw)}}@media screen and (max-width:479px){html{font-size:calc(.7494769874476988rem + .8368200836820083vw)}}.text-style-3lines{display:-webkit-box;overflow:hidden;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical}.text-style-2lines{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}@media screen and (max-width:991px){.hide-tablet{display:none!important}}@media screen and (max-width:767px){.hide-mobile-landscape{display:none!important}}@media screen and (max-width:479px){.hide-mobile{display:none!important}}*::-webkit-scrollbar{height:10px;width:10px}*::-webkit-scrollbar-track{border-radius:5px;background-color:#dfe9eb}*::-webkit-scrollbar-track:hover{background-color:#b8c0c2}*::-webkit-scrollbar-track:active{background-color:#b8c0c2}*::-webkit-scrollbar-thumb{border-radius:5px;background-color:#7796b5}*::-webkit-scrollbar-thumb:hover{background-color:#637d97}*::-webkit-scrollbar-thumb:active{background-color:#627b94}.pointer-events-off{pointer-events:none}.pointer-events-on{pointer-events:auto}.display-inlineflex{display:inline-flex}.div-square:after{content:"";display:block;padding-bottom:100%}.container-medium,.container-small,.container-large{margin-right:auto!important;margin-left:auto!important}.hide{display:none!important}*[tabindex]:focus-visible,input[type=file]:focus-visible{outline:.125rem solid #4d65ff;outline-offset:.125rem}.w-richtext>:not(div):first-child,.w-richtext>div:first-child>:first-child{margin-top:0!important}.w-richtext>:last-child,.w-richtext ol li:last-child,.w-richtext ul li:last-child{margin-bottom:0!important}.w-checkbox{margin-bottom:5px;padding-left:20px;display:block}.w-checkbox:before{content:" ";grid-area:1 / 1 / 2 / 2;display:table}.w-checkbox:after{content:" ";clear:both;grid-area:1 / 1 / 2 / 2;display:table}.w-checkbox-input{float:left;margin:4px 0 0 -20px;line-height:normal}.w-checkbox-input--inputType-custom{border:1px solid #ccc;border-radius:2px;width:12px;height:12px}.w-checkbox-input--inputType-custom.w--redirected-checked{background-color:#3898ec;background-image:url(https://d3e54v103j8qbb.cloudfront.net/static/custom-checkbox-checkmark.589d534424.svg);background-position:50%;background-repeat:no-repeat;background-size:cover;border-color:#3898ec}.w-checkbox-input--inputType-custom.w--redirected-focus{box-shadow:0 0 3px 1px #3898ec}.w-form-formradioinput--inputType-custom{border:1px solid #ccc;border-radius:50%;width:12px;height:12px}.w-form-formradioinput--inputType-custom.w--redirected-focus{box-shadow:0 0 3px 1px #3898ec}.w-form-formradioinput--inputType-custom.w--redirected-checked{border-width:4px;border-color:#3898ec}.w-form-formrecaptcha{margin-bottom:8px}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--shadow-sm:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--shadow-md:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--shadow-xl:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.flex{display:flex}.grid{display:grid}.inline-block{display:inline-block}.border{border-style:var(--tw-border-style);border-width:1px}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
primary: {
|
|
3
|
+
50: "#eff6ff",
|
|
4
|
+
100: "#dbeafe",
|
|
5
|
+
200: "#bfdbfe",
|
|
6
|
+
300: "#93c5fd",
|
|
7
|
+
400: "#60a5fa",
|
|
8
|
+
500: "#3b82f6",
|
|
9
|
+
600: "#2563eb",
|
|
10
|
+
700: "#1d4ed8",
|
|
11
|
+
800: "#1e40af",
|
|
12
|
+
900: "#1e3a8a"
|
|
13
|
+
},
|
|
14
|
+
secondary: {
|
|
15
|
+
50: "#f9fafb",
|
|
16
|
+
100: "#f3f4f6",
|
|
17
|
+
200: "#e5e7eb",
|
|
18
|
+
300: "#d1d5db",
|
|
19
|
+
400: "#9ca3af",
|
|
20
|
+
500: "#6b7280",
|
|
21
|
+
600: "#4b5563",
|
|
22
|
+
700: "#374151",
|
|
23
|
+
800: "#1f2937",
|
|
24
|
+
900: "#111827"
|
|
25
|
+
},
|
|
26
|
+
danger: {
|
|
27
|
+
50: "#fef2f2",
|
|
28
|
+
100: "#fee2e2",
|
|
29
|
+
200: "#fecaca",
|
|
30
|
+
300: "#fca5a5",
|
|
31
|
+
400: "#f87171",
|
|
32
|
+
500: "#ef4444",
|
|
33
|
+
600: "#dc2626",
|
|
34
|
+
700: "#b91c1c",
|
|
35
|
+
800: "#991b1b",
|
|
36
|
+
900: "#7f1d1d"
|
|
37
|
+
},
|
|
38
|
+
success: {
|
|
39
|
+
50: "#f0fdf4",
|
|
40
|
+
100: "#dcfce7",
|
|
41
|
+
200: "#bbf7d0",
|
|
42
|
+
300: "#86efac",
|
|
43
|
+
400: "#4ade80",
|
|
44
|
+
500: "#22c55e",
|
|
45
|
+
600: "#16a34a",
|
|
46
|
+
700: "#15803d",
|
|
47
|
+
800: "#166534",
|
|
48
|
+
900: "#14532d"
|
|
49
|
+
},
|
|
50
|
+
warning: {
|
|
51
|
+
50: "#fffbeb",
|
|
52
|
+
100: "#fef3c7",
|
|
53
|
+
200: "#fde68a",
|
|
54
|
+
300: "#fcd34d",
|
|
55
|
+
400: "#fbbf24",
|
|
56
|
+
500: "#f59e0b",
|
|
57
|
+
600: "#d97706",
|
|
58
|
+
700: "#b45309",
|
|
59
|
+
800: "#92400e",
|
|
60
|
+
900: "#78350f"
|
|
61
|
+
}
|
|
62
|
+
}, f = {
|
|
63
|
+
0: "0px",
|
|
64
|
+
1: "0.25rem",
|
|
65
|
+
2: "0.5rem",
|
|
66
|
+
3: "0.75rem",
|
|
67
|
+
4: "1rem",
|
|
68
|
+
5: "1.25rem",
|
|
69
|
+
6: "1.5rem",
|
|
70
|
+
8: "2rem",
|
|
71
|
+
10: "2.5rem",
|
|
72
|
+
12: "3rem",
|
|
73
|
+
16: "4rem"
|
|
74
|
+
}, r = {
|
|
75
|
+
xs: "0.75rem",
|
|
76
|
+
sm: "0.875rem",
|
|
77
|
+
base: "1rem",
|
|
78
|
+
lg: "1.125rem",
|
|
79
|
+
xl: "1.25rem",
|
|
80
|
+
"2xl": "1.5rem",
|
|
81
|
+
"3xl": "1.875rem",
|
|
82
|
+
"4xl": "2.25rem"
|
|
83
|
+
}, b = {
|
|
84
|
+
normal: "400",
|
|
85
|
+
medium: "500",
|
|
86
|
+
semibold: "600",
|
|
87
|
+
bold: "700"
|
|
88
|
+
}, m = {
|
|
89
|
+
none: "0px",
|
|
90
|
+
sm: "0.125rem",
|
|
91
|
+
base: "0.25rem",
|
|
92
|
+
md: "0.375rem",
|
|
93
|
+
lg: "0.5rem",
|
|
94
|
+
xl: "0.75rem",
|
|
95
|
+
"2xl": "1rem",
|
|
96
|
+
full: "9999px"
|
|
97
|
+
}, x = {
|
|
98
|
+
sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
99
|
+
base: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
|
|
100
|
+
md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
101
|
+
lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
102
|
+
xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"
|
|
103
|
+
}, s = {
|
|
104
|
+
fast: "150ms",
|
|
105
|
+
base: "200ms",
|
|
106
|
+
slow: "300ms"
|
|
107
|
+
}, a = {
|
|
108
|
+
colors: e,
|
|
109
|
+
spacing: f,
|
|
110
|
+
fontSize: r,
|
|
111
|
+
fontWeight: b,
|
|
112
|
+
borderRadius: m,
|
|
113
|
+
shadows: x,
|
|
114
|
+
transitions: s
|
|
115
|
+
};
|
|
116
|
+
export {
|
|
117
|
+
a as tokens
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/tokens/tokens.ts"],"sourcesContent":["export const COLORS = {\r\n primary: {\r\n 50: '#eff6ff',\r\n 100: '#dbeafe',\r\n 200: '#bfdbfe',\r\n 300: '#93c5fd',\r\n 400: '#60a5fa',\r\n 500: '#3b82f6',\r\n 600: '#2563eb',\r\n 700: '#1d4ed8',\r\n 800: '#1e40af',\r\n 900: '#1e3a8a',\r\n },\r\n secondary: {\r\n 50: '#f9fafb',\r\n 100: '#f3f4f6',\r\n 200: '#e5e7eb',\r\n 300: '#d1d5db',\r\n 400: '#9ca3af',\r\n 500: '#6b7280',\r\n 600: '#4b5563',\r\n 700: '#374151',\r\n 800: '#1f2937',\r\n 900: '#111827',\r\n },\r\n danger: {\r\n 50: '#fef2f2',\r\n 100: '#fee2e2',\r\n 200: '#fecaca',\r\n 300: '#fca5a5',\r\n 400: '#f87171',\r\n 500: '#ef4444',\r\n 600: '#dc2626',\r\n 700: '#b91c1c',\r\n 800: '#991b1b',\r\n 900: '#7f1d1d',\r\n },\r\n success: {\r\n 50: '#f0fdf4',\r\n 100: '#dcfce7',\r\n 200: '#bbf7d0',\r\n 300: '#86efac',\r\n 400: '#4ade80',\r\n 500: '#22c55e',\r\n 600: '#16a34a',\r\n 700: '#15803d',\r\n 800: '#166534',\r\n 900: '#14532d',\r\n },\r\n warning: {\r\n 50: '#fffbeb',\r\n 100: '#fef3c7',\r\n 200: '#fde68a',\r\n 300: '#fcd34d',\r\n 400: '#fbbf24',\r\n 500: '#f59e0b',\r\n 600: '#d97706',\r\n 700: '#b45309',\r\n 800: '#92400e',\r\n 900: '#78350f',\r\n },\r\n} as const\r\n\r\nexport const SPACING = {\r\n 0: '0px',\r\n 1: '0.25rem',\r\n 2: '0.5rem',\r\n 3: '0.75rem',\r\n 4: '1rem',\r\n 5: '1.25rem',\r\n 6: '1.5rem',\r\n 8: '2rem',\r\n 10: '2.5rem',\r\n 12: '3rem',\r\n 16: '4rem',\r\n} as const\r\n\r\nexport const FONT_SIZE = {\r\n xs: '0.75rem',\r\n sm: '0.875rem',\r\n base: '1rem',\r\n lg: '1.125rem',\r\n xl: '1.25rem',\r\n '2xl': '1.5rem',\r\n '3xl': '1.875rem',\r\n '4xl': '2.25rem',\r\n} as const\r\n\r\nexport const FONT_WEIGHT = {\r\n normal: '400',\r\n medium: '500',\r\n semibold: '600',\r\n bold: '700',\r\n} as const\r\n\r\nexport const BORDER_RADIUS = {\r\n none: '0px',\r\n sm: '0.125rem',\r\n base: '0.25rem',\r\n md: '0.375rem',\r\n lg: '0.5rem',\r\n xl: '0.75rem',\r\n '2xl': '1rem',\r\n full: '9999px',\r\n} as const\r\n\r\nexport const SHADOWS = {\r\n sm: '0 1px 2px 0 rgb(0 0 0 / 0.05)',\r\n base: '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)',\r\n md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',\r\n lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',\r\n xl: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',\r\n} as const\r\n\r\nexport const TRANSITIONS = {\r\n fast: '150ms',\r\n base: '200ms',\r\n slow: '300ms',\r\n} as const\r\n\r\nexport const tokens = {\r\n colors: COLORS,\r\n spacing: SPACING,\r\n fontSize: FONT_SIZE,\r\n fontWeight: FONT_WEIGHT,\r\n borderRadius: BORDER_RADIUS,\r\n shadows: SHADOWS,\r\n transitions: TRANSITIONS,\r\n} as const\r\n\r\nexport type ColorScale = keyof typeof COLORS\r\nexport type ColorShade = keyof typeof COLORS.primary\r\nexport type Spacing = keyof typeof SPACING\r\nexport type FontSize = keyof typeof FONT_SIZE\r\nexport type FontWeight = keyof typeof FONT_WEIGHT\r\nexport type BorderRadius = keyof typeof BORDER_RADIUS\r\nexport type Shadow = keyof typeof SHADOWS\r\nexport type Transition = keyof typeof TRANSITIONS\r\n"],"names":["COLORS","SPACING","FONT_SIZE","FONT_WEIGHT","BORDER_RADIUS","SHADOWS","TRANSITIONS","tokens"],"mappings":"AAAO,MAAMA,IAAS;AAAA,EACpB,SAAS;AAAA,IACP,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EAAA;AAAA,EAEP,WAAW;AAAA,IACT,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EAAA;AAAA,EAEP,QAAQ;AAAA,IACN,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EAAA;AAAA,EAEP,SAAS;AAAA,IACP,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EAAA;AAAA,EAEP,SAAS;AAAA,IACP,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EAAA;AAET,GAEaC,IAAU;AAAA,EACrB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAY;AAAA,EACvB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT,GAEaC,IAAc;AAAA,EACzB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AACR,GAEaC,IAAgB;AAAA,EAC3B,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,MAAM;AACR,GAEaC,IAAU;AAAA,EACrB,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAc;AAAA,EACzB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR,GAEaC,IAAS;AAAA,EACpB,QAAQP;AAAA,EACR,SAASC;AAAA,EACT,UAAUC;AAAA,EACV,YAAYC;AAAA,EACZ,cAAcC;AAAA,EACd,SAASC;AAAA,EACT,aAAaC;AACf;"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
export declare const COLORS: {
|
|
2
|
+
readonly primary: {
|
|
3
|
+
readonly 50: "#eff6ff";
|
|
4
|
+
readonly 100: "#dbeafe";
|
|
5
|
+
readonly 200: "#bfdbfe";
|
|
6
|
+
readonly 300: "#93c5fd";
|
|
7
|
+
readonly 400: "#60a5fa";
|
|
8
|
+
readonly 500: "#3b82f6";
|
|
9
|
+
readonly 600: "#2563eb";
|
|
10
|
+
readonly 700: "#1d4ed8";
|
|
11
|
+
readonly 800: "#1e40af";
|
|
12
|
+
readonly 900: "#1e3a8a";
|
|
13
|
+
};
|
|
14
|
+
readonly secondary: {
|
|
15
|
+
readonly 50: "#f9fafb";
|
|
16
|
+
readonly 100: "#f3f4f6";
|
|
17
|
+
readonly 200: "#e5e7eb";
|
|
18
|
+
readonly 300: "#d1d5db";
|
|
19
|
+
readonly 400: "#9ca3af";
|
|
20
|
+
readonly 500: "#6b7280";
|
|
21
|
+
readonly 600: "#4b5563";
|
|
22
|
+
readonly 700: "#374151";
|
|
23
|
+
readonly 800: "#1f2937";
|
|
24
|
+
readonly 900: "#111827";
|
|
25
|
+
};
|
|
26
|
+
readonly danger: {
|
|
27
|
+
readonly 50: "#fef2f2";
|
|
28
|
+
readonly 100: "#fee2e2";
|
|
29
|
+
readonly 200: "#fecaca";
|
|
30
|
+
readonly 300: "#fca5a5";
|
|
31
|
+
readonly 400: "#f87171";
|
|
32
|
+
readonly 500: "#ef4444";
|
|
33
|
+
readonly 600: "#dc2626";
|
|
34
|
+
readonly 700: "#b91c1c";
|
|
35
|
+
readonly 800: "#991b1b";
|
|
36
|
+
readonly 900: "#7f1d1d";
|
|
37
|
+
};
|
|
38
|
+
readonly success: {
|
|
39
|
+
readonly 50: "#f0fdf4";
|
|
40
|
+
readonly 100: "#dcfce7";
|
|
41
|
+
readonly 200: "#bbf7d0";
|
|
42
|
+
readonly 300: "#86efac";
|
|
43
|
+
readonly 400: "#4ade80";
|
|
44
|
+
readonly 500: "#22c55e";
|
|
45
|
+
readonly 600: "#16a34a";
|
|
46
|
+
readonly 700: "#15803d";
|
|
47
|
+
readonly 800: "#166534";
|
|
48
|
+
readonly 900: "#14532d";
|
|
49
|
+
};
|
|
50
|
+
readonly warning: {
|
|
51
|
+
readonly 50: "#fffbeb";
|
|
52
|
+
readonly 100: "#fef3c7";
|
|
53
|
+
readonly 200: "#fde68a";
|
|
54
|
+
readonly 300: "#fcd34d";
|
|
55
|
+
readonly 400: "#fbbf24";
|
|
56
|
+
readonly 500: "#f59e0b";
|
|
57
|
+
readonly 600: "#d97706";
|
|
58
|
+
readonly 700: "#b45309";
|
|
59
|
+
readonly 800: "#92400e";
|
|
60
|
+
readonly 900: "#78350f";
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export declare const SPACING: {
|
|
64
|
+
readonly 0: "0px";
|
|
65
|
+
readonly 1: "0.25rem";
|
|
66
|
+
readonly 2: "0.5rem";
|
|
67
|
+
readonly 3: "0.75rem";
|
|
68
|
+
readonly 4: "1rem";
|
|
69
|
+
readonly 5: "1.25rem";
|
|
70
|
+
readonly 6: "1.5rem";
|
|
71
|
+
readonly 8: "2rem";
|
|
72
|
+
readonly 10: "2.5rem";
|
|
73
|
+
readonly 12: "3rem";
|
|
74
|
+
readonly 16: "4rem";
|
|
75
|
+
};
|
|
76
|
+
export declare const FONT_SIZE: {
|
|
77
|
+
readonly xs: "0.75rem";
|
|
78
|
+
readonly sm: "0.875rem";
|
|
79
|
+
readonly base: "1rem";
|
|
80
|
+
readonly lg: "1.125rem";
|
|
81
|
+
readonly xl: "1.25rem";
|
|
82
|
+
readonly '2xl': "1.5rem";
|
|
83
|
+
readonly '3xl': "1.875rem";
|
|
84
|
+
readonly '4xl': "2.25rem";
|
|
85
|
+
};
|
|
86
|
+
export declare const FONT_WEIGHT: {
|
|
87
|
+
readonly normal: "400";
|
|
88
|
+
readonly medium: "500";
|
|
89
|
+
readonly semibold: "600";
|
|
90
|
+
readonly bold: "700";
|
|
91
|
+
};
|
|
92
|
+
export declare const BORDER_RADIUS: {
|
|
93
|
+
readonly none: "0px";
|
|
94
|
+
readonly sm: "0.125rem";
|
|
95
|
+
readonly base: "0.25rem";
|
|
96
|
+
readonly md: "0.375rem";
|
|
97
|
+
readonly lg: "0.5rem";
|
|
98
|
+
readonly xl: "0.75rem";
|
|
99
|
+
readonly '2xl': "1rem";
|
|
100
|
+
readonly full: "9999px";
|
|
101
|
+
};
|
|
102
|
+
export declare const SHADOWS: {
|
|
103
|
+
readonly sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
104
|
+
readonly base: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
|
|
105
|
+
readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
|
|
106
|
+
readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
107
|
+
readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
|
|
108
|
+
};
|
|
109
|
+
export declare const TRANSITIONS: {
|
|
110
|
+
readonly fast: "150ms";
|
|
111
|
+
readonly base: "200ms";
|
|
112
|
+
readonly slow: "300ms";
|
|
113
|
+
};
|
|
114
|
+
export declare const tokens: {
|
|
115
|
+
readonly colors: {
|
|
116
|
+
readonly primary: {
|
|
117
|
+
readonly 50: "#eff6ff";
|
|
118
|
+
readonly 100: "#dbeafe";
|
|
119
|
+
readonly 200: "#bfdbfe";
|
|
120
|
+
readonly 300: "#93c5fd";
|
|
121
|
+
readonly 400: "#60a5fa";
|
|
122
|
+
readonly 500: "#3b82f6";
|
|
123
|
+
readonly 600: "#2563eb";
|
|
124
|
+
readonly 700: "#1d4ed8";
|
|
125
|
+
readonly 800: "#1e40af";
|
|
126
|
+
readonly 900: "#1e3a8a";
|
|
127
|
+
};
|
|
128
|
+
readonly secondary: {
|
|
129
|
+
readonly 50: "#f9fafb";
|
|
130
|
+
readonly 100: "#f3f4f6";
|
|
131
|
+
readonly 200: "#e5e7eb";
|
|
132
|
+
readonly 300: "#d1d5db";
|
|
133
|
+
readonly 400: "#9ca3af";
|
|
134
|
+
readonly 500: "#6b7280";
|
|
135
|
+
readonly 600: "#4b5563";
|
|
136
|
+
readonly 700: "#374151";
|
|
137
|
+
readonly 800: "#1f2937";
|
|
138
|
+
readonly 900: "#111827";
|
|
139
|
+
};
|
|
140
|
+
readonly danger: {
|
|
141
|
+
readonly 50: "#fef2f2";
|
|
142
|
+
readonly 100: "#fee2e2";
|
|
143
|
+
readonly 200: "#fecaca";
|
|
144
|
+
readonly 300: "#fca5a5";
|
|
145
|
+
readonly 400: "#f87171";
|
|
146
|
+
readonly 500: "#ef4444";
|
|
147
|
+
readonly 600: "#dc2626";
|
|
148
|
+
readonly 700: "#b91c1c";
|
|
149
|
+
readonly 800: "#991b1b";
|
|
150
|
+
readonly 900: "#7f1d1d";
|
|
151
|
+
};
|
|
152
|
+
readonly success: {
|
|
153
|
+
readonly 50: "#f0fdf4";
|
|
154
|
+
readonly 100: "#dcfce7";
|
|
155
|
+
readonly 200: "#bbf7d0";
|
|
156
|
+
readonly 300: "#86efac";
|
|
157
|
+
readonly 400: "#4ade80";
|
|
158
|
+
readonly 500: "#22c55e";
|
|
159
|
+
readonly 600: "#16a34a";
|
|
160
|
+
readonly 700: "#15803d";
|
|
161
|
+
readonly 800: "#166534";
|
|
162
|
+
readonly 900: "#14532d";
|
|
163
|
+
};
|
|
164
|
+
readonly warning: {
|
|
165
|
+
readonly 50: "#fffbeb";
|
|
166
|
+
readonly 100: "#fef3c7";
|
|
167
|
+
readonly 200: "#fde68a";
|
|
168
|
+
readonly 300: "#fcd34d";
|
|
169
|
+
readonly 400: "#fbbf24";
|
|
170
|
+
readonly 500: "#f59e0b";
|
|
171
|
+
readonly 600: "#d97706";
|
|
172
|
+
readonly 700: "#b45309";
|
|
173
|
+
readonly 800: "#92400e";
|
|
174
|
+
readonly 900: "#78350f";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
readonly spacing: {
|
|
178
|
+
readonly 0: "0px";
|
|
179
|
+
readonly 1: "0.25rem";
|
|
180
|
+
readonly 2: "0.5rem";
|
|
181
|
+
readonly 3: "0.75rem";
|
|
182
|
+
readonly 4: "1rem";
|
|
183
|
+
readonly 5: "1.25rem";
|
|
184
|
+
readonly 6: "1.5rem";
|
|
185
|
+
readonly 8: "2rem";
|
|
186
|
+
readonly 10: "2.5rem";
|
|
187
|
+
readonly 12: "3rem";
|
|
188
|
+
readonly 16: "4rem";
|
|
189
|
+
};
|
|
190
|
+
readonly fontSize: {
|
|
191
|
+
readonly xs: "0.75rem";
|
|
192
|
+
readonly sm: "0.875rem";
|
|
193
|
+
readonly base: "1rem";
|
|
194
|
+
readonly lg: "1.125rem";
|
|
195
|
+
readonly xl: "1.25rem";
|
|
196
|
+
readonly '2xl': "1.5rem";
|
|
197
|
+
readonly '3xl': "1.875rem";
|
|
198
|
+
readonly '4xl': "2.25rem";
|
|
199
|
+
};
|
|
200
|
+
readonly fontWeight: {
|
|
201
|
+
readonly normal: "400";
|
|
202
|
+
readonly medium: "500";
|
|
203
|
+
readonly semibold: "600";
|
|
204
|
+
readonly bold: "700";
|
|
205
|
+
};
|
|
206
|
+
readonly borderRadius: {
|
|
207
|
+
readonly none: "0px";
|
|
208
|
+
readonly sm: "0.125rem";
|
|
209
|
+
readonly base: "0.25rem";
|
|
210
|
+
readonly md: "0.375rem";
|
|
211
|
+
readonly lg: "0.5rem";
|
|
212
|
+
readonly xl: "0.75rem";
|
|
213
|
+
readonly '2xl': "1rem";
|
|
214
|
+
readonly full: "9999px";
|
|
215
|
+
};
|
|
216
|
+
readonly shadows: {
|
|
217
|
+
readonly sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
218
|
+
readonly base: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
|
|
219
|
+
readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
|
|
220
|
+
readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
221
|
+
readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
|
|
222
|
+
};
|
|
223
|
+
readonly transitions: {
|
|
224
|
+
readonly fast: "150ms";
|
|
225
|
+
readonly base: "200ms";
|
|
226
|
+
readonly slow: "300ms";
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
export type ColorScale = keyof typeof COLORS;
|
|
230
|
+
export type ColorShade = keyof typeof COLORS.primary;
|
|
231
|
+
export type Spacing = keyof typeof SPACING;
|
|
232
|
+
export type FontSize = keyof typeof FONT_SIZE;
|
|
233
|
+
export type FontWeight = keyof typeof FONT_WEIGHT;
|
|
234
|
+
export type BorderRadius = keyof typeof BORDER_RADIUS;
|
|
235
|
+
export type Shadow = keyof typeof SHADOWS;
|
|
236
|
+
export type Transition = keyof typeof TRANSITIONS;
|
|
237
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/tokens/tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DT,CAAA;AAEV,eAAO,MAAM,OAAO;;;;;;;;;;;;CAYV,CAAA;AAEV,eAAO,MAAM,SAAS;;;;;;;;;CASZ,CAAA;AAEV,eAAO,MAAM,WAAW;;;;;CAKd,CAAA;AAEV,eAAO,MAAM,aAAa;;;;;;;;;CAShB,CAAA;AAEV,eAAO,MAAM,OAAO;;;;;;CAMV,CAAA;AAEV,eAAO,MAAM,WAAW;;;;CAId,CAAA;AAEV,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQT,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,MAAM,CAAA;AAC5C,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,MAAM,CAAC,OAAO,CAAA;AACpD,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,OAAO,CAAA;AAC1C,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAA;AAC7C,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAA;AACjD,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,aAAa,CAAA;AACrD,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,OAAO,CAAA;AACzC,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Global type definitions for CSS Modules
|
|
2
|
+
declare module '*.module.css' {
|
|
3
|
+
const classes: { [key: string]: string }
|
|
4
|
+
export default classes
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
declare module '*.module.scss' {
|
|
8
|
+
const classes: { [key: string]: string }
|
|
9
|
+
export default classes
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.module.sass' {
|
|
13
|
+
const classes: { [key: string]: string }
|
|
14
|
+
export default classes
|
|
15
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'success' | 'danger' | 'outline' | 'ghost' | 'white' | 'icon';
|
|
3
|
+
export type ButtonSize = 'small' | 'medium' | 'large';
|
|
4
|
+
type BaseButtonProps = {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
type ButtonAsButton = BaseButtonProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof BaseButtonProps> & {
|
|
14
|
+
href?: never;
|
|
15
|
+
to?: never;
|
|
16
|
+
};
|
|
17
|
+
type ButtonAsLink = BaseButtonProps & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof BaseButtonProps> & {
|
|
18
|
+
href: string;
|
|
19
|
+
to?: never;
|
|
20
|
+
};
|
|
21
|
+
type ButtonAsRouterLink = BaseButtonProps & {
|
|
22
|
+
to: string;
|
|
23
|
+
href?: never;
|
|
24
|
+
};
|
|
25
|
+
export type ButtonProps = ButtonAsButton | ButtonAsLink | ButtonAsRouterLink;
|
|
26
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,cAAc,CAAA;AAiBrB,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAA;AACnH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAErD,KAAK,eAAe,GAAG;IACrB,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,KAAK,cAAc,GAAG,eAAe,GACnC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,eAAe,CAAC,GAAG;IAC3E,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,EAAE,CAAC,EAAE,KAAK,CAAA;CACX,CAAA;AAEH,KAAK,YAAY,GAAG,eAAe,GACjC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,eAAe,CAAC,GAAG;IAC3E,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,KAAK,CAAA;CACX,CAAA;AAEH,KAAK,kBAAkB,GAAG,eAAe,GAAG;IAC1C,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,KAAK,CAAA;CACb,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,YAAY,GAAG,kBAAkB,CAAA;AAgG5E,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA8BxC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
package/dist/ui/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
// CSS Modules
|
|
4
|
+
declare module '*.module.css' {
|
|
5
|
+
const classes: { readonly [key: string]: string }
|
|
6
|
+
export default classes
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare module '*.module.scss' {
|
|
10
|
+
const classes: { readonly [key: string]: string }
|
|
11
|
+
export default classes
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*.module.sass' {
|
|
15
|
+
const classes: { readonly [key: string]: string }
|
|
16
|
+
export default classes
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '*.module.less' {
|
|
20
|
+
const classes: { readonly [key: string]: string }
|
|
21
|
+
export default classes
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.module.styl' {
|
|
25
|
+
const classes: { readonly [key: string]: string }
|
|
26
|
+
export default classes
|
|
27
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sanitas-ui-design-system",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Design System compartido para los microfrontends de Sanitas",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/proyectosti_keralty/sanitas-ui.git"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"registry": "https://registry.npmjs.org",
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"import": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./ui": {
|
|
23
|
+
"import": "./dist/ui/index.js",
|
|
24
|
+
"types": "./dist/ui/index.d.ts"
|
|
25
|
+
},
|
|
26
|
+
"./tokens": {
|
|
27
|
+
"import": "./dist/tokens/index.js",
|
|
28
|
+
"types": "./dist/tokens/index.d.ts"
|
|
29
|
+
},
|
|
30
|
+
"./theme": {
|
|
31
|
+
"import": "./dist/theme/index.js",
|
|
32
|
+
"types": "./dist/theme/index.d.ts"
|
|
33
|
+
},
|
|
34
|
+
"./icons": {
|
|
35
|
+
"import": "./dist/icons/index.js",
|
|
36
|
+
"types": "./dist/icons/index.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./styles": "./dist/styles/index.css",
|
|
39
|
+
"./tokens.css": "./dist/tokens/tokens.css",
|
|
40
|
+
"./theme.css": "./dist/theme/theme.css",
|
|
41
|
+
"./package.json": "./package.json"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"README.md"
|
|
46
|
+
],
|
|
47
|
+
"keywords": [
|
|
48
|
+
"sanitas",
|
|
49
|
+
"ui",
|
|
50
|
+
"components",
|
|
51
|
+
"react"
|
|
52
|
+
],
|
|
53
|
+
"author": "",
|
|
54
|
+
"license": "MIT",
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"react": "^19.0.0",
|
|
57
|
+
"react-dom": "^19.0.0",
|
|
58
|
+
"@tanstack/react-router": "^1.132.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@tanstack/react-router": "^1.132.0",
|
|
62
|
+
"@storybook/addon-essentials": "^8.5.2",
|
|
63
|
+
"@storybook/addon-interactions": "^8.5.2",
|
|
64
|
+
"@storybook/addon-links": "^8.5.2",
|
|
65
|
+
"@storybook/blocks": "^8.5.2",
|
|
66
|
+
"@storybook/react": "^8.5.2",
|
|
67
|
+
"@storybook/react-vite": "^8.5.2",
|
|
68
|
+
"@storybook/test": "^8.5.2",
|
|
69
|
+
"@tailwindcss/vite": "^4.0.6",
|
|
70
|
+
"@types/node": "^22.10.2",
|
|
71
|
+
"@types/react": "^19.2.0",
|
|
72
|
+
"@types/react-dom": "^19.2.0",
|
|
73
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
74
|
+
"react": "^19.2.0",
|
|
75
|
+
"react-dom": "^19.2.0",
|
|
76
|
+
"storybook": "^8.5.2",
|
|
77
|
+
"tailwindcss": "^4.0.6",
|
|
78
|
+
"typescript": "^5.7.2",
|
|
79
|
+
"vite": "^7.2.4",
|
|
80
|
+
"vite-plugin-dts": "^4.3.0"
|
|
81
|
+
},
|
|
82
|
+
"scripts": {
|
|
83
|
+
"dev": "vite build --watch",
|
|
84
|
+
"build": "tsc && vite build",
|
|
85
|
+
"storybook": "storybook dev -p 6006",
|
|
86
|
+
"build-storybook": "storybook build"
|
|
87
|
+
}
|
|
88
|
+
}
|