@particle-network/ui-react 0.1.3-beta.7 → 0.1.4-beta.0
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/dist/components/UXChip/chip.extend.d.ts +6 -298
- package/dist/components/UXChip/chip.extend.js +28 -44
- package/dist/components/UXChip/index.d.ts +3 -298
- package/dist/components/UXChip/index.js +25 -8
- package/dist/components/UXDropdown/dropdown.js +1 -1
- package/dist/components/UXEmpty/index.d.ts +8 -0
- package/dist/components/UXEmpty/index.js +31 -0
- package/dist/components/UXModal/index.js +6 -3
- package/dist/components/UXPagination/index.d.ts +3 -0
- package/dist/components/UXPagination/index.js +27 -0
- package/dist/components/UXPopover/popover.extend.js +2 -2
- package/dist/components/UXTable/index.d.ts +350 -0
- package/dist/components/UXTable/index.js +14 -0
- package/dist/components/UXTable/table.extend.d.ts +347 -0
- package/dist/components/UXTable/table.extend.js +145 -0
- package/dist/components/UXTooltip/tooltip.extend.js +2 -2
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/hooks/useI18n.d.ts +5 -0
- package/dist/hooks/useI18n.js +16 -0
- package/dist/hooks/useLang.d.ts +3 -0
- package/dist/hooks/useLang.js +27 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/index.js +51 -2
- package/dist/utils/variants.js +2 -2
- package/package.json +4 -4
- package/tailwind-preset.js +7 -3
package/dist/icons/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { getHexColorFromCSSVariable } from "@particle-network/ui-shared";
|
|
4
4
|
const getColor = (color)=>{
|
|
@@ -40,4 +40,53 @@ const CircleQuestionIcon = ({ size = 16, color = 'currentColor', ...props })=>/*
|
|
|
40
40
|
fill: getColor(color)
|
|
41
41
|
})
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
const EmptyIcon = ({ size = 16, color = 'currentColor', ...props })=>/*#__PURE__*/ jsxs("svg", {
|
|
44
|
+
width: size,
|
|
45
|
+
height: size,
|
|
46
|
+
viewBox: "0 0 24 24",
|
|
47
|
+
fill: "none",
|
|
48
|
+
...props,
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ jsx("path", {
|
|
51
|
+
opacity: "0.1",
|
|
52
|
+
d: "M2.2417 20.723C2.2417 21.4283 6.81537 21.9999 12.4573 21.9999C18.0992 21.9999 22.6729 21.4283 22.6729 20.723C22.6729 20.0177 18.0992 19.446 12.4573 19.446C6.81537 19.446 2.2417 20.0177 2.2417 20.723Z",
|
|
53
|
+
fill: getColor(color)
|
|
54
|
+
}),
|
|
55
|
+
/*#__PURE__*/ jsx("path", {
|
|
56
|
+
d: "M2 8.57303C2 8.79011 2.166 8.95612 2.38308 8.95612C2.60017 8.95612 2.76617 8.79011 2.76617 8.57303C2.76617 8.35596 2.60017 8.18995 2.38308 8.18995C2.17877 8.18995 2 8.36872 2 8.57303ZM22.7999 19.1269C22.3147 19.2548 22.2127 19.3568 22.0976 19.8292C21.9697 19.344 21.8677 19.242 21.3951 19.1269C21.8675 18.999 21.9825 18.8971 22.0976 18.4246C22.2125 18.8971 22.3147 19.012 22.7999 19.1269ZM4.13251 7.23225C3.5068 7.39825 3.37911 7.52595 3.2131 8.15165C3.0471 7.52595 2.9194 7.39825 2.2937 7.23225C2.9194 7.06625 3.0471 6.92579 3.2131 6.31286C3.36634 6.93856 3.5068 7.06625 4.13251 7.23225ZM20.653 5.43496C20.27 5.53712 20.1931 5.61373 20.0912 5.99681C19.989 5.61373 19.9124 5.53712 19.5293 5.43496C19.9126 5.33281 19.9892 5.25619 20.0912 4.87311C20.1806 5.25619 20.27 5.33281 20.653 5.43496ZM22.3003 3.46848C21.3043 3.72387 21.1 3.94094 20.832 4.93696C20.5764 3.94094 20.3593 3.73663 19.3635 3.46848C20.3593 3.21309 20.5639 2.99601 20.832 2C21.0872 2.98324 21.3043 3.20032 22.3003 3.46848ZM21.1399 12.9402V12.9144C21.1399 12.8891 21.1273 12.8763 21.1273 12.8508V12.838L18.3815 6.87152C18.19 6.28087 17.8161 5.76615 17.3137 5.40134C16.8112 5.03653 16.2061 4.84041 15.5851 4.84119H9.34087C8.06392 4.84119 6.9402 5.65843 6.54434 6.87152L3.7989 12.838V12.8506C3.78613 12.8761 3.78613 12.8889 3.78613 12.9142V18.0732C3.78613 19.6948 5.10139 20.2119 6.72312 20.2119H18.2155C19.8374 20.2119 21.1526 19.6948 21.1526 18.0732V12.9657C21.1399 12.9531 21.1399 12.9531 21.1399 12.9402ZM7.25944 7.13967C7.25944 7.13967 7.25944 7.1269 7.27221 7.1269C7.55314 6.20751 8.39592 5.60735 9.34087 5.60735H15.5724C16.5171 5.60735 17.3601 6.20751 17.6538 7.11413C17.6538 7.11413 17.6538 7.1269 17.6664 7.1269L20.2075 12.57H14.372C14.155 12.57 13.989 12.736 13.989 12.9531C13.989 13.7957 13.2996 14.4855 12.4566 14.4855C11.6138 14.4855 10.9243 13.7957 10.9243 12.9531C10.9243 12.736 10.7583 12.57 10.5412 12.57H4.71831L7.25944 7.13967ZM20.3737 18.0736C20.3737 19.274 19.4034 19.4462 18.2029 19.4462H6.71035C5.51002 19.4462 4.53953 19.274 4.53953 18.0736V13.3488H10.1964C10.3752 14.4342 11.3201 15.2644 12.4566 15.2644C13.5929 15.2644 14.5381 14.4344 14.7168 13.3488H20.3737V18.0736Z",
|
|
57
|
+
fill: getColor(color)
|
|
58
|
+
}),
|
|
59
|
+
/*#__PURE__*/ jsx("path", {
|
|
60
|
+
opacity: "0.2",
|
|
61
|
+
d: "M12.4562 13.6042C12.3721 13.605 12.2887 13.5891 12.2109 13.5573C12.133 13.5255 12.0623 13.4785 12.0029 13.419C11.9434 13.3596 11.8964 13.2889 11.8646 13.211C11.8328 13.1332 11.8169 13.0498 11.8177 12.9657V11.6888H6.00757L8.10177 7.42061L8.11454 7.39508C8.29331 6.85876 8.77855 6.50122 9.34041 6.50122H15.5719C16.1336 6.50122 16.6188 6.85876 16.7978 7.39508L16.8106 7.42061L18.9048 11.6888H13.0946V12.9657C13.0946 13.3233 12.8137 13.6042 12.4562 13.6042Z",
|
|
62
|
+
fill: getColor(color)
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
});
|
|
66
|
+
const ChevronRightIcon = ({ size = 16, color = 'currentColor', ...props })=>/*#__PURE__*/ jsx("svg", {
|
|
67
|
+
width: size,
|
|
68
|
+
height: size,
|
|
69
|
+
viewBox: "0 0 24 24",
|
|
70
|
+
fill: "none",
|
|
71
|
+
...props,
|
|
72
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
73
|
+
"fill-rule": "evenodd",
|
|
74
|
+
"clip-rule": "evenodd",
|
|
75
|
+
d: "M16.4334 11.0992C16.668 11.3338 16.7998 11.652 16.7998 11.9838C16.7998 12.3157 16.668 12.6339 16.4334 12.8685L9.35475 19.9472C9.23932 20.0667 9.10125 20.1621 8.94858 20.2276C8.79592 20.2932 8.63172 20.3277 8.46557 20.3292C8.29942 20.3306 8.13465 20.299 7.98087 20.236C7.82708 20.1731 7.68737 20.0802 7.56988 19.9627C7.45239 19.8452 7.35948 19.7055 7.29656 19.5517C7.23365 19.398 7.20199 19.2332 7.20343 19.067C7.20487 18.9009 7.23939 18.7367 7.30497 18.584C7.37055 18.4314 7.46588 18.2933 7.58539 18.1779L13.7794 11.9838L7.58539 5.78984C7.35745 5.55384 7.23133 5.23776 7.23418 4.90967C7.23703 4.58158 7.36863 4.26773 7.60063 4.03573C7.83264 3.80372 8.14648 3.67212 8.47457 3.66927C8.80266 3.66642 9.11875 3.79255 9.35475 4.02048L16.4334 11.0992Z",
|
|
76
|
+
fill: getColor(color)
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
const ChevronLeftIcon = ({ size = 16, color = 'currentColor', ...props })=>/*#__PURE__*/ jsx("svg", {
|
|
80
|
+
width: size,
|
|
81
|
+
height: size,
|
|
82
|
+
viewBox: "0 0 24 24",
|
|
83
|
+
fill: "none",
|
|
84
|
+
...props,
|
|
85
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
86
|
+
"fill-rule": "evenodd",
|
|
87
|
+
"clip-rule": "evenodd",
|
|
88
|
+
d: "M7.56656 12.9008C7.33198 12.6662 7.2002 12.348 7.2002 12.0162C7.2002 11.6843 7.33198 11.3661 7.56656 11.1315L14.6452 4.05279C14.7607 3.93327 14.8988 3.83795 15.0514 3.77237C15.2041 3.70679 15.3683 3.67227 15.5344 3.67082C15.7006 3.66938 15.8654 3.70104 16.0191 3.76396C16.1729 3.82687 16.3126 3.91979 16.4301 4.03728C16.5476 4.15477 16.6405 4.29448 16.7034 4.44826C16.7664 4.60204 16.798 4.76682 16.7966 4.93296C16.7951 5.09911 16.7606 5.26331 16.695 5.41597C16.6294 5.56864 16.5341 5.70672 16.4146 5.82215L10.2206 12.0162L16.4146 18.2102C16.6425 18.4462 16.7687 18.7622 16.7658 19.0903C16.763 19.4184 16.6314 19.7323 16.3994 19.9643C16.1674 20.1963 15.8535 20.3279 15.5254 20.3307C15.1973 20.3336 14.8812 20.2075 14.6452 19.9795L7.56656 12.9008Z",
|
|
89
|
+
fill: getColor(color)
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
export { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CircleQuestionIcon, CloseIcon, EmptyIcon };
|
package/dist/utils/variants.js
CHANGED
|
@@ -33,9 +33,9 @@ const bordered = {
|
|
|
33
33
|
bearish: 'bg-transparent border-bearish text-bearish'
|
|
34
34
|
};
|
|
35
35
|
const flat = {
|
|
36
|
-
default: 'bg-
|
|
36
|
+
default: 'bg-background-300 text-default-foreground',
|
|
37
37
|
primary: 'bg-primary/20 text-primary',
|
|
38
|
-
secondary: 'bg-
|
|
38
|
+
secondary: 'bg-background-300 text-foreground-300',
|
|
39
39
|
success: 'bg-success/20 text-success',
|
|
40
40
|
warning: 'bg-warning/20 text-warning',
|
|
41
41
|
danger: 'bg-danger/20 text-danger',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-network/ui-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@types/react": "^19.1.10",
|
|
40
40
|
"react": "^19.1.0",
|
|
41
41
|
"typescript": "^5.8.3",
|
|
42
|
-
"@particle-network/
|
|
43
|
-
"@particle-network/
|
|
42
|
+
"@particle-network/eslint-config": "0.3.0",
|
|
43
|
+
"@particle-network/lintstaged-config": "0.1.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=16.9.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"ahooks": "^3.9.4",
|
|
51
|
-
"@particle-network/ui-shared": "0.1.1
|
|
51
|
+
"@particle-network/ui-shared": "0.1.1"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "rslib build",
|
package/tailwind-preset.js
CHANGED
|
@@ -18,9 +18,6 @@ module.exports = {
|
|
|
18
18
|
md: '0.625rem', // 10px
|
|
19
19
|
lg: '0.875rem', // 14px
|
|
20
20
|
},
|
|
21
|
-
boxShadow: {
|
|
22
|
-
box: '2px 2px 12px rgba(139, 142, 161, 0.15)',
|
|
23
|
-
},
|
|
24
21
|
animation: {
|
|
25
22
|
blink: 'blink 1s infinite',
|
|
26
23
|
'sprite-refresh': 'sprite-refresh 5s steps(270)',
|
|
@@ -289,6 +286,13 @@ module.exports = {
|
|
|
289
286
|
display: 'none',
|
|
290
287
|
},
|
|
291
288
|
},
|
|
289
|
+
// shadow styles
|
|
290
|
+
'.shadow-box': {
|
|
291
|
+
boxShadow: '0px 2px 12px 0px rgba(23, 23, 28, 0.15)',
|
|
292
|
+
},
|
|
293
|
+
'.dark .shadow-box': {
|
|
294
|
+
boxShadow: '0px 2px 12px 0px rgba(0, 0, 0, 0.5)',
|
|
295
|
+
},
|
|
292
296
|
});
|
|
293
297
|
}),
|
|
294
298
|
],
|