tinkiet 0.9.14 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.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 +2 -3
- package/chip/index.d.ts +1 -1
- package/chip/index.js +123 -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 +3682 -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 +8 -5
- 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 +420 -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/notie/notie.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { TemplateResult } from "lit";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import "../box";
|
|
3
|
+
import { TkBox } from "../box";
|
|
4
|
+
import "../textfield";
|
|
5
|
+
export interface NotieOptions {
|
|
4
6
|
background?: string;
|
|
5
7
|
level?: NotieLevel;
|
|
6
8
|
color?: string;
|
|
@@ -11,31 +13,31 @@ interface NotieOptions {
|
|
|
11
13
|
container?: HTMLElement;
|
|
12
14
|
position?: "bottom" | "top";
|
|
13
15
|
}
|
|
14
|
-
interface NotieForceOptions extends NotieOptions {
|
|
16
|
+
export interface NotieForceOptions extends NotieOptions {
|
|
15
17
|
buttonText?: string;
|
|
16
18
|
}
|
|
17
|
-
interface NotieConfirmOptions extends NotieOptions {
|
|
19
|
+
export interface NotieConfirmOptions extends NotieOptions {
|
|
18
20
|
confirmText?: string;
|
|
19
21
|
cancelText?: string;
|
|
20
22
|
}
|
|
21
|
-
interface NotieInputOptions extends NotieConfirmOptions {
|
|
23
|
+
export interface NotieInputOptions extends NotieConfirmOptions {
|
|
22
24
|
password?: boolean;
|
|
23
|
-
inputType?:
|
|
25
|
+
inputType?: "number" | "email" | "password" | "text" | "search";
|
|
24
26
|
}
|
|
25
|
-
declare enum NotieType {
|
|
27
|
+
export declare enum NotieType {
|
|
26
28
|
show = "show",
|
|
27
29
|
force = "force",
|
|
28
30
|
confirm = "confirm",
|
|
29
31
|
input = "input"
|
|
30
32
|
}
|
|
31
|
-
declare enum NotieLevel {
|
|
33
|
+
export declare enum NotieLevel {
|
|
32
34
|
success = "success",
|
|
33
35
|
warning = "warning",
|
|
34
36
|
error = "error",
|
|
35
37
|
info = "info",
|
|
36
38
|
neutral = "neutral"
|
|
37
39
|
}
|
|
38
|
-
declare class TkNotie extends TkBox {
|
|
40
|
+
export declare class TkNotie extends TkBox {
|
|
39
41
|
static get styles(): import("lit").CSSResult[];
|
|
40
42
|
persistent: boolean;
|
|
41
43
|
open: boolean;
|
|
@@ -45,7 +47,7 @@ declare class TkNotie extends TkBox {
|
|
|
45
47
|
delay: number;
|
|
46
48
|
animationDelay: number;
|
|
47
49
|
text: string;
|
|
48
|
-
inputType:
|
|
50
|
+
inputType: "number" | "email" | "password" | "text" | "search";
|
|
49
51
|
buttonText: string;
|
|
50
52
|
confirmText: string;
|
|
51
53
|
cancelText: string;
|
|
@@ -68,4 +70,3 @@ declare global {
|
|
|
68
70
|
"tk-notie": TkNotie;
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
|
-
export { NotieOptions, NotieForceOptions, NotieConfirmOptions, NotieInputOptions, NotieLevel, TkNotie };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinkiet",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Pragmatic UI Web Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -22,13 +22,16 @@
|
|
|
22
22
|
"author": "Cyrille Colin <cyrille.colin@educ.cloud>",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"homepage": "https://tinkiet.educ.cloud",
|
|
25
|
-
"
|
|
26
|
-
"lit": "^3.1
|
|
27
|
-
"tslib": "^2.6.3"
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"lit": "^3.3.1"
|
|
28
27
|
},
|
|
29
28
|
"contributors": [
|
|
30
29
|
{
|
|
31
30
|
"name": "Cyrille Colin"
|
|
32
31
|
}
|
|
33
|
-
]
|
|
32
|
+
],
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"client": "^0.0.1",
|
|
35
|
+
"page": "^1.11.6"
|
|
36
|
+
}
|
|
34
37
|
}
|
package/pages/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./pages
|
|
1
|
+
export * from "./pages";
|
package/pages/index.js
CHANGED
|
@@ -1 +1,178 @@
|
|
|
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), ["css"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.css), ["html"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.html), ["unsafeCSS"]: () => (__WEBPACK_EXTERNAL_MODULE_lit__.unsafeCSS) });
|
|
13
|
+
|
|
14
|
+
/***/ }),
|
|
15
|
+
|
|
16
|
+
/***/ 8853:
|
|
17
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
// EXPORTS
|
|
21
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
22
|
+
O: () => (/* binding */ TkPages)
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// EXTERNAL MODULE: external "lit"
|
|
26
|
+
var external_lit_ = __webpack_require__(2927);
|
|
27
|
+
// EXTERNAL MODULE: external "lit/decorators.js"
|
|
28
|
+
var decorators_js_ = __webpack_require__(8899);
|
|
29
|
+
;// ./tinkiet/pages/pages.scss
|
|
30
|
+
/* harmony default export */ const pages = ("*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box}");
|
|
31
|
+
;// ./tinkiet/pages/pages.ts
|
|
32
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
33
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
34
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
35
|
+
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;
|
|
36
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
let TkPages = class TkPages extends external_lit_.LitElement {
|
|
42
|
+
constructor() {
|
|
43
|
+
super(...arguments);
|
|
44
|
+
this._page = "";
|
|
45
|
+
this.selected = "";
|
|
46
|
+
this.handleScroll = false;
|
|
47
|
+
this.scrollHistory = {};
|
|
48
|
+
}
|
|
49
|
+
set page(val) {
|
|
50
|
+
let oldVal = this._page;
|
|
51
|
+
this._page = val;
|
|
52
|
+
if (oldVal && this.handleScroll) {
|
|
53
|
+
const el = this.querySelector(`[page=${oldVal}]`);
|
|
54
|
+
if (el) {
|
|
55
|
+
const scrollElement = document.scrollingElement || document.documentElement;
|
|
56
|
+
this.scrollHistory[oldVal] = scrollElement.scrollTop;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
this.requestUpdate("page", oldVal);
|
|
60
|
+
}
|
|
61
|
+
get page() {
|
|
62
|
+
return this._page;
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
return (0,external_lit_.html) `
|
|
66
|
+
<slot></slot>
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
69
|
+
updated(props) {
|
|
70
|
+
if (props.has("page")) {
|
|
71
|
+
this.querySelectorAll(":scope > *").forEach(el => {
|
|
72
|
+
var _a;
|
|
73
|
+
const elPageAttribute = (_a = el.getAttribute("page")) !== null && _a !== void 0 ? _a : "default";
|
|
74
|
+
const scrollElement = document.scrollingElement || document.documentElement;
|
|
75
|
+
if (elPageAttribute == this.page) {
|
|
76
|
+
el.removeAttribute("hidden");
|
|
77
|
+
if (this.selected != "") {
|
|
78
|
+
el.setAttribute(this.selected, "");
|
|
79
|
+
}
|
|
80
|
+
if (this.handleScroll && !el.hasAttribute("no-scroll")) {
|
|
81
|
+
scrollElement.scrollTop = this.scrollHistory[elPageAttribute] ? this.scrollHistory[elPageAttribute] : 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
el.setAttribute("hidden", "");
|
|
86
|
+
if (this.selected != "") {
|
|
87
|
+
el.removeAttribute(this.selected);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
TkPages.styles = (0,external_lit_.css) `
|
|
95
|
+
${(0,external_lit_.unsafeCSS)(pages)}
|
|
96
|
+
`;
|
|
97
|
+
__decorate([
|
|
98
|
+
(0,decorators_js_.property)({ attribute: "page", type: String })
|
|
99
|
+
], TkPages.prototype, "page", null);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0,decorators_js_.property)({ attribute: true, type: String })
|
|
102
|
+
], TkPages.prototype, "selected", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0,decorators_js_.property)({ attribute: "handle-scroll", type: Boolean })
|
|
105
|
+
], TkPages.prototype, "handleScroll", void 0);
|
|
106
|
+
TkPages = __decorate([
|
|
107
|
+
(0,decorators_js_.customElement)("tk-pages")
|
|
108
|
+
], TkPages);
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
/***/ }),
|
|
113
|
+
|
|
114
|
+
/***/ 8899:
|
|
115
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
116
|
+
|
|
117
|
+
var x = (y) => {
|
|
118
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
|
119
|
+
}
|
|
120
|
+
var y = (x) => (() => (x))
|
|
121
|
+
module.exports = x({ ["customElement"]: () => (__WEBPACK_EXTERNAL_MODULE_lit_decorators_js_226d44c5__.customElement), ["property"]: () => (__WEBPACK_EXTERNAL_MODULE_lit_decorators_js_226d44c5__.property) });
|
|
122
|
+
|
|
123
|
+
/***/ })
|
|
124
|
+
|
|
125
|
+
/******/ });
|
|
126
|
+
/************************************************************************/
|
|
127
|
+
/******/ // The module cache
|
|
128
|
+
/******/ var __webpack_module_cache__ = {};
|
|
129
|
+
/******/
|
|
130
|
+
/******/ // The require function
|
|
131
|
+
/******/ function __webpack_require__(moduleId) {
|
|
132
|
+
/******/ // Check if module is in cache
|
|
133
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
134
|
+
/******/ if (cachedModule !== undefined) {
|
|
135
|
+
/******/ return cachedModule.exports;
|
|
136
|
+
/******/ }
|
|
137
|
+
/******/ // Create a new module (and put it into the cache)
|
|
138
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
139
|
+
/******/ // no module.id needed
|
|
140
|
+
/******/ // no module.loaded needed
|
|
141
|
+
/******/ exports: {}
|
|
142
|
+
/******/ };
|
|
143
|
+
/******/
|
|
144
|
+
/******/ // Execute the module function
|
|
145
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
146
|
+
/******/
|
|
147
|
+
/******/ // Return the exports of the module
|
|
148
|
+
/******/ return module.exports;
|
|
149
|
+
/******/ }
|
|
150
|
+
/******/
|
|
151
|
+
/************************************************************************/
|
|
152
|
+
/******/ /* webpack/runtime/define property getters */
|
|
153
|
+
/******/ (() => {
|
|
154
|
+
/******/ // define getter functions for harmony exports
|
|
155
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
156
|
+
/******/ for(var key in definition) {
|
|
157
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
158
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
159
|
+
/******/ }
|
|
160
|
+
/******/ }
|
|
161
|
+
/******/ };
|
|
162
|
+
/******/ })();
|
|
163
|
+
/******/
|
|
164
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
165
|
+
/******/ (() => {
|
|
166
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
167
|
+
/******/ })();
|
|
168
|
+
/******/
|
|
169
|
+
/************************************************************************/
|
|
170
|
+
var __webpack_exports__ = {};
|
|
171
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
172
|
+
/* harmony export */ O: () => (/* reexport safe */ _pages__WEBPACK_IMPORTED_MODULE_0__.O)
|
|
173
|
+
/* harmony export */ });
|
|
174
|
+
/* harmony import */ var _pages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8853);
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
const __webpack_exports__TkPages = __webpack_exports__.O;
|
|
178
|
+
export { __webpack_exports__TkPages as TkPages };
|
package/pages/pages.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
declare class TkPages extends LitElement {
|
|
2
|
+
export declare class TkPages extends LitElement {
|
|
3
3
|
static styles: import("lit").CSSResult;
|
|
4
4
|
private _page;
|
|
5
5
|
set page(val: string);
|
|
@@ -7,7 +7,7 @@ declare class TkPages extends LitElement {
|
|
|
7
7
|
selected: string;
|
|
8
8
|
handleScroll: boolean;
|
|
9
9
|
private scrollHistory;
|
|
10
|
-
render(): import("lit
|
|
10
|
+
render(): import("lit").TemplateResult<1>;
|
|
11
11
|
updated(props: any): void;
|
|
12
12
|
}
|
|
13
13
|
declare global {
|
|
@@ -15,4 +15,3 @@ declare global {
|
|
|
15
15
|
"tk-pages": TkPages;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
export { TkPages };
|
package/radio/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./radio
|
|
1
|
+
export * from "./radio";
|