tinkiet 0.8.2 → 0.8.6
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/drawer.d.ts +29 -0
- package/drawer/drawer.js +152 -0
- package/drawer/drawer.scss.js +4 -0
- package/drawer/index.d.ts +1 -0
- package/drawer/index.js +1 -0
- 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 +23 -22
- 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 +1 -1
- package/notie/notie.js +7 -5
- 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/tag/index.d.ts +1 -1
- package/textarea/index.d.ts +1 -1
- package/textfield/index.d.ts +1 -1
- package/theme/index.d.ts +1 -1
- package/umd/tinkiet.min.d.ts +30 -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";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare class TkDrawer extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
_open: boolean;
|
|
5
|
+
set open(value: boolean);
|
|
6
|
+
get open(): boolean;
|
|
7
|
+
over: boolean;
|
|
8
|
+
openQuery: string;
|
|
9
|
+
overQuery: string;
|
|
10
|
+
right: boolean;
|
|
11
|
+
swipeable: boolean;
|
|
12
|
+
private $drawer;
|
|
13
|
+
private mql;
|
|
14
|
+
private pointerListener;
|
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
16
|
+
updated(props: any): void;
|
|
17
|
+
protected overMediaQuery(): void;
|
|
18
|
+
private overMediaQueryListener;
|
|
19
|
+
hideIfOver(): void;
|
|
20
|
+
show(): void;
|
|
21
|
+
hide(): void;
|
|
22
|
+
toggle(): void;
|
|
23
|
+
}
|
|
24
|
+
declare global {
|
|
25
|
+
interface HTMLElementTagNameMap {
|
|
26
|
+
"tk-drawer": TkDrawer;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export { TkDrawer };
|
package/drawer/drawer.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
|
+
import { property, query, customElement } from 'lit/decorators.js';
|
|
4
|
+
import css_248z from './drawer.scss.js';
|
|
5
|
+
import { Direction, Pan, PointerListener, Tap } from 'contactjs';
|
|
6
|
+
|
|
7
|
+
let TkDrawer = class TkDrawer extends LitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this._open = false;
|
|
11
|
+
this.over = false;
|
|
12
|
+
this.right = false;
|
|
13
|
+
this.swipeable = false;
|
|
14
|
+
}
|
|
15
|
+
set open(value) {
|
|
16
|
+
if (value === this._open)
|
|
17
|
+
return;
|
|
18
|
+
const oldValue = this._open;
|
|
19
|
+
this._open = value;
|
|
20
|
+
this.requestUpdate("open", oldValue);
|
|
21
|
+
if (this._open)
|
|
22
|
+
this.dispatchEvent(new Event("did-show"));
|
|
23
|
+
if (!this._open)
|
|
24
|
+
this.dispatchEvent(new Event("did-close"));
|
|
25
|
+
}
|
|
26
|
+
get open() {
|
|
27
|
+
return this._open;
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return html `
|
|
31
|
+
<div class="container fi">
|
|
32
|
+
<slot name="drawer-container"></slot>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="overlay" @click=${() => (this.open = false)}></div>
|
|
35
|
+
<div class="drawer">
|
|
36
|
+
<div class="drawer-header">
|
|
37
|
+
<slot name="drawer-header"></slot>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="drawer-content">
|
|
40
|
+
<slot name="drawer-content"></slot>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="drawer-footer">
|
|
43
|
+
<slot name="drawer-footer"></slot>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
updated(props) {
|
|
49
|
+
if (props.has("overQuery"))
|
|
50
|
+
this.overMediaQuery();
|
|
51
|
+
if (props.has("openQuery")) {
|
|
52
|
+
if (window.matchMedia(this.openQuery).matches)
|
|
53
|
+
this.show();
|
|
54
|
+
}
|
|
55
|
+
if (props.has("swipeable") && this.swipeable) {
|
|
56
|
+
var panOptions = {
|
|
57
|
+
supportedDirections: [Direction.Left, Direction.Right],
|
|
58
|
+
bubbles: false
|
|
59
|
+
};
|
|
60
|
+
var panRecognizer = new Pan(this.$drawer, panOptions);
|
|
61
|
+
this.pointerListener = new PointerListener(this.$drawer, {
|
|
62
|
+
DEBUG: true,
|
|
63
|
+
DEBUG_GESTURES: true,
|
|
64
|
+
// handleTouchEvents : false,
|
|
65
|
+
supportedGestures: [Tap, panRecognizer],
|
|
66
|
+
bubbles: false
|
|
67
|
+
});
|
|
68
|
+
this.$drawer.addEventListener("tap", (event) => {
|
|
69
|
+
var _a;
|
|
70
|
+
const { x, y } = event.detail.live.srcEvent;
|
|
71
|
+
const el = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.elementFromPoint(x, y);
|
|
72
|
+
if (el)
|
|
73
|
+
el.click();
|
|
74
|
+
});
|
|
75
|
+
this.$drawer.addEventListener("panstart", (event) => {
|
|
76
|
+
this.$drawer.style.transition = "transform 0ms ease";
|
|
77
|
+
});
|
|
78
|
+
this.$drawer.addEventListener("pan", (event) => {
|
|
79
|
+
var x = event.detail.global.deltaX > 0 ? 0 : event.detail.global.deltaX;
|
|
80
|
+
var y = 0;
|
|
81
|
+
var transformString = "translate3d(" + x + "px, " + y + "px, 0)";
|
|
82
|
+
requestAnimationFrame(_ => {
|
|
83
|
+
this.$drawer.style.transform = transformString;
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
this.$drawer.addEventListener("panend", (event) => {
|
|
87
|
+
requestAnimationFrame(_ => {
|
|
88
|
+
this.$drawer.style.transition = "";
|
|
89
|
+
this.$drawer.style.transform = "";
|
|
90
|
+
this.open = event.detail.global.deltaX < -50 ? false : true;
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
if (props.has("swipeable") && !this.swipeable) {
|
|
95
|
+
this.pointerListener && this.pointerListener.destroy();
|
|
96
|
+
this.pointerListener = null;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
overMediaQuery() {
|
|
100
|
+
if (this.mql)
|
|
101
|
+
this.mql.removeEventListener("change", this.overMediaQueryListener.bind(this));
|
|
102
|
+
this.mql = window.matchMedia(this.overQuery);
|
|
103
|
+
this.mql.matches ? this.setAttribute("over", "") : this.removeAttribute("over");
|
|
104
|
+
this.mql.addEventListener("change", this.overMediaQueryListener.bind(this));
|
|
105
|
+
}
|
|
106
|
+
overMediaQueryListener(e) {
|
|
107
|
+
e.matches ? this.setAttribute("over", "") : this.removeAttribute("over");
|
|
108
|
+
}
|
|
109
|
+
hideIfOver() {
|
|
110
|
+
var _a;
|
|
111
|
+
if ((this.overQuery && ((_a = this.mql) === null || _a === void 0 ? void 0 : _a.matches)) || this.over)
|
|
112
|
+
this.open = false;
|
|
113
|
+
}
|
|
114
|
+
show() {
|
|
115
|
+
this.open = true;
|
|
116
|
+
}
|
|
117
|
+
hide() {
|
|
118
|
+
this.open = false;
|
|
119
|
+
}
|
|
120
|
+
toggle() {
|
|
121
|
+
this.open = !this.open;
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
TkDrawer.styles = css `
|
|
125
|
+
${unsafeCSS(css_248z)}
|
|
126
|
+
`;
|
|
127
|
+
__decorate([
|
|
128
|
+
property({ type: Boolean, reflect: true })
|
|
129
|
+
], TkDrawer.prototype, "open", null);
|
|
130
|
+
__decorate([
|
|
131
|
+
property({ type: Boolean, reflect: true })
|
|
132
|
+
], TkDrawer.prototype, "over", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
property({ type: String, attribute: "open-query" })
|
|
135
|
+
], TkDrawer.prototype, "openQuery", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
property({ type: String, attribute: "over-query" })
|
|
138
|
+
], TkDrawer.prototype, "overQuery", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
property({ type: Boolean, reflect: true })
|
|
141
|
+
], TkDrawer.prototype, "right", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
property({ type: Boolean, reflect: true })
|
|
144
|
+
], TkDrawer.prototype, "swipeable", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
query("div.drawer")
|
|
147
|
+
], TkDrawer.prototype, "$drawer", void 0);
|
|
148
|
+
TkDrawer = __decorate([
|
|
149
|
+
customElement("tk-drawer")
|
|
150
|
+
], TkDrawer);
|
|
151
|
+
|
|
152
|
+
export { TkDrawer };
|
|
@@ -0,0 +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:block;height:100%;overflow:hidden;position:relative;width:100%}.drawer{background-color:var(--background,#f7f7f7);color:var(--foreground,#454545);display:flex;flex-direction:column;height:100%;overflow:scroll;position:absolute;top:0;touch-action:pan-y;transform:translateX(-100%);transition:transform cubic-bezier(.4,0,.2,1) var(--transition-duration-medium,.18s);width:var(--drawer-width,256px);will-change:transform;z-index:var(--drawer-z-index,200)}.drawer .drawer-content{flex:1;overflow:scroll}:host([right]) .drawer{right:0;transform:translateX(100%)}.overlay{background-color:rgba(0,0,0,.502);bottom:0;display:none;left:0;position:absolute;right:0;top:0;z-index:var(--drawer-overlay-z-index,200)}.container{background-color:var(--background,#f7f7f7);height:100%;overflow:scroll;transition:padding cubic-bezier(.4,0,.2,1) var(--transition-duration-slow,.25s)}:host([open]) .drawer{transform:none}:host([open]) .container{padding-left:var(--drawer-width,256px)}:host([open][over]) .container{padding-left:0}:host([open][over]) .overlay{display:block}@media (max-width:var(--drawer-trigger-width,400px)){:host([open]) .container{padding-left:0}:host([open]) .overlay{display:block}}";
|
|
2
|
+
var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{display:block;height:100%;overflow:hidden;position:relative;width:100%}.drawer{background-color:var(--background,#f7f7f7);color:var(--foreground,#454545);display:flex;flex-direction:column;height:100%;overflow:scroll;position:absolute;top:0;touch-action:pan-y;transform:translateX(-100%);transition:transform cubic-bezier(.4,0,.2,1) var(--transition-duration-medium,.18s);width:var(--drawer-width,256px);will-change:transform;z-index:var(--drawer-z-index,200)}.drawer .drawer-content{flex:1;overflow:scroll}:host([right]) .drawer{right:0;transform:translateX(100%)}.overlay{background-color:rgba(0,0,0,.502);bottom:0;display:none;left:0;position:absolute;right:0;top:0;z-index:var(--drawer-overlay-z-index,200)}.container{background-color:var(--background,#f7f7f7);height:100%;overflow:scroll;transition:padding cubic-bezier(.4,0,.2,1) var(--transition-duration-slow,.25s)}:host([open]) .drawer{transform:none}:host([open]) .container{padding-left:var(--drawer-width,256px)}:host([open][over]) .container{padding-left:0}:host([open][over]) .overlay{display:block}@media (max-width:var(--drawer-trigger-width,400px)){:host([open]) .container{padding-left:0}:host([open]) .overlay{display:block}}";
|
|
3
|
+
|
|
4
|
+
export { css_248z as default, stylesheet };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./drawer.js";
|
package/drawer/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TkDrawer } 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,23 +1,24 @@
|
|
|
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 "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./
|
|
14
|
-
export * from "./
|
|
15
|
-
export * from "./
|
|
16
|
-
export * from "./
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./
|
|
20
|
-
export * from "./
|
|
21
|
-
export * from "./
|
|
22
|
-
export * from "./
|
|
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";
|
|
23
24
|
//# 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"}
|
package/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import './box/index.js';
|
|
|
4
4
|
import './button/index.js';
|
|
5
5
|
import './checkbox/index.js';
|
|
6
6
|
import './dialog/index.js';
|
|
7
|
+
import './drawer/index.js';
|
|
7
8
|
import './form/index.js';
|
|
8
9
|
import './icon/index.js';
|
|
9
10
|
import './list-item/index.js';
|
|
@@ -26,6 +27,7 @@ export { TkBox } from './box/box.js';
|
|
|
26
27
|
export { TkButton } from './button/button.js';
|
|
27
28
|
export { TkCheckbox } from './checkbox/checkbox.js';
|
|
28
29
|
export { TkDialog } from './dialog/dialog.js';
|
|
30
|
+
export { TkDrawer } from './drawer/drawer.js';
|
|
29
31
|
export { TkForm } from './form/form.js';
|
|
30
32
|
export { TkIcon } from './icon/icon.js';
|
|
31
33
|
export { TkIcons } from './icon/icons.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
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 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();
|
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/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/textfield/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./textfield";
|
|
1
|
+
export * from "./textfield.js";
|
package/theme/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./theme";
|
|
1
|
+
export * from "./theme.js";
|
package/umd/tinkiet.min.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from "lit";
|
|
1
|
+
import { LitElement, PropertyValueMap, TemplateResult } from "lit";
|
|
2
2
|
declare const colors: readonly [
|
|
3
3
|
"primary-lighter",
|
|
4
4
|
"primary-light",
|
|
@@ -197,7 +197,7 @@ declare class TkDialog extends LitElement {
|
|
|
197
197
|
blurOverlay: boolean;
|
|
198
198
|
private resolve;
|
|
199
199
|
render(): import("lit-html").TemplateResult<1>;
|
|
200
|
-
updated(
|
|
200
|
+
protected updated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
201
201
|
show(): Promise<string | boolean | null>;
|
|
202
202
|
hide(value?: boolean | string | null): void;
|
|
203
203
|
}
|
|
@@ -206,6 +206,33 @@ declare global {
|
|
|
206
206
|
"tk-dialog": TkDialog;
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
+
declare class TkDrawer extends LitElement {
|
|
210
|
+
static styles: import("lit").CSSResult;
|
|
211
|
+
_open: boolean;
|
|
212
|
+
set open(value: boolean);
|
|
213
|
+
get open(): boolean;
|
|
214
|
+
over: boolean;
|
|
215
|
+
openQuery: string;
|
|
216
|
+
overQuery: string;
|
|
217
|
+
right: boolean;
|
|
218
|
+
swipeable: boolean;
|
|
219
|
+
private $drawer;
|
|
220
|
+
private mql;
|
|
221
|
+
private pointerListener;
|
|
222
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
223
|
+
updated(props: any): void;
|
|
224
|
+
protected overMediaQuery(): void;
|
|
225
|
+
private overMediaQueryListener;
|
|
226
|
+
hideIfOver(): void;
|
|
227
|
+
show(): void;
|
|
228
|
+
hide(): void;
|
|
229
|
+
toggle(): void;
|
|
230
|
+
}
|
|
231
|
+
declare global {
|
|
232
|
+
interface HTMLElementTagNameMap {
|
|
233
|
+
"tk-drawer": TkDrawer;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
209
236
|
declare class TkForm extends LitElement {
|
|
210
237
|
value: any;
|
|
211
238
|
protected createRenderRoot(): Element | ShadowRoot;
|
|
@@ -584,5 +611,5 @@ declare global {
|
|
|
584
611
|
"tk-theme": TkTheme;
|
|
585
612
|
}
|
|
586
613
|
}
|
|
587
|
-
export { TkAccordion, TkBadge, TkBox, TkButton, TkCheckbox, TkDialog, TkForm, TkIcon, TkIcons, TkListItem, TkLoading, TkNavbar, TkNotie, TkPages, TkRadio, TkSelect, TkSlider, TkSwitch, TkTabGroup, TkTag, TkTextarea, TkTextfield, TkTheme };
|
|
614
|
+
export { TkAccordion, TkBadge, TkBox, TkButton, TkCheckbox, TkDialog, TkDrawer, TkForm, TkIcon, TkIcons, TkListItem, TkLoading, TkNavbar, TkNotie, TkPages, TkRadio, TkSelect, TkSlider, TkSwitch, TkTabGroup, TkTag, TkTextarea, TkTextfield, TkTheme };
|
|
588
615
|
//# sourceMappingURL=tinkiet.min.d.ts.map
|