tinkiet 0.9.14 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.d.ts +3 -4
- package/accordion/index.d.ts +1 -1
- package/accordion/index.js +491 -1
- package/badge/badge.d.ts +2 -3
- package/badge/index.d.ts +1 -1
- package/badge/index.js +134 -1
- package/box/box.d.ts +3 -3
- package/box/focusable-box.d.ts +2 -3
- package/box/index.d.ts +1 -1
- package/box/index.js +289 -1
- package/button/button.d.ts +3 -4
- package/button/index.d.ts +1 -1
- package/button/index.js +502 -1
- package/checkbox/checkbox.d.ts +3 -3
- package/checkbox/index.d.ts +1 -1
- package/checkbox/index.js +450 -1
- package/chip/chip.d.ts +17 -3
- package/chip/index.d.ts +1 -1
- package/chip/index.js +168 -1
- package/dialog/dialog.d.ts +2 -3
- package/dialog/index.d.ts +1 -1
- package/dialog/index.js +162 -1
- package/drawer/drawer.d.ts +2 -3
- package/drawer/index.d.ts +1 -1
- package/drawer/index.js +272 -1
- package/form/form.d.ts +1 -2
- package/form/index.d.ts +1 -1
- package/form/index.js +149 -1
- package/icon/icon.d.ts +3 -4
- package/icon/icons.d.ts +1 -2
- package/icon/index.d.ts +2 -2
- package/icon/index.js +457 -2
- package/index.d.ts +52 -26
- package/index.js +3727 -52
- package/list-item/index.d.ts +1 -1
- package/list-item/index.js +414 -1
- package/list-item/list-item.d.ts +3 -4
- package/loading/index.d.ts +1 -1
- package/loading/index.js +389 -1
- package/loading/loading.d.ts +3 -4
- package/navigation/index.d.ts +2 -2
- package/navigation/index.js +201 -2
- package/navigation/navigation-bar.d.ts +2 -3
- package/navigation/navigation-item.d.ts +2 -3
- package/notie/index.d.ts +1 -1
- package/notie/index.js +744 -1
- package/notie/notie.d.ts +12 -11
- package/package.json +3 -4
- package/pages/index.d.ts +1 -1
- package/pages/index.js +178 -1
- package/pages/pages.d.ts +2 -3
- package/radio/index.d.ts +1 -1
- package/radio/index.js +466 -1
- package/radio/radio.d.ts +3 -3
- package/select/index.d.ts +1 -1
- package/select/index.js +493 -1
- package/select/select.d.ts +3 -3
- package/slider/index.d.ts +1 -1
- package/slider/index.js +274 -1
- package/slider/slider.d.ts +2 -3
- package/snackbar/index.d.ts +1 -0
- package/snackbar/snackbar.d.ts +34 -0
- package/switch/index.d.ts +1 -1
- package/switch/index.js +462 -1
- package/switch/switch.d.ts +3 -3
- package/tab-group/index.d.ts +1 -1
- package/tab-group/index.js +182 -1
- package/tab-group/tab-group.d.ts +2 -3
- package/tab-group/tab-item.d.ts +7 -0
- package/textarea/index.d.ts +1 -1
- package/textarea/index.js +272 -1
- package/textarea/textarea.d.ts +2 -3
- package/textfield/index.d.ts +1 -1
- package/textfield/index.js +278 -1
- package/textfield/textfield.d.ts +2 -3
- package/theme/index.d.ts +1 -1
- package/theme/index.js +240 -1
- package/theme/theme.d.ts +2 -3
- package/tooltip/index.d.ts +1 -1
- package/tooltip/index.js +136 -1
- package/tooltip/tooltip.d.ts +2 -3
- package/topbar/index.d.ts +1 -1
- package/topbar/index.js +358 -1
- package/topbar/topbar.d.ts +3 -4
- package/umd/tinkiet.min.js +437 -1
- package/utils/aria.d.ts +11 -0
- package/utils/unique.d.ts +1 -2
- package/accordion/accordion.js +0 -94
- package/accordion/accordion.scss.js +0 -4
- package/badge/badge.js +0 -31
- package/badge/badge.scss.js +0 -4
- package/box/box.js +0 -186
- package/box/box.scss.js +0 -4
- package/box/focusable-box.js +0 -30
- package/button/button.js +0 -141
- package/button/button.scss.js +0 -4
- package/checkbox/checkbox.js +0 -89
- package/checkbox/checkbox.scss.js +0 -4
- package/chip/chip.js +0 -20
- package/chip/chip.scss.js +0 -4
- package/dialog/dialog.js +0 -59
- package/dialog/dialog.scss.js +0 -4
- package/drawer/drawer.js +0 -168
- package/drawer/drawer.scss.js +0 -4
- package/form/form.js +0 -54
- package/icon/icon.js +0 -77
- package/icon/icon.scss.js +0 -4
- package/icon/icons.js +0 -24
- package/index.d.ts.map +0 -1
- package/list-item/list-item.js +0 -86
- package/list-item/list-item.scss.js +0 -4
- package/loading/loading.js +0 -61
- package/loading/loading.scss.js +0 -4
- package/navigation/navigation-bar.js +0 -20
- package/navigation/navigation-bar.scss.js +0 -4
- package/navigation/navigation-item.js +0 -51
- package/navigation/navigation-item.scss.js +0 -4
- package/notie/notie.js +0 -201
- package/notie/notie.scss.js +0 -4
- package/pages/pages.js +0 -75
- package/pages/pages.scss.js +0 -4
- package/radio/radio.js +0 -105
- package/radio/radio.scss.js +0 -4
- package/select/select.js +0 -132
- package/select/select.scss.js +0 -4
- package/slider/slider.js +0 -135
- package/slider/slider.scss.js +0 -4
- package/switch/switch.js +0 -101
- package/switch/switch.scss.js +0 -4
- package/tab-group/tab-group.js +0 -79
- package/tab-group/tab-group.scss.js +0 -4
- package/textarea/textarea.js +0 -133
- package/textarea/textarea.scss.js +0 -4
- package/textfield/textfield.js +0 -138
- package/textfield/textfield.scss.js +0 -4
- package/theme/theme.js +0 -137
- package/theme/theme.scss.js +0 -4
- package/tooltip/tooltip.js +0 -33
- package/tooltip/tooltip.scss.js +0 -4
- package/topbar/topbar.js +0 -33
- package/topbar/topbar.scss.js +0 -4
- package/umd/tinkiet.min.d.ts +0 -660
- package/umd/tinkiet.min.d.ts.map +0 -1
- package/utils/unique.js +0 -12
package/form/index.js
CHANGED
|
@@ -1 +1,149 @@
|
|
|
1
|
-
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lit__ from "lit";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lit_decorators_js_226d44c5__ from "lit/decorators.js";
|
|
3
|
+
/******/ var __webpack_modules__ = ({
|
|
4
|
+
|
|
5
|
+
/***/ 2927:
|
|
6
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
7
|
+
|
|
8
|
+
var x = (y) => {
|
|
9
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
|
10
|
+
}
|
|
11
|
+
var y = (x) => (() => (x))
|
|
12
|
+
module.exports = x({ ["LitElement"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.LitElement) });
|
|
13
|
+
|
|
14
|
+
/***/ }),
|
|
15
|
+
|
|
16
|
+
/***/ 4686:
|
|
17
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
18
|
+
|
|
19
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20
|
+
/* harmony export */ i: () => (/* binding */ TkForm)
|
|
21
|
+
/* harmony export */ });
|
|
22
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2927);
|
|
23
|
+
/* harmony import */ var lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8899);
|
|
24
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
25
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
26
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
27
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
28
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
let TkForm = class TkForm extends lit__WEBPACK_IMPORTED_MODULE_0__.LitElement {
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
super.connectedCallback();
|
|
35
|
+
this.addEventListener("submit", this.submit);
|
|
36
|
+
}
|
|
37
|
+
disconnectedCallback() {
|
|
38
|
+
super.disconnectedCallback();
|
|
39
|
+
this.removeEventListener("submit", this.submit);
|
|
40
|
+
}
|
|
41
|
+
submit(e) {
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
const result = this.getFormDataAsObject();
|
|
44
|
+
this.dispatchEvent(new CustomEvent("fulfill", { detail: result }));
|
|
45
|
+
}
|
|
46
|
+
getFormDataAsObject() {
|
|
47
|
+
const $form = this.querySelector("form");
|
|
48
|
+
const result = {};
|
|
49
|
+
const data = new FormData($form);
|
|
50
|
+
data.forEach((value, key) => {
|
|
51
|
+
var _a;
|
|
52
|
+
const $inputElement = this.querySelector(`[name=${key}]`);
|
|
53
|
+
if ($inputElement.tagName == "TK-SLIDER") {
|
|
54
|
+
value = Number(value);
|
|
55
|
+
}
|
|
56
|
+
if ($inputElement.tagName == "TK-CHECKBOX" && (value == "on" || value == "true")) {
|
|
57
|
+
value = true;
|
|
58
|
+
}
|
|
59
|
+
if ($inputElement.tagName == "TK-RADIO" && (value == "on" || value == "true")) {
|
|
60
|
+
value = true;
|
|
61
|
+
}
|
|
62
|
+
if (key.indexOf("-") > 0) {
|
|
63
|
+
const _ks = key.split("-");
|
|
64
|
+
result[_ks[0]] = (_a = result[_ks[0]]) !== null && _a !== void 0 ? _a : {};
|
|
65
|
+
result[_ks[0]][_ks[1]] = value;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
result[key] = value;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
return result;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
__decorate([
|
|
75
|
+
(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.property)()
|
|
76
|
+
], TkForm.prototype, "value", void 0);
|
|
77
|
+
TkForm = __decorate([
|
|
78
|
+
(0,lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__.customElement)("tk-form")
|
|
79
|
+
], TkForm);
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
/***/ }),
|
|
84
|
+
|
|
85
|
+
/***/ 8899:
|
|
86
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
87
|
+
|
|
88
|
+
var x = (y) => {
|
|
89
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
|
90
|
+
}
|
|
91
|
+
var y = (x) => (() => (x))
|
|
92
|
+
module.exports = x({ ["customElement"]: () => (__WEBPACK_EXTERNAL_MODULE_lit_decorators_js_226d44c5__.customElement), ["property"]: () => (__WEBPACK_EXTERNAL_MODULE_lit_decorators_js_226d44c5__.property) });
|
|
93
|
+
|
|
94
|
+
/***/ })
|
|
95
|
+
|
|
96
|
+
/******/ });
|
|
97
|
+
/************************************************************************/
|
|
98
|
+
/******/ // The module cache
|
|
99
|
+
/******/ var __webpack_module_cache__ = {};
|
|
100
|
+
/******/
|
|
101
|
+
/******/ // The require function
|
|
102
|
+
/******/ function __webpack_require__(moduleId) {
|
|
103
|
+
/******/ // Check if module is in cache
|
|
104
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
105
|
+
/******/ if (cachedModule !== undefined) {
|
|
106
|
+
/******/ return cachedModule.exports;
|
|
107
|
+
/******/ }
|
|
108
|
+
/******/ // Create a new module (and put it into the cache)
|
|
109
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
110
|
+
/******/ // no module.id needed
|
|
111
|
+
/******/ // no module.loaded needed
|
|
112
|
+
/******/ exports: {}
|
|
113
|
+
/******/ };
|
|
114
|
+
/******/
|
|
115
|
+
/******/ // Execute the module function
|
|
116
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
117
|
+
/******/
|
|
118
|
+
/******/ // Return the exports of the module
|
|
119
|
+
/******/ return module.exports;
|
|
120
|
+
/******/ }
|
|
121
|
+
/******/
|
|
122
|
+
/************************************************************************/
|
|
123
|
+
/******/ /* webpack/runtime/define property getters */
|
|
124
|
+
/******/ (() => {
|
|
125
|
+
/******/ // define getter functions for harmony exports
|
|
126
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
127
|
+
/******/ for(var key in definition) {
|
|
128
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
129
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
130
|
+
/******/ }
|
|
131
|
+
/******/ }
|
|
132
|
+
/******/ };
|
|
133
|
+
/******/ })();
|
|
134
|
+
/******/
|
|
135
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
136
|
+
/******/ (() => {
|
|
137
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
138
|
+
/******/ })();
|
|
139
|
+
/******/
|
|
140
|
+
/************************************************************************/
|
|
141
|
+
var __webpack_exports__ = {};
|
|
142
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
143
|
+
/* harmony export */ i: () => (/* reexport safe */ _form__WEBPACK_IMPORTED_MODULE_0__.i)
|
|
144
|
+
/* harmony export */ });
|
|
145
|
+
/* harmony import */ var _form__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4686);
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
const __webpack_exports__TkForm = __webpack_exports__.i;
|
|
149
|
+
export { __webpack_exports__TkForm as TkForm };
|
package/icon/icon.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { TkBox } from "../box
|
|
2
|
-
declare class TkIcon extends TkBox {
|
|
1
|
+
import { TkBox } from "../box";
|
|
2
|
+
export declare class TkIcon extends TkBox {
|
|
3
3
|
static get styles(): import("lit").CSSResult[];
|
|
4
4
|
name: string;
|
|
5
5
|
library: string;
|
|
6
6
|
path: string;
|
|
7
7
|
private svg;
|
|
8
|
-
render(): import("lit
|
|
8
|
+
render(): import("lit").TemplateResult<1>;
|
|
9
9
|
updated(props: any): void;
|
|
10
10
|
loadIcon(): Promise<void>;
|
|
11
11
|
}
|
|
@@ -14,4 +14,3 @@ declare global {
|
|
|
14
14
|
"tk-icon": TkIcon;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
export { TkIcon };
|
package/icon/icons.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";
|
|
2
|
+
export * from "./icons";
|