wj-elements 0.0.29 → 0.0.31
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/README.md +19 -7
- package/dist/wj-animation.js +2 -2
- package/dist/wj-aside.js +2 -2
- package/dist/wj-avatar.js +2 -2
- package/dist/wj-badge.js +2 -4
- package/dist/wj-breadcrumb.js +2 -1
- package/dist/wj-breadcrumbs.js +2 -2
- package/dist/wj-button-group.js +2 -2
- package/dist/wj-button.js +6 -2
- package/dist/wj-card-content.js +2 -2
- package/dist/wj-card-controls.js +2 -2
- package/dist/wj-card-header.js +2 -2
- package/dist/wj-card-subtitle.js +2 -2
- package/dist/wj-card-title.js +2 -2
- package/dist/wj-card.js +2 -2
- package/dist/wj-carousel-item.js +2 -2
- package/dist/wj-carousel.js +20 -19
- package/dist/wj-checkbox.js +2 -1
- package/dist/wj-chip.js +2 -2
- package/dist/wj-col.js +2 -2
- package/dist/wj-color-picker.js +2 -2
- package/dist/wj-container.js +2 -2
- package/dist/wj-copy-button.js +3 -3
- package/dist/wj-dialog.js +2 -3
- package/dist/wj-divider.js +2 -2
- package/dist/wj-dropdown.js +2 -2
- package/dist/wj-element.js +23 -12
- package/dist/wj-file-upload-item.js +2 -2
- package/dist/wj-file-upload.js +2 -2
- package/dist/wj-footer.js +2 -2
- package/dist/wj-form.js +2 -2
- package/dist/wj-format-digital.js +2 -2
- package/dist/wj-grid.js +2 -2
- package/dist/wj-header.js +2 -2
- package/dist/wj-icon-picker.js +3 -4
- package/dist/wj-icon.js +3 -3
- package/dist/wj-img-comparer.js +2 -2
- package/dist/wj-img.js +3 -3
- package/dist/wj-infinite-scroll.js +2 -2
- package/dist/wj-input-file.js +2 -2
- package/dist/wj-input.js +2 -2
- package/dist/wj-item.js +2 -2
- package/dist/wj-label.js +2 -2
- package/dist/wj-list.js +2 -2
- package/dist/wj-main.js +2 -2
- package/dist/wj-masonry.js +2 -2
- package/dist/wj-master.js +146 -150
- package/dist/wj-menu-button.js +2 -2
- package/dist/wj-menu-item.js +2 -2
- package/dist/wj-menu-label.js +2 -2
- package/dist/wj-menu.js +2 -2
- package/dist/wj-option.js +2 -2
- package/dist/wj-options.js +2 -2
- package/dist/wj-popup.js +2 -2
- package/dist/wj-progress-bar.js +2 -2
- package/dist/wj-radio-group.js +3 -3
- package/dist/wj-radio.js +2 -2
- package/dist/wj-rate.js +2 -2
- package/dist/wj-relative-time.js +2 -2
- package/dist/wj-route.js +2 -2
- package/dist/wj-router-link.js +2 -2
- package/dist/wj-routerx.js +2 -2
- package/dist/wj-row.js +2 -2
- package/dist/wj-select.js +2 -2
- package/dist/wj-slider.js +2 -2
- package/dist/wj-split-view.js +2 -2
- package/dist/wj-tab-group.js +2 -2
- package/dist/wj-tab-panel.js +2 -2
- package/dist/wj-tab.js +2 -2
- package/dist/wj-textarea.js +2 -2
- package/dist/wj-thumbnail.js +2 -2
- package/dist/wj-toast.js +2 -2
- package/dist/wj-toggle.js +2 -2
- package/dist/wj-toolbar-action.js +2 -2
- package/dist/wj-toolbar.js +2 -2
- package/dist/wj-tooltip.js +2 -2
- package/dist/wj-visually-hidden.js +2 -2
- package/package.json +20 -3
- package/dist/wj-nav-menu.js +0 -37
- package/dist/wj-nav.js +0 -61
package/README.md
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
# WJ Elements
|
|
2
|
-
WebJET
|
|
2
|
+
WebJET Elements is a modern set of user interface tools harnessing the power of web components designed to simplify web application development. It provides a collection of encapsulated and reusable elements that can greatly increase the efficiency and maintainability of web development projects. They offer easy integration with React and Vue.
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Include WebJET Elements in your project using [CDN](#inštalácia-s-cdn) or install it using [npm](#inštalácia-s-npm).
|
|
5
|
+
|
|
6
|
+
Documentation: [elements.webjet](https://elements.webjet.sk/)
|
|
7
|
+
|
|
8
|
+
Source: [https://github.com/lencys/wj-elements](https://github.com/lencys/wj-elements)
|
|
9
|
+
|
|
10
|
+
Discord: [WJElements](https://discord.com/invite/b5DqKM997s)
|
|
5
11
|
|
|
6
12
|
## Inštalácia s npm
|
|
7
13
|
|
|
8
|
-
|
|
14
|
+
Using the npm package manager, you can insert Elements source files into almost any project.
|
|
9
15
|
|
|
10
|
-
|
|
16
|
+
Make sure you have Node.js installed on your computer before proceeding. To set up the environment for Elements, see these instructions.
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
Install WebJet Elements using npm:
|
|
13
19
|
|
|
14
20
|
```shell
|
|
15
21
|
$ npm install wj-elements
|
|
16
22
|
```
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
If there was a previous installation of the Ionic CLI, it will need to be uninstalled due to a package name change.
|
|
19
25
|
|
|
20
26
|
```shell
|
|
21
27
|
$ npm uninstall wj-elements
|
|
@@ -23,10 +29,16 @@ $ npm uninstall wj-elements
|
|
|
23
29
|
|
|
24
30
|
## Inštalácia s CDN
|
|
25
31
|
|
|
26
|
-
|
|
32
|
+
Use CDN and include compiled CSS and JS files of WebJET Elements in your project.
|
|
27
33
|
|
|
28
34
|
```html
|
|
29
35
|
<script type="module" src="https://cdn.jsdelivr.net/gh/lencys/wj-elements@dddb1c19734498c5b2a17f2e6ed605d0cd40d02e/wj-master.js"></script>
|
|
30
36
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lencys/wj-elements@e5cdd8566b4acaad5c11040bfbb4e09e170074c9/style.css" />
|
|
31
37
|
```
|
|
32
38
|
|
|
39
|
+
### Basic usage
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<wj-button>Button</wj-button>
|
|
43
|
+
```
|
|
44
|
+
|
package/dist/wj-animation.js
CHANGED
|
@@ -70,7 +70,7 @@ class Animation extends WJElement {
|
|
|
70
70
|
return await fetchAndParseCSS(cssUrl);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
WJElement.define("wj-animation", Animation);
|
|
74
74
|
export {
|
|
75
|
-
Animation
|
|
75
|
+
Animation as default
|
|
76
76
|
};
|
package/dist/wj-aside.js
CHANGED
package/dist/wj-avatar.js
CHANGED
|
@@ -62,7 +62,7 @@ class Avatar extends WJElement {
|
|
|
62
62
|
return this.getElementsByTagName("wj-img").length > 0;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
WJElement.define("wj-avatar", Avatar);
|
|
66
66
|
export {
|
|
67
|
-
Avatar
|
|
67
|
+
Avatar as default
|
|
68
68
|
};
|
package/dist/wj-badge.js
CHANGED
|
@@ -26,9 +26,7 @@ class Badge extends WJElement {
|
|
|
26
26
|
return fragment;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
customElements.get("wj-badge") || window.customElements.define("wj-badge", Badge);
|
|
29
|
+
WJElement.define("wj-badge", Badge);
|
|
31
30
|
export {
|
|
32
|
-
Badge
|
|
33
|
-
__esModule
|
|
31
|
+
Badge as default
|
|
34
32
|
};
|
package/dist/wj-breadcrumb.js
CHANGED
|
@@ -138,6 +138,7 @@ class Breadcrumb extends WJElement {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
customElements.get("wj-breadcrumb") || window.customElements.define("wj-breadcrumb", Breadcrumb);
|
|
141
|
+
WJElement.define("wj-breadcrumb", Breadcrumb);
|
|
141
142
|
export {
|
|
142
|
-
Breadcrumb
|
|
143
|
+
Breadcrumb as default
|
|
143
144
|
};
|
package/dist/wj-breadcrumbs.js
CHANGED
|
@@ -49,7 +49,7 @@ class Breadcrumbs extends WJElement {
|
|
|
49
49
|
return Array.from(this.querySelectorAll("wj-breadcrumb")) || [];
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
WJElement.define("wj-breadcrumbs", Breadcrumbs);
|
|
53
53
|
export {
|
|
54
|
-
Breadcrumbs
|
|
54
|
+
Breadcrumbs as default
|
|
55
55
|
};
|
package/dist/wj-button-group.js
CHANGED
|
@@ -48,7 +48,7 @@ class ButtonGroup extends WJElement {
|
|
|
48
48
|
return el.closest(selector) ?? el.querySelector(selector);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
WJElement.define("wj-button-group", ButtonGroup);
|
|
52
52
|
export {
|
|
53
|
-
ButtonGroup
|
|
53
|
+
ButtonGroup as default
|
|
54
54
|
};
|
package/dist/wj-button.js
CHANGED
|
@@ -5,6 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import WJElement, { WjElementUtils, event } from "./wj-element.js";
|
|
8
|
+
import IconElement from "./wj-icon.js";
|
|
8
9
|
const bool = (v) => {
|
|
9
10
|
return v === "false" || v === "null" || v === "NaN" || v === "undefined" || v === "0" ? false : !!v;
|
|
10
11
|
};
|
|
@@ -12,6 +13,9 @@ const styles = "/*\n[ WJ Button ]\n*/\n:host(.wj-button-solid.wj-color-primary)
|
|
|
12
13
|
class Button extends WJElement {
|
|
13
14
|
constructor() {
|
|
14
15
|
super();
|
|
16
|
+
__publicField(this, "depandencies", {
|
|
17
|
+
"wj-icon": IconElement
|
|
18
|
+
});
|
|
15
19
|
__publicField(this, "className", "Button");
|
|
16
20
|
__publicField(this, "eventDialogOpen", (e) => {
|
|
17
21
|
document.dispatchEvent(
|
|
@@ -154,7 +158,7 @@ class Button extends WJElement {
|
|
|
154
158
|
this.removeEventListener("click", this.eventDialogOpen);
|
|
155
159
|
}
|
|
156
160
|
}
|
|
157
|
-
|
|
161
|
+
WJElement.define("wj-button", Button);
|
|
158
162
|
export {
|
|
159
|
-
Button
|
|
163
|
+
Button as default
|
|
160
164
|
};
|
package/dist/wj-card-content.js
CHANGED
|
@@ -24,7 +24,7 @@ class CardContent extends WJElement {
|
|
|
24
24
|
return fragment;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
WJElement.define("wj-card-content", CardContent);
|
|
28
28
|
export {
|
|
29
|
-
CardContent
|
|
29
|
+
CardContent as default
|
|
30
30
|
};
|
package/dist/wj-card-controls.js
CHANGED
|
@@ -24,7 +24,7 @@ class CardControls extends WJElement {
|
|
|
24
24
|
return fragment;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
WJElement.define("wj-card-controls", CardControls);
|
|
28
28
|
export {
|
|
29
|
-
CardControls
|
|
29
|
+
CardControls as default
|
|
30
30
|
};
|
package/dist/wj-card-header.js
CHANGED
|
@@ -26,7 +26,7 @@ class CardHeader extends WJElement {
|
|
|
26
26
|
return fragment;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
WJElement.define("wj-card-header", CardHeader);
|
|
30
30
|
export {
|
|
31
|
-
CardHeader
|
|
31
|
+
CardHeader as default
|
|
32
32
|
};
|
package/dist/wj-card-subtitle.js
CHANGED
|
@@ -29,7 +29,7 @@ class CardSubtitle extends WJElement {
|
|
|
29
29
|
return fragment;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
WJElement.define("wj-card-subtitle", CardSubtitle);
|
|
33
33
|
export {
|
|
34
|
-
CardSubtitle
|
|
34
|
+
CardSubtitle as default
|
|
35
35
|
};
|
package/dist/wj-card-title.js
CHANGED
|
@@ -27,7 +27,7 @@ class CardTitle extends WJElement {
|
|
|
27
27
|
return fragment;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
WJElement.define("wj-card-title", CardTitle);
|
|
31
31
|
export {
|
|
32
|
-
CardTitle
|
|
32
|
+
CardTitle as default
|
|
33
33
|
};
|
package/dist/wj-card.js
CHANGED
package/dist/wj-carousel-item.js
CHANGED
|
@@ -31,7 +31,7 @@ class CarouselItem extends WJElement {
|
|
|
31
31
|
return fragment;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
WJElement.define("wj-carousel-item", CarouselItem);
|
|
35
35
|
export {
|
|
36
|
-
CarouselItem
|
|
36
|
+
CarouselItem as default
|
|
37
37
|
};
|
package/dist/wj-carousel.js
CHANGED
|
@@ -10,7 +10,6 @@ class Carousel extends WJElement {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
12
12
|
__publicField(this, "className", "Carousel");
|
|
13
|
-
this.activeSlide = 0;
|
|
14
13
|
this.slidePerPage = 1;
|
|
15
14
|
}
|
|
16
15
|
set activeSlide(value) {
|
|
@@ -48,6 +47,9 @@ class Carousel extends WJElement {
|
|
|
48
47
|
setupAttributes() {
|
|
49
48
|
this.isShadowRoot = "open";
|
|
50
49
|
}
|
|
50
|
+
beforeDraw(context, store, params) {
|
|
51
|
+
this.cloneFirstAndLastItems();
|
|
52
|
+
}
|
|
51
53
|
draw(context, store, params) {
|
|
52
54
|
let fragment = document.createDocumentFragment();
|
|
53
55
|
let native = document.createElement("div");
|
|
@@ -67,24 +69,8 @@ class Carousel extends WJElement {
|
|
|
67
69
|
native.appendChild(this.createThumbnails());
|
|
68
70
|
fragment.appendChild(native);
|
|
69
71
|
this.slides = slides;
|
|
70
|
-
this.cloneFirstAndLastItems();
|
|
71
72
|
return fragment;
|
|
72
73
|
}
|
|
73
|
-
setIntersectionObserver() {
|
|
74
|
-
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
75
|
-
entries.forEach((entry) => {
|
|
76
|
-
this.entriesMap.set(entry.target, entry);
|
|
77
|
-
});
|
|
78
|
-
}, {
|
|
79
|
-
root: this.context.querySelector(".carousel-slides"),
|
|
80
|
-
threshold: 0.5
|
|
81
|
-
});
|
|
82
|
-
this.entriesMap = /* @__PURE__ */ new Map();
|
|
83
|
-
this.records = this.intersectionObserver.takeRecords();
|
|
84
|
-
this.records.forEach((entry) => {
|
|
85
|
-
this.entriesMap.set(entry.target, entry);
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
74
|
afterDraw() {
|
|
89
75
|
this.setIntersectionObserver();
|
|
90
76
|
this.getSlidesWithClones().forEach((slide, i) => {
|
|
@@ -108,6 +94,21 @@ class Carousel extends WJElement {
|
|
|
108
94
|
}
|
|
109
95
|
});
|
|
110
96
|
}
|
|
97
|
+
setIntersectionObserver() {
|
|
98
|
+
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
99
|
+
entries.forEach((entry) => {
|
|
100
|
+
this.entriesMap.set(entry.target, entry);
|
|
101
|
+
});
|
|
102
|
+
}, {
|
|
103
|
+
root: this.context.querySelector(".carousel-slides"),
|
|
104
|
+
threshold: 0.5
|
|
105
|
+
});
|
|
106
|
+
this.entriesMap = /* @__PURE__ */ new Map();
|
|
107
|
+
this.records = this.intersectionObserver.takeRecords();
|
|
108
|
+
this.records.forEach((entry) => {
|
|
109
|
+
this.entriesMap.set(entry.target, entry);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
111
112
|
goToSlide(index, behavior = "smooth", next = true) {
|
|
112
113
|
const slides = this.getSlides();
|
|
113
114
|
const slideWithClones = this.getSlidesWithClones();
|
|
@@ -248,7 +249,7 @@ class Carousel extends WJElement {
|
|
|
248
249
|
return this.querySelector(".native-carousel").scrollLeft > 0;
|
|
249
250
|
}
|
|
250
251
|
}
|
|
251
|
-
|
|
252
|
+
WJElement.define("wj-carousel", Carousel);
|
|
252
253
|
export {
|
|
253
|
-
Carousel
|
|
254
|
+
Carousel as default
|
|
254
255
|
};
|
package/dist/wj-checkbox.js
CHANGED
package/dist/wj-chip.js
CHANGED
|
@@ -47,7 +47,7 @@ class Chip extends WJElement {
|
|
|
47
47
|
event.addListener(this.remove, "click", "wj:chip-remove", null, { stopPropagation: true });
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
WJElement.define("wj-chip", Chip);
|
|
51
51
|
export {
|
|
52
|
-
Chip
|
|
52
|
+
Chip as default
|
|
53
53
|
};
|
package/dist/wj-col.js
CHANGED
package/dist/wj-color-picker.js
CHANGED
|
@@ -1277,7 +1277,7 @@ class ColorPicker extends WJElement {
|
|
|
1277
1277
|
return tinycolor(hsva);
|
|
1278
1278
|
}
|
|
1279
1279
|
}
|
|
1280
|
-
|
|
1280
|
+
WJElement.define("wj-color-picker", ColorPicker);
|
|
1281
1281
|
export {
|
|
1282
|
-
ColorPicker
|
|
1282
|
+
ColorPicker as default
|
|
1283
1283
|
};
|
package/dist/wj-container.js
CHANGED
|
@@ -29,7 +29,7 @@ class Container extends WJElement {
|
|
|
29
29
|
return fragment;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
WJElement.define("wj-container", Container);
|
|
33
33
|
export {
|
|
34
|
-
Container
|
|
34
|
+
Container as default
|
|
35
35
|
};
|
package/dist/wj-copy-button.js
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import WJElement, { event } from "./wj-element.js";
|
|
8
|
-
import
|
|
8
|
+
import Input from "./wj-input.js";
|
|
9
9
|
function createNode(text) {
|
|
10
10
|
const node = document.createElement("pre");
|
|
11
11
|
node.style.width = "1px";
|
|
@@ -145,7 +145,7 @@ class CopyButton extends WJElement {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
WJElement.define("wj-copy-button", CopyButton);
|
|
149
149
|
export {
|
|
150
|
-
CopyButton
|
|
150
|
+
CopyButton as default
|
|
151
151
|
};
|
package/dist/wj-dialog.js
CHANGED
|
@@ -5,7 +5,6 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import WJElement, { WjElementUtils } from "./wj-element.js";
|
|
8
|
-
import "./wj-button.js";
|
|
9
8
|
import "./wj-icon.js";
|
|
10
9
|
const styles = '/*\n[ WJ Dialog ]\n*/\n:host {\n --wj-dialog-width: 600px;\n --wj-dialog-height: 600px;\n --wj-dialog-border-radius: var(--wj-border-radius-large);\n --wj-dialog-border-width: var(--wj-border-width);\n --wj-dialog-border-style: var(--wj-border-style);\n --wj-dialog-border-color: var(--wj-border-color);\n --wj-dialog-margin-top: auto;\n --wj-dialog-margin-start: auto;\n --wj-dialog-margin-end: auto;\n --wj-dialog-margin-bottom: auto;\n}\n:host .close {\n margin-left: auto;\n}\n:host .modal-content {\n border-radius: 3px;\n box-shadow: none;\n}\n:host .dialog-header {\n position: relative;\n border-bottom: 0;\n padding-inline: var(--wj-dialog-padding, 1rem);\n padding-top: var(--wj-dialog-padding, 1rem);\n padding-bottom: var(--wj-dialog-padding, 0);\n display: flex;\n align-items: center;\n}\n:host .dialog-header span {\n font-family: var(--wj-font-family-secondary);\n font-size: 10.5px;\n text-transform: uppercase;\n display: inline-block;\n letter-spacing: 0.06em;\n font-weight: 500;\n margin: 0;\n padding: 0;\n line-height: normal;\n overflow: hidden;\n text-overflow: ellipsis;\n filter: alpha(opacity=40);\n}\n:host .dialog-content {\n box-shadow: none;\n padding-inline: var(--wj-dialog-padding, 1rem);\n white-space: normal;\n z-index: 1;\n}\n:host .dialog-footer {\n display: flex;\n justify-content: end;\n border-top: none;\n box-shadow: none;\n margin-top: 0;\n padding-inline: var(--wj-dialog-padding-inline, 1rem);\n padding-top: var(--wj-dialog-padding-top, 1rem);\n padding-bottom: var(--wj-dialog-padding-bottom, 1rem);\n}\n\ndialog::backdrop {\n opacity: var(--wj-backdrop-opacity);\n background-color: var(--wj-backdrop);\n}\n\n:host(.separator) .dialog-header:after {\n content: "";\n height: 1px;\n background: rgba(0, 0, 0, 0.08);\n left: var(--wj-dialog-padding, 1rem);\n right: var(--wj-dialog-padding, 1rem);\n position: absolute;\n bottom: 0;\n}\n\n:host dialog {\n box-sizing: border-box;\n transition: all 0.2s !important;\n width: var(--wj-dialog-width);\n height: var(--wj-dialog-height);\n box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);\n border-radius: var(--wj-dialog-border-radius);\n border-width: var(--wj-dialog-border-width);\n border-style: var(--wj-dialog-border-style);\n border-color: var(--wj-dialog-border-color);\n margin-top: var(--wj-dialog-margin-top);\n margin-bottom: var(--wj-dialog-margin-bottom);\n margin-inline: var(--wj-dialog-margin-start) var(--wj-dialog-margin-end);\n padding: 0;\n}\n\n:host(.stick-up) {\n --wj-dialog-width: 300px !important;\n --wj-dialog-height: fit-content;\n --wj-dialog-border-radius: 0 0 8px 8px;\n --wj-dialog-border-width: 0 1px 1px 1px;\n --wj-dialog-margin-top: 0;\n --wj-dialog-translate-from: translateY(-110%);\n --wj-dialog-template-to: translateX(0);\n}\n\n:host(.slide-up) {\n --wj-dialog-width: 300px !important;\n --wj-dialog-height: fit-content;\n --wj-dialog-border-radius: 8px;\n --wj-dialog-border-width: 1px;\n --wj-dialog-opacity-from: 0;\n --wj-dialog-translate-from: scale(.9);\n --wj-dialog-translate-to: scale(1);\n}\n\n:host(.fill-in) {\n --wj-dialog-width: 100%;\n --wj-dialog-height: 100%;\n --wj-dialog-border-radius: 0 0 0 0 !important;\n --wj-dialog-border-width: 0;\n --wj-dialog-margin-top: 0;\n --wj-dialog-margin-start: 0;\n --wj-dialog-margin-end: 0;\n --wj-dialog-margin-bottom: 0;\n --wj-dialog-translate-from: scale(.95);\n --wj-dialog-translate-to: scale(1);\n}\n:host(.fill-in) dialog {\n min-width: var(--wj-dialog-width);\n min-height: var(--wj-dialog-height);\n}\n\n:host(.slide-left) {\n --wj-dialog-width: 300px !important;\n --wj-dialog-height: 100% !important;\n --wj-dialog-border-radius: 0;\n --wj-dialog-border-width: 0 1px 0 0;\n --wj-dialog-margin-top: 0;\n --wj-dialog-margin-start: 0;\n --wj-dialog-margin-end: auto;\n --wj-dialog-margin-bottom: 0;\n}\n:host(.slide-left) dialog {\n min-height: var(--wj-dialog-height);\n --wj-dialog-translate-from: translateX(-110%);\n --wj-dialog-template-to: translateX(0);\n}\n\n:host(.slide-right) {\n --wj-dialog-width: 300px !important;\n --wj-dialog-height: 100% !important;\n --wj-dialog-border-radius: 0;\n --wj-dialog-border-width: 0 0 0 1px;\n --wj-dialog-margin-top: 0;\n --wj-dialog-margin-start: auto;\n --wj-dialog-margin-end: 0;\n --wj-dialog-margin-bottom: 0;\n}\n:host(.slide-right) dialog {\n min-height: var(--wj-dialog-height);\n --wj-dialog-translate-from: translateX(110%);\n --wj-dialog-template-to: translateX(0);\n}\n\n:host(.small) {\n --wj-dialog-width: 300px !important;\n}\n\n:host(.medium) {\n --wj-dialog-width: 500px !important;\n}\n\n:host(.large) {\n --wj-dialog-width: 600px !important;\n}\n\n:host(.ex-large) {\n --wj-dialog-width: 900px !important;\n}\n\ndialog[open] {\n animation: show 0.5s ease normal;\n}\n\n@keyframes show {\n from {\n opacity: var(--wj-dialog-opacity-from, 1);\n transform: var(--wj-dialog-translate-from);\n }\n to {\n opacity: 1;\n transform: var(--wj-dialog-translate-to);\n }\n}';
|
|
11
10
|
class Dialog extends WJElement {
|
|
@@ -84,7 +83,7 @@ class Dialog extends WJElement {
|
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
85
|
}
|
|
87
|
-
|
|
86
|
+
WJElement.define("wj-dialog", Dialog);
|
|
88
87
|
export {
|
|
89
|
-
Dialog
|
|
88
|
+
Dialog as default
|
|
90
89
|
};
|
package/dist/wj-divider.js
CHANGED
package/dist/wj-dropdown.js
CHANGED
package/dist/wj-element.js
CHANGED
|
@@ -330,7 +330,7 @@ dispatch_fn = function(e) {
|
|
|
330
330
|
let event = new WjEvent();
|
|
331
331
|
const template = document.createElement("template");
|
|
332
332
|
template.innerHTML = ``;
|
|
333
|
-
class
|
|
333
|
+
const _WJElement = class _WJElement extends HTMLElement {
|
|
334
334
|
constructor(componentTemplate) {
|
|
335
335
|
super();
|
|
336
336
|
__publicField(this, "initWjElement", async (force = false) => {
|
|
@@ -350,16 +350,17 @@ class WJElement extends HTMLElement {
|
|
|
350
350
|
this.context.adoptedStyleSheets = [sheet];
|
|
351
351
|
});
|
|
352
352
|
this.template = componentTemplate || template;
|
|
353
|
-
this._attributes = {};
|
|
354
353
|
this.isAttached = false;
|
|
355
354
|
this.service = new UniversalService({
|
|
356
355
|
store
|
|
357
356
|
});
|
|
357
|
+
this.defineDepandencies();
|
|
358
358
|
this.rendering = false;
|
|
359
359
|
this.runtimeTimeout = null;
|
|
360
360
|
this.count = 0;
|
|
361
361
|
this.functionStack = [];
|
|
362
362
|
this.scheludedRefresh = false;
|
|
363
|
+
this._depandencies = {};
|
|
363
364
|
}
|
|
364
365
|
get permission() {
|
|
365
366
|
return this.getAttribute("permission-check");
|
|
@@ -420,6 +421,23 @@ class WJElement extends HTMLElement {
|
|
|
420
421
|
var _a;
|
|
421
422
|
return (_a = this.getAttribute("remove-class-after-connect")) == null ? void 0 : _a.split(" ");
|
|
422
423
|
}
|
|
424
|
+
get depandencies() {
|
|
425
|
+
return this._depandencies;
|
|
426
|
+
}
|
|
427
|
+
set depandencies(value) {
|
|
428
|
+
this._depandencies = value;
|
|
429
|
+
}
|
|
430
|
+
static define(name, elementConstructor = this, options = {}) {
|
|
431
|
+
const definedElement = customElements.get(name);
|
|
432
|
+
if (!definedElement) {
|
|
433
|
+
customElements.define(name, elementConstructor, options);
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
defineDepandencies() {
|
|
438
|
+
if (this.depandencies)
|
|
439
|
+
Object.entries(depandencies).forEach((name, component) => _WJElement.define(name, component));
|
|
440
|
+
}
|
|
423
441
|
beforeDraw() {
|
|
424
442
|
}
|
|
425
443
|
afterDraw() {
|
|
@@ -586,21 +604,14 @@ class WJElement extends HTMLElement {
|
|
|
586
604
|
);
|
|
587
605
|
});
|
|
588
606
|
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
if (!definedElement) {
|
|
592
|
-
customElements.define(name, elementConstructor, options);
|
|
593
|
-
return;
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
__publicField(WJElement, "processTemplates", (pTemplate, template2) => {
|
|
607
|
+
};
|
|
608
|
+
__publicField(_WJElement, "processTemplates", (pTemplate, template2) => {
|
|
598
609
|
const newTemplate = document.createElement("template");
|
|
599
610
|
newTemplate.innerHTML = [template2.innerHTML, (pTemplate == null ? void 0 : pTemplate.innerHTML) || ""].join("");
|
|
600
611
|
return newTemplate;
|
|
601
612
|
});
|
|
613
|
+
let WJElement = _WJElement;
|
|
602
614
|
let __esModule = "true";
|
|
603
|
-
customElements.get("wj-element") || customElements.define("wj-element", WJElement);
|
|
604
615
|
export {
|
|
605
616
|
WjElementUtils,
|
|
606
617
|
WjPermissionsApi,
|
|
@@ -82,7 +82,7 @@ class FileUploadItem extends WJElement {
|
|
|
82
82
|
this.button.addEventListener("wj:button-click", this.onDelete);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
WJElement.define("wj-file-upload-item", FileUploadItem);
|
|
86
86
|
export {
|
|
87
|
-
FileUploadItem
|
|
87
|
+
FileUploadItem as default
|
|
88
88
|
};
|
package/dist/wj-file-upload.js
CHANGED
|
@@ -314,7 +314,7 @@ class FileUpload extends WJElement {
|
|
|
314
314
|
this.updateStatusMessage(`🤷♂ Nothing's uploaded`);
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
|
|
317
|
+
WJElement.define("wj-file-upload", FileUpload);
|
|
318
318
|
export {
|
|
319
|
-
FileUpload
|
|
319
|
+
FileUpload as default
|
|
320
320
|
};
|
package/dist/wj-footer.js
CHANGED
package/dist/wj-form.js
CHANGED
|
@@ -59,7 +59,7 @@ class FormatDigital extends WJElement {
|
|
|
59
59
|
return fragment;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
WJElement.define("wj-format-digital", FormatDigital);
|
|
63
63
|
export {
|
|
64
|
-
FormatDigital
|
|
64
|
+
FormatDigital as default
|
|
65
65
|
};
|
package/dist/wj-grid.js
CHANGED
package/dist/wj-header.js
CHANGED
package/dist/wj-icon-picker.js
CHANGED
|
@@ -5,8 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import WJElement, { event } from "./wj-element.js";
|
|
8
|
-
import
|
|
9
|
-
import "./wj-tooltip.js";
|
|
8
|
+
import InfiniteScroll from "./wj-infinite-scroll.js";
|
|
10
9
|
const styles = "/*\n[ Wj Icon Picker ]\n*/\n:host {\n --wj-icon-picker-radius: var(--wj-border-radius-small);\n --wj-icon-picker-icon-size: 1.5rem;\n --wj-icon-picker-border-width: 1px;\n --wj-icon-picker-border-style: solid;\n --wj-icon-picker-border-color: var(--wj-border-color);\n --wj-icon-picker-padding: .25rem;\n padding: 0 1rem;\n}\n\n.anchor {\n width: var(--wj-icon-picker-icon-size);\n height: var(--wj-icon-picker-icon-size);\n padding: var(--wj-icon-picker-padding);\n border-width: var(--wj-icon-picker-border-width);\n border-style: var(--wj-icon-picker-border-style);\n border-color: var(--wj-icon-picker-border-color);\n box-sizing: border-box;\n border-radius: var(--wj-icon-picker-radius);\n}\n\n.picker {\n width: 320px;\n height: 271px;\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.05), 0 5px 20px rgba(0, 0, 0, 0.1);\n border-radius: var(--wj-icon-picker-radius);\n border-width: var(--wj-icon-picker-border-width);\n border-style: var(--wj-icon-picker-border-style);\n border-color: var(--wj-icon-picker-border-color);\n overflow: auto;\n padding: 1rem;\n background: var(--wj-background);\n}\n\n.icon-items {\n --icon-min-width: 2rem;\n display: grid;\n grid-gap: 0.5rem;\n grid-template-columns: repeat(auto-fit, minmax(var(--icon-min-width), 1fr));\n}\n\n.icon-item {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n color: inherit;\n padding: 0.25rem;\n min-height: var(--wj-icon-picker-icon-size);\n min-width: var(--wj-icon-picker-icon-size);\n text-decoration: none;\n}\n.icon-item:hover {\n border-radius: 0.25rem;\n background: var(--wj-border-color);\n}\n\n.wj-size {\n --wj-icon-size: 24px !important;\n}\n\nicon-item svg {\n width: var(--wj-icon-picker-icon-size);\n height: var(--wj-icon-picker-icon-size);\n}\n\nwj-input {\n --wj-input-border-radius: 4px;\n --wj-input-margin-bottom: 0;\n}\n\nwj-infinite-scroll {\n margin-top: 1rem;\n}\n\nwj-select {\n --wj-select-border-width: 0 0 1px 0 !important;\n --wj-select-border-radius: 0 !important;\n margin-bottom: 1rem;\n}\n\n.anchor wj-icon {\n --wj-icon-size: 100% !important;\n}";
|
|
11
10
|
class IconPicker extends WJElement {
|
|
12
11
|
constructor() {
|
|
@@ -184,7 +183,7 @@ class IconPicker extends WJElement {
|
|
|
184
183
|
this.context.querySelector(".icon-items").innerHTML = "";
|
|
185
184
|
}
|
|
186
185
|
}
|
|
187
|
-
|
|
186
|
+
WJElement.define("wj-icon-picker", IconPicker);
|
|
188
187
|
export {
|
|
189
|
-
IconPicker
|
|
188
|
+
IconPicker as default
|
|
190
189
|
};
|
package/dist/wj-icon.js
CHANGED
|
@@ -116,7 +116,7 @@ const getNamedUrl = (iconName) => {
|
|
|
116
116
|
return new URL(parsedUrl.origin + folderPath + path).href;
|
|
117
117
|
};
|
|
118
118
|
const styles = "/*\n[ WJ Icon ]\n*/\n:host(.wj-color-primary) {\n --wj-icon-color: var(--wj-color-primary);\n}\n\n:host(.wj-color-complete) {\n --wj-icon-color: var(--wj-color-complete);\n}\n\n:host(.wj-color-success) {\n --wj-icon-color: var(--wj-color-success);\n}\n\n:host(.wj-color-warning) {\n --wj-icon-color: var(--wj-color-warning);\n}\n\n:host(.wj-color-danger) {\n --wj-icon-color: var(--wj-color-danger);\n}\n\n:host(.wj-color-info) {\n --wj-icon-color: var(--wj-color-info);\n}\n\n:host {\n --wj-icon-size: 1rem;\n --wj-icon-width: var(--wj-icon-size, 100%);\n --wj-icon-height: var(--wj-icon-size, 100%);\n display: inline-block;\n width: var(--wj-icon-width);\n height: var(--wj-icon-height);\n contain: strict;\n fill: currentColor;\n box-sizing: content-box !important;\n}\n\n.icon-inner, svg {\n display: block;\n width: var(--wj-icon-width);\n height: var(--wj-icon-height);\n}\n\n:host(.wj-size-small) {\n --wj-icon-size: 18px;\n}\n\n:host(.wj-size-large) {\n --wj-icon-size: 32px;\n}\n\n:host(.wj-size) {\n font-size: var(--wj-icon-size);\n}\n\n:host(.wj-color) {\n color: var(--wj-icon-color) !important;\n}";
|
|
119
|
-
class
|
|
119
|
+
class IconElement extends WJElement {
|
|
120
120
|
constructor() {
|
|
121
121
|
super();
|
|
122
122
|
__publicField(this, "className", "Icon");
|
|
@@ -160,7 +160,7 @@ class Icon extends WJElement {
|
|
|
160
160
|
lazyImageObserver.observe(this.element);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
|
|
163
|
+
WJElement.define("wj-icon", IconElement);
|
|
164
164
|
export {
|
|
165
|
-
|
|
165
|
+
IconElement as default
|
|
166
166
|
};
|