@olenbetong/synergi-react 0.6.46 → 0.7.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/dist/esm/ob.react.js +1 -17
- package/dist/esm/ob.react.min.css.map +1 -1
- package/dist/esm/ob.react.min.js +1 -1
- package/dist/esm/ob.react.min.js.map +4 -4
- package/dist/iife/ob.react.js +1 -14
- package/dist/iife/ob.react.min.css.map +1 -1
- package/dist/iife/ob.react.min.js +1 -1
- package/dist/iife/ob.react.min.js.map +4 -4
- package/dist/styles/styles.css.map +1 -1
- package/es/DateNavigator/index.js +2 -2
- package/es/Portal/index.js +1 -1
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -1
- package/package.json +3 -4
- package/src/Checkbox/index.scss +78 -78
- package/src/Checkbox/index.tsx +62 -62
- package/src/ColorCard/index.scss +135 -135
- package/src/ColorCard/index.tsx +38 -38
- package/src/DateNavigator/index.scss +33 -33
- package/src/DateNavigator/index.tsx +66 -66
- package/src/LinkedCardList/index.scss +49 -49
- package/src/LinkedCardList/index.tsx +24 -24
- package/src/PageBanner/index.scss +71 -71
- package/src/PageBanner/index.tsx +41 -41
- package/src/Portal/index.tsx +24 -24
- package/src/ProgressBar/index.scss +76 -76
- package/src/ProgressBar/index.tsx +3 -3
- package/src/Sidebar/index.scss +41 -41
- package/src/Sidebar/index.tsx +107 -107
- package/src/Spinner/index.scss +45 -45
- package/src/Spinner/index.tsx +11 -11
- package/src/SplitContainer/index.scss +23 -23
- package/src/SplitContainer/index.tsx +222 -222
- package/src/ValueToggle/index.scss +37 -37
- package/src/ValueToggle/index.tsx +54 -54
- package/src/global.d.ts +1 -1
- package/src/index.ts +10 -11
- package/src/styles/_mixins.scss +16 -16
- package/src/useTranslation/index.ts +58 -58
|
@@ -1,86 +1,86 @@
|
|
|
1
1
|
@import "../styles/variables";
|
|
2
2
|
|
|
3
3
|
.ObProgressBar-root {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
height: 1.5em;
|
|
5
|
+
width: 100%;
|
|
6
|
+
appearance: none;
|
|
7
|
+
-webkit-appearance: none;
|
|
8
|
+
background-color: whiteSmoke;
|
|
9
|
+
border: none;
|
|
10
|
+
border-radius: 3px;
|
|
11
|
+
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2) inset;
|
|
12
|
+
color: royalblue;
|
|
13
|
+
position: relative;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
&::-webkit-progress-bar {
|
|
16
|
+
background-color: whiteSmoke;
|
|
17
|
+
border-radius: 3px;
|
|
18
|
+
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2) inset;
|
|
19
|
+
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
21
|
+
&::-webkit-progress-value {
|
|
22
|
+
background-image: linear-gradient(
|
|
23
|
+
135deg,
|
|
24
|
+
transparent,
|
|
25
|
+
transparent 33%,
|
|
26
|
+
rgba(0, 0, 0, 0.1) 33%,
|
|
27
|
+
rgba(0, 0, 0, 0.1) 66%,
|
|
28
|
+
transparent 66%
|
|
29
|
+
),
|
|
30
|
+
linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),
|
|
31
|
+
linear-gradient(left, var(--brand-primary, $brand-primary), var(--brand-light, $brand-light));
|
|
32
|
+
background-image: -webkit-linear-gradient(
|
|
33
|
+
135deg,
|
|
34
|
+
transparent,
|
|
35
|
+
transparent 33%,
|
|
36
|
+
rgba(0, 0, 0, 0.1) 33%,
|
|
37
|
+
rgba(0, 0, 0, 0.1) 66%,
|
|
38
|
+
transparent 66%
|
|
39
|
+
),
|
|
40
|
+
-webkit-linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),
|
|
41
|
+
-webkit-linear-gradient(left, var(--brand-primary), $brand-primary, var(--brand-light, $brand-light));
|
|
42
|
+
background-size: 35px 20px, 100% 100%, 100% 100%;
|
|
43
|
+
border-radius: 3px;
|
|
44
|
+
position: relative;
|
|
45
|
+
transition: width 0.5s ease-out;
|
|
46
|
+
}
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
&::-webkit-progress-value:after {
|
|
49
|
+
background-color: white;
|
|
50
|
+
content: "";
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
border-radius: 100%;
|
|
53
|
+
height: 5px;
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
position: absolute;
|
|
56
|
+
right: 7px;
|
|
57
|
+
top: 7px;
|
|
58
|
+
width: 5px;
|
|
59
|
+
}
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
61
|
+
&::-moz-progress-bar {
|
|
62
|
+
background-image: linear-gradient(
|
|
63
|
+
135deg,
|
|
64
|
+
transparent,
|
|
65
|
+
transparent 33%,
|
|
66
|
+
rgba(0, 0, 0, 0.1) 33%,
|
|
67
|
+
rgba(0, 0, 0, 0.1) 66%,
|
|
68
|
+
transparent 66%
|
|
69
|
+
),
|
|
70
|
+
linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),
|
|
71
|
+
linear-gradient(left, var(--brand-primary), var(--brand-light));
|
|
72
|
+
background-image: -moz-linear-gradient(
|
|
73
|
+
135deg,
|
|
74
|
+
transparent,
|
|
75
|
+
transparent 33%,
|
|
76
|
+
rgba(0, 0, 0, 0.1) 33%,
|
|
77
|
+
rgba(0, 0, 0, 0.1) 66%,
|
|
78
|
+
transparent 66%
|
|
79
|
+
),
|
|
80
|
+
-moz-linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),
|
|
81
|
+
-moz-linear-gradient(left, var(--brand-primary), var(--brand-light));
|
|
82
|
+
background-size: 35px 20px, 100% 100%, 100% 100%;
|
|
83
|
+
border-radius: 3px;
|
|
84
|
+
transition: width 0.5s ease-out;
|
|
85
|
+
}
|
|
86
86
|
}
|
|
@@ -6,8 +6,8 @@ import { forwardRef } from "react";
|
|
|
6
6
|
export type ProgressBarProps = React.HTMLProps<HTMLProgressElement>;
|
|
7
7
|
|
|
8
8
|
export const ProgressBar = forwardRef<HTMLProgressElement, ProgressBarProps>(function ProgressBar(
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
{ className, ...props }: ProgressBarProps,
|
|
10
|
+
ref
|
|
11
11
|
) {
|
|
12
|
-
|
|
12
|
+
return <progress className={clsx("ObProgressBar-root", className)} {...props} ref={ref} />;
|
|
13
13
|
});
|
package/src/Sidebar/index.scss
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
.ObSidebar-root {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
position: fixed;
|
|
3
|
+
bottom: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
top: 0;
|
|
6
|
+
z-index: 2;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
background-color: white;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
transform: translateX(-100%);
|
|
11
|
+
transition: transform 0.2s ease-out;
|
|
12
|
+
will-change: transform;
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
&.Ob-right {
|
|
15
|
+
left: unset;
|
|
16
|
+
right: 0;
|
|
17
|
+
transform: translateX(100%);
|
|
18
|
+
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
overflow-y: auto;
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
&.Ob-open {
|
|
23
|
+
transform: translateX(0);
|
|
24
|
+
}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
&.ObSidebar-shadow {
|
|
27
|
+
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
&.Ob-right {
|
|
30
|
+
box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.ObSidebar-overlay {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
position: fixed;
|
|
37
|
+
bottom: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
right: 0;
|
|
40
|
+
top: 0;
|
|
41
|
+
z-index: 1;
|
|
42
|
+
|
|
43
|
+
opacity: 0;
|
|
44
|
+
visibility: hidden;
|
|
45
|
+
|
|
46
|
+
transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
|
|
47
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
48
|
+
|
|
49
|
+
&.Ob-open {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
visibility: visible;
|
|
52
|
+
}
|
|
53
53
|
}
|
package/src/Sidebar/index.tsx
CHANGED
|
@@ -4,114 +4,114 @@ import clsx from "clsx";
|
|
|
4
4
|
import { useEffect, useRef, useState } from "react";
|
|
5
5
|
|
|
6
6
|
export type SidebarProps = React.HTMLProps<HTMLDivElement> & {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
open?: boolean;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
overlayProps: React.HTMLProps<HTMLDivElement>;
|
|
10
|
+
pullRight?: boolean;
|
|
11
|
+
shadow?: boolean;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export function Sidebar(props: SidebarProps) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
15
|
+
const {
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
open = false,
|
|
19
|
+
onClose = () => {},
|
|
20
|
+
overlayProps = {},
|
|
21
|
+
pullRight = false,
|
|
22
|
+
shadow = true,
|
|
23
|
+
...other
|
|
24
|
+
} = props;
|
|
25
|
+
|
|
26
|
+
const [hidden, setHidden] = useState(!open);
|
|
27
|
+
const sidebar = useRef<HTMLDivElement>(null);
|
|
28
|
+
const prevFocus = useRef<HTMLElement | null>(null);
|
|
29
|
+
|
|
30
|
+
function closeSidebar() {
|
|
31
|
+
if (open && typeof onClose === "function") {
|
|
32
|
+
onClose();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
let element = sidebar.current;
|
|
38
|
+
|
|
39
|
+
if (open) {
|
|
40
|
+
setHidden(false);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function toggleHiddenContent() {
|
|
44
|
+
setHidden(!open);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
element?.addEventListener("transitionend", toggleHiddenContent);
|
|
48
|
+
|
|
49
|
+
return () => element?.removeEventListener("transitionend", toggleHiddenContent);
|
|
50
|
+
}, [open]);
|
|
51
|
+
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
function handleCloseSidebar(evt) {
|
|
54
|
+
if (evt.key === "Escape") {
|
|
55
|
+
evt.stopPropagation();
|
|
56
|
+
closeSidebar();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
window.addEventListener("keyup", handleCloseSidebar);
|
|
61
|
+
|
|
62
|
+
return () => window.removeEventListener("keyup", handleCloseSidebar);
|
|
63
|
+
}, [open, onClose]);
|
|
64
|
+
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (open) {
|
|
67
|
+
prevFocus.current = document.activeElement as HTMLElement | null;
|
|
68
|
+
|
|
69
|
+
const firstFocusable = sidebar.current?.querySelector(
|
|
70
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
71
|
+
) as HTMLElement | undefined;
|
|
72
|
+
|
|
73
|
+
if (firstFocusable) {
|
|
74
|
+
firstFocusable.focus();
|
|
75
|
+
}
|
|
76
|
+
} else if (prevFocus.current) {
|
|
77
|
+
prevFocus.current.focus();
|
|
78
|
+
prevFocus.current = null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
let prevFocusElem = prevFocus.current;
|
|
82
|
+
|
|
83
|
+
return () => {
|
|
84
|
+
if (open && prevFocusElem) {
|
|
85
|
+
prevFocusElem.focus();
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}, [open]);
|
|
89
|
+
|
|
90
|
+
const { className: overlayClassName, ...overlayOther } = overlayProps;
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<>
|
|
94
|
+
<div
|
|
95
|
+
className={clsx(
|
|
96
|
+
"ObSidebar-root",
|
|
97
|
+
open && "Ob-open",
|
|
98
|
+
pullRight && "Ob-right",
|
|
99
|
+
shadow && "ObSidebar-shadow",
|
|
100
|
+
className
|
|
101
|
+
)}
|
|
102
|
+
ref={sidebar}
|
|
103
|
+
tabIndex={-1}
|
|
104
|
+
{...other}
|
|
105
|
+
>
|
|
106
|
+
{(open || !hidden) && children}
|
|
107
|
+
</div>
|
|
108
|
+
<div
|
|
109
|
+
role="presentation"
|
|
110
|
+
tabIndex={-1}
|
|
111
|
+
className={clsx("ObSidebar-overlay", open && "Ob-open", overlayClassName)}
|
|
112
|
+
onClick={closeSidebar}
|
|
113
|
+
{...overlayOther}
|
|
114
|
+
/>
|
|
115
|
+
</>
|
|
116
|
+
);
|
|
117
117
|
}
|
package/src/Spinner/index.scss
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
$bullet-size: 0.5em;
|
|
2
2
|
|
|
3
3
|
.ObSpinner-root {
|
|
4
|
-
|
|
4
|
+
display: inline-block;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.ObSpinner-fullPage {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
height: 100vh;
|
|
13
|
+
width: 100vw;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.ObSpinner-spinner {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
display: inline-block;
|
|
18
|
+
height: $bullet-size * 1.5;
|
|
19
|
+
position: relative;
|
|
20
|
+
width: $bullet-size * 5;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.ObSpinner-bullet {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
25
|
+
background: #666;
|
|
26
|
+
border-radius: 50%;
|
|
27
|
+
height: $bullet-size;
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0.2rem;
|
|
30
|
+
width: $bullet-size;
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
&:nth-child(1) {
|
|
33
|
+
animation: scaleAnimation 0.6s infinite ease-in-out;
|
|
34
|
+
left: $bullet-size * 0.5;
|
|
35
|
+
}
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
&:nth-child(2) {
|
|
38
|
+
animation: translateAnimation 0.6s infinite ease-in-out;
|
|
39
|
+
left: $bullet-size * 0.5;
|
|
40
|
+
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
&:nth-child(3) {
|
|
43
|
+
animation: translateAnimation 0.6s infinite ease-in-out;
|
|
44
|
+
left: $bullet-size * 2.4;
|
|
45
|
+
}
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
&:nth-child(4) {
|
|
48
|
+
animation: scaleAnimation 0.6s infinite ease-in-out reverse;
|
|
49
|
+
left: $bullet-size * 4;
|
|
50
|
+
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
@keyframes scaleAnimation {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
from {
|
|
55
|
+
transform: scale(0);
|
|
56
|
+
}
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
to {
|
|
59
|
+
transform: scale(1);
|
|
60
|
+
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
@keyframes translateAnimation {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
from {
|
|
65
|
+
transform: translate(0, 0);
|
|
66
|
+
}
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
to {
|
|
69
|
+
transform: translate($bullet-size * 1.65, 0);
|
|
70
|
+
}
|
|
71
71
|
}
|
package/src/Spinner/index.tsx
CHANGED
|
@@ -4,18 +4,18 @@ import clsx from "clsx";
|
|
|
4
4
|
import React from "react";
|
|
5
5
|
|
|
6
6
|
export type SpinnerProps = React.HTMLProps<HTMLDivElement> & {
|
|
7
|
-
|
|
7
|
+
fullPage?: boolean;
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export function Spinner({ className = "", fullPage = false, ...rest }) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
return (
|
|
12
|
+
<div className={clsx(className, fullPage ? "ObSpinner-fullPage" : "ObSpinner-wrapper")} {...rest}>
|
|
13
|
+
<div className={"ObSpinner-spinner"}>
|
|
14
|
+
<div className={"ObSpinner-bullet"} />
|
|
15
|
+
<div className={"ObSpinner-bullet"} />
|
|
16
|
+
<div className={"ObSpinner-bullet"} />
|
|
17
|
+
<div className={"ObSpinner-bullet"} />
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
21
|
}
|