kr-elements 0.0.1-alpha.19 → 0.0.1-alpha.20

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.
@@ -24,13 +24,23 @@ class HTMLComboboxOptionElement extends HTMLElement {
24
24
  else {
25
25
  throw new Error('box-option must have value and label attributes');
26
26
  }
27
+ return;
27
28
  }
28
- else {
29
- this.value = value || label;
30
- this.label = label || value;
31
- if (hasNoMarkup && !hasText) {
32
- this.textContent = this.label;
29
+ if (value && !label) {
30
+ if (hasNoMarkup && hasText) {
31
+ this.label = text;
32
+ }
33
+ else {
34
+ throw new Error('box-option must have label attribute');
33
35
  }
36
+ return;
37
+ }
38
+ if (!value && label) {
39
+ this.value = label;
40
+ return;
41
+ }
42
+ if (hasNoMarkup && !hasText) {
43
+ this.textContent = label || value;
34
44
  }
35
45
  }
36
46
  get value() {
@@ -20,13 +20,23 @@ export class HTMLComboboxOptionElement extends HTMLElement {
20
20
  else {
21
21
  throw new Error('box-option must have value and label attributes');
22
22
  }
23
+ return;
23
24
  }
24
- else {
25
- this.value = value || label;
26
- this.label = label || value;
27
- if (hasNoMarkup && !hasText) {
28
- this.textContent = this.label;
25
+ if (value && !label) {
26
+ if (hasNoMarkup && hasText) {
27
+ this.label = text;
28
+ }
29
+ else {
30
+ throw new Error('box-option must have label attribute');
29
31
  }
32
+ return;
33
+ }
34
+ if (!value && label) {
35
+ this.value = label;
36
+ return;
37
+ }
38
+ if (hasNoMarkup && !hasText) {
39
+ this.textContent = label || value;
30
40
  }
31
41
  }
32
42
  get value() {
@@ -1 +1 @@
1
- {"version":3,"file":"HTML.combobox.option.element.d.ts","sourceRoot":"","sources":["../../../src/combobox/HTML.combobox.option.element.ts"],"names":[],"mappings":"AAEA,qBAAa,yBAA0B,SAAQ,WAAW;;IACxD,MAAM,CAAC,iBAAiB,cAAyB;IACjD,MAAM,CAAC,gBAAgB,cAA+B;IAEtD,iBAAiB;IA6BjB,IAAI,KAAK,WAER;IACD,IAAI,KAAK,CAAC,KAAK,QAAA,EAEd;IAED,IAAI,KAAK,WAER;IACD,IAAI,KAAK,CAAC,KAAK,QAAA,EAEd;IAED,IAAI,QAAQ,YAEX;IACD,IAAI,QAAQ,CAAC,KAAK,SAAA,EAEjB;IAYD,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAYxC,eAAe,CAAC,IAAI,EAAE,MAAM;CAU7B"}
1
+ {"version":3,"file":"HTML.combobox.option.element.d.ts","sourceRoot":"","sources":["../../../src/combobox/HTML.combobox.option.element.ts"],"names":[],"mappings":"AAEA,qBAAa,yBAA0B,SAAQ,WAAW;;IACxD,MAAM,CAAC,iBAAiB,cAAyB;IACjD,MAAM,CAAC,gBAAgB,cAA+B;IAEtD,iBAAiB;IAyCjB,IAAI,KAAK,WAER;IACD,IAAI,KAAK,CAAC,KAAK,QAAA,EAEd;IAED,IAAI,KAAK,WAER;IACD,IAAI,KAAK,CAAC,KAAK,QAAA,EAEd;IAED,IAAI,QAAQ,YAEX;IACD,IAAI,QAAQ,CAAC,KAAK,SAAA,EAEjB;IAYD,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAYxC,eAAe,CAAC,IAAI,EAAE,MAAM;CAU7B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kr-elements",
3
- "version": "0.0.1-alpha.19",
3
+ "version": "0.0.1-alpha.20",
4
4
  "description": "Custom elements",
5
5
  "type": "module",
6
6
  "scripts": {