ag-common 0.0.618 → 0.0.620
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.
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const PulseRing: ({ style, className, text, title, }: {
|
|
4
|
+
/** tooltip text */
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
/** bubble text */
|
|
7
|
+
text?: string | undefined;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
style?: (CSSProperties & {
|
|
10
|
+
/** default 2.5rem */
|
|
11
|
+
width?: string | undefined;
|
|
12
|
+
/** default 2.5rem */
|
|
13
|
+
height?: string | undefined;
|
|
14
|
+
/** colour of pulse. default #01a4e9 */
|
|
15
|
+
backgroundColor?: string | undefined;
|
|
16
|
+
/** colour of tex. default #000 */
|
|
17
|
+
color?: string | undefined;
|
|
18
|
+
}) | undefined;
|
|
19
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PulseRing = void 0;
|
|
7
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const CP = styled_1.default.div `
|
|
10
|
+
position: relative;
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
|
|
16
|
+
&:before {
|
|
17
|
+
content: '';
|
|
18
|
+
position: relative;
|
|
19
|
+
display: block;
|
|
20
|
+
width: 150%;
|
|
21
|
+
height: 150%;
|
|
22
|
+
aspect-ratio: 4/3;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
border-radius: 45px;
|
|
25
|
+
background-color: var(--var-bg-col);
|
|
26
|
+
animation: pulse-ring 1s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@keyframes pulse-ring {
|
|
30
|
+
0% {
|
|
31
|
+
transform: scale(0.33);
|
|
32
|
+
}
|
|
33
|
+
80%,
|
|
34
|
+
100% {
|
|
35
|
+
opacity: 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@keyframes pulse-dot {
|
|
40
|
+
0% {
|
|
41
|
+
transform: scale(0.8);
|
|
42
|
+
}
|
|
43
|
+
50% {
|
|
44
|
+
transform: scale(1);
|
|
45
|
+
}
|
|
46
|
+
100% {
|
|
47
|
+
transform: scale(0.8);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
const Text = styled_1.default.div `
|
|
52
|
+
position: absolute;
|
|
53
|
+
z-index: 1;
|
|
54
|
+
background-color: var(--var-bg-col);
|
|
55
|
+
border-radius: 15px;
|
|
56
|
+
box-shadow: 0 0 8px var(--var-bg-col);
|
|
57
|
+
min-width: 1rem;
|
|
58
|
+
min-height: 1rem;
|
|
59
|
+
display: flex;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
align-items: center;
|
|
62
|
+
padding: 2px;
|
|
63
|
+
`;
|
|
64
|
+
const PulseRing = ({ style, className, text, title, }) => {
|
|
65
|
+
var _a, _b, _c, _d;
|
|
66
|
+
const st = Object.assign(Object.assign({}, style), { width: (_a = style === null || style === void 0 ? void 0 : style.width) !== null && _a !== void 0 ? _a : '2rem', height: (_b = style === null || style === void 0 ? void 0 : style.height) !== null && _b !== void 0 ? _b : '2rem', color: 'transparent', backgroundColor: 'transparent', '--var-bg-col': (_c = style === null || style === void 0 ? void 0 : style.backgroundColor) !== null && _c !== void 0 ? _c : '#01a4e9' });
|
|
67
|
+
return (react_1.default.createElement(CP, { style: st, className: className, title: title },
|
|
68
|
+
react_1.default.createElement(Text, { style: {
|
|
69
|
+
color: (_d = style === null || style === void 0 ? void 0 : style.color) !== null && _d !== void 0 ? _d : 'black',
|
|
70
|
+
aspectRatio: '1/1',
|
|
71
|
+
minWidth: '1.5ch',
|
|
72
|
+
minHeight: '1.5ch',
|
|
73
|
+
} }, text)));
|
|
74
|
+
};
|
|
75
|
+
exports.PulseRing = PulseRing;
|
|
@@ -36,6 +36,7 @@ __exportStar(require("./OpenApiCodeBlock"), exports);
|
|
|
36
36
|
__exportStar(require("./PieChart"), exports);
|
|
37
37
|
__exportStar(require("./ProgressBar"), exports);
|
|
38
38
|
__exportStar(require("./Prompt"), exports);
|
|
39
|
+
__exportStar(require("./PulseRing"), exports);
|
|
39
40
|
__exportStar(require("./RadioGroup"), exports);
|
|
40
41
|
__exportStar(require("./RowOrColumn"), exports);
|
|
41
42
|
__exportStar(require("./Search"), exports);
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
2
|
+
"version": "0.0.620",
|
|
3
3
|
"name": "ag-common",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
@@ -43,24 +43,24 @@
|
|
|
43
43
|
"@emotion/react": "11.11.3",
|
|
44
44
|
"@emotion/styled": "11.11.0",
|
|
45
45
|
"@smithy/types": "2.9.1",
|
|
46
|
-
"@storybook/addon-actions": "7.6.
|
|
47
|
-
"@storybook/addon-docs": "7.6.
|
|
48
|
-
"@storybook/addon-essentials": "7.6.
|
|
49
|
-
"@storybook/addon-interactions": "7.6.
|
|
50
|
-
"@storybook/addon-links": "7.6.
|
|
51
|
-
"@storybook/addons": "7.6.
|
|
52
|
-
"@storybook/react": "7.6.
|
|
53
|
-
"@storybook/react-webpack5": "7.6.
|
|
54
|
-
"@storybook/theming": "7.6.
|
|
46
|
+
"@storybook/addon-actions": "7.6.13",
|
|
47
|
+
"@storybook/addon-docs": "7.6.13",
|
|
48
|
+
"@storybook/addon-essentials": "7.6.13",
|
|
49
|
+
"@storybook/addon-interactions": "7.6.13",
|
|
50
|
+
"@storybook/addon-links": "7.6.13",
|
|
51
|
+
"@storybook/addons": "7.6.13",
|
|
52
|
+
"@storybook/react": "7.6.13",
|
|
53
|
+
"@storybook/react-webpack5": "7.6.13",
|
|
54
|
+
"@storybook/theming": "7.6.13",
|
|
55
55
|
"@types/jsonwebtoken": "9.0.5",
|
|
56
56
|
"@types/node": "20.11.16",
|
|
57
|
-
"@types/react": "18.2.
|
|
58
|
-
"@types/react-dom": "18.2.
|
|
57
|
+
"@types/react": "18.2.55",
|
|
58
|
+
"@types/react-dom": "18.2.19",
|
|
59
59
|
"cross-env": "7.0.3",
|
|
60
|
-
"eslint-config-e7npm": "0.0.
|
|
60
|
+
"eslint-config-e7npm": "0.0.81",
|
|
61
61
|
"globstar": "^1.0.0",
|
|
62
62
|
"rimraf": "5.0.5",
|
|
63
|
-
"storybook": "7.6.
|
|
63
|
+
"storybook": "7.6.13",
|
|
64
64
|
"tsx": "^4.7.0"
|
|
65
65
|
},
|
|
66
66
|
"files": [
|