@quintara.ai/ui 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -0
- package/dist/components.d.ts +485 -0
- package/dist/components.esm.js +1575 -0
- package/dist/components.esm.js.map +1 -0
- package/dist/components.js +1575 -0
- package/dist/components.js.map +1 -0
- package/dist/constants.d.ts +159 -0
- package/dist/constants.esm.js +2 -0
- package/dist/constants.esm.js.map +1 -0
- package/dist/constants.js +2 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +680 -0
- package/dist/index.esm.js +1575 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +1575 -0
- package/dist/index.js.map +1 -0
- package/dist/utils.d.ts +38 -0
- package/dist/utils.esm.js +2 -0
- package/dist/utils.esm.js.map +1 -0
- package/dist/utils.js +2 -0
- package/dist/utils.js.map +1 -0
- package/package.json +86 -0
package/README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# @quintarai/ui
|
|
2
|
+
|
|
3
|
+
Biblioteca personalizada de componentes React Quintara AI.
|
|
4
|
+
|
|
5
|
+
Repositorio: https://gitlab.com/leoquintara/quintarai-ui.git
|
|
6
|
+
|
|
7
|
+
## 1. Objetivos
|
|
8
|
+
|
|
9
|
+
- **Reutilización**: centralizar componentes UI reutilizables para proyectos React.
|
|
10
|
+
- **Consistencia**: mantener una experiencia visual y de interacción uniforme.
|
|
11
|
+
- **Productividad**: reducir tiempo de desarrollo (componentes listos + utilidades comunes).
|
|
12
|
+
- **Compatibilidad**: funcionar correctamente en proyectos consumidores como Gatsby/React.
|
|
13
|
+
|
|
14
|
+
## 2. Instalación del paquete
|
|
15
|
+
|
|
16
|
+
### 2.1 Instalación desde registry (recomendado)
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
yarn add @quintara.ai/ui
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
o
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm i @quintara.ai/ui
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 2.2 Peer dependencies
|
|
29
|
+
|
|
30
|
+
El consumidor debe instalar (o ya tener instalados) estos paquetes:
|
|
31
|
+
|
|
32
|
+
- `react`
|
|
33
|
+
- `react-dom`
|
|
34
|
+
- `styled-components`
|
|
35
|
+
- `iconoir-react`
|
|
36
|
+
|
|
37
|
+
## 3. Estructura
|
|
38
|
+
|
|
39
|
+
Estructura general:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
src/
|
|
43
|
+
components/
|
|
44
|
+
(componentes UI)
|
|
45
|
+
constants/
|
|
46
|
+
(constantes compartidas)
|
|
47
|
+
utils/
|
|
48
|
+
(helpers/utilidades compartidas)
|
|
49
|
+
|
|
50
|
+
dist/
|
|
51
|
+
index.js / index.esm.js / index.d.ts
|
|
52
|
+
components.js / components.esm.js / components.d.ts
|
|
53
|
+
constants.js / constants.esm.js / constants.d.ts
|
|
54
|
+
utils.js / utils.esm.js / utils.d.ts
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Puntos de entrada:
|
|
58
|
+
|
|
59
|
+
- `src/index.ts`
|
|
60
|
+
- `src/components/index.ts`
|
|
61
|
+
- `src/constants/index.ts`
|
|
62
|
+
- `src/utils/index.ts`
|
|
63
|
+
|
|
64
|
+
## 4. Arquitectura
|
|
65
|
+
|
|
66
|
+
- **Compilación**: Rollup genera salidas CJS y ESM en `dist/`.
|
|
67
|
+
- **Tipos**: se genera `.d.ts` para cada entry.
|
|
68
|
+
- **Aliases internos**:
|
|
69
|
+
- `@components` → `src/components`
|
|
70
|
+
- `@utils` → `src/utils`
|
|
71
|
+
- `@constants` → `src/constants`
|
|
72
|
+
|
|
73
|
+
## 5. Cómo utilizar un componente
|
|
74
|
+
|
|
75
|
+
Import recomendado (por subpath):
|
|
76
|
+
|
|
77
|
+
```jsx
|
|
78
|
+
import React from "react";
|
|
79
|
+
import { Button, Flex, Text } from "@quintara.ai/ui/components";
|
|
80
|
+
|
|
81
|
+
export default function Example() {
|
|
82
|
+
return (
|
|
83
|
+
<Flex $items="center" $justify="center" $gap={12}>
|
|
84
|
+
<Text $type="strong">Hola</Text>
|
|
85
|
+
<Button theme="primary" onClick={() => console.log("click")}>
|
|
86
|
+
Aceptar
|
|
87
|
+
</Button>
|
|
88
|
+
</Flex>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## 6. Constantes
|
|
94
|
+
|
|
95
|
+
Las constantes compartidas viven en `src/constants` y se exponen por:
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
import { REGEX } from "@quintara.ai/ui/constants";
|
|
99
|
+
|
|
100
|
+
REGEX.email.test("test@mail.com");
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 6. Utils
|
|
104
|
+
|
|
105
|
+
Las utilidades compartidas viven en `src/utils` y se exponen por:
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
import { hasWindow, slugify } from "@quintara.ai/ui/utils";
|
|
109
|
+
|
|
110
|
+
if (hasWindow()) {
|
|
111
|
+
slugify("Hola Mundo");
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## 7. Vínculos a DBGrid y React Super CSS
|
|
116
|
+
|
|
117
|
+
- **DBGrid** (sistema de grid/breakpoints):
|
|
118
|
+
- https://www.npmjs.com/package/dbgrid
|
|
119
|
+
|
|
120
|
+
- **@digitalbooting/react-super-css**:
|
|
121
|
+
- https://www.npmjs.com/package/@digitalbooting/react-super-css
|
|
122
|
+
|
|
123
|
+
## 8. Autor
|
|
124
|
+
|
|
125
|
+
**Quintara AI**
|
|
126
|
+
|
|
127
|
+
https://gitlab.com/leoquintara
|
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
import React, { HTMLAttributes, ReactNode, SVGProps, MutableRefObject, KeyboardEvent, CSSProperties, InputHTMLAttributes, ButtonHTMLAttributes, Ref, VideoHTMLAttributes } from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
interface ContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
smMaxw?: string;
|
|
7
|
+
mdMaxw?: string;
|
|
8
|
+
lgMaxw?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare const _default$o: React.NamedExoticComponent<ContainerProps>;
|
|
12
|
+
|
|
13
|
+
type SuperCSSProps = Record<string, any>;
|
|
14
|
+
|
|
15
|
+
type IconType = "fingerIcon" | "keyIcon" | "rollback" | "show" | "hide" | "close" | "facebook" | "instagram" | "x" | "share" | "arrowl" | "arrowr" | "arrowDown" | "messageAlert" | "info" | "success" | "warning" | "danger" | "checkEmpty" | "checkFill" | "radioEmpty" | "radioFill" | "navLeft" | "navRight" | "menu" | "wallet" | "cash" | "home" | "search" | "xmark" | "cloudless" | "farrowr" | "link" | "bank" | "creditCard" | "upload" | "download" | "bell" | "more" | "plus" | "calendar" | "trash" | "cloudUpload" | "refresh" | "hdDisplay";
|
|
16
|
+
interface WrapperProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
id?: string;
|
|
18
|
+
classes?: string;
|
|
19
|
+
type?: IconType;
|
|
20
|
+
wsvg?: number;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
interface IconsProps extends SVGProps<SVGSVGElement> {
|
|
24
|
+
id?: string;
|
|
25
|
+
classes?: string;
|
|
26
|
+
type?: IconType;
|
|
27
|
+
wsvg?: number;
|
|
28
|
+
containerProps?: SuperCSSProps;
|
|
29
|
+
component?: ReactNode | null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare const _default$n: React.MemoExoticComponent<({ show, width, onClose, children, icon, iconless, type, title, titleless, isCancel, className, unClosed, ...props }: {
|
|
33
|
+
show?: boolean;
|
|
34
|
+
width?: string | number;
|
|
35
|
+
onClose?: () => void;
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
icon?: IconType;
|
|
38
|
+
iconless?: boolean;
|
|
39
|
+
type?: "success" | "warning";
|
|
40
|
+
title?: string;
|
|
41
|
+
titleless?: boolean;
|
|
42
|
+
isCancel?: boolean;
|
|
43
|
+
className?: string;
|
|
44
|
+
unClosed?: boolean;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}) => react_jsx_runtime.JSX.Element>;
|
|
47
|
+
|
|
48
|
+
declare const _default$m: React.NamedExoticComponent<SuperCSSProps>;
|
|
49
|
+
|
|
50
|
+
declare const _default$l: React.MemoExoticComponent<({ title, message, }: {
|
|
51
|
+
title?: string | undefined;
|
|
52
|
+
message?: string | undefined;
|
|
53
|
+
}) => react_jsx_runtime.JSX.Element>;
|
|
54
|
+
|
|
55
|
+
type InputRole = "input" | "textarea";
|
|
56
|
+
type InputAlign = "left" | "center" | "right";
|
|
57
|
+
type InputType = "text" | "password" | "email" | "tel" | "number" | "curp" | "calendar";
|
|
58
|
+
interface InputProps extends Omit<HTMLAttributes<HTMLDivElement>, "onCopy" | "onPaste" | "onChange"> {
|
|
59
|
+
isSlug?: boolean;
|
|
60
|
+
placeholder?: string;
|
|
61
|
+
type?: InputType;
|
|
62
|
+
getValue?: (value: string) => void;
|
|
63
|
+
role?: InputRole;
|
|
64
|
+
value?: string;
|
|
65
|
+
forwardRef?: ((instance: HTMLInputElement | HTMLTextAreaElement | null) => void) | MutableRefObject<HTMLInputElement | HTMLTextAreaElement | null> | null;
|
|
66
|
+
onKeyDown?: (e: KeyboardEvent) => void;
|
|
67
|
+
onKeyUp?: (e: KeyboardEvent) => void;
|
|
68
|
+
onChange?: (value: string) => void;
|
|
69
|
+
onBlur?: () => void;
|
|
70
|
+
onFocus?: () => void;
|
|
71
|
+
onCopy?: boolean;
|
|
72
|
+
onPaste?: boolean;
|
|
73
|
+
error?: string;
|
|
74
|
+
warning?: string;
|
|
75
|
+
disabled?: boolean;
|
|
76
|
+
maxLength?: number;
|
|
77
|
+
isNumber?: boolean;
|
|
78
|
+
scapeCharacters?: boolean;
|
|
79
|
+
onlyCharaters?: boolean;
|
|
80
|
+
onlyAlpha?: boolean;
|
|
81
|
+
normalizer?: boolean;
|
|
82
|
+
isCurp?: boolean;
|
|
83
|
+
onlyNL?: boolean;
|
|
84
|
+
onlyLetters?: boolean;
|
|
85
|
+
onlyPositiveNumbers?: boolean;
|
|
86
|
+
readOnly?: boolean;
|
|
87
|
+
capitalize?: boolean;
|
|
88
|
+
showCalendar?: boolean;
|
|
89
|
+
hasRequired?: string;
|
|
90
|
+
autoComplete?: boolean;
|
|
91
|
+
align?: InputAlign;
|
|
92
|
+
styles?: CSSProperties;
|
|
93
|
+
height?: number;
|
|
94
|
+
suffix?: ReactNode;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
declare const _default$k: React.MemoExoticComponent<React.NamedExoticComponent<InputProps>>;
|
|
98
|
+
|
|
99
|
+
interface InputHelperProps extends HTMLAttributes<HTMLDivElement> {
|
|
100
|
+
children?: ReactNode;
|
|
101
|
+
tooltip?: ReactNode;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
declare const _default$j: React.MemoExoticComponent<({ children, tooltip, ...props }: InputHelperProps) => react_jsx_runtime.JSX.Element>;
|
|
105
|
+
|
|
106
|
+
interface SelectOption {
|
|
107
|
+
id: string | number;
|
|
108
|
+
name: string;
|
|
109
|
+
selected?: boolean;
|
|
110
|
+
}
|
|
111
|
+
interface SelectProps extends HTMLAttributes<HTMLDivElement> {
|
|
112
|
+
id?: string;
|
|
113
|
+
type?: string;
|
|
114
|
+
value?: string;
|
|
115
|
+
error?: string;
|
|
116
|
+
warning?: string;
|
|
117
|
+
disabled?: boolean;
|
|
118
|
+
otherLess?: boolean;
|
|
119
|
+
placeholder?: string;
|
|
120
|
+
defaultValue?: string;
|
|
121
|
+
hasRequired?: boolean;
|
|
122
|
+
options?: SelectOption[];
|
|
123
|
+
excludes?: SelectOption[];
|
|
124
|
+
exclusion?: "default" | "invert";
|
|
125
|
+
getValue?: (value: string) => void;
|
|
126
|
+
onFocus?: () => void;
|
|
127
|
+
onBlur?: () => void;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
declare const CustomSelect: ({ options, id, defaultValue, otherLess, excludes, exclusion, placeholder, type, getValue, value, onChange, onBlur, onFocus, error, warning, disabled, hasRequired, ...props }: SelectProps) => react_jsx_runtime.JSX.Element;
|
|
131
|
+
|
|
132
|
+
interface DropdownOption {
|
|
133
|
+
id: string | number;
|
|
134
|
+
name: string;
|
|
135
|
+
tooltip?: string;
|
|
136
|
+
icon?: IconType;
|
|
137
|
+
disabled?: boolean;
|
|
138
|
+
divider?: boolean;
|
|
139
|
+
}
|
|
140
|
+
interface DropdownProps {
|
|
141
|
+
/** Array de opciones */
|
|
142
|
+
options: DropdownOption[];
|
|
143
|
+
/** Placeholder o texto del trigger */
|
|
144
|
+
placeholder?: string;
|
|
145
|
+
/** Valor seleccionado (id de la opción) */
|
|
146
|
+
value?: string | number;
|
|
147
|
+
/** Bloquear el dropdown */
|
|
148
|
+
block?: boolean;
|
|
149
|
+
/** Callback cuando se selecciona una opción */
|
|
150
|
+
onSelect?: (option: DropdownOption) => void;
|
|
151
|
+
/** Posición horizontal del dropdown */
|
|
152
|
+
position?: "left" | "right";
|
|
153
|
+
/** Ancho mínimo del dropdown */
|
|
154
|
+
minWidth?: number;
|
|
155
|
+
/** Altura máxima del panel (permite scroll) */
|
|
156
|
+
maxHeight?: number;
|
|
157
|
+
/** Deshabilitar dropdown */
|
|
158
|
+
disabled?: boolean;
|
|
159
|
+
/** Tono del dropdown */
|
|
160
|
+
theme?: "light" | "outline" | "fill";
|
|
161
|
+
trigger?: SuperCSSProps;
|
|
162
|
+
panel?: SuperCSSProps;
|
|
163
|
+
/** Renderizado personalizado del trigger */
|
|
164
|
+
renderTrigger?: (props: {
|
|
165
|
+
isOpen: boolean;
|
|
166
|
+
selectedOption?: DropdownOption;
|
|
167
|
+
toggle: () => void;
|
|
168
|
+
}) => ReactNode;
|
|
169
|
+
/** Renderizado personalizado de cada opción */
|
|
170
|
+
renderOption?: (option: DropdownOption, index: number) => ReactNode;
|
|
171
|
+
/** Cerrar al seleccionar */
|
|
172
|
+
closeOnSelect?: boolean;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
declare function Dropdown({ options, placeholder, value, onSelect, block, theme, position, minWidth, maxHeight, disabled, renderTrigger, renderOption, closeOnSelect, trigger, panel, ...props }: DropdownProps & SuperCSSProps): react_jsx_runtime.JSX.Element;
|
|
176
|
+
|
|
177
|
+
interface CheckboxValue {
|
|
178
|
+
checked: boolean;
|
|
179
|
+
value: string | number | boolean | undefined;
|
|
180
|
+
}
|
|
181
|
+
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value"> {
|
|
182
|
+
children?: ReactNode;
|
|
183
|
+
name?: string;
|
|
184
|
+
id?: string;
|
|
185
|
+
value?: string | number | boolean | undefined;
|
|
186
|
+
disabled?: boolean;
|
|
187
|
+
selected?: boolean | null;
|
|
188
|
+
getValue?: (data: CheckboxValue) => void;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
declare const _default$i: React.NamedExoticComponent<CheckboxProps>;
|
|
192
|
+
|
|
193
|
+
interface RadioValue {
|
|
194
|
+
checked: boolean;
|
|
195
|
+
value: string | number | boolean | undefined;
|
|
196
|
+
}
|
|
197
|
+
interface RadioProps {
|
|
198
|
+
children?: ReactNode;
|
|
199
|
+
name?: string;
|
|
200
|
+
id?: string;
|
|
201
|
+
value?: string | number;
|
|
202
|
+
selected?: boolean;
|
|
203
|
+
getValue?: (data: RadioValue) => void;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
declare const _default$h: React.NamedExoticComponent<RadioProps>;
|
|
207
|
+
|
|
208
|
+
type ButtonType = "button" | "link" | "submit";
|
|
209
|
+
type ButtonTheme = "primary" | "secondary" | "tertiary" | "outline" | "light" | "over";
|
|
210
|
+
interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
|
|
211
|
+
children: ReactNode;
|
|
212
|
+
type?: ButtonType;
|
|
213
|
+
theme?: ButtonTheme;
|
|
214
|
+
loading?: boolean;
|
|
215
|
+
mobile?: boolean;
|
|
216
|
+
forwardRef?: Ref<HTMLButtonElement>;
|
|
217
|
+
name?: string;
|
|
218
|
+
$hoverless?: string | undefined;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
declare const _default$g: React.NamedExoticComponent<ButtonProps & SuperCSSProps>;
|
|
222
|
+
|
|
223
|
+
type TooltipDirection$1 = "top" | "bottom" | "left" | "right";
|
|
224
|
+
interface ButtonIconProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
225
|
+
children: ReactNode;
|
|
226
|
+
loading?: boolean;
|
|
227
|
+
mobile?: boolean;
|
|
228
|
+
tooltip?: string;
|
|
229
|
+
direction?: TooltipDirection$1;
|
|
230
|
+
widthTooltip?: number | string;
|
|
231
|
+
small?: boolean;
|
|
232
|
+
width?: number | string;
|
|
233
|
+
nohover?: boolean;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
declare const _default$f: React.NamedExoticComponent<ButtonIconProps & SuperCSSProps>;
|
|
237
|
+
|
|
238
|
+
type TooltipDirection = "top" | "bottom" | "left" | "right";
|
|
239
|
+
type TooltipIcon = "info";
|
|
240
|
+
interface TooltipProps {
|
|
241
|
+
w?: string | number | undefined;
|
|
242
|
+
icon?: TooltipIcon;
|
|
243
|
+
direction?: TooltipDirection;
|
|
244
|
+
delay?: number;
|
|
245
|
+
widthIcon?: number;
|
|
246
|
+
element?: ReactNode;
|
|
247
|
+
children?: ReactNode;
|
|
248
|
+
iconStyle?: any;
|
|
249
|
+
theme?: string;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
declare const Tooltip: React.FC<TooltipProps>;
|
|
253
|
+
|
|
254
|
+
type AlertType = "info" | "success" | "warning" | "danger";
|
|
255
|
+
type AlertAlign = "left" | "center" | "right";
|
|
256
|
+
interface AlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
257
|
+
children: ReactNode;
|
|
258
|
+
type: AlertType;
|
|
259
|
+
align?: AlertAlign;
|
|
260
|
+
noClose?: boolean;
|
|
261
|
+
onClose?: () => void;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
declare const _default$e: React.NamedExoticComponent<AlertProps & SuperCSSProps>;
|
|
265
|
+
|
|
266
|
+
interface SvgProps extends HTMLAttributes<HTMLElement>, SuperCSSProps {
|
|
267
|
+
children?: ReactNode;
|
|
268
|
+
$icon?: string;
|
|
269
|
+
$wsvg?: number;
|
|
270
|
+
$mr?: number;
|
|
271
|
+
$ml?: number;
|
|
272
|
+
$cursor?: string;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
declare const _default$d: React.NamedExoticComponent<SvgProps>;
|
|
276
|
+
|
|
277
|
+
type ViewerTheme = "light" | "dark";
|
|
278
|
+
type MediaFormat = "jpeg" | "jpg" | "png" | "webp" | "mp4" | "webm" | "avi";
|
|
279
|
+
type ObjectFit$2 = "contain" | "cover" | "fill" | "none" | "scale-down";
|
|
280
|
+
interface ViewerFile {
|
|
281
|
+
url: string;
|
|
282
|
+
format: MediaFormat;
|
|
283
|
+
alt?: string;
|
|
284
|
+
fit?: ObjectFit$2;
|
|
285
|
+
persistAutoplay?: boolean;
|
|
286
|
+
}
|
|
287
|
+
interface ViewerProps {
|
|
288
|
+
id?: string;
|
|
289
|
+
show?: boolean;
|
|
290
|
+
files?: ViewerFile[];
|
|
291
|
+
currentImg?: number;
|
|
292
|
+
onClose?: (() => void) | null;
|
|
293
|
+
hideInfo?: boolean;
|
|
294
|
+
title?: string;
|
|
295
|
+
caption?: string;
|
|
296
|
+
theme?: ViewerTheme;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
declare const ViewerComponent: React.FC<ViewerProps>;
|
|
300
|
+
|
|
301
|
+
type BadgeTheme = "primary" | "secondary" | "tertiary" | "action" | "light" | "pill";
|
|
302
|
+
interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
303
|
+
children: ReactNode;
|
|
304
|
+
$theme?: BadgeTheme;
|
|
305
|
+
/** Mostrar icono de cerrar */
|
|
306
|
+
$closable?: boolean;
|
|
307
|
+
/** Callback al hacer click en el icono de cerrar */
|
|
308
|
+
onClose?: () => void;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
declare const _default$c: React.NamedExoticComponent<BadgeProps & SuperCSSProps>;
|
|
312
|
+
|
|
313
|
+
type ObjectFit$1 = "contain" | "cover" | "fill" | "none" | "scale-down";
|
|
314
|
+
interface ImageProps extends HTMLAttributes<HTMLPictureElement> {
|
|
315
|
+
url?: string;
|
|
316
|
+
name?: string;
|
|
317
|
+
fit?: ObjectFit$1;
|
|
318
|
+
imagePosition?: string;
|
|
319
|
+
children?: ReactNode;
|
|
320
|
+
blur?: string;
|
|
321
|
+
ratio?: string;
|
|
322
|
+
radius?: string | number;
|
|
323
|
+
[key: string]: unknown;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
declare const _default$b: React.NamedExoticComponent<ImageProps>;
|
|
327
|
+
|
|
328
|
+
type ObjectFit = "contain" | "cover" | "fill" | "none" | "scale-down";
|
|
329
|
+
interface VideoProps extends Omit<VideoHTMLAttributes<HTMLVideoElement>, "style"> {
|
|
330
|
+
src?: string;
|
|
331
|
+
alt?: string;
|
|
332
|
+
title?: string;
|
|
333
|
+
type?: string;
|
|
334
|
+
controls?: boolean;
|
|
335
|
+
autoPlay?: boolean;
|
|
336
|
+
muted?: boolean;
|
|
337
|
+
loop?: boolean;
|
|
338
|
+
className?: string;
|
|
339
|
+
containerStyles?: CSSProperties;
|
|
340
|
+
videoStyles?: CSSProperties;
|
|
341
|
+
fit?: ObjectFit;
|
|
342
|
+
poster?: string;
|
|
343
|
+
id?: string;
|
|
344
|
+
name?: string;
|
|
345
|
+
style?: SuperCSSProps;
|
|
346
|
+
persistAutoplay?: boolean;
|
|
347
|
+
fetchpriority?: "high" | "low" | "auto";
|
|
348
|
+
preload?: "none" | "metadata" | "auto";
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
declare const _default$a: React.MemoExoticComponent<({ src, title, type, controls, autoPlay, muted, loop, className, containerStyles, videoStyles, fit, poster, id, name, persistAutoplay, ...props }: VideoProps) => react_jsx_runtime.JSX.Element>;
|
|
352
|
+
|
|
353
|
+
interface BoxProps extends HTMLAttributes<HTMLDivElement> {
|
|
354
|
+
children: ReactNode;
|
|
355
|
+
$inline?: boolean;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
declare const _default$9: React.NamedExoticComponent<BoxProps>;
|
|
359
|
+
|
|
360
|
+
interface CenterProps extends HTMLAttributes<HTMLDivElement> {
|
|
361
|
+
children?: ReactNode;
|
|
362
|
+
$wsvg?: number;
|
|
363
|
+
[key: string]: unknown;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
declare const _default$8: React.NamedExoticComponent<CenterProps>;
|
|
367
|
+
|
|
368
|
+
type TextType = "link" | "strong" | "span" | "p" | "small";
|
|
369
|
+
interface TextProps extends HTMLAttributes<HTMLElement> {
|
|
370
|
+
$type?: TextType;
|
|
371
|
+
children?: ReactNode;
|
|
372
|
+
$hoverColor?: string;
|
|
373
|
+
[key: string]: any;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
declare const _default$7: React.NamedExoticComponent<TextProps>;
|
|
377
|
+
|
|
378
|
+
type TitleType = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
379
|
+
interface TitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
380
|
+
[key: `$${string}`]: any;
|
|
381
|
+
$type?: TitleType;
|
|
382
|
+
children?: ReactNode;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
declare const _default$6: React.NamedExoticComponent<TitleProps>;
|
|
386
|
+
|
|
387
|
+
declare const _default$5: React.NamedExoticComponent<SuperCSSProps>;
|
|
388
|
+
|
|
389
|
+
declare const _default$4: React.NamedExoticComponent<SuperCSSProps>;
|
|
390
|
+
|
|
391
|
+
type GridType = "inline" | "grid";
|
|
392
|
+
interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
393
|
+
children?: ReactNode;
|
|
394
|
+
type?: GridType | null;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
declare const _default$3: React.NamedExoticComponent<GridProps & SuperCSSProps>;
|
|
398
|
+
|
|
399
|
+
interface ColorProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "value"> {
|
|
400
|
+
color?: string;
|
|
401
|
+
value?: string | number;
|
|
402
|
+
getValue?: (value: string | number | undefined) => void;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
declare const _default$2: React.NamedExoticComponent<ColorProps>;
|
|
406
|
+
|
|
407
|
+
interface SlideProps extends HTMLAttributes<HTMLDivElement> {
|
|
408
|
+
children?: ReactNode;
|
|
409
|
+
height?: number | string;
|
|
410
|
+
autoPlay?: boolean;
|
|
411
|
+
autoPlayTime?: number;
|
|
412
|
+
hideControls?: boolean;
|
|
413
|
+
indicators?: boolean;
|
|
414
|
+
noOverflow?: boolean;
|
|
415
|
+
caption?: string;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
declare const _default$1: React.MemoExoticComponent<({ children, height, autoPlay, autoPlayTime, hideControls, indicators, noOverflow, caption, ...props }: SlideProps) => react_jsx_runtime.JSX.Element>;
|
|
419
|
+
|
|
420
|
+
declare const _default: React.NamedExoticComponent<SuperCSSProps>;
|
|
421
|
+
|
|
422
|
+
declare const IconWrapper: React.FC<WrapperProps & SuperCSSProps>;
|
|
423
|
+
declare const Icons: React.FC<IconsProps & SuperCSSProps>;
|
|
424
|
+
|
|
425
|
+
/** Información extendida de un archivo */
|
|
426
|
+
interface FileInfo {
|
|
427
|
+
/** Archivo original */
|
|
428
|
+
file: File;
|
|
429
|
+
/** ID único para el archivo */
|
|
430
|
+
id: string;
|
|
431
|
+
/** Nombre del archivo */
|
|
432
|
+
name: string;
|
|
433
|
+
/** Tamaño en bytes */
|
|
434
|
+
size: number;
|
|
435
|
+
/** Tamaño formateado (ej: "2.5 MB") */
|
|
436
|
+
sizeFormatted: string;
|
|
437
|
+
/** Tipo MIME */
|
|
438
|
+
type: string;
|
|
439
|
+
/** Extensión del archivo */
|
|
440
|
+
extension: string;
|
|
441
|
+
/** URL de preview (para imágenes) */
|
|
442
|
+
previewUrl?: string;
|
|
443
|
+
/** Fecha de última modificación */
|
|
444
|
+
lastModified: Date;
|
|
445
|
+
/** Estado de validación */
|
|
446
|
+
isValid: boolean;
|
|
447
|
+
/** Mensaje de error si no es válido */
|
|
448
|
+
errorMessage?: string;
|
|
449
|
+
}
|
|
450
|
+
/** Formatos de archivo permitidos */
|
|
451
|
+
type FileFormat = "pdf" | "jpg" | "jpeg" | "png" | "webp" | "*";
|
|
452
|
+
/** Props del componente FileUpload */
|
|
453
|
+
interface FileUploadProps extends SuperCSSProps {
|
|
454
|
+
/** Formatos permitidos */
|
|
455
|
+
accept?: FileFormat[];
|
|
456
|
+
/** Permitir múltiples archivos */
|
|
457
|
+
multiple?: boolean;
|
|
458
|
+
/** Tamaño máximo por archivo en bytes (default: 10MB) */
|
|
459
|
+
maxSize?: number;
|
|
460
|
+
/** Número máximo de archivos (solo aplica si multiple=true) */
|
|
461
|
+
maxFiles?: number;
|
|
462
|
+
/** Archivos actuales (controlado) */
|
|
463
|
+
files?: FileInfo[];
|
|
464
|
+
/** Callback cuando cambian los archivos */
|
|
465
|
+
onChange?: (files: FileInfo[]) => void;
|
|
466
|
+
/** Callback cuando hay error */
|
|
467
|
+
onError?: (error: string) => void;
|
|
468
|
+
/** Texto del placeholder */
|
|
469
|
+
placeholder?: string;
|
|
470
|
+
/** Texto secundario del placeholder */
|
|
471
|
+
placeholderSecondary?: string;
|
|
472
|
+
/** Deshabilitado */
|
|
473
|
+
disabled?: boolean;
|
|
474
|
+
/** Mostrar lista de archivos */
|
|
475
|
+
showFileList?: boolean;
|
|
476
|
+
/** Tema visual */
|
|
477
|
+
theme?: "default" | "compact" | "minimal";
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/** Componente FileUpload */
|
|
481
|
+
declare function FileUpload({ accept, multiple, maxSize, // 10MB default
|
|
482
|
+
maxFiles, files: controlledFiles, onChange, onError, placeholder, placeholderSecondary, disabled, showFileList, theme, ...props }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
483
|
+
|
|
484
|
+
export { _default$e as Alert, _default$c as Badge, _default$9 as Box, _default$g as Button, _default$f as ButtonIcon, _default$8 as Center, _default$i as CheckBox, _default$5 as Col, _default$2 as Color, _default$o as Container, _default as Dialog, Dropdown, FileUpload, _default$4 as Flex, _default$3 as Grid, IconWrapper, Icons, _default$b as Image, _default$k as Input, _default$j as InputHelper, _default$m as Loader, _default$l as Loading, _default$n as Modal, _default$h as Radio, CustomSelect as Select, _default$1 as Slide, _default$d as Svg, _default$7 as Text, _default$6 as Title, Tooltip, _default$a as Video, ViewerComponent as Viewer };
|
|
485
|
+
export type { FileFormat, FileInfo, FileUploadProps };
|