@particle-network/ui-react 0.0.9 → 0.0.11
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import CircleQuestionIcon from "@particle-network/icons/web/CircleQuestionIcon";
|
|
4
3
|
import { UXButton, UXTooltip } from "../index.js";
|
|
5
|
-
|
|
4
|
+
import { CircleQuestionIcon } from "../../icons/index.js";
|
|
5
|
+
const UXHint = (props)=>{
|
|
6
6
|
const { content, children, buttonClassName, iconClassName, ...restProps } = props;
|
|
7
7
|
return /*#__PURE__*/ jsx(UXTooltip, {
|
|
8
8
|
content: content || children,
|
|
@@ -18,6 +18,6 @@ const UXHint_UXHint = (props)=>{
|
|
|
18
18
|
})
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
export {
|
|
21
|
+
UXHint.displayName = 'UX.Hint';
|
|
22
|
+
const components_UXHint = UXHint;
|
|
23
|
+
export { components_UXHint as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader } from "@heroui/modal";
|
|
4
|
-
import CloseIcon from "@particle-network/icons/web/CloseIcon";
|
|
5
4
|
import { Center, Circle, Flex, Text, UXButton } from "../index.js";
|
|
6
|
-
|
|
5
|
+
import { CloseIcon } from "../../icons/index.js";
|
|
6
|
+
const UXModal = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
7
7
|
const { title, footer, backdrop = 'blur', scrollBehavior = 'inside', children, titleAlign = 'left', classNames, tip, ...restProps } = props;
|
|
8
8
|
return /*#__PURE__*/ jsx(Modal, {
|
|
9
9
|
ref: ref,
|
|
@@ -86,6 +86,6 @@ const UXModal_UXModal = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
86
86
|
})
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
export {
|
|
89
|
+
UXModal.displayName = 'UX.Modal';
|
|
90
|
+
const components_UXModal = UXModal;
|
|
91
|
+
export { components_UXModal as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Select, SelectItem, SelectSection } from "@heroui/select";
|
|
4
|
-
import ChevronDownIcon from "
|
|
4
|
+
import { ChevronDownIcon } from "../../icons/index.js";
|
|
5
5
|
const UXSelect_UXSelect = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
6
6
|
const { fullWidth = false, classNames = {}, radius = 'sm', ...restProps } = props;
|
|
7
7
|
const { popoverContent, selectorIcon, trigger, value, ...restClassNames } = classNames;
|
|
@@ -15,10 +15,10 @@ export interface TextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
15
15
|
* | body1Bold | 14px | 500 |
|
|
16
16
|
* | body2 | 12px | 400 |
|
|
17
17
|
* | body2Bold | 12px | 500 |
|
|
18
|
-
* | body3 |
|
|
19
|
-
* | body3Bold |
|
|
20
|
-
* | caption1 |
|
|
21
|
-
* | caption1Bold |
|
|
18
|
+
* | body3 | 11px | 400 |
|
|
19
|
+
* | body3Bold | 11px | 500 |
|
|
20
|
+
* | caption1 | 10px | 400 |
|
|
21
|
+
* | caption1Bold | 10px | 500 |
|
|
22
22
|
*/
|
|
23
23
|
variant?: TextVariant;
|
|
24
24
|
/**
|
|
@@ -50,19 +50,19 @@ export interface TextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
50
50
|
*/
|
|
51
51
|
body2Bold?: boolean;
|
|
52
52
|
/**
|
|
53
|
-
* `
|
|
53
|
+
* `11px 400`
|
|
54
54
|
*/
|
|
55
55
|
body3?: boolean;
|
|
56
56
|
/**
|
|
57
|
-
* `
|
|
57
|
+
* `11px 500`
|
|
58
58
|
*/
|
|
59
59
|
body3Bold?: boolean;
|
|
60
60
|
/**
|
|
61
|
-
* `
|
|
61
|
+
* `10px 400`
|
|
62
62
|
*/
|
|
63
63
|
caption1?: boolean;
|
|
64
64
|
/**
|
|
65
|
-
* `
|
|
65
|
+
* `10px 500`
|
|
66
66
|
*/
|
|
67
67
|
caption1Bold?: boolean;
|
|
68
68
|
/**
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { UXForegroundColor } from '@particle-network/ui-shared';
|
|
4
|
+
export type IconProps = SVGProps<SVGSVGElement> & {
|
|
5
|
+
size?: number;
|
|
6
|
+
color?: UXForegroundColor | 'currentColor';
|
|
7
|
+
};
|
|
8
|
+
export declare const CloseIcon: React.FC<IconProps>;
|
|
9
|
+
export declare const ChevronDownIcon: React.FC<IconProps>;
|
|
10
|
+
export declare const CircleQuestionIcon: React.FC<IconProps>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { getHexColorFromCSSVariable } from "@particle-network/ui-shared";
|
|
4
|
+
const getColor = (color)=>{
|
|
5
|
+
if ('currentColor' === color) return 'currentColor';
|
|
6
|
+
return getHexColorFromCSSVariable(color);
|
|
7
|
+
};
|
|
8
|
+
const CloseIcon = ({ size = 16, color = 'currentColor', ...props })=>/*#__PURE__*/ jsx("svg", {
|
|
9
|
+
width: size,
|
|
10
|
+
height: size,
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
fill: "none",
|
|
13
|
+
...props,
|
|
14
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
15
|
+
d: "M5.29102 5.29102C5.47727 5.105 5.72974 5.00052 5.99298 5.00052C6.25621 5.00052 6.50868 5.105 6.69494 5.29102L11.9993 10.5941L17.3051 5.29102C17.4733 5.1228 17.6962 5.02051 17.9335 5.00277C18.1707 4.98503 18.4064 5.053 18.5977 5.19434L18.709 5.29102C18.895 5.47727 18.9995 5.72974 18.9995 5.99298C18.9995 6.25621 18.895 6.50868 18.709 6.69494L13.4046 11.9993L18.709 17.3051C18.8772 17.4733 18.9795 17.6962 18.9972 17.9335C19.015 18.1707 18.947 18.4064 18.8057 18.5977L18.709 18.709C18.5227 18.895 18.2703 18.9995 18.007 18.9995C17.7438 18.9995 17.4913 18.895 17.3051 18.709L11.9993 13.4046L6.69494 18.709C6.52675 18.8772 6.30377 18.9795 6.06655 18.9972C5.82933 19.015 5.59362 18.947 5.40228 18.8057L5.29102 18.709C5.105 18.5227 5.00052 18.2703 5.00052 18.007C5.00052 17.7438 5.105 17.4913 5.29102 17.3051L10.5941 11.9993L5.29102 6.69494C5.1228 6.52675 5.02051 6.30377 5.00277 6.06655C4.98503 5.82933 5.053 5.59362 5.19434 5.40228L5.29102 5.29102Z",
|
|
16
|
+
fill: getColor(color)
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
const ChevronDownIcon = ({ size = 16, color = 'currentColor', ...props })=>/*#__PURE__*/ jsx("svg", {
|
|
20
|
+
width: size,
|
|
21
|
+
height: size,
|
|
22
|
+
viewBox: "0 0 24 24",
|
|
23
|
+
fill: "none",
|
|
24
|
+
...props,
|
|
25
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
26
|
+
fillRule: "evenodd",
|
|
27
|
+
clipRule: "evenodd",
|
|
28
|
+
d: "M12.9007 16.4336C12.6661 16.6681 12.3478 16.7999 12.016 16.7999C11.6842 16.7999 11.366 16.6681 11.1314 16.4336L4.05267 9.35487C3.93315 9.23944 3.83782 9.10137 3.77224 8.9487C3.70666 8.79604 3.67214 8.63184 3.6707 8.46569C3.66926 8.29954 3.70092 8.13477 3.76384 7.98099C3.82675 7.82721 3.91967 7.68749 4.03716 7.57001C4.15464 7.45252 4.29436 7.3596 4.44814 7.29668C4.60192 7.23377 4.76669 7.20211 4.93284 7.20355C5.09899 7.205 5.26319 7.23951 5.41585 7.30509C5.56852 7.37067 5.70659 7.466 5.82202 7.58551L12.016 13.7795L18.21 7.58551C18.446 7.35758 18.7621 7.23145 19.0902 7.2343C19.4183 7.23715 19.7321 7.36875 19.9642 7.60076C20.1962 7.83276 20.3278 8.14661 20.3306 8.4747C20.3335 8.80279 20.2073 9.11887 19.9794 9.35487L12.9007 16.4336Z",
|
|
29
|
+
fill: getColor(color)
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
const CircleQuestionIcon = ({ size = 16, color = 'currentColor', ...props })=>/*#__PURE__*/ jsx("svg", {
|
|
33
|
+
width: size,
|
|
34
|
+
height: size,
|
|
35
|
+
viewBox: "0 0 24 24",
|
|
36
|
+
fill: "none",
|
|
37
|
+
...props,
|
|
38
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
39
|
+
d: "M12 1.90039C17.5781 1.90039 22.0996 6.42192 22.0996 12C22.0996 17.5781 17.5781 22.0996 12 22.0996C6.42192 22.0996 1.90039 17.5781 1.90039 12C1.90039 6.42192 6.42192 1.90039 12 1.90039ZM12 3.39551C7.24831 3.39551 3.39551 7.24831 3.39551 12C3.39551 16.7517 7.24831 20.6045 12 20.6045C16.7517 20.6045 20.6045 16.7517 20.6045 12C20.6045 7.24831 16.7517 3.39551 12 3.39551ZM11.5664 15.5703C11.8333 15.4158 12.1618 15.4158 12.4287 15.5703C12.5596 15.6462 12.6687 15.7559 12.7441 15.8867C12.8196 16.0177 12.8593 16.1669 12.8594 16.3184L12.8555 16.4062C12.8141 16.8119 12.4906 17.1347 12.085 17.1758L11.9971 17.1797C11.5216 17.1794 11.1359 16.7939 11.1357 16.3184C11.1357 16.0089 11.2997 15.7251 11.5664 15.5703ZM11.9893 6.82129C12.9078 6.81929 13.7973 7.18095 14.4258 7.81152C15.0097 8.3997 15.3109 9.15936 15.2676 9.94922C15.2451 10.3506 15.1678 10.7145 14.9336 11.1309C14.7012 11.544 14.317 12.0048 13.6875 12.6045C13.3697 12.9064 13.1143 13.1681 12.9346 13.4014C12.754 13.6358 12.6577 13.8315 12.6406 14.0029C12.6077 14.3258 12.3546 14.5717 12.0439 14.6279L11.9082 14.6396C11.8811 14.6396 11.8565 14.6376 11.8359 14.6357C11.4356 14.5993 11.1343 14.2558 11.1738 13.8633C11.2657 12.9821 11.9428 12.2786 12.6504 11.6045C13.218 11.0645 13.4993 10.7151 13.6416 10.4609C13.7801 10.2133 13.7892 10.0531 13.7988 9.87598C13.8208 9.48028 13.6678 9.09478 13.3613 8.79004L13.3604 8.78906C13.0109 8.4381 12.5131 8.23535 11.9971 8.23535H11.9932C11.0002 8.23755 10.1963 9.00926 10.1963 9.94531C10.1961 10.3405 9.86325 10.6493 9.45996 10.6494C9.05615 10.6494 8.72381 10.3381 8.72363 9.94336C8.72363 9.10996 9.06369 8.32601 9.67969 7.73633C10.296 7.14663 11.1173 6.82341 11.9893 6.82129Z",
|
|
40
|
+
fill: getColor(color)
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
export { ChevronDownIcon, CircleQuestionIcon, CloseIcon };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-network/ui-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"ahooks": "^3.9.4",
|
|
32
|
-
"@particle-network/ui-shared": "0.0.7"
|
|
33
|
-
"@particle-network/icons": "0.0.16"
|
|
32
|
+
"@particle-network/ui-shared": "0.0.7"
|
|
34
33
|
},
|
|
35
34
|
"scripts": {
|
|
36
35
|
"build": "rslib build",
|