@ssa-ui-kit/core 2.21.3 → 2.22.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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ProgressCircleProps } from './types';
|
|
2
|
-
declare const ProgressCircle: ({ max, currentValue, color, size, infoContent, }: ProgressCircleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const ProgressCircle: ({ max, currentValue, color, size, infoContent, mode, classnames, }: ProgressCircleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ProgressCircle;
|
|
@@ -7,4 +7,5 @@ export declare const ProgressCircleBase: import("@emotion/styled").StyledCompone
|
|
|
7
7
|
svgOffset: number;
|
|
8
8
|
color: string;
|
|
9
9
|
size: number;
|
|
10
|
+
mode: "default" | "infinite";
|
|
10
11
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -4,4 +4,12 @@ export interface ProgressCircleProps {
|
|
|
4
4
|
size?: number;
|
|
5
5
|
color?: keyof MainColors;
|
|
6
6
|
infoContent?: React.ReactNode | string;
|
|
7
|
+
mode?: 'default' | 'infinite';
|
|
8
|
+
classnames?: {
|
|
9
|
+
root?: string;
|
|
10
|
+
outer?: string;
|
|
11
|
+
inner?: string;
|
|
12
|
+
svg?: string;
|
|
13
|
+
svgCircle?: string;
|
|
14
|
+
};
|
|
7
15
|
}
|
package/dist/index.js
CHANGED
|
@@ -6334,13 +6334,23 @@ const generateGradient = svgOffset => (0,react_namespaceObject.keyframes)`
|
|
|
6334
6334
|
stroke-dashoffset: ${svgOffset};
|
|
6335
6335
|
}
|
|
6336
6336
|
`;
|
|
6337
|
+
const generateInfinite = () => (0,react_namespaceObject.keyframes)`
|
|
6338
|
+
0% {
|
|
6339
|
+
transform: rotate(0deg);
|
|
6340
|
+
}
|
|
6341
|
+
100% {
|
|
6342
|
+
transform: rotate(360deg);
|
|
6343
|
+
}
|
|
6344
|
+
`;
|
|
6337
6345
|
const ProgressCircleBase = /*#__PURE__*/base_default()("div", true ? {
|
|
6338
6346
|
target: "eok4i9s0"
|
|
6339
6347
|
} : 0)("width:", ({
|
|
6340
6348
|
size
|
|
6341
6349
|
}) => size, "px;height:", ({
|
|
6342
6350
|
size
|
|
6343
|
-
}) => size, "px;position:relative;
|
|
6351
|
+
}) => size, "px;position:relative;animation:", () => generateInfinite(), " 2s linear infinite forwards;animation:", ({
|
|
6352
|
+
mode
|
|
6353
|
+
}) => mode === 'default' && 'none', ";svg{position:absolute;top:0;left:0;filter:", ({
|
|
6344
6354
|
theme,
|
|
6345
6355
|
color
|
|
6346
6356
|
}) => `drop-shadow(3px 5px 10px ${theme.colors[`${color}Lighter40`] || theme.colors[color]})`, ";}circle{fill:none;stroke:url(#", ({
|
|
@@ -6353,7 +6363,11 @@ const ProgressCircleBase = /*#__PURE__*/base_default()("div", true ? {
|
|
|
6353
6363
|
fullStroke
|
|
6354
6364
|
}) => fullStroke, ";animation:", ({
|
|
6355
6365
|
svgOffset
|
|
6356
|
-
}) => generateGradient(svgOffset), " 1s linear forwards;
|
|
6366
|
+
}) => generateGradient(svgOffset), " 1s linear forwards;animation-direction:", ({
|
|
6367
|
+
mode
|
|
6368
|
+
}) => mode === 'infinite' && 'reverse !important', ";animation-play-state:", ({
|
|
6369
|
+
mode
|
|
6370
|
+
}) => mode === 'infinite' && 'paused !important', ";}" + ( true ? "" : 0));
|
|
6357
6371
|
;// ./src/components/ProgressCircle/ProgressCircleOuter.tsx
|
|
6358
6372
|
|
|
6359
6373
|
const ProgressCircleOuter = /*#__PURE__*/base_default()("div", true ? {
|
|
@@ -6388,7 +6402,9 @@ const ProgressCircle = ({
|
|
|
6388
6402
|
currentValue,
|
|
6389
6403
|
color = 'green',
|
|
6390
6404
|
size = 160,
|
|
6391
|
-
infoContent
|
|
6405
|
+
infoContent,
|
|
6406
|
+
mode = 'default',
|
|
6407
|
+
classnames
|
|
6392
6408
|
}) => {
|
|
6393
6409
|
const theme = (0,react_namespaceObject.useTheme)();
|
|
6394
6410
|
const gradientId = (0,external_react_namespaceObject.useId)();
|
|
@@ -6405,10 +6421,14 @@ const ProgressCircle = ({
|
|
|
6405
6421
|
svgOffset: svgOffset,
|
|
6406
6422
|
color: color,
|
|
6407
6423
|
size: size,
|
|
6424
|
+
mode: mode,
|
|
6425
|
+
className: classnames?.root,
|
|
6408
6426
|
children: [(0,jsx_runtime_namespaceObject.jsx)(ProgressCircleOuter, {
|
|
6409
6427
|
size: size,
|
|
6428
|
+
className: classnames?.outer,
|
|
6410
6429
|
children: (0,jsx_runtime_namespaceObject.jsx)(ProgressCircleInner, {
|
|
6411
6430
|
size: size,
|
|
6431
|
+
className: classnames?.inner,
|
|
6412
6432
|
children: infoContent
|
|
6413
6433
|
})
|
|
6414
6434
|
}), (0,jsx_runtime_namespaceObject.jsxs)("svg", {
|
|
@@ -6418,6 +6438,7 @@ const ProgressCircle = ({
|
|
|
6418
6438
|
preserveAspectRatio: "xMinYMin slice",
|
|
6419
6439
|
width: "100%",
|
|
6420
6440
|
height: "100%",
|
|
6441
|
+
className: classnames?.svg,
|
|
6421
6442
|
children: [(0,jsx_runtime_namespaceObject.jsx)("defs", {
|
|
6422
6443
|
children: (0,jsx_runtime_namespaceObject.jsxs)("linearGradient", {
|
|
6423
6444
|
id: gradientId,
|
|
@@ -6432,7 +6453,8 @@ const ProgressCircle = ({
|
|
|
6432
6453
|
}), (0,jsx_runtime_namespaceObject.jsx)("circle", {
|
|
6433
6454
|
cx: size / 2,
|
|
6434
6455
|
cy: size / 2,
|
|
6435
|
-
r: size / 2 - barStroke
|
|
6456
|
+
r: size / 2 - barStroke,
|
|
6457
|
+
className: classnames?.svgCircle
|
|
6436
6458
|
})]
|
|
6437
6459
|
})]
|
|
6438
6460
|
});
|