@db-ux/wc-core-components 4.12.1 → 4.13.0

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.
@@ -203,6 +203,11 @@
203
203
  { "name": "submit" }
204
204
  ]
205
205
  },
206
+ {
207
+ "name": "commandfor",
208
+ "description": "The [commandfor](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#commandfor) attribute turns a `<button>` into a command button that controls the given interactive element referenced by `id`.",
209
+ "values": []
210
+ },
206
211
  { "name": "id", "values": [{ "name": "DBButtonProps[\"id\"]" }] },
207
212
  {
208
213
  "name": "prop-overrides",
@@ -292,6 +297,11 @@
292
297
  "description": "The value attribute specifies an initial [value for the button](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value).",
293
298
  "values": []
294
299
  },
300
+ {
301
+ "name": "command",
302
+ "description": "The [command](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#command) attribute specifies the action to perform on the element controlled by a `<button>` element.",
303
+ "values": []
304
+ },
295
305
  {
296
306
  "name": "text",
297
307
  "description": "Alternative for default slot/children. Do not use together with a text children/slot, as both will be rendered and result in duplicate labels.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@db-ux/wc-core-components",
4
- "version": "4.12.1",
4
+ "version": "4.13.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -403,6 +403,11 @@
403
403
  "description": "The type attribute specifies the [type of button](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type).",
404
404
  "value": { "type": "\"button\" | \"reset\" | \"submit\"" }
405
405
  },
406
+ {
407
+ "name": "commandfor",
408
+ "description": "The [commandfor](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#commandfor) attribute turns a `<button>` into a command button that controls the given interactive element referenced by `id`.",
409
+ "value": { "type": "string" }
410
+ },
406
411
  { "name": "id", "value": { "type": "DBButtonProps[\"id\"]" } },
407
412
  {
408
413
  "name": "prop-overrides",
@@ -489,6 +494,11 @@
489
494
  "description": "The value attribute specifies an initial [value for the button](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value).",
490
495
  "value": { "type": "string" }
491
496
  },
497
+ {
498
+ "name": "command",
499
+ "description": "The [command](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#command) attribute specifies the action to perform on the element controlled by a `<button>` element.",
500
+ "value": { "type": "string" }
501
+ },
492
502
  {
493
503
  "name": "text",
494
504
  "description": "Alternative for default slot/children. Do not use together with a text children/slot, as both will be rendered and result in duplicate labels.",
@@ -515,6 +525,11 @@
515
525
  "description": "The type attribute specifies the [type of button](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type).",
516
526
  "type": "\"button\" | \"reset\" | \"submit\""
517
527
  },
528
+ {
529
+ "name": "commandfor",
530
+ "description": "The [commandfor](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#commandfor) attribute turns a `<button>` into a command button that controls the given interactive element referenced by `id`.",
531
+ "type": "string"
532
+ },
518
533
  { "name": "id", "type": "DBButtonProps[\"id\"]" },
519
534
  {
520
535
  "name": "propOverrides",
@@ -596,6 +611,11 @@
596
611
  "description": "The value attribute specifies an initial [value for the button](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value).",
597
612
  "type": "string"
598
613
  },
