wj-elements 0.0.2 → 0.0.4
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/dist/router-links-e0087f84.js +146 -0
- package/dist/style.css +2 -2365
- package/dist/wj-aside.js +18 -22
- package/dist/wj-avatar.js +32 -49
- package/dist/wj-badge.js +18 -22
- package/dist/wj-breadcrumb.js +53 -103
- package/dist/wj-breadcrumbs.js +21 -36
- package/dist/wj-button-group.js +24 -36
- package/dist/wj-button.js +37 -80
- package/dist/wj-card-content.js +16 -18
- package/dist/wj-card-controls.js +16 -18
- package/dist/wj-card-header.js +16 -20
- package/dist/wj-card-subtitle.js +17 -19
- package/dist/wj-card-title.js +16 -18
- package/dist/wj-card.js +16 -20
- package/dist/wj-checkbox.js +24 -46
- package/dist/wj-chip.js +21 -39
- package/dist/wj-col.js +18 -32
- package/dist/wj-color-picker.js +503 -868
- package/dist/wj-container.js +18 -20
- package/dist/wj-copy-button.js +66 -112
- package/dist/wj-dialog.js +43 -67
- package/dist/wj-divider.js +16 -20
- package/dist/wj-dropdown.js +22 -31
- package/dist/wj-element.js +241 -416
- package/dist/wj-footer.js +16 -18
- package/dist/wj-form.js +16 -18
- package/dist/wj-grid.js +17 -21
- package/dist/wj-header.js +18 -22
- package/dist/wj-icon-picker.js +66 -107
- package/dist/wj-icon.js +67 -140
- package/dist/wj-img-comparer.js +43 -72
- package/dist/wj-img.js +21 -31
- package/dist/wj-infinite-scroll.js +49 -84
- package/dist/wj-input.js +67 -146
- package/dist/wj-item.js +19 -34
- package/dist/wj-label.js +19 -21
- package/dist/wj-list.js +17 -20
- package/dist/wj-main.js +16 -18
- package/dist/wj-master.js +331 -462
- package/dist/wj-menu-button.js +18 -21
- package/dist/wj-menu-item.js +67 -144
- package/dist/wj-menu-label.js +17 -21
- package/dist/wj-menu.js +20 -24
- package/dist/wj-popup.js +714 -1140
- package/dist/wj-progress-bar.js +42 -100
- package/dist/wj-radio-group.js +27 -38
- package/dist/wj-radio.js +24 -46
- package/dist/wj-route.js +8 -11
- package/dist/wj-router-link.js +19 -22
- package/dist/wj-router-outlet.js +71 -135
- package/dist/wj-routerx.js +641 -1121
- package/dist/wj-row.js +20 -22
- package/dist/wj-slider.js +55 -97
- package/dist/wj-split-view.js +45 -81
- package/dist/wj-store.js +110 -195
- package/dist/wj-textarea.js +39 -86
- package/dist/wj-thumbnail.js +17 -19
- package/dist/wj-toast.js +34 -88
- package/dist/wj-toggle.js +24 -42
- package/dist/wj-toolbar-action.js +16 -27
- package/dist/wj-toolbar.js +21 -26
- package/dist/wj-tooltip.js +27 -41
- package/dist/wj-visually-hidden.js +16 -18
- package/package.json +1 -1
- package/dist/router-links-26e4a166.js +0 -204
package/dist/wj-toast.js
CHANGED
|
@@ -1,113 +1,59 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import WJElement from "./wj-element.js";
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var c = (i, t, e) => t in i ? d(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var p = (i, t, e) => (c(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import m from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
notification.classList.add("pgn-flip");
|
|
18
|
-
alert.innerHTML = "<span>" + options.message + "</span>";
|
|
19
|
-
if (options.showClose) {
|
|
20
|
-
alert.appendChild(close());
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const circle = (notification, alert, options) => {
|
|
24
|
-
notification.classList.add("pgn-circle");
|
|
25
|
-
let title = "";
|
|
26
|
-
let message = "";
|
|
27
|
-
if (options.title)
|
|
28
|
-
title = `<p><b>${options.title}</b></p>`;
|
|
29
|
-
if (options.message)
|
|
30
|
-
message = `<p>${options.message}</p>`;
|
|
31
|
-
alert.innerHTML = `<wj-avatar>
|
|
6
|
+
const l = (i, t, e) => {
|
|
7
|
+
i.classList.add("pgn-simple"), t.innerHTML = "<div>" + e.message + "</div>", e.showClose && t.appendChild(a());
|
|
8
|
+
}, f = (i, t, e) => {
|
|
9
|
+
i.classList.add("pgn-flip"), t.innerHTML = "<span>" + e.message + "</span>", e.showClose && t.appendChild(a());
|
|
10
|
+
}, b = (i, t, e) => {
|
|
11
|
+
i.classList.add("pgn-circle");
|
|
12
|
+
let r = "", n = "";
|
|
13
|
+
e.title && (r = `<p><b>${e.title}</b></p>`), e.message && (n = `<p>${e.message}</p>`), t.innerHTML = `<wj-avatar>
|
|
32
14
|
<img alt="Silhouette of a person's head" src="/assets/img/avatar.svg" />
|
|
33
15
|
</wj-avatar>
|
|
34
16
|
<div>
|
|
35
|
-
${
|
|
36
|
-
</div
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const close = () => {
|
|
50
|
-
let icon = document.createElement("wj-icon");
|
|
51
|
-
icon.setAttribute("name", "x");
|
|
52
|
-
icon.setAttribute("slot", "icon-only");
|
|
53
|
-
let close2 = document.createElement("wj-button");
|
|
54
|
-
close2.setAttribute("fill", "link");
|
|
55
|
-
close2.setAttribute("size", "small");
|
|
56
|
-
close2.classList.add("close");
|
|
57
|
-
close2.appendChild(icon);
|
|
58
|
-
return close2;
|
|
59
|
-
};
|
|
60
|
-
const styles = "/*!\n* direction.scss\n*/\n/* Skeleton Variables */\n/*\n[ TOAST ]\n*/\n:host {\n position: fixed;\n z-index: 999;\n}\n:host([data-position$=-left]) {\n left: 0;\n}\n:host([data-position$=-right]) {\n right: 0;\n}\n:host([data-position^=top-]) {\n top: 0;\n}\n:host([data-position^=bottom-]) {\n bottom: 0;\n}\n:host([data-position=top]) {\n top: 0;\n left: 0;\n right: 0;\n}\n:host([data-position=bottom]) {\n bottom: 0;\n left: 0;\n right: 0;\n}\n.pgn {\n position: relative;\n margin: 10px;\n}\n.pgn .alert {\n margin: 0;\n margin-bottom: 4px;\n}\n/* Simple\n------------------------------------\n*/\n.pgn-simple .alert {\n padding-top: 13px;\n padding-bottom: 13px;\n max-width: 500px;\n animation: fadeIn 0.3s cubic-bezier(0.05, 0.74, 0.27, 0.99) forwards;\n -webkit-animation: fadeIn 0.3s cubic-bezier(0.05, 0.74, 0.27, 0.99) forwards;\n max-height: 250px;\n overflow: hidden;\n}\n/* Bar\n------------------------------------\n*/\n.pgn-bar {\n overflow: hidden;\n margin: 0;\n}\n.pgn-bar .alert {\n border-radius: 0;\n padding-top: 13px;\n padding-bottom: 13px;\n max-height: 91px;\n}\n:host([data-position=top]) .pgn-bar .alert {\n animation: slideInFromTop 0.5s cubic-bezier(0.05, 0.74, 0.27, 0.99) forwards;\n -webkit-animation: slideInFromTop 0.5s cubic-bezier(0.05, 0.74, 0.27, 0.99) forwards;\n transform-origin: top left;\n -webkit-transform-origin: top left;\n}\n:host([data-position=bottom]) .pgn-bar .alert {\n animation: slideInFromBottom 0.5s cubic-bezier(0.05, 0.74, 0.27, 0.99) forwards;\n -webkit-animation: slideInFromBottom 0.5s cubic-bezier(0.05, 0.74, 0.27, 0.99) forwards;\n transform-origin: bottom left;\n -webkit-transform-origin: bottom left;\n}\n.pgn-bar .alert span {\n opacity: 0;\n animation: fadeIn 0.3s cubic-bezier(0.05, 0.74, 0.27, 0.99) forwards;\n -webkit-animation: fadeIn 0.3s cubic-bezier(0.05, 0.74, 0.27, 0.99) forwards;\n}\n@keyframes slideInFromTop {\n 0% {\n transform: translateY(-100%);\n }\n 100% {\n transform: translateY(0);\n }\n}\n@-webkit-keyframes slideInFromTop {\n 0% {\n -webkit-transform: translateY(-100%);\n }\n 100% {\n -webkit-transform: translateY(0);\n }\n}\n@keyframes slideInFromBottom {\n 0% {\n transform: translateY(100%);\n }\n 100% {\n transform: translateY(0);\n }\n}\n@-webkit-keyframes slideInFromBottom {\n 0% {\n -webkit-transform: translateY(100%);\n }\n 100% {\n -webkit-transform: translateY(0);\n }\n}\n/* Circle\n------------------------------------\n*/\n.pgn-circle .alert {\n margin-bottom: 10px;\n border-radius: 300px;\n animation: fadeInCircle 0.3s ease forwards, resizeCircle 0.3s 0.4s cubic-bezier(0.25, 0.25, 0.4, 1.6) forwards;\n -webkit-animation: fadeInCircle 0.3s ease forwards, resizeCircle 0.3s 0.4s cubic-bezier(0.25, 0.25, 0.4, 1.6) forwards;\n height: 48px;\n overflow: hidden;\n padding: 6px 55px 6px 6px;\n -webkit-transform: translateZ(0);\n position: relative;\n display: flex;\n}\n:host[data-position$=-right] .pgn-circle .alert {\n float: right;\n}\n:host[data-position$=-left] .pgn-circle .alert {\n float: left;\n}\n:host[data-position^=bottom-] .pgn-circle .alert {\n margin-bottom: 20px;\n}\nwj-avatar:first-child {\n margin-right: 8px;\n}\n.pgn-circle .alert .close {\n margin-top: -12px;\n position: absolute;\n right: 18px;\n top: 50%;\n opacity: 0;\n animation: fadeIn 0.3s 0.5s ease forwards;\n -webkit-animation: fadeIn 0.3s 0.5s ease forwards;\n}\n.pgn-circle .alert p {\n margin: 0;\n}\n.pgn-circle .alert > div {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n.pgn-circle .alert > div > div {\n display: table-cell;\n vertical-align: middle;\n}\n@keyframes fadeInCircle {\n 0% {\n opacity: 0;\n width: 60px;\n }\n 100% {\n opacity: 1;\n width: 60px;\n }\n}\n@-webkit-keyframes fadeInCircle {\n 0% {\n opacity: 0;\n width: 60px;\n }\n 100% {\n opacity: 1;\n width: 60px;\n }\n}\n@keyframes resizeCircle {\n 0% {\n width: 60px;\n }\n 100% {\n width: 300px;\n }\n}\n@-webkit-keyframes resizeCircle {\n 0% {\n width: 60px;\n }\n 100% {\n width: 300px;\n }\n}\n/* Flip\n------------------------------------\n*/\n:host[data-position^=bottom-] .pgn-flip .alert {\n -webkit-transform-origin: 50% 100%;\n transform-origin: 50% 100%;\n}\n.pgn-flip .alert {\n -webkit-transform-origin: 50% 0%;\n transform-origin: 50% 0%;\n -webkit-animation-name: flipInX;\n animation-name: flipInX;\n -webkit-animation-duration: 0.8s;\n animation-duration: 0.8s;\n border-radius: 0;\n padding: 25px 35px;\n max-width: 500px;\n max-height: 250px;\n overflow: hidden;\n}\n@-webkit-keyframes flipInX {\n 0% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg);\n -webkit-transition-timing-function: ease-in;\n }\n 40% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg);\n -webkit-transition-timing-function: ease-out;\n }\n 60% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -10deg);\n -webkit-transition-timing-function: ease-in;\n opacity: 1;\n }\n 80% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg);\n -webkit-transition-timing-function: ease-out;\n }\n 100% {\n -webkit-transform: perspective(400px);\n }\n}\n@keyframes flipInX {\n 0% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -90deg);\n -webkit-transition-timing-function: ease-in;\n transition-timing-function: ease-in;\n }\n 40% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 20deg);\n -webkit-transition-timing-function: ease-out;\n transition-timing-function: ease-out;\n }\n 60% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -10deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -10deg);\n -webkit-transition-timing-function: ease-in;\n transition-timing-function: ease-in;\n opacity: 1;\n }\n 80% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 5deg);\n -webkit-transition-timing-function: ease-out;\n transition-timing-function: ease-out;\n }\n 100% {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n}\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@-webkit-keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n/* Pages Notification customizations */\n:host([data-position=top]) {\n top: 60px;\n left: 0;\n}\n:host([data-position=bottom]) {\n left: 0;\n}\n:host([data-position$=-left]) {\n left: 0;\n right: auto;\n}\n:host([data-position^=top-]) {\n bottom: auto;\n}\n:host {\n z-index: 900;\n}\n@media (max-width: 979px) {\n body .pgn-wrapper[data-position=top] {\n left: 0 !important;\n }\n body .pgn-wrapper[data-position=bottom] {\n left: 0 !important;\n }\n}\n@media (max-width: 767px) {\n body .pgn-wrapper[data-position$=-left],\n body .pgn-wrapper[data-position$=-right] {\n left: 10px !important;\n right: 10px !important;\n }\n body .pgn-wrapper[data-position$=-right] .alert,\n body .pgn-wrapper[data-position$=-left] .alert {\n max-width: 100%;\n width: 100%;\n }\n}\n.alert {\n background-image: none;\n box-shadow: none;\n text-shadow: none;\n padding: 9px 19px 9px 15px;\n border-radius: 3px;\n font-size: 13px;\n border-width: 0;\n -webkit-transition: all 0.2s linear 0s;\n transition: all 0.2s linear 0s;\n display: flex;\n align-items: center;\n}\n.alert.bordered {\n border-width: 1px;\n}\n.alert .link {\n color: #ce8f22;\n font-weight: bold;\n}\n.alert .alert-heading {\n color: #ce8f22 !important;\n margin-bottom: 5px;\n font-weight: 600;\n}\n.alert .btn-small {\n position: relative;\n top: -3.5px;\n}\n.alert .button-set .btn {\n position: relative;\n top: 8px;\n}\n/* Alert : Color Options\n------------------------------------\n*/\n.alert-danger,\n.alert-error,\n.alert-danger.btn,\n.alert-error.btn {\n background-color: #fde2da !important;\n color: #900f17 !important;\n border-color: rgba(144, 15, 23, 0.24) !important;\n}\n.alert-danger .close,\n.alert-error .close,\n.alert-danger.btn .close,\n.alert-error.btn .close {\n background-position: -95px -10px !important;\n}\n.alert-warning {\n background-color: #fffde1;\n color: #aa7918;\n border-color: rgba(170, 121, 24, 0.24);\n}\n.alert-info {\n background-color: #d3eeff;\n color: #00318e;\n border-color: rgba(0, 49, 142, 0.24);\n}\n.alert-info .close {\n background-position: -67px -10px !important;\n}\n.alert-success, .alert-success.btn {\n background-color: #d6f7f0 !important;\n color: #04733e !important;\n border-color: rgba(4, 115, 62, 0.24) !important;\n}\n.alert-success .close, .alert-success.btn .close {\n background-position: -38px -10px !important;\n}\n.alert-default {\n background-color: #fff;\n color: #4b4b4b;\n border-color: #e0e0e0;\n}\n.alert-default .close {\n background-position: -67px -10px !important;\n}";
|
|
61
|
-
class Toast extends WJElement {
|
|
17
|
+
${r + n}
|
|
18
|
+
</div>`, e.showClose && t.appendChild(a());
|
|
19
|
+
}, g = (i, t, e) => {
|
|
20
|
+
i.classList.add("pgn-bar"), t.classList.add("alert-" + e.type), t.innerHTML = "<div>" + e.message + "</div>", e.showClose && t.appendChild(a());
|
|
21
|
+
}, a = () => {
|
|
22
|
+
let i = document.createElement("wj-icon");
|
|
23
|
+
i.setAttribute("name", "x"), i.setAttribute("slot", "icon-only");
|
|
24
|
+
let t = document.createElement("wj-button");
|
|
25
|
+
return t.setAttribute("fill", "link"), t.setAttribute("size", "small"), t.classList.add("close"), t.appendChild(i), t;
|
|
26
|
+
}, h = `/*!
|
|
27
|
+
* direction.scss
|
|
28
|
+
*/:host{position:fixed;z-index:999}:host([data-position$=-left]){left:0}:host([data-position$=-right]){right:0}:host([data-position^=top-]){top:0}:host([data-position^=bottom-]){bottom:0}:host([data-position=top]){top:0;left:0;right:0}:host([data-position=bottom]){bottom:0;left:0;right:0}.pgn{position:relative;margin:10px}.pgn .alert{margin:0 0 4px}.pgn-simple .alert{padding-top:13px;padding-bottom:13px;max-width:500px;animation:fadeIn .3s cubic-bezier(.05,.74,.27,.99) forwards;-webkit-animation:fadeIn .3s cubic-bezier(.05,.74,.27,.99) forwards;max-height:250px;overflow:hidden}.pgn-bar{overflow:hidden;margin:0}.pgn-bar .alert{border-radius:0;padding-top:13px;padding-bottom:13px;max-height:91px}:host([data-position=top]) .pgn-bar .alert{animation:slideInFromTop .5s cubic-bezier(.05,.74,.27,.99) forwards;-webkit-animation:slideInFromTop .5s cubic-bezier(.05,.74,.27,.99) forwards;transform-origin:top left;-webkit-transform-origin:top left}:host([data-position=bottom]) .pgn-bar .alert{animation:slideInFromBottom .5s cubic-bezier(.05,.74,.27,.99) forwards;-webkit-animation:slideInFromBottom .5s cubic-bezier(.05,.74,.27,.99) forwards;transform-origin:bottom left;-webkit-transform-origin:bottom left}.pgn-bar .alert span{opacity:0;animation:fadeIn .3s cubic-bezier(.05,.74,.27,.99) forwards;-webkit-animation:fadeIn .3s cubic-bezier(.05,.74,.27,.99) forwards}@keyframes slideInFromTop{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@-webkit-keyframes slideInFromTop{0%{-webkit-transform:translateY(-100%)}to{-webkit-transform:translateY(0)}}@keyframes slideInFromBottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes slideInFromBottom{0%{-webkit-transform:translateY(100%)}to{-webkit-transform:translateY(0)}}.pgn-circle .alert{margin-bottom:10px;border-radius:300px;animation:fadeInCircle .3s ease forwards,resizeCircle .3s .4s cubic-bezier(.25,.25,.4,1.6) forwards;-webkit-animation:fadeInCircle .3s ease forwards,resizeCircle .3s .4s cubic-bezier(.25,.25,.4,1.6) forwards;height:48px;overflow:hidden;padding:6px 55px 6px 6px;-webkit-transform:translateZ(0);position:relative;display:flex}:host[data-position$=-right] .pgn-circle .alert{float:right}:host[data-position$=-left] .pgn-circle .alert{float:left}:host[data-position^=bottom-] .pgn-circle .alert{margin-bottom:20px}wj-avatar:first-child{margin-right:8px}.pgn-circle .alert .close{margin-top:-12px;position:absolute;right:18px;top:50%;opacity:0;animation:fadeIn .3s .5s ease forwards;-webkit-animation:fadeIn .3s .5s ease forwards}.pgn-circle .alert p{margin:0}.pgn-circle .alert>div{display:flex;flex-direction:column;justify-content:center}.pgn-circle .alert>div>div{display:table-cell;vertical-align:middle}@keyframes fadeInCircle{0%{opacity:0;width:60px}to{opacity:1;width:60px}}@-webkit-keyframes fadeInCircle{0%{opacity:0;width:60px}to{opacity:1;width:60px}}@keyframes resizeCircle{0%{width:60px}to{width:300px}}@-webkit-keyframes resizeCircle{0%{width:60px}to{width:300px}}:host[data-position^=bottom-] .pgn-flip .alert{-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.pgn-flip .alert{-webkit-transform-origin:50% 0%;transform-origin:50% 0%;-webkit-animation-name:flipInX;animation-name:flipInX;-webkit-animation-duration:.8s;animation-duration:.8s;border-radius:0;padding:25px 35px;max-width:500px;max-height:250px;overflow:hidden}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);-webkit-transition-timing-function:ease-in}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);-webkit-transition-timing-function:ease-out}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-10deg);-webkit-transition-timing-function:ease-in;opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,5deg);-webkit-transition-timing-function:ease-out}to{-webkit-transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotateX(-90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotateX(20deg);-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-10deg);transform:perspective(400px) rotateX(-10deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,5deg);transform:perspective(400px) rotateX(5deg);-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}:host([data-position=top]){top:60px;left:0}:host([data-position=bottom]){left:0}:host([data-position$=-left]){left:0;right:auto}:host([data-position^=top-]){bottom:auto}:host{z-index:900}@media (max-width: 979px){body .pgn-wrapper[data-position=top],body .pgn-wrapper[data-position=bottom]{left:0!important}}@media (max-width: 767px){body .pgn-wrapper[data-position$=-left],body .pgn-wrapper[data-position$=-right]{left:10px!important;right:10px!important}body .pgn-wrapper[data-position$=-right] .alert,body .pgn-wrapper[data-position$=-left] .alert{max-width:100%;width:100%}}.alert{background-image:none;box-shadow:none;text-shadow:none;padding:9px 19px 9px 15px;border-radius:3px;font-size:13px;border-width:0;-webkit-transition:all .2s linear 0s;transition:all .2s linear 0s;display:flex;align-items:center}.alert.bordered{border-width:1px}.alert .link{color:#ce8f22;font-weight:700}.alert .alert-heading{color:#ce8f22!important;margin-bottom:5px;font-weight:600}.alert .btn-small{position:relative;top:-3.5px}.alert .button-set .btn{position:relative;top:8px}.alert-danger,.alert-error,.alert-danger.btn,.alert-error.btn{background-color:#fde2da!important;color:#900f17!important;border-color:#900f173d!important}.alert-danger .close,.alert-error .close,.alert-danger.btn .close,.alert-error.btn .close{background-position:-95px -10px!important}.alert-warning{background-color:#fffde1;color:#aa7918;border-color:#aa79183d}.alert-info{background-color:#d3eeff;color:#00318e;border-color:#00318e3d}.alert-info .close{background-position:-67px -10px!important}.alert-success,.alert-success.btn{background-color:#d6f7f0!important;color:#04733e!important;border-color:#04733e3d!important}.alert-success .close,.alert-success.btn .close{background-position:-38px -10px!important}.alert-default{background-color:#fff;color:#4b4b4b;border-color:#e0e0e0}.alert-default .close{background-position:-67px -10px!important}
|
|
29
|
+
`;
|
|
30
|
+
class w extends m {
|
|
62
31
|
constructor() {
|
|
63
32
|
super();
|
|
64
|
-
|
|
33
|
+
p(this, "className", "Toast");
|
|
65
34
|
}
|
|
66
35
|
static get cssStyleSheet() {
|
|
67
|
-
return
|
|
36
|
+
return h;
|
|
68
37
|
}
|
|
69
38
|
setupAttributes() {
|
|
70
39
|
this.isShadowRoot = "open";
|
|
71
40
|
}
|
|
72
|
-
draw(
|
|
73
|
-
let
|
|
74
|
-
let options = {
|
|
41
|
+
draw(e, r, n) {
|
|
42
|
+
let s = document.createDocumentFragment(), o = {
|
|
75
43
|
message: "Záznam bol úspešne uložený.",
|
|
76
44
|
// onClosed: function onClosed(),
|
|
77
45
|
// onShown: function onShown(),
|
|
78
46
|
position: this.position,
|
|
79
|
-
showClose:
|
|
47
|
+
showClose: !0,
|
|
80
48
|
style: this.design || "simple",
|
|
81
49
|
timeout: this.duration || 4e3,
|
|
82
50
|
type: this.type || "success",
|
|
83
51
|
title: this.title || "John Doe"
|
|
84
52
|
};
|
|
85
|
-
this.container = document.querySelector("body");
|
|
86
|
-
this.notification = document.createElement("div");
|
|
87
|
-
this.notification.classList.add("pgn", "push-on-sidebar-open");
|
|
88
|
-
this.classList.add("pgn-wrapper");
|
|
89
|
-
this.setAttribute("data-position", options.position);
|
|
90
|
-
this.alert = document.createElement("div");
|
|
91
|
-
this.alert.classList.add("alert");
|
|
92
|
-
this.alert.classList.add("alert-" + options.type);
|
|
93
|
-
if (options.style == "bar") {
|
|
94
|
-
bar(this.notification, this.alert, options);
|
|
95
|
-
} else if (options.style == "flip") {
|
|
96
|
-
flip(this.notification, this.alert, options);
|
|
97
|
-
} else if (options.style == "circle") {
|
|
98
|
-
circle(this.notification, this.alert, options);
|
|
99
|
-
} else if (options.style == "simple") {
|
|
100
|
-
simple(this.notification, this.alert, options);
|
|
101
|
-
} else {
|
|
102
|
-
simple(this.notification, this.alert, options);
|
|
103
|
-
}
|
|
104
|
-
console.log("alert", this.alert);
|
|
105
|
-
this.notification.appendChild(this.alert);
|
|
106
|
-
fragment.appendChild(this.notification);
|
|
107
|
-
return fragment;
|
|
53
|
+
return this.container = document.querySelector("body"), this.notification = document.createElement("div"), this.notification.classList.add("pgn", "push-on-sidebar-open"), this.classList.add("pgn-wrapper"), this.setAttribute("data-position", o.position), this.alert = document.createElement("div"), this.alert.classList.add("alert"), this.alert.classList.add("alert-" + o.type), o.style == "bar" ? g(this.notification, this.alert, o) : o.style == "flip" ? f(this.notification, this.alert, o) : o.style == "circle" ? b(this.notification, this.alert, o) : o.style == "simple" ? l(this.notification, this.alert, o) : l(this.notification, this.alert, o), console.log("alert", this.alert), this.notification.appendChild(this.alert), s.appendChild(this.notification), s;
|
|
108
54
|
}
|
|
109
55
|
}
|
|
110
|
-
customElements.get("wj-toast") || window.customElements.define("wj-toast",
|
|
56
|
+
customElements.get("wj-toast") || window.customElements.define("wj-toast", w);
|
|
111
57
|
export {
|
|
112
|
-
Toast
|
|
58
|
+
w as Toast
|
|
113
59
|
};
|
package/dist/wj-toggle.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import WJElement from "./wj-element.js";
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var g = (o, e, r) => e in o ? d(o, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[e] = r;
|
|
3
|
+
var c = (o, e, r) => (g(o, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
+
import b from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
6
|
+
const p = `/*!
|
|
7
|
+
* direction.scss
|
|
8
|
+
*/:host(.wj-color-primary){--wj-toggle-color-base: linear-gradient(to right, #7252D3 0%, #845ae0 44%, rgba(0, 0, 0, .14) 62%, rgba(0, 0, 0, .04) 97%)}:host(.wj-color-complete){--wj-toggle-color-base: linear-gradient(to right, #0072EC 0%, #0f8ff9 44%, rgba(0, 0, 0, .14) 62%, rgba(0, 0, 0, .04) 97%)}:host(.wj-color-success){--wj-toggle-color-base: linear-gradient(to right, #19AD79 0%, #26bf93 44%, rgba(0, 0, 0, .14) 62%, rgba(0, 0, 0, .04) 97%) !important}:host(.wj-color-warning){--wj-toggle-color-base: linear-gradient(to right, #FFd945 0%, #ffe858 44%, rgba(0, 0, 0, .14) 62%, rgba(0, 0, 0, .04) 97%)}:host(.wj-color-danger){--wj-toggle-color-base: linear-gradient(to right, #D83C31 0%, #e6533c 44%, rgba(0, 0, 0, .14) 62%, rgba(0, 0, 0, .04) 97%)}:host(.wj-color-dark){--wj-toggle-color-base: linear-gradient(to right, #3B4752 0%, #475b6b 44%, rgba(0, 0, 0, .14) 62%, rgba(0, 0, 0, .04) 97%)}:host{--wj-toggle-color-base: $color-contrast-lowest;--wj-toggle-width: 30px;--wj-toggle-height: 18px;--wj-toggle-border-radius: 50px;--wj-toggle-handle-width: 14px;--wj-toggle-handle-height: 14px;--wj-toggle-handle-border-radius: 9px;--wj-toggle-handle-color: #fff;--wj-toggle-handle-shadow: 1px 0 1px .5px rgba(0,0,0,.12), 2px 4px 6px rgba(0,0,0,.2);--wj-toggle-handle-shadow-checked: 1px 1px 0 rgba(0,0,0,.08), -3px 3px 6px rgba(0,0,0,.3)}.native-toggle{display:flex}label{display:flex;cursor:pointer;align-items:center;-webkit-user-select:none;user-select:none}label .label-wrapper{width:var(--wj-toggle-width);height:var(--wj-toggle-height);position:relative;display:flex;align-items:center}label .label-wrapper:before{content:"";position:absolute;cursor:pointer;width:100%;height:100%;top:auto;left:0;background:var(--wj-toggle-color-base);background-size:300%;background-position:right;border-radius:var(--wj-toggle-border-radius);border:none;box-shadow:inset 0 0 0 1px #0000001f;transition:background .31s,box-shadow .25s;transition-timing-function:cubic-bezier(.4,0,.2,1)}label .label-wrapper:after{content:"";position:absolute;transform:translate(0);background:var(--wj-toggle-handle-color);width:var(--wj-toggle-handle-width);height:var(--wj-toggle-handle-height);border-radius:var(--wj-toggle-handle-border-radius);top:auto;left:2px;box-shadow:var(--wj-toggle-handle-shadow);transition:transform,box-shadow;transition-duration:.25s;transition-timing-function:cubic-bezier(.4,0,.2,1)}input[type=checkbox][disabled]+label{cursor:not-allowed!important;color:#4b4b4b;opacity:.58}input[type=checkbox][disabled]+label:before{cursor:not-allowed!important}input[type=checkbox]{position:absolute;z-index:-1;opacity:0}input[type=checkbox]:checked+label .label-wrapper:before{background-position:left;box-shadow:inset 0 0 0 1px #0000001f}input[type=checkbox]:checked+label .label-wrapper:after{transform:translate(calc(var(--wj-toggle-width) - var(--wj-toggle-handle-width) - 4px));box-shadow:var(--wj-toggle-handle-shadow-checked)}input[type=checkbox]:focus+label .label-wrapper:before{outline:none!important;box-shadow:inset 0 0 0 1px #0000001f,0 0 #78c8fe}input[type=checkbox][disabled]:active+label .label-wrapper:after{transform:scaleX(1.1);transform-origin:center left;transition:transform step-start}input[type=checkbox]:checked[disabled]:active+label .label-wrapper:after{transform:translate(calc(100% - 6px)) scaleX(1.1);transform-origin:center right}input[type=checkbox]:hover:active+label .label-wrapper:before{background-color:transparent}:host .text{margin-inline:.5rem 0}
|
|
9
|
+
`;
|
|
10
|
+
class h extends b {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
|
-
|
|
13
|
+
c(this, "className", "Toggle");
|
|
14
14
|
}
|
|
15
15
|
get disabled() {
|
|
16
16
|
return this.hasAttribute("disabled");
|
|
@@ -19,43 +19,25 @@ class Toggle extends WJElement {
|
|
|
19
19
|
return this.hasAttribute("checked");
|
|
20
20
|
}
|
|
21
21
|
static get cssStyleSheet() {
|
|
22
|
-
return
|
|
22
|
+
return p;
|
|
23
23
|
}
|
|
24
24
|
setupAttributes() {
|
|
25
25
|
this.isShadowRoot = "open";
|
|
26
26
|
}
|
|
27
|
-
draw(
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
let
|
|
37
|
-
|
|
38
|
-
let labelWrapper = document.createElement("div");
|
|
39
|
-
labelWrapper.setAttribute("part", "toggle");
|
|
40
|
-
labelWrapper.classList.add("label-wrapper");
|
|
41
|
-
let text = document.createElement("div");
|
|
42
|
-
text.classList.add("text");
|
|
43
|
-
text.innerHTML = "<slot></slot>";
|
|
44
|
-
if (this.color)
|
|
45
|
-
this.classList.add("wj-color-" + this.color, "wj-color");
|
|
46
|
-
if (this.checked)
|
|
47
|
-
input.checked = this.checked;
|
|
48
|
-
if (this.disabled)
|
|
49
|
-
input.disabled = this.disabled;
|
|
50
|
-
element.appendChild(input);
|
|
51
|
-
element.appendChild(label);
|
|
52
|
-
label.appendChild(labelWrapper);
|
|
53
|
-
label.appendChild(text);
|
|
54
|
-
fragment.appendChild(element);
|
|
55
|
-
return fragment;
|
|
27
|
+
draw(r, w, u) {
|
|
28
|
+
let s = document.createDocumentFragment(), a = document.createElement("div");
|
|
29
|
+
a.classList.add("native-toggle");
|
|
30
|
+
let t = document.createElement("input");
|
|
31
|
+
t.setAttribute("part", "input"), t.setAttribute("type", "checkbox"), t.setAttribute("name", this.name), t.setAttribute("id", "input");
|
|
32
|
+
let l = document.createElement("label");
|
|
33
|
+
l.setAttribute("for", "input");
|
|
34
|
+
let i = document.createElement("div");
|
|
35
|
+
i.setAttribute("part", "toggle"), i.classList.add("label-wrapper");
|
|
36
|
+
let n = document.createElement("div");
|
|
37
|
+
return n.classList.add("text"), n.innerHTML = "<slot></slot>", this.color && this.classList.add("wj-color-" + this.color, "wj-color"), this.checked && (t.checked = this.checked), this.disabled && (t.disabled = this.disabled), a.appendChild(t), a.appendChild(l), l.appendChild(i), l.appendChild(n), s.appendChild(a), s;
|
|
56
38
|
}
|
|
57
39
|
}
|
|
58
|
-
customElements.get("wj-toggle") || window.customElements.define("wj-toggle",
|
|
40
|
+
customElements.get("wj-toggle") || window.customElements.define("wj-toggle", h);
|
|
59
41
|
export {
|
|
60
|
-
Toggle
|
|
42
|
+
h as Toggle
|
|
61
43
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import WJElement from "./wj-element.js";
|
|
1
|
+
var i = Object.defineProperty;
|
|
2
|
+
var m = (e, t, o) => t in e ? i(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
+
var l = (e, t, o) => (m(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
4
|
+
import d from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
6
|
+
const u = `/*!
|
|
7
|
+
* direction.scss
|
|
8
|
+
*/:host .native-toolbar-action{display:flex}
|
|
9
|
+
`;
|
|
10
|
+
class p extends d {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
|
-
|
|
13
|
+
l(this, "className", "ToolbarAction");
|
|
14
14
|
}
|
|
15
15
|
static get cssStyleSheet() {
|
|
16
|
-
return
|
|
16
|
+
return u;
|
|
17
17
|
}
|
|
18
18
|
static get observedAttributes() {
|
|
19
19
|
return [];
|
|
@@ -21,26 +21,15 @@ class ToolbarAction extends WJElement {
|
|
|
21
21
|
setupAttributes() {
|
|
22
22
|
this.isShadowRoot = "open";
|
|
23
23
|
}
|
|
24
|
-
draw(
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
let actions = this.getActions();
|
|
28
|
-
let slot = document.createElement("slot");
|
|
29
|
-
let element = document.createElement("div");
|
|
30
|
-
element.classList.add("native-toolbar-action");
|
|
31
|
-
const shouldCollapse = maxItems !== 0 && actions.length > maxItems;
|
|
32
|
-
if (shouldCollapse) {
|
|
33
|
-
element = document.createElement("wj-dropdown");
|
|
34
|
-
}
|
|
35
|
-
element.appendChild(slot);
|
|
36
|
-
fragment.appendChild(element);
|
|
37
|
-
return fragment;
|
|
24
|
+
draw(o, h, b) {
|
|
25
|
+
let n = document.createDocumentFragment(), r = +this.maxItems || 0, a = this.getActions(), c = document.createElement("slot"), s = document.createElement("div");
|
|
26
|
+
return s.classList.add("native-toolbar-action"), r !== 0 && a.length > r && (s = document.createElement("wj-dropdown")), s.appendChild(c), n.appendChild(s), n;
|
|
38
27
|
}
|
|
39
28
|
getActions() {
|
|
40
29
|
return Array.from(this.querySelectorAll("wj-button"));
|
|
41
30
|
}
|
|
42
31
|
}
|
|
43
|
-
customElements.get("wj-toolbar-action") || window.customElements.define("wj-toolbar-action",
|
|
32
|
+
customElements.get("wj-toolbar-action") || window.customElements.define("wj-toolbar-action", p);
|
|
44
33
|
export {
|
|
45
|
-
ToolbarAction
|
|
34
|
+
p as ToolbarAction
|
|
46
35
|
};
|
package/dist/wj-toolbar.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import WJElement from "./wj-element.js";
|
|
8
|
-
import { w as withRouterLinks } from "./router-links-26e4a166.js";
|
|
1
|
+
var s = Object.defineProperty;
|
|
2
|
+
var d = (o, t, e) => t in o ? s(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
3
|
+
var l = (o, t, e) => (d(o, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import p from "./wj-element.js";
|
|
5
|
+
import { w as b } from "./router-links-e0087f84.js";
|
|
9
6
|
import "./wj-store.js";
|
|
10
|
-
const
|
|
11
|
-
|
|
7
|
+
const c = `/*!
|
|
8
|
+
* direction.scss
|
|
9
|
+
*/:host{--wj-toolbar-backcolor: #fff;--wj-toolbar-min-height: 70px;--wj-toolbar-padding-top: 1rem;--wj-toolbar-padding-bottom: 1rem;--wj-toolbar-padding-inline: 1.5rem;--wj-toolbar-border-color: rgba(33, 33, 33, .14);--wj-toolbar-top: 0;width:100%;height:var(--wj-toolbar-height)}.native-toolbar{background-color:var(--wj-toolbar-backcolor);display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-start;border-bottom:1px solid var(--wj-toolbar-border-color);padding-inline:var(--wj-toolbar-padding-inline);padding-top:var(--wj-toolbar-padding-top);padding-bottom:var(--wj-toolbar-padding-bottom);box-shadow:0 10px 30px #523f690d}::slotted{grid-column:span 4}::slotted([slot=start]){margin-right:auto}:host([sticky]){position:sticky;top:var(--wj-toolbar-top);z-index:999}
|
|
10
|
+
`;
|
|
11
|
+
class m extends b(p) {
|
|
12
12
|
constructor() {
|
|
13
13
|
super();
|
|
14
|
-
|
|
14
|
+
l(this, "className", "Toolbar");
|
|
15
15
|
}
|
|
16
16
|
static get cssStyleSheet() {
|
|
17
|
-
return
|
|
17
|
+
return c;
|
|
18
18
|
}
|
|
19
19
|
static get observedAttributes() {
|
|
20
20
|
return [];
|
|
@@ -22,21 +22,16 @@ class Toolbar extends withRouterLinks(WJElement) {
|
|
|
22
22
|
setupAttributes() {
|
|
23
23
|
this.isShadowRoot = "open";
|
|
24
24
|
}
|
|
25
|
-
draw(
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
end.setAttribute("name", "end");
|
|
33
|
-
native.appendChild(start);
|
|
34
|
-
native.appendChild(end);
|
|
35
|
-
fragment.appendChild(native);
|
|
36
|
-
return fragment;
|
|
25
|
+
draw(e, w, g) {
|
|
26
|
+
let a = document.createDocumentFragment(), r = document.createElement("div");
|
|
27
|
+
r.classList.add("native-toolbar");
|
|
28
|
+
let n = document.createElement("slot");
|
|
29
|
+
n.setAttribute("name", "start");
|
|
30
|
+
let i = document.createElement("slot");
|
|
31
|
+
return i.setAttribute("name", "end"), r.appendChild(n), r.appendChild(i), a.appendChild(r), a;
|
|
37
32
|
}
|
|
38
33
|
}
|
|
39
|
-
customElements.get("wj-toolbar") || window.customElements.define("wj-toolbar",
|
|
34
|
+
customElements.get("wj-toolbar") || window.customElements.define("wj-toolbar", m);
|
|
40
35
|
export {
|
|
41
|
-
Toolbar
|
|
36
|
+
m as Toolbar
|
|
42
37
|
};
|
package/dist/wj-tooltip.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import WJElement, { event } from "./wj-element.js";
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var c = (s, e, t) => e in s ? d(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var r = (s, e, t) => (c(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import u, { event as p } from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
6
|
+
const h = `/*!
|
|
7
|
+
* direction.scss
|
|
8
|
+
*/:host{--arrow-size: 7px;--arrow-color: #000000}.native-tooltip{display:block;padding:.5rem;color:#fff;background-color:var(--arrow-color);font-weight:400;font-size:.75rem!important;border-radius:4px;line-height:1;box-sizing:border-box;box-shadow:0 1px 8px #00000080}.arrow{position:absolute;width:10px;height:10px;background:black;transform:rotate(45deg)}
|
|
9
|
+
`;
|
|
10
|
+
class m extends u {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
console.log("show");
|
|
16
|
-
this.popup.show();
|
|
13
|
+
r(this, "className", "Tooltip");
|
|
14
|
+
r(this, "onShow", () => {
|
|
15
|
+
console.log("show"), this.popup.show();
|
|
17
16
|
});
|
|
18
|
-
|
|
17
|
+
r(this, "onHide", () => {
|
|
19
18
|
this.popup.hide();
|
|
20
19
|
});
|
|
21
20
|
}
|
|
22
21
|
static get cssStyleSheet() {
|
|
23
|
-
return
|
|
22
|
+
return h;
|
|
24
23
|
}
|
|
25
24
|
static get observedAttributes() {
|
|
26
25
|
return ["active", "content"];
|
|
@@ -28,35 +27,22 @@ class Tooltip extends WJElement {
|
|
|
28
27
|
setupAttributes() {
|
|
29
28
|
this.isShadowRoot = "open";
|
|
30
29
|
}
|
|
31
|
-
draw(
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
let
|
|
37
|
-
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
arrow.setAttribute("slot", "arrow");
|
|
41
|
-
let native = document.createElement("div");
|
|
42
|
-
native.classList.add("native-tooltip");
|
|
43
|
-
native.innerHTML = this.content;
|
|
44
|
-
popup.appendChild(slot);
|
|
45
|
-
popup.appendChild(arrow);
|
|
46
|
-
popup.appendChild(native);
|
|
47
|
-
this.slot = slot;
|
|
48
|
-
this.popup = popup;
|
|
49
|
-
fragment.appendChild(popup);
|
|
50
|
-
return fragment;
|
|
30
|
+
draw(t, w, b) {
|
|
31
|
+
let l = document.createDocumentFragment(), o = document.createElement("wj-popup");
|
|
32
|
+
o.setAttribute("placement", this.placement || "top"), o.setAttribute("offset", this.offset || "0");
|
|
33
|
+
let n = document.createElement("slot");
|
|
34
|
+
n.setAttribute("slot", "anchor");
|
|
35
|
+
let i = document.createElement("div");
|
|
36
|
+
i.classList.add("arrow"), i.setAttribute("slot", "arrow");
|
|
37
|
+
let a = document.createElement("div");
|
|
38
|
+
return a.classList.add("native-tooltip"), a.innerHTML = this.content, o.appendChild(n), o.appendChild(i), o.appendChild(a), this.slot = n, this.popup = o, l.appendChild(o), l;
|
|
51
39
|
}
|
|
52
40
|
afterDraw() {
|
|
53
|
-
let
|
|
54
|
-
console.log(
|
|
55
|
-
event.addListener(anchorEl, "mouseenter", null, this.onShow);
|
|
56
|
-
event.addListener(anchorEl, "mouseleave", null, this.onHide);
|
|
41
|
+
let t = this.slot.assignedElements()[0];
|
|
42
|
+
console.log(t), p.addListener(t, "mouseenter", null, this.onShow), p.addListener(t, "mouseleave", null, this.onHide);
|
|
57
43
|
}
|
|
58
44
|
}
|
|
59
|
-
customElements.get("wj-tooltip") || window.customElements.define("wj-tooltip",
|
|
45
|
+
customElements.get("wj-tooltip") || window.customElements.define("wj-tooltip", m);
|
|
60
46
|
export {
|
|
61
|
-
Tooltip
|
|
47
|
+
m as Tooltip
|
|
62
48
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import WJElement from "./wj-element.js";
|
|
1
|
+
var r = Object.defineProperty;
|
|
2
|
+
var a = (e, t, n) => t in e ? r(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var i = (e, t, n) => (a(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
import p from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
6
|
+
const d = `/*!
|
|
7
|
+
* direction.scss
|
|
8
|
+
*/:host(:not(:focus-within)){position:absolute!important;width:1px!important;height:1px!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;border:none!important;overflow:hidden!important;white-space:nowrap!important;padding:0!important}
|
|
9
|
+
`;
|
|
10
|
+
class l extends p {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
|
-
|
|
13
|
+
i(this, "className", "VisuallyHidden");
|
|
14
14
|
}
|
|
15
15
|
static get cssStyleSheet() {
|
|
16
|
-
return
|
|
16
|
+
return d;
|
|
17
17
|
}
|
|
18
18
|
static get observedAttributes() {
|
|
19
19
|
return [];
|
|
@@ -21,14 +21,12 @@ class VisuallyHidden extends WJElement {
|
|
|
21
21
|
setupAttributes() {
|
|
22
22
|
this.isShadowRoot = "open";
|
|
23
23
|
}
|
|
24
|
-
draw(
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
fragment.appendChild(slot);
|
|
28
|
-
return fragment;
|
|
24
|
+
draw(n, m, c) {
|
|
25
|
+
let o = document.createDocumentFragment(), s = document.createElement("slot");
|
|
26
|
+
return o.appendChild(s), o;
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
|
-
customElements.get("wj-visually-hidden") || window.customElements.define("wj-visually-hidden",
|
|
29
|
+
customElements.get("wj-visually-hidden") || window.customElements.define("wj-visually-hidden", l);
|
|
32
30
|
export {
|
|
33
|
-
VisuallyHidden
|
|
31
|
+
l as VisuallyHidden
|
|
34
32
|
};
|