@seamapi/react 1.49.0 → 1.50.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.
Files changed (57) hide show
  1. package/README.md +1 -1
  2. package/dist/elements.js +2 -2
  3. package/dist/elements.js.map +1 -1
  4. package/dist/index.css +148 -0
  5. package/dist/index.css.map +1 -1
  6. package/dist/index.min.css +1 -1
  7. package/dist/index.min.css.map +1 -1
  8. package/lib/icons/Fan.d.ts +2 -0
  9. package/lib/icons/Fan.js +7 -0
  10. package/lib/icons/Fan.js.map +1 -0
  11. package/lib/icons/Off.d.ts +2 -0
  12. package/lib/icons/Off.js +7 -0
  13. package/lib/icons/Off.js.map +1 -0
  14. package/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleCard.d.ts +2 -1
  15. package/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleCard.js +4 -4
  16. package/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleCard.js.map +1 -1
  17. package/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleDetails.js +9 -1
  18. package/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleDetails.js.map +1 -1
  19. package/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleDeviceBar.d.ts +2 -1
  20. package/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleDeviceBar.js +6 -4
  21. package/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleDeviceBar.js.map +1 -1
  22. package/lib/seam/connected-accounts/use-connected-account.d.ts +4 -0
  23. package/lib/seam/connected-accounts/use-connected-account.js +17 -0
  24. package/lib/seam/connected-accounts/use-connected-account.js.map +1 -0
  25. package/lib/seam/index.d.ts +2 -0
  26. package/lib/seam/index.js +2 -0
  27. package/lib/seam/index.js.map +1 -1
  28. package/lib/ui/layout/DetailRow.d.ts +2 -1
  29. package/lib/ui/layout/DetailRow.js +2 -2
  30. package/lib/ui/layout/DetailRow.js.map +1 -1
  31. package/lib/ui/thermostat/ClimateSettingStatus.d.ts +1 -1
  32. package/lib/ui/thermostat/ClimateSettingStatus.js +20 -24
  33. package/lib/ui/thermostat/ClimateSettingStatus.js.map +1 -1
  34. package/lib/ui/thermostat/Temperature.d.ts +8 -0
  35. package/lib/ui/thermostat/Temperature.js +11 -0
  36. package/lib/ui/thermostat/Temperature.js.map +1 -0
  37. package/lib/ui/thermostat/ThermostatCard.d.ts +7 -0
  38. package/lib/ui/thermostat/ThermostatCard.js +46 -0
  39. package/lib/ui/thermostat/ThermostatCard.js.map +1 -0
  40. package/lib/version.d.ts +1 -1
  41. package/lib/version.js +1 -1
  42. package/package.json +3 -3
  43. package/src/lib/icons/Fan.tsx +36 -0
  44. package/src/lib/icons/Off.tsx +36 -0
  45. package/src/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleCard.tsx +9 -2
  46. package/src/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleDetails.tsx +18 -0
  47. package/src/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleDeviceBar.tsx +14 -4
  48. package/src/lib/seam/connected-accounts/use-connected-account.ts +34 -0
  49. package/src/lib/seam/index.ts +2 -0
  50. package/src/lib/ui/layout/DetailRow.tsx +6 -1
  51. package/src/lib/ui/thermostat/ClimateSettingStatus.tsx +34 -30
  52. package/src/lib/ui/thermostat/Temperature.tsx +26 -0
  53. package/src/lib/ui/thermostat/ThermostatCard.tsx +160 -0
  54. package/src/lib/version.ts +1 -1
  55. package/src/styles/_layout.scss +15 -0
  56. package/src/styles/_thermostat.scss +160 -0
  57. package/src/styles/_tooltip.scss +1 -0
@@ -7,8 +7,10 @@ import { ClimateSettingStatus } from 'lib/ui/thermostat/ClimateSettingStatus.js'
7
7
 
