tinkiet 0.8.4 → 0.8.10
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.d.ts +1 -1
- package/accordion/index.d.ts +1 -1
- package/badge/badge.d.ts +1 -1
- package/badge/index.d.ts +1 -1
- package/box/focusable-box.d.ts +1 -1
- package/box/index.d.ts +1 -1
- package/button/button.d.ts +1 -1
- package/button/index.d.ts +1 -1
- package/checkbox/index.d.ts +1 -1
- package/dialog/dialog.d.ts +2 -2
- package/dialog/dialog.js +5 -4
- package/dialog/dialog.scss.js +2 -2
- package/dialog/index.d.ts +1 -1
- package/drawer/index.d.ts +1 -1
- package/form/index.d.ts +1 -1
- package/icon/icon.d.ts +1 -1
- package/icon/index.d.ts +2 -2
- package/index.d.ts +24 -23
- package/index.d.ts.map +1 -1
- package/index.js +2 -0
- package/list-item/index.d.ts +1 -1
- package/list-item/list-item.js +2 -2
- package/loading/index.d.ts +1 -1
- package/loading/loading.d.ts +1 -1
- package/navbar/index.d.ts +1 -1
- package/navbar/navbar.d.ts +1 -1
- package/notie/index.d.ts +1 -1
- package/notie/notie.d.ts +3 -1
- package/notie/notie.js +13 -6
- package/notie/notie.scss.js +2 -2
- package/package.json +1 -1
- package/pages/index.d.ts +1 -1
- package/radio/index.d.ts +1 -1
- package/select/index.d.ts +1 -1
- package/slider/index.d.ts +1 -1
- package/switch/index.d.ts +1 -1
- package/tab-group/index.d.ts +1 -1
- package/tab-group/tab-group.js +1 -8
- package/tag/index.d.ts +1 -1
- package/textarea/index.d.ts +1 -1
- package/textarea/textarea.js +1 -1
- package/textfield/index.d.ts +1 -1
- package/textfield/textfield.js +31 -29
- package/theme/index.d.ts +1 -1
- package/tooltip/index.d.ts +1 -0
- package/tooltip/index.js +1 -0
- package/tooltip/tooltip.d.ts +12 -0
- package/tooltip/tooltip.js +33 -0
- package/tooltip/tooltip.scss.js +4 -0
- package/umd/tinkiet.min.d.ts +15 -3
- package/umd/tinkiet.min.d.ts.map +1 -1
- package/umd/tinkiet.min.js +1 -1
package/accordion/accordion.d.ts
CHANGED
package/accordion/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./accordion";
|
|
1
|
+
export * from "./accordion.js";
|
package/badge/badge.d.ts
CHANGED
package/badge/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./badge";
|
|
1
|
+
export * from "./badge.js";
|
package/box/focusable-box.d.ts
CHANGED
package/box/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./box";
|
|
1
|
+
export * from "./box.js";
|
package/button/button.d.ts
CHANGED
package/button/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./button";
|
|
1
|
+
export * from "./button.js";
|
package/checkbox/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./checkbox";
|
|
1
|
+
export * from "./checkbox.js";
|
package/dialog/dialog.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
1
|
+
import { LitElement, PropertyValueMap } from "lit";
|
|
2
2
|
declare class TkDialog extends LitElement {
|
|
3
3
|
static styles: import("lit").CSSResult;
|
|
4
4
|
modal: boolean;
|
|
@@ -6,7 +6,7 @@ declare class TkDialog extends LitElement {
|
|
|
6
6
|
blurOverlay: boolean;
|
|
7
7
|
private resolve;
|
|
8
8
|
render(): import("lit-html").TemplateResult<1>;
|
|
9
|
-
updated(
|
|
9
|
+
protected updated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
10
10
|
show(): Promise<string | boolean | null>;
|
|
11
11
|
hide(value?: boolean | string | null): void;
|
|
12
12
|
}
|
package/dialog/dialog.js
CHANGED
|
@@ -22,10 +22,10 @@ let TkDialog = class TkDialog extends LitElement {
|
|
|
22
22
|
: ""}
|
|
23
23
|
`;
|
|
24
24
|
}
|
|
25
|
-
updated(
|
|
26
|
-
if (
|
|
25
|
+
updated(_changedProperties) {
|
|
26
|
+
if (_changedProperties.has("open") && this.open)
|
|
27
27
|
this.dispatchEvent(new Event("did-show"));
|
|
28
|
-
if (
|
|
28
|
+
if (_changedProperties.has("open") && _changedProperties.get("open") == true && !this.open)
|
|
29
29
|
this.dispatchEvent(new Event("did-close"));
|
|
30
30
|
}
|
|
31
31
|
show() {
|
|
@@ -36,7 +36,8 @@ let TkDialog = class TkDialog extends LitElement {
|
|
|
36
36
|
}
|
|
37
37
|
hide(value = null) {
|
|
38
38
|
this.open = false;
|
|
39
|
-
this.resolve
|
|
39
|
+
if (this.resolve)
|
|
40
|
+
this.resolve(value);
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
43
|
TkDialog.styles = css `
|
package/dialog/dialog.scss.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{display:none;outline:none;position:relative}:host([open]){align-items:center;display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%;z-index:var(--dialog-z-index,300)}:host([open]) .overlay{background-color:#00000080;bottom:0;left:0;position:absolute;right:0;top:0}:host([open]) .overlay.blur{backdrop-filter:blur(2px)}:host([open]) .container{animation:fade-in .3s forwards;
|
|
2
|
-
var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{display:none;outline:none;position:relative}:host([open]){align-items:center;display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%;z-index:var(--dialog-z-index,300)}:host([open]) .overlay{background-color:#00000080;bottom:0;left:0;position:absolute;right:0;top:0}:host([open]) .overlay.blur{backdrop-filter:blur(2px)}:host([open]) .container{animation:fade-in .3s forwards;
|
|
1
|
+
var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{display:none;outline:none;position:relative}:host([open]){align-items:center;display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%;z-index:var(--dialog-z-index,300)}:host([open]) .overlay{background-color:#00000080;bottom:0;left:0;position:absolute;right:0;top:0}:host([open]) .overlay.blur{backdrop-filter:blur(2px)}:host([open]) .container{animation:fade-in .3s forwards;margin:0;max-width:100%;overflow-y:auto;overscroll-behavior:contain;padding:1rem;position:fixed;width:fit-content;will-change:transform,opacity}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@media (max-width:400px){:host([open]) .container{padding:.1rem}}";
|
|
2
|
+
var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{display:none;outline:none;position:relative}:host([open]){align-items:center;display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%;z-index:var(--dialog-z-index,300)}:host([open]) .overlay{background-color:#00000080;bottom:0;left:0;position:absolute;right:0;top:0}:host([open]) .overlay.blur{backdrop-filter:blur(2px)}:host([open]) .container{animation:fade-in .3s forwards;margin:0;max-width:100%;overflow-y:auto;overscroll-behavior:contain;padding:1rem;position:fixed;width:fit-content;will-change:transform,opacity}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@media (max-width:400px){:host([open]) .container{padding:.1rem}}";
|
|
3
3
|
|
|
4
4
|
export { css_248z as default, stylesheet };
|
package/dialog/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./dialog";
|
|
1
|
+
export * from "./dialog.js";
|
package/drawer/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./drawer";
|
|
1
|
+
export * from "./drawer.js";
|
package/form/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TkForm } from "./form";
|
|
1
|
+
export { TkForm } from "./form.js";
|
package/icon/icon.d.ts
CHANGED
package/icon/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./icon";
|
|
2
|
-
export * from "./icons";
|
|
1
|
+
export * from "./icon.js";
|
|
2
|
+
export * from "./icons.js";
|
package/index.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
export * from "./accordion/index";
|
|
2
|
-
export * from "./badge/index";
|
|
3
|
-
export * from "./box/index";
|
|
4
|
-
export * from "./button/index";
|
|
5
|
-
export * from "./checkbox/index";
|
|
6
|
-
export * from "./dialog/index";
|
|
7
|
-
export * from "./drawer/index";
|
|
8
|
-
export * from "./form/index";
|
|
9
|
-
export * from "./icon/index";
|
|
10
|
-
export * from "./list-item/index";
|
|
11
|
-
export * from "./loading/index";
|
|
12
|
-
export * from "./navbar/index";
|
|
13
|
-
export * from "./notie/index";
|
|
14
|
-
export * from "./pages/index";
|
|
15
|
-
export * from "./radio/index";
|
|
16
|
-
export * from "./select/index";
|
|
17
|
-
export * from "./slider/index";
|
|
18
|
-
export * from "./switch/index";
|
|
19
|
-
export * from "./tab-group/index";
|
|
20
|
-
export * from "./tag/index";
|
|
21
|
-
export * from "./textarea/index";
|
|
22
|
-
export * from "./textfield/index";
|
|
23
|
-
export * from "./theme/index";
|
|
1
|
+
export * from "./accordion/index.js";
|
|
2
|
+
export * from "./badge/index.js";
|
|
3
|
+
export * from "./box/index.js";
|
|
4
|
+
export * from "./button/index.js";
|
|
5
|
+
export * from "./checkbox/index.js";
|
|
6
|
+
export * from "./dialog/index.js";
|
|
7
|
+
export * from "./drawer/index.js";
|
|
8
|
+
export * from "./form/index.js";
|
|
9
|
+
export * from "./icon/index.js";
|
|
10
|
+
export * from "./list-item/index.js";
|
|
11
|
+
export * from "./loading/index.js";
|
|
12
|
+
export * from "./navbar/index.js";
|
|
13
|
+
export * from "./notie/index.js";
|
|
14
|
+
export * from "./pages/index.js";
|
|
15
|
+
export * from "./radio/index.js";
|
|
16
|
+
export * from "./select/index.js";
|
|
17
|
+
export * from "./slider/index.js";
|
|
18
|
+
export * from "./switch/index.js";
|
|
19
|
+
export * from "./tab-group/index.js";
|
|
20
|
+
export * from "./tag/index.js";
|
|
21
|
+
export * from "./textarea/index.js";
|
|
22
|
+
export * from "./textfield/index.js";
|
|
23
|
+
export * from "./theme/index.js";
|
|
24
|
+
export * from "./tooltip/index.js";
|
|
24
25
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../tinkiet/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../tinkiet/index.ts"],"names":[],"mappings":"AAAA,qCAA4B;AAC5B,iCAAwB;AACxB,+BAAsB;AACtB,kCAAyB;AACzB,oCAA2B;AAC3B,kCAAyB;AACzB,kCAAyB;AACzB,gCAAuB;AACvB,gCAAuB;AACvB,qCAA4B;AAC5B,mCAA0B;AAC1B,kCAAyB;AACzB,iCAAwB;AACxB,iCAAwB;AACxB,iCAAwB;AACxB,kCAAyB;AACzB,kCAAyB;AACzB,kCAAyB;AACzB,qCAA4B;AAC5B,+BAAsB;AACtB,oCAA2B;AAC3B,qCAA4B;AAC5B,iCAAwB;AACxB,mCAA0B"}
|
package/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import './tag/index.js';
|
|
|
21
21
|
import './textarea/index.js';
|
|
22
22
|
import './textfield/index.js';
|
|
23
23
|
import './theme/index.js';
|
|
24
|
+
import './tooltip/index.js';
|
|
24
25
|
export { TkAccordion } from './accordion/accordion.js';
|
|
25
26
|
export { TkBadge } from './badge/badge.js';
|
|
26
27
|
export { TkBox } from './box/box.js';
|
|
@@ -45,3 +46,4 @@ export { TkTag } from './tag/tag.js';
|
|
|
45
46
|
export { TkTextarea } from './textarea/textarea.js';
|
|
46
47
|
export { TkTextfield } from './textfield/textfield.js';
|
|
47
48
|
export { TkTheme } from './theme/theme.js';
|
|
49
|
+
export { TkTooltip } from './tooltip/tooltip.js';
|
package/list-item/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./list-item";
|
|
1
|
+
export * from "./list-item.js";
|
package/list-item/list-item.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
3
|
import { property, query, customElement } from 'lit/decorators.js';
|
|
4
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
4
5
|
import css_248z from './list-item.scss.js';
|
|
5
6
|
|
|
6
7
|
let TkListItem = class TkListItem extends LitElement {
|
|
@@ -13,7 +14,7 @@ let TkListItem = class TkListItem extends LitElement {
|
|
|
13
14
|
<slot name="after" @click=${this.handleClick}></slot>
|
|
14
15
|
${this.href
|
|
15
16
|
? html `
|
|
16
|
-
<a tabindex="-1" id="ahref" href="${this.href}" rel="noreferrer" aria-label=${this.ariaLabel}></a>
|
|
17
|
+
<a tabindex="-1" id="ahref" href="${this.href}" target=${ifDefined(this.target)} rel="noreferrer" aria-label=${this.ariaLabel}></a>
|
|
17
18
|
`
|
|
18
19
|
: ""}
|
|
19
20
|
`;
|
|
@@ -42,7 +43,6 @@ let TkListItem = class TkListItem extends LitElement {
|
|
|
42
43
|
// e.preventDefault();
|
|
43
44
|
//e.stopPropagation();
|
|
44
45
|
}
|
|
45
|
-
;
|
|
46
46
|
if (this.href && e.isTrusted) {
|
|
47
47
|
e.stopPropagation();
|
|
48
48
|
e.preventDefault();
|
package/loading/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./loading";
|
|
1
|
+
export * from "./loading.js";
|
package/loading/loading.d.ts
CHANGED
package/navbar/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./navbar";
|
|
1
|
+
export * from "./navbar.js";
|
package/navbar/navbar.d.ts
CHANGED
package/notie/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./notie";
|
|
1
|
+
export * from "./notie.js";
|
package/notie/notie.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TemplateResult } from "lit";
|
|
2
|
-
import { TkBox } from "../box/index";
|
|
2
|
+
import { TkBox } from "../box/index.js";
|
|
3
3
|
interface NotieOptions {
|
|
4
4
|
background?: string;
|
|
5
5
|
level?: NotieLevel;
|
|
@@ -20,6 +20,7 @@ interface NotieConfirmOptions extends NotieOptions {
|
|
|
20
20
|
}
|
|
21
21
|
interface NotieInputOptions extends NotieConfirmOptions {
|
|
22
22
|
password?: boolean;
|
|
23
|
+
inputType?: string;
|
|
23
24
|
}
|
|
24
25
|
declare enum NotieType {
|
|
25
26
|
show = "show",
|
|
@@ -44,6 +45,7 @@ declare class TkNotie extends TkBox {
|
|
|
44
45
|
delay: number;
|
|
45
46
|
animationDelay: number;
|
|
46
47
|
text: string;
|
|
48
|
+
inputType: string;
|
|
47
49
|
buttonText: string;
|
|
48
50
|
confirmText: string;
|
|
49
51
|
cancelText: string;
|
package/notie/notie.js
CHANGED
|
@@ -52,7 +52,7 @@ let TkNotie = TkNotie_1 = class TkNotie extends TkBox {
|
|
|
52
52
|
: ""}
|
|
53
53
|
${this.type == NotieType.input
|
|
54
54
|
? html `
|
|
55
|
-
<tk-textfield class="input"
|
|
55
|
+
<tk-textfield type=${this.inputType} class="input"></tk-textfield>
|
|
56
56
|
`
|
|
57
57
|
: ""}
|
|
58
58
|
${this.type == NotieType.confirm || this.type == NotieType.input
|
|
@@ -75,9 +75,11 @@ let TkNotie = TkNotie_1 = class TkNotie extends TkBox {
|
|
|
75
75
|
this.resolve = resolve;
|
|
76
76
|
this.style.setProperty("display", "flex");
|
|
77
77
|
setTimeout(() => (this.open = true));
|
|
78
|
-
this.dispatchEvent(new Event("
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
this.dispatchEvent(new Event("did-show"));
|
|
79
|
+
setTimeout(() => {
|
|
80
|
+
if (this.$input)
|
|
81
|
+
this.$input.focus();
|
|
82
|
+
}, 100);
|
|
81
83
|
if (this.type == NotieType.show)
|
|
82
84
|
setTimeout(() => this.hide(false), this.delay);
|
|
83
85
|
});
|
|
@@ -89,7 +91,7 @@ let TkNotie = TkNotie_1 = class TkNotie extends TkBox {
|
|
|
89
91
|
value = null;
|
|
90
92
|
this.$input ? (this.$input.value = "") : null;
|
|
91
93
|
this.$container.addEventListener("transitionend", () => {
|
|
92
|
-
this.dispatchEvent(new Event("
|
|
94
|
+
this.dispatchEvent(new Event("did-hide"));
|
|
93
95
|
this.resolve(value);
|
|
94
96
|
if (!this.persistent)
|
|
95
97
|
this.remove();
|
|
@@ -105,6 +107,7 @@ let TkNotie = TkNotie_1 = class TkNotie extends TkBox {
|
|
|
105
107
|
this.level = NotieLevel.info;
|
|
106
108
|
this.delay = 3000;
|
|
107
109
|
this.animationDelay = 300;
|
|
110
|
+
this.inputType = "text";
|
|
108
111
|
this.buttonText = "OK";
|
|
109
112
|
this.confirmText = "OK";
|
|
110
113
|
this.cancelText = "CANCEL";
|
|
@@ -127,7 +130,8 @@ let TkNotie = TkNotie_1 = class TkNotie extends TkBox {
|
|
|
127
130
|
}
|
|
128
131
|
static input(options) {
|
|
129
132
|
const notie = this.getNotie(options, NotieType.input);
|
|
130
|
-
options.
|
|
133
|
+
options.inputType ? (notie.inputType = options.inputType) : null;
|
|
134
|
+
options.password ? (notie.inputType = "password") : null;
|
|
131
135
|
options.confirmText ? (notie.confirmText = options.confirmText) : null;
|
|
132
136
|
options.cancelText ? (notie.cancelText = options.cancelText) : null;
|
|
133
137
|
return notie.show();
|
|
@@ -168,6 +172,9 @@ __decorate([
|
|
|
168
172
|
__decorate([
|
|
169
173
|
property()
|
|
170
174
|
], TkNotie.prototype, "text", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
property()
|
|
177
|
+
], TkNotie.prototype, "inputType", void 0);
|
|
171
178
|
__decorate([
|
|
172
179
|
property()
|
|
173
180
|
], TkNotie.prototype, "buttonText", void 0);
|
package/notie/notie.scss.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ":host{bottom:0;display:none;font-size:1.6rem;left:0;margin:0;position:fixed;right:0;top:0}:host .overlay{background-color:rgba(0,0,0,.502);bottom:0;left:0;position:fixed;right:0;top:0;z-index:var(--notie-z-index,400)}:host .container{background-color:var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%)));bottom:0;box-shadow:10px 10px 10px 10px var(--shadow);color:var(--on-primary,hsl(var(--on-primary-h,0),var(--on-primary-s,0%),var(--on-primary-l,100%)));height:fit-content;left:0;position:fixed;right:0;text-align:center;transform:translateY(100%);transition:all .15s ease-in;z-index:calc(var(--notie-z-index, 400) + 1)}:host .container.info{background-color:#4d82d6}:host .container.error{background-color:#e1715b}:host .container.warning{background-color:#d6a14d}:host .container.success{background-color:#57bf57}:host .text{padding:.5em}:host .input{--input-font-size:$font-size-widescreen;background-color:var(--background);color:var(--foreground);text-align:center}:host .button{cursor:pointer;padding:.5em}:host .button.confirm,:host .button.forcer{background-color:#57bf57;color:#fff}:host .button.cancel{background-color:var(--error,#e1715b);color:var(--on-error,#fff)}@media screen and (max-width:900px){:host{font-size:1.4rem}}@media screen and (max-width:750px){:host{font-size:1.2rem}}@media screen and (max-width:400px){:host{font-size:1rem}}:host([position=top]) .container{bottom:inherit;position:fixed;top:0;transform:translateY(-100%)}:host([open]) .container{transform:translateY(0)}";
|
|
2
|
-
var stylesheet=":host{bottom:0;display:none;font-size:1.6rem;left:0;margin:0;position:fixed;right:0;top:0}:host .overlay{background-color:rgba(0,0,0,.502);bottom:0;left:0;position:fixed;right:0;top:0;z-index:var(--notie-z-index,400)}:host .container{background-color:var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%)));bottom:0;box-shadow:10px 10px 10px 10px var(--shadow);color:var(--on-primary,hsl(var(--on-primary-h,0),var(--on-primary-s,0%),var(--on-primary-l,100%)));height:fit-content;left:0;position:fixed;right:0;text-align:center;transform:translateY(100%);transition:all .15s ease-in;z-index:calc(var(--notie-z-index, 400) + 1)}:host .container.info{background-color:#4d82d6}:host .container.error{background-color:#e1715b}:host .container.warning{background-color:#d6a14d}:host .container.success{background-color:#57bf57}:host .text{padding:.5em}:host .input{--input-font-size:$font-size-widescreen;background-color:var(--background);color:var(--foreground);text-align:center}:host .button{cursor:pointer;padding:.5em}:host .button.confirm,:host .button.forcer{background-color:#57bf57;color:#fff}:host .button.cancel{background-color:var(--error,#e1715b);color:var(--on-error,#fff)}@media screen and (max-width:900px){:host{font-size:1.4rem}}@media screen and (max-width:750px){:host{font-size:1.2rem}}@media screen and (max-width:400px){:host{font-size:1rem}}:host([position=top]) .container{bottom:inherit;position:fixed;top:0;transform:translateY(-100%)}:host([open]) .container{transform:translateY(0)}";
|
|
1
|
+
var css_248z = ":host{bottom:0;display:none;font-size:1.6rem;left:0;margin:0;position:fixed;right:0;top:0}:host .overlay{background-color:rgba(0,0,0,.502);bottom:0;left:0;position:fixed;right:0;top:0;z-index:var(--notie-z-index,400)}:host .container{background-color:var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%)));bottom:0;box-shadow:10px 10px 10px 10px var(--shadow);color:var(--on-primary,hsl(var(--on-primary-h,0),var(--on-primary-s,0%),var(--on-primary-l,100%)));height:fit-content;left:0;position:fixed;right:0;text-align:center;transform:translateY(100%);transition:all .15s ease-in;z-index:calc(var(--notie-z-index, 400) + 1)}:host .container.info{background-color:#4d82d6}:host .container.error{background-color:#e1715b}:host .container.warning{background-color:#d6a14d}:host .container.success{background-color:#57bf57}:host .text{padding:.5em}:host .input{--input-font-size:$font-size-widescreen;background-color:var(--background,#fff);color:var(--foreground,#000);text-align:center}:host .button{cursor:pointer;padding:.5em}:host .button.confirm,:host .button.forcer{background-color:#57bf57;color:#fff}:host .button.cancel{background-color:var(--error,#e1715b);color:var(--on-error,#fff)}@media screen and (max-width:900px){:host{font-size:1.4rem}}@media screen and (max-width:750px){:host{font-size:1.2rem}}@media screen and (max-width:400px){:host{font-size:1rem}}:host([position=top]) .container{bottom:inherit;position:fixed;top:0;transform:translateY(-100%)}:host([open]) .container{transform:translateY(0)}";
|
|
2
|
+
var stylesheet=":host{bottom:0;display:none;font-size:1.6rem;left:0;margin:0;position:fixed;right:0;top:0}:host .overlay{background-color:rgba(0,0,0,.502);bottom:0;left:0;position:fixed;right:0;top:0;z-index:var(--notie-z-index,400)}:host .container{background-color:var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%)));bottom:0;box-shadow:10px 10px 10px 10px var(--shadow);color:var(--on-primary,hsl(var(--on-primary-h,0),var(--on-primary-s,0%),var(--on-primary-l,100%)));height:fit-content;left:0;position:fixed;right:0;text-align:center;transform:translateY(100%);transition:all .15s ease-in;z-index:calc(var(--notie-z-index, 400) + 1)}:host .container.info{background-color:#4d82d6}:host .container.error{background-color:#e1715b}:host .container.warning{background-color:#d6a14d}:host .container.success{background-color:#57bf57}:host .text{padding:.5em}:host .input{--input-font-size:$font-size-widescreen;background-color:var(--background,#fff);color:var(--foreground,#000);text-align:center}:host .button{cursor:pointer;padding:.5em}:host .button.confirm,:host .button.forcer{background-color:#57bf57;color:#fff}:host .button.cancel{background-color:var(--error,#e1715b);color:var(--on-error,#fff)}@media screen and (max-width:900px){:host{font-size:1.4rem}}@media screen and (max-width:750px){:host{font-size:1.2rem}}@media screen and (max-width:400px){:host{font-size:1rem}}:host([position=top]) .container{bottom:inherit;position:fixed;top:0;transform:translateY(-100%)}:host([open]) .container{transform:translateY(0)}";
|
|
3
3
|
|
|
4
4
|
export { css_248z as default, stylesheet };
|
package/package.json
CHANGED
package/pages/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./pages";
|
|
1
|
+
export * from "./pages.js";
|
package/radio/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./radio";
|
|
1
|
+
export * from "./radio.js";
|
package/select/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./select";
|
|
1
|
+
export * from "./select.js";
|
package/slider/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./slider";
|
|
1
|
+
export * from "./slider.js";
|
package/switch/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./switch";
|
|
1
|
+
export * from "./switch.js";
|
package/tab-group/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./tab-group";
|
|
1
|
+
export * from "./tab-group.js";
|
package/tab-group/tab-group.js
CHANGED
|
@@ -35,7 +35,7 @@ let TkTabGroup = class TkTabGroup extends LitElement {
|
|
|
35
35
|
}
|
|
36
36
|
updated(props) {
|
|
37
37
|
var _a, _b;
|
|
38
|
-
if (props.has("selected")) {
|
|
38
|
+
if (props.has("selected") && this.selected !== "") {
|
|
39
39
|
this.querySelectorAll("*").forEach(node => node.removeAttribute("selected"));
|
|
40
40
|
(_a = this.querySelector(`[tab="${this.selected}"]`)) === null || _a === void 0 ? void 0 : _a.setAttribute("selected", "");
|
|
41
41
|
}
|
|
@@ -63,13 +63,6 @@ let TkTabGroup = class TkTabGroup extends LitElement {
|
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
// else {
|
|
67
|
-
// if (this.circle) {
|
|
68
|
-
// this.$circle.style.transform = `translate(-100px, -${this.$circle.clientWidth / 2}px)`;
|
|
69
|
-
// } else {
|
|
70
|
-
// this.$underline.style.width = "0";
|
|
71
|
-
// }
|
|
72
|
-
// }
|
|
73
66
|
}
|
|
74
67
|
};
|
|
75
68
|
TkTabGroup.styles = css `
|
package/tag/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./tag";
|
|
1
|
+
export * from "./tag.js";
|
package/textarea/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./textarea";
|
|
1
|
+
export * from "./textarea.js";
|
package/textarea/textarea.js
CHANGED
|
@@ -94,7 +94,7 @@ __decorate([
|
|
|
94
94
|
property({ type: Boolean })
|
|
95
95
|
], TkTextarea.prototype, "required", void 0);
|
|
96
96
|
__decorate([
|
|
97
|
-
property({ type: Boolean })
|
|
97
|
+
property({ type: Boolean, reflect: true })
|
|
98
98
|
], TkTextarea.prototype, "disabled", void 0);
|
|
99
99
|
__decorate([
|
|
100
100
|
property({ type: Boolean })
|
package/textfield/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./textfield";
|
|
1
|
+
export * from "./textfield.js";
|
package/textfield/textfield.js
CHANGED
|
@@ -27,35 +27,37 @@ let TkTextfield = class TkTextfield extends LitElement {
|
|
|
27
27
|
return this.$input != null ? this.$input.value : this.initialValue || "";
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return html
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
<div id="
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
30
|
+
return html `
|
|
31
|
+
<div id="container">
|
|
32
|
+
<slot id="before" name="before"></slot>
|
|
33
|
+
<div id="wrapper">
|
|
34
|
+
<div id="label">${this.label}</div>
|
|
35
|
+
<slot id="slot"></slot>
|
|
36
|
+
<input
|
|
37
|
+
id=${this._id}
|
|
38
|
+
@keydown=${this.handleChange.bind(this)}
|
|
39
|
+
@input=${this.handleChange.bind(this)}
|
|
40
|
+
@focusout=${this.handleChange.bind(this)}
|
|
41
|
+
?required="${this.required}"
|
|
42
|
+
?disabled="${this.disabled}"
|
|
43
|
+
?readonly="${this.readonly}"
|
|
44
|
+
autocomplete="${ifDefined(this.autocomplete)}"
|
|
45
|
+
autocapitalize="${ifDefined(this.autocapitalize)}"
|
|
46
|
+
aria-label="${ifDefined(this.label)}"
|
|
47
|
+
type="${ifDefined(this.type)}"
|
|
48
|
+
name="${ifDefined(this.name)}"
|
|
49
|
+
list="${ifDefined(this.list)}"
|
|
50
|
+
pattern="${ifDefined(this.pattern)}"
|
|
51
|
+
minlength="${ifDefined(this.minLength)}"
|
|
52
|
+
maxlength="${ifDefined(this.maxLength)}"
|
|
53
|
+
min="${ifDefined(this.min)}"
|
|
54
|
+
max="${ifDefined(this.max)}"
|
|
55
|
+
tabindex="${this.disabled ? -1 : 0}"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
<slot id="after" name="after"></slot>
|
|
56
59
|
</div>
|
|
57
|
-
|
|
58
|
-
</div> `;
|
|
60
|
+
`;
|
|
59
61
|
}
|
|
60
62
|
handleChange() {
|
|
61
63
|
this.refreshAttributes();
|
|
@@ -94,7 +96,7 @@ __decorate([
|
|
|
94
96
|
property({ type: Boolean })
|
|
95
97
|
], TkTextfield.prototype, "required", void 0);
|
|
96
98
|
__decorate([
|
|
97
|
-
property({ type: Boolean })
|
|
99
|
+
property({ type: Boolean, reflect: true })
|
|
98
100
|
], TkTextfield.prototype, "disabled", void 0);
|
|
99
101
|
__decorate([
|
|
100
102
|
property({ type: Boolean })
|
package/theme/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./theme";
|
|
1
|
+
export * from "./theme.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./tooltip.js";
|
package/tooltip/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TkTooltip } from './tooltip.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare class TkTooltip extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
position: "bottom" | "top" | "right" | "left";
|
|
5
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
"tk-tooltip": TkTooltip;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export { TkTooltip };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
|
+
import { property, customElement } from 'lit/decorators.js';
|
|
4
|
+
import css_248z from './tooltip.scss.js';
|
|
5
|
+
|
|
6
|
+
let TkTooltip = class TkTooltip extends LitElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.position = "top";
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return html `
|
|
13
|
+
<div class="container">
|
|
14
|
+
<slot></slot>
|
|
15
|
+
<div class="tooltip ${this.position}">
|
|
16
|
+
<slot name="tooltip"></slot>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
`;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
TkTooltip.styles = css `
|
|
24
|
+
${unsafeCSS(css_248z)}
|
|
25
|
+
`;
|
|
26
|
+
__decorate([
|
|
27
|
+
property({ attribute: true, type: String })
|
|
28
|
+
], TkTooltip.prototype, "position", void 0);
|
|
29
|
+
TkTooltip = __decorate([
|
|
30
|
+
customElement("tk-tooltip")
|
|
31
|
+
], TkTooltip);
|
|
32
|
+
|
|
33
|
+
export { TkTooltip };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var css_248z = ".container{display:inline-block;position:relative}.container .tooltip{background-color:#555;border-radius:6px;color:#fff;opacity:0;padding:.4em;position:absolute;text-align:center;transition:opacity .3s;visibility:hidden;z-index:var(--notie-z-index,400)}.container .tooltip.top{right:50%;top:0;transform:translateX(50%) translateY(calc(-100% - 5px))}.container .tooltip.top:after{border:5px solid #0000;border-top-color:#555;content:\"\";left:50%;margin-left:-5px;position:absolute;top:100%}.container .tooltip.right{right:0;top:50%;transform:translateX(calc(100% + 5px)) translateY(-50%)}.container .tooltip.right:after{border:5px solid #0000;border-right-color:#555;content:\"\";margin-top:-5px;position:absolute;right:100%;top:50%}.container .tooltip.bottom{bottom:0;right:50%;transform:translateX(50%) translateY(calc(100% + 5px))}.container .tooltip.bottom:after{border:5px solid;border-color:#0000 #0000 #555;bottom:100%;content:\"\";left:50%;margin-left:-5px;position:absolute}.container .tooltip.left{left:0;top:50%;transform:translateX(calc(-100% - 5px)) translateY(-50%)}.container .tooltip.left:after{border:5px solid #0000;border-left-color:#555;content:\"\";left:100%;margin-top:-5px;position:absolute;top:50%}.container:hover .tooltip{opacity:1;visibility:visible}";
|
|
2
|
+
var stylesheet=".container{display:inline-block;position:relative}.container .tooltip{background-color:#555;border-radius:6px;color:#fff;opacity:0;padding:.4em;position:absolute;text-align:center;transition:opacity .3s;visibility:hidden;z-index:var(--notie-z-index,400)}.container .tooltip.top{right:50%;top:0;transform:translateX(50%) translateY(calc(-100% - 5px))}.container .tooltip.top:after{border:5px solid #0000;border-top-color:#555;content:\"\";left:50%;margin-left:-5px;position:absolute;top:100%}.container .tooltip.right{right:0;top:50%;transform:translateX(calc(100% + 5px)) translateY(-50%)}.container .tooltip.right:after{border:5px solid #0000;border-right-color:#555;content:\"\";margin-top:-5px;position:absolute;right:100%;top:50%}.container .tooltip.bottom{bottom:0;right:50%;transform:translateX(50%) translateY(calc(100% + 5px))}.container .tooltip.bottom:after{border:5px solid;border-color:#0000 #0000 #555;bottom:100%;content:\"\";left:50%;margin-left:-5px;position:absolute}.container .tooltip.left{left:0;top:50%;transform:translateX(calc(-100% - 5px)) translateY(-50%)}.container .tooltip.left:after{border:5px solid #0000;border-left-color:#555;content:\"\";left:100%;margin-top:-5px;position:absolute;top:50%}.container:hover .tooltip{opacity:1;visibility:visible}";
|
|
3
|
+
|
|
4
|
+
export { css_248z as default, stylesheet };
|