@seamapi/react 1.60.3 → 1.60.4
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/README.md +1 -1
- package/dist/elements.js +9 -9
- package/dist/elements.js.map +1 -1
- package/dist/index.css +56 -4
- package/dist/index.css.map +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.min.css.map +1 -1
- package/lib/icons/Search.js +2 -2
- package/lib/icons/Search.js.map +1 -1
- package/lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.js +1 -1
- package/lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.js.map +1 -1
- package/lib/ui/LoadingToast/LoadingToast.d.ts +9 -0
- package/lib/ui/LoadingToast/LoadingToast.js +26 -0
- package/lib/ui/LoadingToast/LoadingToast.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/lib/icons/Search.tsx +7 -7
- package/src/lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.tsx +1 -1
- package/src/lib/ui/LoadingToast/LoadingToast.tsx +53 -0
- package/src/lib/version.ts +1 -1
- package/src/styles/_inputs.scss +13 -1
- package/src/styles/_loading_toast.scss +59 -0
- package/src/styles/_main.scss +2 -0
- package/src/styles/_spinner.scss +1 -1
- package/src/styles/_supported-device-table.scss +2 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { CheckBlackIcon } from '../../../lib/icons/CheckBlack.js';
|
|
5
|
+
import { Spinner } from '../../../lib/ui/Spinner/Spinner.js';
|
|
6
|
+
export function LoadingToast({ isLoading = true, label, top, left, }) {
|
|
7
|
+
const [hidden, setHidden] = useState(false);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (!isLoading) {
|
|
10
|
+
const timeout = globalThis.setTimeout(() => {
|
|
11
|
+
setHidden(true);
|
|
12
|
+
}, 1000);
|
|
13
|
+
return () => {
|
|
14
|
+
globalThis.clearTimeout(timeout);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
setHidden(false);
|
|
18
|
+
return () => {
|
|
19
|
+
// noop
|
|
20
|
+
};
|
|
21
|
+
}, [isLoading]);
|
|
22
|
+
return (_jsxs("div", { className: classNames('seam-loading-toast', {
|
|
23
|
+
'seam-loading-toast-hide': hidden,
|
|
24
|
+
}), style: { top, left }, children: [_jsx("div", { className: 'seam-loading-toast-icon-wrap', children: isLoading ? _jsx(Spinner, { size: 'small' }) : _jsx(CheckBlackIcon, {}) }), _jsx("p", { className: 'seam-loading-toast-text', children: label })] }));
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=LoadingToast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingToast.js","sourceRoot":"","sources":["../../../src/lib/ui/LoadingToast/LoadingToast.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AASnD,MAAM,UAAU,YAAY,CAAC,EAC3B,SAAS,GAAG,IAAI,EAChB,KAAK,EACL,GAAG,EACH,IAAI,GACc;IAClB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAE3C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC,GAAG,EAAE;gBACzC,SAAS,CAAC,IAAI,CAAC,CAAA;YACjB,CAAC,EAAE,IAAI,CAAC,CAAA;YAER,OAAO,GAAG,EAAE;gBACV,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;YAClC,CAAC,CAAA;SACF;QAED,SAAS,CAAC,KAAK,CAAC,CAAA;QAEhB,OAAO,GAAG,EAAE;YACV,OAAO;QACT,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IAEf,OAAO,CACL,eACE,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE;YAC1C,yBAAyB,EAAE,MAAM;SAClC,CAAC,EACF,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,aAEpB,cAAK,SAAS,EAAC,8BAA8B,YAC1C,SAAS,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,IAAI,EAAC,OAAO,GAAG,CAAC,CAAC,CAAC,KAAC,cAAc,KAAG,GACtD,EACN,YAAG,SAAS,EAAC,yBAAyB,YAAE,KAAK,GAAK,IAC9C,CACP,CAAA;AACH,CAAC"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const seamapiReactVersion = "1.60.
|
|
1
|
+
declare const seamapiReactVersion = "1.60.4";
|
|
2
2
|
export default seamapiReactVersion;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
package/src/lib/icons/Search.tsx
CHANGED
|
@@ -7,15 +7,15 @@ export function SearchIcon(props: SVGProps<SVGSVGElement>): JSX.Element {
|
|
|
7
7
|
return (
|
|
8
8
|
<svg
|
|
9
9
|
xmlns='http://www.w3.org/2000/svg'
|
|
10
|
-
width={
|
|
11
|
-
height={
|
|
10
|
+
width={24}
|
|
11
|
+
height={25}
|
|
12
12
|
fill='none'
|
|
13
13
|
{...props}
|
|
14
14
|
>
|
|
15
15
|
<mask
|
|
16
16
|
id='search_svg__a'
|
|
17
|
-
width={
|
|
18
|
-
height={
|
|
17
|
+
width={24}
|
|
18
|
+
height={25}
|
|
19
19
|
x={0}
|
|
20
20
|
y={0}
|
|
21
21
|
maskUnits='userSpaceOnUse'
|
|
@@ -23,12 +23,12 @@ export function SearchIcon(props: SVGProps<SVGSVGElement>): JSX.Element {
|
|
|
23
23
|
maskType: 'alpha',
|
|
24
24
|
}}
|
|
25
25
|
>
|
|
26
|
-
<path fill='#D9D9D9' d='M0
|
|
26
|
+
<path fill='#D9D9D9' d='M0 .988h24v24H0z' />
|
|
27
27
|
</mask>
|
|
28
28
|
<g mask='url(#search_svg__a)'>
|
|
29
29
|
<path
|
|
30
|
-
fill='#
|
|
31
|
-
d='
|
|
30
|
+
fill='#232B3A'
|
|
31
|
+
d='m19.6 21.988-6.3-6.3a6.096 6.096 0 0 1-3.8 1.3c-1.817 0-3.354-.629-4.612-1.887C3.629 13.843 3 12.305 3 10.488c0-1.816.63-3.354 1.888-4.613C6.146 4.617 7.683 3.988 9.5 3.988c1.817 0 3.354.63 4.613 1.887C15.371 7.134 16 8.672 16 10.488a6.096 6.096 0 0 1-1.3 3.8l6.3 6.3-1.4 1.4Zm-10.1-7c1.25 0 2.313-.437 3.188-1.312S14 11.738 14 10.488c0-1.25-.437-2.312-1.312-3.188-.875-.874-1.938-1.312-3.188-1.312-1.25 0-2.313.438-3.188 1.312C5.437 8.176 5 9.238 5 10.488c0 1.25.437 2.313 1.312 3.188S8.25 14.988 9.5 14.988Z'
|
|
32
32
|
/>
|
|
33
33
|
</g>
|
|
34
34
|
</svg>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import classNames from 'classnames'
|
|
2
|
+
import { useEffect, useState } from 'react'
|
|
3
|
+
|
|
4
|
+
import { CheckBlackIcon } from 'lib/icons/CheckBlack.js'
|
|
5
|
+
import { Spinner } from 'lib/ui/Spinner/Spinner.js'
|
|
6
|
+
|
|
7
|
+
interface LoadingToastProps {
|
|
8
|
+
isLoading: boolean
|
|
9
|
+
label: string
|
|
10
|
+
top?: number
|
|
11
|
+
left?: number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function LoadingToast({
|
|
15
|
+
isLoading = true,
|
|
16
|
+
label,
|
|
17
|
+
top,
|
|
18
|
+
left,
|
|
19
|
+
}: LoadingToastProps): JSX.Element {
|
|
20
|
+
const [hidden, setHidden] = useState(false)
|
|
21
|
+
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (!isLoading) {
|
|
24
|
+
const timeout = globalThis.setTimeout(() => {
|
|
25
|
+
setHidden(true)
|
|
26
|
+
}, 1000)
|
|
27
|
+
|
|
28
|
+
return () => {
|
|
29
|
+
globalThis.clearTimeout(timeout)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
setHidden(false)
|
|
34
|
+
|
|
35
|
+
return () => {
|
|
36
|
+
// noop
|
|
37
|
+
}
|
|
38
|
+
}, [isLoading])
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<div
|
|
42
|
+
className={classNames('seam-loading-toast', {
|
|
43
|
+
'seam-loading-toast-hide': hidden,
|
|
44
|
+
})}
|
|
45
|
+
style={{ top, left }}
|
|
46
|
+
>
|
|
47
|
+
<div className='seam-loading-toast-icon-wrap'>
|
|
48
|
+
{isLoading ? <Spinner size='small' /> : <CheckBlackIcon />}
|
|
49
|
+
</div>
|
|
50
|
+
<p className='seam-loading-toast-text'>{label}</p>
|
|
51
|
+
</div>
|
|
52
|
+
)
|
|
53
|
+
}
|
package/src/lib/version.ts
CHANGED
package/src/styles/_inputs.scss
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
@use './colors';
|
|
2
2
|
@use './typography';
|
|
3
3
|
|
|
4
|
+
@mixin search-text-field {
|
|
5
|
+
.seam-search-text-field {
|
|
6
|
+
svg {
|
|
7
|
+
* {
|
|
8
|
+
fill: colors.$text-gray-2;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
4
14
|
@mixin text-field {
|
|
5
15
|
.seam-text-field {
|
|
6
16
|
> .seam-main {
|
|
17
|
+
background: colors.$white;
|
|
7
18
|
border: 1px solid colors.$text-gray-3;
|
|
8
19
|
border-radius: 8px;
|
|
9
20
|
display: flex;
|
|
@@ -24,6 +35,7 @@
|
|
|
24
35
|
border: 0;
|
|
25
36
|
width: 100%;
|
|
26
37
|
border-radius: 8px;
|
|
38
|
+
font-size: 16px;
|
|
27
39
|
|
|
28
40
|
@include typography.font-family;
|
|
29
41
|
|
|
@@ -92,7 +104,6 @@
|
|
|
92
104
|
|
|
93
105
|
> .seam-text-field-input {
|
|
94
106
|
height: 48px;
|
|
95
|
-
font-size: 16px;
|
|
96
107
|
}
|
|
97
108
|
}
|
|
98
109
|
}
|
|
@@ -111,4 +122,5 @@
|
|
|
111
122
|
|
|
112
123
|
@mixin all {
|
|
113
124
|
@include text-field;
|
|
125
|
+
@include search-text-field;
|
|
114
126
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@use './colors';
|
|
2
|
+
|
|
3
|
+
@keyframes scale-in {
|
|
4
|
+
0% {
|
|
5
|
+
transform: scale(0.5);
|
|
6
|
+
opacity: 0;
|
|
7
|
+
visibility: hidden;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
100% {
|
|
11
|
+
transform: scale(1);
|
|
12
|
+
opacity: 1;
|
|
13
|
+
visibility: visible;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@mixin all {
|
|
18
|
+
.seam-loading-toast {
|
|
19
|
+
height: 32px;
|
|
20
|
+
padding: 0 10px;
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
flex-direction: row;
|
|
25
|
+
border-radius: 6px;
|
|
26
|
+
background: colors.$bg-a;
|
|
27
|
+
box-shadow:
|
|
28
|
+
0 1px 5px 0 rgb(24 29 37 / 6%),
|
|
29
|
+
0 0 1px 0 rgb(24 29 37 / 25%);
|
|
30
|
+
gap: 8px;
|
|
31
|
+
will-change: transform;
|
|
32
|
+
animation: scale-in 0.2s cubic-bezier(0.22, 1, 0.36, 1);
|
|
33
|
+
transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
position: absolute;
|
|
36
|
+
z-index: 9;
|
|
37
|
+
|
|
38
|
+
&.seam-loading-toast-hide {
|
|
39
|
+
transform: scale(0.5);
|
|
40
|
+
opacity: 0;
|
|
41
|
+
visibility: hidden;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.seam-loading-toast-icon-wrap {
|
|
45
|
+
width: 18px;
|
|
46
|
+
height: 18px;
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: center;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.seam-loading-toast-text {
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
font-weight: 400;
|
|
55
|
+
line-height: 1;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
package/src/styles/_main.scss
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
@use './alert';
|
|
6
6
|
@use './buttons';
|
|
7
7
|
@use './layout';
|
|
8
|
+
@use './loading_toast';
|
|
8
9
|
@use './colors';
|
|
9
10
|
@use './icons';
|
|
10
11
|
@use './menus';
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
@include form-field.all;
|
|
39
40
|
@include buttons.all;
|
|
40
41
|
@include layout.all;
|
|
42
|
+
@include loading_toast.all;
|
|
41
43
|
@include icons.all;
|
|
42
44
|
@include menus.all;
|
|
43
45
|
@include checkbox.all;
|
package/src/styles/_spinner.scss
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
width: $default-size;
|
|
19
19
|
height: $default-size;
|
|
20
20
|
border: $default-border-width solid colors.$primary;
|
|
21
|
-
border-top: $default-border-width solid
|
|
21
|
+
border-top: $default-border-width solid transparent;
|
|
22
22
|
display: inline-block;
|
|
23
23
|
border-radius: 50%;
|
|
24
24
|
animation: spin 0.5s linear infinite;
|
|
@@ -126,9 +126,9 @@ $row-padding: 8px;
|
|
|
126
126
|
background: colors.$white;
|
|
127
127
|
display: flex;
|
|
128
128
|
height: 30px;
|
|
129
|
-
padding: 4px
|
|
129
|
+
padding: 5px 24px 4px 16px;
|
|
130
130
|
align-items: center;
|
|
131
|
-
gap:
|
|
131
|
+
gap: 2px;
|
|
132
132
|
font-size: 14px;
|
|
133
133
|
line-height: 115%;
|
|
134
134
|
color: colors.$text-gray-1;
|