@digital-realty/ix-switch-bar 2.3.12 → 2.4.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.
- package/dist/ix-switch-bar.min.js +47 -1
- package/package.json +10 -17
|
@@ -1 +1,47 @@
|
|
|
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 as e}from"tslib";import{css as t,LitElement as i,nothing as o,html as s}from"lit";import{property as r}from"lit/decorators.js";import"@digital-realty/ix-switch";const n=t`
|
|
2
|
+
:host {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
align-items: center;
|
|
6
|
+
border: 1px solid lightgrey;
|
|
7
|
+
border-width: 1px 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host([hidden]) {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
p {
|
|
15
|
+
margin: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
p:not(:last-child) {
|
|
19
|
+
margin: 0 0 0.25rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.switch-bar__label {
|
|
23
|
+
padding: 0.5em 0;
|
|
24
|
+
margin-right: 0.5em;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.switch-bar__note {
|
|
28
|
+
font-size: 0.875rem;
|
|
29
|
+
font-weight: normal;
|
|
30
|
+
line-height: 1rem;
|
|
31
|
+
margin: 0;
|
|
32
|
+
font-style: italic;
|
|
33
|
+
color: #595959;
|
|
34
|
+
}
|
|
35
|
+
`;class d extends i{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[n]}get isNoteProvided(){return this.note&&this.note.length}renderNote(){return this.isNoteProvided?s` <p class="switch-bar__note">${this.note}</p> `:o}render(){return s`
|
|
36
|
+
<div class="switch-bar__label">
|
|
37
|
+
<p>${this.text}</p>
|
|
38
|
+
${this.renderNote()}
|
|
39
|
+
</div>
|
|
40
|
+
<ix-switch
|
|
41
|
+
?selected="${this.selected}"
|
|
42
|
+
?disabled="${this.disabled}"
|
|
43
|
+
?required="${this.required}"
|
|
44
|
+
?icons="${this.icons}"
|
|
45
|
+
?showOnlySelectedIcon="${this.showOnlySelectedIcon}"
|
|
46
|
+
></ix-switch>
|
|
47
|
+
`}}e([r({type:String})],d.prototype,"text",void 0),e([r({type:String})],d.prototype,"note",void 0),e([r({type:Boolean})],d.prototype,"selected",void 0),e([r({type:Boolean})],d.prototype,"disabled",void 0),e([r({type:Boolean})],d.prototype,"required",void 0),e([r({type:Boolean})],d.prototype,"icons",void 0),e([r({type:Boolean})],d.prototype,"showOnlySelectedIcon",void 0),window.customElements.define("ix-switch-bar",d);
|
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.
|
|
6
|
+
"version": "2.4.1",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -21,36 +21,34 @@
|
|
|
21
21
|
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
|
|
22
22
|
"build": "tsc && npm run analyze -- --exclude dist && rollup -c",
|
|
23
23
|
"prepublish": "tsc && npm run analyze -- --exclude dist",
|
|
24
|
-
"lint": "eslint --ext .ts,.html .
|
|
25
|
-
"format": "eslint --ext .ts,.html . --fix
|
|
24
|
+
"lint": "eslint --ext .ts,.html . && prettier \"**/*.ts\" --check --ignore-path .gitignore",
|
|
25
|
+
"format": "eslint --ext .ts,.html . --fix && prettier \"**/*.ts\" --write --ignore-path .gitignore",
|
|
26
26
|
"test": "tsc && wtr --coverage",
|
|
27
27
|
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@digital-realty/ix-switch": "^2.
|
|
30
|
+
"@digital-realty/ix-switch": "^2.4.1",
|
|
31
31
|
"@lit/react": "^1.0.2",
|
|
32
32
|
"lit": "^3.2.1",
|
|
33
33
|
"react": "^18.2.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
37
|
-
"@open-wc/eslint-config": "^9.2.1",
|
|
38
37
|
"@open-wc/testing": "^3.1.6",
|
|
38
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
39
39
|
"@types/react": "^18.2.22",
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
41
|
-
"@typescript-eslint/parser": "^
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^8.58.2",
|
|
41
|
+
"@typescript-eslint/parser": "^8.58.2",
|
|
42
42
|
"@web/dev-server": "^0.4.6",
|
|
43
43
|
"@web/test-runner": "^0.20.2",
|
|
44
|
-
"concurrently": "^9.1
|
|
45
|
-
"eslint": "^
|
|
44
|
+
"concurrently": "^9.2.1",
|
|
45
|
+
"eslint": "^9.39.4",
|
|
46
46
|
"eslint-config-prettier": "^8.3.0",
|
|
47
47
|
"husky": "^4.3.8",
|
|
48
48
|
"lint-staged": "^10.5.4",
|
|
49
49
|
"prettier": "^2.4.1",
|
|
50
50
|
"rollup": "^4.29.1",
|
|
51
|
-
"rollup-plugin-minify-html-literals": "^1.2.6",
|
|
52
51
|
"rollup-plugin-summary": "^2.0.0",
|
|
53
|
-
"rollup-plugin-uglify": "^6.0.4",
|
|
54
52
|
"tslib": "^2.3.1",
|
|
55
53
|
"typescript": "^4.5.2"
|
|
56
54
|
},
|
|
@@ -58,11 +56,6 @@
|
|
|
58
56
|
"eslintConfig": {
|
|
59
57
|
"parser": "@typescript-eslint/parser",
|
|
60
58
|
"root": true,
|
|
61
|
-
"extends": [
|
|
62
|
-
"@open-wc/eslint-config",
|
|
63
|
-
"eslint-config-prettier",
|
|
64
|
-
"plugin:json/recommended"
|
|
65
|
-
],
|
|
66
59
|
"plugins": [
|
|
67
60
|
"@typescript-eslint"
|
|
68
61
|
],
|
|
@@ -104,5 +97,5 @@
|
|
|
104
97
|
"README.md",
|
|
105
98
|
"LICENSE"
|
|
106
99
|
],
|
|
107
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "da06737d6707fd3d4ef898ba0fa632e7b3ed8019"
|
|
108
101
|
}
|