react-restyle-components 0.2.67 → 0.2.69
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/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/package.json +2 -2
- package/lib/src/core-components/atoms/icons/icons.component.d.ts.map +1 -1
- package/lib/src/core-components/atoms/icons/icons.component.js +52 -10
- package/lib/src/core-components/atoms/loader/loader.component.d.ts +5 -2
- package/lib/src/core-components/atoms/loader/loader.component.d.ts.map +1 -1
- package/lib/src/core-components/atoms/loader/loader.component.js +3 -37
- package/lib/src/core-components/index.d.ts.map +1 -1
- package/lib/src/core-components/molecules/modal-confirm/modal-confirm.component.d.ts +1 -2
- package/lib/src/core-components/molecules/modal-confirm/modal-confirm.component.d.ts.map +1 -1
- package/lib/src/index.css +8 -0
- package/lib/src/tc.module.css +7 -1
- package/package.json +2 -2
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,cAAc,uBAAuB,CAAC"}
|
package/lib/index.js
CHANGED
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-restyle-components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.68",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easy use restyle components",
|
|
6
6
|
"author": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"jest-environment-jsdom": "^29.7.0",
|
|
56
56
|
"react-colorful": "^5.6.1",
|
|
57
57
|
"react-datepicker": "^4.7.0",
|
|
58
|
-
"react-icons": "^5.
|
|
58
|
+
"react-icons": "^5.5.0",
|
|
59
59
|
"react-scripts": "5.0.1",
|
|
60
60
|
"reactstrap": "^9.0.2",
|
|
61
61
|
"tailwind-merge": "^2.5.5",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.component.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAI9C,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,IAAI,0DAMd,SAAS,KAAG,
|
|
1
|
+
{"version":3,"file":"icons.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.component.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAI9C,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,IAAI,0DAMd,SAAS,KAAG,WAqFd,CAAC"}
|
|
@@ -9,21 +9,63 @@ export const Icon = ({ nameIcon, propsIcon, tooltip = '', isDisable = false, onC
|
|
|
9
9
|
try {
|
|
10
10
|
const iconProps = {
|
|
11
11
|
...propsIcon,
|
|
12
|
-
color: isDisable ? '#808080' : propsIcon?.color || '
|
|
12
|
+
color: isDisable ? '#808080' : propsIcon?.color || 'rgb(36 48 63)',
|
|
13
13
|
};
|
|
14
14
|
const lib = nameIcon
|
|
15
15
|
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
16
16
|
.split(' ')[0]
|
|
17
17
|
.toLocaleLowerCase();
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
const iconLibraries = {
|
|
19
|
+
fa: () => import('react-icons/fa'),
|
|
20
|
+
md: () => import('react-icons/md'),
|
|
21
|
+
io: () => import('react-icons/io'),
|
|
22
|
+
fi: () => import('react-icons/fi'),
|
|
23
|
+
bs: () => import('react-icons/bs'),
|
|
24
|
+
hi: () => import('react-icons/hi'),
|
|
25
|
+
go: () => import('react-icons/go'),
|
|
26
|
+
si: () => import('react-icons/si'),
|
|
27
|
+
ti: () => import('react-icons/ti'),
|
|
28
|
+
wi: () => import('react-icons/wi'),
|
|
29
|
+
di: () => import('react-icons/di'),
|
|
30
|
+
ri: () => import('react-icons/ri'),
|
|
31
|
+
fc: () => import('react-icons/fc'),
|
|
32
|
+
gr: () => import('react-icons/gr'),
|
|
33
|
+
lu: () => import('react-icons/lu'),
|
|
34
|
+
gi: () => import('react-icons/gi'),
|
|
35
|
+
tb: () => import('react-icons/tb'),
|
|
36
|
+
rx: () => import('react-icons/rx'),
|
|
37
|
+
im: () => import('react-icons/im'),
|
|
38
|
+
cg: () => import('react-icons/cg'),
|
|
39
|
+
io5: () => import('react-icons/io5'),
|
|
40
|
+
ai: () => import('react-icons/ai'),
|
|
41
|
+
vsc: () => import('react-icons/vsc'),
|
|
42
|
+
bi: () => import('react-icons/bi'),
|
|
43
|
+
fa2: () => import('react-icons/fa'),
|
|
44
|
+
ci: () => import('react-icons/ci'),
|
|
45
|
+
lib: () => import('react-icons/lib'),
|
|
46
|
+
lia: () => import('react-icons/lia'),
|
|
47
|
+
};
|
|
48
|
+
const loadLibrary = iconLibraries[lib] || (() => import('react-icons/md'));
|
|
49
|
+
const ElementIcon = loadable(loadLibrary, {
|
|
50
|
+
resolveComponent: (el) => el[nameIcon] != null ? el[nameIcon] : el[Object.keys(el.default)[0]],
|
|
51
|
+
});
|
|
52
|
+
console.log({ lib });
|
|
53
|
+
// let ElementIcon: any;
|
|
54
|
+
// if (lib == 'md')
|
|
55
|
+
// ElementIcon = loadable(() => import('react-icons/md'), {
|
|
56
|
+
// resolveComponent: (el) =>
|
|
57
|
+
// el[nameIcon] != null ? el[nameIcon] : el[Object.keys(el.default)[0]],
|
|
58
|
+
// });
|
|
59
|
+
// else if (lib == 'lia')
|
|
60
|
+
// ElementIcon = loadable(() => import('react-icons/lia'), {
|
|
61
|
+
// resolveComponent: (el) =>
|
|
62
|
+
// el[nameIcon] != null ? el[nameIcon] : el[Object.keys(el.default)[0]],
|
|
63
|
+
// });
|
|
64
|
+
// else
|
|
65
|
+
// ElementIcon = loadable(() => import('react-icons/fa'), {
|
|
66
|
+
// resolveComponent: (el) =>
|
|
67
|
+
// el[nameIcon] != null ? el[nameIcon] : el[Object.keys(el.default)[0]],
|
|
68
|
+
// });
|
|
27
69
|
return (_jsx("div", { className: cn(s.iconContainer), onClick: () => {
|
|
28
70
|
if (!isDisable)
|
|
29
71
|
onClick && onClick();
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export interface LoadingAnimateSpinProps {
|
|
2
|
+
classWarper?: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const LoadingAnimateSpin: ({ classWarper, className, }: LoadingAnimateSpinProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
6
|
//# sourceMappingURL=loader.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/loader/loader.component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/loader/loader.component.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,uBAAuB;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB,gCAG5B,uBAAuB,4CAwBzB,CAAC"}
|
|
@@ -1,40 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import { Container, Row, Spinner } from 'reactstrap';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
2
|
import s from '../../../tc.module.css';
|
|
4
3
|
import { cn } from '../../../core-utils';
|
|
5
|
-
export const
|
|
6
|
-
|
|
7
|
-
return (_jsx(_Fragment, { children: _jsxs(_Fragment, { children: [_jsx("div", { className: cn(s['justify-center'], s['items-center'], s['flex'], s['overflow-x-hidden'], s['overflow-y-auto'], s['fixed'], s['inset-0'], s['z-50'], s['outline-none'], s['focus:outline-none']), children: _jsx("div", { className: cn(s['relative'], s['mx-auto']), children: _jsx("div", { className: cn(s['border-0'], s['rounded-lg'], s['shadow-lg'], s['relative'], s['flex'], s['flex-col'], s['w-full'], s['bg-white'], s['outline-none'], s['focus:outline-none']), children: _jsxs("div", { className: cn(s['relative'], s['p-2'], s['flex-auto'], s['flex'], s['flex-col'], s['items-center']), children: [_jsx("style", { children: `
|
|
8
|
-
.spinner .background {
|
|
9
|
-
fill: #555;
|
|
10
|
-
}
|
|
11
|
-
.spinner .line {
|
|
12
|
-
animation: PacMan 5s infinite;
|
|
13
|
-
fill: none;
|
|
14
|
-
stroke: #d26188;
|
|
15
|
-
stroke-width: 25;
|
|
16
|
-
}
|
|
17
|
-
.spinner .spinner {
|
|
18
|
-
animation: Spin 2s infinite linear;
|
|
19
|
-
}
|
|
20
|
-
@keyframes PacMan {
|
|
21
|
-
0% {
|
|
22
|
-
stroke-dasharray: 79px 79;
|
|
23
|
-
}
|
|
24
|
-
50% {
|
|
25
|
-
stroke-dasharray: 1px 79;
|
|
26
|
-
}
|
|
27
|
-
100% {
|
|
28
|
-
stroke-dasharray: 79px 79;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
@keyframes Spin {
|
|
32
|
-
0% {
|
|
33
|
-
transform: rotate(0deg);
|
|
34
|
-
}
|
|
35
|
-
100% {
|
|
36
|
-
transform: rotate(360deg);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
` }), _jsxs("svg", { className: cn(s['spinner']), width: "100", height: "100", viewBox: "0 0 100 100", children: [_jsx("circle", { className: cn(s['background']), cx: "0", cy: "0" }), _jsx("path", { className: cn(s['line']), d: "M 37.5,50 C 37.5,43.096441 43.096441,37.5 50,37.5 C 56.903559,37.5 62.5,43.096441 62.5,50 C 62.5,56.903559 56.903559,62.5 50,62.5 C 43.096441,62.5 37.5,56.903559 37.5,50" })] }), ' ', _jsx("span", { style: { marginTop: -15 }, children: "loading ..." })] }) }) }) }), _jsx("div", { className: cn(s['opacity-25'], s['fixed'], s['inset-0'], s['z-40'], s['bg-black']) })] }) }));
|
|
4
|
+
export const LoadingAnimateSpin = ({ classWarper = '', className = '', }) => {
|
|
5
|
+
return (_jsx("div", { className: cn(s.absolute, s['justify-center'], s['items-center'], classWarper), children: _jsx("div", { className: cn(s['w-10'], s['h-10'], s['border-t-2'], s['border-b-2'], s['border-blue-500'], s['rounded-full'], s['animate-spin'], className) }) }));
|
|
40
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,6BAA6B,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kDAAkD,CAAC;AACjE,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iDAAiD,CAAC;AAChE,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AAExD,cAAc,+DAA+D,CAAC;AAC9E,cAAc,iJAAiJ,CAAC;AAChK,cAAc,6IAA6I,CAAC;AAC5J,cAAc,iDAAiD,CAAC;AAChE,cAAc,uEAAuE,CAAC;AACtF,cAAc,mDAAmD,CAAC;AAClE,cAAc,uCAAuC,CAAC;AACtD,cAAc,qEAAqE,CAAC;AACpF,cAAc,iDAAiD,CAAC;AAChE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,6FAA6F,CAAC;AAE5G,OAAO,EAAC,IAAI,EAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface ModalConfirmProps {
|
|
2
|
+
export interface ModalConfirmProps {
|
|
3
3
|
visible: boolean;
|
|
4
4
|
title?: string;
|
|
5
5
|
message: React.ReactNode | string;
|
|
@@ -11,5 +11,4 @@ interface ModalConfirmProps {
|
|
|
11
11
|
onClose: () => void;
|
|
12
12
|
}
|
|
13
13
|
export declare const ModalConfirm: ({ visible, title, message, submitTitle, closeTitle, isClick, isClose, onClick, onClose, }: ModalConfirmProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
15
14
|
//# sourceMappingURL=modal-confirm.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-confirm.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/molecules/modal-confirm/modal-confirm.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAMzD,
|
|
1
|
+
{"version":3,"file":"modal-confirm.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/molecules/modal-confirm/modal-confirm.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAMzD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,8FAUtB,iBAAiB,4CA0LnB,CAAC"}
|
package/lib/src/index.css
CHANGED
package/lib/src/tc.module.css
CHANGED
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
} .relative { position: relative;
|
|
6
6
|
} .inset-0 { inset: 0px;
|
|
7
7
|
} .left-0 { left: 0px;
|
|
8
|
+
} .left-10 { left: 2.5rem;
|
|
8
9
|
} .right-0 { right: 0px;
|
|
9
10
|
} .right-3 { right: 0.75rem;
|
|
10
11
|
} .top-0 { top: 0px;
|
|
11
12
|
} .top-1\/2 { top: 50%;
|
|
13
|
+
} .top-10 { top: 2.5rem;
|
|
12
14
|
} .top-3 { top: 0.75rem;
|
|
13
15
|
} .-z-1 { z-index: -1;
|
|
14
16
|
} .z-0 { z-index: 0;
|
|
@@ -45,6 +47,7 @@
|
|
|
45
47
|
} .grid { display: grid;
|
|
46
48
|
} .hidden { display: none;
|
|
47
49
|
} .h-0\.5 { height: 0.125rem;
|
|
50
|
+
} .h-10 { height: 2.5rem;
|
|
48
51
|
} .h-3 { height: 0.75rem;
|
|
49
52
|
} .h-4 { height: 1rem;
|
|
50
53
|
} .h-6 { height: 1.5rem;
|
|
@@ -63,11 +66,13 @@
|
|
|
63
66
|
} .min-w-80 { min-width: 20rem;
|
|
64
67
|
} .max-w-full { max-width: 100%;
|
|
65
68
|
} .flex-1 { flex: 1 1 0%;
|
|
66
|
-
} .flex-auto { flex: 1 1 auto;
|
|
67
69
|
} .-translate-x-1\/2 { --tw-translate-x: -50%; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
68
70
|
} .-translate-y-1\/2 { --tw-translate-y: -50%; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
69
71
|
} .translate-x-1\/2 { --tw-translate-x: 50%; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
70
72
|
} .transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
73
|
+
} @keyframes spin { to { transform: rotate(360deg);
|
|
74
|
+
}
|
|
75
|
+
} .animate-spin { animation: spin 1s linear infinite;
|
|
71
76
|
} .cursor-pointer { cursor: pointer;
|
|
72
77
|
} .list-none { list-style-type: none;
|
|
73
78
|
} .appearance-none { appearance: none;
|
|
@@ -108,6 +113,7 @@
|
|
|
108
113
|
} .border-t { border-top-width: 1px;
|
|
109
114
|
} .border-solid { border-style: solid;
|
|
110
115
|
} .border-none { border-style: none;
|
|
116
|
+
} .border-blue-500 { --tw-border-opacity: 1; border-color: rgb(59 130 246 / var(--tw-border-opacity));
|
|
111
117
|
} .border-gray-300 { --tw-border-opacity: 1; border-color: rgb(209 213 219 / var(--tw-border-opacity));
|
|
112
118
|
} .border-gray-400 { --tw-border-opacity: 1; border-color: rgb(156 163 175 / var(--tw-border-opacity));
|
|
113
119
|
} .border-orange { --tw-border-opacity: 1; border-color: rgb(255 174 26 / var(--tw-border-opacity));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-restyle-components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.69",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easy use restyle components",
|
|
6
6
|
"author": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"jest-environment-jsdom": "^29.7.0",
|
|
56
56
|
"react-colorful": "^5.6.1",
|
|
57
57
|
"react-datepicker": "^4.7.0",
|
|
58
|
-
"react-icons": "^5.
|
|
58
|
+
"react-icons": "^5.5.0",
|
|
59
59
|
"react-scripts": "5.0.1",
|
|
60
60
|
"reactstrap": "^9.0.2",
|
|
61
61
|
"tailwind-merge": "^2.5.5",
|