@seamapi/react 1.47.0 → 1.48.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 +422 -424
- package/dist/elements.js.map +1 -1
- package/dist/index.css +65 -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/Info.d.ts +2 -0
- package/lib/icons/Info.js +7 -0
- package/lib/icons/Info.js.map +1 -0
- package/lib/icons/InfoDark.d.ts +2 -0
- package/lib/icons/InfoDark.js +7 -0
- package/lib/icons/InfoDark.js.map +1 -0
- package/lib/seam/components/AccessCodeDetails/AccessCodeDetails.js.map +1 -1
- package/lib/seam/components/AccessCodeDetails/AccessCodeDevice.js +1 -1
- package/lib/seam/components/AccessCodeDetails/AccessCodeDevice.js.map +1 -1
- package/lib/seam/components/ClimateSettingScheduleTable/ClimateSettingScheduleTable.d.ts +6 -1
- package/lib/seam/components/ClimateSettingScheduleTable/ClimateSettingScheduleTable.js +21 -4
- package/lib/seam/components/ClimateSettingScheduleTable/ClimateSettingScheduleTable.js.map +1 -1
- package/lib/seam/components/DeviceTable/DeviceTable.js +2 -2
- package/lib/seam/components/DeviceTable/DeviceTable.js.map +1 -1
- package/lib/seam/thermostats/climate-setting-schedules/use-climate-setting-schedule.d.ts +5 -0
- package/lib/seam/thermostats/climate-setting-schedules/use-climate-setting-schedule.js +24 -0
- package/lib/seam/thermostats/climate-setting-schedules/use-climate-setting-schedule.js.map +1 -0
- package/lib/seam/thermostats/climate-setting-schedules/use-climate-setting-schedules.js +1 -0
- package/lib/seam/thermostats/climate-setting-schedules/use-climate-setting-schedules.js.map +1 -1
- package/lib/seam/thermostats/climate-setting-schedules/use-create-climate-setting-schedule.d.ts +5 -0
- package/lib/seam/thermostats/climate-setting-schedules/use-create-climate-setting-schedule.js +21 -0
- package/lib/seam/thermostats/climate-setting-schedules/use-create-climate-setting-schedule.js.map +1 -0
- package/lib/seam/thermostats/climate-setting-schedules/use-delete-climate-setting-schedule.d.ts +5 -0
- package/lib/seam/thermostats/climate-setting-schedules/use-delete-climate-setting-schedule.js +27 -0
- package/lib/seam/thermostats/climate-setting-schedules/use-delete-climate-setting-schedule.js.map +1 -0
- package/lib/ui/Tooltip/Tooltip.d.ts +2 -0
- package/lib/ui/Tooltip/Tooltip.js +33 -0
- package/lib/ui/Tooltip/Tooltip.js.map +1 -0
- package/lib/ui/thermostat/ClimateSettingStatus.js +10 -3
- package/lib/ui/thermostat/ClimateSettingStatus.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/src/lib/icons/Info.tsx +36 -0
- package/src/lib/icons/InfoDark.tsx +37 -0
- package/src/lib/seam/components/AccessCodeDetails/AccessCodeDetails.tsx +0 -2
- package/src/lib/seam/components/AccessCodeDetails/AccessCodeDevice.tsx +1 -4
- package/src/lib/seam/components/ClimateSettingScheduleTable/ClimateSettingScheduleTable.element.ts +4 -0
- package/src/lib/seam/components/ClimateSettingScheduleTable/ClimateSettingScheduleTable.tsx +59 -6
- package/src/lib/seam/components/DeviceTable/DeviceTable.tsx +2 -2
- package/src/lib/seam/thermostats/climate-setting-schedules/use-climate-setting-schedule.ts +47 -0
- package/src/lib/seam/thermostats/climate-setting-schedules/use-climate-setting-schedules.ts +1 -0
- package/src/lib/seam/thermostats/climate-setting-schedules/use-create-climate-setting-schedule.ts +48 -0
- package/src/lib/seam/thermostats/climate-setting-schedules/use-delete-climate-setting-schedule.ts +53 -0
- package/src/lib/ui/Tooltip/Tooltip.tsx +64 -0
- package/src/lib/ui/thermostat/ClimateSettingStatus.tsx +12 -10
- package/src/lib/version.ts +1 -1
- package/src/styles/_main.scss +2 -0
- package/src/styles/_tooltip.scss +83 -0
|
@@ -23,16 +23,16 @@ export function ClimateSettingStatus({
|
|
|
23
23
|
)}
|
|
24
24
|
<Content
|
|
25
25
|
mode={climateSetting.hvac_mode_setting}
|
|
26
|
-
coolingSetPoint={
|
|
26
|
+
coolingSetPoint={formatTemperatureValue(
|
|
27
27
|
temperatureUnit === 'fahrenheit'
|
|
28
28
|
? climateSetting.cooling_set_point_fahrenheit
|
|
29
29
|
: climateSetting.cooling_set_point_celsius
|
|
30
|
-
}
|
|
31
|
-
heatingSetPoint={
|
|
30
|
+
)}
|
|
31
|
+
heatingSetPoint={formatTemperatureValue(
|
|
32
32
|
temperatureUnit === 'fahrenheit'
|
|
33
33
|
? climateSetting.heating_set_point_fahrenheit
|
|
34
34
|
: climateSetting.heating_set_point_celsius
|
|
35
|
-
}
|
|
35
|
+
)}
|
|
36
36
|
temperatureUnit={temperatureUnit}
|
|
37
37
|
/>
|
|
38
38
|
{iconPlacement === 'right' && (
|
|
@@ -59,12 +59,8 @@ function ClimateSettingIcon(props: {
|
|
|
59
59
|
|
|
60
60
|
function Content(props: {
|
|
61
61
|
mode: ClimateSetting['hvac_mode_setting']
|
|
62
|
-
coolingSetPoint:
|
|
63
|
-
|
|
64
|
-
| ClimateSetting['cooling_set_point_celsius']
|
|
65
|
-
heatingSetPoint:
|
|
66
|
-
| ClimateSetting['heating_set_point_fahrenheit']
|
|
67
|
-
| ClimateSetting['heating_set_point_celsius']
|
|
62
|
+
coolingSetPoint: string
|
|
63
|
+
heatingSetPoint: string
|
|
68
64
|
temperatureUnit: 'fahrenheit' | 'celsius'
|
|
69
65
|
}): JSX.Element | null {
|
|
70
66
|
const { mode, coolingSetPoint, heatingSetPoint, temperatureUnit } = props
|
|
@@ -89,6 +85,12 @@ function Content(props: {
|
|
|
89
85
|
return null
|
|
90
86
|
}
|
|
91
87
|
|
|
88
|
+
const formatTemperatureValue = (value: number | undefined): string => {
|
|
89
|
+
if (value == null) return '0'
|
|
90
|
+
if (Number.isInteger(value)) return value.toFixed()
|
|
91
|
+
return value.toFixed(1)
|
|
92
|
+
}
|
|
93
|
+
|
|
92
94
|
const t = {
|
|
93
95
|
degreeFahrenheit: '°F',
|
|
94
96
|
degreeCelsius: '°C',
|
package/src/lib/version.ts
CHANGED
package/src/styles/_main.scss
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
@use './radio-field';
|
|
19
19
|
@use './checkbox';
|
|
20
20
|
@use './thermostat';
|
|
21
|
+
@use './tooltip';
|
|
21
22
|
@use './seam-table';
|
|
22
23
|
|
|
23
24
|
.seam-components {
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
@include menus.all;
|
|
37
38
|
@include checkbox.all;
|
|
38
39
|
@include radio-field.all;
|
|
40
|
+
@include tooltip.all;
|
|
39
41
|
|
|
40
42
|
// Components
|
|
41
43
|
@include device-details.all;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
@use './colors';
|
|
2
|
+
|
|
3
|
+
@mixin all {
|
|
4
|
+
.seam-tooltip {
|
|
5
|
+
position: relative;
|
|
6
|
+
|
|
7
|
+
.seam-tooltip-button {
|
|
8
|
+
appearance: none;
|
|
9
|
+
width: 18px;
|
|
10
|
+
height: 18px;
|
|
11
|
+
border: none;
|
|
12
|
+
box-shadow: none;
|
|
13
|
+
background: none;
|
|
14
|
+
padding: 0;
|
|
15
|
+
margin: 0;
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
align-items: center;
|
|
19
|
+
border-radius: 90px;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
|
|
22
|
+
& .seam-tooltip-button-icon {
|
|
23
|
+
position: absolute;
|
|
24
|
+
transition: opacity 0.15s ease-in-out;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.seam-tooltip-button-icon-hover {
|
|
28
|
+
opacity: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:hover,
|
|
32
|
+
&:focus {
|
|
33
|
+
.seam-tooltip-button-icon-default {
|
|
34
|
+
opacity: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.seam-tooltip-button-icon-hover {
|
|
38
|
+
opacity: 1;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:focus {
|
|
43
|
+
outline: none;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.seam-tooltip-popover {
|
|
48
|
+
width: 230px;
|
|
49
|
+
padding: 10px;
|
|
50
|
+
gap: 10px;
|
|
51
|
+
position: absolute;
|
|
52
|
+
bottom: 28px;
|
|
53
|
+
left: 2px;
|
|
54
|
+
display: flex;
|
|
55
|
+
border-radius: 8px;
|
|
56
|
+
background: colors.$white;
|
|
57
|
+
box-shadow:
|
|
58
|
+
0 2px 16px 2px rgb(15 22 28 / 15%),
|
|
59
|
+
0 0 1px 0 rgb(0 0 0 / 30%);
|
|
60
|
+
transform-origin: bottom left;
|
|
61
|
+
transition: 0.1s ease-in-out;
|
|
62
|
+
opacity: 0;
|
|
63
|
+
transform: scale(0.9);
|
|
64
|
+
visibility: hidden;
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
z-index: -1;
|
|
67
|
+
|
|
68
|
+
&[aria-expanded='true'] {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
transform: scale(1);
|
|
71
|
+
visibility: visible;
|
|
72
|
+
pointer-events: auto;
|
|
73
|
+
z-index: 9;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.seam-tooltip-text {
|
|
78
|
+
font-size: 14px;
|
|
79
|
+
font-weight: 400;
|
|
80
|
+
line-height: 134%;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|