kr-elements 0.0.1-alpha.23 → 0.0.1-alpha.25

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.
@@ -117,11 +117,11 @@ class ComboboxMarkup {
117
117
  const userTagTemplate = this.#shadowRoot.host.firstElementChild;
118
118
  if (userTagTemplate && userTagTemplate instanceof HTML_combobox_tag_element_js_1.HTMLComboboxTagElement) {
119
119
  const tag = userTagTemplate.cloneNode(true);
120
- option.querySelectorAll('[part]')
120
+ tag.querySelectorAll('[part]')
121
121
  .forEach(node => {
122
- const relatedPart = tag.querySelector(`[part*="${node.getAttribute('part')}"]`);
122
+ const relatedPart = option.querySelector(`[part*="${node.getAttribute('part')}"]`);
123
123
  if (relatedPart) {
124
- tag.replaceChild(node.cloneNode(true), relatedPart);
124
+ tag.replaceChild(relatedPart.cloneNode(true), node);
125
125
  }
126
126
  });
127
127
  const clearButton = tag.querySelector('[part*="tag-clear-button"]');
@@ -10,9 +10,6 @@ class HTMLComboboxTagElement extends HTMLElement {
10
10
  throw new Error(`A <button> with part="tag-clear-button" is required for <combo-box> with multiple attribute`);
11
11
  }
12
12
  }
13
- if (!this.querySelector('[part="tag-label"]')) {
14
- throw new Error(`Invalid <box-tag-template>, an element with part="tag-label" is required as a descendant`);
15
- }
16
13
  }
17
14
  }
18
15
  }
@@ -114,11 +114,11 @@ export class ComboboxMarkup {
114
114
  const userTagTemplate = this.#shadowRoot.host.firstElementChild;
115
115
  if (userTagTemplate && userTagTemplate instanceof HTMLComboboxTagElement) {
116
116
  const tag = userTagTemplate.cloneNode(true);
117
- option.querySelectorAll('[part]')
117
+ tag.querySelectorAll('[part]')
118
118
  .forEach(node => {
119
- const relatedPart = tag.querySelector(`[part*="${node.getAttribute('part')}"]`);
119
+ const relatedPart = option.querySelector(`[part*="${node.getAttribute('part')}"]`);
120
120
  if (relatedPart) {
121
- tag.replaceChild(node.cloneNode(true), relatedPart);
121
+ tag.replaceChild(relatedPart.cloneNode(true), node);
122
122
  }
123
123
  });
124
124
  const clearButton = tag.querySelector('[part*="tag-clear-button"]');
@@ -7,9 +7,6 @@ export class HTMLComboboxTagElement extends HTMLElement {
7
7
  throw new Error(`A <button> with part="tag-clear-button" is required for <combo-box> with multiple attribute`);
8
8
  }
9
9
  }
10
- if (!this.querySelector('[part="tag-label"]')) {
11
- throw new Error(`Invalid <box-tag-template>, an element with part="tag-label" is required as a descendant`);
12
- }
13
10
  }
14
11
  }
15
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HTML.combobox.tag.element.d.ts","sourceRoot":"","sources":["../../../src/combobox/HTML.combobox.tag.element.ts"],"names":[],"mappings":"AAAA,qBAAa,sBAAuB,SAAQ,WAAW;IACrD,iBAAiB;CAalB"}
1
+ {"version":3,"file":"HTML.combobox.tag.element.d.ts","sourceRoot":"","sources":["../../../src/combobox/HTML.combobox.tag.element.ts"],"names":[],"mappings":"AAAA,qBAAa,sBAAuB,SAAQ,WAAW;IACrD,iBAAiB;CAUlB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kr-elements",
3
- "version": "0.0.1-alpha.23",
3
+ "version": "0.0.1-alpha.25",
4
4
  "description": "Custom elements",
5
5
  "type": "module",
6
6
  "scripts": {