@seamapi/react 2.7.0 → 2.8.1
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 +939 -888
- package/dist/elements.js.map +1 -1
- package/dist/index.css +30 -0
- 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/InfoBlue.d.ts +2 -0
- package/lib/icons/InfoBlue.js +7 -0
- package/lib/icons/InfoBlue.js.map +1 -0
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceManufacturerSection.js +5 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceManufacturerSection.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/lib/icons/InfoBlue.tsx +36 -0
- package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceManufacturerSection.tsx +24 -1
- package/src/lib/version.ts +1 -1
- package/src/styles/_colors.scss +1 -0
- package/src/styles/_supported-device-table.scss +37 -3
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Automatically generated by SVGR from assets/icons/*.svg.
|
|
3
|
+
* Do not edit this file or add other components to this directory.
|
|
4
|
+
*/
|
|
5
|
+
import type { SVGProps } from 'react'
|
|
6
|
+
export function InfoBlueIcon(props: SVGProps<SVGSVGElement>): JSX.Element {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
10
|
+
width={16}
|
|
11
|
+
height={16}
|
|
12
|
+
fill='none'
|
|
13
|
+
{...props}
|
|
14
|
+
>
|
|
15
|
+
<mask
|
|
16
|
+
id='info-blue_svg__a'
|
|
17
|
+
width={16}
|
|
18
|
+
height={16}
|
|
19
|
+
x={0}
|
|
20
|
+
y={0}
|
|
21
|
+
maskUnits='userSpaceOnUse'
|
|
22
|
+
style={{
|
|
23
|
+
maskType: 'alpha',
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
<path fill='#D9D9D9' d='M0 0h16v16H0z' />
|
|
27
|
+
</mask>
|
|
28
|
+
<g mask='url(#info-blue_svg__a)'>
|
|
29
|
+
<path
|
|
30
|
+
fill='#007AFC'
|
|
31
|
+
d='M7.333 11.333h1.334v-4H7.333zM8 6a.645.645 0 0 0 .475-.192.645.645 0 0 0 .192-.475.645.645 0 0 0-.192-.475A.645.645 0 0 0 8 4.667a.645.645 0 0 0-.475.191.645.645 0 0 0-.192.475c0 .19.064.348.192.475A.645.645 0 0 0 8 6m0 8.667a6.492 6.492 0 0 1-2.6-.525 6.732 6.732 0 0 1-2.117-1.425A6.733 6.733 0 0 1 1.858 10.6 6.492 6.492 0 0 1 1.333 8c0-.922.175-1.789.525-2.6a6.732 6.732 0 0 1 1.425-2.117c.6-.6 1.306-1.075 2.117-1.425A6.492 6.492 0 0 1 8 1.333c.922 0 1.789.175 2.6.525.811.35 1.517.825 2.117 1.425.6.6 1.075 1.306 1.425 2.117.35.811.525 1.678.525 2.6 0 .922-.175 1.789-.525 2.6a6.733 6.733 0 0 1-1.425 2.117c-.6.6-1.306 1.075-2.117 1.425a6.492 6.492 0 0 1-2.6.525'
|
|
32
|
+
/>
|
|
33
|
+
</g>
|
|
34
|
+
</svg>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
DeviceModelV1,
|
|
3
|
+
ManufacturerAnnotation,
|
|
4
|
+
} from '@seamapi/types/devicedb'
|
|
2
5
|
import classNames from 'classnames'
|
|
3
6
|
|
|
4
7
|
import { ChevronRightIcon } from 'lib/icons/ChevronRight.js'
|
|
8
|
+
import { InfoBlueIcon } from 'lib/icons/InfoBlue.js'
|
|
5
9
|
import { HiddenDevicesOverlay } from 'lib/seam/components/SupportedDeviceTable/HiddenDevicesOverlay.js'
|
|
6
10
|
import { ShowAllDevicesButton } from 'lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.js'
|
|
7
11
|
import { SupportedDeviceRow } from 'lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.js'
|
|
@@ -62,6 +66,12 @@ export function SupportedDeviceManufacturerSection({
|
|
|
62
66
|
</h5>
|
|
63
67
|
{canExpand && <ChevronRightIcon className='chevron' />}
|
|
64
68
|
</div>
|
|
69
|
+
{manufacturer?.annotations.map((annotation, idx) => (
|
|
70
|
+
<ManufacturerAnnotationBox
|
|
71
|
+
key={[annotation.annotation_code, idx].join('_')}
|
|
72
|
+
annotation={annotation}
|
|
73
|
+
/>
|
|
74
|
+
))}
|
|
65
75
|
<div className='seam-supported-device-table-content'>
|
|
66
76
|
{visibleDevices.map((deviceModel) => (
|
|
67
77
|
<SupportedDeviceRow
|
|
@@ -81,6 +91,19 @@ export function SupportedDeviceManufacturerSection({
|
|
|
81
91
|
)
|
|
82
92
|
}
|
|
83
93
|
|
|
94
|
+
function ManufacturerAnnotationBox({
|
|
95
|
+
annotation,
|
|
96
|
+
}: {
|
|
97
|
+
annotation: ManufacturerAnnotation
|
|
98
|
+
}): JSX.Element {
|
|
99
|
+
return (
|
|
100
|
+
<div className='seam-manufacturer-annotation-box'>
|
|
101
|
+
<InfoBlueIcon />
|
|
102
|
+
<p className='seam-annotation'>{annotation.message}</p>
|
|
103
|
+
</div>
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
|
|
84
107
|
const t = {
|
|
85
108
|
devices: 'Devices',
|
|
86
109
|
}
|
package/src/lib/version.ts
CHANGED
package/src/styles/_colors.scss
CHANGED
|
@@ -8,6 +8,7 @@ $primary-8: color.scale($primary, $lightness: 92%);
|
|
|
8
8
|
$primary-5: color.scale($primary, $lightness: 95%);
|
|
9
9
|
$primary-dark: color.scale($primary, $lightness: -10%);
|
|
10
10
|
$primary-dim: color.scale($primary-15, $lightness: -5%);
|
|
11
|
+
$primary-transparent: color.adjust($primary, $alpha: 0.08 - 1);
|
|
11
12
|
$text-default: #232b3a;
|
|
12
13
|
$text-gray-1: #6e7179;
|
|
13
14
|
$text-gray-2: #9da1a9;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
@use './colors';
|
|
2
2
|
|
|
3
|
+
$row-height: 64px;
|
|
3
4
|
$row-padding: 8px;
|
|
5
|
+
$see-all-button-height: 30px;
|
|
4
6
|
|
|
5
7
|
@mixin all {
|
|
6
8
|
.seam-supported-device-table-content-wrap {
|
|
@@ -99,6 +101,37 @@ $row-padding: 8px;
|
|
|
99
101
|
.seam-manufacturer-section {
|
|
100
102
|
margin-bottom: 32px;
|
|
101
103
|
position: relative;
|
|
104
|
+
display: flex;
|
|
105
|
+
padding: 8px 16px 16px;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
align-items: flex-start;
|
|
109
|
+
gap: 10px;
|
|
110
|
+
align-self: stretch;
|
|
111
|
+
|
|
112
|
+
.seam-manufacturer-annotation-box {
|
|
113
|
+
display: flex;
|
|
114
|
+
padding: 8px;
|
|
115
|
+
align-items: center;
|
|
116
|
+
align-content: center;
|
|
117
|
+
gap: 0 8px;
|
|
118
|
+
align-self: stretch;
|
|
119
|
+
flex-wrap: wrap;
|
|
120
|
+
border-radius: 6px;
|
|
121
|
+
background-color: colors.$primary-transparent;
|
|
122
|
+
|
|
123
|
+
.seam-annotation {
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: flex-start;
|
|
126
|
+
align-content: flex-start;
|
|
127
|
+
gap: 2px;
|
|
128
|
+
flex: 1 0 0;
|
|
129
|
+
flex-wrap: wrap;
|
|
130
|
+
color: colors.$text-gray-1;
|
|
131
|
+
font-size: 14px;
|
|
132
|
+
line-height: 120%;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
102
135
|
|
|
103
136
|
.seam-header {
|
|
104
137
|
display: flex;
|
|
@@ -129,7 +162,7 @@ $row-padding: 8px;
|
|
|
129
162
|
cursor: pointer;
|
|
130
163
|
background: colors.$white;
|
|
131
164
|
display: flex;
|
|
132
|
-
height:
|
|
165
|
+
height: $see-all-button-height;
|
|
133
166
|
padding: 5px 24px 4px 16px;
|
|
134
167
|
align-items: center;
|
|
135
168
|
gap: 2px;
|
|
@@ -142,6 +175,7 @@ $row-padding: 8px;
|
|
|
142
175
|
0 1px 1px 0 rgb(16 27 37 / 10%),
|
|
143
176
|
0 1px 8px 0 rgb(46 69 82 / 12%);
|
|
144
177
|
position: absolute;
|
|
178
|
+
bottom: -($row-height - $see-all-button-height - $row-padding) / 2;
|
|
145
179
|
left: 50%;
|
|
146
180
|
transform: translate(-50%, -47px);
|
|
147
181
|
z-index: 3;
|
|
@@ -158,7 +192,7 @@ $row-padding: 8px;
|
|
|
158
192
|
#fff 86.98%
|
|
159
193
|
);
|
|
160
194
|
position: absolute;
|
|
161
|
-
height:
|
|
195
|
+
height: $row-height;
|
|
162
196
|
width: 100%;
|
|
163
197
|
bottom: 0;
|
|
164
198
|
z-index: 2;
|
|
@@ -236,7 +270,7 @@ $row-padding: 8px;
|
|
|
236
270
|
border-collapse: collapse;
|
|
237
271
|
|
|
238
272
|
.seam-row {
|
|
239
|
-
height:
|
|
273
|
+
height: $row-height;
|
|
240
274
|
border-bottom: 1px solid colors.$bg-b;
|
|
241
275
|
display: flex;
|
|
242
276
|
|