@grazziotin/react-components 1.0.0 → 1.0.2
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 +55 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +9 -0
- package/dist/components/Dialog/Dialog.stories.js +80 -0
- package/dist/components/Dialog/index.d.ts +12 -0
- package/dist/components/Dialog/index.js +10 -0
- package/dist/components/Filter/Filter.stories.d.ts +8 -0
- package/dist/components/Filter/Filter.stories.js +85 -0
- package/dist/components/Filter/components/FiltroCard.d.ts +3 -0
- package/dist/components/Filter/components/FiltroCard.js +13 -0
- package/dist/components/Filter/components/Filtros.d.ts +3 -0
- package/dist/components/Filter/components/Filtros.js +59 -0
- package/dist/components/Filter/components/InputSelect.d.ts +3 -0
- package/dist/components/Filter/components/InputSelect.js +13 -0
- package/dist/components/Filter/index.d.ts +10 -0
- package/dist/components/Filter/index.js +20 -0
- package/dist/components/Filter/utils/interface.d.ts +76 -0
- package/dist/components/Filter/utils/interface.js +1 -0
- package/dist/components/Inputs/Input/Input.stories.d.ts +13 -0
- package/dist/components/Inputs/Input/Input.stories.js +99 -0
- package/dist/components/Inputs/InputSelectMultiple/index.d.ts +22 -0
- package/dist/components/Inputs/InputSelectMultiple/index.js +38 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -2
- package/dist/index.js.LICENSE.txt +1 -20
- package/dist/theme.css +500 -0
- package/package.json +42 -165
- package/.editorconfig +0 -13
- package/.eslintignore +0 -3
- package/.eslintrc.json +0 -16
- package/.prettierrc +0 -6
- package/.vscode/settings.json +0 -18
- package/src/components/Inputs/Input/constants.ts +0 -25
- package/src/components/Inputs/Input/index.tsx +0 -94
- package/src/env.d.ts +0 -16
- package/src/functions/mascaras/index.ts +0 -432
- package/src/hooks/index.ts +0 -60
- package/src/index.tsx +0 -2
- package/src/lib/utils.ts +0 -6
- package/src/styles/sx.ts +0 -148
- package/tailwind.config.js +0 -234
- package/tsconfig.json +0 -37
- package/webpack.config.js +0 -32
package/package.json
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grazziotin/react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Biblioteca de componentes React em TypeScript desenvolvida para uso interno",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
7
11
|
"scripts": {
|
|
8
12
|
"build": "webpack",
|
|
13
|
+
"build:css": "npx @tailwindcss/cli -i src/theme.css -o dist/theme.css",
|
|
14
|
+
"build-storybook": "storybook build",
|
|
15
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
16
|
+
"storybook": "storybook dev -p 6006",
|
|
9
17
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
10
18
|
"tsc": "tsc -d",
|
|
11
|
-
"prepublishOnly": "npm run tsc && npm run build"
|
|
19
|
+
"prepublishOnly": "npm run tsc && npm run build && npm run build:css"
|
|
12
20
|
},
|
|
13
21
|
"repository": {
|
|
14
22
|
"type": "git",
|
|
@@ -19,13 +27,18 @@
|
|
|
19
27
|
"typescript",
|
|
20
28
|
"components",
|
|
21
29
|
"library",
|
|
22
|
-
"
|
|
30
|
+
"input",
|
|
31
|
+
"mui"
|
|
23
32
|
],
|
|
24
33
|
"author": "GrazziotinSA",
|
|
25
34
|
"contributors": [
|
|
26
35
|
{
|
|
27
36
|
"name": "Nicolas Ferreira",
|
|
28
37
|
"email": "nicolas.ferreira@grazziotin.com.br"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "Vinicius do Carmo Loeblein",
|
|
41
|
+
"email": "vinicius.carmo@grazziotin.com.br"
|
|
29
42
|
}
|
|
30
43
|
],
|
|
31
44
|
"license": "MIT",
|
|
@@ -36,165 +49,7 @@
|
|
|
36
49
|
"publishConfig": {
|
|
37
50
|
"registry": "https://registry.npmjs.org/"
|
|
38
51
|
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"@babel/core": "^7.16.0",
|
|
41
|
-
"@emotion/react": "^11.11.4",
|
|
42
|
-
"@emotion/styled": "^11.11.5",
|
|
43
|
-
"@ericblade/quagga2": "^1.8.2",
|
|
44
|
-
"@heroicons/react": "^2.0.13",
|
|
45
|
-
"@material-tailwind/react": "^2.1.9",
|
|
46
|
-
"@material-ui/core": "^4.12.4",
|
|
47
|
-
"@material-ui/icons": "^5.0.0-alpha.37",
|
|
48
|
-
"@mui/icons-material": "^5.14.18",
|
|
49
|
-
"@mui/material": "^5.15.18",
|
|
50
|
-
"@mui/styled-engine-sc": "^5.10.14",
|
|
51
|
-
"@mui/x-data-grid": "^5.17.12",
|
|
52
|
-
"@mui/x-date-pickers": "^5.0.15",
|
|
53
|
-
"@nivo/bar": "0.80.0",
|
|
54
|
-
"@nivo/bullet": "^0.80.0",
|
|
55
|
-
"@nivo/core": "^0.80.0",
|
|
56
|
-
"@nivo/pie": "0.80.0",
|
|
57
|
-
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
58
|
-
"@radix-ui/react-dialog": "^1.1.1",
|
|
59
|
-
"@reach/combobox": "^0.17.0",
|
|
60
|
-
"@reach/menu-button": "^0.17.0",
|
|
61
|
-
"@rollup/plugin-commonjs": "^26.0.1",
|
|
62
|
-
"@svgr/webpack": "^5.5.0",
|
|
63
|
-
"@tanstack/react-query": "^5.50.1",
|
|
64
|
-
"@tanstack/react-query-devtools": "^5.50.1",
|
|
65
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
66
|
-
"@testing-library/react": "^13.3.0",
|
|
67
|
-
"@testing-library/user-event": "^13.5.0",
|
|
68
|
-
"@types/pako": "^2.0.3",
|
|
69
|
-
"@types/react-color": "^3.0.12",
|
|
70
|
-
"@types/react-slick": "^0.23.13",
|
|
71
|
-
"@types/styled-components": "^5.1.26",
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
73
|
-
"@typescript-eslint/parser": "^6.10.0",
|
|
74
|
-
"@typescript-eslint/typescript-estree": "^6.10.0",
|
|
75
|
-
"@uriopass/nosleep.js": "^0.12.2",
|
|
76
|
-
"@vitejs/plugin-react": "^4.3.1",
|
|
77
|
-
"add": "^2.0.6",
|
|
78
|
-
"axios": "^1.6.1",
|
|
79
|
-
"babel-jest": "^27.4.2",
|
|
80
|
-
"babel-loader": "^8.2.3",
|
|
81
|
-
"babel-plugin-named-asset-import": "^0.3.8",
|
|
82
|
-
"babel-preset-react-app": "^10.0.1",
|
|
83
|
-
"balloon-css": "^1.2.0",
|
|
84
|
-
"bfj": "^7.0.2",
|
|
85
|
-
"body-parser": "^1.20.1",
|
|
86
|
-
"browserslist": "^4.18.1",
|
|
87
|
-
"camelcase": "^6.2.1",
|
|
88
|
-
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
89
|
-
"class-variance-authority": "^0.7.0",
|
|
90
|
-
"clsx": "^2.1.1",
|
|
91
|
-
"cors": "^2.8.5",
|
|
92
|
-
"crypto-js": "^4.1.1",
|
|
93
|
-
"css-loader": "^6.5.1",
|
|
94
|
-
"css-minimizer-webpack-plugin": "^3.2.0",
|
|
95
|
-
"dayjs": "^1.11.11",
|
|
96
|
-
"dotenv": "^16.0.3",
|
|
97
|
-
"dotenv-expand": "^5.1.0",
|
|
98
|
-
"eslint-config-react-app": "^7.0.1",
|
|
99
|
-
"eslint-plugin-react": "^7.32.2",
|
|
100
|
-
"eslint-webpack-plugin": "^4.0.1",
|
|
101
|
-
"exceljs": "^4.4.0",
|
|
102
|
-
"export-from-json": "^1.7.0",
|
|
103
|
-
"express": "^4.18.2",
|
|
104
|
-
"file-loader": "^6.2.0",
|
|
105
|
-
"flowbite": "^2.4.1",
|
|
106
|
-
"flowbite-react": "^0.10.1",
|
|
107
|
-
"formik": "^2.2.9",
|
|
108
|
-
"fs-extra": "^10.0.0",
|
|
109
|
-
"html-react-parser": "^5.0.6",
|
|
110
|
-
"html-webpack-plugin": "^5.5.0",
|
|
111
|
-
"identity-obj-proxy": "^3.0.0",
|
|
112
|
-
"immer": "^10.1.1",
|
|
113
|
-
"install": "^0.13.0",
|
|
114
|
-
"jest": "^27.4.3",
|
|
115
|
-
"jest-resolve": "^27.4.2",
|
|
116
|
-
"jest-watch-typeahead": "^1.0.0",
|
|
117
|
-
"jquery": "^3.6.1",
|
|
118
|
-
"js-cookie": "^3.0.5",
|
|
119
|
-
"less": "^3.9.0",
|
|
120
|
-
"less-loader": "^11.0.0",
|
|
121
|
-
"lottie-react": "^2.4.0",
|
|
122
|
-
"lucide-react": "^0.397.0",
|
|
123
|
-
"material-icons": "^1.13.12",
|
|
124
|
-
"mini-css-extract-plugin": "^2.4.5",
|
|
125
|
-
"moment": "^2.29.4",
|
|
126
|
-
"nodemailer": "^6.8.0",
|
|
127
|
-
"pako": "^2.1.0",
|
|
128
|
-
"postcss": "^8.4.31",
|
|
129
|
-
"postcss-flexbugs-fixes": "^5.0.2",
|
|
130
|
-
"postcss-loader": "^6.2.1",
|
|
131
|
-
"postcss-normalize": "^10.0.1",
|
|
132
|
-
"postcss-preset-env": "^7.0.1",
|
|
133
|
-
"prettier": "^3.1.0",
|
|
134
|
-
"prompts": "^2.4.2",
|
|
135
|
-
"prop-types": "^15.8.1",
|
|
136
|
-
"quagga": "^0.12.1",
|
|
137
|
-
"react": "^18.3.1",
|
|
138
|
-
"react-app-polyfill": "^3.0.0",
|
|
139
|
-
"react-awesome-lightbox": "^1.8.1",
|
|
140
|
-
"react-balloon-tooltip": "^1.0.4",
|
|
141
|
-
"react-color": "^2.19.3",
|
|
142
|
-
"react-data-table-component": "^7.6.2",
|
|
143
|
-
"react-datepicker": "^4.16.0",
|
|
144
|
-
"react-dev-utils": "^12.0.1",
|
|
145
|
-
"react-dimmer": "^1.0.7",
|
|
146
|
-
"react-dom": "^18.2.0",
|
|
147
|
-
"react-draggable": "^4.4.5",
|
|
148
|
-
"react-dropdown": "^1.10.0",
|
|
149
|
-
"react-dropzone": "^14.2.3",
|
|
150
|
-
"react-google-recaptcha-v3": "^1.10.1",
|
|
151
|
-
"react-hook-form": "^7.43.0",
|
|
152
|
-
"react-jss": "^10.10.0",
|
|
153
|
-
"react-markdown": "^9.0.1",
|
|
154
|
-
"react-modal": "^3.15.1",
|
|
155
|
-
"react-number-format": "^5.3.0",
|
|
156
|
-
"react-onesignal": "^3.0.1",
|
|
157
|
-
"react-pro-sidebar": "^1.1.0-alpha.1",
|
|
158
|
-
"react-query": "^3.39.3",
|
|
159
|
-
"react-query-devtools": "^2.6.3",
|
|
160
|
-
"react-refresh": "^0.14.0",
|
|
161
|
-
"react-router-dom": "^6.7.0",
|
|
162
|
-
"react-say": "^2.1.0",
|
|
163
|
-
"react-simple-chatbot": "^0.6.1",
|
|
164
|
-
"react-slick": "^0.29.0",
|
|
165
|
-
"react-speech": "^1.0.2",
|
|
166
|
-
"react-tailwindcss-datepicker": "^1.6.6",
|
|
167
|
-
"react-toastify": "^10.0.5",
|
|
168
|
-
"react-webcam": "^7.1.1",
|
|
169
|
-
"resolve": "^1.20.0",
|
|
170
|
-
"resolve-url-loader": "^4.0.0",
|
|
171
|
-
"sass-loader": "^12.3.0",
|
|
172
|
-
"semver": "^7.3.5",
|
|
173
|
-
"slick-carousel": "^1.8.1",
|
|
174
|
-
"socket.io-client": "^4.7.5",
|
|
175
|
-
"source-map-loader": "^3.0.0",
|
|
176
|
-
"style-loader": "^3.3.1",
|
|
177
|
-
"styled-components": "^5.3.8",
|
|
178
|
-
"tailwind-merge": "^2.3.0",
|
|
179
|
-
"tailwindcss": "^3.3.5",
|
|
180
|
-
"tailwindcss-animate": "^1.0.7",
|
|
181
|
-
"terser-webpack-plugin": "^5.2.5",
|
|
182
|
-
"tw-elements": "^2.0.0",
|
|
183
|
-
"tw-elements-react": "^1.0.0-alpha-end",
|
|
184
|
-
"use-immer": "^0.9.0",
|
|
185
|
-
"use-scan-detection": "^0.2.3",
|
|
186
|
-
"uuid": "^9.0.1",
|
|
187
|
-
"vaul": "^0.9.1",
|
|
188
|
-
"vite": "^5.3.4",
|
|
189
|
-
"vite-plugin-commonjs": "^0.10.1",
|
|
190
|
-
"vite-plugin-pwa": "^0.20.0",
|
|
191
|
-
"web-speech-cognitive-services": "^7.1.3",
|
|
192
|
-
"web-vitals": "^4.0.1",
|
|
193
|
-
"webpack-dev-server": "^4.6.0",
|
|
194
|
-
"webpack-manifest-plugin": "^4.0.2",
|
|
195
|
-
"workbox-webpack-plugin": "^6.4.1",
|
|
196
|
-
"yarn": "^1.22.19"
|
|
197
|
-
},
|
|
52
|
+
"dependencies": {},
|
|
198
53
|
"peerDependencies": {
|
|
199
54
|
"react": ">=17.0.0",
|
|
200
55
|
"react-dom": ">=17.0.0",
|
|
@@ -202,14 +57,36 @@
|
|
|
202
57
|
"@mui/icons-material": ">=5.0.0"
|
|
203
58
|
},
|
|
204
59
|
"devDependencies": {
|
|
205
|
-
"@
|
|
206
|
-
"@
|
|
60
|
+
"@mui/icons-material": "^5.14.18",
|
|
61
|
+
"@mui/material": "^5.15.18",
|
|
62
|
+
"@rocketseat/eslint-config": "^2.2.2",
|
|
63
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
64
|
+
"@storybook/addon-interactions": "^8.6.14",
|
|
65
|
+
"@storybook/blocks": "^8.6.14",
|
|
66
|
+
"@storybook/react": "^8.6.15",
|
|
67
|
+
"@storybook/react-vite": "^8.6.15",
|
|
68
|
+
"@storybook/test": "^8.6.15",
|
|
69
|
+
"@tailwindcss/cli": "^4.0.0",
|
|
70
|
+
"@tailwindcss/postcss": "^4.0.0",
|
|
71
|
+
"@tanstack/eslint-plugin-query": "^5.28.0",
|
|
207
72
|
"@types/node": "^20.14.11",
|
|
208
73
|
"@types/react": "^17.0.0",
|
|
209
74
|
"@types/react-dom": "^17.0.0",
|
|
210
|
-
"@
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
76
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
77
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
78
|
+
"eslint": "^8.57.0",
|
|
79
|
+
"eslint-plugin-react": "^7.33.2",
|
|
80
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
81
|
+
"postcss": "^8.4.0",
|
|
82
|
+
"react": "^19.2.4",
|
|
83
|
+
"react-dom": "^19.2.4",
|
|
84
|
+
"storybook": "^8.6.15",
|
|
85
|
+
"tailwind-merge": "^2.3.0",
|
|
86
|
+
"tailwindcss": "^4.0.0",
|
|
211
87
|
"ts-loader": "^8.0.0",
|
|
212
88
|
"typescript": "^5.1.3",
|
|
89
|
+
"vite": "^5.4.21",
|
|
213
90
|
"webpack": "^5.0.0",
|
|
214
91
|
"webpack-cli": "^4.0.0"
|
|
215
92
|
}
|
package/.editorconfig
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# EditorConfig is awesome: https://EditorConfig.org
|
|
2
|
-
|
|
3
|
-
# top-most EditorConfig file
|
|
4
|
-
root = true
|
|
5
|
-
|
|
6
|
-
[*]
|
|
7
|
-
indent_style = space
|
|
8
|
-
indent_size = 2
|
|
9
|
-
insert_final_newline = true
|
|
10
|
-
end_of_line = crlf
|
|
11
|
-
charset = utf-8
|
|
12
|
-
trim_trailing_whitespace = false
|
|
13
|
-
insert_final_newline = false
|
package/.eslintignore
DELETED
package/.eslintrc.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"plugins": [
|
|
3
|
-
"@tanstack/query"
|
|
4
|
-
],
|
|
5
|
-
"extends": [
|
|
6
|
-
"@rocketseat/eslint-config/react",
|
|
7
|
-
"plugin:@tanstack/eslint-plugin-query/recommended"
|
|
8
|
-
],
|
|
9
|
-
"rules": {
|
|
10
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
11
|
-
"@typescript-eslint/no-unused-vars": "warn",
|
|
12
|
-
"@tanstack/query/exhaustive-deps": "warn",
|
|
13
|
-
"@tanstack/query/no-rest-destructuring": "warn",
|
|
14
|
-
"@tanstack/query/stable-query-client": "warn"
|
|
15
|
-
}
|
|
16
|
-
}
|
package/.prettierrc
DELETED
package/.vscode/settings.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"editor.tabSize": 2,
|
|
3
|
-
"files.eol": "\r\n",
|
|
4
|
-
"workbench.colorCustomizations": {
|
|
5
|
-
"activityBar.background": "#6a1b9a",
|
|
6
|
-
"titleBar.activeBackground": "#6a1b9a",
|
|
7
|
-
"titleBar.inactiveBackground": "#6a1b9a",
|
|
8
|
-
"titleBar.activeForeground": "#ffffff"
|
|
9
|
-
},
|
|
10
|
-
"eslint.format.enable": true,
|
|
11
|
-
"[typescriptreact]": {
|
|
12
|
-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
13
|
-
},
|
|
14
|
-
"editor.formatOnSave": true,
|
|
15
|
-
"[typescript]": {
|
|
16
|
-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export type InputPropsCustomTypes =
|
|
2
|
-
| 'button'
|
|
3
|
-
| 'checkbox'
|
|
4
|
-
| 'color'
|
|
5
|
-
| 'date'
|
|
6
|
-
| 'datetime-local'
|
|
7
|
-
| 'email'
|
|
8
|
-
| 'file'
|
|
9
|
-
| 'hidden'
|
|
10
|
-
| 'image'
|
|
11
|
-
| 'month'
|
|
12
|
-
| 'number'
|
|
13
|
-
| 'password'
|
|
14
|
-
| 'radio'
|
|
15
|
-
| 'range'
|
|
16
|
-
| 'reset'
|
|
17
|
-
| 'search'
|
|
18
|
-
| 'submit'
|
|
19
|
-
| 'tel'
|
|
20
|
-
| 'text'
|
|
21
|
-
| 'time'
|
|
22
|
-
| 'url'
|
|
23
|
-
| 'week'
|
|
24
|
-
| 'float'
|
|
25
|
-
| 'real'
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import { TextField, TextFieldProps, ThemeProvider } from '@mui/material'
|
|
3
|
-
import { sx, standard, theme } from 'src/styles/sx'
|
|
4
|
-
import CameraAltIcon from '@mui/icons-material/CameraAlt'
|
|
5
|
-
import InputAdornment from '@mui/material/InputAdornment'
|
|
6
|
-
import { cn } from 'src/lib/utils'
|
|
7
|
-
import { InputPropsCustomTypes } from './constants'
|
|
8
|
-
import { limitDecimais, mascaradorInputMoeda } from 'src/functions/mascaras'
|
|
9
|
-
|
|
10
|
-
export type InputProps = TextFieldProps & {
|
|
11
|
-
shrink?: boolean
|
|
12
|
-
readOnly?: boolean
|
|
13
|
-
xs?: number
|
|
14
|
-
onKeyEnter?: () => void
|
|
15
|
-
order?: number
|
|
16
|
-
render?: boolean
|
|
17
|
-
qtdSolicitada?: number
|
|
18
|
-
qtdSeparada?: number
|
|
19
|
-
onQtdSeparadaChange?: (newValue: number) => void
|
|
20
|
-
type?: InputPropsCustomTypes
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Input personalizado Mui
|
|
25
|
-
* @version 2.0.1
|
|
26
|
-
* @ViniciusCLoeblein
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
export default function Input({
|
|
30
|
-
shrink,
|
|
31
|
-
readOnly,
|
|
32
|
-
onKeyEnter,
|
|
33
|
-
size = 'small',
|
|
34
|
-
type = 'text',
|
|
35
|
-
...rest
|
|
36
|
-
}: Readonly<InputProps>) {
|
|
37
|
-
function onEnter(e: any) {
|
|
38
|
-
if (e.key === 'Enter' && onKeyEnter) {
|
|
39
|
-
onKeyEnter()
|
|
40
|
-
}
|
|
41
|
-
rest.onKeyDown && rest.onKeyDown(e)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
45
|
-
let value = e.target.value
|
|
46
|
-
|
|
47
|
-
if (['real', 'float'].includes(type)) {
|
|
48
|
-
value = value.replace(',', '.')
|
|
49
|
-
|
|
50
|
-
if (type === 'real') {
|
|
51
|
-
value = mascaradorInputMoeda(value)
|
|
52
|
-
} else {
|
|
53
|
-
value = limitDecimais(value, 8)
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
rest.onChange &&
|
|
58
|
-
rest.onChange({
|
|
59
|
-
...e,
|
|
60
|
-
target: {
|
|
61
|
-
...e.target,
|
|
62
|
-
value,
|
|
63
|
-
},
|
|
64
|
-
})
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
let InputProps: any = { readOnly, ...rest.InputProps }
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<ThemeProvider theme={theme}>
|
|
71
|
-
<TextField
|
|
72
|
-
{...rest}
|
|
73
|
-
sx={rest.variant === 'standard' ? standard : sx}
|
|
74
|
-
onKeyDown={onEnter}
|
|
75
|
-
InputLabelProps={{
|
|
76
|
-
...rest.InputLabelProps,
|
|
77
|
-
shrink,
|
|
78
|
-
}}
|
|
79
|
-
InputProps={InputProps}
|
|
80
|
-
size={size}
|
|
81
|
-
className={cn('select-none', rest.className)}
|
|
82
|
-
type={['real', 'float'].includes(type) ? 'text' : type}
|
|
83
|
-
onChange={handleChange}
|
|
84
|
-
inputProps={{
|
|
85
|
-
...rest.inputProps,
|
|
86
|
-
step:
|
|
87
|
-
(type === 'real' && '0.01') ||
|
|
88
|
-
(type === 'float' && '0.0000001') ||
|
|
89
|
-
'1',
|
|
90
|
-
}}
|
|
91
|
-
/>
|
|
92
|
-
</ThemeProvider>
|
|
93
|
-
)
|
|
94
|
-
}
|
package/src/env.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare namespace NodeJS {
|
|
2
|
-
interface ProcessEnv {
|
|
3
|
-
readonly VITE_SECRET_USER_LOGIN: string
|
|
4
|
-
readonly VITE_HOSTNAME_API: string
|
|
5
|
-
readonly VITE_HOSTNAME_SOCKET: string
|
|
6
|
-
readonly VITE_HOSTNAME_API_GRAZZILABS: string
|
|
7
|
-
readonly VITE_ID_CLIENT: string
|
|
8
|
-
readonly VITE_SECRET_CLIENT: string
|
|
9
|
-
readonly VITE_ENVIRONMENT: string
|
|
10
|
-
readonly VITE_NOTIFICATION_ID_PRD: string
|
|
11
|
-
readonly VITE_NOTIFICATION_ID_STG: string
|
|
12
|
-
readonly VITE_NOTIFICATION_ID_LOCAL: string
|
|
13
|
-
readonly VITE_KEY_RECAPTCHA: string
|
|
14
|
-
readonly VITE_KEY_SECRET_CRYPT: string
|
|
15
|
-
}
|
|
16
|
-
}
|