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.
Files changed (144) hide show
  1. package/accordion/accordion.d.ts +3 -4
  2. package/accordion/index.d.ts +1 -1
  3. package/accordion/index.js +491 -1
  4. package/badge/badge.d.ts +2 -3
  5. package/badge/index.d.ts +1 -1
  6. package/badge/index.js +134 -1
  7. package/box/box.d.ts +3 -3
  8. package/box/focusable-box.d.ts +2 -3
  9. package/box/index.d.ts +1 -1
  10. package/box/index.js +289 -1
  11. package/button/button.d.ts +3 -4
  12. package/button/index.d.ts +1 -1
  13. package/button/index.js +502 -1
  14. package/checkbox/checkbox.d.ts +3 -3
  15. package/checkbox/index.d.ts +1 -1
  16. package/checkbox/index.js +450 -1
  17. package/chip/chip.d.ts +17 -3
  18. package/chip/index.d.ts +1 -1
  19. package/chip/index.js +168 -1
  20. package/dialog/dialog.d.ts +2 -3
  21. package/dialog/index.d.ts +1 -1
  22. package/dialog/index.js +162 -1
  23. package/drawer/drawer.d.ts +2 -3
  24. package/drawer/index.d.ts +1 -1
  25. package/drawer/index.js +272 -1
  26. package/form/form.d.ts +1 -2
  27. package/form/index.d.ts +1 -1
  28. package/form/index.js +149 -1
  29. package/icon/icon.d.ts +3 -4
  30. package/icon/icons.d.ts +1 -2
  31. package/icon/index.d.ts +2 -2
  32. package/icon/index.js +457 -2
  33. package/index.d.ts +52 -26
  34. package/index.js +3727 -52
  35. package/list-item/index.d.ts +1 -1
  36. package/list-item/index.js +414 -1
  37. package/list-item/list-item.d.ts +3 -4
  38. package/loading/index.d.ts +1 -1
  39. package/loading/index.js +389 -1
  40. package/loading/loading.d.ts +3 -4
  41. package/navigation/index.d.ts +2 -2
  42. package/navigation/index.js +201 -2
  43. package/navigation/navigation-bar.d.ts +2 -3
  44. package/navigation/navigation-item.d.ts +2 -3
  45. package/notie/index.d.ts +1 -1
  46. package/notie/index.js +744 -1
  47. package/notie/notie.d.ts +12 -11
  48. package/package.json +3 -4
  49. package/pages/index.d.ts +1 -1
  50. package/pages/index.js +178 -1
  51. package/pages/pages.d.ts +2 -3
  52. package/radio/index.d.ts +1 -1
  53. package/radio/index.js +466 -1
  54. package/radio/radio.d.ts +3 -3
  55. package/select/index.d.ts +1 -1
  56. package/select/index.js +493 -1
  57. package/select/select.d.ts +3 -3
  58. package/slider/index.d.ts +1 -1
  59. package/slider/index.js +274 -1
  60. package/slider/slider.d.ts +2 -3
  61. package/snackbar/index.d.ts +1 -0
  62. package/snackbar/snackbar.d.ts +34 -0
  63. package/switch/index.d.ts +1 -1
  64. package/switch/index.js +462 -1
  65. package/switch/switch.d.ts +3 -3
  66. package/tab-group/index.d.ts +1 -1
  67. package/tab-group/index.js +182 -1
  68. package/tab-group/tab-group.d.ts +2 -3
  69. package/tab-group/tab-item.d.ts +7 -0
  70. package/textarea/index.d.ts +1 -1
  71. package/textarea/index.js +272 -1
  72. package/textarea/textarea.d.ts +2 -3
  73. package/textfield/index.d.ts +1 -1
  74. package/textfield/index.js +278 -1
  75. package/textfield/textfield.d.ts +2 -3
  76. package/theme/index.d.ts +1 -1
  77. package/theme/index.js +240 -1
  78. package/theme/theme.d.ts +2 -3
  79. package/tooltip/index.d.ts +1 -1
  80. package/tooltip/index.js +136 -1
  81. package/tooltip/tooltip.d.ts +2 -3
  82. package/topbar/index.d.ts +1 -1
  83. package/topbar/index.js +358 -1
  84. package/topbar/topbar.d.ts +3 -4
  85. package/umd/tinkiet.min.js +437 -1
  86. package/utils/aria.d.ts +11 -0
  87. package/utils/unique.d.ts +1 -2
  88. package/accordion/accordion.js +0 -94
  89. package/accordion/accordion.scss.js +0 -4
  90. package/badge/badge.js +0 -31
  91. package/badge/badge.scss.js +0 -4
  92. package/box/box.js +0 -186
  93. package/box/box.scss.js +0 -4
  94. package/box/focusable-box.js +0 -30
  95. package/button/button.js +0 -141
  96. package/button/button.scss.js +0 -4
  97. package/checkbox/checkbox.js +0 -89
  98. package/checkbox/checkbox.scss.js +0 -4
  99. package/chip/chip.js +0 -20
  100. package/chip/chip.scss.js +0 -4
  101. package/dialog/dialog.js +0 -59
  102. package/dialog/dialog.scss.js +0 -4
  103. package/drawer/drawer.js +0 -168
  104. package/drawer/drawer.scss.js +0 -4
  105. package/form/form.js +0 -54
  106. package/icon/icon.js +0 -77
  107. package/icon/icon.scss.js +0 -4
  108. package/icon/icons.js +0 -24
  109. package/index.d.ts.map +0 -1
  110. package/list-item/list-item.js +0 -86
  111. package/list-item/list-item.scss.js +0 -4
  112. package/loading/loading.js +0 -61
  113. package/loading/loading.scss.js +0 -4
  114. package/navigation/navigation-bar.js +0 -20
  115. package/navigation/navigation-bar.scss.js +0 -4
  116. package/navigation/navigation-item.js +0 -51
  117. package/navigation/navigation-item.scss.js +0 -4
  118. package/notie/notie.js +0 -201
  119. package/notie/notie.scss.js +0 -4
  120. package/pages/pages.js +0 -75
  121. package/pages/pages.scss.js +0 -4
  122. package/radio/radio.js +0 -105
  123. package/radio/radio.scss.js +0 -4
  124. package/select/select.js +0 -132
  125. package/select/select.scss.js +0 -4
  126. package/slider/slider.js +0 -135
  127. package/slider/slider.scss.js +0 -4
  128. package/switch/switch.js +0 -101
  129. package/switch/switch.scss.js +0 -4
  130. package/tab-group/tab-group.js +0 -79
  131. package/tab-group/tab-group.scss.js +0 -4
  132. package/textarea/textarea.js +0 -133
  133. package/textarea/textarea.scss.js +0 -4
  134. package/textfield/textfield.js +0 -138
  135. package/textfield/textfield.scss.js +0 -4
  136. package/theme/theme.js +0 -137
  137. package/theme/theme.scss.js +0 -4
  138. package/tooltip/tooltip.js +0 -33
  139. package/tooltip/tooltip.scss.js +0 -4
  140. package/topbar/topbar.js +0 -33
  141. package/topbar/topbar.scss.js +0 -4
  142. package/umd/tinkiet.min.d.ts +0 -660
  143. package/umd/tinkiet.min.d.ts.map +0 -1
  144. package/utils/unique.js +0 -12
package/form/index.js CHANGED
@@ -1 +1,149 @@
1
- export { TkForm } from './form.js';
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/index.js";
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-html").TemplateResult<1>;
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
@@ -1,7 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
- declare class TkIcons extends LitElement {
2
+ export declare class TkIcons extends LitElement {
3
3
  resolve: Function;
4
4
  library: string;
5
5
  firstUpdated(): void;
6
6
  }
7
- export { TkIcons };
package/icon/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./icon.js";
2
- export * from "./icons.js";
1
+ export * from "./icon";
2
+ export * from "./icons";