react-restyle-components 0.2.68 → 0.2.70
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 +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- 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 +37 -10
- package/lib/src/tc.module.css +1 -3
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
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.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",
|
|
@@ -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,WAoEd,CAAC"}
|
|
@@ -9,21 +9,48 @@ 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
|
+
pi: () => import('react-icons/pi'),
|
|
48
|
+
tfi: () => import('react-icons/tfi'),
|
|
49
|
+
};
|
|
50
|
+
const loadLibrary = iconLibraries[lib] || (() => import('react-icons/md'));
|
|
51
|
+
const ElementIcon = loadable(loadLibrary, {
|
|
52
|
+
resolveComponent: (el) => el[nameIcon] != null ? el[nameIcon] : el[Object.keys(el.default)[0]],
|
|
53
|
+
});
|
|
27
54
|
return (_jsx("div", { className: cn(s.iconContainer), onClick: () => {
|
|
28
55
|
if (!isDisable)
|
|
29
56
|
onClick && onClick();
|
package/lib/src/tc.module.css
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
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
|
-
} .right-10 { right: 2.5rem;
|
|
10
10
|
} .right-3 { right: 0.75rem;
|
|
11
11
|
} .top-0 { top: 0px;
|
|
12
12
|
} .top-1\/2 { top: 50%;
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
} .hidden { display: none;
|
|
49
49
|
} .h-0\.5 { height: 0.125rem;
|
|
50
50
|
} .h-10 { height: 2.5rem;
|
|
51
|
-
} .h-16 { height: 4rem;
|
|
52
51
|
} .h-3 { height: 0.75rem;
|
|
53
52
|
} .h-4 { height: 1rem;
|
|
54
53
|
} .h-6 { height: 1.5rem;
|
|
@@ -57,7 +56,6 @@
|
|
|
57
56
|
} .max-h-40 { max-height: 10rem;
|
|
58
57
|
} .max-h-60 { max-height: 15rem;
|
|
59
58
|
} .w-10 { width: 2.5rem;
|
|
60
|
-
} .w-16 { width: 4rem;
|
|
61
59
|
} .w-3 { width: 0.75rem;
|
|
62
60
|
} .w-4 { width: 1rem;
|
|
63
61
|
} .w-6 { width: 1.5rem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-restyle-components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.70",
|
|
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",
|