wj-elements 0.1.46 → 0.1.48
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/package.json +1 -1
- package/dist/dark.css +0 -1
- package/dist/light.css +0 -1
- package/dist/localize.js +0 -45
- package/dist/popup.element-CWsSOxs2.js +0 -1072
- package/dist/router-links-FtZbFUto.js +0 -146
- package/dist/styles.css +0 -1
- package/dist/wje-accordion-item.js +0 -88
- package/dist/wje-accordion.js +0 -79
- package/dist/wje-animation.js +0 -121
- package/dist/wje-aside.js +0 -55
- package/dist/wje-avatar.js +0 -77
- package/dist/wje-badge.js +0 -50
- package/dist/wje-breadcrumb.js +0 -148
- package/dist/wje-breadcrumbs.js +0 -67
- package/dist/wje-button-group.js +0 -78
- package/dist/wje-button.js +0 -207
- package/dist/wje-card-content.js +0 -48
- package/dist/wje-card-controls.js +0 -48
- package/dist/wje-card-header.js +0 -47
- package/dist/wje-card-subtitle.js +0 -55
- package/dist/wje-card-title.js +0 -55
- package/dist/wje-card.js +0 -50
- package/dist/wje-carousel-item.js +0 -33
- package/dist/wje-carousel.js +0 -177
- package/dist/wje-checkbox.js +0 -96
- package/dist/wje-chip.js +0 -32
- package/dist/wje-col.js +0 -27
- package/dist/wje-color-picker.js +0 -953
- package/dist/wje-container.js +0 -57
- package/dist/wje-copy-button.js +0 -164
- package/dist/wje-dialog.js +0 -86
- package/dist/wje-divider.js +0 -53
- package/dist/wje-dropdown.js +0 -114
- package/dist/wje-element.js +0 -453
- package/dist/wje-fetchAndParseCSS.js +0 -40
- package/dist/wje-file-upload-item.js +0 -115
- package/dist/wje-file-upload.js +0 -297
- package/dist/wje-footer.js +0 -56
- package/dist/wje-form.js +0 -28
- package/dist/wje-format-digital.js +0 -85
- package/dist/wje-grid.js +0 -28
- package/dist/wje-header.js +0 -58
- package/dist/wje-icon-picker.js +0 -221
- package/dist/wje-icon.js +0 -119
- package/dist/wje-img-comparer.js +0 -111
- package/dist/wje-img.js +0 -58
- package/dist/wje-infinite-scroll.js +0 -201
- package/dist/wje-inline-edit.js +0 -145
- package/dist/wje-input-file.js +0 -85
- package/dist/wje-input.js +0 -334
- package/dist/wje-item.js +0 -45
- package/dist/wje-label.js +0 -67
- package/dist/wje-list.js +0 -53
- package/dist/wje-main.js +0 -56
- package/dist/wje-masonry.js +0 -218
- package/dist/wje-master.js +0 -423
- package/dist/wje-menu-button.js +0 -65
- package/dist/wje-menu-item.js +0 -230
- package/dist/wje-menu-label.js +0 -57
- package/dist/wje-menu.js +0 -74
- package/dist/wje-option.js +0 -99
- package/dist/wje-options.js +0 -63
- package/dist/wje-popup.js +0 -5
- package/dist/wje-progress-bar.js +0 -161
- package/dist/wje-qr-code.js +0 -2332
- package/dist/wje-radio-group.js +0 -101
- package/dist/wje-radio.js +0 -46
- package/dist/wje-rate.js +0 -260
- package/dist/wje-relative-time.js +0 -85
- package/dist/wje-reorder-dropzone.js +0 -27
- package/dist/wje-reorder-handle.js +0 -115
- package/dist/wje-reorder-item.js +0 -32
- package/dist/wje-reorder.js +0 -138
- package/dist/wje-route.js +0 -46
- package/dist/wje-router-link.js +0 -64
- package/dist/wje-router-outlet.js +0 -127
- package/dist/wje-routerx.js +0 -1088
- package/dist/wje-row.js +0 -58
- package/dist/wje-select.js +0 -242
- package/dist/wje-slider.js +0 -177
- package/dist/wje-sliding-container.js +0 -274
- package/dist/wje-split-view.js +0 -112
- package/dist/wje-status.js +0 -54
- package/dist/wje-store.js +0 -192
- package/dist/wje-tab-group.js +0 -107
- package/dist/wje-tab-panel.js +0 -52
- package/dist/wje-tab.js +0 -59
- package/dist/wje-textarea.js +0 -116
- package/dist/wje-thumbnail.js +0 -64
- package/dist/wje-toast.js +0 -76
- package/dist/wje-toggle.js +0 -94
- package/dist/wje-toolbar-action.js +0 -63
- package/dist/wje-toolbar.js +0 -61
- package/dist/wje-tooltip.js +0 -116
- package/dist/wje-visually-hidden.js +0 -56
package/dist/wje-button.js
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
var j = Object.defineProperty;
|
|
2
|
-
var g = (e, l, o) => l in e ? j(e, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[l] = o;
|
|
3
|
-
var s = (e, l, o) => (g(e, typeof l != "symbol" ? l + "" : l, o), o);
|
|
4
|
-
import h, { WjElementUtils as p, event as i } from "./wje-element.js";
|
|
5
|
-
import v from "./wje-icon.js";
|
|
6
|
-
const b = (e) => e === "false" || e === "null" || e === "NaN" || e === "undefined" || e === "0" ? !1 : !!e, m = '.wje-button-solid.wje-color-primary{background-color:var(--wje-color-primary-9);border-color:var(--wje-color-primary-9);color:var(--wje-color-contrast-0)}.wje-button-outline.wje-color-primary{background-color:var(--wje-color-primary-1);border-color:var(--wje-color-primary-9);color:var(--wje-color-primary-9)}.wje-button-solid.wje-color-complete{background-color:var(--wje-color-complete-9);border-color:var(--wje-color-complete-9);color:var(--wje-color-contrast-0)}.wje-button-outline.wje-color-complete{background-color:var(--wje-color-complete-1);border-color:var(--wje-color-complete-9);color:var(--wje-color-complete-9)}.wje-button-solid.wje-color-success{background-color:var(--wje-color-success-9);border-color:var(--wje-color-success-9);color:var(--wje-color-contrast-0)}.wje-button-outline.wje-color-success{background-color:var(--wje-color-success-1);border-color:var(--wje-color-success-9);color:var(--wje-color-success-9)}.wje-button-solid.wje-color-warning{background-color:var(--wje-color-warning-9);border-color:var(--wje-color-warning-9);color:var(--wje-color-black)}.wje-button-outline.wje-color-warning{background-color:var(--wje-color-warning-1);border-color:var(--wje-color-warning-11);color:var(--wje-color-warning-11)}.wje-button-solid.wje-color-danger{background-color:var(--wje-color-danger-9);border-color:var(--wje-color-danger-9);color:var(--wje-color-contrast-0)}.wje-button-outline.wje-color-danger{background-color:var(--wje-color-danger-1);border-color:var(--wje-color-danger-9);color:var(--wje-color-danger-9)}.wje-button-solid.wje-color-neutral{background-color:var(--wje-color-contrast-9);border-color:var(--wje-color-contrast-9);color:var(--wje-color-contrast-0)}.wje-button-outline.wje-color-neutral{background-color:var(--wje-color-contrast-1);border-color:var(--wje-color-contrast-9);color:var(--wje-color-contrast-9)}.wje-button-solid.wje-color-default{background-color:var(--wje-color-contrast-0);border-color:var(--wje-color-contrast-3);color:var(--wje-color-contrast-11)}.wje-button-outline.wje-color-default{background-color:var(--wje-color-contrast-1);border-color:var(--wje-color-contrast-5);color:var(--wje-color-contrast-11)}:host{--wje-padding-top: .4rem;--wje-padding-start: .5rem;--wje-padding-end: .5rem;--wje-padding-bottom: .4rem;display:inline-flex;position:relative;width:auto;cursor:pointer;margin-inline:var(--wje-button-margin-inline)}:host(.wje-button-group-button){display:block}.native-button{font-family:var(--wje-font-family);font-size:var(--wje-font-size);display:flex;position:relative;align-items:center;width:100%;height:100%;min-height:inherit;border-width:var(--wje-button-border-width);border-style:var(--wje-button-border-style);border-color:var(--wje-button-border-color);background-color:transparent;line-height:1;contain:layout style;cursor:pointer;z-index:0;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;border-radius:var(--wje-button-border-radius);padding-top:var(--wje-padding-top);padding-bottom:var(--wje-padding-bottom);padding-inline:var(--wje-padding-start) var(--wje-padding-end);white-space:nowrap}.native-button:hover{outline-style:solid;outline-width:var(--wje-button-outline-width);transition:outline-width .1s linear}@media (any-hover: hover){.wje-button-solid.wje-color-primary:hover{background-color:var(--wje-color-primary-9);border-color:var(--wje-color-primary-9);color:var(--wje-color-contrast-0);outline-color:var(--wje-color-primary-2)}.wje-button-outline.wje-color-primary:hover{background-color:var(--wje-color-primary-1);border-color:var(--wje-color-primary-9);color:var(--wje-color-primary-9);outline-color:var(--wje-color-primary-2)}.wje-button-solid.wje-color-complete:hover{background-color:var(--wje-color-complete-9);border-color:var(--wje-color-complete-9);color:var(--wje-color-contrast-0);outline-color:var(--wje-color-complete-2)}.wje-button-outline.wje-color-complete:hover{background-color:var(--wje-color-complete-1);border-color:var(--wje-color-complete-9);color:var(--wje-color-complete-9);outline-color:var(--wje-color-complete-2)}.wje-button-solid.wje-color-success:hover{background-color:var(--wje-color-success-9);border-color:var(--wje-color-success-9);color:var(--wje-color-contrast-0);outline-color:var(--wje-color-success-2)}.wje-button-outline.wje-color-success:hover{background-color:var(--wje-color-success-1);border-color:var(--wje-color-success-9);color:var(--wje-color-success-9);outline-color:var(--wje-color-success-2)}.wje-button-solid.wje-color-warning:hover{background-color:var(--wje-color-warning-9);border-color:var(--wje-color-warning-9);color:var(--wje-color-black);outline-color:var(--wje-color-warning-2)}.wje-button-outline.wje-color-warning:hover{background-color:var(--wje-color-warning-1);border-color:var(--wje-color-warning-11);color:var(--wje-color-warning-11);outline-color:var(--wje-color-warning-2)}.wje-button-solid.wje-color-danger:hover{background-color:var(--wje-color-danger-9);border-color:var(--wje-color-danger-9);color:var(--wje-color-contrast-0);outline-color:var(--wje-color-danger-2)}.wje-button-outline.wje-color-danger:hover{background-color:var(--wje-color-danger-1);border-color:var(--wje-color-danger-9);color:var(--wje-color-danger-9);outline-color:var(--wje-color-danger-2)}.wje-button-solid.wje-color-neutral:hover{background-color:var(--wje-color-contrast-9);border-color:var(--wje-color-contrast-9);color:var(--wje-color-contrast-0);outline-color:var(--wje-color-contrast-3)}.wje-button-outline.wje-color-neutral:hover{background-color:var(--wje-color-contrast-1);border-color:var(--wje-color-contrast-9);color:var(--wje-color-contrast-9);outline-color:var(--wje-color-contrast-3)}.wje-button-solid.wje-color-default:hover{background-color:var(--wje-color-contrast-0);border-color:var(--wje-color-contrast-3);color:var(--wje-color-contrast-11);outline-color:var(--wje-color-contrast-3)}.wje-button-outline.wje-color-default:hover{background-color:var(--wje-color-contrast-2);border-color:var(--wje-color-contrast-5);color:var(--wje-color-contrast-11);outline-color:var(--wje-color-contrast-3)}.wje-button-link:hover{background-color:var(--wje-color-contrast-3);border-color:transparent;color:var(--wje-color-contrast-11);outline-color:transparent;outline-width:0}}.button-inner{display:flex;position:relative;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%;z-index:1;line-height:normal}.wje-button-link{border-width:var(--wje-button-border-width);border-radius:var(--wje-button-border-radius);border-color:transparent;background-color:transparent}.wje-button-disabled{cursor:default;opacity:.5;pointer-events:none}:host([round]) .native-button{border-radius:var(--wje-border-radius-pill)}:host([circle]) .native-button{border-radius:var(--wje-border-radius-circle);aspect-ratio:1/1;width:1.813rem;display:flex;align-items:center;--wje-padding-top: 0;--wje-padding-start: 0;--wje-padding-end: 0;--wje-padding-bottom: 0}:host([size=small]) .native-button{--wje-padding-top: .25rem;--wje-padding-start: .25rem;--wje-padding-end: .25rem;--wje-padding-bottom: .25rem}:host([size=large]) .native-button{--wje-padding-top: .6rem;--wje-padding-start: .7rem;--wje-padding-end: .7rem;--wje-padding-bottom: .6rem}:host([size=small][circle]) .native-button{width:1.5rem;--wje-padding-top: 0;--wje-padding-start: 0;--wje-padding-end: 0;--wje-padding-bottom: 0}:host([size=large][circle]) .native-button{width:2.188rem;--wje-padding-top: 0;--wje-padding-start: 0;--wje-padding-end: 0;--wje-padding-bottom: 0}::slotted(wje-icon[slot="start"]){margin:0 .3rem 0 -.3rem}::slotted(wje-icon[slot="end"]){margin:0 -.2rem 0 .3rem}:host(:not([only-caret])) slot[name=caret]{padding:0 0 0 .3rem}:host([only-caret]) slot[name=caret]{padding:0;display:block}:host(.wje-button-group-first:not(.wje-button-group-last)) .native-button{border-start-end-radius:0;border-end-end-radius:0}:host(.wje-button-group-inner) .native-button{border-radius:0}:host(.wje-button-group-last:not(.wje-button-group-first)) .native-button{border-start-start-radius:0;border-end-start-radius:0}:host(.wje-button-group-button:not(.wje-button-group-first)){margin-inline-start:calc(-1 * var(--wje-button-border-width))!important}::slotted([slot="toggle"]){display:none}::slotted([slot="toggle"].show){display:block}';
|
|
7
|
-
class u extends h {
|
|
8
|
-
/**
|
|
9
|
-
* Button constructor
|
|
10
|
-
* @constructor
|
|
11
|
-
*/
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
/**
|
|
15
|
-
* Dependencies
|
|
16
|
-
* @type {Object}
|
|
17
|
-
*/
|
|
18
|
-
s(this, "dependencies", {
|
|
19
|
-
"wje-icon": v
|
|
20
|
-
});
|
|
21
|
-
/**
|
|
22
|
-
* Class name
|
|
23
|
-
* @type {string}
|
|
24
|
-
*/
|
|
25
|
-
s(this, "className", "Button");
|
|
26
|
-
/**
|
|
27
|
-
* Event dialog open method
|
|
28
|
-
* @param {Event} e - The event
|
|
29
|
-
*/
|
|
30
|
-
s(this, "eventDialogOpen", (o) => {
|
|
31
|
-
i.dispatchCustomEvent(this, this.dialog, {
|
|
32
|
-
bubbles: !0
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
/**
|
|
36
|
-
* Toggle states method
|
|
37
|
-
*/
|
|
38
|
-
s(this, "toggleStates", () => {
|
|
39
|
-
this.slotToggle.assignedNodes().filter((c) => c.nodeType === Node.ELEMENT_NODE).forEach((c, w) => {
|
|
40
|
-
c.classList.contains("show") ? c.classList.remove("show") : (c.classList.add("show"), this.setAttribute("value", w === 0 ? "on" : "off"));
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
this.internals_ = this.attachInternals();
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Set active state
|
|
47
|
-
* @param {boolean} value - The value to set
|
|
48
|
-
*/
|
|
49
|
-
set active(o) {
|
|
50
|
-
this.setAttribute("active", "");
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Get active state
|
|
54
|
-
* @returns {boolean} active - The active state
|
|
55
|
-
*/
|
|
56
|
-
get active() {
|
|
57
|
-
return this.hasAttribute("active");
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Set disabled state
|
|
61
|
-
* @param {boolean} value - The value to set
|
|
62
|
-
*/
|
|
63
|
-
set disabled(o) {
|
|
64
|
-
o ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Get disabled state
|
|
68
|
-
* @returns {boolean} disabled - The disabled state
|
|
69
|
-
*/
|
|
70
|
-
get disabled() {
|
|
71
|
-
return this.hasAttribute("disabled");
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Set fill
|
|
75
|
-
* @param {string} value - The value to set
|
|
76
|
-
*/
|
|
77
|
-
set fill(o) {
|
|
78
|
-
this.setAttribute("fill", o);
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Get fill
|
|
82
|
-
* @returns {string} fill - The fill
|
|
83
|
-
*/
|
|
84
|
-
get fill() {
|
|
85
|
-
return this.getAttribute("fill") || "solid";
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Set outline
|
|
89
|
-
* @param {boolean} value - The value to set
|
|
90
|
-
*/
|
|
91
|
-
set outline(o) {
|
|
92
|
-
this.setAttribute("outline", "");
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Get outline
|
|
96
|
-
* @returns {boolean} outline - The outline
|
|
97
|
-
*/
|
|
98
|
-
get outline() {
|
|
99
|
-
return this.hasAttribute("outline");
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Set stop propagation
|
|
103
|
-
* @param {boolean} value - The value to set
|
|
104
|
-
*/
|
|
105
|
-
set stopPropagation(o) {
|
|
106
|
-
this.setAttribute("stop-propagation", b(o));
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Get stop propagation
|
|
110
|
-
* @returns {boolean} stopPropagation - The stop propagation
|
|
111
|
-
*/
|
|
112
|
-
get stopPropagation() {
|
|
113
|
-
return b(this.getAttribute("stop-propagation"));
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Get CSS stylesheet
|
|
117
|
-
* @static
|
|
118
|
-
* @returns {Object} styles - The CSS styles
|
|
119
|
-
*/
|
|
120
|
-
static get cssStyleSheet() {
|
|
121
|
-
return m;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Get observed attributes
|
|
125
|
-
* @static
|
|
126
|
-
* @returns {Array<string>} observedAttributes - The observed attributes
|
|
127
|
-
*/
|
|
128
|
-
static get observedAttributes() {
|
|
129
|
-
return ["disabled"];
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* @summary Callback function that is called when the custom element is associated with a form.
|
|
133
|
-
* This function sets the internal `_form` property to the associated form.
|
|
134
|
-
* @param {HTMLFormElement} form - The form the custom element is associated with.
|
|
135
|
-
*/
|
|
136
|
-
formAssociatedCallback(o) {
|
|
137
|
-
this._form = o;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* @summary Callback function that is called when the form-associated state of the custom element changes.
|
|
141
|
-
* This function updates the 'disabled' attribute of the element based on the new state.
|
|
142
|
-
* @param {boolean} disabled - The new form-associated state.
|
|
143
|
-
*/
|
|
144
|
-
formDisabledCallback(o) {
|
|
145
|
-
o ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Setup attributes
|
|
149
|
-
*/
|
|
150
|
-
setupAttributes() {
|
|
151
|
-
this.isShadowRoot = "open";
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Draw method
|
|
155
|
-
* @param {Object} context - The context
|
|
156
|
-
* @param {Object} store - The store
|
|
157
|
-
* @param {Object} params - The parameters
|
|
158
|
-
* @returns {Object} fragment - The document fragment
|
|
159
|
-
*/
|
|
160
|
-
draw(o, c, w) {
|
|
161
|
-
let d = document.createDocumentFragment(), t = document.createElement(this.hasAttribute("href") ? "a" : "button");
|
|
162
|
-
if (this.hasAttribute("href") ? t.setAttribute("href", this.getAttribute("href")) : this.type === "submit" && t.setAttribute("type", "submit"), t.classList.add("native-button"), t.setAttribute("part", "native"), this.classList.remove("wje-button-disabled"), this.disabled && t.classList.add("wje-button-disabled"), this.variant && t.classList.add("wje-button-" + this.variant), this.hasAttribute("round") && t.classList.add("wje-button-round"), this.hasAttribute("circle") && t.classList.add("wje-button-circle"), this.outline && t.classList.add("wje-outline"), this.fill && t.classList.add("wje-button-" + this.fill), this.size && t.classList.add("wje-button-" + this.size), this.hasAttribute("color") ? t.classList.add("wje-color-" + this.color, "wje-color") : t.classList.add("wje-color-default", "wje-color"), this.querySelectorAll("[slot=caret]").length < 1 && this.hasAttribute("caret") || this.hasAttribute("only-caret")) {
|
|
163
|
-
let a = document.createElement("wje-icon");
|
|
164
|
-
a.style.setProperty("--wje-icon-size", "14px"), a.setAttribute("slot", "caret"), a.setAttribute("name", "chevron-down"), this.appendChild(a);
|
|
165
|
-
}
|
|
166
|
-
if (this.active) {
|
|
167
|
-
this.classList.add("wje-active");
|
|
168
|
-
let a = document.createElement("wje-icon");
|
|
169
|
-
a.setAttribute("name", "check"), this.appendChild(a);
|
|
170
|
-
}
|
|
171
|
-
let n = document.createElement("span");
|
|
172
|
-
n.classList.add("button-inner");
|
|
173
|
-
let r = document.createElement("slot");
|
|
174
|
-
if (r.setAttribute("name", "icon-only"), n.appendChild(r), r = document.createElement("slot"), r.setAttribute("name", "start"), n.appendChild(r), r = document.createElement("slot"), n.appendChild(r), r = document.createElement("slot"), r.setAttribute("name", "end"), n.appendChild(r), r = document.createElement("slot"), r.setAttribute("name", "caret"), n.appendChild(r), this.hasToggle = p.hasSlot(this, "toggle"), this.hasToggle && (this.slotToggle = document.createElement("slot"), this.slotToggle.setAttribute("name", "toggle"), n.appendChild(this.slotToggle)), t.appendChild(n), this.hasAttribute("tooltip")) {
|
|
175
|
-
let a = document.createElement("wje-tooltip");
|
|
176
|
-
a.setAttribute("content", this.getAttribute("tooltip")), a.setAttribute("placement", this.getAttribute("tooltip-placement") || "top"), a.appendChild(t), d.appendChild(a);
|
|
177
|
-
} else
|
|
178
|
-
d.appendChild(t);
|
|
179
|
-
return d;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* After draw method
|
|
183
|
-
*/
|
|
184
|
-
afterDraw() {
|
|
185
|
-
this.hasToggle && (this.toggle === "off" ? (this.slotToggle.assignedNodes()[1].classList.add("show"), this.setAttribute("value", "off")) : (this.slotToggle.assignedNodes()[0].classList.add("show"), this.setAttribute("value", "on"))), this.hasAttribute("dialog") ? i.addListener(this, "click", null, this.eventDialogOpen) : i.addListener(this, "click", "wje-button:click", null), this.hasToggle && i.addListener(this, "click", "wje-button:toggle", this.toggleStates, { stopPropagation: this.stopPropagation }), this.type === "submit" && i.addListener(this, "click", "wje-button:submit", () => {
|
|
186
|
-
i.dispatchCustomEvent(this.internals_.form, "submit", {});
|
|
187
|
-
}), this.type === "reset" && i.addListener(this, "click", "wje-button:reset", () => {
|
|
188
|
-
this.internals_.form.reset();
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Before disconnect method
|
|
193
|
-
*/
|
|
194
|
-
beforeDisconnect() {
|
|
195
|
-
this.removeEventListener("click", this.eventDialogOpen);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* @summary A static property that indicates whether the custom element is form-associated or not.
|
|
200
|
-
* Form-associated custom elements are elements that can participate in form submission.
|
|
201
|
-
* @type {boolean}
|
|
202
|
-
*/
|
|
203
|
-
s(u, "formAssociated", !0);
|
|
204
|
-
u.define("wje-button", u);
|
|
205
|
-
export {
|
|
206
|
-
u as default
|
|
207
|
-
};
|
package/dist/wje-card-content.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
var d = Object.defineProperty;
|
|
2
|
-
var i = (e, t, o) => t in e ? d(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
-
var a = (e, t, o) => (i(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
4
|
-
import s from "./wje-element.js";
|
|
5
|
-
const p = ":host{display:block;padding:var(--wje-card-content-padding)}:host.no-padding .row{margin-left:0;margin-right:0}:host.no-bottom-padding{padding-bottom:0}:host.no-top-padding{padding-top:0}:host .title{margin-top:0}:host.scrollable{margin-bottom:20px}:host h3{line-height:34px;font-size:26px}";
|
|
6
|
-
class l extends s {
|
|
7
|
-
/**
|
|
8
|
-
* CardContent constructor
|
|
9
|
-
* @constructor
|
|
10
|
-
*/
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
/**
|
|
14
|
-
* Class name
|
|
15
|
-
* @type {string}
|
|
16
|
-
*/
|
|
17
|
-
a(this, "className", "CardContent");
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get CSS stylesheet
|
|
21
|
-
* @static
|
|
22
|
-
* @returns {Object} styles - The CSS styles
|
|
23
|
-
*/
|
|
24
|
-
static get cssStyleSheet() {
|
|
25
|
-
return p;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Setup attributes
|
|
29
|
-
*/
|
|
30
|
-
setupAttributes() {
|
|
31
|
-
this.isShadowRoot = "open";
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Draw method
|
|
35
|
-
* @param {Object} context - The context
|
|
36
|
-
* @param {Object} store - The store
|
|
37
|
-
* @param {Object} params - The parameters
|
|
38
|
-
* @returns {Object} fragment - The document fragment
|
|
39
|
-
*/
|
|
40
|
-
draw(o, c, m) {
|
|
41
|
-
let n = document.createDocumentFragment(), r = document.createElement("slot");
|
|
42
|
-
return n.appendChild(r), n;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
s.define("wje-card-content", l);
|
|
46
|
-
export {
|
|
47
|
-
l as default
|
|
48
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
var l = Object.defineProperty;
|
|
2
|
-
var i = (e, t, o) => t in e ? l(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
-
var s = (e, t, o) => (i(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
4
|
-
import n from "./wje-element.js";
|
|
5
|
-
const c = ":host{font-family:var(--wje-card-controls-font-family);text-transform:uppercase;display:inline-block;letter-spacing:.06em;font-size:var(--wje-card-controls-font-size);font-weight:500;margin:0;padding:0;line-height:normal;overflow:hidden;text-overflow:ellipsis;filter:alpha(opacity=40);transition:opacity .3s ease;position:absolute;right:1rem;top:.5rem}";
|
|
6
|
-
class m extends n {
|
|
7
|
-
/**
|
|
8
|
-
* CardControls constructor
|
|
9
|
-
* @constructor
|
|
10
|
-
*/
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
/**
|
|
14
|
-
* Class name
|
|
15
|
-
* @type {string}
|
|
16
|
-
*/
|
|
17
|
-
s(this, "className", "CardControls");
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get CSS stylesheet
|
|
21
|
-
* @static
|
|
22
|
-
* @returns {Object} styles - The CSS styles
|
|
23
|
-
*/
|
|
24
|
-
static get cssStyleSheet() {
|
|
25
|
-
return c;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Setup attributes
|
|
29
|
-
*/
|
|
30
|
-
setupAttributes() {
|
|
31
|
-
this.isShadowRoot = "open";
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Draw method
|
|
35
|
-
* @param {Object} context - The context
|
|
36
|
-
* @param {Object} store - The store
|
|
37
|
-
* @param {Object} params - The parameters
|
|
38
|
-
* @returns {Object} fragment - The document fragment
|
|
39
|
-
*/
|
|
40
|
-
draw(o, d, p) {
|
|
41
|
-
let r = document.createDocumentFragment(), a = document.createElement("slot");
|
|
42
|
-
return r.appendChild(a), r;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
n.define("wje-card-controls", m);
|
|
46
|
-
export {
|
|
47
|
-
m as default
|
|
48
|
-
};
|
package/dist/wje-card-header.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
var n = Object.defineProperty;
|
|
2
|
-
var i = (t, e, r) => e in t ? n(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
-
var s = (t, e, r) => (i(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
-
import o from "./wje-element.js";
|
|
5
|
-
const c = ':host{background:transparent;border-radius:0;border-bottom:0;padding:var(--wje-card-header-padding);position:relative;display:flex;flex-direction:column}:host(.wje-separator):after{content:"";height:1px;background:#00000014;margin-top:.5rem}';
|
|
6
|
-
class l extends o {
|
|
7
|
-
/**
|
|
8
|
-
* CardHeader constructor.
|
|
9
|
-
*/
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
/**
|
|
13
|
-
* Class name for the CardHeader.
|
|
14
|
-
* @type {string}
|
|
15
|
-
*/
|
|
16
|
-
s(this, "className", "CardHeader");
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Getter for the CSS stylesheet.
|
|
20
|
-
* @returns {Object} The styles object.
|
|
21
|
-
* @static
|
|
22
|
-
*/
|
|
23
|
-
static get cssStyleSheet() {
|
|
24
|
-
return c;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Sets up the attributes for the CardHeader.
|
|
28
|
-
*/
|
|
29
|
-
setupAttributes() {
|
|
30
|
-
this.isShadowRoot = "open";
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Draws the CardHeader.
|
|
34
|
-
* @param {Object} context - The context to draw in.
|
|
35
|
-
* @param {Object} store - The store to use.
|
|
36
|
-
* @param {Object} params - The parameters to use.
|
|
37
|
-
* @returns {DocumentFragment} The created document fragment.
|
|
38
|
-
*/
|
|
39
|
-
draw(r, p, m) {
|
|
40
|
-
let a = document.createDocumentFragment(), d = document.createElement("slot");
|
|
41
|
-
return this.hasAttribute("separator") && this.classList.add("wje-separator"), a.appendChild(d), a;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
o.define("wje-card-header", l);
|
|
45
|
-
export {
|
|
46
|
-
l as default
|
|
47
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var o = Object.defineProperty;
|
|
2
|
-
var l = (e, t, a) => t in e ? o(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
|
-
var s = (e, t, a) => (l(e, typeof t != "symbol" ? t + "" : t, a), a);
|
|
4
|
-
import i from "./wje-element.js";
|
|
5
|
-
const c = ":host{transition:opacity .3s ease;font-family:var(--wje-card-subtitle-font-family);font-size:var(--wje-card-subtitle-font-size);text-transform:uppercase;display:inline-block;letter-spacing:.06em;font-weight:500;margin:0;padding:var(--wje-card-subtitle-padding);line-height:normal;overflow:hidden;text-overflow:ellipsis;filter:alpha(opacity=40)}";
|
|
6
|
-
class d extends i {
|
|
7
|
-
/**
|
|
8
|
-
* CardSubtitle constructor.
|
|
9
|
-
*/
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
/**
|
|
13
|
-
* Class name for the CardSubtitle.
|
|
14
|
-
* @type {string}
|
|
15
|
-
*/
|
|
16
|
-
s(this, "className", "CardTitle");
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Getter for the CSS stylesheet.
|
|
20
|
-
* @returns {Object} The styles object.
|
|
21
|
-
* @static
|
|
22
|
-
*/
|
|
23
|
-
static get cssStyleSheet() {
|
|
24
|
-
return c;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Getter for the observed attributes.
|
|
28
|
-
* @returns {Array} An empty array.
|
|
29
|
-
* @static
|
|
30
|
-
*/
|
|
31
|
-
static get observedAttributes() {
|
|
32
|
-
return [];
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Sets up the attributes for the CardSubtitle.
|
|
36
|
-
*/
|
|
37
|
-
setupAttributes() {
|
|
38
|
-
this.isShadowRoot = "open";
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Draws the CardSubtitle.
|
|
42
|
-
* @param {Object} context - The context to draw in.
|
|
43
|
-
* @param {Object} store - The store to use.
|
|
44
|
-
* @param {Object} params - The parameters to use.
|
|
45
|
-
* @returns {DocumentFragment} The created document fragment.
|
|
46
|
-
*/
|
|
47
|
-
draw(a, m, p) {
|
|
48
|
-
let r = document.createDocumentFragment(), n = document.createElement("slot");
|
|
49
|
-
return r.appendChild(n), r;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
i.define("wje-card-subtitle", d);
|
|
53
|
-
export {
|
|
54
|
-
d as default
|
|
55
|
-
};
|
package/dist/wje-card-title.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var l = Object.defineProperty;
|
|
2
|
-
var o = (e, t, r) => t in e ? l(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
-
var i = (e, t, r) => (o(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
-
import n from "./wje-element.js";
|
|
5
|
-
const d = ":host{font-size:var(--wje-card-title-font-size);font-weight:var(--wje-card-title-font-weight);margin:var(--wje-card-title-margin);padding:var(--wje-card-title-padding);line-height:var(--wje-card-title-line-height);display:block;position:relative}";
|
|
6
|
-
class c extends n {
|
|
7
|
-
/**
|
|
8
|
-
* CardTitle constructor.
|
|
9
|
-
*/
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
/**
|
|
13
|
-
* Class name for the CardTitle.
|
|
14
|
-
* @type {string}
|
|
15
|
-
*/
|
|
16
|
-
i(this, "className", "CardTitle");
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Getter for the CSS stylesheet.
|
|
20
|
-
* @returns {Object} The styles object.
|
|
21
|
-
* @static
|
|
22
|
-
*/
|
|
23
|
-
static get cssStyleSheet() {
|
|
24
|
-
return d;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Getter for the observed attributes.
|
|
28
|
-
* @returns {Array} An empty array.
|
|
29
|
-
* @static
|
|
30
|
-
*/
|
|
31
|
-
static get observedAttributes() {
|
|
32
|
-
return [];
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Sets up the attributes for the CardTitle.
|
|
36
|
-
*/
|
|
37
|
-
setupAttributes() {
|
|
38
|
-
this.isShadowRoot = "open";
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Draws the CardTitle.
|
|
42
|
-
* @param {Object} context - The context to draw in.
|
|
43
|
-
* @param {Object} store - The store to use.
|
|
44
|
-
* @param {Object} params - The parameters to use.
|
|
45
|
-
* @returns {DocumentFragment} The created document fragment.
|
|
46
|
-
*/
|
|
47
|
-
draw(r, m, g) {
|
|
48
|
-
let a = document.createDocumentFragment(), s = document.createElement("slot");
|
|
49
|
-
return a.appendChild(s), a;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
n.define("wje-card-title", c);
|
|
53
|
-
export {
|
|
54
|
-
c as default
|
|
55
|
-
};
|
package/dist/wje-card.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var s = Object.defineProperty;
|
|
2
|
-
var i = (o, r, e) => r in o ? s(o, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[r] = e;
|
|
3
|
-
var l = (o, r, e) => (i(o, typeof r != "symbol" ? r + "" : r, e), e);
|
|
4
|
-
import n from "./wje-element.js";
|
|
5
|
-
const w = ":host{width:100%}.native-card{background-color:transparent;margin:0;box-shadow:var(--wje-card-shadow);border-color:var(--wje-border-color);border-style:var(--wje-border-style);border-width:var(--wje-border-width);border-radius:var(--wje-card-border-radius);font-family:var(--wje-font-family);font-size:var(--wje-font-size);line-height:var(--wje-line-height-normal);position:relative;width:100%;word-wrap:normal;display:flex;flex-direction:column;overflow:hidden;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.native-card.wje-color-primary{background:var(--wje-color-primary-9);color:var(--wje-color-contrast-0);border-color:var(--wje-color-primary-9)}.native-card.wje-color-complete{background:var(--wje-color-complete-9);color:var(--wje-color-contrast-0);border-color:var(--wje-color-complete-9)}.native-card.wje-color-success{background:var(--wje-color-success-9);color:var(--wje-color-contrast-0);border-color:var(--wje-color-success-9)}.native-card.wje-color-warning{background:var(--wje-color-warning-9);color:var(--wje-color);border-color:var(--wje-color-warning-9)}.native-card.wje-color-danger{background:var(--wje-color-danger-9);color:var(--wje-color-contrast-0);border-color:var(--wje-color-danger-9)}.native-card.wje-color-info{background:var(--wje-color-info-9);color:var(--wje-color-contrast-0);border-color:var(--wje-color-info-9)}.native-card.wje-color-menu{background:var(--wje-color-contrast-9);color:var(--wje-color-contrast-0);border-color:var(--wje-color-contrast-9)}";
|
|
6
|
-
class v extends n {
|
|
7
|
-
/**
|
|
8
|
-
* Card constructor
|
|
9
|
-
* @constructor
|
|
10
|
-
*/
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
/**
|
|
14
|
-
* Class name
|
|
15
|
-
* @type {string}
|
|
16
|
-
*/
|
|
17
|
-
l(this, "className", "Card");
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get CSS stylesheet
|
|
21
|
-
* @static
|
|
22
|
-
* @returns {Object} styles - The CSS styles
|
|
23
|
-
*/
|
|
24
|
-
static get cssStyleSheet() {
|
|
25
|
-
return w;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Setup attributes
|
|
29
|
-
*/
|
|
30
|
-
setupAttributes() {
|
|
31
|
-
this.isShadowRoot = "open";
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Draw method
|
|
35
|
-
* @param {Object} context - The context
|
|
36
|
-
* @param {Object} store - The store
|
|
37
|
-
* @param {Object} params - The parameters
|
|
38
|
-
* @returns {Object} fragment - The document fragment
|
|
39
|
-
*/
|
|
40
|
-
draw(e, j, c) {
|
|
41
|
-
let t = document.createDocumentFragment(), a = document.createElement("div");
|
|
42
|
-
a.setAttribute("part", "native"), a.classList.add("native-card");
|
|
43
|
-
let d = document.createElement("slot");
|
|
44
|
-
return c.color && a.classList.add("wje-color-" + c.color), a.appendChild(d), t.appendChild(a), t;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
n.define("wje-card", v);
|
|
48
|
-
export {
|
|
49
|
-
v as default
|
|
50
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
var o = Object.defineProperty;
|
|
2
|
-
var c = (t, e, a) => e in t ? o(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
|
|
3
|
-
var r = (t, e, a) => (c(t, typeof e != "symbol" ? e + "" : e, a), a);
|
|
4
|
-
import l, { event as d } from "./wje-element.js";
|
|
5
|
-
const m = ":host{display:flex;align-items:center;justify-content:center;flex-direction:column;width:var(--wje-carousel-size, 100%);max-height:100%;aspect-ratio:var(--wje-carousel-item-aspect-ratio);scroll-snap-align:center;scroll-snap-stop:always}.native-carousel-item{width:100%;height:100%;display:flex}::slotted(wje-img){width:100%!important;height:100%!important;object-fit:contain;display:flex}";
|
|
6
|
-
class u extends l {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
r(this, "className", "CarouselItem");
|
|
10
|
-
}
|
|
11
|
-
static get cssStyleSheet() {
|
|
12
|
-
return m;
|
|
13
|
-
}
|
|
14
|
-
static get observedAttributes() {
|
|
15
|
-
return [];
|
|
16
|
-
}
|
|
17
|
-
setupAttributes() {
|
|
18
|
-
this.isShadowRoot = "open";
|
|
19
|
-
}
|
|
20
|
-
draw(a, p, h) {
|
|
21
|
-
let i = document.createDocumentFragment(), s = document.createElement("div");
|
|
22
|
-
s.classList.add("native-carousel-item"), s.setAttribute("part", "native");
|
|
23
|
-
let n = document.createElement("slot");
|
|
24
|
-
return s.appendChild(n), i.appendChild(s), i;
|
|
25
|
-
}
|
|
26
|
-
afterDraw() {
|
|
27
|
-
d.addListener(this, "click", "wje-carousel-item:click");
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
l.define("wje-carousel-item", u);
|
|
31
|
-
export {
|
|
32
|
-
u as default
|
|
33
|
-
};
|