@cloud-ru/ds-hot-spot 1.0.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/CHANGELOG.md +8 -0
- package/LICENSE +201 -0
- package/README.md +109 -0
- package/dist/cjs/components/HotSpot.d.ts +35 -0
- package/dist/cjs/components/HotSpot.js +26 -0
- package/dist/cjs/components/constants.d.ts +21 -0
- package/dist/cjs/components/constants.js +24 -0
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.js +17 -0
- package/dist/cjs/components/styles.module.css +121 -0
- package/dist/cjs/components/testIds.d.ts +5 -0
- package/dist/cjs/components/testIds.js +8 -0
- package/dist/cjs/components/types.d.ts +4 -0
- package/dist/cjs/components/types.js +2 -0
- package/dist/cjs/components/utils.d.ts +1 -0
- package/dist/cjs/components/utils.js +12 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +20 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/style.css +121 -0
- package/dist/esm/components/HotSpot.d.ts +35 -0
- package/dist/esm/components/HotSpot.js +20 -0
- package/dist/esm/components/constants.d.ts +21 -0
- package/dist/esm/components/constants.js +21 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/styles.module.css +121 -0
- package/dist/esm/components/testIds.d.ts +5 -0
- package/dist/esm/components/testIds.js +5 -0
- package/dist/esm/components/types.d.ts +4 -0
- package/dist/esm/components/types.js +1 -0
- package/dist/esm/components/utils.d.ts +1 -0
- package/dist/esm/components/utils.js +9 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/style.css +121 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/tsconfig.esm.tsbuildinfo +1 -0
- package/package.json +42 -0
- package/src/components/HotSpot.tsx +98 -0
- package/src/components/constants.ts +22 -0
- package/src/components/index.ts +1 -0
- package/src/components/styles.module.scss +156 -0
- package/src/components/testIds.ts +5 -0
- package/src/components/types.ts +6 -0
- package/src/components/utils.ts +11 -0
- package/src/index.ts +4 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
.dotPlacementContainer{
|
|
2
|
+
pointer-events:none;
|
|
3
|
+
position:absolute;
|
|
4
|
+
}
|
|
5
|
+
.dotPlacementContainer[data-placement=left], .dotPlacementContainer[data-placement=left-top], .dotPlacementContainer[data-placement=left-bottom]{
|
|
6
|
+
left:calc(var(--offset-x, 0px) + 0px);
|
|
7
|
+
}
|
|
8
|
+
.dotPlacementContainer[data-placement=right], .dotPlacementContainer[data-placement=right-top], .dotPlacementContainer[data-placement=right-bottom]{
|
|
9
|
+
right:calc(0px - var(--offset-x, 0px) + 0px);
|
|
10
|
+
}
|
|
11
|
+
.dotPlacementContainer[data-placement=left-top], .dotPlacementContainer[data-placement=center-top], .dotPlacementContainer[data-placement=right-top]{
|
|
12
|
+
top:calc(var(--offset-y, 0px) + 0px);
|
|
13
|
+
}
|
|
14
|
+
.dotPlacementContainer[data-placement=left-bottom], .dotPlacementContainer[data-placement=center-bottom], .dotPlacementContainer[data-placement=right-bottom]{
|
|
15
|
+
bottom:calc(0px - var(--offset-y, 0px) + 0px);
|
|
16
|
+
}
|
|
17
|
+
.dotPlacementContainer[data-placement=center], .dotPlacementContainer[data-placement=left], .dotPlacementContainer[data-placement=right]{
|
|
18
|
+
top:calc(var(--offset-y, 0px) + 50%);
|
|
19
|
+
}
|
|
20
|
+
.dotPlacementContainer[data-placement=center], .dotPlacementContainer[data-placement=center-top], .dotPlacementContainer[data-placement=center-bottom]{
|
|
21
|
+
left:calc(var(--offset-x, 0px) + 50%);
|
|
22
|
+
}
|
|
23
|
+
.dotPlacementContainer[data-placement=center]{
|
|
24
|
+
transform:translate(-50%, -50%);
|
|
25
|
+
}
|
|
26
|
+
.dotPlacementContainer[data-placement=left], .dotPlacementContainer[data-placement=right]{
|
|
27
|
+
transform:translateY(-50%);
|
|
28
|
+
}
|
|
29
|
+
.dotPlacementContainer[data-placement=center-top], .dotPlacementContainer[data-placement=center-bottom]{
|
|
30
|
+
transform:translateX(-50%);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.hotSpotDot{
|
|
34
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
35
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
36
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
37
|
+
position:relative;
|
|
38
|
+
}
|
|
39
|
+
.hotSpotDot::after{
|
|
40
|
+
content:"";
|
|
41
|
+
position:absolute;
|
|
42
|
+
top:50%;
|
|
43
|
+
left:50%;
|
|
44
|
+
transform:translate(-50%, -50%);
|
|
45
|
+
width:var(--sn-primitive-dimension-24, 24px);
|
|
46
|
+
height:var(--sn-primitive-dimension-24, 24px);
|
|
47
|
+
}
|
|
48
|
+
.hotSpotDot[data-pulse]::before{
|
|
49
|
+
content:"";
|
|
50
|
+
position:absolute;
|
|
51
|
+
top:50%;
|
|
52
|
+
left:50%;
|
|
53
|
+
transform:translate(-50%, -50%);
|
|
54
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
55
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
56
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
57
|
+
opacity:0.24;
|
|
58
|
+
animation:pulse var(--duration, 2s) infinite;
|
|
59
|
+
}
|
|
60
|
+
.hotSpotDot[data-appearance=primary], .hotSpotDot[data-appearance=primary]::before{
|
|
61
|
+
background-color:var(--sn-theme-color-primary-accent, var(--sn-brand-color-primary-55, var(--sn-brandRole-color-brandA-55, var(--sn-primitive-color-brandA-55, #389f74))));
|
|
62
|
+
}
|
|
63
|
+
.hotSpotDot[data-appearance=red], .hotSpotDot[data-appearance=red]::before{
|
|
64
|
+
background-color:var(--sn-theme-color-red-accent, var(--sn-primitive-color-red-55, #d52e33));
|
|
65
|
+
}
|
|
66
|
+
.hotSpotDot[data-appearance=orange], .hotSpotDot[data-appearance=orange]::before{
|
|
67
|
+
background-color:var(--sn-theme-color-orange-accent, var(--sn-primitive-color-orange-55, #f57e1f));
|
|
68
|
+
}
|
|
69
|
+
.hotSpotDot[data-appearance=yellow], .hotSpotDot[data-appearance=yellow]::before{
|
|
70
|
+
background-color:var(--sn-theme-color-yellow-accent, var(--sn-primitive-color-yellow-55, #f3b917));
|
|
71
|
+
}
|
|
72
|
+
.hotSpotDot[data-appearance=green], .hotSpotDot[data-appearance=green]::before{
|
|
73
|
+
background-color:var(--sn-theme-color-green-accent, var(--sn-primitive-color-green-55, #41b954));
|
|
74
|
+
}
|
|
75
|
+
.hotSpotDot[data-appearance=blue], .hotSpotDot[data-appearance=blue]::before{
|
|
76
|
+
background-color:var(--sn-theme-color-blue-accent, var(--sn-primitive-color-blue-55, #4387e2));
|
|
77
|
+
}
|
|
78
|
+
.hotSpotDot[data-appearance=violet], .hotSpotDot[data-appearance=violet]::before{
|
|
79
|
+
background-color:var(--sn-theme-color-violet-accent, var(--sn-primitive-color-violet-55, #b163cc));
|
|
80
|
+
}
|
|
81
|
+
.hotSpotDot[data-appearance=pink], .hotSpotDot[data-appearance=pink]::before{
|
|
82
|
+
background-color:var(--sn-theme-color-pink-accent, var(--sn-primitive-color-pink-55, #dd5a8e));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.hotSpotDotContainer{
|
|
86
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
87
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
88
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
89
|
+
display:flex;
|
|
90
|
+
align-items:center;
|
|
91
|
+
justify-content:center;
|
|
92
|
+
box-sizing:border-box;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.hotSpotDotContainerInteractive{
|
|
96
|
+
pointer-events:auto;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@keyframes pulse{
|
|
100
|
+
0%{
|
|
101
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
102
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
103
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
104
|
+
}
|
|
105
|
+
70%{
|
|
106
|
+
width:var(--sn-hotSpot-anatomy-pulse-square, var(--sn-primitive-dimension-16, 16px));
|
|
107
|
+
height:var(--sn-hotSpot-anatomy-pulse-square, var(--sn-primitive-dimension-16, 16px));
|
|
108
|
+
border-radius:var(--sn-hotSpot-anatomy-pulse-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
109
|
+
}
|
|
110
|
+
100%{
|
|
111
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
112
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
113
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.wrapper{
|
|
117
|
+
position:relative;
|
|
118
|
+
box-sizing:border-box;
|
|
119
|
+
width:-moz-fit-content;
|
|
120
|
+
width:fit-content;
|
|
121
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { WithSupportProps } from '@cloud-ru/ds-utils';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { Appearance, Placement } from './types.js';
|
|
4
|
+
export type HotSpotProps = WithSupportProps<{
|
|
5
|
+
/**
|
|
6
|
+
* Внешний вид
|
|
7
|
+
* @default 'primary'
|
|
8
|
+
*/
|
|
9
|
+
appearance?: Appearance;
|
|
10
|
+
/**
|
|
11
|
+
* Анимация пульсации
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
pulse?: boolean;
|
|
15
|
+
/** Время анимации пульсации */
|
|
16
|
+
duration?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Положение относительно children.
|
|
19
|
+
* @default 'right-top'
|
|
20
|
+
*/
|
|
21
|
+
placement?: Placement;
|
|
22
|
+
/** Рендер функция для dot */
|
|
23
|
+
dotRender?(dot: ReactNode): ReactNode;
|
|
24
|
+
/** Вложенный контент */
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
/** Смещение dot по оси X (ось направлена вправо) */
|
|
27
|
+
offsetX?: number | string;
|
|
28
|
+
/** Смещение dot по оси Y (ось направлена вниз) */
|
|
29
|
+
offsetY?: number | string;
|
|
30
|
+
/** Управление состоянием отрисовки */
|
|
31
|
+
enabled?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
wrapperClassName?: string;
|
|
34
|
+
}>;
|
|
35
|
+
export declare function HotSpot({ dotRender, children, offsetX, offsetY, placement, duration, pulse, enabled, appearance, className, wrapperClassName, ...rest }: HotSpotProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { extractSupportProps } from '@cloud-ru/ds-utils';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import styles from './styles.module.css';
|
|
5
|
+
import { TEST_IDS } from './testIds.js';
|
|
6
|
+
import { getOffsetStyle } from './utils.js';
|
|
7
|
+
export function HotSpot({ dotRender, children, offsetX = 0, offsetY = 0, placement = 'right-top', duration = '2s', pulse = true, enabled = true, appearance = 'primary', className, wrapperClassName, ...rest }) {
|
|
8
|
+
if (!enabled) {
|
|
9
|
+
return _jsx(_Fragment, { children: children });
|
|
10
|
+
}
|
|
11
|
+
const dotJSX = (_jsx("div", { className: cn(styles.hotSpotDot, className), "data-appearance": appearance, "data-pulse": pulse || undefined, "data-test-id": TEST_IDS.dot }));
|
|
12
|
+
if (!children) {
|
|
13
|
+
return (_jsx("span", { ...extractSupportProps(rest), className: styles.hotSpotDotContainer, children: dotRender ? dotRender(dotJSX) : dotJSX }));
|
|
14
|
+
}
|
|
15
|
+
return (_jsxs("div", { ...extractSupportProps(rest), className: cn(styles.wrapper, wrapperClassName), style: {
|
|
16
|
+
'--offset-x': getOffsetStyle(offsetX),
|
|
17
|
+
'--offset-y': getOffsetStyle(offsetY),
|
|
18
|
+
'--duration': duration,
|
|
19
|
+
}, children: [children, _jsx("span", { className: styles.dotPlacementContainer, "data-placement": placement, "data-test-id": TEST_IDS.dotContainer, children: _jsx("span", { className: cn(styles.hotSpotDotContainer, dotRender && styles.hotSpotDotContainerInteractive), children: dotRender ? dotRender(dotJSX) : dotJSX }) })] }));
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const APPEARANCE: {
|
|
2
|
+
readonly Primary: "primary";
|
|
3
|
+
readonly Red: "red";
|
|
4
|
+
readonly Orange: "orange";
|
|
5
|
+
readonly Yellow: "yellow";
|
|
6
|
+
readonly Green: "green";
|
|
7
|
+
readonly Blue: "blue";
|
|
8
|
+
readonly Violet: "violet";
|
|
9
|
+
readonly Pink: "pink";
|
|
10
|
+
};
|
|
11
|
+
export declare const PLACEMENT: {
|
|
12
|
+
readonly Left: "left";
|
|
13
|
+
readonly LeftTop: "left-top";
|
|
14
|
+
readonly LeftBottom: "left-bottom";
|
|
15
|
+
readonly Right: "right";
|
|
16
|
+
readonly RightTop: "right-top";
|
|
17
|
+
readonly RightBottom: "right-bottom";
|
|
18
|
+
readonly Center: "center";
|
|
19
|
+
readonly CenterTop: "center-top";
|
|
20
|
+
readonly CenterBottom: "center-bottom";
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const APPEARANCE = {
|
|
2
|
+
Primary: 'primary',
|
|
3
|
+
Red: 'red',
|
|
4
|
+
Orange: 'orange',
|
|
5
|
+
Yellow: 'yellow',
|
|
6
|
+
Green: 'green',
|
|
7
|
+
Blue: 'blue',
|
|
8
|
+
Violet: 'violet',
|
|
9
|
+
Pink: 'pink',
|
|
10
|
+
};
|
|
11
|
+
export const PLACEMENT = {
|
|
12
|
+
Left: 'left',
|
|
13
|
+
LeftTop: 'left-top',
|
|
14
|
+
LeftBottom: 'left-bottom',
|
|
15
|
+
Right: 'right',
|
|
16
|
+
RightTop: 'right-top',
|
|
17
|
+
RightBottom: 'right-bottom',
|
|
18
|
+
Center: 'center',
|
|
19
|
+
CenterTop: 'center-top',
|
|
20
|
+
CenterBottom: 'center-bottom',
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HotSpot.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HotSpot.js';
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
.dotPlacementContainer{
|
|
2
|
+
pointer-events:none;
|
|
3
|
+
position:absolute;
|
|
4
|
+
}
|
|
5
|
+
.dotPlacementContainer[data-placement=left], .dotPlacementContainer[data-placement=left-top], .dotPlacementContainer[data-placement=left-bottom]{
|
|
6
|
+
left:calc(var(--offset-x, 0px) + 0px);
|
|
7
|
+
}
|
|
8
|
+
.dotPlacementContainer[data-placement=right], .dotPlacementContainer[data-placement=right-top], .dotPlacementContainer[data-placement=right-bottom]{
|
|
9
|
+
right:calc(0px - var(--offset-x, 0px) + 0px);
|
|
10
|
+
}
|
|
11
|
+
.dotPlacementContainer[data-placement=left-top], .dotPlacementContainer[data-placement=center-top], .dotPlacementContainer[data-placement=right-top]{
|
|
12
|
+
top:calc(var(--offset-y, 0px) + 0px);
|
|
13
|
+
}
|
|
14
|
+
.dotPlacementContainer[data-placement=left-bottom], .dotPlacementContainer[data-placement=center-bottom], .dotPlacementContainer[data-placement=right-bottom]{
|
|
15
|
+
bottom:calc(0px - var(--offset-y, 0px) + 0px);
|
|
16
|
+
}
|
|
17
|
+
.dotPlacementContainer[data-placement=center], .dotPlacementContainer[data-placement=left], .dotPlacementContainer[data-placement=right]{
|
|
18
|
+
top:calc(var(--offset-y, 0px) + 50%);
|
|
19
|
+
}
|
|
20
|
+
.dotPlacementContainer[data-placement=center], .dotPlacementContainer[data-placement=center-top], .dotPlacementContainer[data-placement=center-bottom]{
|
|
21
|
+
left:calc(var(--offset-x, 0px) + 50%);
|
|
22
|
+
}
|
|
23
|
+
.dotPlacementContainer[data-placement=center]{
|
|
24
|
+
transform:translate(-50%, -50%);
|
|
25
|
+
}
|
|
26
|
+
.dotPlacementContainer[data-placement=left], .dotPlacementContainer[data-placement=right]{
|
|
27
|
+
transform:translateY(-50%);
|
|
28
|
+
}
|
|
29
|
+
.dotPlacementContainer[data-placement=center-top], .dotPlacementContainer[data-placement=center-bottom]{
|
|
30
|
+
transform:translateX(-50%);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.hotSpotDot{
|
|
34
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
35
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
36
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
37
|
+
position:relative;
|
|
38
|
+
}
|
|
39
|
+
.hotSpotDot::after{
|
|
40
|
+
content:"";
|
|
41
|
+
position:absolute;
|
|
42
|
+
top:50%;
|
|
43
|
+
left:50%;
|
|
44
|
+
transform:translate(-50%, -50%);
|
|
45
|
+
width:var(--sn-primitive-dimension-24, 24px);
|
|
46
|
+
height:var(--sn-primitive-dimension-24, 24px);
|
|
47
|
+
}
|
|
48
|
+
.hotSpotDot[data-pulse]::before{
|
|
49
|
+
content:"";
|
|
50
|
+
position:absolute;
|
|
51
|
+
top:50%;
|
|
52
|
+
left:50%;
|
|
53
|
+
transform:translate(-50%, -50%);
|
|
54
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
55
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
56
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
57
|
+
opacity:0.24;
|
|
58
|
+
animation:pulse var(--duration, 2s) infinite;
|
|
59
|
+
}
|
|
60
|
+
.hotSpotDot[data-appearance=primary], .hotSpotDot[data-appearance=primary]::before{
|
|
61
|
+
background-color:var(--sn-theme-color-primary-accent, var(--sn-brand-color-primary-55, var(--sn-brandRole-color-brandA-55, var(--sn-primitive-color-brandA-55, #389f74))));
|
|
62
|
+
}
|
|
63
|
+
.hotSpotDot[data-appearance=red], .hotSpotDot[data-appearance=red]::before{
|
|
64
|
+
background-color:var(--sn-theme-color-red-accent, var(--sn-primitive-color-red-55, #d52e33));
|
|
65
|
+
}
|
|
66
|
+
.hotSpotDot[data-appearance=orange], .hotSpotDot[data-appearance=orange]::before{
|
|
67
|
+
background-color:var(--sn-theme-color-orange-accent, var(--sn-primitive-color-orange-55, #f57e1f));
|
|
68
|
+
}
|
|
69
|
+
.hotSpotDot[data-appearance=yellow], .hotSpotDot[data-appearance=yellow]::before{
|
|
70
|
+
background-color:var(--sn-theme-color-yellow-accent, var(--sn-primitive-color-yellow-55, #f3b917));
|
|
71
|
+
}
|
|
72
|
+
.hotSpotDot[data-appearance=green], .hotSpotDot[data-appearance=green]::before{
|
|
73
|
+
background-color:var(--sn-theme-color-green-accent, var(--sn-primitive-color-green-55, #41b954));
|
|
74
|
+
}
|
|
75
|
+
.hotSpotDot[data-appearance=blue], .hotSpotDot[data-appearance=blue]::before{
|
|
76
|
+
background-color:var(--sn-theme-color-blue-accent, var(--sn-primitive-color-blue-55, #4387e2));
|
|
77
|
+
}
|
|
78
|
+
.hotSpotDot[data-appearance=violet], .hotSpotDot[data-appearance=violet]::before{
|
|
79
|
+
background-color:var(--sn-theme-color-violet-accent, var(--sn-primitive-color-violet-55, #b163cc));
|
|
80
|
+
}
|
|
81
|
+
.hotSpotDot[data-appearance=pink], .hotSpotDot[data-appearance=pink]::before{
|
|
82
|
+
background-color:var(--sn-theme-color-pink-accent, var(--sn-primitive-color-pink-55, #dd5a8e));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.hotSpotDotContainer{
|
|
86
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
87
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
88
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
89
|
+
display:flex;
|
|
90
|
+
align-items:center;
|
|
91
|
+
justify-content:center;
|
|
92
|
+
box-sizing:border-box;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.hotSpotDotContainerInteractive{
|
|
96
|
+
pointer-events:auto;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@keyframes pulse{
|
|
100
|
+
0%{
|
|
101
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
102
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
103
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
104
|
+
}
|
|
105
|
+
70%{
|
|
106
|
+
width:var(--sn-hotSpot-anatomy-pulse-square, var(--sn-primitive-dimension-16, 16px));
|
|
107
|
+
height:var(--sn-hotSpot-anatomy-pulse-square, var(--sn-primitive-dimension-16, 16px));
|
|
108
|
+
border-radius:var(--sn-hotSpot-anatomy-pulse-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
109
|
+
}
|
|
110
|
+
100%{
|
|
111
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
112
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
113
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.wrapper{
|
|
117
|
+
position:relative;
|
|
118
|
+
box-sizing:border-box;
|
|
119
|
+
width:-moz-fit-content;
|
|
120
|
+
width:fit-content;
|
|
121
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getOffsetStyle(offset?: number | string): string;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
.dotPlacementContainer{
|
|
2
|
+
pointer-events:none;
|
|
3
|
+
position:absolute;
|
|
4
|
+
}
|
|
5
|
+
.dotPlacementContainer[data-placement=left], .dotPlacementContainer[data-placement=left-top], .dotPlacementContainer[data-placement=left-bottom]{
|
|
6
|
+
left:calc(var(--offset-x, 0px) + 0px);
|
|
7
|
+
}
|
|
8
|
+
.dotPlacementContainer[data-placement=right], .dotPlacementContainer[data-placement=right-top], .dotPlacementContainer[data-placement=right-bottom]{
|
|
9
|
+
right:calc(0px - var(--offset-x, 0px) + 0px);
|
|
10
|
+
}
|
|
11
|
+
.dotPlacementContainer[data-placement=left-top], .dotPlacementContainer[data-placement=center-top], .dotPlacementContainer[data-placement=right-top]{
|
|
12
|
+
top:calc(var(--offset-y, 0px) + 0px);
|
|
13
|
+
}
|
|
14
|
+
.dotPlacementContainer[data-placement=left-bottom], .dotPlacementContainer[data-placement=center-bottom], .dotPlacementContainer[data-placement=right-bottom]{
|
|
15
|
+
bottom:calc(0px - var(--offset-y, 0px) + 0px);
|
|
16
|
+
}
|
|
17
|
+
.dotPlacementContainer[data-placement=center], .dotPlacementContainer[data-placement=left], .dotPlacementContainer[data-placement=right]{
|
|
18
|
+
top:calc(var(--offset-y, 0px) + 50%);
|
|
19
|
+
}
|
|
20
|
+
.dotPlacementContainer[data-placement=center], .dotPlacementContainer[data-placement=center-top], .dotPlacementContainer[data-placement=center-bottom]{
|
|
21
|
+
left:calc(var(--offset-x, 0px) + 50%);
|
|
22
|
+
}
|
|
23
|
+
.dotPlacementContainer[data-placement=center]{
|
|
24
|
+
transform:translate(-50%, -50%);
|
|
25
|
+
}
|
|
26
|
+
.dotPlacementContainer[data-placement=left], .dotPlacementContainer[data-placement=right]{
|
|
27
|
+
transform:translateY(-50%);
|
|
28
|
+
}
|
|
29
|
+
.dotPlacementContainer[data-placement=center-top], .dotPlacementContainer[data-placement=center-bottom]{
|
|
30
|
+
transform:translateX(-50%);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.hotSpotDot{
|
|
34
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
35
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
36
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
37
|
+
position:relative;
|
|
38
|
+
}
|
|
39
|
+
.hotSpotDot::after{
|
|
40
|
+
content:"";
|
|
41
|
+
position:absolute;
|
|
42
|
+
top:50%;
|
|
43
|
+
left:50%;
|
|
44
|
+
transform:translate(-50%, -50%);
|
|
45
|
+
width:var(--sn-primitive-dimension-24, 24px);
|
|
46
|
+
height:var(--sn-primitive-dimension-24, 24px);
|
|
47
|
+
}
|
|
48
|
+
.hotSpotDot[data-pulse]::before{
|
|
49
|
+
content:"";
|
|
50
|
+
position:absolute;
|
|
51
|
+
top:50%;
|
|
52
|
+
left:50%;
|
|
53
|
+
transform:translate(-50%, -50%);
|
|
54
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
55
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
56
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
57
|
+
opacity:0.24;
|
|
58
|
+
animation:pulse var(--duration, 2s) infinite;
|
|
59
|
+
}
|
|
60
|
+
.hotSpotDot[data-appearance=primary], .hotSpotDot[data-appearance=primary]::before{
|
|
61
|
+
background-color:var(--sn-theme-color-primary-accent, var(--sn-brand-color-primary-55, var(--sn-brandRole-color-brandA-55, var(--sn-primitive-color-brandA-55, #389f74))));
|
|
62
|
+
}
|
|
63
|
+
.hotSpotDot[data-appearance=red], .hotSpotDot[data-appearance=red]::before{
|
|
64
|
+
background-color:var(--sn-theme-color-red-accent, var(--sn-primitive-color-red-55, #d52e33));
|
|
65
|
+
}
|
|
66
|
+
.hotSpotDot[data-appearance=orange], .hotSpotDot[data-appearance=orange]::before{
|
|
67
|
+
background-color:var(--sn-theme-color-orange-accent, var(--sn-primitive-color-orange-55, #f57e1f));
|
|
68
|
+
}
|
|
69
|
+
.hotSpotDot[data-appearance=yellow], .hotSpotDot[data-appearance=yellow]::before{
|
|
70
|
+
background-color:var(--sn-theme-color-yellow-accent, var(--sn-primitive-color-yellow-55, #f3b917));
|
|
71
|
+
}
|
|
72
|
+
.hotSpotDot[data-appearance=green], .hotSpotDot[data-appearance=green]::before{
|
|
73
|
+
background-color:var(--sn-theme-color-green-accent, var(--sn-primitive-color-green-55, #41b954));
|
|
74
|
+
}
|
|
75
|
+
.hotSpotDot[data-appearance=blue], .hotSpotDot[data-appearance=blue]::before{
|
|
76
|
+
background-color:var(--sn-theme-color-blue-accent, var(--sn-primitive-color-blue-55, #4387e2));
|
|
77
|
+
}
|
|
78
|
+
.hotSpotDot[data-appearance=violet], .hotSpotDot[data-appearance=violet]::before{
|
|
79
|
+
background-color:var(--sn-theme-color-violet-accent, var(--sn-primitive-color-violet-55, #b163cc));
|
|
80
|
+
}
|
|
81
|
+
.hotSpotDot[data-appearance=pink], .hotSpotDot[data-appearance=pink]::before{
|
|
82
|
+
background-color:var(--sn-theme-color-pink-accent, var(--sn-primitive-color-pink-55, #dd5a8e));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.hotSpotDotContainer{
|
|
86
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
87
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
88
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
89
|
+
display:flex;
|
|
90
|
+
align-items:center;
|
|
91
|
+
justify-content:center;
|
|
92
|
+
box-sizing:border-box;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.hotSpotDotContainerInteractive{
|
|
96
|
+
pointer-events:auto;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@keyframes pulse{
|
|
100
|
+
0%{
|
|
101
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
102
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
103
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
104
|
+
}
|
|
105
|
+
70%{
|
|
106
|
+
width:var(--sn-hotSpot-anatomy-pulse-square, var(--sn-primitive-dimension-16, 16px));
|
|
107
|
+
height:var(--sn-hotSpot-anatomy-pulse-square, var(--sn-primitive-dimension-16, 16px));
|
|
108
|
+
border-radius:var(--sn-hotSpot-anatomy-pulse-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
109
|
+
}
|
|
110
|
+
100%{
|
|
111
|
+
width:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
112
|
+
height:var(--sn-hotSpot-anatomy-dot-square, var(--sn-primitive-dimension-8, 8px));
|
|
113
|
+
border-radius:var(--sn-hotSpot-anatomy-dot-borderRadius, var(--sn-primitive-dimension-full, 10000px));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.wrapper{
|
|
117
|
+
position:relative;
|
|
118
|
+
box-sizing:border-box;
|
|
119
|
+
width:-moz-fit-content;
|
|
120
|
+
width:fit-content;
|
|
121
|
+
}
|