tinkiet 0.6.2 → 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 +12 -19
- 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/textfield/textfield.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __decorate
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
2
|
import { property, state, eventOptions, customElement } from 'lit/decorators.js';
|
|
3
|
-
import { LitElement, css, unsafeCSS
|
|
3
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import { uniqueID } from '../utils/unique.js';
|
|
6
6
|
import css_248z from './textfield.scss.js';
|
|
@@ -14,9 +14,6 @@ let TkTextfield = class TkTextfield extends LitElement {
|
|
|
14
14
|
this.disabled = false;
|
|
15
15
|
this.readonly = false;
|
|
16
16
|
}
|
|
17
|
-
static { this.styles = css `
|
|
18
|
-
${unsafeCSS(css_248z)}
|
|
19
|
-
`; }
|
|
20
17
|
set value(value) {
|
|
21
18
|
if (!this.$input) {
|
|
22
19
|
this.initialValue = value;
|
|
@@ -64,7 +61,8 @@ let TkTextfield = class TkTextfield 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("input");
|
|
68
66
|
this.appendChild(this.$input);
|
|
69
67
|
if (this.initialValue)
|
|
70
68
|
this.value = this.initialValue;
|
|
@@ -77,76 +75,59 @@ let TkTextfield = class TkTextfield extends LitElement {
|
|
|
77
75
|
this.$input.focus();
|
|
78
76
|
}
|
|
79
77
|
};
|
|
78
|
+
TkTextfield.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
|
], TkTextfield.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
|
], TkTextfield.prototype, "name", void 0);
|
|
89
87
|
__decorate([
|
|
90
|
-
property({ type: String })
|
|
91
|
-
__metadata("design:type", String)
|
|
88
|
+
property({ type: String })
|
|
92
89
|
], TkTextfield.prototype, "list", void 0);
|
|
93
90
|
__decorate([
|
|
94
|
-
property({ type: String })
|
|
95
|
-
__metadata("design:type", String)
|
|
91
|
+
property({ type: String })
|
|
96
92
|
], TkTextfield.prototype, "type", void 0);
|
|
97
93
|
__decorate([
|
|
98
|
-
property({ type: Boolean })
|
|
99
|
-
__metadata("design:type", Boolean)
|
|
94
|
+
property({ type: Boolean })
|
|
100
95
|
], TkTextfield.prototype, "required", void 0);
|
|
101
96
|
__decorate([
|
|
102
|
-
property({ type: Boolean })
|
|
103
|
-
__metadata("design:type", Boolean)
|
|
97
|
+
property({ type: Boolean })
|
|
104
98
|
], TkTextfield.prototype, "disabled", void 0);
|
|
105
99
|
__decorate([
|
|
106
|
-
property({ type: Boolean })
|
|
107
|
-
__metadata("design:type", Boolean)
|
|
100
|
+
property({ type: Boolean })
|
|
108
101
|
], TkTextfield.prototype, "readonly", void 0);
|
|
109
102
|
__decorate([
|
|
110
|
-
property({ type: String })
|
|
111
|
-
__metadata("design:type", String)
|
|
103
|
+
property({ type: String })
|
|
112
104
|
], TkTextfield.prototype, "autocomplete", void 0);
|
|
113
105
|
__decorate([
|
|
114
|
-
property({ type: String })
|
|
115
|
-
__metadata("design:type", String)
|
|
106
|
+
property({ type: String })
|
|
116
107
|
], TkTextfield.prototype, "autocapitalize", void 0);
|
|
117
108
|
__decorate([
|
|
118
|
-
property({ type: String })
|
|
119
|
-
__metadata("design:type", String)
|
|
109
|
+
property({ type: String })
|
|
120
110
|
], TkTextfield.prototype, "pattern", void 0);
|
|
121
111
|
__decorate([
|
|
122
|
-
state()
|
|
123
|
-
__metadata("design:type", String)
|
|
112
|
+
state()
|
|
124
113
|
], TkTextfield.prototype, "initialValue", void 0);
|
|
125
114
|
__decorate([
|
|
126
|
-
property({ type: String })
|
|
127
|
-
__metadata("design:type", String)
|
|
115
|
+
property({ type: String })
|
|
128
116
|
], TkTextfield.prototype, "label", void 0);
|
|
129
117
|
__decorate([
|
|
130
|
-
property({ type: Number })
|
|
131
|
-
__metadata("design:type", Number)
|
|
118
|
+
property({ type: Number })
|
|
132
119
|
], TkTextfield.prototype, "min", void 0);
|
|
133
120
|
__decorate([
|
|
134
|
-
property({ type: Number })
|
|
135
|
-
__metadata("design:type", Number)
|
|
121
|
+
property({ type: Number })
|
|
136
122
|
], TkTextfield.prototype, "max", void 0);
|
|
137
123
|
__decorate([
|
|
138
|
-
property({ type: Number })
|
|
139
|
-
__metadata("design:type", Number)
|
|
124
|
+
property({ type: Number })
|
|
140
125
|
], TkTextfield.prototype, "minLength", void 0);
|
|
141
126
|
__decorate([
|
|
142
|
-
property({ type: Number })
|
|
143
|
-
__metadata("design:type", Number)
|
|
127
|
+
property({ type: Number })
|
|
144
128
|
], TkTextfield.prototype, "maxLength", void 0);
|
|
145
129
|
__decorate([
|
|
146
|
-
eventOptions({ passive: true })
|
|
147
|
-
__metadata("design:type", Function),
|
|
148
|
-
__metadata("design:paramtypes", []),
|
|
149
|
-
__metadata("design:returntype", void 0)
|
|
130
|
+
eventOptions({ passive: true })
|
|
150
131
|
], TkTextfield.prototype, "handleChange", null);
|
|
151
132
|
TkTextfield = __decorate([
|
|
152
133
|
customElement("tk-textfield")
|
package/theme/theme.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 './theme.scss.js';
|
|
5
5
|
|
|
@@ -19,9 +19,6 @@ let TkTheme = class TkTheme extends LitElement {
|
|
|
19
19
|
this.forceBody = false;
|
|
20
20
|
this.inverted = false;
|
|
21
21
|
}
|
|
22
|
-
static { this.styles = css `
|
|
23
|
-
${unsafeCSS(css_248z)}
|
|
24
|
-
`; }
|
|
25
22
|
render() {
|
|
26
23
|
return html `
|
|
27
24
|
<slot></slot>
|
|
@@ -144,53 +141,44 @@ let TkTheme = class TkTheme extends LitElement {
|
|
|
144
141
|
document.body.style.setProperty("color", `hsl(${foreground[0]},${foreground[1]},${foreground[2]})`);
|
|
145
142
|
}
|
|
146
143
|
};
|
|
144
|
+
TkTheme.styles = css `
|
|
145
|
+
${unsafeCSS(css_248z)}
|
|
146
|
+
`;
|
|
147
147
|
__decorate([
|
|
148
|
-
property()
|
|
149
|
-
__metadata("design:type", String)
|
|
148
|
+
property()
|
|
150
149
|
], TkTheme.prototype, "primary", void 0);
|
|
151
150
|
__decorate([
|
|
152
|
-
property({ attribute: "on-primary" })
|
|
153
|
-
__metadata("design:type", String)
|
|
151
|
+
property({ attribute: "on-primary" })
|
|
154
152
|
], TkTheme.prototype, "onPrimary", void 0);
|
|
155
153
|
__decorate([
|
|
156
|
-
property()
|
|
157
|
-
__metadata("design:type", String)
|
|
154
|
+
property()
|
|
158
155
|
], TkTheme.prototype, "accent", void 0);
|
|
159
156
|
__decorate([
|
|
160
|
-
property({ attribute: "on-accent" })
|
|
161
|
-
__metadata("design:type", String)
|
|
157
|
+
property({ attribute: "on-accent" })
|
|
162
158
|
], TkTheme.prototype, "onAccent", void 0);
|
|
163
159
|
__decorate([
|
|
164
|
-
property()
|
|
165
|
-
__metadata("design:type", String)
|
|
160
|
+
property()
|
|
166
161
|
], TkTheme.prototype, "shade", void 0);
|
|
167
162
|
__decorate([
|
|
168
|
-
property()
|
|
169
|
-
__metadata("design:type", String)
|
|
163
|
+
property()
|
|
170
164
|
], TkTheme.prototype, "onShade", void 0);
|
|
171
165
|
__decorate([
|
|
172
|
-
property()
|
|
173
|
-
__metadata("design:type", String)
|
|
166
|
+
property()
|
|
174
167
|
], TkTheme.prototype, "error", void 0);
|
|
175
168
|
__decorate([
|
|
176
|
-
property()
|
|
177
|
-
__metadata("design:type", String)
|
|
169
|
+
property()
|
|
178
170
|
], TkTheme.prototype, "onError", void 0);
|
|
179
171
|
__decorate([
|
|
180
|
-
property()
|
|
181
|
-
__metadata("design:type", String)
|
|
172
|
+
property()
|
|
182
173
|
], TkTheme.prototype, "foreground", void 0);
|
|
183
174
|
__decorate([
|
|
184
|
-
property()
|
|
185
|
-
__metadata("design:type", String)
|
|
175
|
+
property()
|
|
186
176
|
], TkTheme.prototype, "background", void 0);
|
|
187
177
|
__decorate([
|
|
188
|
-
property({ type: Boolean, attribute: "force-body", reflect: true })
|
|
189
|
-
__metadata("design:type", Boolean)
|
|
178
|
+
property({ type: Boolean, attribute: "force-body", reflect: true })
|
|
190
179
|
], TkTheme.prototype, "forceBody", void 0);
|
|
191
180
|
__decorate([
|
|
192
|
-
property({ type: Boolean, attribute: true, reflect: true })
|
|
193
|
-
__metadata("design:type", Boolean)
|
|
181
|
+
property({ type: Boolean, attribute: true, reflect: true })
|
|
194
182
|
], TkTheme.prototype, "inverted", void 0);
|
|
195
183
|
TkTheme = __decorate([
|
|
196
184
|
customElement("tk-theme")
|
package/umd/tinkiet.min.d.ts
CHANGED
|
@@ -198,7 +198,7 @@ declare class TkDialog extends LitElement {
|
|
|
198
198
|
private resolve;
|
|
199
199
|
render(): import("lit-html").TemplateResult<1>;
|
|
200
200
|
updated(props: any): void;
|
|
201
|
-
show(): Promise<string | boolean
|
|
201
|
+
show(): Promise<string | boolean>;
|
|
202
202
|
hide(value?: boolean | string | null): void;
|
|
203
203
|
}
|
|
204
204
|
declare global {
|
|
@@ -357,7 +357,7 @@ declare class TkNotie extends TkBox {
|
|
|
357
357
|
private $container;
|
|
358
358
|
private resolve;
|
|
359
359
|
render(): TemplateResult<1>;
|
|
360
|
-
show(): Promise<string | boolean
|
|
360
|
+
show(): Promise<string | boolean>;
|
|
361
361
|
hide(value: boolean | string | null): void;
|
|
362
362
|
constructor(text?: string);
|
|
363
363
|
static show(options: NotieOptions): Promise<boolean | string | null>;
|
|
@@ -625,3 +625,4 @@ declare global {
|
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
627
|
export { TkAccordion, TkBadge, TkBox, TkButton, TkCheckbox, TkDialog, TkDrawer, TkForm, TkIcon, TkIcons, TkListItem, TkLoading, TkNavbar, TkNotie, TkPages, TkProgress, TkRadio, TkSelect, TkSlider, TkSwitch, TkTabGroup, TkTag, TkTextarea, TkTextfield, TkTheme };
|
|
628
|
+
//# sourceMappingURL=tinkiet.min.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tinkiet.min.d.ts","sourceRoot":"","sources":["../../index.ts","../../box/box.ts","../../box/index.ts","../../utils/unique.ts","../../box/focusable-box.ts","../../accordion/accordion.ts","../../accordion/index.ts","../../badge/badge.ts","../../badge/index.ts","../../button/button.ts","../../button/index.ts","../../checkbox/checkbox.ts","../../checkbox/index.ts","../../dialog/dialog.ts","../../dialog/index.ts","../../drawer/drawer.ts","../../drawer/index.ts","../../form/form.ts","../../form/index.ts","../../icon/icons.ts","../../icon/icon.ts","../../icon/index.ts","../../list-item/list-item.ts","../../list-item/index.ts","../../loading/loading.ts","../../loading/index.ts","../../navbar/navbar.ts","../../navbar/index.ts","../../textfield/textfield.ts","../../textfield/index.ts","../../notie/notie.ts","../../notie/index.ts","../../pages/pages.ts","../../pages/index.ts","../../progress/progress.ts","../../progress/index.ts","../../radio/radio.ts","../../radio/index.ts","../../select/select.ts","../../select/index.ts","../../slider/slider.ts","../../slider/index.ts","../../switch/switch.ts","../../switch/index.ts","../../tab-group/tab-group.ts","../../tab-group/index.ts","../../tag/tag.ts","../../tag/index.ts","../../textarea/textarea.ts","../../textarea/index.ts","../../theme/theme.ts","../../theme/index.ts"],"names":[],"mappings":""}
|