@worknice/whiteboard 0.15.1 → 0.15.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Icon } from "./_types";
|
|
2
2
|
declare const LoadingIcon: Icon;
|
|
3
|
-
export declare const animation: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const animation: (size?: number) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default LoadingIcon;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
2
|
const LoadingIcon = ({ id })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("symbol", {
|
|
3
3
|
id: id,
|
|
4
|
-
width: 20,
|
|
5
|
-
height: 20,
|
|
6
4
|
viewBox: "0 0 20 20",
|
|
7
5
|
fill: "currentColor",
|
|
8
6
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
|
|
9
7
|
d: "M17.8516 14.5313C18.3008 14.7891 18.8789 14.6367 19.0937 14.168C19.6758 12.8985 20 11.4883 20 10C20 4.79299 16.0195 0.515648 10.9375 0.0429922C10.4219 -0.00388284 10 0.417992 10 0.937523C10 1.45705 10.4219 1.87112 10.9375 1.92971C14.9805 2.39065 18.125 5.82815 18.125 10C18.125 11.1446 17.8867 12.2383 17.4609 13.2266C17.2539 13.7031 17.4023 14.2735 17.8516 14.5352V14.5313Z"
|
|
10
8
|
})
|
|
11
9
|
});
|
|
12
|
-
const animation = (
|
|
10
|
+
const animation = (size = 20)=>{
|
|
11
|
+
const halfSize = size / 2;
|
|
12
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("animateTransform", {
|
|
13
13
|
attributeName: "transform",
|
|
14
14
|
begin: "0.1s",
|
|
15
15
|
dur: "0.8s",
|
|
16
|
-
from:
|
|
16
|
+
from: `0 ${halfSize} ${halfSize}`,
|
|
17
17
|
repeatCount: "indefinite",
|
|
18
|
-
to:
|
|
18
|
+
to: `360 ${halfSize} ${halfSize + 1}`,
|
|
19
19
|
type: "rotate"
|
|
20
20
|
});
|
|
21
|
+
};
|
|
21
22
|
const LoadingIcon_rslib_entry_ = LoadingIcon;
|
|
22
23
|
export { animation, LoadingIcon_rslib_entry_ as default };
|
|
@@ -20,7 +20,7 @@ const Icon = ({ animate, symbol, size = "default", tone, className })=>{
|
|
|
20
20
|
className: className,
|
|
21
21
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("use", {
|
|
22
22
|
xlinkHref: `#icon-${symbol}`,
|
|
23
|
-
children: animate && "animation" in Symbol ? Symbol.animation() : null
|
|
23
|
+
children: animate && "animation" in Symbol ? Symbol.animation(sizes[size]) : null
|
|
24
24
|
})
|
|
25
25
|
});
|
|
26
26
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worknice/whiteboard",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.15.
|
|
4
|
+
"version": "0.15.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"files": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react-markdown": "^10.1.0",
|
|
39
39
|
"utf8": "^3.0.0",
|
|
40
40
|
"zod": "^3.22.3",
|
|
41
|
-
"@worknice/utils": "^0.6.
|
|
41
|
+
"@worknice/utils": "^0.6.39"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@anolilab/semantic-release-pnpm": "^1.1.10",
|