kr-elements 0.0.1-alpha.24 → 0.0.1-alpha.26

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.
@@ -121,13 +121,14 @@ class ComboboxMarkup {
121
121
  .forEach(node => {
122
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"]');
128
128
  if (!clearButton && this.#shadowRoot.host.hasAttribute('multiple')) {
129
129
  throw new Error(`A button with part "tag-clear-button"`);
130
130
  }
131
+ clearButton.setAttribute('value', option.value);
131
132
  this.tagsContainer.appendChild(tag);
132
133
  return clearButton;
133
134
  }
@@ -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
  }
@@ -118,13 +118,14 @@ export class ComboboxMarkup {
118
118
  .forEach(node => {
119
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"]');
125
125
  if (!clearButton && this.#shadowRoot.host.hasAttribute('multiple')) {
126
126
  throw new Error(`A button with part "tag-clear-button"`);
127
127
  }
128
+ clearButton.setAttribute('value', option.value);
128
129
  this.tagsContainer.appendChild(tag);
129
130
  return clearButton;
130
131
  }
@@ -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":"Combobox.markup.d.ts","sourceRoot":"","sources":["../../../src/combobox/Combobox.markup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,qBAAa,cAAc;;IAGzB,aAAa,EAAE,cAAc,GAAG,IAAI,CAAQ;IAC5C,gBAAgB,EAAE,cAAc,GAAG,IAAI,CAAQ;IAC/C,cAAc,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IAChD,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAQ;IACvC,WAAW,EAAE,cAAc,GAAG,IAAI,CAAQ;IAC1C,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAC5C,WAAW,EAAE,sBAAsB,GAAG,IAAI,CAAQ;IAElD,SAAS,UAAS;gBAEN,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB;IAU/D,OAAO;IAiBP,IAAI,CAAC,KAAK,EAAE,MAAM;IAiBlB,UAAU;IASV,YAAY,aAIX;IAED,mBAAmB,CAAC,IAAI,EAAE,OAAO;IAmBjC,YAAY,aAUX;IAED,YAAY,GAAI,OAAO,KAAK,UAU3B;IAED,kBAAkB,CAAC,MAAM,EAAE,yBAAyB;IA6BpD,aAAa,CAAC,KAAK,EAAE,MAAM;IAI3B,gBAAgB,CAAC,KAAK,EAAE,MAAM;IAI9B,IAAI,eAAe,0CAGlB;IAED,MAAM,KAAK,QAAQ,WAqLlB;CACF"}
1
+ {"version":3,"file":"Combobox.markup.d.ts","sourceRoot":"","sources":["../../../src/combobox/Combobox.markup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,qBAAa,cAAc;;IAGzB,aAAa,EAAE,cAAc,GAAG,IAAI,CAAQ;IAC5C,gBAAgB,EAAE,cAAc,GAAG,IAAI,CAAQ;IAC/C,cAAc,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IAChD,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAQ;IACvC,WAAW,EAAE,cAAc,GAAG,IAAI,CAAQ;IAC1C,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAC5C,WAAW,EAAE,sBAAsB,GAAG,IAAI,CAAQ;IAElD,SAAS,UAAS;gBAEN,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB;IAU/D,OAAO;IAiBP,IAAI,CAAC,KAAK,EAAE,MAAM;IAiBlB,UAAU;IASV,YAAY,aAIX;IAED,mBAAmB,CAAC,IAAI,EAAE,OAAO;IAmBjC,YAAY,aAUX;IAED,YAAY,GAAI,OAAO,KAAK,UAU3B;IAED,kBAAkB,CAAC,MAAM,EAAE,yBAAyB;IA8BpD,aAAa,CAAC,KAAK,EAAE,MAAM;IAI3B,gBAAgB,CAAC,KAAK,EAAE,MAAM;IAI9B,IAAI,eAAe,0CAGlB;IAED,MAAM,KAAK,QAAQ,WAqLlB;CACF"}
@@ -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.24",
3
+ "version": "0.0.1-alpha.26",
4
4
  "description": "Custom elements",
5
5
  "type": "module",
6
6
  "scripts": {