@digital-realty/ix-switch-bar 2.1.11 → 2.1.13-alpha.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate}from"tslib";import{css,LitElement,nothing,html}from"lit";import{property}from"lit/decorators.js";import"@digital-realty/ix-switch";
|
|
1
|
+
import{__decorate}from"tslib";import{css,LitElement,nothing,html}from"lit";import{property}from"lit/decorators.js";import"@digital-realty/ix-switch";let IxSwitchBarStyle=css`:host{display:flex;justify-content:space-between;align-items:center;border:1px solid #d3d3d3;border-width:1px 0}:host([hidden]){display:none}p{margin:0}p:not(:last-child){margin:0 0 .25rem}.switch-bar__label{padding:.5em 0;margin-right:.5em}.switch-bar__note{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;font-style:italic;color:#595959}`;class IxSwitchBar extends LitElement{constructor(){super(...arguments),this.text="",this.note="",this.selected=!1,this.disabled=!1,this.required=!1,this.icons=!1,this.showOnlySelectedIcon=!1}static get styles(){return[IxSwitchBarStyle]}get isNoteProvided(){return this.note&&this.note.length}renderNote(){return this.isNoteProvided?html`<p class="switch-bar__note">${this.note}</p>`:nothing}render(){return html`<div class="switch-bar__label"><p>${this.text}</p>${this.renderNote()}</div><ix-switch ?selected="${this.selected}" ?disabled="${this.disabled}" ?required="${this.required}" ?icons="${this.icons}" ?showOnlySelectedIcon="${this.showOnlySelectedIcon}"></ix-switch>`}}__decorate([property({type:String})],IxSwitchBar.prototype,"text",void 0),__decorate([property({type:String})],IxSwitchBar.prototype,"note",void 0),__decorate([property({type:Boolean})],IxSwitchBar.prototype,"selected",void 0),__decorate([property({type:Boolean})],IxSwitchBar.prototype,"disabled",void 0),__decorate([property({type:Boolean})],IxSwitchBar.prototype,"required",void 0),__decorate([property({type:Boolean})],IxSwitchBar.prototype,"icons",void 0),__decorate([property({type:Boolean})],IxSwitchBar.prototype,"showOnlySelectedIcon",void 0),window.customElements.define("ix-switch-bar",IxSwitchBar);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent ix-switch-bar following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Digital Realty",
|
|
6
|
-
"version": "2.1.
|
|
6
|
+
"version": "2.1.13-alpha.1",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@digital-realty/ix-switch": "^2.1.
|
|
30
|
+
"@digital-realty/ix-switch": "^2.1.12-alpha.1",
|
|
31
31
|
"@lit/react": "^1.0.2",
|
|
32
32
|
"lit": "^2.0.2",
|
|
33
33
|
"react": "^18.2.0"
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"README.md",
|
|
104
104
|
"LICENSE"
|
|
105
105
|
],
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "22ec023bfc49506327d74412840e42412735bb09"
|
|
107
107
|
}
|