tinkiet 0.6.0 → 0.7.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.
- package/accordion/accordion.js +5 -9
- package/box/box.js +6 -8
- package/box/focusable-box.js +3 -5
- package/button/button.js +9 -14
- package/checkbox/checkbox.js +9 -13
- package/dialog/dialog.d.ts +1 -1
- package/dialog/dialog.js +8 -11
- package/drawer/drawer.js +16 -22
- package/form/form.js +4 -4
- package/icon/icon.js +5 -9
- package/icon/icons.js +3 -5
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -0
- package/list-item/list-item.js +10 -15
- package/loading/loading.js +4 -7
- package/notie/notie.d.ts +1 -1
- package/notie/notie.js +18 -32
- package/package.json +3 -1
- package/pages/pages.js +10 -13
- package/progress/progress.js +9 -13
- package/radio/radio.js +13 -22
- package/select/select.js +23 -41
- package/slider/slider.js +20 -35
- package/switch/switch.js +12 -19
- package/tab-group/tab-group.js +14 -19
- package/tag/tag.js +4 -4
- package/textarea/textarea.js +23 -41
- package/textfield/textfield.js +24 -43
- package/theme/theme.js +17 -29
- package/umd/tinkiet.min.d.ts +3 -2
- package/umd/tinkiet.min.d.ts.map +1 -0
- package/umd/tinkiet.min.js +1 -1
package/pages/pages.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import { LitElement, css, unsafeCSS
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
3
|
import { property, customElement } from 'lit/decorators.js';
|
|
4
4
|
import css_248z from './pages.scss.js';
|
|
5
5
|
|
|
@@ -11,9 +11,6 @@ let TkPages = class TkPages extends LitElement {
|
|
|
11
11
|
this.handleScroll = false;
|
|
12
12
|
this.scrollHistory = {};
|
|
13
13
|
}
|
|
14
|
-
static { this.styles = css `
|
|
15
|
-
${unsafeCSS(css_248z)}
|
|
16
|
-
`; }
|
|
17
14
|
set page(val) {
|
|
18
15
|
let oldVal = this._page;
|
|
19
16
|
this._page = val;
|
|
@@ -37,7 +34,8 @@ let TkPages = class TkPages extends LitElement {
|
|
|
37
34
|
updated(props) {
|
|
38
35
|
if (props.has("page")) {
|
|
39
36
|
this.querySelectorAll(":scope > *").forEach(el => {
|
|
40
|
-
|
|
37
|
+
var _a;
|
|
38
|
+
const elPageAttribute = (_a = el.getAttribute("page")) !== null && _a !== void 0 ? _a : "default";
|
|
41
39
|
const scrollElement = document.scrollingElement || document.documentElement;
|
|
42
40
|
if (elPageAttribute == this.page) {
|
|
43
41
|
el.removeAttribute("hidden");
|
|
@@ -58,18 +56,17 @@ let TkPages = class TkPages extends LitElement {
|
|
|
58
56
|
}
|
|
59
57
|
}
|
|
60
58
|
};
|
|
59
|
+
TkPages.styles = css `
|
|
60
|
+
${unsafeCSS(css_248z)}
|
|
61
|
+
`;
|
|
61
62
|
__decorate([
|
|
62
|
-
property({ attribute: "page", type: String })
|
|
63
|
-
__metadata("design:type", String),
|
|
64
|
-
__metadata("design:paramtypes", [String])
|
|
63
|
+
property({ attribute: "page", type: String })
|
|
65
64
|
], TkPages.prototype, "page", null);
|
|
66
65
|
__decorate([
|
|
67
|
-
property({ attribute: true, type: String })
|
|
68
|
-
__metadata("design:type", String)
|
|
66
|
+
property({ attribute: true, type: String })
|
|
69
67
|
], TkPages.prototype, "selected", void 0);
|
|
70
68
|
__decorate([
|
|
71
|
-
property({ attribute: "handle-scroll", type: Boolean })
|
|
72
|
-
__metadata("design:type", Boolean)
|
|
69
|
+
property({ attribute: "handle-scroll", type: Boolean })
|
|
73
70
|
], TkPages.prototype, "handleScroll", void 0);
|
|
74
71
|
TkPages = __decorate([
|
|
75
72
|
customElement("tk-pages")
|
package/progress/progress.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import { LitElement, css, unsafeCSS
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
3
|
import { property, customElement } from 'lit/decorators.js';
|
|
4
4
|
import css_248z from './progress.scss.js';
|
|
5
5
|
|
|
@@ -11,9 +11,6 @@ let TkProgress = class TkProgress extends LitElement {
|
|
|
11
11
|
this.value = 0;
|
|
12
12
|
this.buffer = 0;
|
|
13
13
|
}
|
|
14
|
-
static { this.styles = css `
|
|
15
|
-
${unsafeCSS(css_248z)}
|
|
16
|
-
`; }
|
|
17
14
|
render() {
|
|
18
15
|
return html `${this.circle
|
|
19
16
|
? html `<svg class="spinner" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -28,21 +25,20 @@ let TkProgress = class TkProgress extends LitElement {
|
|
|
28
25
|
`} `;
|
|
29
26
|
}
|
|
30
27
|
};
|
|
28
|
+
TkProgress.styles = css `
|
|
29
|
+
${unsafeCSS(css_248z)}
|
|
30
|
+
`;
|
|
31
31
|
__decorate([
|
|
32
|
-
property({ attribute: true, type: Boolean })
|
|
33
|
-
__metadata("design:type", Boolean)
|
|
32
|
+
property({ attribute: true, type: Boolean })
|
|
34
33
|
], TkProgress.prototype, "circle", void 0);
|
|
35
34
|
__decorate([
|
|
36
|
-
property({ attribute: true, type: Boolean })
|
|
37
|
-
__metadata("design:type", Boolean)
|
|
35
|
+
property({ attribute: true, type: Boolean })
|
|
38
36
|
], TkProgress.prototype, "indeterminate", void 0);
|
|
39
37
|
__decorate([
|
|
40
|
-
property({ attribute: true, type: Number })
|
|
41
|
-
__metadata("design:type", Number)
|
|
38
|
+
property({ attribute: true, type: Number })
|
|
42
39
|
], TkProgress.prototype, "value", void 0);
|
|
43
40
|
__decorate([
|
|
44
|
-
property({ attribute: true, type: Number })
|
|
45
|
-
__metadata("design:type", Number)
|
|
41
|
+
property({ attribute: true, type: Number })
|
|
46
42
|
], TkProgress.prototype, "buffer", void 0);
|
|
47
43
|
TkProgress = __decorate([
|
|
48
44
|
customElement("tk-progress")
|
package/radio/radio.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import { LitElement, css, unsafeCSS
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
3
|
import { property, query, customElement } from 'lit/decorators.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import '../box/index.js';
|
|
@@ -15,9 +15,6 @@ let TkRadio = class TkRadio extends LitElement {
|
|
|
15
15
|
this.disabled = false;
|
|
16
16
|
this.readonly = false;
|
|
17
17
|
}
|
|
18
|
-
static { this.styles = css `
|
|
19
|
-
${unsafeCSS(css_248z)}
|
|
20
|
-
`; }
|
|
21
18
|
render() {
|
|
22
19
|
return html `
|
|
23
20
|
<tk-box direction="row" align-items="center">
|
|
@@ -28,9 +25,8 @@ let TkRadio = class TkRadio extends LitElement {
|
|
|
28
25
|
</tk-box>
|
|
29
26
|
<input
|
|
30
27
|
id=${this._id}
|
|
31
|
-
slot="none"
|
|
32
|
-
style="display: none;"
|
|
33
28
|
type="radio"
|
|
29
|
+
style="position: absolute;left: 0;z-index: -1;"
|
|
34
30
|
?checked="${this.checked}"
|
|
35
31
|
.checked=${this.checked}
|
|
36
32
|
?required="${this.required}"
|
|
@@ -38,7 +34,6 @@ let TkRadio = class TkRadio extends LitElement {
|
|
|
38
34
|
?readonly="${this.readonly}"
|
|
39
35
|
value="${ifDefined(this.value)}"
|
|
40
36
|
name="${ifDefined(this.name)}"
|
|
41
|
-
aria-hidden="true"
|
|
42
37
|
tabindex="-1"
|
|
43
38
|
/>
|
|
44
39
|
`;
|
|
@@ -72,33 +67,29 @@ let TkRadio = class TkRadio extends LitElement {
|
|
|
72
67
|
setTimeout(() => this.dispatchEvent(new Event("change", { bubbles: true, composed: true })));
|
|
73
68
|
}
|
|
74
69
|
};
|
|
70
|
+
TkRadio.styles = css `
|
|
71
|
+
${unsafeCSS(css_248z)}
|
|
72
|
+
`;
|
|
75
73
|
__decorate([
|
|
76
|
-
property({ attribute: true, type: String })
|
|
77
|
-
__metadata("design:type", String)
|
|
74
|
+
property({ attribute: true, type: String })
|
|
78
75
|
], TkRadio.prototype, "name", void 0);
|
|
79
76
|
__decorate([
|
|
80
|
-
property({ attribute: true, type: Boolean, reflect: true })
|
|
81
|
-
__metadata("design:type", Boolean)
|
|
77
|
+
property({ attribute: true, type: Boolean, reflect: true })
|
|
82
78
|
], TkRadio.prototype, "checked", void 0);
|
|
83
79
|
__decorate([
|
|
84
|
-
property({ type: Boolean })
|
|
85
|
-
__metadata("design:type", Boolean)
|
|
80
|
+
property({ type: Boolean })
|
|
86
81
|
], TkRadio.prototype, "required", void 0);
|
|
87
82
|
__decorate([
|
|
88
|
-
property({ type: Boolean })
|
|
89
|
-
__metadata("design:type", Boolean)
|
|
83
|
+
property({ type: Boolean })
|
|
90
84
|
], TkRadio.prototype, "disabled", void 0);
|
|
91
85
|
__decorate([
|
|
92
|
-
property({ type: Boolean })
|
|
93
|
-
__metadata("design:type", Boolean)
|
|
86
|
+
property({ type: Boolean })
|
|
94
87
|
], TkRadio.prototype, "readonly", void 0);
|
|
95
88
|
__decorate([
|
|
96
|
-
property({ type: String, reflect: true })
|
|
97
|
-
__metadata("design:type", String)
|
|
89
|
+
property({ type: String, reflect: true })
|
|
98
90
|
], TkRadio.prototype, "value", void 0);
|
|
99
91
|
__decorate([
|
|
100
|
-
query("input")
|
|
101
|
-
__metadata("design:type", HTMLInputElement)
|
|
92
|
+
query("input")
|
|
102
93
|
], TkRadio.prototype, "$input", void 0);
|
|
103
94
|
TkRadio = __decorate([
|
|
104
95
|
customElement("tk-radio")
|
package/select/select.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import { LitElement, css, unsafeCSS
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
3
|
import { property, state, eventOptions, customElement } from 'lit/decorators.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import '../box/index.js';
|
|
@@ -15,9 +15,6 @@ let TkSelect = class TkSelect extends LitElement {
|
|
|
15
15
|
this.disabled = false;
|
|
16
16
|
this.readonly = false;
|
|
17
17
|
}
|
|
18
|
-
static { this.styles = css `
|
|
19
|
-
${unsafeCSS(css_248z)}
|
|
20
|
-
`; }
|
|
21
18
|
set value(value) {
|
|
22
19
|
if (!this.$select) {
|
|
23
20
|
this.initialValue = value;
|
|
@@ -63,7 +60,8 @@ let TkSelect = class TkSelect extends LitElement {
|
|
|
63
60
|
this.refreshAttributes();
|
|
64
61
|
}
|
|
65
62
|
firstUpdated() {
|
|
66
|
-
|
|
63
|
+
var _a;
|
|
64
|
+
this.$select = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("select");
|
|
67
65
|
this.appendChild(this.$select);
|
|
68
66
|
const options = this.querySelectorAll("option");
|
|
69
67
|
options.forEach(option => this.$select.appendChild(option));
|
|
@@ -76,72 +74,56 @@ let TkSelect = class TkSelect extends LitElement {
|
|
|
76
74
|
setTimeout(() => this.dispatchEvent(new Event("change", { bubbles: true, composed: true })));
|
|
77
75
|
}
|
|
78
76
|
};
|
|
77
|
+
TkSelect.styles = css `
|
|
78
|
+
${unsafeCSS(css_248z)}
|
|
79
|
+
`;
|
|
79
80
|
__decorate([
|
|
80
|
-
property({ type: String })
|
|
81
|
-
__metadata("design:type", String),
|
|
82
|
-
__metadata("design:paramtypes", [String])
|
|
81
|
+
property({ type: String })
|
|
83
82
|
], TkSelect.prototype, "value", null);
|
|
84
83
|
__decorate([
|
|
85
|
-
property({ attribute: true, type: String })
|
|
86
|
-
__metadata("design:type", String)
|
|
84
|
+
property({ attribute: true, type: String })
|
|
87
85
|
], TkSelect.prototype, "name", void 0);
|
|
88
86
|
__decorate([
|
|
89
|
-
property({ type: String })
|
|
90
|
-
__metadata("design:type", String)
|
|
87
|
+
property({ type: String })
|
|
91
88
|
], TkSelect.prototype, "list", void 0);
|
|
92
89
|
__decorate([
|
|
93
|
-
property({ type: String })
|
|
94
|
-
__metadata("design:type", String)
|
|
90
|
+
property({ type: String })
|
|
95
91
|
], TkSelect.prototype, "type", void 0);
|
|
96
92
|
__decorate([
|
|
97
|
-
property({ type: Boolean })
|
|
98
|
-
__metadata("design:type", Boolean)
|
|
93
|
+
property({ type: Boolean })
|
|
99
94
|
], TkSelect.prototype, "required", void 0);
|
|
100
95
|
__decorate([
|
|
101
|
-
property({ type: Boolean })
|
|
102
|
-
__metadata("design:type", Boolean)
|
|
96
|
+
property({ type: Boolean })
|
|
103
97
|
], TkSelect.prototype, "disabled", void 0);
|
|
104
98
|
__decorate([
|
|
105
|
-
property({ type: Boolean })
|
|
106
|
-
__metadata("design:type", Boolean)
|
|
99
|
+
property({ type: Boolean })
|
|
107
100
|
], TkSelect.prototype, "readonly", void 0);
|
|
108
101
|
__decorate([
|
|
109
|
-
property({ type: String })
|
|
110
|
-
__metadata("design:type", String)
|
|
102
|
+
property({ type: String })
|
|
111
103
|
], TkSelect.prototype, "autocomplete", void 0);
|
|
112
104
|
__decorate([
|
|
113
|
-
property({ type: String })
|
|
114
|
-
__metadata("design:type", String)
|
|
105
|
+
property({ type: String })
|
|
115
106
|
], TkSelect.prototype, "pattern", void 0);
|
|
116
107
|
__decorate([
|
|
117
|
-
state()
|
|
118
|
-
__metadata("design:type", String)
|
|
108
|
+
state()
|
|
119
109
|
], TkSelect.prototype, "initialValue", void 0);
|
|
120
110
|
__decorate([
|
|
121
|
-
property({ type: String })
|
|
122
|
-
__metadata("design:type", String)
|
|
111
|
+
property({ type: String })
|
|
123
112
|
], TkSelect.prototype, "label", void 0);
|
|
124
113
|
__decorate([
|
|
125
|
-
property({ type: Number })
|
|
126
|
-
__metadata("design:type", Number)
|
|
114
|
+
property({ type: Number })
|
|
127
115
|
], TkSelect.prototype, "min", void 0);
|
|
128
116
|
__decorate([
|
|
129
|
-
property({ type: Number })
|
|
130
|
-
__metadata("design:type", Number)
|
|
117
|
+
property({ type: Number })
|
|
131
118
|
], TkSelect.prototype, "max", void 0);
|
|
132
119
|
__decorate([
|
|
133
|
-
property({ type: Number })
|
|
134
|
-
__metadata("design:type", Number)
|
|
120
|
+
property({ type: Number })
|
|
135
121
|
], TkSelect.prototype, "minLength", void 0);
|
|
136
122
|
__decorate([
|
|
137
|
-
property({ type: Number })
|
|
138
|
-
__metadata("design:type", Number)
|
|
123
|
+
property({ type: Number })
|
|
139
124
|
], TkSelect.prototype, "maxLength", void 0);
|
|
140
125
|
__decorate([
|
|
141
|
-
eventOptions({ passive: true })
|
|
142
|
-
__metadata("design:type", Function),
|
|
143
|
-
__metadata("design:paramtypes", []),
|
|
144
|
-
__metadata("design:returntype", void 0)
|
|
126
|
+
eventOptions({ passive: true })
|
|
145
127
|
], TkSelect.prototype, "handleChange", null);
|
|
146
128
|
TkSelect = __decorate([
|
|
147
129
|
customElement("tk-select")
|
package/slider/slider.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import { LitElement, css, unsafeCSS
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
3
|
import { property, query, customElement } from 'lit/decorators.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import { uniqueID } from '../utils/unique.js';
|
|
@@ -18,9 +18,6 @@ let TkSlider = class TkSlider extends LitElement {
|
|
|
18
18
|
this.value = this.min;
|
|
19
19
|
this.max = 100;
|
|
20
20
|
}
|
|
21
|
-
static { this.styles = css `
|
|
22
|
-
${unsafeCSS(css_248z)}
|
|
23
|
-
`; }
|
|
24
21
|
render() {
|
|
25
22
|
return html `
|
|
26
23
|
<div id="container">
|
|
@@ -83,65 +80,53 @@ let TkSlider = class TkSlider extends LitElement {
|
|
|
83
80
|
});
|
|
84
81
|
}
|
|
85
82
|
};
|
|
83
|
+
TkSlider.styles = css `
|
|
84
|
+
${unsafeCSS(css_248z)}
|
|
85
|
+
`;
|
|
86
86
|
__decorate([
|
|
87
|
-
property({ attribute: true, type: String })
|
|
88
|
-
__metadata("design:type", String)
|
|
87
|
+
property({ attribute: true, type: String })
|
|
89
88
|
], TkSlider.prototype, "name", void 0);
|
|
90
89
|
__decorate([
|
|
91
|
-
property({ type: String })
|
|
92
|
-
__metadata("design:type", String)
|
|
90
|
+
property({ type: String })
|
|
93
91
|
], TkSlider.prototype, "list", void 0);
|
|
94
92
|
__decorate([
|
|
95
|
-
property({ type: Boolean })
|
|
96
|
-
__metadata("design:type", Boolean)
|
|
93
|
+
property({ type: Boolean })
|
|
97
94
|
], TkSlider.prototype, "required", void 0);
|
|
98
95
|
__decorate([
|
|
99
|
-
property({ type: Boolean })
|
|
100
|
-
__metadata("design:type", Boolean)
|
|
96
|
+
property({ type: Boolean })
|
|
101
97
|
], TkSlider.prototype, "disabled", void 0);
|
|
102
98
|
__decorate([
|
|
103
|
-
property({ type: Boolean })
|
|
104
|
-
__metadata("design:type", Boolean)
|
|
99
|
+
property({ type: Boolean })
|
|
105
100
|
], TkSlider.prototype, "readonly", void 0);
|
|
106
101
|
__decorate([
|
|
107
|
-
property({ type: String })
|
|
108
|
-
__metadata("design:type", String)
|
|
102
|
+
property({ type: String })
|
|
109
103
|
], TkSlider.prototype, "autocomplete", void 0);
|
|
110
104
|
__decorate([
|
|
111
|
-
property({ type: Boolean, attribute: "thumblabel" })
|
|
112
|
-
__metadata("design:type", Boolean)
|
|
105
|
+
property({ type: Boolean, attribute: "thumblabel" })
|
|
113
106
|
], TkSlider.prototype, "thumbLabel", void 0);
|
|
114
107
|
__decorate([
|
|
115
|
-
property({ type: Boolean, attribute: "thumblabel-persist" })
|
|
116
|
-
__metadata("design:type", Boolean)
|
|
108
|
+
property({ type: Boolean, attribute: "thumblabel-persist" })
|
|
117
109
|
], TkSlider.prototype, "thumbLabelPersist", void 0);
|
|
118
110
|
__decorate([
|
|
119
|
-
property({ type: String })
|
|
120
|
-
__metadata("design:type", String)
|
|
111
|
+
property({ type: String })
|
|
121
112
|
], TkSlider.prototype, "label", void 0);
|
|
122
113
|
__decorate([
|
|
123
|
-
property({ type: Number })
|
|
124
|
-
__metadata("design:type", Number)
|
|
114
|
+
property({ type: Number })
|
|
125
115
|
], TkSlider.prototype, "min", void 0);
|
|
126
116
|
__decorate([
|
|
127
|
-
property({ type: Number, reflect: true })
|
|
128
|
-
__metadata("design:type", Number)
|
|
117
|
+
property({ type: Number, reflect: true })
|
|
129
118
|
], TkSlider.prototype, "value", void 0);
|
|
130
119
|
__decorate([
|
|
131
|
-
property({ type: Number })
|
|
132
|
-
__metadata("design:type", Number)
|
|
120
|
+
property({ type: Number })
|
|
133
121
|
], TkSlider.prototype, "max", void 0);
|
|
134
122
|
__decorate([
|
|
135
|
-
property({ type: Number })
|
|
136
|
-
__metadata("design:type", Number)
|
|
123
|
+
property({ type: Number })
|
|
137
124
|
], TkSlider.prototype, "step", void 0);
|
|
138
125
|
__decorate([
|
|
139
|
-
query("#slider")
|
|
140
|
-
__metadata("design:type", HTMLInputElement)
|
|
126
|
+
query("#slider")
|
|
141
127
|
], TkSlider.prototype, "$slider", void 0);
|
|
142
128
|
__decorate([
|
|
143
|
-
query(".hidden-input")
|
|
144
|
-
__metadata("design:type", HTMLInputElement)
|
|
129
|
+
query(".hidden-input")
|
|
145
130
|
], TkSlider.prototype, "$input", void 0);
|
|
146
131
|
TkSlider = __decorate([
|
|
147
132
|
customElement("tk-slider")
|
package/switch/switch.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import { LitElement, css, unsafeCSS
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
3
|
import { property, query, customElement } from 'lit/decorators.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import '../box/index.js';
|
|
@@ -15,9 +15,6 @@ let TkSwitch = class TkSwitch extends LitElement {
|
|
|
15
15
|
this.disabled = false;
|
|
16
16
|
this.readonly = false;
|
|
17
17
|
}
|
|
18
|
-
static { this.styles = css `
|
|
19
|
-
${unsafeCSS(css_248z)}
|
|
20
|
-
`; }
|
|
21
18
|
render() {
|
|
22
19
|
return html `
|
|
23
20
|
<tk-box direction="row" align-items="center">
|
|
@@ -71,33 +68,29 @@ let TkSwitch = class TkSwitch extends LitElement {
|
|
|
71
68
|
setTimeout(() => this.dispatchEvent(new Event("change", { bubbles: true, composed: true })));
|
|
72
69
|
}
|
|
73
70
|
};
|
|
71
|
+
TkSwitch.styles = css `
|
|
72
|
+
${unsafeCSS(css_248z)}
|
|
73
|
+
`;
|
|
74
74
|
__decorate([
|
|
75
|
-
property({ attribute: true, type: String })
|
|
76
|
-
__metadata("design:type", String)
|
|
75
|
+
property({ attribute: true, type: String })
|
|
77
76
|
], TkSwitch.prototype, "name", void 0);
|
|
78
77
|
__decorate([
|
|
79
|
-
property({ attribute: true, type: Boolean, reflect: true })
|
|
80
|
-
__metadata("design:type", Boolean)
|
|
78
|
+
property({ attribute: true, type: Boolean, reflect: true })
|
|
81
79
|
], TkSwitch.prototype, "checked", void 0);
|
|
82
80
|
__decorate([
|
|
83
|
-
property({ type: Boolean })
|
|
84
|
-
__metadata("design:type", Boolean)
|
|
81
|
+
property({ type: Boolean })
|
|
85
82
|
], TkSwitch.prototype, "required", void 0);
|
|
86
83
|
__decorate([
|
|
87
|
-
property({ type: Boolean })
|
|
88
|
-
__metadata("design:type", Boolean)
|
|
84
|
+
property({ type: Boolean })
|
|
89
85
|
], TkSwitch.prototype, "disabled", void 0);
|
|
90
86
|
__decorate([
|
|
91
|
-
property({ type: Boolean })
|
|
92
|
-
__metadata("design:type", Boolean)
|
|
87
|
+
property({ type: Boolean })
|
|
93
88
|
], TkSwitch.prototype, "readonly", void 0);
|
|
94
89
|
__decorate([
|
|
95
|
-
property({ type: String, reflect: true })
|
|
96
|
-
__metadata("design:type", String)
|
|
90
|
+
property({ type: String, reflect: true })
|
|
97
91
|
], TkSwitch.prototype, "value", void 0);
|
|
98
92
|
__decorate([
|
|
99
|
-
query("input")
|
|
100
|
-
__metadata("design:type", HTMLInputElement)
|
|
93
|
+
query("input")
|
|
101
94
|
], TkSwitch.prototype, "$input", void 0);
|
|
102
95
|
TkSwitch = __decorate([
|
|
103
96
|
customElement("tk-switch")
|
package/tab-group/tab-group.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import { LitElement, css, unsafeCSS
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
3
|
import { property, query, customElement } from 'lit/decorators.js';
|
|
4
4
|
import css_248z from './tab-group.scss.js';
|
|
5
5
|
|
|
@@ -10,9 +10,6 @@ let TkTabGroup = class TkTabGroup extends LitElement {
|
|
|
10
10
|
this.observe = "";
|
|
11
11
|
this.selected = "";
|
|
12
12
|
}
|
|
13
|
-
static { this.styles = css `
|
|
14
|
-
${unsafeCSS(css_248z)}
|
|
15
|
-
`; }
|
|
16
13
|
render() {
|
|
17
14
|
return html `
|
|
18
15
|
<div class="tabs">
|
|
@@ -37,12 +34,13 @@ let TkTabGroup = class TkTabGroup extends LitElement {
|
|
|
37
34
|
}
|
|
38
35
|
}
|
|
39
36
|
updated(props) {
|
|
37
|
+
var _a, _b;
|
|
40
38
|
if (props.has("selected")) {
|
|
41
39
|
this.querySelectorAll("*").forEach(node => node.removeAttribute("selected"));
|
|
42
|
-
this.querySelector(`[tab="${this.selected}"]`)
|
|
40
|
+
(_a = this.querySelector(`[tab="${this.selected}"]`)) === null || _a === void 0 ? void 0 : _a.setAttribute("selected", "");
|
|
43
41
|
}
|
|
44
42
|
if (props.has("observe")) {
|
|
45
|
-
this.querySelector(`[tab="${this.selected}"]`)
|
|
43
|
+
(_b = this.querySelector(`[tab="${this.selected}"]`)) === null || _b === void 0 ? void 0 : _b.focus();
|
|
46
44
|
this.updateUnderline();
|
|
47
45
|
}
|
|
48
46
|
}
|
|
@@ -74,29 +72,26 @@ let TkTabGroup = class TkTabGroup extends LitElement {
|
|
|
74
72
|
// }
|
|
75
73
|
}
|
|
76
74
|
};
|
|
75
|
+
TkTabGroup.styles = css `
|
|
76
|
+
${unsafeCSS(css_248z)}
|
|
77
|
+
`;
|
|
77
78
|
__decorate([
|
|
78
|
-
property({ attribute: true, type: Boolean })
|
|
79
|
-
__metadata("design:type", Boolean)
|
|
79
|
+
property({ attribute: true, type: Boolean })
|
|
80
80
|
], TkTabGroup.prototype, "circle", void 0);
|
|
81
81
|
__decorate([
|
|
82
|
-
property({ attribute: true, type: String })
|
|
83
|
-
__metadata("design:type", String)
|
|
82
|
+
property({ attribute: true, type: String })
|
|
84
83
|
], TkTabGroup.prototype, "observe", void 0);
|
|
85
84
|
__decorate([
|
|
86
|
-
property({ attribute: true, type: String })
|
|
87
|
-
__metadata("design:type", String)
|
|
85
|
+
property({ attribute: true, type: String })
|
|
88
86
|
], TkTabGroup.prototype, "selected", void 0);
|
|
89
87
|
__decorate([
|
|
90
|
-
query(".underline")
|
|
91
|
-
__metadata("design:type", HTMLElement)
|
|
88
|
+
query(".underline")
|
|
92
89
|
], TkTabGroup.prototype, "$underline", void 0);
|
|
93
90
|
__decorate([
|
|
94
|
-
query(".circle")
|
|
95
|
-
__metadata("design:type", HTMLElement)
|
|
91
|
+
query(".circle")
|
|
96
92
|
], TkTabGroup.prototype, "$circle", void 0);
|
|
97
93
|
TkTabGroup = __decorate([
|
|
98
|
-
customElement("tk-tab-group")
|
|
99
|
-
__metadata("design:paramtypes", [])
|
|
94
|
+
customElement("tk-tab-group")
|
|
100
95
|
], TkTabGroup);
|
|
101
96
|
|
|
102
97
|
export { TkTabGroup };
|
package/tag/tag.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
|
-
import { LitElement, css, unsafeCSS
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
3
|
import { customElement } from 'lit/decorators.js';
|
|
4
4
|
import css_248z from './tag.scss.js';
|
|
5
5
|
|
|
6
6
|
let TkTag = class TkTag extends LitElement {
|
|
7
|
-
static { this.styles = css `
|
|
8
|
-
${unsafeCSS(css_248z)}
|
|
9
|
-
`; }
|
|
10
7
|
render() {
|
|
11
8
|
return html `
|
|
12
9
|
<div class="tag"><slot></slot></div>
|
|
13
10
|
`;
|
|
14
11
|
}
|
|
15
12
|
};
|
|
13
|
+
TkTag.styles = css `
|
|
14
|
+
${unsafeCSS(css_248z)}
|
|
15
|
+
`;
|
|
16
16
|
TkTag = __decorate([
|
|
17
17
|
customElement("tk-tag")
|
|
18
18
|
], TkTag);
|
package/textarea/textarea.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import { LitElement, css, unsafeCSS
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
3
|
import { property, state, eventOptions, customElement } from 'lit/decorators.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import { uniqueID } from '../utils/unique.js';
|
|
@@ -15,9 +15,6 @@ let TkTextarea = class TkTextarea extends LitElement {
|
|
|
15
15
|
this.readonly = false;
|
|
16
16
|
this.rows = 1;
|
|
17
17
|
}
|
|
18
|
-
static { this.styles = css `
|
|
19
|
-
${unsafeCSS(css_248z)}
|
|
20
|
-
`; }
|
|
21
18
|
set value(value) {
|
|
22
19
|
if (!this.$input) {
|
|
23
20
|
this.initialValue = value;
|
|
@@ -64,7 +61,8 @@ let TkTextarea = class TkTextarea extends LitElement {
|
|
|
64
61
|
this.refreshAttributes();
|
|
65
62
|
}
|
|
66
63
|
firstUpdated() {
|
|
67
|
-
|
|
64
|
+
var _a;
|
|
65
|
+
this.$input = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("textarea");
|
|
68
66
|
this.appendChild(this.$input);
|
|
69
67
|
if (this.initialValue)
|
|
70
68
|
this.value = this.initialValue;
|
|
@@ -77,72 +75,56 @@ let TkTextarea = class TkTextarea extends LitElement {
|
|
|
77
75
|
this.$input.focus();
|
|
78
76
|
}
|
|
79
77
|
};
|
|
78
|
+
TkTextarea.styles = css `
|
|
79
|
+
${unsafeCSS(css_248z)}
|
|
80
|
+
`;
|
|
80
81
|
__decorate([
|
|
81
|
-
property({ type: String })
|
|
82
|
-
__metadata("design:type", String),
|
|
83
|
-
__metadata("design:paramtypes", [String])
|
|
82
|
+
property({ type: String })
|
|
84
83
|
], TkTextarea.prototype, "value", null);
|
|
85
84
|
__decorate([
|
|
86
|
-
property({ attribute: true, type: String })
|
|
87
|
-
__metadata("design:type", String)
|
|
85
|
+
property({ attribute: true, type: String })
|
|
88
86
|
], TkTextarea.prototype, "name", void 0);
|
|
89
87
|
__decorate([
|
|
90
|
-
property({ type: String })
|
|
91
|
-
__metadata("design:type", String)
|
|
88
|
+
property({ type: String })
|
|
92
89
|
], TkTextarea.prototype, "list", void 0);
|
|
93
90
|
__decorate([
|
|
94
|
-
property({ type: String })
|
|
95
|
-
__metadata("design:type", String)
|
|
91
|
+
property({ type: String })
|
|
96
92
|
], TkTextarea.prototype, "type", void 0);
|
|
97
93
|
__decorate([
|
|
98
|
-
property({ type: Boolean })
|
|
99
|
-
__metadata("design:type", Boolean)
|
|
94
|
+
property({ type: Boolean })
|
|
100
95
|
], TkTextarea.prototype, "required", void 0);
|
|
101
96
|
__decorate([
|
|
102
|
-
property({ type: Boolean })
|
|
103
|
-
__metadata("design:type", Boolean)
|
|
97
|
+
property({ type: Boolean })
|
|
104
98
|
], TkTextarea.prototype, "disabled", void 0);
|
|
105
99
|
__decorate([
|
|
106
|
-
property({ type: Boolean })
|
|
107
|
-
__metadata("design:type", Boolean)
|
|
100
|
+
property({ type: Boolean })
|
|
108
101
|
], TkTextarea.prototype, "readonly", void 0);
|
|
109
102
|
__decorate([
|
|
110
|
-
property({ type: String })
|
|
111
|
-
__metadata("design:type", String)
|
|
103
|
+
property({ type: String })
|
|
112
104
|
], TkTextarea.prototype, "autocomplete", void 0);
|
|
113
105
|
__decorate([
|
|
114
|
-
property({ type: String })
|
|
115
|
-
__metadata("design:type", String)
|
|
106
|
+
property({ type: String })
|
|
116
107
|
], TkTextarea.prototype, "autocapitalize", void 0);
|
|
117
108
|
__decorate([
|
|
118
|
-
property({ type: String })
|
|
119
|
-
__metadata("design:type", String)
|
|
109
|
+
property({ type: String })
|
|
120
110
|
], TkTextarea.prototype, "pattern", void 0);
|
|
121
111
|
__decorate([
|
|
122
|
-
state()
|
|
123
|
-
__metadata("design:type", String)
|
|
112
|
+
state()
|
|
124
113
|
], TkTextarea.prototype, "initialValue", void 0);
|
|
125
114
|
__decorate([
|
|
126
|
-
property({ type: String })
|
|
127
|
-
__metadata("design:type", String)
|
|
115
|
+
property({ type: String })
|
|
128
116
|
], TkTextarea.prototype, "label", void 0);
|
|
129
117
|
__decorate([
|
|
130
|
-
property({ type: Number })
|
|
131
|
-
__metadata("design:type", Number)
|
|
118
|
+
property({ type: Number })
|
|
132
119
|
], TkTextarea.prototype, "minLength", void 0);
|
|
133
120
|
__decorate([
|
|
134
|
-
property({ type: Number })
|
|
135
|
-
__metadata("design:type", Number)
|
|
121
|
+
property({ type: Number })
|
|
136
122
|
], TkTextarea.prototype, "maxLength", void 0);
|
|
137
123
|
__decorate([
|
|
138
|
-
property({ type: Number })
|
|
139
|
-
__metadata("design:type", Number)
|
|
124
|
+
property({ type: Number })
|
|
140
125
|
], TkTextarea.prototype, "rows", void 0);
|
|
141
126
|
__decorate([
|
|
142
|
-
eventOptions({ passive: true })
|
|
143
|
-
__metadata("design:type", Function),
|
|
144
|
-
__metadata("design:paramtypes", []),
|
|
145
|
-
__metadata("design:returntype", void 0)
|
|
127
|
+
eventOptions({ passive: true })
|
|
146
128
|
], TkTextarea.prototype, "handleChange", null);
|
|
147
129
|
TkTextarea = __decorate([
|
|
148
130
|
customElement("tk-textarea")
|