@cds/core 6.0.0-next.2 → 6.0.0-next.3
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.
- package/button/button.element.d.ts +4 -3
- package/button/button.element.js +1 -1
- package/button/button.element.js.map +1 -1
- package/button-inline/button-inline.element.d.ts +0 -6
- package/button-inline/button-inline.element.js +1 -1
- package/button-inline/button-inline.element.js.map +1 -1
- package/button-inline/index.js +1 -1
- package/button-inline/register.d.ts +1 -6
- package/button-inline/register.js +1 -1
- package/button-inline/register.js.map +1 -1
- package/custom-elements.json +17964 -18235
- package/custom-elements.legacy.json +0 -29
- package/internal/base/base.element.scss.js +1 -1
- package/internal/index.d.ts +0 -1
- package/internal/index.js +1 -1
- package/internal/index.js.map +1 -1
- package/internal/utils/global.js +1 -1
- package/package.json +1 -1
- package/tree-view/register.d.ts +1 -0
- package/tree-view/register.js +1 -1
- package/tree-view/register.js.map +1 -1
- package/tree-view/story-utils.d.ts +22 -0
- package/tree-view/tree-item.element.d.ts +8 -0
- package/tree-view/tree-item.element.js.map +1 -1
- package/internal/utils/focus-trap.d.ts +0 -51
- package/internal/utils/focus-trap.js +0 -2
- package/internal/utils/focus-trap.js.map +0 -1
|
@@ -62,12 +62,13 @@ export declare class CdsButton extends CdsBaseButton {
|
|
|
62
62
|
* - `success`: disables the button and shows a check mark inside the button; auto-triggers to change back to DEFAULT state after 1000 ms
|
|
63
63
|
* - `error`: shows the content of the button (in the context of application, this state is usually entered from a LOADING state. the application should show appropriate error message)
|
|
64
64
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
loadingState: keyof typeof ClrLoadingState;
|
|
66
|
+
firstUpdated(props: Map<string, any>): void;
|
|
67
|
+
update(props: Map<string, any>): void;
|
|
68
68
|
private _disabled;
|
|
69
69
|
render(): import("lit-html").TemplateResult<1>;
|
|
70
70
|
static styles: import("lit").CSSResultGroup[];
|
|
71
|
+
isDefaultLoadingState(state: string): boolean;
|
|
71
72
|
private disableButton;
|
|
72
73
|
private enableButton;
|
|
73
74
|
}
|
package/button/button.element.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{CdsBaseButton as s,getElementWidth as
|
|
1
|
+
import{__decorate as t}from"tslib";import{CdsBaseButton as s,getElementWidth as i,baseStyles as e,property as a}from"@cds/core/internal";import{html as o}from"lit";import d from"./button.element.scss.js";var r;!function(t){t.default="default",t.loading="loading",t.success="success",t.error="error"}(r||(r={}));class l extends s{constructor(){super(...arguments),this.action="solid",this.status="primary",this.size="md",this.block=!1,this.loadingState=r.default,this._disabled=!1}firstUpdated(t){super.firstUpdated(t),this.isDefaultLoadingState(this.loadingState)||(this.disabled=!0)}update(t){t.has("loadingState")&&(this.isDefaultLoadingState(t.get("loadingState"))&&(this._disabled=this.disabled),void 0!==t.get("loadingState")&&(this.isDefaultLoadingState(this.loadingState)?this.enableButton():this.disableButton())),super.update(t)}render(){return o`<div class="private-host" cds-layout="horizontal gap:xs wrap:none align:center">${this.loadingState===r.success?o`<cds-icon shape="check" status="success" size="18"></cds-icon>`:""} ${this.loadingState===r.error?o`<cds-icon shape="error-standard" status="danger" size="18"></cds-icon>`:""} ${this.loadingState===r.loading?o`<cds-progress-circle .size="${"sm"===this.size?"12":"18"}" status="info"></cds-progress-circle>`:""} ${this.loadingState===r.default?o`<slot></slot>`:""}</div>`}isDefaultLoadingState(t){return t===r.default}disableButton(){this.style.width=i(this),this.disabled=!0}enableButton(){this.style.removeProperty("width"),this.disabled=this._disabled}}l.styles=[e,d],t([a({type:String})],l.prototype,"action",void 0),t([a({type:String})],l.prototype,"status",void 0),t([a({type:String})],l.prototype,"size",void 0),t([a({type:Boolean})],l.prototype,"block",void 0),t([a({type:String})],l.prototype,"loadingState",void 0);export{l as CdsButton,r as ClrLoadingState};
|
|
2
2
|
//# sourceMappingURL=button.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.element.js","sources":["../../../src/button/button.element.ts"],"sourcesContent":null,"names":["ClrLoadingState","CdsButton","CdsBaseButton","[object Object]","super","arguments","this","action","status","size","block","
|
|
1
|
+
{"version":3,"file":"button.element.js","sources":["../../../src/button/button.element.ts"],"sourcesContent":null,"names":["ClrLoadingState","CdsButton","CdsBaseButton","[object Object]","super","arguments","this","action","status","size","block","loadingState","default","_disabled","props","firstUpdated","isDefaultLoadingState","disabled","has","get","undefined","enableButton","disableButton","update","html","success","error","loading","state","style","width","getElementWidth","removeProperty","styles","baseStyles","__decorate","property","type","String","prototype","Boolean"],"mappings":"4MASU,IAACA,GACX,SAAWA,GACPA,EAAyB,QAAI,UAC7BA,EAAyB,QAAI,UAC7BA,EAAyB,QAAI,UAC7BA,EAAuB,MAAI,QAJ/B,CAKGA,IAAoBA,EAAkB,KA8BlC,MAAMC,UAAkBC,EAC3BC,cACIC,SAASC,WAQTC,KAAKC,OAAS,QAIdD,KAAKE,OAAS,UAIdF,KAAKG,KAAO,KAEZH,KAAKI,OAAQ,EAUbJ,KAAKK,aAAeX,EAAgBY,QACpCN,KAAKO,WAAY,EAErBV,aAAaW,GACTV,MAAMW,aAAaD,GACdR,KAAKU,sBAAsBV,KAAKK,gBACjCL,KAAKW,UAAW,GAGxBd,OAAOW,GACCA,EAAMI,IAAI,kBACNZ,KAAKU,sBAAsBF,EAAMK,IAAI,mBAErCb,KAAKO,UAAYP,KAAKW,eAEQG,IAA9BN,EAAMK,IAAI,kBACNb,KAAKU,sBAAsBV,KAAKK,cAChCL,KAAKe,eAGLf,KAAKgB,kBAIjBlB,MAAMmB,OAAOT,GAEjBX,SACI,OAAOqB,CAAK,mFACZlB,KAAKK,eAAiBX,EAAgByB,QAChCD,CAAK,iEACL,MACNlB,KAAKK,eAAiBX,EAAgB0B,MAChCF,CAAK,yEACL,MACNlB,KAAKK,eAAiBX,EAAgB2B,QAChCH,CAAK,+BAA4C,OAAdlB,KAAKG,KAAgB,KAAO,6CAC/D,MACNH,KAAKK,eAAiBX,EAAgBY,QAAUY,CAAK,gBAAkB,WAG3ErB,sBAAsByB,GAClB,OAAOA,IAAU5B,EAAgBY,QAErCT,gBACIG,KAAKuB,MAAMC,MAAQC,EAAgBzB,MACnCA,KAAKW,UAAW,EAEpBd,eACIG,KAAKuB,MAAMG,eAAe,SAC1B1B,KAAKW,SAAWX,KAAKO,WAG7BZ,EAAUgC,OAAS,CAACC,EAAYD,GAChCE,EAAW,CACPC,EAAS,CAAEC,KAAMC,UAClBrC,EAAUsC,UAAW,cAAU,GAClCJ,EAAW,CACPC,EAAS,CAAEC,KAAMC,UAClBrC,EAAUsC,UAAW,cAAU,GAClCJ,EAAW,CACPC,EAAS,CAAEC,KAAMC,UAClBrC,EAAUsC,UAAW,YAAQ,GAChCJ,EAAW,CACPC,EAAS,CAAEC,KAAMG,WAClBvC,EAAUsC,UAAW,aAAS,GACjCJ,EAAW,CACPC,EAAS,CAAEC,KAAMC,UAClBrC,EAAUsC,UAAW,oBAAgB"}
|
|
@@ -25,9 +25,3 @@ export declare class CdsButtonInline extends CdsBaseButton {
|
|
|
25
25
|
render(): import("lit-html").TemplateResult<1>;
|
|
26
26
|
static get styles(): import("lit").CSSResultGroup[];
|
|
27
27
|
}
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated
|
|
30
|
-
* renamed to `cds-button-inline` in 6.0 to align to rest of the `cds-button-*` APIs
|
|
31
|
-
*/
|
|
32
|
-
export declare class CdsInlineButton extends CdsButtonInline {
|
|
33
|
-
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{CdsBaseButton as
|
|
1
|
+
import{__decorate as t}from"tslib";import{CdsBaseButton as o,addClassnames as e,baseStyles as s,querySlot as n}from"@cds/core/internal";import{html as r}from"lit";import c from"./button-inline.element.scss.js";class i extends o{connectedCallback(){super.connectedCallback(),this.icon&&e(this.icon,"anchored-icon")}render(){return r`<span class="private-host"><slot></slot></span>`}static get styles(){return[s,c]}}t([n("cds-icon")],i.prototype,"icon",void 0);export{i as CdsButtonInline};
|
|
2
2
|
//# sourceMappingURL=button-inline.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-inline.element.js","sources":["../../../src/button-inline/button-inline.element.ts"],"sourcesContent":null,"names":["CdsButtonInline","CdsBaseButton","[object Object]","super","connectedCallback","this","icon","addClassnames","html","styles","baseStyles","__decorate","querySlot","prototype"
|
|
1
|
+
{"version":3,"file":"button-inline.element.js","sources":["../../../src/button-inline/button-inline.element.ts"],"sourcesContent":null,"names":["CdsButtonInline","CdsBaseButton","[object Object]","super","connectedCallback","this","icon","addClassnames","html","styles","baseStyles","__decorate","querySlot","prototype"],"mappings":"kNA6BO,MAAMA,UAAwBC,EACjCC,oBACIC,MAAMC,oBAGFC,KAAKC,MACLC,EAAcF,KAAKC,KAAM,iBAGjCJ,SACI,OAAOM,CAAK,kDAEhBC,oBACI,MAAO,CAACC,EAAYD,IAG5BE,EAAW,CACPC,EAAU,aACXZ,EAAgBa,UAAW,YAAQ"}
|
package/button-inline/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{CdsButtonInline
|
|
1
|
+
export{CdsButtonInline}from"./button-inline.element.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { CdsButtonInline
|
|
1
|
+
import { CdsButtonInline } from './button-inline.element.js';
|
|
2
2
|
declare global {
|
|
3
3
|
interface HTMLElementTagNameMap {
|
|
4
4
|
'cds-button-inline': CdsButtonInline;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
declare global {
|
|
8
|
-
interface HTMLElementTagNameMap {
|
|
9
|
-
'cds-inline-button': CdsInlineButton;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{registerElementSafely as n}from"@cds/core/internal";import{CdsButtonInline as t
|
|
1
|
+
import{registerElementSafely as n}from"@cds/core/internal";import{CdsButtonInline as t}from"./button-inline.element.js";n("cds-button-inline",t);
|
|
2
2
|
//# sourceMappingURL=register.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sources":["../../../src/button-inline/register.ts"],"sourcesContent":null,"names":["registerElementSafely","CdsButtonInline"
|
|
1
|
+
{"version":3,"file":"register.js","sources":["../../../src/button-inline/register.ts"],"sourcesContent":null,"names":["registerElementSafely","CdsButtonInline"],"mappings":"wHAOAA,EAAsB,oBAAqBC"}
|