componentes-sinco 1.0.1-rc.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 +50 -0
- package/dist/index.d.mts +101 -0
- package/dist/index.d.ts +101 -0
- package/dist/index.js +735 -0
- package/dist/index.mjs +696 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
+
|
|
10
|
+
## Expanding the ESLint configuration
|
|
11
|
+
|
|
12
|
+
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
|
|
13
|
+
|
|
14
|
+
- Configure the top-level `parserOptions` property like this:
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
export default tseslint.config({
|
|
18
|
+
languageOptions: {
|
|
19
|
+
// other options...
|
|
20
|
+
parserOptions: {
|
|
21
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
22
|
+
tsconfigRootDir: import.meta.dirname,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
|
|
29
|
+
- Optionally add `...tseslint.configs.stylisticTypeChecked`
|
|
30
|
+
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
// eslint.config.js
|
|
34
|
+
import react from 'eslint-plugin-react'
|
|
35
|
+
|
|
36
|
+
export default tseslint.config({
|
|
37
|
+
// Set the react version
|
|
38
|
+
settings: { react: { version: '18.3' } },
|
|
39
|
+
plugins: {
|
|
40
|
+
// Add the react plugin
|
|
41
|
+
react,
|
|
42
|
+
},
|
|
43
|
+
rules: {
|
|
44
|
+
// other rules...
|
|
45
|
+
// Enable its recommended rules
|
|
46
|
+
...react.configs.recommended.rules,
|
|
47
|
+
...react.configs['jsx-runtime'].rules,
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
```
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React$1 from 'react';
|
|
2
|
+
import * as Muicon from '@mui/icons-material';
|
|
3
|
+
|
|
4
|
+
type ReplyPalette = "primary" | "secondary" | "warning" | "info" | "success" | "error";
|
|
5
|
+
type ReplyTextPalette$1 = "primary" | "secondary" | "disabled";
|
|
6
|
+
type ReplyVariants$1 = "outlined" | "filled" | "standard";
|
|
7
|
+
|
|
8
|
+
interface SCTextFieldProps {
|
|
9
|
+
title?: string;
|
|
10
|
+
iconTitle?: string;
|
|
11
|
+
infoTitle?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
color?: ReplyPalette;
|
|
15
|
+
width?: string;
|
|
16
|
+
background?: string;
|
|
17
|
+
format?: string;
|
|
18
|
+
iconInputStart?: string;
|
|
19
|
+
iconInputEnd?: string;
|
|
20
|
+
infoElement?: string;
|
|
21
|
+
size?: "small" | "medium";
|
|
22
|
+
variant?: "outlined" | "filled" | "standard";
|
|
23
|
+
value: string | any;
|
|
24
|
+
maxLength?: number;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
required?: boolean;
|
|
27
|
+
state?: React$1.Dispatch<React$1.SetStateAction<string>>;
|
|
28
|
+
onChange?: (event: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
29
|
+
onBlur?: (event: React$1.FocusEvent<HTMLInputElement>) => void;
|
|
30
|
+
onKeyDown?: (event: React$1.KeyboardEvent<HTMLInputElement>) => void;
|
|
31
|
+
}
|
|
32
|
+
declare const SCTextField: ({ label, placeholder, width, variant, color, disabled, required, maxLength, background, size, format, title, iconTitle, infoTitle, iconInputStart, iconInputEnd, infoElement, value, state, onChange, onBlur, onKeyDown, }: SCTextFieldProps) => React$1.JSX.Element;
|
|
33
|
+
|
|
34
|
+
interface ArrayElement {
|
|
35
|
+
title?: string;
|
|
36
|
+
iconTitle?: keyof typeof Muicon;
|
|
37
|
+
infoTitle?: string;
|
|
38
|
+
placeholder?: string;
|
|
39
|
+
name?: string;
|
|
40
|
+
infoElement?: string;
|
|
41
|
+
iconInputStart?: string;
|
|
42
|
+
iconInputEnd?: string;
|
|
43
|
+
component?: React.ReactNode;
|
|
44
|
+
required?: boolean;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
value?: string;
|
|
47
|
+
maxLength?: number;
|
|
48
|
+
rows?: number;
|
|
49
|
+
width?: string;
|
|
50
|
+
background?: string;
|
|
51
|
+
variant?: ReplyVariants$1;
|
|
52
|
+
size?: 'small' | 'medium';
|
|
53
|
+
type?: 'text' | 'textArea';
|
|
54
|
+
onChange?: () => {};
|
|
55
|
+
onBlur?: () => {};
|
|
56
|
+
state?: React.Dispatch<React.SetStateAction<string>>;
|
|
57
|
+
}
|
|
58
|
+
interface DrawerProps {
|
|
59
|
+
colorTitle?: ReplyTextPalette$1 | ReplyPalette | string;
|
|
60
|
+
buttonColor?: ReplyPalette;
|
|
61
|
+
iconPosition?: 'left' | 'right';
|
|
62
|
+
anchor?: "left" | "right";
|
|
63
|
+
title?: string;
|
|
64
|
+
width?: string;
|
|
65
|
+
iconButton?: string;
|
|
66
|
+
textButton?: string;
|
|
67
|
+
open: boolean;
|
|
68
|
+
arrayElements?: ArrayElement[];
|
|
69
|
+
actions?: {
|
|
70
|
+
text: string;
|
|
71
|
+
fn: () => void;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
}[];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare const SCDrawer: ({ title, colorTitle, textButton, iconButton, buttonColor, anchor, iconPosition, width, open, arrayElements, actions, }: DrawerProps) => React$1.JSX.Element;
|
|
77
|
+
|
|
78
|
+
type ReplyTextPalette = "primary" | "secondary" | "disabled";
|
|
79
|
+
type ReplyVariants = "outlined" | "filled" | "standard";
|
|
80
|
+
|
|
81
|
+
interface SCTextAreaProps {
|
|
82
|
+
title?: string;
|
|
83
|
+
iconTitle?: keyof typeof Muicon;
|
|
84
|
+
infoTitle?: string;
|
|
85
|
+
colorTitle?: ReplyTextPalette;
|
|
86
|
+
placeholder?: string;
|
|
87
|
+
label?: string;
|
|
88
|
+
width?: string;
|
|
89
|
+
required?: boolean;
|
|
90
|
+
background?: string;
|
|
91
|
+
variant?: ReplyVariants;
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
rows?: number;
|
|
94
|
+
maxLength?: number;
|
|
95
|
+
value: string;
|
|
96
|
+
state?: React$1.Dispatch<React$1.SetStateAction<string>>;
|
|
97
|
+
onBlur?: (event: React$1.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
98
|
+
}
|
|
99
|
+
declare const SCTextArea: ({ title, infoTitle, colorTitle, iconTitle, placeholder, label, variant, required, disabled, width, rows, maxLength, value, state, onBlur, }: SCTextAreaProps) => React$1.JSX.Element;
|
|
100
|
+
|
|
101
|
+
export { SCDrawer, SCTextArea, type SCTextAreaProps, SCTextField };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React$1 from 'react';
|
|
2
|
+
import * as Muicon from '@mui/icons-material';
|
|
3
|
+
|
|
4
|
+
type ReplyPalette = "primary" | "secondary" | "warning" | "info" | "success" | "error";
|
|
5
|
+
type ReplyTextPalette$1 = "primary" | "secondary" | "disabled";
|
|
6
|
+
type ReplyVariants$1 = "outlined" | "filled" | "standard";
|
|
7
|
+
|
|
8
|
+
interface SCTextFieldProps {
|
|
9
|
+
title?: string;
|
|
10
|
+
iconTitle?: string;
|
|
11
|
+
infoTitle?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
color?: ReplyPalette;
|
|
15
|
+
width?: string;
|
|
16
|
+
background?: string;
|
|
17
|
+
format?: string;
|
|
18
|
+
iconInputStart?: string;
|
|
19
|
+
iconInputEnd?: string;
|
|
20
|
+
infoElement?: string;
|
|
21
|
+
size?: "small" | "medium";
|
|
22
|
+
variant?: "outlined" | "filled" | "standard";
|
|
23
|
+
value: string | any;
|
|
24
|
+
maxLength?: number;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
required?: boolean;
|
|
27
|
+
state?: React$1.Dispatch<React$1.SetStateAction<string>>;
|
|
28
|
+
onChange?: (event: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
29
|
+
onBlur?: (event: React$1.FocusEvent<HTMLInputElement>) => void;
|
|
30
|
+
onKeyDown?: (event: React$1.KeyboardEvent<HTMLInputElement>) => void;
|
|
31
|
+
}
|
|
32
|
+
declare const SCTextField: ({ label, placeholder, width, variant, color, disabled, required, maxLength, background, size, format, title, iconTitle, infoTitle, iconInputStart, iconInputEnd, infoElement, value, state, onChange, onBlur, onKeyDown, }: SCTextFieldProps) => React$1.JSX.Element;
|
|
33
|
+
|
|
34
|
+
interface ArrayElement {
|
|
35
|
+
title?: string;
|
|
36
|
+
iconTitle?: keyof typeof Muicon;
|
|
37
|
+
infoTitle?: string;
|
|
38
|
+
placeholder?: string;
|
|
39
|
+
name?: string;
|
|
40
|
+
infoElement?: string;
|
|
41
|
+
iconInputStart?: string;
|
|
42
|
+
iconInputEnd?: string;
|
|
43
|
+
component?: React.ReactNode;
|
|
44
|
+
required?: boolean;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
value?: string;
|
|
47
|
+
maxLength?: number;
|
|
48
|
+
rows?: number;
|
|
49
|
+
width?: string;
|
|
50
|
+
background?: string;
|
|
51
|
+
variant?: ReplyVariants$1;
|
|
52
|
+
size?: 'small' | 'medium';
|
|
53
|
+
type?: 'text' | 'textArea';
|
|
54
|
+
onChange?: () => {};
|
|
55
|
+
onBlur?: () => {};
|
|
56
|
+
state?: React.Dispatch<React.SetStateAction<string>>;
|
|
57
|
+
}
|
|
58
|
+
interface DrawerProps {
|
|
59
|
+
colorTitle?: ReplyTextPalette$1 | ReplyPalette | string;
|
|
60
|
+
buttonColor?: ReplyPalette;
|
|
61
|
+
iconPosition?: 'left' | 'right';
|
|
62
|
+
anchor?: "left" | "right";
|
|
63
|
+
title?: string;
|
|
64
|
+
width?: string;
|
|
65
|
+
iconButton?: string;
|
|
66
|
+
textButton?: string;
|
|
67
|
+
open: boolean;
|
|
68
|
+
arrayElements?: ArrayElement[];
|
|
69
|
+
actions?: {
|
|
70
|
+
text: string;
|
|
71
|
+
fn: () => void;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
}[];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare const SCDrawer: ({ title, colorTitle, textButton, iconButton, buttonColor, anchor, iconPosition, width, open, arrayElements, actions, }: DrawerProps) => React$1.JSX.Element;
|
|
77
|
+
|
|
78
|
+
type ReplyTextPalette = "primary" | "secondary" | "disabled";
|
|
79
|
+
type ReplyVariants = "outlined" | "filled" | "standard";
|
|
80
|
+
|
|
81
|
+
interface SCTextAreaProps {
|
|
82
|
+
title?: string;
|
|
83
|
+
iconTitle?: keyof typeof Muicon;
|
|
84
|
+
infoTitle?: string;
|
|
85
|
+
colorTitle?: ReplyTextPalette;
|
|
86
|
+
placeholder?: string;
|
|
87
|
+
label?: string;
|
|
88
|
+
width?: string;
|
|
89
|
+
required?: boolean;
|
|
90
|
+
background?: string;
|
|
91
|
+
variant?: ReplyVariants;
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
rows?: number;
|
|
94
|
+
maxLength?: number;
|
|
95
|
+
value: string;
|
|
96
|
+
state?: React$1.Dispatch<React$1.SetStateAction<string>>;
|
|
97
|
+
onBlur?: (event: React$1.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
98
|
+
}
|
|
99
|
+
declare const SCTextArea: ({ title, infoTitle, colorTitle, iconTitle, placeholder, label, variant, required, disabled, width, rows, maxLength, value, state, onBlur, }: SCTextAreaProps) => React$1.JSX.Element;
|
|
100
|
+
|
|
101
|
+
export { SCDrawer, SCTextArea, type SCTextAreaProps, SCTextField };
|