wj-elements 0.1.61 → 0.1.63
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.
|
@@ -1307,11 +1307,6 @@ class Popup extends WJElement {
|
|
|
1307
1307
|
}
|
|
1308
1308
|
});
|
|
1309
1309
|
this._manual = false;
|
|
1310
|
-
this._stageList = {
|
|
1311
|
-
IDLE: "IDLE",
|
|
1312
|
-
PROCESSING: "PROCESSING"
|
|
1313
|
-
};
|
|
1314
|
-
this._stage = this._stageList.IDLE;
|
|
1315
1310
|
}
|
|
1316
1311
|
/**
|
|
1317
1312
|
* Sets the manual property of the popup.
|
|
@@ -1340,12 +1335,37 @@ class Popup extends WJElement {
|
|
|
1340
1335
|
static get cssStyleSheet() {
|
|
1341
1336
|
return styles;
|
|
1342
1337
|
}
|
|
1338
|
+
/**
|
|
1339
|
+
* Returns the list of attributes to observe for changes.
|
|
1340
|
+
*
|
|
1341
|
+
* @static
|
|
1342
|
+
* @returns {Array<string>}
|
|
1343
|
+
*/
|
|
1344
|
+
static get observedAttributes() {
|
|
1345
|
+
return ["active"];
|
|
1346
|
+
}
|
|
1343
1347
|
/**
|
|
1344
1348
|
* Sets up the attributes for the component.
|
|
1345
1349
|
*/
|
|
1346
1350
|
setupAttributes() {
|
|
1347
1351
|
this.isShadowRoot = "open";
|
|
1348
1352
|
}
|
|
1353
|
+
/**
|
|
1354
|
+
* Called when an attribute changes.
|
|
1355
|
+
*
|
|
1356
|
+
* @param {string} name - The name of the attribute.
|
|
1357
|
+
* @param {string} old - The old value of the attribute.
|
|
1358
|
+
* @param {string} newName - The new value of the attribute.
|
|
1359
|
+
*/
|
|
1360
|
+
attributeChangedCallback(name, old, newName) {
|
|
1361
|
+
if (name === "active") {
|
|
1362
|
+
if (this.hasAttribute(name)) {
|
|
1363
|
+
this.show();
|
|
1364
|
+
} else {
|
|
1365
|
+
this.hide();
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1349
1369
|
afterDisconnect() {
|
|
1350
1370
|
var _a;
|
|
1351
1371
|
event.removeElement(this.anchorEl);
|
|
@@ -1354,7 +1374,6 @@ class Popup extends WJElement {
|
|
|
1354
1374
|
}
|
|
1355
1375
|
beforeDraw(context, store, params) {
|
|
1356
1376
|
var _a;
|
|
1357
|
-
this._stage = this._stageList.PROCESSING;
|
|
1358
1377
|
document.removeEventListener("click", this.clickHandler, { capture: true });
|
|
1359
1378
|
(_a = this.cleanup) == null ? void 0 : _a.call(this);
|
|
1360
1379
|
}
|
|
@@ -1387,7 +1406,10 @@ class Popup extends WJElement {
|
|
|
1387
1406
|
}
|
|
1388
1407
|
afterDraw(context, store, params) {
|
|
1389
1408
|
this.setAnchor();
|
|
1390
|
-
|
|
1409
|
+
if (this.hasAttribute("active"))
|
|
1410
|
+
this.show(false);
|
|
1411
|
+
if (!this.hasAttribute("active"))
|
|
1412
|
+
this.hide(false);
|
|
1391
1413
|
}
|
|
1392
1414
|
/**
|
|
1393
1415
|
* Sets the anchor for the popup.
|
|
@@ -1492,9 +1514,9 @@ class Popup extends WJElement {
|
|
|
1492
1514
|
* Adds the popup-active class to the native element.
|
|
1493
1515
|
* Sets up auto update for repositioning.
|
|
1494
1516
|
*/
|
|
1495
|
-
show() {
|
|
1517
|
+
show(dispatchEvent = true) {
|
|
1496
1518
|
var _a;
|
|
1497
|
-
event.dispatchCustomEvent(this, "wje-popup:show");
|
|
1519
|
+
dispatchEvent && event.dispatchCustomEvent(this, "wje-popup:show");
|
|
1498
1520
|
this.native.classList.add("popup-active");
|
|
1499
1521
|
(_a = this.cleanup) == null ? void 0 : _a.call(this);
|
|
1500
1522
|
this.cleanup = autoUpdate(this.anchorEl, this.native, () => {
|
|
@@ -1508,9 +1530,9 @@ class Popup extends WJElement {
|
|
|
1508
1530
|
* Removes the popup-active class from the native element.
|
|
1509
1531
|
* Cleans up the auto update for repositioning.
|
|
1510
1532
|
*/
|
|
1511
|
-
hide() {
|
|
1533
|
+
hide(dispatchEvent = true) {
|
|
1512
1534
|
var _a;
|
|
1513
|
-
event.dispatchCustomEvent(this, "wje-popup:hide");
|
|
1535
|
+
dispatchEvent && event.dispatchCustomEvent(this, "wje-popup:hide");
|
|
1514
1536
|
this.native.classList.remove("popup-active");
|
|
1515
1537
|
(_a = this.cleanup) == null ? void 0 : _a.call(this);
|
|
1516
1538
|
this.cleanup = void 0;
|
package/dist/wje-dropdown.js
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import WJElement, { event } from "./wje-element.js";
|
|
8
|
-
import { P as Popup } from "./popup.element-
|
|
8
|
+
import { P as Popup } from "./popup.element-Dna4OwCH.js";
|
|
9
9
|
class Dropdown extends WJElement {
|
|
10
10
|
/**
|
|
11
11
|
* Creates an instance of Dropdown.
|
|
@@ -72,7 +72,6 @@ class Dropdown extends WJElement {
|
|
|
72
72
|
* @param e
|
|
73
73
|
*/
|
|
74
74
|
__publicField(this, "onClose", async (e) => {
|
|
75
|
-
e.stopPropagation();
|
|
76
75
|
this.classList.remove("active");
|
|
77
76
|
this.popup.hide();
|
|
78
77
|
event.dispatchCustomEvent(this, "wje-dropdown:close", {
|
package/dist/wje-icon-picker.js
CHANGED
|
@@ -9,7 +9,7 @@ import InfiniteScroll from "./wje-infinite-scroll.js";
|
|
|
9
9
|
import Input from "./wje-input.js";
|
|
10
10
|
import Tooltip from "./wje-tooltip.js";
|
|
11
11
|
import "./wje-popup.js";
|
|
12
|
-
import { P as Popup } from "./popup.element-
|
|
12
|
+
import { P as Popup } from "./popup.element-Dna4OwCH.js";
|
|
13
13
|
const styles = "/*\r\n[ Wj Icon Picker ]\r\n*/\r\n\r\n:host {\r\n --wje-icon-picker-radius: var(--wje-border-radius-small);\r\n --wje-icon-picker-icon-size: 1.5rem;\r\n --wje-icon-picker-border-width: 1px;\r\n --wje-icon-picker-border-style: solid;\r\n --wje-icon-picker-border-color: var(--wje-border-color);\r\n --wje-icon-picker-padding: .25rem;\r\n padding: 0 1rem;\r\n}\r\n\r\n.anchor {\r\n width: var(--wje-icon-picker-icon-size);\r\n height: var(--wje-icon-picker-icon-size);\r\n padding: var(--wje-icon-picker-padding);\r\n border-width: var(--wje-icon-picker-border-width);\r\n border-style: var(--wje-icon-picker-border-style);\r\n border-color: var(--wje-icon-picker-border-color);\r\n box-sizing: border-box;\r\n border-radius: var(--wje-icon-picker-radius);\r\n}\r\n\r\n.picker {\r\n width: 320px;\r\n height: 271px;\r\n box-shadow: 0 0 5px rgba(0,0,0,.05), 0 5px 20px rgba(0,0,0,.1);\r\n border-radius: var(--wje-icon-picker-radius);\r\n border-width: var(--wje-icon-picker-border-width);\r\n border-style: var(--wje-icon-picker-border-style);\r\n border-color: var(--wje-icon-picker-border-color);\r\n overflow: auto;\r\n padding: 1rem;\r\n background: var(--wje-background);\r\n}\r\n\r\n.icon-items {\r\n --icon-min-width: 2rem;\r\n display: grid;\r\n grid-gap: .5rem;\r\n grid-template-columns: repeat(auto-fit,minmax(var(--icon-min-width),1fr));\r\n}\r\n\r\n.icon-item {\r\n box-sizing: border-box;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n text-align: center;\r\n color: inherit;\r\n padding: .25rem;\r\n min-height: var(--wje-icon-picker-icon-size);\r\n min-width: var(--wje-icon-picker-icon-size);\r\n text-decoration: none;\r\n\r\n &:hover {\r\n border-radius: .25rem;\r\n background: var(--wje-border-color);\r\n }\r\n}\r\n\r\n.wje-size {\r\n --wje-icon-size: 24px !important;\r\n}\r\n\r\nicon-item svg {\r\n width: var(--wje-icon-picker-icon-size);\r\n height: var(--wje-icon-picker-icon-size);\r\n}\r\n\r\nwje-input {\r\n --wje-input-border-radius: 4px;\r\n --wje-input-margin-bottom: 0;\r\n}\r\n\r\nwje-infinite-scroll {\r\n margin-top: 1rem;\r\n}\r\n\r\nwje-select {\r\n --wje-select-border-width: 0 0 1px 0 !important;\r\n --wje-select-border-radius: 0 !important;\r\n margin-bottom: 1rem;\r\n}\r\n\r\n.anchor wje-icon {\r\n --wje-icon-size: 100% !important;\r\n}";
|
|
14
14
|
class IconPicker extends WJElement {
|
|
15
15
|
/**
|
package/dist/wje-master.js
CHANGED
|
@@ -95,7 +95,7 @@ import { default as default82 } from "./wje-toolbar-action.js";
|
|
|
95
95
|
import { default as default83 } from "./wje-tooltip.js";
|
|
96
96
|
import { default as default84 } from "./wje-visually-hidden.js";
|
|
97
97
|
import { default as default85 } from "./wje-sliding-container.js";
|
|
98
|
-
import { P } from "./popup.element-
|
|
98
|
+
import { P } from "./popup.element-Dna4OwCH.js";
|
|
99
99
|
const sk = {
|
|
100
100
|
code: "sk",
|
|
101
101
|
name: "Slovak",
|
package/dist/wje-popup.js
CHANGED
package/dist/wje-select.js
CHANGED
|
@@ -13,7 +13,7 @@ import Chip from "./wje-chip.js";
|
|
|
13
13
|
import Input from "./wje-input.js";
|
|
14
14
|
import Option from "./wje-option.js";
|
|
15
15
|
import Options from "./wje-options.js";
|
|
16
|
-
import { P as Popup } from "./popup.element-
|
|
16
|
+
import { P as Popup } from "./popup.element-Dna4OwCH.js";
|
|
17
17
|
const styles = "/*\r\n[ WJ Select ]\r\n*/\r\n\r\n:host {\r\n --wje-select-border-width: 1px;\r\n --wje-select-border-style: solid;\r\n --wje-select-border-color: var(--wje-border-color);\r\n\r\n --wje-select-options-border-width: 1px;\r\n --wje-select-options-border-style: var(--wje-border-style);\r\n --wje-select-options-border-color: var(--wje-border-color);\r\n\r\n --wje-select-background: var(--wje-background);\r\n --wje-select-line-height: 20px;\r\n --wje-select-color: var(--wje-color);\r\n --wje-select-border-radius: var(--wje-border-radius-medium);\r\n\r\n width: 100%;\r\n display: block;\r\n [slot=arrow] {\r\n transform: rotate(0deg);\r\n transition: all .2s ease-in;\r\n }\r\n}\r\n\r\n.native-select {\r\n &.default{\r\n .wrapper {\r\n display: block;\r\n border-width: var(--wje-select-border-width);\r\n border-style: var(--wje-select-border-style);\r\n border-color: var(--wje-select-border-color);\r\n border-radius: var(--wje-select-border-radius);\r\n padding-inline: .5rem;\r\n padding-top: 0.125rem;\r\n padding-bottom: 0.125rem;\r\n }\r\n .input-wrapper {\r\n padding: 0;\r\n min-height: 28px;\r\n margin-top: -4px;\r\n }\r\n &.focused {\r\n wje-label {\r\n opacity: 0.67;\r\n font-size: 12px;\r\n letter-spacing: normal;\r\n }\r\n }\r\n wje-label {\r\n margin: 0;\r\n display: block;\r\n opacity: 1;\r\n cursor: text;\r\n transition: opacity 0.2s ease 0s;\r\n line-height: var(--wje-select-line-height);\r\n &.fade {\r\n opacity: 0.5;\r\n font-size: 12px;\r\n letter-spacing: normal;\r\n }\r\n }\r\n }\r\n &.standard {\r\n .wrapper {\r\n border-width: var(--wje-select-border-width);\r\n border-style: var(--wje-select-border-style);\r\n border-color: var(--wje-select-border-color);\r\n border-radius: var(--wje-select-border-radius);\r\n }\r\n .input-wrapper {\r\n background: transparent;\r\n width: 100%;\r\n }\r\n }\r\n}\r\n\r\n.wrapper {\r\n display: flex;\r\n width: 100%;\r\n}\r\n\r\n.input-wrapper {\r\n display: grid;\r\n grid-template-columns: 1fr auto auto;\r\n align-items: center;\r\n background-color: var(--wje-select-background);\r\n min-height: 28px;\r\n color: var(--wje-select-color);\r\n line-height: var(--wje-select-line-height);\r\n appearance: none;\r\n padding: 2px .5rem;\r\n font-size: 14px !important;\r\n font-weight: normal;\r\n vertical-align: middle;\r\n}\r\n\r\ninput {\r\n color: var(--wje-select-color);\r\n line-height: var(--wje-select-line-height);\r\n font-size: 14px !important;\r\n font-weight: 400;\r\n letter-spacing: .01em;\r\n border: medium;\r\n height: 25px;\r\n min-height: 25px;\r\n padding: 0;\r\n background: none;\r\n box-shadow: none;\r\n width: 100%;\r\n outline: 0;\r\n font-size: 14px !important;\r\n}\r\n\r\n::placeholder {\r\n opacity: 1;\r\n}\r\n\r\n:host [active] {\r\n .wrapper {\r\n border-radius: var(--wje-select-border-radius) var(--wje-select-border-radius) 0 0;\r\n }\r\n [slot=arrow] {\r\n transform: rotate(180deg);\r\n transition: all .2s ease-in;\r\n }\r\n}\r\n\r\n.options-wrapper {\r\n border-width: var(--wje-select-options-border-width);\r\n border-style: var(--wje-select-options-border-style);\r\n border-color: var(--wje-select-options-border-color);\r\n border-radius: 0 0 var(--wje-select-border-radius) var(--wje-select-border-radius);\r\n margin-top: -1px;\r\n background: var(--wje-select-background);\r\n}\r\n\r\n.find {\r\n --wje-input-border-radius: 0;\r\n --wje-input-border-width: 0 0 1px 0;\r\n}\r\n\r\n.list {\r\n overflow: auto;\r\n height: 100%;\r\n}\r\n\r\n.options-wrapper:has(.find) .list {\r\n height: calc(100% - 32px - .5rem);\r\n}\r\n\r\n:host([multiple]) input {\r\n position: absolute;\r\n z-index: -1;\r\n top: 0;\r\n left: 0;\r\n width: 0;\r\n height: 0;\r\n opacity: 0;\r\n}\r\n\r\n:host([multiple]) .chips {\r\n display: flex;\r\n flex: 1;\r\n align-items: center;\r\n flex-wrap: wrap;\r\n}\r\n\r\n:host([disabled]) .input-wrapper{\r\n opacity: 0.5;\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n}\r\n\r\n.counter {\r\n padding-inline: .5rem;\r\n}\r\n\r\nwje-chip {\r\n --wje-chip-margin: 0 .25rem 0 0;\r\n}\r\n\r\nwje-button {\r\n --wje-padding-top: .25rem;\r\n --wje-padding-start: .25rem;\r\n --wje-padding-end: .25rem;\r\n --wje-padding-bottom: .25rem;\r\n --wje-button-margin-inline: 0 .25rem;\r\n}\r\n";
|
|
18
18
|
class Select extends WJElement {
|
|
19
19
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wj-elements",
|
|
3
3
|
"description": "WebJET Elements is a modern set of user interface tools harnessing the power of web components designed to simplify web application development.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.63",
|
|
5
5
|
"homepage": "https://github.com/lencys/wj-elements",
|
|
6
6
|
"author": "Lukáš Ondrejček <lukas.ondrejcek@gmail.com>",
|
|
7
7
|
"license": "MIT",
|