@rededor/cura-hydrate 0.5.3 → 0.5.4

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 (2) hide show
  1. package/index.js +14 -11
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -6903,8 +6903,7 @@ class CuraCheckbox {
6903
6903
  this.styles = {};
6904
6904
  }
6905
6905
  sizeHandler() {
6906
- this.styles['--size'] = `${formsSizes[this.size].size}px`;
6907
- this.styles['--gap'] = `${formsSizes[this.size].gap}px`;
6906
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--size': `${formsSizes[this.size].size}px`, '--gap': `${formsSizes[this.size].gap}px` });
6908
6907
  }
6909
6908
  /**
6910
6909
  * Watches changes in color and background properties to update styles.
@@ -6933,7 +6932,9 @@ class CuraCheckbox {
6933
6932
  { name: '--error-base-lighter', background: this.isDarkbackground() ? 'error-base' : 'error-lighter' },
6934
6933
  { name: '--error-dark-base', background: this.isDarkbackground() ? 'error-dark' : 'error-base' },
6935
6934
  ];
6936
- colors.forEach(color => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background));
6935
+ colors.forEach(color => {
6936
+ this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background);
6937
+ });
6937
6938
  this.styles = Object.assign({}, this.styles);
6938
6939
  }
6939
6940
  connectedCallback() {
@@ -11491,9 +11492,7 @@ class CuraRadio {
11491
11492
  this.styles = {};
11492
11493
  }
11493
11494
  sizeHandler() {
11494
- this.styles['--size-after'] = `${this.sizes[this.size].size}px`;
11495
- this.styles['--size'] = `${formsSizes[this.size].size}px`;
11496
- this.styles['--gap'] = `${formsSizes[this.size].gap}px`;
11495
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--size-after': `${this.sizes[this.size].size}px`, '--size': `${formsSizes[this.size].size}px`, '--gap': `${formsSizes[this.size].gap}px` });
11497
11496
  }
11498
11497
  setColors() {
11499
11498
  const colors = [
@@ -11516,7 +11515,10 @@ class CuraRadio {
11516
11515
  { name: '--success-base-dark', background: this.isDarkbackground() ? 'success-base' : 'success-dark' },
11517
11516
  { name: '--error-base-dark', background: this.isDarkbackground() ? 'error-base' : 'error-dark' },
11518
11517
  ];
11519
- colors.forEach(color => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background));
11518
+ colors.forEach(color => {
11519
+ this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background);
11520
+ });
11521
+ this.styles = Object.assign({}, this.styles);
11520
11522
  }
11521
11523
  connectedCallback() {
11522
11524
  this.sizeHandler();
@@ -11613,9 +11615,7 @@ class CuraSwitch {
11613
11615
  this.styles = {};
11614
11616
  }
11615
11617
  sizeHandler() {
11616
- this.styles['--size-track'] = `${this.sizes[this.size].size}px`;
11617
- this.styles['--size'] = `${formsSizes[this.size].size}px`;
11618
- this.styles['--gap'] = `${formsSizes[this.size].gap}px`;
11618
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--size-track': `${this.sizes[this.size].size}px`, '--size': `${formsSizes[this.size].size}px`, '--gap': `${formsSizes[this.size].gap}px` });
11619
11619
  }
11620
11620
  setColors() {
11621
11621
  const colors = [
@@ -11633,7 +11633,10 @@ class CuraSwitch {
11633
11633
  { name: '--primary-dark-neutral-base', background: `${this.isDarkbackground() ? 'primary-dark' : 'neutral-base'}` },
11634
11634
  { name: '--neutral-lighter', background: `${this.isDarkbackground() ? 'primary-base' : 'neutral-lighter'}` },
11635
11635
  ];
11636
- colors.forEach(color => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background, color === null || color === void 0 ? void 0 : color.opacity));
11636
+ colors.forEach(color => {
11637
+ this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background, color === null || color === void 0 ? void 0 : color.opacity);
11638
+ });
11639
+ this.styles = Object.assign({}, this.styles);
11637
11640
  }
11638
11641
  connectedCallback() {
11639
11642
  this.sizeHandler();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rededor/cura-hydrate",
3
- "description": "Cura Design System Hydration App.",
3
+ "description": "cura component hydration app.",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
- "version": "0.5.3"
6
+ "version": "0.5.4"
7
7
  }