@seamapi/react 2.7.0 → 2.8.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/README.md +1 -1
- package/dist/elements.js +939 -888
- package/dist/elements.js.map +1 -1
- package/dist/index.css +29 -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 +31 -0
|
@@ -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;
|
|
@@ -99,6 +99,37 @@ $row-padding: 8px;
|
|
|
99
99
|
.seam-manufacturer-section {
|
|
100
100
|
margin-bottom: 32px;
|
|
101
101
|
position: relative;
|
|
102
|
+
display: flex;
|
|
103
|
+
padding: 8px 16px 16px;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
align-items: flex-start;
|
|
107
|
+
gap: 10px;
|
|
108
|
+
align-self: stretch;
|
|
109
|
+
|
|
110
|
+
.seam-manufacturer-annotation-box {
|
|
111
|
+
display: flex;
|
|
112
|
+
padding: 8px;
|
|
113
|
+
align-items: center;
|
|
114
|
+
align-content: center;
|
|
115
|
+
gap: 0 8px;
|
|
116
|
+
align-self: stretch;
|
|
117
|
+
flex-wrap: wrap;
|
|
118
|
+
border-radius: 6px;
|
|
119
|
+
background-color: colors.$primary-transparent;
|
|
120
|
+
|
|
121
|
+
.seam-annotation {
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: flex-start;
|
|
124
|
+
align-content: flex-start;
|
|
125
|
+
gap: 2px;
|
|
126
|
+
flex: 1 0 0;
|
|
127
|
+
flex-wrap: wrap;
|
|
128
|
+
color: colors.$text-gray-1;
|
|
129
|
+
font-size: 14px;
|
|
130
|
+
line-height: 120%;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
102
133
|
|
|
103
134
|
.seam-header {
|
|
104
135
|
display: flex;
|