614
+ {
615
+ "name": "command",
616
+ "description": "The [command](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#command) attribute specifies the action to perform on the element controlled by a `<button>` element.",
617
+ "type": "string"
618
+ },
599
619
  {
600
620
  "name": "text",
601
621
  "description": "Alternative for default slot/children. Do not use together with a text children/slot, as both will be rendered and result in duplicate labels.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@db-ux/wc-core-components",
3
- "version": "4.12.1",
3
+ "version": "4.13.0",
4
4
  "type": "module",
5
5
  "description": "Stencil components for @db-ux/core-components",
6
6
  "repository": {
@@ -31,8 +31,8 @@
31
31
  "dist/"
32
32
  ],
33
33
  "dependencies": {
34
- "@db-ux/core-components": "4.12.1",
35
- "@db-ux/core-foundations": "4.12.1"
34
+ "@db-ux/core-components": "4.13.0",
35
+ "@db-ux/core-foundations": "4.13.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@custom-elements-manifest/analyzer": "0.11.0",
@@ -43,7 +43,7 @@
43
43
  "custom-element-jet-brains-integration": "1.7.0",
44
44
  "custom-element-vs-code-integration": "1.5.0",
45
45
  "npm-run-all2": "9.0.2",
46
- "storybook": "10.4.4",
46
+ "storybook": "10.4.6",
47
47
  "workbox-build": "7.4.1"
48
48
  },
49
49
  "publishConfig": {
@@ -1 +0,0 @@
1
- import{y as t,H as i,A as s,z as n,j as a,k as e,d as o,t as d}from"./p-CYYSsu3p.js";const h=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.click=s(this,"click"),this.observer=void 0}getButtonType(){return this.type?this.type:this.click?"button":"submit"}setupObserver(t){if(!t)return;const i=t.closest("db-button");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-button")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let n=0;n<i.length;n++){const a=i.item(n);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const i=a.value.includes("hydrated"),n=a.value.replace("hydrated","").trim(),e=t.getAttribute("class");t.setAttribute(a.name,`${e||""}${n?` ${n}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-button"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,i,s;return n("button",{key:"5eadddc7c23a90019ab373dfd11aedfc2000735f",class:o("db-button",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id,type:this.getButtonType(),disabled:e(this.disabled,"disabled"),"data-icon":null!==(s=this.iconLeading)&&void 0!==s?s:this.icon,"data-show-icon":a(this.showIconLeading,"showIconLeading")||a(this.showIcon,"showIcon"),"data-icon-trailing":this.iconTrailing,"data-show-icon-trailing":a(this.showIconTrailing,"showIconTrailing"),"data-size":this.size,"data-width":this.width,"data-variant":this.variant,"data-wrap":a(this.wrap,"wrap"),"data-no-text":a(this.noText,"noText"),name:this.name,form:this.form,value:this.value},this.text?this.text:null,n("slot",{key:"d42f84050c3eb885783ed3488293062cf9a00bcf"}))}get rootElement(){return this}},[260,"db-button",{type:[1],id:[1],propOverrides:[16],className:[1,"classname"],disabled:[8],iconLeading:[1,"icon-leading"],icon:[1],showIconLeading:[8,"show-icon-leading"],showIcon:[8,"show-icon"],iconTrailing:[1,"icon-trailing"],showIconTrailing:[8,"show-icon-trailing"],size:[1],width:[1],variant:[1],wrap:[8],noText:[8,"no-text"],name:[1],form:[1],value:[1],text:[1],observer:[32]}]);function c(){"undefined"!=typeof customElements&&["db-button"].forEach((t=>{"db-button"===t&&(customElements.get(d(t))||customElements.define(d(t),h))}))}export{h as D,c as d}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i,g as a}from"./p-BlbKvvUv.js";import{g as n,e,c as o}from"./p-fumiz06Y.js";const d=class{constructor(i){t(this,i),this.click=s(this,"click"),this.observer=void 0}getButtonType(){return this.type?this.type:this.click?"button":"submit"}setupObserver(t){if(!t)return;const s=t.closest("db-button");s&&!this.observer&&(this.observer=new MutationObserver((s=>{s.some((t=>{var s;const i=t.target.attributes.getNamedItem(null!==(s=t.attributeName)&&void 0!==s?s:"");return(null==i?void 0:i.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-button")})),this.observer.observe(s,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,s){const i=null==t?void 0:t.closest(s);if(t&&i){const s=i.attributes;for(let a=0;a<s.length;a++){const n=s.item(a);if(n&&"data-density"!==n.name&&(n.name.startsWith("data-")||n.name.startsWith("aria-")))n.value?t.setAttribute(n.name,n.value):t.removeAttribute(n.name),i.removeAttribute(n.name);else if(n&&["style"].includes(n.name))t.setAttribute(n.name,n.value),i.removeAttribute(n.name);else if(n&&"class"===n.name){const s=n.value.includes("hydrated"),a=n.value.replace("hydrated","").trim(),e=t.getAttribute("class");t.setAttribute(n.name,`${e||""}${a?` ${a}`:""}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(n.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-button"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s,a;return i("button",{key:"5eadddc7c23a90019ab373dfd11aedfc2000735f",class:o("db-button",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id,type:this.getButtonType(),disabled:e(this.disabled,"disabled"),"data-icon":null!==(a=this.iconLeading)&&void 0!==a?a:this.icon,"data-show-icon":n(this.showIconLeading,"showIconLeading")||n(this.showIcon,"showIcon"),"data-icon-trailing":this.iconTrailing,"data-show-icon-trailing":n(this.showIconTrailing,"showIconTrailing"),"data-size":this.size,"data-width":this.width,"data-variant":this.variant,"data-wrap":n(this.wrap,"wrap"),"data-no-text":n(this.noText,"noText"),name:this.name,form:this.form,value:this.value},this.text?this.text:null,i("slot",{key:"d42f84050c3eb885783ed3488293062cf9a00bcf"}))}get rootElement(){return a(this)}};export{d as db_button}