8
8
  export function ClimateSettingScheduleDeviceBar({
9
9
  deviceId,
10
+ onSelectDevice,
10
11
  }: {
11
12
  deviceId: string
13
+ onSelectDevice: (deviceId: string) => void
12
14
  }): JSX.Element | null {
13
15
  const { isLoading, device } = useDevice({
14
16
  device_id: deviceId,
@@ -26,14 +28,22 @@ export function ClimateSettingScheduleDeviceBar({
26
28
  return null
27
29
  }
28
30
 
29
- return <Content device={device} />
31
+ return <Content device={device} onSelectDevice={onSelectDevice} />
30
32
  }
31
33
 
32
- function Content(props: { device: ThermostatDevice }): JSX.Element {
33
- const { device } = props
34
+ function Content(props: {
35
+ device: ThermostatDevice
36
+ onSelectDevice: (deviceId: string) => void
37
+ }): JSX.Element {
38
+ const { device, onSelectDevice } = props
34
39
 
35
40
  return (
36
- <div className='seam-climate-setting-schedule-device-bar'>
41
+ <div
42
+ className='seam-climate-setting-schedule-device-bar'
43
+ onClick={() => {
44
+ onSelectDevice(device.device_id)
45
+ }}
46
+ >
37
47
  <div className='seam-climate-setting-schedule-device-content'>
38
48
  <div className='seam-device-image'>
39
49
  <DeviceImage device={device} />
@@ -0,0 +1,34 @@
1
+ import { useQuery } from '@tanstack/react-query'
2
+ import type {
3
+ ConnectedAccount,
4
+ ConnectedAccountsGetRequest,
5
+ ConnectedAccountsGetResponse,
6
+ SeamError,
7
+ } from 'seamapi'
8
+
9
+ import { useSeamClient } from 'lib/seam/use-seam-client.js'
10
+ import type { UseSeamQueryResult } from 'lib/seam/use-seam-query-result.js'
11
+
12
+ export type UseConnectedAccountData = ConnectedAccount | null
13
+
14
+ export function useConnectedAccount(
15
+ params: ConnectedAccountsGetRequest
16
+ ): UseSeamQueryResult<'connectedAccount', UseConnectedAccountData> {
17
+ const normalizedParams =
18
+ typeof params === 'string' ? { connected_account_id: params } : params
19
+
20
+ const { client } = useSeamClient()
21
+ const { data, ...rest } = useQuery<
22
+ ConnectedAccountsGetResponse['connected_account'] | null,
23
+ SeamError
24
+ >({
25
+ enabled: client != null,
26
+ queryKey: ['connected_accounts', 'get', normalizedParams],
27
+ queryFn: async () => {
28
+ if (client == null) return null
29
+ return await client.connectedAccounts.get(normalizedParams)
30
+ },
31
+ })
32
+
33
+ return { ...rest, connectedAccount: data }
34
+ }
@@ -1,7 +1,9 @@
1
1
  export * from './access-codes/use-access-code.js'
2
2
  export * from './access-codes/use-access-codes.js'
3
3
  export * from './access-codes/use-create-access-code.js'
4
+ export * from './access-codes/use-generate-access-code-code.js'
4
5
  export * from './connect-webviews/use-create-connect-webview.js'
6
+ export * from './connected-accounts/use-connected-account.js'
5
7
  export * from './devices/use-device.js'
6
8
  export * from './devices/use-device-providers.js'
7
9
  export * from './devices/use-devices.js'
@@ -2,15 +2,20 @@ import type { PropsWithChildren } from 'react'
2
2
 
3
3
  interface DetailRowProps {
4
4
  label: string
5
+ sublabel?: string
5
6
  }
6
7
 
7
8
  export function DetailRow({
8
9
  label,
10
+ sublabel,
9
11
  children,
10
12
  }: PropsWithChildren<DetailRowProps>): JSX.Element {
11
13
  return (
12
14
  <div className='seam-detail-row'>
13
- <p className='seam-row-label'>{label}</p>
15
+ <div className='seam-detail-row-label-wrap'>
16
+ <p className='seam-row-label'>{label}</p>
17
+ {sublabel != null && <p className='seam-row-sublabel'>{sublabel}</p>}
18
+ </div>
14
19
  <div className='seam-detail-row-right-area-content'>{children}</div>
15
20
  </div>
16
21
  )
@@ -4,9 +4,10 @@ import { ThermostatCoolIcon } from 'lib/icons/ThermostatCool.js'
4
4
  import { ThermostatHeatIcon } from 'lib/icons/ThermostatHeat.js'
5
5
  import { ThermostatHeatCoolIcon } from 'lib/icons/ThermostatHeatCool.js'
6
6
  import { ThermostatOffIcon } from 'lib/icons/ThermostatOff.js'
7
+ import { Temperature } from 'lib/ui/thermostat/Temperature.js'
7
8
 
8
9
  interface ClimateSettingStatusProps {
9
- climateSetting: Partial<ClimateSetting>
10
+ climateSetting: ClimateSetting
10
11
  temperatureUnit?: 'fahrenheit' | 'celsius'
11
12
  iconPlacement?: 'left' | 'right'
12
13
  }
@@ -23,16 +24,14 @@ export function ClimateSettingStatus({
23
24
  )}
24
25
  <Content
25
26
  mode={climateSetting.hvac_mode_setting}
26
- coolingSetPoint={formatTemperatureValue(
27
- temperatureUnit === 'fahrenheit'
28
- ? climateSetting.cooling_set_point_fahrenheit
29
- : climateSetting.cooling_set_point_celsius
30
- )}
31
- heatingSetPoint={formatTemperatureValue(
32
- temperatureUnit === 'fahrenheit'
33
- ? climateSetting.heating_set_point_fahrenheit
34
- : climateSetting.heating_set_point_celsius
35
- )}
27
+ coolingSetPoint={{
28
+ fahrenheit: climateSetting.cooling_set_point_fahrenheit,
29
+ celsius: climateSetting.cooling_set_point_celsius,
30
+ }}
31
+ heatingSetPoint={{
32
+ fahrenheit: climateSetting.heating_set_point_fahrenheit,
33
+ celsius: climateSetting.heating_set_point_celsius,
34
+ }}
36
35
  temperatureUnit={temperatureUnit}
37
36
  />
38
37
  {iconPlacement === 'right' && (
@@ -51,33 +50,42 @@ function ClimateSettingIcon(props: {
51
50
  <div className='seam-climate-setting-status-icon'>
52
51
  {mode === 'cool' && <ThermostatCoolIcon />}
53
52
  {mode === 'heat' && <ThermostatHeatIcon />}
54
- {mode === 'heatcool' && <ThermostatHeatCoolIcon />}
53
+ {mode === 'heat_cool' && <ThermostatHeatCoolIcon />}
55
54
  {mode === 'off' && <ThermostatOffIcon />}
56
55
  </div>
57
56
  )
58
57
  }
59
58
 
59
+ interface SetPoint {
60
+ fahrenheit: number
61
+ celsius: number
62
+ }
63
+
60
64
  function Content(props: {
61
65
  mode: ClimateSetting['hvac_mode_setting']
62
- coolingSetPoint: string
63
- heatingSetPoint: string
66
+ coolingSetPoint: Partial<SetPoint>
67
+ heatingSetPoint: Partial<SetPoint>
64
68
  temperatureUnit: 'fahrenheit' | 'celsius'
65
69
  }): JSX.Element | null {
66
70
  const { mode, coolingSetPoint, heatingSetPoint, temperatureUnit } = props
67
- const hasCoolingSetPoint = coolingSetPoint !== undefined
68
- const hasHeatingSetPoint = heatingSetPoint !== undefined
69
- const unit =
70
- temperatureUnit === 'fahrenheit' ? t.degreeFahrenheit : t.degreeCelsius
71
71
 
72
- if (mode === 'cool' && hasCoolingSetPoint)
73
- return <span>{`${coolingSetPoint}${unit}`}</span>
72
+ if (mode === 'cool' && isSetPoint(coolingSetPoint))
73
+ return <Temperature {...coolingSetPoint} unit={temperatureUnit} />
74
74
 
75
- if (mode === 'heat' && hasHeatingSetPoint)
76
- return <span>{`${heatingSetPoint}${unit}`}</span>
75
+ if (mode === 'heat' && isSetPoint(heatingSetPoint))
76
+ return <Temperature {...heatingSetPoint} unit={temperatureUnit} />
77
77
 
78
- if (mode === 'heatcool' && hasHeatingSetPoint && hasCoolingSetPoint)
78
+ if (
79
+ mode === 'heat_cool' &&
80
+ isSetPoint(heatingSetPoint) &&
81
+ isSetPoint(coolingSetPoint)
82
+ )
79
83
  return (
80
- <span>{`${heatingSetPoint}${unit} - ${coolingSetPoint}${unit}`}</span>
84
+ <span>
85
+ <Temperature {...heatingSetPoint} unit={temperatureUnit} />
86
+ {' - '}
87
+ <Temperature {...coolingSetPoint} unit={temperatureUnit} />
88
+ </span>
81
89
  )
82
90
 
83
91
  if (mode === 'off') return <span>{t.off}</span>
@@ -85,14 +93,10 @@ function Content(props: {
85
93
  return null
86
94
  }
87
95
 
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)
96
+ function isSetPoint(setPoint: Partial<SetPoint>): setPoint is SetPoint {
97
+ return setPoint.fahrenheit != null && setPoint.celsius != null
92
98
  }
93
99
 
94
100
  const t = {
95
- degreeFahrenheit: '°F',
96
- degreeCelsius: '°C',
97
101
  off: 'Off',
98
102
  }
@@ -0,0 +1,26 @@
1
+ interface TemperatureProps {
2
+ fahrenheit: number
3
+ celsius: number
4
+ unit?: 'fahrenheit' | 'celsius'
5
+ }
6
+
7
+ export function Temperature({
8
+ fahrenheit,
9
+ celsius,
10
+ unit = 'fahrenheit',
11
+ }: TemperatureProps): JSX.Element {
12
+ const temperature = unit === 'fahrenheit' ? fahrenheit : celsius
13
+ const degree = unit === 'fahrenheit' ? t.degreeFahrenheit : t.degreeCelsius
14
+
15
+ return (
16
+ <span>
17
+ {Math.trunc(temperature)}
18
+ {degree}
19
+ </span>
20
+ )
21
+ }
22
+
23
+ const t = {
24
+ degreeFahrenheit: '°F',
25
+ degreeCelsius: '°C',
26
+ }
@@ -0,0 +1,160 @@
1
+ import classNames from 'classnames'
2
+ import { useState } from 'react'
3
+ import type { ThermostatDevice, ThermostatDeviceProperties } from 'seamapi'
4
+
5
+ import { FanIcon } from 'lib/icons/Fan.js'
6
+ import { OffIcon } from 'lib/icons/Off.js'
7
+ import { DeviceImage } from 'lib/ui/device/DeviceImage.js'
8
+ import { ClimateSettingStatus } from 'lib/ui/thermostat/ClimateSettingStatus.js'
9
+ import { Temperature } from 'lib/ui/thermostat/Temperature.js'
10
+
11
+ interface ThermostatCardProps {
12
+ device: ThermostatDevice
13
+ }
14
+
15
+ export function ThermostatCard({ device }: ThermostatCardProps): JSX.Element {
16
+ return (
17
+ <div className='seam-thermostat-card'>
18
+ <Content device={device} />
19
+ </div>
20
+ )
21
+ }
22
+
23
+ function Content(props: { device: ThermostatDevice }): JSX.Element | null {
24
+ const { device } = props
25
+
26
+ const [temperatureUnit, setTemperatureUnit] = useState<
27
+ 'fahrenheit' | 'celsius'
28
+ >('fahrenheit')
29
+
30
+ const toggleTemperatureUnit = (): void => {
31
+ setTemperatureUnit(
32
+ temperatureUnit === 'fahrenheit' ? 'celsius' : 'fahrenheit'
33
+ )
34
+ }
35
+
36
+ const {
37
+ temperature_fahrenheit: temperatureFahrenheit,
38
+ temperature_celsius: temperatureCelsius,
39
+ current_climate_setting: currentClimateSetting,
40
+ is_fan_running: isFanRunning,
41
+ relative_humidity: relativeHumidity,
42
+ } = device.properties
43
+
44
+ const systemStatus = getSystemStatus(device.properties)
45
+
46
+ return (
47
+ <div className='seam-thermostat-card-content'>
48
+ <div className='seam-thermostat-card-image-wrap'>
49
+ <DeviceImage device={device} />
50
+ </div>
51
+ <div className='seam-thermostat-card-details'>
52
+ <div className='seam-thermostat-heading-wrap'>
53
+ <h4 className='seam-thermostat-card-heading'>
54
+ {device.properties.name}
55
+ </h4>
56
+ <button
57
+ onClick={toggleTemperatureUnit}
58
+ className='seam-thermostat-temperature-toggle'
59
+ >
60
+ <span className='seam-thermostat-temperature-toggle-label'>
61
+ {temperatureUnit === 'fahrenheit' ? t.fahrenheit : t.celsius}
62
+ </span>
63
+ </button>
64
+ </div>
65
+
66
+ <div className='seam-thermostat-properties-wrap'>
67
+ <div className='seam-thermostat-properties'>
68
+ <div className='seam-thermostat-property-block'>
69
+ <p className='seam-thermostat-property-label'>{t.temperature}:</p>
70
+ </div>
71
+ <div className='seam-thermostat-property-block'>
72
+ <p className='seam-thermostat-property-value'>
73
+ <Temperature
74
+ fahrenheit={temperatureFahrenheit}
75
+ celsius={temperatureCelsius}
76
+ unit={temperatureUnit}
77
+ />
78
+ </p>
79
+
80
+ <p className='seam-thermostat-property-value'>|</p>
81
+ <p className='seam-thermostat-property-label'>{t.humidity}:</p>
82
+ <p className='seam-thermostat-property-value'>
83
+ {relativeHumidity * 100}%
84
+ </p>
85
+ </div>
86
+
87
+ <div className='seam-thermostat-property-block'>
88
+ <p className='seam-thermostat-property-label'>{t.setting}:</p>
89
+ </div>
90
+ <div className='seam-thermostat-property-block'>
91
+ <ClimateSettingStatus
92
+ climateSetting={currentClimateSetting}
93
+ temperatureUnit={temperatureUnit}
94
+ />
95
+ </div>
96
+
97
+ <div className='seam-thermostat-property-block'>
98
+ <p className='seam-thermostat-property-label'>{t.fanMode}:</p>
99
+ </div>
100
+ <div className='seam-thermostat-property-block seam-thermostat-property-icon-block'>
101
+ <div className='seam-thermostat-property-icon'>
102
+ {isFanRunning ? <FanIcon /> : <OffIcon />}
103
+ </div>
104
+ <p className='seam-thermostat-property-value'>
105
+ {isFanRunning ? t.auto : t.off}
106
+ </p>
107
+ </div>
108
+
109
+ <div className='seam-thermostat-property-block'>
110
+ <p className='seam-thermostat-property-label'>
111
+ {t.systemStatus}:
112
+ </p>
113
+ </div>
114
+ <div className='seam-thermostat-property-block'>
115
+ <div
116
+ className={classNames(
117
+ 'seam-thermostat-property-tag',
118
+ `seam-thermostat-property-tag-${systemStatus}`
119
+ )}
120
+ >
121
+ <p className='seam-thermostat-property-tag-label'>
122
+ {systemStatus === 'off' ? '--' : t[systemStatus]}
123
+ </p>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ )
131
+ }
132
+
133
+ function getSystemStatus(
134
+ properties: ThermostatDeviceProperties
135
+ ): 'heating' | 'cooling' | 'fan' | 'off' {
136
+ const {
137
+ is_heating: isHeating,
138
+ is_cooling: isCooling,
139
+ is_fan_running: isFanRunning,
140
+ } = properties
141
+ if (isHeating) return 'heating'
142
+ if (isCooling) return 'cooling'
143
+ if (isFanRunning) return 'fan'
144
+ return 'off'
145
+ }
146
+
147
+ const t = {
148
+ fahrenheit: '˚F',
149
+ celsius: '˚C',
150
+ auto: 'Auto',
151
+ off: 'Off',
152
+ temperature: 'Temperature',
153
+ humidity: 'Humidity',
154
+ setting: 'Setting',
155
+ fanMode: 'Fan mode',
156
+ systemStatus: 'System status',
157
+ cooling: 'Cooling',
158
+ heating: 'Heating',
159
+ fan: 'Fan only',
160
+ }
@@ -1,3 +1,3 @@
1
- const seamapiReactVersion = '1.49.0'
1
+ const seamapiReactVersion = '1.50.0'
2
2
 
3
3
  export default seamapiReactVersion
@@ -88,11 +88,26 @@
88
88
  padding: 8px 16px;
89
89
  }
90
90
 
91
+ .seam-detail-row-label-wrap {
92
+ display: flex;
93
+ justify-content: center;
94
+ align-items: flex-start;
95
+ flex-direction: column;
96
+ gap: 4px;
97
+ }
98
+
91
99
  .seam-row-label {
92
100
  font-size: 16px;
93
101
  font-weight: 600;
94
102
  line-height: 118%;
95
103
  }
104
+
105
+ .seam-row-sublabel {
106
+ color: colors.$text-gray-1;
107
+ font-size: 14px;
108
+ font-weight: 400;
109
+ line-height: 118%;
110
+ }
96
111
  }
97
112
 
98
113
  @mixin detail-row {
@@ -400,7 +400,167 @@
400
400
  }
401
401
  }
402
402
 
403
+ @mixin thermostat-card {
404
+ .seam-thermostat-card {
405
+ width: 100%;
406
+ background-color: colors.$bg-a;
407
+ border-radius: 16px;
408
+ display: flex;
409
+ padding: 16px;
410
+ flex-direction: column;
411
+ align-items: center;
412
+ gap: 8px;
413
+ align-self: stretch;
414
+
415
+ .seam-thermostat-card-content {
416
+ display: flex;
417
+ align-items: flex-start;
418
+ flex-direction: row;
419
+ gap: 8px;
420
+ align-self: stretch;
421
+ }
422
+
423
+ .seam-thermostat-card-image-wrap {
424
+ padding: 24px;
425
+
426
+ img {
427
+ width: 80px;
428
+ height: 80px;
429
+ object-fit: contain;
430
+ }
431
+ }
432
+
433
+ .seam-thermostat-heading-wrap {
434
+ width: 100%;
435
+ display: flex;
436
+ justify-content: space-between;
437
+ align-items: center;
438
+ flex-direction: row;
439
+ gap: 16px;
440
+ }
441
+
442
+ .seam-thermostat-card-heading {
443
+ font-size: 21px;
444
+ font-weight: 600;
445
+ line-height: 132%;
446
+ white-space: nowrap;
447
+ }
448
+
449
+ .seam-thermostat-temperature-toggle {
450
+ appearance: none;
451
+ width: 32px;
452
+ height: 22px;
453
+ box-shadow: none;
454
+ border-radius: 5px;
455
+ border: 1px solid colors.$text-gray-3;
456
+ background-color: transparent;
457
+ display: flex;
458
+ justify-content: center;
459
+ align-items: center;
460
+ flex-direction: column;
461
+ color: colors.$text-gray-1;
462
+ font-size: 12px;
463
+ font-weight: 600;
464
+ line-height: 1;
465
+ cursor: pointer;
466
+ }
467
+
468
+ .seam-thermostat-card-details {
469
+ width: 100%;
470
+ display: flex;
471
+ justify-content: flex-start;
472
+ flex-direction: column;
473
+ gap: 8px;
474
+ }
475
+
476
+ .seam-thermostat-properties-wrap {
477
+ display: flex;
478
+ }
479
+
480
+ .seam-thermostat-properties {
481
+ width: auto;
482
+ display: grid;
483
+ grid-template-columns: auto auto;
484
+ column-gap: 16px;
485
+ row-gap: 8px;
486
+ }
487
+
488
+ .seam-thermostat-property-block {
489
+ display: flex;
490
+ flex-direction: row;
491
+ gap: 8px;
492
+
493
+ &.seam-thermostat-property-icon-block {
494
+ gap: 4px;
495
+ }
496
+ }
497
+
498
+ .seam-thermostat-property-label {
499
+ color: colors.$text-gray-2;
500
+ font-size: 14px;
501
+ font-weight: 400;
502
+ line-height: 118%;
503
+ white-space: nowrap;
504
+ }
505
+
506
+ .seam-thermostat-property-value {
507
+ color: colors.$text-gray-1;
508
+ font-size: 14px;
509
+ font-weight: 400;
510
+ line-height: 118%;
511
+ white-space: nowrap;
512
+ }
513
+
514
+ .seam-thermostat-property-icon {
515
+ width: 18px;
516
+ height: 18px;
517
+ }
518
+
519
+ .seam-thermostat-property-tag {
520
+ height: 18px;
521
+ padding: 0 8px;
522
+ border-radius: 4px;
523
+ display: flex;
524
+ justify-content: center;
525
+ align-items: center;
526
+
527
+ &.seam-thermostat-property-tag-cooling {
528
+ background-color: colors.$thermo-blue;
529
+ }
530
+
531
+ &.seam-thermostat-property-tag-heating {
532
+ background-color: colors.$thermo-orange;
533
+ }
534
+
535
+ &.seam-thermostat-property-tag-fan {
536
+ border: 1px solid colors.$text-gray-2-5;
537
+ background-color: transparent;
538
+
539
+ .seam-thermostat-property-tag-label {
540
+ color: colors.$text-gray-1;
541
+ }
542
+ }
543
+
544
+ &.seam-thermostat-property-tag-off {
545
+ background-color: transparent;
546
+
547
+ .seam-thermostat-property-tag-label {
548
+ color: colors.$text-gray-1;
549
+ }
550
+ }
551
+
552
+ .seam-thermostat-property-tag-label {
553
+ color: colors.$white;
554
+ font-size: 12px;
555
+ font-weight: 400;
556
+ line-height: 1;
557
+ }
558
+ }
559
+ }
560
+ }
561
+
403
562
  @mixin all {
404
563
  @include temperature-control;
405
564
  @include climate-setting-status;
565
+ @include thermostat-card;
406
566
  }
@@ -60,6 +60,7 @@
60
60
  box-shadow:
61
61
  0 2px 16px 2px rgb(15 22 28 / 15%),
62
62
  0 0 1px 0 rgb(0 0 0 / 30%);
63
+ will-change: transform, opacity, visibility;
63
64
  transform-origin: bottom left;
64
65
  transition: 0.1s ease-in-out;
65
66
  opacity: 0;