@iobroker/adapter-react-v5 8.3.0 → 8.3.2

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.
@@ -340,6 +340,6 @@ export declare class Utils {
340
340
  * Check if the date is valid
341
341
  */
342
342
  static isValidDate(date: any): boolean;
343
- static getStyle(theme: IobTheme, ...args: (((_theme: IobTheme) => Record<string, any>) | undefined | Record<string, any>)[]): Record<string, any>;
343
+ static getStyle(theme: IobTheme, ...args: (((_theme: IobTheme) => Record<string, any>) | undefined | Record<string, any> | null | false)[]): Record<string, any>;
344
344
  }
345
345
  export {};
@@ -452,7 +452,7 @@ export class Utils {
452
452
  */
453
453
  static isUseBright(color, defaultValue) {
454
454
  if (!color) {
455
- return defaultValue === undefined ? true : defaultValue;
455
+ return defaultValue ?? true;
456
456
  }
457
457
  color = color.toString();
458
458
  if (color.startsWith('#')) {
@@ -462,7 +462,7 @@ export class Utils {
462
462
  let g;
463
463
  let b;
464
464
  const rgb = color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
465
- if (rgb && rgb.length === 4) {
465
+ if (rgb?.length === 4) {
466
466
  r = parseInt(rgb[1], 10);
467
467
  g = parseInt(rgb[2], 10);
468
468
  b = parseInt(rgb[3], 10);